修改海南测试问题

This commit is contained in:
GGJ
2024-10-30 09:29:39 +08:00
parent 1aa7e4263b
commit 1df2b26b04
32 changed files with 469 additions and 478 deletions

View File

@@ -3,12 +3,8 @@
<template #select>
<el-form-item label="流程状态">
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
<el-option
v-for="item in statusSelect"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
<el-option v-for="item in statusSelect" :key="item.id" :label="item.name"
:value="item.id"></el-option>
</el-select>
</el-form-item>
</template>
@@ -27,14 +23,14 @@
</el-dialog>
</template>
<script setup lang="ts">
import {ref, onMounted, provide, nextTick, watch} 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, getById} 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'
@@ -399,13 +395,23 @@ const deleteEven = () => {
message: '请选择要删除的数据'
})
} else {
deleteWarningLeaflet(tableStore.table.selection.map(item => item.id)).then(res => {
ElMessage({
type: 'success',
message: '删除成功!'
})
tableStore.index()
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
deleteWarningLeaflet(tableStore.table.selection.map(item => item.id)).then(res => {
ElMessage({
type: 'success',
message: '删除成功!'
})
tableStore.index()
})
})
}
}
/**取消流程操作*/
@@ -448,45 +454,47 @@ const handleAudit = (instanceId: any, historyInstanceId: any) => {
})
}
const props = defineProps(['id','businessKey'])
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则不执行
await getById(fullId).then(res => {
if (res && res.code == 'A0000') {
if (res && res.code == 'A0000') {
if(props.businessKey == '3'){
feedbackPopup.value.open(
'填报告警反馈单',
res.data.id,
res.data.status,
res.data.issueDetail,
res.data.problemPath,
res.data.supervisionReport,
res.data.reformAdvice
)
}else{
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
)
}
}
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
let fullId = newValue.split('@')[0]
let nowTime = Date.now()
const routeTime = Number(newValue.split('@')[1])
}
})
}, {immediate: true})
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT || fullId == 'null') return // 路由时间超过500ms则不执行
await getById(fullId).then(res => {
if (res && res.code == 'A0000') {
if (res && res.code == 'A0000') {
if (props.businessKey == '3') {
feedbackPopup.value.open(
'填报告警反馈单',
res.data.id,
res.data.status,
res.data.issueDetail,
res.data.problemPath,
res.data.supervisionReport,
res.data.reformAdvice
)
} else {
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

@@ -281,13 +281,23 @@ const deleteEven = () => {
message: '请选择要删除的数据'
})
} else {
deleteWarningLeaflet(tableStore.table.selection.map(item => item.id)).then(res => {
ElMessage({
type: 'success',
message: '删除成功!'
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
deleteWarningLeaflet(tableStore.table.selection.map(item => item.id)).then(res => {
ElMessage({
type: 'success',
message: '删除成功!'
})
tableStore.index()
})
tableStore.index()
})
}
}
/**取消流程操作*/
@@ -325,10 +335,10 @@ const handleAudit = (instanceId: any, historyInstanceId: any) => {
const props = defineProps(['id','businessKey'])
watch(() => props.id, async (newValue, oldValue) => {
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
const fullId = newValue.split('@')[0]
let 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 (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT || fullId == 'null') return // 路由时间超过500ms则不执行
await getById(fullId).then(res => {
if (res && res.code == 'A0000') {
if(props.businessKey == '3'){

View File

@@ -3,22 +3,12 @@
<el-scrollbar>
<el-form :inline="false" :model="form" label-width="120px" :rules="rules" ref="formRef">
<el-form-item label="问题详情:">
<el-input
v-model="form.issueDetail"
autocomplete="off"
type="textarea"
:autosize="{ minRows: 2, maxRows: 6 }"
readonly
/>
<el-input v-model="form.issueDetail" disabled autocomplete="off" type="textarea"
:autosize="{ minRows: 2, maxRows: 6 }" readonly />
</el-form-item>
<el-form-item label="整改意见:">
<el-input
v-model="form.reformAdvice"
autocomplete="off"
type="textarea"
:autosize="{ minRows: 2, maxRows: 6 }"
readonly
/>
<el-input v-model="form.reformAdvice" autocomplete="off" disabled type="textarea"
:autosize="{ minRows: 2, maxRows: 6 }" readonly />
</el-form-item>
<el-form-item label="技术监督报告:" v-if="showFile1">
@@ -38,26 +28,12 @@
</el-form-item>
<el-form-item label="采取的措施:" prop="takeStep">
<el-input
v-model="form.takeStep"
autocomplete="off"
placeholder="请输入采取的措施"
type="textarea"
/>
<el-input v-model="form.takeStep" autocomplete="off" placeholder="请输入采取的措施" type="textarea" />
</el-form-item>
<el-form-item label="反馈报告:" class="uploadFile" prop="reportPath">
<el-upload
v-model:file-list="form.reportPath"
ref="uploadRef"
action=""
:accept="acceptType"
:limit="1"
:on-exceed="handleExceed"
:on-change="choose"
:auto-upload="false"
:on-progress="uploadFileName('reportPath')"
:on-remove="removeFile"
>
<el-upload v-model:file-list="form.reportPath" ref="uploadRef" action="" :accept="acceptType"
:limit="1" :on-exceed="handleExceed" :on-change="choose" :auto-upload="false"
:on-progress="uploadFileName('reportPath')" :on-remove="removeFile">
<template #trigger>
<el-button type="primary">上传文件</el-button>
</template>
@@ -70,8 +46,8 @@
<span class="dialog-footer">
<el-button @click="close">取消</el-button>
<!-- <el-button type="primary" @click="submit">确认</el-button> -->
<el-button type="primary" @click="submit(true)" :loading="loading" >保存</el-button>
<el-button type="primary" @click="submit(false)" :loading="loading" >提交审批</el-button>
<el-button type="primary" @click="submit(true)" :loading="loading">保存</el-button>
<el-button type="primary" @click="submit(false)" :loading="loading">提交审批</el-button>
</span>
</template>
</el-dialog>
@@ -160,8 +136,8 @@ const open = async (
}
form.value.id = id
form.value.status = status
form.value.issueDetail = issueDetail
form.value.reformAdvice = reformAdvice
form.value.issueDetail = issueDetail || ''
form.value.reformAdvice = reformAdvice || ''
reportFilePath.value = reportPath
//判断附件是否存在,如果存在则回显出让用户可以点击下载
if (problemPath) {
@@ -207,7 +183,7 @@ const close = () => {
/**
* 提交用户表单数据
*/
const submit =async (flag: boolean) => {
const submit = async (flag: boolean) => {
loading.value = true
if (flag) {
let subForm = JSON.parse(JSON.stringify(form.value))
@@ -292,6 +268,7 @@ const uploadFileName = val => {
.el-select {
min-width: 180px;
}
.elView {
cursor: pointer;
margin-right: 10px;

View File

@@ -27,13 +27,14 @@ defineOptions({
name: 'supervision/supervision/manage'
})
const activeName: any = ref(null)
const activeName: any = ref('3')
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' || type == '3') {
if (type == 'null') { }
else if (type == '0' || type == '3') {
activeName.value = '3'
} else {
activeName.value = '4'
@@ -42,7 +43,7 @@ watch(() => route.query.t, async (newValue, oldValue) => {
key.value = (route.query.key as string) || 'null'
id.value = id.value + '@' + route.query.t
}
}, {deep: true, immediate: true})
}, { deep: true, immediate: true })
const layout = mainHeight(63) as any