From 8764e295c30889bdde431ae5dd2b9ded6898391f Mon Sep 17 00:00:00 2001 From: songyunpeng Date: Mon, 7 Sep 2020 14:06:49 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=AB=AF=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/sys/app-menu-add-or-update.vue | 23 +++++++- src/views/modules/sys/app-menu.vue | 23 ++++++-- .../sys/appmenutemplate-add-or-update.vue | 57 ++++++++----------- src/views/modules/sys/appmenutemplate.vue | 16 ++++++ src/views/modules/sys/role-add-or-update.vue | 51 +++++++++-------- 5 files changed, 106 insertions(+), 64 deletions(-) diff --git a/src/views/modules/sys/app-menu-add-or-update.vue b/src/views/modules/sys/app-menu-add-or-update.vue index c6ef776..6f540fc 100644 --- a/src/views/modules/sys/app-menu-add-or-update.vue +++ b/src/views/modules/sys/app-menu-add-or-update.vue @@ -24,6 +24,16 @@ :placeholder="$t('menu.name')" > + + + + + + { + if (res.code !== 0) { + return this.$message.error(res.msg) + } + this.appMenuCategory = res.data + }).catch(() => { }) }, // 获取菜单列表 getMenuList () { diff --git a/src/views/modules/sys/app-menu.vue b/src/views/modules/sys/app-menu.vue index bf3bed7..0e0a62f 100644 --- a/src/views/modules/sys/app-menu.vue +++ b/src/views/modules/sys/app-menu.vue @@ -21,12 +21,7 @@ border style="width: 100%;" > - + + + + + + + + { + if (res.code !== 0) { + return this.$message.error(res.msg) + } + this.appMenuCategory = res.data + }).catch(() => { }) }, // 获取信息 getInfo () { diff --git a/src/views/modules/sys/appmenutemplate.vue b/src/views/modules/sys/appmenutemplate.vue index 064a746..ecdf1a5 100644 --- a/src/views/modules/sys/appmenutemplate.vue +++ b/src/views/modules/sys/appmenutemplate.vue @@ -52,6 +52,13 @@ header-align="center" align="center" > + + :check-strictly="true"> @@ -124,7 +124,7 @@ export default { appMenuList: [], categoryList: [], roleTypeList: [], - analysisMenuList:[], + analysisMenuList: [], dataForm: { id: '', name: '', @@ -166,9 +166,9 @@ export default { this.getMenuList(), this.getDeptList(), this.getAppMenuList(), - this.getCategoryList(), - this.getWhistleDeptList(), - this.getAnalysisMenuList() + this.getCategoryList() + // this.getWhistleDeptList() + // this.getAnalysisMenuList() ]).then(() => { if (this.dataForm.id) { this.getInfo() @@ -192,24 +192,27 @@ export default { return this.$message.error(res.msg) } this.deptList = res.data - }).catch(() => { }) - }, - // 获取吹哨部门列表 - getWhistleDeptList () { - return this.$http.get('/sys/dept/list').then(({ data: res }) => { - if (res.code !== 0) { - return this.$message.error(res.msg) - } + // 吹哨部门列表与全部部门列表相同 this.whistleDeptList = res.data }).catch(() => { }) }, + // 获取吹哨部门列表 + // getWhistleDeptList () { + // return this.$http.get('/sys/dept/list').then(({ data: res }) => { + // if (res.code !== 0) { + // return this.$message.error(res.msg) + // } + // this.whistleDeptList = res.data + // }).catch(() => { }) + // }, // 获取App菜单列表 getAppMenuList () { - return this.$http.get('/sys/appmenu/select').then(({ data: res }) => { + return this.$http.get('/sys/appmenu/v2/select').then(({ data: res }) => { if (res.code !== 0) { return this.$message.error(res.msg) } - this.appMenuList = res.data + this.appMenuList = res.data.workMenu + this.analysisMenuList = res.data.analysisMenu }).catch(() => { }) }, // 获取项目处理类型授权 @@ -221,14 +224,14 @@ export default { this.categoryList = res.data }).catch(() => { }) }, - getAnalysisMenuList () { - return this.$http.get('/sys/analysismenu/select').then(({ data: res }) => { - if (res.code !== 0) { - return this.$message.error(res.msg) - } - this.analysisMenuList = res.data - }).catch(() => { }) - }, + // getAnalysisMenuList () { + // return this.$http.get('/sys/analysismenu/select').then(({ data: res }) => { + // if (res.code !== 0) { + // return this.$message.error(res.msg) + // } + // this.analysisMenuList = res.data + // }).catch(() => { }) + // }, // 获取信息 getInfo () { this.$http.get(`/sys/role/${this.dataForm.id}`).then(({ data: res }) => { @@ -271,7 +274,7 @@ export default { ...this.$refs.analysisMenuListTree.getHalfCheckedKeys() ] this.dataForm.whistleDeptIdList = this.$refs.whistleDeptListTree.getCheckedKeys() - this.$http[!this.dataForm.id ? 'post' : 'put']('/sys/role', this.dataForm).then(({ data: res }) => { + this.$http[!this.dataForm.id ? 'post' : 'put']('/sys/role/v2', this.dataForm).then(({ data: res }) => { if (res.code !== 0) { return this.$message.error(res.msg) } From 917e90894c99a57a161217bcb0cf05ed48c39a20 Mon Sep 17 00:00:00 2001 From: songyunpeng Date: Tue, 22 Sep 2020 14:40:00 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=9D=83=E9=99=90=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=EF=BC=8C=E6=8E=A5=E5=8F=A3=E5=9C=B0=E5=9D=80=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/sys/role-add-or-update.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/modules/sys/role-add-or-update.vue b/src/views/modules/sys/role-add-or-update.vue index 64aa8e5..fd9a5ce 100644 --- a/src/views/modules/sys/role-add-or-update.vue +++ b/src/views/modules/sys/role-add-or-update.vue @@ -234,7 +234,7 @@ export default { // }, // 获取信息 getInfo () { - this.$http.get(`/sys/role/${this.dataForm.id}`).then(({ data: res }) => { + this.$http.get(`/sys/role/v2/${this.dataForm.id}`).then(({ data: res }) => { if (res.code !== 0) { return this.$message.error(res.msg) }