安徽视频

ds1.0
fanluyan 2 years ago
parent 8d73a1c348
commit 9e8d65d9fe

@ -1079,53 +1079,52 @@ export default {
console.log(timearr); console.log(timearr);
} }
} ////
if (
this.deviceListData.zzprotocol == "65286" ||
this.deviceListData.zzprotocol == "65282" ||
this.deviceListData.zzprotocol == "65281"
) {
console.log("河南规约");
//
//this.getDayArr(startDay, endDay);
let startDay = Stime;
let endDay = Etime;
var lastendDay = lastETime;
console.log(startDay, endDay);
let startVal = this.$moment(new Date(startDay)).format(
"YYYY-MM-DD HH:mm"
);
console.log(startVal);
//// while (this.$moment(startVal).isBefore(endDay)) {
if ( dayArr.push(startVal);
this.deviceListData.zzprotocol == "65286" || //
this.deviceListData.zzprotocol == "65282" || startVal = this.$moment(new Date(startVal))
this.deviceListData.zzprotocol == "65281" .add(spanTime, "minute")
) { .format("YYYY-MM-DD HH:mm");
console.log("河南规约"); console.log(startVal);
// }
//this.getDayArr(startDay, endDay);
let startDay = Stime;
let endDay = Etime;
var lastendDay = lastETime;
console.log(startDay, endDay);
let startVal = this.$moment(new Date(startDay)).format(
"YYYY-MM-DD HH:mm"
);
console.log(startVal);
while (this.$moment(startVal).isBefore(endDay)) { // //
dayArr.push(startVal); if (!moment().isSame(moment(endDay), "day")) {
// dayArr.push(
startVal = this.$moment(new Date(startVal)) this.$moment(new Date(lastETime)).format("YYYY-MM-DD HH:mm")
.add(spanTime, "minute") );
.format("YYYY-MM-DD HH:mm"); }
console.log(startVal);
}
// // // return dayArr;
if (!moment().isSame(moment(endDay), "day")) {
dayArr.push(
this.$moment(new Date(lastETime)).format("YYYY-MM-DD HH:mm")
);
}
console.log(dayArr);
for (var k = 0; k < dayArr.length; k++) {
//console.log(moment(dayArr[k]).hour());
timearr.push({
hour: moment(dayArr[k]).hour(),
minute: moment(dayArr[k]).minute(),
preset: 255,
});
} }
// return dayArr;
} }
console.log(dayArr);
for (var k = 0; k < dayArr.length; k++) {
//console.log(moment(dayArr[k]).hour());
timearr.push({
hour: moment(dayArr[k]).hour(),
minute: moment(dayArr[k]).minute(),
preset: 255,
});
}
var parmsobj = { var parmsobj = {
termid: this.deviceListData.zzid, termid: this.deviceListData.zzid,
channelid: this.checkList, channelid: this.checkList,

@ -421,7 +421,7 @@ export default {
zzradio: -1, zzradio: -1,
videoVisible: false, videoVisible: false,
videoForm: { videoForm: {
stream: "0", stream: 0,
time: "20", time: "20",
}, },
commondChannel: 1, commondChannel: 1,
@ -891,44 +891,8 @@ export default {
} }
}, },
setTermFn(dataParams) {
console.log("点击了统一的接口", "runningstatus");
setTermCamera({
termId: this.zztermId,
list: dataParams,
})
.then((res) => {
console.log(res);
this.requestid = res.data.requestId;
//this.getinfo1();
clearInterval(this.statusTimer);
this.statusTimer = window.setInterval(() => {
this.getinfo();
this.statusNum++;
}, 1000);
})
.catch((err) => {});
},
getinfo() {
getTermCameraRequest({ requestid: this.requestid })
.then((res) => {
if (res.data.success == 1) {
this.btnvideoloading = false;
this.statusNum = 0;
clearInterval(this.statusTimer);
this.statusTimer = null;
console.log(res);
} else if (this.statusNum > 9) {
this.btnvideoloading = false;
this.statusNum = 0;
clearInterval(this.statusTimer);
this.statusTimer = null;
console.log(res);
}
})
.catch((err) => {});
},
anVideoFn(command) { anVideoFn(command) {
this.videoVisible = false;
getTermStatus({ termId: this.zztermId }).then((res) => { getTermStatus({ termId: this.zztermId }).then((res) => {
console.log(res); console.log(res);
if (res.data.isonline) { if (res.data.isonline) {
@ -971,13 +935,32 @@ export default {
} }
}); });
}, },
setTermFn(dataParams) {
console.log("点击了统一的接口", "runningstatus");
setTermCamera({
termId: this.zztermId,
list: dataParams,
})
.then((res) => {
console.log(res);
this.requestId = res.data.requestId;
this.picTime = res.data.date;
this.getTakePicStatus(res.data);
clearInterval(this.statusTimer);
this.statusTimer = window.setInterval(() => {
this.getTakePicStatus(res.data);
this.statusNum++;
}, 3000);
})
.catch((err) => {});
},
// //
getTakePicStatus(data) { getTakePicStatus(data) {
console.log(data); console.log(data);
getTakePicStatusJoggle({ getTakePicStatusJoggle({
requestid: data.requestId, requestid: data.requestId,
termId: this.zztermId, termId: this.zztermId,
photoTime: new Date(data.taketime).getTime(), photoTime: new Date(this.picTime).getTime(),
}) })
.then((res) => { .then((res) => {
console.log(res); console.log(res);

Loading…
Cancel
Save