2024-05-16 14:00:49 +08:00
|
|
|
<template>
|
|
|
|
|
<!-- <div>1 监测点信息 发起预告警单 </div> -->
|
|
|
|
|
|
|
|
|
|
<TableHeader area datePicker ref="TableHeaderRef">
|
|
|
|
|
<template v-slot:select>
|
|
|
|
|
<el-form-item label="超标指标">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="tableStore.table.params.evaluateType"
|
|
|
|
|
multiple
|
|
|
|
|
collapse-tags
|
|
|
|
|
clearable
|
2024-05-22 10:09:40 +08:00
|
|
|
placeholder="请选择超标指标"
|
2024-05-16 14:00:49 +08:00
|
|
|
>
|
|
|
|
|
<el-option v-for="item in exceeded" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</template>
|
|
|
|
|
</TableHeader>
|
|
|
|
|
<Table ref="tableRef" />
|
|
|
|
|
</template>
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
import { ref, onMounted, provide, nextTick } from 'vue'
|
|
|
|
|
import TableStore from '@/utils/tableStore'
|
|
|
|
|
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'
|
2024-05-22 14:10:58 +08:00
|
|
|
import { ValueType } from 'exceljs'
|
|
|
|
|
import {handleWarningAlarmFlag} from '@/api/process-boot/electricitymanagement.ts'
|
2024-05-16 14:00:49 +08:00
|
|
|
// Steady_Statis
|
|
|
|
|
const dictData = useDictData()
|
2024-05-22 10:09:40 +08:00
|
|
|
//字典获取超标指标
|
|
|
|
|
const exceeded = dictData.getBasicData('Indicator_Type')
|
2024-05-16 14:00:49 +08:00
|
|
|
const tableRef = ref()
|
|
|
|
|
const planAddRef = ref()
|
|
|
|
|
const listFormRef = ref()
|
|
|
|
|
const TableHeaderRef = ref()
|
|
|
|
|
|
|
|
|
|
const tableStore = new TableStore({
|
2024-05-22 10:09:40 +08:00
|
|
|
url: '/harmonic-boot/rmppartharmonicdetail/getRMpPartHarmonicDetail',
|
2024-05-16 14:00:49 +08:00
|
|
|
publicHeight: 65,
|
|
|
|
|
method: 'POST',
|
|
|
|
|
column: [
|
|
|
|
|
{
|
|
|
|
|
title: '序号',
|
|
|
|
|
type: 'seq',
|
|
|
|
|
align: 'center',
|
|
|
|
|
width: 60,
|
|
|
|
|
formatter: (row: any) => {
|
|
|
|
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
|
|
|
|
}
|
|
|
|
|
},
|
2024-05-22 14:10:58 +08:00
|
|
|
{ field: 'sustationName', title: '变电站名称', width: 170 },
|
2024-05-22 10:09:40 +08:00
|
|
|
{ field: 'barName', title: '母线名称', width: 170 },
|
|
|
|
|
{ field: 'measurementPointName', title: '监测点名称', width: 170 },
|
2024-05-22 14:10:58 +08:00
|
|
|
{ field: 'voltageLevel', title: '电压等级', width: 170 },
|
|
|
|
|
{ field: 'loadType', title: '监测点对象类型', width: 170 },
|
|
|
|
|
{ field: 'objName', title: '监测点对象名称', width: 170 },
|
|
|
|
|
{ field: 'dateList', title: '超标天数详情', width: 170 },
|
2024-05-22 10:09:40 +08:00
|
|
|
{
|
|
|
|
|
field: 'overLimitContinuous',
|
|
|
|
|
title: '连续超标天数',
|
|
|
|
|
width: 170
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'overLimitDay',
|
|
|
|
|
title: '超标天数',
|
|
|
|
|
width: 170
|
|
|
|
|
},
|
2024-05-22 14:10:58 +08:00
|
|
|
{
|
|
|
|
|
field: 'overLimitrate',
|
|
|
|
|
title: '超标占比',
|
|
|
|
|
width: 170,
|
|
|
|
|
formatter: (row: any) => {
|
|
|
|
|
console.log(row.cellValue, row)
|
|
|
|
|
let value = parseFloat(row.cellValue * 100).toFixed(2) + '%'
|
|
|
|
|
return value
|
|
|
|
|
}
|
|
|
|
|
},
|
2024-05-16 14:00:49 +08:00
|
|
|
{
|
|
|
|
|
title: '操作',
|
|
|
|
|
width: '180',
|
|
|
|
|
align: 'center',
|
|
|
|
|
render: 'buttons',
|
|
|
|
|
fixed: 'right',
|
|
|
|
|
buttons: [
|
|
|
|
|
{
|
|
|
|
|
name: 'productSetting',
|
|
|
|
|
title: '发起告警单',
|
|
|
|
|
type: 'warning',
|
|
|
|
|
disabled: row => {
|
2024-05-22 10:09:40 +08:00
|
|
|
return row.alarmFlag != 1
|
2024-05-16 14:00:49 +08:00
|
|
|
},
|
|
|
|
|
icon: 'el-icon-EditPen',
|
|
|
|
|
render: 'confirmButton',
|
|
|
|
|
popconfirm: {
|
|
|
|
|
confirmButtonText: '确认',
|
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
|
confirmButtonType: 'primary',
|
|
|
|
|
title: '请确认发起告警单!'
|
|
|
|
|
},
|
2024-05-22 14:10:58 +08:00
|
|
|
click: row => {
|
|
|
|
|
handleWarningAlarmFlag(row).then((res)=>{
|
|
|
|
|
console.log(res);
|
|
|
|
|
ElMessage.success('发起告警单成功!')
|
|
|
|
|
tableStore.index()
|
|
|
|
|
})
|
|
|
|
|
}
|
2024-05-16 14:00:49 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'edit',
|
|
|
|
|
title: '发起预警单',
|
|
|
|
|
type: 'primary',
|
|
|
|
|
icon: 'el-icon-Open',
|
|
|
|
|
disabled: row => {
|
2024-05-22 10:09:40 +08:00
|
|
|
return row.warningFlag != 1
|
2024-05-16 14:00:49 +08:00
|
|
|
},
|
|
|
|
|
render: 'confirmButton',
|
|
|
|
|
popconfirm: {
|
|
|
|
|
confirmButtonText: '确认',
|
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
|
confirmButtonType: 'primary',
|
|
|
|
|
title: '请确认发起发起预警单!'
|
|
|
|
|
},
|
|
|
|
|
|
2024-05-22 14:10:58 +08:00
|
|
|
click: row => {
|
|
|
|
|
handleWarningAlarmFlag(row).then((res)=>{
|
|
|
|
|
console.log(res);
|
|
|
|
|
ElMessage.success('发起预警单成功!')
|
|
|
|
|
tableStore.index()
|
|
|
|
|
})
|
|
|
|
|
}
|
2024-05-16 14:00:49 +08:00
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
beforeSearchFun: () => {
|
|
|
|
|
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
|
|
|
|
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
|
|
|
|
},
|
|
|
|
|
loadCallback: () => {
|
2024-05-22 10:09:40 +08:00
|
|
|
// tableStore.table.data = [
|
|
|
|
|
// {
|
|
|
|
|
// orgName: '张家口',
|
|
|
|
|
// subName: '110kV马头山风电场',
|
|
|
|
|
// lineName: '111口头线',
|
|
|
|
|
// voltageScale: '110kV',
|
|
|
|
|
// overDay: '20',
|
|
|
|
|
// overDays: '10'
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// orgName: '张家口',
|
|
|
|
|
// subName: '110kV韩家庄风电场',
|
|
|
|
|
// lineName: '111缘韩一线',
|
|
|
|
|
// voltageScale: '110kV',
|
|
|
|
|
// overDay: '20',
|
|
|
|
|
// overDays: '16'
|
|
|
|
|
// }
|
|
|
|
|
// ]
|
2024-05-16 14:00:49 +08:00
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
provide('tableStore', tableStore)
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
tableStore.index()
|
|
|
|
|
})
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss"></style>
|