From 3e634124b82e944e3a814385302f9307c5ec33f6 Mon Sep 17 00:00:00 2001 From: zhujiyan <17812234322@163.com> Date: Wed, 22 May 2024 14:10:58 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=B5=E8=83=BD=E8=B4=A8=E9=87=8F=E9=97=AE?= =?UTF-8?q?=E9=A2=98-=E5=9C=A8=E7=BA=BF=E7=9B=91=E6=B5=8B-=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E5=B1=95=E7=A4=BA/=E5=8F=91=E8=B5=B7=E9=A2=84?= =?UTF-8?q?=E8=AD=A6/=E5=91=8A=E8=AD=A6=E5=8D=95=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/process-boot/electricitymanagement.ts | 9 +++++ .../electricalEnergy/components1/online.vue | 39 +++++++++++++++---- 2 files changed, 40 insertions(+), 8 deletions(-) diff --git a/src/api/process-boot/electricitymanagement.ts b/src/api/process-boot/electricitymanagement.ts index ad8b6166..f1a9f277 100644 --- a/src/api/process-boot/electricitymanagement.ts +++ b/src/api/process-boot/electricitymanagement.ts @@ -190,3 +190,12 @@ export function uploadFile(data) { data }) } + +//发起预警单,发起告警单 +export function handleWarningAlarmFlag(data) { + return createAxios({ + url: '/supervision-boot/warningLeaflet/addLineOverLimitData', + method: 'POST', + data + }) +} \ No newline at end of file diff --git a/src/views/pqs/supervise/electricalEnergy/components1/online.vue b/src/views/pqs/supervise/electricalEnergy/components1/online.vue index 4dce0c97..f9b5d372 100644 --- a/src/views/pqs/supervise/electricalEnergy/components1/online.vue +++ b/src/views/pqs/supervise/electricalEnergy/components1/online.vue @@ -25,6 +25,8 @@ import Table from '@/components/table/index.vue' import TableHeader from '@/components/table/header/index.vue' import { ElMessage, ElMessageBox } from 'element-plus' import { useDictData } from '@/stores/dictData' +import { ValueType } from 'exceljs' +import {handleWarningAlarmFlag} from '@/api/process-boot/electricitymanagement.ts' // Steady_Statis const dictData = useDictData() //字典获取超标指标 @@ -48,11 +50,13 @@ const tableStore = new TableStore({ return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1 } }, + { field: 'sustationName', title: '变电站名称', width: 170 }, { field: 'barName', title: '母线名称', width: 170 }, - { field: 'dateList', title: '超标天数详情', width: 170 }, - { field: 'loadType', title: '监测点对象类型', width: 170 }, { field: 'measurementPointName', title: '监测点名称', width: 170 }, - { field: 'objName', title: '监测点对象名称' , width: 170 }, + { field: 'voltageLevel', title: '电压等级', width: 170 }, + { field: 'loadType', title: '监测点对象类型', width: 170 }, + { field: 'objName', title: '监测点对象名称', width: 170 }, + { field: 'dateList', title: '超标天数详情', width: 170 }, { field: 'overLimitContinuous', title: '连续超标天数', @@ -63,9 +67,16 @@ const tableStore = new TableStore({ title: '超标天数', width: 170 }, - { field: 'overLimitrate', title: '超标占比' , width: 170}, - { field: 'sustationName', title: '变电站名称' , width: 170}, - { field: 'voltageLevel', title: '电压等级' , width: 170 }, + { + field: 'overLimitrate', + title: '超标占比', + width: 170, + formatter: (row: any) => { + console.log(row.cellValue, row) + let value = parseFloat(row.cellValue * 100).toFixed(2) + '%' + return value + } + }, { title: '操作', width: '180', @@ -88,7 +99,13 @@ const tableStore = new TableStore({ confirmButtonType: 'primary', title: '请确认发起告警单!' }, - click: row => {} + click: row => { + handleWarningAlarmFlag(row).then((res)=>{ + console.log(res); + ElMessage.success('发起告警单成功!') + tableStore.index() + }) + } }, { name: 'edit', @@ -106,7 +123,13 @@ const tableStore = new TableStore({ title: '请确认发起发起预警单!' }, - click: row => {} + click: row => { + handleWarningAlarmFlag(row).then((res)=>{ + console.log(res); + ElMessage.success('发起预警单成功!') + tableStore.index() + }) + } } ] }