update 平台配置页面

This commit is contained in:
2024-05-04 10:12:24 +08:00
parent 186c6f5f40
commit dcf32e5f99
3 changed files with 33 additions and 18 deletions

View File

@@ -356,14 +356,14 @@ public class PileStationInfoController extends BaseController {
* 更新站点与第三方平台关系 * 更新站点与第三方平台关系
*/ */
@PostMapping("/updateThirdPartyStationRelation") @PostMapping("/updateThirdPartyStationRelation")
public AjaxResult updateThirdPartyStationRelation(ThirdPartyStationRelationDTO dto) { public AjaxResult updateThirdPartyStationRelation(@RequestBody ThirdPartyStationRelationDTO dto) {
AjaxResult result; AjaxResult result;
try { try {
startPage(); startPage();
thirdPartyStationRelationService.updateThirdPartyStationRelation(dto); thirdPartyStationRelationService.updateThirdPartyStationRelation(dto);
result = AjaxResult.success(); result = AjaxResult.success();
} catch (Exception e) { } catch (Exception e) {
logger.error("获取停车平台列表 error,", e); logger.error("更新站点与第三方平台关系error,", e);
result = AjaxResult.error(e.getMessage()); result = AjaxResult.error(e.getMessage());
} }
return result; return result;

View File

@@ -164,3 +164,11 @@ export function getParkingInfoList() {
}) })
} }
// 更新站点与第三方平台关系
export function updateThirdPartyStationRelation(data) {
return request({
url: '/pile/station/updateThirdPartyStationRelation',
method: 'post',
data: data,
})
}

View File

@@ -48,7 +48,7 @@
</el-form> </el-form>
</el-card> </el-card>
<el-card> <el-card style="margin-bottom: 10px">
<h2>互联互通配置</h2> <h2>互联互通配置</h2>
<!-- <el-button icon="el-icon-edit" size="big" @click="openEdit" v-has-permi="['pile:station:edit']">编辑参数--> <!-- <el-button icon="el-icon-edit" size="big" @click="openEdit" v-has-permi="['pile:station:edit']">编辑参数-->
<!-- </el-button>--> <!-- </el-button>-->
@@ -66,11 +66,11 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item> <el-form-item>
<el-button size="big" @click="pushStation" v-has-permi="['pile:station:edit']"> <!--<el-button size="big" @click="pushStation" v-has-permi="['pile:station:edit']">-->
推送站点信息 <!-- 推送站点信息-->
</el-button> <!--</el-button>-->
<el-button size="big" @click="pushStation" v-has-permi="['pile:station:edit']"> <el-button size="big" @click="saveStationThirdParty" v-has-permi="['pile:station:edit']">
推送站点信息 保存对接平台关系
</el-button> </el-button>
</el-form-item> </el-form-item>
</el-col> </el-col>
@@ -78,7 +78,7 @@
</el-form> </el-form>
</el-card> </el-card>
<el-card> <el-card style="margin-bottom: 10px">
<h2>绑定停车平台(配置完成后订单完成将自动下发优惠券)</h2> <h2>绑定停车平台(配置完成后订单完成将自动下发优惠券)</h2>
<el-button icon="el-icon-edit" size="big" @click="parkingOpenEdit" v-has-permi="['pile:station:edit']">编辑参数 <el-button icon="el-icon-edit" size="big" @click="parkingOpenEdit" v-has-permi="['pile:station:edit']">编辑参数
</el-button> </el-button>
@@ -184,7 +184,7 @@ import {
pushStationInfo, pushStationInfo,
getSettingInfo, getSettingInfo,
getParkingInfoList, getParkingInfoList,
bindParkingPlatform, getRelationByStationId, bindParkingPlatform, getRelationByStationId, updateThirdPartyStationRelation,
} from "@/api/pile/station"; } from "@/api/pile/station";
import Whitelist from "@/views/pile/station/stationWhiteList"; import Whitelist from "@/views/pile/station/stationWhiteList";
import OrderReport from "./orderReport.vue"; import OrderReport from "./orderReport.vue";
@@ -390,7 +390,14 @@ export default {
// 保存站点与第三方平台关系 // 保存站点与第三方平台关系
saveStationThirdParty() { saveStationThirdParty() {
const param = {
stationId: this.stationId,
thirdPartyTypes: this.exchange,
};
console.log('param', param);
updateThirdPartyStationRelation(param).then((response) => {
this.$message.success(response.msg);
});
}, },
// 绑定站点与停车平台配置 // 绑定站点与停车平台配置