From 9a0fd23840747ff467003321ec1dd854c5d73e73 Mon Sep 17 00:00:00 2001 From: "han\\hanst" Date: Wed, 13 May 2026 17:51:07 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=92=E8=89=B2=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/sys/role-add-or-update.vue | 35 ++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/src/views/modules/sys/role-add-or-update.vue b/src/views/modules/sys/role-add-or-update.vue index 22427072..73ccaa40 100644 --- a/src/views/modules/sys/role-add-or-update.vue +++ b/src/views/modules/sys/role-add-or-update.vue @@ -8,10 +8,20 @@ - + + + + + + + - + @@ -65,16 +75,35 @@ export default { edit: '编辑', authorize: '授权', roleName: '角色名称', + roleType: '角色类型', remark: '备注', }, + roleTypeOptions: [ + { label: '家用电梯-仓库配料', value: 'LC_HOME_LIFT_STOCKING' }, + { label: '家用电梯-平台组装/调试', value: 'LC_HOME_LIFT_PLATFORM_DEBUG' }, + { label: '家用电梯-背景墙/吊顶组装', value: 'LC_HOME_LIFT_BG_CEILING' }, + { label: '家用电梯-门组装', value: 'LC_HOME_LIFT_DOOR_ASSY' }, + { label: '家用电梯-打包', value: 'LC_HOME_LIFT_PACK' }, + { label: '线缆/COP-线缆生产', value: 'LC_CABLE_COP_LINE_PRODUCTION' }, + { label: '线缆/COP-COP生产', value: 'LC_CABLE_COP_COP_PRODUCTION' }, + { label: '改造项目-仓库配料', value: 'LC_RENOVATION_STOCKING' }, + { label: '改造项目-组装', value: 'LC_RENOVATION_ASSY' }, + { label: '改造项目-检验', value: 'LC_RENOVATION_INSPECT' }, + { label: '改造项目-打包', value: 'LC_RENOVATION_PACK' }, + { label: '机加工生产-生产', value: 'LC_MACHINING_PRODUCTION' } + ], dataForm: { id: 0, roleName: '', + roleType: '', remark: '' }, dataRule: { roleName: [ {required: true, message: '角色名称不能为空', trigger: 'blur'} + ], + roleType: [ + {required: true, message: '角色类型不能为空', trigger: 'change'} ] }, tempKey: -666666 // 临时key, 用于解决tree半选中状态项不能传给后台接口问题. # 待优化 @@ -108,6 +137,7 @@ export default { }).then(({data}) => { if (data && data.code === 0) { this.dataForm.roleName = data.role.roleName + this.dataForm.roleType = data.role.roleType || '' this.dataForm.remark = data.role.remark var idx = data.role.menuIdList.indexOf(this.tempKey) if (idx !== -1) { @@ -148,6 +178,7 @@ export default { data: this.$http.adornData({ 'roleId': this.dataForm.id || undefined, 'roleName': this.dataForm.roleName, + 'roleType': this.dataForm.roleType, 'remark': this.dataForm.remark, 'menuIdList': [].concat(this.$refs.menuListTree.getCheckedKeys(), [this.tempKey], this.$refs.menuListTree.getHalfCheckedKeys()) // 'menuIdList': menusList