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() + }) + } } ] }