| | |
| | | <template> |
| | | <div class="contentBox"> |
| | | |
| | | |
| | | <div |
| | | class="box" |
| | | ref="box" |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { selectMenuRecursive, queryMenuTree } from '../../api/api'; |
| | | import { selectMenuRecursive, queryMenuTree, sign_insertOpLog } from '../../api/api'; |
| | | import customElMenu from '../../components/customElMenu.vue'; |
| | | import dataUpdata from '@/views/datamanage/dataUpdata.vue'; //数据管理-数据上传 |
| | | import catalogueManage from '@/views/datamanage/catalogueManage.vue'; //数据管理-目录管理 |
| | |
| | | return value.type == 1; |
| | | }); |
| | | this.menuList = this.treeData(menuList); |
| | | |
| | | this.m1 = this.menuList[0].cnName; |
| | | this.setViewController(this.menuList[0]); |
| | | |
| | | |
| | | const hanleselectindex = sessionStorage.getItem('hanleselectindex') |
| | | if (hanleselectindex) { |
| | | this.$nextTick(function (){ |
| | | this.$nextTick(function () { |
| | | this.handleselecttwo(JSON.parse(hanleselectindex).url, JSON.parse(hanleselectindex)) |
| | | this.setViewController(JSON.parse(hanleselectindex)) |
| | | this.setViewController(JSON.parse(hanleselectindex)) |
| | | }) |
| | | } |
| | | } else { |
| | |
| | | if (res.children != null) { |
| | | this.setViewController(res.children[0]); |
| | | } else { |
| | | this.signInsertOpLog(this.m1, res.cnName) |
| | | this.$store.state.currentPerms = res.perms; |
| | | this.setMenuFlag = res.url; |
| | | this.activeIndex = res.url; |
| | | } |
| | | }, |
| | | async signInsertOpLog(m1, m2) { |
| | | var obj = { |
| | | m1: m1, |
| | | m2: m2, |
| | | } |
| | | const data = await sign_insertOpLog(obj); |
| | | }, |
| | | treeData(source) { |
| | | let cloneData = JSON.parse(JSON.stringify(source)); // 对源数据深度克隆 |
| | |
| | | |
| | | handleselect(index, indexPath, e) { |
| | | const a = JSON.stringify(e.$attrs.perms) |
| | | this.signInsertOpLog(this.m1, e.$attrs.perms.cnName) |
| | | sessionStorage.setItem('hanleselectindex', a) |
| | | var data = e.$attrs.perms; |
| | | this.$store.state.currentPerms = data.perms; |