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 = "修改用户信息"; });