From f811f71663e9ca98272ff69fe5918be22d279b7e Mon Sep 17 00:00:00 2001 From: fanluyan <754122931@qq.com> Date: Mon, 4 Sep 2023 17:46:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=97=B6=E9=97=B4=E8=A1=A8?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/setdevice.vue | 109 ++- src/views/itOperation/index copy 2.vue | 682 ++++++++++++++++++ src/views/itOperation/index.vue | 669 +---------------- .../components/parameterSetDialog.vue | 67 +- .../components/setschedule.vue | 18 +- 5 files changed, 813 insertions(+), 732 deletions(-) create mode 100644 src/views/itOperation/index copy 2.vue diff --git a/src/views/devicePhotoSchedule/components/setdevice.vue b/src/views/devicePhotoSchedule/components/setdevice.vue index fe71cb7..c3a702f 100644 --- a/src/views/devicePhotoSchedule/components/setdevice.vue +++ b/src/views/devicePhotoSchedule/components/setdevice.vue @@ -97,24 +97,56 @@ :max="mathMam" > - -
+ 下发中 + 下发失败 + 下发成功 +
+ - 下发中 - - + 下发成功 + 下发中 + 下发失败 + --> {{ data.name == null ? data.cmdid : data.name }} +

暂无图像监测装置

@@ -188,6 +220,12 @@ export default { showtag: false, checkOffset: "", mathMam: 0, + + //未下发成功 + nosuccessData: [], + xfsuccess: false, + xfload: false, + xferror: false, }; }, mounted() {}, @@ -223,13 +261,13 @@ export default { console.log(res); this.newzzList = res.data.list; console.log(this.newzzList); - //console.log(a); this.newzzList = this.getChildren(this.newzzList); console.log(this.newzzList); this.loading = false; }) .catch((err) => {}); }, + //不在线的装置不能选中 disabledFn(data, node) { if (node.level == 3) { if (!data.onlinestatus) { @@ -269,39 +307,18 @@ export default { // console.log(this.allCheckNode); console.log(nodeObj); console.log(this.allCheckNode); - this.isactive = nodeObj.id; + this.isactive = nodeObj.id || nodeObj.termid; this.isCheck = this.$refs.tree.getCheckedNodes().indexOf(nodeObj) > -1; console.log(this.isCheck); + this.showtag = false; }, - // //获取开始时间和结束时间的偏移量 - // getruleSchedule() { - // for (var j = 0; j < this.allCheckNode.length; j++) { - // console.log(this.allCheckNode[j].offsetNum); - // for (var i = 0; i < this.ruleSchedule.length; i++) { - // console.log(typeof this.ruleSchedule[i].startTime); - // console.log(this.ruleSchedule[i].startTime); - // var Stime = moment(this.ruleSchedule[i].startTime).format("HH:mm"); - // var Etime = moment(this.ruleSchedule[i].endTime).format("HH:mm"); - // console.log(Stime, Etime); - - // // this.ruleSchedule[i].startTime = new Date( - // // this.ruleSchedule[i].startTime - // // ); - // // this.ruleSchedule[i].endTime = new Date(this.ruleSchedule[i].endTime); - // // console.log(this.ruleSchedule[i].startTime); - // // console.log(this.ruleSchedule[i].endTime); - // // moment().add(offsetSeconds, "seconds").toObject(); - - // // console.log(time); - // } - // } - // }, // 保存确定操作 submitForm() { //console.log(this.termidArr); this.sureSum(); this.showtag = true; + this.xfload = true; this.sureloading = true; }, //时间表 @@ -520,22 +537,34 @@ export default { console.log(value, index, arr); return value.status !== 1; }); + if (this.requestList.length == 0) { this.zzsuccess = true; this.$message.success("下发成功"); clearInterval(this.timer); this.timer = null; - //this.isShow = false; this.sureloading = false; - this.showtag = false; + this.xfload = false; } else if (this.i > 9) { - this.zzerror = true; + console.log(this.requestArr); + this.nosuccessData = this.requestArr; + + // this.allCheckNode.forEach((item, i) => { + + // this.$refs.tree.setChecked(item.id, false, true); + // }); + + // this.nosuccessData.forEach((item, i) => { + // this.$refs.tree.setChecked(item.termid, true, true); + // }); + this.i = 0; - this.$message.warning("下发失败,请稍后再试!"); + // this.$message.warning("下发失败,请稍后再试!"); clearInterval(this.timer); this.timer = null; - // this.isShow = false; - this.showtag = false; + + this.xfload = false; + this.sureloading = false; } }) diff --git a/src/views/itOperation/index copy 2.vue b/src/views/itOperation/index copy 2.vue new file mode 100644 index 0000000..0a6b165 --- /dev/null +++ b/src/views/itOperation/index copy 2.vue @@ -0,0 +1,682 @@ + + + diff --git a/src/views/itOperation/index.vue b/src/views/itOperation/index.vue index 0a6b165..5a90d4c 100644 --- a/src/views/itOperation/index.vue +++ b/src/views/itOperation/index.vue @@ -1,569 +1,24 @@ diff --git a/src/views/management/monitoringEquipment/photographicDevice/components/parameterSetDialog.vue b/src/views/management/monitoringEquipment/photographicDevice/components/parameterSetDialog.vue index a22d13c..81ab05c 100644 --- a/src/views/management/monitoringEquipment/photographicDevice/components/parameterSetDialog.vue +++ b/src/views/management/monitoringEquipment/photographicDevice/components/parameterSetDialog.vue @@ -164,11 +164,13 @@ :model="upperComputer" label-position="right" label-width="124px" + ref="upperFormref" + :rules="upperrulse" > - + - + @@ -428,8 +430,13 @@ export default { port: "", domain: "", }, + upperrulse: { + ip: [{ required: true, message: "请输入ip", trigger: "blur" }], + port: [{ required: true, message: "请输入端口号", trigger: "blur" }], + }, upperLoading: false, upperSetLoading: false, + //id参数 idParameter: { newCmdId: "", @@ -653,31 +660,39 @@ export default { //上位机设置 upperSet() { if (this.rowData.isonline || this.rowData.onlinestatus === 1) { - this.upperSetLoading = true; - let params = [ - { - name: "act", - value: "cma", - }, - { - name: "flag", - value: 1, - }, + this.$refs.upperFormref.validate((valid) => { + console.log(valid); + if (valid) { + this.upperSetLoading = true; + let params = [ + { + name: "act", + value: "cma", + }, + { + name: "flag", + value: 1, + }, - { - name: "ip", - value: this.upperComputer.ip, - }, - { - name: "cmaport", - value: this.upperComputer.port, - }, - { - name: "domain", - value: this.upperComputer.domain, - }, - ]; - this.setTermFn(params); + { + name: "ip", + value: this.upperComputer.ip, + }, + { + name: "cmaport", + value: this.upperComputer.port, + }, + { + name: "domain", + value: this.upperComputer.domain, + }, + ]; + this.setTermFn(params); + } else { + console.log("error submit!!"); + return false; + } + }); } else { this.$message({ duration: 1500, diff --git a/src/views/realTimeMonitor/components/setschedule.vue b/src/views/realTimeMonitor/components/setschedule.vue index 235b146..1ac1246 100644 --- a/src/views/realTimeMonitor/components/setschedule.vue +++ b/src/views/realTimeMonitor/components/setschedule.vue @@ -474,9 +474,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; } @@ -596,9 +596,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; } @@ -736,9 +736,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.newshedulenr = dayArr;