This commit is contained in:
yanran200730
2022-01-18 14:51:38 +08:00
parent f1231284d6
commit 7ddfd8d394

View File

@@ -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)
},