联调台账变更推送

This commit is contained in:
GGJ
2025-04-23 15:36:57 +08:00
parent 71fbdfa1d0
commit dc4b37b833
11 changed files with 684 additions and 249 deletions

View File

@@ -3,107 +3,149 @@
<TableHeader datePicker ref="header">
<template v-slot:select>
<el-form-item label="统计类型">
<el-select v-model="tableStore.table.params.statisticalType" value-key="id" placeholder="请选择统计类型">
<el-select
v-model="tableStore.table.params.statisticalType"
value-key="id"
placeholder="请选择统计类型"
>
<el-option v-for="item in options" :key="item.id" :label="item.name" :value="item" />
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-DataAnalysis"
@click="rankingClick(null, true)">排名前10监测点</el-button>
<el-button type="primary" icon="el-icon-DataAnalysis" @click="rankingClick(null, true)">
排名前10监测点
</el-button>
</el-form-item>
</template>
</TableHeader>
<div v-loading="tableStore.table.loading" class="pr10">
<el-row>
<el-col :span="12" class="pd10">
<el-tag style="background: #339966;" class="tag" size="small">1</el-tag>
<span style="color: #339966;" class="text">:无污染(0,1]</span>
<el-tag style="background: #3399ff;" class="tag" size="small">2</el-tag>
<span style="color: #3399ff;" class="text">:轻微污染(1,1.2]</span>
<el-tag style="background: #ffcc33;" class="tag" size="small">3</el-tag>
<span style="color: #ffcc33;" class="text">:轻度污染(1.2,1.6]</span>
<el-tag style="background: #ff9900;" class="tag" size="small">4</el-tag>
<span style="color: #ff9900;" class="text">:中度污染(1.6,2]</span>
<el-tag style="background: #cc0000;" class="tag" size="small">5</el-tag>
<span style="color: #cc0000;" class="text">:重度污染(2,+)</span>
<el-tag style="background: #339966" class="tag" size="small">1</el-tag>
<span style="color: #339966" class="text">:无污染(0,1]</span>
<el-tag style="background: #3399ff" class="tag" size="small">2</el-tag>
<span style="color: #3399ff" class="text">:轻微污染(1,1.2]</span>
<el-tag style="background: #ffcc33" class="tag" size="small">3</el-tag>
<span style="color: #ffcc33" class="text">:轻度污染(1.2,1.6]</span>
<el-tag style="background: #ff9900" class="tag" size="small">4</el-tag>
<span style="color: #ff9900" class="text">:中度污染(1.6,2]</span>
<el-tag style="background: #cc0000" class="tag" size="small">5</el-tag>
<span style="color: #cc0000" class="text">:重度污染(2,+)</span>
<div :style="{ height: layout.height }" style="overflow-y: auto" class="mt10">
<div class=" cardBox">
<div class="cardBox">
<el-card v-for="(item, index) in tableStore.table.data" :key="index">
<template #header>
<div style="cursor: pointer;" @click="queryline(item, false)">
<el-tag v-if="item.data == 3.14159 || item.data == 0"
style="background: #ccc; color: #fff" size="small">
<div style="cursor: pointer" @click="queryline(item, false)">
<el-tag
v-if="item.data == 3.14159 || item.data == 0"
style="background: #ccc; color: #fff"
size="small"
>
</el-tag>
<el-tag v-if="0 < item.data && item.data < 1 && item.data !== 3.14159"
style="background: #339966; color: #fff" size="small">
<el-tag
v-if="0 < item.data && item.data < 1 && item.data !== 3.14159"
style="background: #339966; color: #fff"
size="small"
>
1
</el-tag>
<el-tag v-if="1 <= item.data && item.data < 1.2 && item.data !== 3.14159"
style="background: #3399ff; color: #fff" size="small">
<el-tag
v-if="1 <= item.data && item.data < 1.2 && item.data !== 3.14159"
style="background: #3399ff; color: #fff"
size="small"
>
2
</el-tag>
<el-tag v-if="1.2 <= item.data && item.data < 1.6 && item.data !== 3.14159"
style="background: #ffcc33; color: #fff" size="small">
<el-tag
v-if="1.2 <= item.data && item.data < 1.6 && item.data !== 3.14159"
style="background: #ffcc33; color: #fff"
size="small"
>
3
</el-tag>
<el-tag v-if="1.6 <= item.data && item.data < 2 && item.data !== 3.14159"
style="background: #ff9900; color: #fff" size="small">
<el-tag
v-if="1.6 <= item.data && item.data < 2 && item.data !== 3.14159"
style="background: #ff9900; color: #fff"
size="small"
>
4
</el-tag>
<el-tag v-if="2 <= item.data && item.data && item.data !== 3.14159"
style="background: #cc0000; color: #fff" size="small">
<el-tag
v-if="2 <= item.data && item.data && item.data !== 3.14159"
style="background: #cc0000; color: #fff"
size="small"
>
5
</el-tag>
<span>{{ item.name }}</span>
</div>
</template>
<div class="card-content">
<div class="card-item" v-for="(item1, index1) in item.children" :key="index1"
@click="queryline(item1, true)">
<el-tag v-if="item1.data == 3.14159 || item1.data == 0"
style="background: #ccc; color: #fff" size="small">
<div
class="card-item"
v-for="(item1, index1) in item.children"
:key="index1"
@click="queryline(item1, true)"
>
<el-tag
v-if="item1.data == 3.14159 || item1.data == 0"
style="background: #ccc; color: #fff"
size="small"
>
</el-tag>
<el-tag v-if="0 < item1.data && item1.data < 1 && item1.data !== 3.14159"
style="background: #339966; color: #fff" size="small">
<el-tag
v-if="0 < item1.data && item1.data < 1 && item1.data !== 3.14159"
style="background: #339966; color: #fff"
size="small"
>
1
</el-tag>
<el-tag v-if="1 <= item1.data && item1.data < 1.2 && item1.data !== 3.14159"
style="background: #3399ff; color: #fff" size="small">
<el-tag
v-if="1 <= item1.data && item1.data < 1.2 && item1.data !== 3.14159"
style="background: #3399ff; color: #fff"
size="small"
>
2
</el-tag>
<el-tag v-if="1.2 <= item1.data && item1.data < 1.6 && item1.data !== 3.14159"
style="background: #ffcc33; color: #fff" size="small">
<el-tag
v-if="1.2 <= item1.data && item1.data < 1.6 && item1.data !== 3.14159"
style="background: #ffcc33; color: #fff"
size="small"
>
3
</el-tag>
<el-tag v-if="1.6 <= item1.data && item1.data < 2 && item1.data !== 3.14159"
style="background: #ff9900; color: #fff" size="small">
<el-tag
v-if="1.6 <= item1.data && item1.data < 2 && item1.data !== 3.14159"
style="background: #ff9900; color: #fff"
size="small"
>
4
</el-tag>
<el-tag v-if="2 <= item1.data && item1.data && item1.data !== 3.14159"
style="background: #cc0000; color: #fff" size="small">
<el-tag
v-if="2 <= item1.data && item1.data && item1.data !== 3.14159"
style="background: #cc0000; color: #fff"
size="small"
>
5
</el-tag>
<span class="xdf">
<el-tooltip :show-arrow="false" :offset="-0" :content="item1.name"
popper-class="atooltip" placement="bottom-start">
<el-tooltip
:show-arrow="false"
:offset="-0"
:content="item1.name"
popper-class="atooltip"
placement="bottom-start"
>
<div class="tooltipText">
{{ item1.name }}
</div>
</el-tooltip>
</span>
</div>
</div>
</el-card>
</div>
</div>
</el-col>
@@ -111,61 +153,54 @@
<my-echart class="tall" :options="echartList" />
<div class="tall">
<vxe-table height="auto" auto-resize :data="tableStore.table.data" v-bind="defaultAttribute">
<vxe-column field="name" title="名称"></vxe-column>
<vxe-column field="zc" title="污染值">
<template #default="scope">
<span v-if="scope.row.data == 3.14159" style="color: #000;">
暂无数据
</span>
<span v-if="scope.row.data !== 3.14159" style="color: #000;">
<span v-if="scope.row.data == 3.14159" style="color: #000">暂无数据</span>
<span v-if="scope.row.data !== 3.14159" style="color: #000">
{{ scope.row.data }}
</span>
</template>
</vxe-column>
<vxe-column field="zd" title="评估">
<template #default="scope">
<span v-if="
0 <= scope.row.data &&
scope.row.data < 1 &&
scope.row.data !== 3.14159
" style=" font-weight: bold;color: #339966;">
<span
v-if="0 <= scope.row.data && scope.row.data < 1 && scope.row.data !== 3.14159"
style="font-weight: bold; color: #339966"
>
无污染
</span>
<span v-if="
1 <= scope.row.data &&
scope.row.data < 1.2 &&
scope.row.data !== 3.14159
" style=" font-weight: bold;color: #3399ff;">
<span
v-if="1 <= scope.row.data && scope.row.data < 1.2 && scope.row.data !== 3.14159"
style="font-weight: bold; color: #3399ff"
>
轻微污染
</span>
<span v-if="
1.2 <= scope.row.data &&
scope.row.data < 1.6 &&
scope.row.data !== 3.14159
" style=" font-weight: bold;color: #ffcc33;">
<span
v-if="
1.2 <= scope.row.data && scope.row.data < 1.6 && scope.row.data !== 3.14159
"
style="font-weight: bold; color: #ffcc33"
>
轻度污染
</span>
<span v-if="
1.6 <= scope.row.data &&
scope.row.data < 2 &&
scope.row.data !== 3.14159
" style=" font-weight: bold;color: #ff9900;">
<span
v-if="1.6 <= scope.row.data && scope.row.data < 2 && scope.row.data !== 3.14159"
style="font-weight: bold; color: #ff9900"
>
中度污染
</span>
<span v-if="
2 <= scope.row.data && scope.row.data && scope.row.data !== 3.14159
" style=" font-weight: bold;color: #cc0000;">
<span
v-if="2 <= scope.row.data && scope.row.data && scope.row.data !== 3.14159"
style="font-weight: bold; color: #cc0000"
>
重度污染
</span>
<span v-if="scope.row.data == 3.14159" style="color: #000;">
暂无评估
</span>
<span v-if="scope.row.data == 3.14159" style="color: #000">暂无评估</span>
</template>
</vxe-column>
</vxe-table>
</div>
</el-col>
</el-row>
</div>
@@ -196,7 +231,14 @@ const provinceDetailsRef = ref()
const rankingRef = ref()
const header = ref()
const options = dictData.getBasicData('Pollution_Statis', ['I_Neg', 'V_Inharm', 'V_Dev', 'V_Unbalance', 'Plt', 'Freq_Dev'])
const options = dictData.getBasicData('Pollution_Statis', [
'I_Neg',
'V_Inharm',
'V_Dev',
'V_Unbalance',
'Plt',
'Freq_Dev'
])
const tableStore = new TableStore({
url: '/harmonic-boot/PollutionSubstation/deptSubstationRelations',
method: 'POST',
@@ -204,10 +246,6 @@ const tableStore = new TableStore({
loadCallback: () => {
histogram(tableStore.table.data)
header.value.areaRef.change()
}
})
provide('tableStore', tableStore)
@@ -219,9 +257,6 @@ tableStore.table.params.powerFlag = 2
tableStore.table.params.reportFlag = 3
tableStore.table.params.serverName = 'event-boot'
// 地图数处理
const rankingClick = () => {
rankingRef.value.open(tableStore.table.params)
@@ -233,7 +268,7 @@ const queryline = (row: any, flag: boolean) => {
// 表格数据处理
// 柱状图数据处理
const histogram = (res: any) => {
console.log(123);
console.log(123)
echartList.value = {
title: {
@@ -245,7 +280,23 @@ const histogram = (res: any) => {
var tips = ''
for (var i = 0; i < params.length; i++) {
tips += params[i].name + '</br/>'
tips += '监测点数' + ':' + '&nbsp' + '&nbsp' + (params[i].value == 0.14159 ? '暂无数据' : params[i].value) + '</br/>'
tips +=
'监测等级' +
':' +
'&nbsp' +
'&nbsp' +
(params[i].value == 0.14159
? '无污染'
: params[i].value < 1
? '无污染'
: params[i].value < 1.2
? '轻微污染'
: params[i].value < 1.6
? '轻度污染'
: params[i].value < 2
? '中度污染'
: '重度污染') +
'</br/>'
}
return tips
}
@@ -256,7 +307,7 @@ const histogram = (res: any) => {
data: res.map((item: any) => item.name)
},
yAxis: {
name: '等级',// 给X轴加单位
name: '等级', // 给X轴加单位
min: 0,
max: 2,
interval: 0.2,
@@ -282,14 +333,13 @@ const histogram = (res: any) => {
}
return texts
}
},
}
},
options: {
dataZoom: null,
series: [
{
type: 'bar',
data: res.map((item: any) => {
return item.data == 3.14159 ? 0.14159 : item.data
@@ -482,8 +532,7 @@ const histogram = (res: any) => {
}
}
]
},
}
}
]
}
@@ -514,7 +563,6 @@ const layout1 = mainHeight(93) as any
}
:deep(.cardBox) {
box-sizing: border-box;
overflow: auto;
display: grid;
@@ -527,8 +575,6 @@ const layout1 = mainHeight(93) as any
background-image: linear-gradient(var(--el-color-primary), var(--el-color-primary-light-3));
font-weight: bold;
.el-card__header {
padding: 10px !important;
color: #fff;
@@ -537,7 +583,6 @@ const layout1 = mainHeight(93) as any
display: flex;
justify-content: space-between;
}
}
.el-card__body {
@@ -557,7 +602,6 @@ const layout1 = mainHeight(93) as any
width: 50%;
display: flex;
cursor: pointer;
}
.xdf {
@@ -573,11 +617,8 @@ const layout1 = mainHeight(93) as any
text-overflow: ellipsis;
white-space: nowrap;
margin-left: 5px;
}
}
}
}
</style>