Merge branch 'dev' into build
This commit is contained in:
		| @@ -25,9 +25,9 @@ | ||||
|                   <el-form-item label="网格员姓名" prop="name"> | ||||
|                     <el-input v-model="forms.name" placeholder="请选择网格员" disabled> | ||||
|                       <template #append> | ||||
|                         <ai-wechat-selecter :isMultiple="false" refs="addTags" :instance="instance" v-model="users" @change="getSelectPerson"> | ||||
|                         <ai-user-selecter :isMultiple="false" refs="addTags" :instance="instance" v-model="users" @change="getSelectPerson"> | ||||
|                           <el-button size="small" type="primary"><span style="color: #fff">选择成员</span></el-button> | ||||
|                         </ai-wechat-selecter> | ||||
|                         </ai-user-selecter> | ||||
|                       </template> | ||||
|                     </el-input> | ||||
|                   </el-form-item> | ||||
| @@ -197,18 +197,18 @@ | ||||
|             </template> | ||||
|           </ai-card> | ||||
|         </el-form> | ||||
|         <ai-dialog title="选择网格" :visible.sync="showGrid" :customFooter="true" :destroyOnClose="true" border width="720px"> | ||||
|         <ai-dialog title="选择网格" :visible.sync="showGrid" :customFooter="true" border width="720px"> | ||||
|           <div class="grid"> | ||||
|             <el-tree | ||||
|                 :data="treeObj.treeList" | ||||
|                 :props="treeObj.defaultProps" | ||||
|                 node-key="id" | ||||
|                 ref="tree" | ||||
|                 :check-strictly="true" | ||||
|                 show-checkbox | ||||
|                 :default-checked-keys="currCheckedKeys" | ||||
|                 default-expand-all | ||||
|                 @check="onCheckChange"> | ||||
|               :data="treeList" | ||||
|               :props="defaultProps" | ||||
|               node-key="id" | ||||
|               ref="tree" | ||||
|               :check-strictly="true" | ||||
|               show-checkbox | ||||
|               :default-expanded-keys="currCheckedKeys" | ||||
|               :default-checked-keys="currCheckedKeys" | ||||
|               @check="onCheckChange"> | ||||
|             </el-tree> | ||||
|           </div> | ||||
|           <div class="dialog-footer" slot="footer"> | ||||
| @@ -266,13 +266,14 @@ export default { | ||||
|       }], | ||||
|       showGrid: false, | ||||
|       treeObj: { | ||||
|         treeList: [], | ||||
|         defaultProps: { | ||||
|           children: "girdList", | ||||
|           label: "girdName", | ||||
|         }, | ||||
|         checkedKeys: [], | ||||
|       }, | ||||
|       treeList: [], | ||||
|       defaultProps: { | ||||
|         children: "children", | ||||
|         label: "girdName", | ||||
|       }, | ||||
|       defaultExpandedKeys: [], | ||||
|       girdInfoStr: '', | ||||
|       photoList: [], | ||||
|       title: "添加网格员", | ||||
| @@ -391,12 +392,26 @@ export default { | ||||
|     }, | ||||
|     beforeSelectTree() { | ||||
|       this.treeObj.checkedKeys = []; | ||||
|       this.instance.post(`/app/appgirdinfo/listAll`, null, null).then((res) => { | ||||
|       this.instance.post(`/app/appgirdinfo/listAll3`, null, null).then((res) => { | ||||
|         if (res.code == 0) { | ||||
|           this.treeObj.treeList = res.data; | ||||
|           this.forms.girdInfoList.map((e) => { | ||||
|             this.treeObj.checkedKeys.push(e.id); | ||||
|           }); | ||||
|  | ||||
|           this.treeList = res.data.filter(e => !e.parentGirdId) | ||||
|           const parentGirdId = this.treeList[0].id | ||||
|  | ||||
|           this.treeList.map(p => this.addChild(p, res.data.map(v => { | ||||
|             if (v.id === parentGirdId) { | ||||
|               this.defaultExpandedKeys.push(v.id) | ||||
|             } | ||||
|  | ||||
|             return { | ||||
|               ...v | ||||
|             } | ||||
|           }), { | ||||
|             parent: 'parentGirdId' | ||||
|           })) | ||||
|         } | ||||
|       }); | ||||
|     }, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user