修改 技术监督 现场问题

This commit is contained in:
GGJ
2024-07-23 15:03:48 +08:00
parent 049d0c1132
commit 33814bf712
13 changed files with 237 additions and 105 deletions

View File

@@ -127,6 +127,7 @@
v-for="item in btn.buttons" v-for="item in btn.buttons"
:key="item.text" :key="item.text"
:command="item" :command="item"
:disabled="item.showDisabled && item.showDisabled(row, field)"
:style="{ :style="{
color: item.type === 'primary' ? 'var(--el-color-primary)' : 'var(--el-color-danger)' color: item.type === 'primary' ? 'var(--el-color-primary)' : 'var(--el-color-danger)'
}" }"

View File

@@ -1,53 +1,54 @@
<template> <template>
<el-dialog draggable v-model="dialogVisible" :title="title" width="80%" :before-close="handleClose"> <el-dialog draggable v-model="dialogVisible" :title="title" width="80%" :before-close="handleClose">
<div style="height: 45vh"> <div v-loading="loading">
<vxe-table height="auto" v-bind="defaultAttribute" :data="List"> <div style="height: 45vh">
<vxe-column field="dept" title="负责单位"></vxe-column> <vxe-table height="auto" v-bind="defaultAttribute" :data="List">
<vxe-column field="substation" title="变电站名称"></vxe-column> <vxe-column field="dept" title="负责单位"></vxe-column>
<vxe-column field="deviceName" title="终端名称"></vxe-column> <vxe-column field="substation" title="变电站名称"></vxe-column>
<vxe-column field="lineName" title="监测点名称"></vxe-column> <vxe-column field="deviceName" title="终端名称"></vxe-column>
<vxe-column <vxe-column field="lineName" title="监测点名称"></vxe-column>
field="businessType" <vxe-column
title="监测对象类型" field="businessType"
:formatter="row => industry.find((item: any) => item.id == row.cellValue)?.name || '/'" title="监测对象类型"
></vxe-column> :formatter="row => industry.find((item: any) => item.id == row.cellValue)?.name || '/'"
<vxe-column field="objectName" title="监测对象名称"></vxe-column> ></vxe-column>
<vxe-column <vxe-column field="objectName" title="监测对象名称"></vxe-column>
field="targetType" <vxe-column
title="指标类型" field="targetType"
:formatter="row => exceeded.find((item: any) => item.id == row.cellValue)?.name || '/'" title="指标类型"
></vxe-column> :formatter="row => exceeded.find((item: any) => item.id == row.cellValue)?.name || '/'"
<vxe-column ></vxe-column>
field="overLimitDay" <vxe-column
title="累计超标天数" field="overLimitDay"
:formatter="row => (row.cellValue != null ? row.cellValue : '/')" title="累计超标天数"
></vxe-column> :formatter="row => (row.cellValue != null ? row.cellValue : '/')"
</vxe-table> ></vxe-column>
</div> </vxe-table>
<el-form :model="form" ref="formRef" class="form-two mt10 alarmForm" :rules="rules" label-width="auto"> </div>
<el-form-item label="问题描述:" prop="issueDetail"> <el-form :model="form" ref="formRef" class="form-two mt10 alarmForm" :rules="rules" label-width="auto">
<el-input <el-form-item label="问题描述:" prop="issueDetail">
v-model="form.issueDetail" <el-input
:rows="2" v-model="form.issueDetail"
type="textarea" :rows="2"
clearable type="textarea"
style="width: 100%" clearable
placeholder="请输入问题描述" style="width: 100%"
></el-input> placeholder="请输入问题描述"
</el-form-item> ></el-input>
</el-form-item>
<el-form-item label="整改意见:" prop="reformAdvice"> <el-form-item label="整改意见:" prop="reformAdvice">
<el-input <el-input
v-model="form.reformAdvice" v-model="form.reformAdvice"
:rows="2" :rows="2"
type="textarea" type="textarea"
clearable clearable
style="width: 100%" style="width: 100%"
placeholder="请输入整改意见" placeholder="请输入整改意见"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="编号:" prop="year"> <!-- <el-form-item label="编号:" prop="year">
<div style="width: 100%; display: flex; justify-content: space-between"> <div style="width: 100%; display: flex; justify-content: space-between">
<el-input style="width: 49%" v-model="form.year" placeholder="请输入年份"> <el-input style="width: 49%" v-model="form.year" placeholder="请输入年份">
<template #append>年份</template> <template #append>年份</template>
@@ -56,8 +57,10 @@
<template #append>编号</template> <template #append>编号</template>
</el-input> </el-input>
</div> </div>
</el-form-item> </el-form-item> -->
</el-form> </el-form>
</div>
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button @click="handleClose">取消</el-button> <el-button @click="handleClose">取消</el-button>
@@ -80,6 +83,7 @@ const title: any = ref('')
const industry = dictData.getBasicData('Business_Type') const industry = dictData.getBasicData('Business_Type')
const form: any = ref({}) const form: any = ref({})
const exceeded = dictData.getBasicData('Indicator_Type') const exceeded = dictData.getBasicData('Indicator_Type')
const loading = ref(false)
const resetForm = () => { const resetForm = () => {
form.value = { form.value = {
issueDetail: '', issueDetail: '',
@@ -101,15 +105,22 @@ const submit = () => {
console.log('🚀 ~ open ~ form.value:', form.value) console.log('🚀 ~ open ~ form.value:', form.value)
formRef.value.validate(valid => { formRef.value.validate(valid => {
if (valid) { if (valid) {
loading.value = true
report({ report({
...form.value, ...form.value,
type: title.value == '发起预警单' ? 1 : 2, type: title.value == '发起预警单' ? 1 : 2,
idList: List.value.map(item => item.id) idList: List.value.map(item => item.id)
}).then(res => {
ElMessage.success('发起成功')
dialogVisible.value = false
emits('onSubmit')
}) })
.then(res => {
loading.value = false
ElMessage.success('发起成功')
dialogVisible.value = false
emits('onSubmit')
})
.catch(() => {
loading.value = false
})
} else { } else {
console.log('表单验证失败') console.log('表单验证失败')
return false return false
@@ -121,6 +132,7 @@ const open = (row: any) => {
dialogVisible.value = true dialogVisible.value = true
List.value = row.row List.value = row.row
title.value = row.text title.value = row.text
form.value = { ...form.value, ...row.form } form.value = { ...form.value, ...row.form }
} }

View File

@@ -324,6 +324,8 @@ tableStore.table.params.dataType = '1'
tableStore.table.params.deptId = dictData.state.area[0].id tableStore.table.params.deptId = dictData.state.area[0].id
provide('tableStore', tableStore) provide('tableStore', tableStore)
onMounted(() => { onMounted(() => {
TableHeaderRef.value.setDatePicker([{ label: '月', value: 3 }])
tableStore.index() tableStore.index()
setTimeout(() => { setTimeout(() => {
TableHeaderRef.value.showSelectChange() TableHeaderRef.value.showSelectChange()

View File

@@ -14,6 +14,10 @@
</TableHeader> </TableHeader>
<Table ref="tableRef" /> <Table ref="tableRef" />
<testQuestionsForm ref="testQuestionsFormRef" /> <testQuestionsForm ref="testQuestionsFormRef" />
<!-- 详情 -->
<el-dialog draggable v-model="dialogVisible" v-if="dialogVisible" title="详情" width="1000">
<detail :id="detailId" :flag="false"/>
</el-dialog>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, onMounted, provide, nextTick } from 'vue' import { ref, onMounted, provide, nextTick } from 'vue'
@@ -22,14 +26,17 @@ 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/test' import { initiateWarningLeaflet } from '@/api/supervision-boot/survey/test'
import { ElMessage,ElMessageBox } from 'element-plus' import { ElMessage, ElMessageBox } from 'element-plus'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { useDictData } from '@/stores/dictData' import { useDictData } from '@/stores/dictData'
import detail from '@/views/pqs/supervise/harmonicSurvey/test/detail.vue'
const dictData = useDictData() const dictData = useDictData()
const { push } = useRouter() const { push } = useRouter()
const router = useRouter() // 路由对象 const router = useRouter() // 路由对象
const tableRef = ref() const tableRef = ref()
const TableHeaderRef = ref() const TableHeaderRef = ref()
const dialogVisible = ref(false)
const detailId = ref('')
const testQuestionsFormRef = ref() const testQuestionsFormRef = ref()
const tableStore = new TableStore({ const tableStore = new TableStore({
url: '/supervision-boot/surveyTest/pageProblemSurvey', url: '/supervision-boot/surveyTest/pageProblemSurvey',
@@ -67,6 +74,18 @@ const tableStore = new TableStore({
render: 'buttons', render: 'buttons',
fixed: 'right', fixed: 'right',
buttons: [ buttons: [
{
name: 'edit',
title: '详情',
type: 'primary',
icon: 'el-icon-Open',
render: 'basicButton',
click: async row => {
dialogVisible.value = true
detailId.value = row.id
}
},
{ {
name: 'edit', name: 'edit',
title: '发起告警单', title: '发起告警单',

View File

@@ -273,14 +273,14 @@ 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()
emit('onsubmit') emit('onsubmit')
cancelFn()
}) })
} 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()
emit('onsubmit') emit('onsubmit')
cancelFn()
}) })
} }
} }

View File

@@ -192,7 +192,7 @@ const tableStore = new TableStore({
icon: 'el-icon-Open', icon: 'el-icon-Open',
render: 'basicButton', render: 'basicButton',
disabled: row => { disabled: row => {
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4) return row.deptId != adminInfo.$state.deptId || !(row.status == 3 || row.status == 4)
}, },
click: row => { click: row => {
planTestRef.value.open('重新发起计划测试', row.id, false) planTestRef.value.open('重新发起计划测试', row.id, false)
@@ -205,7 +205,7 @@ const tableStore = new TableStore({
icon: 'el-icon-Open', icon: 'el-icon-Open',
render: 'basicButton', render: 'basicButton',
disabled: row => { disabled: row => {
return row.createBy != adminInfo.$state.id || row.status != 1 return row.deptId != adminInfo.$state.deptId || row.status != 1
}, },
click: row => { click: row => {
cancelLeave(row) cancelLeave(row)

View File

@@ -60,11 +60,11 @@
<a :href="detailData.testReport" target="_blank">{{ detailData.testReportName }}</a> <a :href="detailData.testReport" target="_blank">{{ detailData.testReportName }}</a>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="流程状态"> <!-- <el-descriptions-item label="流程状态" >
<el-tag :type="getDeviceStatusType(detailData?.status)"> <el-tag :type="getDeviceStatusType(detailData?.status)">
{{ getDeviceStatus(detailData?.status) }} {{ getDeviceStatus(detailData?.status) }}
</el-tag> </el-tag>
</el-descriptions-item> </el-descriptions-item> -->
</el-descriptions> </el-descriptions>
</div> </div>
</template> </template>
@@ -78,7 +78,7 @@ import { propTypes } from '@/utils/propTypes'
import { defaultAttribute } from '@/components/table/defaultAttribute' import { defaultAttribute } from '@/components/table/defaultAttribute'
import { getTestById } from '@/api/supervision-boot/survey/test' import { getTestById } from '@/api/supervision-boot/survey/test'
import { getFileNameAndFilePath } from '@/api/system-boot/file' import { getFileNameAndFilePath } from '@/api/system-boot/file'
import { Link ,View} from '@element-plus/icons-vue' import { Link, View } from '@element-plus/icons-vue'
const openFile = (name: any) => { const openFile = (name: any) => {
window.open(window.location.origin + '/#/previewFile?' + name) window.open(window.location.origin + '/#/previewFile?' + name)
} }
@@ -184,4 +184,4 @@ onMounted(() => {
cursor: pointer; cursor: pointer;
margin-right: 10px; margin-right: 10px;
} }
</style> </style>

View File

@@ -180,7 +180,9 @@
<el-icon class="elView" v-if="proviteData?.feasibilityReport.name"> <el-icon class="elView" v-if="proviteData?.feasibilityReport.name">
<View @click="openFile(proviteData.feasibilityReport.name)" /> <View @click="openFile(proviteData.feasibilityReport.name)" />
</el-icon> </el-icon>
<a :href="proviteData.feasibilityReport.url">{{ proviteData.feasibilityReport.name }}</a> <a target="_blank" :href="proviteData.feasibilityReport.url">
{{ proviteData.feasibilityReport.name }}
</a>
</span> </span>
<span <span
v-if=" v-if="
@@ -193,20 +195,24 @@
<el-icon class="elView" v-if="proviteData?.feasibilityReport.name"> <el-icon class="elView" v-if="proviteData?.feasibilityReport.name">
<View @click="openFile(proviteData.feasibilityReport.name)" /> <View @click="openFile(proviteData.feasibilityReport.name)" />
</el-icon> </el-icon>
<a :href="proviteData.feasibilityReport.url">{{ proviteData.feasibilityReport.name }}</a> <a target="_blank" :href="proviteData.feasibilityReport.url">
{{ proviteData.feasibilityReport.name }}
</a>
</span> </span>
<span v-if="detailData.userType == 6"> <span v-if="detailData.userType == 6">
<el-icon class="elView" v-if="proviteData?.feasibilityReport.name"> <el-icon class="elView" v-if="proviteData?.feasibilityReport.name">
<View @click="openFile(proviteData.feasibilityReport.name)" /> <View @click="openFile(proviteData.feasibilityReport.name)" />
</el-icon> </el-icon>
<a :href="proviteData.feasibilityReport.url">{{ proviteData.feasibilityReport.name }}</a> <a target="_blank" :href="proviteData.feasibilityReport.url">
{{ proviteData.feasibilityReport.name }}
</a>
</span> </span>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="项目初步设计说明书"> <el-descriptions-item label="项目初步设计说明书">
<el-icon class="elView" v-if="proviteData?.preliminaryDesignDescription.name"> <el-icon class="elView" v-if="proviteData?.preliminaryDesignDescription.name">
<View @click="openFile(proviteData?.preliminaryDesignDescription.name)" /> <View @click="openFile(proviteData?.preliminaryDesignDescription.name)" />
</el-icon> </el-icon>
<a :href="proviteData?.preliminaryDesignDescription.url"> <a target="_blank" :href="proviteData?.preliminaryDesignDescription.url">
{{ proviteData?.preliminaryDesignDescription.name }} {{ proviteData?.preliminaryDesignDescription.name }}
</a> </a>
</el-descriptions-item> </el-descriptions-item>
@@ -214,7 +220,7 @@
<el-icon class="elView" v-if="proviteData?.predictionEvaluationReport.name"> <el-icon class="elView" v-if="proviteData?.predictionEvaluationReport.name">
<View @click="openFile(proviteData?.predictionEvaluationReport.name)" /> <View @click="openFile(proviteData?.predictionEvaluationReport.name)" />
</el-icon> </el-icon>
<a :href="proviteData?.predictionEvaluationReport.url"> <a target="_blank" :href="proviteData?.predictionEvaluationReport.url">
{{ proviteData?.predictionEvaluationReport.name }} {{ proviteData?.predictionEvaluationReport.name }}
</a> </a>
</el-descriptions-item> </el-descriptions-item>
@@ -222,7 +228,7 @@
<el-icon class="elView" v-if="proviteData?.predictionEvaluationReviewOpinions.name"> <el-icon class="elView" v-if="proviteData?.predictionEvaluationReviewOpinions.name">
<View @click="openFile(proviteData?.predictionEvaluationReviewOpinions.name)" /> <View @click="openFile(proviteData?.predictionEvaluationReviewOpinions.name)" />
</el-icon> </el-icon>
<a :href="proviteData?.predictionEvaluationReviewOpinions.url"> <a target="_blank" :href="proviteData?.predictionEvaluationReviewOpinions.url">
{{ proviteData?.predictionEvaluationReviewOpinions.name }} {{ proviteData?.predictionEvaluationReviewOpinions.name }}
</a> </a>
</el-descriptions-item> </el-descriptions-item>
@@ -233,7 +239,7 @@
<el-icon class="elView" v-if="proviteData?.substationMainWiringDiagram.name"> <el-icon class="elView" v-if="proviteData?.substationMainWiringDiagram.name">
<View @click="openFile(proviteData?.substationMainWiringDiagram.name)" /> <View @click="openFile(proviteData?.substationMainWiringDiagram.name)" />
</el-icon> </el-icon>
<a :href="proviteData?.substationMainWiringDiagram.url" target="_blank"> <a target="_blank" :href="proviteData?.substationMainWiringDiagram.url">
{{ proviteData?.substationMainWiringDiagram.name }} {{ proviteData?.substationMainWiringDiagram.name }}
</a> </a>
</el-descriptions-item> </el-descriptions-item>
@@ -241,13 +247,15 @@
<el-icon class="elView" v-if="proviteData?.sensitiveDevices.name"> <el-icon class="elView" v-if="proviteData?.sensitiveDevices.name">
<View @click="openFile(proviteData?.sensitiveDevices.name)" /> <View @click="openFile(proviteData?.sensitiveDevices.name)" />
</el-icon> </el-icon>
<a :href="proviteData?.sensitiveDevices.url">{{ proviteData?.sensitiveDevices.name }}</a> <a target="_blank" :href="proviteData?.sensitiveDevices.url">
{{ proviteData?.sensitiveDevices.name }}
</a>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="抗扰度测试报告" v-if="detailData.userType == 6"> <el-descriptions-item label="抗扰度测试报告" v-if="detailData.userType == 6">
<el-icon class="elView" v-if="proviteData?.antiInterferenceReport.name"> <el-icon class="elView" v-if="proviteData?.antiInterferenceReport.name">
<View @click="openFile(proviteData?.antiInterferenceReport.name)" /> <View @click="openFile(proviteData?.antiInterferenceReport.name)" />
</el-icon> </el-icon>
<a :href="proviteData?.antiInterferenceReport.url"> <a target="_blank" :href="proviteData?.antiInterferenceReport.url">
{{ proviteData?.antiInterferenceReport.name }} {{ proviteData?.antiInterferenceReport.name }}
</a> </a>
</el-descriptions-item> </el-descriptions-item>
@@ -255,13 +263,28 @@
<el-icon class="elView" v-if="proviteData?.powerQualityReport.name"> <el-icon class="elView" v-if="proviteData?.powerQualityReport.name">
<View @click="openFile(proviteData?.powerQualityReport.name)" /> <View @click="openFile(proviteData?.powerQualityReport.name)" />
</el-icon> </el-icon>
<a :href="proviteData?.powerQualityReport.url">{{ proviteData?.powerQualityReport.name }}</a> <a target="_blank" :href="proviteData?.powerQualityReport.url">
{{ proviteData?.powerQualityReport.name }}
</a>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="入网评估报告" v-if="applyTitle=='干扰源用户治理工程验收'">
<div v-for="item in netInReportList">
<el-icon class="elView" v-if="item.name">
<View @click="openFile(item.name)" />
</el-icon>
<a target="_blank" :href="item.url">
{{ item.name }}
</a>
</div>
</el-descriptions-item>
<el-descriptions-item label="其他附件" v-if="proviteData?.additionalAttachments.url"> <el-descriptions-item label="其他附件" v-if="proviteData?.additionalAttachments.url">
<el-icon class="elView" v-if="proviteData?.additionalAttachments.name"> <el-icon class="elView" v-if="proviteData?.additionalAttachments.name">
<View @click="openFile(proviteData?.additionalAttachments.name)" /> <View @click="openFile(proviteData?.additionalAttachments.name)" />
</el-icon> </el-icon>
<a :href="proviteData?.additionalAttachments.url">{{ proviteData?.additionalAttachments.name }}</a> <a target="_blank" :href="proviteData?.additionalAttachments.url">
{{ proviteData?.additionalAttachments.name }}
</a>
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-divider content-position="left">{{ applyTitle + '填报信息' }}</el-divider> <el-divider content-position="left">{{ applyTitle + '填报信息' }}</el-divider>
@@ -282,7 +305,7 @@
<el-icon class="elView" v-if="proviteData?.otherReport.name"> <el-icon class="elView" v-if="proviteData?.otherReport.name">
<View @click="openFile(proviteData?.otherReport.nam)" /> <View @click="openFile(proviteData?.otherReport.nam)" />
</el-icon> </el-icon>
<a :href="proviteData?.otherReport.url">{{ proviteData?.otherReport.name }}</a> <a target="_blank" :href="proviteData?.otherReport.url">{{ proviteData?.otherReport.name }}</a>
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
</div> </div>
@@ -309,6 +332,7 @@ const props = defineProps({
id: propTypes.string.def(undefined), id: propTypes.string.def(undefined),
applyTitle: propTypes.string.def(undefined) applyTitle: propTypes.string.def(undefined)
}) })
const netInReportList: any = ref([])
const detailLoading = ref(false) // 表单的加载中 const detailLoading = ref(false) // 表单的加载中
const detailData = ref<any>({}) // 详情数据 const detailData = ref<any>({}) // 详情数据
const queryId = query.id as unknown as string // 从 URL 传递过来的 id 编号 const queryId = query.id as unknown as string // 从 URL 传递过来的 id 编号
@@ -459,6 +483,14 @@ const getProviteData = async () => {
if (proviteData.value.otherReport) { if (proviteData.value.otherReport) {
await getFileNamePath(proviteData.value.otherReport, 'otherReport') await getFileNamePath(proviteData.value.otherReport, 'otherReport')
} }
// 入网评估报告
if (detailData.value.netInReport.length > 0) {
netInReportList.value = []
detailData.value.netInReport.forEach((item: any) => {
getFileNamePath(item, 'netInReport')
})
}
} }
//根据文件名请求 //根据文件名请求
const getFileNamePath = async (val: any, pathName: any) => { const getFileNamePath = async (val: any, pathName: any) => {
@@ -537,6 +569,11 @@ const getFileNamePath = async (val: any, pathName: any) => {
name: res.data.fileName, name: res.data.fileName,
url: res.data.url url: res.data.url
} }
} else if (pathName == 'netInReport') {
netInReportList.value.push({
name: res.data.fileName,
url: res.data.url
})
} }
} }
}) })
@@ -564,9 +601,9 @@ onMounted(() => {
margin-right: 10px; margin-right: 10px;
} }
:deep(.el-descriptions__label) { :deep(.el-descriptions__label) {
width: 20%; width: 20%;
} }
:deep(.el-descriptions__content) { :deep(.el-descriptions__content) {
width: 30%; width: 30%;
} }
</style> </style>

View File

@@ -25,6 +25,7 @@
<el-dialog <el-dialog
title="干扰源用户详细信息" title="干扰源用户详细信息"
v-if="dialogVisible"
v-model="dialogVisible" v-model="dialogVisible"
width="65%" width="65%"
:append-to-body="true" :append-to-body="true"
@@ -47,7 +48,7 @@ defineOptions({
name: 'supervision/interferenceUserTable' name: 'supervision/interferenceUserTable'
}) })
import { ref, onMounted, provide, nextTick } from 'vue' import { ref, onMounted, provide, watch } from 'vue'
import TableStore from '@/utils/tableStore' 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'
@@ -59,6 +60,7 @@ import { useAdminInfo } from '@/stores/adminInfo'
import { ElMessage, ElMessageBox } from 'element-plus' import { ElMessage, ElMessageBox } from 'element-plus'
import { userReportRenewalCancel } from '@/api/process-boot/generalTest' import { userReportRenewalCancel } from '@/api/process-boot/generalTest'
const dictData = useDictData() const dictData = useDictData()
const flag = ref(false)
const areaOptionList = dictData const areaOptionList = dictData
.getBasicData('jibei_area') .getBasicData('jibei_area')
.filter(item => !(item.name == '超高压' || item.name == '风光储')) .filter(item => !(item.name == '超高压' || item.name == '风光储'))
@@ -82,7 +84,7 @@ jb_dky.value =
? true ? true
: false : false
const { push } = useRouter() const { push, options, currentRoute } = useRouter()
const TableHeaderRef = ref() const TableHeaderRef = ref()
const tableStore = new TableStore({ const tableStore = new TableStore({
url: '/supervision-boot/userReport/getNormalUserPage', url: '/supervision-boot/userReport/getNormalUserPage',
@@ -271,7 +273,10 @@ const tableStore = new TableStore({
icon: 'el-icon-EditPen', icon: 'el-icon-EditPen',
render: 'basicButton', render: 'basicButton',
disabled: row => { disabled: row => {
return row.needGovernance == 0 return row.needGovernance == 0 //&& row.type == true
},
showDisabled: row => {
return row.type == false
}, },
click: row => { click: row => {
toFangAn(row, 1) toFangAn(row, 1)
@@ -376,6 +381,7 @@ const toFangAn = (row: any, typeNo: number) => {
needGovernance: needGovernance.value needGovernance: needGovernance.value
} }
}) })
flag.value = true
}) })
} }
@@ -404,4 +410,16 @@ const getUserTypeName = (userType: any) => {
} }
return '新建电网工程' return '新建电网工程'
} }
watch(
() => currentRoute.value.path,
() => {
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
tableStore.index()
flag.value = false
}
},
{
deep: true
}
)
</script> </script>

View File

@@ -22,6 +22,11 @@
<Table ref="tableRef" /> <Table ref="tableRef" />
<!--弹框--> <!--弹框-->
<feedback-popup ref="feedbackPopup" /> <feedback-popup ref="feedbackPopup" />
<!-- 详情 -->
<el-dialog draggable v-model="dialogVisible" v-if="dialogVisible" title="详情" width="1000">
<detail :id="detailId" />
</el-dialog>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, onMounted, provide, nextTick } from 'vue' import { ref, onMounted, provide, nextTick } from 'vue'
@@ -35,6 +40,7 @@ import { cancelFeedback } from '@/api/supervision-boot/leaflet'
import { useAdminInfo } from '@/stores/adminInfo' import { useAdminInfo } from '@/stores/adminInfo'
import { useDictData } from '@/stores/dictData' import { useDictData } from '@/stores/dictData'
import { getFileNameAndFilePath } from '@/api/system-boot/file' import { getFileNameAndFilePath } from '@/api/system-boot/file'
import detail from '@/views/pqs/supervise/harmonicSurvey/test/detail.vue'
const dictData = useDictData() const dictData = useDictData()
const statusSelect = dictData.statusSelect() const statusSelect = dictData.statusSelect()
@@ -44,6 +50,8 @@ const { push } = useRouter()
const feedbackPopup = ref() const feedbackPopup = ref()
const tableRef = ref() const tableRef = ref()
const dialogVisible = ref(false)
const detailId = ref('')
const TableHeaderRef = ref() const TableHeaderRef = ref()
const tableStore = new TableStore({ const tableStore = new TableStore({
url: '/supervision-boot/warningLeaflet/alarmPageData', url: '/supervision-boot/warningLeaflet/alarmPageData',
@@ -113,6 +121,7 @@ const tableStore = new TableStore({
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
} }
}, },
{ {
title: '操作', title: '操作',
minWidth: '220', minWidth: '220',
@@ -120,6 +129,20 @@ const tableStore = new TableStore({
render: 'buttons', render: 'buttons',
fixed: 'right', fixed: 'right',
buttons: [ buttons: [
{
name: 'edit',
title: '查看信息',
type: 'primary',
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return !row.problemId
},
click: async row => {
dialogVisible.value = true
detailId.value = row.problemId
}
},
{ {
name: 'productSetting', name: 'productSetting',
title: '发送督办单', title: '发送督办单',

View File

@@ -125,7 +125,7 @@ const tableStore = new TableStore({
icon: 'el-icon-Open', icon: 'el-icon-Open',
render: 'basicButton', render: 'basicButton',
showDisabled: row => { showDisabled: row => {
return row.createBy != adminInfo.$state.id || !(row.dataType == 0 || row.dataType == 1) return row.createBy != adminInfo.$state.id || !( row.dataType == 1)
}, },
click: row => { click: row => {

View File

@@ -49,7 +49,6 @@
type="date" type="date"
format="YYYY-MM-DD" format="YYYY-MM-DD"
value-format="YYYY-MM-DD" value-format="YYYY-MM-DD"
placeholder="请选择工程投产日期" placeholder="请选择工程投产日期"
/> />
</el-form-item> </el-form-item>
@@ -787,12 +786,29 @@ getFrontEndMachineList()
//定义所属供电公司数据 //定义所属供电公司数据
const powerCompanyList: any = ref([]) const powerCompanyList: any = ref([])
//获取所属供电公司,区域列表第三层数据 //获取所属供电公司,区域列表第三层数据
const getPowerCompanyList = async () => { const getPowerCompanyList = async (flag: any) => {
getAllDeptList().then(res => { getAllDeptList().then(res => {
powerCompanyList.value = res.data[0].children[0].children powerCompanyList.value = res.data[0].children[0].children
form.value.powerCompany = powerCompanyList.value[0]?.id if (flag) {
findSubstationVoltageLevel() console.log(
changeSubstation() `123`,
powerCompanyList.value.find(item => item.name == form.value.supervisionTempDeviceReport.powerCompany)
)
getSubstationVoltageLevel({
orgIds: [
powerCompanyList.value.find(
item => item.name == form.value.supervisionTempDeviceReport.powerCompany
).id
]
}).then(res => {
substationList.value = res.data
})
} else {
form.value.powerCompany = powerCompanyList.value[0]?.id
findSubstationVoltageLevel()
changeSubstation()
}
}) })
} }
//根据所选供电公司查询所选获取变电站与变电站电压等级 //根据所选供电公司查询所选获取变电站与变电站电压等级
@@ -800,6 +816,7 @@ const getPowerCompanyList = async () => {
const findSubstationVoltageLevel = async () => { const findSubstationVoltageLevel = async () => {
getSubstationVoltageLevel({ orgIds: [form.value.powerCompany] }).then(res => { getSubstationVoltageLevel({ orgIds: [form.value.powerCompany] }).then(res => {
substationList.value = res.data substationList.value = res.data
form.value.substation = substationList.value[0]?.id form.value.substation = substationList.value[0]?.id
form.value.substationVoltageLevel = substationList.value[0]?.voltageLevel form.value.substationVoltageLevel = substationList.value[0]?.voltageLevel
}) })
@@ -1373,13 +1390,15 @@ const disabledDate = time => {
const activeName = ref('0') const activeName = ref('0')
const resendId = ref('') const resendId = ref('')
const open = async (row: any) => { const open = async (row: any) => {
await getPowerCompanyList() let flag = row.row ? true : false
if (!flag) await getPowerCompanyList(false)
title.value = row.title title.value = row.title
dialogFormVisible.value = true dialogFormVisible.value = true
if (row.row) { if (row.row) {
resendId.value = row.row.id resendId.value = row.row.id
await getTerminalDetailsById({ id: row.row.id }).then((res: any) => { await getTerminalDetailsById({ id: row.row.id }).then((res: any) => {
form.value = { customSubstationFlag: 0, ...res.data, ...res.data.supervisionTempDeviceReport } form.value = { customSubstationFlag: 0, ...res.data, ...res.data.supervisionTempDeviceReport }
getPowerCompanyList(true)
let list = [ let list = [
'deviceFilePath', 'deviceFilePath',
// 'acceptanceInspectionReportSingle', // 'acceptanceInspectionReportSingle',

View File

@@ -5,6 +5,24 @@
<back-component style="margin: 8px; position: absolute; z-index: 10; top: -3px; right: 2px" /> <back-component style="margin: 8px; position: absolute; z-index: 10; top: -3px; right: 2px" />
<el-tabs type="border-card" v-model="tab" @tab-click="handleClickTab"> <el-tabs type="border-card" v-model="tab" @tab-click="handleClickTab">
<el-tab-pane label="流程审核" name="流程审核" v-if="runningTasks.length > 0"> <el-tab-pane label="流程审核" name="流程审核" v-if="runningTasks.length > 0">
<el-card v-loading="processInstanceLoading" class="box-card">
<template #header>
<span class="el-icon-document">申请信息{{ processInstance.name }}</span>
</template>
<!-- 情况一流程表单 -->
<el-col v-if="processInstance?.processDefinition?.formType === 10" :offset="6" :span="16">
<form-create
v-model="detailForm.value"
v-model:api="fApi"
:option="detailForm.option"
:rule="detailForm.rule"
/>
</el-col>
<!-- 情况二业务表单 -->
<div v-if="processInstance?.processDefinition?.formType === 20">
<BusinessFormComponent :id="processInstance.businessKey" :applyTitle="processInstance.name" />
</div>
</el-card>
<el-card <el-card
v-for="(item, index) in runningTasks" v-for="(item, index) in runningTasks"
:key="index" :key="index"
@@ -82,24 +100,7 @@
</div> </div>
</el-col> </el-col>
</el-card> </el-card>
<el-card v-loading="processInstanceLoading" class="box-card">
<template #header>
<span class="el-icon-document">申请信息{{ processInstance.name }}</span>
</template>
<!-- 情况一流程表单 -->
<el-col v-if="processInstance?.processDefinition?.formType === 10" :offset="6" :span="16">
<form-create
v-model="detailForm.value"
v-model:api="fApi"
:option="detailForm.option"
:rule="detailForm.rule"
/>
</el-col>
<!-- 情况二业务表单 -->
<div v-if="processInstance?.processDefinition?.formType === 20">
<BusinessFormComponent :id="processInstance.businessKey" :applyTitle="processInstance.name" />
</div>
</el-card>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="申请信息" name="申请信息" v-if="runningTasks.length == 0"> <el-tab-pane label="申请信息" name="申请信息" v-if="runningTasks.length == 0">
<!-- 申请信息 --> <!-- 申请信息 -->