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

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

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

Loading…
Cancel
Save