|
|
|
@ -1079,53 +1079,52 @@ export default {
|
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
|
|
////判断河南规约
|
|
|
|
|
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)) {
|
|
|
|
|
dayArr.push(startVal);
|
|
|
|
|
// 自增
|
|
|
|
|
startVal = this.$moment(new Date(startVal))
|
|
|
|
|
.add(spanTime, "minute")
|
|
|
|
|
.format("YYYY-MM-DD HH:mm");
|
|
|
|
|
console.log(startVal);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
while (this.$moment(startVal).isBefore(endDay)) {
|
|
|
|
|
dayArr.push(startVal);
|
|
|
|
|
// 自增
|
|
|
|
|
startVal = this.$moment(new Date(startVal))
|
|
|
|
|
.add(spanTime, "minute")
|
|
|
|
|
.format("YYYY-MM-DD HH:mm");
|
|
|
|
|
console.log(startVal);
|
|
|
|
|
}
|
|
|
|
|
// // 将结束日期的天放进数组
|
|
|
|
|
if (!moment().isSame(moment(endDay), "day")) {
|
|
|
|
|
dayArr.push(
|
|
|
|
|
this.$moment(new Date(lastETime)).format("YYYY-MM-DD HH:mm")
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// // 将结束日期的天放进数组
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
// 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 = {
|
|
|
|
|
termid: this.deviceListData.zzid,
|
|
|
|
|
channelid: this.checkList,
|
|
|
|
|