mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-07-03 13:38:02 +08:00
update 格式化
This commit is contained in:
@@ -8,7 +8,7 @@ charset = utf-8
|
|||||||
# 缩进风格,可选space、tab
|
# 缩进风格,可选space、tab
|
||||||
indent_style = space
|
indent_style = space
|
||||||
# 缩进的空格数
|
# 缩进的空格数
|
||||||
indent_size = 2
|
indent_size = 4
|
||||||
# 结尾换行符,可选lf、cr、crlf
|
# 结尾换行符,可选lf、cr、crlf
|
||||||
end_of_line = lf
|
end_of_line = lf
|
||||||
# 在文件结尾插入新行
|
# 在文件结尾插入新行
|
||||||
|
|||||||
@@ -44,12 +44,14 @@
|
|||||||
icon="el-icon-refresh-right"
|
icon="el-icon-refresh-right"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleQuery"
|
@click="handleQuery"
|
||||||
>刷新</el-button
|
>刷新
|
||||||
|
</el-button
|
||||||
>
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||||||
>重置</el-button
|
>重置
|
||||||
|
</el-button
|
||||||
>
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
@@ -607,7 +609,8 @@ export default {
|
|||||||
this.getList();
|
this.getList();
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {
|
||||||
|
});
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
|
|||||||
@@ -23,13 +23,15 @@
|
|||||||
icon="el-icon-search"
|
icon="el-icon-search"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleQuery"
|
@click="handleQuery"
|
||||||
>搜索</el-button
|
>搜索
|
||||||
|
</el-button
|
||||||
>
|
>
|
||||||
<el-button
|
<el-button
|
||||||
icon="el-icon-refresh"
|
icon="el-icon-refresh"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="resetQuery"
|
@click="resetQuery"
|
||||||
>重置</el-button
|
>重置
|
||||||
|
</el-button
|
||||||
>
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
@@ -51,7 +53,8 @@
|
|||||||
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>
|
||||||
|
|
||||||
@@ -119,7 +122,7 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 修改充电桩站点 -->
|
<!-- 修改充电桩站点 -->
|
||||||
<el-dialog
|
<!-- <el-dialog
|
||||||
:title="title"
|
:title="title"
|
||||||
:visible.sync="open"
|
:visible.sync="open"
|
||||||
width="45%"
|
width="45%"
|
||||||
@@ -207,11 +210,155 @@
|
|||||||
<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 :title="title" :visible.sync="open" width="50%" append-to-body>
|
||||||
|
<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-col :span="12">
|
||||||
|
<el-form-item label="软件协议" prop="softwareProtocol">
|
||||||
|
<el-select
|
||||||
|
v-model="form.softwareProtocol"
|
||||||
|
placeholder="软件协议"
|
||||||
|
clearable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.software_protocol"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="生产日期" prop="productionDate">
|
||||||
|
<el-date-picker
|
||||||
|
clearable
|
||||||
|
v-model="form.productionDate"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择生产日期"
|
||||||
|
>
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="产品型号" prop="modelId">
|
||||||
|
<el-select
|
||||||
|
filterable
|
||||||
|
remote
|
||||||
|
v-model="form.modelId"
|
||||||
|
placeholder="请选择产品型号"
|
||||||
|
v-selectLoadMore="selectLoadMore"
|
||||||
|
>
|
||||||
|
<!-- :remote-method="remoteMethod" -->
|
||||||
|
<el-option
|
||||||
|
v-for="item in modelList"
|
||||||
|
:key="item.modelName"
|
||||||
|
:label="item.modelName"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="桩类型" prop="modelId">
|
||||||
|
<el-select
|
||||||
|
v-model="form.chargerPileType"
|
||||||
|
placeholder="请选择桩类型"
|
||||||
|
>
|
||||||
|
<el-option label="运营桩" value="1"/>
|
||||||
|
<el-option label="个人桩" value="2"/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<!--<el-form-item label="充电桩型号" prop="modelId">
|
||||||
|
<el-input v-model="form.modelId" placeholder="请输入充电桩型号"/>
|
||||||
|
</el-form-item>-->
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="枪口数量" prop="connectorNum">
|
||||||
|
<el-input
|
||||||
|
v-model="form.connectorNum"
|
||||||
|
placeholder="请输入枪口数量"
|
||||||
|
style="width: 220px"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="生产数量" prop="num">
|
||||||
|
<el-input
|
||||||
|
v-model="form.num"
|
||||||
|
placeholder="请输入生产数量"
|
||||||
|
style="width: 220px"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input
|
||||||
|
v-model="form.remark"
|
||||||
|
placeholder="请输入备注"
|
||||||
|
style="width: 95%"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { batchUpdatePileList, listBasic } from "@/api/pile/basic";
|
import {batchAddBasic, batchUpdatePileList, listBasic, updateBasic} from "@/api/pile/basic";
|
||||||
import {getMerchantList} from "@/api/pile/merchant";
|
import {getMerchantList} from "@/api/pile/merchant";
|
||||||
import {getStationListByMerchantId} from "@/api/pile/station";
|
import {getStationListByMerchantId} from "@/api/pile/station";
|
||||||
import {listModel} from "@/api/pile/model";
|
import {listModel} from "@/api/pile/model";
|
||||||
@@ -230,6 +377,25 @@ export default {
|
|||||||
total: 0,
|
total: 0,
|
||||||
// 显示搜索条件
|
// 显示搜索条件
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
softwareProtocol: [
|
||||||
|
{required: true, message: "请输入软件协议", trigger: "blur"},
|
||||||
|
],
|
||||||
|
productionDate: [
|
||||||
|
{required: true, message: "请选择生产日期", trigger: "blur"},
|
||||||
|
],
|
||||||
|
modelId: [
|
||||||
|
{required: true, message: "请输入产品型号", trigger: "blur"},
|
||||||
|
],
|
||||||
|
connectorNum: [
|
||||||
|
{required: true, message: "请输入枪口数量", trigger: "blur"},
|
||||||
|
],
|
||||||
|
num: [{required: true, message: "请输入生产数量", trigger: "blur"}],
|
||||||
|
remark: [{required: true, message: "请输入备注", trigger: "blur"}],
|
||||||
|
},
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
stationId: null,
|
stationId: null,
|
||||||
@@ -320,6 +486,27 @@ export default {
|
|||||||
this.open = true;
|
this.open = true;
|
||||||
this.getModelList();
|
this.getModelList();
|
||||||
},
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
console.log("提交按钮", this.form);
|
||||||
|
this.$refs["form"].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.id != null) {
|
||||||
|
updateBasic(this.form).then((response) => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
batchAddBasic(this.form).then((response) => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.queryParams = {
|
this.queryParams = {
|
||||||
|
|||||||
Reference in New Issue
Block a user