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

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

3
.env Normal file
View File

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

4
.npmrc Normal file
View File

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

View File

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

View File

@@ -7,20 +7,20 @@
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
</template>
</TableHeader>
<Table ref="tableRef" />
<Table ref="tableRef"/>
<!-- 新增 -->
<complaintsForm ref="formRef" @onSubmit="tableStore.index()" />
<complaintsForm ref="formRef" @onSubmit="tableStore.index()"/>
</template>
<script setup lang="ts">
import { ref, onMounted, provide, nextTick } from 'vue'
import {ref, onMounted, provide, nextTick} from 'vue'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { useDictData } from '@/stores/dictData'
import {ElMessage, ElMessageBox} from 'element-plus'
import {useDictData} from '@/stores/dictData'
import complaintsForm from './form/complaintsForm.vue'
import { useRouter } from 'vue-router'
import { sureInitiateWarningLeaflet } from '@/api/process-boot/electricitymanagement'
import {useRouter} from 'vue-router'
import {sureInitiateWarningLeaflet} from '@/api/process-boot/electricitymanagement'
// Steady_Statis
const dictData = useDictData()
const exceeded = dictData.getBasicData('Steady_Statis')
@@ -43,14 +43,14 @@ const tableStore = new TableStore({
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: 'userName', title: '用户名称'},
{field: 'userNumber', title: '用户编号'},
{field: 'dutyOrgName', title: '负责单位', minWidth: '150'},
// { field: 'userCategory', title: '用户类别' },
{ field: 'complaintText', title: '投诉内容' },
{ field: 'steadyIndicator', title: '稳态指标' },
{ field: 'transientIndicators', title: '暂态指标' },
{field: 'complaintText', title: '投诉内容'},
{field: 'steadyIndicator', title: '稳态指标'},
{field: 'transientIndicators', title: '暂态指标'},
{
field: 'monitorName',
title: '监测点名称',
@@ -102,7 +102,7 @@ const tableStore = new TableStore({
// title: '请确认发起告警单!'
// },
click: async row => {
const { value } = await ElMessageBox.prompt('', '整改意见', {
const {value} = await ElMessageBox.prompt('', '整改意见', {
confirmButtonText: '确定',
cancelButtonText: '取消',
@@ -110,7 +110,7 @@ const tableStore = new TableStore({
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
inputErrorMessage: '请输入整改意见'
})
sureInitiateWarningLeaflet({ id: row.id, reformAdvice: value }).then(res=>{
sureInitiateWarningLeaflet({id: row.id, reformAdvice: value}).then(res => {
ElMessage.success('发起告警单成功!')
tableStore.index()
})
@@ -129,8 +129,9 @@ const tableStore = new TableStore({
click: row => {
router.push({
name: 'supervision/supervision/manage',
state: {
type: 1
query: {
type: 1,
t: Date.now()
}
})
}
@@ -160,7 +161,7 @@ onMounted(() => {
})
// 新增
const add = () => {
formRef.value.open({ text: '新增投诉' })
formRef.value.open({text: '新增投诉'})
}
</script>

View File

@@ -4,12 +4,12 @@
<TableHeader datePicker nextFlag theCurrentTime ref="TableHeaderRef">
<template v-slot:select>
<el-form-item label="区域">
<Area ref="areaRef" v-model="tableStore.table.params.deptId" @changeValue="changeArea" />
<Area ref="areaRef" v-model="tableStore.table.params.deptId" @changeValue="changeArea"/>
</el-form-item>
<el-form-item label="监测点性质">
<el-select v-model="tableStore.table.params.lineType" clearable>
<el-option label="电网侧" value="0" />
<el-option label="非电网侧" value="1" />
<el-option label="电网侧" value="0"/>
<el-option label="非电网侧" value="1"/>
</el-select>
</el-form-item>
<el-form-item label="超标指标">
@@ -21,7 +21,7 @@
collapse-tags-tooltip
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-form-item>
<el-form-item label="数据类型">
@@ -70,24 +70,26 @@
</el-button>
</template>
</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>
<script setup lang="ts">
import { ref, onMounted, provide, nextTick } from 'vue'
import {ref, onMounted, provide, nextTick} from 'vue'
import TableStore from '@/utils/tableStore'
import Area from '@/components/form/area/index.vue'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { useDictData } from '@/stores/dictData'
import {ElMessage, ElMessageBox} from 'element-plus'
import {useDictData} from '@/stores/dictData'
import alarmList from './form/alarmList.vue'
import detail from './form/detail.vue'
const dictData = useDictData()
import { useRouter } from 'vue-router'
import {useRouter} from 'vue-router'
const router = useRouter() // 路由对象
//字典获取超标指标
const exceeded = dictData.getBasicData('Steady_Statis')
@@ -112,7 +114,7 @@ const tableStore = new TableStore({
method: 'POST',
// isWebPaging:true,
column: [
{ title: '', type: 'checkbox', width: 40 },
{title: '', type: 'checkbox', width: 40},
{
title: '序号',
type: 'seq',
@@ -122,10 +124,10 @@ const tableStore = new TableStore({
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: 'dept', title: '负责单位'},
{field: 'substation', title: '变电站名称'},
{field: 'deviceName', title: '终端名称'},
{field: 'lineName', title: '监测点名称'},
{
field: 'businessType',
@@ -135,7 +137,7 @@ const tableStore = new TableStore({
return industry.find((item: any) => item.id == row.cellValue)?.name || '/'
}
},
{ field: 'objectName', title: '监测对象名称' },
{field: 'objectName', title: '监测对象名称'},
{
field: 'targetType',
title: '指标类型',
@@ -192,8 +194,9 @@ const tableStore = new TableStore({
click: row => {
router.push({
name: 'supervision/supervision/manage',
state: {
type: 0
query: {
type: 0,
t: Date.now()
}
})
}
@@ -210,8 +213,9 @@ const tableStore = new TableStore({
click: row => {
router.push({
name: 'supervision/supervision/manage',
state: {
type: 1
query: {
type: 1,
t: Date.now()
}
})
}
@@ -324,7 +328,7 @@ tableStore.table.params.dataType = '1'
tableStore.table.params.deptId = dictData.state.area[0].id
provide('tableStore', tableStore)
onMounted(() => {
TableHeaderRef.value.setDatePicker([{ label: '月', value: 3 }])
TableHeaderRef.value.setDatePicker([{label: '月', value: 3}])
tableStore.index()
setTimeout(() => {

View File

@@ -12,26 +12,27 @@
</el-form-item>
</template>
</TableHeader>
<Table ref="tableRef" />
<testQuestionsForm ref="testQuestionsFormRef" />
<Table ref="tableRef"/>
<testQuestionsForm ref="testQuestionsFormRef"/>
<!-- 详情 -->
<el-dialog draggable v-model="dialogVisible" v-if="dialogVisible" title="详情" width="1000">
<detail :id="detailId" :flag="false"/>
</el-dialog>
</template>
<script setup lang="ts">
import { ref, onMounted, provide, nextTick } from 'vue'
import {ref, onMounted, provide, nextTick} from 'vue'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
import testQuestionsForm from './form/testQuestionsForm.vue'
import { initiateWarningLeaflet } from '@/api/supervision-boot/survey/test'
import { ElMessage, ElMessageBox } from 'element-plus'
import { useRouter } from 'vue-router'
import { useDictData } from '@/stores/dictData'
import {initiateWarningLeaflet} from '@/api/supervision-boot/survey/test'
import {ElMessage, ElMessageBox} from 'element-plus'
import {useRouter} from 'vue-router'
import {useDictData} from '@/stores/dictData'
import detail from '@/views/pqs/supervise/harmonicSurvey/test/detail.vue'
const dictData = useDictData()
const { push } = useRouter()
const {push} = useRouter()
const router = useRouter() // 路由对象
const tableRef = ref()
const TableHeaderRef = ref()
@@ -52,13 +53,13 @@ const tableStore = new TableStore({
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: '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: '填报人',
@@ -97,7 +98,7 @@ const tableStore = new TableStore({
},
click: async row => {
const { value } = await ElMessageBox.prompt('', '整改意见', {
const {value} = await ElMessageBox.prompt('', '整改意见', {
confirmButtonText: '确定',
cancelButtonText: '取消',
@@ -105,7 +106,7 @@ const tableStore = new TableStore({
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
inputErrorMessage: '请输入整改意见'
})
initiateWarningLeaflet({ id: row.id, reformAdvice: value }).then(res => {
initiateWarningLeaflet({id: row.id, reformAdvice: value}).then(res => {
ElMessage.success('发起告警成功!')
tableStore.index()
})
@@ -123,8 +124,9 @@ const tableStore = new TableStore({
click: row => {
router.push({
name: 'supervision/supervision/manage',
state: {
type: 1
query: {
type: 1,
t: Date.now()
}
})
}

View File

@@ -15,25 +15,26 @@
</el-form-item>
</template>
</TableHeader>
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
<Table ref="tableRef" :checkbox-config="checkboxConfig"/>
</div>
</template>
<script setup lang="ts">
import { ref, onMounted, provide, reactive } from 'vue'
import {ref, onMounted, provide, reactive} from 'vue'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
import { useRouter } from 'vue-router'
import { useDictData } from '@/stores/dictData'
import { ElMessage, ElMessageBox } from 'element-plus'
import { addRunTest, initiateWarningLeaflet } from '@/api/supervision-boot/lineRunTest'
import { formatDate } from '@/utils/formatTime'
import { VxeTablePropTypes } from 'vxe-table'
import { useAdminInfo } from '@/stores/adminInfo'
import { getFileNameAndFilePath } from '@/api/system-boot/file'
import {useRouter} from 'vue-router'
import {useDictData} from '@/stores/dictData'
import {ElMessage, ElMessageBox} from 'element-plus'
import {addRunTest, initiateWarningLeaflet} from '@/api/supervision-boot/lineRunTest'
import {formatDate} from '@/utils/formatTime'
import {VxeTablePropTypes} from 'vxe-table'
import {useAdminInfo} from '@/stores/adminInfo'
import {getFileNameAndFilePath} from '@/api/system-boot/file'
const dictData = useDictData()
const statusSelect = dictData.statusSelect()
const { push } = useRouter()
const {push} = useRouter()
const adminInfo = useAdminInfo()
const TableHeaderRef = ref()
const tableRef = ref()
@@ -43,12 +44,12 @@ const tableStore = new TableStore({
method: 'POST',
publicHeight: 65,
column: [
{ field: 'lineName', title: '监测点名称', minWidth: 160 },
{ field: 'connectedBus', title: '接入母线', minWidth: 160 },
{field: 'lineName', title: '监测点名称', minWidth: 160},
{field: 'connectedBus', title: '接入母线', minWidth: 160},
// { field: 'monitoringTerminalCode', title: '终端编号', minWidth: 140 },
{ field: 'monitoringTerminalName', title: '终端名称', minWidth: 140 },
{ field: 'powerSubstationName', title: '变电站', minWidth: 160 },
{ field: 'reason', title: '调试原因', minWidth: 160 },
{field: 'monitoringTerminalName', title: '终端名称', minWidth: 140},
{field: 'powerSubstationName', title: '变电站', minWidth: 160},
{field: 'reason', title: '调试原因', minWidth: 160},
{
field: 'testRunState',
@@ -77,7 +78,7 @@ const tableStore = new TableStore({
return row.cellValue ? row.cellValue : '/'
}
},
{ field: 'problemReason', title: '试运行评估问题', minWidth: 200 },
{field: 'problemReason', title: '试运行评估问题', minWidth: 200},
{
field: 'createBy',
title: '填报人',
@@ -130,7 +131,7 @@ const tableStore = new TableStore({
},
click: async row => {
const { value } = await ElMessageBox.prompt('', '整改意见', {
const {value} = await ElMessageBox.prompt('', '整改意见', {
confirmButtonText: '确定',
cancelButtonText: '取消',
@@ -162,8 +163,9 @@ const tableStore = new TableStore({
click: row => {
push({
name: 'supervision/supervision/manage',
state: {
type: 1
query: {
type: 1,
t: Date.now()
}
})
}
@@ -187,7 +189,7 @@ onMounted(() => {
})
const checkboxConfig = reactive<VxeTablePropTypes.CheckboxConfig>({
labelField: '',
checkMethod: ({ row }) => {
checkMethod: ({row}) => {
return !(row.testRunState == 1 || row.testRunState == 2)
}
})
@@ -204,7 +206,7 @@ const handleAudit = (instanceId: any, historyInstanceId: any) => {
// 下载报告
const downloadTheReport = (url: string) => {
getFileNameAndFilePath({ filePath: url }).then((res: any) => {
getFileNameAndFilePath({filePath: url}).then((res: any) => {
const link = document.createElement('a')
link.href = res.data.url
link.download = res.data.name

View File

@@ -29,28 +29,30 @@
</TableHeader>
<Table ref="tableRef" :checkbox-config="checkboxConfig"/>
<!-- 新增 -->
<planAdd ref="planAddRef" @onsubmit="tableStore.index()" :openType="openType" />
<planAdd ref="planAddRef" @onsubmit="tableStore.index()" :openType="openType"/>
</template>
<script setup lang="ts">
import { useAdminInfo } from '@/stores/adminInfo'
import {useAdminInfo} from '@/stores/adminInfo'
//获取登陆用户姓名和部门
const adminInfo = useAdminInfo()
import { ref, onMounted, provide, watch } from 'vue'
import {ref, onMounted, provide, watch, nextTick} from 'vue'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { cancel } from '@/api/process-boot/generalTest'
import {ElMessage, ElMessageBox} from 'element-plus'
import {cancel, getById} from '@/api/process-boot/generalTest'
import planAdd from './planAdd.vue'
import { useRouter } from 'vue-router'
import { queryPlan, removeSurvey } from '@/api/process-boot/generalTest'
import { getUserByRoleType } from '@/api/user-boot/user'
import { useDictData } from '@/stores/dictData'
import { deleteSurveyPlan } from '@/api/supervision-boot/delete/index'
import {useRouter} from 'vue-router'
import {queryPlan, removeSurvey} from '@/api/process-boot/generalTest'
import {getUserByRoleType} from '@/api/user-boot/user'
import {useDictData} from '@/stores/dictData'
import {deleteSurveyPlan} from '@/api/supervision-boot/delete/index'
import {getUserReportById} from "@/api/supervision-boot/interfere";
const dictData = useDictData()
const supvTypeOptionList = dictData.getBasicData('supv_type')
const statusSelect = dictData.statusSelect()
const { push, options, currentRoute } = useRouter()
const {push, options, currentRoute} = useRouter()
const dialogVisible = ref(false)
const tableRef = ref()
const planAddRef = ref()
@@ -107,8 +109,8 @@ const tableStore = new TableStore({
}
},
{ field: 'planStartTime', minWidth: 130, title: '计划开始时间' },
{ field: 'planEndTime', minWidth: 130, title: '计划结束时间' },
{field: 'planStartTime', minWidth: 130, title: '计划开始时间'},
{field: 'planEndTime', minWidth: 130, title: '计划结束时间'},
{
field: 'status',
title: '流程状态',
@@ -219,7 +221,7 @@ const add = () => {
}
// 禁止点击
const checkboxConfig = reactive({
checkMethod: ({ row }) => {
checkMethod: ({row}) => {
return adminInfo.roleCode.includes('delete_info')
? true
: row.createBy == adminInfo.$state.id && row.status == 0
@@ -262,7 +264,7 @@ const exportFn = () => {
/**取消流程操作*/
const cancelLeave = async (row: any) => {
// 二次确认
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
const {value} = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputType: 'textarea',
@@ -316,6 +318,19 @@ watch(
deep: true
}
)
const props = defineProps({id: {type: String, default: 'null'}})
watch(() => props.id, async (newValue, oldValue) => {
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
const fullId = newValue.split('@')[0]
let nowTime = Date.now()
const routeTime = Number(newValue.split('@')[1])
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms则不执行
nextTick(() => {
planAddRef.value.open('重新发起计划', fullId, false)
})
}, {immediate: true})
</script>
<style scoped lang="scss"></style>

View File

@@ -26,29 +26,29 @@
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
</template>
</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>
<script setup lang="ts">
import { ref, onMounted, provide, nextTick } from 'vue'
import { useAdminInfo } from '@/stores/adminInfo'
import {ref, onMounted, provide, watch, nextTick} from 'vue'
import {useAdminInfo} from '@/stores/adminInfo'
//获取登陆用户姓名和部门
const adminInfo = useAdminInfo()
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { cancelTest } from '@/api/process-boot/generalTest'
import {ElMessage, ElMessageBox} from 'element-plus'
import {cancelTest} from '@/api/process-boot/generalTest'
import planTest from './planTest.vue'
import { useRouter } from 'vue-router'
import { deleteSurveyPlanTest } from '@/api/supervision-boot/delete/index'
import { queryPlan, removeSurvey } from '@/api/process-boot/generalTest'
import { getUserByRoleType } from '@/api/user-boot/user'
import {useRouter} from 'vue-router'
import {deleteSurveyPlanTest} from '@/api/supervision-boot/delete/index'
import {queryPlan, removeSurvey} from '@/api/process-boot/generalTest'
import {getUserByRoleType} from '@/api/user-boot/user'
const { push } = useRouter()
const {push} = useRouter()
const tableRef = ref()
import { useDictData } from '@/stores/dictData'
import {useDictData} from '@/stores/dictData'
const dictData = useDictData()
const supvTypeOptionList = dictData.getBasicData('supv_type')
@@ -74,7 +74,7 @@ const tableStore = new TableStore({
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',
title: '监督类型',
@@ -88,9 +88,9 @@ const tableStore = new TableStore({
minWidth: 130,
title: '监督对象名称'
},
{ field: 'substationName', title: '变电站', minWidth: 140 },
{ field: 'planStartTime', title: '计划开始时间', minWidth: 140 },
{ field: 'planEndTime', title: '计划结束时间', minWidth: 140 },
{field: 'substationName', title: '变电站', minWidth: 140},
{field: 'planStartTime', title: '计划开始时间', minWidth: 140},
{field: 'planEndTime', title: '计划结束时间', minWidth: 140},
{
field: 'problemFlag',
title: '是否存在问题',
@@ -107,9 +107,9 @@ const tableStore = new TableStore({
null: '待测试'
}
},
{ field: 'deptName', title: '负责单位', minWidth: 140 },
{ field: 'completeBy', title: '计划负责人', minWidth: 130 },
{ field: 'completeTime', title: '实际完成时间', minWidth: 140 },
{field: 'deptName', title: '负责单位', minWidth: 140},
{field: 'completeBy', title: '计划负责人', minWidth: 130},
{field: 'completeTime', title: '实际完成时间', minWidth: 140},
{
field: 'status',
title: '流程状态',
@@ -234,7 +234,7 @@ const add = (id: string) => {
}
// 禁止点击
const checkboxConfig = reactive({
checkMethod: ({ row }) => {
checkMethod: ({row}) => {
return adminInfo.roleCode.includes('delete_info')
? true
: row.createBy == adminInfo.$state.id && row.status == 0
@@ -277,7 +277,7 @@ const exportFn = () => {
/**取消流程操作*/
const cancelLeave = async (row: any) => {
// 二次确认
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
const {value} = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputType: 'textarea',
@@ -314,6 +314,18 @@ onMounted(() => {
auditList.value = res.data
})
})
const props = defineProps({id: {type: String, default: 'null'}})
watch(() => props.id, async (newValue, oldValue) => {
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
const fullId = newValue.split('@')[0]
let nowTime = Date.now()
const routeTime = Number(newValue.split('@')[1])
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms则不执行
nextTick(() => {
planTestRef.value.open('重新发起计划测试', fullId, false)
})
}, {immediate: true})
</script>
<style scoped lang="scss"></style>

View File

@@ -2,31 +2,46 @@
<div class='default-main'>
<el-tabs v-model='activeName' type='border-card'>
<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 label='技术监督测试管理' name='2'>
<test-manage v-if="activeName == '2'" />
<test-manage :id="id" v-if="activeName == '2'"/>
</el-tab-pane>
</el-tabs>
</div>
</template>
<script setup lang='ts'>
import { onMounted, reactive, ref, provide } from 'vue'
import {ref} from 'vue'
import planManage from './components/planManage.vue'
import testManage from './components/testManage.vue'
import { mainHeight } from '@/utils/layout'
import {mainHeight} from '@/utils/layout'
import {useDictData} from '@/stores/dictData'
import {useRoute} from "vue-router";
import { useDictData } from '@/stores/dictData'
const route = useRoute()
const dictData = useDictData()
const statusSelect = dictData.statusSelect()
const id = ref('')
defineOptions({
name: 'supervision/harmonicmanagement'
})
const activeName = ref('1')
const layout = mainHeight(63) as any
watch(() => route.query.t, async (newValue, oldValue) => {
if (route.fullPath.includes('supervision/harmonicmanagement')) {
let type = (route.query.type as string) || 'null'
if (type == 'null' || type == '1') {
activeName.value = '1'
} else {
activeName.value = '2'
}
id.value = (route.query.id as string) || 'null'
id.value = id.value + '@' + route.query.t
}
}, {deep: true, immediate: true})
</script>
<style lang='scss' scoped>

View File

@@ -1,17 +1,17 @@
<template>
<div>
<TableHeader datePicker nextFlag theCurrentTime ref="TableHeaderRef">
<TableHeader datePicker nextFlag theCurrentTime ref='TableHeaderRef'>
<template #select>
<el-form-item label="项目名称">
<el-input v-model="tableStore.table.params.projectName" placeholder="请输入项目名称"></el-input>
<el-form-item label='项目名称'>
<el-input v-model='tableStore.table.params.projectName' placeholder='请输入项目名称'></el-input>
</el-form-item>
<el-form-item label="所在地市">
<el-select v-model="tableStore.table.params.city" clearable placeholder="请选择所在地市">
<el-form-item label='所在地市'>
<el-select v-model='tableStore.table.params.city' clearable placeholder='请选择所在地市'>
<el-option
v-for="item in areaOptionList"
:key="item.id"
:label="item.name"
:value="item.name"
v-for='item in areaOptionList'
:key='item.id'
:label='item.name'
:value='item.name'
></el-option>
</el-select>
</el-form-item>
@@ -20,45 +20,46 @@
<!-- <el-button icon='el-icon-Download' type='primary'>导出</el-button> -->
</template>
</TableHeader>
<Table ref="tableRef" />
<Table ref='tableRef'/>
</div>
<el-dialog
title="干扰源用户详细信息"
v-if="dialogVisible"
v-model="dialogVisible"
width="65%"
:append-to-body="true"
:close-on-click-modal="false"
title='干扰源用户详细信息'
v-if='dialogVisible'
v-model='dialogVisible'
width='65%'
:append-to-body='true'
:close-on-click-modal='false'
draggable
>
<BpmUserReportDetail :id="interId" ref="detailsRef"></BpmUserReportDetail>
<BpmUserReportDetail :id='interId' ref='detailsRef'></BpmUserReportDetail>
</el-dialog>
<!-- 查看详情 detail 新增/修改 create-->
<addForm
ref="addForms"
@onSubmit="tableStore.index()"
:update="update"
:normalizedControl="true"
openType="create"
ref='addForms'
@onSubmit='tableStore.index()'
:update='update'
:normalizedControl='true'
openType='create'
></addForm>
</template>
<script setup lang="ts">
<script setup lang='ts'>
defineOptions({
name: 'supervision/interferenceUserTable'
})
import { ref, onMounted, provide, watch } from 'vue'
import {ref, onMounted, provide, watch} from 'vue'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
import { useDictData } from '@/stores/dictData'
import {useDictData} from '@/stores/dictData'
import addForm from '@/views/pqs/supervise/interfere/components/undocumented/addForm.vue'
import { getUserReportById } from '@/api/supervision-boot/userReport/form'
import {getUserReportById, getUserReportByFangAnId} from '@/api/supervision-boot/interfere'
import BpmUserReportDetail from '../../components/undocumented/detail.vue'
import { useAdminInfo } from '@/stores/adminInfo'
import { ElMessage, ElMessageBox } from 'element-plus'
import { userReportRenewalCancel } from '@/api/process-boot/generalTest'
import {useAdminInfo} from '@/stores/adminInfo'
import {ElMessage, ElMessageBox} from 'element-plus'
import {userReportRenewalCancel} from '@/api/process-boot/generalTest'
const dictData = useDictData()
const flag = ref(false)
const areaOptionList = dictData
@@ -84,15 +85,15 @@ jb_dky.value =
? true
: false
const { push, options, currentRoute } = useRouter()
const {push, options, currentRoute} = useRouter()
const TableHeaderRef = ref()
const tableStore = new TableStore({
url: '/supervision-boot/userReport/getNormalUserPage',
publicHeight: 65,
method: 'POST',
column: [
{ title: '序号', type: 'seq', width: 80 },
{ field: 'city', title: '所在地市', minWidth: 80 },
{title: '序号', type: 'seq', width: 80},
{field: 'city', title: '所在地市', minWidth: 80},
{
field: 'substation',
title: '厂站名称',
@@ -102,7 +103,7 @@ const tableStore = new TableStore({
return row.cellValue
}
},
{ field: 'projectName', title: '项目名称', minWidth: 170 },
{field: 'projectName', title: '项目名称', minWidth: 170},
{
field: 'userType',
title: '用户性质',
@@ -112,7 +113,7 @@ const tableStore = new TableStore({
return getUserTypeName(userType)
}
},
{ field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
{field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130},
{
field: 'userStatus',
title: '用户状态',
@@ -238,7 +239,7 @@ const tableStore = new TableStore({
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
},
click: row => {
addForms.value.open({ title: '重新发起', row: row })
addForms.value.open({title: '重新发起', row: row})
}
},
{
@@ -315,9 +316,6 @@ tableStore.table.params.aisFileUpload = ''
const dialogVisible = ref(false)
const interId = ref()
provide('tableStore', tableStore)
onMounted(() => {
tableStore.index()
})
const detailsRef = ref(null)
/** 打开弹窗 */
const open = async val => {
@@ -338,7 +336,7 @@ const handleAudit = (instanceId: string, historyInstanceId: string) => {
/**取消流程操作*/
const cancelLeave = async (row: any) => {
// 二次确认
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
const {value} = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputType: 'textarea',
@@ -388,6 +386,39 @@ const toFangAn = (row: any, typeNo: number) => {
})
}
const toFangAnById = (id: string, typeNo: number) => {
//查询详情拿到needGovernance
/** 获得数据 */
getUserReportByFangAnId(id).then(res => {
let userId;
if (res.data.userType == '0' || res.data.userType == '1') {
userId = res.data.userReportProjectPO?.id
needGovernance.value = res.data.userReportProjectPO?.needGovernance
} else if (
res.data.userType == '2' ||
res.data.userType == '3' ||
res.data.userType == '4' ||
res.data.userType == '5'
) {
userId = res.data.userReportSubstationPO?.id
needGovernance.value = res.data.userReportSubstationPO?.needGovernance
} else if (res.data.userType == '6') {
userId = res.data.userReportSensitivePO?.id
needGovernance.value = res.data.userReportSensitivePO?.needGovernance
}
push({
name: 'ProgramReview',
query: {
id: userId,
fangAnId: id,
type: typeNo,
needGovernance: needGovernance.value
}
})
flag.value = true
})
}
/**获取用户性质*/
const getUserTypeName = (userType: any) => {
if (userType === 0) {
@@ -425,4 +456,40 @@ watch(
deep: true
}
)
//初始进来时如果有id就直接打开重新发起
onMounted(async () => {
tableStore.index()
})
/**
* 监听 props.id变了根据id查询详细数据用户重新发起
*/
const props = defineProps(['id', 'businessKey'])
watch(() => props.id, async (newValue, oldValue) => {
if (newValue === 'null') return; // 直接返回,避免后续逻辑执行
const fullId = newValue.split('@')[0]
let nowTime = Date.now()
const routeTime = Number(newValue.split('@')[1])
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms则不执行
// 此处较为复杂,需要判断是更新、入网检测、治理工程验收
if (props.businessKey == 'user_go_net') {
// 入网检测
toFangAnById(fullId, 0)
} else if (props.businessKey == 'user_treat_check') {
// 治理工程验收
toFangAnById(fullId, 1)
} else {
await getUserReportById(fullId).then(res => {
if (res && res.code == 'A0000') {
addForms.value.open({
title: '重新发起',
row: res.data
})
}
})
}
}, {immediate: true})
</script>

View File

@@ -36,7 +36,7 @@
</el-button>
<el-button style="margin-left: 50px" :icon="Back" @click="go(-1)">返回</el-button>
</div>
<Table ref="tableRef" />
<Table ref="tableRef"/>
<addForm
v-if="dialogVisible"
@@ -55,19 +55,21 @@ defineOptions({
name: 'ProgramReview'
})
import { ref, onMounted, provide, nextTick, onUnmounted } from 'vue'
import {ref, onMounted, provide, nextTick, onUnmounted} from 'vue'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import { cancel } from '@/api/supervision-boot/interfere/index'
import { useDictData } from '@/stores/dictData'
import {cancel, userReportGoNetById} from '@/api/supervision-boot/interfere/index'
import {useDictData} from '@/stores/dictData'
import addForm from './addForm.vue'
import { useRouter, useRoute } from 'vue-router'
import { Back } from '@element-plus/icons-vue'
import { useAdminInfo } from '@/stores/adminInfo'
const { go, currentRoute, push } = useRouter()
const { query } = useRoute() // 查询参数
import { ElMessage } from 'element-plus'
import { ElMessageBox } from 'element-plus/es'
import {useRouter, useRoute} from 'vue-router'
import {Back} from '@element-plus/icons-vue'
import {useAdminInfo} from '@/stores/adminInfo'
const {go, currentRoute, push} = useRouter()
const {query} = useRoute() // 查询参数
import {ElMessage} from 'element-plus'
import {ElMessageBox} from 'element-plus/es'
const needGovernance = query.needGovernance as unknown as string // 从 URL 传递过来的 是否需要治理
const dictData = useDictData()
const areaOptionList = dictData.getBasicData('jibei_area')
@@ -91,8 +93,8 @@ const tableStore = new TableStore({
method: 'POST',
column: [
{ title: '序号', type: 'seq', width: 80 },
{ field: 'projectName', title: '用户名称', minWidth: 170 },
{title: '序号', type: 'seq', width: 80},
{field: 'projectName', title: '用户名称', minWidth: 170},
{
field: 'userType',
title: '用户性质',
@@ -102,8 +104,8 @@ const tableStore = new TableStore({
return getUserTypeName(userType)
}
},
{ field: 'city', title: '所在地市', minWidth: 80 },
{ field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
{field: 'city', title: '所在地市', minWidth: 80},
{field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130},
{
field: 'userStatus',
title: '用户状态',
@@ -122,7 +124,7 @@ const tableStore = new TableStore({
3: '退运'
}
},
{ field: 'substation', title: '厂站名称', minWidth: 100 },
{field: 'substation', title: '厂站名称', minWidth: 100},
{
field: 'status',
title: '流程状态',
@@ -151,7 +153,7 @@ const tableStore = new TableStore({
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
}
},
{ field: 'createTime', title: '创建时间', minWidth: 100 },
{field: 'createTime', title: '创建时间', minWidth: 100},
{
title: '操作',
minWidth: 180,
@@ -254,9 +256,24 @@ const handleVisibilityChange = async () => {
// 在这里执行页面离开时需要做的事情
}
}
onMounted(() => {
onMounted(async () => {
tableStore.index()
document.addEventListener('visibilitychange', handleVisibilityChange)
if (query.fangAnId) {
//根据id查询待编辑的数据
await userReportGoNetById({id: query.fangAnId}).then(res => {
if (res && res.code == 'A0000') {
dialogVisible.value = true
titleButton1.value = '重新发起'
setTimeout(() => {
res.data.id = query.fangAnId
addForms.value.open(res.data)
}, 0)
}
})
}
})
onUnmounted(() => {
document.removeEventListener('visibilitychange', handleVisibilityChange)
@@ -264,7 +281,7 @@ onUnmounted(() => {
/**取消流程操作*/
const cancelLeave = async (row: any) => {
// 二次确认
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
const {value} = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputType: 'textarea',

View File

@@ -1,66 +1,66 @@
<template>
<TableHeader datePicker nextFlag theCurrentTime ref="TableHeaderRef">
<TableHeader datePicker nextFlag theCurrentTime ref='TableHeaderRef'>
<template #select>
<el-form-item label="项目名称">
<el-input v-model="tableStore.table.params.projectName" placeholder="请输入项目名称"></el-input>
<el-form-item label='项目名称'>
<el-input v-model='tableStore.table.params.projectName' placeholder='请输入项目名称'></el-input>
</el-form-item>
<el-form-item label="所在地市">
<el-select v-model="tableStore.table.params.city" clearable placeholder="请选择所在地市">
<el-form-item label='所在地市'>
<el-select v-model='tableStore.table.params.city' clearable placeholder='请选择所在地市'>
<el-option
v-for="item in areaOptionList"
:key="item.id"
:label="item.name"
:value="item.name"
v-for='item in areaOptionList'
:key='item.id'
:label='item.name'
:value='item.name'
></el-option>
</el-select>
</el-form-item>
<el-form-item label="流程状态">
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
<el-form-item label='流程状态'>
<el-select v-model='tableStore.table.params.status' clearable placeholder='请选择流程状态'>
<el-option
v-for="item in statusSelect"
:key="item.id"
:label="item.name"
:value="item.id"
v-for='item in statusSelect'
:key='item.id'
:label='item.name'
:value='item.id'
></el-option>
</el-select>
</el-form-item>
</template>
<template #operation>
<!-- <el-button icon="el-icon-Plus" type="primary" @click="addList">新增</el-button> -->
<el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button>
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
<el-button icon='el-icon-Plus' type='primary' @click='addFormModel'>新增</el-button>
<el-button icon='el-icon-Delete' type='primary' @click='deleteEven'>删除</el-button>
<!-- <el-button icon="el-icon-Download" @click="exportEvent" type="primary">导出</el-button> -->
</template>
</TableHeader>
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
<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-->
<addForm ref="addForms" @onSubmit="tableStore.index()"></addForm>
<addForm ref='addForms' @onSubmit='tableStore.index()'></addForm>
</template>
<script setup lang="ts">
import { ref, onMounted, provide, watch, reactive } from 'vue'
<script setup lang='ts'>
import {ref, onMounted, provide, watch, reactive} from 'vue'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
import { useRouter } from 'vue-router'
import {useRouter} from 'vue-router'
import Add from './add.vue'
import Audit from './audit.vue'
import addForm from './addForm.vue'
import { useDictData } from '@/stores/dictData'
import { getLoadTypeUserList } from '@/api/process-boot/interference'
import { cancelFormData } from '@/api/supervision-boot/interfere/index'
import { ElMessage } from 'element-plus'
import { ElMessageBox } from 'element-plus/es'
import { useAdminInfo } from '@/stores/adminInfo'
import { deleteUserReport } from '@/api/supervision-boot/delete/index'
import {useDictData} from '@/stores/dictData'
import {getLoadTypeUserList} from '@/api/process-boot/interference'
import {cancelFormData, getUserReportById} from '@/api/supervision-boot/interfere/index'
import {ElMessage} from 'element-plus'
import {ElMessageBox} from 'element-plus/es'
import {useAdminInfo} from '@/stores/adminInfo'
import {deleteUserReport} from '@/api/supervision-boot/delete/index'
//获取登陆用户姓名和部门
const adminInfo = useAdminInfo()
const dictData = useDictData()
const { push, options, currentRoute } = useRouter()
const {push, options, currentRoute} = useRouter()
const TableHeaderRef = ref()
const tableRef = ref()
const areaOptionList = dictData
@@ -82,7 +82,7 @@ const tableStore = new TableStore({
width: '60',
type: 'checkbox'
},
{ title: '序号', type: 'seq', width: 80 },
{title: '序号', type: 'seq', width: 80},
// { field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
{
field: 'city',
@@ -101,7 +101,7 @@ const tableStore = new TableStore({
return row.cellValue
}
},
{ field: 'projectName', title: '项目名称', minWidth: 170 },
{field: 'projectName', title: '项目名称', minWidth: 170},
{
field: 'userType',
title: '用户性质',
@@ -111,7 +111,7 @@ const tableStore = new TableStore({
return getUserTypeName(userType)
}
},
{ field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
{field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130},
{
field: 'userStatus',
title: '用户状态',
@@ -150,7 +150,7 @@ const tableStore = new TableStore({
4: '已取消'
}
},
{ field: 'createTime', title: '开始时间', minWidth: 170 },
{field: 'createTime', title: '开始时间', minWidth: 170},
{
field: 'createBy',
title: '填报人',
@@ -251,7 +251,7 @@ const addList = () => {
}
// 禁止点击
const checkboxConfig = reactive({
checkMethod: ({ row }) => {
checkMethod: ({row}) => {
return adminInfo.roleCode.includes('delete_info')
? true
: row.createBy == adminInfo.$state.id && row.status == 0
@@ -305,7 +305,7 @@ const exportEvent = () => {
/**取消流程操作*/
const cancelLeave = async (row: any) => {
// 二次确认
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
const {value} = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputType: 'textarea',
@@ -376,6 +376,25 @@ const getUserTypeName = (userType: any) => {
}
return '新建电网工程'
}
const props = defineProps({id: {type: String, default: 'null'}})
watch(() => props.id, async (newValue, oldValue) => {
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
const fullId = newValue.split('@')[0]
let nowTime = Date.now()
const routeTime = Number(newValue.split('@')[1])
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms则不执行
await getUserReportById(fullId).then(res => {
if (res && res.code == 'A0000') {
addForms.value.open({
title: '重新发起',
row: res.data
})
}
})
}, {immediate: true})
</script>
<style scoped lang="scss"></style>
<style scoped lang='scss'></style>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -31,25 +31,24 @@
</el-form-item>
</template>
</TableHeader>
<Table ref="tableRef" />
<Form ref="FormRef" @onSubmit="tableStore.index()" />
<Table ref="tableRef"/>
<Form ref="FormRef" @onSubmit="tableStore.index()"/>
</template>
<script setup lang="ts">
import { ref, onMounted, provide, nextTick } from 'vue'
import {ref, onMounted, provide, watch} from 'vue'
import TableStore from '@/utils/tableStore'
import { ElMessage, ElMessageBox } from 'element-plus'
import {ElMessage, ElMessageBox} from 'element-plus'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
import { useRouter } from 'vue-router'
import { useDictData } from '@/stores/dictData'
import {useRouter} from 'vue-router'
import {useDictData} from '@/stores/dictData'
import Form from './form.vue'
import { cancel } from '@/api/supervision-boot/cycleDetection/index'
import { cancelMointorPointTempLinedebug } from '@/api/supervision-boot/jointDebugList/index'
import { useAdminInfo } from '@/stores/adminInfo'
import {cancel, getInfoById} from '@/api/supervision-boot/cycleDetection/index'
import {useAdminInfo} from '@/stores/adminInfo'
//获取登陆用户姓名和部门
const adminInfo = useAdminInfo()
const dictData = useDictData()
const { push, options, currentRoute } = useRouter()
const {push, options, currentRoute} = useRouter()
const flag = ref(false)
const TableHeaderRef = ref()
const tableRef = ref()
@@ -62,6 +61,10 @@ const stateSelect = [
},
{
id: 1,
name: '处理中'
},
{
id: 2,
name: '已处理'
}
]
@@ -72,10 +75,10 @@ const tableStore = new TableStore({
publicHeight: 65,
method: 'POST',
column: [
{ title: '序号', type: 'seq', width: 80 },
{ field: 'substation', title: '变电站' },
{title: '序号', type: 'seq', width: 80},
{field: 'substation', title: '变电站'},
{ field: 'dept', title: '供电公司' },
{field: 'dept', title: '供电公司'},
{
field: 'deviceName',
title: '终端名称'
@@ -185,7 +188,7 @@ const tableStore = new TableStore({
},
click: async row => {
// cancelLeave(row)
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
const {value} = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputType: 'textarea',
@@ -235,7 +238,8 @@ const handleAudit = (instanceId: any, historyInstanceId: any) => {
})
}
const addFormModel = () => {}
const addFormModel = () => {
}
watch(
() => currentRoute.value.path,
@@ -249,6 +253,19 @@ watch(
deep: true
}
)
const props = defineProps({id: {type: String, default: 'null'}})
watch(() => props.id, async (newValue, oldValue) => {
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
const fullId = newValue.split('@')[0]
let nowTime = Date.now()
const routeTime = Number(newValue.split('@')[1])
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms则不执行
await getInfoById({id:fullId}).then(res => {
if (res && res.code == 'A0000') {
FormRef.value.open('重新发起', res.data)
}
})
}, {immediate: true})
</script>
<style scoped lang="scss">

View File

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

View File

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

View File

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

View File

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

View File

@@ -51,7 +51,7 @@ import { ref, onMounted, provide, reactive } from 'vue'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
import { useRouter } from 'vue-router'
import {useRoute, useRouter} from 'vue-router'
import { useDictData } from '@/stores/dictData'
import { ElMessage, ElMessageBox } from 'element-plus'
import { addRunTest, update, cancel } from '@/api/supervision-boot/lineRunTest'
@@ -190,8 +190,6 @@ const tableStore = new TableStore({
icon: 'el-icon-EditPen',
render: 'basicButton',
click: row => {
monitorIds = []
monitorIds.push(row.id)
monitorIds = []
monitorIds.push(row.id)
const start = new Date()
@@ -403,6 +401,46 @@ const runTestSubmit = (type: number) => {
}
})
}
const route = useRoute()
watch(() => route.query.t, async (newValue, oldValue) => {
let nowTime = Date.now()
let routeTime = route.query.t as number || 1
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms则不执行
if (route.fullPath.includes('/testRun')) {
let id = (route.query.id as string) || 'null'
if(id != 'null'){
monitorIds = []
monitorIds.push(id)
const start = new Date()
start.setDate(start.getDate() + 1)
start.setHours(0, 0, 0)
const end = new Date()
end.setDate(end.getDate() + 3)
end.setHours(23, 59, 59)
const startString = formatDate(start, 'YYYY-MM-DD') // 转换为 YYYY-MM-DD 格式
const endString = formatDate(end, 'YYYY-MM-DD')
const data = {
startTime: startString,
endTime: endString,
lineIds: monitorIds,
operateType: 1,
id
}
update(data).then((res: any) => {
if (res.code === 'A0000') {
ElMessage({
message: '发起试运行成功',
type: 'success'
})
tableStore.index()
}
})
}
}
}, {deep: true, immediate: true})
</script>
<style scoped lang="scss"></style>

View File

@@ -17,20 +17,24 @@
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
import { onMounted, provide, ref, watch } from 'vue'
import { useRouter } from 'vue-router'
import {onMounted, provide, ref, watch} from 'vue'
import {useRouter} from 'vue-router'
import {getById} from "@/api/supervision-boot/leaflet";
import {getRunningDeviceById} from "@/api/supervision-boot/device/quitRunningDev";
const router = useRouter() // 路由对象
defineOptions({
name: 'businessUser'
})
const { push, options, currentRoute } = useRouter()
const {push, options, currentRoute} = useRouter()
const flag = ref(false)
const tableStore = new TableStore({
url: '/bpm-boot/bpm/task/todoList',
url: '/bpm-boot/bpm/task/allTodoList',
method: 'POST',
publicHeight: 65,
isWebPaging: true,
column: [
{
field: 'index',
@@ -40,12 +44,26 @@ const tableStore = new TableStore({
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
}
},
{ 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: '任务名称', 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',
@@ -58,9 +76,124 @@ const tableStore = new TableStore({
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
disabled: row => {
return row.source == 2 || row.source == 3
},
click: row => {
flag.value = true
handleAudit(row.processInstance.id, row.historyInstanceId)
handleAudit(row.processInstanceId, row.historyInstanceId)
}
},
{
name: 'productSetting',
title: '流程详情',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
disabled: row => {
return row.source == 1 || row.source == 3
},
click: row => {
flag.value = true
handleAudit(row.processInstanceId, row.historyInstanceId)
}
},
{
name: 'productSetting',
title: '重新发起',
type: 'warning',
icon: 'el-icon-EditPen',
render: 'basicButton',
disabled: row => {
return row.source == 1 || row.source == 3
},
click: async row => {
// 页面内tab切换
let type = 1
let key = row.businessKey
// 特殊处理预告警单
if(key == 'warn_leaflet'){
await getById(row.id).then(res => {
if(res.code == 'A0000'){
if(res.data.leafletType == 1){
type = 0
}else {
type = 1
}
}
})
}
if(key == 'quit_running_device'){
await getRunningDeviceById(row.id).then(res => {
if(res.code == 'A0000'){
if(res.data.deviceType == 1){
type = 0
}else {
type = 1
}
}
})
}
// 特殊处理终端监测点状态切换
if (
// 干扰源建档
key == 'build_user_info'
// 终端入网检测
|| key == 'device_info_add'
// 技术监督计划
|| key == 'sup_plan_add') {
type = 1
} else if (
// 干扰源用户常态化管理
key == 'user_report_update'
// 入网方案申请
|| key == 'user_go_net'
// 治理工程审核
|| key == 'user_treat_check'
// 监测点台账录入
|| key == 'line_info_add'
// 技术监督计划测试
|| key == 'survey_test') {
type = 2
} else if (
// 监测点联调
key == 'temp_line_debug'
) {
type = 3
} else if (
// 终端周期检测
key == 'timing_check_device'
) {
type = 4
}
// 业务记录id
let id = row.id
router.push({
name: row.routePath,
query: {
type,
id,
key,
t: Date.now()
}
})
}
},
{
name: 'productSetting',
title: '办理',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
disabled: row => {
return row.source == 1 || row.source == 2
},
click: row => {
flag.value = true
handleAudit(row.processInstanceId, row.historyInstanceId)
}
}
]

2
types/global.d.ts vendored
View File

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