2024-05-16 15:00:58 +08:00
|
|
|
<template>
|
2024-05-16 19:30:28 +08:00
|
|
|
<div class="default-main">
|
|
|
|
|
<el-descriptions :column="2" border>
|
|
|
|
|
<el-descriptions-item label="填报人">
|
2024-05-16 15:00:58 +08:00
|
|
|
{{ detailData.reporter }}
|
|
|
|
|
</el-descriptions-item>
|
2024-05-16 19:30:28 +08:00
|
|
|
<el-descriptions-item label="填报日期">
|
2024-05-16 15:00:58 +08:00
|
|
|
{{ formatDate(detailData.reportDate, 'YYYY-MM-DD') }}
|
|
|
|
|
</el-descriptions-item>
|
2024-05-16 19:30:28 +08:00
|
|
|
<el-descriptions-item label="填报部门">
|
2024-05-16 15:00:58 +08:00
|
|
|
{{ detailData.orgName }}
|
|
|
|
|
</el-descriptions-item>
|
2024-05-16 19:30:28 +08:00
|
|
|
<el-descriptions-item label="工程投产日期">
|
2024-05-16 15:00:58 +08:00
|
|
|
{{ formatDate(detailData.expectedProductionDate, 'YYYY-MM-DD') }}
|
|
|
|
|
</el-descriptions-item>
|
2024-05-16 19:30:28 +08:00
|
|
|
<!-- <el-descriptions-item label="所属地市">
|
2024-05-16 15:00:58 +08:00
|
|
|
{{ detailData.city }}
|
2024-05-16 19:30:28 +08:00
|
|
|
</el-descriptions-item> -->
|
|
|
|
|
<el-descriptions-item label="用户状态">
|
2024-05-16 15:00:58 +08:00
|
|
|
{{
|
|
|
|
|
userStateList.find(item => {
|
|
|
|
|
return item.value == detailData.userStatus
|
|
|
|
|
})?.label
|
|
|
|
|
}}
|
|
|
|
|
</el-descriptions-item>
|
2024-05-16 19:30:28 +08:00
|
|
|
<el-descriptions-item label="工程名">
|
|
|
|
|
{{ detailData.userName }}
|
2024-05-16 15:00:58 +08:00
|
|
|
</el-descriptions-item>
|
2024-05-16 19:30:28 +08:00
|
|
|
<!--文件地址-->
|
|
|
|
|
>
|
|
|
|
|
<el-descriptions-item label="终端台账信息" v-if="detailData.lineFilePath">
|
2024-05-16 15:00:58 +08:00
|
|
|
<el-icon>
|
|
|
|
|
<Link />
|
|
|
|
|
</el-icon>
|
2024-05-16 19:30:28 +08:00
|
|
|
<a :href="detailData?.lineFilePath.url">
|
|
|
|
|
{{ detailData?.lineFilePath.name }}
|
2024-05-16 15:00:58 +08:00
|
|
|
</a>
|
|
|
|
|
</el-descriptions-item>
|
2024-05-16 19:30:28 +08:00
|
|
|
<el-descriptions-item label="监测点台账信息" v-if="detailData.factoryInspectionReport">
|
2024-05-16 15:00:58 +08:00
|
|
|
<el-icon>
|
|
|
|
|
<Link />
|
|
|
|
|
</el-icon>
|
2024-05-16 19:30:28 +08:00
|
|
|
<a :href="detailData?.factoryInspectionReport.url">
|
|
|
|
|
{{ detailData?.factoryInspectionReport.name }}
|
2024-05-16 15:00:58 +08:00
|
|
|
</a>
|
|
|
|
|
</el-descriptions-item>
|
2024-05-16 19:30:28 +08:00
|
|
|
<el-descriptions-item label="验收检验报告单" v-if="detailData?.informationSecurityTestReport">
|
2024-05-16 15:00:58 +08:00
|
|
|
<el-icon>
|
|
|
|
|
<Link />
|
|
|
|
|
</el-icon>
|
2024-05-16 19:30:28 +08:00
|
|
|
<a :href="detailData?.informationSecurityTestReport.url">
|
|
|
|
|
{{ detailData?.informationSecurityTestReport.name }}
|
2024-05-16 15:00:58 +08:00
|
|
|
</a>
|
|
|
|
|
</el-descriptions-item>
|
2024-05-16 19:30:28 +08:00
|
|
|
<el-descriptions-item label="验收检验报告" v-if="detailData?.otherAttachments">
|
2024-05-16 15:00:58 +08:00
|
|
|
<el-icon>
|
|
|
|
|
<Link />
|
|
|
|
|
</el-icon>
|
2024-05-16 19:30:28 +08:00
|
|
|
<a :href="detailData?.otherAttachments.url">{{ detailData?.otherAttachments.name }}</a>
|
2024-05-16 15:00:58 +08:00
|
|
|
</el-descriptions-item>
|
2024-05-16 19:30:28 +08:00
|
|
|
<el-descriptions-item label="型式实验报告" v-if="detailData?.performanceTestReport">
|
2024-05-16 15:00:58 +08:00
|
|
|
<el-icon>
|
|
|
|
|
<Link />
|
|
|
|
|
</el-icon>
|
2024-05-16 19:30:28 +08:00
|
|
|
<a :href="detailData?.performanceTestReport.url">{{ detailData?.performanceTestReport.name }}</a>
|
2024-05-16 15:00:58 +08:00
|
|
|
</el-descriptions-item>
|
2024-05-16 19:30:28 +08:00
|
|
|
<el-descriptions-item label="出厂检验报告" v-if="detailData?.typeExperimentReport">
|
2024-05-16 15:00:58 +08:00
|
|
|
<el-icon>
|
|
|
|
|
<Link />
|
|
|
|
|
</el-icon>
|
2024-05-16 19:30:28 +08:00
|
|
|
<a :href="detailData?.typeExperimentReport.url">{{ detailData?.typeExperimentReport.name }}</a>
|
2024-05-16 15:00:58 +08:00
|
|
|
</el-descriptions-item>
|
2024-05-16 19:30:28 +08:00
|
|
|
<el-descriptions-item label="性能检测报告" v-if="detailData?.performanceTestReport">
|
2024-05-16 15:00:58 +08:00
|
|
|
<el-icon>
|
|
|
|
|
<Link />
|
|
|
|
|
</el-icon>
|
2024-05-16 19:30:28 +08:00
|
|
|
<a :href="detailData?.performanceTestReport.url">{{ detailData?.performanceTestReport.name }}</a>
|
2024-05-16 15:00:58 +08:00
|
|
|
</el-descriptions-item>
|
2024-05-16 19:30:28 +08:00
|
|
|
<el-descriptions-item label="信息安全检测报告" v-if="detailData?.typeExperimentReport">
|
2024-05-16 15:00:58 +08:00
|
|
|
<el-icon>
|
|
|
|
|
<Link />
|
|
|
|
|
</el-icon>
|
2024-05-16 19:30:28 +08:00
|
|
|
<a :href="detailData?.typeExperimentReport.url">{{ detailData?.typeExperimentReport.name }}</a>
|
2024-05-16 15:00:58 +08:00
|
|
|
</el-descriptions-item>
|
2024-05-16 19:30:28 +08:00
|
|
|
<el-descriptions-item label="其他附件" v-if="detailData?.additionalAttachments">
|
2024-05-16 15:00:58 +08:00
|
|
|
<el-icon>
|
|
|
|
|
<Link />
|
|
|
|
|
</el-icon>
|
2024-05-16 19:30:28 +08:00
|
|
|
<a :href="detailData?.additionalAttachments.url">{{ detailData?.additionalAttachments.name }}</a>
|
2024-05-16 15:00:58 +08:00
|
|
|
</el-descriptions-item>
|
|
|
|
|
</el-descriptions>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
2024-05-16 19:30:28 +08:00
|
|
|
<script lang="ts" setup>
|
2024-05-16 15:00:58 +08:00
|
|
|
import { onMounted, ref, reactive } from 'vue'
|
|
|
|
|
import { useRoute } from 'vue-router'
|
|
|
|
|
import { formatDate } from '@/utils/formatTime'
|
|
|
|
|
import { propTypes } from '@/utils/propTypes'
|
2024-05-16 18:58:31 +08:00
|
|
|
import { getTerminalDetailsById } from '@/api/supervision-boot/terminal/index'
|
2024-05-16 15:00:58 +08:00
|
|
|
import { getDictTreeById } from '@/api/system-boot/dictTree'
|
|
|
|
|
import { useDictData } from '@/stores/dictData'
|
|
|
|
|
import { getFileNameAndFilePath } from '@/api/system-boot/file'
|
|
|
|
|
import { Link } from '@element-plus/icons-vue'
|
|
|
|
|
|
|
|
|
|
defineOptions({ name: 'BpmUserReportDetail' })
|
|
|
|
|
|
|
|
|
|
const { query } = useRoute() // 查询参数
|
|
|
|
|
|
|
|
|
|
const props = defineProps({
|
|
|
|
|
id: propTypes.string.def(undefined)
|
|
|
|
|
})
|
|
|
|
|
const detailLoading = ref(false) // 表单的加载中
|
|
|
|
|
const detailData = ref<any>({}) // 详情数据
|
|
|
|
|
const queryId = query.id as unknown as string // 从 URL 传递过来的 id 编号
|
|
|
|
|
//用户性质数组
|
|
|
|
|
const userTypeList = reactive([
|
|
|
|
|
{
|
|
|
|
|
label: '新建电网工程',
|
|
|
|
|
value: '0'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '扩建电网工程',
|
|
|
|
|
value: '1'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '新建非线性负荷用户',
|
|
|
|
|
value: '2'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '扩建非线性负荷用户',
|
|
|
|
|
value: '3'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '新建新能源发电站',
|
|
|
|
|
value: '4'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '扩建新能源发电站',
|
|
|
|
|
value: '5'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '敏感及重要用户',
|
|
|
|
|
value: '6'
|
|
|
|
|
}
|
|
|
|
|
])
|
|
|
|
|
//用户状态数组
|
|
|
|
|
const userStateList = reactive([
|
|
|
|
|
{
|
|
|
|
|
label: '可研',
|
|
|
|
|
value: '0'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '建设',
|
|
|
|
|
value: '1'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '运行',
|
|
|
|
|
value: '2'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '退运',
|
|
|
|
|
value: '3'
|
|
|
|
|
}
|
|
|
|
|
])
|
|
|
|
|
const dictData = useDictData()
|
|
|
|
|
//字典获取所属地市
|
|
|
|
|
const areaOptionList = dictData.getBasicData('jibei_area')
|
|
|
|
|
//字典获取敏感电能质量指标
|
|
|
|
|
const energyQualityIndexList = dictData.getBasicData('Indicator_Type')
|
|
|
|
|
//字典获取行业类型
|
|
|
|
|
const industryList = dictData.getBasicData('industry_type_jb')
|
|
|
|
|
//字典电压等级
|
|
|
|
|
const voltageLevelList = dictData.getBasicData('Dev_Voltage_Stand')
|
|
|
|
|
//字典评估类型
|
|
|
|
|
const evaluationTypeList = dictData.getBasicData('Evaluation_Type')
|
|
|
|
|
//字典预测评估单位
|
|
|
|
|
const evaluationDeptList = dictData.getBasicData('evaluation_dept')
|
|
|
|
|
/** 获得数据 */
|
|
|
|
|
const getInfo = async () => {
|
|
|
|
|
detailLoading.value = true
|
|
|
|
|
try {
|
2024-05-16 19:30:28 +08:00
|
|
|
await getTerminalDetailsById({ id: props.id || queryId }).then(res => {
|
|
|
|
|
detailData.value = res.data;
|
|
|
|
|
console.log(detailData.value,"+++++++++")
|
|
|
|
|
getFileName()
|
2024-05-16 15:00:58 +08:00
|
|
|
})
|
|
|
|
|
} finally {
|
|
|
|
|
detailLoading.value = false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//判断userType选择取用的对象
|
2024-05-16 19:30:28 +08:00
|
|
|
const getFileName = async () => {
|
|
|
|
|
//验收检验报告
|
|
|
|
|
if (detailData.value.acceptanceInspectionReport) {
|
|
|
|
|
await getFileNamePath(detailData.value.acceptanceInspectionReport, 'acceptanceInspectionReport')
|
2024-05-16 15:00:58 +08:00
|
|
|
}
|
2024-05-16 19:30:28 +08:00
|
|
|
//验收检验报告单
|
|
|
|
|
if (detailData.value.acceptanceInspectionReportSingle) {
|
|
|
|
|
await getFileNamePath(detailData.value.acceptanceInspectionReportSingle, 'acceptanceInspectionReportSingle')
|
2024-05-16 15:00:58 +08:00
|
|
|
}
|
2024-05-16 19:30:28 +08:00
|
|
|
//出厂检验报告
|
|
|
|
|
if (detailData.value.factoryInspectionReport) {
|
|
|
|
|
await getFileNamePath(detailData.value.factoryInspectionReport, 'factoryInspectionReport')
|
2024-05-16 15:00:58 +08:00
|
|
|
}
|
|
|
|
|
|
2024-05-16 19:30:28 +08:00
|
|
|
//信息安全检测报告
|
|
|
|
|
if (detailData.value.informationSecurityTestReport) {
|
2024-05-16 15:00:58 +08:00
|
|
|
await getFileNamePath(
|
2024-05-16 19:30:28 +08:00
|
|
|
detailData.value.informationSecurityTestReport,
|
|
|
|
|
'informationSecurityTestReport'
|
2024-05-16 15:00:58 +08:00
|
|
|
)
|
|
|
|
|
}
|
2024-05-16 19:30:28 +08:00
|
|
|
//监测点台账信息
|
|
|
|
|
if (detailData.value.lineFilePath) {
|
|
|
|
|
await getFileNamePath(detailData.value.lineFilePath, 'lineFilePath')
|
2024-05-16 15:00:58 +08:00
|
|
|
}
|
|
|
|
|
|
2024-05-16 19:30:28 +08:00
|
|
|
//其他附件
|
|
|
|
|
if (detailData.value.otherAttachments) {
|
|
|
|
|
await getFileNamePath(detailData.value.otherAttachments, 'otherAttachments')
|
2024-05-16 15:00:58 +08:00
|
|
|
}
|
|
|
|
|
|
2024-05-16 19:30:28 +08:00
|
|
|
//性能检测报告
|
|
|
|
|
if (detailData.value.performanceTestReport) {
|
|
|
|
|
await getFileNamePath(detailData.value.performanceTestReport, 'performanceTestReport')
|
2024-05-16 15:00:58 +08:00
|
|
|
}
|
|
|
|
|
|
2024-05-16 19:30:28 +08:00
|
|
|
//型式实验报告
|
|
|
|
|
if (detailData.value.typeExperimentReport) {
|
|
|
|
|
await getFileNamePath(detailData.value.typeExperimentReport, 'typeExperimentReport')
|
2024-05-16 15:00:58 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//其他附件
|
2024-05-16 19:30:28 +08:00
|
|
|
// if (detailData.value.additionalAttachments) {
|
|
|
|
|
// getFileNamePath(detailData.value.additionalAttachments, 'additionalAttachments')
|
|
|
|
|
// }
|
2024-05-16 15:00:58 +08:00
|
|
|
}
|
|
|
|
|
//根据文件名请求
|
|
|
|
|
const getFileNamePath = async (val: any, pathName: any) => {
|
|
|
|
|
await getFileNameAndFilePath({ filePath: val }).then(res => {
|
|
|
|
|
console.log(111111111)
|
2024-05-16 19:30:28 +08:00
|
|
|
if (res.data ) {
|
2024-05-16 15:00:58 +08:00
|
|
|
//可研报告
|
2024-05-16 19:30:28 +08:00
|
|
|
if (pathName == 'acceptanceInspectionReport' && detailData.value.acceptanceInspectionReport) {
|
|
|
|
|
detailData.value.acceptanceInspectionReport = {
|
2024-05-16 15:00:58 +08:00
|
|
|
name: res.data.fileName,
|
|
|
|
|
url: res.data.url
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//终端台账信息
|
2024-05-16 19:30:28 +08:00
|
|
|
else if (pathName == 'acceptanceInspectionReportSingle' && detailData.value.acceptanceInspectionReportSingle) {
|
|
|
|
|
detailData.value.acceptanceInspectionReportSingle = {
|
2024-05-16 15:00:58 +08:00
|
|
|
name: res.data.fileName,
|
|
|
|
|
url: res.data.url
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//预测评估报告
|
2024-05-16 19:30:28 +08:00
|
|
|
else if (pathName == 'factoryInspectionReport' && detailData.value.factoryInspectionReport) {
|
|
|
|
|
detailData.value.factoryInspectionReport = {
|
2024-05-16 15:00:58 +08:00
|
|
|
name: res.data.fileName,
|
|
|
|
|
url: res.data.url
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//预测评估评审意见报告
|
|
|
|
|
else if (
|
2024-05-16 19:30:28 +08:00
|
|
|
pathName == 'informationSecurityTestReport' &&
|
|
|
|
|
detailData.value.informationSecurityTestReport
|
2024-05-16 15:00:58 +08:00
|
|
|
) {
|
2024-05-16 19:30:28 +08:00
|
|
|
detailData.value.informationSecurityTestReport = {
|
2024-05-16 15:00:58 +08:00
|
|
|
name: res.data.fileName,
|
|
|
|
|
url: res.data.url
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//用户接入变电站主接线示意图
|
2024-05-16 19:30:28 +08:00
|
|
|
else if (pathName == 'lineFilePath' && detailData.value.lineFilePath) {
|
|
|
|
|
detailData.value.lineFilePath = {
|
2024-05-16 15:00:58 +08:00
|
|
|
name: res.data.fileName,
|
|
|
|
|
url: res.data.url
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//主要敏感设备清单
|
2024-05-16 19:30:28 +08:00
|
|
|
else if (pathName == 'otherAttachments' && detailData.value.otherAttachments) {
|
|
|
|
|
detailData.value.otherAttachments = {
|
2024-05-16 15:00:58 +08:00
|
|
|
name: res.data.fileName,
|
|
|
|
|
url: res.data.url
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//抗扰度测试报告
|
2024-05-16 19:30:28 +08:00
|
|
|
else if (pathName == 'performanceTestReport' && detailData.value.performanceTestReport) {
|
|
|
|
|
detailData.value.performanceTestReport = {
|
2024-05-16 15:00:58 +08:00
|
|
|
name: res.data.fileName,
|
|
|
|
|
url: res.data.url
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//背景电能质量测试报告
|
2024-05-16 19:30:28 +08:00
|
|
|
else if (pathName == 'typeExperimentReport' && detailData.value.typeExperimentReport) {
|
|
|
|
|
detailData.value.typeExperimentReport = {
|
2024-05-16 15:00:58 +08:00
|
|
|
name: res.data.fileName,
|
|
|
|
|
url: res.data.url
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//其他附件
|
2024-05-16 19:30:28 +08:00
|
|
|
else if (pathName == 'additionalAttachments' && detailData.value.additionalAttachments) {
|
|
|
|
|
detailData.value.additionalAttachments = {
|
2024-05-16 15:00:58 +08:00
|
|
|
name: res.data.fileName,
|
|
|
|
|
url: res.data.url
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
defineExpose({ open: getInfo }) // 提供 open 方法,用于打开弹窗
|
|
|
|
|
|
|
|
|
|
/** 初始化 **/
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
getInfo()
|
|
|
|
|
})
|
|
|
|
|
</script>
|
2024-05-16 19:30:28 +08:00
|
|
|
<style lang="scss">
|
2024-05-16 15:00:58 +08:00
|
|
|
.default-main {
|
|
|
|
|
height: calc(100vh - 100px);
|
|
|
|
|
overflow: auto;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
::v-deep.el-icon svg {
|
|
|
|
|
margin: 5px !important;
|
|
|
|
|
position: absolute !important;
|
|
|
|
|
top: 20px !important;
|
|
|
|
|
}
|
|
|
|
|
</style>
|