修改冀北现场问题

This commit is contained in:
GGJ
2025-12-12 09:26:56 +08:00
parent b36f765d07
commit 46c55d48ec
38 changed files with 1489 additions and 1370 deletions

View File

@@ -1,25 +1,29 @@
<template>
<!-- 用户投诉 -->
<!-- 2 有新增 发起 预警单 -->
<!-- 用户投诉 -->
<!-- 2 有新增 发起 预警单 -->
<TableHeader area nextFlag theCurrentTime showTimeAll ref="TableHeaderRef" showExport>
<template v-slot:select>
<el-form-item label="是否解决">
<el-select v-model="tableStore.table.params.dealState" clearable placeholder="请选择是否解决">
<el-option v-for="item in dealStateList" :key="item.value" :label="item.label"
:value="item.value"></el-option>
</el-select>
</el-form-item>
</template>
<template v-slot:operation>
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
</template>
</TableHeader>
<Table ref="tableRef" />
<!-- 新增 -->
<complaintsForm ref="formRef" @onSubmit="tableStore.index()" />
<!-- 详情 -->
<detail ref="detailRef" />
<TableHeader area nextFlag theCurrentTime showTimeAll ref="TableHeaderRef" showExport>
<template v-slot:select>
<el-form-item label="是否解决">
<el-select v-model="tableStore.table.params.dealState" clearable placeholder="请选择是否解决">
<el-option
v-for="item in dealStateList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
</template>
<template v-slot:operation>
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
</template>
</TableHeader>
<Table ref="tableRef" />
<!-- 新增 -->
<complaintsForm ref="formRef" @onSubmit="tableStore.index()" />
<!-- 详情 -->
<detail ref="detailRef" />
</template>
<script setup lang="ts">
import { ref, onMounted, provide, nextTick } from 'vue'
@@ -31,7 +35,8 @@ import { useDictData } from '@/stores/dictData'
import complaintsForm from './form/complaintsForm.vue'
import { useRouter } from 'vue-router'
import { sureInitiateWarningLeaflet } from '@/api/process-boot/electricitymanagement'
import detail from './complaintsDetail.vue';
import detail from './complaintsDetail.vue'
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
// Steady_Statis
const dictData = useDictData()
const exceeded = dictData.getBasicData('Steady_Statis')
@@ -42,169 +47,163 @@ const TableHeaderRef = ref()
const detailRef = ref()
const router = useRouter() // 路由对象
const dealStateList = ref([
{
label: '未解决',
value: '0'
},
{
label: '未解决',
value: '0'
}
])
const tableStore = new TableStore({
url: '/supervision-boot/SupervisionUserComplaint/list',
publicHeight: 65,
method: 'POST',
filename:'用户投诉',
column: [
{
title: '序号',
align: 'center',
width: 80,
formatter: (row: any) => {
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
}
},
{ field: 'userName', title: '用户名称' },
{ field: 'userNumber', title: '用户编号' },
{ field: 'dutyOrgName', title: '负责单位', minWidth: '80' },
// { field: 'userCategory', title: '用户类别' },
{ field: 'complaintText', title: '投诉内容' },
{ field: 'steadyIndicator', title: '稳态指标' },
{ field: 'transientIndicators', title: '暂态指标' },
{
field: 'monitorName',
title: '监测点名称',
formatter: (row: any) => {
return row.cellValue ? row.cellValue : '/'
}
},
{
field: 'detectionFlag',
title: '是否实现监测',
render: 'tag',
custom: {
0: 'warning',
1: 'primary',
},
replaceValue: {
0: '否',
1: '是',
}
},
{
field: 'createBy',
title: '填报人',
minWidth: 80,
formatter: (row: any) => {
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
}
},
{
field: 'dealState',
title: '是否解决',
render: 'tag',
custom: {
0: 'warning',
1: 'primary',
null: 'info'
},
replaceValue: {
0: '未解决',
1: '已解决',
null: '/'
}
},
{
title: '操作',
minWidth: 120,
align: 'center',
render: 'buttons',
buttons: [
url: '/supervision-boot/SupervisionUserComplaint/list',
publicHeight: 65,
method: 'POST',
filename: '用户投诉',
column: [
{
name: 'edit',
title: '发起告警单',
type: 'warning',
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.dealState != 0
},
// popconfirm: {
// confirmButtonText: '确认',
// cancelButtonText: '取消',
// confirmButtonType: 'primary',
// title: '请确认发起告警单!'
// },
click: async row => {
const { value } = await ElMessageBox.prompt('', '整改意见', {
confirmButtonText: '确定',
cancelButtonText: '取消',
title: '序号',
inputType: 'textarea',
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
inputErrorMessage: '请输入整改意见'
})
sureInitiateWarningLeaflet({ id: row.id, reformAdvice: value }).then(res => {
ElMessage.success('发起告警单成功!')
tableStore.index()
})
align: 'center',
width: 80,
formatter: (row: any) => {
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
}
},
{ field: 'userName', title: '用户名称' },
{ field: 'userNumber', title: '用户编号' },
{ field: 'dutyOrgName', title: '负责单位', minWidth: '80' },
// { field: 'userCategory', title: '用户类别' },
}
{ field: 'complaintText', title: '投诉内容' },
{ field: 'steadyIndicator', title: '稳态指标' },
{ field: 'transientIndicators', title: '暂态指标' },
{
field: 'monitorName',
title: '监测点名称',
formatter: (row: any) => {
return row.cellValue ? row.cellValue : '/'
}
},
{
name: 'edit',
title: '详情',
type: 'primary',
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.dealState == 0
},
field: 'detectionFlag',
title: '是否实现监测',
click: row => {
detailRef.value.open({
row: row,
title: '详情',
render: 'tag',
custom: {
0: 'warning',
1: 'primary'
},
replaceValue: {
0: '否',
1: '是'
}
},
})
}
{
field: 'createBy',
title: '填报人',
minWidth: 80,
formatter: (row: any) => {
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
}
},
{
name: 'edit',
title: '查看告警单',
type: 'primary',
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.initiateWarningFlag == 0
},
click: row => {
router.push({
name: 'supervision/supervision/manage',
query: {
type: 1,
t: Date.now()
}
})
}
field: 'dealState',
title: '是否解决',
render: 'tag',
custom: {
0: 'warning',
1: 'primary',
null: 'info'
},
replaceValue: {
0: '未解决',
1: '已解决',
null: '/'
}
},
{
title: '操作',
minWidth: 120,
align: 'center',
render: 'buttons',
buttons: [
{
name: 'edit',
title: '发起告警单',
type: 'warning',
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.dealState != 0
},
// popconfirm: {
// confirmButtonText: '确认',
// cancelButtonText: '取消',
// confirmButtonType: 'primary',
// title: '请确认发起告警单!'
// },
click: async row => {
const { value } = await ElMessageBox.prompt('', '整改意见', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputType: 'textarea',
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
inputErrorMessage: '请输入整改意见'
})
sureInitiateWarningLeaflet({ id: row.id, reformAdvice: value }).then(res => {
ElMessage.success('发起告警单成功!')
tableStore.index()
})
}
},
{
name: 'edit',
title: '详情',
type: 'primary',
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.dealState == 0
},
click: row => {
detailRef.value.open({
row: row,
title: '详情'
})
}
},
{
name: 'edit',
title: '查看告警单',
type: 'primary',
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.initiateWarningFlag == 0
},
click: row => {
router.push({
name: 'supervision/supervision/manage' + (VITE_FLAG ? '4' : ''),
query: {
type: 4,
t: Date.now()
}
})
}
}
]
}
]
}
],
beforeSearchFun: () => {
tableStore.table.params.currentPage = tableStore.table.params.pageNum
},
exportProcessingData: () => {
],
beforeSearchFun: () => {
tableStore.table.params.currentPage = tableStore.table.params.pageNum
},
exportProcessingData: () => {
tableStore.table.allData = tableStore.table.allData.filter(item => {
item.dealState =item.dealState==0?'未解决':item.dealState==1?'已解决':'/'
item.detectionFlag=item.detectionFlag==0?'否':item.detectionFlag==1?'是':'/'
item.dealState = item.dealState == 0 ? '未解决' : item.dealState == 1 ? '已解决' : '/'
item.detectionFlag = item.detectionFlag == 0 ? '否' : item.detectionFlag == 1 ? '是' : '/'
return item
})
}
@@ -213,11 +212,11 @@ const tableStore = new TableStore({
provide('tableStore', tableStore)
tableStore.table.params.dealState = ''
onMounted(() => {
tableStore.index()
tableStore.index()
})
// 新增
const add = () => {
formRef.value.open({ text: '新增投诉' })
formRef.value.open({ text: '新增投诉' })
}
</script>

View File

@@ -1,6 +1,6 @@
<template>
<el-dialog draggable v-model="dialogVisible" v-loading="loading" :title="title" width="80%" :before-close="handleClose">
<div style="height: 45vh">
<el-dialog draggable v-model="dialogVisible" :title="title" width="80%" :before-close="handleClose">
<div style="height: 45vh" v-loading="loading">
<vxe-table show-overflow v-bind="defaultAttribute" :data="List">
<vxe-column field="time" title="日期" width="230px"></vxe-column>
<vxe-column field="overLimitInfo" title="越限详情"></vxe-column>

View File

@@ -1,94 +1,94 @@
<template>
<!-- <div>1 监测点信息 发起预告警单 </div> -->
<!-- <div>1 监测点信息 发起预告警单 </div> -->
<TableHeader datePicker nextFlag theCurrentTime ref="TableHeaderRef" showExport>
<template v-slot:select>
<el-form-item label="区域">
<Area ref="areaRef" v-model="tableStore.table.params.deptId" @changeValue="changeArea"/>
</el-form-item>
<el-form-item label="监测点性质">
<el-select v-model="tableStore.table.params.lineType" clearable placeholder="请选择监测点性质">
<el-option label="电网侧" value="0"/>
<el-option label="非电网侧" value="1"/>
</el-select>
</el-form-item>
<el-form-item label="超标指标">
<el-select
v-model="tableStore.table.params.targetList"
clearable
multiple
collapse-tags
collapse-tags-tooltip
placeholder="请选择超标指标"
>
<el-option v-for="item in exceeded" :key="item.id" :label="item.name" :value="item.id"/>
</el-select>
</el-form-item>
<el-form-item label="数据类型">
<el-switch
v-model="tableStore.table.params.dataType"
inline-prompt
active-value="1"
inactive-value="0"
active-text="超标数据"
inactive-text="无数据"
/>
</el-form-item>
<el-form-item label="预警阈值">
<!-- <el-input v-model="tableStore.table.params.alertThreshold" placeholder="请输入预警阈值" clearable></el-input> -->
<el-input-number
v-model="tableStore.table.params.alertThreshold"
:min="0"
:step="1"
step-strictly
@change="changeAlert"
/>
</el-form-item>
<el-form-item label="告警阈值">
<el-input-number
v-model="tableStore.table.params.alarmThreshold"
:min="0"
:step="1"
step-strictly
@change="changeAlarm"
/>
</el-form-item>
<!-- <el-form-item label="搜索">
<TableHeader datePicker nextFlag theCurrentTime ref="TableHeaderRef" showExport>
<template v-slot:select>
<el-form-item label="区域">
<Area ref="areaRef" v-model="tableStore.table.params.deptId" @changeValue="changeArea" />
</el-form-item>
<el-form-item label="监测点性质">
<el-select v-model="tableStore.table.params.lineType" clearable placeholder="请选择监测点性质">
<el-option label="电网侧" value="0" />
<el-option label="非电网侧" value="1" />
</el-select>
</el-form-item>
<el-form-item label="超标指标">
<el-select
v-model="tableStore.table.params.targetList"
clearable
multiple
collapse-tags
collapse-tags-tooltip
placeholder="请选择超标指标"
>
<el-option v-for="item in exceeded" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item>
<el-form-item label="数据类型">
<el-switch
v-model="tableStore.table.params.dataType"
inline-prompt
active-value="1"
inactive-value="0"
active-text="超标数据"
inactive-text="无数据"
/>
</el-form-item>
<el-form-item label="预警阈值">
<!-- <el-input v-model="tableStore.table.params.alertThreshold" placeholder="请输入预警阈值" clearable></el-input> -->
<el-input-number
v-model="tableStore.table.params.alertThreshold"
:min="0"
:step="1"
step-strictly
@change="changeAlert"
/>
</el-form-item>
<el-form-item label="告警阈值">
<el-input-number
v-model="tableStore.table.params.alarmThreshold"
:min="0"
:step="1"
step-strictly
@change="changeAlarm"
/>
</el-form-item>
<!-- <el-form-item label="搜索">
<el-input
v-model="tableStore.table.params.searchValue"
placeholder="输入变电站、终端、监测点名称"
clearable
></el-input>
</el-form-item> -->
</template>
<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"/>
<!-- /告警单 -->
<alarmList ref="alarmListRef" @onSubmit="tableStore.index()"/>
<!-- 详情 -->
<detail ref="detailRef"/>
</template>
<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" />
<!-- /告警单 -->
<alarmList ref="alarmListRef" @onSubmit="tableStore.index()" />
<!-- 详情 -->
<detail ref="detailRef" />
</template>
<script setup lang="ts">
import {ref, onMounted, provide, nextTick} from 'vue'
import { ref, onMounted, provide, nextTick } from 'vue'
import TableStore from '@/utils/tableStore'
import Area from '@/components/form/area/index.vue'
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 { ElMessage, ElMessageBox } from 'element-plus'
import { useDictData } from '@/stores/dictData'
import alarmList from './form/alarmList.vue'
import detail from './form/detail.vue'
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
const dictData = useDictData()
import {useRouter} from 'vue-router'
import { useRouter } from 'vue-router'
const router = useRouter() // 路由对象
//字典获取超标指标
@@ -100,224 +100,224 @@ const alarmListRef = ref()
const flagTime = ref(false)
const detailRef = ref()
const list: any = ref({
deptId: '',
searchBeginTime: '',
searchEndTime: '',
alertThreshold: '',
alarmThreshold: ''
deptId: '',
searchBeginTime: '',
searchEndTime: '',
alertThreshold: '',
alarmThreshold: ''
})
const level: any = ref(dictData.state.area[0]?.level)
const flag: any = ref('')
const tableStore = new TableStore({
url: '/supervision-boot/onlineMonitor/list',
publicHeight: 65,
method: 'POST',
filename:'在线监测',
// isWebPaging:true,
column: [
{title: '', type: 'checkbox', width: 40},
{
title: '序号',
align: 'center',
width: 80,
formatter: (row: any) => {
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
}
},
{field: 'dept', title: '负责单位'},
{field: 'substation', title: '变电站名称'},
{field: 'deviceName', title: '终端名称'},
{field: 'lineName', title: '监测点名称'},
{
field: 'businessType',
title: '监测对象类型',
formatter: (row: any) => {
return industry.find((item: any) => item.id == row.cellValue)?.name || '/'
}
},
{field: 'objectName', title: '监测对象名称'},
{
field: 'targetType',
title: '指标类型',
formatter: (row: any) => {
return exceeded.find((item: any) => item.id == row.cellValue)?.name || '/'
}
},
{
field: 'overLimitDay',
title: '累计超标天数',
formatter: (row: any) => {
return row.cellValue != null ? row.cellValue : '/'
}
},
{
field: 'updateTime',
visible: flagTime,
title: '最新数据时间'
},
{
title: '操作',
width: '180',
align: 'center',
render: 'buttons',
fixed: 'right',
buttons: [
url: '/supervision-boot/onlineMonitor/list',
publicHeight: 65,
method: 'POST',
filename: '在线监测',
// isWebPaging:true,
column: [
{ title: '', type: 'checkbox', width: 40 },
{
name: 'productSetting',
title: '详情',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
disabled: row => {
return row.targetType == 0
},
click: row => {
detailRef.value.open({
text: '详情',
row: row,
list: list.value
})
}
title: '序号',
align: 'center',
width: 80,
formatter: (row: any) => {
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
}
},
{ field: 'dept', title: '负责单位' },
{ field: 'substation', title: '变电站名称' },
{ field: 'deviceName', title: '终端名称' },
{ field: 'lineName', title: '监测点名称' },
{
field: 'businessType',
title: '监测对象类型',
formatter: (row: any) => {
return industry.find((item: any) => item.id == row.cellValue)?.name || '/'
}
},
{ field: 'objectName', title: '监测对象名称' },
{
field: 'targetType',
title: '指标类型',
formatter: (row: any) => {
return exceeded.find((item: any) => item.id == row.cellValue)?.name || '/'
}
},
{
field: 'overLimitDay',
title: '累计超标天数',
formatter: (row: any) => {
return row.cellValue != null ? row.cellValue : '/'
}
},
{
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',
query: {
type: 0,
t: Date.now()
}
})
}
field: 'updateTime',
visible: flagTime,
title: '最新数据时间'
},
{
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',
query: {
type: 1,
t: Date.now()
}
})
}
title: '操作',
width: '180',
align: 'center',
render: 'buttons',
fixed: 'right',
buttons: [
{
name: 'productSetting',
title: '详情',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
disabled: row => {
return row.targetType == 0
},
click: row => {
detailRef.value.open({
text: '详情',
row: row,
list: 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' + (VITE_FLAG ? '3' : ''),
query: {
type: 3,
t: Date.now()
}
})
}
},
{
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' + (VITE_FLAG ? '4' : ''),
query: {
type: 4,
t: Date.now()
}
})
}
}
// {
// name: 'productSetting',
// title: '发起告警单',
// type: 'warning',
// disabled: row => {
// return row.overLimitDay < tableStore.table.params.alarmThreshold
// },
// icon: 'el-icon-EditPen',
// render: 'basicButton',
// click: async row => {
// // handleWarningAlarmFlag(row).then(res => {
// // console.log(res)
// // ElMessage.success('发起告警单成功!')
// // tableStore.index()
// // })
// const { value } = await ElMessageBox.prompt('', '整改意见', {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// inputType: 'textarea',
// inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
// inputErrorMessage: '请输入整改意见'
// })
// handleWarningAlarmFlag({ ...row, reformAdvice: value }).then(res => {
// ElMessage.success('发起告警单成功!')
// tableStore.index()
// })
// }
// },
// {
// name: 'edit',
// title: '发起预警单',
// type: 'primary',
// icon: 'el-icon-Open',
// disabled: row => {
// return row.overLimitDay >= tableStore.table.params.alarmThreshold
// },
// render: 'basicButton',
// click: async row => {
// // handleWarningAlarmFlag(row).then(res => {
// // console.log(res)
// // ElMessage.success('发起预警单成功!')
// // tableStore.index()
// // })
// const { value } = await ElMessageBox.prompt('', '整改意见', {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// inputType: 'textarea',
// inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
// inputErrorMessage: '请输入整改意见'
// })
// handleWarningAlarmFlag({ ...row, reformAdvice: value }).then(res => {
// ElMessage.success('发起预警单成功!')
// tableStore.index()
// })
// }
// }
]
}
// {
// name: 'productSetting',
// title: '发起告警单',
// type: 'warning',
// disabled: row => {
// return row.overLimitDay < tableStore.table.params.alarmThreshold
],
beforeSearchFun: () => {
tableStore.table.params.currentPage = tableStore.table.params.pageNum
list.value.deptId = tableStore.table.params.deptId
list.value.searchBeginTime = tableStore.table.params.searchBeginTime
list.value.searchEndTime = tableStore.table.params.searchEndTime
if (tableStore.table.params.alertThreshold != '') {
list.value.alertThreshold = tableStore.table.params.alertThreshold
}
list.value.lineType = tableStore.table.params.lineType
list.value.alarmThreshold = tableStore.table.params.alarmThreshold
flag.value = level.value
flagTime.value = tableStore.table.params.dataType == 0 ? true : false
},
loadCallback: () => {
// tableStore.table.data = [
// {
// orgName: '张家口',
// subName: '110kV马头山风电场',
// lineName: '111口头线',
// voltageScale: '110kV',
// overDay: '20',
// overDays: '10'
// },
// icon: 'el-icon-EditPen',
// render: 'basicButton',
// click: async row => {
// // handleWarningAlarmFlag(row).then(res => {
// // console.log(res)
// // ElMessage.success('发起告警单成功!')
// // tableStore.index()
// // })
// const { value } = await ElMessageBox.prompt('', '整改意见', {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// inputType: 'textarea',
// inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
// inputErrorMessage: '请输入整改意见'
// })
// handleWarningAlarmFlag({ ...row, reformAdvice: value }).then(res => {
// ElMessage.success('发起告警单成功!')
// tableStore.index()
// })
// {
// orgName: '张家口',
// subName: '110kV韩家庄风电场',
// lineName: '111缘韩一线',
// voltageScale: '110kV',
// overDay: '20',
// overDays: '16'
// }
// },
// {
// name: 'edit',
// title: '发起预警单',
// type: 'primary',
// icon: 'el-icon-Open',
// disabled: row => {
// return row.overLimitDay >= tableStore.table.params.alarmThreshold
// },
// render: 'basicButton',
// click: async row => {
// // handleWarningAlarmFlag(row).then(res => {
// // console.log(res)
// // ElMessage.success('发起预警单成功!')
// // tableStore.index()
// // })
// const { value } = await ElMessageBox.prompt('', '整改意见', {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// inputType: 'textarea',
// inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
// inputErrorMessage: '请输入整改意见'
// })
// handleWarningAlarmFlag({ ...row, reformAdvice: value }).then(res => {
// ElMessage.success('发起预警单成功!')
// tableStore.index()
// })
// }
// }
]
// ]
}
],
beforeSearchFun: () => {
tableStore.table.params.currentPage = tableStore.table.params.pageNum
list.value.deptId = tableStore.table.params.deptId
list.value.searchBeginTime = tableStore.table.params.searchBeginTime
list.value.searchEndTime = tableStore.table.params.searchEndTime
if (tableStore.table.params.alertThreshold != '') {
list.value.alertThreshold = tableStore.table.params.alertThreshold
}
list.value.lineType = tableStore.table.params.lineType
list.value.alarmThreshold = tableStore.table.params.alarmThreshold
flag.value = level.value
flagTime.value = tableStore.table.params.dataType == 0 ? true : false
},
loadCallback: () => {
// 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'
// }
// ]
}
})
tableStore.table.params.alertThreshold = 5
tableStore.table.params.alarmThreshold = 5
@@ -329,50 +329,50 @@ tableStore.table.params.dataType = '1'
tableStore.table.params.deptId = dictData.state.area[0].id
provide('tableStore', tableStore)
onMounted(() => {
// TableHeaderRef.value.setDatePicker([{label: '月', value: 3}])
// TableHeaderRef.value.setDatePicker([{label: '月', value: 3}])
tableStore.index()
setTimeout(() => {
TableHeaderRef.value.showSelectChange()
}, 10)
tableStore.index()
setTimeout(() => {
TableHeaderRef.value.showSelectChange()
}, 10)
})
const changeAlert = e => {
if (e == null) {
tableStore.table.params.alertThreshold = 5
} else {
if (e > tableStore.table.params.alarmThreshold) {
ElMessage.warning('预警阈值不能大于报警阈值')
tableStore.table.params.alertThreshold = 5
if (e == null) {
tableStore.table.params.alertThreshold = 5
} else {
if (e > tableStore.table.params.alarmThreshold) {
ElMessage.warning('预警阈值不能大于报警阈值')
tableStore.table.params.alertThreshold = 5
}
}
}
}
const changeAlarm = e => {
if (e == null) {
tableStore.table.params.alarmThreshold = 5
} else {
if (e < tableStore.table.params.alertThreshold) {
ElMessage.warning('报警阈值不能小于预警阈值')
tableStore.table.params.alarmThreshold = 5
if (e == null) {
tableStore.table.params.alarmThreshold = 5
} else {
if (e < tableStore.table.params.alertThreshold) {
ElMessage.warning('报警阈值不能小于预警阈值')
tableStore.table.params.alarmThreshold = 5
}
}
}
}
// 发起预警单
const launch = (title: string) => {
if (tableStore.table.selection.length == 0) {
ElMessage.warning('请选择一条数据')
return
}
if (tableStore.table.selection.length == 0) {
ElMessage.warning('请选择一条数据')
return
}
alarmListRef.value.open({
text: title,
form: list.value,
row: tableStore.table.selection
})
console.log('🚀 ~ launch ~ list.value:', list.value)
alarmListRef.value.open({
text: title,
form: list.value,
row: tableStore.table.selection
})
console.log('🚀 ~ launch ~ list.value:', list.value)
}
const changeArea = e => {
level.value = e.data.level
level.value = e.data.level
}
</script>

View File

@@ -1,25 +1,33 @@
<template>
<!-- <div> 普测结果 发起预告警单</div> -->
<TableHeader area nextFlag theCurrentTime showTimeAll ref="TableHeaderRef" showExport>
<template v-slot:select>
<el-form-item label="计划名称">
<el-input style="width: 200px" v-model="tableStore.table.params.searchValue" clearable
placeholder="请输入计划名称"></el-input>
</el-form-item>
<el-form-item label="是否解决">
<el-select v-model="tableStore.table.params.dealState" clearable placeholder="请选择是否解决">
<el-option v-for="item in dealStateList" :key="item.value" :label="item.label"
:value="item.value"></el-option>
</el-select>
</el-form-item>
</template>
</TableHeader>
<Table ref="tableRef" />
<testQuestionsForm ref="testQuestionsFormRef" />
<!-- 详情 -->
<el-dialog draggable v-model="dialogVisible" v-if="dialogVisible" title="详情" width="1000">
<detail :id="detailId" :flag="flag" />
</el-dialog>
<!-- <div> 普测结果 发起预告警单</div> -->
<TableHeader area nextFlag theCurrentTime showTimeAll ref="TableHeaderRef" showExport>
<template v-slot:select>
<el-form-item label="计划名称">
<el-input
style="width: 200px"
v-model="tableStore.table.params.searchValue"
clearable
placeholder="请输入计划名称"
></el-input>
</el-form-item>
<el-form-item label="是否解决">
<el-select v-model="tableStore.table.params.dealState" clearable placeholder="请选择是否解决">
<el-option
v-for="item in dealStateList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
</template>
</TableHeader>
<Table ref="tableRef" />
<testQuestionsForm ref="testQuestionsFormRef" />
<!-- 详情 -->
<el-dialog draggable v-model="dialogVisible" v-if="dialogVisible" title="详情" width="1000">
<detail :id="detailId" :flag="flag" />
</el-dialog>
</template>
<script setup lang="ts">
import { ref, onMounted, provide, nextTick } from 'vue'
@@ -32,7 +40,7 @@ import { ElMessage, ElMessageBox } from 'element-plus'
import { useRouter } from 'vue-router'
import { useDictData } from '@/stores/dictData'
import detail from '@/views/pqs/supervise/harmonicSurvey/test/detail.vue'
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
const dictData = useDictData()
const { push } = useRouter()
const router = useRouter() // 路由对象
@@ -151,9 +159,9 @@ const tableStore = new TableStore({
},
click: row => {
router.push({
name: 'supervision/supervision/manage',
name: 'supervision/supervision/manage' + (VITE_FLAG ? '4' : ''),
query: {
type: 1,
type: 4,
t: Date.now()
}
})
@@ -168,7 +176,7 @@ const tableStore = new TableStore({
exportProcessingData: () => {
tableStore.table.allData = tableStore.table.allData.filter(item => {
item.dealState = item.dealState == 0 ? '未解决' : item.dealState == 1 ? '已解决' : '/'
return item
})
}

View File

@@ -1,25 +1,34 @@
<!---试运行列表-->
<template>
<div>
<TableHeader area nextFlag theCurrentTime showTimeAll ref="TableHeaderRef" showExport>
<template #select>
<el-form-item label="流程状态">
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
<el-option v-for="item in statusSelect" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="是否解决">
<el-select v-model="tableStore.table.params.dealState" clearable placeholder="请选择是否解决">
<el-option v-for="item in dealStateList" :key="item.value" :label="item.label"
:value="item.value"></el-option>
</el-select>
</el-form-item>
</template>
</TableHeader>
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
<!-- 详情 -->
<detail ref="detailRef" />
</div>
<div>
<TableHeader area nextFlag theCurrentTime showTimeAll ref="TableHeaderRef" showExport>
<template #select>
<el-form-item label="流程状态">
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
<el-option
v-for="item in statusSelect"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="是否解决">
<el-select v-model="tableStore.table.params.dealState" clearable placeholder="请选择是否解决">
<el-option
v-for="item in dealStateList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
</template>
</TableHeader>
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
<!-- 详情 -->
<detail ref="detailRef" />
</div>
</template>
<script setup lang="ts">
import { ref, onMounted, provide, reactive } from 'vue'
@@ -35,7 +44,7 @@ import { VxeTablePropTypes } from 'vxe-table'
import { useAdminInfo } from '@/stores/adminInfo'
import { getFileNameAndFilePath } from '@/api/system-boot/file'
import detail from './testRunDetail.vue'
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
const dictData = useDictData()
const statusSelect = dictData.statusSelect()
const { push } = useRouter()
@@ -218,9 +227,9 @@ const tableStore = new TableStore({
},
click: row => {
push({
name: 'supervision/supervision/manage',
name: 'supervision/supervision/manage' + (VITE_FLAG ? '4' : ''),
query: {
type: 1,
type: 4,
t: Date.now()
}
})

View File

@@ -1,16 +1,16 @@
<template>
<div class="default-main">
<el-tabs v-model="activeName" type="border-card">
<el-tab-pane label="在线监测" name="1">
<el-tab-pane label="在线监测问题" name="1" v-if="tabList.includes('1')">
<online v-if="activeName == '1'" />
</el-tab-pane>
<el-tab-pane label="用户投诉" name="2">
<el-tab-pane label="用户投诉问题" name="2" v-if="tabList.includes('2')">
<complaints v-if="activeName == '2'" />
</el-tab-pane>
<el-tab-pane label="计划问题" name="3">
<el-tab-pane label="计划实施问题" name="3" v-if="tabList.includes('3')">
<testQuestions v-if="activeName == '3'" />
</el-tab-pane>
<el-tab-pane label="试运行评估问题" name="4">
<el-tab-pane label="试运行评估" name="4" v-if="tabList.includes('4')">
<testRun v-if="activeName == '4'" />
</el-tab-pane>
<!-- <el-tabs v-model="activeName" type="border-card">
@@ -30,14 +30,23 @@ import online from './components1/online.vue'
import complaints from './components1/complaints.vue'
import testQuestions from './components1/testQuestions.vue'
import testRun from './components1/testRun.vue'
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
// import maintenance from './components/maintenance.vue'
// import audit from './components/audit.vue'
import { mainHeight } from '@/utils/layout'
defineOptions({
name: 'supervision/electricitymanagement'
})
const tabList = ref(['1', '2', '3', '4'])
const activeName = ref('1')
onMounted(() => {
let key = window.location.href.split('?')[0].slice(-1)
const isNumber = /^\d$/.test(key)
if (isNumber) {
tabList.value = [key]
activeName.value = key
}
})
const layout = mainHeight(63) as any
</script>

View File

@@ -1,24 +1,24 @@
<template>
<div class='default-main'>
<el-tabs v-model='activeName' type='border-card'>
<el-tab-pane label='技术监督计划管理' name='1'>
<plan-manage :id='id' v-if="activeName == '1'" />
<div class="default-main">
<el-tabs v-model="activeName" type="border-card">
<el-tab-pane :label="VITE_FLAG ? '工作计划指定' : '技术监督计划管理'" name="1" v-if="tabList.includes('1')">
<plan-manage :id="id" v-if="activeName == '1'" />
</el-tab-pane>
<el-tab-pane label='技术监督测试管理' name='2'>
<test-manage :id='id' :businessKey='key' v-if="activeName == '2'" />
<el-tab-pane :label="VITE_FLAG ? '工作计划实施' : '技术监督测试管理'" name="2" v-if="tabList.includes('2')">
<test-manage :id="id" :businessKey="key" v-if="activeName == '2'" />
</el-tab-pane>
</el-tabs>
</div>
</template>
<script setup lang='ts'>
import { ref } from 'vue'
<script setup lang="ts">
import { ref, onMounted } from 'vue'
import planManage from './components/planManage.vue'
import testManage from './components/testManage.vue'
import { mainHeight } from '@/utils/layout'
import { useDictData } from '@/stores/dictData'
import { useRoute } from 'vue-router'
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
const route = useRoute()
const dictData = useDictData()
const statusSelect = dictData.statusSelect()
@@ -27,27 +27,39 @@ const key = ref('')
defineOptions({
name: 'supervision/harmonicmanagement'
})
const tabList = ref(['1', '2', '3', '4'])
const activeName = ref('1')
onMounted(() => {
let key = window.location.href.split('?')[0].slice(-1)
const isNumber = /^\d$/.test(key)
if (isNumber) {
tabList.value = [key]
activeName.value = key
}
})
const layout = mainHeight(63) as any
watch(() => route.query.t, async (newValue, oldValue) => {
if (route.fullPath.includes('supervision/harmonicmanagement')) {
let type = (route.query.type as string) || 'null'
if (type == 'null') { }
else if (type == '1') {
activeName.value = '1'
} else {
activeName.value = '2'
watch(
() => route.query.t,
async (newValue, oldValue) => {
if (route.fullPath.includes('supervision/harmonicmanagement')) {
let type = (route.query.type as string) || 'null'
if (type == 'null') {
} else if (type == '1') {
activeName.value = '1'
} else {
activeName.value = '2'
}
id.value = (route.query.id as string) || 'null'
id.value = id.value + '@' + route.query.t
key.value = (route.query.key as string) || 'null'
}
id.value = (route.query.id as string) || 'null'
id.value = id.value + '@' + route.query.t
key.value = (route.query.key as string) || 'null'
}
}, { deep: true, immediate: true })
},
{ deep: true, immediate: true }
)
</script>
<style lang='scss' scoped>
<style lang="scss" scoped>
.bars_w {
width: 100%;
height: 500px;

View File

@@ -1,6 +1,6 @@
<template>
<div class='default-main'>
<el-descriptions :column='2' border>
<el-descriptions :column='2' label-width="140px" border>
<el-descriptions-item label='技术监督计划名称'>
{{ detailData?.planName }}
</el-descriptions-item>
@@ -8,7 +8,7 @@
{{ detailData?.deptName }}
</el-descriptions-item>
<el-descriptions-item label='监督类型'>
{{
{{
supvTypeList.find(item => {
return item.id == detailData?.supvType
})?.name

View File

@@ -1,23 +1,23 @@
<template>
<div class='default-main'>
<el-tabs v-model='activeName' type='border-card'>
<el-tab-pane label='未建档用户档案录入管理' name='1'>
<el-tab-pane :label="VITE_FLAG ? '预测评估' : '未建档用户档案录入管理'" name='1' v-if="tabList.includes('1')">
<undocumented ref='Undocumented' :id='id' v-if="activeName == '1'" />
</el-tab-pane>
<el-tab-pane label='常态化干扰源用户管理' name='3'>
<interferenceUserTable ref='InterferenceUserTable' :id='id' :businessKey="key" v-if="activeName == '3'" />
<el-tab-pane :label="VITE_FLAG ? '接入管理' : '常态化干扰源用户管理'" name='2' v-if="tabList.includes('2')">
<interferenceUserTable ref='InterferenceUserTable' :id='id' :businessKey="key" v-if="activeName == '2'" />
</el-tab-pane>
</el-tabs>
</div>
</template>
<script setup lang='ts'>
import { nextTick, ref, provide } from 'vue'
import { nextTick, ref, provide,onMounted } from 'vue'
import { mainHeight } from '@/utils/layout'
import undocumented from './components/undocumented/index.vue'
import interferenceUserTable from './components/normalizationManager/interferenceUserTable.vue'
import { useRoute } from 'vue-router'
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
const route = useRoute()
const Undocumented = ref()
const InterferenceUserTable = ref()
@@ -27,7 +27,15 @@ defineOptions({
const activeName = ref('1')
const id = ref('')
const key = ref('')
const tabList = ref(['1', '2', ])
onMounted(() => {
let key = window.location.href.split('?')[0].slice(-1)
const isNumber = /^\d$/.test(key)
if (isNumber) {
tabList.value = [key]
activeName.value = key
}
})
watch(() => route.query.t, async (newValue, oldValue) => {
if (route.fullPath.includes('supervision/interferencemanagement')) {

View File

@@ -49,6 +49,7 @@ import { planDetailsAudit, sendAlarm } from '@/api/supervision-boot/plan/index'
import { useAdminInfo } from '@/stores/adminInfo'
import { cancelPlanFormData } from '@/api/supervision-boot/plan/index'
//获取登陆用户姓名和部门
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
const adminInfo = useAdminInfo()
defineOptions({
name: 'plan'
@@ -71,9 +72,13 @@ const tableStore = new TableStore({
// publicHeight: 65,
method: 'POST',
column: [
{ title: '序号', width: 80,formatter: (row: any) => {
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
} },
{
title: '序号',
width: 80,
formatter: (row: any) => {
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
}
},
{
field: 'province',
title: '所属省份',
@@ -270,9 +275,9 @@ const tableStore = new TableStore({
},
click: row => {
router.push({
name: 'supervision/supervision/manage',
name: 'supervision/supervision/manage' + (VITE_FLAG ? '4' : ''),
query: {
type: 1
type: 4
}
})
}

View File

@@ -26,15 +26,15 @@ const key = ref('')
defineOptions({
name: 'supervision/supervision/manage'
})
let tabList = ['3', '4']
const tabList = ref(['3', '4'])
const activeName: any = ref('3')
onMounted(() => {
let key = window.location.href.slice(-1)
let key = window.location.href.split('?')[0].slice(-1)
const isNumber = /^\d$/.test(key)
// if (isNumber) {
// tabList = [key]
// activeName.value = key
// }
if (isNumber) {
tabList.value = [key]
activeName.value = key
}
})
watch(

View File

@@ -1,26 +1,26 @@
<template>
<div class='default-main'>
<el-tabs v-model='activeName' type='border-card'>
<el-tab-pane label='干扰源用户台账' name='1'>
<interferenceUserTable :id='id' v-if="activeName == '1'" />
<div class="default-main">
<el-tabs v-model="activeName" type="border-card">
<el-tab-pane label="干扰源用户台账" name="1" v-if="tabList.includes('1')">
<interferenceUserTable :id="id" v-if="activeName == '1'" />
</el-tab-pane>
<el-tab-pane label='敏感及重要用户台账' name='2'>
<el-tab-pane label="敏感及重要用户台账" name="2" v-if="tabList.includes('2')">
<sensitiveUserTable v-if="activeName == '2'" />
</el-tab-pane>
<el-tab-pane label='变电站台账' name='3'>
<el-tab-pane label="变电站台账" name="3" v-if="tabList.includes('3')">
<substationLedger v-if="activeName == '3'" />
</el-tab-pane>
<el-tab-pane label='终端台账' name='4'>
<el-tab-pane label="终端台账" name="4" v-if="tabList.includes('4')">
<deviceLedgerTable v-if="activeName == '4'" />
</el-tab-pane>
<el-tab-pane label='监测点台账' name='5'>
<el-tab-pane label="监测点台账" name="5" v-if="tabList.includes('5')">
<monitorLedgerTable v-if="activeName == '5'" />
</el-tab-pane>
</el-tabs>
</div>
</template>
<script setup lang='ts'>
<script setup lang="ts">
import { onMounted, reactive, ref, provide } from 'vue'
import interferenceUserTable from './components/interferenceUserTable.vue'
import sensitiveUserTable from './components/sensitiveUserTable.vue'
@@ -37,23 +37,35 @@ defineOptions({
})
const activeName = ref('1')
watch(() => route.query.t, async (newValue, oldValue) => {
if (route.fullPath.includes('Supervision/Terminaldetection')) {
let type = (route.query.type as string) || 'null'
if (type == 'null') { }
else if (type == '1') {
activeName.value = '1'
}
id.value = (route.query.id as string) || 'null'
id.value = id.value + '@' + route.query.t
const tabList = ref(['1', '2', '3', '4', '5'])
onMounted(() => {
let key = window.location.href.split('?')[0].slice(-1)
const isNumber = /^\d$/.test(key)
if (isNumber) {
tabList.value = [key]
activeName.value = key
}
}, { deep: true, immediate: true })
})
watch(
() => route.query.t,
async (newValue, oldValue) => {
if (route.fullPath.includes('Supervision/Terminaldetection')) {
let type = (route.query.type as string) || 'null'
if (type == 'null') {
} else if (type == '1') {
activeName.value = '1'
}
id.value = (route.query.id as string) || 'null'
id.value = id.value + '@' + route.query.t
}
},
{ deep: true, immediate: true }
)
const layout = mainHeight(63) as any
</script>
<style lang='scss' scoped>
<style lang="scss" scoped>
.bars_w {
width: 100%;
height: 500px;

View File

@@ -1,7 +1,7 @@
<template>
<div class="default-main">
<el-tabs v-model="activeName" type="border-card">
<el-tab-pane label="终端入网检测" name="1" v-if="tabList.includes('1')">
<el-tab-pane label="终端检测" name="1" v-if="tabList.includes('1')">
<terminal :id="id" v-if="activeName == '1'" />
</el-tab-pane>
<el-tab-pane label="监测点台账录入" name="2" v-if="tabList.includes('2')">
@@ -10,7 +10,7 @@
<el-tab-pane label="监测点联调列表" name="3" v-if="tabList.includes('3')">
<jointDebugList :id="id" v-if="activeName == '3'" />
</el-tab-pane>
<el-tab-pane label="终端周期检测" name="4" v-if="tabList.includes('4')">
<el-tab-pane label="周期校验" name="4" v-if="tabList.includes('4')">
<cycleDetection :id="id" :businessKey="key" v-if="activeName == '4'" />
</el-tab-pane>
</el-tabs>
@@ -34,12 +34,12 @@ const activeName = ref('1')
const route = useRoute()
const id = ref('')
const key = ref('')
let tabList = ['1', '2', '3', '4']
const tabList = ref(['1', '2', '3', '4'])
onMounted(() => {
let key = window.location.href.slice(-1)
let key = window.location.href.split('?')[0].slice(-1)
const isNumber = /^\d$/.test(key)
if (isNumber) {
tabList = [key]
tabList.value = [key]
activeName.value = key
}
})

View File

@@ -1,21 +1,29 @@
<!---试运行列表-->
<template>
<div class="default-main">
<TableHeader area datePicker nextFlag theCurrentTime showTimeAll ref="TableHeaderRef">
<template #select>
<el-form-item label="流程状态">
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
<el-option v-for="item in statusSelect" :key="item.id" :label="item.name"
:value="item.id"></el-option>
</el-select>
</el-form-item>
</template>
<template #operation>
<el-button icon="el-icon-Plus" type="primary" @click="startRunTest">试运行</el-button>
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
</template>
</TableHeader>
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
<el-tabs v-model="activeName" type="border-card">
<el-tab-pane label="试运行评估" name="1">
<TableHeader area datePicker nextFlag theCurrentTime showTimeAll ref="TableHeaderRef">
<template #select>
<el-form-item label="流程状态">
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
<el-option
v-for="item in statusSelect"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
</template>
<template #operation>
<el-button icon="el-icon-Plus" type="primary" @click="startRunTest">试运行</el-button>
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
</template>
</TableHeader>
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
</el-tab-pane>
</el-tabs>
<!-- <el-dialog
v-model='timeDialog'
@@ -62,11 +70,11 @@ const { push } = useRouter()
const adminInfo = useAdminInfo()
const TableHeaderRef = ref()
const tableRef = ref()
const activeName = ref('1')
const tableStore = new TableStore({
url: '/supervision-boot/tempLinedebug/pageHasDebug',
method: 'POST',
// publicHeight: 65,
publicHeight: 65,
column: [
{ title: '', type: 'checkbox', width: 40 },
{ field: 'lineName', title: '监测点名称', minWidth: 160 },
@@ -266,23 +274,20 @@ const deleteEven = () => {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let createBy = tableStore.table.selection.map(item => item.createBy)
let status = tableStore.table.selection.map(item => item.status)
if (adminInfo.roleCode.includes('delete_info')) {
deleteList()
} else if (createBy.includes(adminInfo.$state.id) && status.includes(0)) {
deleteList()
} else {
ElMessage({
type: 'warning',
message: '只能删除自己填报的数据!!!'
})
}
})
.then(() => {
let createBy = tableStore.table.selection.map(item => item.createBy)
let status = tableStore.table.selection.map(item => item.status)
if (adminInfo.roleCode.includes('delete_info')) {
deleteList()
} else if (createBy.includes(adminInfo.$state.id) && status.includes(0)) {
deleteList()
} else {
ElMessage({
type: 'warning',
message: '只能删除自己填报的数据!!!'
})
}
})
}
}
@@ -410,43 +415,46 @@ const runTestSubmit = (type: number) => {
const route = useRoute()
watch(() => route.query.t, async (newValue, oldValue) => {
let nowTime = Date.now()
let routeTime = route.query.t as number || 1
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms则不执行
if (route.fullPath.includes('/testRun')) {
let id = (route.query.id as string) || 'null'
if (id != 'null') {
monitorIds = []
monitorIds.push(id)
const start = new Date()
start.setDate(start.getDate() + 1)
start.setHours(0, 0, 0)
const end = new Date()
end.setDate(end.getDate() + 3)
end.setHours(23, 59, 59)
const startString = formatDate(start, 'YYYY-MM-DD') // 转换为 YYYY-MM-DD 格式
const endString = formatDate(end, 'YYYY-MM-DD')
const data = {
startTime: startString,
endTime: endString,
lineIds: monitorIds,
operateType: 1,
id
}
update(data).then((res: any) => {
if (res.code === 'A0000') {
ElMessage({
message: '发起试运行成功',
type: 'success'
})
tableStore.index()
watch(
() => route.query.t,
async (newValue, oldValue) => {
let nowTime = Date.now()
let routeTime = (route.query.t as number) || 1
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms则不执行
if (route.fullPath.includes('/testRun')) {
let id = (route.query.id as string) || 'null'
if (id != 'null') {
monitorIds = []
monitorIds.push(id)
const start = new Date()
start.setDate(start.getDate() + 1)
start.setHours(0, 0, 0)
const end = new Date()
end.setDate(end.getDate() + 3)
end.setHours(23, 59, 59)
const startString = formatDate(start, 'YYYY-MM-DD') // 转换为 YYYY-MM-DD 格式
const endString = formatDate(end, 'YYYY-MM-DD')
const data = {
startTime: startString,
endTime: endString,
lineIds: monitorIds,
operateType: 1,
id
}
})
update(data).then((res: any) => {
if (res.code === 'A0000') {
ElMessage({
message: '发起试运行成功',
type: 'success'
})
tableStore.index()
}
})
}
}
}
}, { deep: true, immediate: true })
},
{ deep: true, immediate: true }
)
</script>
<style scoped lang="scss"></style>

View File

@@ -2,13 +2,13 @@
<div class="default-main">
<el-tabs v-model="activeName" type="border-card">
<el-tab-pane label="监测点台账录入" name="1">
<el-tab-pane label="监测点台账录入" name="1" v-if="tabList.includes('1')">
<monitorpoint :id="id" v-if="activeName == '1'" />
</el-tab-pane>
<el-tab-pane label="监测点联调列表" name="2">
<el-tab-pane label="监测点联调列表" name="2" v-if="tabList.includes('2')">
<jointDebugList :id="id" v-if="activeName == '2'" />
</el-tab-pane>
<el-tab-pane label="试运行评估" name="3">
<el-tab-pane label="试运行评估" name="3" v-if="tabList.includes('3')">
<testRun :id="id" v-if="activeName == '3'" />
</el-tab-pane>
</el-tabs>
@@ -16,7 +16,7 @@
</template>
<script setup lang="ts">
import { ref } from 'vue'
import { ref ,onMounted} from 'vue'
import { mainHeight } from '@/utils/layout'
import monitorpoint from '@/views/pqs/supervise/terminalNetworkDetection/components/monitorpoint/index.vue'
@@ -29,7 +29,15 @@
name: 'terminalNetwotk'
})
const activeName = ref('1')
const tabList = ref(['1', '2', '3',])
onMounted(() => {
let key = window.location.href.split('?')[0].slice(-1)
const isNumber = /^\d$/.test(key)
if (isNumber) {
tabList.value = [key]
activeName.value = key
}
})
const route = useRoute()
const id = ref('')
const key = ref('')