技术监督新增查看功能
This commit is contained in:
@@ -5,51 +5,69 @@
|
||||
<template #select>
|
||||
<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>
|
||||
<el-form-item label="是否解决">
|
||||
<el-select v-model="tableStore.table.params.dealState" clearable placeholder="请选择是否解决">
|
||||
<el-option v-for="item in dealStateList" :key="item.value" :label="item.label"
|
||||
:value="item.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" :checkbox-config="checkboxConfig"/>
|
||||
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
||||
<!-- 详情 -->
|
||||
<detail ref="detailRef" />
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import {ref, onMounted, provide, reactive} from 'vue'
|
||||
import { ref, onMounted, provide, reactive } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import {useRouter} from 'vue-router'
|
||||
import {useDictData} from '@/stores/dictData'
|
||||
import {ElMessage, ElMessageBox} from 'element-plus'
|
||||
import {addRunTest, initiateWarningLeaflet} from '@/api/supervision-boot/lineRunTest'
|
||||
import {formatDate} from '@/utils/formatTime'
|
||||
import {VxeTablePropTypes} from 'vxe-table'
|
||||
import {useAdminInfo} from '@/stores/adminInfo'
|
||||
import {getFileNameAndFilePath} from '@/api/system-boot/file'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { addRunTest, initiateWarningLeaflet } from '@/api/supervision-boot/lineRunTest'
|
||||
import { formatDate } from '@/utils/formatTime'
|
||||
import { VxeTablePropTypes } from 'vxe-table'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import { getFileNameAndFilePath } from '@/api/system-boot/file'
|
||||
import detail from './testRunDetail.vue'
|
||||
|
||||
const dictData = useDictData()
|
||||
const statusSelect = dictData.statusSelect()
|
||||
const {push} = useRouter()
|
||||
const { push } = useRouter()
|
||||
const adminInfo = useAdminInfo()
|
||||
const TableHeaderRef = ref()
|
||||
const tableRef = ref()
|
||||
|
||||
const detailRef = ref()
|
||||
const dealStateList = ref([
|
||||
{
|
||||
label: '未解决',
|
||||
value: '0'
|
||||
},
|
||||
{
|
||||
label: '全部',
|
||||
value: '1'
|
||||
}
|
||||
])
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/lineRunTestProblem/pageProblem',
|
||||
method: 'POST',
|
||||
publicHeight: 65,
|
||||
column: [
|
||||
{field: 'lineName', title: '监测点名称', minWidth: 160},
|
||||
{field: 'connectedBus', title: '接入母线', minWidth: 160},
|
||||
{ field: 'lineName', title: '监测点名称', minWidth: 160 },
|
||||
{ field: 'connectedBus', title: '接入母线', minWidth: 160 },
|
||||
// { field: 'monitoringTerminalCode', title: '终端编号', minWidth: 140 },
|
||||
{field: 'monitoringTerminalName', title: '终端名称', minWidth: 140},
|
||||
{field: 'powerSubstationName', title: '变电站', minWidth: 160},
|
||||
{field: 'reason', title: '调试原因', minWidth: 160},
|
||||
{ field: 'monitoringTerminalName', title: '终端名称', minWidth: 140, },
|
||||
{
|
||||
field: 'powerSubstationName', title: '变电站', minWidth: 160, formatter: row => {
|
||||
return row.cellValue ? row.cellValue : '/'
|
||||
}
|
||||
},
|
||||
{ field: 'reason', title: '调试原因', minWidth: 160 },
|
||||
|
||||
{
|
||||
field: 'testRunState',
|
||||
@@ -78,7 +96,7 @@ const tableStore = new TableStore({
|
||||
return row.cellValue ? row.cellValue : '/'
|
||||
}
|
||||
},
|
||||
{field: 'problemReason', title: '试运行评估问题', minWidth: 200},
|
||||
{ field: 'problemReason', title: '试运行评估问题', minWidth: 200 },
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '填报人',
|
||||
@@ -87,6 +105,22 @@ const tableStore = new TableStore({
|
||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'dealState',
|
||||
title: '是否解决',
|
||||
minWidth: 100,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'warning',
|
||||
1: 'primary',
|
||||
|
||||
},
|
||||
replaceValue: {
|
||||
0: '未解决',
|
||||
1: '已解决',
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
minWidth: 230,
|
||||
@@ -127,11 +161,11 @@ const tableStore = new TableStore({
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.problemType != null
|
||||
return row.dealState != 0
|
||||
},
|
||||
|
||||
click: async row => {
|
||||
const {value} = await ElMessageBox.prompt('', '整改意见', {
|
||||
const { value } = await ElMessageBox.prompt('', '整改意见', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
|
||||
@@ -151,6 +185,25 @@ const tableStore = new TableStore({
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '告警单详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.dealState == 0
|
||||
},
|
||||
|
||||
click: row => {
|
||||
detailRef.value.open({
|
||||
row: row,
|
||||
title: '告警单详情',
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '查看告警单',
|
||||
@@ -181,7 +234,7 @@ const tableStore = new TableStore({
|
||||
}
|
||||
})
|
||||
tableStore.table.params.status = ''
|
||||
|
||||
tableStore.table.params.dealState = ''
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
onMounted(() => {
|
||||
@@ -189,7 +242,7 @@ onMounted(() => {
|
||||
})
|
||||
const checkboxConfig = reactive<VxeTablePropTypes.CheckboxConfig>({
|
||||
labelField: '',
|
||||
checkMethod: ({row}) => {
|
||||
checkMethod: ({ row }) => {
|
||||
return !(row.testRunState == 1 || row.testRunState == 2)
|
||||
}
|
||||
})
|
||||
@@ -206,7 +259,7 @@ const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
||||
|
||||
// 下载报告
|
||||
const downloadTheReport = (url: string) => {
|
||||
getFileNameAndFilePath({filePath: url}).then((res: any) => {
|
||||
getFileNameAndFilePath({ filePath: url }).then((res: any) => {
|
||||
const link = document.createElement('a')
|
||||
link.href = res.data.url
|
||||
link.download = res.data.name
|
||||
|
||||
Reference in New Issue
Block a user