Browse Source

梳理原视频调用代码

lite
453530270@qq.com 3 years ago
parent
commit
85a36c8a6e
  1. 127
      src/views/ty/index.vue

127
src/views/ty/index.vue

@ -62,28 +62,14 @@
<div class="c_title">24小时进馆人数</div>
<div class="c_l" id="animationA"></div>
<div class="c_r">
<span class="c_r_num">{{ cgn_1 }}</span>
<span class="c_r_num">{{ cgv_1 }}</span>
<span class="c_r_txt">体育场</span>
<span class="c_r_num">{{ cgn_2 }}</span>
<span class="c_r_num">{{ cgv_2 }}</span>
<span class="c_r_txt">体育馆</span>
<span class="c_r_num">{{ cgn_3 }}</span>
<span class="c_r_num">{{ cgv_3 }}</span>
<span class="c_r_txt">游泳场馆</span>
</div>
<!-- v-for=" item in videoData" :key="item.key" -->
<!-- <div class="item" v-for=" item in videoData" :key="item.key" style="position: relative;">
<video style="width: 68%;height: 70%;position: absolute;left: 0.3rem;top: 0.3rem;" :id="item.key"
autoplay></video>
</div> -->
<!-- <div class="item" style="position: relative;">
<video style="width: 68%;height: 70%;position: absolute;top: 0.3rem;left: 0.3rem;" id="camera0"
autoplay></video>
</div>
<div class="item">
<video style="width: 68%;margin-top: 0.3rem;height: 70%;margin-left: 0.3rem;" id="camera1" autoplay></video>
</div>
<div class="item">
<video style="width: 68%;margin-top: 0.3rem;height: 70%;margin-left: 0.3rem;" id="camera2" autoplay></video>
</div> -->
</div>
<div class="right">
@ -190,12 +176,19 @@ export default {
data24h: [],
//
groupsData: [],
// cgp
cgp_1:'',
cgp_2:'',
cgp_3:'',
// cgn
cgn_1:'',
cgn_2:'',
cgn_3:'',
// cgv
cgv_1:0,
cgv_2:0,
cgv_3:0,
//
rsqsXData: [],
rsqsDatas: [],
@ -248,9 +241,9 @@ export default {
// this.$nextTick(()=>{
this.addNumber(0, this.todayNum, 'insv')
this.addNumber(0, this.monthNum, 'insv2')
this.addNumber(0, this.yearNum, 'insv3')
// this.addNumber(0, this.todayNum, 'insv')
// this.addNumber(0, this.monthNum, 'insv2')
// this.addNumber(0, this.yearNum, 'insv3')
// });
},
@ -889,9 +882,9 @@ export default {
}, 1500);
}
run();
setInterval(function () {
run();
}, 3000);
// setInterval(function () {
// run();
// }, 3000);
},
ty_pie(myChart,DD){
let that = this;
@ -1026,6 +1019,53 @@ export default {
// }, 200)
},
// 24
getData24h(){
let that = this;
homeApi.getID().then(res=>{
// console.log(res, '=====');
let idArr = "";
res.data.data.map(item=>{
if(item.type==1){
idArr += "|"+item.groupId;
}
})
homeApi.getAllfFlow({groupsId:idArr}).then(res=>{
// console.log(res, '=====');
that.data24h = res.data.data.dvalue;
that.data24hX = res.data.data.dkeys;
});
});
},
//
gethomeBarData(){
let that = this;
homeApi.getID().then(res=>{
// console.log(res, '=====');
let idArr = "";
res.data.data.map(item=>{
if(item.type==1){
idArr += "|"+item.groupId;
}
})
that.groupsData = [];
homeApi.homeBarData({groupsId:idArr}).then(res=>{
// console.log(res, '=====');
res.data.data.groupsData.forEach(item=>{
that.groupsData.push(item);
});
// console.log(that.groupsData, 'that.groupsData')
that.cgn_1 = that.groupsData[0].noRepeatInNum;
that.cgp_1 = that.groupsData[0].proportion;
that.cgn_2 = that.groupsData[1].noRepeatInNum;
that.cgp_2 = that.groupsData[1].proportion;
that.cgn_3 = that.groupsData[2]?that.groupsData[2].noRepeatInNum:'';
that.cgp_3 = that.groupsData[2]?that.groupsData[2].proportion:'';
});
});
},
//
getStat() {
let that = this
@ -1065,6 +1105,45 @@ export default {
},
// 线
getGcgNumDatas(){
let that = this;
homeApi.getID().then(res=>{
// console.log(res, '=====');
let idArr = "";
res.data.data.map(item=>{
if(item.type==1){
idArr += "|"+item.groupId;
}
})
//
homeApi.allGcgNumDatas({groupsId:idArr}).then(res=>{
// console.log(res, '=====');
const tmpdata = res.data.data;
tmpdata.forEach((item) => {
that.rsqsDataName.push(item.groupName);
that.rsqsDatas.push(item.list)
})
that.rsqsXData = res.data.data[0].list.dkeys;
that.rsqsDatas.forEach((item) => {
let rsqsData = []
Object.getOwnPropertyNames(item).forEach((value) => {
if(value=='dkeys'){
}
if(value=='dvalue'){
// console.log(item, value, '-----')
// rsqsData.push(item[value])
rsqsData = item[value];
}
});
that.rsqsDataAll.push(rsqsData)
})
});
});
},
},
};

Loading…
Cancel
Save