From fd71466b22b980dcef5d09ef14e2a453d9dfdfe6 Mon Sep 17 00:00:00 2001 From: GGJ <357021191@qq.com> Date: Fri, 29 Mar 2024 15:16:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=20=E7=94=B5=E5=8E=8B?= =?UTF-8?q?=E6=9A=82=E9=99=8D=E7=83=AD=E5=8A=9B=E5=9B=BE=20=E4=B8=A5?= =?UTF-8?q?=E9=87=8D=E5=BA=A6=20=E9=A1=B5=E9=9D=A2=E8=BF=81=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../evaluationList/components/charge.vue | 2 +- .../components/photovoltaic.vue | 12 +- .../pqs/voltageSags/Region/severity/index.vue | 185 ++++++++++++++++ .../Region/thermodynamicDiagram/index.vue | 200 +++--------------- .../Region/transientassessment/index.vue | 2 +- 5 files changed, 214 insertions(+), 187 deletions(-) create mode 100644 src/views/pqs/voltageSags/Region/severity/index.vue diff --git a/src/views/pqs/bearingCapacity/evaluationList/components/charge.vue b/src/views/pqs/bearingCapacity/evaluationList/components/charge.vue index 3268e812..7fe00e2b 100644 --- a/src/views/pqs/bearingCapacity/evaluationList/components/charge.vue +++ b/src/views/pqs/bearingCapacity/evaluationList/components/charge.vue @@ -377,7 +377,7 @@ const rendering = (row: any) => { series: [ { type: 'pie', - center: ['50%', '50%'], + center: ['50%', '60%'], radius: ['35%', '48%'], label: { normal: { diff --git a/src/views/pqs/bearingCapacity/evaluationList/components/photovoltaic.vue b/src/views/pqs/bearingCapacity/evaluationList/components/photovoltaic.vue index 33aba08e..17116ffb 100644 --- a/src/views/pqs/bearingCapacity/evaluationList/components/photovoltaic.vue +++ b/src/views/pqs/bearingCapacity/evaluationList/components/photovoltaic.vue @@ -75,7 +75,7 @@
- + - + @@ -241,12 +241,7 @@ const info = () => { }).then(res => { userList.value = res.data.records user.value = userList.value[0] || {} - console.log('🚀 ~ info ~ res.data.records:', res.data.records) - - console.log('🚀 ~ info ~ user.value:', user.value) - userData.value = res.data.records[0] || {} - console.log('🚀 ~ info ~ userData.value:', userData.value) }) } @@ -326,7 +321,6 @@ const setEChart = (val: any, data: any, text: string, name: string) => { xAxis: { data: data.filter(item => item.phaseType == 'A').map(item => item.time), name: '时间', - onZero: false, position: 'bottom' // 设置 x 轴在底部 }, yAxis: { @@ -454,7 +448,7 @@ const rendering = (data: any) => { series: [ { type: 'pie', - center: ['50%', '50%'], + center: ['50%', '60%'], radius: ['35%', '48%'], label: { normal: { diff --git a/src/views/pqs/voltageSags/Region/severity/index.vue b/src/views/pqs/voltageSags/Region/severity/index.vue new file mode 100644 index 00000000..419a636c --- /dev/null +++ b/src/views/pqs/voltageSags/Region/severity/index.vue @@ -0,0 +1,185 @@ + + + diff --git a/src/views/pqs/voltageSags/Region/thermodynamicDiagram/index.vue b/src/views/pqs/voltageSags/Region/thermodynamicDiagram/index.vue index c5418c03..166161db 100644 --- a/src/views/pqs/voltageSags/Region/thermodynamicDiagram/index.vue +++ b/src/views/pqs/voltageSags/Region/thermodynamicDiagram/index.vue @@ -15,23 +15,16 @@
- - > - - - - - - - + + + + +
@@ -49,14 +42,13 @@ import { ref, onMounted, provide } from 'vue' import { mainHeight } from '@/utils/layout' import { defaultAttribute } from '@/components/table/defaultAttribute' defineOptions({ - name: 'Region/distribution' + name: 'Region/thermodynamicDiagram' }) const EchartMap = ref() const dictData = useDictData() const echartMapList: any = ref({}) const echartList = ref({}) const header = ref() -const distributionData: any = ref([]) const list: any = ref([]) const geoCoordMap: any = ref([]) @@ -66,6 +58,7 @@ const tableStore = new TableStore({ column: [], beforeSearchFun: () => {}, loadCallback: () => { + geoCoordMap.value = [] header.value.areaRef.change() // 处理地图数据 tableStore.table.data.eventHeatMapValue.forEach(val => { @@ -74,9 +67,9 @@ const tableStore = new TableStore({ geoCoordMap.value.push([item.lng, item.lat, item.tail]) }) }) - map(tableStore.table.data) - // tabulation(tableStore.table.data) - // histogram(tableStore.table.data) + + map(geoCoordMap.value) + histogram(tableStore.table.data.areaValue) EchartMap.value.GetEchar(header.value.areaRef.areaName) } }) @@ -103,11 +96,9 @@ const eliminate = (name: string) => { const map = (res: any) => { let areaData: any = [] - if (geoCoordMap.value.lengt > 0) { - geoCoordMap.value.map(item => { - areaData.push(...new Array(3).fill(item)) - }) - } + res.map(item => { + areaData.push(...new Array(3).fill(item)) + }) let maxNum = 0 let minNum = 0 let num: any = [] @@ -154,7 +145,7 @@ const map = (res: any) => { width: '65%', height: '95%', - name: 'AQI', + // name: 'AQI', type: 'heatmap', coordinateSystem: 'geo', blurSize: 40, @@ -166,168 +157,25 @@ const map = (res: any) => { } } -// 表格数据处理 -const tabulation = (res: any) => { - distributionData.value = res - distributionData.value.forEach((item: any) => { - if (item.ci == 0) { - item.ci = 0.05 - } - }) -} // 柱状图数据处理 const histogram = (res: any) => { echartList.value = { title: { - text: header.value.areaRef.areaName + text: '区域暂降次数' }, - tooltip: { - formatter: function (params: any) { - var tips = '' - for (var i = 0; i < params.length; i++) { - if (params[i].value == 0.05) { - tips += params[i].name + '
' - tips += '评估值:0' - } else { - tips += params[i].name + '
' - tips += '评估值:' + params[i].value - } - } - return tips - } - }, - xAxis: { name: '(区域)', - - data: res.map((item: any) => item.areaName) + data: res.map((item: any) => item.name) }, yAxis: { - name: ' 等级', - min: 0, - max: 2, - // minInterval: 0.2, - axisLabel: { - fontSize: 14, - // interval: 4, - formatter: function (value: any) { - var texts = '' - if (value === 0.4) { - texts = '1级' - } else if (value === 0.8) { - texts = '2级' - } else if (value === 1.2) { - texts = '3级' - } else if (value === 2) { - texts = '4级' - } - return texts - } - } + name: '暂降次数' }, options: { series: [ - // { - name: '', - data: res.map((item: any) => { - if (item.ci == 0) { - return (item.ci = 0.05) - } - return item.ci.toFixed(2) - }), - - barMaxWidth: 30, - barMinHeight: 1, + name: '暂降次数', type: 'bar', - itemStyle: { - normal: { - color: function (params: any) { - if (params.value > 2 && params.value !== 0.05) { - return '#339966' - } else if (0.8 < params.value && params.value <= 1.2 && params.value !== 0.05) { - return '#3399FF' - } else if (0.4 < params.value && params.value <= 0.8 && params.value !== 0.05) { - return '#FF9900' - } else if (0 < params.value && params.value <= 0.4 && params.value !== 0.05) { - return '#CC0000' - } else if (params.value == 0.05) { - return '#CC0000' - } - } - } - }, - markLine: { - silent: false, - symbol: 'circle', - lineStyle: { - color: 'red', - width: 1 - }, - emphasis: { - lineStyle: { - width: 1 - } - }, - data: [ - { - name: '', - yAxis: 0.4, - lineStyle: { - color: '#CC0000' - }, - label: { - // position: "middle", - formatter: '{b}', - textStyle: { - color: '#CC0000' - } - } - }, - { - name: '', - yAxis: 0.8, - lineStyle: { - color: '#FF9900' - }, - label: { - // position: "middle", - formatter: '{b}', - textStyle: { - color: '#FF9900' - } - } - }, - { - name: '', - yAxis: 1.2, - lineStyle: { - color: '#3399FF' - }, - label: { - // position: "middle", - formatter: '{b}', - textStyle: { - color: '#3399FF' - } - } - }, - { - name: '', - yAxis: 2, - lineStyle: { - color: '#339966' - }, - label: { - // position: "middle", - formatter: '{b}', - textStyle: { - color: '#339966' - } - } - } - ] - } + data: res.map((item: any) => item.count) } ] } diff --git a/src/views/pqs/voltageSags/Region/transientassessment/index.vue b/src/views/pqs/voltageSags/Region/transientassessment/index.vue index cfa08f62..f9484765 100644 --- a/src/views/pqs/voltageSags/Region/transientassessment/index.vue +++ b/src/views/pqs/voltageSags/Region/transientassessment/index.vue @@ -63,7 +63,7 @@ import { ref, onMounted, provide } from 'vue' import { mainHeight } from '@/utils/layout' import { defaultAttribute } from '@/components/table/defaultAttribute' defineOptions({ - name: 'Region/distribution' + name: 'Region/transientassessment' }) const EchartMap = ref() const dictData = useDictData()