|
@@ -47,7 +47,7 @@
|
|
|
<pie
|
|
|
class="echart"
|
|
|
unit="平方米"
|
|
|
- :ref="`echartRef`"
|
|
|
+ :ref="`echartRef${index}`"
|
|
|
@echartClick="echartClick"
|
|
|
></pie>
|
|
|
|
|
@@ -583,9 +583,7 @@ export default {
|
|
|
});
|
|
|
|
|
|
if (tab) {
|
|
|
- let index = Number(tab.index) - 2;
|
|
|
let data = [];
|
|
|
-
|
|
|
this.active_tabs_table = tabData.value.data.data;
|
|
|
this.rawData = tabData.value.data.data;
|
|
|
tabData.value.data.datalist.forEach((res) => {
|
|
@@ -594,14 +592,13 @@ export default {
|
|
|
value: res.sumvalue,
|
|
|
});
|
|
|
});
|
|
|
- this.setEchart(data, "vertical", index);
|
|
|
+ this.setEchart(data, "vertical", tab.index);
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
handleClickQwnership(tab, event) {
|
|
|
- let index = 0;
|
|
|
this.reset();
|
|
|
- this.qwnershipTabs.forEach((res) => {
|
|
|
+ this.qwnershipTabs.forEach((res, i) => {
|
|
|
if (res.dataname == tab.name) {
|
|
|
this.rawData_qwnership = res.data;
|
|
|
let data = [];
|
|
@@ -619,8 +616,7 @@ export default {
|
|
|
}
|
|
|
);
|
|
|
});
|
|
|
- this.setEchart_qwnership(data, "vertical", index);
|
|
|
- index++;
|
|
|
+ this.setEchart_qwnership(data, "vertical", 0);
|
|
|
}
|
|
|
});
|
|
|
},
|
|
@@ -651,7 +647,7 @@ export default {
|
|
|
this.$nextTick(() => {
|
|
|
let max = 7;
|
|
|
let legend_right = "4%";
|
|
|
- this.$refs.echartRef[index].setOptions({
|
|
|
+ this.$refs[`echartRef${index}`][0].setOptions({
|
|
|
data,
|
|
|
type,
|
|
|
max,
|