|
@@ -7,6 +7,19 @@
|
|
@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 +39,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="13%"
|
|
<vxe-table-column field="modelNumber" 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 min-width="60px" width="15%" field="installationTime" title="安装时间"
|
|
|
|
|
|
+ <vxe-table-column min-width="60px" 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
|
|
@@ -45,7 +60,7 @@
|
|
</template>
|
|
</template>
|
|
<template v-slot="{ row }">{{ timestampToTime(row.installationTime) }}</template>
|
|
<template v-slot="{ row }">{{ timestampToTime(row.installationTime) }}</template>
|
|
</vxe-table-column>
|
|
</vxe-table-column>
|
|
- <vxe-table-column field="report" title="是否上报" width="8%"
|
|
|
|
|
|
+ <vxe-table-column field="report" title="是否上报" width="6%"
|
|
:edit-render="{name: '$select', options: options}"></vxe-table-column>
|
|
:edit-render="{name: '$select', options: options}"></vxe-table-column>
|
|
<vxe-table-column field="bindTunnel" title="绑定通道" width="13%"
|
|
<vxe-table-column field="bindTunnel" title="绑定通道" width="13%"
|
|
:edit-render="{name: '$select', options: bindTunnels}"
|
|
:edit-render="{name: '$select', options: bindTunnels}"
|
|
@@ -96,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>
|
|
@@ -152,6 +156,8 @@
|
|
}
|
|
}
|
|
return {
|
|
return {
|
|
id:'',
|
|
id:'',
|
|
|
|
+ stationCode: '',
|
|
|
|
+ stationList: [],
|
|
equipmentTypeList: [],
|
|
equipmentTypeList: [],
|
|
loading: false,
|
|
loading: false,
|
|
saveLoding: false,
|
|
saveLoding: false,
|
|
@@ -199,17 +205,22 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
- this.getAll()
|
|
|
|
-
|
|
|
|
|
|
+ this.getStationList()
|
|
|
|
+ // this.getAll()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- getAll() {
|
|
|
|
- this.$axios.get('/TunnelInfo/findbyMaster').then(res => {
|
|
|
|
- this.bindTunnels = res.data
|
|
|
|
- })
|
|
|
|
|
|
+ // 查询
|
|
|
|
+ queryInfo() {
|
|
|
|
+ // this.$axios.get('/TunnelInfo/findbyMaster').then(res => {
|
|
|
|
+ // this.bindTunnels = res.data
|
|
|
|
+ // })
|
|
this.loading = true
|
|
this.loading = true
|
|
this.saveLoding = false
|
|
this.saveLoding = false
|
|
- this.$axios.get('/weatherStationInfo/' + this.currentPage + '/' + this.pageSize).then(response => {
|
|
|
|
|
|
+ let queryParam = this.stationCode;
|
|
|
|
+ if (queryParam==''){
|
|
|
|
+ queryParam="ALL"
|
|
|
|
+ }
|
|
|
|
+ this.$axios.get('/weatherStationInfo/' + queryParam).then(response => {
|
|
if (response.data.content == "") {
|
|
if (response.data.content == "") {
|
|
this.showTable = false
|
|
this.showTable = false
|
|
|
|
|
|
@@ -217,13 +228,25 @@
|
|
this.showTable = true
|
|
this.showTable = true
|
|
}
|
|
}
|
|
|
|
|
|
- this.tableData = response.data.content
|
|
|
|
-
|
|
|
|
- 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)
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ stationCodeChange() {
|
|
|
|
+ this.$axios.get('/uploadObject/getByStationCode/' + this.stationCode).then((res) => {
|
|
|
|
+ this.uploadObjectId=''
|
|
|
|
+ this.uploadFileType=''
|
|
|
|
+ this.queryUploadObject = res.data
|
|
|
|
+ })
|
|
|
|
+ },
|
|
editRowEvent(row) {
|
|
editRowEvent(row) {
|
|
this.id = row.id
|
|
this.id = row.id
|
|
this.btnLonding = true
|
|
this.btnLonding = true
|
|
@@ -236,14 +259,14 @@
|
|
if (valid) {
|
|
if (valid) {
|
|
if (row.id == undefined) {
|
|
if (row.id == undefined) {
|
|
this.$axios.post('/weatherStationInfo/', row).then(response => {
|
|
this.$axios.post('/weatherStationInfo/', 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('/weatherStationInfo/', row).then(response => {
|
|
this.$axios.put('/weatherStationInfo/', 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
|
|
})
|
|
})
|
|
@@ -297,11 +320,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('/weatherStationInfo/').then(res => {
|
|
this.$axios.get('/weatherStationInfo/').then(res => {
|