修复普测调整带来的其他功能

This commit is contained in:
2024-06-04 14:59:10 +08:00
parent f0dfa0ceca
commit 4da7fe4407
4 changed files with 37 additions and 31 deletions

View File

@@ -1,17 +0,0 @@
import createAxios from '@/utils/request'
import { SUPERVISION_BOOT } from '@/utils/constantRequest'
const MAPPING_PATH = SUPERVISION_BOOT + '/generalSurvey'
/**
* 针对有问题的现场测试发起告警单
*/
export const initiateWarningLeaflet = (id: string, subId: string) => {
return createAxios({
url: MAPPING_PATH + '/initiateWarningLeaflet?id=' + id + '&subId=' + subId,
method: 'GET'
})
}

View File

@@ -26,4 +26,15 @@ export const addSurveyTest = (data: any) => {
}) })
} }
/**
* 针对有问题的现场测试发起告警单
*/
export const initiateWarningLeaflet = (id: string) => {
return createAxios({
url: MAPPING_PATH + '/initiateWarningLeaflet?id=' + id,
method: 'GET'
})
}

View File

@@ -1,6 +1,14 @@
<template> <template>
<!-- <div> 普测结果 发起预告警单</div> --> <!-- <div> 普测结果 发起预告警单</div> -->
<TableHeader datePicker ref='TableHeaderRef'> <TableHeader datePicker ref='TableHeaderRef'>
<template v-slot:select>
<el-form-item label='计划名称'>
<el-input
v-model='tableStore.table.params.searchValue'
placeholder='请输入计划名称'
></el-input>
</el-form-item>
</template>
</TableHeader> </TableHeader>
<Table ref='tableRef' /> <Table ref='tableRef' />
<testQuestionsForm ref='testQuestionsFormRef' /> <testQuestionsForm ref='testQuestionsFormRef' />
@@ -11,7 +19,7 @@ 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 testQuestionsForm from './form/testQuestionsForm.vue' import testQuestionsForm from './form/testQuestionsForm.vue'
import { initiateWarningLeaflet } from '@/api/supervision-boot/survey' import { initiateWarningLeaflet } from '@/api/supervision-boot/survey/test'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
const { push } = useRouter() const { push } = useRouter()
@@ -21,7 +29,7 @@ const TableHeaderRef = ref()
const testQuestionsFormRef = ref() const testQuestionsFormRef = ref()
const tableStore = new TableStore({ const tableStore = new TableStore({
url: '/supervision-boot/generalSurvey/pageProblemSubstationBySurvey', url: '/supervision-boot/surveyTest/pageProblemSurvey',
publicHeight: 65, publicHeight: 65,
method: 'POST', method: 'POST',
column: [ column: [
@@ -34,14 +42,13 @@ 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
} }
}, },
{ field: 'orgName', title: '单位', minWidth: 120 }, { field: 'planName', title: '普测计划', minWidth: 120 },
{ field: 'subName', title: '变电站', minWidth: 120 }, { field: 'deptName', title: '负责单位', minWidth: 120 },
{ field: 'planName', title: '普测计划名称', minWidth: 120 }, { field: 'substationName', title: '变电站', minWidth: 120 },
{ field: 'planCreateTime', title: '计划生成时间', minWidth: 100 },
{ field: 'planStartTime', title: '计划开始时间', minWidth: 100 }, { field: 'planStartTime', title: '计划开始时间', minWidth: 100 },
{ field: 'planEndTime', title: '计划结束时间', minWidth: 100 }, { field: 'planEndTime', title: '计划结束时间', minWidth: 100 },
{ field: 'planComplateTime', title: '实际完成时间', minWidth: 100 }, { field: 'completeTime', title: '实际完成时间', minWidth: 100 },
{ field: 'leader', title: '测试负责人', minWidth: 120 }, { field: 'completeBy', title: '测试负责人', minWidth: 120 },
{ {
title: '操作', title: '操作',
minWidth: '180', minWidth: '180',
@@ -65,7 +72,7 @@ const tableStore = new TableStore({
title: '请确认发起发起告警单!' title: '请确认发起发起告警单!'
}, },
click: row => { click: row => {
initiateAlarm(row.planNo,row.subId) initiateAlarm(row.id)
} }
}, },
{ {
@@ -91,7 +98,7 @@ const tableStore = new TableStore({
tableStore.table.params.currentPage = tableStore.table.params.pageNum tableStore.table.params.currentPage = tableStore.table.params.pageNum
} }
}) })
tableStore.table.params.searchValue = ''
provide('tableStore', tableStore) provide('tableStore', tableStore)
onMounted(() => { onMounted(() => {
@@ -101,8 +108,8 @@ onMounted(() => {
/** /**
* 发起告警单 * 发起告警单
*/ */
const initiateAlarm = async (id: string,subId:string) => { const initiateAlarm = async (id: string) => {
await initiateWarningLeaflet(id,subId) await initiateWarningLeaflet(id)
ElMessage.success('发起告警成功!') ElMessage.success('发起告警成功!')
// 加载数据 // 加载数据
tableStore.index() tableStore.index()

View File

@@ -24,7 +24,9 @@ import TableHeader from '@/components/table/header/index.vue'
import { onMounted, provide, ref } from 'vue' import { onMounted, provide, ref } from 'vue'
import { formatDate, formatPast2 } from '@/utils/formatTime' import { formatDate, formatPast2 } from '@/utils/formatTime'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { useDictData } from '@/stores/dictData'
const dictData = useDictData()
const categoryOptionList = dictData.getBasicData('flow_category')
defineOptions({ defineOptions({
name: 'businessUser' name: 'businessUser'
@@ -47,7 +49,10 @@ const tableStore = new TableStore({
} }
}, },
{ title: '任务名称', field: 'name', minWidth: 130 }, { title: '任务名称', field: 'name', minWidth: 130 },
{ title: '流程分类', field: 'category', minWidth: 130 }, { title: '流程分类', field: 'category', minWidth: 130 ,
formatter: (row: any) => {
return categoryOptionList.filter(item => item.id === row.cellValue)[0]?.name
}},
{ {
field: 'status', field: 'status',
title: '流程状态', title: '流程状态',