修改技术监督bug

This commit is contained in:
GGJ
2024-06-18 09:03:53 +08:00
parent 8233b13927
commit f33aed9b89
18 changed files with 233 additions and 178 deletions

View File

@@ -104,42 +104,42 @@
{{ detailData.otherRemark }}
</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 :href="detailData?.factoryInspectionReport.url">
{{ detailData?.factoryInspectionReport.name }}
</a>
</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 :href="detailData?.informationSecurityTestReport.url">
{{ detailData?.informationSecurityTestReport.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 :href="detailData?.otherAttachments.url">{{ detailData?.otherAttachments.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 :href="detailData?.performanceTestReport.url">{{ detailData?.performanceTestReport.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 :href="detailData?.typeExperimentReport.url">{{ detailData?.typeExperimentReport.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 :href="detailData?.performanceTestReport.url">{{ detailData?.performanceTestReport.name }}</a>
</el-descriptions-item>
@@ -153,14 +153,14 @@ import { propTypes } from '@/utils/propTypes'
import { useDictData } from '@/stores/dictData'
import { getFileNameAndFilePath } from '@/api/system-boot/file'
import { getUserByDeptId, getPlanDetailsById } from '@/api/supervision-boot/plan/index'
import { Link } from '@element-plus/icons-vue'
import { Link, View } from '@element-plus/icons-vue'
import { useAdminInfo } from '@/stores/adminInfo'
defineOptions({ name: 'BpmUserReportDetail' })
const { query } = useRoute() // 查询参数
const props = defineProps({
id: propTypes.string.def(undefined)
})
console.log(propTypes.string.def(undefined),"999999999999传参");
console.log(propTypes.string.def(undefined), '999999999999传参')
const detailLoading = ref(false) // 表单的加载中
const detailData = ref<any>({}) // 详情数据
const queryId = query.id as unknown as string // 从 URL 传递过来的 id 编号
@@ -199,7 +199,7 @@ getEffectUserList()
/** 获得数据 */
const getInfo = async () => {
detailLoading.value = true
console.log(props.id , queryId ,"流程详情内部的id");
console.log(props.id, queryId, '流程详情内部的id')
try {
await getPlanDetailsById({ id: props.id || queryId }).then(res => {
detailData.value = res.data
@@ -287,6 +287,10 @@ const getFileNamePath = async (val: any, pathName: any) => {
}
})
}
const openFile = (name: any) => {
window.open(window.location.origin + '/#/previewFile?' + name)
}
defineExpose({ open: getInfo }) // 提供 open 方法,用于打开弹窗
/** 初始化 **/
onMounted(() => {
@@ -299,8 +303,12 @@ onMounted(() => {
overflow: auto;
}
::v-deep.el-icon svg {
margin: 5px !important;
position: absolute !important;
top: 20px !important;
// margin: 5px !important;
// position: absolute !important;
// top: 20px !important;
}
.elView {
cursor: pointer;
margin-right: 10px;
}
</style>