|
@@ -17,26 +17,17 @@
|
|
|
<el-table v-loading="loading" border
|
|
|
:data="tableAllData.slice((page.currentPage-1)*page.pageSize,page.currentPage*page.pageSize)">
|
|
|
<el-table-column type="index" label="序号" width="55" align="center"/>
|
|
|
-<!-- <el-table-column label="场站编号" align="center" prop="stationCode"/>-->
|
|
|
- <el-table-column label="电站名称" align="center" prop="name"/>
|
|
|
-<!-- <el-table-column label="场站标识" align="center" prop="sign"/>-->
|
|
|
-<!-- <el-table-column label="别名" align="center" prop="netSubstationName"/>-->
|
|
|
- <el-table-column label="场站装机容量(MW)" align="center" prop="capacity"/>
|
|
|
- <!-- <el-table-column label="并网设备数" align="center" prop="gridCE"/>-->
|
|
|
+ <el-table-column label="场站编号" align="center" prop="stationId"/>
|
|
|
+ <el-table-column label="场站名称" align="center" prop="stationName"/>
|
|
|
+ <el-table-column label="简称" align="center" prop="abbreviation"/>
|
|
|
<el-table-column label="场站经度" align="center" prop="longitude"/>
|
|
|
<el-table-column label="场站纬度" align="center" prop="latitude"/>
|
|
|
- <el-table-column label="场站海拔" align="center" prop="altitude"/>
|
|
|
- <el-table-column label="场站类型" align="center" prop="electricFieldType" :formatter="formatStatus" />
|
|
|
-<!-- <el-table-column label="场站状态" align="center" prop="stationStatus" :formatter="formatType" />-->
|
|
|
- <!-- <el-table-column label="入库时间间隔(s)" align="center" prop="interval"/>-->
|
|
|
- <el-table-column label="场站所属公司" align="center" prop="company"/>
|
|
|
- <el-table-column label="场站位置" align="center" prop="location"/>
|
|
|
- <el-table-column label="关联设备" align="center" prop="relationEquipment">
|
|
|
- <template slot-scope="scope">
|
|
|
- <span>{{ formatEquipment(scope.row.relationEquipment) }}</span>
|
|
|
- </template>
|
|
|
+ <el-table-column label="场站类型" align="center" prop="stationType" :formatter="formatStatus" />
|
|
|
+ <el-table-column label="关联设备" align="center" prop="equipment">
|
|
|
+<!-- <template slot-scope="scope">-->
|
|
|
+<!-- <span>{{ formatEquipment(scope.row.equipment) }}</span>-->
|
|
|
+<!-- </template>-->
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="场站面积" align="center" prop="area"/>
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
@@ -68,48 +59,26 @@
|
|
|
</el-pagination>
|
|
|
</div>
|
|
|
|
|
|
- <!--<pagination-->
|
|
|
- <!--v-show="total>0"-->
|
|
|
- <!--:total="total"-->
|
|
|
- <!--:page.sync="queryParams.pageNum"-->
|
|
|
- <!--:limit.sync="queryParams.pageSize"-->
|
|
|
- <!--@pagination="getList"-->
|
|
|
- <!--/>-->
|
|
|
</el-card>
|
|
|
<!-- 添加或修改测风塔信息对话框 -->
|
|
|
<el-dialog :title="title" :visible.sync="open" width="50%" append-to-body>
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
|
|
<el-row :gutter="20" class="mb8">
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="场站名称" prop="name">
|
|
|
- <el-input v-model="form.name" placeholder="请输入场站名称"/>
|
|
|
+ <el-form-item label="场站编号" prop="stationId">
|
|
|
+ <el-input v-model="form.stationId" placeholder="请输入场站编号"/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="场站面积" prop="area">
|
|
|
- <el-input v-model="form.area" placeholder="请输入场站面积"/>
|
|
|
+ <el-form-item label="场站名称" prop="stationName">
|
|
|
+ <el-input v-model="form.stationName" placeholder="请输入场站名称"/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
- <!-- <el-col :span="12">-->
|
|
|
- <!-- <el-form-item label="电站名称" prop="name">-->
|
|
|
- <!-- <el-input v-model="form.name" placeholder="请输入电站名称"/>-->
|
|
|
- <!-- </el-form-item>-->
|
|
|
- <!-- </el-col>-->
|
|
|
- <!-- <el-col :span="12">-->
|
|
|
- <!-- <el-form-item label="场站标识" prop="sign">-->
|
|
|
- <!-- <el-input v-model="form.sign" placeholder="请输入场站标识"/>-->
|
|
|
- <!-- </el-form-item>-->
|
|
|
- <!-- </el-col>-->
|
|
|
- <!-- <el-col :span="12">-->
|
|
|
- <!-- <el-form-item label="别名" prop="netSubstationName">-->
|
|
|
- <!-- <el-input v-model="form.netSubstationName" placeholder="请输入别名"/>-->
|
|
|
- <!-- </el-form-item>-->
|
|
|
- <!-- </el-col>-->
|
|
|
<el-row :gutter="20" class="mb8">
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="场站装机容量(MW)" prop="capacity">
|
|
|
- <el-input v-model="form.capacity" placeholder="请输入场站装机容量(MW)"/>
|
|
|
+ <el-form-item label="简称" prop="abbreviation">
|
|
|
+ <el-input v-model="form.abbreviation" placeholder="简称"/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
@@ -125,15 +94,8 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="海拔" prop="altitude">
|
|
|
- <el-input v-model="form.altitude" placeholder="请输入海拔"/>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row :gutter="20" class="mb8">
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="场站类型" prop="electricFieldType">
|
|
|
- <el-select v-model="form.electricFieldType" placeholder="请选择" style="width: 100%" clearable>
|
|
|
+ <el-form-item label="场站类型" prop="stationType">
|
|
|
+ <el-select v-model="form.stationType" placeholder="请选择" style="width: 100%" clearable>
|
|
|
<el-option
|
|
|
v-for="item in terrain"
|
|
|
:key="item.value"
|
|
@@ -143,37 +105,12 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="场站所属公司" prop="company">
|
|
|
- <el-input v-model="form.company" placeholder="请输入场站所属公司"/>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
</el-row>
|
|
|
- <el-row :gutter="20" class="mb8">
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="场站位置" prop="location">
|
|
|
- <el-input v-model="form.location" placeholder="请输入场站位置"/>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
-<!-- <el-row :gutter="20" class="mb8">-->
|
|
|
-<!-- <el-col :span="12">-->
|
|
|
-<!-- <el-form-item label="场站状态" prop="stationStatus">-->
|
|
|
-<!-- <el-select v-model="form.stationStatus" placeholder="请选择" style="width: 100%" clearable>-->
|
|
|
-<!-- <el-option-->
|
|
|
-<!-- v-for="item in status"-->
|
|
|
-<!-- :key="item.value"-->
|
|
|
-<!-- :label="item.label"-->
|
|
|
-<!-- :value="item.value">-->
|
|
|
-<!-- </el-option>-->
|
|
|
-<!-- </el-select>-->
|
|
|
-<!-- </el-form-item>-->
|
|
|
-<!-- </el-col>-->
|
|
|
-<!-- </el-row>-->
|
|
|
- <el-form-item label="关联设备" prop="relationEquipment">
|
|
|
- <el-select v-model="form.relationEquipment" placeholder="请选择" style="width: 100%" multiple clearable>
|
|
|
+
|
|
|
+ <el-form-item label="关联设备" prop="equipment">
|
|
|
+ <el-select v-model="form.equipment" placeholder="请选择" style="width: 100%" multiple clearable>
|
|
|
<el-option
|
|
|
- v-for="item in relationEquipmentData"
|
|
|
+ v-for="item in equipment"
|
|
|
:key="item.value"
|
|
|
:label="item.label"
|
|
|
:value="item.value"
|
|
@@ -269,7 +206,7 @@ export default {
|
|
|
{pattern: /^-?((0|[1-8]?[0-9]?)(([.][0-9]{1,10})?)|90(([.][0]{1,10})?))$/, message: '请输入正确的纬度'}
|
|
|
// {message: '输入过长', max: 10}
|
|
|
],
|
|
|
- electricFieldType: [
|
|
|
+ stationType: [
|
|
|
{required: true, message: '请填写场站类型'}
|
|
|
],
|
|
|
altitude: [
|
|
@@ -291,13 +228,13 @@ export default {
|
|
|
currentPage: 1, // 当前页数
|
|
|
pageSize: 10 // 每页显示多少条
|
|
|
},
|
|
|
- terrain: [{label: "风力电站", value: "F1"},
|
|
|
- {label: "光伏电站", value: "F2"}],
|
|
|
+ terrain: [{label: "风力电站", value: "风"},
|
|
|
+ {label: "光伏电站", value: "光"}],
|
|
|
status: [
|
|
|
{label: "运行中", value: "Y1"},
|
|
|
{label: "未运行", value: "Y2"},
|
|
|
],
|
|
|
- relationEquipmentData: [],
|
|
|
+ equipment: [],
|
|
|
heightOption: []
|
|
|
};
|
|
|
},
|
|
@@ -311,30 +248,29 @@ export default {
|
|
|
/*获取所有的测风塔*/
|
|
|
getAllWindTowerInfo() {
|
|
|
listAllDisabled().then(res => {
|
|
|
- this.relationEquipmentData = res.data
|
|
|
+ this.equipment = res.data
|
|
|
})
|
|
|
},
|
|
|
- formatEquipment(data) {
|
|
|
- console.log(data)
|
|
|
- if (data !== null) {
|
|
|
- var a = data.split(",");
|
|
|
- var b = "";
|
|
|
- if (a.length !== 0) {
|
|
|
- for (let i = 0; i < a.length; i++) {
|
|
|
- for (let k = 0; k < this.relationEquipmentData.length; k++) {
|
|
|
- if (this.relationEquipmentData[k].value === a[i]) {
|
|
|
- b += this.relationEquipmentData[k].label
|
|
|
- if (i !== a.length - 1) {
|
|
|
- b += ","
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- return b;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- },
|
|
|
+ // formatEquipment(data) {
|
|
|
+ // console.log(data)
|
|
|
+ // if (data !== null) {
|
|
|
+ // var a = data.split(",");
|
|
|
+ // var b = "";
|
|
|
+ // if (a.length !== 0) {
|
|
|
+ // for (let i = 0; i < a.length; i++) {
|
|
|
+ // for (let k = 0; k < this.equipment.length; k++) {
|
|
|
+ // if (this.equipment[k].value === a[i]) {
|
|
|
+ // b += this.equipment[k].label
|
|
|
+ // if (i !== a.length - 1) {
|
|
|
+ // b += ","
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // return b;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // },
|
|
|
/** 查询测风塔信息列表 */
|
|
|
getList() {
|
|
|
// this.loading = true;
|
|
@@ -353,20 +289,13 @@ export default {
|
|
|
reset() {
|
|
|
this.form = {
|
|
|
id: null,
|
|
|
- stationCode: null,
|
|
|
- stationStatus: null,
|
|
|
- name: null,
|
|
|
- sign: null,
|
|
|
- netSubstationName: null,
|
|
|
- capacity: null,
|
|
|
+ stationId: null,
|
|
|
+ stationName: null,
|
|
|
+ abbreviation: null,
|
|
|
longitude: null,
|
|
|
latitude: null,
|
|
|
- altitude: null,
|
|
|
- electricFieldType: null,
|
|
|
- company: null,
|
|
|
- location: null,
|
|
|
- area: null,
|
|
|
- relationEquipment: null
|
|
|
+ stationType: null,
|
|
|
+ equipment: null
|
|
|
};
|
|
|
this.resetForm("form");
|
|
|
},
|
|
@@ -402,34 +331,27 @@ export default {
|
|
|
var a = null
|
|
|
const id = row.id || this.ids
|
|
|
this.modId = id
|
|
|
- if (row.relationEquipment !== null) {
|
|
|
- a = row.relationEquipment.split(",")
|
|
|
- a = a.length === 1 && a[0] === "" ? null : row.relationEquipment.split(",")
|
|
|
+ if (row. equipment!== null) {
|
|
|
+ a = row.equipment.split(",")
|
|
|
+ a = a.length === 1 && a[0] === "" ? null : row.equipment.split(",")
|
|
|
}
|
|
|
this.form = {
|
|
|
id: row.id,
|
|
|
- stationCode: row.stationCode,
|
|
|
- stationStatus: row.stationStatus,
|
|
|
- name: row.name,
|
|
|
- sign: row.sign,
|
|
|
- netSubstationName: row.netSubstationName,
|
|
|
- capacity: row.capacity,
|
|
|
+ stationId: row.stationId,
|
|
|
+ stationName: row.stationName,
|
|
|
+ abbreviation: row.abbreviation,
|
|
|
longitude: row.longitude,
|
|
|
latitude: row.latitude,
|
|
|
- electricFieldType: row.electricFieldType,
|
|
|
- company: row.company,
|
|
|
- altitude: row.altitude,
|
|
|
- location: row.location,
|
|
|
- relationEquipment: a,
|
|
|
- area: row.area
|
|
|
+ stationType: row.stationType,
|
|
|
+ equipment: a
|
|
|
};
|
|
|
},
|
|
|
/** 提交按钮 */
|
|
|
submitForm() {
|
|
|
// this.form.heights = this.form.heights.toString()
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
- if (this.form.relationEquipment !== null) {
|
|
|
- this.form.relationEquipment = this.form.relationEquipment.toString()
|
|
|
+ if (this.form.equipment !== null) {
|
|
|
+ this.form.equipment = this.form.equipment.toString()
|
|
|
}
|
|
|
if (valid) {
|
|
|
if (this.form.id != null) {
|
|
@@ -450,7 +372,7 @@ export default {
|
|
|
},
|
|
|
/** 删除按钮操作 */
|
|
|
handleDelete(row) {
|
|
|
- this.$modal.confirm('是否确认场站名称为"' + row.stationCode + '"信息及所有数据?').then(function () {
|
|
|
+ this.$modal.confirm('是否确认场站名称为"' + row.stationName + '"信息及所有数据?').then(function () {
|
|
|
return delElectricStation(row);
|
|
|
}).then(() => {
|
|
|
this.getList();
|
|
@@ -468,13 +390,13 @@ export default {
|
|
|
this.page.currentPage = val
|
|
|
},
|
|
|
formatStatus(row){
|
|
|
- let option = this.terrain.find(w=>w.value === row.electricFieldType)
|
|
|
- return option !==undefined?option.label:row.electricFieldType
|
|
|
- },
|
|
|
- formatType(row){
|
|
|
- let option = this.status.find(w=>w.value === row.stationStatus)
|
|
|
- return option !==undefined?option.label:row.stationStatus
|
|
|
+ let option = this.terrain.find(w=>w.value === row.stationType)
|
|
|
+ return option !==undefined?option.label:row.stationType
|
|
|
},
|
|
|
+ // formatType(row){
|
|
|
+ // let option = this.status.find(w=>w.value === row.stationStatus)
|
|
|
+ // return option !==undefined?option.label:row.stationStatus
|
|
|
+ // },
|
|
|
}
|
|
|
};
|
|
|
</script>
|