bug调整
This commit is contained in:
@@ -1,36 +1,36 @@
|
|||||||
<template>
|
<template>
|
||||||
<!--工作流view的路径:/pqs/supervise/technology/detail-->
|
<!--工作流view的路径:/pqs/supervise/technology/detail-->
|
||||||
<div class='default-main'>
|
<div class='default-main'>
|
||||||
<!-- <h1>详细信息回显</h1>-->
|
<!-- <h1>详细信息回显</h1>-->
|
||||||
<el-descriptions :column='2' border>
|
<el-descriptions :column='2' border>
|
||||||
<el-descriptions-item :label='detailData.leafletType==1?"预警单名称":"告警单名称"'>
|
<el-descriptions-item :label='detailData.leafletType==1?"预警单名称":"告警单名称"'>
|
||||||
{{ detailData.leafletName }}
|
{{ detailData.leafletName }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label='告警单问题来源'>
|
<el-descriptions-item :label='detailData.leafletType==1?"预警单":"告警单"+"问题来源"'>
|
||||||
{{ getProblemType(detailData.problemType) }}
|
{{ getProblemType(detailData.problemType) }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item :span='2' label='告警单问题描述'>
|
<el-descriptions-item :span='2' :label='detailData.leafletType==1?"预警单":"告警单"+"问题描述"'>
|
||||||
{{ detailData.issueDetail }}
|
{{ detailData.issueDetail }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<template v-if='detailData.problemType == 4'>
|
<template v-if='detailData.problemType == 4'>
|
||||||
<el-descriptions-item :span='2' label='问题附件'>
|
<el-descriptions-item :span='2' label='问题附件'>
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<Link />
|
<Link />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
<a :href='detailData.problemPath' target='_blank'>{{ detailData.problemName }}</a>
|
<a :href='detailData.problemPath' target='_blank'>{{ detailData.problemName }}</a>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
</template>
|
</template>
|
||||||
<el-descriptions-item :span='2' label='采取措施'>
|
<el-descriptions-item :span='2' label='采取措施'>
|
||||||
{{ detailData.takeStep }}
|
{{ detailData.takeStep }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item :span='2' label='处理成效报告'>
|
<el-descriptions-item :span='2' label='处理成效报告'>
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<Link />
|
<Link />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
<a :href='detailData.reportPath' target='_blank'>{{ detailData.reportName }}</a>
|
<a :href='detailData.reportPath' target='_blank'>{{ detailData.reportName }}</a>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang='ts' setup>
|
<script lang='ts' setup>
|
||||||
import { onMounted, ref } from 'vue'
|
import { onMounted, ref } from 'vue'
|
||||||
@@ -45,60 +45,60 @@ defineOptions({ name: 'technology/detail' })
|
|||||||
const { query } = useRoute() // 查询参数
|
const { query } = useRoute() // 查询参数
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
id: propTypes.string.def(undefined)
|
id: propTypes.string.def(undefined)
|
||||||
})
|
})
|
||||||
const detailLoading = ref(false) // 表单的加载中
|
const detailLoading = ref(false) // 表单的加载中
|
||||||
const detailData = ref({}) // 详情数据
|
const detailData = ref({}) // 详情数据
|
||||||
const queryId = query.id// 从 URL 传递过来的 id 编号
|
const queryId = query.id// 从 URL 传递过来的 id 编号
|
||||||
const getProblemType = (type: number) => {
|
const getProblemType = (type: number) => {
|
||||||
if (type === 1) {
|
if (type === 1) {
|
||||||
return '技术监督计划'
|
return '技术监督计划'
|
||||||
}
|
}
|
||||||
if (type === 2) {
|
if (type === 2) {
|
||||||
return '在线监测超标问题'
|
return '在线监测超标问题'
|
||||||
}
|
}
|
||||||
if (type === 3) {
|
if (type === 3) {
|
||||||
return '用户投诉问题'
|
return '用户投诉问题'
|
||||||
}
|
}
|
||||||
if (type === 4) {
|
if (type === 4) {
|
||||||
|
return '现场测试超标问题'
|
||||||
|
}
|
||||||
return '现场测试超标问题'
|
return '现场测试超标问题'
|
||||||
}
|
|
||||||
return '现场测试超标问题'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 获得数据 */
|
/** 获得数据 */
|
||||||
const getInfo = async () => {
|
const getInfo = async () => {
|
||||||
detailLoading.value = true
|
detailLoading.value = true
|
||||||
try {
|
try {
|
||||||
await getById(props.id || queryId).then(res => {
|
await getById(props.id || queryId).then(res => {
|
||||||
detailData.value = res.data
|
detailData.value = res.data
|
||||||
getFileData()
|
getFileData()
|
||||||
})
|
})
|
||||||
} finally {
|
} finally {
|
||||||
detailLoading.value = false
|
detailLoading.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const getFileData = async () => {
|
const getFileData = async () => {
|
||||||
//如果有问题附件
|
//如果有问题附件
|
||||||
if (detailData.value.problemPath) {
|
if (detailData.value.problemPath) {
|
||||||
await getFileNameAndFilePath({ filePath: detailData.value.problemPath }).then(res => {
|
await getFileNameAndFilePath({ filePath: detailData.value.problemPath }).then(res => {
|
||||||
detailData.value.problemPath = res.data.url
|
detailData.value.problemPath = res.data.url
|
||||||
detailData.value.problemName = res.data.fileName
|
detailData.value.problemName = res.data.fileName
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
await getFileNameAndFilePath({ filePath: detailData.value.reportPath }).then(res => {
|
await getFileNameAndFilePath({ filePath: detailData.value.reportPath }).then(res => {
|
||||||
detailData.value.reportPath = res.data.url
|
detailData.value.reportPath = res.data.url
|
||||||
detailData.value.reportName = res.data.fileName
|
detailData.value.reportName = res.data.fileName
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
defineExpose({ open: getInfo }) // 提供 open 方法,用于打开弹窗
|
defineExpose({ open: getInfo }) // 提供 open 方法,用于打开弹窗
|
||||||
|
|
||||||
/** 初始化 **/
|
/** 初始化 **/
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getInfo()
|
getInfo()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
Reference in New Issue
Block a user