fix: 详情给交付物添加下载功能
Showing
3 changed files
with
36 additions
and
21 deletions
| ... | @@ -226,9 +226,9 @@ export const getPastTime = (duration, type) => { | ... | @@ -226,9 +226,9 @@ export const getPastTime = (duration, type) => { |
| 226 | } | 226 | } |
| 227 | 227 | ||
| 228 | /** 根据流获取url地址,用于文件查看。 */ | 228 | /** 根据流获取url地址,用于文件查看。 */ |
| 229 | export const getDownloadUrl = (data, fileName, type: any = null,flag=true) => { | 229 | export const getDownloadUrl= (data, fileName, type: any = null,flag=true) => { |
| 230 | let mineType = 'application/octet-stream' | 230 | let mineType = 'application/octet-stream' |
| 231 | if (type == 'excel') { | 231 | if (type == 'excel' || type == 'xlsx' || type == 'xls' || type == 'csv') { |
| 232 | mineType = 'application/vnd.ms-excel' | 232 | mineType = 'application/vnd.ms-excel' |
| 233 | } else if (type == 'word') { | 233 | } else if (type == 'word') { |
| 234 | mineType = 'application/msword' | 234 | mineType = 'application/msword' | ... | ... |
| ... | @@ -168,18 +168,17 @@ const getTaskDetail = () => { | ... | @@ -168,18 +168,17 @@ const getTaskDetail = () => { |
| 168 | }) | 168 | }) |
| 169 | } | 169 | } |
| 170 | 170 | ||
| 171 | const toPath = () => { | ||
| 172 | userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath)); | ||
| 173 | assetStore.set(true); | ||
| 174 | router.push({ | ||
| 175 | name: 'contractManagement', | ||
| 176 | }) | ||
| 177 | } | ||
| 178 | |||
| 179 | const btnClick = async (btn) => { | 171 | const btnClick = async (btn) => { |
| 180 | const type = btn.value; | 172 | const type = btn.value; |
| 181 | if (type == 'cancel') { | 173 | if (type == 'cancel') { |
| 182 | toPath() | 174 | userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath)); |
| 175 | router.push({ | ||
| 176 | name: 'registerCatalogDetail', | ||
| 177 | query: { | ||
| 178 | guid: route.query.damGuid, | ||
| 179 | type: 'asset' | ||
| 180 | } | ||
| 181 | }) | ||
| 183 | } | 182 | } |
| 184 | } | 183 | } |
| 185 | 184 | ... | ... |
| ... | @@ -127,6 +127,7 @@ const getDetailInfo = () => { | ... | @@ -127,6 +127,7 @@ const getDetailInfo = () => { |
| 127 | dataReceiveGuid: rece.dataReceiveGuid, | 127 | dataReceiveGuid: rece.dataReceiveGuid, |
| 128 | contractInfo: rece.contractInfo || [], | 128 | contractInfo: rece.contractInfo || [], |
| 129 | dataDeliveryName: d.dataDelivery[0].name, | 129 | dataDeliveryName: d.dataDelivery[0].name, |
| 130 | dataDeliveryFile: d.dataDelivery[0], | ||
| 130 | rowspan: index + 1, | 131 | rowspan: index + 1, |
| 131 | }); | 132 | }); |
| 132 | }) | 133 | }) |
| ... | @@ -970,11 +971,16 @@ const clickContractDetail = (item) => { | ... | @@ -970,11 +971,16 @@ const clickContractDetail = (item) => { |
| 970 | guid: item.dataContractGuid, | 971 | guid: item.dataContractGuid, |
| 971 | name: item.dataContractName, | 972 | name: item.dataContractName, |
| 972 | type: 'detail', | 973 | type: 'detail', |
| 973 | tenantGuid: userData.tenantGuid | 974 | tenantGuid: userData.tenantGuid, |
| 975 | damGuid: catalogGuid | ||
| 974 | } | 976 | } |
| 975 | }) | 977 | }) |
| 976 | } | 978 | } |
| 977 | 979 | ||
| 980 | const viewDeliveryFile = (file) => { | ||
| 981 | onUploadFileDownload(file); | ||
| 982 | } | ||
| 983 | |||
| 978 | </script> | 984 | </script> |
| 979 | 985 | ||
| 980 | <template> | 986 | <template> |
| ... | @@ -1094,7 +1100,8 @@ const clickContractDetail = (item) => { | ... | @@ -1094,7 +1100,8 @@ const clickContractDetail = (item) => { |
| 1094 | <span>{{ scope.row["updateTime"] || '--' }}</span> | 1100 | <span>{{ scope.row["updateTime"] || '--' }}</span> |
| 1095 | </template> | 1101 | </template> |
| 1096 | </el-table-column> | 1102 | </el-table-column> |
| 1097 | <el-table-column label="操作" minWidth="120px" align="left" fixed="right" v-if="!detailInfo.zqName" show-overflow-tooltip> | 1103 | <el-table-column label="操作" minWidth="120px" align="left" fixed="right" v-if="!detailInfo.zqName" |
| 1104 | show-overflow-tooltip> | ||
| 1098 | <template #default="scope"> | 1105 | <template #default="scope"> |
| 1099 | <span class="text_btn" @click="handleTableViewData(scope)">查看样例数据</span> | 1106 | <span class="text_btn" @click="handleTableViewData(scope)">查看样例数据</span> |
| 1100 | </template> | 1107 | </template> |
| ... | @@ -1245,7 +1252,8 @@ const clickContractDetail = (item) => { | ... | @@ -1245,7 +1252,8 @@ const clickContractDetail = (item) => { |
| 1245 | </div> | 1252 | </div> |
| 1246 | </ContentWrap> | 1253 | </ContentWrap> |
| 1247 | 1254 | ||
| 1248 | <ContentWrap id="id-certificate" title="证件信息" v-if="route.query.type == 'certificate'" style="margin: 16px 16px 16px" > | 1255 | <ContentWrap id="id-certificate" title="证件信息" v-if="route.query.type == 'certificate'" |
| 1256 | style="margin: 16px 16px 16px"> | ||
| 1249 | <div class="list_panel"> | 1257 | <div class="list_panel"> |
| 1250 | <div class="list_item"> | 1258 | <div class="list_item"> |
| 1251 | <span class="item_label">证件编码:</span> | 1259 | <span class="item_label">证件编码:</span> |
| ... | @@ -1266,14 +1274,17 @@ const clickContractDetail = (item) => { | ... | @@ -1266,14 +1274,17 @@ const clickContractDetail = (item) => { |
| 1266 | </div> | 1274 | </div> |
| 1267 | <div class="list_item"> | 1275 | <div class="list_item"> |
| 1268 | <span class="item_label">证件类型:</span> | 1276 | <span class="item_label">证件类型:</span> |
| 1269 | <span class="item_value">{{ certificateDetail.documentType == 1 ? 'A证' : (certificateDetail.documentType == 2 ? 'B证' : | 1277 | <span class="item_value">{{ certificateDetail.documentType == 1 ? 'A证' : (certificateDetail.documentType == |
| 1278 | 2 ? | ||
| 1279 | 'B证' : | ||
| 1270 | 'C证') }}</span> | 1280 | 'C证') }}</span> |
| 1271 | </div> | 1281 | </div> |
| 1272 | <div class="list_item"> | 1282 | <div class="list_item"> |
| 1273 | <span class="item_label">证件类别:</span> | 1283 | <span class="item_label">证件类别:</span> |
| 1274 | <span class="item_value">{{ certificateDetail.documentCategoryName ?? '--' }}</span> | 1284 | <span class="item_value">{{ certificateDetail.documentCategoryName ?? '--' }}</span> |
| 1275 | </div> | 1285 | </div> |
| 1276 | <div class="list_item is_block" v-if="certificateDetail.documentFile?.length" :style="{ 'max-width': '700px' }"> | 1286 | <div class="list_item is_block" v-if="certificateDetail.documentFile?.length" |
| 1287 | :style="{ 'max-width': '700px' }"> | ||
| 1277 | <span class="item_label">证件:</span> | 1288 | <span class="item_label">证件:</span> |
| 1278 | <span class="item_value"> | 1289 | <span class="item_value"> |
| 1279 | <div class="file-operate"> | 1290 | <div class="file-operate"> |
| ... | @@ -1326,22 +1337,27 @@ const clickContractDetail = (item) => { | ... | @@ -1326,22 +1337,27 @@ const clickContractDetail = (item) => { |
| 1326 | </ApprovalProcess> | 1337 | </ApprovalProcess> |
| 1327 | </ContentWrap> | 1338 | </ContentWrap> |
| 1328 | 1339 | ||
| 1329 | <ContentWrap v-if="route.query.type == 'asset' && deliveryDetailInfo.length" id="id-deliverFile" title="交付物" description="" | 1340 | <ContentWrap v-if="route.query.type == 'asset' && deliveryDetailInfo.length" id="id-deliverFile" title="交付物" |
| 1330 | style="margin: 16px 16px 16px"> | 1341 | description="" style="margin: 16px 16px 16px"> |
| 1331 | <el-table ref="deliveryTableRef" :data="deliveryDetailInfo" :highlight-current-row="true" stripe border | 1342 | <el-table ref="deliveryTableRef" :data="deliveryDetailInfo" :highlight-current-row="true" stripe border |
| 1332 | height="100%" :span-method="deliverySpanMethod" tooltip-effect="light" row-key="guid" :style="{ | 1343 | height="100%" :span-method="deliverySpanMethod" tooltip-effect="light" row-key="guid" :style="{ |
| 1333 | width: '100%', | 1344 | width: '100%', |
| 1334 | display: 'inline-block', | 1345 | display: 'inline-block', |
| 1335 | }"> | 1346 | }"> |
| 1336 | <el-table-column label="序号" type="index" width="56px" align="center" > | 1347 | <el-table-column label="序号" type="index" width="56px" align="center"> |
| 1337 | </el-table-column> | 1348 | </el-table-column> |
| 1338 | <el-table-column prop="dataDeliveryName" label="数据交付物" width="240px" align="left" > | 1349 | <el-table-column prop="dataDeliveryName" label="数据交付物" width="240px" align="left"> |
| 1350 | <template #default="scope"> | ||
| 1351 | <a underline="hover" style="cursor: pointer;" @click="viewDeliveryFile(scope.row.dataDeliveryFile)">{{ | ||
| 1352 | scope.row.dataDeliveryName }}</a> | ||
| 1353 | </template> | ||
| 1339 | </el-table-column> | 1354 | </el-table-column> |
| 1340 | <el-table-column prop="dataReceiveName" label="数据接收方" width="240px" align="left"> | 1355 | <el-table-column prop="dataReceiveName" label="数据接收方" width="240px" align="left"> |
| 1341 | </el-table-column> | 1356 | </el-table-column> |
| 1342 | <el-table-column prop="contract" label="合同" min-width="200px" align="left"> | 1357 | <el-table-column prop="contract" label="合同" min-width="200px" align="left"> |
| 1343 | <template #default="scope"> | 1358 | <template #default="scope"> |
| 1344 | <a v-for="item in scope.row.contractInfo" underline="hover" style="margin-right: 12px;cursor: pointer;" @click="clickContractDetail(item)">{{ | 1359 | <a v-for="item in scope.row.contractInfo" underline="hover" style="margin-right: 12px;cursor: pointer;" |
| 1360 | @click="clickContractDetail(item)">{{ | ||
| 1345 | item.dataContractName }}</a> | 1361 | item.dataContractName }}</a> |
| 1346 | </template> | 1362 | </template> |
| 1347 | </el-table-column> | 1363 | </el-table-column> | ... | ... |
-
Please register or sign in to post a comment