|
@ -137,8 +137,14 @@ |
|
|
<div class="sidebar"> |
|
|
<div class="sidebar"> |
|
|
<h3>换热站</h3> |
|
|
<h3>换热站</h3> |
|
|
<el-menu :default-active="filterForm.deviceUuid" class="deviceMenu" @select="deviceSelect" @open="deviceOpen"> |
|
|
<el-menu :default-active="filterForm.deviceUuid" class="deviceMenu" @select="deviceSelect" @open="deviceOpen"> |
|
|
<el-menu-item :index="item.centerDeviceCode" v-for="item in deviceData" :key="item.centerDeviceCode"> |
|
|
<el-menu-item |
|
|
<i class="iconfont icon-station" /> |
|
|
:class="{ weather: item.sign === 'weather' }" |
|
|
|
|
|
:index="item.centerDeviceCode" |
|
|
|
|
|
v-for="item in deviceData" |
|
|
|
|
|
:key="item.centerDeviceCode" |
|
|
|
|
|
> |
|
|
|
|
|
<i class="iconfont icon-weather" v-if="item.sign === 'weather'" /> |
|
|
|
|
|
<i class="iconfont icon-station" v-else /> |
|
|
<el-tooltip class="box-item" effect="dark" :content="item.deviceName" placement="right-start"> |
|
|
<el-tooltip class="box-item" effect="dark" :content="item.deviceName" placement="right-start"> |
|
|
{{ item.deviceName }} |
|
|
{{ item.deviceName }} |
|
|
</el-tooltip> |
|
|
</el-tooltip> |
|
@ -153,6 +159,12 @@ |
|
|
<div class="item" v-for="(item, index) in mainInfoList" :key="index"> |
|
|
<div class="item" v-for="(item, index) in mainInfoList" :key="index"> |
|
|
<div class="name"><i :style="`background-color:${colors[index]}`" />{{ item.name }}</div> |
|
|
<div class="name"><i :style="`background-color:${colors[index]}`" />{{ item.name }}</div> |
|
|
<div class="average">平均值 : {{ item.average }} {{ item.paramUnit }}</div> |
|
|
<div class="average">平均值 : {{ item.average }} {{ item.paramUnit }}</div> |
|
|
|
|
|
<div class="average" v-if="filterForm.deviceUuid === 'weatherDataChart'"> |
|
|
|
|
|
最大温度 : {{ item.max }} {{ item.paramUnit }} |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="average" v-if="filterForm.deviceUuid === 'weatherDataChart'"> |
|
|
|
|
|
最小温度 : {{ item.min }} {{ item.paramUnit }} |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
@ -170,7 +182,15 @@ const stackedRef: Ref<HTMLElement | any> = ref(null); |
|
|
import type { FormInstance, FormRules } from 'element-plus'; |
|
|
import type { FormInstance, FormRules } from 'element-plus'; |
|
|
import { ReturnDownBack } from '@vicons/ionicons5'; |
|
|
import { ReturnDownBack } from '@vicons/ionicons5'; |
|
|
|
|
|
|
|
|
import { getAllDevices, getDevices, getClass, getParams, getPortions, getDeviceInfos } from '@/api/device/index'; |
|
|
import { |
|
|
|
|
|
getAllDevices, |
|
|
|
|
|
getDevices, |
|
|
|
|
|
getClass, |
|
|
|
|
|
getParams, |
|
|
|
|
|
getPortions, |
|
|
|
|
|
getDeviceInfos, |
|
|
|
|
|
weatherHoursList |
|
|
|
|
|
} from '@/api/device/index'; |
|
|
import { partitionVo, classVo, parameterVo, seriesVo, mainInfoVo } from '@/api/device/types'; |
|
|
import { partitionVo, classVo, parameterVo, seriesVo, mainInfoVo } from '@/api/device/types'; |
|
|
|
|
|
|
|
|
const router = useRouter(); |
|
|
const router = useRouter(); |
|
@ -252,6 +272,7 @@ const resetInit = { |
|
|
export interface deviceVo { |
|
|
export interface deviceVo { |
|
|
centerDeviceCode: string; |
|
|
centerDeviceCode: string; |
|
|
deviceName: string; |
|
|
deviceName: string; |
|
|
|
|
|
sign: string; |
|
|
} |
|
|
} |
|
|
const colors = ['#5470c6', '#91cc75', '#fac858', '#1a94bc', '#f26b1f', '#5bae23']; |
|
|
const colors = ['#5470c6', '#91cc75', '#fac858', '#1a94bc', '#f26b1f', '#5bae23']; |
|
|
const deviceData = ref<deviceVo[]>(); |
|
|
const deviceData = ref<deviceVo[]>(); |
|
@ -639,7 +660,11 @@ const deviceSelect = (key: string, keyPath: string[], item: object) => { |
|
|
//点击换热站列表 |
|
|
//点击换热站列表 |
|
|
console.log(key, keyPath, item); |
|
|
console.log(key, keyPath, item); |
|
|
filterForm.deviceUuid = key; |
|
|
filterForm.deviceUuid = key; |
|
|
|
|
|
if (key === 'weatherDataChart') { |
|
|
|
|
|
getweatherHoursList(); |
|
|
|
|
|
} else { |
|
|
verifyInfo(); |
|
|
verifyInfo(); |
|
|
|
|
|
} |
|
|
}; |
|
|
}; |
|
|
const deviceOpen = (key: string, keyPath: string[]) => { |
|
|
const deviceOpen = (key: string, keyPath: string[]) => { |
|
|
console.log(key, keyPath); |
|
|
console.log(key, keyPath); |
|
@ -709,7 +734,11 @@ function keyClick(res: string) { |
|
|
function showZeroChange() { |
|
|
function showZeroChange() { |
|
|
//是否显示0值 |
|
|
//是否显示0值 |
|
|
filterForm.showZero = !filterForm.showZero; |
|
|
filterForm.showZero = !filterForm.showZero; |
|
|
getDeviceInfo(); |
|
|
if (filterForm.deviceUuid === 'weatherDataChart') { |
|
|
|
|
|
getweatherHoursList(); |
|
|
|
|
|
} else { |
|
|
|
|
|
verifyInfo(); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function getDevice() { |
|
|
function getDevice() { |
|
@ -758,6 +787,38 @@ function getDeviceInfo() { |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function getweatherHoursList() { |
|
|
|
|
|
//获取天气数据图表折线图数据 |
|
|
|
|
|
if (filterForm.deviceUuid === '') { |
|
|
|
|
|
ElMessage({ |
|
|
|
|
|
message: '请选择换热站', |
|
|
|
|
|
type: 'warning' |
|
|
|
|
|
}); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
if (filterForm.startTime === '') { |
|
|
|
|
|
ElMessage({ |
|
|
|
|
|
message: '请选择起始时间', |
|
|
|
|
|
type: 'warning' |
|
|
|
|
|
}); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
const params = filterForm; |
|
|
|
|
|
params.startTime = searchForm.startTime; |
|
|
|
|
|
params.step = searchForm.step; |
|
|
|
|
|
params.stepType = searchForm.stepType; |
|
|
|
|
|
params.queryType = 1; |
|
|
|
|
|
weatherHoursList(params).then((res: any) => { |
|
|
|
|
|
if (res.code === 200) { |
|
|
|
|
|
mainInfoList.value = res.data.mainInfos; |
|
|
|
|
|
if (res.data.additionalInfo != null) { |
|
|
|
|
|
currentEndTime.value = res.data.additionalInfo.endTime; |
|
|
|
|
|
} |
|
|
|
|
|
init(res.data); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
const debounceClick = debounce(() => { |
|
|
const debounceClick = debounce(() => { |
|
|
getDeviceInfoss(); |
|
|
getDeviceInfoss(); |
|
|
}, 360000); |
|
|
}, 360000); |
|
@ -893,8 +954,12 @@ function dateChange(res: any) { |
|
|
} else { |
|
|
} else { |
|
|
searchForm.startTime = res + ' ' + searchForm.time; |
|
|
searchForm.startTime = res + ' ' + searchForm.time; |
|
|
filterForm.startTime = res + ' ' + searchForm.time; |
|
|
filterForm.startTime = res + ' ' + searchForm.time; |
|
|
|
|
|
if (filterForm.deviceUuid === 'weatherDataChart') { |
|
|
|
|
|
getweatherHoursList(); |
|
|
|
|
|
} else { |
|
|
verifyInfo(); |
|
|
verifyInfo(); |
|
|
// console.log('date--', filterForm.startTime); |
|
|
} |
|
|
|
|
|
// console.log('date--', filterForm.deviceUuid); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
function timeChange(res: any) { |
|
|
function timeChange(res: any) { |
|
@ -906,8 +971,12 @@ function timeChange(res: any) { |
|
|
// console.log('time--', res, searchForm.time); |
|
|
// console.log('time--', res, searchForm.time); |
|
|
searchForm.startTime = searchForm.date + ' ' + res; |
|
|
searchForm.startTime = searchForm.date + ' ' + res; |
|
|
filterForm.startTime = searchForm.date + ' ' + res; |
|
|
filterForm.startTime = searchForm.date + ' ' + res; |
|
|
|
|
|
if (filterForm.deviceUuid === 'weatherDataChart') { |
|
|
|
|
|
getweatherHoursList(); |
|
|
|
|
|
} else { |
|
|
verifyInfo(); |
|
|
verifyInfo(); |
|
|
// console.log('time--', filterForm.startTime); |
|
|
} |
|
|
|
|
|
// console.log('time--', filterForm.deviceUuid); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
function stepChange(num: any) { |
|
|
function stepChange(num: any) { |
|
|