fix: BUG修改

This commit is contained in:
kun 2024-04-12 21:02:09 +08:00
parent 3b70723546
commit 47cb20a981
2 changed files with 11 additions and 10 deletions

View File

@ -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);
} }

View File

@ -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 = [
{ {