|
@@ -33,9 +33,16 @@
|
|
|
</div>
|
|
|
<div class="table-box">
|
|
|
<div class="title">升压站报警</div>
|
|
|
- <ComTable ref="curRef" :data="tableData" :pageSize="pageSize" @onPagging="onChangePage" height="50vh"
|
|
|
- v-loading="tableLoading" element-loading-text="拼命加载中.." element-loading-background="rgba(0, 0, 0, 0.8)">
|
|
|
- </ComTable>
|
|
|
+ <ComTable
|
|
|
+ ref="curRef"
|
|
|
+ :data="tableData"
|
|
|
+ :pageSize="pageSize"
|
|
|
+ @onPagging="onChangePage"
|
|
|
+ height="68vh"
|
|
|
+ v-loading="tableLoading"
|
|
|
+ element-loading-text="拼命加载中.."
|
|
|
+ element-loading-background="rgba(0, 0, 0, 0.8)"
|
|
|
+ ></ComTable>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -52,12 +59,12 @@
|
|
|
let that = this;
|
|
|
return {
|
|
|
ChangZhan: [],
|
|
|
- stationId: "XS_FDC",
|
|
|
+ stationId: "MHS_FDC",
|
|
|
startDate: "",
|
|
|
endDate: "",
|
|
|
tableLoading: true,
|
|
|
- pageNum: 1,
|
|
|
- pageSize: [20],
|
|
|
+ pageIndex: 1,
|
|
|
+ pageSize: 20,
|
|
|
tableData: {
|
|
|
column: [{
|
|
|
name: "记录日期",
|
|
@@ -221,41 +228,46 @@
|
|
|
method: "GET",
|
|
|
subUrl: "weather/history/list",
|
|
|
data: {
|
|
|
- wpId: this.stationId,
|
|
|
- startTs: this.startDate,
|
|
|
- endTs: this.endDate,
|
|
|
- pageNum: this.pageNum,
|
|
|
- pageSize: 20,
|
|
|
+ wpId: that.stationId,
|
|
|
+ startTs: that.startDate,
|
|
|
+ endTs: that.endDate,
|
|
|
+ pageNum: that.pageIndex,
|
|
|
+ pageSize: that.pageSize,
|
|
|
},
|
|
|
success(res) {
|
|
|
console.log(res)
|
|
|
var dataTab = [];
|
|
|
- res.data.list.forEach(item => {
|
|
|
- dataTab.push({ //表格
|
|
|
- recodedata: that.formatTime(item.recodedata),
|
|
|
- region: item.region,
|
|
|
- weather: item.weather,
|
|
|
- maximumtem: item.maximumtem,
|
|
|
- minimumtem: item.minimumtem,
|
|
|
- sunrise: item.sunrise,
|
|
|
- sunset: item.sunset,
|
|
|
- weather1: item.weather1,
|
|
|
- weather2: item.weather2,
|
|
|
- temperature1: item.temperature1,
|
|
|
- temperature2: item.temperature2,
|
|
|
- realfeel1: item.realfeel1,
|
|
|
- realfeel2: item.realfeel2,
|
|
|
- precipitation1: item.precipitation1,
|
|
|
- precipitation2: item.precipitation2,
|
|
|
- winddirection1: item.winddirection1,
|
|
|
- winddirection2: item.winddirection2,
|
|
|
- speed1: item.speed1,
|
|
|
- speed2: item.speed2
|
|
|
- })
|
|
|
- })
|
|
|
- that.tableData.data = dataTab;
|
|
|
+ if (res.data) {
|
|
|
+ res.data.list.forEach(item => {
|
|
|
+ dataTab.push({ //表格
|
|
|
+ recodedata: that.formatTime(item.recodedata),
|
|
|
+ region: item.region,
|
|
|
+ weather: item.weather,
|
|
|
+ maximumtem: item.maximumtem,
|
|
|
+ minimumtem: item.minimumtem,
|
|
|
+ sunrise: item.sunrise,
|
|
|
+ sunset: item.sunset,
|
|
|
+ weather1: item.weather1,
|
|
|
+ weather2: item.weather2,
|
|
|
+ temperature1: item.temperature1,
|
|
|
+ temperature2: item.temperature2,
|
|
|
+ realfeel1: item.realfeel1,
|
|
|
+ realfeel2: item.realfeel2,
|
|
|
+ precipitation1: item.precipitation1,
|
|
|
+ precipitation2: item.precipitation2,
|
|
|
+ winddirection1: item.winddirection1,
|
|
|
+ winddirection2: item.winddirection2,
|
|
|
+ speed1: item.speed1,
|
|
|
+ speed2: item.speed2
|
|
|
+ })
|
|
|
+ })
|
|
|
+ that.tableData.data = dataTab;
|
|
|
+ that.tableData.total = res.data.total;
|
|
|
+ } else {
|
|
|
+ that.tableData.data = [];
|
|
|
+ that.tableData.total = 0;
|
|
|
+ }
|
|
|
that.tableLoading = false;
|
|
|
- that.tableData.total = res.data.total;
|
|
|
}
|
|
|
});
|
|
|
},
|
|
@@ -273,8 +285,7 @@
|
|
|
}
|
|
|
},
|
|
|
onChangePage(params) {
|
|
|
- console.log(params)
|
|
|
- this.pageNum = params.pageNum;
|
|
|
+ this.pageIndex = params.pageIndex;
|
|
|
this.pageSize = params.pageSize;
|
|
|
this.getTable();
|
|
|
},
|