|
@@ -7,6 +7,18 @@
|
|
@click="exportDataEvent">导出数据
|
|
@click="exportDataEvent">导出数据
|
|
</el-button>
|
|
</el-button>
|
|
</div>
|
|
</div>
|
|
|
|
+ <span style="font-weight: bold;font-size: 14px">场站名称:</span>
|
|
|
|
+ <el-select style="width:250px" clearable v-model="stationCode" size="small" >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in stationList"
|
|
|
|
+ :key="item.stationCode"
|
|
|
|
+ :label="item.name"
|
|
|
|
+ :value="item.stationCode">
|
|
|
|
+ <span style="float: left">{{ item.name }}</span>
|
|
|
|
+ <span style="float: right; color: #8492a6;font-size: 13px">{{ item.stationCode }}</span>
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ <el-button type="primary" icon="el-icon-search" size="small" @click="queryInfo">查询</el-button>
|
|
<el-button type="primary" size="small" @click="insertEvent" style="round-clip: 10px"
|
|
<el-button type="primary" size="small" @click="insertEvent" style="round-clip: 10px"
|
|
:loading="btnLonding">新增</el-button>
|
|
:loading="btnLonding">新增</el-button>
|
|
<div style="padding-top: 10px">
|
|
<div style="padding-top: 10px">
|
|
@@ -26,13 +38,15 @@
|
|
:edit-config="{trigger: 'manual', mode: 'row',autoClear: false,icon:'none'}"
|
|
:edit-config="{trigger: 'manual', mode: 'row',autoClear: false,icon:'none'}"
|
|
>
|
|
>
|
|
<vxe-table-column title="测风塔信息">
|
|
<vxe-table-column title="测风塔信息">
|
|
|
|
+ <vxe-table-column field="stationCode" title="场站编号" width="6%"
|
|
|
|
+ :edit-render="{name: '$input', attrs: {type: 'text'}}"></vxe-table-column>
|
|
<vxe-table-column field="name" title="名称" width="13%"
|
|
<vxe-table-column field="name" title="名称" width="13%"
|
|
:edit-render="{name: '$input', attrs: {type: 'text'}}"></vxe-table-column>
|
|
:edit-render="{name: '$input', attrs: {type: 'text'}}"></vxe-table-column>
|
|
<vxe-table-column field="manufacturer" title="生产商" width="13%"
|
|
<vxe-table-column field="manufacturer" title="生产商" width="13%"
|
|
:edit-render="{name: '$input', attrs: {type: 'text'}}"></vxe-table-column>
|
|
:edit-render="{name: '$input', attrs: {type: 'text'}}"></vxe-table-column>
|
|
<vxe-table-column field="modelNumber" title="型号" width="10%"
|
|
<vxe-table-column field="modelNumber" title="型号" width="10%"
|
|
:edit-render="{name: '$input', attrs: {type: 'text'}}"></vxe-table-column>
|
|
:edit-render="{name: '$input', attrs: {type: 'text'}}"></vxe-table-column>
|
|
- <vxe-table-column min-width="50px" width="14%" field="installationTime" title="安装时间"
|
|
|
|
|
|
+ <vxe-table-column min-width="50px" width="10%" field="installationTime" title="安装时间"
|
|
:edit-render="{props: {type: 'default'}}">
|
|
:edit-render="{props: {type: 'default'}}">
|
|
<template v-slot:edit="{ row }">
|
|
<template v-slot:edit="{ row }">
|
|
<el-date-picker
|
|
<el-date-picker
|
|
@@ -97,17 +111,6 @@
|
|
</vxe-table-column>
|
|
</vxe-table-column>
|
|
</vxe-table-column>
|
|
</vxe-table-column>
|
|
</vxe-table>
|
|
</vxe-table>
|
|
- <vxe-pager
|
|
|
|
- perfect
|
|
|
|
- :current-page.sync="currentPage"
|
|
|
|
- :page-size.sync="pageSize"
|
|
|
|
- :total="total"
|
|
|
|
- :page-sizes=[10,50,100]
|
|
|
|
- :layouts="['PrevJump', 'PrevPage','JumpNumber', 'NextPage', 'NextJump', 'Sizes', 'FullJump', 'Total']"
|
|
|
|
- @page-change="handlePageChange"
|
|
|
|
- v-show="!btnLonding&&showTable"
|
|
|
|
- >
|
|
|
|
- </vxe-pager>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</el-card>
|
|
</el-card>
|
|
@@ -163,6 +166,8 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return {
|
|
return {
|
|
|
|
+ stationCode: '',
|
|
|
|
+ stationList: [],
|
|
bindTunnels:[],
|
|
bindTunnels:[],
|
|
id:'',
|
|
id:'',
|
|
equipmentTypeList:[],
|
|
equipmentTypeList:[],
|
|
@@ -208,24 +213,18 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
- this.getAll()
|
|
|
|
|
|
+ this.getStationList()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- getAll() {
|
|
|
|
- this.$axios.get('/TunnelInfo/findbyMaster').then(res => {
|
|
|
|
- this.bindTunnels = res.data
|
|
|
|
- })
|
|
|
|
|
|
+ // 查询
|
|
|
|
+ queryInfo() {
|
|
this.loading = true
|
|
this.loading = true
|
|
this.saveLoding = false
|
|
this.saveLoding = false
|
|
- this.$axios.get('/windTowerInfo/' + this.currentPage + '/' + this.pageSize,).then(response => {
|
|
|
|
- if (response.data.content == "") {
|
|
|
|
- this.showTable = false
|
|
|
|
-
|
|
|
|
- } else {
|
|
|
|
- this.showTable = true
|
|
|
|
- }
|
|
|
|
- // window.console.log(this.equipmentTypeList)
|
|
|
|
- this.tableData = response.data.content
|
|
|
|
|
|
+ let queryParam = this.stationCode;
|
|
|
|
+ if (queryParam==''){
|
|
|
|
+ queryParam="ALL"
|
|
|
|
+ }
|
|
|
|
+ this.$axios.get('/windTowerInfo/' + queryParam).then(response => {
|
|
for (let i = 0; i < this.tableData.length; i++) {
|
|
for (let i = 0; i < this.tableData.length; i++) {
|
|
//添加省调枚举标识转换
|
|
//添加省调枚举标识转换
|
|
for (let j = 0; j < this.equipmentTypeList.length; j++) {
|
|
for (let j = 0; j < this.equipmentTypeList.length; j++) {
|
|
@@ -234,11 +233,18 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- this.total = response.data.totalElements
|
|
|
|
|
|
+ this.tableData = response.data
|
|
this.loading = false
|
|
this.loading = false
|
|
this.btnLonding = false
|
|
this.btnLonding = false
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ getStationList() {
|
|
|
|
+ this.$axios.get('/electricField/getElectricField').then((res) => {
|
|
|
|
+ this.stationList = res.data
|
|
|
|
+ }).catch((error) => {
|
|
|
|
+ this.$message.error('获取场站下拉框出错' + error)
|
|
|
|
+ })
|
|
|
|
+ },
|
|
editRowEvent(row) {
|
|
editRowEvent(row) {
|
|
this.id = row.id
|
|
this.id = row.id
|
|
this.btnLonding = true
|
|
this.btnLonding = true
|
|
@@ -250,14 +256,14 @@
|
|
if (valid) {
|
|
if (valid) {
|
|
if (row.id == undefined) {
|
|
if (row.id == undefined) {
|
|
this.$axios.post('windTowerInfo/',row).then(response => {
|
|
this.$axios.post('windTowerInfo/',row).then(response => {
|
|
- this.getAll()
|
|
|
|
|
|
+ this.queryInfo()
|
|
this.btnLonding = false
|
|
this.btnLonding = false
|
|
this.$XModal.message({status: 'warning', message: response.message})
|
|
this.$XModal.message({status: 'warning', message: response.message})
|
|
})
|
|
})
|
|
} else {
|
|
} else {
|
|
row.equipmentType = row.equipmentType.code
|
|
row.equipmentType = row.equipmentType.code
|
|
this.$axios.put('windTowerInfo/',row).then(response => {
|
|
this.$axios.put('windTowerInfo/',row).then(response => {
|
|
- this.getAll()
|
|
|
|
|
|
+ this.queryInfo()
|
|
this.$XModal.message({status: 'warning', message: response.message})
|
|
this.$XModal.message({status: 'warning', message: response.message})
|
|
this.saveLoding = false
|
|
this.saveLoding = false
|
|
})
|
|
})
|
|
@@ -310,11 +316,6 @@
|
|
this.$refs.xTable.insert({interval: 60})
|
|
this.$refs.xTable.insert({interval: 60})
|
|
.then(({row}) => this.$refs.xTable.setActiveRow(row))
|
|
.then(({row}) => this.$refs.xTable.setActiveRow(row))
|
|
},
|
|
},
|
|
- handlePageChange({currentPage, pageSize}) {
|
|
|
|
- this.currentPage = currentPage
|
|
|
|
- this.pageSize = pageSize
|
|
|
|
- this.getAll()
|
|
|
|
- },
|
|
|
|
exportDataEvent() {
|
|
exportDataEvent() {
|
|
this.loading = true
|
|
this.loading = true
|
|
this.$axios.get('/windTowerInfo/').then(res => {
|
|
this.$axios.get('/windTowerInfo/').then(res => {
|