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

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

@@ -25,12 +25,16 @@
</vxe-table>
</div>
<el-form :model="form" ref="formRef" class="form-two mt10" :rules="rules" label-width="auto">
<!-- <el-form-item label="年份:" prop="year">
<el-input v-model="form.year" placeholder="请输入年份" />
<el-form-item label="问题描述:" prop="issueDetail">
<el-input
v-model="form.issueDetail"
:rows="2"
type="textarea"
clearable
style="width: 100%"
placeholder="请输入问题描述"
></el-input>
</el-form-item>
<el-form-item label="编号:" prop="number">
<el-input v-model="form.number" placeholder="请输入编号" />
</el-form-item> -->
<el-form-item label="编号:" prop="year">
<div style="display: flex; justify-content: space-between">
<el-input style="width: 45%" v-model="form.year" placeholder="请输入年份">
@@ -42,9 +46,9 @@
</div>
</el-form-item>
<el-form-item label="整改意见:" prop="issueDetail">
<el-form-item label="整改意见:" prop="reformAdvice">
<el-input
v-model="form.issueDetail"
v-model="form.reformAdvice"
:rows="2"
type="textarea"
clearable
@@ -74,10 +78,11 @@ const dialogVisible = ref(false)
const title: any = ref('')
const industry = dictData.getBasicData('Business_Type')
const form: any = ref({})
const exceeded = dictData.getBasicData('Steady_Statis')
const exceeded = dictData.getBasicData('Indicator_Type')
const resetForm = () => {
form.value = {
issueDetail: '',
reformAdvice: '',
year: new Date().getFullYear() + '',
number: '0'
}
@@ -85,7 +90,8 @@ const resetForm = () => {
const List = ref([])
resetForm()
const rules = {
issueDetail: [{ required: true, message: '请输入整改意见', trigger: 'blur' }],
issueDetail: [{ required: true, message: '请输入问题描述', trigger: 'blur' }],
reformAdvice: [{ required: true, message: '请输入整改意见', trigger: 'blur' }],
year: [{ required: true, message: '请输入编号', trigger: 'blur' }],
number: [{ required: true, message: '请输入编号', trigger: 'blur' }]
}
@@ -96,7 +102,7 @@ const submit = () => {
if (valid) {
report({
...form.value,
type: title.value == '发起预警单' ? 0 : 1,
type: title.value == '发起预警单' ? 1 : 2,
idList: List.value.map(item => item.id)
}).then(res => {
ElMessage.success('发起成功')

View File

@@ -39,7 +39,7 @@ const dialogVisible = ref(false)
const title: any = ref('')
const industry = dictData.getBasicData('Business_Type')
const exceeded = dictData.getBasicData('Steady_Statis')
const exceeded = dictData.getBasicData('Indicator_Type')
const open = (row: any) => {
dialogVisible.value = true

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
}
}
}

View File

@@ -34,6 +34,7 @@ import { useRouter } from 'vue-router'
import { cancelFeedback } from '@/api/supervision-boot/leaflet'
import { useAdminInfo } from '@/stores/adminInfo'
import { useDictData } from '@/stores/dictData'
import { getFileNameAndFilePath } from '@/api/system-boot/file'
const dictData = useDictData()
const statusSelect = dictData.statusSelect()
@@ -184,7 +185,7 @@ const tableStore = new TableStore({
row.issueDetail,
row.problemPath,
row.reformAdvice ,
row.reformAdvice,
row.takeStep,
row.reportPath
)
@@ -207,13 +208,26 @@ const tableStore = new TableStore({
row.status,
row.issueDetail,
row.problemPath,
row.reformAdvice ,
row.reformAdvice,
row.takeStep,
row.reportPath,
row.reformAdvice
)
}
},
{
name: 'productSetting',
title: '报告下载',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
disabled: row => {
return row.problemType != 2
},
click: row => {
window.open(row.filePath)
}
},
{
name: 'cancel',
title: '取消',

View File

@@ -20,6 +20,7 @@ import { useRouter } from 'vue-router'
import { cancelFeedback } from '@/api/supervision-boot/leaflet'
import { useAdminInfo } from '@/stores/adminInfo'
import { useDictData } from '@/stores/dictData'
import { getFileNameAndFilePath } from '@/api/system-boot/file'
const dictData = useDictData()
//获取登陆用户姓名和部门
const adminInfo = useAdminInfo()
@@ -195,6 +196,19 @@ const tableStore = new TableStore({
)
}
},
{
name: 'productSetting',
title: '报告下载',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
disabled: row => {
return row.problemType != 2
},
click: row => {
window.open(row.filePath)
}
},
{
name: 'cancel',
title: '取消',