mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-08 12:00:11 +08:00
update 更换站点
This commit is contained in:
@@ -44,8 +44,8 @@
|
|||||||
plain
|
plain
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="click"
|
@click="handleUpdate"
|
||||||
>批量修改站点
|
>修改充电桩
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
v-hasPermi="['pile:basic:batchAdd']"
|
v-hasPermi="['pile:basic:batchAdd']"
|
||||||
>批量新增
|
>新增充电桩
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -123,134 +123,99 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 修改充电桩站点 -->
|
<!-- 修改充电桩站点 -->
|
||||||
<!-- <el-dialog
|
<el-dialog
|
||||||
:title="title"
|
:title="title"
|
||||||
:visible.sync="open"
|
:visible.sync="openUpdateDialog"
|
||||||
width="45%"
|
width="45%"
|
||||||
append-to-body
|
append-to-body
|
||||||
:before-close="handleClose"
|
:before-close="handleClose"
|
||||||
>
|
>
|
||||||
<el-form ref="form" :model="updateData" label-width="120px">
|
<el-form ref="form" :model="updateData" label-width="120px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="已选择的桩">
|
<el-form-item label="已选择的桩">
|
||||||
<el-tag
|
<el-tag
|
||||||
v-for="tag in updateData.pileSnList"
|
v-for="tag in updateData.pileSnList"
|
||||||
:key="tag"
|
:key="tag"
|
||||||
>
|
>
|
||||||
{{ tag }}
|
{{ tag }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="运营商">
|
<el-form-item label="运营商">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="updateData.merchantId"
|
v-model="updateData.merchantId"
|
||||||
placeholder="请选择运营商"
|
placeholder="请选择运营商"
|
||||||
@change="
|
@change="
|
||||||
changeSelectMerchant(updateData.merchantId)
|
changeSelectMerchant(updateData.merchantId)
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in merchantList"
|
v-for="item in merchantList"
|
||||||
:key="item.merchantName"
|
:key="item.merchantName"
|
||||||
:label="item.merchantName"
|
:label="item.merchantName"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="站点" prop="stationId">
|
<el-form-item label="站点" prop="stationId">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="updateData.stationId"
|
v-model="updateData.stationId"
|
||||||
placeholder="请选择站点"
|
placeholder="请选择站点"
|
||||||
filterable
|
filterable
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in stationList"
|
v-for="item in stationList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.stationName"
|
:label="item.stationName"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="产品型号" prop="modelId">
|
<el-form-item label="产品型号" prop="modelId">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="updateData.modelId"
|
v-model="updateData.modelId"
|
||||||
filterable
|
filterable
|
||||||
placeholder="请选择产品型号"
|
placeholder="请选择产品型号"
|
||||||
v-selectLoadMore="selectLoadMore"
|
v-selectLoadMore="selectLoadMore"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in modelList"
|
v-for="item in modelList"
|
||||||
:key="item.modelName"
|
:key="item.modelName"
|
||||||
:label="item.modelName"
|
:label="item.modelName"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="枪口数量" prop="connectorNum">
|
<el-form-item label="枪口数量" prop="connectorNum">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="updateData.connectorNum"
|
v-model="updateData.connectorNum"
|
||||||
placeholder="请输入枪口数量"
|
placeholder="请输入枪口数量"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="batchUpdate">确 定</el-button>
|
<el-button type="primary" @click="batchUpdate">确 定</el-button>
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>-->
|
</el-dialog>
|
||||||
|
|
||||||
<!-- 添加或修改设备管理对话框 -->
|
<!-- 添加或修改设备管理对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="50%" append-to-body>
|
<el-dialog :title="title" :visible.sync="openAddDialog" width="50%" append-to-body>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||||
<!-- <el-row>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="运营商" prop="merchantId">
|
|
||||||
<el-select
|
|
||||||
v-model="form.merchantId"
|
|
||||||
placeholder="请选择运营商"
|
|
||||||
@change="changeSelectMerchant(form.merchantId)"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in merchantList"
|
|
||||||
:key="item.merchantName"
|
|
||||||
:label="item.merchantName"
|
|
||||||
:value="item.id"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="站点" prop="stationId">
|
|
||||||
<el-select
|
|
||||||
v-model="form.stationId"
|
|
||||||
filterable
|
|
||||||
placeholder="请选择站点"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in stationList"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.stationName"
|
|
||||||
:value="item.id"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>-->
|
|
||||||
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="软件协议" prop="softwareProtocol">
|
<el-form-item label="软件协议" prop="softwareProtocol">
|
||||||
@@ -408,7 +373,8 @@ export default {
|
|||||||
// 选中数组
|
// 选中数组
|
||||||
ids: [],
|
ids: [],
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
openAddDialog: false,
|
||||||
|
openUpdateDialog: false,
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
title: "",
|
title: "",
|
||||||
// 充电站详情
|
// 充电站详情
|
||||||
@@ -487,7 +453,7 @@ export default {
|
|||||||
this.getMerchantList();
|
this.getMerchantList();
|
||||||
this.queryStationInfo();
|
this.queryStationInfo();
|
||||||
this.title = "批量添加设备";
|
this.title = "批量添加设备";
|
||||||
this.open = true;
|
this.openAddDialog = true;
|
||||||
this.getModelList();
|
this.getModelList();
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
@@ -498,13 +464,13 @@ export default {
|
|||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateBasic(this.form).then((response) => {
|
updateBasic(this.form).then((response) => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.openAddDialog = false;
|
||||||
this.getPileList();
|
this.getPileList();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
batchAddBasic(this.form).then((response) => {
|
batchAddBasic(this.form).then((response) => {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.openAddDialog = false;
|
||||||
this.getPileList();
|
this.getPileList();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -559,7 +525,7 @@ export default {
|
|||||||
// console.log(this.updateData.pileIdList);
|
// console.log(this.updateData.pileIdList);
|
||||||
},
|
},
|
||||||
/** 按钮操作 */
|
/** 按钮操作 */
|
||||||
click() {
|
handleUpdate() {
|
||||||
if (this.updateData.pileIdList.length === 0) {
|
if (this.updateData.pileIdList.length === 0) {
|
||||||
return this.$message({
|
return this.$message({
|
||||||
message: "请选择充电桩",
|
message: "请选择充电桩",
|
||||||
@@ -569,18 +535,20 @@ export default {
|
|||||||
this.getMerchantList();
|
this.getMerchantList();
|
||||||
this.getModelList();
|
this.getModelList();
|
||||||
this.reset();
|
this.reset();
|
||||||
this.open = true;
|
this.openUpdateDialog = true;
|
||||||
this.title = "更换站点";
|
this.title = "更换站点";
|
||||||
},
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
this.open = false;
|
this.openAddDialog = false;
|
||||||
|
this.openUpdateDialog = false;
|
||||||
this.reset();
|
this.reset();
|
||||||
this.stationList = [];
|
this.stationList = [];
|
||||||
},
|
},
|
||||||
// 点击弹框右上角×
|
// 点击弹框右上角×
|
||||||
handleClose() {
|
handleClose() {
|
||||||
this.open = false;
|
this.openAddDialog = false;
|
||||||
|
this.openUpdateDialog = false;
|
||||||
this.reset();
|
this.reset();
|
||||||
this.stationList = [];
|
this.stationList = [];
|
||||||
},
|
},
|
||||||
@@ -612,7 +580,7 @@ export default {
|
|||||||
message: "操作成功",
|
message: "操作成功",
|
||||||
type: "success",
|
type: "success",
|
||||||
});
|
});
|
||||||
this.open = false;
|
this.openUpdateDialog = false;
|
||||||
this.getPileList();
|
this.getPileList();
|
||||||
this.stationList = [];
|
this.stationList = [];
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user