修复普测调整带来的其他功能
This commit is contained in:
@@ -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'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -26,4 +26,15 @@ export const addSurveyTest = (data: any) => {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 针对有问题的现场测试发起告警单
|
||||
*/
|
||||
export const initiateWarningLeaflet = (id: string) => {
|
||||
return createAxios({
|
||||
url: MAPPING_PATH + '/initiateWarningLeaflet?id=' + id,
|
||||
method: 'GET'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
<template>
|
||||
<!-- <div> 普测结果 发起预告警单</div> -->
|
||||
<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>
|
||||
<Table ref='tableRef' />
|
||||
<testQuestionsForm ref='testQuestionsFormRef' />
|
||||
@@ -11,7 +19,7 @@ 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'
|
||||
import { initiateWarningLeaflet } from '@/api/supervision-boot/survey/test'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { useRouter } from 'vue-router'
|
||||
const { push } = useRouter()
|
||||
@@ -21,7 +29,7 @@ const TableHeaderRef = ref()
|
||||
const testQuestionsFormRef = ref()
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/generalSurvey/pageProblemSubstationBySurvey',
|
||||
url: '/supervision-boot/surveyTest/pageProblemSurvey',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
@@ -34,14 +42,13 @@ const tableStore = new TableStore({
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ field: 'orgName', title: '单位', minWidth: 120 },
|
||||
{ field: 'subName', title: '变电站', minWidth: 120 },
|
||||
{ field: 'planName', title: '普测计划名称', minWidth: 120 },
|
||||
{ field: 'planCreateTime', title: '计划生成时间', minWidth: 100 },
|
||||
{ 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: 'planComplateTime', title: '实际完成时间', minWidth: 100 },
|
||||
{ field: 'leader', title: '测试负责人', minWidth: 120 },
|
||||
{ field: 'completeTime', title: '实际完成时间', minWidth: 100 },
|
||||
{ field: 'completeBy', title: '测试负责人', minWidth: 120 },
|
||||
{
|
||||
title: '操作',
|
||||
minWidth: '180',
|
||||
@@ -65,7 +72,7 @@ const tableStore = new TableStore({
|
||||
title: '请确认发起发起告警单!'
|
||||
},
|
||||
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.searchValue = ''
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
onMounted(() => {
|
||||
@@ -101,8 +108,8 @@ onMounted(() => {
|
||||
/**
|
||||
* 发起告警单
|
||||
*/
|
||||
const initiateAlarm = async (id: string,subId:string) => {
|
||||
await initiateWarningLeaflet(id,subId)
|
||||
const initiateAlarm = async (id: string) => {
|
||||
await initiateWarningLeaflet(id)
|
||||
ElMessage.success('发起告警成功!')
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
|
||||
@@ -24,7 +24,9 @@ import TableHeader from '@/components/table/header/index.vue'
|
||||
import { onMounted, provide, ref } from 'vue'
|
||||
import { formatDate, formatPast2 } from '@/utils/formatTime'
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
const dictData = useDictData()
|
||||
const categoryOptionList = dictData.getBasicData('flow_category')
|
||||
|
||||
defineOptions({
|
||||
name: 'businessUser'
|
||||
@@ -47,7 +49,10 @@ const tableStore = new TableStore({
|
||||
}
|
||||
},
|
||||
{ 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',
|
||||
title: '流程状态',
|
||||
|
||||
Reference in New Issue
Block a user