|
@@ -1,11 +1,10 @@
|
|
<template>
|
|
<template>
|
|
<div class="app-container">
|
|
<div class="app-container">
|
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
|
-
|
|
|
|
- <el-form-item label="用电分类" prop="elecClass">
|
|
|
|
|
|
+ <el-form-item label="园区代码" prop="areaCode">
|
|
<el-input
|
|
<el-input
|
|
- v-model="queryParams.elecClass"
|
|
|
|
- placeholder="请输入用电分类"
|
|
|
|
|
|
+ v-model="queryParams.areaCode"
|
|
|
|
+ placeholder="请输入园区代码"
|
|
clearable
|
|
clearable
|
|
@keyup.enter.native="handleQuery"
|
|
@keyup.enter.native="handleQuery"
|
|
/>
|
|
/>
|
|
@@ -62,19 +61,14 @@
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
|
- <el-table v-loading="loading" :data="configList" @selection-change="handleSelectionChange">
|
|
|
|
|
|
+ <el-table v-loading="loading" :data="attrList" @selection-change="handleSelectionChange">
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
- <el-table-column label="配置代码" align="center" prop="cfgCode" />
|
|
|
|
- <el-table-column label="用电分类" align="center" prop="elecClass" :formatter="getElecClass"/>
|
|
|
|
- <el-table-column label="价格类型" align="center" prop="priceType" />
|
|
|
|
- <el-table-column label="年用电量下限\n(单位:KV)" align="center" prop="quantityLowerLimit" />
|
|
|
|
- <el-table-column label="年用电量上限\n(单位:KV)" align="center" prop="quantityUpperLimit" />
|
|
|
|
- <el-table-column label="不满1千伏" align="center" prop="priceLess1kv" />
|
|
|
|
- <el-table-column label="不满10千伏" align="center" prop="price1kv10kv" />
|
|
|
|
- <el-table-column label="20-30千伏" align="center" prop="price20kv35kv" />
|
|
|
|
- <el-table-column label="35-110千伏" align="center" prop="price35kv110kv" />
|
|
|
|
- <el-table-column label="110千伏" align="center" prop="price110kv" />
|
|
|
|
- <el-table-column label="220千伏" align="center" prop="price220kv" />
|
|
|
|
|
|
+ <el-table-column label="服务区" align="center" prop="areaName" />
|
|
|
|
+ <el-table-column label="用电分类" align="center" prop="elecTypeName" />
|
|
|
|
+ <el-table-column label="电压等级" align="center" prop="voltageLevel" />
|
|
|
|
+ <el-table-column label="计量类型" align="center" prop="reqCapacityFlag" :formatter="getReqCapacityFlag" />
|
|
|
|
+ <el-table-column label="变压器容量(千伏·安)" align="center" prop="transCapacity" />
|
|
|
|
+ <el-table-column label="最大需量(千瓦)" align="center" prop="reqQuantity" />
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-button
|
|
<el-button
|
|
@@ -103,38 +97,23 @@
|
|
@pagination="getList"
|
|
@pagination="getList"
|
|
/>
|
|
/>
|
|
|
|
|
|
- <!-- 添加或修改电价配置对话框 -->
|
|
|
|
|
|
+ <!-- 添加或修改服务区用电属性对话框 -->
|
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
- <el-form-item label="配置代码" prop="cfgCode">
|
|
|
|
- <el-input v-model="form.cfgCode" placeholder="请输入配置代码" />
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="用电分类" prop="elecClass">
|
|
|
|
- <el-input v-model="form.elecClass" placeholder="请输入用电分类" />
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="年用电量下限" prop="quantityLowerLimit">
|
|
|
|
- <el-input v-model="form.quantityLowerLimit" placeholder="请输入年用电量下限" />
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="年用电量上限" prop="quantityUpperLimit">
|
|
|
|
- <el-input v-model="form.quantityUpperLimit" placeholder="请输入年用电量上限" />
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="不满1千伏" prop="priceLess1kv">
|
|
|
|
- <el-input v-model="form.priceLess1kv" placeholder="请输入不满1千伏" />
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="不满10千伏" prop="price1kv10kv">
|
|
|
|
- <el-input v-model="form.price1kv10kv" placeholder="请输入不满10千伏" />
|
|
|
|
|
|
+ <el-form-item label="园区代码" prop="areaCode">
|
|
|
|
+ <el-input v-model="form.areaCode" placeholder="请输入园区代码" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="20-30千伏" prop="price20kv35kv">
|
|
|
|
- <el-input v-model="form.price20kv35kv" placeholder="请输入20-30千伏" />
|
|
|
|
|
|
+ <el-form-item label="价格编码" prop="priceCode">
|
|
|
|
+ <el-input v-model="form.priceCode" placeholder="请输入价格编码" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="35-110千伏" prop="price35kv110kv">
|
|
|
|
- <el-input v-model="form.price35kv110kv" placeholder="请输入35-110千伏" />
|
|
|
|
|
|
+ <el-form-item label="计量类型" prop="reqCapacityFlag">
|
|
|
|
+ <el-input v-model="form.reqCapacityFlag" placeholder="请选择计量类型" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="110千伏" prop="price110kv">
|
|
|
|
- <el-input v-model="form.price110kv" placeholder="请输入110千伏" />
|
|
|
|
|
|
+ <el-form-item label="变压器容量" prop="transCapacity">
|
|
|
|
+ <el-input v-model="form.transCapacity" placeholder="请输入变压器容量" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="220千伏" prop="price220kv">
|
|
|
|
- <el-input v-model="form.price220kv" placeholder="请输入220千伏" />
|
|
|
|
|
|
+ <el-form-item label="最大需量" prop="reqQuantity">
|
|
|
|
+ <el-input v-model="form.reqQuantity" placeholder="请输入最大需量" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
@@ -146,10 +125,10 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { listConfig, getConfig, delConfig, addConfig, updateConfig } from "@/api/basecfg/electrovalency";
|
|
|
|
|
|
+import { listAttr, getAttr, delAttr, addAttr, updateAttr } from "@/api/basecfg/electrovalency";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
- name: "Config",
|
|
|
|
|
|
+ name: "Attr",
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
// 遮罩层
|
|
// 遮罩层
|
|
@@ -164,8 +143,8 @@ export default {
|
|
showSearch: true,
|
|
showSearch: true,
|
|
// 总条数
|
|
// 总条数
|
|
total: 0,
|
|
total: 0,
|
|
- // 电价配置表格数据
|
|
|
|
- configList: [],
|
|
|
|
|
|
+ // 服务区用电属性表格数据
|
|
|
|
+ attrList: [],
|
|
// 弹出层标题
|
|
// 弹出层标题
|
|
title: "",
|
|
title: "",
|
|
// 是否显示弹出层
|
|
// 是否显示弹出层
|
|
@@ -174,37 +153,31 @@ export default {
|
|
queryParams: {
|
|
queryParams: {
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
- cfgCode: null,
|
|
|
|
- elecClass: null,
|
|
|
|
- priceType: null,
|
|
|
|
- quantityLowerLimit: null,
|
|
|
|
- quantityUpperLimit: null,
|
|
|
|
- priceLess1kv: null,
|
|
|
|
- price1kv10kv: null,
|
|
|
|
- price20kv35kv: null,
|
|
|
|
- price35kv110kv: null,
|
|
|
|
- price110kv: null,
|
|
|
|
- price220kv: null
|
|
|
|
|
|
+ areaCode: null,
|
|
|
|
+ elecType: null,
|
|
|
|
+ priceCode: null,
|
|
|
|
+ reqCapacityFlag: null,
|
|
|
|
+ transCapacity: null,
|
|
|
|
+ reqQuantity: null,
|
|
},
|
|
},
|
|
// 表单参数
|
|
// 表单参数
|
|
form: {},
|
|
form: {},
|
|
// 表单校验
|
|
// 表单校验
|
|
rules: {
|
|
rules: {
|
|
- cfgCode: [
|
|
|
|
- { required: true, message: "配置代码不能为空", trigger: "blur" }
|
|
|
|
|
|
+ areaCode: [
|
|
|
|
+ { required: true, message: "园区代码不能为空", trigger: "blur" }
|
|
],
|
|
],
|
|
- elecClass: [
|
|
|
|
- { required: true, message: "用电分类不能为空", trigger: "blur" }
|
|
|
|
|
|
+ elecType: [
|
|
|
|
+ { required: true, message: "用电分类 1:单一制 2:两部制不能为空", trigger: "change" }
|
|
],
|
|
],
|
|
- priceType: [
|
|
|
|
- { required: true, message: "价格类型不能为空", trigger: "change" }
|
|
|
|
|
|
+ priceCode: [
|
|
|
|
+ { required: true, message: "价格编码不能为空", trigger: "blur" }
|
|
],
|
|
],
|
|
},
|
|
},
|
|
- elecClassData: [
|
|
|
|
- {elecClass:1},
|
|
|
|
- {elecClass:2},
|
|
|
|
- {elecClass:3},
|
|
|
|
- {elecClass:4}
|
|
|
|
|
|
+ reqCapacityFlagData: [
|
|
|
|
+ { reqCapacityFlag : 0 },
|
|
|
|
+ { reqCapacityFlag : 1 },
|
|
|
|
+ { reqCapacityFlag : 2 }
|
|
]
|
|
]
|
|
};
|
|
};
|
|
},
|
|
},
|
|
@@ -212,11 +185,11 @@ export default {
|
|
this.getList();
|
|
this.getList();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- /** 查询电价配置列表 */
|
|
|
|
|
|
+ /** 查询服务区用电属性列表 */
|
|
getList() {
|
|
getList() {
|
|
this.loading = true;
|
|
this.loading = true;
|
|
- listConfig(this.queryParams).then(response => {
|
|
|
|
- this.configList = response.rows;
|
|
|
|
|
|
+ listAttr(this.queryParams).then(response => {
|
|
|
|
+ this.attrList = response.rows;
|
|
this.total = response.total;
|
|
this.total = response.total;
|
|
this.loading = false;
|
|
this.loading = false;
|
|
});
|
|
});
|
|
@@ -230,17 +203,14 @@ export default {
|
|
reset() {
|
|
reset() {
|
|
this.form = {
|
|
this.form = {
|
|
id: null,
|
|
id: null,
|
|
- cfgCode: null,
|
|
|
|
- elecClass: null,
|
|
|
|
- priceType: null,
|
|
|
|
- quantityLowerLimit: null,
|
|
|
|
- quantityUpperLimit: null,
|
|
|
|
- priceLess1kv: null,
|
|
|
|
- price1kv10kv: null,
|
|
|
|
- price20kv35kv: null,
|
|
|
|
- price35kv110kv: null,
|
|
|
|
- price110kv: null,
|
|
|
|
- price220kv: null
|
|
|
|
|
|
+ areaCode: null,
|
|
|
|
+ elecType: null,
|
|
|
|
+ priceCode: null,
|
|
|
|
+ reqCapacityFlag: null,
|
|
|
|
+ transCapacity: null,
|
|
|
|
+ reqQuantity: null,
|
|
|
|
+ createTime: null,
|
|
|
|
+ updateTime: null
|
|
};
|
|
};
|
|
this.resetForm("form");
|
|
this.resetForm("form");
|
|
},
|
|
},
|
|
@@ -264,16 +234,16 @@ export default {
|
|
handleAdd() {
|
|
handleAdd() {
|
|
this.reset();
|
|
this.reset();
|
|
this.open = true;
|
|
this.open = true;
|
|
- this.title = "添加电价配置";
|
|
|
|
|
|
+ this.title = "添加服务区用电属性";
|
|
},
|
|
},
|
|
/** 修改按钮操作 */
|
|
/** 修改按钮操作 */
|
|
handleUpdate(row) {
|
|
handleUpdate(row) {
|
|
this.reset();
|
|
this.reset();
|
|
const id = row.id || this.ids
|
|
const id = row.id || this.ids
|
|
- getConfig(id).then(response => {
|
|
|
|
|
|
+ getAttr(id).then(response => {
|
|
this.form = response.data;
|
|
this.form = response.data;
|
|
this.open = true;
|
|
this.open = true;
|
|
- this.title = "修改电价配置";
|
|
|
|
|
|
+ this.title = "修改服务区用电属性";
|
|
});
|
|
});
|
|
},
|
|
},
|
|
/** 提交按钮 */
|
|
/** 提交按钮 */
|
|
@@ -281,13 +251,13 @@ export default {
|
|
this.$refs["form"].validate(valid => {
|
|
this.$refs["form"].validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
if (this.form.id != null) {
|
|
if (this.form.id != null) {
|
|
- updateConfig(this.form).then(response => {
|
|
|
|
|
|
+ updateAttr(this.form).then(response => {
|
|
this.$modal.msgSuccess("修改成功");
|
|
this.$modal.msgSuccess("修改成功");
|
|
this.open = false;
|
|
this.open = false;
|
|
this.getList();
|
|
this.getList();
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
- addConfig(this.form).then(response => {
|
|
|
|
|
|
+ addAttr(this.form).then(response => {
|
|
this.$modal.msgSuccess("新增成功");
|
|
this.$modal.msgSuccess("新增成功");
|
|
this.open = false;
|
|
this.open = false;
|
|
this.getList();
|
|
this.getList();
|
|
@@ -299,8 +269,8 @@ export default {
|
|
/** 删除按钮操作 */
|
|
/** 删除按钮操作 */
|
|
handleDelete(row) {
|
|
handleDelete(row) {
|
|
const ids = row.id || this.ids;
|
|
const ids = row.id || this.ids;
|
|
- this.$modal.confirm('是否确认删除电价配置编号为"' + ids + '"的数据项?').then(function() {
|
|
|
|
- return delConfig(ids);
|
|
|
|
|
|
+ this.$modal.confirm('是否确认删除服务区用电属性编号为"' + ids + '"的数据项?').then(function() {
|
|
|
|
+ return delAttr(ids);
|
|
}).then(() => {
|
|
}).then(() => {
|
|
this.getList();
|
|
this.getList();
|
|
this.$modal.msgSuccess("删除成功");
|
|
this.$modal.msgSuccess("删除成功");
|
|
@@ -308,18 +278,17 @@ export default {
|
|
},
|
|
},
|
|
/** 导出按钮操作 */
|
|
/** 导出按钮操作 */
|
|
handleExport() {
|
|
handleExport() {
|
|
- this.download('ems/basecfg/electrovalency/export', {
|
|
|
|
|
|
+ this.download('ems/attr/export', {
|
|
...this.queryParams
|
|
...this.queryParams
|
|
- }, `config_${new Date().getTime()}.xlsx`)
|
|
|
|
|
|
+ }, `attr_${new Date().getTime()}.xlsx`)
|
|
},
|
|
},
|
|
- getElecClass(row, column, cellValue, index){
|
|
|
|
- const elecClassMap = {
|
|
|
|
- 1: '居民用电',
|
|
|
|
- 2: '一般工商业及其他用电',
|
|
|
|
- 3: '大工业用电',
|
|
|
|
- 4: '农业生产用电'
|
|
|
|
|
|
+ getReqCapacityFlag(row, column, cellValue, index) {
|
|
|
|
+ const reqCapacityFlagMap = {
|
|
|
|
+ 0: '未知',
|
|
|
|
+ 1: '容量电价',
|
|
|
|
+ 2: '需量电价'
|
|
};
|
|
};
|
|
- return elecClassMap[cellValue] || '未知';
|
|
|
|
|
|
+ return reqCapacityFlagMap[cellValue] || '未知';
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|