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