From fd84575155bada4bdea4822e691789f9979425bc Mon Sep 17 00:00:00 2001 From: Lemon Date: Thu, 25 May 2023 17:23:34 +0800 Subject: [PATCH] update --- .../ThirdPartySettingInfoServiceImpl.java | 1 + jsowell-ui/src/views/pile/station/detail.vue | 45 +++++++++++++++---- 2 files changed, 38 insertions(+), 8 deletions(-) diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/ThirdPartySettingInfoServiceImpl.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/ThirdPartySettingInfoServiceImpl.java index 409502256..cba54ed94 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/ThirdPartySettingInfoServiceImpl.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/ThirdPartySettingInfoServiceImpl.java @@ -113,6 +113,7 @@ public class ThirdPartySettingInfoServiceImpl implements IThirdPartySettingInfoS return insertThirdPartySettingInfo(info); }else { // 修改 + info.setId(infoByStationId.getId()); return updateThirdPartySettingInfo(info); } } diff --git a/jsowell-ui/src/views/pile/station/detail.vue b/jsowell-ui/src/views/pile/station/detail.vue index a470f1d9f..4c2d48678 100644 --- a/jsowell-ui/src/views/pile/station/detail.vue +++ b/jsowell-ui/src/views/pile/station/detail.vue @@ -56,41 +56,42 @@

互联互通配置

- - + 编辑参数 + - + - + - + - + - + - 提交 + 提交 + @@ -154,6 +155,7 @@ export default { stationLat:null, stationLng:null, stationSettingInfo: {}, + disableFlag: true, }; }, created() { @@ -210,6 +212,33 @@ export default { }) }, + // 开放编辑按钮 + openEdit(){ + this.disableFlag = false; + }, + + // 提交配置设置 + submitConfigForm() { + const param = { + stationId: this.stationId, + operatorId: this.stationSettingInfo.operatorId, + operatorSecret: this.stationSettingInfo.operatorSecret, + dataSecret: this.stationSettingInfo.dataSecret, + signSecret: this.stationSettingInfo.signSecret, + dataSecretIv: this.stationSettingInfo.dataSecretIv, + } + console.log("param:", param); + this.$refs.stationSettingForm.validate((valid) => { + if(valid){ + updateSettingByStationId(param).then((response) => { + this.$modal.msgSuccess('修改成功') + this.disableFlag = true; + }) + } else{ + return false + } + }) + }, // 配置参数按钮 handleCreate() { this.dialogTitle = '配置参数';