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