Browse Source

调整部分函数引用模式

lite
453530270@qq.com 3 years ago
parent
commit
4cccc8cbee
  1. 31
      src/views/ty/index.vue

31
src/views/ty/index.vue

@ -236,7 +236,6 @@ export default {
this.ty_pieDo()// this.ty_pieDo()//
this.ty_bar3()// this.ty_bar3()//
}, 200); }, 200);
// this.ty_bar2()
}) })
@ -612,9 +611,9 @@ export default {
function run(myChart){ function run(myChart){
let that = this; let that = this;
// - // -
that.getGcgNumDatas(); // that.getGcgNumDatas();
setTimeout(() => { setTimeout(() => {
var xData = this.rsqsXData; // var xData = this.rsqsXData;
var data = this.rsqsDataAll; var data = this.rsqsDataAll;
var series = []; var series = [];
@ -696,7 +695,7 @@ export default {
var myChart3 = echarts.init(pieDom3); var myChart3 = echarts.init(pieDom3);
function run(){ function run(){
that.gethomeBarData(); // that.gethomeBarData();
setTimeout(() => { setTimeout(() => {
myChart1.clear(); myChart1.clear();
that.ty_pie(myChart1,that.groupsData[0]); that.ty_pie(myChart1,that.groupsData[0]);
@ -711,9 +710,9 @@ export default {
}, 1500); }, 1500);
} }
run(); run();
// setInterval(function () { setInterval(function () {
// run(); run();
// }, 3000); }, 3000);
}, },
ty_pie(myChart,DD){ ty_pie(myChart,DD){
let that = this; let that = this;
@ -842,10 +841,10 @@ export default {
} }
// 使 // 使
// setTimeout(()=>{ setTimeout(()=>{
// var myChart = echarts.init(Element); // var myChart = echarts.init(Element);
option && myChart.setOption(option); option && myChart.setOption(option);
// }, 200) }, 200)
}, },
// 24 // 24
@ -870,17 +869,22 @@ export default {
// //
gethomeBarData(){ gethomeBarData(){
let that = this; let that = this;
// |
let idArr = "";
homeApi.getID().then(res=>{ homeApi.getID().then(res=>{
// console.log(res, '====='); // console.log(res, '=====');
let idArr = ""; // let idArr = "";
res.data.data.map(item=>{ res.data.data.map(item=>{
if(item.type==1){ if(item.type==1){
idArr += "|"+item.groupId; idArr += "|"+item.groupId;
} }
}) })
that.groupsData = []; // that.groupsData = [];
// });
homeApi.homeBarData({groupsId:idArr}).then(res=>{
//
homeApi.homeBarData({groupsId:idArr}).then(res=>{
// console.log(res, '=='); // console.log(res, '==');
res.data.data.groupsData.forEach(item=>{ res.data.data.groupsData.forEach(item=>{
that.groupsData.push(item); that.groupsData.push(item);
@ -895,7 +899,6 @@ export default {
that.cgn_3 = that.groupsData[2].groupName; that.cgn_3 = that.groupsData[2].groupName;
that.cgv_2 = that.groupsData[1].noRepeatInNum; that.cgv_2 = that.groupsData[1].noRepeatInNum;
that.cgp_3 = that.groupsData[2]?that.groupsData[2].proportion:''; that.cgp_3 = that.groupsData[2]?that.groupsData[2].proportion:'';
});
}); });
}, },

Loading…
Cancel
Save