fix: 详情给交付物添加下载功能
Showing
3 changed files
with
34 additions
and
20 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 | ... | ... |
| ... | @@ -128,6 +128,7 @@ const getDetailInfo = () => { | ... | @@ -128,6 +128,7 @@ const getDetailInfo = () => { |
| 128 | dataReceiveGuid: rece.dataReceiveGuid, | 128 | dataReceiveGuid: rece.dataReceiveGuid, |
| 129 | contractInfo: rece.contractInfo || [], | 129 | contractInfo: rece.contractInfo || [], |
| 130 | dataDeliveryName: d.dataDelivery[0].name, | 130 | dataDeliveryName: d.dataDelivery[0].name, |
| 131 | dataDeliveryFile: d.dataDelivery[0], | ||
| 131 | rowspan: index + 1, | 132 | rowspan: index + 1, |
| 132 | }); | 133 | }); |
| 133 | }) | 134 | }) |
| ... | @@ -967,11 +968,16 @@ const clickContractDetail = (item) => { | ... | @@ -967,11 +968,16 @@ const clickContractDetail = (item) => { |
| 967 | guid: item.dataContractGuid, | 968 | guid: item.dataContractGuid, |
| 968 | name: item.dataContractName, | 969 | name: item.dataContractName, |
| 969 | type: 'detail', | 970 | type: 'detail', |
| 970 | tenantGuid: userData.tenantGuid | 971 | tenantGuid: userData.tenantGuid, |
| 972 | damGuid: catalogGuid | ||
| 971 | } | 973 | } |
| 972 | }) | 974 | }) |
| 973 | } | 975 | } |
| 974 | 976 | ||
| 977 | const viewDeliveryFile = (file) => { | ||
| 978 | onUploadFileDownload(file); | ||
| 979 | } | ||
| 980 | |||
| 975 | </script> | 981 | </script> |
| 976 | 982 | ||
| 977 | <template> | 983 | <template> |
| ... | @@ -1260,7 +1266,8 @@ const clickContractDetail = (item) => { | ... | @@ -1260,7 +1266,8 @@ const clickContractDetail = (item) => { |
| 1260 | </div> | 1266 | </div> |
| 1261 | </ContentWrap> | 1267 | </ContentWrap> |
| 1262 | 1268 | ||
| 1263 | <ContentWrap id="id-certificate" title="证件信息" v-if="route.query.type == 'certificate'" style="margin: 16px 16px 16px" > | 1269 | <ContentWrap id="id-certificate" title="证件信息" v-if="route.query.type == 'certificate'" |
| 1270 | style="margin: 16px 16px 16px"> | ||
| 1264 | <div class="list_panel"> | 1271 | <div class="list_panel"> |
| 1265 | <div class="list_item"> | 1272 | <div class="list_item"> |
| 1266 | <span class="item_label">证件编码:</span> | 1273 | <span class="item_label">证件编码:</span> |
| ... | @@ -1281,14 +1288,17 @@ const clickContractDetail = (item) => { | ... | @@ -1281,14 +1288,17 @@ const clickContractDetail = (item) => { |
| 1281 | </div> | 1288 | </div> |
| 1282 | <div class="list_item"> | 1289 | <div class="list_item"> |
| 1283 | <span class="item_label">证件类型:</span> | 1290 | <span class="item_label">证件类型:</span> |
| 1284 | <span class="item_value">{{ certificateDetail.documentType == 1 ? 'A证' : (certificateDetail.documentType == 2 ? 'B证' : | 1291 | <span class="item_value">{{ certificateDetail.documentType == 1 ? 'A证' : (certificateDetail.documentType == |
| 1292 | 2 ? | ||
| 1293 | 'B证' : | ||
| 1285 | 'C证') }}</span> | 1294 | 'C证') }}</span> |
| 1286 | </div> | 1295 | </div> |
| 1287 | <div class="list_item"> | 1296 | <div class="list_item"> |
| 1288 | <span class="item_label">证件类别:</span> | 1297 | <span class="item_label">证件类别:</span> |
| 1289 | <span class="item_value">{{ certificateDetail.documentCategoryName ?? '--' }}</span> | 1298 | <span class="item_value">{{ certificateDetail.documentCategoryName ?? '--' }}</span> |
| 1290 | </div> | 1299 | </div> |
| 1291 | <div class="list_item is_block" v-if="certificateDetail.documentFile?.length" :style="{ 'max-width': '700px' }"> | 1300 | <div class="list_item is_block" v-if="certificateDetail.documentFile?.length" |
| 1301 | :style="{ 'max-width': '700px' }"> | ||
| 1292 | <span class="item_label">证件:</span> | 1302 | <span class="item_label">证件:</span> |
| 1293 | <span class="item_value"> | 1303 | <span class="item_value"> |
| 1294 | <div class="file-operate"> | 1304 | <div class="file-operate"> |
| ... | @@ -1341,22 +1351,27 @@ const clickContractDetail = (item) => { | ... | @@ -1341,22 +1351,27 @@ const clickContractDetail = (item) => { |
| 1341 | </ApprovalProcess> | 1351 | </ApprovalProcess> |
| 1342 | </ContentWrap> | 1352 | </ContentWrap> |
| 1343 | 1353 | ||
| 1344 | <ContentWrap v-if="route.query.type == 'asset' && deliveryDetailInfo.length" id="id-deliverFile" title="交付物" description="" | 1354 | <ContentWrap v-if="route.query.type == 'asset' && deliveryDetailInfo.length" id="id-deliverFile" title="交付物" |
| 1345 | style="margin: 16px 16px 16px"> | 1355 | description="" style="margin: 16px 16px 16px"> |
| 1346 | <el-table ref="deliveryTableRef" :data="deliveryDetailInfo" :highlight-current-row="true" stripe border | 1356 | <el-table ref="deliveryTableRef" :data="deliveryDetailInfo" :highlight-current-row="true" stripe border |
| 1347 | height="100%" :span-method="deliverySpanMethod" tooltip-effect="light" row-key="guid" :style="{ | 1357 | height="100%" :span-method="deliverySpanMethod" tooltip-effect="light" row-key="guid" :style="{ |
| 1348 | width: '100%', | 1358 | width: '100%', |
| 1349 | display: 'inline-block', | 1359 | display: 'inline-block', |
| 1350 | }"> | 1360 | }"> |
| 1351 | <el-table-column label="序号" type="index" width="56px" align="center" > | 1361 | <el-table-column label="序号" type="index" width="56px" align="center"> |
| 1352 | </el-table-column> | 1362 | </el-table-column> |
| 1353 | <el-table-column prop="dataDeliveryName" label="数据交付物" width="240px" align="left" > | 1363 | <el-table-column prop="dataDeliveryName" label="数据交付物" width="240px" align="left"> |
| 1364 | <template #default="scope"> | ||
| 1365 | <a underline="hover" style="cursor: pointer;" @click="viewDeliveryFile(scope.row.dataDeliveryFile)">{{ | ||
| 1366 | scope.row.dataDeliveryName }}</a> | ||
| 1367 | </template> | ||
| 1354 | </el-table-column> | 1368 | </el-table-column> |
| 1355 | <el-table-column prop="dataReceiveName" label="数据接收方" width="240px" align="left"> | 1369 | <el-table-column prop="dataReceiveName" label="数据接收方" width="240px" align="left"> |
| 1356 | </el-table-column> | 1370 | </el-table-column> |
| 1357 | <el-table-column prop="contract" label="合同" min-width="200px" align="left"> | 1371 | <el-table-column prop="contract" label="合同" min-width="200px" align="left"> |
| 1358 | <template #default="scope"> | 1372 | <template #default="scope"> |
| 1359 | <a v-for="item in scope.row.contractInfo" underline="hover" style="margin-right: 12px;cursor: pointer;" @click="clickContractDetail(item)">{{ | 1373 | <a v-for="item in scope.row.contractInfo" underline="hover" style="margin-right: 12px;cursor: pointer;" |
| 1374 | @click="clickContractDetail(item)">{{ | ||
| 1360 | item.dataContractName }}</a> | 1375 | item.dataContractName }}</a> |
| 1361 | </template> | 1376 | </template> |
| 1362 | </el-table-column> | 1377 | </el-table-column> | ... | ... |
-
Please register or sign in to post a comment