流程审核不通过,在我的待办中直接跳转
This commit is contained in:
4
.npmrc
Normal file
4
.npmrc
Normal 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/
|
||||||
@@ -70,6 +70,22 @@ export const userReportGoNetById = (data: any) => {
|
|||||||
params: data
|
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获取用户档案录入的详细数据
|
// 根据id获取用户档案录入的详细数据
|
||||||
export const getById = (data: any) => {
|
export const getById = (data: any) => {
|
||||||
return createAxios({
|
return createAxios({
|
||||||
@@ -78,6 +94,7 @@ export const getById = (data: any) => {
|
|||||||
params: data
|
params: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 根据id获取用户档案录入的详细数据
|
// 根据id获取用户档案录入的详细数据
|
||||||
export const cancel = (data: any) => {
|
export const cancel = (data: any) => {
|
||||||
return createAxios({
|
return createAxios({
|
||||||
|
|||||||
@@ -1,26 +1,26 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- 用户投诉 -->
|
<!-- 用户投诉 -->
|
||||||
<!-- 2 有新增 发起 预警单 -->
|
<!-- 2 有新增 发起 预警单 -->
|
||||||
|
|
||||||
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
||||||
<template v-slot:operation>
|
<template v-slot:operation>
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef"/>
|
||||||
<!-- 新增 -->
|
<!-- 新增 -->
|
||||||
<complaintsForm ref="formRef" @onSubmit="tableStore.index()" />
|
<complaintsForm ref="formRef" @onSubmit="tableStore.index()"/>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
import {ref, onMounted, provide, nextTick} from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import {ElMessage, ElMessageBox} from 'element-plus'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import {useDictData} from '@/stores/dictData'
|
||||||
import complaintsForm from './form/complaintsForm.vue'
|
import complaintsForm from './form/complaintsForm.vue'
|
||||||
import { useRouter } from 'vue-router'
|
import {useRouter} from 'vue-router'
|
||||||
import { sureInitiateWarningLeaflet } from '@/api/process-boot/electricitymanagement'
|
import {sureInitiateWarningLeaflet} from '@/api/process-boot/electricitymanagement'
|
||||||
// Steady_Statis
|
// Steady_Statis
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const exceeded = dictData.getBasicData('Steady_Statis')
|
const exceeded = dictData.getBasicData('Steady_Statis')
|
||||||
@@ -30,137 +30,138 @@ const formRef = ref()
|
|||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const router = useRouter() // 路由对象
|
const router = useRouter() // 路由对象
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/supervision-boot/SupervisionUserComplaint/list',
|
url: '/supervision-boot/SupervisionUserComplaint/list',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
title: '序号',
|
title: '序号',
|
||||||
type: 'seq',
|
type: 'seq',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 60,
|
width: 60,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
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
|
|
||||||
},
|
},
|
||||||
loadCallback: () => {
|
{field: 'userName', title: '用户名称'},
|
||||||
// tableStore.table.data = [
|
{field: 'userNumber', title: '用户编号'},
|
||||||
// {
|
{field: 'dutyOrgName', title: '负责单位', minWidth: '150'},
|
||||||
// userName: '东润开阳堡光伏电站用户',
|
// { field: 'userCategory', title: '用户类别' },
|
||||||
// userId: '8115771123274',
|
|
||||||
// complaintContent: '终端频繁重启',
|
{field: 'complaintText', title: '投诉内容'},
|
||||||
// complaintTime: '2024-05-16'
|
{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)
|
provide('tableStore', tableStore)
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
// 新增
|
// 新增
|
||||||
const add = () => {
|
const add = () => {
|
||||||
formRef.value.open({ text: '新增投诉' })
|
formRef.value.open({text: '新增投诉'})
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -1,93 +1,95 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- <div>1 监测点信息 发起预告警单 </div> -->
|
<!-- <div>1 监测点信息 发起预告警单 </div> -->
|
||||||
|
|
||||||
<TableHeader datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
<TableHeader datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="区域">
|
<el-form-item label="区域">
|
||||||
<Area ref="areaRef" v-model="tableStore.table.params.deptId" @changeValue="changeArea" />
|
<Area ref="areaRef" v-model="tableStore.table.params.deptId" @changeValue="changeArea"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="监测点性质">
|
<el-form-item label="监测点性质">
|
||||||
<el-select v-model="tableStore.table.params.lineType" clearable>
|
<el-select v-model="tableStore.table.params.lineType" clearable>
|
||||||
<el-option label="电网侧" value="0" />
|
<el-option label="电网侧" value="0"/>
|
||||||
<el-option label="非电网侧" value="1" />
|
<el-option label="非电网侧" value="1"/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="超标指标">
|
<el-form-item label="超标指标">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="tableStore.table.params.targetList"
|
v-model="tableStore.table.params.targetList"
|
||||||
clearable
|
clearable
|
||||||
multiple
|
multiple
|
||||||
collapse-tags
|
collapse-tags
|
||||||
collapse-tags-tooltip
|
collapse-tags-tooltip
|
||||||
placeholder="请选择超标指标"
|
placeholder="请选择超标指标"
|
||||||
>
|
>
|
||||||
<el-option v-for="item in exceeded" :key="item.id" :label="item.name" :value="item.id" />
|
<el-option v-for="item in exceeded" :key="item.id" :label="item.name" :value="item.id"/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="数据类型">
|
<el-form-item label="数据类型">
|
||||||
<el-switch
|
<el-switch
|
||||||
v-model="tableStore.table.params.dataType"
|
v-model="tableStore.table.params.dataType"
|
||||||
inline-prompt
|
inline-prompt
|
||||||
active-value="1"
|
active-value="1"
|
||||||
inactive-value="0"
|
inactive-value="0"
|
||||||
active-text="超标数据"
|
active-text="超标数据"
|
||||||
inactive-text="无数据"
|
inactive-text="无数据"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="预警阈值">
|
<el-form-item label="预警阈值">
|
||||||
<!-- <el-input v-model="tableStore.table.params.alertThreshold" placeholder="请输入预警阈值" clearable></el-input> -->
|
<!-- <el-input v-model="tableStore.table.params.alertThreshold" placeholder="请输入预警阈值" clearable></el-input> -->
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="tableStore.table.params.alertThreshold"
|
v-model="tableStore.table.params.alertThreshold"
|
||||||
:min="0"
|
:min="0"
|
||||||
:step="1"
|
:step="1"
|
||||||
step-strictly
|
step-strictly
|
||||||
@change="changeAlert"
|
@change="changeAlert"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="告警阈值">
|
<el-form-item label="告警阈值">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="tableStore.table.params.alarmThreshold"
|
v-model="tableStore.table.params.alarmThreshold"
|
||||||
:min="0"
|
:min="0"
|
||||||
:step="1"
|
:step="1"
|
||||||
step-strictly
|
step-strictly
|
||||||
@change="changeAlarm"
|
@change="changeAlarm"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="搜索">
|
<!-- <el-form-item label="搜索">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="tableStore.table.params.searchValue"
|
v-model="tableStore.table.params.searchValue"
|
||||||
placeholder="输入变电站、终端、监测点名称"
|
placeholder="输入变电站、终端、监测点名称"
|
||||||
clearable
|
clearable
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Plus" :disabled="flag != '2'" type="primary" @click="launch('发起预警单')">
|
<el-button icon="el-icon-Plus" :disabled="flag != '2'" type="primary" @click="launch('发起预警单')">
|
||||||
发起预警单
|
发起预警单
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button icon="el-icon-Plus" :disabled="flag != '2'" type="primary" @click="launch('发起告警单')">
|
<el-button icon="el-icon-Plus" :disabled="flag != '2'" type="primary" @click="launch('发起告警单')">
|
||||||
发起告警单
|
发起告警单
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef"/>
|
||||||
<!-- /告警单 -->
|
<!-- /告警单 -->
|
||||||
<alarmList ref="alarmListRef" @onSubmit="tableStore.index()" />
|
<alarmList ref="alarmListRef" @onSubmit="tableStore.index()"/>
|
||||||
<!-- 详情 -->
|
<!-- 详情 -->
|
||||||
<detail ref="detailRef" />
|
<detail ref="detailRef"/>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
import {ref, onMounted, provide, nextTick} from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Area from '@/components/form/area/index.vue'
|
import Area from '@/components/form/area/index.vue'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import {ElMessage, ElMessageBox} from 'element-plus'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import {useDictData} from '@/stores/dictData'
|
||||||
import alarmList from './form/alarmList.vue'
|
import alarmList from './form/alarmList.vue'
|
||||||
import detail from './form/detail.vue'
|
import detail from './form/detail.vue'
|
||||||
|
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
import { useRouter } from 'vue-router'
|
import {useRouter} from 'vue-router'
|
||||||
|
|
||||||
const router = useRouter() // 路由对象
|
const router = useRouter() // 路由对象
|
||||||
//字典获取超标指标
|
//字典获取超标指标
|
||||||
const exceeded = dictData.getBasicData('Steady_Statis')
|
const exceeded = dictData.getBasicData('Steady_Statis')
|
||||||
@@ -98,221 +100,223 @@ const alarmListRef = ref()
|
|||||||
const flagTime = ref(false)
|
const flagTime = ref(false)
|
||||||
const detailRef = ref()
|
const detailRef = ref()
|
||||||
const list: any = ref({
|
const list: any = ref({
|
||||||
deptId: '',
|
deptId: '',
|
||||||
searchBeginTime: '',
|
searchBeginTime: '',
|
||||||
searchEndTime: '',
|
searchEndTime: '',
|
||||||
alertThreshold: '',
|
alertThreshold: '',
|
||||||
alarmThreshold: ''
|
alarmThreshold: ''
|
||||||
})
|
})
|
||||||
const level: any = ref(dictData.state.area[0]?.level)
|
const level: any = ref(dictData.state.area[0]?.level)
|
||||||
const flag: any = ref('')
|
const flag: any = ref('')
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/supervision-boot/onlineMonitor/list',
|
url: '/supervision-boot/onlineMonitor/list',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
// isWebPaging:true,
|
// isWebPaging:true,
|
||||||
column: [
|
column: [
|
||||||
{ title: '', type: 'checkbox', width: 40 },
|
{title: '', type: 'checkbox', width: 40},
|
||||||
{
|
{
|
||||||
title: '序号',
|
title: '序号',
|
||||||
type: 'seq',
|
type: 'seq',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 60,
|
width: 60,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
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
|
|
||||||
},
|
},
|
||||||
loadCallback: () => {
|
{field: 'dept', title: '负责单位'},
|
||||||
// tableStore.table.data = [
|
{field: 'substation', title: '变电站名称'},
|
||||||
// {
|
{field: 'deviceName', title: '终端名称'},
|
||||||
// orgName: '张家口',
|
{field: 'lineName', title: '监测点名称'},
|
||||||
// subName: '110kV马头山风电场',
|
|
||||||
// lineName: '111口头线',
|
{
|
||||||
// voltageScale: '110kV',
|
field: 'businessType',
|
||||||
// overDay: '20',
|
title: '监测对象类型',
|
||||||
// overDays: '10'
|
|
||||||
|
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
|
||||||
// },
|
// },
|
||||||
// {
|
// icon: 'el-icon-EditPen',
|
||||||
// orgName: '张家口',
|
// render: 'basicButton',
|
||||||
// subName: '110kV韩家庄风电场',
|
|
||||||
// lineName: '111缘韩一线',
|
// click: async row => {
|
||||||
// voltageScale: '110kV',
|
// // handleWarningAlarmFlag(row).then(res => {
|
||||||
// overDay: '20',
|
// // console.log(res)
|
||||||
// overDays: '16'
|
// // 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.alertThreshold = 5
|
||||||
tableStore.table.params.alarmThreshold = 5
|
tableStore.table.params.alarmThreshold = 5
|
||||||
@@ -324,50 +328,50 @@ tableStore.table.params.dataType = '1'
|
|||||||
tableStore.table.params.deptId = dictData.state.area[0].id
|
tableStore.table.params.deptId = dictData.state.area[0].id
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
TableHeaderRef.value.setDatePicker([{ label: '月', value: 3 }])
|
TableHeaderRef.value.setDatePicker([{label: '月', value: 3}])
|
||||||
|
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
TableHeaderRef.value.showSelectChange()
|
TableHeaderRef.value.showSelectChange()
|
||||||
}, 10)
|
}, 10)
|
||||||
})
|
})
|
||||||
|
|
||||||
const changeAlert = e => {
|
const changeAlert = e => {
|
||||||
if (e == null) {
|
if (e == null) {
|
||||||
tableStore.table.params.alertThreshold = 5
|
tableStore.table.params.alertThreshold = 5
|
||||||
} else {
|
} else {
|
||||||
if (e > tableStore.table.params.alarmThreshold) {
|
if (e > tableStore.table.params.alarmThreshold) {
|
||||||
ElMessage.warning('预警阈值不能大于报警阈值')
|
ElMessage.warning('预警阈值不能大于报警阈值')
|
||||||
tableStore.table.params.alertThreshold = 5
|
tableStore.table.params.alertThreshold = 5
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
const changeAlarm = e => {
|
const changeAlarm = e => {
|
||||||
if (e == null) {
|
if (e == null) {
|
||||||
tableStore.table.params.alarmThreshold = 5
|
tableStore.table.params.alarmThreshold = 5
|
||||||
} else {
|
} else {
|
||||||
if (e < tableStore.table.params.alertThreshold) {
|
if (e < tableStore.table.params.alertThreshold) {
|
||||||
ElMessage.warning('报警阈值不能小于预警阈值')
|
ElMessage.warning('报警阈值不能小于预警阈值')
|
||||||
tableStore.table.params.alarmThreshold = 5
|
tableStore.table.params.alarmThreshold = 5
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// 发起预警单
|
// 发起预警单
|
||||||
const launch = (title: string) => {
|
const launch = (title: string) => {
|
||||||
if (tableStore.table.selection.length == 0) {
|
if (tableStore.table.selection.length == 0) {
|
||||||
ElMessage.warning('请选择一条数据')
|
ElMessage.warning('请选择一条数据')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
alarmListRef.value.open({
|
alarmListRef.value.open({
|
||||||
text: title,
|
text: title,
|
||||||
form: list.value,
|
form: list.value,
|
||||||
row: tableStore.table.selection
|
row: tableStore.table.selection
|
||||||
})
|
})
|
||||||
console.log('🚀 ~ launch ~ list.value:', list.value)
|
console.log('🚀 ~ launch ~ list.value:', list.value)
|
||||||
}
|
}
|
||||||
const changeArea = e => {
|
const changeArea = e => {
|
||||||
level.value = e.data.level
|
level.value = e.data.level
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -1,37 +1,38 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- <div> 普测结果 发起预告警单</div> -->
|
<!-- <div> 普测结果 发起预告警单</div> -->
|
||||||
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="计划名称">
|
<el-form-item label="计划名称">
|
||||||
<el-input
|
<el-input
|
||||||
style="width: 200px"
|
style="width: 200px"
|
||||||
v-model="tableStore.table.params.searchValue"
|
v-model="tableStore.table.params.searchValue"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请输入计划名称"
|
placeholder="请输入计划名称"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef"/>
|
||||||
<testQuestionsForm ref="testQuestionsFormRef" />
|
<testQuestionsForm ref="testQuestionsFormRef"/>
|
||||||
<!-- 详情 -->
|
<!-- 详情 -->
|
||||||
<el-dialog draggable v-model="dialogVisible" v-if="dialogVisible" title="详情" width="1000">
|
<el-dialog draggable v-model="dialogVisible" v-if="dialogVisible" title="详情" width="1000">
|
||||||
<detail :id="detailId" :flag="false"/>
|
<detail :id="detailId" :flag="false"/>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
import {ref, onMounted, provide, nextTick} from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import testQuestionsForm from './form/testQuestionsForm.vue'
|
import testQuestionsForm from './form/testQuestionsForm.vue'
|
||||||
import { initiateWarningLeaflet } from '@/api/supervision-boot/survey/test'
|
import {initiateWarningLeaflet} from '@/api/supervision-boot/survey/test'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import {ElMessage, ElMessageBox} from 'element-plus'
|
||||||
import { useRouter } from 'vue-router'
|
import {useRouter} from 'vue-router'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import {useDictData} from '@/stores/dictData'
|
||||||
import detail from '@/views/pqs/supervise/harmonicSurvey/test/detail.vue'
|
import detail from '@/views/pqs/supervise/harmonicSurvey/test/detail.vue'
|
||||||
|
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const { push } = useRouter()
|
const {push} = useRouter()
|
||||||
const router = useRouter() // 路由对象
|
const router = useRouter() // 路由对象
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
@@ -39,118 +40,119 @@ const dialogVisible = ref(false)
|
|||||||
const detailId = ref('')
|
const detailId = ref('')
|
||||||
const testQuestionsFormRef = ref()
|
const testQuestionsFormRef = ref()
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/supervision-boot/surveyTest/pageProblemSurvey',
|
url: '/supervision-boot/surveyTest/pageProblemSurvey',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
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: '序号',
|
name: 'edit',
|
||||||
type: 'seq',
|
title: '详情',
|
||||||
align: 'center',
|
type: 'primary',
|
||||||
width: 60,
|
icon: 'el-icon-Open',
|
||||||
formatter: (row: any) => {
|
render: 'basicButton',
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
|
||||||
}
|
click: async row => {
|
||||||
},
|
dialogVisible.value = true
|
||||||
{ field: 'planName', title: '计划名称', minWidth: 120 },
|
detailId.value = row.id
|
||||||
{ 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: '操作',
|
name: 'edit',
|
||||||
minWidth: '180',
|
title: '发起告警单',
|
||||||
align: 'center',
|
type: 'warning',
|
||||||
render: 'buttons',
|
icon: 'el-icon-Open',
|
||||||
fixed: 'right',
|
render: 'basicButton',
|
||||||
buttons: [
|
disabled: row => {
|
||||||
{
|
return row.initiateWarningFlag == 1
|
||||||
name: 'edit',
|
},
|
||||||
title: '详情',
|
|
||||||
type: 'primary',
|
|
||||||
icon: 'el-icon-Open',
|
|
||||||
render: 'basicButton',
|
|
||||||
|
|
||||||
click: async row => {
|
click: async row => {
|
||||||
dialogVisible.value = true
|
const {value} = await ElMessageBox.prompt('', '整改意见', {
|
||||||
detailId.value = row.id
|
confirmButtonText: '确定',
|
||||||
}
|
cancelButtonText: '取消',
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'edit',
|
|
||||||
title: '发起告警单',
|
|
||||||
type: 'warning',
|
|
||||||
icon: 'el-icon-Open',
|
|
||||||
render: 'basicButton',
|
|
||||||
disabled: row => {
|
|
||||||
return row.initiateWarningFlag == 1
|
|
||||||
},
|
|
||||||
|
|
||||||
click: async row => {
|
inputType: 'textarea',
|
||||||
const { value } = await ElMessageBox.prompt('', '整改意见', {
|
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||||
confirmButtonText: '确定',
|
inputErrorMessage: '请输入整改意见'
|
||||||
cancelButtonText: '取消',
|
})
|
||||||
|
initiateWarningLeaflet({id: row.id, reformAdvice: value}).then(res => {
|
||||||
inputType: 'textarea',
|
ElMessage.success('发起告警成功!')
|
||||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
tableStore.index()
|
||||||
inputErrorMessage: '请输入整改意见'
|
})
|
||||||
})
|
}
|
||||||
initiateWarningLeaflet({ id: row.id, reformAdvice: value }).then(res => {
|
},
|
||||||
ElMessage.success('发起告警成功!')
|
{
|
||||||
tableStore.index()
|
name: 'edit',
|
||||||
})
|
title: '查看告警单',
|
||||||
}
|
type: 'primary',
|
||||||
},
|
icon: 'el-icon-Open',
|
||||||
{
|
render: 'basicButton',
|
||||||
name: 'edit',
|
disabled: row => {
|
||||||
title: '查看告警单',
|
return row.initiateWarningFlag == 0
|
||||||
type: 'primary',
|
},
|
||||||
icon: 'el-icon-Open',
|
click: row => {
|
||||||
render: 'basicButton',
|
router.push({
|
||||||
disabled: row => {
|
name: 'supervision/supervision/manage',
|
||||||
return row.initiateWarningFlag == 0
|
query: {
|
||||||
},
|
type: 1,
|
||||||
click: row => {
|
t: Date.now()
|
||||||
router.push({
|
}
|
||||||
name: 'supervision/supervision/manage',
|
})
|
||||||
state: {
|
}
|
||||||
type: 1
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
beforeSearchFun: () => {
|
|
||||||
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
beforeSearchFun: () => {
|
||||||
|
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
||||||
|
}
|
||||||
})
|
})
|
||||||
tableStore.table.params.searchValue = ''
|
tableStore.table.params.searchValue = ''
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发起告警单
|
* 发起告警单
|
||||||
*/
|
*/
|
||||||
const initiateAlarm = async (id: string) => {
|
const initiateAlarm = async (id: string) => {
|
||||||
await initiateWarningLeaflet(id)
|
await initiateWarningLeaflet(id)
|
||||||
ElMessage.success('发起告警成功!')
|
ElMessage.success('发起告警成功!')
|
||||||
// 加载数据
|
// 加载数据
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -1,244 +1,246 @@
|
|||||||
<!---试运行列表-->
|
<!---试运行列表-->
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="流程状态">
|
<el-form-item label="流程状态">
|
||||||
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in statusSelect"
|
v-for="item in statusSelect"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
<Table ref="tableRef" :checkbox-config="checkboxConfig"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, reactive } from 'vue'
|
import {ref, onMounted, provide, reactive} from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { useRouter } from 'vue-router'
|
import {useRouter} from 'vue-router'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import {useDictData} from '@/stores/dictData'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import {ElMessage, ElMessageBox} from 'element-plus'
|
||||||
import { addRunTest, initiateWarningLeaflet } from '@/api/supervision-boot/lineRunTest'
|
import {addRunTest, initiateWarningLeaflet} from '@/api/supervision-boot/lineRunTest'
|
||||||
import { formatDate } from '@/utils/formatTime'
|
import {formatDate} from '@/utils/formatTime'
|
||||||
import { VxeTablePropTypes } from 'vxe-table'
|
import {VxeTablePropTypes} from 'vxe-table'
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import {useAdminInfo} from '@/stores/adminInfo'
|
||||||
import { getFileNameAndFilePath } from '@/api/system-boot/file'
|
import {getFileNameAndFilePath} from '@/api/system-boot/file'
|
||||||
|
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const statusSelect = dictData.statusSelect()
|
const statusSelect = dictData.statusSelect()
|
||||||
const { push } = useRouter()
|
const {push} = useRouter()
|
||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
|
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/supervision-boot/lineRunTestProblem/pageProblem',
|
url: '/supervision-boot/lineRunTestProblem/pageProblem',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
column: [
|
column: [
|
||||||
{ field: 'lineName', title: '监测点名称', minWidth: 160 },
|
{field: 'lineName', title: '监测点名称', minWidth: 160},
|
||||||
{ field: 'connectedBus', title: '接入母线', minWidth: 160 },
|
{field: 'connectedBus', title: '接入母线', minWidth: 160},
|
||||||
// { field: 'monitoringTerminalCode', title: '终端编号', minWidth: 140 },
|
// { field: 'monitoringTerminalCode', title: '终端编号', minWidth: 140 },
|
||||||
{ field: 'monitoringTerminalName', title: '终端名称', minWidth: 140 },
|
{field: 'monitoringTerminalName', title: '终端名称', minWidth: 140},
|
||||||
{ field: 'powerSubstationName', title: '变电站', minWidth: 160 },
|
{field: 'powerSubstationName', title: '变电站', minWidth: 160},
|
||||||
{ field: 'reason', 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',
|
name: 'edit',
|
||||||
title: '试运行状态',
|
title: '发起告警单',
|
||||||
minWidth: 100,
|
type: 'warning',
|
||||||
render: 'tag',
|
icon: 'el-icon-Open',
|
||||||
custom: {
|
render: 'basicButton',
|
||||||
0: 'primary',
|
disabled: row => {
|
||||||
2: 'success',
|
return row.problemType != null
|
||||||
3: 'danger',
|
},
|
||||||
1: 'warning'
|
|
||||||
},
|
click: async row => {
|
||||||
replaceValue: {
|
const {value} = await ElMessageBox.prompt('', '整改意见', {
|
||||||
0: '待试运行',
|
confirmButtonText: '确定',
|
||||||
1: '试运行中',
|
cancelButtonText: '取消',
|
||||||
2: '试运行成功',
|
|
||||||
3: '试运行失败',
|
inputType: 'textarea',
|
||||||
null: '待试运行'
|
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',
|
name: 'edit',
|
||||||
title: '试运行时间范围',
|
title: '查看告警单',
|
||||||
minWidth: 200,
|
type: 'primary',
|
||||||
formatter: row => {
|
icon: 'el-icon-Open',
|
||||||
return row.cellValue ? row.cellValue : '/'
|
render: 'basicButton',
|
||||||
}
|
disabled: row => {
|
||||||
},
|
return row.problemType == null
|
||||||
{ field: 'problemReason', title: '试运行评估问题', minWidth: 200 },
|
},
|
||||||
{
|
click: row => {
|
||||||
field: 'createBy',
|
push({
|
||||||
title: '填报人',
|
name: 'supervision/supervision/manage',
|
||||||
minWidth: 100,
|
query: {
|
||||||
formatter: (row: any) => {
|
type: 1,
|
||||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
t: Date.now()
|
||||||
}
|
}
|
||||||
},
|
})
|
||||||
{
|
}
|
||||||
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
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
|
|
||||||
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 = ''
|
tableStore.table.params.status = ''
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
const checkboxConfig = reactive<VxeTablePropTypes.CheckboxConfig>({
|
const checkboxConfig = reactive<VxeTablePropTypes.CheckboxConfig>({
|
||||||
labelField: '',
|
labelField: '',
|
||||||
checkMethod: ({ row }) => {
|
checkMethod: ({row}) => {
|
||||||
return !(row.testRunState == 1 || row.testRunState == 2)
|
return !(row.testRunState == 1 || row.testRunState == 2)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
/** 处理审批按钮 */
|
/** 处理审批按钮 */
|
||||||
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
||||||
push({
|
push({
|
||||||
name: 'BpmProcessInstanceDetail',
|
name: 'BpmProcessInstanceDetail',
|
||||||
state: {
|
state: {
|
||||||
id: instanceId,
|
id: instanceId,
|
||||||
historyInstanceId
|
historyInstanceId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 下载报告
|
// 下载报告
|
||||||
const downloadTheReport = (url: string) => {
|
const downloadTheReport = (url: string) => {
|
||||||
getFileNameAndFilePath({ filePath: url }).then((res: any) => {
|
getFileNameAndFilePath({filePath: url}).then((res: any) => {
|
||||||
const link = document.createElement('a')
|
const link = document.createElement('a')
|
||||||
link.href = res.data.url
|
link.href = res.data.url
|
||||||
link.download = res.data.name
|
link.download = res.data.name
|
||||||
document.body.appendChild(link)
|
document.body.appendChild(link)
|
||||||
link.click()
|
link.click()
|
||||||
document.body.removeChild(link)
|
document.body.removeChild(link)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const runTestSubmit = (type: number) => {
|
const runTestSubmit = (type: number) => {
|
||||||
const start = new Date()
|
const start = new Date()
|
||||||
start.setDate(start.getDate() + 1)
|
start.setDate(start.getDate() + 1)
|
||||||
start.setHours(0, 0, 0)
|
start.setHours(0, 0, 0)
|
||||||
|
|
||||||
const end = new Date()
|
const end = new Date()
|
||||||
end.setDate(end.getDate() + 3)
|
end.setDate(end.getDate() + 3)
|
||||||
end.setHours(23, 59, 59)
|
end.setHours(23, 59, 59)
|
||||||
const startString = formatDate(start, 'YYYY-MM-DD') // 转换为 YYYY-MM-DD 格式
|
const startString = formatDate(start, 'YYYY-MM-DD') // 转换为 YYYY-MM-DD 格式
|
||||||
const endString = formatDate(end, 'YYYY-MM-DD')
|
const endString = formatDate(end, 'YYYY-MM-DD')
|
||||||
const data = {
|
const data = {
|
||||||
startTime: startString,
|
startTime: startString,
|
||||||
endTime: endString,
|
endTime: endString,
|
||||||
lineIds: monitorIds,
|
lineIds: monitorIds,
|
||||||
operateType: type
|
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>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -1,56 +1,58 @@
|
|||||||
<template>
|
<template>
|
||||||
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="监督类型">
|
<el-form-item label="监督类型">
|
||||||
<el-select v-model="tableStore.table.params.supvType" clearable placeholder="请选择流程状态">
|
<el-select v-model="tableStore.table.params.supvType" clearable placeholder="请选择流程状态">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in supvTypeOptionList"
|
v-for="item in supvTypeOptionList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="流程状态">
|
<el-form-item label="流程状态">
|
||||||
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in statusSelect"
|
v-for="item in statusSelect"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新增计划</el-button>
|
<el-button icon="el-icon-Plus" type="primary" @click="add">新增计划</el-button>
|
||||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" :checkbox-config="checkboxConfig"/>
|
<Table ref="tableRef" :checkbox-config="checkboxConfig"/>
|
||||||
<!-- 新增 -->
|
<!-- 新增 -->
|
||||||
<planAdd ref="planAddRef" @onsubmit="tableStore.index()" :openType="openType" />
|
<planAdd ref="planAddRef" @onsubmit="tableStore.index()" :openType="openType"/>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import {useAdminInfo} from '@/stores/adminInfo'
|
||||||
//获取登陆用户姓名和部门
|
//获取登陆用户姓名和部门
|
||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
import { ref, onMounted, provide, watch } from 'vue'
|
import {ref, onMounted, provide, watch, nextTick} from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import {ElMessage, ElMessageBox} from 'element-plus'
|
||||||
import { cancel } from '@/api/process-boot/generalTest'
|
import {cancel, getById} from '@/api/process-boot/generalTest'
|
||||||
import planAdd from './planAdd.vue'
|
import planAdd from './planAdd.vue'
|
||||||
import { useRouter } from 'vue-router'
|
import {useRouter} from 'vue-router'
|
||||||
import { queryPlan, removeSurvey } from '@/api/process-boot/generalTest'
|
import {queryPlan, removeSurvey} from '@/api/process-boot/generalTest'
|
||||||
import { getUserByRoleType } from '@/api/user-boot/user'
|
import {getUserByRoleType} from '@/api/user-boot/user'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import {useDictData} from '@/stores/dictData'
|
||||||
import { deleteSurveyPlan } from '@/api/supervision-boot/delete/index'
|
import {deleteSurveyPlan} from '@/api/supervision-boot/delete/index'
|
||||||
|
import {getUserReportById} from "@/api/supervision-boot/interfere";
|
||||||
|
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const supvTypeOptionList = dictData.getBasicData('supv_type')
|
const supvTypeOptionList = dictData.getBasicData('supv_type')
|
||||||
const statusSelect = dictData.statusSelect()
|
const statusSelect = dictData.statusSelect()
|
||||||
const { push, options, currentRoute } = useRouter()
|
const {push, options, currentRoute} = useRouter()
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
const planAddRef = ref()
|
const planAddRef = ref()
|
||||||
@@ -60,153 +62,153 @@ const auditUser = ref('')
|
|||||||
const flag = ref(false)
|
const flag = ref(false)
|
||||||
const openType = ref('create')
|
const openType = ref('create')
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/supervision-boot/surveyPlan/surveyPlanPage',
|
url: '/supervision-boot/surveyPlan/surveyPlanPage',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
width: '60',
|
width: '60',
|
||||||
type: 'checkbox'
|
type: 'checkbox'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '序号',
|
title: '序号',
|
||||||
width: 60,
|
width: 60,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'planName',
|
field: 'planName',
|
||||||
title: '计划名称',
|
title: '计划名称',
|
||||||
minWidth: 130
|
minWidth: 130
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'supvType',
|
field: 'supvType',
|
||||||
title: '监督类型',
|
title: '监督类型',
|
||||||
minWidth: 130,
|
minWidth: 130,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return supvTypeOptionList.filter(item => item.id === row.cellValue)[0]?.name
|
return supvTypeOptionList.filter(item => item.id === row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'supvObjectName',
|
field: 'supvObjectName',
|
||||||
minWidth: 130,
|
minWidth: 130,
|
||||||
title: '监督对象名称'
|
title: '监督对象名称'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'deptName',
|
field: 'deptName',
|
||||||
minWidth: 130,
|
minWidth: 130,
|
||||||
title: '负责单位'
|
title: '负责单位'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'substation',
|
field: 'substation',
|
||||||
title: '变电站',
|
title: '变电站',
|
||||||
minWidth: 110,
|
minWidth: 110,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue
|
return row.cellValue
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{ field: 'planStartTime', minWidth: 130, title: '计划开始时间' },
|
{field: 'planStartTime', minWidth: 130, title: '计划开始时间'},
|
||||||
{ field: 'planEndTime', 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',
|
name: 'productSetting',
|
||||||
title: '流程状态',
|
title: '流程详情',
|
||||||
render: 'tag',
|
type: 'primary',
|
||||||
minWidth: 80,
|
icon: 'el-icon-EditPen',
|
||||||
custom: {
|
render: 'basicButton',
|
||||||
0: 'warning',
|
disabled: row => {
|
||||||
1: 'primary',
|
return !row.processInstanceId
|
||||||
2: 'success',
|
},
|
||||||
3: 'danger',
|
click: row => {
|
||||||
4: 'warning'
|
flag.value = true
|
||||||
},
|
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||||
replaceValue: {
|
}
|
||||||
0: '待提交审批',
|
|
||||||
1: '审批中',
|
|
||||||
2: '审批通过',
|
|
||||||
3: '审批不通过',
|
|
||||||
4: '已取消'
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'createBy',
|
name: 'edit',
|
||||||
title: '填报人',
|
title: '编辑',
|
||||||
minWidth: 80,
|
type: 'primary',
|
||||||
formatter: (row: any) => {
|
icon: 'el-icon-Open',
|
||||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
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: '操作',
|
name: 'edit',
|
||||||
minWidth: '180',
|
title: '重新发起',
|
||||||
fixed: 'right',
|
type: 'warning',
|
||||||
render: 'buttons',
|
icon: 'el-icon-Open',
|
||||||
buttons: [
|
render: 'basicButton',
|
||||||
{
|
disabled: row => {
|
||||||
name: 'productSetting',
|
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
||||||
title: '流程详情',
|
},
|
||||||
type: 'primary',
|
click: row => {
|
||||||
icon: 'el-icon-EditPen',
|
// deviceQuitPopup.value.open('重新发起退运', row)
|
||||||
render: 'basicButton',
|
planAddRef.value.open('重新发起计划', row.id, false)
|
||||||
disabled: row => {
|
}
|
||||||
return !row.processInstanceId
|
},
|
||||||
},
|
{
|
||||||
click: row => {
|
name: 'cancel',
|
||||||
flag.value = true
|
title: '取消',
|
||||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
type: 'danger',
|
||||||
}
|
icon: 'el-icon-Open',
|
||||||
},
|
render: 'basicButton',
|
||||||
{
|
disabled: row => {
|
||||||
name: 'edit',
|
return row.createBy != adminInfo.$state.id || row.status != 1
|
||||||
title: '编辑',
|
},
|
||||||
type: 'primary',
|
click: row => {
|
||||||
icon: 'el-icon-Open',
|
cancelLeave(row)
|
||||||
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)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
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 = ''
|
tableStore.table.params.status = ''
|
||||||
@@ -214,108 +216,121 @@ tableStore.table.params.supvType = ''
|
|||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
// 新增计划
|
// 新增计划
|
||||||
const add = () => {
|
const add = () => {
|
||||||
// title.value = '普测计划新增'
|
// title.value = '普测计划新增'
|
||||||
planAddRef.value.open('计划新增')
|
planAddRef.value.open('计划新增')
|
||||||
}
|
}
|
||||||
// 禁止点击
|
// 禁止点击
|
||||||
const checkboxConfig = reactive({
|
const checkboxConfig = reactive({
|
||||||
checkMethod: ({ row }) => {
|
checkMethod: ({row}) => {
|
||||||
return adminInfo.roleCode.includes('delete_info')
|
return adminInfo.roleCode.includes('delete_info')
|
||||||
? true
|
? true
|
||||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const deleteEven = () => {
|
const deleteEven = () => {
|
||||||
if (tableStore.table.selection.length == 0) {
|
if (tableStore.table.selection.length == 0) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
message: '请选择要删除的数据'
|
message: '请选择要删除的数据'
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
deleteSurveyPlan(tableStore.table.selection.map(item => item.id)).then(res => {
|
deleteSurveyPlan(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: '删除成功!'
|
message: '删除成功!'
|
||||||
})
|
})
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const exportFn = () => {
|
const exportFn = () => {
|
||||||
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
||||||
form.pageNum = 1
|
form.pageNum = 1
|
||||||
form.pageSize = tableStore.table.total
|
form.pageSize = tableStore.table.total
|
||||||
queryPlan(form).then(res => {
|
queryPlan(form).then(res => {
|
||||||
tableRef.value.getRef().exportData({
|
tableRef.value.getRef().exportData({
|
||||||
filename: '计划', // 文件名字
|
filename: '计划', // 文件名字
|
||||||
sheetName: 'Sheet1',
|
sheetName: 'Sheet1',
|
||||||
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
||||||
useStyle: true,
|
useStyle: true,
|
||||||
data: res.data.records, // 数据源 // 过滤那个字段导出
|
data: res.data.records, // 数据源 // 过滤那个字段导出
|
||||||
columnFilterMethod: function (column: any) {
|
columnFilterMethod: function (column: any) {
|
||||||
return !(column.$columnIndex === 0)
|
return !(column.$columnIndex === 0)
|
||||||
}
|
}
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/**取消流程操作*/
|
/**取消流程操作*/
|
||||||
const cancelLeave = async (row: any) => {
|
const cancelLeave = async (row: any) => {
|
||||||
// 二次确认
|
// 二次确认
|
||||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
const {value} = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
inputType: 'textarea',
|
inputType: 'textarea',
|
||||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||||
inputErrorMessage: '取消原因不能为空'
|
inputErrorMessage: '取消原因不能为空'
|
||||||
})
|
})
|
||||||
// 发起取消
|
// 发起取消
|
||||||
let data = {
|
let data = {
|
||||||
id: row.id,
|
id: row.id,
|
||||||
processInstanceId: row.processInstanceId,
|
processInstanceId: row.processInstanceId,
|
||||||
reason: value
|
reason: value
|
||||||
}
|
}
|
||||||
await cancel(data)
|
await cancel(data)
|
||||||
ElMessage.success('取消成功')
|
ElMessage.success('取消成功')
|
||||||
// 加载数据
|
// 加载数据
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
auditUser.value = ''
|
auditUser.value = ''
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 处理审批按钮 */
|
/** 处理审批按钮 */
|
||||||
const handleAudit = (instanceId: string, historyInstanceId: string) => {
|
const handleAudit = (instanceId: string, historyInstanceId: string) => {
|
||||||
push({
|
push({
|
||||||
name: 'BpmProcessInstanceDetail',
|
name: 'BpmProcessInstanceDetail',
|
||||||
state: {
|
state: {
|
||||||
id: instanceId,
|
id: instanceId,
|
||||||
historyInstanceId
|
historyInstanceId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 取消
|
// 取消
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
getUserByRoleType(3).then(res => {
|
getUserByRoleType(3).then(res => {
|
||||||
auditList.value = res.data
|
auditList.value = res.data
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
watch(
|
watch(
|
||||||
() => currentRoute.value.path,
|
() => currentRoute.value.path,
|
||||||
() => {
|
() => {
|
||||||
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
flag.value = false
|
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>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -1,54 +1,54 @@
|
|||||||
<template>
|
<template>
|
||||||
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="监督类型">
|
<el-form-item label="监督类型">
|
||||||
<el-select v-model="tableStore.table.params.supvType" clearable placeholder="请选择流程状态">
|
<el-select v-model="tableStore.table.params.supvType" clearable placeholder="请选择流程状态">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in supvTypeOptionList"
|
v-for="item in supvTypeOptionList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="流程状态">
|
<el-form-item label="流程状态">
|
||||||
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in statusSelect"
|
v-for="item in statusSelect"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
<Table ref="tableRef" :checkbox-config="checkboxConfig"/>
|
||||||
<!-- 新增 -->
|
<!-- 新增 -->
|
||||||
<planTest ref="planTestRef" @onsubmit="tableStore.index()" />
|
<planTest ref="planTestRef" @onsubmit="tableStore.index()"/>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
import {ref, onMounted, provide, watch, nextTick} from 'vue'
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import {useAdminInfo} from '@/stores/adminInfo'
|
||||||
//获取登陆用户姓名和部门
|
//获取登陆用户姓名和部门
|
||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import {ElMessage, ElMessageBox} from 'element-plus'
|
||||||
import { cancelTest } from '@/api/process-boot/generalTest'
|
import {cancelTest} from '@/api/process-boot/generalTest'
|
||||||
import planTest from './planTest.vue'
|
import planTest from './planTest.vue'
|
||||||
import { useRouter } from 'vue-router'
|
import {useRouter} from 'vue-router'
|
||||||
import { deleteSurveyPlanTest } from '@/api/supervision-boot/delete/index'
|
import {deleteSurveyPlanTest} from '@/api/supervision-boot/delete/index'
|
||||||
import { queryPlan, removeSurvey } from '@/api/process-boot/generalTest'
|
import {queryPlan, removeSurvey} from '@/api/process-boot/generalTest'
|
||||||
import { getUserByRoleType } from '@/api/user-boot/user'
|
import {getUserByRoleType} from '@/api/user-boot/user'
|
||||||
|
|
||||||
const { push } = useRouter()
|
const {push} = useRouter()
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
import { useDictData } from '@/stores/dictData'
|
import {useDictData} from '@/stores/dictData'
|
||||||
|
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const supvTypeOptionList = dictData.getBasicData('supv_type')
|
const supvTypeOptionList = dictData.getBasicData('supv_type')
|
||||||
@@ -59,169 +59,169 @@ const TableHeaderRef = ref()
|
|||||||
const auditList: any = ref([])
|
const auditList: any = ref([])
|
||||||
|
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/supervision-boot/surveyTest/surveyTestPage',
|
url: '/supervision-boot/surveyTest/surveyTestPage',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
width: '60',
|
width: '60',
|
||||||
type: 'checkbox'
|
type: 'checkbox'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '序号',
|
title: '序号',
|
||||||
width: 60,
|
width: 60,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'planName', title: '计划名称', minWidth: 140 },
|
{field: 'planName', title: '计划名称', minWidth: 140},
|
||||||
{
|
{
|
||||||
field: 'supvType',
|
field: 'supvType',
|
||||||
title: '监督类型',
|
title: '监督类型',
|
||||||
minWidth: 130,
|
minWidth: 130,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return supvTypeOptionList.filter(item => item.id === row.cellValue)[0]?.name
|
return supvTypeOptionList.filter(item => item.id === row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'supvObjectName',
|
field: 'supvObjectName',
|
||||||
minWidth: 130,
|
minWidth: 130,
|
||||||
title: '监督对象名称'
|
title: '监督对象名称'
|
||||||
},
|
},
|
||||||
{ field: 'substationName', title: '变电站', minWidth: 140 },
|
{field: 'substationName', title: '变电站', minWidth: 140},
|
||||||
{ field: 'planStartTime', title: '计划开始时间', minWidth: 140 },
|
{field: 'planStartTime', title: '计划开始时间', minWidth: 140},
|
||||||
{ field: 'planEndTime', title: '计划结束时间', minWidth: 140 },
|
{field: 'planEndTime', title: '计划结束时间', minWidth: 140},
|
||||||
{
|
{
|
||||||
field: 'problemFlag',
|
field: 'problemFlag',
|
||||||
title: '是否存在问题',
|
title: '是否存在问题',
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
0: 'success',
|
0: 'success',
|
||||||
1: 'danger',
|
1: 'danger',
|
||||||
null: 'primary'
|
null: 'primary'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '合格',
|
0: '合格',
|
||||||
1: '存在问题',
|
1: '存在问题',
|
||||||
null: '待测试'
|
null: '待测试'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'deptName', title: '负责单位', minWidth: 140 },
|
{field: 'deptName', title: '负责单位', minWidth: 140},
|
||||||
{ field: 'completeBy', title: '计划负责人', minWidth: 130 },
|
{field: 'completeBy', title: '计划负责人', minWidth: 130},
|
||||||
{ field: 'completeTime', title: '实际完成时间', minWidth: 140 },
|
{field: 'completeTime', title: '实际完成时间', minWidth: 140},
|
||||||
{
|
{
|
||||||
field: 'status',
|
field: 'status',
|
||||||
title: '流程状态',
|
title: '流程状态',
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
minWidth: 140,
|
minWidth: 140,
|
||||||
custom: {
|
custom: {
|
||||||
0: 'warning',
|
0: 'warning',
|
||||||
|
|
||||||
1: 'primary',
|
1: 'primary',
|
||||||
2: 'success',
|
2: 'success',
|
||||||
3: 'danger',
|
3: 'danger',
|
||||||
4: 'warning'
|
4: 'warning'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '待提交审批',
|
0: '待提交审批',
|
||||||
|
|
||||||
1: '审批中',
|
1: '审批中',
|
||||||
2: '审批通过',
|
2: '审批通过',
|
||||||
3: '审批不通过',
|
3: '审批不通过',
|
||||||
4: '已取消'
|
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',
|
name: 'productSetting',
|
||||||
title: '填报人',
|
title: '流程详情',
|
||||||
minWidth: 120,
|
type: 'primary',
|
||||||
formatter: (row: any) => {
|
icon: 'el-icon-EditPen',
|
||||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
render: 'basicButton',
|
||||||
}
|
disabled: row => {
|
||||||
|
return row.status == 6 || !row.processInstanceId
|
||||||
|
},
|
||||||
|
click: row => {
|
||||||
|
// planTestRef.value.open('查看计划', row)
|
||||||
|
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
name: 'edit',
|
||||||
minWidth: 180,
|
title: '编辑',
|
||||||
render: 'buttons',
|
type: 'primary',
|
||||||
fixed: 'right',
|
icon: 'el-icon-Open',
|
||||||
buttons: [
|
render: 'basicButton',
|
||||||
{
|
showDisabled: row => {
|
||||||
name: 'productSetting',
|
return row.deptId != adminInfo.$state.deptId || !(row.status == 0)
|
||||||
title: '测试填报',
|
},
|
||||||
type: 'primary',
|
disabled: row => {
|
||||||
icon: 'el-icon-EditPen',
|
return !(row.status == 0)
|
||||||
render: 'basicButton',
|
},
|
||||||
disabled: row => {
|
click: row => {
|
||||||
return row.status != 6
|
planTestRef.value.open('编辑', row.id, false)
|
||||||
},
|
}
|
||||||
click: row => {
|
},
|
||||||
add(row.id)
|
{
|
||||||
}
|
name: 'edit',
|
||||||
},
|
title: '重新发起',
|
||||||
{
|
type: 'warning',
|
||||||
name: 'productSetting',
|
icon: 'el-icon-Open',
|
||||||
title: '流程详情',
|
render: 'basicButton',
|
||||||
type: 'primary',
|
disabled: row => {
|
||||||
icon: 'el-icon-EditPen',
|
return row.deptId != adminInfo.$state.deptId || !(row.status == 3 || row.status == 4)
|
||||||
render: 'basicButton',
|
},
|
||||||
disabled: row => {
|
click: row => {
|
||||||
return row.status == 6 || !row.processInstanceId
|
planTestRef.value.open('重新发起计划测试', row.id, false)
|
||||||
},
|
}
|
||||||
click: row => {
|
},
|
||||||
// planTestRef.value.open('查看计划', row)
|
{
|
||||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
name: 'cancel',
|
||||||
}
|
title: '取消',
|
||||||
},
|
type: 'danger',
|
||||||
{
|
icon: 'el-icon-Open',
|
||||||
name: 'edit',
|
render: 'basicButton',
|
||||||
title: '编辑',
|
disabled: row => {
|
||||||
type: 'primary',
|
return row.deptId != adminInfo.$state.deptId || row.status != 1
|
||||||
icon: 'el-icon-Open',
|
},
|
||||||
render: 'basicButton',
|
click: row => {
|
||||||
showDisabled: row => {
|
cancelLeave(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 = ''
|
tableStore.table.params.status = ''
|
||||||
@@ -230,90 +230,102 @@ tableStore.table.params.supvType = ''
|
|||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
// 新增计划
|
// 新增计划
|
||||||
const add = (id: string) => {
|
const add = (id: string) => {
|
||||||
planTestRef.value.open('计划测试填报', id, true)
|
planTestRef.value.open('计划测试填报', id, true)
|
||||||
}
|
}
|
||||||
// 禁止点击
|
// 禁止点击
|
||||||
const checkboxConfig = reactive({
|
const checkboxConfig = reactive({
|
||||||
checkMethod: ({ row }) => {
|
checkMethod: ({row}) => {
|
||||||
return adminInfo.roleCode.includes('delete_info')
|
return adminInfo.roleCode.includes('delete_info')
|
||||||
? true
|
? true
|
||||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const deleteEven = () => {
|
const deleteEven = () => {
|
||||||
if (tableStore.table.selection.length == 0) {
|
if (tableStore.table.selection.length == 0) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
message: '请选择要删除的数据'
|
message: '请选择要删除的数据'
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
deleteSurveyPlanTest(tableStore.table.selection.map(item => item.id)).then(res => {
|
deleteSurveyPlanTest(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: '删除成功!'
|
message: '删除成功!'
|
||||||
})
|
})
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const exportFn = () => {
|
const exportFn = () => {
|
||||||
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
||||||
form.pageNum = 1
|
form.pageNum = 1
|
||||||
form.pageSize = tableStore.table.total
|
form.pageSize = tableStore.table.total
|
||||||
queryPlan(form).then(res => {
|
queryPlan(form).then(res => {
|
||||||
tableRef.value.getRef().exportData({
|
tableRef.value.getRef().exportData({
|
||||||
filename: '计划', // 文件名字
|
filename: '计划', // 文件名字
|
||||||
sheetName: 'Sheet1',
|
sheetName: 'Sheet1',
|
||||||
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
||||||
useStyle: true,
|
useStyle: true,
|
||||||
data: res.data.records, // 数据源 // 过滤那个字段导出
|
data: res.data.records, // 数据源 // 过滤那个字段导出
|
||||||
columnFilterMethod: function (column: any) {
|
columnFilterMethod: function (column: any) {
|
||||||
return !(column.$columnIndex === 0)
|
return !(column.$columnIndex === 0)
|
||||||
}
|
}
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/**取消流程操作*/
|
/**取消流程操作*/
|
||||||
const cancelLeave = async (row: any) => {
|
const cancelLeave = async (row: any) => {
|
||||||
// 二次确认
|
// 二次确认
|
||||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
const {value} = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
inputType: 'textarea',
|
inputType: 'textarea',
|
||||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||||
inputErrorMessage: '取消原因不能为空'
|
inputErrorMessage: '取消原因不能为空'
|
||||||
})
|
})
|
||||||
// 发起取消
|
// 发起取消
|
||||||
let data = {
|
let data = {
|
||||||
id: row.id,
|
id: row.id,
|
||||||
processInstanceId: row.processInstanceId,
|
processInstanceId: row.processInstanceId,
|
||||||
reason: value
|
reason: value
|
||||||
}
|
}
|
||||||
await cancelTest(data)
|
await cancelTest(data)
|
||||||
ElMessage.success('取消成功')
|
ElMessage.success('取消成功')
|
||||||
// 加载数据
|
// 加载数据
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 处理审批按钮 */
|
/** 处理审批按钮 */
|
||||||
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
||||||
push({
|
push({
|
||||||
name: 'BpmProcessInstanceDetail',
|
name: 'BpmProcessInstanceDetail',
|
||||||
state: {
|
state: {
|
||||||
id: instanceId,
|
id: instanceId,
|
||||||
historyInstanceId
|
historyInstanceId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 取消
|
// 取消
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
getUserByRoleType(3).then(res => {
|
getUserByRoleType(3).then(res => {
|
||||||
auditList.value = res.data
|
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>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -1,42 +1,57 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class='default-main'>
|
<div class='default-main'>
|
||||||
<el-tabs v-model='activeName' type='border-card'>
|
<el-tabs v-model='activeName' type='border-card'>
|
||||||
<el-tab-pane label='技术监督计划管理' name='1'>
|
<el-tab-pane label='技术监督计划管理' name='1'>
|
||||||
<plan-manage v-if="activeName == '1'" />
|
<plan-manage :id="id" v-if="activeName == '1'"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label='技术监督测试管理' name='2'>
|
<el-tab-pane label='技术监督测试管理' name='2'>
|
||||||
<test-manage v-if="activeName == '2'" />
|
<test-manage :id="id" v-if="activeName == '2'"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang='ts'>
|
<script setup lang='ts'>
|
||||||
import { onMounted, reactive, ref, provide } from 'vue'
|
import {ref} from 'vue'
|
||||||
import planManage from './components/planManage.vue'
|
import planManage from './components/planManage.vue'
|
||||||
import testManage from './components/testManage.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 dictData = useDictData()
|
||||||
const statusSelect = dictData.statusSelect()
|
const statusSelect = dictData.statusSelect()
|
||||||
|
const id = ref('')
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'supervision/harmonicmanagement'
|
name: 'supervision/harmonicmanagement'
|
||||||
})
|
})
|
||||||
const activeName = ref('1')
|
const activeName = ref('1')
|
||||||
|
|
||||||
const layout = mainHeight(63) as any
|
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>
|
</script>
|
||||||
|
|
||||||
<style lang='scss' scoped>
|
<style lang='scss' scoped>
|
||||||
.bars_w {
|
.bars_w {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 500px;
|
height: 500px;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.el-tabs__content) {
|
:deep(.el-tabs__content) {
|
||||||
height: v-bind('layout.height');
|
height: v-bind('layout.height');
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,64 +1,65 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<TableHeader datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
<TableHeader datePicker nextFlag theCurrentTime ref='TableHeaderRef'>
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="项目名称">
|
<el-form-item label='项目名称'>
|
||||||
<el-input v-model="tableStore.table.params.projectName" placeholder="请输入项目名称"></el-input>
|
<el-input v-model='tableStore.table.params.projectName' placeholder='请输入项目名称'></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="所在地市">
|
<el-form-item label='所在地市'>
|
||||||
<el-select v-model="tableStore.table.params.city" clearable placeholder="请选择所在地市">
|
<el-select v-model='tableStore.table.params.city' clearable placeholder='请选择所在地市'>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in areaOptionList"
|
v-for='item in areaOptionList'
|
||||||
:key="item.id"
|
:key='item.id'
|
||||||
:label="item.name"
|
:label='item.name'
|
||||||
:value="item.name"
|
:value='item.name'
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<!-- <el-button icon='el-icon-Download' type='primary'>导出</el-button> -->
|
<!-- <el-button icon='el-icon-Download' type='primary'>导出</el-button> -->
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" />
|
<Table ref='tableRef'/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-dialog
|
<el-dialog
|
||||||
title="干扰源用户详细信息"
|
title='干扰源用户详细信息'
|
||||||
v-if="dialogVisible"
|
v-if='dialogVisible'
|
||||||
v-model="dialogVisible"
|
v-model='dialogVisible'
|
||||||
width="65%"
|
width='65%'
|
||||||
:append-to-body="true"
|
:append-to-body='true'
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal='false'
|
||||||
draggable
|
draggable
|
||||||
>
|
>
|
||||||
<BpmUserReportDetail :id="interId" ref="detailsRef"></BpmUserReportDetail>
|
<BpmUserReportDetail :id='interId' ref='detailsRef'></BpmUserReportDetail>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 查看详情 detail 新增/修改 create-->
|
<!-- 查看详情 detail 新增/修改 create-->
|
||||||
<addForm
|
<addForm
|
||||||
ref="addForms"
|
ref='addForms'
|
||||||
@onSubmit="tableStore.index()"
|
@onSubmit='tableStore.index()'
|
||||||
:update="update"
|
:update='update'
|
||||||
:normalizedControl="true"
|
:normalizedControl='true'
|
||||||
openType="create"
|
openType='create'
|
||||||
></addForm>
|
></addForm>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang='ts'>
|
||||||
defineOptions({
|
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 TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/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 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 BpmUserReportDetail from '../../components/undocumented/detail.vue'
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import {useAdminInfo} from '@/stores/adminInfo'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import {ElMessage, ElMessageBox} from 'element-plus'
|
||||||
import { userReportRenewalCancel } from '@/api/process-boot/generalTest'
|
import {userReportRenewalCancel} from '@/api/process-boot/generalTest'
|
||||||
|
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const flag = ref(false)
|
const flag = ref(false)
|
||||||
const areaOptionList = dictData
|
const areaOptionList = dictData
|
||||||
@@ -73,235 +74,235 @@ const update = ref(false)
|
|||||||
const addForms = ref()
|
const addForms = ref()
|
||||||
jb_pl.value =
|
jb_pl.value =
|
||||||
adminInfo.$state.roleCode.filter(item => {
|
adminInfo.$state.roleCode.filter(item => {
|
||||||
return item == 'jb_pl'
|
return item == 'jb_pl'
|
||||||
}).length != 0
|
}).length != 0
|
||||||
? true
|
? true
|
||||||
: false
|
: false
|
||||||
jb_dky.value =
|
jb_dky.value =
|
||||||
adminInfo.$state.roleCode.filter(item => {
|
adminInfo.$state.roleCode.filter(item => {
|
||||||
return item == 'jb_dky'
|
return item == 'jb_dky'
|
||||||
}).length != 0
|
}).length != 0
|
||||||
? true
|
? true
|
||||||
: false
|
: false
|
||||||
|
|
||||||
const { push, options, currentRoute } = useRouter()
|
const {push, options, currentRoute} = useRouter()
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/supervision-boot/userReport/getNormalUserPage',
|
url: '/supervision-boot/userReport/getNormalUserPage',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{ title: '序号', type: 'seq', width: 80 },
|
{title: '序号', type: 'seq', width: 80},
|
||||||
{ field: 'city', title: '所在地市', minWidth: 80 },
|
{field: 'city', title: '所在地市', minWidth: 80},
|
||||||
{
|
{
|
||||||
field: 'substation',
|
field: 'substation',
|
||||||
title: '厂站名称',
|
title: '厂站名称',
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
row.cellValue = row.cellValue ? row.cellValue : '/'
|
row.cellValue = row.cellValue ? row.cellValue : '/'
|
||||||
return row.cellValue
|
return row.cellValue
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'projectName', title: '项目名称', minWidth: 170 },
|
{field: 'projectName', title: '项目名称', minWidth: 170},
|
||||||
{
|
{
|
||||||
field: 'userType',
|
field: 'userType',
|
||||||
title: '用户性质',
|
title: '用户性质',
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
formatter: (obj: any) => {
|
formatter: (obj: any) => {
|
||||||
const userType = obj.row.userType
|
const userType = obj.row.userType
|
||||||
return getUserTypeName(userType)
|
return getUserTypeName(userType)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
|
{field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130},
|
||||||
{
|
{
|
||||||
field: 'userStatus',
|
field: 'userStatus',
|
||||||
title: '用户状态',
|
title: '用户状态',
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
0: 'primary',
|
0: 'primary',
|
||||||
1: 'primary',
|
1: 'primary',
|
||||||
2: 'success',
|
2: 'success',
|
||||||
3: 'warning'
|
3: 'warning'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '可研',
|
0: '可研',
|
||||||
1: '建设',
|
1: '建设',
|
||||||
2: '运行',
|
2: '运行',
|
||||||
3: '退运'
|
3: '退运'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'status',
|
field: 'status',
|
||||||
title: '信息更新状态',
|
title: '信息更新状态',
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
0: 'warning',
|
0: 'warning',
|
||||||
1: 'primary',
|
1: 'primary',
|
||||||
2: 'success',
|
2: 'success',
|
||||||
3: 'danger',
|
3: 'danger',
|
||||||
4: 'warning',
|
4: 'warning',
|
||||||
null: 'primary'
|
null: 'primary'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '待提交审批',
|
0: '待提交审批',
|
||||||
1: '审批中',
|
1: '审批中',
|
||||||
2: '审批通过',
|
2: '审批通过',
|
||||||
3: '审批不通过',
|
3: '审批不通过',
|
||||||
4: '已取消',
|
4: '已取消',
|
||||||
null: '/'
|
null: '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
title: '详细信息',
|
||||||
|
minWidth: 100,
|
||||||
|
render: 'buttons',
|
||||||
|
buttons: [
|
||||||
{
|
{
|
||||||
title: '详细信息',
|
name: 'productSetting',
|
||||||
minWidth: 100,
|
title: '详情',
|
||||||
render: 'buttons',
|
type: 'primary',
|
||||||
buttons: [
|
icon: 'el-icon-EditPen',
|
||||||
{
|
render: 'basicButton',
|
||||||
name: 'productSetting',
|
click: row => {
|
||||||
title: '详情',
|
update.value = row.status == null ? false : true
|
||||||
type: 'primary',
|
setTimeout(() => {
|
||||||
icon: 'el-icon-EditPen',
|
open(row)
|
||||||
render: 'basicButton',
|
}, 100)
|
||||||
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
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
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: () => {
|
buttons: [
|
||||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
{
|
||||||
tableStore.table.params.relationUserName = tableStore.table.params.userName
|
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 = ''
|
tableStore.table.params.city = ''
|
||||||
@@ -315,114 +316,180 @@ tableStore.table.params.aisFileUpload = ''
|
|||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
const interId = ref()
|
const interId = ref()
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
onMounted(() => {
|
|
||||||
tableStore.index()
|
|
||||||
})
|
|
||||||
const detailsRef = ref(null)
|
const detailsRef = ref(null)
|
||||||
/** 打开弹窗 */
|
/** 打开弹窗 */
|
||||||
const open = async val => {
|
const open = async val => {
|
||||||
interId.value = val.id
|
interId.value = val.id
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 流程实例详情 */
|
/** 流程实例详情 */
|
||||||
const handleAudit = (instanceId: string, historyInstanceId: string) => {
|
const handleAudit = (instanceId: string, historyInstanceId: string) => {
|
||||||
push({
|
push({
|
||||||
name: 'BpmProcessInstanceDetail',
|
name: 'BpmProcessInstanceDetail',
|
||||||
state: {
|
state: {
|
||||||
id: instanceId,
|
id: instanceId,
|
||||||
historyInstanceId
|
historyInstanceId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
/**取消流程操作*/
|
/**取消流程操作*/
|
||||||
const cancelLeave = async (row: any) => {
|
const cancelLeave = async (row: any) => {
|
||||||
// 二次确认
|
// 二次确认
|
||||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
const {value} = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
inputType: 'textarea',
|
inputType: 'textarea',
|
||||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||||
inputErrorMessage: '取消原因不能为空'
|
inputErrorMessage: '取消原因不能为空'
|
||||||
})
|
})
|
||||||
// 发起取消
|
// 发起取消
|
||||||
let data = {
|
let data = {
|
||||||
id: row.id,
|
id: row.id,
|
||||||
processInstanceId: row.processInstanceId,
|
processInstanceId: row.processInstanceId,
|
||||||
reason: value
|
reason: value
|
||||||
}
|
}
|
||||||
await userReportRenewalCancel(data).then(res => {
|
await userReportRenewalCancel(data).then(res => {
|
||||||
ElMessage.success('取消成功')
|
ElMessage.success('取消成功')
|
||||||
// 加载数据
|
// 加载数据
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const needGovernance = ref()
|
const needGovernance = ref()
|
||||||
/** 方案审查 */
|
/** 方案审查 */
|
||||||
const toFangAn = (row: any, typeNo: number) => {
|
const toFangAn = (row: any, typeNo: number) => {
|
||||||
//查询详情拿到needGovernance
|
//查询详情拿到needGovernance
|
||||||
/** 获得数据 */
|
/** 获得数据 */
|
||||||
getUserReportById(row.id).then(res => {
|
getUserReportById(row.id).then(res => {
|
||||||
if (res.data.userType == '0' || res.data.userType == '1') {
|
if (res.data.userType == '0' || res.data.userType == '1') {
|
||||||
needGovernance.value = res.data.userReportProjectPO?.needGovernance
|
needGovernance.value = res.data.userReportProjectPO?.needGovernance
|
||||||
} else if (
|
} else if (
|
||||||
res.data.userType == '2' ||
|
res.data.userType == '2' ||
|
||||||
res.data.userType == '3' ||
|
res.data.userType == '3' ||
|
||||||
res.data.userType == '4' ||
|
res.data.userType == '4' ||
|
||||||
res.data.userType == '5'
|
res.data.userType == '5'
|
||||||
) {
|
) {
|
||||||
needGovernance.value = res.data.userReportSubstationPO?.needGovernance
|
needGovernance.value = res.data.userReportSubstationPO?.needGovernance
|
||||||
} else if (res.data.userType == '6') {
|
} else if (res.data.userType == '6') {
|
||||||
needGovernance.value = res.data.userReportSensitivePO?.needGovernance
|
needGovernance.value = res.data.userReportSensitivePO?.needGovernance
|
||||||
}
|
}
|
||||||
push({
|
push({
|
||||||
name: 'ProgramReview',
|
name: 'ProgramReview',
|
||||||
query: {
|
query: {
|
||||||
id: row.id,
|
id: row.id,
|
||||||
type: typeNo,
|
type: typeNo,
|
||||||
needGovernance: needGovernance.value
|
needGovernance: needGovernance.value
|
||||||
}
|
}
|
||||||
})
|
|
||||||
flag.value = true
|
|
||||||
})
|
})
|
||||||
|
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) => {
|
const getUserTypeName = (userType: any) => {
|
||||||
if (userType === 0) {
|
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 '新建电网工程'
|
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(
|
watch(
|
||||||
() => currentRoute.value.path,
|
() => currentRoute.value.path,
|
||||||
() => {
|
() => {
|
||||||
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
flag.value = false
|
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>
|
</script>
|
||||||
|
|||||||
@@ -1,73 +1,75 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="default-main">
|
<div class="default-main">
|
||||||
<!-- <TableHeader ref='TableHeaderRef'>
|
<!-- <TableHeader ref='TableHeaderRef'>
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label='用户名称'>
|
<el-form-item label='用户名称'>
|
||||||
<el-input v-model='tableStore.table.params.projectName' clearable></el-input>
|
<el-input v-model='tableStore.table.params.projectName' clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label='所在地市'>
|
<el-form-item label='所在地市'>
|
||||||
<el-select v-model='tableStore.table.params.city' clearable placeholder='请选择所在地市'>
|
<el-select v-model='tableStore.table.params.city' clearable placeholder='请选择所在地市'>
|
||||||
<el-option
|
<el-option
|
||||||
v-for='item in areaOptionList'
|
v-for='item in areaOptionList'
|
||||||
:key='item.id'
|
:key='item.id'
|
||||||
:label='item.name'
|
:label='item.name'
|
||||||
:value='item.name'
|
:value='item.name'
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon='' type='primary' @click='toGoNet()'>{{ titleButton }}</el-button>
|
<el-button icon='' type='primary' @click='toGoNet()'>{{ titleButton }}</el-button>
|
||||||
|
|
||||||
<el-button style='margin-left: 50px' :icon='Back' @click='go(-1)'>返回</el-button>
|
<el-button style='margin-left: 50px' :icon='Back' @click='go(-1)'>返回</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader> -->
|
</TableHeader> -->
|
||||||
<div class="header_btn">
|
<div class="header_btn">
|
||||||
<el-button v-if="bussType == 0 && !(jb_pl || jb_dky)" icon="" type="primary" @click="toGoNet()">
|
<el-button v-if="bussType == 0 && !(jb_pl || jb_dky)" icon="" type="primary" @click="toGoNet()">
|
||||||
{{ titleButton }}
|
{{ titleButton }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="bussType == 1 && needGovernance != '0' && !(jb_pl || jb_dky)"
|
v-if="bussType == 1 && needGovernance != '0' && !(jb_pl || jb_dky)"
|
||||||
icon=""
|
icon=""
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="toGoNet()"
|
@click="toGoNet()"
|
||||||
>
|
>
|
||||||
{{ titleButton }}
|
{{ titleButton }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button style="margin-left: 50px" :icon="Back" @click="go(-1)">返回</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>
|
</div>
|
||||||
|
<Table ref="tableRef"/>
|
||||||
|
|
||||||
|
<addForm
|
||||||
|
v-if="dialogVisible"
|
||||||
|
ref="addForms"
|
||||||
|
:id="bussId"
|
||||||
|
:bussType="bussType"
|
||||||
|
:title="titleButton1"
|
||||||
|
openType="detail"
|
||||||
|
@onSubmit="tableStore.index()"
|
||||||
|
></addForm>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
defineOptions({
|
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 TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import { cancel } from '@/api/supervision-boot/interfere/index'
|
import {cancel, userReportGoNetById} from '@/api/supervision-boot/interfere/index'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import {useDictData} from '@/stores/dictData'
|
||||||
import addForm from './addForm.vue'
|
import addForm from './addForm.vue'
|
||||||
import { useRouter, useRoute } from 'vue-router'
|
import {useRouter, useRoute} from 'vue-router'
|
||||||
import { Back } from '@element-plus/icons-vue'
|
import {Back} from '@element-plus/icons-vue'
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import {useAdminInfo} from '@/stores/adminInfo'
|
||||||
const { go, currentRoute, push } = useRouter()
|
|
||||||
const { query } = useRoute() // 查询参数
|
const {go, currentRoute, push} = useRouter()
|
||||||
import { ElMessage } from 'element-plus'
|
const {query} = useRoute() // 查询参数
|
||||||
import { ElMessageBox } from 'element-plus/es'
|
import {ElMessage} from 'element-plus'
|
||||||
|
import {ElMessageBox} from 'element-plus/es'
|
||||||
|
|
||||||
const needGovernance = query.needGovernance as unknown as string // 从 URL 传递过来的 是否需要治理
|
const needGovernance = query.needGovernance as unknown as string // 从 URL 传递过来的 是否需要治理
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const areaOptionList = dictData.getBasicData('jibei_area')
|
const areaOptionList = dictData.getBasicData('jibei_area')
|
||||||
@@ -76,161 +78,161 @@ const jb_pl = ref(false)
|
|||||||
const jb_dky = ref(false)
|
const jb_dky = ref(false)
|
||||||
jb_pl.value =
|
jb_pl.value =
|
||||||
adminInfo.$state.roleCode.filter(item => {
|
adminInfo.$state.roleCode.filter(item => {
|
||||||
return item == 'jb_pl'
|
return item == 'jb_pl'
|
||||||
}).length != 0
|
}).length != 0
|
||||||
? true
|
? true
|
||||||
: false
|
: false
|
||||||
jb_dky.value =
|
jb_dky.value =
|
||||||
adminInfo.$state.roleCode.filter(item => {
|
adminInfo.$state.roleCode.filter(item => {
|
||||||
return item == 'jb_dky'
|
return item == 'jb_dky'
|
||||||
}).length != 0
|
}).length != 0
|
||||||
? true
|
? true
|
||||||
: false
|
: false
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/supervision-boot/userReportNormal/userReportGoNetPage',
|
url: '/supervision-boot/userReportNormal/userReportGoNetPage',
|
||||||
|
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{ title: '序号', type: 'seq', width: 80 },
|
{title: '序号', type: 'seq', width: 80},
|
||||||
{ field: 'projectName', title: '用户名称', minWidth: 170 },
|
{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',
|
name: 'productSetting',
|
||||||
title: '用户性质',
|
title: '流程详情',
|
||||||
minWidth: 150,
|
type: 'primary',
|
||||||
formatter: (obj: any) => {
|
icon: 'el-icon-EditPen',
|
||||||
const userType = obj.row.userType
|
render: 'basicButton',
|
||||||
return getUserTypeName(userType)
|
disabled: row => {
|
||||||
}
|
return !row.processInstanceId
|
||||||
},
|
},
|
||||||
{ field: 'city', title: '所在地市', minWidth: 80 },
|
click: row => {
|
||||||
{ field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
|
handleAudit(row.processInstanceId)
|
||||||
{
|
}
|
||||||
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',
|
name: 'edit',
|
||||||
title: '填报人',
|
title: '编辑',
|
||||||
minWidth: 80,
|
type: 'primary',
|
||||||
formatter: (row: any) => {
|
icon: 'el-icon-Open',
|
||||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
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: '操作',
|
name: 'edit',
|
||||||
minWidth: 180,
|
title: '重新发起',
|
||||||
fixed: 'right',
|
type: 'warning',
|
||||||
render: 'buttons',
|
icon: 'el-icon-Open',
|
||||||
buttons: [
|
render: 'basicButton',
|
||||||
{
|
disabled: row => {
|
||||||
name: 'productSetting',
|
return row.createBy != adminInfo.$state.id || !(row.status == 4)
|
||||||
title: '流程详情',
|
},
|
||||||
type: 'primary',
|
click: row => {
|
||||||
icon: 'el-icon-EditPen',
|
dialogVisible.value = true
|
||||||
render: 'basicButton',
|
titleButton1.value = '重新发起'
|
||||||
disabled: row => {
|
setTimeout(() => {
|
||||||
return !row.processInstanceId
|
addForms.value.open(row)
|
||||||
},
|
}, 0)
|
||||||
click: row => {
|
}
|
||||||
handleAudit(row.processInstanceId)
|
},
|
||||||
}
|
{
|
||||||
},
|
name: 'cancel',
|
||||||
{
|
title: '取消',
|
||||||
name: 'edit',
|
type: 'danger',
|
||||||
title: '编辑',
|
icon: 'el-icon-Open',
|
||||||
type: 'primary',
|
render: 'basicButton',
|
||||||
icon: 'el-icon-Open',
|
disabled: row => {
|
||||||
render: 'basicButton',
|
return row.createBy != adminInfo.$state.id || row.status !== 1
|
||||||
showDisabled: row => {
|
},
|
||||||
return !(row.status == 0 || row.status == 3)
|
click: row => {
|
||||||
},
|
cancelLeave(row)
|
||||||
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)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
|
|
||||||
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.city = ''
|
||||||
tableStore.table.params.projectName = ''
|
tableStore.table.params.projectName = ''
|
||||||
@@ -247,102 +249,117 @@ const titleButton1 = ref()
|
|||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
const handleVisibilityChange = async () => {
|
const handleVisibilityChange = async () => {
|
||||||
if (document.visibilityState === 'visible') {
|
if (document.visibilityState === 'visible') {
|
||||||
// 在这里执行页面回到回到当前页签需要做的事情
|
// 在这里执行页面回到回到当前页签需要做的事情
|
||||||
await tableStore.index()
|
await tableStore.index()
|
||||||
} else if (document.visibilityState === 'hidden') {
|
} else if (document.visibilityState === 'hidden') {
|
||||||
// 在这里执行页面离开时需要做的事情
|
// 在这里执行页面离开时需要做的事情
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(async () => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
document.addEventListener('visibilitychange', handleVisibilityChange)
|
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(() => {
|
onUnmounted(() => {
|
||||||
document.removeEventListener('visibilitychange', handleVisibilityChange)
|
document.removeEventListener('visibilitychange', handleVisibilityChange)
|
||||||
})
|
})
|
||||||
/**取消流程操作*/
|
/**取消流程操作*/
|
||||||
const cancelLeave = async (row: any) => {
|
const cancelLeave = async (row: any) => {
|
||||||
// 二次确认
|
// 二次确认
|
||||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
const {value} = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
inputType: 'textarea',
|
inputType: 'textarea',
|
||||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||||
inputErrorMessage: '取消原因不能为空'
|
inputErrorMessage: '取消原因不能为空'
|
||||||
})
|
})
|
||||||
// 发起取消
|
// 发起取消
|
||||||
let data = {
|
let data = {
|
||||||
id: row.id,
|
id: row.id,
|
||||||
processInstanceId: row.processInstanceId,
|
processInstanceId: row.processInstanceId,
|
||||||
reason: value
|
reason: value
|
||||||
}
|
}
|
||||||
await cancel(data)
|
await cancel(data)
|
||||||
ElMessage.success('取消成功')
|
ElMessage.success('取消成功')
|
||||||
// 加载数据
|
// 加载数据
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
}
|
}
|
||||||
/** 处理审批按钮 */
|
/** 处理审批按钮 */
|
||||||
const handleAudit = (instanceId: any) => {
|
const handleAudit = (instanceId: any) => {
|
||||||
push({
|
push({
|
||||||
name: 'BpmProcessInstanceDetail',
|
name: 'BpmProcessInstanceDetail',
|
||||||
query: {
|
query: {
|
||||||
id: instanceId
|
id: instanceId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if (bussType.value === 0) {
|
if (bussType.value === 0) {
|
||||||
titleButton.value = '入网设计方案申请'
|
titleButton.value = '入网设计方案申请'
|
||||||
} else {
|
} else {
|
||||||
titleButton.value = '治理工程申请'
|
titleButton.value = '治理工程申请'
|
||||||
}
|
}
|
||||||
const addForms = ref()
|
const addForms = ref()
|
||||||
const toGoNet = () => {
|
const toGoNet = () => {
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
if (bussType.value === 0) {
|
if (bussType.value === 0) {
|
||||||
titleButton1.value = '入网设计方案申请'
|
titleButton1.value = '入网设计方案申请'
|
||||||
} else {
|
} else {
|
||||||
titleButton1.value = '治理工程申请'
|
titleButton1.value = '治理工程申请'
|
||||||
}
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
addForms.value.open()
|
addForms.value.open()
|
||||||
}, 0)
|
}, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**获取用户性质*/
|
/**获取用户性质*/
|
||||||
const getUserTypeName = (userType: any) => {
|
const getUserTypeName = (userType: any) => {
|
||||||
if (userType === 0) {
|
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 '新建电网工程'
|
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>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.header_btn {
|
.header_btn {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 60px;
|
height: 60px;
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 13px 15px;
|
padding: 13px 15px;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border: 1px solid #dddfe6;
|
border: 1px solid #dddfe6;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,66 +1,66 @@
|
|||||||
<template>
|
<template>
|
||||||
<TableHeader datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
<TableHeader datePicker nextFlag theCurrentTime ref='TableHeaderRef'>
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="项目名称">
|
<el-form-item label='项目名称'>
|
||||||
<el-input v-model="tableStore.table.params.projectName" placeholder="请输入项目名称"></el-input>
|
<el-input v-model='tableStore.table.params.projectName' placeholder='请输入项目名称'></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="所在地市">
|
<el-form-item label='所在地市'>
|
||||||
<el-select v-model="tableStore.table.params.city" clearable placeholder="请选择所在地市">
|
<el-select v-model='tableStore.table.params.city' clearable placeholder='请选择所在地市'>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in areaOptionList"
|
v-for='item in areaOptionList'
|
||||||
:key="item.id"
|
:key='item.id'
|
||||||
:label="item.name"
|
:label='item.name'
|
||||||
:value="item.name"
|
:value='item.name'
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="流程状态">
|
<el-form-item label='流程状态'>
|
||||||
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
<el-select v-model='tableStore.table.params.status' clearable placeholder='请选择流程状态'>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in statusSelect"
|
v-for='item in statusSelect'
|
||||||
:key="item.id"
|
:key='item.id'
|
||||||
:label="item.name"
|
:label='item.name'
|
||||||
:value="item.id"
|
:value='item.id'
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<!-- <el-button icon="el-icon-Plus" type="primary" @click="addList">新增</el-button> -->
|
<!-- <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-Plus' type='primary' @click='addFormModel'>新增</el-button>
|
||||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</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> -->
|
<!-- <el-button icon="el-icon-Download" @click="exportEvent" type="primary">导出</el-button> -->
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
<Table ref='tableRef' :checkbox-config='checkboxConfig'/>
|
||||||
<!-- 新增 -->
|
<!-- 新增 -->
|
||||||
<Add ref="addRef" @onSubmit="tableStore.index()" />
|
<Add ref='addRef' @onSubmit='tableStore.index()'/>
|
||||||
<!-- 上传 -->
|
<!-- 上传 -->
|
||||||
<Audit ref="AuditRef" @onSubmit="tableStore.index()" />
|
<Audit ref='AuditRef' @onSubmit='tableStore.index()'/>
|
||||||
<!-- 查看详情 detail 新增/修改 create-->
|
<!-- 查看详情 detail 新增/修改 create-->
|
||||||
<addForm ref="addForms" @onSubmit="tableStore.index()"></addForm>
|
<addForm ref='addForms' @onSubmit='tableStore.index()'></addForm>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang='ts'>
|
||||||
import { ref, onMounted, provide, watch, reactive } from 'vue'
|
import {ref, onMounted, provide, watch, reactive} from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/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 Add from './add.vue'
|
||||||
import Audit from './audit.vue'
|
import Audit from './audit.vue'
|
||||||
import addForm from './addForm.vue'
|
import addForm from './addForm.vue'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import {useDictData} from '@/stores/dictData'
|
||||||
import { getLoadTypeUserList } from '@/api/process-boot/interference'
|
import {getLoadTypeUserList} from '@/api/process-boot/interference'
|
||||||
import { cancelFormData } from '@/api/supervision-boot/interfere/index'
|
import {cancelFormData, getUserReportById} from '@/api/supervision-boot/interfere/index'
|
||||||
import { ElMessage } from 'element-plus'
|
import {ElMessage} from 'element-plus'
|
||||||
import { ElMessageBox } from 'element-plus/es'
|
import {ElMessageBox} from 'element-plus/es'
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import {useAdminInfo} from '@/stores/adminInfo'
|
||||||
import { deleteUserReport } from '@/api/supervision-boot/delete/index'
|
import {deleteUserReport} from '@/api/supervision-boot/delete/index'
|
||||||
//获取登陆用户姓名和部门
|
//获取登陆用户姓名和部门
|
||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const { push, options, currentRoute } = useRouter()
|
const {push, options, currentRoute} = useRouter()
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
const areaOptionList = dictData
|
const areaOptionList = dictData
|
||||||
@@ -74,167 +74,167 @@ const show: any = ref(false)
|
|||||||
const fileList = ref([])
|
const fileList = ref([])
|
||||||
const flag = ref(false)
|
const flag = ref(false)
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/supervision-boot/userReport/getUserReport',
|
url: '/supervision-boot/userReport/getUserReport',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
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',
|
name: 'productSetting',
|
||||||
type: 'checkbox'
|
title: '流程详情',
|
||||||
},
|
type: 'primary',
|
||||||
{ title: '序号', type: 'seq', width: 80 },
|
icon: 'el-icon-EditPen',
|
||||||
// { field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
|
render: 'basicButton',
|
||||||
{
|
disabled: row => {
|
||||||
field: 'city',
|
return !row.processInstanceId
|
||||||
title: '所在地市',
|
},
|
||||||
minWidth: 80
|
click: row => {
|
||||||
// formatter: (obj: any) => {
|
flag.value = true
|
||||||
// return areaOptionList.filter(item => item.id == obj.row.city)[0]?.name
|
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||||
// }
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'substation',
|
name: 'edit',
|
||||||
title: '厂站名称',
|
title: '编辑',
|
||||||
minWidth: 100,
|
type: 'primary',
|
||||||
formatter: (row: any) => {
|
icon: 'el-icon-Open',
|
||||||
row.cellValue = row.cellValue ? row.cellValue : '/'
|
render: 'basicButton',
|
||||||
return row.cellValue
|
showDisabled: row => {
|
||||||
}
|
return row.createBy != adminInfo.$state.id || !(row.status == 0)
|
||||||
},
|
},
|
||||||
{ field: 'projectName', title: '项目名称', minWidth: 170 },
|
disabled: row => {
|
||||||
{
|
return !(row.status == 0)
|
||||||
field: 'userType',
|
},
|
||||||
title: '用户性质',
|
click: row => {
|
||||||
minWidth: 150,
|
addForms.value.open({
|
||||||
formatter: (obj: any) => {
|
title: '编辑',
|
||||||
const userType = obj.row.userType
|
row: row
|
||||||
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',
|
name: 'edit',
|
||||||
title: '流程状态',
|
title: '重新发起',
|
||||||
minWidth: 100,
|
type: 'warning',
|
||||||
render: 'tag',
|
icon: 'el-icon-Open',
|
||||||
custom: {
|
render: 'basicButton',
|
||||||
0: 'warning',
|
disabled: row => {
|
||||||
1: 'primary',
|
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
||||||
2: 'success',
|
},
|
||||||
3: 'danger',
|
click: row => {
|
||||||
4: 'warning'
|
addForms.value.open({
|
||||||
},
|
title: '重新发起',
|
||||||
replaceValue: {
|
row: row
|
||||||
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: '操作',
|
name: 'cancel',
|
||||||
minWidth: 150,
|
title: '取消',
|
||||||
fixed: 'right',
|
type: 'danger',
|
||||||
render: 'buttons',
|
icon: 'el-icon-Open',
|
||||||
buttons: [
|
render: 'basicButton',
|
||||||
{
|
disabled: row => {
|
||||||
name: 'productSetting',
|
return row.createBy != adminInfo.$state.id || row.status != 1
|
||||||
title: '流程详情',
|
},
|
||||||
type: 'primary',
|
click: row => {
|
||||||
icon: 'el-icon-EditPen',
|
cancelLeave(row)
|
||||||
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)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
|
|
||||||
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.city = ''
|
||||||
tableStore.table.params.projectName = ''
|
tableStore.table.params.projectName = ''
|
||||||
@@ -247,135 +247,154 @@ tableStore.table.params.status = ''
|
|||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
// 新增
|
// 新增
|
||||||
const addList = () => {
|
const addList = () => {
|
||||||
addRef.value.open()
|
addRef.value.open()
|
||||||
}
|
}
|
||||||
// 禁止点击
|
// 禁止点击
|
||||||
const checkboxConfig = reactive({
|
const checkboxConfig = reactive({
|
||||||
checkMethod: ({ row }) => {
|
checkMethod: ({row}) => {
|
||||||
return adminInfo.roleCode.includes('delete_info')
|
return adminInfo.roleCode.includes('delete_info')
|
||||||
? true
|
? true
|
||||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const deleteEven = () => {
|
const deleteEven = () => {
|
||||||
if (tableStore.table.selection.length == 0) {
|
if (tableStore.table.selection.length == 0) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
message: '请选择要删除的数据'
|
message: '请选择要删除的数据'
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
deleteUserReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
deleteUserReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: '删除成功!'
|
message: '删除成功!'
|
||||||
})
|
})
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const addForms = ref()
|
const addForms = ref()
|
||||||
const addFormModel = () => {
|
const addFormModel = () => {
|
||||||
show.value = true
|
show.value = true
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
addForms.value.open({
|
addForms.value.open({
|
||||||
title: '用户档案录入'
|
title: '用户档案录入'
|
||||||
})
|
})
|
||||||
}, 0)
|
}, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 导出
|
// 导出
|
||||||
const exportEvent = () => {
|
const exportEvent = () => {
|
||||||
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
||||||
form.pageNum = 1
|
form.pageNum = 1
|
||||||
form.pageSize = tableStore.table.total
|
form.pageSize = tableStore.table.total
|
||||||
getLoadTypeUserList(form).then(res => {
|
getLoadTypeUserList(form).then(res => {
|
||||||
tableRef.value.getRef().exportData({
|
tableRef.value.getRef().exportData({
|
||||||
filename: '未建档非线性用户', // 文件名字
|
filename: '未建档非线性用户', // 文件名字
|
||||||
sheetName: 'Sheet1',
|
sheetName: 'Sheet1',
|
||||||
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
||||||
useStyle: true,
|
useStyle: true,
|
||||||
data: res.data.records, // 数据源 // 过滤那个字段导出
|
data: res.data.records, // 数据源 // 过滤那个字段导出
|
||||||
columnFilterMethod: function (column: any) {
|
columnFilterMethod: function (column: any) {
|
||||||
return !(column.$columnIndex === 0)
|
return !(column.$columnIndex === 0)
|
||||||
}
|
}
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
/**取消流程操作*/
|
/**取消流程操作*/
|
||||||
const cancelLeave = async (row: any) => {
|
const cancelLeave = async (row: any) => {
|
||||||
// 二次确认
|
// 二次确认
|
||||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
const {value} = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
inputType: 'textarea',
|
inputType: 'textarea',
|
||||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||||
inputErrorMessage: '取消原因不能为空'
|
inputErrorMessage: '取消原因不能为空'
|
||||||
})
|
})
|
||||||
// 发起取消
|
// 发起取消
|
||||||
let data = {
|
let data = {
|
||||||
id: row.id,
|
id: row.id,
|
||||||
processInstanceId: row.processInstanceId,
|
processInstanceId: row.processInstanceId,
|
||||||
reason: value
|
reason: value
|
||||||
}
|
}
|
||||||
await cancelFormData(data)
|
await cancelFormData(data)
|
||||||
ElMessage.success('取消成功')
|
ElMessage.success('取消成功')
|
||||||
// 加载数据
|
// 加载数据
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
watch(
|
watch(
|
||||||
() => currentRoute.value.path,
|
() => currentRoute.value.path,
|
||||||
() => {
|
() => {
|
||||||
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
flag.value = false
|
flag.value = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
deep: true
|
deep: true
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
/** 处理审批按钮 */
|
/** 处理审批按钮 */
|
||||||
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
||||||
push({
|
push({
|
||||||
name: 'BpmProcessInstanceDetail',
|
name: 'BpmProcessInstanceDetail',
|
||||||
state: {
|
state: {
|
||||||
id: instanceId,
|
id: instanceId,
|
||||||
historyInstanceId
|
historyInstanceId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/**获取用户性质*/
|
/**获取用户性质*/
|
||||||
const getUserTypeName = (userType: any) => {
|
const getUserTypeName = (userType: any) => {
|
||||||
if (userType === 0) {
|
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 '新建电网工程'
|
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>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang='scss'></style>
|
||||||
|
|||||||
@@ -1,38 +1,61 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="default-main">
|
<div class='default-main'>
|
||||||
<el-tabs v-model="activeName" type="border-card">
|
<el-tabs v-model='activeName' type='border-card'>
|
||||||
<el-tab-pane label="未建档用户档案录入管理" name="1">
|
<el-tab-pane label='未建档用户档案录入管理' name='1'>
|
||||||
<undocumented v-if="activeName == '1'" />
|
<undocumented ref='Undocumented' :id='id' v-if="activeName == '1'"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="常态化干扰源用户管理" name="3">
|
<el-tab-pane label='常态化干扰源用户管理' name='3'>
|
||||||
<interferenceUserTable v-if="activeName == '3'" />
|
<interferenceUserTable ref='InterferenceUserTable' :id='id' :businessKey="key" v-if="activeName == '3'"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang='ts'>
|
||||||
import { onMounted, reactive, ref, provide } from 'vue'
|
import {nextTick, ref, provide} from 'vue'
|
||||||
import { mainHeight } from '@/utils/layout'
|
import {mainHeight} from '@/utils/layout'
|
||||||
import undocumented from './components/undocumented/index.vue'
|
import undocumented from './components/undocumented/index.vue'
|
||||||
import interferenceUserTable from './components/normalizationManager/interferenceUserTable.vue'
|
import interferenceUserTable from './components/normalizationManager/interferenceUserTable.vue'
|
||||||
|
import {useRoute} from 'vue-router'
|
||||||
|
|
||||||
|
const route = useRoute()
|
||||||
|
const Undocumented = ref()
|
||||||
|
const InterferenceUserTable = ref()
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'supervision/interferencemanagement'
|
name: 'supervision/interferencemanagement'
|
||||||
})
|
})
|
||||||
const activeName = ref('1')
|
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
|
const layout = mainHeight(63) as any
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang='scss' scoped>
|
||||||
.bars_w {
|
.bars_w {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 500px;
|
height: 500px;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.el-tabs__content) {
|
:deep(.el-tabs__content) {
|
||||||
height: v-bind('layout.height');
|
height: v-bind('layout.height');
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -269,7 +269,7 @@ const tableStore = new TableStore({
|
|||||||
click: row => {
|
click: row => {
|
||||||
router.push({
|
router.push({
|
||||||
name: 'supervision/supervision/manage',
|
name: 'supervision/supervision/manage',
|
||||||
state: {
|
query: {
|
||||||
type: 1
|
type: 1
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
<div class='default-main'>
|
<div class='default-main'>
|
||||||
<el-tabs v-model='activeName' type='border-card'>
|
<el-tabs v-model='activeName' type='border-card'>
|
||||||
<el-tab-pane label='终端状态管理' name='0'>
|
<el-tab-pane label='终端状态管理' name='0'>
|
||||||
<terminal v-if="activeName == '0'" />
|
<terminal :id="id" v-if="activeName == '0'" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label='监测点状态管理' name='1'>
|
<el-tab-pane label='监测点状态管理' name='1'>
|
||||||
<monitor v-if="activeName == '1'" />
|
<monitor :id="id" v-if="activeName == '1'" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
@@ -16,14 +16,29 @@ import { ref } from 'vue'
|
|||||||
import { mainHeight } from '@/utils/layout'
|
import { mainHeight } from '@/utils/layout'
|
||||||
import terminal from './terminal.vue'
|
import terminal from './terminal.vue'
|
||||||
import monitor from './monitor.vue'
|
import monitor from './monitor.vue'
|
||||||
|
import {useRoute} from "vue-router";
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'supervision/retire'
|
name: 'supervision/retire'
|
||||||
})
|
})
|
||||||
const activeName = ref('0')
|
const activeName = ref('0')
|
||||||
|
const route = useRoute()
|
||||||
|
const id = ref('')
|
||||||
|
|
||||||
const layout = mainHeight(63) as any
|
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>
|
</script>
|
||||||
|
|
||||||
<style lang='scss' scoped>
|
<style lang='scss' scoped>
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ import { useRouter } from 'vue-router'
|
|||||||
import MonitorQuitPopup from '@/views/pqs/supervise/retire/monitorQuitPopup.vue'
|
import MonitorQuitPopup from '@/views/pqs/supervise/retire/monitorQuitPopup.vue'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { ElMessageBox } from 'element-plus/es'
|
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 { deleteQuitRunningDevice } from '@/api/supervision-boot/delete/index'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
@@ -311,4 +311,18 @@ watch(
|
|||||||
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 getRunningDeviceById(fullId).then(res => {
|
||||||
|
if (res && res.code == 'A0000') {
|
||||||
|
deviceQuitPopup.value.open('重新发起', res.data)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}, {immediate: true})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ import { useRouter } from 'vue-router'
|
|||||||
import DeviceQuitPopup from '@/views/pqs/supervise/retire/deviceQuitPopup.vue'
|
import DeviceQuitPopup from '@/views/pqs/supervise/retire/deviceQuitPopup.vue'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { ElMessageBox } from 'element-plus/es'
|
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 { useAdminInfo } from '@/stores/adminInfo'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import { deleteQuitRunningDevice } from '@/api/supervision-boot/delete/index'
|
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)
|
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
deviceQuitPopup.value.open('重新发起终端状态变更', row)
|
deviceQuitPopup.value.open('重新发起', row)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -307,4 +307,18 @@ watch(
|
|||||||
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 getRunningDeviceById(fullId).then(res => {
|
||||||
|
if (res && res.code == 'A0000') {
|
||||||
|
deviceQuitPopup.value.open('重新发起', res.data)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}, {immediate: true})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -27,14 +27,14 @@
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<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 TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import FeedbackPopup from '@/views/pqs/supervise/technology/feedbackPopup.vue'
|
import FeedbackPopup from '@/views/pqs/supervise/technology/feedbackPopup.vue'
|
||||||
import { useRouter } from 'vue-router'
|
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 { useAdminInfo } from '@/stores/adminInfo'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import { getFileNameAndFilePath } from '@/api/system-boot/file'
|
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>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -9,17 +9,16 @@
|
|||||||
<feedback-popup ref="feedbackPopup" />
|
<feedback-popup ref="feedbackPopup" />
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
import { ref, onMounted, provide, watch } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import FeedbackPopup from '@/views/pqs/supervise/technology/feedbackPopup.vue'
|
import FeedbackPopup from '@/views/pqs/supervise/technology/feedbackPopup.vue'
|
||||||
import { useRouter } from 'vue-router'
|
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 { useAdminInfo } from '@/stores/adminInfo'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import { getFileNameAndFilePath } from '@/api/system-boot/file'
|
|
||||||
import { deleteWarningLeaflet } from '@/api/supervision-boot/delete/index'
|
import { deleteWarningLeaflet } from '@/api/supervision-boot/delete/index'
|
||||||
const dictData = useDictData()
|
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>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -1,51 +1,59 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="default-main">
|
<div class='default-main'>
|
||||||
<el-tabs v-model="activeName" type="border-card">
|
<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="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="2"><technology v-if="activeName == '2'"/></el-tab-pane> -->
|
||||||
|
|
||||||
<el-tab-pane label="预警单列表" name="3">
|
<el-tab-pane label='预警单列表' name='3'>
|
||||||
<earlyWarn v-if="activeName == '3'" />
|
<earlyWarn :id="id" v-if="activeName == '3'" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="告警单列表" name="4">
|
<el-tab-pane label='告警单列表' name='4'>
|
||||||
<alarm v-if="activeName == '4'" />
|
<alarm :id="id" v-if="activeName == '4'" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang='ts'>
|
||||||
import overview from './components/overview.vue'
|
|
||||||
import technology from './components/technology.vue'
|
|
||||||
import earlyWarn from './components/earlyWarn.vue'
|
import earlyWarn from './components/earlyWarn.vue'
|
||||||
import alarm from './components/alarm.vue'
|
import alarm from './components/alarm.vue'
|
||||||
import { onMounted, reactive, ref, provide } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
import { mainHeight } from '@/utils/layout'
|
import { mainHeight } from '@/utils/layout'
|
||||||
|
const route = useRoute()
|
||||||
|
const id = ref('')
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'supervision/supervision/manage'
|
name: 'supervision/supervision/manage'
|
||||||
})
|
})
|
||||||
const states = history.state
|
|
||||||
const activeName: any = ref(null)
|
const activeName: any = ref(null)
|
||||||
//查看告警单
|
|
||||||
if (states.type == 1) {
|
|
||||||
activeName.value = '4'
|
watch(() => route.query.t, async (newValue, oldValue) => {
|
||||||
} else {
|
if (route.fullPath.includes('supervision/supervision/manage')) {
|
||||||
activeName.value = '3'
|
let type = (route.query.type as string) || 'null'
|
||||||
}
|
if (type == 'null' || type == '0') {
|
||||||
const Statistics = ref()
|
activeName.value = '3'
|
||||||
const compatibility = ref()
|
} 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
|
const layout = mainHeight(63) as any
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang='scss' scoped>
|
||||||
.bars_w {
|
.bars_w {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 500px;
|
height: 500px;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.el-tabs__content) {
|
:deep(.el-tabs__content) {
|
||||||
height: v-bind('layout.height');
|
height: v-bind('layout.height');
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,218 +1,221 @@
|
|||||||
<!---终端入网检测-->
|
<!---终端入网检测-->
|
||||||
<template>
|
<template>
|
||||||
<TableHeader area ref="TableHeaderRef">
|
<TableHeader area ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="搜索">
|
<el-form-item label="搜索">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="tableStore.table.params.searchValue"
|
v-model="tableStore.table.params.searchValue"
|
||||||
placeholder="输入变电站.终端名称"
|
placeholder="输入变电站.终端名称"
|
||||||
clearable
|
clearable
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="流程状态">
|
<el-form-item label="流程状态">
|
||||||
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in statusSelect"
|
v-for="item in statusSelect"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="处理状态">
|
<el-form-item label="处理状态">
|
||||||
<el-select v-model="tableStore.table.params.state" clearable placeholder="请选处理状态">
|
<el-select v-model="tableStore.table.params.state" clearable placeholder="请选处理状态">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in stateSelect"
|
v-for="item in stateSelect"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef"/>
|
||||||
<Form ref="FormRef" @onSubmit="tableStore.index()" />
|
<Form ref="FormRef" @onSubmit="tableStore.index()"/>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
import {ref, onMounted, provide, watch} from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
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 Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { useRouter } from 'vue-router'
|
import {useRouter} from 'vue-router'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import {useDictData} from '@/stores/dictData'
|
||||||
import Form from './form.vue'
|
import Form from './form.vue'
|
||||||
import { cancel } from '@/api/supervision-boot/cycleDetection/index'
|
import {cancel, getInfoById} from '@/api/supervision-boot/cycleDetection/index'
|
||||||
import { cancelMointorPointTempLinedebug } from '@/api/supervision-boot/jointDebugList/index'
|
import {useAdminInfo} from '@/stores/adminInfo'
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
|
||||||
//获取登陆用户姓名和部门
|
//获取登陆用户姓名和部门
|
||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const { push, options, currentRoute } = useRouter()
|
const {push, options, currentRoute} = useRouter()
|
||||||
const flag = ref(false)
|
const flag = ref(false)
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
const FormRef = ref()
|
const FormRef = ref()
|
||||||
const statusSelect = dictData.statusSelect()
|
const statusSelect = dictData.statusSelect()
|
||||||
const stateSelect = [
|
const stateSelect = [
|
||||||
{
|
{
|
||||||
id: 0,
|
id: 0,
|
||||||
name: '未处理'
|
name: '未处理'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
name: '已处理'
|
name: '处理中'
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
id: 2,
|
||||||
|
name: '已处理'
|
||||||
|
}
|
||||||
]
|
]
|
||||||
//申请联调
|
//申请联调
|
||||||
const debugForms = ref()
|
const debugForms = ref()
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/supervision-boot/checkDevice/list',
|
url: '/supervision-boot/checkDevice/list',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{ title: '序号', type: 'seq', width: 80 },
|
{title: '序号', type: 'seq', width: 80},
|
||||||
{ field: 'substation', title: '变电站' },
|
{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',
|
name: 'productSetting',
|
||||||
title: '终端名称'
|
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',
|
name: 'cancel',
|
||||||
title: '本次定检时间'
|
title: '取消',
|
||||||
},
|
type: 'danger',
|
||||||
{
|
icon: 'el-icon-Open',
|
||||||
field: 'nextTimeCheck',
|
render: 'basicButton',
|
||||||
title: '下次定检时间'
|
disabled: row => {
|
||||||
},
|
return row.createBy != adminInfo.$state.id || row.status != 1
|
||||||
{
|
},
|
||||||
field: 'overdueDay',
|
click: async row => {
|
||||||
title: '逾期天数',
|
// cancelLeave(row)
|
||||||
type: 'html',
|
const {value} = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||||
formatter: (row: any) => {
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
let text = row.row.status == 2
|
inputType: 'textarea',
|
||||||
? '/'
|
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||||
: `<span style='color: ${
|
inputErrorMessage: '取消原因不能为空'
|
||||||
row.row.overdueDay > 10 ? 'red' : row.row.overdueDay > 3 ? 'yellow' : ''
|
})
|
||||||
};text-decoration: none'>${row.row.overdueDay}</span>`
|
// 发起取消
|
||||||
|
let data = {
|
||||||
return text
|
id: row.id,
|
||||||
|
processInstanceId: row.processInstanceId,
|
||||||
|
reason: value
|
||||||
}
|
}
|
||||||
},
|
await cancel(data)
|
||||||
|
ElMessage.success('取消成功')
|
||||||
{
|
// 加载数据
|
||||||
field: 'status',
|
tableStore.index()
|
||||||
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()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
|
|
||||||
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.status = ''
|
||||||
tableStore.table.params.state = ''
|
tableStore.table.params.state = ''
|
||||||
@@ -221,42 +224,56 @@ tableStore.table.params.searchValue = ''
|
|||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
|
|
||||||
/** 处理审批按钮 */
|
/** 处理审批按钮 */
|
||||||
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
||||||
push({
|
push({
|
||||||
name: 'BpmProcessInstanceDetail',
|
name: 'BpmProcessInstanceDetail',
|
||||||
state: {
|
state: {
|
||||||
id: instanceId,
|
id: instanceId,
|
||||||
historyInstanceId
|
historyInstanceId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const addFormModel = () => {}
|
const addFormModel = () => {
|
||||||
|
}
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => currentRoute.value.path,
|
() => currentRoute.value.path,
|
||||||
() => {
|
() => {
|
||||||
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
flag.value = false
|
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>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
:deep(.el-upload-list__item) {
|
:deep(.el-upload-list__item) {
|
||||||
width: 400px;
|
width: 400px;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-input__wrapper {
|
::v-deep .el-input__wrapper {
|
||||||
// width: 200px !important;
|
// width: 200px !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
<debug ref="debugForms" @onSubmit="tableStore.index()" :debugId="debugId"></debug>
|
<debug ref="debugForms" @onSubmit="tableStore.index()" :debugId="debugId"></debug>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
import { ref, onMounted, provide, watch } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
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 Table from '@/components/table/index.vue'
|
||||||
@@ -39,7 +39,10 @@ import TableHeader from '@/components/table/header/index.vue'
|
|||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import { getLoadTypeUserList } from '@/api/process-boot/interference'
|
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 debug from './debug.vue'
|
||||||
import { cancelMointorPointTempLinedebug } from '@/api/supervision-boot/jointDebugList/index'
|
import { cancelMointorPointTempLinedebug } from '@/api/supervision-boot/jointDebugList/index'
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
@@ -326,6 +329,20 @@ watch(
|
|||||||
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 getMointorPointTempLinedebugDetail({id:fullId}).then(res => {
|
||||||
|
if (res && res.code == 'A0000') {
|
||||||
|
debugForms.value.open('重新发起', res.data)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}, {immediate: true})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@@ -43,8 +43,9 @@ import addForm from './addForm.vue'
|
|||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { ElMessageBox } from 'element-plus/es'
|
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 { deleteTempLineReport } from '@/api/supervision-boot/delete/index'
|
||||||
|
import {getTerminalDetailsById} from "@/api/supervision-boot/terminal";
|
||||||
//获取登陆用户姓名和部门
|
//获取登陆用户姓名和部门
|
||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
const dictData = useDictData()
|
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>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@@ -49,11 +49,12 @@ import { downloadDevTemplate } from '@/api/supervision-boot/userReport/form'
|
|||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { ElMessageBox } from 'element-plus/es'
|
import { ElMessageBox } from 'element-plus/es'
|
||||||
import DetailInfo from '@/views/pqs/supervise/terminalNetworkDetection/components/terminainal/detail.vue'
|
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 uploadATemplate from './uploadATemplate.vue'
|
||||||
import addForm from './addForm.vue'
|
import addForm from './addForm.vue'
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
import { deleteDevReport } from '@/api/supervision-boot/delete/index'
|
import { deleteDevReport } from '@/api/supervision-boot/delete/index'
|
||||||
|
import {getUserReportById} from "@/api/supervision-boot/interfere";
|
||||||
//获取登陆用户姓名和部门
|
//获取登陆用户姓名和部门
|
||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
const dictData = useDictData()
|
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>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@@ -1,46 +1,68 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="default-main">
|
<div class="default-main">
|
||||||
<el-tabs v-model="activeName" type="border-card">
|
<el-tabs v-model="activeName" type="border-card">
|
||||||
<el-tab-pane label="终端入网检测" name="1">
|
<el-tab-pane label="终端入网检测" name="1">
|
||||||
<terminal v-if="activeName == '1'" />
|
<terminal :id="id" v-if="activeName == '1'"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="监测点台账录入" name="2">
|
<el-tab-pane label="监测点台账录入" name="2">
|
||||||
<monitorpoint v-if="activeName == '2'" />
|
<monitorpoint :id="id" v-if="activeName == '2'"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="监测点联调列表" name="3">
|
<el-tab-pane label="监测点联调列表" name="3">
|
||||||
<jointDebugList v-if="activeName == '3'" />
|
<jointDebugList :id="id" v-if="activeName == '3'"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="终端周期检测" name="4">
|
<el-tab-pane label="终端周期检测" name="4">
|
||||||
<cycleDetection v-if="activeName == '4'"/>
|
<cycleDetection :id="id" v-if="activeName == '4'"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, reactive, ref, provide } from 'vue'
|
import {ref} from 'vue'
|
||||||
import { mainHeight } from '@/utils/layout'
|
import {mainHeight} from '@/utils/layout'
|
||||||
import terminal from './components/terminainal/index.vue'
|
import terminal from './components/terminainal/index.vue'
|
||||||
import monitorpoint from './components/monitorpoint/index.vue'
|
import monitorpoint from './components/monitorpoint/index.vue'
|
||||||
import jointDebugList from './components/jointDebugList/index.vue'
|
import jointDebugList from './components/jointDebugList/index.vue'
|
||||||
import cycleDetection from './components/cycleDetection/index.vue'
|
import cycleDetection from './components/cycleDetection/index.vue'
|
||||||
|
import {useRoute} from "vue-router";
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'terminalNetwotk'
|
name: 'terminalNetwotk'
|
||||||
})
|
})
|
||||||
const activeName = ref('1')
|
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
|
const layout = mainHeight(63) as any
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.bars_w {
|
.bars_w {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 500px;
|
height: 500px;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.el-tabs__content) {
|
:deep(.el-tabs__content) {
|
||||||
height: v-bind('layout.height');
|
height: v-bind('layout.height');
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ import { ref, onMounted, provide, reactive } from 'vue'
|
|||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/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 { useDictData } from '@/stores/dictData'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { addRunTest, update, cancel } from '@/api/supervision-boot/lineRunTest'
|
import { addRunTest, update, cancel } from '@/api/supervision-boot/lineRunTest'
|
||||||
@@ -190,8 +190,6 @@ const tableStore = new TableStore({
|
|||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
monitorIds = []
|
|
||||||
monitorIds.push(row.id)
|
|
||||||
monitorIds = []
|
monitorIds = []
|
||||||
monitorIds.push(row.id)
|
monitorIds.push(row.id)
|
||||||
const start = new Date()
|
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>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -1,110 +1,243 @@
|
|||||||
<!--待办事项列表-->
|
<!--待办事项列表-->
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<TableHeader>
|
<TableHeader>
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label='任务名称'>
|
<el-form-item label='任务名称'>
|
||||||
<el-input v-model='tableStore.table.params.searchValue' placeholder='请输入任务名称'></el-input>
|
<el-input v-model='tableStore.table.params.searchValue' placeholder='请输入任务名称'></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<!--表格-->
|
<!--表格-->
|
||||||
<Table ref='tableRef'></Table>
|
<Table ref='tableRef'></Table>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang='ts'>
|
<script setup lang='ts'>
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { onMounted, provide, ref, watch } from 'vue'
|
import {onMounted, provide, ref, watch} from 'vue'
|
||||||
import { useRouter } from 'vue-router'
|
import {useRouter} from 'vue-router'
|
||||||
|
import {getById} from "@/api/supervision-boot/leaflet";
|
||||||
|
import {getRunningDeviceById} from "@/api/supervision-boot/device/quitRunningDev";
|
||||||
|
|
||||||
|
const router = useRouter() // 路由对象
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'businessUser'
|
name: 'businessUser'
|
||||||
})
|
})
|
||||||
|
|
||||||
const { push, options, currentRoute } = useRouter()
|
const {push, options, currentRoute} = useRouter()
|
||||||
const flag = ref(false)
|
const flag = ref(false)
|
||||||
|
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/bpm-boot/bpm/task/todoList',
|
url: '/bpm-boot/bpm/task/allTodoList',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
column: [
|
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',
|
name: 'productSetting',
|
||||||
title: '序号',
|
title: '办理',
|
||||||
width: '60',
|
type: 'primary',
|
||||||
formatter: (row: any) => {
|
icon: 'el-icon-EditPen',
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
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: '操作',
|
name: 'productSetting',
|
||||||
align: 'center',
|
title: '流程详情',
|
||||||
minWidth: 100,
|
type: 'primary',
|
||||||
render: 'buttons',
|
icon: 'el-icon-EditPen',
|
||||||
buttons: [
|
render: 'basicButton',
|
||||||
{
|
disabled: row => {
|
||||||
name: 'productSetting',
|
return row.source == 1 || row.source == 3
|
||||||
title: '办理',
|
},
|
||||||
type: 'primary',
|
click: row => {
|
||||||
icon: 'el-icon-EditPen',
|
flag.value = true
|
||||||
render: 'basicButton',
|
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||||
click: row => {
|
}
|
||||||
flag.value = true
|
},
|
||||||
handleAudit(row.processInstance.id, row.historyInstanceId)
|
{
|
||||||
}
|
name: 'productSetting',
|
||||||
}
|
title: '重新发起',
|
||||||
]
|
type: 'warning',
|
||||||
}
|
icon: 'el-icon-EditPen',
|
||||||
],
|
render: 'basicButton',
|
||||||
beforeSearchFun: () => {
|
disabled: row => {
|
||||||
for (let key in tableStore.table.params) {
|
return row.source == 1 || row.source == 3
|
||||||
if (tableStore.table.params[key] === '') {
|
},
|
||||||
delete tableStore.table.params[key]
|
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(() => {
|
onMounted(() => {
|
||||||
// 加载数据
|
// 加载数据
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
tableStore.table.params.searchValue = ''
|
tableStore.table.params.searchValue = ''
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
|
|
||||||
/** 处理审批按钮 */
|
/** 处理审批按钮 */
|
||||||
const handleAudit = (instanceId: string, historyInstanceId: string) => {
|
const handleAudit = (instanceId: string, historyInstanceId: string) => {
|
||||||
push({
|
push({
|
||||||
name: 'BpmProcessInstanceDetail',
|
name: 'BpmProcessInstanceDetail',
|
||||||
state: {
|
state: {
|
||||||
id: instanceId,
|
id: instanceId,
|
||||||
todo: 'todo',
|
todo: 'todo',
|
||||||
historyInstanceId
|
historyInstanceId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => currentRoute.value.path,
|
() => currentRoute.value.path,
|
||||||
() => {
|
() => {
|
||||||
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
flag.value = false
|
flag.value = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
deep: true
|
deep: true
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
2
types/global.d.ts
vendored
2
types/global.d.ts
vendored
@@ -29,7 +29,7 @@ interface TableDefaultData<T = any> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
interface ApiResponse<T = any> {
|
interface ApiResponse<T = any> {
|
||||||
code: number
|
code: number | string
|
||||||
data: T
|
data: T
|
||||||
msg: string
|
msg: string
|
||||||
time: number
|
time: number
|
||||||
|
|||||||
Reference in New Issue
Block a user