流程审核不通过,在我的待办中直接跳转
This commit is contained in:
@@ -1,37 +1,38 @@
|
||||
<template>
|
||||
<!-- <div> 普测结果 发起预告警单</div> -->
|
||||
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
||||
<template v-slot:select>
|
||||
<el-form-item label="计划名称">
|
||||
<el-input
|
||||
style="width: 200px"
|
||||
v-model="tableStore.table.params.searchValue"
|
||||
clearable
|
||||
placeholder="请输入计划名称"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<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>
|
||||
<!-- <div> 普测结果 发起预告警单</div> -->
|
||||
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
||||
<template v-slot:select>
|
||||
<el-form-item label="计划名称">
|
||||
<el-input
|
||||
style="width: 200px"
|
||||
v-model="tableStore.table.params.searchValue"
|
||||
clearable
|
||||
placeholder="请输入计划名称"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<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()
|
||||
@@ -39,118 +40,119 @@ const dialogVisible = ref(false)
|
||||
const detailId = ref('')
|
||||
const testQuestionsFormRef = ref()
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/surveyTest/pageProblemSurvey',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
url: '/supervision-boot/surveyTest/pageProblemSurvey',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{
|
||||
title: '序号',
|
||||
type: 'seq',
|
||||
align: 'center',
|
||||
width: 60,
|
||||
formatter: (row: any) => {
|
||||
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: 'createBy',
|
||||
title: '填报人',
|
||||
minWidth: 80,
|
||||
formatter: (row: any) => {
|
||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
minWidth: '180',
|
||||
align: 'center',
|
||||
render: 'buttons',
|
||||
fixed: 'right',
|
||||
buttons: [
|
||||
{
|
||||
title: '序号',
|
||||
type: 'seq',
|
||||
align: 'center',
|
||||
width: 60,
|
||||
formatter: (row: any) => {
|
||||
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: 'createBy',
|
||||
title: '填报人',
|
||||
minWidth: 80,
|
||||
formatter: (row: any) => {
|
||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
name: 'edit',
|
||||
title: '详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
|
||||
click: async row => {
|
||||
dialogVisible.value = true
|
||||
detailId.value = row.id
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
minWidth: '180',
|
||||
align: 'center',
|
||||
render: 'buttons',
|
||||
fixed: 'right',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
name: 'edit',
|
||||
title: '发起告警单',
|
||||
type: 'warning',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.initiateWarningFlag == 1
|
||||
},
|
||||
|
||||
click: async row => {
|
||||
dialogVisible.value = true
|
||||
detailId.value = row.id
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '发起告警单',
|
||||
type: 'warning',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.initiateWarningFlag == 1
|
||||
},
|
||||
click: async row => {
|
||||
const {value} = await ElMessageBox.prompt('', '整改意见', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
|
||||
click: async row => {
|
||||
const { value } = await ElMessageBox.prompt('', '整改意见', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
|
||||
inputType: 'textarea',
|
||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||
inputErrorMessage: '请输入整改意见'
|
||||
})
|
||||
initiateWarningLeaflet({ id: row.id, reformAdvice: value }).then(res => {
|
||||
ElMessage.success('发起告警成功!')
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '查看告警单',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.initiateWarningFlag == 0
|
||||
},
|
||||
click: row => {
|
||||
router.push({
|
||||
name: 'supervision/supervision/manage',
|
||||
state: {
|
||||
type: 1
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
inputType: 'textarea',
|
||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||
inputErrorMessage: '请输入整改意见'
|
||||
})
|
||||
initiateWarningLeaflet({id: row.id, reformAdvice: value}).then(res => {
|
||||
ElMessage.success('发起告警成功!')
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '查看告警单',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.initiateWarningFlag == 0
|
||||
},
|
||||
click: row => {
|
||||
router.push({
|
||||
name: 'supervision/supervision/manage',
|
||||
query: {
|
||||
type: 1,
|
||||
t: Date.now()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
||||
}
|
||||
})
|
||||
tableStore.table.params.searchValue = ''
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
tableStore.index()
|
||||
})
|
||||
|
||||
/**
|
||||
* 发起告警单
|
||||
*/
|
||||
const initiateAlarm = async (id: string) => {
|
||||
await initiateWarningLeaflet(id)
|
||||
ElMessage.success('发起告警成功!')
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
await initiateWarningLeaflet(id)
|
||||
ElMessage.success('发起告警成功!')
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user