技术监督计划调整,增加监督类型
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
<el-tab-pane label="用户投诉" name="2">
|
<el-tab-pane label="用户投诉" name="2">
|
||||||
<complaints v-if="activeName == '2'" />
|
<complaints v-if="activeName == '2'" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="普测问题" name="3">
|
<el-tab-pane label="计划问题" name="3">
|
||||||
<testQuestions v-if="activeName == '3'" />
|
<testQuestions v-if="activeName == '3'" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<!-- <el-tabs v-model="activeName" type="border-card">
|
<!-- <el-tabs v-model="activeName" type="border-card">
|
||||||
|
|||||||
@@ -1,12 +1,25 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog draggable :title="title" v-model="planAddition" width="500px" :before-close="cancelFn">
|
<el-dialog draggable :title="title" v-model="planAddition" width="500px" :before-close="cancelFn">
|
||||||
<el-form :model="form" ref="formRef" :rules="rules" label-width="auto" scroll-to-error :validate-on-rule-change="false" class="form-one">
|
<el-form :model="form" ref="formRef" :rules="rules" label-width="auto" scroll-to-error :validate-on-rule-change="false" class="form-one">
|
||||||
<el-form-item for="-" label="普测负责单位:">
|
<el-form-item for="-" label="计划负责单位:">
|
||||||
<Area v-model="form.deptId" />
|
<Area v-model="form.deptId" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item for="-" label="计划名称:" prop="planName">
|
<el-form-item for="-" label="计划名称:" prop="planName">
|
||||||
<el-input v-model="form.planName" placeholder="请输入计划名称"></el-input>
|
<el-input v-model="form.planName" placeholder="请输入计划名称"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="监督类型:" prop="supvType" >
|
||||||
|
<el-select v-model="form.supvType" placeholder="请选择监督类型" style="width: 100%">
|
||||||
|
<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 for="-" label="监督对象名称:" prop="supvObjectName">
|
||||||
|
<el-input v-model="form.supvObjectName" placeholder="请输入监督对象名称"></el-input>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item for="-" label="计划开始时间:" prop="planStartTime">
|
<el-form-item for="-" label="计划开始时间:" prop="planStartTime">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="form.planStartTime"
|
v-model="form.planStartTime"
|
||||||
@@ -129,6 +142,7 @@ import { useDictData } from '@/stores/dictData'
|
|||||||
const emit = defineEmits(['onsubmit'])
|
const emit = defineEmits(['onsubmit'])
|
||||||
|
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
|
const supvTypeOptionList = dictData.getBasicData('supv_type')
|
||||||
const title = ref('')
|
const title = ref('')
|
||||||
const planAddition = ref(false)
|
const planAddition = ref(false)
|
||||||
const defaultProps = ref({
|
const defaultProps = ref({
|
||||||
@@ -161,7 +175,9 @@ const treeRef = ref()
|
|||||||
const rules = ref({
|
const rules = ref({
|
||||||
planStartTime: [{ required: true, message: '选择计划开始时间', trigger: 'change' }],
|
planStartTime: [{ required: true, message: '选择计划开始时间', trigger: 'change' }],
|
||||||
planEndTime: [{ required: true, message: '选择计划结束时间', trigger: 'change' }],
|
planEndTime: [{ required: true, message: '选择计划结束时间', trigger: 'change' }],
|
||||||
|
supvType: [{ required: true, message: '请选择监督类型', trigger: 'change' }],
|
||||||
planComplateTime: [{ required: true, message: '选择实际完成时间 ', trigger: 'change' }],
|
planComplateTime: [{ required: true, message: '选择实际完成时间 ', trigger: 'change' }],
|
||||||
|
supvObjectName: [{ required: true, message: '请输入计划名称', trigger: 'blur' }],
|
||||||
planName: [{ required: true, message: '请输入计划名称', trigger: 'blur' }],
|
planName: [{ required: true, message: '请输入计划名称', trigger: 'blur' }],
|
||||||
leader: [{ required: true, message: '请输入测试负责人', trigger: 'blur' }],
|
leader: [{ required: true, message: '请输入测试负责人', trigger: 'blur' }],
|
||||||
substation: [{ required: true, message: '请选择关联电站', trigger: 'change' }]
|
substation: [{ required: true, message: '请选择关联电站', trigger: 'change' }]
|
||||||
@@ -214,7 +230,7 @@ const audit = (filePath: any) => {
|
|||||||
if (form.value.customSubstationFlag == 0) {
|
if (form.value.customSubstationFlag == 0) {
|
||||||
addForm.substation = addForm.substation.join(',')
|
addForm.substation = addForm.substation.join(',')
|
||||||
}
|
}
|
||||||
if(title.value == '普测计划新增'){
|
if(title.value == '计划新增'){
|
||||||
addSurveyPlan(addForm).then(res => {
|
addSurveyPlan(addForm).then(res => {
|
||||||
cancelFn()
|
cancelFn()
|
||||||
emit('onsubmit')
|
emit('onsubmit')
|
||||||
|
|||||||
@@ -1,27 +1,27 @@
|
|||||||
<template>
|
<template>
|
||||||
<TableHeader area datePicker ref="TableHeaderRef">
|
<TableHeader area datePicker ref='TableHeaderRef'>
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="审核状态">
|
<el-form-item label='审核状态'>
|
||||||
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择审核状态">
|
<el-select v-model='tableStore.table.params.status' clearable placeholder='请选择审核状态'>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in statusSelect"
|
v-for='item in statusSelect'
|
||||||
:key="item.id"
|
:key='item.id'
|
||||||
:label="item.name"
|
:label='item.name'
|
||||||
:value="item.id"
|
:value='item.id'
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新增计划</el-button>
|
<el-button icon='el-icon-Plus' type='primary' @click='add'>新增计划</el-button>
|
||||||
<!-- <el-button icon="el-icon-Download" type="primary" @click="exportFn">导出</el-button> -->
|
<!-- <el-button icon="el-icon-Download" type="primary" @click="exportFn">导出</el-button> -->
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" />
|
<Table ref='tableRef' />
|
||||||
<!-- 新增 -->
|
<!-- 新增 -->
|
||||||
<planAdd ref="planAddRef" @onsubmit="tableStore.index()" :openType="openType" />
|
<planAdd ref='planAddRef' @onsubmit='tableStore.index()' :openType='openType' />
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang='ts'>
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
//获取登陆用户姓名和部门
|
//获取登陆用户姓名和部门
|
||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
@@ -36,7 +36,9 @@ import { useRouter } from 'vue-router'
|
|||||||
import { queryPlan, removeSurvey } from '@/api/process-boot/generalTest'
|
import { queryPlan, removeSurvey } from '@/api/process-boot/generalTest'
|
||||||
import { getUserByRoleType } from '@/api/user-boot/user'
|
import { getUserByRoleType } from '@/api/user-boot/user'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
|
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
|
const supvTypeOptionList = dictData.getBasicData('supv_type')
|
||||||
const statusSelect = dictData.statusSelect()
|
const statusSelect = dictData.statusSelect()
|
||||||
const { push, options, currentRoute } = useRouter()
|
const { push, options, currentRoute } = useRouter()
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
@@ -48,193 +50,212 @@ const auditUser = ref('')
|
|||||||
const flag = ref(false)
|
const flag = ref(false)
|
||||||
const openType = ref('create')
|
const openType = ref('create')
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/supervision-boot/surveyPlan/surveyPlanPage',
|
url: '/supervision-boot/surveyPlan/surveyPlanPage',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
|
{
|
||||||
|
title: '序号',
|
||||||
|
width: 60,
|
||||||
|
formatter: (row: any) => {
|
||||||
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'planName',
|
||||||
|
title: '计划名称',
|
||||||
|
minWidth: 130
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'supvType',
|
||||||
|
title: '监督类型',
|
||||||
|
minWidth: 130,
|
||||||
|
formatter: (row: any) => {
|
||||||
|
return supvTypeOptionList.filter(item => item.id === row.cellValue)[0]?.name
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'supvObjectName',
|
||||||
|
minWidth: 130,
|
||||||
|
title: '监督对象名称'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'deptName',
|
||||||
|
minWidth: 130,
|
||||||
|
title: '负责单位'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'substation',
|
||||||
|
title: '变电站',
|
||||||
|
minWidth: 110,
|
||||||
|
formatter: (row: any) => {
|
||||||
|
return row.cellValue
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
{ field: 'planStartTime', minWidth: 130,title: '计划开始时间' },
|
||||||
|
{ field: 'planEndTime', minWidth: 130,title: '计划结束时间' },
|
||||||
|
{
|
||||||
|
field: 'status',
|
||||||
|
title: '计划状态',
|
||||||
|
render: 'tag',
|
||||||
|
minWidth: 80,
|
||||||
|
custom: {
|
||||||
|
1: 'primary',
|
||||||
|
2: 'success',
|
||||||
|
3: 'danger',
|
||||||
|
4: 'warning'
|
||||||
|
},
|
||||||
|
replaceValue: {
|
||||||
|
1: '审批中',
|
||||||
|
2: '审批通过',
|
||||||
|
3: '审批不通过',
|
||||||
|
4: '已取消'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'createBy',
|
||||||
|
title: '填报人',
|
||||||
|
minWidth: 80,
|
||||||
|
formatter: (row: any) => {
|
||||||
|
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
minWidth: '180',
|
||||||
|
fixed:'right',
|
||||||
|
render: 'buttons',
|
||||||
|
buttons: [
|
||||||
{
|
{
|
||||||
title: '序号',
|
name: 'productSetting',
|
||||||
width: 60,
|
title: '流程详情',
|
||||||
formatter: (row: any) => {
|
type: 'primary',
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
icon: 'el-icon-EditPen',
|
||||||
}
|
render: 'basicButton',
|
||||||
|
click: row => {
|
||||||
|
flag.value = true
|
||||||
|
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'deptName',
|
name: 'edit',
|
||||||
title: '负责单位'
|
title: '重新发起',
|
||||||
|
type: 'warning',
|
||||||
|
icon: 'el-icon-Open',
|
||||||
|
render: 'basicButton',
|
||||||
|
disabled: row => {
|
||||||
|
return row.createBy != adminInfo.$state.id || row.status == 1 || row.status == 2
|
||||||
|
},
|
||||||
|
click: row => {
|
||||||
|
// deviceQuitPopup.value.open('重新发起退运', row)
|
||||||
|
planAddRef.value.open('重新发起计划', row.id)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'substation',
|
name: 'cancel',
|
||||||
title: '变电站',
|
title: '取消',
|
||||||
formatter: (row: any) => {
|
type: 'danger',
|
||||||
return row.cellValue
|
icon: 'el-icon-Open',
|
||||||
}
|
render: 'basicButton',
|
||||||
},
|
disabled: row => {
|
||||||
{
|
return row.createBy != adminInfo.$state.id || row.status == 3 || row.status == 2 || row.status == 4
|
||||||
field: 'planName',
|
},
|
||||||
title: '普测计划'
|
click: row => {
|
||||||
},
|
cancelLeave(row)
|
||||||
{ field: 'planStartTime', title: '计划开始时间' },
|
}
|
||||||
{ field: 'planEndTime', title: '计划结束时间' },
|
|
||||||
{
|
|
||||||
field: 'status',
|
|
||||||
title: '计划状态',
|
|
||||||
render: 'tag',
|
|
||||||
custom: {
|
|
||||||
1: 'primary',
|
|
||||||
2: 'success',
|
|
||||||
3: 'danger',
|
|
||||||
4: 'warning'
|
|
||||||
},
|
|
||||||
replaceValue: {
|
|
||||||
1: '审批中',
|
|
||||||
2: '审批通过',
|
|
||||||
3: '审批不通过',
|
|
||||||
4: '已取消'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'createBy',
|
|
||||||
title: '填报人',
|
|
||||||
minWidth: 80,
|
|
||||||
formatter: (row: any) => {
|
|
||||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '操作',
|
|
||||||
width: '180',
|
|
||||||
render: 'buttons',
|
|
||||||
buttons: [
|
|
||||||
{
|
|
||||||
name: 'productSetting',
|
|
||||||
title: '流程详情',
|
|
||||||
type: 'primary',
|
|
||||||
icon: 'el-icon-EditPen',
|
|
||||||
render: 'basicButton',
|
|
||||||
click: row => {
|
|
||||||
flag.value = true
|
|
||||||
handleAudit(row.processInstanceId,row.historyInstanceId)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'edit',
|
|
||||||
title: '重新发起',
|
|
||||||
type: 'warning',
|
|
||||||
icon: 'el-icon-Open',
|
|
||||||
render: 'basicButton',
|
|
||||||
disabled: row => {
|
|
||||||
return row.createBy != adminInfo.$state.id || row.status == 1 || row.status == 2
|
|
||||||
},
|
|
||||||
click: row => {
|
|
||||||
// deviceQuitPopup.value.open('重新发起退运', row)
|
|
||||||
planAddRef.value.open('重新发起计划', row.id)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'cancel',
|
|
||||||
title: '取消',
|
|
||||||
type: 'danger',
|
|
||||||
icon: 'el-icon-Open',
|
|
||||||
render: 'basicButton',
|
|
||||||
disabled: row => {
|
|
||||||
return row.createBy != adminInfo.$state.id || row.status == 3 || row.status == 2 || row.status == 4
|
|
||||||
},
|
|
||||||
click: row => {
|
|
||||||
cancelLeave(row)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
beforeSearchFun: () => {
|
|
||||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
|
||||||
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
beforeSearchFun: () => {
|
||||||
|
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||||
|
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
tableStore.table.params.status = ''
|
tableStore.table.params.status = ''
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
// 新增计划
|
// 新增计划
|
||||||
const add = () => {
|
const add = () => {
|
||||||
// title.value = '普测计划新增'
|
// title.value = '普测计划新增'
|
||||||
planAddRef.value.open('普测计划新增')
|
planAddRef.value.open('计划新增')
|
||||||
}
|
}
|
||||||
|
|
||||||
const exportFn = () => {
|
const exportFn = () => {
|
||||||
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
||||||
form.pageNum = 1
|
form.pageNum = 1
|
||||||
form.pageSize = tableStore.table.total
|
form.pageSize = tableStore.table.total
|
||||||
queryPlan(form).then(res => {
|
queryPlan(form).then(res => {
|
||||||
tableRef.value.getRef().exportData({
|
tableRef.value.getRef().exportData({
|
||||||
filename: '普测计划', // 文件名字
|
filename: '计划', // 文件名字
|
||||||
sheetName: 'Sheet1',
|
sheetName: 'Sheet1',
|
||||||
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
||||||
useStyle: true,
|
useStyle: true,
|
||||||
data: res.data.records, // 数据源 // 过滤那个字段导出
|
data: res.data.records, // 数据源 // 过滤那个字段导出
|
||||||
columnFilterMethod: function (column: any) {
|
columnFilterMethod: function(column: any) {
|
||||||
return !(column.$columnIndex === 0)
|
return !(column.$columnIndex === 0)
|
||||||
}
|
}
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/**取消流程操作*/
|
/**取消流程操作*/
|
||||||
const cancelLeave = async (row: any) => {
|
const cancelLeave = async (row: any) => {
|
||||||
// 二次确认
|
// 二次确认
|
||||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||||
inputErrorMessage: '取消原因不能为空'
|
inputErrorMessage: '取消原因不能为空'
|
||||||
})
|
})
|
||||||
// 发起取消
|
// 发起取消
|
||||||
let data = {
|
let data = {
|
||||||
id: row.id,
|
id: row.id,
|
||||||
processInstanceId: row.processInstanceId,
|
processInstanceId: row.processInstanceId,
|
||||||
reason: value
|
reason: value
|
||||||
}
|
}
|
||||||
await cancel(data)
|
await cancel(data)
|
||||||
ElMessage.success('取消成功')
|
ElMessage.success('取消成功')
|
||||||
// 加载数据
|
// 加载数据
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
auditUser.value = ''
|
auditUser.value = ''
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 处理审批按钮 */
|
/** 处理审批按钮 */
|
||||||
const handleAudit = (instanceId: string,historyInstanceId:string) => {
|
const handleAudit = (instanceId: string, historyInstanceId: string) => {
|
||||||
push({
|
push({
|
||||||
name: 'BpmProcessInstanceDetail',
|
name: 'BpmProcessInstanceDetail',
|
||||||
state: {
|
state: {
|
||||||
id: instanceId,
|
id: instanceId,
|
||||||
historyInstanceId
|
historyInstanceId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 取消
|
// 取消
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
getUserByRoleType(3).then(res => {
|
getUserByRoleType(3).then(res => {
|
||||||
auditList.value = res.data
|
auditList.value = res.data
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
watch(
|
watch(
|
||||||
() => currentRoute.value.path,
|
() => currentRoute.value.path,
|
||||||
() => {
|
() => {
|
||||||
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
flag.value = false
|
flag.value = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
deep: true
|
deep: true
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang='scss'></style>
|
||||||
|
|||||||
@@ -1,76 +1,82 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog draggable :title="title" v-model="planAddition" width="500px" :before-close="cancelFn">
|
<el-dialog draggable :title='title' v-model='planAddition' :before-close='cancelFn'>
|
||||||
<el-form :model="form" ref="formRef" :rules="rules" label-width="auto" class="form-one" scroll-to-error>
|
<el-form :model='form' ref='formRef' :rules='rules' label-width='auto' class='form-two' scroll-to-error>
|
||||||
<el-form-item label="普测负责单位:">
|
<el-form-item label='计划负责单位:'>
|
||||||
<el-input v-model="form.deptName" disabled></el-input>
|
<el-input v-model='form.deptName' disabled></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="计划名称:" prop="planName">
|
<el-form-item label='计划名称:' prop='planName'>
|
||||||
<el-input v-model="form.planName" disabled></el-input>
|
<el-input v-model='form.planName' disabled></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="计划开始时间:" prop="planStartTime">
|
<el-form-item label='监督类型:'>
|
||||||
<el-input v-model="form.planStartTime" disabled></el-input>
|
<el-input v-model='form.supvType' disabled></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="计划结束时间:" prop="planEndTime">
|
<el-form-item label='监督对象名称:'>
|
||||||
<el-input v-model="form.planEndTime" disabled></el-input>
|
<el-input v-model='form.supvObjectName' disabled></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item for="-" label="测试变电站:" prop="subIds" style="display: flex; align-items: center">
|
<el-form-item label='计划开始时间:' prop='planStartTime'>
|
||||||
<el-input v-model="form.substationName" disabled />
|
<el-input v-model='form.planStartTime' disabled></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="实际完成时间:" prop="completeTime">
|
<el-form-item label='计划结束时间:' prop='planEndTime'>
|
||||||
<el-date-picker
|
<el-input v-model='form.planEndTime' disabled></el-input>
|
||||||
v-model="form.completeTime"
|
</el-form-item>
|
||||||
type="date"
|
<el-form-item for='-' label='测试变电站:' prop='subIds' style='display: flex; align-items: center'>
|
||||||
placeholder="选择实际完成时间"
|
<el-input v-model='form.substationName' disabled />
|
||||||
value-format="YYYY-MM-DD"
|
</el-form-item>
|
||||||
></el-date-picker>
|
<el-form-item label='实际完成时间:' prop='completeTime'>
|
||||||
</el-form-item>
|
<el-date-picker
|
||||||
<el-form-item for="-" label="测试负责人:" prop="leader">
|
v-model='form.completeTime'
|
||||||
<el-input v-model="form.completeBy" placeholder="请输入测试负责人"></el-input>
|
type='date'
|
||||||
</el-form-item>
|
placeholder='选择实际完成时间'
|
||||||
<el-form-item for="-" class="uploadFile" label="普测报告:" prop="testReport">
|
value-format='YYYY-MM-DD'
|
||||||
<el-upload
|
></el-date-picker>
|
||||||
ref="uploadRef"
|
</el-form-item>
|
||||||
v-model:file-list="form.testReport"
|
<el-form-item for='-' label='测试负责人:' prop='leader'>
|
||||||
action=""
|
<el-input v-model='form.completeBy' placeholder='请输入测试负责人'></el-input>
|
||||||
:accept="acceptType"
|
</el-form-item>
|
||||||
:limit="1"
|
<el-form-item for='-' class='uploadFile' label='计划测试报告:' prop='testReport'>
|
||||||
:on-exceed="handleExceed"
|
<el-upload
|
||||||
:on-change="choose"
|
ref='uploadRef'
|
||||||
:auto-upload="false"
|
v-model:file-list='form.testReport'
|
||||||
:on-progress="uploadFileName('testReport')"
|
action=''
|
||||||
>
|
:accept='acceptType'
|
||||||
<template #trigger>
|
:limit='1'
|
||||||
<el-button type="primary">上传文件</el-button>
|
:on-exceed='handleExceed'
|
||||||
</template>
|
:on-change='choose'
|
||||||
</el-upload>
|
:auto-upload='false'
|
||||||
</el-form-item>
|
:on-progress="uploadFileName('testReport')"
|
||||||
<el-form-item for="-" label="测试是否有问题:" prop="problemFlag">
|
>
|
||||||
<!-- 默认值 否 -->
|
<template #trigger>
|
||||||
<el-radio-group v-model="form.problemFlag">
|
<el-button type='primary'>上传文件</el-button>
|
||||||
<el-radio :value="1">是</el-radio>
|
</template>
|
||||||
<el-radio :value="0">否</el-radio>
|
</el-upload>
|
||||||
</el-radio-group>
|
</el-form-item>
|
||||||
</el-form-item>
|
<el-form-item for='-' label='测试是否有问题:' prop='problemFlag'>
|
||||||
<el-form-item
|
<!-- 默认值 否 -->
|
||||||
style="width: 100%"
|
<el-radio-group v-model='form.problemFlag'>
|
||||||
for="-"
|
<el-radio :value='1'>是</el-radio>
|
||||||
label="问题描述:"
|
<el-radio :value='0'>否</el-radio>
|
||||||
prop="problemDetail"
|
</el-radio-group>
|
||||||
v-if="form.problemFlag == '1'"
|
</el-form-item>
|
||||||
>
|
<el-form-item
|
||||||
<el-input type="textarea" v-model="form.problemDetail" placeholder="请输入问题描述"></el-input>
|
style='width: 100%'
|
||||||
</el-form-item>
|
for='-'
|
||||||
<!-- </el-form> -->
|
label='问题描述:'
|
||||||
</el-form>
|
prop='problemDetail'
|
||||||
<template #footer>
|
v-if="form.problemFlag == '1'"
|
||||||
<div class="dialog-footer">
|
>
|
||||||
<el-button @click="cancelFn">取消</el-button>
|
<el-input type='textarea' v-model='form.problemDetail' placeholder='请输入问题描述'></el-input>
|
||||||
<el-button type="primary" @click="submitFn">确定</el-button>
|
</el-form-item>
|
||||||
</div>
|
<!-- </el-form> -->
|
||||||
</template>
|
</el-form>
|
||||||
</el-dialog>
|
<template #footer>
|
||||||
|
<div class='dialog-footer'>
|
||||||
|
<el-button @click='cancelFn'>取消</el-button>
|
||||||
|
<el-button type='primary' @click='submitFn'>确定</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang='ts'>
|
||||||
import { ref, inject, nextTick } from 'vue'
|
import { ref, inject, nextTick } from 'vue'
|
||||||
import { addSurvey, auditSurvey } from '@/api/process-boot/generalTest'
|
import { addSurvey, auditSurvey } from '@/api/process-boot/generalTest'
|
||||||
import TableStore from '@/utils/tableStore' // 若不是列表页面弹框可删除
|
import TableStore from '@/utils/tableStore' // 若不是列表页面弹框可删除
|
||||||
@@ -78,6 +84,7 @@ import { ElMessage, genFileId, UploadProps, UploadRawFile, UploadUserFile } from
|
|||||||
import { uploadFile, getFileNameAndFilePath } from '@/api/system-boot/file'
|
import { uploadFile, getFileNameAndFilePath } from '@/api/system-boot/file'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import { addSurveyTest, updateSurveyTest, getTestById } from '@/api/supervision-boot/survey/test'
|
import { addSurveyTest, updateSurveyTest, getTestById } from '@/api/supervision-boot/survey/test'
|
||||||
|
|
||||||
const acceptType = ref('')
|
const acceptType = ref('')
|
||||||
const tableStore = inject('tableStore') as TableStore
|
const tableStore = inject('tableStore') as TableStore
|
||||||
let uploadName = ref('')
|
let uploadName = ref('')
|
||||||
@@ -86,21 +93,22 @@ const uploadRef = ref()
|
|||||||
const fileList = ref<UploadUserFile[]>([])
|
const fileList = ref<UploadUserFile[]>([])
|
||||||
const emit = defineEmits(['onsubmit'])
|
const emit = defineEmits(['onsubmit'])
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
|
const supvTypeOptionList = dictData.getBasicData('supv_type')
|
||||||
const addFlagRef = ref(true)
|
const addFlagRef = ref(true)
|
||||||
const title = ref('')
|
const title = ref('')
|
||||||
const planAddition = ref(false)
|
const planAddition = ref(false)
|
||||||
const form: any = ref({
|
const form: any = ref({
|
||||||
id: '',
|
id: '',
|
||||||
deptName: '',
|
deptName: '',
|
||||||
planStartTime: '',
|
planStartTime: '',
|
||||||
planEndTime: '',
|
planEndTime: '',
|
||||||
planName: '',
|
planName: '',
|
||||||
substationName: '',
|
substationName: '',
|
||||||
completeTime: '',
|
completeTime: '',
|
||||||
completeBy: '',
|
completeBy: '',
|
||||||
testReport: [],
|
testReport: [],
|
||||||
problemDetail: '', //测试问题
|
problemDetail: '', //测试问题
|
||||||
problemFlag: 0 //是否有问题
|
problemFlag: 0 //是否有问题
|
||||||
})
|
})
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -108,47 +116,49 @@ const form: any = ref({
|
|||||||
* 为false,则为修改测试数据,重新发起流程
|
* 为false,则为修改测试数据,重新发起流程
|
||||||
*/
|
*/
|
||||||
const open = async (text: string, id: string, addFlag: boolean) => {
|
const open = async (text: string, id: string, addFlag: boolean) => {
|
||||||
title.value = text
|
title.value = text
|
||||||
formRef.value?.resetFields()
|
formRef.value?.resetFields()
|
||||||
addFlagRef.value = addFlag
|
addFlagRef.value = addFlag
|
||||||
console.log(addFlag, '8888888888')
|
//根据测试id获取数据
|
||||||
//根据测试id获取数据
|
await getTestById(id).then(res => {
|
||||||
await getTestById(id).then(res => {
|
//如果是新增,则只需将计划的一些信息回显即可
|
||||||
//如果是新增,则只需将计划的一些信息回显即可
|
form.value.id = id
|
||||||
form.value.id = id
|
form.value.deptName = res.data.deptName
|
||||||
form.value.deptName = res.data.deptName
|
form.value.planStartTime = res.data.planStartTime
|
||||||
form.value.planStartTime = res.data.planStartTime
|
form.value.planEndTime = res.data.planEndTime
|
||||||
form.value.planEndTime = res.data.planEndTime
|
form.value.planName = res.data.planName
|
||||||
form.value.planName = res.data.planName
|
form.value.supvType = supvTypeOptionList.find(item => {
|
||||||
form.value.substationName = res.data.substationName
|
return item.id == res.data.supvType
|
||||||
//部分清空
|
})?.name
|
||||||
// uploadRef.value?.clearFiles()
|
form.value.supvObjectName = res.data.supvObjectName
|
||||||
form.value.completeTime = ''
|
form.value.substationName = res.data.substationName
|
||||||
form.value.completeBy = ''
|
//部分清空
|
||||||
form.value.testReport = []
|
// uploadRef.value?.clearFiles()
|
||||||
form.value.problemDetail = ''
|
form.value.completeTime = ''
|
||||||
form.value.problemFlag = '0'
|
form.value.completeBy = ''
|
||||||
fileList.value = []
|
form.value.testReport = []
|
||||||
if (!addFlag) {
|
form.value.problemDetail = ''
|
||||||
//还需回显上次填报的测试数据 todo...,待重新发起的时候去做
|
form.value.problemFlag = 0
|
||||||
console.log(res, '999999999')
|
fileList.value = []
|
||||||
form.value = {
|
if (!addFlag) {
|
||||||
...form.value,
|
//还需回显上次填报的测试数据 todo...,待重新发起的时候去做
|
||||||
completeTime: res.data.completeTime,
|
form.value = {
|
||||||
completeBy: res.data.completeBy,
|
...form.value,
|
||||||
problemFlag: res.data.problemFlag,
|
completeTime: res.data.completeTime,
|
||||||
testReport: [
|
completeBy: res.data.completeBy,
|
||||||
{
|
problemFlag: res.data.problemFlag,
|
||||||
name: res.data.testReport.split('/')[2]
|
testReport: [
|
||||||
}
|
{
|
||||||
],
|
name: res.data.testReport.split('/')[2]
|
||||||
problemDetail:res.data.problemDetail
|
}
|
||||||
}
|
],
|
||||||
testReport.value=res.data.testReport;
|
problemDetail: res.data.problemDetail
|
||||||
}
|
}
|
||||||
})
|
testReport.value = res.data.testReport
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
planAddition.value = true
|
planAddition.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
//处理成效报告
|
//处理成效报告
|
||||||
@@ -156,84 +166,84 @@ const testReport = ref('')
|
|||||||
|
|
||||||
const formRef = ref()
|
const formRef = ref()
|
||||||
const rules = {
|
const rules = {
|
||||||
completeTime: [{ required: true, message: '选择实际完成时间 ', trigger: 'change' }],
|
completeTime: [{ required: true, message: '选择实际完成时间 ', trigger: 'change' }],
|
||||||
completeBy: [{ required: true, message: '请输入测试负责人', trigger: 'blur' }],
|
completeBy: [{ required: true, message: '请输入测试负责人', trigger: 'blur' }],
|
||||||
testReport: [{ required: true, message: '请上传文件', trigger: 'change' }],
|
testReport: [{ required: true, message: '请上传文件', trigger: 'change' }],
|
||||||
problemFlag: [{ required: true, message: '请选择测试是否有问题', trigger: 'change' }],
|
problemFlag: [{ required: true, message: '请选择测试是否有问题', trigger: 'change' }],
|
||||||
problemDetail: [{ required: true, message: '请输入测试问题', trigger: 'blur' }]
|
problemDetail: [{ required: true, message: '请输入测试问题', trigger: 'blur' }]
|
||||||
}
|
}
|
||||||
const cancelFn = () => {
|
const cancelFn = () => {
|
||||||
formRef.value.resetFields()
|
formRef.value.resetFields()
|
||||||
planAddition.value = false
|
planAddition.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
// 提交
|
// 提交
|
||||||
const submitFn = () => {
|
const submitFn = () => {
|
||||||
formRef.value.validate(async (valid: any) => {
|
formRef.value.validate(async (valid: any) => {
|
||||||
if (!testReport.value) {
|
if (!testReport.value) {
|
||||||
return ElMessage({
|
return ElMessage({
|
||||||
message: '请上传处理成效报告',
|
message: '请上传处理成效报告',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if (valid) {
|
if (valid) {
|
||||||
const subForm = JSON.parse(JSON.stringify(form.value))
|
const subForm = JSON.parse(JSON.stringify(form.value))
|
||||||
subForm.testReport = testReport.value
|
subForm.testReport = testReport.value
|
||||||
if (addFlagRef) {
|
if (addFlagRef) {
|
||||||
//新增,则组装业务数据提交后台
|
//新增,则组装业务数据提交后台
|
||||||
await addSurveyTest(subForm)
|
await addSurveyTest(subForm)
|
||||||
//查询进线数据,避免一直处于loading状态
|
//查询进线数据,避免一直处于loading状态
|
||||||
ElMessage.success('申请成功')
|
ElMessage.success('申请成功')
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
planAddition.value = false
|
planAddition.value = false
|
||||||
} else {
|
} else {
|
||||||
await updateSurveyTest(subForm)
|
await updateSurveyTest(subForm)
|
||||||
//查询进线数据,避免一直处于loading状态
|
//查询进线数据,避免一直处于loading状态
|
||||||
ElMessage.success('重新申请成功')
|
ElMessage.success('重新申请成功')
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
planAddition.value = false
|
planAddition.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const audit = (filePath: any) => {
|
const audit = (filePath: any) => {
|
||||||
if (title.value == '普测计划新增') {
|
if (title.value == '计划测试填报') {
|
||||||
addSurvey({ ...form.value, filePath: filePath }).then((res: any) => {
|
addSurvey({ ...form.value, filePath: filePath }).then((res: any) => {
|
||||||
ElMessage.success('新增成功!')
|
ElMessage.success('新增成功!')
|
||||||
cancelFn()
|
cancelFn()
|
||||||
emit('onsubmit')
|
emit('onsubmit')
|
||||||
})
|
})
|
||||||
} else if (title.value == '重新发起计划') {
|
} else if (title.value == '重新发起计划') {
|
||||||
auditSurvey({ ...form.value, filePath: filePath }).then((res: any) => {
|
auditSurvey({ ...form.value, filePath: filePath }).then((res: any) => {
|
||||||
ElMessage.success('重新发起计划成功!')
|
ElMessage.success('重新发起计划成功!')
|
||||||
cancelFn()
|
cancelFn()
|
||||||
emit('onsubmit')
|
emit('onsubmit')
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
defineExpose({ open })
|
defineExpose({ open })
|
||||||
|
|
||||||
const choose = (e: any) => {
|
const choose = (e: any) => {
|
||||||
uploadFile(e.raw, '/supervision/').then(res => {
|
uploadFile(e.raw, '/supervision/').then(res => {
|
||||||
testReport.value = res.data.name
|
testReport.value = res.data.name
|
||||||
// form.value.testReport = res.data.name
|
// form.value.testReport = res.data.name
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleExceed: UploadProps['onExceed'] = files => {
|
const handleExceed: UploadProps['onExceed'] = files => {
|
||||||
uploadRef.value!.clearFiles()
|
uploadRef.value!.clearFiles()
|
||||||
const file = files[0] as UploadRawFile
|
const file = files[0] as UploadRawFile
|
||||||
file.uid = genFileId()
|
file.uid = genFileId()
|
||||||
uploadRef.value!.handleStart(file)
|
uploadRef.value!.handleStart(file)
|
||||||
}
|
}
|
||||||
|
|
||||||
//上传报告改变
|
//上传报告改变
|
||||||
const uploadFileName = val => {
|
const uploadFileName = val => {
|
||||||
uploadName.value = val
|
uploadName.value = val
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang='scss' scoped>
|
||||||
// :deep(.el-upload-list__item-info) {
|
// :deep(.el-upload-list__item-info) {
|
||||||
// width: 250px;
|
// width: 250px;
|
||||||
// }
|
// }
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ const { push } = useRouter()
|
|||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
|
const supvTypeOptionList = dictData.getBasicData('supv_type')
|
||||||
const statusSelect = dictData.statusSelect()
|
const statusSelect = dictData.statusSelect()
|
||||||
|
|
||||||
const planTestRef = ref()
|
const planTestRef = ref()
|
||||||
@@ -58,7 +59,20 @@ 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: 'planName', title: '普测计划', minWidth: 140 },
|
{ field: 'planName', title: '计划名称', minWidth: 140 },
|
||||||
|
{
|
||||||
|
field: 'supvType',
|
||||||
|
title: '监督类型',
|
||||||
|
minWidth: 130,
|
||||||
|
formatter: (row: any) => {
|
||||||
|
return supvTypeOptionList.filter(item => item.id === row.cellValue)[0]?.name
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'supvObjectName',
|
||||||
|
minWidth: 130,
|
||||||
|
title: '监督对象名称'
|
||||||
|
},
|
||||||
{ field: 'substationName', title: '变电站', minWidth: 140 },
|
{ field: 'substationName', title: '变电站', minWidth: 140 },
|
||||||
{ field: 'planStartTime', title: '计划开始时间', minWidth: 140 },
|
{ field: 'planStartTime', title: '计划开始时间', minWidth: 140 },
|
||||||
{ field: 'planEndTime', title: '计划结束时间', minWidth: 140 },
|
{ field: 'planEndTime', title: '计划结束时间', minWidth: 140 },
|
||||||
@@ -180,7 +194,7 @@ tableStore.table.params.status = ''
|
|||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
// 新增计划
|
// 新增计划
|
||||||
const add = (id: string) => {
|
const add = (id: string) => {
|
||||||
planTestRef.value.open('普测计划测试填报',id,true)
|
planTestRef.value.open('计划测试填报',id,true)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -190,7 +204,7 @@ const exportFn = () => {
|
|||||||
form.pageSize = tableStore.table.total
|
form.pageSize = tableStore.table.total
|
||||||
queryPlan(form).then(res => {
|
queryPlan(form).then(res => {
|
||||||
tableRef.value.getRef().exportData({
|
tableRef.value.getRef().exportData({
|
||||||
filename: '普测计划', // 文件名字
|
filename: '计划', // 文件名字
|
||||||
sheetName: 'Sheet1',
|
sheetName: 'Sheet1',
|
||||||
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
||||||
useStyle: true,
|
useStyle: true,
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class='default-main'>
|
<div class='default-main'>
|
||||||
<el-tabs v-model='activeName' type='border-card'>
|
<el-tabs v-model='activeName' type='border-card'>
|
||||||
<el-tab-pane label='普测计划管理' name='1'>
|
<el-tab-pane label='技术监督计划管理' name='1'>
|
||||||
<plan-manage v-if="activeName == '1'" />
|
<plan-manage v-if="activeName == '1'" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label='普测测试管理' name='2'>
|
<el-tab-pane label='技术监督测试管理' name='2'>
|
||||||
<test-manage v-if="activeName == '2'" />
|
<test-manage v-if="activeName == '2'" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
|
|||||||
@@ -1,38 +1,49 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class='default-main'>
|
<div class='default-main'>
|
||||||
<el-descriptions :column='2' border>
|
<el-descriptions :column='2' border>
|
||||||
<el-descriptions-item label='普测计划名称'>
|
<el-descriptions-item label='技术监督计划名称'>
|
||||||
{{ detailData?.planName }}
|
{{ detailData?.planName }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label='普测负责单位'>
|
<el-descriptions-item label='普测负责单位'>
|
||||||
{{ detailData?.deptName }}
|
{{ detailData?.deptName }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label='计划开始时间'>
|
<el-descriptions-item label='监督类型'>
|
||||||
{{ detailData?.planStartTime }}
|
{{
|
||||||
</el-descriptions-item>
|
supvTypeList.find(item => {
|
||||||
<el-descriptions-item label='计划结束时间'>
|
return item.id == detailData?.supvType
|
||||||
{{ detailData?.planEndTime }}
|
})?.name
|
||||||
</el-descriptions-item>
|
}}
|
||||||
<el-descriptions-item label='审核状态'>
|
</el-descriptions-item>
|
||||||
<el-tag :type='getDeviceStatusType(detailData?.status)'>
|
<el-descriptions-item label='监督对象名称'>
|
||||||
{{ getDeviceStatus(detailData?.status) }}
|
{{ detailData?.supvObjectName }}
|
||||||
</el-tag>
|
</el-descriptions-item>
|
||||||
</el-descriptions-item>
|
|
||||||
</el-descriptions>
|
<el-descriptions-item label='计划开始时间'>
|
||||||
<div style='height: 300px'>
|
{{ detailData?.planStartTime }}
|
||||||
<vxe-table
|
</el-descriptions-item>
|
||||||
v-bind='defaultAttribute'
|
<el-descriptions-item label='计划结束时间'>
|
||||||
ref='vxeRef'
|
{{ detailData?.planEndTime }}
|
||||||
class='mt10'
|
</el-descriptions-item>
|
||||||
height='auto'
|
<el-descriptions-item label='审核状态'>
|
||||||
:data='detailData?.surveySubstationList'
|
<el-tag :type='getDeviceStatusType(detailData?.status)'>
|
||||||
>
|
{{ getDeviceStatus(detailData?.status) }}
|
||||||
<vxe-column field='substationName' title='变电站名称'></vxe-column>
|
</el-tag>
|
||||||
<vxe-column field='voltageLevel' title='变电站电压等级' ></vxe-column>
|
</el-descriptions-item>
|
||||||
<vxe-column field='dataSource' title='变电站来源' :formatter='formatterSource'></vxe-column>
|
</el-descriptions>
|
||||||
</vxe-table>
|
<div style='height: 300px'>
|
||||||
</div>
|
<vxe-table
|
||||||
|
v-bind='defaultAttribute'
|
||||||
|
ref='vxeRef'
|
||||||
|
class='mt10'
|
||||||
|
height='auto'
|
||||||
|
:data='detailData?.surveySubstationList'
|
||||||
|
>
|
||||||
|
<vxe-column field='substationName' title='变电站名称'></vxe-column>
|
||||||
|
<vxe-column field='voltageLevel' title='变电站电压等级'></vxe-column>
|
||||||
|
<vxe-column field='dataSource' title='变电站来源' :formatter='formatterSource'></vxe-column>
|
||||||
|
</vxe-table>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang='ts'>
|
<script setup lang='ts'>
|
||||||
import { onMounted, ref } from 'vue'
|
import { onMounted, ref } from 'vue'
|
||||||
@@ -45,69 +56,69 @@ import { getPlanById } from '@/api/supervision-boot/survey/plan'
|
|||||||
|
|
||||||
const { query } = useRoute() // 查询参数
|
const { query } = useRoute() // 查询参数
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
id: propTypes.string.def(undefined)
|
id: propTypes.string.def(undefined)
|
||||||
})
|
})
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const detailLoading = ref(false) // 表单的加载中
|
const detailLoading = ref(false) // 表单的加载中
|
||||||
const detailData: any = ref({}) // 详情数据
|
const detailData: any = ref({}) // 详情数据
|
||||||
const levelList = dictData.getBasicData('Dev_Voltage_Stand')
|
const supvTypeList = dictData.getBasicData('supv_type')
|
||||||
const queryId = query.id // 从 URL 传递过来的 id 编号
|
const queryId = query.id // 从 URL 传递过来的 id 编号
|
||||||
|
|
||||||
/** 获得数据 */
|
/** 获得数据 */
|
||||||
const getInfo = async () => {
|
const getInfo = async () => {
|
||||||
detailLoading.value = true
|
detailLoading.value = true
|
||||||
try {
|
try {
|
||||||
await getPlanById(props.id || queryId).then(res => {
|
await getPlanById(props.id || queryId).then(res => {
|
||||||
detailData.value = res.data
|
detailData.value = res.data
|
||||||
})
|
})
|
||||||
} finally {
|
} finally {
|
||||||
detailLoading.value = false
|
detailLoading.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const getDeviceStatus = (status: number) => {
|
const getDeviceStatus = (status: number) => {
|
||||||
if (status === 1) {
|
if (status === 1) {
|
||||||
return '审批中'
|
return '审批中'
|
||||||
}
|
}
|
||||||
if (status === 2) {
|
if (status === 2) {
|
||||||
return '审批通过'
|
|
||||||
}
|
|
||||||
if (status === 3) {
|
|
||||||
return '审批不通过'
|
|
||||||
}
|
|
||||||
if (status === 4) {
|
|
||||||
return '已取消'
|
|
||||||
}
|
|
||||||
return '审批通过'
|
return '审批通过'
|
||||||
|
}
|
||||||
|
if (status === 3) {
|
||||||
|
return '审批不通过'
|
||||||
|
}
|
||||||
|
if (status === 4) {
|
||||||
|
return '已取消'
|
||||||
|
}
|
||||||
|
return '审批通过'
|
||||||
}
|
}
|
||||||
|
|
||||||
const getDeviceStatusType = (status: number) => {
|
const getDeviceStatusType = (status: number) => {
|
||||||
if (status === 1) {
|
if (status === 1) {
|
||||||
return 'primary'
|
return 'primary'
|
||||||
}
|
}
|
||||||
if (status === 2) {
|
if (status === 2) {
|
||||||
return 'success'
|
|
||||||
}
|
|
||||||
if (status === 3) {
|
|
||||||
return 'danger'
|
|
||||||
}
|
|
||||||
if (status === 4) {
|
|
||||||
return 'warning'
|
|
||||||
}
|
|
||||||
return 'success'
|
return 'success'
|
||||||
|
}
|
||||||
|
if (status === 3) {
|
||||||
|
return 'danger'
|
||||||
|
}
|
||||||
|
if (status === 4) {
|
||||||
|
return 'warning'
|
||||||
|
}
|
||||||
|
return 'success'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const formatterSource = (row: any) => {
|
const formatterSource = (row: any) => {
|
||||||
if (row.column.field == 'dataSource') {
|
if (row.column.field == 'dataSource') {
|
||||||
if (row.cellValue == 0) {
|
if (row.cellValue == 0) {
|
||||||
return '系统内台账变电站'
|
return '系统内台账变电站'
|
||||||
} else {
|
|
||||||
return '自定义变电站'
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
return row.cellValue
|
return '自定义变电站'
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
return row.cellValue
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -115,6 +126,6 @@ defineExpose({ open: getInfo }) // 提供 open 方法,用于打开弹窗
|
|||||||
|
|
||||||
/** 初始化 **/
|
/** 初始化 **/
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getInfo()
|
getInfo()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,12 +1,22 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class='default-main'>
|
<div class='default-main'>
|
||||||
<el-descriptions :column='2' border>
|
<el-descriptions :column='2' border>
|
||||||
<el-descriptions-item label='普测计划名称'>
|
<el-descriptions-item label='技术监督计划名称'>
|
||||||
{{ detailData?.planName }}
|
{{ detailData?.planName }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label='普测负责单位'>
|
<el-descriptions-item label='计划负责单位'>
|
||||||
{{ detailData?.deptName }}
|
{{ detailData?.deptName }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label='监督类型'>
|
||||||
|
{{
|
||||||
|
supvTypeList.find(item => {
|
||||||
|
return item.id == detailData?.supvType
|
||||||
|
})?.name
|
||||||
|
}}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label='监督对象名称'>
|
||||||
|
{{ detailData?.supvObjectName }}
|
||||||
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label='计划开始时间'>
|
<el-descriptions-item label='计划开始时间'>
|
||||||
{{ detailData?.planStartTime }}
|
{{ detailData?.planStartTime }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
@@ -54,7 +64,9 @@
|
|||||||
</template>
|
</template>
|
||||||
<script setup lang='ts'>
|
<script setup lang='ts'>
|
||||||
import { onMounted, ref } from 'vue'
|
import { onMounted, ref } from 'vue'
|
||||||
|
import { useDictData } from '@/stores/dictData'
|
||||||
|
const dictData = useDictData()
|
||||||
|
const supvTypeList = dictData.getBasicData('supv_type')
|
||||||
defineOptions({ name: 'QuitRunningDeviceDetail' })
|
defineOptions({ name: 'QuitRunningDeviceDetail' })
|
||||||
import { propTypes } from '@/utils/propTypes'
|
import { propTypes } from '@/utils/propTypes'
|
||||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||||
|
|||||||
Reference in New Issue
Block a user