2bc45da1 by lihua

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

1 parent bc825221
...@@ -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>
...@@ -1259,7 +1265,8 @@ const clickContractDetail = (item) => { ...@@ -1259,7 +1265,8 @@ const clickContractDetail = (item) => {
1259 </div> 1265 </div>
1260 </ContentWrap> 1266 </ContentWrap>
1261 1267
1262 <ContentWrap id="id-certificate" title="证件信息" v-if="route.query.type == 'certificate'" style="margin: 16px 16px 16px" > 1268 <ContentWrap id="id-certificate" title="证件信息" v-if="route.query.type == 'certificate'"
1269 style="margin: 16px 16px 16px">
1263 <div class="list_panel"> 1270 <div class="list_panel">
1264 <div class="list_item"> 1271 <div class="list_item">
1265 <span class="item_label">证件编码:</span> 1272 <span class="item_label">证件编码:</span>
...@@ -1280,14 +1287,17 @@ const clickContractDetail = (item) => { ...@@ -1280,14 +1287,17 @@ const clickContractDetail = (item) => {
1280 </div> 1287 </div>
1281 <div class="list_item"> 1288 <div class="list_item">
1282 <span class="item_label">证件类型:</span> 1289 <span class="item_label">证件类型:</span>
1283 <span class="item_value">{{ certificateDetail.documentType == 1 ? 'A证' : (certificateDetail.documentType == 2 ? 'B证' : 1290 <span class="item_value">{{ certificateDetail.documentType == 1 ? 'A证' : (certificateDetail.documentType ==
1291 2 ?
1292 'B证' :
1284 'C证') }}</span> 1293 'C证') }}</span>
1285 </div> 1294 </div>
1286 <div class="list_item"> 1295 <div class="list_item">
1287 <span class="item_label">证件类别:</span> 1296 <span class="item_label">证件类别:</span>
1288 <span class="item_value">{{ certificateDetail.documentCategoryName ?? '--' }}</span> 1297 <span class="item_value">{{ certificateDetail.documentCategoryName ?? '--' }}</span>
1289 </div> 1298 </div>
1290 <div class="list_item is_block" v-if="certificateDetail.documentFile?.length" :style="{ 'max-width': '700px' }"> 1299 <div class="list_item is_block" v-if="certificateDetail.documentFile?.length"
1300 :style="{ 'max-width': '700px' }">
1291 <span class="item_label">证件:</span> 1301 <span class="item_label">证件:</span>
1292 <span class="item_value"> 1302 <span class="item_value">
1293 <div class="file-operate"> 1303 <div class="file-operate">
...@@ -1340,22 +1350,27 @@ const clickContractDetail = (item) => { ...@@ -1340,22 +1350,27 @@ const clickContractDetail = (item) => {
1340 </ApprovalProcess> 1350 </ApprovalProcess>
1341 </ContentWrap> 1351 </ContentWrap>
1342 1352
1343 <ContentWrap v-if="route.query.type == 'asset' && deliveryDetailInfo.length" id="id-deliverFile" title="交付物" description="" 1353 <ContentWrap v-if="route.query.type == 'asset' && deliveryDetailInfo.length" id="id-deliverFile" title="交付物"
1344 style="margin: 16px 16px 16px"> 1354 description="" style="margin: 16px 16px 16px">
1345 <el-table ref="deliveryTableRef" :data="deliveryDetailInfo" :highlight-current-row="true" stripe border 1355 <el-table ref="deliveryTableRef" :data="deliveryDetailInfo" :highlight-current-row="true" stripe border
1346 height="100%" :span-method="deliverySpanMethod" tooltip-effect="light" row-key="guid" :style="{ 1356 height="100%" :span-method="deliverySpanMethod" tooltip-effect="light" row-key="guid" :style="{
1347 width: '100%', 1357 width: '100%',
1348 display: 'inline-block', 1358 display: 'inline-block',
1349 }"> 1359 }">
1350 <el-table-column label="序号" type="index" width="56px" align="center" > 1360 <el-table-column label="序号" type="index" width="56px" align="center">
1351 </el-table-column> 1361 </el-table-column>
1352 <el-table-column prop="dataDeliveryName" label="数据交付物" width="240px" align="left" > 1362 <el-table-column prop="dataDeliveryName" label="数据交付物" width="240px" align="left">
1363 <template #default="scope">
1364 <a underline="hover" style="cursor: pointer;" @click="viewDeliveryFile(scope.row.dataDeliveryFile)">{{
1365 scope.row.dataDeliveryName }}</a>
1366 </template>
1353 </el-table-column> 1367 </el-table-column>
1354 <el-table-column prop="dataReceiveName" label="数据接收方" width="240px" align="left"> 1368 <el-table-column prop="dataReceiveName" label="数据接收方" width="240px" align="left">
1355 </el-table-column> 1369 </el-table-column>
1356 <el-table-column prop="contract" label="合同" min-width="200px" align="left"> 1370 <el-table-column prop="contract" label="合同" min-width="200px" align="left">
1357 <template #default="scope"> 1371 <template #default="scope">
1358 <a v-for="item in scope.row.contractInfo" underline="hover" style="margin-right: 12px;cursor: pointer;" @click="clickContractDetail(item)">{{ 1372 <a v-for="item in scope.row.contractInfo" underline="hover" style="margin-right: 12px;cursor: pointer;"
1373 @click="clickContractDetail(item)">{{
1359 item.dataContractName }}</a> 1374 item.dataContractName }}</a>
1360 </template> 1375 </template>
1361 </el-table-column> 1376 </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!