wp1.0
fanluyan 2 years ago
parent 5074f7ac66
commit c15a9d9aaa

@ -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");
},
},
};

@ -29,11 +29,11 @@ module.exports = defineConfig({
proxy: {
"/api": {
//表示拦截以/api开头的请求路径
// target: "http://47.96.238.157:8093", //阿里云服务器环境
target: "http://180.166.218.222:40080", //dell
target: "http://47.96.238.157:8093", //阿里云服务器环境
//target: "http://180.166.218.222:40080", //dell
changOrigin: true, //是否开启跨域
pathRewrite: {
"^/api": "/api", //重写api把api变成空字符因为我们真正请求的路径是没有api的
"^/api": "", //重写api把api变成空字符因为我们真正请求的路径是没有api的
},
},
},

Loading…
Cancel
Save