修改 电能质量 在线监测页面

This commit is contained in:
GGJ
2024-06-26 16:05:22 +08:00
parent 7b7b8b0b89
commit 531ed72641
5 changed files with 106 additions and 27 deletions

View File

@@ -55,9 +55,13 @@
></el-input>
</el-form-item> -->
</template>
<template #operation v-if="flag == '2'">
<el-button icon="el-icon-Plus" type="primary" @click="launch('发起预警单')">发起预警单</el-button>
<el-button icon="el-icon-Plus" type="primary" @click="launch('发起告警单')">发起警单</el-button>
<template #operation>
<el-button icon="el-icon-Plus" :disabled="flag != '2'" type="primary" @click="launch('发起预警单')">
发起警单
</el-button>
<el-button icon="el-icon-Plus" :disabled="flag != '2'" type="primary" @click="launch('发起告警单')">
发起告警单
</el-button>
</template>
</TableHeader>
<Table ref="tableRef" />
@@ -77,9 +81,10 @@ import { useDictData } from '@/stores/dictData'
import alarmList from './form/alarmList.vue'
import detail from './form/detail.vue'
const dictData = useDictData()
import { useRouter } from 'vue-router'
const router = useRouter() // 路由对象
//字典获取超标指标
const exceeded = dictData.getBasicData('Steady_Statis')
const exceeded = dictData.getBasicData('Indicator_Type')
const tableRef = ref()
const industry = dictData.getBasicData('Business_Type')
const TableHeaderRef = ref()
@@ -88,7 +93,9 @@ const detailRef = ref()
const list: any = ref({
deptId: '',
searchBeginTime: '',
searchEndTime: ''
searchEndTime: '',
alertThreshold: '',
alarmThreshold: ''
})
const level: any = ref(dictData.state.area[0]?.level)
const flag = ref('')
@@ -146,7 +153,7 @@ const tableStore = new TableStore({
buttons: [
{
name: 'productSetting',
title: '查看详情',
title: '详情',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
@@ -157,6 +164,42 @@ const tableStore = new TableStore({
form: list.value
})
}
},
{
name: 'productSetting',
title: '查看预警单',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
disabled: row => {
return row.step != 1
},
click: row => {
router.push({
name: 'supervision/supervision/manage',
state: {
type: 0
}
})
}
},
{
name: 'productSetting',
title: '查看告警单',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
disabled: row => {
return row.step != 2
},
click: row => {
router.push({
name: 'supervision/supervision/manage',
state: {
type: 1
}
})
}
}
// {
// name: 'productSetting',
@@ -226,6 +269,8 @@ const tableStore = new TableStore({
list.value.deptId = tableStore.table.params.deptId
list.value.searchBeginTime = tableStore.table.params.searchBeginTime
list.value.searchEndTime = tableStore.table.params.searchEndTime
list.value.alertThreshold = tableStore.table.params.alertThreshold
list.value.alarmThreshold = tableStore.table.params.alarmThreshold
flag.value = level.value
},
loadCallback: () => {
@@ -249,8 +294,8 @@ const tableStore = new TableStore({
// ]
}
})
tableStore.table.params.alertThreshold = 10
tableStore.table.params.alarmThreshold = 15
tableStore.table.params.alertThreshold = 5
tableStore.table.params.alarmThreshold = 5
tableStore.table.params.targetList = []
tableStore.table.params.dataType = '1'
tableStore.table.params.deptId = dictData.state.area[0].id
@@ -261,21 +306,21 @@ onMounted(() => {
})
const changeAlert = e => {
if (e == null) {
tableStore.table.params.alertThreshold = 10
tableStore.table.params.alertThreshold = 5
} else {
if (e > tableStore.table.params.alarmThreshold) {
ElMessage.warning('预警阈值不能大于报警阈值')
tableStore.table.params.alertThreshold = 10
tableStore.table.params.alertThreshold = 5
}
}
}
const changeAlarm = e => {
if (e == null) {
tableStore.table.params.alarmThreshold = 15
tableStore.table.params.alarmThreshold = 5
} else {
if (e < tableStore.table.params.alertThreshold) {
ElMessage.warning('报警阈值不能小于预警阈值')
tableStore.table.params.alarmThreshold = 15
tableStore.table.params.alarmThreshold = 5
}
}
}