update 修改批量建桩按钮

This commit is contained in:
2023-10-10 16:48:45 +08:00
parent f6e5d90702
commit fbf2f03058

View File

@@ -360,7 +360,7 @@
<script>
import {batchAddBasic, batchUpdatePileList, listBasic, updateBasic} from "@/api/pile/basic";
import {getMerchantList} from "@/api/pile/merchant";
import {getStationListByMerchantId} from "@/api/pile/station";
import {getStationInfo, getStationListByMerchantId} from "@/api/pile/station";
import {listModel} from "@/api/pile/model";
export default {
@@ -410,6 +410,8 @@ export default {
open: false,
// 弹出层标题
title: "",
// 充电站详情
stationDetail: {},
// 运营商列表
merchantList: [],
// 站点列表
@@ -482,6 +484,7 @@ export default {
handleAdd() {
this.reset();
this.getMerchantList();
this.queryStationInfo();
this.title = "批量添加设备";
this.open = true;
this.getModelList();
@@ -495,13 +498,13 @@ export default {
updateBasic(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
this.getPileList();
});
} else {
batchAddBasic(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
this.getPileList();
});
}
}
@@ -531,6 +534,15 @@ export default {
this.merchantList = response.rows;
});
},
// 查询站点信息
queryStationInfo() {
getStationInfo(this.stationId).then((res) => {
console.log("查询站点信息:", res);
this.stationDetail = res.data;
this.form.merchantId = this.stationDetail.merchantId;
this.form.stationId = this.stationDetail.id;
});
},
changeSelectMerchant(value) {
console.log(value);
// 通过接口查