修改机构默认选中第一行
This commit is contained in:
parent
c888e9a899
commit
7665f769c0
@ -79,15 +79,17 @@
|
||||
<el-tree
|
||||
:data="deptOptions"
|
||||
:props="defaultProps"
|
||||
:expand-on-click-node="false"
|
||||
:expand-on-click-node="true"
|
||||
:filter-node-method="filterNode"
|
||||
ref="tree"
|
||||
default-expand-all
|
||||
highlight-current
|
||||
|
||||
node-key="id"
|
||||
@node-click="handleNodeClick"
|
||||
:render-content="renderContent"
|
||||
/>
|
||||
</div>
|
||||
<!-- :default-expanded-keys="checkDefault" -->
|
||||
</el-col>
|
||||
<el-col :span="18" :xs="24">
|
||||
<el-descriptions title="机构信息">
|
||||
@ -581,6 +583,7 @@ export default {
|
||||
name: "Agency",
|
||||
data() {
|
||||
return {
|
||||
checkDefault: [],
|
||||
arealist: [],
|
||||
citylist: [],
|
||||
arealists: [],
|
||||
@ -740,6 +743,19 @@ export default {
|
||||
treeOptions: [],
|
||||
};
|
||||
},
|
||||
// 默认选中第一行
|
||||
watch: {
|
||||
deptOptions: {
|
||||
handler(val) {
|
||||
if(val) {
|
||||
this.$nextTick(() => {
|
||||
document.querySelector('.el-tree-node__content').click()
|
||||
})
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getaddress();
|
||||
// this.getTreeselect();
|
||||
@ -813,7 +829,7 @@ export default {
|
||||
// checkStrictly: true,
|
||||
// lazyLoad: this.lazyLoad,
|
||||
// };
|
||||
console.log(res.data, "58", this.treeOptions);
|
||||
// console.log(res.data, "58", this.treeOptions);
|
||||
});
|
||||
},
|
||||
// 卫生机构类别
|
||||
|
||||
Loading…
Reference in New Issue
Block a user