26806
This commit is contained in:
		
							
								
								
									
										24
									
								
								packages/2.0.5/AppGridMember/components/add.vue
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										24
									
								
								packages/2.0.5/AppGridMember/components/add.vue
									
									
									
									
										vendored
									
									
								
							| @@ -202,10 +202,18 @@ | ||||
|             </template> | ||||
|           </ai-card> | ||||
|         </el-form> | ||||
|         <ai-dialog title="选择网格" :visible.sync="showGrid" :customFooter="true"  :destroyOnClose="true"  @opened="beforeSelectTree"  border  width="720px"> | ||||
|         <ai-dialog title="选择网格" :visible.sync="showGrid" :customFooter="true"  :destroyOnClose="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  highlight-current> | ||||
|             <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"> | ||||
|             </el-tree> | ||||
|           </div> | ||||
|           <div class="dialog-footer" slot="footer" > | ||||
| @@ -278,6 +286,7 @@ export default { | ||||
|     }; | ||||
|   }, | ||||
|   created() { | ||||
|     this.beforeSelectTree() | ||||
|     if (this.params.id) { | ||||
|       this.searchDetail(); | ||||
|       this.title = "网格员详情"; | ||||
| @@ -339,6 +348,15 @@ export default { | ||||
|       }) | ||||
|     }, | ||||
|  | ||||
|     onCheckChange (e) { | ||||
|       this.$nextTick(() => { | ||||
|         this.$refs.tree.getCheckedKeys().forEach(v => { | ||||
|           this.$refs.tree.setChecked(v, false) | ||||
|         }) | ||||
|         this.$refs.tree.setChecked(e.id, true) | ||||
|       }) | ||||
|     }, | ||||
|  | ||||
|     removeGrid (index) { | ||||
|       this.forms.girdInfoList.splice(index, 1) | ||||
|     }, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user