From 892b741346d0f4c378c1a6ae901aaa21f97011e5 Mon Sep 17 00:00:00 2001 From: "3321822538@qq.com" <3321822538@qq.com> Date: Mon, 15 Apr 2024 18:36:14 +0800 Subject: [PATCH] =?UTF-8?q?'=E6=8F=90=E4=BA=A4'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AutoSprout-ui/src/views/device/device/index.vue | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/AutoSprout-ui/src/views/device/device/index.vue b/AutoSprout-ui/src/views/device/device/index.vue index 12a537d..d1190e8 100644 --- a/AutoSprout-ui/src/views/device/device/index.vue +++ b/AutoSprout-ui/src/views/device/device/index.vue @@ -1473,10 +1473,17 @@ export default { this.form.regularWateringJsonObj.sprayTime = this.form.sprayTimeMin * 60 + this.form.sprayTimeSec; // this.form.pulseModeParam = JSON.stringify(this.form.pulseModeParamObj); - console.log(JSON.stringify(this.form.pulseModeParamObj.jg_sec)); - this.form.pulseModeParamObj.jg_sec = this.convertSecondsToString(JSON.stringify(this.form.pulseModeParamObj.jg_sec)) + // console.log(JSON.stringify(this.form.pulseModeParamObj.jg_sec)); + if(JSON.stringify(this.form.pulseModeParamObj.sprayTime) && JSON.stringify(this.form.pulseModeParamObj.intervalTime)){ + this.form.pulseModeParamObj.jg_sec = this.convertSecondsToString(JSON.stringify(this.form.pulseModeParamObj.sprayTime)) + this.form.pulseModeParamObj.js_sec = this.convertSecondsToString(JSON.stringify(this.form.pulseModeParamObj.intervalTime)) + this.form.pulseModeParam = JSON.stringify(this.form.pulseModeParamObj) + }else{ + this.form.pulseModeParamObj.jg_sec = this.convertSecondsToString(JSON.stringify(this.form.pulseModeParamObj.jg_sec)) this.form.pulseModeParamObj.js_sec = this.convertSecondsToString(JSON.stringify(this.form.pulseModeParamObj.js_sec)) this.form.pulseModeParam = JSON.stringify(this.form.pulseModeParamObj) + } + this.form.regularWateringJson = JSON.stringify( this.form.regularWateringJsonObj