diff --git a/src/views/corpinfo/edit/components/corpInfoEdit.vue b/src/views/corpinfo/edit/components/corpInfoEdit.vue index bca61ea..1127d84 100644 --- a/src/views/corpinfo/edit/components/corpInfoEdit.vue +++ b/src/views/corpinfo/edit/components/corpInfoEdit.vue @@ -45,7 +45,11 @@ :options="treeData" :disabled="true" :normalizer="normalizer" + :flat="true" + :default-expand-level="0" + :props="defaultProps" v-model="dataForm.MAIN_DEPARTMENT" + multiple placeholder="请选择部门" no-options-text="暂无数据" no-children-text="暂无数据" @@ -496,7 +500,7 @@ export default { corpName: '', AUDIT_STATE: '', dataForm: { - MAIN_DEPARTMENT: '', + MAIN_DEPARTMENT: null, businessLicenseDate: [], STATE: '', SUPERVISE_CORPINFO_DEPT_NAME: '', @@ -844,6 +848,11 @@ export default { {} ).then((data) => { this.treeData = JSON.parse(data.zTreeNodes) + this.treeData.push({ + id: '0', + name: '无', + nodes: [] + }) resolve() }).catch((e) => { reject() @@ -897,6 +906,11 @@ export default { if (data.pd.COUNTY != '') this.dataForm.POSSESSION.push(data.pd.COUNTY) if (data.pd.VILLAGE != '') this.dataForm.POSSESSION.push(data.pd.VILLAGE) this.AUDIT_STATE = this.dataForm.STATE + if (this.dataForm.MAIN_DEPARTMENT.indexOf('[') > -1) { + this.dataForm.MAIN_DEPARTMENT = JSON.parse(this.dataForm.MAIN_DEPARTMENT) + } else { + this.dataForm.MAIN_DEPARTMENT = [this.dataForm.MAIN_DEPARTMENT] + } this.$forceUpdate() resolve() }).catch((e) => {