update 进行了一系列优化
This commit is contained in:
@@ -43,11 +43,7 @@ export default {
|
||||
await this.formBody.onInit();
|
||||
|
||||
// 获取外部选中的部门id
|
||||
this.formBody.onFillData({
|
||||
sysEmpParam: {
|
||||
orgId: id,
|
||||
},
|
||||
});
|
||||
this.formBody.onFillData(record, id);
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
@@ -57,9 +57,10 @@
|
||||
<div class="yo-form-group">
|
||||
<a-form-model-item label="所属组织机构" prop="sysEmpParam.orgId">
|
||||
<a-tree-select
|
||||
:dropdown-style="{ maxHeight: '300px', overflow: 'auto' }"
|
||||
:tree-data="orgData"
|
||||
placeholder="请选择所属组织机构"
|
||||
treeDefaultExpandAll
|
||||
tree-default-expand-all
|
||||
v-model="form.sysEmpParam.orgId"
|
||||
/>
|
||||
</a-form-model-item>
|
||||
@@ -89,6 +90,7 @@
|
||||
<template slot="orgId" slot-scope="text, record">
|
||||
<a-tree-select
|
||||
:default-value="text"
|
||||
:dropdown-style="{ maxHeight: '300px', overflow: 'auto' }"
|
||||
:tree-data="orgData"
|
||||
@change="value => onChangeExtData(value, record, 'orgId')"
|
||||
placeholder="请选择附加组织机构"
|
||||
@@ -183,8 +185,8 @@ export default {
|
||||
* 必要的方法
|
||||
* 在打开编辑页时允许填充数据
|
||||
*/
|
||||
onFillData(record) {
|
||||
const form = this.$_.cloneDeep(record);
|
||||
onFillData(record, orgId) {
|
||||
const form = this.$_.cloneDeep(record || {});
|
||||
// 日期特殊处理
|
||||
if (form.birthday) {
|
||||
form.birthday = moment(form.birthday).format('YYYY-MM-DD');
|
||||
@@ -212,6 +214,10 @@ export default {
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
if (orgId) {
|
||||
form.sysEmpParam.orgId = orgId;
|
||||
}
|
||||
this.form = form;
|
||||
},
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<template>
|
||||
<yo-tree-layout :load-data="loadTreeData" @select="onSelect" default-expanded-keys>
|
||||
<container>
|
||||
<br />
|
||||
<a-alert closable type="error">
|
||||
<template slot="message">
|
||||
后端bug:生日不填写,在保存时会默认写入0001-01-01
|
||||
@@ -9,10 +8,6 @@
|
||||
</template>
|
||||
</a-alert>
|
||||
<br />
|
||||
<a-alert closable type="warning">
|
||||
<template slot="message">缺授权的两块功能</template>
|
||||
</a-alert>
|
||||
<br />
|
||||
<a-card :bordered="false">
|
||||
<Auth auth="sysUser:page">
|
||||
<div class="yo-query-bar">
|
||||
|
||||
Reference in New Issue
Block a user