fix: BUG修改
This commit is contained in:
parent
3b70723546
commit
47cb20a981
@ -169,20 +169,20 @@ export default {
|
|||||||
this.selectProject(item);
|
this.selectProject(item);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
if (!this.selectedProjectSn) {
|
if (!this.selectedProjectSn && !this.$store.state.projectSn) {
|
||||||
// 加判断是为了在循环中只选中第一个
|
// 加判断是为了在循环中只选中第一个
|
||||||
this.selectedProjectSn = obj.sn;
|
this.selectedProjectSn = obj.sn;
|
||||||
this.setTreeActive();
|
|
||||||
// 修改全局projectSn
|
// 修改全局projectSn
|
||||||
this.$store.commit("setProjectSn", obj.sn);
|
this.$store.commit("setProjectSn", obj.sn);
|
||||||
this.$store.commit("setProDetail", obj);
|
this.$store.commit("setProDetail", obj);
|
||||||
}
|
}
|
||||||
|
this.setTreeActive();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 设置树形的选中项目样式
|
// 设置树形的选中项目样式
|
||||||
setTreeActive(){
|
setTreeActive(){
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
let activeSn = this.selectedProjectSn || this.$store.state.selectedGroupSn
|
let activeSn = this.selectedProjectSn || this.$store.state.projectSn
|
||||||
if(activeSn){
|
if(activeSn){
|
||||||
this.$refs.tree.setCurrentKey(activeSn);
|
this.$refs.tree.setCurrentKey(activeSn);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
frameborder="1"
|
frameborder="1"
|
||||||
></iframe>
|
></iframe>
|
||||||
</div>
|
</div>
|
||||||
<div class="placeholderBox" v-else>
|
<div class="placeholderBox" v-if="!selectGroupDialog && !workSpaceShow">
|
||||||
<img src="@/assets/images/noData.png" alt="" />
|
<img src="@/assets/images/noData.png" alt="" />
|
||||||
<p>暂无数据</p>
|
<p>暂无数据</p>
|
||||||
</div>
|
</div>
|
||||||
@ -90,29 +90,30 @@ export default {
|
|||||||
getNewUserAllModulePageApi({
|
getNewUserAllModulePageApi({
|
||||||
projectSn: this.$store.state.projectSn,
|
projectSn: this.$store.state.projectSn,
|
||||||
moduleType: 7,
|
moduleType: 7,
|
||||||
userId: this.$store.state.userInfo.userId
|
userId: this.$store.state.userInfo.userId,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
// 传递的工作流菜单
|
// 传递的工作流菜单
|
||||||
const responseMenuList = [];
|
const responseMenuList = [];
|
||||||
let all = res.result.moduleList;
|
let all = res.result.moduleList;
|
||||||
if(all.length == 0) {
|
if (all.length == 0) {
|
||||||
this.workSpaceShow = false;
|
this.workSpaceShow = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
console.log("all", res.result);
|
console.log("all", res.result);
|
||||||
all.forEach((element, index) => {
|
all.forEach((element, index) => {
|
||||||
all[index].operation = false;
|
all[index].operation = false;
|
||||||
res.result.menuList.forEach((element2) => {
|
if (element.moduleName == "工作流") {
|
||||||
if (element2.moduleId == element.moduleId) {
|
element.menuList.forEach((element2) => {
|
||||||
all[index].operation = true;
|
all[index].operation = true;
|
||||||
responseMenuList.push({
|
responseMenuList.push({
|
||||||
menuName: element2.menuName,
|
menuName: element2.menuName,
|
||||||
path: element2.path,
|
path: element2.path,
|
||||||
icon: element2.icon,
|
icon: element2.icon,
|
||||||
});
|
});
|
||||||
}
|
});
|
||||||
});
|
}
|
||||||
});
|
});
|
||||||
|
console.log(responseMenuList, "我的测试11112222222222");
|
||||||
// 传递的工作流菜单
|
// 传递的工作流菜单
|
||||||
const defaultMenuList = [
|
const defaultMenuList = [
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user