流程审核不通过,在我的待办中直接跳转

This commit is contained in:
2024-09-13 20:04:19 +08:00
parent 3b51be9fce
commit cb9a0fe5e4
29 changed files with 3142 additions and 2578 deletions

3
.env Normal file
View File

@@ -0,0 +1,3 @@
# 路由超时时间,单位毫秒
VITE_ROUTE_TIME_OUT=1500

4
.npmrc Normal file
View File

@@ -0,0 +1,4 @@
registry=https://registry.npmmirror.com/
disturl=https://registry.npmmirror.com/-/binary/node
electron_mirror=https://npmmirror.com/mirrors/electron/
electron-builder-binaries_mirror=https://registry.npmmirror.com/-/binary/electron-builder-binaries/

View File

@@ -70,6 +70,22 @@ export const userReportGoNetById = (data: any) => {
params: data
})
}
// 根据id获取用户档案录入的详细数据
export const getUserReportById = (id: any) => {
return createAxios({
url: '/supervision-boot/userReport/getUserReportById?id='+id,
method: 'get'
})
}
// 根据方案id获取用户档案录入的详细数据
export const getUserReportByFangAnId = (id: any) => {
return createAxios({
url: '/supervision-boot/userReport/getUserReportByFangAnId?id='+id,
method: 'get'
})
}
// 根据id获取用户档案录入的详细数据
export const getById = (data: any) => {
return createAxios({
@@ -78,6 +94,7 @@ export const getById = (data: any) => {
params: data
})
}
// 根据id获取用户档案录入的详细数据
export const cancel = (data: any) => {
return createAxios({

View File

@@ -1,26 +1,26 @@
<template>
<!-- 用户投诉 -->
<!-- 2 有新增 发起 预警单 -->
<!-- 用户投诉 -->
<!-- 2 有新增 发起 预警单 -->
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
<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()" />
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
<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()"/>
</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 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 complaintsForm from './form/complaintsForm.vue'
import { useRouter } from 'vue-router'
import { sureInitiateWarningLeaflet } from '@/api/process-boot/electricitymanagement'
import {useRouter} from 'vue-router'
import {sureInitiateWarningLeaflet} from '@/api/process-boot/electricitymanagement'
// Steady_Statis
const dictData = useDictData()
const exceeded = dictData.getBasicData('Steady_Statis')
@@ -30,137 +30,138 @@ const formRef = ref()
const TableHeaderRef = ref()
const router = useRouter() // 路由对象
const tableStore = new TableStore({
url: '/supervision-boot/SupervisionUserComplaint/list',
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
}
},
{ field: 'userName', title: '用户名称' },
{ field: 'userNumber', title: '用户编号' },
{ field: 'dutyOrgName', title: '负责单位', minWidth: '150' },
// { field: 'userCategory', title: '用户类别' },
{ field: 'complaintText', title: '投诉内容' },
{ field: 'steadyIndicator', title: '稳态指标' },
{ field: 'transientIndicators', title: '暂态指标' },
{
field: 'monitorName',
title: '监测点名称',
formatter: (row: any) => {
return row.cellValue ? row.cellValue : '/'
}
},
// {
// field: 'monitorNumber',
// title: '监测点编号',
// formatter: (row: any) => {
// return row.cellValue ? row.cellValue : '/'
// }
// },
{
field: 'detectionFlag',
title: '是否实现监测',
formatter: (row: any) => {
return row.cellValue == '0' ? '否' : '是'
}
},
{
field: 'createBy',
title: '填报人',
minWidth: 80,
formatter: (row: any) => {
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
}
},
{
title: '操作',
width: '180',
align: 'center',
render: 'buttons',
buttons: [
{
name: 'edit',
title: '发起告警单',
type: 'warning',
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.initiateWarningFlag == 1
},
// 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.initiateWarningFlag == 0
},
click: row => {
router.push({
name: 'supervision/supervision/manage',
state: {
type: 1
}
})
}
}
]
}
],
beforeSearchFun: () => {
tableStore.table.params.currentPage = tableStore.table.params.pageNum
url: '/supervision-boot/SupervisionUserComplaint/list',
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
}
},
loadCallback: () => {
// tableStore.table.data = [
// {
// userName: '东润开阳堡光伏电站用户',
// userId: '8115771123274',
// complaintContent: '终端频繁重启',
// complaintTime: '2024-05-16'
// }
// ]
{field: 'userName', title: '用户名称'},
{field: 'userNumber', title: '用户编号'},
{field: 'dutyOrgName', title: '负责单位', minWidth: '150'},
// { field: 'userCategory', title: '用户类别' },
{field: 'complaintText', title: '投诉内容'},
{field: 'steadyIndicator', title: '稳态指标'},
{field: 'transientIndicators', title: '暂态指标'},
{
field: 'monitorName',
title: '监测点名称',
formatter: (row: any) => {
return row.cellValue ? row.cellValue : '/'
}
},
// {
// field: 'monitorNumber',
// title: '监测点编号',
// formatter: (row: any) => {
// return row.cellValue ? row.cellValue : '/'
// }
// },
{
field: 'detectionFlag',
title: '是否实现监测',
formatter: (row: any) => {
return row.cellValue == '0' ? '否' : '是'
}
},
{
field: 'createBy',
title: '填报人',
minWidth: 80,
formatter: (row: any) => {
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
}
},
{
title: '操作',
width: '180',
align: 'center',
render: 'buttons',
buttons: [
{
name: 'edit',
title: '发起告警单',
type: 'warning',
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.initiateWarningFlag == 1
},
// 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.initiateWarningFlag == 0
},
click: row => {
router.push({
name: 'supervision/supervision/manage',
query: {
type: 1,
t: Date.now()
}
})
}
}
]
}
],
beforeSearchFun: () => {
tableStore.table.params.currentPage = tableStore.table.params.pageNum
},
loadCallback: () => {
// tableStore.table.data = [
// {
// userName: '东润开阳堡光伏电站用户',
// userId: '8115771123274',
// complaintContent: '终端频繁重启',
// complaintTime: '2024-05-16'
// }
// ]
}
})
provide('tableStore', tableStore)
onMounted(() => {
tableStore.index()
tableStore.index()
})
// 新增
const add = () => {
formRef.value.open({ text: '新增投诉' })
formRef.value.open({text: '新增投诉'})
}
</script>

View File

@@ -1,93 +1,95 @@
<template>
<!-- <div>1 监测点信息 发起预告警单 </div> -->
<!-- <div>1 监测点信息 发起预告警单 </div> -->
<TableHeader datePicker nextFlag theCurrentTime ref="TableHeaderRef">
<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>
<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" />
<TableHeader datePicker nextFlag theCurrentTime ref="TableHeaderRef">
<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>
<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>
<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 dictData = useDictData()
import { useRouter } from 'vue-router'
import {useRouter} from 'vue-router'
const router = useRouter() // 路由对象
//字典获取超标指标
const exceeded = dictData.getBasicData('Steady_Statis')
@@ -98,221 +100,223 @@ 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',
// isWebPaging:true,
column: [
{ title: '', type: 'checkbox', width: 40 },
{
title: '序号',
type: 'seq',
align: 'center',
width: 60,
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: [
{
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',
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',
// 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()
// })
// }
// }
]
}
],
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
url: '/supervision-boot/onlineMonitor/list',
publicHeight: 65,
method: 'POST',
// isWebPaging:true,
column: [
{title: '', type: 'checkbox', width: 40},
{
title: '序号',
type: 'seq',
align: 'center',
width: 60,
formatter: (row: any) => {
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
}
},
loadCallback: () => {
// tableStore.table.data = [
// {
// orgName: '张家口',
// subName: '110kV马头山风电场',
// lineName: '111口头线',
// voltageScale: '110kV',
// overDay: '20',
// overDays: '10'
{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: [
{
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',
query: {
type: 0,
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',
query: {
type: 1,
t: Date.now()
}
})
}
}
// {
// name: 'productSetting',
// title: '发起告警单',
// type: 'warning',
// disabled: row => {
// return row.overLimitDay < tableStore.table.params.alarmThreshold
// },
// {
// orgName: '张家口',
// subName: '110kV韩家庄风电场',
// lineName: '111缘韩一线',
// voltageScale: '110kV',
// overDay: '20',
// overDays: '16'
// 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()
// })
// }
// }
]
}
],
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
@@ -324,50 +328,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,37 +1,38 @@
<template>
<!-- <div> 普测结果 发起预告警单</div> -->
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
<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>
</template>
</TableHeader>
<Table ref="tableRef" />
<testQuestionsForm ref="testQuestionsFormRef" />
<!-- 详情 -->
<el-dialog draggable v-model="dialogVisible" v-if="dialogVisible" title="详情" width="1000">
<detail :id="detailId" :flag="false"/>
</el-dialog>
<!-- <div> 普测结果 发起预告警单</div> -->
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
<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>
</template>
</TableHeader>
<Table ref="tableRef"/>
<testQuestionsForm ref="testQuestionsFormRef"/>
<!-- 详情 -->
<el-dialog draggable v-model="dialogVisible" v-if="dialogVisible" title="详情" width="1000">
<detail :id="detailId" :flag="false"/>
</el-dialog>
</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 Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
import testQuestionsForm from './form/testQuestionsForm.vue'
import { initiateWarningLeaflet } from '@/api/supervision-boot/survey/test'
import { ElMessage, ElMessageBox } from 'element-plus'
import { useRouter } from 'vue-router'
import { useDictData } from '@/stores/dictData'
import {initiateWarningLeaflet} from '@/api/supervision-boot/survey/test'
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 dictData = useDictData()
const { push } = useRouter()
const {push} = useRouter()
const router = useRouter() // 路由对象
const tableRef = ref()
const TableHeaderRef = ref()
@@ -39,118 +40,119 @@ const dialogVisible = ref(false)
const detailId = ref('')
const testQuestionsFormRef = ref()
const tableStore = new TableStore({
url: '/supervision-boot/surveyTest/pageProblemSurvey',
publicHeight: 65,
method: 'POST',
column: [
url: '/supervision-boot/surveyTest/pageProblemSurvey',
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
}
},
{field: 'planName', title: '计划名称', minWidth: 120},
{field: 'deptName', title: '负责单位', minWidth: 120},
{field: 'substationName', title: '变电站', minWidth: 120},
{field: 'planStartTime', title: '计划开始时间', minWidth: 100},
{field: 'planEndTime', title: '计划结束时间', minWidth: 100},
{field: 'completeTime', title: '实际完成时间', minWidth: 100},
{field: 'completeBy', title: '测试负责人', minWidth: 120},
{
field: 'createBy',
title: '填报人',
minWidth: 80,
formatter: (row: any) => {
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
}
},
{
title: '操作',
minWidth: '180',
align: 'center',
render: 'buttons',
fixed: 'right',
buttons: [
{
title: '序号',
type: 'seq',
align: 'center',
width: 60,
formatter: (row: any) => {
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
}
},
{ field: 'planName', title: '计划名称', minWidth: 120 },
{ field: 'deptName', title: '负责单位', minWidth: 120 },
{ field: 'substationName', title: '变电站', minWidth: 120 },
{ field: 'planStartTime', title: '计划开始时间', minWidth: 100 },
{ field: 'planEndTime', title: '计划结束时间', minWidth: 100 },
{ field: 'completeTime', title: '实际完成时间', minWidth: 100 },
{ field: 'completeBy', title: '测试负责人', minWidth: 120 },
{
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',
click: async row => {
dialogVisible.value = true
detailId.value = row.id
}
},
{
title: '操作',
minWidth: '180',
align: 'center',
render: 'buttons',
fixed: 'right',
buttons: [
{
name: 'edit',
title: '详情',
type: 'primary',
icon: 'el-icon-Open',
render: 'basicButton',
name: 'edit',
title: '发起告警单',
type: 'warning',
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.initiateWarningFlag == 1
},
click: async row => {
dialogVisible.value = true
detailId.value = row.id
}
},
{
name: 'edit',
title: '发起告警单',
type: 'warning',
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.initiateWarningFlag == 1
},
click: async row => {
const {value} = await ElMessageBox.prompt('', '整改意见', {
confirmButtonText: '确定',
cancelButtonText: '取消',
click: async row => {
const { value } = await ElMessageBox.prompt('', '整改意见', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputType: 'textarea',
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
inputErrorMessage: '请输入整改意见'
})
initiateWarningLeaflet({ 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.initiateWarningFlag == 0
},
click: row => {
router.push({
name: 'supervision/supervision/manage',
state: {
type: 1
}
})
}
}
]
inputType: 'textarea',
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
inputErrorMessage: '请输入整改意见'
})
initiateWarningLeaflet({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.initiateWarningFlag == 0
},
click: row => {
router.push({
name: 'supervision/supervision/manage',
query: {
type: 1,
t: Date.now()
}
})
}
}
],
beforeSearchFun: () => {
tableStore.table.params.currentPage = tableStore.table.params.pageNum
]
}
],
beforeSearchFun: () => {
tableStore.table.params.currentPage = tableStore.table.params.pageNum
}
})
tableStore.table.params.searchValue = ''
provide('tableStore', tableStore)
onMounted(() => {
tableStore.index()
tableStore.index()
})
/**
* 发起告警单
*/
const initiateAlarm = async (id: string) => {
await initiateWarningLeaflet(id)
ElMessage.success('发起告警成功!')
// 加载数据
tableStore.index()
await initiateWarningLeaflet(id)
ElMessage.success('发起告警成功!')
// 加载数据
tableStore.index()
}
</script>

View File

@@ -1,244 +1,246 @@
<!---试运行列表-->
<template>
<div>
<TableHeader area datePicker nextFlag theCurrentTime 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>
</TableHeader>
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
</div>
<div>
<TableHeader area datePicker nextFlag theCurrentTime 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>
</TableHeader>
<Table ref="tableRef" :checkbox-config="checkboxConfig"/>
</div>
</template>
<script setup lang="ts">
import { ref, onMounted, provide, reactive } from 'vue'
import {ref, onMounted, provide, reactive} from 'vue'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
import { useRouter } from 'vue-router'
import { useDictData } from '@/stores/dictData'
import { ElMessage, ElMessageBox } from 'element-plus'
import { addRunTest, initiateWarningLeaflet } from '@/api/supervision-boot/lineRunTest'
import { formatDate } from '@/utils/formatTime'
import { VxeTablePropTypes } from 'vxe-table'
import { useAdminInfo } from '@/stores/adminInfo'
import { getFileNameAndFilePath } from '@/api/system-boot/file'
import {useRouter} from 'vue-router'
import {useDictData} from '@/stores/dictData'
import {ElMessage, ElMessageBox} from 'element-plus'
import {addRunTest, initiateWarningLeaflet} from '@/api/supervision-boot/lineRunTest'
import {formatDate} from '@/utils/formatTime'
import {VxeTablePropTypes} from 'vxe-table'
import {useAdminInfo} from '@/stores/adminInfo'
import {getFileNameAndFilePath} from '@/api/system-boot/file'
const dictData = useDictData()
const statusSelect = dictData.statusSelect()
const { push } = useRouter()
const {push} = useRouter()
const adminInfo = useAdminInfo()
const TableHeaderRef = ref()
const tableRef = ref()
const tableStore = new TableStore({
url: '/supervision-boot/lineRunTestProblem/pageProblem',
method: 'POST',
publicHeight: 65,
column: [
{ field: 'lineName', title: '监测点名称', minWidth: 160 },
{ field: 'connectedBus', title: '接入母线', minWidth: 160 },
// { field: 'monitoringTerminalCode', title: '终端编号', minWidth: 140 },
{ field: 'monitoringTerminalName', title: '终端名称', minWidth: 140 },
{ field: 'powerSubstationName', title: '变电站', minWidth: 160 },
{ field: 'reason', title: '调试原因', minWidth: 160 },
url: '/supervision-boot/lineRunTestProblem/pageProblem',
method: 'POST',
publicHeight: 65,
column: [
{field: 'lineName', title: '监测点名称', minWidth: 160},
{field: 'connectedBus', title: '接入母线', minWidth: 160},
// { field: 'monitoringTerminalCode', title: '终端编号', minWidth: 140 },
{field: 'monitoringTerminalName', title: '终端名称', minWidth: 140},
{field: 'powerSubstationName', title: '变电站', minWidth: 160},
{field: 'reason', title: '调试原因', minWidth: 160},
{
field: 'testRunState',
title: '试运行状态',
minWidth: 100,
render: 'tag',
custom: {
0: 'primary',
2: 'success',
3: 'danger',
1: 'warning'
},
replaceValue: {
0: '待试运行',
1: '试运行中',
2: '试运行成功',
3: '试运行失败',
null: '待试运行'
}
},
{
field: 'testRunTime',
title: '试运行时间范围',
minWidth: 200,
formatter: row => {
return row.cellValue ? row.cellValue : '/'
}
},
{field: 'problemReason', title: '试运行评估问题', minWidth: 200},
{
field: 'createBy',
title: '填报人',
minWidth: 100,
formatter: (row: any) => {
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
}
},
{
title: '操作',
minWidth: 230,
fixed: 'right',
render: 'buttons',
buttons: [
// {
// name: 'productSetting',
// title: '流程详情',
// type: 'primary',
// icon: 'el-icon-EditPen',
// render: 'basicButton',
// click: row => {
// handleAudit(row.processInstanceId, row.historyInstanceId)
// },
// disabled: row => {
// return row.testRunState != 2 || !row.processInstanceId
// }
// },
{
name: 'productSetting',
title: '下载报告',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
click: row => {
downloadTheReport(row.testRunReport)
},
disabled: row => {
return row.testRunReport == null || row.testRunReport.length == 0
}
},
{
field: 'testRunState',
title: '试运行状态',
minWidth: 100,
render: 'tag',
custom: {
0: 'primary',
2: 'success',
3: 'danger',
1: 'warning'
},
replaceValue: {
0: '待试运行',
1: '试运行中',
2: '试运行成功',
3: '试运行失败',
null: '待试运行'
}
name: 'edit',
title: '发起告警单',
type: 'warning',
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.problemType != null
},
click: async row => {
const {value} = await ElMessageBox.prompt('', '整改意见', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputType: 'textarea',
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
inputErrorMessage: '请输入整改意见'
})
initiateWarningLeaflet({
id: row.id,
problemId: row.problemId,
reformAdvice: value,
type: 2,
issueDetail: row.problemReason
}).then(res => {
ElMessage.success('发起告警单成功!')
tableStore.index()
})
}
},
{
field: 'testRunTime',
title: '试运行时间范围',
minWidth: 200,
formatter: row => {
return row.cellValue ? row.cellValue : '/'
}
},
{ field: 'problemReason', title: '试运行评估问题', minWidth: 200 },
{
field: 'createBy',
title: '填报人',
minWidth: 100,
formatter: (row: any) => {
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
}
},
{
title: '操作',
minWidth: 230,
fixed: 'right',
render: 'buttons',
buttons: [
// {
// name: 'productSetting',
// title: '流程详情',
// type: 'primary',
// icon: 'el-icon-EditPen',
// render: 'basicButton',
// click: row => {
// handleAudit(row.processInstanceId, row.historyInstanceId)
// },
// disabled: row => {
// return row.testRunState != 2 || !row.processInstanceId
// }
// },
{
name: 'productSetting',
title: '下载报告',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
click: row => {
downloadTheReport(row.testRunReport)
},
disabled: row => {
return row.testRunReport == null || row.testRunReport.length == 0
}
},
{
name: 'edit',
title: '发起告警单',
type: 'warning',
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.problemType != null
},
click: async row => {
const { value } = await ElMessageBox.prompt('', '整改意见', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputType: 'textarea',
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
inputErrorMessage: '请输入整改意见'
})
initiateWarningLeaflet({
id: row.id,
problemId: row.problemId,
reformAdvice: value,
type: 2,
issueDetail: row.problemReason
}).then(res => {
ElMessage.success('发起告警单成功!')
tableStore.index()
})
}
},
{
name: 'edit',
title: '查看告警单',
type: 'primary',
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.problemType == null
},
click: row => {
push({
name: 'supervision/supervision/manage',
state: {
type: 1
}
})
}
}
]
name: 'edit',
title: '查看告警单',
type: 'primary',
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.problemType == null
},
click: row => {
push({
name: 'supervision/supervision/manage',
query: {
type: 1,
t: Date.now()
}
})
}
}
],
beforeSearchFun: () => {
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
tableStore.table.params.statveList = [2]
// tableStore.table.params.relationUserName = tableStore.table.params.userName
]
}
],
beforeSearchFun: () => {
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
tableStore.table.params.statveList = [2]
// tableStore.table.params.relationUserName = tableStore.table.params.userName
}
})
tableStore.table.params.status = ''
provide('tableStore', tableStore)
onMounted(() => {
tableStore.index()
tableStore.index()
})
const checkboxConfig = reactive<VxeTablePropTypes.CheckboxConfig>({
labelField: '',
checkMethod: ({ row }) => {
return !(row.testRunState == 1 || row.testRunState == 2)
}
labelField: '',
checkMethod: ({row}) => {
return !(row.testRunState == 1 || row.testRunState == 2)
}
})
/** 处理审批按钮 */
const handleAudit = (instanceId: any, historyInstanceId: any) => {
push({
name: 'BpmProcessInstanceDetail',
state: {
id: instanceId,
historyInstanceId
}
})
push({
name: 'BpmProcessInstanceDetail',
state: {
id: instanceId,
historyInstanceId
}
})
}
// 下载报告
const downloadTheReport = (url: string) => {
getFileNameAndFilePath({ filePath: url }).then((res: any) => {
const link = document.createElement('a')
link.href = res.data.url
link.download = res.data.name
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
})
getFileNameAndFilePath({filePath: url}).then((res: any) => {
const link = document.createElement('a')
link.href = res.data.url
link.download = res.data.name
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
})
}
const runTestSubmit = (type: number) => {
const start = new Date()
start.setDate(start.getDate() + 1)
start.setHours(0, 0, 0)
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: type
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: type
}
addRunTest(data).then((res: any) => {
if (res.code === 'A0000') {
ElMessage({
message: '发起试运行成功',
type: 'success'
})
tableStore.index()
}
addRunTest(data).then((res: any) => {
if (res.code === 'A0000') {
ElMessage({
message: '发起试运行成功',
type: 'success'
})
tableStore.index()
}
})
})
}
</script>

View File

@@ -1,56 +1,58 @@
<template>
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
<template #select>
<el-form-item label="监督类型">
<el-select v-model="tableStore.table.params.supvType" clearable placeholder="请选择流程状态">
<el-option
v-for="item in supvTypeOptionList"
: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.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="add">新增计划</el-button>
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
</template>
</TableHeader>
<Table ref="tableRef" :checkbox-config="checkboxConfig"/>
<!-- 新增 -->
<planAdd ref="planAddRef" @onsubmit="tableStore.index()" :openType="openType" />
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
<template #select>
<el-form-item label="监督类型">
<el-select v-model="tableStore.table.params.supvType" clearable placeholder="请选择流程状态">
<el-option
v-for="item in supvTypeOptionList"
: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.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="add">新增计划</el-button>
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
</template>
</TableHeader>
<Table ref="tableRef" :checkbox-config="checkboxConfig"/>
<!-- 新增 -->
<planAdd ref="planAddRef" @onsubmit="tableStore.index()" :openType="openType"/>
</template>
<script setup lang="ts">
import { useAdminInfo } from '@/stores/adminInfo'
import {useAdminInfo} from '@/stores/adminInfo'
//获取登陆用户姓名和部门
const adminInfo = useAdminInfo()
import { ref, onMounted, provide, watch } from 'vue'
import {ref, onMounted, provide, watch, 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 { cancel } from '@/api/process-boot/generalTest'
import {ElMessage, ElMessageBox} from 'element-plus'
import {cancel, getById} from '@/api/process-boot/generalTest'
import planAdd from './planAdd.vue'
import { useRouter } from 'vue-router'
import { queryPlan, removeSurvey } from '@/api/process-boot/generalTest'
import { getUserByRoleType } from '@/api/user-boot/user'
import { useDictData } from '@/stores/dictData'
import { deleteSurveyPlan } from '@/api/supervision-boot/delete/index'
import {useRouter} from 'vue-router'
import {queryPlan, removeSurvey} from '@/api/process-boot/generalTest'
import {getUserByRoleType} from '@/api/user-boot/user'
import {useDictData} from '@/stores/dictData'
import {deleteSurveyPlan} from '@/api/supervision-boot/delete/index'
import {getUserReportById} from "@/api/supervision-boot/interfere";
const dictData = useDictData()
const supvTypeOptionList = dictData.getBasicData('supv_type')
const statusSelect = dictData.statusSelect()
const { push, options, currentRoute } = useRouter()
const {push, options, currentRoute} = useRouter()
const dialogVisible = ref(false)
const tableRef = ref()
const planAddRef = ref()
@@ -60,153 +62,153 @@ const auditUser = ref('')
const flag = ref(false)
const openType = ref('create')
const tableStore = new TableStore({
url: '/supervision-boot/surveyPlan/surveyPlanPage',
publicHeight: 65,
method: 'POST',
column: [
url: '/supervision-boot/surveyPlan/surveyPlanPage',
publicHeight: 65,
method: 'POST',
column: [
{
width: '60',
type: 'checkbox'
},
{
title: '序号',
width: 60,
formatter: (row: any) => {
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
}
},
{
field: 'planName',
title: '计划名称',
minWidth: 130
},
{
field: 'supvType',
title: '监督类型',
minWidth: 130,
formatter: (row: any) => {
return supvTypeOptionList.filter(item => item.id === row.cellValue)[0]?.name
}
},
{
field: 'supvObjectName',
minWidth: 130,
title: '监督对象名称'
},
{
field: 'deptName',
minWidth: 130,
title: '负责单位'
},
{
field: 'substation',
title: '变电站',
minWidth: 110,
formatter: (row: any) => {
return row.cellValue
}
},
width: '60',
type: 'checkbox'
},
{
title: '序号',
width: 60,
formatter: (row: any) => {
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
}
},
{
field: 'planName',
title: '计划名称',
minWidth: 130
},
{
field: 'supvType',
title: '监督类型',
minWidth: 130,
formatter: (row: any) => {
return supvTypeOptionList.filter(item => item.id === row.cellValue)[0]?.name
}
},
{
field: 'supvObjectName',
minWidth: 130,
title: '监督对象名称'
},
{
field: 'deptName',
minWidth: 130,
title: '负责单位'
},
{
field: 'substation',
title: '变电站',
minWidth: 110,
formatter: (row: any) => {
return row.cellValue
}
},
{ field: 'planStartTime', minWidth: 130, title: '计划开始时间' },
{ field: 'planEndTime', minWidth: 130, title: '计划结束时间' },
{field: 'planStartTime', minWidth: 130, title: '计划开始时间'},
{field: 'planEndTime', minWidth: 130, title: '计划结束时间'},
{
field: 'status',
title: '流程状态',
render: 'tag',
minWidth: 80,
custom: {
0: 'warning',
1: 'primary',
2: 'success',
3: 'danger',
4: 'warning'
},
replaceValue: {
0: '待提交审批',
1: '审批中',
2: '审批通过',
3: '审批不通过',
4: '已取消'
}
},
{
field: 'createBy',
title: '填报人',
minWidth: 80,
formatter: (row: any) => {
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
}
},
{
title: '操作',
minWidth: '180',
fixed: 'right',
render: 'buttons',
buttons: [
{
field: 'status',
title: '流程状态',
render: 'tag',
minWidth: 80,
custom: {
0: 'warning',
1: 'primary',
2: 'success',
3: 'danger',
4: 'warning'
},
replaceValue: {
0: '待提交审批',
1: '审批中',
2: '审批通过',
3: '审批不通过',
4: '已取消'
}
name: 'productSetting',
title: '流程详情',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
disabled: row => {
return !row.processInstanceId
},
click: row => {
flag.value = true
handleAudit(row.processInstanceId, row.historyInstanceId)
}
},
{
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',
showDisabled: row => {
return row.createBy != adminInfo.$state.id || !(row.status == 0)
},
disabled: row => {
return !(row.status == 0)
},
click: row => {
planAddRef.value.open('编辑', row.id, false)
}
},
{
title: '操作',
minWidth: '180',
fixed: 'right',
render: 'buttons',
buttons: [
{
name: 'productSetting',
title: '流程详情',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
disabled: row => {
return !row.processInstanceId
},
click: row => {
flag.value = true
handleAudit(row.processInstanceId, row.historyInstanceId)
}
},
{
name: 'edit',
title: '编辑',
type: 'primary',
icon: 'el-icon-Open',
render: 'basicButton',
showDisabled: row => {
return row.createBy != adminInfo.$state.id || !(row.status == 0)
},
disabled: row => {
return !(row.status == 0)
},
click: row => {
planAddRef.value.open('编辑', row.id, false)
}
},
{
name: 'edit',
title: '重新发起',
type: 'warning',
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
},
click: row => {
// deviceQuitPopup.value.open('重新发起退运', row)
planAddRef.value.open('重新发起计划', row.id, false)
}
},
{
name: 'cancel',
title: '取消',
type: 'danger',
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.createBy != adminInfo.$state.id || row.status != 1
},
click: row => {
cancelLeave(row)
}
}
]
name: 'edit',
title: '重新发起',
type: 'warning',
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
},
click: row => {
// deviceQuitPopup.value.open('重新发起退运', row)
planAddRef.value.open('重新发起计划', row.id, false)
}
},
{
name: 'cancel',
title: '取消',
type: 'danger',
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.createBy != adminInfo.$state.id || row.status != 1
},
click: row => {
cancelLeave(row)
}
}
],
beforeSearchFun: () => {
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
tableStore.table.params.currentPage = tableStore.table.params.pageNum
]
}
],
beforeSearchFun: () => {
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
tableStore.table.params.currentPage = tableStore.table.params.pageNum
}
})
tableStore.table.params.status = ''
@@ -214,108 +216,121 @@ tableStore.table.params.supvType = ''
provide('tableStore', tableStore)
// 新增计划
const add = () => {
// title.value = '普测计划新增'
planAddRef.value.open('计划新增')
// title.value = '普测计划新增'
planAddRef.value.open('计划新增')
}
// 禁止点击
const checkboxConfig = reactive({
checkMethod: ({ row }) => {
return adminInfo.roleCode.includes('delete_info')
? true
: row.createBy == adminInfo.$state.id && row.status == 0
}
checkMethod: ({row}) => {
return adminInfo.roleCode.includes('delete_info')
? true
: row.createBy == adminInfo.$state.id && row.status == 0
}
})
const deleteEven = () => {
if (tableStore.table.selection.length == 0) {
ElMessage({
type: 'warning',
message: '请选择要删除的数据'
})
} else {
deleteSurveyPlan(tableStore.table.selection.map(item => item.id)).then(res => {
ElMessage({
type: 'success',
message: '删除成功!'
})
tableStore.index()
})
}
if (tableStore.table.selection.length == 0) {
ElMessage({
type: 'warning',
message: '请选择要删除的数据'
})
} else {
deleteSurveyPlan(tableStore.table.selection.map(item => item.id)).then(res => {
ElMessage({
type: 'success',
message: '删除成功!'
})
tableStore.index()
})
}
}
const exportFn = () => {
let form = JSON.parse(JSON.stringify(tableStore.table.params))
form.pageNum = 1
form.pageSize = tableStore.table.total
queryPlan(form).then(res => {
tableRef.value.getRef().exportData({
filename: '计划', // 文件名字
sheetName: 'Sheet1',
type: 'xlsx', //导出文件类型 xlsx 和 csv
useStyle: true,
data: res.data.records, // 数据源 // 过滤那个字段导出
columnFilterMethod: function (column: any) {
return !(column.$columnIndex === 0)
}
})
let form = JSON.parse(JSON.stringify(tableStore.table.params))
form.pageNum = 1
form.pageSize = tableStore.table.total
queryPlan(form).then(res => {
tableRef.value.getRef().exportData({
filename: '计划', // 文件名字
sheetName: 'Sheet1',
type: 'xlsx', //导出文件类型 xlsx 和 csv
useStyle: true,
data: res.data.records, // 数据源 // 过滤那个字段导出
columnFilterMethod: function (column: any) {
return !(column.$columnIndex === 0)
}
})
})
}
/**取消流程操作*/
const cancelLeave = async (row: any) => {
// 二次确认
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputType: 'textarea',
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
inputErrorMessage: '取消原因不能为空'
})
// 发起取消
let data = {
id: row.id,
processInstanceId: row.processInstanceId,
reason: value
}
await cancel(data)
ElMessage.success('取消成功')
// 加载数据
tableStore.index()
// 二次确认
const {value} = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputType: 'textarea',
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
inputErrorMessage: '取消原因不能为空'
})
// 发起取消
let data = {
id: row.id,
processInstanceId: row.processInstanceId,
reason: value
}
await cancel(data)
ElMessage.success('取消成功')
// 加载数据
tableStore.index()
}
const handleClose = () => {
dialogVisible.value = false
auditUser.value = ''
dialogVisible.value = false
auditUser.value = ''
}
/** 处理审批按钮 */
const handleAudit = (instanceId: string, historyInstanceId: string) => {
push({
name: 'BpmProcessInstanceDetail',
state: {
id: instanceId,
historyInstanceId
}
})
push({
name: 'BpmProcessInstanceDetail',
state: {
id: instanceId,
historyInstanceId
}
})
}
// 取消
onMounted(() => {
tableStore.index()
getUserByRoleType(3).then(res => {
auditList.value = res.data
})
tableStore.index()
getUserByRoleType(3).then(res => {
auditList.value = res.data
})
})
watch(
() => currentRoute.value.path,
() => {
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
tableStore.index()
flag.value = false
}
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
tableStore.index()
flag.value = false
}
},
{
deep: true
deep: true
}
)
const props = defineProps({id: {type: String, default: 'null'}})
watch(() => props.id, async (newValue, oldValue) => {
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
const fullId = newValue.split('@')[0]
let nowTime = Date.now()
const routeTime = Number(newValue.split('@')[1])
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms则不执行
nextTick(() => {
planAddRef.value.open('重新发起计划', fullId, false)
})
}, {immediate: true})
</script>
<style scoped lang="scss"></style>

View File

@@ -1,54 +1,54 @@
<template>
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
<template v-slot:select>
<el-form-item label="监督类型">
<el-select v-model="tableStore.table.params.supvType" clearable placeholder="请选择流程状态">
<el-option
v-for="item in supvTypeOptionList"
: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.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-Delete" type="primary" @click="deleteEven">删除</el-button>
</template>
</TableHeader>
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
<!-- 新增 -->
<planTest ref="planTestRef" @onsubmit="tableStore.index()" />
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
<template v-slot:select>
<el-form-item label="监督类型">
<el-select v-model="tableStore.table.params.supvType" clearable placeholder="请选择流程状态">
<el-option
v-for="item in supvTypeOptionList"
: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.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-Delete" type="primary" @click="deleteEven">删除</el-button>
</template>
</TableHeader>
<Table ref="tableRef" :checkbox-config="checkboxConfig"/>
<!-- 新增 -->
<planTest ref="planTestRef" @onsubmit="tableStore.index()"/>
</template>
<script setup lang="ts">
import { ref, onMounted, provide, nextTick } from 'vue'
import { useAdminInfo } from '@/stores/adminInfo'
import {ref, onMounted, provide, watch, nextTick} from 'vue'
import {useAdminInfo} from '@/stores/adminInfo'
//获取登陆用户姓名和部门
const adminInfo = useAdminInfo()
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 { cancelTest } from '@/api/process-boot/generalTest'
import {ElMessage, ElMessageBox} from 'element-plus'
import {cancelTest} from '@/api/process-boot/generalTest'
import planTest from './planTest.vue'
import { useRouter } from 'vue-router'
import { deleteSurveyPlanTest } from '@/api/supervision-boot/delete/index'
import { queryPlan, removeSurvey } from '@/api/process-boot/generalTest'
import { getUserByRoleType } from '@/api/user-boot/user'
import {useRouter} from 'vue-router'
import {deleteSurveyPlanTest} from '@/api/supervision-boot/delete/index'
import {queryPlan, removeSurvey} from '@/api/process-boot/generalTest'
import {getUserByRoleType} from '@/api/user-boot/user'
const { push } = useRouter()
const {push} = useRouter()
const tableRef = ref()
import { useDictData } from '@/stores/dictData'
import {useDictData} from '@/stores/dictData'
const dictData = useDictData()
const supvTypeOptionList = dictData.getBasicData('supv_type')
@@ -59,169 +59,169 @@ const TableHeaderRef = ref()
const auditList: any = ref([])
const tableStore = new TableStore({
url: '/supervision-boot/surveyTest/surveyTestPage',
publicHeight: 65,
method: 'POST',
column: [
{
width: '60',
type: 'checkbox'
},
{
title: '序号',
width: 60,
formatter: (row: any) => {
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
}
},
{ field: 'planName', title: '计划名称', minWidth: 140 },
{
field: 'supvType',
title: '监督类型',
minWidth: 130,
formatter: (row: any) => {
return supvTypeOptionList.filter(item => item.id === row.cellValue)[0]?.name
}
},
{
field: 'supvObjectName',
minWidth: 130,
title: '监督对象名称'
},
{ field: 'substationName', title: '变电站', minWidth: 140 },
{ field: 'planStartTime', title: '计划开始时间', minWidth: 140 },
{ field: 'planEndTime', title: '计划结束时间', minWidth: 140 },
{
field: 'problemFlag',
title: '是否存在问题',
minWidth: 120,
render: 'tag',
custom: {
0: 'success',
1: 'danger',
null: 'primary'
},
replaceValue: {
0: '合格',
1: '存在问题',
null: '待测试'
}
},
{ field: 'deptName', title: '负责单位', minWidth: 140 },
{ field: 'completeBy', title: '计划负责人', minWidth: 130 },
{ field: 'completeTime', title: '实际完成时间', minWidth: 140 },
{
field: 'status',
title: '流程状态',
render: 'tag',
minWidth: 140,
custom: {
0: 'warning',
url: '/supervision-boot/surveyTest/surveyTestPage',
publicHeight: 65,
method: 'POST',
column: [
{
width: '60',
type: 'checkbox'
},
{
title: '序号',
width: 60,
formatter: (row: any) => {
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
}
},
{field: 'planName', title: '计划名称', minWidth: 140},
{
field: 'supvType',
title: '监督类型',
minWidth: 130,
formatter: (row: any) => {
return supvTypeOptionList.filter(item => item.id === row.cellValue)[0]?.name
}
},
{
field: 'supvObjectName',
minWidth: 130,
title: '监督对象名称'
},
{field: 'substationName', title: '变电站', minWidth: 140},
{field: 'planStartTime', title: '计划开始时间', minWidth: 140},
{field: 'planEndTime', title: '计划结束时间', minWidth: 140},
{
field: 'problemFlag',
title: '是否存在问题',
minWidth: 120,
render: 'tag',
custom: {
0: 'success',
1: 'danger',
null: 'primary'
},
replaceValue: {
0: '合格',
1: '存在问题',
null: '待测试'
}
},
{field: 'deptName', title: '负责单位', minWidth: 140},
{field: 'completeBy', title: '计划负责人', minWidth: 130},
{field: 'completeTime', title: '实际完成时间', minWidth: 140},
{
field: 'status',
title: '流程状态',
render: 'tag',
minWidth: 140,
custom: {
0: 'warning',
1: 'primary',
2: 'success',
3: 'danger',
4: 'warning'
},
replaceValue: {
0: '待提交审批',
1: 'primary',
2: 'success',
3: 'danger',
4: 'warning'
},
replaceValue: {
0: '待提交审批',
1: '审批中',
2: '审批通过',
3: '审批不通过',
4: '已取消'
}
1: '审批中',
2: '审批通过',
3: '审批不通过',
4: '已取消'
}
},
{
field: 'createBy',
title: '填报人',
minWidth: 120,
formatter: (row: any) => {
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
}
},
{
title: '操作',
minWidth: 180,
render: 'buttons',
fixed: 'right',
buttons: [
{
name: 'productSetting',
title: '测试填报',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
disabled: row => {
return row.status != 6
},
click: row => {
add(row.id)
}
},
{
field: 'createBy',
title: '填报人',
minWidth: 120,
formatter: (row: any) => {
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
}
name: 'productSetting',
title: '流程详情',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
disabled: row => {
return row.status == 6 || !row.processInstanceId
},
click: row => {
// planTestRef.value.open('查看计划', row)
handleAudit(row.processInstanceId, row.historyInstanceId)
}
},
{
title: '操作',
minWidth: 180,
render: 'buttons',
fixed: 'right',
buttons: [
{
name: 'productSetting',
title: '测试填报',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
disabled: row => {
return row.status != 6
},
click: row => {
add(row.id)
}
},
{
name: 'productSetting',
title: '流程详情',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
disabled: row => {
return row.status == 6 || !row.processInstanceId
},
click: row => {
// planTestRef.value.open('查看计划', row)
handleAudit(row.processInstanceId, row.historyInstanceId)
}
},
{
name: 'edit',
title: '编辑',
type: 'primary',
icon: 'el-icon-Open',
render: 'basicButton',
showDisabled: row => {
return row.deptId != adminInfo.$state.deptId || !(row.status == 0)
},
disabled: row => {
return !(row.status == 0)
},
click: row => {
planTestRef.value.open('编辑', row.id, false)
}
},
{
name: 'edit',
title: '重新发起',
type: 'warning',
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.deptId != adminInfo.$state.deptId || !(row.status == 3 || row.status == 4)
},
click: row => {
planTestRef.value.open('重新发起计划测试', row.id, false)
}
},
{
name: 'cancel',
title: '取消',
type: 'danger',
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.deptId != adminInfo.$state.deptId || row.status != 1
},
click: row => {
cancelLeave(row)
}
}
]
name: 'edit',
title: '编辑',
type: 'primary',
icon: 'el-icon-Open',
render: 'basicButton',
showDisabled: row => {
return row.deptId != adminInfo.$state.deptId || !(row.status == 0)
},
disabled: row => {
return !(row.status == 0)
},
click: row => {
planTestRef.value.open('编辑', row.id, false)
}
},
{
name: 'edit',
title: '重新发起',
type: 'warning',
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.deptId != adminInfo.$state.deptId || !(row.status == 3 || row.status == 4)
},
click: row => {
planTestRef.value.open('重新发起计划测试', row.id, false)
}
},
{
name: 'cancel',
title: '取消',
type: 'danger',
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.deptId != adminInfo.$state.deptId || row.status != 1
},
click: row => {
cancelLeave(row)
}
}
],
beforeSearchFun: () => {
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
tableStore.table.params.currentPage = tableStore.table.params.pageNum
]
}
],
beforeSearchFun: () => {
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
tableStore.table.params.currentPage = tableStore.table.params.pageNum
}
})
tableStore.table.params.status = ''
@@ -230,90 +230,102 @@ tableStore.table.params.supvType = ''
provide('tableStore', tableStore)
// 新增计划
const add = (id: string) => {
planTestRef.value.open('计划测试填报', id, true)
planTestRef.value.open('计划测试填报', id, true)
}
// 禁止点击
const checkboxConfig = reactive({
checkMethod: ({ row }) => {
return adminInfo.roleCode.includes('delete_info')
? true
: row.createBy == adminInfo.$state.id && row.status == 0
}
checkMethod: ({row}) => {
return adminInfo.roleCode.includes('delete_info')
? true
: row.createBy == adminInfo.$state.id && row.status == 0
}
})
const deleteEven = () => {
if (tableStore.table.selection.length == 0) {
ElMessage({
type: 'warning',
message: '请选择要删除的数据'
})
} else {
deleteSurveyPlanTest(tableStore.table.selection.map(item => item.id)).then(res => {
ElMessage({
type: 'success',
message: '删除成功!'
})
tableStore.index()
})
}
if (tableStore.table.selection.length == 0) {
ElMessage({
type: 'warning',
message: '请选择要删除的数据'
})
} else {
deleteSurveyPlanTest(tableStore.table.selection.map(item => item.id)).then(res => {
ElMessage({
type: 'success',
message: '删除成功!'
})
tableStore.index()
})
}
}
const exportFn = () => {
let form = JSON.parse(JSON.stringify(tableStore.table.params))
form.pageNum = 1
form.pageSize = tableStore.table.total
queryPlan(form).then(res => {
tableRef.value.getRef().exportData({
filename: '计划', // 文件名字
sheetName: 'Sheet1',
type: 'xlsx', //导出文件类型 xlsx 和 csv
useStyle: true,
data: res.data.records, // 数据源 // 过滤那个字段导出
columnFilterMethod: function (column: any) {
return !(column.$columnIndex === 0)
}
})
let form = JSON.parse(JSON.stringify(tableStore.table.params))
form.pageNum = 1
form.pageSize = tableStore.table.total
queryPlan(form).then(res => {
tableRef.value.getRef().exportData({
filename: '计划', // 文件名字
sheetName: 'Sheet1',
type: 'xlsx', //导出文件类型 xlsx 和 csv
useStyle: true,
data: res.data.records, // 数据源 // 过滤那个字段导出
columnFilterMethod: function (column: any) {
return !(column.$columnIndex === 0)
}
})
})
}
/**取消流程操作*/
const cancelLeave = async (row: any) => {
// 二次确认
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputType: 'textarea',
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
inputErrorMessage: '取消原因不能为空'
})
// 发起取消
let data = {
id: row.id,
processInstanceId: row.processInstanceId,
reason: value
}
await cancelTest(data)
ElMessage.success('取消成功')
// 加载数据
tableStore.index()
// 二次确认
const {value} = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputType: 'textarea',
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
inputErrorMessage: '取消原因不能为空'
})
// 发起取消
let data = {
id: row.id,
processInstanceId: row.processInstanceId,
reason: value
}
await cancelTest(data)
ElMessage.success('取消成功')
// 加载数据
tableStore.index()
}
/** 处理审批按钮 */
const handleAudit = (instanceId: any, historyInstanceId: any) => {
push({
name: 'BpmProcessInstanceDetail',
state: {
id: instanceId,
historyInstanceId
}
})
push({
name: 'BpmProcessInstanceDetail',
state: {
id: instanceId,
historyInstanceId
}
})
}
// 取消
onMounted(() => {
tableStore.index()
getUserByRoleType(3).then(res => {
auditList.value = res.data
})
tableStore.index()
getUserByRoleType(3).then(res => {
auditList.value = res.data
})
})
const props = defineProps({id: {type: String, default: 'null'}})
watch(() => props.id, async (newValue, oldValue) => {
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
const fullId = newValue.split('@')[0]
let nowTime = Date.now()
const routeTime = Number(newValue.split('@')[1])
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms则不执行
nextTick(() => {
planTestRef.value.open('重新发起计划测试', fullId, false)
})
}, {immediate: true})
</script>
<style scoped lang="scss"></style>

View File

@@ -1,42 +1,57 @@
<template>
<div class='default-main'>
<el-tabs v-model='activeName' type='border-card'>
<el-tab-pane label='技术监督计划管理' name='1'>
<plan-manage v-if="activeName == '1'" />
</el-tab-pane>
<el-tab-pane label='技术监督测试管理' name='2'>
<test-manage v-if="activeName == '2'" />
</el-tab-pane>
</el-tabs>
</div>
<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'"/>
</el-tab-pane>
<el-tab-pane label='技术监督测试管理' name='2'>
<test-manage :id="id" v-if="activeName == '2'"/>
</el-tab-pane>
</el-tabs>
</div>
</template>
<script setup lang='ts'>
import { onMounted, reactive, ref, provide } from 'vue'
import {ref} from 'vue'
import planManage from './components/planManage.vue'
import testManage from './components/testManage.vue'
import { mainHeight } from '@/utils/layout'
import {mainHeight} from '@/utils/layout'
import {useDictData} from '@/stores/dictData'
import {useRoute} from "vue-router";
import { useDictData } from '@/stores/dictData'
const route = useRoute()
const dictData = useDictData()
const statusSelect = dictData.statusSelect()
const id = ref('')
defineOptions({
name: 'supervision/harmonicmanagement'
name: 'supervision/harmonicmanagement'
})
const activeName = ref('1')
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' || type == '1') {
activeName.value = '1'
} else {
activeName.value = '2'
}
id.value = (route.query.id as string) || 'null'
id.value = id.value + '@' + route.query.t
}
}, {deep: true, immediate: true})
</script>
<style lang='scss' scoped>
.bars_w {
width: 100%;
height: 500px;
width: 100%;
height: 500px;
}
:deep(.el-tabs__content) {
height: v-bind('layout.height');
overflow-y: auto;
height: v-bind('layout.height');
overflow-y: auto;
}
</style>

View File

@@ -1,64 +1,65 @@
<template>
<div>
<TableHeader datePicker nextFlag theCurrentTime ref="TableHeaderRef">
<template #select>
<el-form-item label="项目名称">
<el-input v-model="tableStore.table.params.projectName" placeholder="请输入项目名称"></el-input>
</el-form-item>
<el-form-item label="所在地市">
<el-select v-model="tableStore.table.params.city" clearable placeholder="请选择所在地市">
<el-option
v-for="item in areaOptionList"
:key="item.id"
:label="item.name"
:value="item.name"
></el-option>
</el-select>
</el-form-item>
</template>
<template #operation>
<!-- <el-button icon='el-icon-Download' type='primary'>导出</el-button> -->
</template>
</TableHeader>
<Table ref="tableRef" />
</div>
<div>
<TableHeader datePicker nextFlag theCurrentTime ref='TableHeaderRef'>
<template #select>
<el-form-item label='项目名称'>
<el-input v-model='tableStore.table.params.projectName' placeholder='请输入项目名称'></el-input>
</el-form-item>
<el-form-item label='所在地市'>
<el-select v-model='tableStore.table.params.city' clearable placeholder='请选择所在地市'>
<el-option
v-for='item in areaOptionList'
:key='item.id'
:label='item.name'
:value='item.name'
></el-option>
</el-select>
</el-form-item>
</template>
<template #operation>
<!-- <el-button icon='el-icon-Download' type='primary'>导出</el-button> -->
</template>
</TableHeader>
<Table ref='tableRef'/>
</div>
<el-dialog
title="干扰源用户详细信息"
v-if="dialogVisible"
v-model="dialogVisible"
width="65%"
:append-to-body="true"
:close-on-click-modal="false"
draggable
>
<BpmUserReportDetail :id="interId" ref="detailsRef"></BpmUserReportDetail>
</el-dialog>
<!-- 查看详情 detail 新增/修改 create-->
<addForm
ref="addForms"
@onSubmit="tableStore.index()"
:update="update"
:normalizedControl="true"
openType="create"
></addForm>
<el-dialog
title='干扰源用户详细信息'
v-if='dialogVisible'
v-model='dialogVisible'
width='65%'
:append-to-body='true'
:close-on-click-modal='false'
draggable
>
<BpmUserReportDetail :id='interId' ref='detailsRef'></BpmUserReportDetail>
</el-dialog>
<!-- 查看详情 detail 新增/修改 create-->
<addForm
ref='addForms'
@onSubmit='tableStore.index()'
:update='update'
:normalizedControl='true'
openType='create'
></addForm>
</template>
<script setup lang="ts">
<script setup lang='ts'>
defineOptions({
name: 'supervision/interferenceUserTable'
name: 'supervision/interferenceUserTable'
})
import { ref, onMounted, provide, watch } from 'vue'
import {ref, onMounted, provide, watch} from 'vue'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
import { useDictData } from '@/stores/dictData'
import {useDictData} from '@/stores/dictData'
import addForm from '@/views/pqs/supervise/interfere/components/undocumented/addForm.vue'
import { getUserReportById } from '@/api/supervision-boot/userReport/form'
import {getUserReportById, getUserReportByFangAnId} from '@/api/supervision-boot/interfere'
import BpmUserReportDetail from '../../components/undocumented/detail.vue'
import { useAdminInfo } from '@/stores/adminInfo'
import { ElMessage, ElMessageBox } from 'element-plus'
import { userReportRenewalCancel } from '@/api/process-boot/generalTest'
import {useAdminInfo} from '@/stores/adminInfo'
import {ElMessage, ElMessageBox} from 'element-plus'
import {userReportRenewalCancel} from '@/api/process-boot/generalTest'
const dictData = useDictData()
const flag = ref(false)
const areaOptionList = dictData
@@ -73,235 +74,235 @@ const update = ref(false)
const addForms = ref()
jb_pl.value =
adminInfo.$state.roleCode.filter(item => {
return item == 'jb_pl'
return item == 'jb_pl'
}).length != 0
? true
: false
jb_dky.value =
adminInfo.$state.roleCode.filter(item => {
return item == 'jb_dky'
return item == 'jb_dky'
}).length != 0
? true
: false
const { push, options, currentRoute } = useRouter()
const {push, options, currentRoute} = useRouter()
const TableHeaderRef = ref()
const tableStore = new TableStore({
url: '/supervision-boot/userReport/getNormalUserPage',
publicHeight: 65,
method: 'POST',
column: [
{ title: '序号', type: 'seq', width: 80 },
{ field: 'city', title: '所在地市', minWidth: 80 },
{
field: 'substation',
title: '厂站名称',
minWidth: 100,
formatter: (row: any) => {
row.cellValue = row.cellValue ? row.cellValue : '/'
return row.cellValue
}
},
{ field: 'projectName', title: '项目名称', minWidth: 170 },
{
field: 'userType',
title: '用户性质',
minWidth: 150,
formatter: (obj: any) => {
const userType = obj.row.userType
return getUserTypeName(userType)
}
},
{ field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
{
field: 'userStatus',
title: '用户状态',
minWidth: 100,
render: 'tag',
custom: {
0: 'primary',
1: 'primary',
2: 'success',
3: 'warning'
},
replaceValue: {
0: '可研',
1: '建设',
2: '运行',
3: '退运'
}
},
{
field: 'status',
title: '信息更新状态',
minWidth: 100,
render: 'tag',
custom: {
0: 'warning',
1: 'primary',
2: 'success',
3: 'danger',
4: 'warning',
null: 'primary'
},
replaceValue: {
0: '待提交审批',
1: '审批中',
2: '审批通过',
3: '审批不通过',
4: '已取消',
null: '/'
}
},
url: '/supervision-boot/userReport/getNormalUserPage',
publicHeight: 65,
method: 'POST',
column: [
{title: '序号', type: 'seq', width: 80},
{field: 'city', title: '所在地市', minWidth: 80},
{
field: 'substation',
title: '厂站名称',
minWidth: 100,
formatter: (row: any) => {
row.cellValue = row.cellValue ? row.cellValue : '/'
return row.cellValue
}
},
{field: 'projectName', title: '项目名称', minWidth: 170},
{
field: 'userType',
title: '用户性质',
minWidth: 150,
formatter: (obj: any) => {
const userType = obj.row.userType
return getUserTypeName(userType)
}
},
{field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130},
{
field: 'userStatus',
title: '用户状态',
minWidth: 100,
render: 'tag',
custom: {
0: 'primary',
1: 'primary',
2: 'success',
3: 'warning'
},
replaceValue: {
0: '可研',
1: '建设',
2: '运行',
3: '退运'
}
},
{
field: 'status',
title: '信息更新状态',
minWidth: 100,
render: 'tag',
custom: {
0: 'warning',
1: 'primary',
2: 'success',
3: 'danger',
4: 'warning',
null: 'primary'
},
replaceValue: {
0: '待提交审批',
1: '审批中',
2: '审批通过',
3: '审批不通过',
4: '已取消',
null: '/'
}
},
{
title: '详细信息',
minWidth: 100,
render: 'buttons',
buttons: [
{
title: '详细信息',
minWidth: 100,
render: 'buttons',
buttons: [
{
name: 'productSetting',
title: '详情',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
click: row => {
update.value = row.status == null ? false : true
setTimeout(() => {
open(row)
}, 100)
}
}
]
},
{
field: 'createBy',
title: '填报人',
minWidth: 80,
formatter: (row: any) => {
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
}
},
// visible:!jb_pl.value && !jb_dky.value?true:false,
{
title: '操作',
minWidth: 300,
fixed: 'right',
render: 'buttons',
buttons: [
{
name: 'productSetting',
title: '流程详情',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
click: row => {
handleAudit(row.processInstanceId, row.historyInstanceId)
},
disabled: row => {
return !row.processInstanceId
}
},
{
name: 'edit',
title: '编辑',
type: 'primary',
icon: 'el-icon-Open',
render: 'basicButton',
showDisabled: row => {
return (
row.createBy != adminInfo.$state.id ||
!(row.status == 0 || row.status == 2 || row.status == null)
)
},
disabled: row => {
return !(row.status == 0 || row.status == 2 || row.status == null)
},
click: row => {
update.value = row.status == null ? false : true
setTimeout(() => {
addForms.value.open({
title: '编辑',
row: row
})
}, 100)
}
},
{
name: 'edit',
title: '重新发起',
type: 'warning',
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
},
click: row => {
addForms.value.open({ title: '重新发起', row: row })
}
},
{
name: 'cancel',
title: '取消',
type: 'danger',
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.createBy != adminInfo.$state.id || row.status != 1
},
click: row => {
cancelLeave(row)
}
},
{
name: 'productSetting',
title: '入网设计方案申请',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
// disabled: row => {
// return jb_pl.value || jb_dky.value
// },
click: row => {
toFangAn(row, 0)
}
},
{
name: 'productSetting',
title: '治理工程验收申请',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
disabled: row => {
return row.needGovernance == 0 //&& row.type == true
},
showDisabled: row => {
return row.type == false
},
click: row => {
toFangAn(row, 1)
}
}
// {
// name: 'productSetting',
// title: '/',
// type: 'primary',
// icon: 'el-icon-EditPen',
// render: 'basicButton',
// disabled: row => {
// return !jb_pl.value && !jb_dky.value
// }
// }
]
name: 'productSetting',
title: '详情',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
click: row => {
update.value = row.status == null ? false : true
setTimeout(() => {
open(row)
}, 100)
}
}
],
]
},
{
field: 'createBy',
title: '填报人',
minWidth: 80,
formatter: (row: any) => {
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
}
},
// visible:!jb_pl.value && !jb_dky.value?true:false,
{
title: '操作',
minWidth: 300,
fixed: 'right',
render: 'buttons',
beforeSearchFun: () => {
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
tableStore.table.params.relationUserName = tableStore.table.params.userName
buttons: [
{
name: 'productSetting',
title: '流程详情',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
click: row => {
handleAudit(row.processInstanceId, row.historyInstanceId)
},
disabled: row => {
return !row.processInstanceId
}
},
{
name: 'edit',
title: '编辑',
type: 'primary',
icon: 'el-icon-Open',
render: 'basicButton',
showDisabled: row => {
return (
row.createBy != adminInfo.$state.id ||
!(row.status == 0 || row.status == 2 || row.status == null)
)
},
disabled: row => {
return !(row.status == 0 || row.status == 2 || row.status == null)
},
click: row => {
update.value = row.status == null ? false : true
setTimeout(() => {
addForms.value.open({
title: '编辑',
row: row
})
}, 100)
}
},
{
name: 'edit',
title: '重新发起',
type: 'warning',
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
},
click: row => {
addForms.value.open({title: '重新发起', row: row})
}
},
{
name: 'cancel',
title: '取消',
type: 'danger',
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.createBy != adminInfo.$state.id || row.status != 1
},
click: row => {
cancelLeave(row)
}
},
{
name: 'productSetting',
title: '入网设计方案申请',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
// disabled: row => {
// return jb_pl.value || jb_dky.value
// },
click: row => {
toFangAn(row, 0)
}
},
{
name: 'productSetting',
title: '治理工程验收申请',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
disabled: row => {
return row.needGovernance == 0 //&& row.type == true
},
showDisabled: row => {
return row.type == false
},
click: row => {
toFangAn(row, 1)
}
}
// {
// name: 'productSetting',
// title: '/',
// type: 'primary',
// icon: 'el-icon-EditPen',
// render: 'basicButton',
// disabled: row => {
// return !jb_pl.value && !jb_dky.value
// }
// }
]
}
],
beforeSearchFun: () => {
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
tableStore.table.params.relationUserName = tableStore.table.params.userName
}
})
tableStore.table.params.city = ''
@@ -315,114 +316,180 @@ tableStore.table.params.aisFileUpload = ''
const dialogVisible = ref(false)
const interId = ref()
provide('tableStore', tableStore)
onMounted(() => {
tableStore.index()
})
const detailsRef = ref(null)
/** 打开弹窗 */
const open = async val => {
interId.value = val.id
dialogVisible.value = true
interId.value = val.id
dialogVisible.value = true
}
/** 流程实例详情 */
const handleAudit = (instanceId: string, historyInstanceId: string) => {
push({
name: 'BpmProcessInstanceDetail',
state: {
id: instanceId,
historyInstanceId
}
})
push({
name: 'BpmProcessInstanceDetail',
state: {
id: instanceId,
historyInstanceId
}
})
}
/**取消流程操作*/
const cancelLeave = async (row: any) => {
// 二次确认
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputType: 'textarea',
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
inputErrorMessage: '取消原因不能为空'
})
// 发起取消
let data = {
id: row.id,
processInstanceId: row.processInstanceId,
reason: value
}
await userReportRenewalCancel(data).then(res => {
ElMessage.success('取消成功')
// 加载数据
tableStore.index()
})
// 二次确认
const {value} = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputType: 'textarea',
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
inputErrorMessage: '取消原因不能为空'
})
// 发起取消
let data = {
id: row.id,
processInstanceId: row.processInstanceId,
reason: value
}
await userReportRenewalCancel(data).then(res => {
ElMessage.success('取消成功')
// 加载数据
tableStore.index()
})
}
const needGovernance = ref()
/** 方案审查 */
const toFangAn = (row: any, typeNo: number) => {
//查询详情拿到needGovernance
/** 获得数据 */
getUserReportById(row.id).then(res => {
if (res.data.userType == '0' || res.data.userType == '1') {
needGovernance.value = res.data.userReportProjectPO?.needGovernance
} else if (
res.data.userType == '2' ||
res.data.userType == '3' ||
res.data.userType == '4' ||
res.data.userType == '5'
) {
needGovernance.value = res.data.userReportSubstationPO?.needGovernance
} else if (res.data.userType == '6') {
needGovernance.value = res.data.userReportSensitivePO?.needGovernance
}
push({
name: 'ProgramReview',
query: {
id: row.id,
type: typeNo,
needGovernance: needGovernance.value
}
})
flag.value = true
//查询详情拿到needGovernance
/** 获得数据 */
getUserReportById(row.id).then(res => {
if (res.data.userType == '0' || res.data.userType == '1') {
needGovernance.value = res.data.userReportProjectPO?.needGovernance
} else if (
res.data.userType == '2' ||
res.data.userType == '3' ||
res.data.userType == '4' ||
res.data.userType == '5'
) {
needGovernance.value = res.data.userReportSubstationPO?.needGovernance
} else if (res.data.userType == '6') {
needGovernance.value = res.data.userReportSensitivePO?.needGovernance
}
push({
name: 'ProgramReview',
query: {
id: row.id,
type: typeNo,
needGovernance: needGovernance.value
}
})
flag.value = true
})
}
const toFangAnById = (id: string, typeNo: number) => {
//查询详情拿到needGovernance
/** 获得数据 */
getUserReportByFangAnId(id).then(res => {
let userId;
if (res.data.userType == '0' || res.data.userType == '1') {
userId = res.data.userReportProjectPO?.id
needGovernance.value = res.data.userReportProjectPO?.needGovernance
} else if (
res.data.userType == '2' ||
res.data.userType == '3' ||
res.data.userType == '4' ||
res.data.userType == '5'
) {
userId = res.data.userReportSubstationPO?.id
needGovernance.value = res.data.userReportSubstationPO?.needGovernance
} else if (res.data.userType == '6') {
userId = res.data.userReportSensitivePO?.id
needGovernance.value = res.data.userReportSensitivePO?.needGovernance
}
push({
name: 'ProgramReview',
query: {
id: userId,
fangAnId: id,
type: typeNo,
needGovernance: needGovernance.value
}
})
flag.value = true
})
}
/**获取用户性质*/
const getUserTypeName = (userType: any) => {
if (userType === 0) {
return '新建电网工程'
}
if (userType === 1) {
return '扩建电网工程'
}
if (userType === 2) {
return '新建非线性负荷用户'
}
if (userType === 3) {
return '扩建非线性负荷用户'
}
if (userType === 4) {
return '新建新能源发电站'
}
if (userType === 5) {
return '扩建新能源发电站'
}
if (userType === 6) {
return '敏感及重要用户'
}
if (userType === 0) {
return '新建电网工程'
}
if (userType === 1) {
return '扩建电网工程'
}
if (userType === 2) {
return '新建非线性负荷用户'
}
if (userType === 3) {
return '扩建非线性负荷用户'
}
if (userType === 4) {
return '新建新能源发电站'
}
if (userType === 5) {
return '扩建新能源发电站'
}
if (userType === 6) {
return '敏感及重要用户'
}
return '新建电网工程'
}
watch(
() => currentRoute.value.path,
() => {
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
tableStore.index()
flag.value = false
}
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
tableStore.index()
flag.value = false
}
},
{
deep: true
deep: true
}
)
//初始进来时如果有id就直接打开重新发起
onMounted(async () => {
tableStore.index()
})
/**
* 监听 props.id变了根据id查询详细数据用户重新发起
*/
const props = defineProps(['id', 'businessKey'])
watch(() => props.id, async (newValue, oldValue) => {
if (newValue === 'null') return; // 直接返回,避免后续逻辑执行
const fullId = newValue.split('@')[0]
let nowTime = Date.now()
const routeTime = Number(newValue.split('@')[1])
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms则不执行
// 此处较为复杂,需要判断是更新、入网检测、治理工程验收
if (props.businessKey == 'user_go_net') {
// 入网检测
toFangAnById(fullId, 0)
} else if (props.businessKey == 'user_treat_check') {
// 治理工程验收
toFangAnById(fullId, 1)
} else {
await getUserReportById(fullId).then(res => {
if (res && res.code == 'A0000') {
addForms.value.open({
title: '重新发起',
row: res.data
})
}
})
}
}, {immediate: true})
</script>

View File

@@ -1,73 +1,75 @@
<template>
<div class="default-main">
<!-- <TableHeader ref='TableHeaderRef'>
<template #select>
<el-form-item label='用户名称'>
<el-input v-model='tableStore.table.params.projectName' clearable></el-input>
</el-form-item>
<el-form-item label='所在地市'>
<el-select v-model='tableStore.table.params.city' clearable placeholder='请选择所在地市'>
<el-option
v-for='item in areaOptionList'
:key='item.id'
:label='item.name'
:value='item.name'
></el-option>
</el-select>
</el-form-item>
</template>
<template #operation>
<el-button icon='' type='primary' @click='toGoNet()'>{{ titleButton }}</el-button>
<div class="default-main">
<!-- <TableHeader ref='TableHeaderRef'>
<template #select>
<el-form-item label='用户名称'>
<el-input v-model='tableStore.table.params.projectName' clearable></el-input>
</el-form-item>
<el-form-item label='所在地市'>
<el-select v-model='tableStore.table.params.city' clearable placeholder='请选择所在地市'>
<el-option
v-for='item in areaOptionList'
:key='item.id'
:label='item.name'
:value='item.name'
></el-option>
</el-select>
</el-form-item>
</template>
<template #operation>
<el-button icon='' type='primary' @click='toGoNet()'>{{ titleButton }}</el-button>
<el-button style='margin-left: 50px' :icon='Back' @click='go(-1)'>返回</el-button>
</template>
</TableHeader> -->
<div class="header_btn">
<el-button v-if="bussType == 0 && !(jb_pl || jb_dky)" icon="" type="primary" @click="toGoNet()">
{{ titleButton }}
</el-button>
<el-button
v-if="bussType == 1 && needGovernance != '0' && !(jb_pl || jb_dky)"
icon=""
type="primary"
@click="toGoNet()"
>
{{ titleButton }}
</el-button>
<el-button style="margin-left: 50px" :icon="Back" @click="go(-1)">返回</el-button>
</div>
<Table ref="tableRef" />
<addForm
v-if="dialogVisible"
ref="addForms"
:id="bussId"
:bussType="bussType"
:title="titleButton1"
openType="detail"
@onSubmit="tableStore.index()"
></addForm>
<el-button style='margin-left: 50px' :icon='Back' @click='go(-1)'>返回</el-button>
</template>
</TableHeader> -->
<div class="header_btn">
<el-button v-if="bussType == 0 && !(jb_pl || jb_dky)" icon="" type="primary" @click="toGoNet()">
{{ titleButton }}
</el-button>
<el-button
v-if="bussType == 1 && needGovernance != '0' && !(jb_pl || jb_dky)"
icon=""
type="primary"
@click="toGoNet()"
>
{{ titleButton }}
</el-button>
<el-button style="margin-left: 50px" :icon="Back" @click="go(-1)">返回</el-button>
</div>
<Table ref="tableRef"/>
<addForm
v-if="dialogVisible"
ref="addForms"
:id="bussId"
:bussType="bussType"
:title="titleButton1"
openType="detail"
@onSubmit="tableStore.index()"
></addForm>
</div>
</template>
<script setup lang="ts">
defineOptions({
name: 'ProgramReview'
name: 'ProgramReview'
})
import { ref, onMounted, provide, nextTick, onUnmounted } from 'vue'
import {ref, onMounted, provide, nextTick, onUnmounted} from 'vue'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import { cancel } from '@/api/supervision-boot/interfere/index'
import { useDictData } from '@/stores/dictData'
import {cancel, userReportGoNetById} from '@/api/supervision-boot/interfere/index'
import {useDictData} from '@/stores/dictData'
import addForm from './addForm.vue'
import { useRouter, useRoute } from 'vue-router'
import { Back } from '@element-plus/icons-vue'
import { useAdminInfo } from '@/stores/adminInfo'
const { go, currentRoute, push } = useRouter()
const { query } = useRoute() // 查询参数
import { ElMessage } from 'element-plus'
import { ElMessageBox } from 'element-plus/es'
import {useRouter, useRoute} from 'vue-router'
import {Back} from '@element-plus/icons-vue'
import {useAdminInfo} from '@/stores/adminInfo'
const {go, currentRoute, push} = useRouter()
const {query} = useRoute() // 查询参数
import {ElMessage} from 'element-plus'
import {ElMessageBox} from 'element-plus/es'
const needGovernance = query.needGovernance as unknown as string // 从 URL 传递过来的 是否需要治理
const dictData = useDictData()
const areaOptionList = dictData.getBasicData('jibei_area')
@@ -76,161 +78,161 @@ const jb_pl = ref(false)
const jb_dky = ref(false)
jb_pl.value =
adminInfo.$state.roleCode.filter(item => {
return item == 'jb_pl'
return item == 'jb_pl'
}).length != 0
? true
: false
jb_dky.value =
adminInfo.$state.roleCode.filter(item => {
return item == 'jb_dky'
return item == 'jb_dky'
}).length != 0
? true
: false
const tableStore = new TableStore({
url: '/supervision-boot/userReportNormal/userReportGoNetPage',
url: '/supervision-boot/userReportNormal/userReportGoNetPage',
method: 'POST',
column: [
{ title: '序号', type: 'seq', width: 80 },
{ field: 'projectName', title: '用户名称', minWidth: 170 },
method: 'POST',
column: [
{title: '序号', type: 'seq', width: 80},
{field: 'projectName', title: '用户名称', minWidth: 170},
{
field: 'userType',
title: '用户性质',
minWidth: 150,
formatter: (obj: any) => {
const userType = obj.row.userType
return getUserTypeName(userType)
}
},
{field: 'city', title: '所在地市', minWidth: 80},
{field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130},
{
field: 'userStatus',
title: '用户状态',
minWidth: 100,
render: 'tag',
custom: {
0: 'primary',
1: 'primary',
2: 'success',
3: 'warning'
},
replaceValue: {
0: '可研',
1: '建设',
2: '运行',
3: '退运'
}
},
{field: 'substation', title: '厂站名称', minWidth: 100},
{
field: 'status',
title: '流程状态',
minWidth: 100,
render: 'tag',
custom: {
0: 'warning',
1: 'primary',
2: 'success',
3: 'danger',
4: 'warning'
},
replaceValue: {
0: '待提交审批',
1: '审批中',
2: '审批通过',
3: '审批不通过',
4: '已取消'
}
},
{
field: 'createBy',
title: '填报人',
minWidth: 80,
formatter: (row: any) => {
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
}
},
{field: 'createTime', title: '创建时间', minWidth: 100},
{
title: '操作',
minWidth: 180,
fixed: 'right',
render: 'buttons',
buttons: [
{
field: 'userType',
title: '用户性质',
minWidth: 150,
formatter: (obj: any) => {
const userType = obj.row.userType
return getUserTypeName(userType)
}
},
{ field: 'city', title: '所在地市', minWidth: 80 },
{ field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
{
field: 'userStatus',
title: '用户状态',
minWidth: 100,
render: 'tag',
custom: {
0: 'primary',
1: 'primary',
2: 'success',
3: 'warning'
},
replaceValue: {
0: '可研',
1: '建设',
2: '运行',
3: '退运'
}
},
{ field: 'substation', title: '厂站名称', minWidth: 100 },
{
field: 'status',
title: '流程状态',
minWidth: 100,
render: 'tag',
custom: {
0: 'warning',
1: 'primary',
2: 'success',
3: 'danger',
4: 'warning'
},
replaceValue: {
0: '待提交审批',
1: '审批中',
2: '审批通过',
3: '审批不通过',
4: '已取消'
}
name: 'productSetting',
title: '流程详情',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
disabled: row => {
return !row.processInstanceId
},
click: row => {
handleAudit(row.processInstanceId)
}
},
{
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',
showDisabled: row => {
return !(row.status == 0 || row.status == 3)
},
disabled: row => {
return !(row.status == 0 || row.status == 3)
},
click: row => {
dialogVisible.value = true
titleButton1.value = '编辑'
setTimeout(() => {
addForms.value.open(row)
}, 0)
}
},
{ field: 'createTime', title: '创建时间', minWidth: 100 },
{
title: '操作',
minWidth: 180,
fixed: 'right',
render: 'buttons',
buttons: [
{
name: 'productSetting',
title: '流程详情',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
disabled: row => {
return !row.processInstanceId
},
click: row => {
handleAudit(row.processInstanceId)
}
},
{
name: 'edit',
title: '编辑',
type: 'primary',
icon: 'el-icon-Open',
render: 'basicButton',
showDisabled: row => {
return !(row.status == 0 || row.status == 3)
},
disabled: row => {
return !(row.status == 0 || row.status == 3)
},
click: row => {
dialogVisible.value = true
titleButton1.value = '编辑'
setTimeout(() => {
addForms.value.open(row)
}, 0)
}
},
{
name: 'edit',
title: '重新发起',
type: 'warning',
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.createBy != adminInfo.$state.id || !(row.status == 4)
},
click: row => {
dialogVisible.value = true
titleButton1.value = '重新发起'
setTimeout(() => {
addForms.value.open(row)
}, 0)
}
},
{
name: 'cancel',
title: '取消',
type: 'danger',
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.createBy != adminInfo.$state.id || row.status !== 1
},
click: row => {
cancelLeave(row)
}
}
]
name: 'edit',
title: '重新发起',
type: 'warning',
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.createBy != adminInfo.$state.id || !(row.status == 4)
},
click: row => {
dialogVisible.value = true
titleButton1.value = '重新发起'
setTimeout(() => {
addForms.value.open(row)
}, 0)
}
},
{
name: 'cancel',
title: '取消',
type: 'danger',
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.createBy != adminInfo.$state.id || row.status !== 1
},
click: row => {
cancelLeave(row)
}
}
],
beforeSearchFun: () => {
tableStore.table.params.userReportId = bussId.value
tableStore.table.params.type = bussType.value
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
tableStore.table.params.relationUserName = tableStore.table.params.userName
]
}
],
beforeSearchFun: () => {
tableStore.table.params.userReportId = bussId.value
tableStore.table.params.type = bussType.value
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
tableStore.table.params.relationUserName = tableStore.table.params.userName
}
})
tableStore.table.params.city = ''
tableStore.table.params.projectName = ''
@@ -247,102 +249,117 @@ const titleButton1 = ref()
provide('tableStore', tableStore)
const handleVisibilityChange = async () => {
if (document.visibilityState === 'visible') {
// 在这里执行页面回到回到当前页签需要做的事情
await tableStore.index()
} else if (document.visibilityState === 'hidden') {
// 在这里执行页面离开时需要做的事情
}
if (document.visibilityState === 'visible') {
// 在这里执行页面回到回到当前页签需要做的事情
await tableStore.index()
} else if (document.visibilityState === 'hidden') {
// 在这里执行页面离开时需要做的事情
}
}
onMounted(() => {
tableStore.index()
document.addEventListener('visibilitychange', handleVisibilityChange)
onMounted(async () => {
tableStore.index()
document.addEventListener('visibilitychange', handleVisibilityChange)
if (query.fangAnId) {
//根据id查询待编辑的数据
await userReportGoNetById({id: query.fangAnId}).then(res => {
if (res && res.code == 'A0000') {
dialogVisible.value = true
titleButton1.value = '重新发起'
setTimeout(() => {
res.data.id = query.fangAnId
addForms.value.open(res.data)
}, 0)
}
})
}
})
onUnmounted(() => {
document.removeEventListener('visibilitychange', handleVisibilityChange)
document.removeEventListener('visibilitychange', handleVisibilityChange)
})
/**取消流程操作*/
const cancelLeave = async (row: any) => {
// 二次确认
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputType: 'textarea',
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
inputErrorMessage: '取消原因不能为空'
})
// 发起取消
let data = {
id: row.id,
processInstanceId: row.processInstanceId,
reason: value
}
await cancel(data)
ElMessage.success('取消成功')
// 加载数据
tableStore.index()
// 二次确认
const {value} = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputType: 'textarea',
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
inputErrorMessage: '取消原因不能为空'
})
// 发起取消
let data = {
id: row.id,
processInstanceId: row.processInstanceId,
reason: value
}
await cancel(data)
ElMessage.success('取消成功')
// 加载数据
tableStore.index()
}
/** 处理审批按钮 */
const handleAudit = (instanceId: any) => {
push({
name: 'BpmProcessInstanceDetail',
query: {
id: instanceId
}
})
push({
name: 'BpmProcessInstanceDetail',
query: {
id: instanceId
}
})
}
if (bussType.value === 0) {
titleButton.value = '入网设计方案申请'
titleButton.value = '入网设计方案申请'
} else {
titleButton.value = '治理工程申请'
titleButton.value = '治理工程申请'
}
const addForms = ref()
const toGoNet = () => {
dialogVisible.value = true
if (bussType.value === 0) {
titleButton1.value = '入网设计方案申请'
} else {
titleButton1.value = '治理工程申请'
}
setTimeout(() => {
addForms.value.open()
}, 0)
dialogVisible.value = true
if (bussType.value === 0) {
titleButton1.value = '入网设计方案申请'
} else {
titleButton1.value = '治理工程申请'
}
setTimeout(() => {
addForms.value.open()
}, 0)
}
/**获取用户性质*/
const getUserTypeName = (userType: any) => {
if (userType === 0) {
return '新建电网工程'
}
if (userType === 1) {
return '扩建电网工程'
}
if (userType === 2) {
return '新建非线性负荷用户'
}
if (userType === 3) {
return '扩建非线性负荷用户'
}
if (userType === 4) {
return '新建新能源发电站'
}
if (userType === 5) {
return '扩建新能源发电站'
}
if (userType === 6) {
return '敏感及重要用户'
}
if (userType === 0) {
return '新建电网工程'
}
if (userType === 1) {
return '扩建电网工程'
}
if (userType === 2) {
return '新建非线性负荷用户'
}
if (userType === 3) {
return '扩建非线性负荷用户'
}
if (userType === 4) {
return '新建新能源发电站'
}
if (userType === 5) {
return '扩建新能源发电站'
}
if (userType === 6) {
return '敏感及重要用户'
}
return '新建电网工程'
}
</script>
<style scoped lang="scss">
.header_btn {
width: 100%;
height: 60px;
display: flex;
padding: 13px 15px;
justify-content: flex-end;
align-items: center;
border: 1px solid #dddfe6;
width: 100%;
height: 60px;
display: flex;
padding: 13px 15px;
justify-content: flex-end;
align-items: center;
border: 1px solid #dddfe6;
}
</style>

View File

@@ -1,66 +1,66 @@
<template>
<TableHeader datePicker nextFlag theCurrentTime ref="TableHeaderRef">
<template #select>
<el-form-item label="项目名称">
<el-input v-model="tableStore.table.params.projectName" placeholder="请输入项目名称"></el-input>
</el-form-item>
<el-form-item label="所在地市">
<el-select v-model="tableStore.table.params.city" clearable placeholder="请选择所在地市">
<el-option
v-for="item in areaOptionList"
:key="item.id"
:label="item.name"
:value="item.name"
></el-option>
</el-select>
</el-form-item>
<TableHeader datePicker nextFlag theCurrentTime ref='TableHeaderRef'>
<template #select>
<el-form-item label='项目名称'>
<el-input v-model='tableStore.table.params.projectName' placeholder='请输入项目名称'></el-input>
</el-form-item>
<el-form-item label='所在地市'>
<el-select v-model='tableStore.table.params.city' clearable placeholder='请选择所在地市'>
<el-option
v-for='item in areaOptionList'
:key='item.id'
:label='item.name'
:value='item.name'
></el-option>
</el-select>
</el-form-item>
<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="addList">新增</el-button> -->
<el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button>
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
<!-- <el-button icon="el-icon-Download" @click="exportEvent" type="primary">导出</el-button> -->
</template>
</TableHeader>
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
<!-- 新增 -->
<Add ref="addRef" @onSubmit="tableStore.index()" />
<!-- 上传 -->
<Audit ref="AuditRef" @onSubmit="tableStore.index()" />
<!-- 查看详情 detail 新增/修改 create-->
<addForm ref="addForms" @onSubmit="tableStore.index()"></addForm>
<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="addList">新增</el-button> -->
<el-button icon='el-icon-Plus' type='primary' @click='addFormModel'>新增</el-button>
<el-button icon='el-icon-Delete' type='primary' @click='deleteEven'>删除</el-button>
<!-- <el-button icon="el-icon-Download" @click="exportEvent" type="primary">导出</el-button> -->
</template>
</TableHeader>
<Table ref='tableRef' :checkbox-config='checkboxConfig'/>
<!-- 新增 -->
<Add ref='addRef' @onSubmit='tableStore.index()'/>
<!-- 上传 -->
<Audit ref='AuditRef' @onSubmit='tableStore.index()'/>
<!-- 查看详情 detail 新增/修改 create-->
<addForm ref='addForms' @onSubmit='tableStore.index()'></addForm>
</template>
<script setup lang="ts">
import { ref, onMounted, provide, watch, reactive } from 'vue'
<script setup lang='ts'>
import {ref, onMounted, provide, watch, reactive} from 'vue'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
import { useRouter } from 'vue-router'
import {useRouter} from 'vue-router'
import Add from './add.vue'
import Audit from './audit.vue'
import addForm from './addForm.vue'
import { useDictData } from '@/stores/dictData'
import { getLoadTypeUserList } from '@/api/process-boot/interference'
import { cancelFormData } from '@/api/supervision-boot/interfere/index'
import { ElMessage } from 'element-plus'
import { ElMessageBox } from 'element-plus/es'
import { useAdminInfo } from '@/stores/adminInfo'
import { deleteUserReport } from '@/api/supervision-boot/delete/index'
import {useDictData} from '@/stores/dictData'
import {getLoadTypeUserList} from '@/api/process-boot/interference'
import {cancelFormData, getUserReportById} from '@/api/supervision-boot/interfere/index'
import {ElMessage} from 'element-plus'
import {ElMessageBox} from 'element-plus/es'
import {useAdminInfo} from '@/stores/adminInfo'
import {deleteUserReport} from '@/api/supervision-boot/delete/index'
//获取登陆用户姓名和部门
const adminInfo = useAdminInfo()
const dictData = useDictData()
const { push, options, currentRoute } = useRouter()
const {push, options, currentRoute} = useRouter()
const TableHeaderRef = ref()
const tableRef = ref()
const areaOptionList = dictData
@@ -74,167 +74,167 @@ const show: any = ref(false)
const fileList = ref([])
const flag = ref(false)
const tableStore = new TableStore({
url: '/supervision-boot/userReport/getUserReport',
publicHeight: 65,
method: 'POST',
column: [
url: '/supervision-boot/userReport/getUserReport',
publicHeight: 65,
method: 'POST',
column: [
{
width: '60',
type: 'checkbox'
},
{title: '序号', type: 'seq', width: 80},
// { field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
{
field: 'city',
title: '所在地市',
minWidth: 80
// formatter: (obj: any) => {
// return areaOptionList.filter(item => item.id == obj.row.city)[0]?.name
// }
},
{
field: 'substation',
title: '厂站名称',
minWidth: 100,
formatter: (row: any) => {
row.cellValue = row.cellValue ? row.cellValue : '/'
return row.cellValue
}
},
{field: 'projectName', title: '项目名称', minWidth: 170},
{
field: 'userType',
title: '用户性质',
minWidth: 150,
formatter: (obj: any) => {
const userType = obj.row.userType
return getUserTypeName(userType)
}
},
{field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130},
{
field: 'userStatus',
title: '用户状态',
minWidth: 100,
render: 'tag',
custom: {
0: 'primary',
1: 'primary',
2: 'success',
3: 'warning'
},
replaceValue: {
0: '可研',
1: '建设',
2: '运行',
3: '退运'
}
},
{
field: 'status',
title: '流程状态',
minWidth: 100,
render: 'tag',
custom: {
0: 'warning',
1: 'primary',
2: 'success',
3: 'danger',
4: 'warning'
},
replaceValue: {
0: '待提交审批',
1: '审批中',
2: '审批通过',
3: '审批不通过',
4: '已取消'
}
},
{field: 'createTime', title: '开始时间', minWidth: 170},
{
field: 'createBy',
title: '填报人',
minWidth: 80,
formatter: (row: any) => {
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
}
},
{
title: '操作',
minWidth: 150,
fixed: 'right',
render: 'buttons',
buttons: [
{
width: '60',
type: 'checkbox'
},
{ title: '序号', type: 'seq', width: 80 },
// { field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
{
field: 'city',
title: '所在地市',
minWidth: 80
// formatter: (obj: any) => {
// return areaOptionList.filter(item => item.id == obj.row.city)[0]?.name
// }
name: 'productSetting',
title: '流程详情',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
disabled: row => {
return !row.processInstanceId
},
click: row => {
flag.value = true
handleAudit(row.processInstanceId, row.historyInstanceId)
}
},
{
field: 'substation',
title: '厂站名称',
minWidth: 100,
formatter: (row: any) => {
row.cellValue = row.cellValue ? row.cellValue : '/'
return row.cellValue
}
},
{ field: 'projectName', title: '项目名称', minWidth: 170 },
{
field: 'userType',
title: '用户性质',
minWidth: 150,
formatter: (obj: any) => {
const userType = obj.row.userType
return getUserTypeName(userType)
}
},
{ field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
{
field: 'userStatus',
title: '用户状态',
minWidth: 100,
render: 'tag',
custom: {
0: 'primary',
1: 'primary',
2: 'success',
3: 'warning'
},
replaceValue: {
0: '可研',
1: '建设',
2: '运行',
3: '退运'
}
name: 'edit',
title: '编辑',
type: 'primary',
icon: 'el-icon-Open',
render: 'basicButton',
showDisabled: row => {
return row.createBy != adminInfo.$state.id || !(row.status == 0)
},
disabled: row => {
return !(row.status == 0)
},
click: row => {
addForms.value.open({
title: '编辑',
row: row
})
}
},
{
field: 'status',
title: '流程状态',
minWidth: 100,
render: 'tag',
custom: {
0: 'warning',
1: 'primary',
2: 'success',
3: 'danger',
4: 'warning'
},
replaceValue: {
0: '待提交审批',
1: '审批中',
2: '审批通过',
3: '审批不通过',
4: '已取消'
}
},
{ field: 'createTime', title: '开始时间', minWidth: 170 },
{
field: 'createBy',
title: '填报人',
minWidth: 80,
formatter: (row: any) => {
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
}
name: 'edit',
title: '重新发起',
type: 'warning',
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
},
click: row => {
addForms.value.open({
title: '重新发起',
row: row
})
}
},
{
title: '操作',
minWidth: 150,
fixed: 'right',
render: 'buttons',
buttons: [
{
name: 'productSetting',
title: '流程详情',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
disabled: row => {
return !row.processInstanceId
},
click: row => {
flag.value = true
handleAudit(row.processInstanceId, row.historyInstanceId)
}
},
{
name: 'edit',
title: '编辑',
type: 'primary',
icon: 'el-icon-Open',
render: 'basicButton',
showDisabled: row => {
return row.createBy != adminInfo.$state.id || !(row.status == 0)
},
disabled: row => {
return !(row.status == 0)
},
click: row => {
addForms.value.open({
title: '编辑',
row: row
})
}
},
{
name: 'edit',
title: '重新发起',
type: 'warning',
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
},
click: row => {
addForms.value.open({
title: '重新发起',
row: row
})
}
},
{
name: 'cancel',
title: '取消',
type: 'danger',
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.createBy != adminInfo.$state.id || row.status != 1
},
click: row => {
cancelLeave(row)
}
}
]
name: 'cancel',
title: '取消',
type: 'danger',
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.createBy != adminInfo.$state.id || row.status != 1
},
click: row => {
cancelLeave(row)
}
}
],
beforeSearchFun: () => {
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
tableStore.table.params.relationUserName = tableStore.table.params.userName
]
}
],
beforeSearchFun: () => {
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
tableStore.table.params.relationUserName = tableStore.table.params.userName
}
})
tableStore.table.params.city = ''
tableStore.table.params.projectName = ''
@@ -247,135 +247,154 @@ tableStore.table.params.status = ''
provide('tableStore', tableStore)
// 新增
const addList = () => {
addRef.value.open()
addRef.value.open()
}
// 禁止点击
const checkboxConfig = reactive({
checkMethod: ({ row }) => {
return adminInfo.roleCode.includes('delete_info')
? true
: row.createBy == adminInfo.$state.id && row.status == 0
}
checkMethod: ({row}) => {
return adminInfo.roleCode.includes('delete_info')
? true
: row.createBy == adminInfo.$state.id && row.status == 0
}
})
const deleteEven = () => {
if (tableStore.table.selection.length == 0) {
ElMessage({
type: 'warning',
message: '请选择要删除的数据'
})
} else {
deleteUserReport(tableStore.table.selection.map(item => item.id)).then(res => {
ElMessage({
type: 'success',
message: '删除成功!'
})
tableStore.index()
})
}
if (tableStore.table.selection.length == 0) {
ElMessage({
type: 'warning',
message: '请选择要删除的数据'
})
} else {
deleteUserReport(tableStore.table.selection.map(item => item.id)).then(res => {
ElMessage({
type: 'success',
message: '删除成功!'
})
tableStore.index()
})
}
}
const addForms = ref()
const addFormModel = () => {
show.value = true
setTimeout(() => {
addForms.value.open({
title: '用户档案录入'
})
}, 0)
show.value = true
setTimeout(() => {
addForms.value.open({
title: '用户档案录入'
})
}, 0)
}
// 导出
const exportEvent = () => {
let form = JSON.parse(JSON.stringify(tableStore.table.params))
form.pageNum = 1
form.pageSize = tableStore.table.total
getLoadTypeUserList(form).then(res => {
tableRef.value.getRef().exportData({
filename: '未建档非线性用户', // 文件名字
sheetName: 'Sheet1',
type: 'xlsx', //导出文件类型 xlsx 和 csv
useStyle: true,
data: res.data.records, // 数据源 // 过滤那个字段导出
columnFilterMethod: function (column: any) {
return !(column.$columnIndex === 0)
}
})
let form = JSON.parse(JSON.stringify(tableStore.table.params))
form.pageNum = 1
form.pageSize = tableStore.table.total
getLoadTypeUserList(form).then(res => {
tableRef.value.getRef().exportData({
filename: '未建档非线性用户', // 文件名字
sheetName: 'Sheet1',
type: 'xlsx', //导出文件类型 xlsx 和 csv
useStyle: true,
data: res.data.records, // 数据源 // 过滤那个字段导出
columnFilterMethod: function (column: any) {
return !(column.$columnIndex === 0)
}
})
})
}
/**取消流程操作*/
const cancelLeave = async (row: any) => {
// 二次确认
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputType: 'textarea',
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
inputErrorMessage: '取消原因不能为空'
})
// 发起取消
let data = {
id: row.id,
processInstanceId: row.processInstanceId,
reason: value
}
await cancelFormData(data)
ElMessage.success('取消成功')
// 加载数据
tableStore.index()
// 二次确认
const {value} = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputType: 'textarea',
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
inputErrorMessage: '取消原因不能为空'
})
// 发起取消
let data = {
id: row.id,
processInstanceId: row.processInstanceId,
reason: value
}
await cancelFormData(data)
ElMessage.success('取消成功')
// 加载数据
tableStore.index()
}
onMounted(() => {
tableStore.index()
tableStore.index()
})
watch(
() => currentRoute.value.path,
() => {
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
tableStore.index()
flag.value = false
}
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
tableStore.index()
flag.value = false
}
},
{
deep: true
deep: true
}
)
/** 处理审批按钮 */
const handleAudit = (instanceId: any, historyInstanceId: any) => {
push({
name: 'BpmProcessInstanceDetail',
state: {
id: instanceId,
historyInstanceId
}
})
push({
name: 'BpmProcessInstanceDetail',
state: {
id: instanceId,
historyInstanceId
}
})
}
/**获取用户性质*/
const getUserTypeName = (userType: any) => {
if (userType === 0) {
return '新建电网工程'
}
if (userType === 1) {
return '扩建电网工程'
}
if (userType === 2) {
return '新建非线性负荷用户'
}
if (userType === 3) {
return '扩建非线性负荷用户'
}
if (userType === 4) {
return '新建新能源发电站'
}
if (userType === 5) {
return '扩建新能源发电站'
}
if (userType === 6) {
return '敏感及重要用户'
}
if (userType === 0) {
return '新建电网工程'
}
if (userType === 1) {
return '扩建电网工程'
}
if (userType === 2) {
return '新建非线性负荷用户'
}
if (userType === 3) {
return '扩建非线性负荷用户'
}
if (userType === 4) {
return '新建新能源发电站'
}
if (userType === 5) {
return '扩建新能源发电站'
}
if (userType === 6) {
return '敏感及重要用户'
}
return '新建电网工程'
}
const props = defineProps({id: {type: String, default: 'null'}})
watch(() => props.id, async (newValue, oldValue) => {
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
const fullId = newValue.split('@')[0]
let nowTime = Date.now()
const routeTime = Number(newValue.split('@')[1])
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms则不执行
await getUserReportById(fullId).then(res => {
if (res && res.code == 'A0000') {
addForms.value.open({
title: '重新发起',
row: res.data
})
}
})
}, {immediate: true})
</script>
<style scoped lang="scss"></style>
<style scoped lang='scss'></style>

View File

@@ -1,38 +1,61 @@
<template>
<div class="default-main">
<el-tabs v-model="activeName" type="border-card">
<el-tab-pane label="未建档用户档案录入管理" name="1">
<undocumented v-if="activeName == '1'" />
</el-tab-pane>
<el-tab-pane label="常态化干扰源用户管理" name="3">
<interferenceUserTable v-if="activeName == '3'" />
</el-tab-pane>
</el-tabs>
</div>
<div class='default-main'>
<el-tabs v-model='activeName' type='border-card'>
<el-tab-pane label='未建档用户档案录入管理' name='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>
</el-tabs>
</div>
</template>
<script setup lang="ts">
import { onMounted, reactive, ref, provide } from 'vue'
import { mainHeight } from '@/utils/layout'
<script setup lang='ts'>
import {nextTick, ref, provide} 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 route = useRoute()
const Undocumented = ref()
const InterferenceUserTable = ref()
defineOptions({
name: 'supervision/interferencemanagement'
name: 'supervision/interferencemanagement'
})
const activeName = ref('1')
const id = ref('')
const key = ref('')
watch(() => route.query.t, async (newValue, oldValue) => {
if (route.fullPath.includes('supervision/interferencemanagement')) {
let type = (route.query.type as string) || 'null'
if (type == 'null' || type == '1') {
activeName.value = '1'
} else {
activeName.value = '3'
}
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})
const layout = mainHeight(63) as any
</script>
<style lang="scss" scoped>
<style lang='scss' scoped>
.bars_w {
width: 100%;
height: 500px;
width: 100%;
height: 500px;
}
:deep(.el-tabs__content) {
height: v-bind('layout.height');
overflow-y: auto;
height: v-bind('layout.height');
overflow-y: auto;
}
</style>

View File

@@ -269,7 +269,7 @@ const tableStore = new TableStore({
click: row => {
router.push({
name: 'supervision/supervision/manage',
state: {
query: {
type: 1
}
})

View File

@@ -2,10 +2,10 @@
<div class='default-main'>
<el-tabs v-model='activeName' type='border-card'>
<el-tab-pane label='终端状态管理' name='0'>
<terminal v-if="activeName == '0'" />
<terminal :id="id" v-if="activeName == '0'" />
</el-tab-pane>
<el-tab-pane label='监测点状态管理' name='1'>
<monitor v-if="activeName == '1'" />
<monitor :id="id" v-if="activeName == '1'" />
</el-tab-pane>
</el-tabs>
</div>
@@ -16,14 +16,29 @@ import { ref } from 'vue'
import { mainHeight } from '@/utils/layout'
import terminal from './terminal.vue'
import monitor from './monitor.vue'
import {useRoute} from "vue-router";
defineOptions({
name: 'supervision/retire'
})
const activeName = ref('0')
const route = useRoute()
const id = ref('')
const layout = mainHeight(63) as any
watch(() => route.query.t, async (newValue, oldValue) => {
if (route.fullPath.includes('supervision/retire')) {
let type = (route.query.type as string) || 'null'
if (type == 'null' || type == '0') {
activeName.value = '0'
} else {
activeName.value = '1'
}
id.value = (route.query.id as string) || 'null'
id.value = id.value + '@' + route.query.t
}
}, {deep: true, immediate: true})
</script>
<style lang='scss' scoped>

View File

@@ -42,7 +42,7 @@ import { useRouter } from 'vue-router'
import MonitorQuitPopup from '@/views/pqs/supervise/retire/monitorQuitPopup.vue'
import { ElMessage } from 'element-plus'
import { ElMessageBox } from 'element-plus/es'
import { cancelQuitRunningDevice } from '@/api/supervision-boot/device/quitRunningDev'
import {cancelQuitRunningDevice, getRunningDeviceById} from '@/api/supervision-boot/device/quitRunningDev'
import { deleteQuitRunningDevice } from '@/api/supervision-boot/delete/index'
import { useDictData } from '@/stores/dictData'
const dictData = useDictData()
@@ -311,4 +311,18 @@ watch(
deep: true
}
)
const props = defineProps({id: {type: String, default: 'null'}})
watch(() => props.id, async (newValue, oldValue) => {
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
const fullId = newValue.split('@')[0]
let nowTime = Date.now()
const routeTime = Number(newValue.split('@')[1])
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms则不执行
await getRunningDeviceById(fullId).then(res => {
if (res && res.code == 'A0000') {
deviceQuitPopup.value.open('重新发起', res.data)
}
})
}, {immediate: true})
</script>

View File

@@ -42,7 +42,7 @@ import { useRouter } from 'vue-router'
import DeviceQuitPopup from '@/views/pqs/supervise/retire/deviceQuitPopup.vue'
import { ElMessage } from 'element-plus'
import { ElMessageBox } from 'element-plus/es'
import { cancelQuitRunningDevice } from '@/api/supervision-boot/device/quitRunningDev'
import {cancelQuitRunningDevice, getRunningDeviceById} from '@/api/supervision-boot/device/quitRunningDev'
import { useAdminInfo } from '@/stores/adminInfo'
import { useDictData } from '@/stores/dictData'
import { deleteQuitRunningDevice } from '@/api/supervision-boot/delete/index'
@@ -198,7 +198,7 @@ const tableStore = new TableStore({
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
},
click: row => {
deviceQuitPopup.value.open('重新发起终端状态变更', row)
deviceQuitPopup.value.open('重新发起', row)
}
},
{
@@ -307,4 +307,18 @@ watch(
deep: true
}
)
const props = defineProps({id: {type: String, default: 'null'}})
watch(() => props.id, async (newValue, oldValue) => {
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
const fullId = newValue.split('@')[0]
let nowTime = Date.now()
const routeTime = Number(newValue.split('@')[1])
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms则不执行
await getRunningDeviceById(fullId).then(res => {
if (res && res.code == 'A0000') {
deviceQuitPopup.value.open('重新发起', res.data)
}
})
}, {immediate: true})
</script>

View File

@@ -27,14 +27,14 @@
</el-dialog>
</template>
<script setup lang="ts">
import { ref, onMounted, provide, nextTick } from 'vue'
import {ref, onMounted, provide, nextTick, watch} 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 FeedbackPopup from '@/views/pqs/supervise/technology/feedbackPopup.vue'
import { useRouter } from 'vue-router'
import { cancelFeedback } from '@/api/supervision-boot/leaflet'
import {cancelFeedback, getById} from '@/api/supervision-boot/leaflet'
import { useAdminInfo } from '@/stores/adminInfo'
import { useDictData } from '@/stores/dictData'
import { getFileNameAndFilePath } from '@/api/system-boot/file'
@@ -447,6 +447,31 @@ const handleAudit = (instanceId: any, historyInstanceId: any) => {
}
})
}
const props = defineProps({id: {type: String, default: 'null'}})
watch(() => props.id, async (newValue, oldValue) => {
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
const fullId = newValue.split('@')[0]
let nowTime = Date.now()
const routeTime = Number(newValue.split('@')[1])
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms则不执行
await getById(fullId).then(res => {
if (res && res.code == 'A0000') {
feedbackPopup.value.open(
'重新发起告警单',
res.data.id,
res.data.status,
res.data.issueDetail,
res.data.problemPath,
res.data.supervisionReport,
res.data.reformAdvice,
res.data.takeStep,
res.data.reportPath,
res.data.reformAdvice
)
}
})
}, {immediate: true})
</script>
<style scoped lang="scss"></style>

View File

@@ -9,17 +9,16 @@
<feedback-popup ref="feedbackPopup" />
</template>
<script setup lang="ts">
import { ref, onMounted, provide, nextTick } from 'vue'
import { ref, onMounted, provide, watch } 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 FeedbackPopup from '@/views/pqs/supervise/technology/feedbackPopup.vue'
import { useRouter } from 'vue-router'
import { cancelFeedback } from '@/api/supervision-boot/leaflet'
import {cancelFeedback, getById} from '@/api/supervision-boot/leaflet'
import { useAdminInfo } from '@/stores/adminInfo'
import { useDictData } from '@/stores/dictData'
import { getFileNameAndFilePath } from '@/api/system-boot/file'
import { deleteWarningLeaflet } from '@/api/supervision-boot/delete/index'
const dictData = useDictData()
//获取登陆用户姓名和部门
@@ -322,6 +321,30 @@ const handleAudit = (instanceId: any, historyInstanceId: any) => {
}
})
}
const props = defineProps({id: {type: String, default: 'null'}})
watch(() => props.id, async (newValue, oldValue) => {
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
const fullId = newValue.split('@')[0]
let nowTime = Date.now()
const routeTime = Number(newValue.split('@')[1])
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms则不执行
await getById(fullId).then(res => {
if (res && res.code == 'A0000') {
feedbackPopup.value.open(
'重新发起预警单',
res.data.id,
res.data.status,
res.data.issueDetail,
res.data.problemPath,
res.data.reportPath,
res.data.reformAdvice,
res.data.takeStep,
res.data.reportPath
)
}
})
}, {immediate: true})
</script>
<style scoped lang="scss"></style>

View File

@@ -1,51 +1,59 @@
<template>
<div class="default-main">
<el-tabs v-model="activeName" type="border-card">
<!-- <el-tab-pane label="概览" name="1"><overview v-if="activeName == '1'"/></el-tab-pane>
<el-tab-pane label="技术监督管理" name="2"><technology v-if="activeName == '2'"/></el-tab-pane> -->
<div class='default-main'>
<el-tabs v-model='activeName' type='border-card'>
<!-- <el-tab-pane label="概览" name="1"><overview v-if="activeName == '1'"/></el-tab-pane>
<el-tab-pane label="技术监督管理" name="2"><technology v-if="activeName == '2'"/></el-tab-pane> -->
<el-tab-pane label="预警单列表" name="3">
<earlyWarn v-if="activeName == '3'" />
</el-tab-pane>
<el-tab-pane label="告警单列表" name="4">
<alarm v-if="activeName == '4'" />
</el-tab-pane>
</el-tabs>
</div>
<el-tab-pane label='预警单列表' name='3'>
<earlyWarn :id="id" v-if="activeName == '3'" />
</el-tab-pane>
<el-tab-pane label='告警单列表' name='4'>
<alarm :id="id" v-if="activeName == '4'" />
</el-tab-pane>
</el-tabs>
</div>
</template>
<script setup lang="ts">
import overview from './components/overview.vue'
import technology from './components/technology.vue'
<script setup lang='ts'>
import earlyWarn from './components/earlyWarn.vue'
import alarm from './components/alarm.vue'
import { onMounted, reactive, ref, provide } from 'vue'
import { ref } from 'vue'
import { useRoute } from 'vue-router'
import { mainHeight } from '@/utils/layout'
const route = useRoute()
const id = ref('')
defineOptions({
name: 'supervision/supervision/manage'
name: 'supervision/supervision/manage'
})
const states = history.state
const activeName: any = ref(null)
//查看告警单
if (states.type == 1) {
activeName.value = '4'
} else {
activeName.value = '3'
}
const Statistics = ref()
const compatibility = ref()
watch(() => route.query.t, async (newValue, oldValue) => {
if (route.fullPath.includes('supervision/supervision/manage')) {
let type = (route.query.type as string) || 'null'
if (type == 'null' || type == '0') {
activeName.value = '3'
} else {
activeName.value = '4'
}
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;
width: 100%;
height: 500px;
}
:deep(.el-tabs__content) {
height: v-bind('layout.height');
overflow-y: auto;
height: v-bind('layout.height');
overflow-y: auto;
}
</style>

View File

@@ -1,218 +1,221 @@
<!---终端入网检测-->
<template>
<TableHeader area ref="TableHeaderRef">
<template #select>
<el-form-item label="搜索">
<el-input
v-model="tableStore.table.params.searchValue"
placeholder="输入变电站.终端名称"
clearable
></el-input>
</el-form-item>
<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.state" clearable placeholder="请选处理状态">
<el-option
v-for="item in stateSelect"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
</template>
</TableHeader>
<Table ref="tableRef" />
<Form ref="FormRef" @onSubmit="tableStore.index()" />
<TableHeader area ref="TableHeaderRef">
<template #select>
<el-form-item label="搜索">
<el-input
v-model="tableStore.table.params.searchValue"
placeholder="输入变电站.终端名称"
clearable
></el-input>
</el-form-item>
<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.state" clearable placeholder="请选处理状态">
<el-option
v-for="item in stateSelect"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
</template>
</TableHeader>
<Table ref="tableRef"/>
<Form ref="FormRef" @onSubmit="tableStore.index()"/>
</template>
<script setup lang="ts">
import { ref, onMounted, provide, nextTick } from 'vue'
import {ref, onMounted, provide, watch} from 'vue'
import TableStore from '@/utils/tableStore'
import { ElMessage, ElMessageBox } from 'element-plus'
import {ElMessage, ElMessageBox} from 'element-plus'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
import { useRouter } from 'vue-router'
import { useDictData } from '@/stores/dictData'
import {useRouter} from 'vue-router'
import {useDictData} from '@/stores/dictData'
import Form from './form.vue'
import { cancel } from '@/api/supervision-boot/cycleDetection/index'
import { cancelMointorPointTempLinedebug } from '@/api/supervision-boot/jointDebugList/index'
import { useAdminInfo } from '@/stores/adminInfo'
import {cancel, getInfoById} from '@/api/supervision-boot/cycleDetection/index'
import {useAdminInfo} from '@/stores/adminInfo'
//获取登陆用户姓名和部门
const adminInfo = useAdminInfo()
const dictData = useDictData()
const { push, options, currentRoute } = useRouter()
const {push, options, currentRoute} = useRouter()
const flag = ref(false)
const TableHeaderRef = ref()
const tableRef = ref()
const FormRef = ref()
const statusSelect = dictData.statusSelect()
const stateSelect = [
{
id: 0,
name: '未处理'
},
{
id: 1,
name: '处理'
}
{
id: 0,
name: '未处理'
},
{
id: 1,
name: '处理'
},
{
id: 2,
name: '已处理'
}
]
//申请联调
const debugForms = ref()
const tableStore = new TableStore({
url: '/supervision-boot/checkDevice/list',
publicHeight: 65,
method: 'POST',
column: [
{ title: '序号', type: 'seq', width: 80 },
{ field: 'substation', title: '变电站' },
url: '/supervision-boot/checkDevice/list',
publicHeight: 65,
method: 'POST',
column: [
{title: '序号', type: 'seq', width: 80},
{field: 'substation', title: '变电站'},
{ field: 'dept', title: '供电公司' },
{field: 'dept', title: '供电公司'},
{
field: 'deviceName',
title: '终端名称'
},
{
field: 'thisTimeCheck',
title: '本次定检时间'
},
{
field: 'nextTimeCheck',
title: '下次定检时间'
},
{
field: 'overdueDay',
title: '逾期天数',
type: 'html',
formatter: (row: any) => {
let text = row.row.status == 2
? '/'
: `<span style='color: ${
row.row.overdueDay > 10 ? 'red' : row.row.overdueDay > 3 ? 'yellow' : ''
};text-decoration: none'>${row.row.overdueDay}</span>`
return text
}
},
{
field: 'status',
title: '流程状态',
minWidth: 100,
render: 'tag',
custom: {
0: 'warning',
1: 'primary',
2: 'success',
3: 'danger',
4: 'warning',
5: 'primary'
},
replaceValue: {
0: '待提交审批',
1: '审批中',
2: '审批通过',
3: '审批不通过',
4: '已取消',
5: '同步台账成功',
null: '/'
}
},
{
title: '操作',
fixed: 'right',
render: 'buttons',
buttons: [
{
field: 'deviceName',
title: '终端名称'
name: 'productSetting',
title: '流程详情',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
click: row => {
flag.value = true
handleAudit(row.processInstanceId, row.historyInstanceId)
},
disabled: row => {
return !row.processInstanceId
}
},
{
name: 'edit',
title: '报告上传',
type: 'primary',
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.status != null
},
click: row => {
FormRef.value.open('报告上传', row)
}
},
{
name: 'edit',
title: '重新发起',
type: 'warning',
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
},
click: row => {
FormRef.value.open('重新发起', row)
}
},
{
field: 'thisTimeCheck',
title: '本次定检时间'
},
{
field: 'nextTimeCheck',
title: '下次定检时间'
},
{
field: 'overdueDay',
title: '逾期天数',
type: 'html',
formatter: (row: any) => {
let text = row.row.status == 2
? '/'
: `<span style='color: ${
row.row.overdueDay > 10 ? 'red' : row.row.overdueDay > 3 ? 'yellow' : ''
};text-decoration: none'>${row.row.overdueDay}</span>`
return text
name: 'cancel',
title: '取消',
type: 'danger',
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.createBy != adminInfo.$state.id || row.status != 1
},
click: async row => {
// cancelLeave(row)
const {value} = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputType: 'textarea',
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
inputErrorMessage: '取消原因不能为空'
})
// 发起取消
let data = {
id: row.id,
processInstanceId: row.processInstanceId,
reason: value
}
},
{
field: 'status',
title: '流程状态',
minWidth: 100,
render: 'tag',
custom: {
0: 'warning',
1: 'primary',
2: 'success',
3: 'danger',
4: 'warning',
5: 'primary'
},
replaceValue: {
0: '待提交审批',
1: '审批中',
2: '审批通过',
3: '审批不通过',
4: '已取消',
5: '同步台账成功',
null: '/'
}
},
{
title: '操作',
fixed: 'right',
render: 'buttons',
buttons: [
{
name: 'productSetting',
title: '流程详情',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
click: row => {
flag.value = true
handleAudit(row.processInstanceId, row.historyInstanceId)
},
disabled: row => {
return !row.processInstanceId
}
},
{
name: 'edit',
title: '报告上传',
type: 'primary',
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.status != null
},
click: row => {
FormRef.value.open('报告上传', row)
}
},
{
name: 'edit',
title: '重新发起',
type: 'warning',
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
},
click: row => {
FormRef.value.open('重新发起', row)
}
},
{
name: 'cancel',
title: '取消',
type: 'danger',
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.createBy != adminInfo.$state.id || row.status != 1
},
click: async row => {
// cancelLeave(row)
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputType: 'textarea',
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
inputErrorMessage: '取消原因不能为空'
})
// 发起取消
let data = {
id: row.id,
processInstanceId: row.processInstanceId,
reason: value
}
await cancel(data)
ElMessage.success('取消成功')
// 加载数据
tableStore.index()
}
}
]
await cancel(data)
ElMessage.success('取消成功')
// 加载数据
tableStore.index()
}
}
],
beforeSearchFun: () => {
tableStore.table.params.deptId = tableStore.table.params.deptIndex
tableStore.table.params.statveList = [2]
// tableStore.table.params.relationUserName = tableStore.table.params.userName
]
}
],
beforeSearchFun: () => {
tableStore.table.params.deptId = tableStore.table.params.deptIndex
tableStore.table.params.statveList = [2]
// tableStore.table.params.relationUserName = tableStore.table.params.userName
}
})
tableStore.table.params.status = ''
tableStore.table.params.state = ''
@@ -221,42 +224,56 @@ tableStore.table.params.searchValue = ''
provide('tableStore', tableStore)
onMounted(() => {
tableStore.index()
tableStore.index()
})
/** 处理审批按钮 */
const handleAudit = (instanceId: any, historyInstanceId: any) => {
push({
name: 'BpmProcessInstanceDetail',
state: {
id: instanceId,
historyInstanceId
}
})
push({
name: 'BpmProcessInstanceDetail',
state: {
id: instanceId,
historyInstanceId
}
})
}
const addFormModel = () => {}
const addFormModel = () => {
}
watch(
() => currentRoute.value.path,
() => {
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
tableStore.index()
flag.value = false
}
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
tableStore.index()
flag.value = false
}
},
{
deep: true
deep: true
}
)
const props = defineProps({id: {type: String, default: 'null'}})
watch(() => props.id, async (newValue, oldValue) => {
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
const fullId = newValue.split('@')[0]
let nowTime = Date.now()
const routeTime = Number(newValue.split('@')[1])
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms则不执行
await getInfoById({id:fullId}).then(res => {
if (res && res.code == 'A0000') {
FormRef.value.open('重新发起', res.data)
}
})
}, {immediate: true})
</script>
<style scoped lang="scss">
:deep(.el-upload-list__item) {
width: 400px;
width: 400px;
}
::v-deep .el-input__wrapper {
// width: 200px !important;
// width: 200px !important;
}
</style>

View File

@@ -31,7 +31,7 @@
<debug ref="debugForms" @onSubmit="tableStore.index()" :debugId="debugId"></debug>
</template>
<script setup lang="ts">
import { ref, onMounted, provide, nextTick } from 'vue'
import { ref, onMounted, provide, watch } from 'vue'
import TableStore from '@/utils/tableStore'
import { ElMessage, ElMessageBox } from 'element-plus'
import Table from '@/components/table/index.vue'
@@ -39,7 +39,10 @@ import TableHeader from '@/components/table/header/index.vue'
import { useRouter } from 'vue-router'
import { useDictData } from '@/stores/dictData'
import { getLoadTypeUserList } from '@/api/process-boot/interference'
import { setTempLinedebugLedgerSync } from '@/api/supervision-boot/jointDebugList/index'
import {
getMointorPointTempLinedebugDetail,
setTempLinedebugLedgerSync
} from '@/api/supervision-boot/jointDebugList/index'
import debug from './debug.vue'
import { cancelMointorPointTempLinedebug } from '@/api/supervision-boot/jointDebugList/index'
import { useAdminInfo } from '@/stores/adminInfo'
@@ -326,6 +329,20 @@ watch(
deep: true
}
)
const props = defineProps({id: {type: String, default: 'null'}})
watch(() => props.id, async (newValue, oldValue) => {
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
const fullId = newValue.split('@')[0]
let nowTime = Date.now()
const routeTime = Number(newValue.split('@')[1])
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms则不执行
await getMointorPointTempLinedebugDetail({id:fullId}).then(res => {
if (res && res.code == 'A0000') {
debugForms.value.open('重新发起', res.data)
}
})
}, {immediate: true})
</script>
<style scoped lang="scss">

View File

@@ -43,8 +43,9 @@ import addForm from './addForm.vue'
import { useAdminInfo } from '@/stores/adminInfo'
import { ElMessage } from 'element-plus'
import { ElMessageBox } from 'element-plus/es'
import { cancelMointorPointFormData } from '@/api/supervision-boot/monitorpoint/index'
import {cancelMointorPointFormData, getTempLineDetailsById} from '@/api/supervision-boot/monitorpoint/index'
import { deleteTempLineReport } from '@/api/supervision-boot/delete/index'
import {getTerminalDetailsById} from "@/api/supervision-boot/terminal";
//获取登陆用户姓名和部门
const adminInfo = useAdminInfo()
const dictData = useDictData()
@@ -292,6 +293,23 @@ const handleAudit = (instanceId: any, historyInstanceId: any) => {
}
})
}
const props = defineProps({id: {type: String, default: 'null'}})
watch(() => props.id, async (newValue, oldValue) => {
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
const fullId = newValue.split('@')[0]
let nowTime = Date.now()
const routeTime = Number(newValue.split('@')[1])
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms则不执行
await getTempLineDetailsById({id:fullId}).then(res => {
if (res && res.code == 'A0000') {
addForms.value.open({
title: '重新发起',
row: res.data
})
}
})
}, {immediate: true})
</script>
<style scoped lang="scss">

View File

@@ -49,11 +49,12 @@ import { downloadDevTemplate } from '@/api/supervision-boot/userReport/form'
import { ElMessage } from 'element-plus'
import { ElMessageBox } from 'element-plus/es'
import DetailInfo from '@/views/pqs/supervise/terminalNetworkDetection/components/terminainal/detail.vue'
import { cancelTerminalFormData } from '@/api/supervision-boot/terminal/index'
import {cancelTerminalFormData, getTerminalDetailsById} from '@/api/supervision-boot/terminal/index'
import uploadATemplate from './uploadATemplate.vue'
import addForm from './addForm.vue'
import { useAdminInfo } from '@/stores/adminInfo'
import { deleteDevReport } from '@/api/supervision-boot/delete/index'
import {getUserReportById} from "@/api/supervision-boot/interfere";
//获取登陆用户姓名和部门
const adminInfo = useAdminInfo()
const dictData = useDictData()
@@ -328,6 +329,24 @@ const handleAudit = (instanceId: any, historyInstanceId: any) => {
}
})
}
const props = defineProps({id: {type: String, default: 'null'}})
watch(() => props.id, async (newValue, oldValue) => {
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
const fullId = newValue.split('@')[0]
let nowTime = Date.now()
const routeTime = Number(newValue.split('@')[1])
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms则不执行
await getTerminalDetailsById({id:fullId}).then(res => {
if (res && res.code == 'A0000') {
addForms.value.open({
title: '重新发起',
row: res.data
})
}
})
}, {immediate: true})
</script>
<style scoped lang="scss">

View File

@@ -1,46 +1,68 @@
<template>
<div class="default-main">
<el-tabs v-model="activeName" type="border-card">
<el-tab-pane label="终端入网检测" name="1">
<terminal v-if="activeName == '1'" />
</el-tab-pane>
<el-tab-pane label="监测点台账录入" name="2">
<monitorpoint v-if="activeName == '2'" />
</el-tab-pane>
<el-tab-pane label="监测点联调列表" name="3">
<jointDebugList v-if="activeName == '3'" />
</el-tab-pane>
<el-tab-pane label="终端周期检测" name="4">
<cycleDetection v-if="activeName == '4'"/>
</el-tab-pane>
</el-tabs>
</div>
<div class="default-main">
<el-tabs v-model="activeName" type="border-card">
<el-tab-pane label="终端入网检测" name="1">
<terminal :id="id" v-if="activeName == '1'"/>
</el-tab-pane>
<el-tab-pane label="监测点台账录入" name="2">
<monitorpoint :id="id" v-if="activeName == '2'"/>
</el-tab-pane>
<el-tab-pane label="监测点联调列表" name="3">
<jointDebugList :id="id" v-if="activeName == '3'"/>
</el-tab-pane>
<el-tab-pane label="终端周期检测" name="4">
<cycleDetection :id="id" v-if="activeName == '4'"/>
</el-tab-pane>
</el-tabs>
</div>
</template>
<script setup lang="ts">
import { onMounted, reactive, ref, provide } from 'vue'
import { mainHeight } from '@/utils/layout'
import {ref} from 'vue'
import {mainHeight} from '@/utils/layout'
import terminal from './components/terminainal/index.vue'
import monitorpoint from './components/monitorpoint/index.vue'
import jointDebugList from './components/jointDebugList/index.vue'
import cycleDetection from './components/cycleDetection/index.vue'
import {useRoute} from "vue-router";
defineOptions({
name: 'terminalNetwotk'
name: 'terminalNetwotk'
})
const activeName = ref('1')
const Statistics = ref()
const compatibility = ref()
const route = useRoute()
const id = ref('')
watch(() => route.query.t, async (newValue, oldValue) => {
if (route.fullPath.includes('terminalNetwotk')) {
let type = (route.query.type as string) || 'null'
if (type == 'null' || type == '1') {
activeName.value = '1'
} else if (type == '2') {
activeName.value = '2'
} else if (type == '3') {
activeName.value = '3'
} else {
activeName.value = '4'
}
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>
.bars_w {
width: 100%;
height: 500px;
width: 100%;
height: 500px;
}
:deep(.el-tabs__content) {
height: v-bind('layout.height');
overflow-y: auto;
height: v-bind('layout.height');
overflow-y: auto;
}
</style>

View File

@@ -51,7 +51,7 @@ import { ref, onMounted, provide, reactive } from 'vue'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
import { useRouter } from 'vue-router'
import {useRoute, useRouter} from 'vue-router'
import { useDictData } from '@/stores/dictData'
import { ElMessage, ElMessageBox } from 'element-plus'
import { addRunTest, update, cancel } from '@/api/supervision-boot/lineRunTest'
@@ -190,8 +190,6 @@ const tableStore = new TableStore({
icon: 'el-icon-EditPen',
render: 'basicButton',
click: row => {
monitorIds = []
monitorIds.push(row.id)
monitorIds = []
monitorIds.push(row.id)
const start = new Date()
@@ -403,6 +401,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()
}
})
}
}
}, {deep: true, immediate: true})
</script>
<style scoped lang="scss"></style>

View File

@@ -1,110 +1,243 @@
<!--待办事项列表-->
<template>
<div>
<TableHeader>
<template v-slot:select>
<el-form-item label='任务名称'>
<el-input v-model='tableStore.table.params.searchValue' placeholder='请输入任务名称'></el-input>
</el-form-item>
</template>
</TableHeader>
<!--表格-->
<Table ref='tableRef'></Table>
</div>
<div>
<TableHeader>
<template v-slot:select>
<el-form-item label='任务名称'>
<el-input v-model='tableStore.table.params.searchValue' placeholder='请输入任务名称'></el-input>
</el-form-item>
</template>
</TableHeader>
<!--表格-->
<Table ref='tableRef'></Table>
</div>
</template>
<script setup lang='ts'>
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
import { onMounted, provide, ref, watch } from 'vue'
import { useRouter } from 'vue-router'
import {onMounted, provide, ref, watch} from 'vue'
import {useRouter} from 'vue-router'
import {getById} from "@/api/supervision-boot/leaflet";
import {getRunningDeviceById} from "@/api/supervision-boot/device/quitRunningDev";
const router = useRouter() // 路由对象
defineOptions({
name: 'businessUser'
name: 'businessUser'
})
const { push, options, currentRoute } = useRouter()
const {push, options, currentRoute} = useRouter()
const flag = ref(false)
const tableStore = new TableStore({
url: '/bpm-boot/bpm/task/todoList',
method: 'POST',
publicHeight: 65,
column: [
url: '/bpm-boot/bpm/task/allTodoList',
method: 'POST',
publicHeight: 65,
isWebPaging: true,
column: [
{
field: 'index',
title: '序号',
width: '60',
formatter: (row: any) => {
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
}
},
{title: '任务名称', field: 'taskName', minWidth: 200},
{title: '任务内容', field: 'taskContent', minWidth: 300},
{title: '任务来源', field: 'startUser', minWidth: 120},
{title: '发起时间', field: 'taskCreateTime', minWidth: 180},
{
field: 'source',
title: '流程状态',
render: 'tag',
minWidth: 130,
custom: {
1: 'primary',
2: 'danger',
3: 'primary'
},
replaceValue: {
1: '待审批',
2: '审批不通过',
3: '待处理'
}
},
{
title: '操作',
align: 'center',
minWidth: 100,
render: 'buttons',
buttons: [
{
field: 'index',
title: '序号',
width: '60',
formatter: (row: any) => {
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
}
name: 'productSetting',
title: '办理',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
disabled: row => {
return row.source == 2 || row.source == 3
},
click: row => {
flag.value = true
handleAudit(row.processInstanceId, row.historyInstanceId)
}
},
{ title: '任务名称', field: 'processInstance.name', minWidth: 200 },
{ title: '任务内容', field: 'instanceSign', minWidth: 300 },
{ title: '发起人', field: 'processInstance.startUser.name', minWidth: 120 },
{ title: '发起部门', field: 'processInstance.startUser.deptName', minWidth: 120 },
{ title: '发起时间', field: 'createTime', minWidth: 180 },
{ title: '当前任务', field: 'name', minWidth: 140 },
{
title: '操作',
align: 'center',
minWidth: 100,
render: 'buttons',
buttons: [
{
name: 'productSetting',
title: '办理',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
click: row => {
flag.value = true
handleAudit(row.processInstance.id, row.historyInstanceId)
}
}
]
}
],
beforeSearchFun: () => {
for (let key in tableStore.table.params) {
if (tableStore.table.params[key] === '') {
delete tableStore.table.params[key]
name: 'productSetting',
title: '流程详情',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
disabled: row => {
return row.source == 1 || row.source == 3
},
click: row => {
flag.value = true
handleAudit(row.processInstanceId, row.historyInstanceId)
}
},
{
name: 'productSetting',
title: '重新发起',
type: 'warning',
icon: 'el-icon-EditPen',
render: 'basicButton',
disabled: row => {
return row.source == 1 || row.source == 3
},
click: async row => {
// 页面内tab切换
let type = 1
let key = row.businessKey
// 特殊处理预告警单
if(key == 'warn_leaflet'){
await getById(row.id).then(res => {
if(res.code == 'A0000'){
if(res.data.leafletType == 1){
type = 0
}else {
type = 1
}
}
})
}
if(key == 'quit_running_device'){
await getRunningDeviceById(row.id).then(res => {
if(res.code == 'A0000'){
if(res.data.deviceType == 1){
type = 0
}else {
type = 1
}
}
})
}
// 特殊处理终端监测点状态切换
if (
// 干扰源建档
key == 'build_user_info'
// 终端入网检测
|| key == 'device_info_add'
// 技术监督计划
|| key == 'sup_plan_add') {
type = 1
} else if (
// 干扰源用户常态化管理
key == 'user_report_update'
// 入网方案申请
|| key == 'user_go_net'
// 治理工程审核
|| key == 'user_treat_check'
// 监测点台账录入
|| key == 'line_info_add'
// 技术监督计划测试
|| key == 'survey_test') {
type = 2
} else if (
// 监测点联调
key == 'temp_line_debug'
) {
type = 3
} else if (
// 终端周期检测
key == 'timing_check_device'
) {
type = 4
}
// 业务记录id
let id = row.id
router.push({
name: row.routePath,
query: {
type,
id,
key,
t: Date.now()
}
})
}
},
{
name: 'productSetting',
title: '办理',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
disabled: row => {
return row.source == 1 || row.source == 2
},
click: row => {
flag.value = true
handleAudit(row.processInstanceId, row.historyInstanceId)
}
}
]
}
],
beforeSearchFun: () => {
for (let key in tableStore.table.params) {
if (tableStore.table.params[key] === '') {
delete tableStore.table.params[key]
}
}
}
})
onMounted(() => {
// 加载数据
tableStore.index()
// 加载数据
tableStore.index()
})
tableStore.table.params.searchValue = ''
provide('tableStore', tableStore)
/** 处理审批按钮 */
const handleAudit = (instanceId: string, historyInstanceId: string) => {
push({
name: 'BpmProcessInstanceDetail',
state: {
id: instanceId,
todo: 'todo',
historyInstanceId
}
})
push({
name: 'BpmProcessInstanceDetail',
state: {
id: instanceId,
todo: 'todo',
historyInstanceId
}
})
}
watch(
() => currentRoute.value.path,
() => {
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
tableStore.index()
flag.value = false
}
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
tableStore.index()
flag.value = false
}
},
{
deep: true
deep: true
}
)
</script>

2
types/global.d.ts vendored
View File

@@ -29,7 +29,7 @@ interface TableDefaultData<T = any> {
}
interface ApiResponse<T = any> {
code: number
code: number | string
data: T
msg: string
time: number