修改 预览展示页面

This commit is contained in:
GGJ
2024-06-14 10:26:35 +08:00
parent f15f529842
commit 33aa5a1918
9 changed files with 304 additions and 279 deletions

View File

@@ -21,13 +21,12 @@
</el-descriptions-item>
<el-descriptions-item label="文件">
<div v-for="(item, index) in aList">
<el-icon>
<Link />
<el-icon class="elView" v-if="item?.fileName">
<View @click="openFile(item?.fileName)" />
</el-icon>
<a :href="item.url">
{{ item.fileName }}
</a>
<span @click="openFile(item.fileName)">预览</span>
</div>
</el-descriptions-item>
</el-descriptions>
@@ -61,7 +60,7 @@ import { querySurveyDetail } from '@/api/process-boot/generalTest'
import { getFileNameAndFilePath } from '@/api/system-boot/file'
import { defaultAttribute } from '@/components/table/defaultAttribute'
import { useDictData } from '@/stores/dictData'
import { Link } from '@element-plus/icons-vue'
import { Link, View } from '@element-plus/icons-vue'
const { query } = useRoute() // 查询参数
const openFile = (name: any) => {
window.open(window.location.origin + '/#/previewFile?' + name)
@@ -150,3 +149,9 @@ onMounted(() => {
getInfo()
})
</script>
<style lang="scss" scoped>
.elView {
cursor: pointer;
margin-right: 5px;
}
</style>

View File

@@ -1,69 +1,68 @@
<template>
<div class='default-main'>
<el-descriptions :column='2' border>
<el-descriptions-item label='技术监督计划名称'>
{{ detailData?.planName }}
</el-descriptions-item>
<el-descriptions-item label='计划负责单位'>
{{ detailData?.deptName }}
</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='计划开始时间'>
{{ detailData?.planStartTime }}
</el-descriptions-item>
<el-descriptions-item label='计划结束时间'>
{{ detailData?.planEndTime }}
</el-descriptions-item>
<el-descriptions-item label='变电站'>
{{ detailData?.substationName }}
</el-descriptions-item>
<el-descriptions-item label='变电站电压等级'>
{{ detailData?.voltageLevel }}
</el-descriptions-item>
<el-descriptions-item label='变电站来源'>
{{ detailData?.voltageLevel == '/' ? '自定义变电站' : '系统内台账变电站' }}
</el-descriptions-item>
<el-descriptions-item label='实际完成时间'>
{{ detailData?.completeTime }}
</el-descriptions-item>
<el-descriptions-item label='负责人'>
{{ detailData?.completeBy }}
</el-descriptions-item>
<el-descriptions-item label='是否有问题'>
<el-tag :type='getProblemFlag(detailData?.problemFlag)'>
{{ getProblemFlagDetail(detailData?.problemFlag) }}
</el-tag>
</el-descriptions-item>
<el-descriptions-item v-if='detailData?.problemFlag == 1' :span='2' label='问题描述'>
{{ detailData?.problemDetail }}
</el-descriptions-item>
<div class="default-main">
<el-descriptions :column="2" border>
<el-descriptions-item label="技术监督计划名称">
{{ detailData?.planName }}
</el-descriptions-item>
<el-descriptions-item label="计划负责单位">
{{ detailData?.deptName }}
</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="计划开始时间">
{{ detailData?.planStartTime }}
</el-descriptions-item>
<el-descriptions-item label="计划结束时间">
{{ detailData?.planEndTime }}
</el-descriptions-item>
<el-descriptions-item label="变电站">
{{ detailData?.substationName }}
</el-descriptions-item>
<el-descriptions-item label="变电站电压等级">
{{ detailData?.voltageLevel }}
</el-descriptions-item>
<el-descriptions-item label="变电站来源">
{{ detailData?.voltageLevel == '/' ? '自定义变电站' : '系统内台账变电站' }}
</el-descriptions-item>
<el-descriptions-item label="实际完成时间">
{{ detailData?.completeTime }}
</el-descriptions-item>
<el-descriptions-item label="负责人">
{{ detailData?.completeBy }}
</el-descriptions-item>
<el-descriptions-item label="是否有问题">
<el-tag :type="getProblemFlag(detailData?.problemFlag)">
{{ getProblemFlagDetail(detailData?.problemFlag) }}
</el-tag>
</el-descriptions-item>
<el-descriptions-item v-if="detailData?.problemFlag == 1" :span="2" label="问题描述">
{{ detailData?.problemDetail }}
</el-descriptions-item>
<el-descriptions-item :span='2' label='测试报告'>
<el-icon>
<Link />
</el-icon>
<a :href='detailData.testReport' target='_blank'>{{ detailData.testReportName }}</a>
<span @click="openFile(detailData.testReportName )">预览</span>
</el-descriptions-item>
<el-descriptions-item :span="2" label="测试报告">
<el-icon class="elView" v-if="detailData?.testReportName">
<View @click="openFile(detailData?.testReportName)" />
</el-icon>
<a :href="detailData.testReport" target="_blank">{{ detailData.testReportName }}</a>
</el-descriptions-item>
<el-descriptions-item label='流程状态'>
<el-tag :type='getDeviceStatusType(detailData?.status)'>
{{ getDeviceStatus(detailData?.status) }}
</el-tag>
</el-descriptions-item>
</el-descriptions>
</div>
<el-descriptions-item label="流程状态">
<el-tag :type="getDeviceStatusType(detailData?.status)">
{{ getDeviceStatus(detailData?.status) }}
</el-tag>
</el-descriptions-item>
</el-descriptions>
</div>
</template>
<script setup lang='ts'>
<script setup lang="ts">
import { onMounted, ref } from 'vue'
import { useDictData } from '@/stores/dictData'
const dictData = useDictData()
@@ -73,13 +72,13 @@ import { propTypes } from '@/utils/propTypes'
import { defaultAttribute } from '@/components/table/defaultAttribute'
import { getTestById } from '@/api/supervision-boot/survey/test'
import { getFileNameAndFilePath } from '@/api/system-boot/file'
import { Link } from '@element-plus/icons-vue'
const openFile = (name:any) => {
window.open(window.location.origin + '/#/previewFile?'+name)
import { Link ,View} from '@element-plus/icons-vue'
const openFile = (name: any) => {
window.open(window.location.origin + '/#/previewFile?' + name)
}
const { query } = useRoute() // 查询参数
const props = defineProps({
id: propTypes.string.def(undefined)
id: propTypes.string.def(undefined)
})
const detailLoading = ref(false) // 表单的加载中
const detailData: any = ref({}) // 详情数据
@@ -87,90 +86,92 @@ const queryId = query.id // 从 URL 传递过来的 id 编号
/** 获得数据 */
const getInfo = async () => {
detailLoading.value = true
try {
await getTestById(props.id || queryId).then(res => {
detailData.value = res.data
getFileData()
})
} finally {
detailLoading.value = false
}
detailLoading.value = true
try {
await getTestById(props.id || queryId).then(res => {
detailData.value = res.data
getFileData()
})
} finally {
detailLoading.value = false
}
}
const getFileData = async () => {
await getFileNameAndFilePath({ filePath: detailData.value.testReport }).then(res => {
detailData.value.testReport = res.data.url
detailData.value.testReportName = res.data.fileName
})
await getFileNameAndFilePath({ filePath: detailData.value.testReport }).then(res => {
detailData.value.testReport = res.data.url
detailData.value.testReportName = res.data.fileName
})
}
const getProblemFlagDetail = (status: number) => {
if (status === 1) {
return '存在问题'
}
return '合格'
if (status === 1) {
return '存在问题'
}
return '合格'
}
const getProblemFlag = (status: number) => {
if (status === 1) {
return 'danger'
}
return 'success'
if (status === 1) {
return 'danger'
}
return 'success'
}
const getDeviceStatus = (status: number) => {
if (status === 1) {
return '审批中'
}
if (status === 2) {
if (status === 1) {
return '审批中'
}
if (status === 2) {
return '审批通过'
}
if (status === 3) {
return '审批不通过'
}
if (status === 4) {
return '已取消'
}
return '审批通过'
}
if (status === 3) {
return '审批不通过'
}
if (status === 4) {
return '已取消'
}
return '审批通过'
}
const getDeviceStatusType = (status: number) => {
if (status === 1) {
return 'primary'
}
if (status === 2) {
if (status === 1) {
return 'primary'
}
if (status === 2) {
return 'success'
}
if (status === 3) {
return 'danger'
}
if (status === 4) {
return 'warning'
}
return 'success'
}
if (status === 3) {
return 'danger'
}
if (status === 4) {
return 'warning'
}
return 'success'
}
const formatterSource = (row: any) => {
if (row.column.field == 'dataSource') {
if (row.cellValue == 0) {
return '系统内台账变电站'
if (row.column.field == 'dataSource') {
if (row.cellValue == 0) {
return '系统内台账变电站'
} else {
return '自定义变电站'
}
} else {
return '自定义变电站'
return row.cellValue
}
} else {
return row.cellValue
}
}
defineExpose({ open: getInfo }) // 提供 open 方法,用于打开弹窗
/** 初始化 **/
onMounted(() => {
getInfo()
getInfo()
})
</script>
<style lang="scss" scoped>
.elView {
cursor: pointer;
margin-right: 5px;
}
</style>

View File

@@ -251,10 +251,12 @@
<details_item>
<template #label>可研报告</template>
<template #content>
<span v-if="detailData.userType == 0 || detailData.userType == 1">
<el-icon><Link /></el-icon>
<el-icon class="elView" v-if="proviteData?.feasibilityReport.name ">
<View @click="openFile(proviteData.feasibilityReport.name )" />
</el-icon>
<a :href="proviteData.feasibilityReport.url">{{ proviteData.feasibilityReport.name }}</a>
<span @click="openFile(proviteData?.feasibilityReport.name)">预览</span>
</span>
<span
v-if="
@@ -264,103 +266,97 @@
detailData.userType == 5
"
>
<el-icon><Link /></el-icon>
<el-icon class="elView" v-if="proviteData?.feasibilityReport.name">
<View @click="openFile(proviteData.feasibilityReport.name)" />
</el-icon>
<a :href="proviteData.feasibilityReport.url">{{ proviteData.feasibilityReport.name }}</a>
<span @click="openFile(proviteData?.feasibilityReport.name)">预览</span>
</span>
<span v-if="detailData.userType == 6">
<el-icon><Link /></el-icon>
<el-icon class="elView" v-if="proviteData?.feasibilityReport.name ">
<View @click="openFile(proviteData.feasibilityReport.name )" />
</el-icon>
<a :href="proviteData.feasibilityReport.url">{{ proviteData.feasibilityReport.name }}</a>
<span @click="openFile(proviteData?.feasibilityReport.name)">预览</span>
</span>
</template>
</details_item>
<details_item>
<template #label>项目初步设计说明书</template>
<template #content>
<el-icon>
<Link />
<el-icon class="elView" v-if="proviteData?.preliminaryDesignDescription.name">
<View @click="openFile(proviteData?.preliminaryDesignDescription.name)" />
</el-icon>
<a :href="proviteData?.preliminaryDesignDescription.url">
{{ proviteData?.preliminaryDesignDescription.name }}
</a>
<span @click="openFile(proviteData?.preliminaryDesignDescription.name)">预览</span>
</template>
</details_item>
<details_item>
<template #label>预测评估报告</template>
<template #content>
<el-icon>
<Link />
<el-icon class="elView" v-if="proviteData?.predictionEvaluationReport.name">
<View @click="openFile(proviteData?.predictionEvaluationReport.name)" />
</el-icon>
<a :href="proviteData?.predictionEvaluationReport.url">
{{ proviteData?.predictionEvaluationReport.name }}
</a>
<span @click="openFile(proviteData?.predictionEvaluationReport.name)">预览</span>
</template>
</details_item>
<details_item>
<template #label>预测评估评审意见报告</template>
<template #content>
<el-icon>
<Link />
<el-icon class="elView" v-if="proviteData?.predictionEvaluationReviewOpinions.name">
<View @click="openFile(proviteData?.predictionEvaluationReviewOpinions.name)" />
</el-icon>
<a :href="proviteData?.predictionEvaluationReviewOpinions.url">
{{ proviteData?.predictionEvaluationReviewOpinions.name }}
</a>
<span @click="openFile(proviteData?.predictionEvaluationReviewOpinions.name)">预览</span>
</template>
</details_item>
<details_item v-if="detailData.userType != 0 && detailData.userType != 1">
<template #label>用户接入变电站主接线示意图</template>
<template #content>
<el-icon>
<Link />
<el-icon class="elView" v-if="proviteData?.substationMainWiringDiagram.name">
<View @click="openFile(proviteData?.substationMainWiringDiagram.name)" />
</el-icon>
<a :href="proviteData?.substationMainWiringDiagram.url" target="_blank">
{{ proviteData?.substationMainWiringDiagram.name }}
</a>
<span @click="openFile(proviteData?.substationMainWiringDiagram.name)">预览</span>
</template>
</details_item>
<details_item v-if="detailData.userType == 6">
<template #label>主要敏感终端清单</template>
<template #content>
<el-icon>
<Link />
<el-icon class="elView" v-if="proviteData?.sensitiveDevices.name">
<View @click="openFile(proviteData?.sensitiveDevices.name)" />
</el-icon>
<a :href="proviteData?.sensitiveDevices.url">{{ proviteData?.sensitiveDevices.name }}</a>
<span @click="openFile(proviteData?.sensitiveDevices.name)">预览</span>
</template>
</details_item>
<details_item v-if="detailData.userType == 6">
<template #label>抗扰度测试报告</template>
<template #content>
<el-icon>
<Link />
<el-icon class="elView" v-if="proviteData?.antiInterferenceReport.name">
<View @click="openFile(proviteData?.antiInterferenceReport.name)" />
</el-icon>
<a :href="proviteData?.antiInterferenceReport.url">{{ proviteData?.antiInterferenceReport.name }}</a>
<span @click="openFile(proviteData?.antiInterferenceReport.name)">预览</span>
</template>
</details_item>
<details_item v-if="detailData.userType == 6">
<template #label>背景电能质量测试报告</template>
<template #content>
<el-icon>
<Link />
<el-icon class="elView" v-if="proviteData?.powerQualityReport.name">
<View @click="openFile(proviteData?.powerQualityReport.name)" />
</el-icon>
<a :href="proviteData?.powerQualityReport.url">{{ proviteData?.powerQualityReport.name }}</a>
<span @click="openFile(proviteData?.powerQualityReport.name)">预览</span>
</template>
</details_item>
<details_item v-if="proviteData?.additionalAttachments.url">
<template #label>其他附件</template>
<template #content>
<el-icon>
<Link />
<el-icon class="elView" v-if="proviteData?.additionalAttachments.name">
<View @click="openFile(proviteData?.additionalAttachments.name)" />
</el-icon>
<a :href="proviteData?.additionalAttachments.url">{{ proviteData?.additionalAttachments.name }}</a>
<span @click="openFile(proviteData?.additionalAttachments.name)">预览</span>
</template>
</details_item>
<el-divider content-position="left">{{ applyTitle + '填报信息' }}</el-divider>
@@ -385,9 +381,10 @@
<details_item v-if="proviteData?.otherReport && proviteData?.otherReport.url">
<template #label>{{ applyTitle + '报告' }}</template>
<template #content>
<el-icon><Link /></el-icon>
<el-icon class="elView" v-if="proviteData?.otherReport.name">
<View @click="openFile(proviteData?.otherReport.nam)" />
</el-icon>
<a :href="proviteData?.otherReport.url">{{ proviteData?.otherReport.name }}</a>
<span @click="openFile(proviteData?.otherReport.name)">预览</span>
</template>
</details_item>
</div>
@@ -401,7 +398,7 @@ import { getUserReportById } from '@/api/supervision-boot/userReport/form'
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'
import { Link, View } from '@element-plus/icons-vue'
import { userReportGoNetById } from '@/api/supervision-boot/interfere'
import details_item from './components/detailsItem.vue'
defineOptions({ name: 'BpmUserReportDetail' })
@@ -664,4 +661,8 @@ onMounted(() => {
display: flex;
flex-wrap: wrap;
}
.elView {
cursor: pointer;
margin-right: 5px;
}
</style>

View File

@@ -52,7 +52,7 @@
<el-descriptions-item label="预测评估单位">
{{ detailData.evaluationDept }}
</el-descriptions-item>
<el-descriptions-item label="预测评估结论" :span="2">
<el-descriptions-item label="预测评估结论" :span="2">
{{ detailData.evaluationConclusion }}
</el-descriptions-item>
<el-descriptions-item
@@ -207,11 +207,13 @@
</el-descriptions-item>
<el-descriptions-item label="可研报告">
<span v-if="detailData.userType == 0 || detailData.userType == 1">
<el-icon><Link /></el-icon>
<el-icon class="elView" v-if="proviteData?.feasibilityReport?.name">
<View @click="openFile(proviteData?.feasibilityReport?.name)" />
</el-icon>
<a target="_blank" :href="proviteData.feasibilityReport?.url" rel="nofollow">
{{ proviteData.feasibilityReport?.name }}
</a>
<span @click="openFile(proviteData.feasibilityReport?.name )">预览</span>
</span>
<span
v-if="
@@ -221,97 +223,92 @@
detailData.userType == 5
"
>
<el-icon><Link /></el-icon>
<el-icon class="elView" v-if="proviteData?.feasibilityReport?.name">
<View @click="openFile(proviteData?.feasibilityReport?.name)" />
</el-icon>
<a target="_blank" :href="proviteData.feasibilityReport?.url">
{{ proviteData.feasibilityReport?.name }}
</a>
<span @click="openFile(proviteData.feasibilityReport?.name )">预览</span>
</span>
<span v-if="detailData.userType == 6">
<el-icon><Link /></el-icon>
<el-icon class="elView" v-if="proviteData?.feasibilityReport?.name">
<View @click="openFile(proviteData?.feasibilityReport?.name)" />
</el-icon>
<a target="_blank" :href="proviteData.feasibilityReport?.url">
{{ proviteData.feasibilityReport?.name }}
</a>
<span @click="openFile(proviteData.feasibilityReport?.name )">预览</span>
</span>
</el-descriptions-item>
<el-descriptions-item label="项目初步设计说明书">
<el-icon>
<Link />
<el-icon class="elView" v-if="proviteData?.preliminaryDesignDescription?.name">
<View @click="openFile(proviteData?.preliminaryDesignDescription?.name)" />
</el-icon>
<a target="_blank" :href="proviteData?.preliminaryDesignDescription?.url">
{{ proviteData?.preliminaryDesignDescription?.name }}
</a>
<span @click="openFile(proviteData.preliminaryDesignDescription?.name )">预览</span>
</el-descriptions-item>
<el-descriptions-item label="预测评估报告">
<el-icon>
<Link />
<el-icon class="elView" v-if="proviteData?.predictionEvaluationReport?.name">
<View @click="openFile(proviteData?.predictionEvaluationReport?.name)" />
</el-icon>
<a target="_blank" :href="proviteData?.predictionEvaluationReport?.url">
{{ proviteData?.predictionEvaluationReport?.name }}
</a>
<span @click="openFile(proviteData.predictionEvaluationReport?.name )">预览</span>
</el-descriptions-item>
<el-descriptions-item label="预测评估评审意见报告">
<el-icon>
<Link />
<el-icon class="elView" v-if="proviteData?.predictionEvaluationReviewOpinions?.name">
<View @click="openFile(proviteData?.predictionEvaluationReviewOpinions?.name)" />
</el-icon>
<a target="_blank" :href="proviteData?.predictionEvaluationReviewOpinions?.url">
{{ proviteData?.predictionEvaluationReviewOpinions?.name }}
</a>
<span @click="openFile(proviteData.predictionEvaluationReviewOpinions?.name )">预览</span>
</el-descriptions-item>
<el-descriptions-item
label="用户接入变电站主接线示意图"
v-if="detailData.userType != 0 && detailData.userType != 1"
>
<el-icon>
<Link />
<el-icon class="elView" v-if="proviteData?.substationMainWiringDiagram?.name">
<View @click="openFile(proviteData?.substationMainWiringDiagram?.name)" />
</el-icon>
<a target="_blank" :href="proviteData?.substationMainWiringDiagram?.url">
{{ proviteData?.substationMainWiringDiagram?.name }}
</a>
<span @click="openFile(proviteData.substationMainWiringDiagram?.name )">预览</span>
</el-descriptions-item>
<el-descriptions-item label="主要敏感终端清单" v-if="detailData.userType == 6">
<el-icon>
<Link />
<el-icon class="elView" v-if="proviteData?.sensitiveDevices?.name">
<View @click="openFile(proviteData?.sensitiveDevices?.name)" />
</el-icon>
<a target="_blank" :href="proviteData?.sensitiveDevices?.url">
{{ proviteData?.sensitiveDevices?.name }}
</a>
<span @click="openFile(proviteData.sensitiveDevices?.name )">预览</span>
</el-descriptions-item>
<el-descriptions-item label="抗扰度测试报告" v-if="detailData.userType == 6">
<el-icon>
<Link />
<el-icon class="elView" v-if="proviteData?.antiInterferenceReport?.name">
<View @click="openFile(proviteData?.antiInterferenceReport?.name)" />
</el-icon>
<a target="_blank" :href="proviteData?.antiInterferenceReport?.url">
{{ proviteData?.antiInterferenceReport?.name }}
</a>
<span @click="openFile(proviteData.antiInterferenceReport?.name )">预览</span>
</el-descriptions-item>
<el-descriptions-item label="背景电能质量测试报告" v-if="detailData.userType == 6">
<el-icon>
<Link />
<el-icon class="elView" v-if="proviteData?.powerQualityReport?.name">
<View @click="openFile(proviteData?.powerQualityReport?.name)" />
</el-icon>
<a target="_blank" :href="proviteData?.powerQualityReport?.url">
{{ proviteData?.powerQualityReport?.name }}
</a>
<span @click="openFile(proviteData.powerQualityReport?.name )">预览</span>
</el-descriptions-item>
<el-descriptions-item
label="其他附件"
v-if="proviteData?.additionalAttachments && proviteData?.additionalAttachments?.url"
>
<el-icon>
<Link />
<el-icon class="elView" v-if="proviteData?.additionalAttachments?.name">
<View @click="openFile(proviteData?.additionalAttachments?.name)" />
</el-icon>
<a target="_blank" :href="proviteData?.additionalAttachments?.url">
{{ proviteData?.additionalAttachments?.name }}
</a>
<span @click="openFile(proviteData.additionalAttachments?.name )">预览</span>
</el-descriptions-item>
</el-descriptions>
</div>
@@ -325,7 +322,7 @@ import { getUserReportById } from '@/api/supervision-boot/userReport/form'
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'
import { Link, View } from '@element-plus/icons-vue'
import PreviewFile from '@/components/PreviewFile/index.vue'
defineOptions({ name: 'BpmUserReportDetail' })
@@ -337,8 +334,8 @@ const props = defineProps({
const detailLoading = ref(false) // 表单的加载中
const detailData = ref<any>({}) // 详情数据
const queryId = query.id as unknown as string // 从 URL 传递过来的 id 编号
const openFile = (name:any) => {
window.open(window.location.origin + '/#/previewFile?'+name)
const openFile = (name: any) => {
window.open(window.location.origin + '/#/previewFile?' + name)
}
//用户性质数组
const userTypeList = reactive([
@@ -419,23 +416,23 @@ const getInfo = async () => {
}
const proviteData = ref()
//可研报告
const feasibilityReportRef = ref(null)
const feasibilityReportRef:any = ref(null)
//项目初步设计说明书
const preliminaryDesignDescriptionRef = ref(null)
const preliminaryDesignDescriptionRef:any = ref(null)
//预测评估报告
const predictionEvaluationReportRef = ref(null)
const predictionEvaluationReportRef:any = ref(null)
//预测评估评审意见报告
const predictionEvaluationReviewOpinionsRef = ref(null)
const predictionEvaluationReviewOpinionsRef:any = ref(null)
//用户接入变电站主接线示意图
const substationMainWiringDiagramRef = ref(null)
const substationMainWiringDiagramRef:any= ref(null)
//主要敏感终端清单
const sensitiveDevicesRef = ref(null)
const sensitiveDevicesRef:any = ref(null)
//抗扰度测试报告
const antiInterferenceReportRef = ref(null)
const antiInterferenceReportRef:any = ref(null)
//背景电能质量测试报告
const powerQualityReportRef = ref(null)
const powerQualityReportRef:any = ref(null)
//其他附件
const additionalAttachmentsRef = ref(null)
const additionalAttachmentsRef:any = ref(null)
//预览
const preview = (val: any, url: any) => {
nextTick(() => {
@@ -637,12 +634,16 @@ onMounted(() => {
position: absolute !important;
top: 20px !important;
}
.el-icon {
float: left;
}
// .el-icon {
// float: left;
// }
a {
display: block;
width: 200px;
float: left;
}
.elView {
cursor: pointer;
margin-right: 5px;
}
</style>

View File

@@ -1,46 +1,44 @@
<template>
<!--工作流view的路径/pqs/supervise/technology/detail-->
<div class='default-main'>
<div class="default-main">
<!-- <h1>详细信息回显</h1>-->
<el-descriptions :column='2' border>
<el-descriptions-item :label='detailData.leafletType==1?"预警单名称":"告警单名称"'>
<el-descriptions :column="2" border>
<el-descriptions-item :label="detailData.leafletType == 1 ? '预警单名称' : '告警单名称'">
{{ detailData.leafletName }}
</el-descriptions-item>
<el-descriptions-item :label='detailData.leafletType==1?"预警单":"告警单"+"问题来源"'>
<el-descriptions-item :label="detailData.leafletType == 1 ? '预警单' : '告警单' + '问题来源'">
{{ getProblemType(detailData.problemType) }}
</el-descriptions-item>
<el-descriptions-item :span='2' :label='detailData.leafletType==1?"预警单":"告警单"+"问题描述"'>
<el-descriptions-item :span="2" :label="detailData.leafletType == 1 ? '预警单' : '告警单' + '问题描述'">
{{ detailData.issueDetail }}
</el-descriptions-item>
<template v-if='detailData.problemType == 4'>
<el-descriptions-item :span='2' label='附件'>
<el-icon>
<Link />
<template v-if="detailData.problemType == 4">
<el-descriptions-item :span="2" label="附件">
<el-icon class="elView" v-if="detailData?.problemName">
<View @click="openFile(detailData?.problemName)" />
</el-icon>
<a :href='detailData.problemPath' target='_blank'>{{ detailData.problemName }}</a>
<span @click="openFile(detailData.problemName)">预览</span>
<a :href="detailData.problemPath" target="_blank">{{ detailData.problemName }}</a>
</el-descriptions-item>
</template>
<el-descriptions-item :span='2' label='采取措施'>
<el-descriptions-item :span="2" label="采取措施">
{{ detailData.takeStep }}
</el-descriptions-item>
<el-descriptions-item :span='2' label='处理成效报告'>
<el-icon>
<Link />
<el-descriptions-item :span="2" label="处理成效报告">
<el-icon class="elView" v-if="detailData?.reportName">
<View @click="openFile(detailData?.reportName)" />
</el-icon>
<a :href='detailData.reportPath' target='_blank'>{{ detailData.reportName }}</a>
<span @click="openFile(detailData.reportName)">预览</span>
<a :href="detailData.reportPath" target="_blank">{{ detailData.reportName }}</a>
</el-descriptions-item>
</el-descriptions>
</div>
</template>
<script lang='ts' setup>
<script lang="ts" setup>
import { onMounted, ref } from 'vue'
import { useRoute } from 'vue-router'
import { propTypes } from '@/utils/propTypes'
import { getById } from '@/api/supervision-boot/leaflet'
import { getFileNameAndFilePath } from '@/api/system-boot/file'
import { Link } from '@element-plus/icons-vue'
import { Link, View } from '@element-plus/icons-vue'
defineOptions({ name: 'technology/detail' })
const openFile = (name: any) => {
@@ -52,8 +50,8 @@ const props = defineProps({
id: propTypes.string.def(undefined)
})
const detailLoading = ref(false) // 表单的加载中
const detailData = ref({}) // 详情数据
const queryId = query.id// 从 URL 传递过来的 id 编号
const detailData: any = ref({}) // 详情数据
const queryId = query.id // 从 URL 传递过来的 id 编号
const getProblemType = (type: number) => {
if (type === 1) {
return '技术监督计划'
@@ -105,6 +103,9 @@ onMounted(() => {
getInfo()
})
</script>
<style scoped>
<style lang="scss" scoped>
.elView {
cursor: pointer;
margin-right: 5px;
}
</style>

View File

@@ -13,11 +13,10 @@
</el-form-item>
<el-form-item label="问题附件:" v-if="showFile">
<el-icon>
<Link />
<el-icon class="elView" v-if="problemDetail?.problemName">
<View @click="openFile(problemDetail?.problemName)" />
</el-icon>
<a :href="problemDetail.problemPath" target="_blank">{{ problemDetail.problemName }}</a>
<span @click="openFile(problemDetail.problemName )">预览</span>
</el-form-item>
<el-form-item label="采取的措施:" prop="takeStep">
@@ -63,7 +62,7 @@ import { ElMessage, genFileId, UploadProps, UploadRawFile } from 'element-plus'
import TableStore from '@/utils/tableStore' // 若不是列表页面弹框可删除
import { getFileNameAndFilePath, uploadFile } from '@/api/system-boot/file'
import { addFeedback, updateFeedback } from '@/api/supervision-boot/leaflet'
import { Link } from '@element-plus/icons-vue'
import { Link, View } from '@element-plus/icons-vue'
const openFile = (name: any) => {
window.open(window.location.origin + '/#/previewFile?' + name)
}
@@ -117,7 +116,7 @@ const open = async (
) => {
title.value = text
resetForm()
console.log(66666,reportPath);
console.log(66666, reportPath)
if (takeStep) {
form.value.takeStep = takeStep
}
@@ -229,4 +228,8 @@ const uploadFileName = val => {
.el-select {
min-width: 180px;
}
.elView {
cursor: pointer;
margin-right: 5px;
}
</style>

View File

@@ -23,15 +23,14 @@
{{ getDeviceStatus(detailData?.status) }}
</el-tag>
</el-descriptions-item>
<el-descriptions-item label="文件">
<el-icon>
<Link />
<el-descriptions-item label="报告文件">
<el-icon class="elView" v-if="detailData?.reportPaths?.fileName">
<View @click="openFile(detailData?.reportPaths?.fileName)" />
</el-icon>
<a :href="detailData.reportPaths?.url">
{{ detailData.reportPaths?.fileName }}
</a>
<span @click="detailData.reportPaths?.fileName">预览</span>
</el-descriptions-item>
</el-descriptions-item>
<el-descriptions-item label="描述">
{{ detailData?.description }}
</el-descriptions-item>
@@ -47,7 +46,7 @@ import { propTypes } from '@/utils/propTypes'
import { getInfoById } from '@/api/supervision-boot/cycleDetection/index'
import { getFileNameAndFilePath } from '@/api/system-boot/file'
import { useDictData } from '@/stores/dictData'
import { Link } from '@element-plus/icons-vue'
import { Link,View } from '@element-plus/icons-vue'
const { query } = useRoute() // 查询参数
const openFile = (name: any) => {
window.open(window.location.origin + '/#/previewFile?' + name)
@@ -116,3 +115,9 @@ onMounted(() => {
getInfo()
})
</script>
<style lang="scss" scoped>
.elView {
cursor: pointer;
margin-right: 5px;
}
</style>

View File

@@ -113,13 +113,12 @@
</el-descriptions-item>
<!--文件地址-->
<el-descriptions-item label="主接线图" v-if="detailData?.mainWiringDiagram">
<el-icon>
<Link />
</el-icon>
<el-icon class="elView" v-if="detailData?.mainWiringDiagram.name">
<View @click="openFile(detailData?.mainWiringDiagram.name)" />
</el-icon>
<a target="_blank" href="detailData?.mainWiringDiagram.url">
{{ detailData?.mainWiringDiagram.name }}
</a>
<span @click="openFile(detailData?.mainWiringDiagram.name)">预览</span>
</el-descriptions-item>
</el-descriptions>
</template>
@@ -131,7 +130,7 @@ import { propTypes } from '@/utils/propTypes'
import { getTempLineDetailsById } from '@/api/supervision-boot/monitorpoint/index'
import { useDictData } from '@/stores/dictData'
import { getFileNameAndFilePath } from '@/api/system-boot/file'
import { Link } from '@element-plus/icons-vue'
import { Link,View } from '@element-plus/icons-vue'
const openFile = (name: any) => {
window.open(window.location.origin + '/#/previewFile?' + name)
}
@@ -259,7 +258,7 @@ onMounted(() => {
getInfo()
})
</script>
<style lang="scss">
<style lang="scss" scoped>
.default-main {
// height: calc(100vh - 100px);
overflow: auto;
@@ -270,4 +269,8 @@ onMounted(() => {
position: absolute !important;
top: 20px !important;
}
.elView {
cursor: pointer;
margin-right: 5px;
}
</style>

View File

@@ -186,57 +186,58 @@
{{ detailData.supervisionTempDeviceReport?.contractNumber }}
</el-descriptions-item>
<el-descriptions-item label="信息安全检测报告" v-if="detailData?.informationSecurityTestReport">
<el-icon>
<Link />
<el-icon class="elView" v-if="detailData?.informationSecurityTestReport?.name">
<View @click="openFile(detailData?.informationSecurityTestReport?.name)" />
</el-icon>
<a target="_blank":href="detailData?.informationSecurityTestReport.url">
<a target="_blank" :href="detailData?.informationSecurityTestReport.url">
{{ detailData?.informationSecurityTestReport.name }}
</a>
<span @click="openFile(detailData.informationSecurityTestReport?.name )">预览</span>
</el-descriptions-item>
<el-descriptions-item label="验收检验报告单" v-if="detailData?.acceptanceInspectionReportSingle">
<el-icon>
<Link />
<el-icon class="elView" v-if="detailData?.acceptanceInspectionReportSingle?.name">
<View @click="openFile(detailData?.acceptanceInspectionReportSingle?.name)" />
</el-icon>
<a target="_blank":href="detailData?.acceptanceInspectionReportSingle.url">
<a target="_blank" :href="detailData?.acceptanceInspectionReportSingle.url">
{{ detailData?.acceptanceInspectionReportSingle.name }}
</a>
<span @click="openFile(detailData.acceptanceInspectionReportSingle?.name )">预览</span>
</el-descriptions-item>
<el-descriptions-item label="验收检验报告" v-if="detailData?.acceptanceInspectionReport">
<el-icon>
<Link />
<el-icon class="elView" v-if="detailData?.acceptanceInspectionReport?.name">
<View @click="openFile(detailData?.acceptanceInspectionReport?.name)" />
</el-icon>
<a target="_blank":href="detailData?.acceptanceInspectionReport.url">{{ detailData?.acceptanceInspectionReport.name }}</a>
<span @click="openFile(detailData.acceptanceInspectionReport?.name )">预览</span>
<a target="_blank" :href="detailData?.acceptanceInspectionReport.url">
{{ detailData?.acceptanceInspectionReport.name }}
</a>
</el-descriptions-item>
<el-descriptions-item label="型式实验报告" v-if="detailData?.typeExperimentReport">
<el-icon>
<Link />
<el-icon class="elView" v-if="detailData?.typeExperimentReport.name">
<View @click="openFile(detailData?.typeExperimentReport.name)" />
</el-icon>
<a target="_blank":href="detailData?.typeExperimentReport.url">{{ detailData?.typeExperimentReport.name }}</a>
<span @click="openFile(detailData.typeExperimentReport?.name )">预览</span>
<a target="_blank" :href="detailData?.typeExperimentReport.url">
{{ detailData?.typeExperimentReport.name }}
</a>
</el-descriptions-item>
<el-descriptions-item label="出厂检验报告" v-if="detailData?.factoryInspectionReport">
<el-icon>
<Link />
<el-icon class="elView" v-if="detailData?.factoryInspectionReport.name">
<View @click="openFile(detailData?.factoryInspectionReport.name)" />
</el-icon>
<a target="_blank":href="detailData?.factoryInspectionReport.url">{{ detailData?.factoryInspectionReport.name }}</a>
<span @click="openFile(detailData.factoryInspectionReport?.name )">预览</span>
<a target="_blank" :href="detailData?.factoryInspectionReport.url">
{{ detailData?.factoryInspectionReport.name }}
</a>
</el-descriptions-item>
<el-descriptions-item label="性能检测报告" v-if="detailData?.performanceTestReport">
<el-icon>
<Link />
<el-icon class="elView" v-if="detailData?.performanceTestReport.name">
<View @click="openFile(detailData?.performanceTestReport.name)" />
</el-icon>
<a target="_blank":href="detailData?.performanceTestReport.url">{{ detailData?.performanceTestReport.name }}</a>
<span @click="openFile(detailData.performanceTestReport?.name )">预览</span>
<a target="_blank" :href="detailData?.performanceTestReport.url">
{{ detailData?.performanceTestReport.name }}
</a>
</el-descriptions-item>
<el-descriptions-item label="其他附件" v-if="detailData?.otherAttachments">
<el-icon>
<Link />
<el-icon class="elView" v-if="detailData?.otherAttachments.name">
<View @click="openFile(detailData?.otherAttachments.name)" />
</el-icon>
<a target="_blank":href="detailData?.otherAttachments.url">{{ detailData?.otherAttachments.name }}</a>
<span @click="openFile(detailData.otherAttachments?.name )">预览</span>
<a target="_blank" :href="detailData?.otherAttachments.url">{{ detailData?.otherAttachments.name }}</a>
</el-descriptions-item>
</el-descriptions>
</template>
@@ -249,11 +250,11 @@ import { getTerminalDetailsById } from '@/api/supervision-boot/terminal/index'
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'
import { Link, View } from '@element-plus/icons-vue'
import { nodeAllList } from '@/api/device-boot/Business'
defineOptions({ name: 'BpmUserReportDetail' })
const openFile = (name:any) => {
window.open(window.location.origin + '/#/previewFile?'+name)
const openFile = (name: any) => {
window.open(window.location.origin + '/#/previewFile?' + name)
}
const { query } = useRoute() // 查询参数
@@ -479,7 +480,7 @@ onMounted(() => {
getInfo()
})
</script>
<style lang="scss">
<style lang="scss" scoped>
.default-main {
// height: calc(100vh - 100px);
overflow: auto;
@@ -490,4 +491,8 @@ onMounted(() => {
position: absolute !important;
top: 20px !important;
}
.elView {
cursor: pointer;
margin-right: 5px;
}
</style>