From 4e1478aa9392ff75b20386f1b6ad158854c78284 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A2=A8=E5=A4=A7=E5=8F=94?= <494979559@qq.com> Date: Sat, 31 Aug 2024 17:52:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E5=AD=97=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/smUser/index.vue | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/views/system/smUser/index.vue b/src/views/system/smUser/index.vue index feaabca..0714e25 100644 --- a/src/views/system/smUser/index.vue +++ b/src/views/system/smUser/index.vue @@ -9,9 +9,9 @@ @keyup.enter.native="handleQuery" /> - + - + - + - + @@ -211,7 +211,7 @@ - + % @@ -241,7 +241,7 @@ import { $serviceType, $showColumns, $withdrawServiceType } from '@/utils/mixins import UserLink from '@/components/Business/SmUser/UserLink.vue' import UserInput from '@/components/Business/SmUser/UserInput.vue' import DeptTreeSelect from '@/components/Business/Dept/DeptTreeSelect.vue' -import { FieldName, SmUserType, UserType } from '@/utils/constants' +import { FieldName, ROOT_DEPT, SmUserType, UserType } from '@/utils/constants' import { mapGetters } from 'vuex' const defaultSort = { @@ -310,6 +310,9 @@ export default { }, data() { return { + ROOT_DEPT, + // 旧的用户类型 + oldUserType: null, defaultSort, type: null, // 用户类型 span: 12, @@ -501,6 +504,7 @@ export default { /** 新增按钮操作 */ handleAdd() { this.reset(); + this.oldUserType = null; this.open = true; this.title = "添加用户信息"; }, @@ -514,6 +518,7 @@ export default { const userId = row.userId || this.ids getSmUser(userId).then(response => { this.form = response.data; + this.oldUserType = this.form.type; this.open = true; this.title = "修改用户信息"; });