|
|
|
@ -58,15 +58,7 @@
|
|
|
|
|
>{{ val.substring(val.length - 5) }}</el-tag
|
|
|
|
|
>
|
|
|
|
|
<el-tag
|
|
|
|
|
v-if="
|
|
|
|
|
timeProtocol == '65286' ||
|
|
|
|
|
timeProtocol == '65282' ||
|
|
|
|
|
timeProtocol == '65280' ||
|
|
|
|
|
timeProtocol == '65296' ||
|
|
|
|
|
timeProtocol == '65281' ||
|
|
|
|
|
timeProtocol == '65284' ||
|
|
|
|
|
timeProtocol == '65285'
|
|
|
|
|
"
|
|
|
|
|
v-if="timeProtocol == '65286' || timeProtocol == '65282'"
|
|
|
|
|
class="mr10 mt10"
|
|
|
|
|
size="mini"
|
|
|
|
|
v-for="(val, index) in this.shedulenr"
|
|
|
|
@ -91,15 +83,7 @@
|
|
|
|
|
>{{ val.substring(val.length - 5) }}</el-tag
|
|
|
|
|
>
|
|
|
|
|
<el-tag
|
|
|
|
|
v-if="
|
|
|
|
|
timeProtocol == '65286' ||
|
|
|
|
|
timeProtocol == '65282' ||
|
|
|
|
|
timeProtocol == '65280' ||
|
|
|
|
|
timeProtocol == '65296' ||
|
|
|
|
|
timeProtocol == '65281' ||
|
|
|
|
|
timeProtocol == '65284' ||
|
|
|
|
|
timeProtocol == '65285'
|
|
|
|
|
"
|
|
|
|
|
v-if="timeProtocol == '65286' || timeProtocol == '65282'"
|
|
|
|
|
class="mr10 mt10"
|
|
|
|
|
size="mini"
|
|
|
|
|
v-for="(val, index) in this.newshedulenr"
|
|
|
|
@ -338,7 +322,7 @@ export default {
|
|
|
|
|
newList: [],
|
|
|
|
|
listTime: [],
|
|
|
|
|
page: 1, // 当前页数
|
|
|
|
|
pageSize: 40, // 每页数量
|
|
|
|
|
pageSize: 10, // 每页数量
|
|
|
|
|
total: 0, //总条数
|
|
|
|
|
listnr: [], //通道树结构
|
|
|
|
|
defaultProps: {
|
|
|
|
@ -371,12 +355,9 @@ export default {
|
|
|
|
|
requestArr: [], //通过requestid获取状态
|
|
|
|
|
sureloading: false,
|
|
|
|
|
offsetnum: "",
|
|
|
|
|
//setNum: Math.floor(Math.random() * 10),
|
|
|
|
|
setNum: 0,
|
|
|
|
|
setNum: Math.floor(Math.random() * 10),
|
|
|
|
|
compareloading: false,
|
|
|
|
|
timeProtocol: "",
|
|
|
|
|
|
|
|
|
|
intervalNum: 1000, //时间间隔
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
@ -475,9 +456,9 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// // 将结束日期的天放进数组
|
|
|
|
|
// dayArr.push(
|
|
|
|
|
// this.$moment(new Date(endDay)).format("YYYY-MM-DD HH:mm")
|
|
|
|
|
// );
|
|
|
|
|
dayArr.push(
|
|
|
|
|
this.$moment(new Date(endDay)).format("YYYY-MM-DD HH:mm")
|
|
|
|
|
);
|
|
|
|
|
console.log(dayArr);
|
|
|
|
|
this.shedulenr = dayArr;
|
|
|
|
|
}
|
|
|
|
@ -485,12 +466,7 @@ export default {
|
|
|
|
|
//河南规约
|
|
|
|
|
if (
|
|
|
|
|
this.timeProtocol == "65286" ||
|
|
|
|
|
this.timeProtocol == "65282" ||
|
|
|
|
|
this.timeProtocol == "65280" ||
|
|
|
|
|
this.timeProtocol == "65296" ||
|
|
|
|
|
this.timeProtocol == "65281" ||
|
|
|
|
|
this.timeProtocol == "65284" ||
|
|
|
|
|
this.timeProtocol == "65285"
|
|
|
|
|
this.timeProtocol == "65282"
|
|
|
|
|
) {
|
|
|
|
|
console.log("河南规约");
|
|
|
|
|
var hnarr = [];
|
|
|
|
@ -519,13 +495,7 @@ export default {
|
|
|
|
|
changeSelect() {
|
|
|
|
|
console.log(this.selaccess);
|
|
|
|
|
this.loading = true;
|
|
|
|
|
this.compareloading = false;
|
|
|
|
|
this.timernum = 0;
|
|
|
|
|
// this.$message.success("查询成功");
|
|
|
|
|
clearInterval(this.timer);
|
|
|
|
|
this.timer = null;
|
|
|
|
|
this.newshedulenr = [];
|
|
|
|
|
|
|
|
|
|
getSchedulenr({
|
|
|
|
|
channelid: this.selaccess,
|
|
|
|
|
terminalid: this.selfacilityId,
|
|
|
|
@ -597,19 +567,15 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// // 将结束日期的天放进数组
|
|
|
|
|
// dayArr.push(
|
|
|
|
|
// this.$moment(new Date(endDay)).format("YYYY-MM-DD HH:mm")
|
|
|
|
|
// );
|
|
|
|
|
dayArr.push(
|
|
|
|
|
this.$moment(new Date(endDay)).format("YYYY-MM-DD HH:mm")
|
|
|
|
|
);
|
|
|
|
|
console.log(dayArr);
|
|
|
|
|
this.shedulenr = dayArr;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//河南规约
|
|
|
|
|
if (
|
|
|
|
|
this.timeProtocol == "65286" ||
|
|
|
|
|
this.timeProtocol == "65282" ||
|
|
|
|
|
this.timeProtocol == "65281"
|
|
|
|
|
) {
|
|
|
|
|
if (this.timeProtocol == "65286" || this.timeProtocol == "65282") {
|
|
|
|
|
console.log("河南规约");
|
|
|
|
|
var hnarr = [];
|
|
|
|
|
for (var i = 0; i < this.shedulenr.length; i++) {
|
|
|
|
@ -640,15 +606,14 @@ export default {
|
|
|
|
|
terminalid: this.selfacilityId,
|
|
|
|
|
})
|
|
|
|
|
.then((res) => {
|
|
|
|
|
//console.log(res);
|
|
|
|
|
console.log(res);
|
|
|
|
|
this.requestId = res.data.requestId;
|
|
|
|
|
// this.realNewtime();
|
|
|
|
|
this.realNewtime();
|
|
|
|
|
this.timer = window.setInterval(() => {
|
|
|
|
|
//console.log(this.requestList);
|
|
|
|
|
this.realNewtime();
|
|
|
|
|
console.log("时间", this.timernum);
|
|
|
|
|
console.log("时间间隔", this.intervalNum);
|
|
|
|
|
this.timernum++;
|
|
|
|
|
}, this.intervalNum);
|
|
|
|
|
}, 3000);
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {
|
|
|
|
|
this.$message.error("查询失败");
|
|
|
|
@ -666,8 +631,8 @@ export default {
|
|
|
|
|
this.compareloading = false;
|
|
|
|
|
this.newshedulenr = res.data.list;
|
|
|
|
|
this.offsetnum = res.data.offset;
|
|
|
|
|
// console.log("qqqqqqqqqqqqqqqqqqqqqq");
|
|
|
|
|
// console.log(this.offsetnum);
|
|
|
|
|
console.log("qqqqqqqqqqqqqqqqqqqqqq");
|
|
|
|
|
console.log(this.offsetnum);
|
|
|
|
|
//湖南规约
|
|
|
|
|
if (this.timeProtocol == "65283") {
|
|
|
|
|
console.log("湖南规约");
|
|
|
|
@ -711,7 +676,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
console.log("222222222222222222");
|
|
|
|
|
// console.log(hnarr);
|
|
|
|
|
console.log(hnarr);
|
|
|
|
|
console.log("22222222222222222222222");
|
|
|
|
|
let dayArr = [];
|
|
|
|
|
//根据开始时间结束时间生产数组
|
|
|
|
@ -741,19 +706,14 @@ export default {
|
|
|
|
|
// this.$moment(new Date(endDay)).format("YYYY-MM-DD HH:mm")
|
|
|
|
|
// );
|
|
|
|
|
|
|
|
|
|
//console.log(dayArr);
|
|
|
|
|
console.log(dayArr);
|
|
|
|
|
this.newshedulenr = dayArr;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//河南规约
|
|
|
|
|
if (
|
|
|
|
|
this.timeProtocol == "65286" ||
|
|
|
|
|
this.timeProtocol == "65282" ||
|
|
|
|
|
this.timeProtocol == "65280" ||
|
|
|
|
|
this.timeProtocol == "65296" ||
|
|
|
|
|
this.timeProtocol == "65281" ||
|
|
|
|
|
this.timeProtocol == "65284" ||
|
|
|
|
|
this.timeProtocol == "65285"
|
|
|
|
|
this.timeProtocol == "65282"
|
|
|
|
|
) {
|
|
|
|
|
console.log("河南规约");
|
|
|
|
|
var hnarr = [];
|
|
|
|
@ -766,7 +726,7 @@ export default {
|
|
|
|
|
console.log(timeDate);
|
|
|
|
|
hnarr.push(timeDate);
|
|
|
|
|
}
|
|
|
|
|
// console.log(hnarr);
|
|
|
|
|
console.log(hnarr);
|
|
|
|
|
this.newshedulenr = hnarr;
|
|
|
|
|
}
|
|
|
|
|
this.timernum = 0;
|
|
|
|
@ -1083,62 +1043,52 @@ export default {
|
|
|
|
|
|
|
|
|
|
console.log(timearr);
|
|
|
|
|
}
|
|
|
|
|
////判断河南规约
|
|
|
|
|
if (
|
|
|
|
|
this.deviceListData.zzprotocol == "65286" ||
|
|
|
|
|
this.deviceListData.zzprotocol == "65282" ||
|
|
|
|
|
this.deviceListData.zzprotocol == "65280" ||
|
|
|
|
|
this.deviceListData.zzprotocol == "65296" ||
|
|
|
|
|
this.deviceListData.zzprotocol == "65281" ||
|
|
|
|
|
this.deviceListData.zzprotocol == "65284" ||
|
|
|
|
|
this.deviceListData.zzprotocol == "65285"
|
|
|
|
|
) {
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
////判断河南规约
|
|
|
|
|
if (
|
|
|
|
|
this.deviceListData.zzprotocol == "65286" ||
|
|
|
|
|
this.timeProtocol == "65282"
|
|
|
|
|
) {
|
|
|
|
|
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 (!moment().isSame(moment(endDay), "day")) {
|
|
|
|
|
console.log("dayArr最后一天啊");
|
|
|
|
|
console.log(dayArr);
|
|
|
|
|
console.log(
|
|
|
|
|
lastETime,
|
|
|
|
|
this.$moment(new Date(lastETime)).format("YYYY-MM-DD HH:mm")
|
|
|
|
|
);
|
|
|
|
|
// dayArr.push(
|
|
|
|
|
// this.$moment(new Date(lastETime)).format("YYYY-MM-DD HH:mm")
|
|
|
|
|
// );
|
|
|
|
|
}
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 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 = {
|
|
|
|
|
termid: this.deviceListData.zzid,
|
|
|
|
|
channelid: this.checkList,
|
|
|
|
@ -1209,7 +1159,7 @@ export default {
|
|
|
|
|
clearInterval(this.timers);
|
|
|
|
|
this.timers = null;
|
|
|
|
|
} else if (this.i > 9) {
|
|
|
|
|
//this.isShowset = false;
|
|
|
|
|
this.isShowset = false;
|
|
|
|
|
this.sureloading = false;
|
|
|
|
|
this.i = 0;
|
|
|
|
|
this.$message.warning("下发失败,请稍后再试!");
|
|
|
|
@ -1225,7 +1175,7 @@ export default {
|
|
|
|
|
this.checkList = "";
|
|
|
|
|
// this.setNum = this.offsetnum;
|
|
|
|
|
this.deviceList();
|
|
|
|
|
this.sureloading = false;
|
|
|
|
|
|
|
|
|
|
clearInterval(this.timers);
|
|
|
|
|
this.timers = null;
|
|
|
|
|
},
|
|
|
|
@ -1238,14 +1188,10 @@ export default {
|
|
|
|
|
handleclose() {
|
|
|
|
|
this.newshedulenr = [];
|
|
|
|
|
this.shedulenr = [];
|
|
|
|
|
this.sureloading = false;
|
|
|
|
|
this.compareloading = false;
|
|
|
|
|
|
|
|
|
|
clearInterval(this.timer);
|
|
|
|
|
console.log("关闭轮询");
|
|
|
|
|
clearInterval(this.timers);
|
|
|
|
|
this.timers = null;
|
|
|
|
|
this.timer = null;
|
|
|
|
|
console.log("关闭轮询", "loading");
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|