| | |
| | | class="contentDiv" |
| | | @click="setMenuMove(index, item)" |
| | | v-for="(item, index) in listMenu" |
| | | :key="index" |
| | | > |
| | | <div style="display: flex;align-items: center"> |
| | | <div class="ImgMenu"> |
| | |
| | | v-if="item.children && item.children.length>0" |
| | | > |
| | | <div |
| | | v-for="res in item.children" |
| | | v-for="(res,i) in item.children" |
| | | :key="i" |
| | | @click="setLiClick(res,index)" |
| | | :class="{ changeLiStyle: changeliSelect == res.cnName }" |
| | | > |
| | |
| | | }, |
| | | //鼠标移入菜单事件 |
| | | setMenuMove(index, item) { |
| | | debugger |
| | | |
| | | if (item.perms != null && item.perms != "") { |
| | | this.$router.push(item.url); |
| | | if (this.showFlag != null) { |
| | |
| | | this.changeSelectStyle = index; |
| | | sessionStorage.setItem('changeSelectStyle', index) |
| | | } else { |
| | | |
| | | |
| | | if (this.showFlag != index) { |
| | | this.showFlag = index; |
| | | |
| | | if (item.url == '/bankController') { |
| | | this.setLiClick(item, index) |
| | | } else { |
| | | this.showFlag = index; |
| | | if (item.url && item.children && item.children.length == 0) { |
| | | window.open(item.url) |
| | | } |
| | | } |
| | | |
| | | this.changeSelectStyle = index; |
| | | |
| | | |
| | | if (item.url && item.children && item.children.length == 0) { |
| | | window.open(item.url) |
| | | } |
| | | |
| | | } else { |
| | | this.showFlag = null; |
| | | } |
| | |
| | | } |
| | | }, |
| | | async setMenuTree(res) { |
| | | |
| | | for (var i in res) { |
| | | res[i].checkClass = res[i].css + '1'; |
| | | res[i].show = false; //控制显隐 |
| | | |
| | | if (res[i].perms == null || res[i].perms == "") { |
| | | const result = await selectMenuRecursive({ id: res[i].id }); |
| | | debugger |
| | | |
| | | if (result.code == 200) { |
| | | |
| | | res[i].children = result.result.filter((value) => { |
| | | return value.isShow == 1; |
| | | }) |
| | | .filter((value) => { |
| | | if (value.pid == res[i].id) { |
| | | // console.log(JSON.stringify(value)) |
| | | } |
| | | return value.pid == res[i].id; |
| | | }); |
| | | |