修改冀北现场问题
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<!-- 综合评估详情 -->
|
||||
<el-dialog draggable title="区域污染值统计" v-model="dialogVisible" width="1400px">
|
||||
<el-dialog draggable title="区域污染水平评估" v-model="dialogVisible" width="1400px">
|
||||
<div style="display: flex">
|
||||
<div style="width: 400px">
|
||||
<vxe-table
|
||||
v-bind="defaultAttribute"
|
||||
ref="tableRef"
|
||||
@current-change="currentChangeEvent"
|
||||
height="240px"
|
||||
height="250px"
|
||||
:row-config="{ isCurrent: true, isHover: true }"
|
||||
:data="tableData"
|
||||
>
|
||||
@@ -26,14 +26,14 @@
|
||||
</vxe-table>
|
||||
</div>
|
||||
<div class="ml10" style="width: 990px">
|
||||
<vxe-table v-bind="defaultAttribute" v-loading="loadingTab" ref="vxeRef" height="240px" :data="subdata">
|
||||
<vxe-column type="seq" width="70"></vxe-column>
|
||||
<vxe-column field="devName" title="终端名称"></vxe-column>
|
||||
<vxe-column field="lineName" title="监测点名称" />
|
||||
<vxe-column field="powerFlag" title="电网标志" />
|
||||
<vxe-column field="devType" title="终端型号"></vxe-column>
|
||||
<vxe-column field="manufacturer" title="终端厂家"></vxe-column>
|
||||
<vxe-column field="vharmonicValue" title="污染值" sortable>
|
||||
<vxe-table v-bind="defaultAttribute" v-loading="loadingTab" ref="vxeRef" height="250px" :data="subdata">
|
||||
<vxe-column type="seq" width="70" title="序号"></vxe-column>
|
||||
<vxe-column field="subName" title="变电站名称" min-width="120"></vxe-column>
|
||||
<vxe-column field="lineName" title="监测点名称" align="center" min-width="120"></vxe-column>
|
||||
<vxe-column field="objName" title="监测对象名称" align="center" min-width="100"></vxe-column>
|
||||
<vxe-column field="loadType" title="干扰源类型" align="center" min-width="100"></vxe-column>
|
||||
<vxe-column field="powerFlag" title="监测位置" align="center" min-width="100"></vxe-column>
|
||||
<vxe-column field="vharmonicValue" title="污染值" sortable min-width="80">
|
||||
<template #default="scope">
|
||||
<span
|
||||
:style="{
|
||||
@@ -59,7 +59,7 @@
|
||||
</el-radio-group>
|
||||
</div> -->
|
||||
|
||||
<MyEChart style="height: 300px" :options="picEChart" />
|
||||
<MyEChart style="height: 300px" :options="picEChart" @echartClick="echartClick"/>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
@@ -68,7 +68,9 @@ import { ref, nextTick } from 'vue'
|
||||
import MyEChart from '@/components/echarts/MyEchart.vue'
|
||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { getAssessDetail, getAssessTrend, downPollutionSubCalc } from '@/api/device-boot/panorama'
|
||||
import { getAssessDetail, getAssessTrend, downPollutionSensitiveUser } from '@/api/device-boot/panorama'
|
||||
import { useRoute } from 'vue-router'
|
||||
const router = useRouter()
|
||||
const dictData = useDictData()
|
||||
const dialogVisible: any = ref(false)
|
||||
const rowList: any = ref({})
|
||||
@@ -108,19 +110,18 @@ const currentChangeEvent = async () => {
|
||||
const analysis = () => {
|
||||
loading.value = true
|
||||
let time = rowList.value.searchBeginTime.slice(0, 4) + `-01-01`
|
||||
downPollutionSubCalc({ ...rowList.value, ids: [PollutionList[0].id] }).then(res => {
|
||||
downPollutionSensitiveUser({ ...rowList.value, ids: [PollutionList[0].id], deptId: rowList.value.id }).then(res => {
|
||||
const first10Items = res.data.slice(0, 10)
|
||||
picEChart.value = {
|
||||
title: {
|
||||
text: '污染值排名前十变电站'
|
||||
text: '污染值排名前十敏感及重要用户'
|
||||
},
|
||||
|
||||
xAxis: {
|
||||
name: '',
|
||||
data: first10Items.map((item: any) => item.subStationName),
|
||||
data: first10Items.map((item: any) => item.projectName.split('(')[0].trim()),
|
||||
axisLabel: {
|
||||
rotate: 30, // 核心:倾斜 45 度(推荐 30/45/60,角度太大易读性差)
|
||||
|
||||
rotate: 30 // 核心:倾斜 45 度(推荐 30/45/60,角度太大易读性差)
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
@@ -139,7 +140,7 @@ const analysis = () => {
|
||||
// name: time[i],
|
||||
name: '污染值',
|
||||
type: 'bar',
|
||||
data: first10Items.map((item: any) => item.subVStationValue),
|
||||
data: first10Items.map((item: any) => item.subValue),
|
||||
itemStyle: {
|
||||
color: function (params) {
|
||||
// params.value 是当前柱子的数值
|
||||
@@ -170,6 +171,17 @@ const setColor = val => {
|
||||
? '#00B07D'
|
||||
: ''
|
||||
}
|
||||
const echartClick = (res:any) => {
|
||||
router.push({
|
||||
name: 'harmonic-boot/qydetailedAnalysis/pollutionReport',
|
||||
query: {
|
||||
type: '4',
|
||||
t: Date.now()
|
||||
}
|
||||
})
|
||||
console.log("🚀 ~ echartClick ~ res:", res)
|
||||
|
||||
}
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
Reference in New Issue
Block a user