28211
This commit is contained in:
		| @@ -37,7 +37,7 @@ | ||||
|                 <template v-else-if="item.type === 'gird'"> | ||||
|                   <el-input disabled :value="girdName" size="small" placeholder="请选择网格"> | ||||
|                     <template slot="append"> | ||||
|                       <el-button size="small" @click="showGrid = true" :disabled="!!(formData.resident_id && item.isInit)">选择网格</el-button> | ||||
|                       <el-button size="small" @click="showGrid = true, treeObj.checkedKeys = formData[item.fieldDbName] ? [formData[item.fieldDbName]] : [], gridFieldName = item.fieldDbName" :disabled="!!(formData.resident_id && item.isInit)">选择网格</el-button> | ||||
|                     </template> | ||||
|                   </el-input> | ||||
|                 </template> | ||||
| @@ -120,9 +120,9 @@ | ||||
|         title="选择网格" | ||||
|         :visible.sync="showGrid" | ||||
|         :destroyOnClose="true" | ||||
|           @close="showGrid = false" | ||||
|           @onConfirm="getCheckedTree" | ||||
|           width="720px"> | ||||
|         @close="showGrid = false" | ||||
|         @onConfirm="getCheckedTree" | ||||
|         width="720px"> | ||||
|         <div class="grid"> | ||||
|           <el-tree | ||||
|             :data="treeObj.treeList" | ||||
| @@ -169,6 +169,7 @@ export default { | ||||
|         } | ||||
|       }, | ||||
|       girdName: '', | ||||
|       gridFieldName: '', | ||||
|       showGrid: false, | ||||
|       formDataList: [], | ||||
|       pageShow: true, | ||||
| @@ -217,6 +218,7 @@ export default { | ||||
|     }, | ||||
|  | ||||
|     onChange (e) { | ||||
|       this.formData.resident_id = e.id | ||||
|       Object.keys(this.formData).forEach(item => { | ||||
|         for (var p in e){ | ||||
|           if (item === p) { | ||||
| @@ -226,7 +228,6 @@ export default { | ||||
|       }) | ||||
|  | ||||
|       const idNumberInfo = this.idCardNoUtil.getIdCardInfo(e.idNumber) | ||||
|       this.formData.resident_id = e.id | ||||
|       this.$set(this.formData, 'birthDate', idNumberInfo.birthday) | ||||
|       this.formData.photo = e.photo ? [{ | ||||
|         url: e.photo | ||||
| @@ -237,10 +238,10 @@ export default { | ||||
|  | ||||
|       if (gird.length) { | ||||
|         this.girdName = gird[0].girdName | ||||
|         this.formData.gird_id = gird[0].id | ||||
|         this.formData[this.gridFieldName] = gird[0].id | ||||
|       } else { | ||||
|         this.girdName = '' | ||||
|         this.formData.gird_id = '' | ||||
|         this.formData[this.gridFieldName] = '' | ||||
|       } | ||||
|  | ||||
|       this.showGrid = false | ||||
|   | ||||
		Reference in New Issue
	
	Block a user