From be1b79b16a1dabf6e66d04ea9e6b3dd38a20e430 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Wed, 13 Jul 2022 14:00:34 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=92=E8=89=B2=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.js | 4 +- .../base/organization/organization.vue | 4529 +++++++++-------- src/views/modules/workSys/role/role.vue | 26 +- src/views/modules/workSys/role/roleForm.vue | 31 +- 4 files changed, 2430 insertions(+), 2160 deletions(-) diff --git a/src/router/index.js b/src/router/index.js index ad616091..a3c1e3f3 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -380,7 +380,7 @@ router.beforeEach((to, from, next) => { // fnAddDynamicMenuRoutes2(window.SITE_CONFIG["menuShujuList"]); http - .get("/gov/access/menu/nav?tableName=data_menu") + .get("gov/access/menu/navDigitalCommunity?tableName=data_menu") .then(({ data: res }) => { if (res.code == 10005 || res.code == 10006 || res.code == 10007) { // 10005 token为空 10006登陆超时 10007别处登录 @@ -406,7 +406,7 @@ router.beforeEach((to, from, next) => { }); http - .get("/gov/access/menu/nav") + .get("gov/access/menu/navDigitalCommunity") .then(({ data: res }) => { if (res.code == 10005 || res.code == 10006 || res.code == 10007) { // 10005 token为空 10006登陆超时 10007别处登录 diff --git a/src/views/modules/base/organization/organization.vue b/src/views/modules/base/organization/organization.vue index 8860180f..c61ba5f5 100644 --- a/src/views/modules/base/organization/organization.vue +++ b/src/views/modules/base/organization/organization.vue @@ -1,2236 +1,2477 @@ \ No newline at end of file diff --git a/src/views/modules/workSys/role/role.vue b/src/views/modules/workSys/role/role.vue index c70125bc..f61225cd 100644 --- a/src/views/modules/workSys/role/role.vue +++ b/src/views/modules/workSys/role/role.vue @@ -16,7 +16,7 @@ - - + --> 查看 + 修改 - 删除 @@ -158,7 +161,7 @@ export default { timeRange: [], formData: { name: '',//名称 - createdTime: '',//时间 + // createdTime: '',//时间 }, @@ -260,6 +263,13 @@ export default { this.$refs.ref_form.initForm('edit', row.id) }) }, + handleDetail (row) { + this.formTitle = '详情' + this.formShow = true + this.$nextTick(() => { + this.$refs.ref_form.initForm('detail', row.id) + }) + }, addFormOk () { this.formShow = false @@ -285,12 +295,10 @@ export default { async deleteRole (row) { - const url = "/gov/access/govrole/del/" + array + const url = "/gov/access/govrole/del" - let params = { - ids: [row.id] - } + let params = [row.id] const { data, code, msg } = await requestPost(url, params) diff --git a/src/views/modules/workSys/role/roleForm.vue b/src/views/modules/workSys/role/roleForm.vue index 289db50e..c7b4f185 100644 --- a/src/views/modules/workSys/role/roleForm.vue +++ b/src/views/modules/workSys/role/roleForm.vue @@ -43,6 +43,7 @@ :data="menuList" :props="{ label: 'name', children: 'children' }" node-key="id" + :default-expanded-keys="['000']" ref="menuListTree" accordion show-checkbox> @@ -56,6 +57,7 @@ :data="menuListShuju" :props="{ label: 'name', children: 'children' }" node-key="id" + :default-expanded-keys="['000']" ref="menuListShujuTree" accordion show-checkbox> @@ -111,9 +113,7 @@ export default { components: {}, async mounted () { - //获取菜单 - await this.getMenuList() - await this.getMenuShujuList() + }, methods: { @@ -122,6 +122,9 @@ export default { this.startLoading() this.customerId = localStorage.getItem("customerId"); this.formData.customerId = this.customerId + //获取菜单 + await this.getMenuList() + await this.getMenuShujuList() this.$refs['ref_form'].resetFields(); this.$refs.menuListTree.setCheckedKeys([]) @@ -149,7 +152,14 @@ export default { const { data, code, msg } = await requestGet(url, params) if (code === 0) { - this.menuList = data + this.menuList = [ + { + id: '000', + name: '全部菜单', + children: [...data] + } + ] + // this.menuList = data } else { this.$message.error(msg) @@ -167,7 +177,14 @@ export default { const { data, code, msg } = await requestGet(url, params) if (code === 0) { - this.menuListShuju = data + this.menuListShuju = [ + { + id: '000', + name: '全部菜单', + children: [...data] + } + ] + // this.menuListShuju = data } else { this.$message.error(msg) @@ -188,6 +205,9 @@ export default { this.formData.menuIdList.forEach(item => { this.$refs.menuListTree.setChecked(item, true) + + }) + this.formData.menuIdList.forEach(item => { this.$refs.menuListShujuTree.setChecked(item, true) }) this.formData.customerId = this.customerId @@ -231,6 +251,7 @@ export default { ...this.$refs.menuListShujuTree.getCheckedKeys(), ...this.$refs.menuListShujuTree.getHalfCheckedKeys() ] + this.formData.menuIdList = this.formData.menuIdList.filter(item => item !== '000') console.log('menuAll', this.formData)