Commit 95f8c972 authored by “yiyousong”'s avatar “yiyousong”

fix: 修复数据集市列表数据在切换tab的时候站点id获取不正确的问题

parent 041b055f
......@@ -186,6 +186,12 @@ export default {
components: {
EvaluateDetails,
},
props: {
curTreeData: {
required: true,
default: () => {},
},
},
data() {
return {
show: false,
......@@ -377,10 +383,21 @@ export default {
],
};
},
created() {
this.getEvaluateList();
this.getDepartment();
this.getHall();
created() {},
watch: {
curTreeData: {
handler(newVal) {
if (JSON.stringify(newVal) !== "{}") {
this.getSite(newVal);
} else {
this.getEvaluateList();
this.getDepartment();
this.getHall();
}
},
deep: true,
immediate: true,
},
},
methods: {
// 获取站点
......@@ -394,6 +411,8 @@ export default {
this.getHall();
} else {
this.tableData = [];
this.deptList = [];
this.hallList = [];
this.total = 0;
}
},
......
......@@ -21,7 +21,7 @@
</el-tab-pane>
</el-tabs>
<div class="out-box flex-1 p-[20px]">
<router-view ref="Page"></router-view>
<router-view ref="Page" :curTreeData="curTreeData"></router-view>
</div>
</div>
</div>
......@@ -33,6 +33,7 @@ export default {
data() {
return {
subMenus: [],
curTreeData: {}, // 当前选择的站点
};
},
computed: {
......@@ -60,7 +61,8 @@ export default {
},
// 改变站点选择
changeSite(data) {
this.$refs.Page.getSite(data);
this.curTreeData = data;
// this.$refs.Page.getSite(data);
},
},
};
......
......@@ -158,6 +158,12 @@ export default {
components: {
QueueUpDetails,
},
props: {
curTreeData: {
required: true,
default: () => {},
},
},
data() {
return {
searchType,
......@@ -360,11 +366,23 @@ export default {
hallList: [], // 大厅列表
};
},
created() {
this.getQueueList();
this.getDepartment();
this.getHall();
watch: {
curTreeData: {
handler(newVal) {
if (JSON.stringify(newVal) !== "{}") {
this.getSite(newVal);
} else {
this.getQueueList();
this.getDepartment();
this.getHall();
}
},
deep: true,
immediate: true,
},
},
created() {},
methods: {
// 获取站点
getSite(data) {
......@@ -377,6 +395,8 @@ export default {
this.getHall();
} else {
this.tableData = [];
this.deptList = [];
this.hallList = [];
this.total = 0;
}
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment