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

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 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({

View File

@@ -129,8 +129,9 @@ 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,
t: Date.now()
} }
}) })
} }

View File

@@ -86,8 +86,10 @@ 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')
@@ -192,8 +194,9 @@ const tableStore = new TableStore({
click: row => { click: row => {
router.push({ router.push({
name: 'supervision/supervision/manage', name: 'supervision/supervision/manage',
state: { query: {
type: 0 type: 0,
t: Date.now()
} }
}) })
} }
@@ -210,8 +213,9 @@ 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,
t: Date.now()
} }
}) })
} }

View File

@@ -30,6 +30,7 @@ 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() // 路由对象
@@ -123,8 +124,9 @@ 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,
t: Date.now()
} }
}) })
} }

View File

@@ -31,6 +31,7 @@ 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()
@@ -162,8 +163,9 @@ const tableStore = new TableStore({
click: row => { click: row => {
push({ push({
name: 'supervision/supervision/manage', name: 'supervision/supervision/manage',
state: { query: {
type: 1 type: 1,
t: Date.now()
} }
}) })
} }

View File

@@ -35,18 +35,20 @@
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()
@@ -316,6 +318,19 @@ 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则不执行
nextTick(() => {
planAddRef.value.open('重新发起计划', fullId, false)
})
}, {immediate: true})
</script> </script>
<style scoped lang="scss"></style> <style scoped lang="scss"></style>

View File

@@ -31,7 +31,7 @@
<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()
@@ -314,6 +314,18 @@ onMounted(() => {
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>

View File

@@ -2,31 +2,46 @@
<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 {useDictData} from '@/stores/dictData'
import {useRoute} from "vue-router";
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>

View File

@@ -1,17 +1,17 @@
<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>
@@ -20,30 +20,30 @@
<!-- <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'
}) })
@@ -54,11 +54,12 @@ 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
@@ -315,9 +316,6 @@ 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 => {
@@ -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) => { const getUserTypeName = (userType: any) => {
if (userType === 0) { if (userType === 0) {
@@ -425,4 +456,40 @@ watch(
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>

View File

@@ -58,16 +58,18 @@ defineOptions({
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 {go, currentRoute, push} = useRouter()
const {query} = useRoute() // 查询参数 const {query} = useRoute() // 查询参数
import {ElMessage} from 'element-plus' import {ElMessage} from 'element-plus'
import {ElMessageBox} from 'element-plus/es' 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')
@@ -254,9 +256,24 @@ const handleVisibilityChange = async () => {
// 在这里执行页面离开时需要做的事情 // 在这里执行页面离开时需要做的事情
} }
} }
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)

View File

@@ -1,47 +1,47 @@
<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'
@@ -52,7 +52,7 @@ 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'
@@ -376,6 +376,25 @@ const getUserTypeName = (userType: any) => {
} }
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>

View File

@@ -1,36 +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"> <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;

View File

@@ -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
} }
}) })

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -1,49 +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"><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')) {
let type = (route.query.type as string) || 'null'
if (type == 'null' || type == '0') {
activeName.value = '3' activeName.value = '3'
} else {
activeName.value = '4'
} }
const Statistics = ref() id.value = (route.query.id as string) || 'null'
const compatibility = ref() 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;

View File

@@ -35,7 +35,7 @@
<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'
@@ -43,8 +43,7 @@ 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()
@@ -62,6 +61,10 @@ const stateSelect = [
}, },
{ {
id: 1, id: 1,
name: '处理中'
},
{
id: 2,
name: '已处理' name: '已处理'
} }
] ]
@@ -235,7 +238,8 @@ const handleAudit = (instanceId: any, historyInstanceId: any) => {
}) })
} }
const addFormModel = () => {} const addFormModel = () => {
}
watch( watch(
() => currentRoute.value.path, () => currentRoute.value.path,
@@ -249,6 +253,19 @@ 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 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">

View File

@@ -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">

View File

@@ -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">

View File

@@ -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">

View File

@@ -2,34 +2,55 @@
<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>
@@ -39,6 +60,7 @@ const layout = mainHeight(63) as any
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;

View File

@@ -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>

View File

@@ -19,7 +19,10 @@ 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'
}) })
@@ -28,9 +31,10 @@ 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,
isWebPaging: true,
column: [ column: [
{ {
field: 'index', field: 'index',
@@ -40,12 +44,26 @@ const tableStore = new TableStore({
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
} }
}, },
{ title: '任务名称', field: 'processInstance.name', minWidth: 200 }, {title: '任务名称', field: 'taskName', minWidth: 200},
{ title: '任务内容', field: 'instanceSign', minWidth: 300 }, {title: '任务内容', field: 'taskContent', minWidth: 300},
{ title: '发起人', field: 'processInstance.startUser.name', minWidth: 120 }, {title: '任务来源', field: 'startUser', minWidth: 120},
{ title: '发起部门', field: 'processInstance.startUser.deptName', minWidth: 120 }, {title: '发起时间', field: 'taskCreateTime', minWidth: 180},
{ title: '发起时间', field: 'createTime', minWidth: 180 }, {
{ title: '当前任务', field: 'name', minWidth: 140 }, field: 'source',
title: '流程状态',
render: 'tag',
minWidth: 130,
custom: {
1: 'primary',
2: 'danger',
3: 'primary'
},
replaceValue: {
1: '待审批',
2: '审批不通过',
3: '待处理'
}
},
{ {
title: '操作', title: '操作',
align: 'center', align: 'center',
@@ -58,9 +76,124 @@ const tableStore = new TableStore({
type: 'primary', type: 'primary',
icon: 'el-icon-EditPen', icon: 'el-icon-EditPen',
render: 'basicButton', render: 'basicButton',
disabled: row => {
return row.source == 2 || row.source == 3
},
click: row => { click: row => {
flag.value = true 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> { interface ApiResponse<T = any> {
code: number code: number | string
data: T data: T
msg: string msg: string
time: number time: number