2bc45da1 by lihua

fix: 详情给交付物添加下载功能

1 parent bc825221
......@@ -226,9 +226,9 @@ export const getPastTime = (duration, type) => {
}
/** 根据流获取url地址,用于文件查看。 */
export const getDownloadUrl = (data, fileName, type: any = null,flag=true) => {
export const getDownloadUrl= (data, fileName, type: any = null,flag=true) => {
let mineType = 'application/octet-stream'
if (type == 'excel') {
if (type == 'excel' || type == 'xlsx' || type == 'xls' || type == 'csv') {
mineType = 'application/vnd.ms-excel'
} else if (type == 'word') {
mineType = 'application/msword'
......
......@@ -168,18 +168,17 @@ const getTaskDetail = () => {
})
}
const toPath = () => {
userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath));
assetStore.set(true);
router.push({
name: 'contractManagement',
})
}
const btnClick = async (btn) => {
const type = btn.value;
if (type == 'cancel') {
toPath()
userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath));
router.push({
name: 'registerCatalogDetail',
query: {
guid: route.query.damGuid,
type: 'asset'
}
})
}
}
......
......@@ -128,6 +128,7 @@ const getDetailInfo = () => {
dataReceiveGuid: rece.dataReceiveGuid,
contractInfo: rece.contractInfo || [],
dataDeliveryName: d.dataDelivery[0].name,
dataDeliveryFile: d.dataDelivery[0],
rowspan: index + 1,
});
})
......@@ -967,11 +968,16 @@ const clickContractDetail = (item) => {
guid: item.dataContractGuid,
name: item.dataContractName,
type: 'detail',
tenantGuid: userData.tenantGuid
tenantGuid: userData.tenantGuid,
damGuid: catalogGuid
}
})
}
const viewDeliveryFile = (file) => {
onUploadFileDownload(file);
}
</script>
<template>
......@@ -1259,7 +1265,8 @@ const clickContractDetail = (item) => {
</div>
</ContentWrap>
<ContentWrap id="id-certificate" title="证件信息" v-if="route.query.type == 'certificate'" style="margin: 16px 16px 16px" >
<ContentWrap id="id-certificate" title="证件信息" v-if="route.query.type == 'certificate'"
style="margin: 16px 16px 16px">
<div class="list_panel">
<div class="list_item">
<span class="item_label">证件编码:</span>
......@@ -1280,14 +1287,17 @@ const clickContractDetail = (item) => {
</div>
<div class="list_item">
<span class="item_label">证件类型:</span>
<span class="item_value">{{ certificateDetail.documentType == 1 ? 'A证' : (certificateDetail.documentType == 2 ? 'B证' :
<span class="item_value">{{ certificateDetail.documentType == 1 ? 'A证' : (certificateDetail.documentType ==
2 ?
'B证' :
'C证') }}</span>
</div>
<div class="list_item">
<span class="item_label">证件类别:</span>
<span class="item_value">{{ certificateDetail.documentCategoryName ?? '--' }}</span>
</div>
<div class="list_item is_block" v-if="certificateDetail.documentFile?.length" :style="{ 'max-width': '700px' }">
<div class="list_item is_block" v-if="certificateDetail.documentFile?.length"
:style="{ 'max-width': '700px' }">
<span class="item_label">证件:</span>
<span class="item_value">
<div class="file-operate">
......@@ -1340,22 +1350,27 @@ const clickContractDetail = (item) => {
</ApprovalProcess>
</ContentWrap>
<ContentWrap v-if="route.query.type == 'asset' && deliveryDetailInfo.length" id="id-deliverFile" title="交付物" description=""
style="margin: 16px 16px 16px">
<ContentWrap v-if="route.query.type == 'asset' && deliveryDetailInfo.length" id="id-deliverFile" title="交付物"
description="" style="margin: 16px 16px 16px">
<el-table ref="deliveryTableRef" :data="deliveryDetailInfo" :highlight-current-row="true" stripe border
height="100%" :span-method="deliverySpanMethod" tooltip-effect="light" row-key="guid" :style="{
width: '100%',
display: 'inline-block',
}">
<el-table-column label="序号" type="index" width="56px" align="center" >
<el-table-column label="序号" type="index" width="56px" align="center">
</el-table-column>
<el-table-column prop="dataDeliveryName" label="数据交付物" width="240px" align="left" >
<el-table-column prop="dataDeliveryName" label="数据交付物" width="240px" align="left">
<template #default="scope">
<a underline="hover" style="cursor: pointer;" @click="viewDeliveryFile(scope.row.dataDeliveryFile)">{{
scope.row.dataDeliveryName }}</a>
</template>
</el-table-column>
<el-table-column prop="dataReceiveName" label="数据接收方" width="240px" align="left">
</el-table-column>
<el-table-column prop="contract" label="合同" min-width="200px" align="left">
<template #default="scope">
<a v-for="item in scope.row.contractInfo" underline="hover" style="margin-right: 12px;cursor: pointer;" @click="clickContractDetail(item)">{{
<a v-for="item in scope.row.contractInfo" underline="hover" style="margin-right: 12px;cursor: pointer;"
@click="clickContractDetail(item)">{{
item.dataContractName }}</a>
</template>
</el-table-column>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!