修改技术监督问题

This commit is contained in:
GGJ
2024-07-18 14:25:53 +08:00
parent 4a6eaf50e8
commit 049d0c1132
11 changed files with 373 additions and 18 deletions

View File

@@ -309,6 +309,27 @@
{{ proviteData?.additionalAttachments?.name }}
</a>
</el-descriptions-item>
<el-descriptions-item label="入网评估报告">
<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="治理评估告">
<div v-for="item in governReportList">
<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>
</div>
</template>
@@ -340,6 +361,8 @@ const queryId = query.id as unknown as string // 从 URL 传递过来的 id 编
const openFile = (name: any) => {
window.open(window.location.origin + '/#/previewFile?' + name)
}
const netInReportList: any = ref([])
const governReportList: any = ref([])
//用户性质数组
const userTypeList = reactive([
{
@@ -409,18 +432,17 @@ const powerSupplyInfoOptionList = dictData.getBasicData('supply_condition')
const getInfo = async () => {
detailLoading.value = true
try {
if(props.update){
if (props.update) {
await getUserReportUpdateById(props.id || queryId).then(res => {
detailData.value = res.data.userReportMessageJson
getProviteData()
})
}else{
detailData.value = res.data.userReportMessageJson
getProviteData()
})
} else {
await getUserReportById(props.id || queryId).then(res => {
detailData.value = res.data
getProviteData()
})
detailData.value = res.data
getProviteData()
})
}
} finally {
detailLoading.value = false
}
@@ -552,6 +574,21 @@ const getProviteData = async () => {
if (proviteData.value.additionalAttachments) {
getFileNamePath(proviteData.value.additionalAttachments, 'additionalAttachments')
}
// 入网评估报告
if (detailData.value.netInReport.length > 0) {
netInReportList.value = []
detailData.value.netInReport.forEach((item: any) => {
getFileNamePath(item, 'netInReport')
})
}
// 治理评估告"
if (detailData.value.governReport.length > 0) {
governReportList.value = []
detailData.value.governReport.forEach((item: any) => {
getFileNamePath(item, 'governReport')
})
}
}
//根据文件名请求
const getFileNamePath = async (val: any, pathName: any) => {
@@ -623,6 +660,18 @@ const getFileNamePath = async (val: any, pathName: any) => {
url: res.data.url
}
}
if (pathName == 'netInReport') {
netInReportList.value.push({
name: res.data.fileName,
url: res.data.url
})
} else if (pathName == 'governReport') {
governReportList.value.push({
name: res.data.fileName,
url: res.data.url
})
}
}
})
}
@@ -658,5 +707,4 @@ onMounted(() => {
cursor: pointer;
margin-right: 10px;
}
</style>