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);
});
} else {
if (!this.selectedProjectSn) {
if (!this.selectedProjectSn && !this.$store.state.projectSn) {
//
this.selectedProjectSn = obj.sn;
this.setTreeActive();
// projectSn
this.$store.commit("setProjectSn", obj.sn);
this.$store.commit("setProDetail", obj);
}
this.setTreeActive();
}
},
//
setTreeActive(){
this.$nextTick(() => {
let activeSn = this.selectedProjectSn || this.$store.state.selectedGroupSn
let activeSn = this.selectedProjectSn || this.$store.state.projectSn
if(activeSn){
this.$refs.tree.setCurrentKey(activeSn);
}

View File

@ -16,7 +16,7 @@
frameborder="1"
></iframe>
</div>
<div class="placeholderBox" v-else>
<div class="placeholderBox" v-if="!selectGroupDialog && !workSpaceShow">
<img src="@/assets/images/noData.png" alt="" />
<p>暂无数据</p>
</div>
@ -90,29 +90,30 @@ export default {
getNewUserAllModulePageApi({
projectSn: this.$store.state.projectSn,
moduleType: 7,
userId: this.$store.state.userInfo.userId
userId: this.$store.state.userInfo.userId,
}).then((res) => {
//
const responseMenuList = [];
let all = res.result.moduleList;
if(all.length == 0) {
if (all.length == 0) {
this.workSpaceShow = false;
return;
}
console.log("all", res.result);
all.forEach((element, index) => {
all[index].operation = false;
res.result.menuList.forEach((element2) => {
if (element2.moduleId == element.moduleId) {
if (element.moduleName == "工作流") {
element.menuList.forEach((element2) => {
all[index].operation = true;
responseMenuList.push({
menuName: element2.menuName,
path: element2.path,
icon: element2.icon,
});
}
});
});
}
});
console.log(responseMenuList, "我的测试11112222222222");
//
const defaultMenuList = [
{