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

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

View File

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

View File

@@ -55,9 +55,13 @@
></el-input> ></el-input>
</el-form-item> --> </el-form-item> -->
</template> </template>
<template #operation v-if="flag == '2'"> <template #operation>
<el-button icon="el-icon-Plus" type="primary" @click="launch('发起预警单')">发起预警单</el-button> <el-button icon="el-icon-Plus" :disabled="flag != '2'" type="primary" @click="launch('发起预警单')">
<el-button icon="el-icon-Plus" type="primary" @click="launch('发起告警单')">发起警单</el-button> 发起警单
</el-button>
<el-button icon="el-icon-Plus" :disabled="flag != '2'" type="primary" @click="launch('发起告警单')">
发起告警单
</el-button>
</template> </template>
</TableHeader> </TableHeader>
<Table ref="tableRef" /> <Table ref="tableRef" />
@@ -77,9 +81,10 @@ import { useDictData } from '@/stores/dictData'
import alarmList from './form/alarmList.vue' import alarmList from './form/alarmList.vue'
import detail from './form/detail.vue' import detail from './form/detail.vue'
const dictData = useDictData() 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 tableRef = ref()
const industry = dictData.getBasicData('Business_Type') const industry = dictData.getBasicData('Business_Type')
const TableHeaderRef = ref() const TableHeaderRef = ref()
@@ -88,7 +93,9 @@ const detailRef = ref()
const list: any = ref({ const list: any = ref({
deptId: '', deptId: '',
searchBeginTime: '', searchBeginTime: '',
searchEndTime: '' searchEndTime: '',
alertThreshold: '',
alarmThreshold: ''
}) })
const level: any = ref(dictData.state.area[0]?.level) const level: any = ref(dictData.state.area[0]?.level)
const flag = ref('') const flag = ref('')
@@ -146,7 +153,7 @@ const tableStore = new TableStore({
buttons: [ buttons: [
{ {
name: 'productSetting', name: 'productSetting',
title: '查看详情', title: '详情',
type: 'primary', type: 'primary',
icon: 'el-icon-EditPen', icon: 'el-icon-EditPen',
render: 'basicButton', render: 'basicButton',
@@ -157,6 +164,42 @@ const tableStore = new TableStore({
form: list.value 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', // name: 'productSetting',
@@ -226,6 +269,8 @@ const tableStore = new TableStore({
list.value.deptId = tableStore.table.params.deptId list.value.deptId = tableStore.table.params.deptId
list.value.searchBeginTime = tableStore.table.params.searchBeginTime list.value.searchBeginTime = tableStore.table.params.searchBeginTime
list.value.searchEndTime = tableStore.table.params.searchEndTime 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 flag.value = level.value
}, },
loadCallback: () => { loadCallback: () => {
@@ -249,8 +294,8 @@ const tableStore = new TableStore({
// ] // ]
} }
}) })
tableStore.table.params.alertThreshold = 10 tableStore.table.params.alertThreshold = 5
tableStore.table.params.alarmThreshold = 15 tableStore.table.params.alarmThreshold = 5
tableStore.table.params.targetList = [] tableStore.table.params.targetList = []
tableStore.table.params.dataType = '1' tableStore.table.params.dataType = '1'
tableStore.table.params.deptId = dictData.state.area[0].id tableStore.table.params.deptId = dictData.state.area[0].id
@@ -261,21 +306,21 @@ onMounted(() => {
}) })
const changeAlert = e => { const changeAlert = e => {
if (e == null) { if (e == null) {
tableStore.table.params.alertThreshold = 10 tableStore.table.params.alertThreshold = 5
} else { } else {
if (e > tableStore.table.params.alarmThreshold) { if (e > tableStore.table.params.alarmThreshold) {
ElMessage.warning('预警阈值不能大于报警阈值') ElMessage.warning('预警阈值不能大于报警阈值')
tableStore.table.params.alertThreshold = 10 tableStore.table.params.alertThreshold = 5
} }
} }
} }
const changeAlarm = e => { const changeAlarm = e => {
if (e == null) { if (e == null) {
tableStore.table.params.alarmThreshold = 15 tableStore.table.params.alarmThreshold = 5
} else { } else {
if (e < tableStore.table.params.alertThreshold) { if (e < tableStore.table.params.alertThreshold) {
ElMessage.warning('报警阈值不能小于预警阈值') 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 { cancelFeedback } from '@/api/supervision-boot/leaflet'
import { useAdminInfo } from '@/stores/adminInfo' import { useAdminInfo } from '@/stores/adminInfo'
import { useDictData } from '@/stores/dictData' import { useDictData } from '@/stores/dictData'
import { getFileNameAndFilePath } from '@/api/system-boot/file'
const dictData = useDictData() const dictData = useDictData()
const statusSelect = dictData.statusSelect() const statusSelect = dictData.statusSelect()
@@ -183,8 +184,8 @@ const tableStore = new TableStore({
row.status, row.status,
row.issueDetail, row.issueDetail,
row.problemPath, row.problemPath,
row.reformAdvice , row.reformAdvice,
row.takeStep, row.takeStep,
row.reportPath row.reportPath
) )
@@ -207,13 +208,26 @@ const tableStore = new TableStore({
row.status, row.status,
row.issueDetail, row.issueDetail,
row.problemPath, row.problemPath,
row.reformAdvice , row.reformAdvice,
row.takeStep, row.takeStep,
row.reportPath, row.reportPath,
row.reformAdvice 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', name: 'cancel',
title: '取消', title: '取消',

View File

@@ -20,6 +20,7 @@ import { useRouter } from 'vue-router'
import { cancelFeedback } from '@/api/supervision-boot/leaflet' import { cancelFeedback } from '@/api/supervision-boot/leaflet'
import { useAdminInfo } from '@/stores/adminInfo' import { useAdminInfo } from '@/stores/adminInfo'
import { useDictData } from '@/stores/dictData' import { useDictData } from '@/stores/dictData'
import { getFileNameAndFilePath } from '@/api/system-boot/file'
const dictData = useDictData() const dictData = useDictData()
//获取登陆用户姓名和部门 //获取登陆用户姓名和部门
const adminInfo = useAdminInfo() 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', name: 'cancel',
title: '取消', title: '取消',