Browse Source

修改中2

lite
‘daijinzheng@xingtongworld.com’ 3 years ago
parent
commit
1dc1788b09
  1. 31
      src/views/index.vue
  2. 60
      src/views/ty/index.vue

31
src/views/index.vue

@ -161,6 +161,10 @@ export default {
return {
// ,
klselt: "d",
//
kltdata: [],
//
klvdata: [],
day_num: 0,
week_num: 0,
mon_num: 0,
@ -194,10 +198,37 @@ export default {
this.getGcgNumDatas()
},
methods: {
btgetdata(type) {
console.log(type)
let rqtp;
switch (type) {
case 'd': rqtp = "daily"; break;
case 'm': rqtp = "monthly"; break;
case 'y': rqtp = "yearly"; break;
}
//
homeApi.allGroupTimeNum({ 'granularity': rqtp }).then(res => {
const kldata = res.data.data.allTimeData
//
let kltd = new Array;
let tmpkvd = new Array;
const dkeys = res.data.data.dkeys
dkeys.forEach(function (item, idx) {
kltd.push(item)
tmpkvd.push(kldata[item].num)
})
this.kltdata = kltd
this.klvdata = tmpkvd
});
},
//
selitem(type) {
console.log('1111111111');
console.log(type);
this.klselt = type;
this.btgetdata(type)
},
//
home_bar() {
var chartDom = document.getElementById("homebar");

60
src/views/ty/index.vue

@ -140,8 +140,6 @@ export default {
this.initPlugin();
this.initPlugin2();
this.initPlugin3();
// setTimeout(this.initPlugin2(), 1000);
// setTimeout(this.initPlugin3(), 1000);
});
@ -163,25 +161,6 @@ export default {
this.addNumber(0, 234098, 'insv3')
this.getVideo()
// if (flvjs.isSupported()) {
// let video = this.$refs.player
// if (video) {
// this.player = flvjs.createPlayer({
// type: "flv",
// isLive: true,
// url: `rtmp://58.200.131.2:1935/livetv/hunantv`
// });
// this.player.attachMediaElement(video);
// try {
// this.player.load();
// this.player.play();
// } catch (error) {
// console.log(error);
// }
// }
// }
},
methods: {
ty_bar1() {
@ -713,19 +692,19 @@ export default {
console.log(that);
homeApi.allGetVideo().then(res => {
// get allTimeData
console.log(res);
// console.log(res);
const tmpdata = res.data.videoData
console.log(tmpdata);
// console.log(tmpdata);
this.decode(tmpdata)
console.log(this.decode(tmpdata));
// console.log(this.decode(tmpdata));
let baseviode = this.decode(tmpdata)
this.decode(baseviode)
console.log(this.decode(baseviode));
// console.log(this.decode(baseviode));
let baseviodejson = this.decode2(baseviode)
var jsonParseJson = JSON.parse(baseviodejson);
console.log(jsonParseJson);
// console.log(jsonParseJson);
this.videoData = jsonParseJson
console.log(this.videoData);
// console.log(this.videoData);
// this.day_num = tmpdata.day.noRepeatInNum
// this.week_num_num = tmpdata.week.noRepeatInNum
// this.mon_num = tmpdata.month.noRepeatInNum
@ -783,7 +762,6 @@ export default {
oWebControl0.JS_CreateWnd('camera0').then(() => {
//JS_CreateWnd
_that.init(); //
console.log('111111111');
});
},
@ -843,7 +821,6 @@ export default {
oWebControl1.JS_CreateWnd('camera1').then(() => {
//JS_CreateWnd
_that.init2(); //
console.log('22222222222');
}).catch((err) => {
console.log(err);
@ -905,7 +882,6 @@ export default {
oWebControl2.JS_CreateWnd('camera2').then(() => {
//JS_CreateWnd
_that.init3(); //
console.log('3333333333');
}).catch((err) => {
console.log(err);
@ -950,7 +926,7 @@ export default {
_that.getPubKey(function () {
//
console.log(typeof(_that.videoData[0].host));
// console.log(typeof(_that.videoData[0].host));
var port = Number(_that.videoData[0].port)
var appkey = _that.videoData[0].appkey; //appkey
var secret = _that.setEncrypt(_that.videoData[0].secret); //secret
@ -988,8 +964,8 @@ export default {
let width = document.querySelector("#camera0").offsetWidth;
let height = document.querySelector("#camera0").offsetHeight;
_that.oWebControl0.JS_Resize(width, height); // resize
console.log(oData);
console.log(width, height);
// console.log(oData);
// console.log(width, height);
_that.getVideoFun(_that.videoData[0].cameraIndexCode)
});
});
@ -1035,8 +1011,8 @@ export default {
let width2 = document.querySelector("#camera1").offsetWidth;
let height2 = document.querySelector("#camera1").offsetHeight;
_that.oWebControl1.JS_Resize(width2, height2); // resize
console.log(oData);
console.log(width2, height2);
// console.log(oData);
// console.log(width2, height2);
_that.getVideoFun2(_that.videoData[1].cameraIndexCode)
});
});
@ -1082,8 +1058,8 @@ export default {
let width3 = document.querySelector("#camera2").offsetWidth;
let height3 = document.querySelector("#camera2").offsetHeight;
_that.oWebControl2.JS_Resize(width3, height3); // resize
console.log(oData);
console.log(width3, height3);
// console.log(oData);
// console.log(width3, height3);
_that.getVideoFun3(_that.videoData[2].cameraIndexCode)
});
});
@ -1542,9 +1518,9 @@ export default {
.venue_proportion_top {
text-align: center;
width: 75%;
height: 9vh;
line-height: 9vh;
width: 85%;
height: 13vh;
line-height: 13vh;
margin: 0 auto;
background-image: url('../../assets/ty/右1-4.png');
background-size: 100% 100%;
@ -1557,8 +1533,8 @@ export default {
font-weight: bold;
display: block;
width: 60%;
height: 9vh;
line-height: 9vh;
height: 12vh;
line-height: 12vh;
margin: 0 auto;
background-image: url('../../assets/ty/右1-3.png');
background-size: 100% 100%;

Loading…
Cancel
Save