修改海南测试问题

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,22 +3,12 @@
<template #select>
<el-form-item label="监督类型">
<el-select v-model="tableStore.table.params.supvType" clearable placeholder="请选择流程状态">
<el-option
v-for="item in supvTypeOptionList"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
<el-option v-for="item in supvTypeOptionList" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
<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,32 +17,32 @@
<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" />
<!-- 新增 -->
<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, nextTick} 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, getById} 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 {getUserReportById} from "@/api/supervision-boot/interfere";
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()
@@ -109,8 +99,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: '流程状态',
@@ -221,10 +211,10 @@ const add = () => {
}
// 禁止点击
const checkboxConfig = reactive({
checkMethod: ({row}) => {
checkMethod: ({ row }) => {
return adminInfo.roleCode.includes('delete_info')
? true
: row.createBy == adminInfo.$state.id && row.status == 0
? true
: row.createBy == adminInfo.$state.id && row.status == 0
}
})
const deleteEven = () => {
@@ -234,13 +224,23 @@ const deleteEven = () => {
message: '请选择要删除的数据'
})
} else {
deleteSurveyPlan(tableStore.table.selection.map(item => item.id)).then(res => {
ElMessage({
type: 'success',
message: '删除成功!'
})
tableStore.index()
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
deleteSurveyPlan(tableStore.table.selection.map(item => item.id)).then(res => {
ElMessage({
type: 'success',
message: '删除成功!'
})
tableStore.index()
})
})
}
}
const exportFn = () => {
@@ -264,7 +264,7 @@ const exportFn = () => {
/**取消流程操作*/
const cancelLeave = async (row: any) => {
// 二次确认
const {value} = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputType: 'textarea',
@@ -307,20 +307,20 @@ onMounted(() => {
})
})
watch(
() => currentRoute.value.path,
() => {
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
tableStore.index()
flag.value = false
}
},
{
deep: true
() => currentRoute.value.path,
() => {
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
tableStore.index()
flag.value = false
}
},
{
deep: true
}
)
const props = defineProps({id: {type: String, default: 'null'}})
const props = defineProps({ id: { type: String, default: 'null' } })
watch(() => props.id, async (newValue, oldValue) => {
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
const fullId = newValue.split('@')[0]
@@ -330,7 +330,7 @@ watch(() => props.id, async (newValue, oldValue) => {
nextTick(() => {
planAddRef.value.open('重新发起计划', fullId, false)
})
}, {immediate: true})
}, { immediate: true })
</script>
<style scoped lang="scss"></style>

View File

@@ -34,7 +34,8 @@ 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') {
if (type == 'null') { }
else if (type == '1') {
activeName.value = '1'
} else {
activeName.value = '2'