From 501cdc6c6283df36ce3be51751de24a71cd26247 Mon Sep 17 00:00:00 2001 From: fanluyan <754122931@qq.com> Date: Mon, 14 Aug 2023 17:34:23 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=87=E6=A0=B7=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/parameterSetDialog.vue | 114 +++++++++++------- 1 file changed, 68 insertions(+), 46 deletions(-) diff --git a/src/views/management/monitoringEquipment/photographicDevice/components/parameterSetDialog.vue b/src/views/management/monitoringEquipment/photographicDevice/components/parameterSetDialog.vue index 83b3237..ea8de9d 100644 --- a/src/views/management/monitoringEquipment/photographicDevice/components/parameterSetDialog.vue +++ b/src/views/management/monitoringEquipment/photographicDevice/components/parameterSetDialog.vue @@ -33,11 +33,11 @@ -->
- +
@@ -76,23 +76,26 @@
- + - + - + - - + + @@ -369,6 +372,11 @@ export default { sampleFrequency: "", heartbeatTime: "", }, + samplingrules: { + heartbeatTime: [ + { required: true, message: "请输入心跳周期", trigger: "blur" }, + ], + }, runStatusForm: {}, gpsForm: {}, //gps位置 @@ -402,6 +410,10 @@ export default { searchTime() {}, //装置时间设置 setTime() {}, + //重置数据 + handleClick() { + this.samplingForm = {}; + }, //采样参数查询 // -act=sampling [0xA4 ] --flag=[Request Set Flag, default is set=1, 0: request] --rf=[Request Flag] --reqtype=[Request Type] --maintime=[Main Time] --samplecount=[Sample Count] --samplingfreq=[Sample Frequency] --heartbeat=[Heartbeat Time] samplingSearch() { @@ -442,41 +454,51 @@ export default { this.setTermFn(params); }, samplingSet() { - let params = [ - { - name: "act", - value: "sampling", - }, - { - name: "flag", - value: 1, - }, - { - name: "rf", - value: 15, - }, - { - name: "reqtype", - value: "0xA4", - }, - { - name: "maintime", - value: this.samplingForm.maintime, - }, - { - name: "samplecount", - value: this.samplingForm.samplecount, - }, - { - name: "samplingfreq", - value: this.samplingForm.samplingfreq, - }, - { - name: "heartbeat", - value: this.samplingForm.heartbeat, - }, - ]; - this.setTermFn(params); + this.$refs.samplingFormref.validate((valid) => { + if (valid) { + console.log("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"); + console.log(this.samplingForm); + console.log("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"); + let params = [ + { + name: "act", + value: "sampling", + }, + { + name: "flag", + value: 1, + }, + { + name: "rf", + value: 15, + }, + { + name: "reqtype", + value: "0xA4", + }, + { + name: "maintime", + value: this.samplingForm.mainTime, + }, + { + name: "samplecount", + value: this.samplingForm.sampleCount, + }, + { + name: "samplingfreq", + value: this.samplingForm.sampleFrequency, + }, + { + name: "heartbeat", + value: this.samplingForm.heartbeatTime, + }, + ]; + this.setTermFn(params); + } else { + console.log("error submit!!"); + return false; + } + }); }, //装置状态报 runstatusSearch() {