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

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

View File

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

View File

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

View File

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