diff --git a/src/views/Statistics/TrendAnalysis.vue b/src/views/Statistics/TrendAnalysis.vue index 4424509..d09ed88 100644 --- a/src/views/Statistics/TrendAnalysis.vue +++ b/src/views/Statistics/TrendAnalysis.vue @@ -241,7 +241,6 @@ -
-
- -
+
+
+ +
暂无数据
+
+
+
+
+ +
暂无数据
+
+
+
+
+
+ +
暂无数据
+
+
@@ -339,7 +354,7 @@
@@ -440,6 +455,7 @@ export default { Level2id: "", houseList: [], role: "", + mainFlag:true, }; }, computed: { @@ -460,7 +476,7 @@ export default { }, methods: { downLoad(){ - + // exportMethodPost() }, houseChange() { @@ -614,9 +630,16 @@ export default { } this.$api.http.trendAnalysisAllLevel(pamaet).then((res) => { this.Level1 = res.data || []; - this.Level1id = res.data[0].marketingId || ""; - this.Level2 = res.data[0].children || []; - this.Level2id = res.data[0].children[0].marketingId || ""; + if(res.data.length!=0){ + this.Level1id = res.data[0].marketingId || ""; + this.Level2 = res.data[0].children || []; + this.Level2id = res.data[0].children[0].marketingId || ""; + }else{ + this.Level1id = ""; + this.Level2 = []; + this.Level2id = ""; + } + this.trendAnalysisLevel2(); }); }, @@ -629,6 +652,10 @@ export default { trendAnalysisAllAccount(pamaet) { this.$api.http.trendAnalysisAllAccount(pamaet).then((res) => { this.consultantlist = res.data || []; + this.tablelist1=[] + this.tablelist2 = []; + this.tablelist3 = []; + this.tablelist4 = []; if (this.consultantlist.length != 0) { this.consultantid = res.data[0].accountId; this.trendAnalysisAccount(); @@ -640,6 +667,12 @@ export default { }); }, trendAnalysisAccount() { + // console.log("snsnsnsnsnsnsnnswn") + this.tablelist1=[] + this.tablelist2 = []; + this.tablelist3 = []; + this.tablelist4 = []; + // console.log('处理') var that = this; let pamaet = { showStatus: "", @@ -878,6 +911,7 @@ export default { //选项卡切换 tapChange(idx) { this.aliasclass = idx; + this.mainFlag=true this.trendtrendAnalysis(); }, //时间tab切换 @@ -1085,6 +1119,7 @@ export default { window.addEventListener("resize", () => { myChart.resize(); }); + }, SwitchCARDS2(newline, newline1, newline2) { echarts.init(document.getElementById("main")).dispose(); @@ -1212,6 +1247,7 @@ export default { }); }, piechart2(newline, newlinename, newline2) { + // console.log("aerqwrewqwq") echarts.init(document.getElementById("main")).dispose(); var chartDom = document.getElementById("main"); var myChart = echarts.init(chartDom); @@ -1272,10 +1308,19 @@ export default { }, ], }; - option && myChart.setOption(option); - window.addEventListener("resize", () => { - myChart.resize(); - }); + try{ + option && myChart.setOption(option); + window.addEventListener("resize", () => { + myChart.resize(); + }); + this.mainFlag=true + } + catch(err){ + this.mainFlag=false + console.log(err,'234'); + echarts.init(document.getElementById("main")).dispose(); + } + }, piechart(newline, newlinename) { echarts.init(document.getElementById("main")).dispose(); @@ -1334,10 +1379,22 @@ export default { }, ], }; - option && myChart.setOption(option); - window.addEventListener("resize", () => { - myChart.resize(); - }); + // option && myChart.setOption(option); + // window.addEventListener("resize", () => { + // myChart.resize(); + // }); + try{ + option && myChart.setOption(option); + window.addEventListener("resize", () => { + myChart.resize(); + }); + this.mainFlag=true + } + catch(err){ + this.mainFlag=false + echarts.init(document.getElementById("main")).dispose(); + console.log(err,'123'); + } }, }, }; @@ -1543,4 +1600,17 @@ export default { font-size: 16px; color: #32363d; } +.noData{ + width: 100%; + // height: 60vh; + height: 500px; + background: #fff; + text-align: center; + margin-top: 20px; + overflow: hidden; +} +.imgboxc{ + margin-top: 100px; + color: #999999; +} diff --git a/vue.config.js b/vue.config.js index b0d4d6a..494e83b 100644 --- a/vue.config.js +++ b/vue.config.js @@ -3,8 +3,8 @@ * https://cli.vuejs.org/zh/config/ */ // const url = 'http://pigx-gateway' -// const url = 'http://39.97.167.65:9999' //测试 -const url = 'http://192.168.31.169:9999' //长龙 +const url = 'http://39.97.167.65:9999' //测试 +// const url = 'http://192.168.31.169:9999' //长龙 // const url = 'http://192.168.31.134:9999' //嘉豪 // const url = 'http://192.168.31.100:9999' //王笑 // const url = 'http://62.234.122.43:9999' //王笑