优化覆冰微气象展示河南

menu1.0
fanluyan 7 months ago
parent 4c8da93533
commit 35bf58297d

@ -67,43 +67,286 @@
<el-table-column <el-table-column
prop="cmdid" prop="cmdid"
label="监测终端编号" label="监测终端编号"
min-width="146px"
fixed
></el-table-column> ></el-table-column>
<el-table-column
prop="updateDate"
label="采集时间"
min-width="140px"
fixed
>
<template slot-scope="scope">
<span v-if="scope.row.lastLeadPulls !== null">
{{ scope.row.lastLeadPulls.updateDate }}</span
>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column
prop="createTime"
label="接收时间"
min-width="140px"
fixed
>
<template slot-scope="scope">
<span v-if="scope.row.lastLeadPulls !== null">
{{ scope.row.lastLeadPulls.createTime }}</span
>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column prop="funcCode" label="相位">
<template slot-scope="scope">
<span v-if="scope.row.lastLeadPulls !== null">
<span v-if="scope.row.lastLeadPulls.phase !== ''">
{{ scope.row.lastLeadPulls.phase }}</span
><span v-else> - </span>
</span>
<span v-else> - </span>
</template>
</el-table-column>
<!-- <el-table-column prop="funcCode" label="功能单元识别码">
<template slot-scope="scope">
<span v-if="scope.row.lastLeadPulls !== null">
<span v-if="scope.row.lastLeadPulls.funcCode">
{{ scope.row.lastLeadPulls.funcCode }}</span
><span v-else>-</span>
</span>
<span v-else> - </span>
</template>
</el-table-column> -->
<el-table-column
prop="equalIcethickness"
label="等值覆冰厚度(mm)"
>
<template slot-scope="scope">
<span v-if="scope.row.lastLeadPulls !== null">
<span
v-if="scope.row.lastLeadPulls.equalIcethickness != 255"
>
{{
scope.row.lastLeadPulls.equalIcethickness.toFixed(1)
}}</span
><span v-else> - </span>
</span>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column prop="tension" label="综合悬挂载荷(N)">
<template slot-scope="scope">
<span v-if="scope.row.lastLeadPulls !== null">
<span v-if="scope.row.lastLeadPulls.tension != 255">
{{ scope.row.lastLeadPulls.tension }}</span
><span v-else> - </span>
</span>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column <el-table-column
prop="updateTime" prop="tensionDifference"
label="时间" label="不均衡张力差(N)"
min-width="120px"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.lastLeadPulls !== null"> <span v-if="scope.row.lastLeadPulls !== null">
<span
v-if="scope.row.lastLeadPulls.tensionDifference != 255"
>
{{
scope.row.lastLeadPulls.tensionDifference.toFixed(1)
}}</span
><span v-else> - </span>
</span>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column prop="tSensorNum" label="传感器个数">
<template slot-scope="scope">
<span v-if="scope.row.lastLeadPulls !== null">
<span v-if="scope.row.lastLeadPulls.tSensorNum != null">
{{ scope.row.lastLeadPulls.tSensorNum }}</span
><span v-else> - </span>
</span>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column prop="maxpullPull" label="拉力1(N)">
<template slot-scope="scope">
<span v-if="scope.row.lastLeadPulls !== null">
<span v-if="scope.row.lastLeadPulls.maxpullPull != 255">
{{
scope.row.lastLeadPulls.maxpullPull.toFixed(1)
}}</span
><span v-else> - </span>
</span>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column prop="maxpullWind" label="横向偏斜角1">
<template slot-scope="scope">
<span v-if="scope.row.lastLeadPulls !== null">
<span v-if="scope.row.lastLeadPulls.maxpullWind != 255">
{{
scope.row.lastLeadPulls.maxpullWind.toFixed(2)
}}</span
><span v-else> - </span>
</span>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column prop="maxpullTilt" label="顺向偏斜角1">
<template slot-scope="scope">
<span v-if="scope.row.lastLeadPulls !== null">
<span v-if="scope.row.lastLeadPulls.maxpullTilt != 255">
{{
scope.row.lastLeadPulls.maxpullTilt.toFixed(2)
}}</span
><span v-else> - </span>
</span>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column prop="minpullPull" label="拉力2(N)">
<template slot-scope="scope">
<span v-if="scope.row.lastLeadPulls !== null">
<span v-if="scope.row.lastLeadPulls.minpullPull != 255">
{{
scope.row.lastLeadPulls.minpullPull.toFixed(1)
}}</span
><span v-else> - </span>
</span>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column prop="minpullWind" label="横向偏斜角2">
<template slot-scope="scope">
<span v-if="scope.row.lastLeadPulls !== null">
<span v-if="scope.row.lastLeadPulls.minpullWind != 255">
{{
scope.row.lastLeadPulls.minpullWind.toFixed(2)
}}</span
><span v-else> - </span>
</span>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column prop="minpullTilt" label="顺向偏斜角2">
<template slot-scope="scope">
<span v-if="scope.row.lastLeadPulls !== null">
<span v-if="scope.row.lastLeadPulls.minpullTilt != 255">
{{
scope.row.lastLeadPulls.minpullTilt.toFixed(2)
}}</span
><span v-else> - </span>
</span>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column prop="maxwindPull" label="拉力3(N)">
<template slot-scope="scope">
<span v-if="scope.row.lastLeadPulls !== null">
<span v-if="scope.row.lastLeadPulls.maxwindPull != 255">
{{
scope.row.lastLeadPulls.maxwindPull.toFixed(1)
}}</span
><span v-else> - </span>
</span>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column prop="maxwindWind" label="横向偏斜角3">
<template slot-scope="scope">
<span v-if="scope.row.lastLeadPulls !== null">
<span v-if="scope.row.lastLeadPulls.maxwindWind != 255">
{{
scope.row.lastLeadPulls.maxwindWind.toFixed(2)
}}</span
><span v-else> - </span>
</span>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column prop="maxwindTilt" label="顺向偏斜角3">
<template slot-scope="scope">
<span v-if="scope.row.lastLeadPulls !== null">
<span v-if="scope.row.lastLeadPulls.maxwindTilt != 255">
{{ {{
$moment( scope.row.lastLeadPulls.maxwindTilt.toFixed(2)
scope.row.lastLeadPulls.updateTime * 1000
).format("YYYY-MM-DD HH:mm:ss")
}}</span }}</span
><span v-else> - </span>
</span>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column prop="windSpeed" label="瞬时风速">
<template slot-scope="scope">
<span v-if="scope.row.lastLeadPulls !== null">
<span
v-if="
scope.row.lastLeadPulls.windSpeed !== null &&
scope.row.lastLeadPulls.windSpeed !== 255
"
> >
{{ scope.row.lastLeadPulls.windSpeed.toFixed(2) }}</span
><span v-else> - </span>
</span>
<span v-else> - </span> <span v-else> - </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="funcCode" label="功能单元识别码"> <el-table-column prop="windDirection" label="瞬时风向">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.lastLeadPulls !== null"> <span v-if="scope.row.lastLeadPulls !== null">
<span <span
v-if=" v-if="
scope.row.lastLeadPulls.phase !== '' && scope.row.lastLeadPulls.windDirection !== null &&
scope.row.lastLeadPulls.funcCode scope.row.lastLeadPulls.windDirection !== 255
" "
> >
{{ scope.row.lastLeadPulls.phase }}({{ {{
scope.row.lastLeadPulls.funcCode scope.row.lastLeadPulls.windDirection.toFixed(2)
}})</span }}</span
><span v-else-if="scope.row.lastLeadPulls.funcCode" ><span v-else> - </span>
>({{ scope.row.lastLeadPulls.funcCode }})</span </span>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column prop="airTemperature" label="气温">
<template slot-scope="scope">
<span v-if="scope.row.lastLeadPulls !== null">
<span
v-if="
scope.row.lastLeadPulls.airTemperature !== null &&
scope.row.lastLeadPulls.airTemperature !== 255
"
> >
{{
scope.row.lastLeadPulls.airTemperature.toFixed(2)
}}</span
><span v-else> - </span>
</span> </span>
<span v-else> - </span> <span v-else> - </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="maxpullPull" label="最大拉力(Kg)"> <el-table-column prop="humidity" label="湿度">
<template slot-scope="scope">
<span v-if="scope.row.lastLeadPulls !== null">
<span
v-if="
scope.row.lastLeadPulls.humidity != null &&
scope.row.lastLeadPulls.humidity !== 255
"
>
{{ scope.row.lastLeadPulls.humidity.toFixed(2) }}</span
><span v-else> - </span>
</span>
<span v-else> - </span>
</template>
</el-table-column>
<!-- <el-table-column prop="maxpullPull" label="最大拉力(Kg)">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.lastLeadPulls !== null"> <span v-if="scope.row.lastLeadPulls !== null">
<span v-if="scope.row.lastLeadPulls.maxpullPull != 65535"> <span v-if="scope.row.lastLeadPulls.maxpullPull != 65535">
@ -284,7 +527,7 @@
</span> </span>
<span v-else> - </span> <span v-else> - </span>
</template> </template>
</el-table-column> </el-table-column> -->
</el-table> </el-table>
<el-table <el-table
v-else v-else
@ -296,21 +539,243 @@
<el-table-column <el-table-column
prop="cmdid" prop="cmdid"
label="监测终端编号" label="监测终端编号"
min-width="146px"
fixed
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
prop="updateTime" prop="updateDate"
label="时间" label="采集时间"
min-width="120px" min-width="140px"
fixed
>
</el-table-column>
<el-table-column
prop="createTime"
label="接收时间"
min-width="140px"
fixed
> >
</el-table-column>
<el-table-column prop="funcCode" label="相位">
<template slot-scope="scope"> <template slot-scope="scope">
{{ <span v-if="scope.row !== null">
$moment(scope.row.updateTime * 1000).format( <span v-if="scope.row.phase !== ''">
"YYYY-MM-DD HH:mm:ss" {{ scope.row.phase }}</span
) ><span v-else> - </span>
}} </span>
<span v-else> - </span>
</template>
</el-table-column>
<!-- <el-table-column prop="funcCode" label="功能单元识别码">
<template slot-scope="scope">
<span v-if="scope.row !== null">
<span v-if="scope.row.funcCode">
{{ scope.row.funcCode }}</span
><span v-else>-</span>
</span>
<span v-else> - </span>
</template>
</el-table-column> -->
<el-table-column
prop="equalIcethickness"
label="等值覆冰厚度(mm)"
>
<template slot-scope="scope">
<span v-if="scope.row !== null">
<span v-if="scope.row.equalIcethickness != 255">
{{ scope.row.equalIcethickness.toFixed(1) }}</span
><span v-else> - </span>
</span>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column prop="tension" label="综合悬挂载荷(N)">
<template slot-scope="scope">
<span v-if="scope.row !== null">
<span v-if="scope.row.tension != 255">
{{ scope.row.tension }}</span
><span v-else> - </span>
</span>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column
prop="tensionDifference"
label="不均衡张力差(N)"
>
<template slot-scope="scope">
<span v-if="scope.row !== null">
<span v-if="scope.row.tensionDifference != 255">
{{ scope.row.tensionDifference.toFixed(1) }}</span
><span v-else> - </span>
</span>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column prop="tSensorNum" label="传感器个数">
<template slot-scope="scope">
<span v-if="scope.row !== null">
<span v-if="scope.row.tSensorNum != null">
{{ scope.row.tSensorNum }}</span
><span v-else> - </span>
</span>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column prop="maxpullPull" label="拉力1(N)">
<template slot-scope="scope">
<span v-if="scope.row !== null">
<span v-if="scope.row.maxpullPull != 255">
{{ scope.row.maxpullPull.toFixed(1) }}</span
><span v-else> - </span>
</span>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column prop="maxpullWind" label="横向偏斜角1">
<template slot-scope="scope">
<span v-if="scope.row !== null">
<span v-if="scope.row.maxpullWind != 255">
{{ scope.row.maxpullWind.toFixed(2) }}</span
><span v-else> - </span>
</span>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column prop="maxpullTilt" label="顺向偏斜角1">
<template slot-scope="scope">
<span v-if="scope.row !== null">
<span v-if="scope.row.maxpullTilt != 255">
{{ scope.row.maxpullTilt.toFixed(2) }}</span
><span v-else> - </span>
</span>
<span v-else> - </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="funcCode" label="功能单元识别码">
<el-table-column prop="minpullPull" label="拉力2(N)">
<template slot-scope="scope">
<span v-if="scope.row !== null">
<span v-if="scope.row.minpullPull != 255">
{{ scope.row.minpullPull.toFixed(1) }}</span
><span v-else> - </span>
</span>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column prop="minpullWind" label="横向偏斜角2">
<template slot-scope="scope">
<span v-if="scope.row !== null">
<span v-if="scope.row.minpullWind != 255">
{{ scope.row.minpullWind.toFixed(2) }}</span
><span v-else> - </span>
</span>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column prop="minpullTilt" label="顺向偏斜角2">
<template slot-scope="scope">
<span v-if="scope.row !== null">
<span v-if="scope.row.minpullTilt != 255">
{{ scope.row.minpullTilt.toFixed(2) }}</span
><span v-else> - </span>
</span>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column prop="maxwindPull" label="拉力3(N)">
<template slot-scope="scope">
<span v-if="scope.row !== null">
<span v-if="scope.row.maxwindPull != 255">
{{ scope.row.maxwindPull.toFixed(1) }}</span
><span v-else> - </span>
</span>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column prop="maxwindWind" label="横向偏斜角3">
<template slot-scope="scope">
<span v-if="scope.row !== null">
<span v-if="scope.row.maxwindWind != 255">
{{ scope.row.maxwindWind.toFixed(2) }}</span
><span v-else> - </span>
</span>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column prop="maxwindTilt" label="顺向偏斜角3">
<template slot-scope="scope">
<span v-if="scope.row !== null">
<span v-if="scope.row.maxwindTilt != 255">
{{ scope.row.maxwindTilt.toFixed(2) }}</span
><span v-else> - </span>
</span>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column prop="windSpeed" label="瞬时风速">
<template slot-scope="scope">
<span v-if="scope.row !== null">
<span
v-if="
scope.row.windSpeed !== null &&
scope.row.windSpeed !== 255
"
>
{{ scope.row.windSpeed.toFixed(2) }}</span
><span v-else> - </span>
</span>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column prop="windDirection" label="瞬时风向">
<template slot-scope="scope">
<span v-if="scope.row !== null">
<span
v-if="
scope.row.windDirection !== null &&
scope.row.windDirection !== 255
"
>
{{ scope.row.windDirection.toFixed(2) }}</span
><span v-else> - </span>
</span>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column prop="airTemperature" label="气温">
<template slot-scope="scope">
<span v-if="scope.row !== null">
<span
v-if="
scope.row.airTemperature !== null &&
scope.row.airTemperature !== 255
"
>
{{ scope.row.airTemperature.toFixed(2) }}</span
><span v-else> - </span>
</span>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column prop="humidity" label="湿度">
<template slot-scope="scope">
<span v-if="scope.row !== null">
<span
v-if="
scope.row.humidity != null &&
scope.row.humidity !== 255
"
>
{{ scope.row.humidity.toFixed(2) }}</span
><span v-else> - </span>
</span>
<span v-else> - </span>
</template>
</el-table-column>
<!-- <el-table-column prop="funcCode" label="功能单元识别码">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.phase !== '' && scope.row.funcCode"> <span v-if="scope.row.phase !== '' && scope.row.funcCode">
{{ scope.row.phase }}({{ scope.row.funcCode }})</span {{ scope.row.phase }}({{ scope.row.funcCode }})</span
@ -478,7 +943,7 @@
</span> </span>
<span v-else> - </span> <span v-else> - </span>
</template> </template>
</el-table-column> </el-table-column> -->
</el-table> </el-table>
</div> </div>
<div class="pageNation" v-if="!echartsShow"> <div class="pageNation" v-if="!echartsShow">

@ -0,0 +1,198 @@
<template>
<div class="icingBox">
<div class="icingContain">
<leftTree ref="sideTree"></leftTree>
<div class="rightTable">
<div class="dataBox">
<div class="childBox">
<div class="searchBox" ref="searchref">
<el-form
:inline="true"
:model="formdata"
class="demo-form-inline"
>
<el-form-item label="开始日期">
<el-date-picker
v-model="formdata.starttime"
type="date"
placeholder="开始日期"
>
</el-date-picker>
</el-form-item>
<el-form-item label="结束日期">
<el-date-picker
@change="changedate"
v-model="formdata.endtime"
type="date"
placeholder="结束日期"
class="ml10"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit"></el-button>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="exportExcl"
>导出数据</el-button
>
</el-form-item>
<el-form-item>
<el-button
v-if="!echartsShow"
type="primary"
@click="lookLineCharts"
>曲线图</el-button
>
<el-button
v-if="echartsShow"
type="primary"
@click="lookTableCharts"
>列表数据</el-button
>
</el-form-item>
</el-form>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import leftTree from "../components/leftTree.vue";
import {
LeadPullJoggle,
leadpullsListJoggle,
exportJoggle,
} from "@/utils/api/iceApi";
export default {
name: "icing",
components: {
leftTree,
},
data() {
return {
echartsShow: false,
formdata: {},
paramsData: null,
};
},
watch: {
endtime(newVal) {
if (newVal) {
const date = new Date(newVal);
date.setHours(23);
date.setMinutes(59);
date.setSeconds(59);
this.formdata.endtime = date.getTime();
}
},
},
created() {
var that = this;
document.onkeydown = function (e) {
var key = window.event.keyCode;
if (key === 13) {
that.onSubmit(); //
}
};
this.$set(
this.formdata,
"starttime",
new Date(new Date().toLocaleDateString()).getTime()
);
const currentDate = new Date(); //
currentDate.setHours(23); // 23
currentDate.setMinutes(59); // 59
currentDate.setSeconds(59); // 59
this.$set(this.formdata, "endtime", currentDate.getTime());
},
mounted() {},
methods: {
//
changedate() {
console.log(new Date(this.formdata.endtime));
const currentDate = new Date(this.formdata.endtime); //
currentDate.setHours(23); // 23
currentDate.setMinutes(59); // 59
currentDate.setSeconds(59); // 59
this.formdata.endtime = currentDate;
console.log("结束时间", this.formdata.endtime);
},
//tree
getCurrentData(data) {
console.log("执行父组件", data);
this.paramsData = data;
let pullParams;
console.log(data);
const sTime = Math.floor(this.formdata.starttime / 1000);
const eTime = Math.floor(this.formdata.endtime / 1000);
if (data.dyValue) {
console.log("电压-公司");
pullParams = {
devType: "2",
dyId: data.id,
pageNum: 1,
pageSize: this.pageSize,
start: sTime,
end: eTime,
};
this.getIcingData(pullParams);
}
},
//
onSubmit() {},
exportExcl() {
const sTime = Math.floor(this.formdata.starttime / 1000);
const eTime = Math.floor(this.formdata.endtime / 1000);
window.location.href =
"/api/xymanager/leadpulls/export?+" +
"lineId=" +
this.paramsData.lineid +
"&termId=" +
this.paramsData.id +
"&towerId=" +
this.paramsData.towerid +
"&start=" +
sTime +
"&end=" +
eTime;
},
//
lookTableCharts() {},
//线
lookLineCharts() {},
},
};
</script>
<style lang="less">
.icingBox {
width: calc(100% - 24px);
height: calc(100% - 24px);
padding: 12px 12px;
background: #fff;
.icingContain {
display: flex;
height: 100%;
box-sizing: border-box;
background: #fff;
border: 1px solid #ddd;
border-radius: 4px;
}
.rightTable {
display: flex;
width: 100%;
height: 100%;
flex: 1;
overflow: hidden;
border-left: 1px solid #ddd;
.dataBox {
width: calc(100% - 24px);
height: calc(100% - 24px);
padding: 12px 12px;
background: #fff;
}
}
}
</style>

File diff suppressed because it is too large Load Diff

@ -11,18 +11,38 @@
v-loading="loading" v-loading="loading"
height="calc(100% - 40px)" height="calc(100% - 40px)"
> >
<el-table-column prop="lineName" label="线路"> </el-table-column> <el-table-column prop="lineName" label="线路" min-width="120px">
<el-table-column prop="towerName" label="杆塔"> </el-table-column> </el-table-column>
<el-table-column prop="cmdid" label="终端"> </el-table-column> <el-table-column
prop="towerName"
label="杆塔"
min-width="120px"
show-overflow-tooltip
>
</el-table-column>
<el-table-column prop="cmdid" label="终端" min-width="140px">
</el-table-column>
<el-table-column prop="updateTime" label="时间"> <el-table-column
prop="updateTime"
label="采集时间"
min-width="140px"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.lastWeathers !== null"> <span v-if="scope.row.lastWeathers !== null">
{{ {{ scope.row.lastWeathers.updateDate }}</span
$moment(scope.row.lastWeathers.updateTime * 1000).format( >
"YYYY-MM-DD HH:mm:ss" <span v-else> - </span>
) </template>
}}</span </el-table-column>
<el-table-column
prop="createTime"
label="接收时间"
min-width="140px"
>
<template slot-scope="scope">
<span v-if="scope.row.lastWeathers !== null">
{{ scope.row.lastWeathers.createTime }}</span
> >
<span v-else> - </span> <span v-else> - </span>
</template> </template>
@ -50,39 +70,33 @@
<span v-else> - </span> <span v-else> - </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="maxWindSpeed" label="最大风速(m/s)"> <el-table-column prop="precipitation" label="10分钟降雨量(mm)">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.lastWeathers !== null">{{ <span v-if="scope.row.lastWeathers !== null">{{
scope.row.lastWeathers.maxWindSpeed.toFixed(1) scope.row.lastWeathers.precipitation.toFixed(1)
}}</span> }}</span>
<span v-else> - </span> <span v-else> - </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="windDirection" label="瞬时风向(°)"> <el-table-column
<template slot-scope="scope"> prop="precipitationIntensity"
<span label="降雨强度(mm/min)"
v-if="
scope.row.lastWeathers !== null &&
scope.row.lastWeathers.windDirection !== null
"
>{{ scope.row.lastWeathers.windDirection.toFixed(1) }}</span
> >
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column prop="precipitation" label="雨量(mm/hour)">
<template slot-scope="scope"> <template slot-scope="scope">
<span <span
v-if=" v-if="
scope.row.lastWeathers !== null && scope.row.lastWeathers !== null &&
scope.row.lastWeathers.precipitation != 255 scope.row.lastWeathers.precipitationIntensity != 255
" "
>{{ scope.row.lastWeathers.precipitation.toFixed(1) }}</span >{{
scope.row.lastWeathers.precipitationIntensity.toFixed(1)
}}</span
> >
<span v-else> - </span> <span v-else> - </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="airPressure" label="气压(hPa(百帕))">
<el-table-column prop="airPressure" label="气压(hPa)">
<template slot-scope="scope"> <template slot-scope="scope">
<span <span
v-if=" v-if="
@ -111,7 +125,49 @@
<span v-else> - </span> <span v-else> - </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作"> <el-table-column prop="avgWindSpeed10min" label="10分钟平均风速">
<template slot-scope="scope">
<span v-if="scope.row.lastWeathers !== null">{{
scope.row.lastWeathers.avgWindSpeed10min.toFixed(1)
}}</span>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column prop="avgWindDir10min" label="10分钟平均风向">
<template slot-scope="scope">
<span v-if="scope.row.lastWeathers !== null">{{
scope.row.lastWeathers.avgWindDir10min
}}</span>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column prop="maxWindSpeed" label="最大风速(m/s)">
<template slot-scope="scope">
<span v-if="scope.row.lastWeathers !== null">{{
scope.row.lastWeathers.maxWindSpeed.toFixed(1)
}}</span>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column prop="extremeWindSpeed" label="极大风速(m/s)">
<template slot-scope="scope">
<span v-if="scope.row.lastWeathers !== null">{{
scope.row.lastWeathers.extremeWindSpeed.toFixed(1)
}}</span>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column prop="maxWindSpeed" label="标准风速(m/s)">
<template slot-scope="scope">
<span v-if="scope.row.lastWeathers !== null">{{
scope.row.lastWeathers.standardWindSpeed.toFixed(1)
}}</span>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
type="text" type="text"
@ -208,84 +264,81 @@
v-loading="loading" v-loading="loading"
height="calc(100% - 2px)" height="calc(100% - 2px)"
> >
<el-table-column prop="updateTime" label="时间" width="138px"> <el-table-column
prop="updateTime"
label="采集时间"
min-width="140px"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.updateTime"> <span v-if="scope.row !== null">
{{ {{ scope.row.updateDate }}</span
$moment(scope.row.updateTime * 1000).format(
"YYYY-MM-DD HH:mm:ss"
)
}}</span
> >
<span v-else> - </span> <span v-else> - </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="airTemperature" label="温度(℃)"> <el-table-column
prop="createTime"
label="接收时间"
min-width="140px"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span <span v-if="scope.row !== null">
v-if=" {{ scope.row.createTime }}</span
scope.row.airTemperature !== null &&
scope.row.airTemperature != 255
"
>{{ scope.row.airTemperature.toFixed(1) }}</span
> >
<span v-else> - </span> <span v-else> - </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="humidity" label="湿度(%RH)"> <el-table-column label="温度(℃)">
<template slot-scope="scope"> <template slot-scope="scope">
<span <span v-if="scope.row !== null">{{
v-if=" scope.row.airTemperature.toFixed(1)
scope.row.humidity !== null && scope.row.humidity != 255 }}</span>
"
>{{ scope.row.humidity.toFixed(1) }}</span
>
<span v-else> - </span> <span v-else> - </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="maxWindSpeed" label="瞬时风速(m/s)"> <el-table-column prop="humidity" label="湿度(%RH)">
<template slot-scope="scope"> <template slot-scope="scope">
<span <span v-if="scope.row !== null"
><span
v-if=" v-if="
scope.row.maxWindSpeed !== null && scope.row.humidity != 65535 &&
scope.row.maxWindSpeed != 255 scope.row.humidity != 255
" "
>{{ scope.row.maxWindSpeed.toFixed(1) }}</span
> >
<span v-else> - </span> {{ scope.row.humidity.toFixed(1) }}</span
</template></el-table-column ><span v-else> - </span></span
> >
<el-table-column prop="windDirection" label="瞬时风向(°)"> <span v-else> - </span>
</template>
</el-table-column>
<el-table-column prop="precipitation" label="10分钟降雨量(mm)">
<template slot-scope="scope"> <template slot-scope="scope">
<span <span v-if="scope.row !== null">{{
v-if=" scope.row.precipitation.toFixed(1)
scope.row.windDirection !== null && }}</span>
scope.row.windDirection != 255
"
>{{ scope.row.windDirection.toFixed(1) }}</span
>
<span v-else> - </span> <span v-else> - </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="precipitation" label="雨量(mm/hour)"> <el-table-column
prop="precipitationIntensity"
label="降雨强度(mm/min)"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span <span
v-if=" v-if="
scope.row.precipitation !== null && scope.row !== null &&
scope.row.precipitation != 255 scope.row.precipitationIntensity != 255
" "
>{{ scope.row.precipitation.toFixed(1) }}</span >{{ scope.row.precipitationIntensity.toFixed(1) }}</span
> >
<span v-else> - </span> <span v-else> - </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="airPressure" label="气压(hPa(百帕))">
<el-table-column prop="airPressure" label="气压(hPa)">
<template slot-scope="scope"> <template slot-scope="scope">
<span <span
v-if=" v-if="scope.row !== null && scope.row.airPressure != 255"
scope.row.airPressure !== null &&
scope.row.airPressure != 255
"
>{{ scope.row.airPressure.toFixed(1) }}</span >{{ scope.row.airPressure.toFixed(1) }}</span
> >
<span v-else> - </span> <span v-else> - </span>
@ -293,59 +346,63 @@
</el-table-column> </el-table-column>
<el-table-column prop="radiationIntensity" label="日照(W/m2)"> <el-table-column prop="radiationIntensity" label="日照(W/m2)">
<template slot-scope="scope"> <template slot-scope="scope">
<span <span v-if="scope.row !== null"
><span
v-if=" v-if="
scope.row.radiationIntensity !== null && scope.row.radiationIntensity != 255 &&
scope.row.radiationIntensity != 255 scope.row.radiationIntensity != 65535
" "
>{{ scope.row.radiationIntensity.toFixed(1) }}</span >
{{ scope.row.radiationIntensity.toFixed(0) }}</span
><span v-else> - </span></span
> >
<span v-else> - </span> <span v-else> - </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="avgWindDir1min" prop="avgWindSpeed10min"
label="1分钟平均风速(m/s)" label="10分钟平均风速"
></el-table-column>
<el-table-column
prop="avgWindSpeed1min"
label="1分钟平均风向(°)"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span <span v-if="scope.row !== null">{{
v-if=" scope.row.avgWindSpeed10min.toFixed(1)
scope.row.avgWindSpeed1min !== null && }}</span>
scope.row.avgWindSpeed1min != 255
"
>{{ scope.row.avgWindSpeed1min.toFixed(1) }}</span
>
<span v-else> - </span> <span v-else> - </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="avgWindDir10min" label="10分钟平均风向">
prop="avgWindSpeed10min"
label="10分钟平均风速(m/s)"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span> {{ scope.row.avgWindSpeed10min.toFixed(1) }} </span> <span v-if="scope.row !== null">{{
scope.row.avgWindDir10min
}}</span>
<span v-else> - </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column
prop="avgWindDir10min" <el-table-column prop="maxWindSpeed" label="最大风速(m/s)">
label="10分钟平均风向(°)"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.avgWindDir10min !== 65535"> <span v-if="scope.row !== null">{{
{{ scope.row.avgWindDir10min.toFixed(1) }}</span scope.row.maxWindSpeed.toFixed(1)
> }}</span>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column prop="extremeWindSpeed" label="极大风速(m/s)">
<template slot-scope="scope">
<span v-if="scope.row !== null">{{
scope.row.extremeWindSpeed.toFixed(1)
}}</span>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column prop="maxWindSpeed" label="标准风速(m/s)">
<template slot-scope="scope">
<span v-if="scope.row !== null">{{
scope.row.standardWindSpeed.toFixed(1)
}}</span>
<span v-else> - </span> <span v-else> - </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="maxWindSpeed" label="10分钟最大风速(m/s)"
><template slot-scope="scope">
<span> {{ scope.row.maxWindSpeed.toFixed(1) }} </span>
</template></el-table-column
>
</el-table> </el-table>
</div> </div>
<div class="pageNation"> <div class="pageNation">

@ -0,0 +1,914 @@
<template>
<div class="weatherBox">
<div class="weatherContain">
<leftTree ref="sideTree"></leftTree>
<div class="rightTable">
<div class="dataBox">
<div class="fatherTableShowBox" v-if="!childFlag">
<el-table
:data="tableData"
style="width: 100%"
v-loading="loading"
height="calc(100% - 40px)"
>
<el-table-column prop="lineName" label="线路"> </el-table-column>
<el-table-column prop="towerName" label="杆塔"> </el-table-column>
<el-table-column prop="cmdid" label="终端"> </el-table-column>
<el-table-column prop="updateTime" label="时间">
<template slot-scope="scope">
<span v-if="scope.row.lastWeathers !== null">
{{
$moment(scope.row.lastWeathers.updateTime * 1000).format(
"YYYY-MM-DD HH:mm:ss"
)
}}</span
>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column label="温度(℃)">
<template slot-scope="scope">
<span v-if="scope.row.lastWeathers !== null">{{
scope.row.lastWeathers.airTemperature.toFixed(1)
}}</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.lastWeathers !== null"
><span
v-if="
scope.row.lastWeathers.humidity != 65535 &&
scope.row.lastWeathers.humidity != 255
"
>
{{ scope.row.lastWeathers.humidity.toFixed(1) }}</span
><span v-else> - </span></span
>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column prop="maxWindSpeed" label="最大风速(m/s)">
<template slot-scope="scope">
<span v-if="scope.row.lastWeathers !== null">{{
scope.row.lastWeathers.maxWindSpeed.toFixed(1)
}}</span>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column prop="windDirection" label="瞬时风向(°)">
<template slot-scope="scope">
<span
v-if="
scope.row.lastWeathers !== null &&
scope.row.lastWeathers.windDirection !== null
"
>{{ scope.row.lastWeathers.windDirection.toFixed(1) }}</span
>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column prop="precipitation" label="雨量(mm/hour)">
<template slot-scope="scope">
<span
v-if="
scope.row.lastWeathers !== null &&
scope.row.lastWeathers.precipitation != 255
"
>{{ scope.row.lastWeathers.precipitation.toFixed(1) }}</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.lastWeathers !== null &&
scope.row.lastWeathers.airPressure != 255
"
>{{ scope.row.lastWeathers.airPressure.toFixed(1) }}</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.lastWeathers !== null"
><span
v-if="
scope.row.lastWeathers.radiationIntensity != 255 &&
scope.row.lastWeathers.radiationIntensity != 65535
"
>
{{
scope.row.lastWeathers.radiationIntensity.toFixed(0)
}}</span
><span v-else> - </span></span
>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button
type="text"
@click="moreDataClick(scope.row)"
v-if="scope.row.lastWeathers !== null"
>更多历史数据</el-button
>
<span v-else> </span>
</template>
</el-table-column>
</el-table>
<div class="pageNation">
<el-pagination
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
:current-page="page"
:page-size="pageSize"
layout="sizes, prev, pager, next, jumper,total"
:total="total"
>
</el-pagination>
</div>
</div>
<div class="childBox" v-else>
<div class="searchBox" ref="searchref">
<el-form
:inline="true"
:model="formdata"
class="demo-form-inline"
>
<el-form-item label="开始日期">
<el-date-picker
v-model="formdata.starttime"
type="date"
placeholder="开始日期"
>
</el-date-picker>
</el-form-item>
<el-form-item label="结束日期">
<el-date-picker
@change="changedate"
v-model="formdata.endtime"
type="date"
placeholder="结束日期"
class="ml10"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit"></el-button>
</el-form-item>
</el-form>
</div>
<div class="termalBox">
<p>
<span class="text"
>线路:{{ childMsg.lineName || childMsg.lineName }}</span
>
<span class="text"
>杆塔:{{ childMsg.towerName || childMsg.name }}</span
>
<span class="text">终端:{{ childMsg.cmdid }}</span>
</p>
<div class="gropBtn">
<el-button type="text" @click="onWdLine" icon="el-icon-odometer"
>温度趋势</el-button
>
<el-button
type="text"
@click="onSdLine"
icon="el-icon-heavy-rain"
>湿度趋势</el-button
>
</div>
</div>
<!-- <div class="echartsBox">
<div class="btnbox">
<el-button type="primary" @click="onWdLine"
>温度变化趋势</el-button
>
<el-button type="primary" @click="onSdLine"
>湿度变化趋势</el-button
>
<el-button type="primary" @click="onHidden"></el-button>
</div>
<div id="wDechart" class="chartClass" v-show="wdFlag"></div>
<div id="sDechart" class="chartClass" v-show="sdFlag"></div>
</div> -->
<div class="childTableShowBox">
<el-table
:data="childTableDate"
style="width: 100%"
v-loading="loading"
height="calc(100% - 2px)"
>
<el-table-column prop="updateTime" label="时间" width="138px">
<template slot-scope="scope">
<span v-if="scope.row.updateTime">
{{
$moment(scope.row.updateTime * 1000).format(
"YYYY-MM-DD HH:mm:ss"
)
}}</span
>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column prop="airTemperature" label="温度(℃)">
<template slot-scope="scope">
<span
v-if="
scope.row.airTemperature !== null &&
scope.row.airTemperature != 255
"
>{{ scope.row.airTemperature.toFixed(1) }}</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 !== null && scope.row.humidity != 255
"
>{{ scope.row.humidity.toFixed(1) }}</span
>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column prop="maxWindSpeed" label="瞬时风速(m/s)">
<template slot-scope="scope">
<span
v-if="
scope.row.maxWindSpeed !== null &&
scope.row.maxWindSpeed != 255
"
>{{ scope.row.maxWindSpeed.toFixed(1) }}</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 !== null &&
scope.row.windDirection != 255
"
>{{ scope.row.windDirection.toFixed(1) }}</span
>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column prop="precipitation" label="雨量(mm/hour)">
<template slot-scope="scope">
<span
v-if="
scope.row.precipitation !== null &&
scope.row.precipitation != 255
"
>{{ scope.row.precipitation.toFixed(1) }}</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 !== null &&
scope.row.airPressure != 255
"
>{{ scope.row.airPressure.toFixed(1) }}</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 !== null &&
scope.row.radiationIntensity != 255
"
>{{ scope.row.radiationIntensity.toFixed(1) }}</span
>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column
prop="avgWindDir1min"
label="1分钟平均风速(m/s)"
></el-table-column>
<el-table-column
prop="avgWindSpeed1min"
label="1分钟平均风向(°)"
>
<template slot-scope="scope">
<span
v-if="
scope.row.avgWindSpeed1min !== null &&
scope.row.avgWindSpeed1min != 255
"
>{{ scope.row.avgWindSpeed1min.toFixed(1) }}</span
>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column
prop="avgWindSpeed10min"
label="10分钟平均风速(m/s)"
>
<template slot-scope="scope">
<span> {{ scope.row.avgWindSpeed10min.toFixed(1) }} </span>
</template>
</el-table-column>
<el-table-column
prop="avgWindDir10min"
label="10分钟平均风向(°)"
>
<template slot-scope="scope">
<span v-if="scope.row.avgWindDir10min !== 65535">
{{ scope.row.avgWindDir10min.toFixed(1) }}</span
>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column prop="maxWindSpeed" label="10分钟最大风速(m/s)"
><template slot-scope="scope">
<span> {{ scope.row.maxWindSpeed.toFixed(1) }} </span>
</template></el-table-column
>
</el-table>
</div>
<div class="pageNation">
<el-pagination
@current-change="handlechildCurrentChange"
@size-change="handlechildSizeChange"
:current-page="childpage"
:page-size="childpageSize"
layout="sizes, prev, pager, next, jumper,total"
:total="childtotal"
>
</el-pagination>
</div>
<el-dialog title="温度折线图" :visible.sync="wdFlag">
<div id="wDechart" class="chartClass"></div>
</el-dialog>
<el-dialog title="湿度折线图" :visible.sync="sdFlag">
<div id="sDechart" class="chartClass"></div>
</el-dialog>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import leftTree from "../components/leftTree";
import { weatherJoggle, weatherListJoggle } from "@/utils/api/iceApi";
export default {
name: "weather",
components: {
leftTree,
},
data() {
return {
loading: false,
childFlag: false,
tableData: [],
childTableDate: [],
formdata: {},
page: 1, //
pageSize: 20, //
total: 0, //
paramsData: "",
childpage: 1, //
childpageSize: 20, //
childtotal: 0, //
childParma: "",
childMsg: "",
echartsData: "", //echarts
wdFlag: false,
sdFlag: false,
};
},
created() {
var that = this;
document.onkeydown = function (e) {
var key = window.event.keyCode;
if (key === 13) {
that.onSubmit(); //
}
};
},
watch: {
endtime(newVal) {
if (newVal) {
const date = new Date(newVal);
date.setHours(23);
date.setMinutes(59);
date.setSeconds(59);
this.formdata.endtime = date.getTime();
}
},
},
mounted() {
//this.getWeatherData();
},
methods: {
getCurrentData(data) {
console.log("执行父组件", data);
this.paramsData = data;
let weatherParams;
console.log(data);
if (data.dyValue) {
console.log("电压-公司");
weatherParams = {
devType: "3",
dyId: data.id,
pageNum: 1,
pageSize: this.pageSize,
};
this.getWeatherData(weatherParams);
} else if (data.bsManufacturer) {
console.log("线路-电压");
weatherParams = {
devType: "3",
lineId: data.id,
pageNum: 1,
pageSize: this.pageSize,
};
this.getWeatherData(weatherParams);
} else {
console.log("装置-杆塔");
// weatherParams = {
// pageNum: 1,
// pageSize: this.pageSize,
// towerId: data.towerid,
// };
this.childpage = 1;
this.moreDataClick(data);
// this.getWeatherData(weatherParams);
}
//this.getAllData(data);
},
getWeatherData(data) {
console.log(data);
this.childFlag = false;
this.loading = true;
weatherJoggle(data)
.then((res) => {
console.log(res);
this.tableData = res.data.list;
this.total = res.data.total;
this.loading = false;
})
.catch((err) => {
console.log(err); //
});
},
//
handleCurrentChange(val) {
this.page = val;
let data = this.paramsData;
let weatherParams;
this.tableData = [];
if (data.dyValue) {
console.log("电压-公司");
weatherParams = {
devType: "3",
dyId: data.id,
pageNum: this.page,
pageSize: this.pageSize,
};
this.getWeatherData(weatherParams);
} else if (data.bsManufacturer) {
console.log("线路-电压");
weatherParams = {
devType: "3",
lineId: data.id,
pageNum: this.page,
pageSize: this.pageSize,
};
this.getWeatherData(weatherParams);
} else {
console.log("装置-杆塔");
weatherParams = {
pageNum: this.page,
pageSize: this.pageSize,
towerId: data.towerid,
};
this.getWeatherData(weatherParams);
}
//this.getCurrentData(this.paramsData);
},
//
handleSizeChange(val) {
this.pageSize = val;
this.tableData = [];
let data = this.paramsData;
let weatherParams;
this.tableData = [];
if (data.dyValue) {
console.log("电压-公司");
weatherParams = {
devType: "3",
dyId: data.id,
pageNum: this.page,
pageSize: this.pageSize,
};
this.getWeatherData(weatherParams);
} else if (data.bsManufacturer) {
console.log("线路-电压");
weatherParams = {
devType: "3",
lineId: data.id,
pageNum: this.page,
pageSize: this.pageSize,
};
this.getWeatherData(weatherParams);
} else {
console.log("装置-杆塔");
weatherParams = {
pageNum: this.page,
pageSize: this.pageSize,
towerId: data.towerid,
};
this.getWeatherData(weatherParams);
}
},
//
moreDataClick(row) {
this.childFlag = true;
console.log(row);
this.$set(
this.formdata,
"starttime",
new Date(new Date().toLocaleDateString()).getTime()
);
const currentDate = new Date(); //
currentDate.setHours(23); // 23
currentDate.setMinutes(59); // 59
currentDate.setSeconds(59); // 59
this.$set(this.formdata, "endtime", currentDate.getTime());
this.childParma = row;
this.getchildWeatherData(row);
},
//
onSubmit() {
this.getchildWeatherData(this.childParma);
},
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);
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.list;
this.childtotal = res.data.total;
this.loading = false;
//线
this.getAllData(row);
})
.catch((err) => {
console.log(err); //
});
},
getAllData(row) {
const sTime = Math.floor(this.formdata.starttime / 1000);
const eTime = Math.floor(this.formdata.endtime / 1000);
weatherListJoggle({
// lineId: row.lineId,
termId: row.id,
towerId: row.towerId,
start: sTime,
end: eTime,
pageNum: 1,
pageSize: 1000,
})
.then((res) => {
console.log(res);
this.echartsData = res.data.list;
})
.catch((err) => {
console.log(err); //
});
},
onWdLine() {
this.wdFlag = true;
this.sdFlag = false;
//线
this.getEchart4(this.echartsData);
},
onSdLine() {
this.wdFlag = false;
this.sdFlag = true;
this.getEchart5(this.echartsData);
},
onHidden() {
this.wdFlag = false;
this.sdFlag = false;
},
//
getEchart4(wd) {
this.$nextTick(() => {
this.$echarts.init(document.getElementById("wDechart"));
this.mywDechart = this.$echarts.init(
document.getElementById("wDechart")
);
console.log(wd);
var xData = [];
var yData = [];
xData = wd.map((item) =>
this.$moment(item.updateTime * 1000).format("YYYY-MM-DD HH:mm:ss")
);
yData = wd.map((item) => item.airTemperature);
let option = {
tooltip: {
trigger: "axis",
},
grid: {
//left: "6%", //
//right: "6%", //
bottom: "15%", //
//top: "2%", //
},
title: {
text: "温度变化趋势",
x: "center", //
textStyle: {
//
color: "#333", //
fontSize: 16, //
fontWeight: "normal",
},
},
toolbox: {
show: true,
feature: {
dataView: { readOnly: false },
magicType: { type: ["line", "bar"] },
restore: {},
saveAsImage: {},
},
},
dataZoom: [
{
show: true,
realtime: true,
start: 0,
end: 100,
},
{
type: "inside",
realtime: true,
start: 0,
end: 100,
},
],
xAxis: {
name: "时间", //
type: "category",
boundaryGap: false,
data: xData,
},
yAxis: {
name: "温度", //
type: "value",
axisLabel: {
formatter: "{value} °C",
},
},
series: [
{
name: "温度",
symbol: "none",
type: "line",
data: yData,
},
],
};
this.mywDechart.setOption(option);
window.addEventListener("resize", () => {
this.mywDechart.resize();
});
});
},
getEchart5(sd) {
this.$nextTick(() => {
this.$echarts.init(document.getElementById("sDechart"));
this.mysDechart = this.$echarts.init(
document.getElementById("sDechart")
);
console.log(sd);
var xData = [];
var yData = [];
xData = sd.map((item) =>
this.$moment(item.updateTime * 1000).format("YYYY-MM-DD HH:mm:ss")
);
yData = sd.map((item) => item.humidity);
let option = {
tooltip: {
trigger: "axis",
},
grid: {
//left: "6%", //
//right: "6%", //
bottom: "15%", //
//top: "2%", //
},
title: {
text: "湿度变化趋势",
x: "center", //
textStyle: {
//
color: "#333", //
fontSize: 16, //
fontWeight: "normal",
},
},
toolbox: {
show: true,
feature: {
dataView: { readOnly: false },
magicType: { type: ["line", "bar"] },
restore: {},
saveAsImage: {},
},
},
dataZoom: [
{
show: true,
realtime: true,
start: 0,
end: 100,
},
{
type: "inside",
realtime: true,
start: 0,
end: 100,
},
],
xAxis: {
name: "时间", //
type: "category",
boundaryGap: false,
data: xData,
},
yAxis: {
name: "湿度", //
type: "value",
axisLabel: {
formatter: "{value} %RH",
},
},
series: [
{
name: "湿度",
symbol: "none",
type: "line",
data: yData,
},
],
};
this.mysDechart.setOption(option);
window.addEventListener("resize", () => {
this.mysDechart.resize();
});
});
},
changedate() {
console.log(new Date(this.formdata.endtime));
const currentDate = new Date(this.formdata.endtime); //
currentDate.setHours(23); // 23
currentDate.setMinutes(59); // 59
currentDate.setSeconds(59); // 59
this.formdata.endtime = currentDate;
console.log("结束时间", this.formdata.endtime);
},
//child
handlechildCurrentChange(val) {
this.childpage = val;
this.childTableDate = [];
this.getchildWeatherData(this.childParma);
},
//child
handlechildSizeChange(val) {
this.childpageSize = val;
this.childTableDate = [];
this.getchildWeatherData(this.childParma);
},
},
};
</script>
<style lang="less">
.weatherBox {
width: calc(100% - 24px);
height: calc(100% - 24px);
padding: 12px 12px;
background: #fff;
.weatherContain {
display: flex;
height: 100%;
box-sizing: border-box;
background: #fff;
border: 1px solid #ddd;
border-radius: 4px;
}
.rightTable {
display: flex;
width: 100%;
height: 100%;
flex: 1;
overflow: auto;
border-left: 1px solid #ddd;
.el-table .el-table__cell {
text-align: center;
-webkit-user-select: text;
-moz-user-select: text;
-ms-user-select: text;
user-select: text;
}
.dataBox {
width: calc(100% - 24px);
height: calc(100% - 24px);
padding: 12px 12px;
background: #fff;
}
.fatherTableShowBox {
height: calc(100% - 0px);
}
.childBox {
height: 100%;
.chartClass {
height: 450px;
width: 100%;
}
// .echartsBox {
// display: flex;
// flex-direction: column;
// align-items: center;
// .btnbox {
// display: flex;
// margin-bottom: 8px;
// .el-button--primary {
// width: auto;
// }
// }
// }
.childTableShowBox {
h3 {
font-size: 16px;
font-weight: normal;
margin-bottom: 8px;
text-align: center;
color: #666;
margin-top: 16px;
}
height: calc(100% - 124px);
}
.termalBox {
margin-bottom: 4px;
display: flex;
align-items: center;
line-height: 32px;
p {
.text {
margin-right: 12px;
}
}
.gropBtn {
//margin-left: auto;
}
}
}
}
}
</style>

@ -436,7 +436,7 @@ export default {
console.log("sf增加"); console.log("sf增加");
if (this.areaData.protocol == "65281") { if (this.areaData.protocol == "65281") {
console.log("安徽规约"); console.log("安徽规约");
this.fucType = 6; this.fucType = 7;
this.presetNum = 0; this.presetNum = 0;
} else if ( } else if (
this.areaData.protocol == "65284" || this.areaData.protocol == "65284" ||
@ -446,7 +446,7 @@ export default {
this.areaData.protocol == "65282" this.areaData.protocol == "65282"
) { ) {
console.log("浙江规约、河南 V2020、宁夏规约长沙、江苏规约jj增加"); console.log("浙江规约、河南 V2020、宁夏规约长沙、江苏规约jj增加");
this.fucType = 7; this.fucType = 8;
this.presetNum = 0; this.presetNum = 0;
} }
this.termstatusFun(); this.termstatusFun();
@ -455,7 +455,7 @@ export default {
console.log("sf减少"); console.log("sf减少");
if (this.areaData.protocol == "65281") { if (this.areaData.protocol == "65281") {
console.log("安徽规约"); console.log("安徽规约");
this.fucType = 7; this.fucType = 6;
this.presetNum = 0; this.presetNum = 0;
} else if ( } else if (
this.areaData.protocol == "65284" || this.areaData.protocol == "65284" ||
@ -465,7 +465,7 @@ export default {
this.areaData.protocol == "65282" this.areaData.protocol == "65282"
) { ) {
console.log("浙江规约、河南 V2020、宁夏规约长沙、江苏规约jj增加"); console.log("浙江规约、河南 V2020、宁夏规约长沙、江苏规约jj增加");
this.fucType = 8; this.fucType = 7;
this.presetNum = 0; this.presetNum = 0;
} }
this.termstatusFun(); this.termstatusFun();
@ -486,7 +486,7 @@ export default {
this.presetNum = 0; this.presetNum = 0;
this.termstatusFun(); this.termstatusFun();
} else if (this.areaData.protocol == "2") { } else if (this.areaData.protocol == "2") {
this.fucType = 13; this.fucType = 103;
this.presetNum = 0; this.presetNum = 0;
this.termstatusFun(); this.termstatusFun();
} }

Loading…
Cancel
Save