From 43dd634e3d6f713b0ef0d93dde0765a14ce63546 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=B2=E4=B9=88=E4=BA=86?= Date: Mon, 26 Feb 2024 14:39:20 +0800 Subject: [PATCH 01/12] readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3e951f01..653b21bd 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ 项目使用pnpm包管理器 -··· +``` npm i pnpm -g -··· +``` 安装依赖 ··· pnpm i From c84ec36d9759ad70905359bf3ed5e7d29dd84469 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=B2=E4=B9=88=E4=BA=86?= Date: Mon, 26 Feb 2024 14:39:53 +0800 Subject: [PATCH 02/12] readme --- README.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 653b21bd..94af85d9 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,20 @@ 项目使用pnpm包管理器 + ``` npm i pnpm -g ``` + 安装依赖 -··· + +``` pnpm i -··· +``` + 运行项目 -··· + +``` npm run dev -··· +``` Vue 3 + TypeScript + Vite 这个模板可以帮助您开始使用Vue 3和TypeScript在Vite中进行开发。该模板使用了Vue 3的 diff --git a/src/views/pms/voltageSags/monitoringPoint/online/eventStatistics/index.vue b/src/views/pms/voltageSags/monitoringPoint/online/eventStatistics/index.vue index f80ec166..37b0860d 100644 --- a/src/views/pms/voltageSags/monitoringPoint/online/eventStatistics/index.vue +++ b/src/views/pms/voltageSags/monitoringPoint/online/eventStatistics/index.vue @@ -7,7 +7,7 @@ - + From 592d795e2b3b333cc2a5a5d37ed990a2560a558e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=B2=E4=B9=88=E4=BA=86?= Date: Mon, 26 Feb 2024 19:17:08 +0800 Subject: [PATCH 06/12] =?UTF-8?q?=E6=9A=82=E9=99=8D=E5=88=86=E5=B8=83?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/echarts/MyEchart.vue | 94 +---- .../dianyazanjiangbiaojimidu/index.vue | 2 +- .../online/eventStatistics/index.vue | 2 +- .../zanjiangfenbutongji/index.vue | 323 ++++++++++++++++- .../zanjiangfuzhigailvfenbu/index.vue | 333 +++++++++++++++++- 5 files changed, 656 insertions(+), 98 deletions(-) diff --git a/src/components/echarts/MyEchart.vue b/src/components/echarts/MyEchart.vue index 782e68ed..fcb634a0 100644 --- a/src/components/echarts/MyEchart.vue +++ b/src/components/echarts/MyEchart.vue @@ -6,7 +6,7 @@ import { onBeforeUnmount, onMounted, ref, defineExpose, watch } from 'vue' // import echarts from './echarts' import * as echarts from 'echarts' // 全引入 -import 'echarts-gl'; +import 'echarts-gl' import 'echarts/lib/component/dataZoom' const chartRef = ref() @@ -24,90 +24,6 @@ const initChart = () => { chart?.dispose() chart = echarts.init(chartRef.value as HTMLDivElement) - console.log({ - title: { - left: 'center', - textStyle: { - color: '#000', - fontSize: 18 - }, - ...(props.options.title || null) - }, - tooltip: { - trigger: 'axis', - - axisPointer: { - type: 'shadow', - label: { - color: '#fff', - fontSize: 16 - } - }, - textStyle: { - color: '#fff', - fontStyle: 'normal', - opacity: 0.35, - fontSize: 14 - }, - backgroundColor: 'rgba(0,0,0,0.35)', - borderWidth: 0, - ...(props.options.tooltip || null) - }, - legend: { - right: 20, - top: 0, - itemGap: 10, - itemStyle: {}, - textStyle: { - fontSize: 12, - padding: [2, 0, 0, 0] //[上、右、下、左] - }, - itemWidth: 15, - itemHeight: 10, - ...(props.options.legend || null) - }, - grid: { - top: '50px', - left: '10px', - right: '60px', - bottom: props.options.options?.dataZoom === null ? '10px' : '40px', - containLabel: true - }, - xAxis: handlerXAxis(), - yAxis: handlerYAxis(), - dataZoom: [ - { - type: 'inside', - height: 13, - start: 0, - bottom: '20px', - end: 100, - ...(props.options.dataZoom || null) - }, - { - start: 0, - height: 13, - bottom: '20px', - end: 100, - ...(props.options.dataZoom || null) - } - ], - color: [ - ...(props.options.color || ''), - '#07CCCA ', - '#00BFF5', - '#FFBF00', - '#77DA63', - '#D5FF6B', - '#Ff6600', - '#FF9100', - '#5B6E96', - '#66FFCC', - '#B3B3B3' - ], - series: props.options.series, - ...props.options.options - }) chart.setOption({ title: { left: 'center', @@ -157,8 +73,8 @@ const initChart = () => { bottom: props.options.options?.dataZoom === null ? '10px' : '40px', containLabel: true }, - xAxis: handlerXAxis(), - yAxis: handlerYAxis(), + xAxis: props.options.xAxis ? handlerXAxis() : null, + yAxis: props.options.yAxis ? handlerYAxis() : null, dataZoom: [ { type: 'inside', @@ -178,7 +94,7 @@ const initChart = () => { ], color: [ ...(props.options.color || ''), - '#07CCCA ', + '#07CCCA', '#00BFF5', '#FFBF00', '#77DA63', @@ -194,7 +110,7 @@ const initChart = () => { }) setTimeout(() => { chart.resize() - },0) + }, 0) } const handlerYAxis = () => { let temp = { diff --git a/src/views/pms/voltageSags/monitoringPoint/online/eventStatistics/dianyazanjiangbiaojimidu/index.vue b/src/views/pms/voltageSags/monitoringPoint/online/eventStatistics/dianyazanjiangbiaojimidu/index.vue index 9335cbc1..4493784a 100644 --- a/src/views/pms/voltageSags/monitoringPoint/online/eventStatistics/dianyazanjiangbiaojimidu/index.vue +++ b/src/views/pms/voltageSags/monitoringPoint/online/eventStatistics/dianyazanjiangbiaojimidu/index.vue @@ -47,7 +47,7 @@
IEC61000-2-8(公共用电暂降测量统计)
- + diff --git a/src/views/pms/voltageSags/monitoringPoint/online/eventStatistics/index.vue b/src/views/pms/voltageSags/monitoringPoint/online/eventStatistics/index.vue index 37b0860d..2ec49d21 100644 --- a/src/views/pms/voltageSags/monitoringPoint/online/eventStatistics/index.vue +++ b/src/views/pms/voltageSags/monitoringPoint/online/eventStatistics/index.vue @@ -30,7 +30,7 @@ import Zanjiangfenbutongji from './zanjiangfenbutongji/index.vue' import Zanjiangfuzhigailvfenbu from './zanjiangfuzhigailvfenbu/index.vue' import Chixushijiangailvfenbu from './chixushijiangailvfenbu/index.vue' -const activeName = ref('1') +const activeName = ref('5') const height = mainHeight(84) diff --git a/src/views/pms/voltageSags/monitoringPoint/online/eventStatistics/zanjiangfenbutongji/index.vue b/src/views/pms/voltageSags/monitoringPoint/online/eventStatistics/zanjiangfenbutongji/index.vue index 381890af..7f995f97 100644 --- a/src/views/pms/voltageSags/monitoringPoint/online/eventStatistics/zanjiangfenbutongji/index.vue +++ b/src/views/pms/voltageSags/monitoringPoint/online/eventStatistics/zanjiangfenbutongji/index.vue @@ -1,10 +1,325 @@ - + diff --git a/src/views/pms/voltageSags/monitoringPoint/online/eventStatistics/zanjiangfuzhigailvfenbu/index.vue b/src/views/pms/voltageSags/monitoringPoint/online/eventStatistics/zanjiangfuzhigailvfenbu/index.vue index 381890af..e8a462ba 100644 --- a/src/views/pms/voltageSags/monitoringPoint/online/eventStatistics/zanjiangfuzhigailvfenbu/index.vue +++ b/src/views/pms/voltageSags/monitoringPoint/online/eventStatistics/zanjiangfuzhigailvfenbu/index.vue @@ -1,10 +1,337 @@ From c14643202fff8bc6995aa9c54196ef994c9e53e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=B2=E4=B9=88=E4=BA=86?= Date: Mon, 26 Feb 2024 19:29:11 +0800 Subject: [PATCH 07/12] =?UTF-8?q?=E6=9A=82=E9=99=8D=E5=B9=85=E5=80=BC?= =?UTF-8?q?=E6=A6=82=E7=8E=87=E5=88=86=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/event-boot/monitor.ts | 28 ++ .../zanjiangfuzhigailvfenbu/index.vue | 353 +++++------------- 2 files changed, 128 insertions(+), 253 deletions(-) diff --git a/src/api/event-boot/monitor.ts b/src/api/event-boot/monitor.ts index a04c2094..46cc4b42 100644 --- a/src/api/event-boot/monitor.ts +++ b/src/api/event-boot/monitor.ts @@ -61,4 +61,32 @@ export function getStatistic(data: any) { method: 'post', data }) +} + +// 暂降分布统计 右 获取数据 +export function getProbabilityDistribution(data: any) { + return request({ + url: '/event-boot/monitor/getProbabilityDistribution', + method: 'post', + data + }) +} + +// 事件分析 获取数据 +export function getMonitorEventAnalyseQuery(data: any) { + return request({ + url: '/event-boot/monitor/getMonitorEventAnalyseQuery', + method: 'post', + data + }) +} + +// 事件分析 下载 +export function downloadMonitorEventWaveFile(data: any) { + return request({ + url: '/event-boot/monitor/downloadMonitorEventWaveFile', + method: 'post', + data: data.lineId, + responseType: 'blob' + }) } \ No newline at end of file diff --git a/src/views/pms/voltageSags/monitoringPoint/online/eventStatistics/zanjiangfuzhigailvfenbu/index.vue b/src/views/pms/voltageSags/monitoringPoint/online/eventStatistics/zanjiangfuzhigailvfenbu/index.vue index e8a462ba..689bbec6 100644 --- a/src/views/pms/voltageSags/monitoringPoint/online/eventStatistics/zanjiangfuzhigailvfenbu/index.vue +++ b/src/views/pms/voltageSags/monitoringPoint/online/eventStatistics/zanjiangfuzhigailvfenbu/index.vue @@ -8,17 +8,6 @@ 查询 - - {{ data.name }} - {{ data.gs }} - {{ data.krr }} - {{ data.bkrr }} -
@@ -29,7 +18,7 @@ import { nextTick, onMounted, reactive, ref } from 'vue' import DatePicker from '@/components/form/datePicker/index.vue' import MyEchart from '@/components/echarts/MyEchart.vue' import { useMonitoringPoint } from '@/views/pms/voltageSags/monitoringPoint/online/store' -import { getPlot } from '@/api/event-boot/monitor' +import { getProbabilityDistribution } from '@/api/event-boot/monitor' const datePickerRef = ref() const monitoringPoint = useMonitoringPoint() @@ -39,37 +28,43 @@ const formData = reactive({ startTime: '', endTime: '' }) -const data = reactive({ - name: '事件个数', - gs: 0, - krr: 0, - bkrr: 0 -}) const options = ref({}) const init = () => { loading.value = true formData.startTime = datePickerRef.value.timeValue[0] formData.endTime = datePickerRef.value.timeValue[1] - getPlot(formData).then( + getProbabilityDistribution(formData).then( (res: any) => { - const gongData = gongfunction(res.data.voltageToleranceCurveDataList) - data.gs = res.data.voltageToleranceCurveDataList.length - data.krr = gongData.pointI.length - data.bkrr = gongData.pointIun.length - console.log(gongData) + let data = res.data + let eventValue = data.eventvalue + let pereventValue = data.pereventvalue options.value = { - // backgroundColor: "#f9f9f9", //地图背景色深蓝 + backgroundColor: '#fff', //背景色, title: { - text: `SEMI F47曲线` + text: '暂降幅值的概率分布函数', + x: 'center' }, legend: { - data: ['上限', '下限', '可容忍事件', '不可容忍事件'], - x: 'left' - }, - tooltip: { - trigger: 'item', show: true, + left: 10, + data: ['概率分布', '占比'], + + textStyle: { + rich: { + a: { + verticalAlign: 'middle' + } + }, + + padding: [2, 0, 0, 0] //[上、右、下、左] + } + }, + + tooltip: { + //提示框组件 + trigger: 'axis', + axisPointer: { type: 'shadow', label: { @@ -84,83 +79,93 @@ const init = () => { fontSize: 14 }, backgroundColor: 'rgba(0,0,0,0.35)', - borderWidth: 0, - formatter: function(a: any) { - var relVal = '' - relVal = - '发生时间:' + - a.value[2] + - '
' - relVal += - '持续时间:' + - a.value[0] + - 's
' - relVal += - '特征幅值:' + - a.value[1].toFixed(2) + - '%' - return relVal - } + borderWidth: 0 }, + calculable: true, xAxis: [ { - type: 'log', - min: 0.001, - max: 1000, - splitLine: { - show: false + type: 'category', + name: '暂降幅值', + nameGap: 10, + nameTextStyle: { + fontSize: 12 }, - name: 's' + data: [ + '0', + '10%', + '20%', + '30%', + '40%', + '50%', + '60%', + '70%', + '80%', + '90%', + '100%' + ] } ], yAxis: [ { type: 'value', - max: function(value: any) { - return value.max + 20 + name: '概率分布', + nameTextStyle: { + fontSize: 15 }, - splitNumber: 10, - minInterval: 0.1, - name: '%' + axisLabel: { + formatter: '{value}%' + }, + axisLine: { + show: true + }, + splitLine: { + lineStyle: { + // 使用深浅的间隔色 + type: 'dashed', + opacity: 0.5 + } + } + }, + { + type: 'value', + name: '占比', + + nameTextStyle: { + fontSize: 15 + }, + axisLine: { + show: true + }, + + splitLine: { + lineStyle: { + type: 'dashed', + opacity: 0.5 + } + } } ], - options: { - dataZoom: null, - series: [ - { - name: '边界线', - type: 'line', - data: [ - [0.05, 0], - [0.05, 50], - [0.2, 50], - [0.2, 70], - [0.5, 70], - [0.5, 80], - [10, 80], - [1000, 80] - ], - showSymbol: false, - tooltips: { - show: false - } - }, - { - name: '可容忍事件', - type: 'scatter', - symbol: 'circle', - data: gongData.pointI - }, - { - name: '不可容忍事件', - type: 'scatter', - symbol: 'circle', - data: gongData.pointIun + series: [ + { + name: '概率分布', + type: 'line', + data: eventValue, + itemStyle: { + normal: { show: true } } - ] + }, + { + name: '占比', + type: 'bar', + data: pereventValue, + barWidth: 30, + itemStyle: { + normal: { show: true } + } + } + ], + options:{ + dataZoom: null, } } nextTick(() => { @@ -170,164 +175,6 @@ const init = () => { ) } -function gongfunction(arr: any) { - let standI = 0 - let unstandI = 0 - let standF = 0 - let unstandF = 0 - let total = 0 - let pointIun = [] - let pointI = [] - let pointF = [] - let pointFun = [] - total = arr.length - if (total == 0) { - } else { - for (let i = 0; i < arr.length; i++) { - let point = [] - let xx = arr[i].persistTime - let yy = arr[i].eventValue - let time = arr[i].time - let eventId = arr[i].eventId - // let index =arr[i].eventDetailIndex; - point = [xx, yy, time, eventId] - - if (xx <= 0.003) { - let line = 0 - line = 250 - 30000 * xx - if (yy > line) { - unstandI++ - pointIun.push({ - value: point, - itemStyle: { normal: { color: 'red' } } - }) - } else { - standI++ - pointI.push({ - value: point, - itemStyle: { normal: { color: 'green' } } - }) - } - } else if (xx <= 0.02) { - if (yy > 120) { - unstandI++ - pointIun.push({ - value: point, - itemStyle: { normal: { color: 'red' } } - }) - } else { - standI++ - pointI.push({ - value: point, - itemStyle: { normal: { color: 'green' } } - }) - } - } else if (xx <= 0.5) { - if (yy > 120 || yy < 70) { - unstandI++ - pointIun.push({ - value: point, - itemStyle: { normal: { color: 'red' } } - }) - } else { - standI++ - pointI.push({ - value: point, - itemStyle: { normal: { color: 'green' } } - }) - } - } else if (xx <= 10) { - if (yy > 110 || yy < 80) { - unstandI++ - pointIun.push({ - value: point, - itemStyle: { normal: { color: 'red' } } - }) - } else { - standI++ - pointI.push({ - value: point, - itemStyle: { normal: { color: 'green' } } - }) - } - } else { - if (yy > 110 || yy < 90) { - unstandI++ - pointIun.push({ - value: point, - itemStyle: { normal: { color: 'red' } } - }) - } else { - standI++ - pointI.push({ - value: point, - itemStyle: { normal: { color: 'green' } } - }) - } - } - - if (xx < 0.05) { - standF++ - pointF.push({ - value: point, - itemStyle: { normal: { color: 'green' } } - }) - } else if (xx < 0.2) { - if (yy > 50) { - standF++ - pointF.push({ - value: point, - itemStyle: { normal: { color: 'green' } } - }) - } else { - unstandF++ - pointFun.push({ - value: point, - itemStyle: { normal: { color: 'red' } } - }) - } - } else if (xx < 0.5) { - if (yy > 70) { - standF++ - pointF.push({ - value: point, - itemStyle: { normal: { color: 'green' } } - }) - } else { - unstandF++ - pointFun.push({ - value: point, - itemStyle: { normal: { color: 'red' } } - }) - } - } else { - if (yy > 80) { - standF++ - pointF.push({ - value: point, - itemStyle: { normal: { color: 'green' } } - }) - } else { - unstandF++ - pointFun.push({ - value: point, - itemStyle: { normal: { color: 'red' } } - }) - } - } - } - } - return { - standI, - unstandI, - pointI, - pointIun, - standF, - unstandF, - pointF, - pointFun - } -} onMounted(() => { init() From 16a79ab6d4aad849da5ed2ba67cb6d4fd1d64478 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=B2=E4=B9=88=E4=BA=86?= Date: Mon, 26 Feb 2024 19:39:42 +0800 Subject: [PATCH 08/12] =?UTF-8?q?=E6=8C=81=E7=BB=AD=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E6=A6=82=E7=8E=87=E5=88=86=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chixushijiangailvfenbu/index.vue | 168 +++++++++++++++++- .../online/eventStatistics/index.vue | 32 ++-- 2 files changed, 182 insertions(+), 18 deletions(-) diff --git a/src/views/pms/voltageSags/monitoringPoint/online/eventStatistics/chixushijiangailvfenbu/index.vue b/src/views/pms/voltageSags/monitoringPoint/online/eventStatistics/chixushijiangailvfenbu/index.vue index 381890af..80223d52 100644 --- a/src/views/pms/voltageSags/monitoringPoint/online/eventStatistics/chixushijiangailvfenbu/index.vue +++ b/src/views/pms/voltageSags/monitoringPoint/online/eventStatistics/chixushijiangailvfenbu/index.vue @@ -1,10 +1,172 @@ diff --git a/src/views/pms/voltageSags/monitoringPoint/online/eventStatistics/index.vue b/src/views/pms/voltageSags/monitoringPoint/online/eventStatistics/index.vue index 2ec49d21..4881e532 100644 --- a/src/views/pms/voltageSags/monitoringPoint/online/eventStatistics/index.vue +++ b/src/views/pms/voltageSags/monitoringPoint/online/eventStatistics/index.vue @@ -1,22 +1,22 @@ @@ -30,18 +30,20 @@ import Zanjiangfenbutongji from './zanjiangfenbutongji/index.vue' import Zanjiangfuzhigailvfenbu from './zanjiangfuzhigailvfenbu/index.vue' import Chixushijiangailvfenbu from './chixushijiangailvfenbu/index.vue' -const activeName = ref('5') +const activeName = ref('6') const height = mainHeight(84) diff --git a/src/views/pms/voltageSags/monitoringPoint/online/index.vue b/src/views/pms/voltageSags/monitoringPoint/online/index.vue index 1f67935f..2d4ea6e1 100644 --- a/src/views/pms/voltageSags/monitoringPoint/online/index.vue +++ b/src/views/pms/voltageSags/monitoringPoint/online/index.vue @@ -32,7 +32,7 @@ defineOptions({ }) const monitoringPoint = useMonitoringPoint() const height = mainHeight(82) -const activeName = ref('2') +const activeName = ref('3') watch( () => router.currentRoute.value.query.lineId, (newLineId, oldLineId) => { From c5d953ba49c140991ab2eb2fb5ee5978d1ae6f8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=B2=E4=B9=88=E4=BA=86?= Date: Mon, 26 Feb 2024 19:58:36 +0800 Subject: [PATCH 10/12] =?UTF-8?q?=E6=A8=A1=E7=89=88=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/template/table.vue | 33 ++++++++++++++----- .../online/eventStudy/index.vue | 12 +++---- 2 files changed, 28 insertions(+), 17 deletions(-) diff --git a/src/template/table.vue b/src/template/table.vue index 62b3dbb0..eb8eba94 100644 --- a/src/template/table.vue +++ b/src/template/table.vue @@ -1,18 +1,28 @@ - From ed90f125be9aa87311d4bd3ee8693a883327cf4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=B2=E4=B9=88=E4=BA=86?= Date: Mon, 26 Feb 2024 20:36:18 +0800 Subject: [PATCH 11/12] =?UTF-8?q?=E8=A1=A8=E6=A0=BC=E6=A8=A1=E7=89=88?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/template/table.vue | 7 ++++++- src/utils/tableStore.ts | 4 +++- .../monitoringPoint/online/eventStudy/index.vue | 7 +++---- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/template/table.vue b/src/template/table.vue index eb8eba94..421411d2 100644 --- a/src/template/table.vue +++ b/src/template/table.vue @@ -30,6 +30,7 @@ import TableStore from '@/utils/tableStore' import Table from '@/components/table/index.vue' import TableHeader from '@/components/table/header/index.vue' import PopupEdit from './dialog.vue' +import { mainHeight } from '@/utils/layout' // 注意名字不要重复,若要保持页面存活,名字需要和路由admin后面的字符保持一致 defineOptions({ @@ -37,6 +38,8 @@ defineOptions({ }) const popupEdit = ref() const tableStore = new TableStore({ + // 若页面表格高度需要调整,请修改publicHeight(内容区域除表格外其他内容的高度) + // publicHeight: 60, url: '/user-boot/user/list', method: 'POST', column: [ @@ -153,8 +156,9 @@ const tableStore = new TableStore({ }) } }) - +// 注入到子组件 provide('tableStore', tableStore) +// 默认参数 参数多的话可以使用Object.assign方法 tableStore.table.params.searchState = 1 tableStore.table.params.searchValue = '' tableStore.table.params.casualUser = -1 @@ -164,6 +168,7 @@ onMounted(() => { tableStore.index() }) +// 弹框 const addUser = () => { popupEdit.value.open('新增用户') } diff --git a/src/utils/tableStore.ts b/src/utils/tableStore.ts index 20bc53d4..0514c421 100644 --- a/src/utils/tableStore.ts +++ b/src/utils/tableStore.ts @@ -3,6 +3,7 @@ import createAxios from '@/utils/request' import { requestPayload } from '@/utils/request' import { Method } from 'axios' import { mainHeight } from '@/utils/layout' + interface TableStoreParams { url: string pk?: string @@ -39,7 +40,7 @@ export default class TableStore { loadCallback: null, resetCallback: null, beforeSearchFun: null, - height: mainHeight(20 + (this.showPage ? 58 : 0)).height as string, + height: 0, publicHeight: 0 }) @@ -55,6 +56,7 @@ export default class TableStore { this.table.loadCallback = options.loadCallback || null this.table.beforeSearchFun = options.beforeSearchFun || null Object.assign(this.table.params, options.params) + this.table.height = mainHeight(20 + (this.showPage ? 58 : 0) + this.table.publicHeight).height as string } index() { diff --git a/src/views/pms/voltageSags/monitoringPoint/online/eventStudy/index.vue b/src/views/pms/voltageSags/monitoringPoint/online/eventStudy/index.vue index abfe4ab8..9d18be8d 100644 --- a/src/views/pms/voltageSags/monitoringPoint/online/eventStudy/index.vue +++ b/src/views/pms/voltageSags/monitoringPoint/online/eventStudy/index.vue @@ -1,5 +1,5 @@