diff --git a/Web/src/pages/system/user/form.vue b/Web/src/pages/system/user/form.vue index 3a7c40c..103d10f 100644 --- a/Web/src/pages/system/user/form.vue +++ b/Web/src/pages/system/user/form.vue @@ -30,12 +30,7 @@ - form.birthday = date ? $moment(date).format('YYYY-MM-DD') : null" - class="w-100-p" - placeholder="请选择生日" - v-model="form.birthday" - /> + (form.birthday = date ? $moment(date).format('YYYY-MM-DD') : null)" class="w-100-p" placeholder="请选择生日" v-model="form.birthday" /> @@ -68,59 +63,29 @@ 员工信息 - + - {{ item.name }} + {{ item.name }} 附加信息 - + 新增一项 - onChangeExtData(value, record, 'orgId')" - placeholder="请选择附加组织机构" - tree-default-expand-all - /> + onChangeExtData(value, record, 'orgId')" placeholder="请选择附加组织机构" tree-default-expand-all /> - onChangeExtData(value, record, 'posId')" - placeholder="请选择附加职位信息" - > - {{ item.name }} + onChangeExtData(value, record, 'posId')" placeholder="请选择附加职位信息"> + {{ item.name }} @@ -180,9 +145,7 @@ export default { trigger: 'blur', }, ], - email: [ - { pattern: /^\w{3,}(\.\w+)*@[A-z0-9]+(\.[A-z]{2,5}){1,2}$/, message: '邮箱格式不正确', trigger: 'blur' }, - ], + email: [{ pattern: /^\w{3,}(\.\w+)*@[A-z0-9]+(\.[A-z]{2,5}){1,2}$/, message: '邮箱格式不正确', trigger: 'blur' }], 'sysEmpParam.orgId': [{ required: true, message: '请选择所属组织机构' }], 'sysEmpParam.posIdList': [{ required: true, message: '请选择职位信息' }], }, @@ -254,7 +217,7 @@ export default { } if (params.orgId) { - form.sysEmpParam.orgId = orgId; + form.sysEmpParam.orgId = params.orgId; } /** 将默认数据覆盖到form */ diff --git a/Web/src/pages/system/user/index.vue b/Web/src/pages/system/user/index.vue index 03c55fb..79fe981 100644 --- a/Web/src/pages/system/user/index.vue +++ b/Web/src/pages/system/user/index.vue @@ -5,12 +5,7 @@ 2021-04-30 Lufthafen --> - + @@ -20,17 +15,8 @@ - - {{ item.value }} + + {{ item.value }} @@ -79,14 +65,7 @@ {{ record.nickName || record.name }} {{ record.account }} - + @@ -103,13 +82,7 @@ - onSetUserStatus(record, checked)" - /> + onSetUserStatus(record, checked)" /> @@ -119,24 +92,12 @@ - + - + @@ -227,7 +188,9 @@ export default { onSelect([id]) { /** 在选择事件中可以对右侧表格添加父节点id的查询条件 */ this.query = { - 'sysEmpParam.orgId': id, + sysEmpParam: { + orgId: id, + }, }; this.onQuery(); }, @@ -260,7 +223,7 @@ export default { onReset() { /* 与普通查询页不同的是,这里的父节点参数不应该在重置后被清空 */ Object.keys(this.query).forEach((p) => { - if (p !== 'pid') { + if (p !== 'sysEmpParam') { this.query[p] = undefined; } }); @@ -314,7 +277,7 @@ export default { onOpen(formName, record) { this.$refs[formName].onOpen({ record, - orgId: this.query['sysEmpParam.orgId'], + orgId: this.query.sysEmpParam.orgId, /* 按需添加其他参数 */ /* ... */ });