提交 9d25f57f authored 作者: 黎业扬's avatar 黎业扬

yang

上级 53000731
...@@ -186,6 +186,7 @@ ...@@ -186,6 +186,7 @@
<el-tree <el-tree
ref="tree" ref="tree"
:data="statisticsPoints" :data="statisticsPoints"
:default-checked-keys="form.areaSelectValue"
show-checkbox show-checkbox
node-key="value" node-key="value"
:props="defaultProps" :props="defaultProps"
...@@ -524,17 +525,16 @@ export default { ...@@ -524,17 +525,16 @@ export default {
// that.$refs.tree.setCheckedKeys(key) // that.$refs.tree.setCheckedKeys(key)
// 根据id获取当前项目关联的统计点 // 根据id获取当前项目关联的统计点
getProject(row.id).then(response => { getProject(row.id).then(response => {
this.form = response.data; this.form = response.data;
if(this.form.areaSelectValue){
this.form.areaSelectValue = JSON.parse(this.form.areaSelectValue) this.form.areaSelectValue = JSON.parse(this.form.areaSelectValue)
console.log('获取关联统计点============',this.form.areaSelectValue)
if(this.form.areaSelectValue){
//利用延时器,防止dom没加载完 //利用延时器,防止dom没加载完
setTimeout(()=>{ setTimeout(()=>{
this.$refs.tree.setCheckedKeys(this.form.areaSelectValue) this.$refs.tree.setCheckedKeys(this.form.areaSelectValue)
console.log('延时器') console.log('延时器')
},500) },500)
} }
}) })
getStatisticalPointsList().then(res=>{ getStatisticalPointsList().then(res=>{
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论