diff --git a/src/api/common.js b/src/api/common.js index ba92a53..320e2b7 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -115,7 +115,7 @@ export function cancelRenwuFn(params) { } export function initData(params) { return api({ - url: '/role/listRole', + url: '/role/list', method: 'get', params: params, paramsSerializer: function(data) { @@ -129,4 +129,4 @@ export function getDepartmentTreeList(params) { method: 'get', params }) -} +} diff --git a/src/api/template.js b/src/api/template.js index abd9b0a..9314a13 100644 --- a/src/api/template.js +++ b/src/api/template.js @@ -13,7 +13,10 @@ export default { return api({ url: '/templateSetting', method: 'delete', - params: qs.stringify(params) + params, + paramsSerializer: function(params) { + return qs.stringify(params, { indices: false }) + } }) }, deleteSettingFn: (params) => { @@ -21,7 +24,10 @@ export default { return api({ url: '/templateSetting', method: 'delete', - params: qs.stringify(params) + params, + paramsSerializer: function(params) { + return qs.stringify(params, { indices: false }) + } }) } } diff --git a/src/components/drawerDialog/index.vue b/src/components/drawerDialog/index.vue index 2833bc2..c52d780 100644 --- a/src/components/drawerDialog/index.vue +++ b/src/components/drawerDialog/index.vue @@ -4,7 +4,7 @@ title="编辑模板" :visible.sync="drawer" size="90%" - show- + :before-close="(done) => { $emit('closeTemplateDrawer') }" @open="open" >
@@ -112,6 +112,8 @@ v-model="sbpzLevelStatus" active-color="#13ce66" inactive-color="#ff4949" + active-text="类别品种" + inactive-text="所有品种" @change="getSbpzList" /> @@ -198,7 +200,7 @@ 保存修改 - + 取消
@@ -207,7 +209,7 @@
-

模板详情

+ 模板详情 - + + + + + + + @@ -277,19 +306,6 @@
- - - - @@ -328,7 +344,7 @@
-

模板详情

+ 模板详情
- - + + + - + 普通模式 @@ -434,97 +459,155 @@ 确 定 - - + + + + + + + + + DN模式 + + + KV模式 + + + + + + + {{ item }} + + + + + + + - - + + + - + 检验项目 - + 目录页 - - - - DN模式 - - - KV模式 - - 取 消 @@ -535,7 +618,7 @@ diff --git a/src/views/user/permission.vue b/src/views/user/permission.vue index 38045d9..a5685a3 100644 --- a/src/views/user/permission.vue +++ b/src/views/user/permission.vue @@ -79,7 +79,7 @@
- + @@ -358,8 +358,9 @@ export default { this.dialogStatus = 'create' this.showTempPermissionForm(true) }, - copyMenu($index) { - this.loadFromData(this.list[$index]) + copyMenu($index, row) { + const data = row.pid ? this.list.filter(tempRow => tempRow.id === row.pid)[0].children.filter(tempRow => tempRow.id === row.id)[0] : this.list[$index] + this.loadFromData(data) this.dialogStatus = 'create' this.showTempPermissionForm(false) }, @@ -411,7 +412,7 @@ export default { const pid = this.iconUpdate() if (pid) { this.api({ - url: '/permission/addPermission', + url: '/permission', method: 'post', data: this.tempPermission }).then(() => { @@ -431,8 +432,8 @@ export default { const pid = this.iconUpdate() if (pid) { this.api({ - url: '/permission/updatePermission', - method: 'post', + url: '/permission', + method: 'put', data: this.tempPermission }).then(() => { this.$message.success('更新成功。') diff --git a/src/views/user/role.vue b/src/views/user/role.vue index 91555a4..7374a7c 100644 --- a/src/views/user/role.vue +++ b/src/views/user/role.vue @@ -232,7 +232,7 @@ export default { getList() { // 查询列表 this.api({ - url: '/role/listRole', + url: '/role/list', method: 'get', params: this.listQuery }).then(data => { diff --git a/src/views/user/user.vue b/src/views/user/user.vue index 192f23d..38a16f2 100644 --- a/src/views/user/user.vue +++ b/src/views/user/user.vue @@ -268,7 +268,7 @@ export default { methods: { getAllRoles() { this.api({ - url: '/role/getAllRoles', + url: '/role/all', method: 'get' }).then((data) => { this.roles = data