Browse Source

恶心变量命名

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

65
src/views/ty/index.vue

@ -67,7 +67,7 @@
<div class="venue_proportion_top" style="cursor: pointer;" @click="istygShowfn"> <div class="venue_proportion_top" style="cursor: pointer;" @click="istygShowfn">
<span class="venue_proportion_box_num" style="position: relative;cursor: pointer;"> <span class="venue_proportion_box_num" style="position: relative;cursor: pointer;">
<a target="tyg" style="text-decoration: none;color: #fff;z-index: 9999;"> <a target="tyg" style="text-decoration: none;color: #fff;z-index: 9999;">
{{ cgrdata[0]['proportion'] }} {{ cgp_1 }}
</a> </a>
<!-- v-show="istygShow == true" --> <!-- v-show="istygShow == true" -->
@ -78,14 +78,14 @@
</span> </span>
</div> </div>
<div class="venue_proportion_bo"> <div class="venue_proportion_bo">
<span>{{ cgrdata[0]['groupName'] }}</span> <span>{{ cgn_1 }}</span>
</div> </div>
</div> </div>
<div class="venue_proportion"> <div class="venue_proportion">
<div class="venue_proportion_top" style="cursor: pointer;" @click="istygShowfn2"> <div class="venue_proportion_top" style="cursor: pointer;" @click="istygShowfn2">
<span class="venue_proportion_box_num" style="position: relative;cursor: pointer;"> <span class="venue_proportion_box_num" style="position: relative;cursor: pointer;">
<a target="tyg" style="text-decoration: none;color: #fff;z-index: 9999;"> <a target="tyg" style="text-decoration: none;color: #fff;z-index: 9999;">
{{ cgrdata[1]['proportion'] }} {{ cgp_2 }}
</a> </a>
<!-- v-show="istygShow == true" --> <!-- v-show="istygShow == true" -->
@ -96,13 +96,13 @@
</span> </span>
</div> </div>
<div class="venue_proportion_bo"> <div class="venue_proportion_bo">
<span>{{ cgrdata[1]['groupName'] }}</span> <span>{{ cgn_2 }}</span>
</div> </div>
</div> </div>
<div class="venue_proportion"> <div class="venue_proportion">
<div class="venue_proportion_top" style="cursor: pointer;" @click="istygShowfn3"> <div class="venue_proportion_top" style="cursor: pointer;" @click="istygShowfn3">
<span class="venue_proportion_box_num" style="position: relative;cursor: pointer;"> <span class="venue_proportion_box_num" style="position: relative;cursor: pointer;">
{{ cgrdata[2]['proportion'] }} {{ cgp_3 }}
<!-- v-show="istygShow == true" --> <!-- v-show="istygShow == true" -->
<div v-show="istygShow3 == true" style="cursor: pointer;overflow-y: hidden;padding: 0.5rem;" <div v-show="istygShow3 == true" style="cursor: pointer;overflow-y: hidden;padding: 0.5rem;"
@click="istygShowfn3"> @click="istygShowfn3">
@ -111,7 +111,7 @@
</span> </span>
</div> </div>
<div class="venue_proportion_bo"> <div class="venue_proportion_bo">
<span>{{ cgrdata[2]['groupName'] }}</span> <span>{{ cgn_3 }}</span>
</div> </div>
</div> </div>
@ -132,6 +132,7 @@
</template> </template>
<script> <script>
// echarts // echarts
// import {echarts} from "echarts";
import * as echarts from "echarts"; import * as echarts from "echarts";
// api // api
@ -157,9 +158,12 @@ export default {
// //
daData:[], daData:[],
// //
cgrdata:[], cgp_1:'',
tygrate:[], cgp_2:'',
cgname:[], cgp_3:'',
cgn_1:'',
cgn_2:'',
cgn_3:'',
initCount: 0, initCount: 0,
pubKey0: '', pubKey0: '',
@ -172,23 +176,21 @@ export default {
}; };
}, },
created() { created() {
// this.$nextTick DOM使DOM // this.$nextTick DOM使DOM
this.$nextTick(() => { this.$nextTick(() => {
this.initPlugin(); this.initPlugin();
this.initPlugin2(); this.initPlugin2();
this.initPlugin3(); this.initPlugin3();
}); });
}, },
// 退 // 退
destroy(){ destroy(){
}, },
mounted() { mounted() {
let cc = window.document.getElementById("app"); let cc = window.document.getElementById("app");
// classname // classname
if (cc.className.indexOf('ty_bg') > -1) { if (cc.className.indexOf('ty_bg') > -1) {
@ -197,17 +199,23 @@ export default {
cc.classList.add("ty_bg"); cc.classList.add("ty_bg");
} }
// // // //
this.getStat() this.$nextTick( ()=>{
this.getStat()
});
this.$nextTick( ()=>{
this.ty_bar1()
// this.ty_bar2()
this.ty_bar3()
})
this.ty_bar1()
// this.ty_bar2()
this.ty_bar3()
this.$nextTick(()=>{ // this.$nextTick(()=>{
this.addNumber(0, this.todayNum, 'insv') this.addNumber(0, this.todayNum, 'insv')
this.addNumber(0, this.monthNum, 'insv2') this.addNumber(0, this.monthNum, 'insv2')
this.addNumber(0, this.yearNum, 'insv3') this.addNumber(0, this.yearNum, 'insv3')
}); // });
this.getVideo() this.getVideo()
@ -737,19 +745,24 @@ export default {
// //
getStat() { getStat() {
let that = this let that = this
const groups ="110|210|310" const groups ="110|210|310";
// DAILY // DAILY
homeApi.allTygGroupTimeNum({granularity:"daily",groupsId:groups}).then(res=>{ homeApi.allTygGroupTimeNum({granularity:"daily",groupsId:groups}).then(res=>{
// 24h // 24h
that.daData = res.data.data that.daData = res.data.data
const day_tmp=res.data.data.groupsData const day_tmp=res.data.data.groupsData
// //
day_tmp.forEach(item=>{ day_tmp.forEach(item=>{
that.todayNum =+ item.noRepeatInNum, that.todayNum =+ item.noRepeatInNum
that.cgname.push[item.groupName]
}); });
that.cgrdata = day_tmp //
that.cgp_1 = day_tmp[0].proportion
that.cgn_1 = day_tmp[0].groupName
that.cgp_2 = day_tmp[1].proportion
that.cgn_2 = day_tmp[1].groupName
that.cgp_3 = day_tmp[2].proportion
that.cgn_3 = day_tmp[2].groupName
}) })
// MONTHLY // MONTHLY

Loading…
Cancel
Save