diff --git a/src/utils/api/index.js b/src/utils/api/index.js index 7f7f67a..08cfdc9 100644 --- a/src/utils/api/index.js +++ b/src/utils/api/index.js @@ -521,8 +521,14 @@ export function updateCoordinate(data) { url: "/api/updateCoordinate", method: "post", data, - // headers: { - // "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8", - // }, + }); +} + +//根据requestid查询时间表下发状态 +export function getCmaSchelduleUpload(data) { + return request({ + url: "/api/getCmaSchelduleUpload", + method: "post", + data, }); } diff --git a/src/views/devicePhotoSchedule/components/setdevice.vue b/src/views/devicePhotoSchedule/components/setdevice.vue index b8480f2..064e0b3 100644 --- a/src/views/devicePhotoSchedule/components/setdevice.vue +++ b/src/views/devicePhotoSchedule/components/setdevice.vue @@ -40,10 +40,19 @@ :default-expand-all="true" @check="getCheckedNodes" > - + {{ data.name }} - 装置下发中 - 装置下发失败 + 装置下发中 + 装置下发中 + 装置下发失败 {{ data.name }} @@ -66,6 +75,7 @@ import { setScheduleRulel, getScheduleRulelAccessList, getTermListByChannelJoggle, + getCmaSchelduleUpload, } from "@/utils/api/index"; export default { props: { @@ -98,6 +108,13 @@ export default { isIndeterminate: true, //全选设置默认选中 timer: null, termidArrNum: -1, + requestList: [], + + timer: null, + i: 0, + zzsuccess: false, + zzpending: false, + zzerror: false, }; }, mounted() {}, @@ -218,6 +235,13 @@ export default { }) .then((res) => { console.log(res); + this.requestList = res.data.list; + console.log("0000000000000000"); + this.requestTime(); + this.timer = window.setInterval(() => { + this.requestTime(); + this.i++; + }, 10000); // this.$message({ // showClose: true, // message: '添加成功',type: 'success' @@ -231,6 +255,36 @@ export default { }); }); }, + //根据requestid查询时间表下发状态 + requestTime() { + getCmaSchelduleUpload({ + list: this.requestList, + }) + .then((res) => { + console.log("1111111111111111111111111111111"); + console.log("1111111111111111111111111111111"); + console.log("1111111111111111111111111111111"); + console.log("1111111111111111111111111111111"); + console.log(res); + + if (res.data.list.length > 0) { + for (var j = 0; j < res.data.list.length; j++) { + if (res.data.list[j].status == 1) { + this.zzsuccess = true; + } else { + this.zzerror = true; + } + } + clearInterval(this.timer); + this.timer = null; + } else if (this.i > 9) { + this.$message.warning("暂无响应,请稍后再试!"); + clearInterval(this.timer); + this.timer = null; + } + }) + .catch((err) => {}); + }, display() { this.isShow = true; }, @@ -256,7 +310,7 @@ export default { border: 1px solid #eee; padding: 16px; border-radius: 4px; - .mr10{ + .mr10 { margin-right: 10px; } .dybox { diff --git a/src/views/management/monitoringEquipment/photographicDevice/components/imageCapture.vue b/src/views/management/monitoringEquipment/photographicDevice/components/imageCapture.vue index 991a071..e87622f 100644 --- a/src/views/management/monitoringEquipment/photographicDevice/components/imageCapture.vue +++ b/src/views/management/monitoringEquipment/photographicDevice/components/imageCapture.vue @@ -93,20 +93,6 @@ > - - - - - - + + + + + + + 9) { + } else if (this.i > 9) { this.$message.warning("暂无响应,请稍后再试!"); clearInterval(this.timer); this.timer = null;