|
|
|
@ -17,9 +17,9 @@
|
|
|
|
|
|
|
|
|
|
<el-table-column prop="updateTime" label="时间">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span v-if="scope.row.updateTime">
|
|
|
|
|
<span v-if="scope.row.lastWeathers.updateTime !== null">
|
|
|
|
|
{{
|
|
|
|
|
$moment(scope.row.updateTime * 1000).format(
|
|
|
|
|
$moment(scope.row.lastWeathers.updateTime * 1000).format(
|
|
|
|
|
"YYYY-MM-DD HH:mm:ss"
|
|
|
|
|
)
|
|
|
|
|
}}</span
|
|
|
|
@ -27,57 +27,60 @@
|
|
|
|
|
<span v-else> - </span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="temperature" label="温度(℃)">
|
|
|
|
|
<el-table-column label="温度(℃)">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span v-if="scope.row.temperature">{{
|
|
|
|
|
scope.row.temperature
|
|
|
|
|
<span v-if="scope.row.lastWeathers.airTemperature !== null">{{
|
|
|
|
|
scope.row.lastWeathers.airTemperature
|
|
|
|
|
}}</span>
|
|
|
|
|
<span v-else> - </span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="humidity" label="湿度(%RH)">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span v-if="scope.row.humidity">{{
|
|
|
|
|
scope.row.humidity
|
|
|
|
|
<span v-if="scope.row.lastWeathers.humidity !== null">{{
|
|
|
|
|
scope.row.lastWeathers.humidity
|
|
|
|
|
}}</span>
|
|
|
|
|
<span v-else> - </span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="windSpeed" label="瞬时风速(m/s)">
|
|
|
|
|
<el-table-column prop="maxWindSpeed" label="最大风速(m/s)">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span v-if="scope.row.windSpeed">{{
|
|
|
|
|
scope.row.windSpeed
|
|
|
|
|
<span v-if="scope.row.lastWeathers.maxWindSpeed !== null">{{
|
|
|
|
|
scope.row.lastWeathers.maxWindSpeed
|
|
|
|
|
}}</span>
|
|
|
|
|
<span v-else> - </span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="windDirection" label="瞬时风向(°)">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span v-if="scope.row.windDirection">{{
|
|
|
|
|
scope.row.windDirection
|
|
|
|
|
<span v-if="scope.row.lastWeathers.windDirection !== null">{{
|
|
|
|
|
scope.row.lastWeathers.windDirection
|
|
|
|
|
}}</span>
|
|
|
|
|
<span v-else> - </span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="rain" label="雨量(mm/hour)">
|
|
|
|
|
<el-table-column prop="precipitation" label="雨量(mm/hour)">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span v-if="scope.row.rain">{{ scope.row.rain }}</span>
|
|
|
|
|
<span v-if="scope.row.lastWeathers.precipitation !== null">{{
|
|
|
|
|
scope.row.lastWeathers.precipitation
|
|
|
|
|
}}</span>
|
|
|
|
|
<span v-else> - </span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="airPressure" label="气压(hPa(百帕))">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span v-if="scope.row.airPressure">{{
|
|
|
|
|
scope.row.airPressure
|
|
|
|
|
<span v-if="scope.row.lastWeathers.airPressure !== null">{{
|
|
|
|
|
scope.row.lastWeathers.airPressure
|
|
|
|
|
}}</span>
|
|
|
|
|
<span v-else> - </span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="radiationIntensity" label="日照(W/m2)">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span v-if="scope.row.radiationIntensity">{{
|
|
|
|
|
scope.row.radiationIntensity
|
|
|
|
|
}}</span>
|
|
|
|
|
<span
|
|
|
|
|
v-if="scope.row.lastWeathers.radiationIntensity !== null"
|
|
|
|
|
>{{ scope.row.lastWeathers.radiationIntensity }}</span
|
|
|
|
|
>
|
|
|
|
|
<span v-else> - </span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
@ -86,7 +89,7 @@
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
@click="moreDataClick(scope.row)"
|
|
|
|
|
v-if="scope.row.updateTime"
|
|
|
|
|
v-if="scope.row.lastWeathers.updateTime"
|
|
|
|
|
>更多历史数据</el-button
|
|
|
|
|
>
|
|
|
|
|
<span v-else> 没有数据</span>
|
|
|
|
@ -183,7 +186,7 @@
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="temperature"
|
|
|
|
|
prop="airTemperature"
|
|
|
|
|
label="温度(℃)"
|
|
|
|
|
></el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
@ -191,7 +194,7 @@
|
|
|
|
|
label="湿度(%RH)"
|
|
|
|
|
></el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="windSpeed"
|
|
|
|
|
prop="maxWindSpeed"
|
|
|
|
|
label="瞬时风速(m/s)"
|
|
|
|
|
></el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
@ -211,23 +214,23 @@
|
|
|
|
|
label="日照(W/m2)"
|
|
|
|
|
></el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="avgWindSpeed1Min"
|
|
|
|
|
prop="avgWindDir1min"
|
|
|
|
|
label="1分钟平均风速(m/s)"
|
|
|
|
|
></el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="avgWindDir1Min"
|
|
|
|
|
prop="avgWindSpeed1min"
|
|
|
|
|
label="1分钟平均风向(°)"
|
|
|
|
|
></el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="avgWindSpeed10Min"
|
|
|
|
|
prop="avgWindSpeed10min"
|
|
|
|
|
label="10分钟平均风速(m/s)"
|
|
|
|
|
></el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="avgWindDir10Min"
|
|
|
|
|
prop="avgWindDir10min"
|
|
|
|
|
label="10分钟平均风向(°)"
|
|
|
|
|
></el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="maxSpeed10Min"
|
|
|
|
|
prop="maxWindSpeed"
|
|
|
|
|
label="10分钟最大风速(m/s)"
|
|
|
|
|
></el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
@ -251,7 +254,7 @@
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
import leftTree from "../components/leftTree";
|
|
|
|
|
import { getDataListJoggle, weatherLastJoggle } from "@/utils/api/iceApi";
|
|
|
|
|
import { weatherJoggle, weatherListJoggle } from "@/utils/api/iceApi";
|
|
|
|
|
export default {
|
|
|
|
|
name: "weather",
|
|
|
|
|
components: {
|
|
|
|
@ -267,8 +270,7 @@ export default {
|
|
|
|
|
page: 1, // 当前页数
|
|
|
|
|
pageSize: 20, // 每页数量
|
|
|
|
|
total: 0, //总条数
|
|
|
|
|
qt: "",
|
|
|
|
|
id: "",
|
|
|
|
|
|
|
|
|
|
paramsData: "",
|
|
|
|
|
childpage: 1, // 当前页数
|
|
|
|
|
childpageSize: 20, // 每页数量
|
|
|
|
@ -307,38 +309,44 @@ export default {
|
|
|
|
|
getCurrentData(data) {
|
|
|
|
|
console.log("执行父组件", data);
|
|
|
|
|
this.paramsData = data;
|
|
|
|
|
let weatherParams;
|
|
|
|
|
console.log(data);
|
|
|
|
|
if (data.dyValue) {
|
|
|
|
|
console.log("电压-公司");
|
|
|
|
|
this.qt = "all";
|
|
|
|
|
this.id = data.id;
|
|
|
|
|
this.getWeatherData(data);
|
|
|
|
|
weatherParams = {
|
|
|
|
|
dyId: data.id,
|
|
|
|
|
pageNum: this.page,
|
|
|
|
|
pageSize: this.pageSize,
|
|
|
|
|
};
|
|
|
|
|
this.getWeatherData(weatherParams);
|
|
|
|
|
} else if (data.bsManufacturer) {
|
|
|
|
|
console.log("线路-电压");
|
|
|
|
|
this.qt = "line";
|
|
|
|
|
this.id = data.id;
|
|
|
|
|
this.getWeatherData(data);
|
|
|
|
|
weatherParams = {
|
|
|
|
|
lineId: data.id,
|
|
|
|
|
pageNum: this.page,
|
|
|
|
|
pageSize: this.pageSize,
|
|
|
|
|
};
|
|
|
|
|
this.getWeatherData(weatherParams);
|
|
|
|
|
} else {
|
|
|
|
|
console.log("装置-杆塔");
|
|
|
|
|
this.qt = "tower";
|
|
|
|
|
this.id = data.towerid;
|
|
|
|
|
this.getWeatherData(data);
|
|
|
|
|
weatherParams = {
|
|
|
|
|
pageNum: this.page,
|
|
|
|
|
pageSize: this.pageSize,
|
|
|
|
|
towerId: data.towerid,
|
|
|
|
|
};
|
|
|
|
|
this.getWeatherData(weatherParams);
|
|
|
|
|
}
|
|
|
|
|
//this.getAllData(data);
|
|
|
|
|
},
|
|
|
|
|
getWeatherData(data) {
|
|
|
|
|
console.log(data);
|
|
|
|
|
weatherLastJoggle({
|
|
|
|
|
dyId: 8,
|
|
|
|
|
lineId: data.lineid,
|
|
|
|
|
pageNum: this.page,
|
|
|
|
|
pageSize: this.pageSize,
|
|
|
|
|
towerId: data.towerid,
|
|
|
|
|
})
|
|
|
|
|
this.childFlag = false;
|
|
|
|
|
this.loading = true;
|
|
|
|
|
weatherJoggle(data)
|
|
|
|
|
.then((res) => {
|
|
|
|
|
console.log(res);
|
|
|
|
|
this.tableData = res.data;
|
|
|
|
|
this.total = Number(res.page.totalRecords);
|
|
|
|
|
this.tableData = res.data.list;
|
|
|
|
|
this.total = res.data.total;
|
|
|
|
|
this.loading = false;
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {
|
|
|
|
@ -346,28 +354,6 @@ export default {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// getWeatherData(data) {
|
|
|
|
|
// this.childFlag = false;
|
|
|
|
|
// console.log(data, this.qt);
|
|
|
|
|
// this.loading = true;
|
|
|
|
|
// getDataListJoggle({
|
|
|
|
|
// act: "meteo",
|
|
|
|
|
// qt: this.qt,
|
|
|
|
|
// id: this.id,
|
|
|
|
|
// p: this.page,
|
|
|
|
|
// ps: this.pageSize,
|
|
|
|
|
// latest: 1,
|
|
|
|
|
// })
|
|
|
|
|
// .then((res) => {
|
|
|
|
|
// console.log(res);
|
|
|
|
|
// this.tableData = res.data;
|
|
|
|
|
// this.total = Number(res.page.totalRecords);
|
|
|
|
|
// this.loading = false;
|
|
|
|
|
// })
|
|
|
|
|
// .catch((err) => {
|
|
|
|
|
// console.log(err); //代码错误、请求失败捕获
|
|
|
|
|
// });
|
|
|
|
|
// },
|
|
|
|
|
//点击分页
|
|
|
|
|
handleCurrentChange(val) {
|
|
|
|
|
this.page = val;
|
|
|
|
@ -394,8 +380,7 @@ export default {
|
|
|
|
|
currentDate.setMinutes(59); // 设置分钟为59
|
|
|
|
|
currentDate.setSeconds(59); // 设置秒数为59
|
|
|
|
|
this.$set(this.formdata, "endtime", currentDate.getTime());
|
|
|
|
|
this.qt = "terminal";
|
|
|
|
|
this.id = row.termId;
|
|
|
|
|
|
|
|
|
|
this.childParma = row;
|
|
|
|
|
this.getchildWeatherData(row);
|
|
|
|
|
},
|
|
|
|
@ -407,21 +392,22 @@ export default {
|
|
|
|
|
getchildWeatherData(row) {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
this.childMsg = row;
|
|
|
|
|
console.log("我是子数据", row);
|
|
|
|
|
const sTime = Math.floor(this.formdata.starttime / 1000);
|
|
|
|
|
const eTime = Math.floor(this.formdata.endtime / 1000);
|
|
|
|
|
getDataListJoggle({
|
|
|
|
|
act: "meteo",
|
|
|
|
|
qt: this.qt,
|
|
|
|
|
id: this.id,
|
|
|
|
|
bt: sTime,
|
|
|
|
|
et: eTime,
|
|
|
|
|
p: this.childpage,
|
|
|
|
|
ps: this.childpageSize,
|
|
|
|
|
weatherListJoggle({
|
|
|
|
|
lineId: row.lineId,
|
|
|
|
|
termId: row.id,
|
|
|
|
|
towerId: row.towerId,
|
|
|
|
|
start: sTime,
|
|
|
|
|
end: eTime,
|
|
|
|
|
pageNum: this.childpage,
|
|
|
|
|
pageSize: this.childpageSize,
|
|
|
|
|
})
|
|
|
|
|
.then((res) => {
|
|
|
|
|
console.log(res);
|
|
|
|
|
this.childTableDate = res.data;
|
|
|
|
|
this.childtotal = Number(res.page.totalRecords);
|
|
|
|
|
this.childTableDate = res.data.list;
|
|
|
|
|
//this.childtotal = Number(res.page.totalRecords);
|
|
|
|
|
this.loading = false;
|
|
|
|
|
//获取温度折线图
|
|
|
|
|
this.getAllData(row);
|
|
|
|
@ -433,18 +419,18 @@ export default {
|
|
|
|
|
getAllData(row) {
|
|
|
|
|
const sTime = Math.floor(this.formdata.starttime / 1000);
|
|
|
|
|
const eTime = Math.floor(this.formdata.endtime / 1000);
|
|
|
|
|
getDataListJoggle({
|
|
|
|
|
act: "meteo",
|
|
|
|
|
qt: this.qt,
|
|
|
|
|
id: this.id,
|
|
|
|
|
bt: sTime,
|
|
|
|
|
et: eTime,
|
|
|
|
|
p: this.childpage,
|
|
|
|
|
ps: 1000,
|
|
|
|
|
weatherListJoggle({
|
|
|
|
|
lineId: row.lineId,
|
|
|
|
|
termId: row.id,
|
|
|
|
|
towerId: row.towerId,
|
|
|
|
|
start: sTime,
|
|
|
|
|
end: eTime,
|
|
|
|
|
pageNum: this.childpage,
|
|
|
|
|
pageSize: 1000,
|
|
|
|
|
})
|
|
|
|
|
.then((res) => {
|
|
|
|
|
console.log(res);
|
|
|
|
|
this.echartsData = res.data;
|
|
|
|
|
this.echartsData = res.data.list;
|
|
|
|
|
//获取温度折线图
|
|
|
|
|
this.getEchart4(this.echartsData);
|
|
|
|
|
this.getEchart5(this.echartsData);
|
|
|
|
@ -478,7 +464,7 @@ export default {
|
|
|
|
|
xData = wd.map((item) =>
|
|
|
|
|
this.$moment(item.updateTime * 1000).format("HH:mm:ss")
|
|
|
|
|
);
|
|
|
|
|
yData = wd.map((item) => item.temperature);
|
|
|
|
|
yData = wd.map((item) => item.airTemperature);
|
|
|
|
|
let option = {
|
|
|
|
|
tooltip: {
|
|
|
|
|
trigger: "axis",
|
|
|
|
|