0393487f by xukangle

fix

1 parent 289bbea2
...@@ -370,11 +370,28 @@ const downloadTemplate = async (url) => { ...@@ -370,11 +370,28 @@ const downloadTemplate = async (url) => {
370 refSignInfo?.msg && ElMessage.error(refSignInfo?.msg); 370 refSignInfo?.msg && ElMessage.error(refSignInfo?.msg);
371 return; 371 return;
372 } 372 }
373 // obsDownloadRequest(refSignInfo?.data).then((res: any) => {
374 // if (res && !res.msg) {
375 // let urlNames = url.split('/');
376 // let name = urlNames.at(-1);
377 // var fileSuffix = name ? name.substring(name.lastIndexOf('.') + 1) : '';
378 // download(res, name, fileSuffix);
379 // } else {
380 // res?.msg && ElMessage.error(res?.msg);
381 // }
382 // });
373 obsDownloadRequest(refSignInfo?.data).then((res: any) => { 383 obsDownloadRequest(refSignInfo?.data).then((res: any) => {
374 if (res && !res.msg) { 384 if (res && !res.msg) {
375 let urlNames = url.split('/'); 385 let urlNames = url.split('/');
376 let name = urlNames.at(-1); 386 let name = urlNames.at(-1);
387 // 移除查询参数
388 if (name.includes('?')) {
389 name = name.split('?')[0];
390 }
391 // 解码文件名
392 name = decodeURIComponent(name);
377 var fileSuffix = name ? name.substring(name.lastIndexOf('.') + 1) : ''; 393 var fileSuffix = name ? name.substring(name.lastIndexOf('.') + 1) : '';
394 console.log(name, res, fileSuffix, '-------------------name');
378 download(res, name, fileSuffix); 395 download(res, name, fileSuffix);
379 } else { 396 } else {
380 res?.msg && ElMessage.error(res?.msg); 397 res?.msg && ElMessage.error(res?.msg);
......
...@@ -70,7 +70,7 @@ const getDetailInfo = () => { ...@@ -70,7 +70,7 @@ const getDetailInfo = () => {
70 if (res.code == proxy.$passCode) { 70 if (res.code == proxy.$passCode) {
71 const data = res.data || {}; 71 const data = res.data || {};
72 detailInfo.value = data; 72 detailInfo.value = data;
73 // detailInfo.value.damTypeName = damTypes.find(d => d.value == detailInfo.value.damType)?.label; 73 // detailInfo.value.damTypeName = damTypes.find(d => d.value == detailInfo.value.damType)?.label;
74 detailInfo.value.dataSourcesName = dataSourcesList.find(d => d.value == detailInfo.value.dataSources)?.label; 74 detailInfo.value.dataSourcesName = dataSourcesList.find(d => d.value == detailInfo.value.dataSources)?.label;
75 baseInfoFormItems.value.forEach(item => { 75 baseInfoFormItems.value.forEach(item => {
76 item.default = detailInfo.value[item.field] 76 item.default = detailInfo.value[item.field]
...@@ -171,7 +171,7 @@ const handleTableViewData = (scope) => { ...@@ -171,7 +171,7 @@ const handleTableViewData = (scope) => {
171 <div class="title1">{{ detailInfo.damName ?? '--' }}</div> 171 <div class="title1">{{ detailInfo.damName ?? '--' }}</div>
172 <div class="dataLabel">{{ detailInfo.damTypeName }}</div> 172 <div class="dataLabel">{{ detailInfo.damTypeName }}</div>
173 <div class="dataLabel">{{ detailInfo.subjectDomainName || detailInfo.subjectDomain }}</div> 173 <div class="dataLabel">{{ detailInfo.subjectDomainName || detailInfo.subjectDomain }}</div>
174 <div class="dataLabel dataLabel1">{{ detailInfo.databaseType }}</div> 174 <div class="dataLabel dataLabel1" v-if="detailInfo.databaseType">{{ detailInfo.databaseType }}</div>
175 <div class="dataLabel dataLabel1">{{ detailInfo.dataSourcesName }}</div> 175 <div class="dataLabel dataLabel1">{{ detailInfo.dataSourcesName }}</div>
176 </div> 176 </div>
177 </div> 177 </div>
...@@ -179,7 +179,8 @@ const handleTableViewData = (scope) => { ...@@ -179,7 +179,8 @@ const handleTableViewData = (scope) => {
179 :style="{ 'margin-right': (isTruncated && !isExpanded) ? '30px' : '0px', WebkitLineClamp: (!isTruncated ? 'inherit' : (isExpanded ? 'inherit' : 1)), WebkitBoxOrient: 'vertical' }"> 179 :style="{ 'margin-right': (isTruncated && !isExpanded) ? '30px' : '0px', WebkitLineClamp: (!isTruncated ? 'inherit' : (isExpanded ? 'inherit' : 1)), WebkitBoxOrient: 'vertical' }">
180 {{ '覆盖地域:' + (detailInfo.coverageArea?.[0]?.[0] == 'all' ? '全国' : (detailInfo.coverageAreaName?.map(c => 180 {{ '覆盖地域:' + (detailInfo.coverageArea?.[0]?.[0] == 'all' ? '全国' : (detailInfo.coverageAreaName?.map(c =>
181 c.join('/')).join(',') ?? '--')) }}<span v-if="isTruncated" class="text_btn expand_btn" 181 c.join('/')).join(',') ?? '--')) }}<span v-if="isTruncated" class="text_btn expand_btn"
182 :style="{ position: isExpanded ? 'inherit' : 'absolute', 'margin-left': isExpanded ? '4px' : '0px' }" @click="handleExpand()" v-preReClick>{{ 182 :style="{ position: isExpanded ? 'inherit' : 'absolute', 'margin-left': isExpanded ? '4px' : '0px' }"
183 @click="handleExpand()" v-preReClick>{{
183 isExpanded 184 isExpanded
184 ? 185 ?
185 '收起' : '展开' }}</span></div> 186 '收起' : '展开' }}</span></div>
...@@ -374,4 +375,4 @@ const handleTableViewData = (scope) => { ...@@ -374,4 +375,4 @@ const handleTableViewData = (scope) => {
374 padding-right: 8px; 375 padding-right: 8px;
375 } 376 }
376 } 377 }
377 </style>
...\ No newline at end of file ...\ No newline at end of file
378 </style>
......
...@@ -190,7 +190,7 @@ const getTableData = () => { ...@@ -190,7 +190,7 @@ const getTableData = () => {
190 pageIndex: pageInfo.value.curr, 190 pageIndex: pageInfo.value.curr,
191 damName: pageInfo.value.damName, 191 damName: pageInfo.value.damName,
192 damType: pageInfo.value.damType, 192 damType: pageInfo.value.damType,
193 subjectDomain: pageInfo.value.subjectDomain, 193 subjectDomain: pageInfo.value.subjectDomain || [],
194 tenantGuid: pageInfo.value.tenantGuid, 194 tenantGuid: pageInfo.value.tenantGuid,
195 dataSources: pageInfo.value.dataSources, 195 dataSources: pageInfo.value.dataSources,
196 isRegister: pageInfo.value.isRegister, 196 isRegister: pageInfo.value.isRegister,
......
...@@ -30,7 +30,7 @@ import { ...@@ -30,7 +30,7 @@ import {
30 import { passFlowData, rejectFlowData, revokeFlowData } from "@/api/modules/workFlowService"; 30 import { passFlowData, rejectFlowData, revokeFlowData } from "@/api/modules/workFlowService";
31 import useDataAssetStore from "@/store/modules/dataAsset"; 31 import useDataAssetStore from "@/store/modules/dataAsset";
32 import { changeNum, getDownloadUrl, download } from '@/utils/common'; 32 import { changeNum, getDownloadUrl, download } from '@/utils/common';
33 33 import { onUploadFilePreview, onUploadFileDownload } from '@/api/modules/common';
34 34
35 const assetStore = useDataAssetStore(); 35 const assetStore = useDataAssetStore();
36 36
...@@ -410,43 +410,43 @@ const getTenantDetail = () => { ...@@ -410,43 +410,43 @@ const getTenantDetail = () => {
410 }); 410 });
411 } 411 }
412 412
413 const onUploadFilePreview = (file) => { 413 // const onUploadFilePreview = (file) => {
414 let url = file.url; 414 // let url = file.url;
415 getImageContent(url).then((res: any) => { 415 // getImageContent(url).then((res: any) => {
416 if (res && !res.msg) { 416 // if (res && !res.msg) {
417 let name = file.name; 417 // let name = file.name;
418 var fileSuffix = name ? name.substring(name.lastIndexOf('.') + 1).toLowerCase() : ''; 418 // var fileSuffix = name ? name.substring(name.lastIndexOf('.') + 1).toLowerCase() : '';
419 if (fileSuffix === 'png' || fileSuffix === 'jpeg' || fileSuffix === 'jpg' || fileSuffix === 'pdf') { //浏览器可以支持图片和pdf预览 419 // if (fileSuffix === 'png' || fileSuffix === 'jpeg' || fileSuffix === 'jpg' || fileSuffix === 'pdf') { //浏览器可以支持图片和pdf预览
420 let fileUrl = <string>getDownloadUrl(res, name, fileSuffix); 420 // let fileUrl = <string>getDownloadUrl(res, name, fileSuffix);
421 let win = window.open(fileUrl, name); 421 // let win = window.open(fileUrl, name);
422 win && (win.document.title = name); 422 // win && (win.document.title = name);
423 } else { 423 // } else {
424 download(res, name, fileSuffix); 424 // download(res, name, fileSuffix);
425 } 425 // }
426 // if (fileSuffix === 'png' || fileSuffix === 'jpeg' || fileSuffix === 'jpg' || fileSuffix === 'pdf' || fileSuffix === 'zip' || fileSuffix === 'rar') { 426 // // if (fileSuffix === 'png' || fileSuffix === 'jpeg' || fileSuffix === 'jpg' || fileSuffix === 'pdf' || fileSuffix === 'zip' || fileSuffix === 'rar') {
427 // let win = window.open(fileUrl, name); 427 // // let win = window.open(fileUrl, name);
428 // win && (win.document.title = name); 428 // // win && (win.document.title = name);
429 // return win; 429 // // return win;
430 // } 430 // // }
431 // window.open('https://view.officeapps.live.com/op/view.aspx?src=' + encodeURIComponent(fileUrl)); 431 // // window.open('https://view.officeapps.live.com/op/view.aspx?src=' + encodeURIComponent(fileUrl));
432 } else { 432 // } else {
433 res?.msg && ElMessage.error(res?.msg); 433 // res?.msg && ElMessage.error(res?.msg);
434 } 434 // }
435 }) 435 // })
436 } 436 // }
437 437
438 const onUploadFileDownload = (file) => { 438 // const onUploadFileDownload = (file) => {
439 let url = file.url; 439 // let url = file.url;
440 getImageContent(url).then((res: any) => { 440 // getImageContent(url).then((res: any) => {
441 if (res && !res.msg) { 441 // if (res && !res.msg) {
442 let name = file.name; 442 // let name = file.name;
443 var fileSuffix = name ? name.substring(name.lastIndexOf('.') + 1) : ''; 443 // var fileSuffix = name ? name.substring(name.lastIndexOf('.') + 1) : '';
444 download(res, name, fileSuffix); 444 // download(res, name, fileSuffix);
445 } else { 445 // } else {
446 res?.msg && ElMessage.error(res?.msg); 446 // res?.msg && ElMessage.error(res?.msg);
447 } 447 // }
448 }) 448 // })
449 } 449 // }
450 450
451 const toolBtns: any = computed(() => { 451 const toolBtns: any = computed(() => {
452 let btnsArr: any = [{ 452 let btnsArr: any = [{
...@@ -1321,7 +1321,7 @@ const handleClickDamCatalogDetail = () => { ...@@ -1321,7 +1321,7 @@ const handleClickDamCatalogDetail = () => {
1321 </div> 1321 </div>
1322 </span> 1322 </span>
1323 </div> 1323 </div>
1324 <div class="list_item is_block isFile" :style="{ width: '40%' }" 1324 <!-- <div class="list_item is_block isFile" :style="{ width: '40%' }"
1325 v-if="(detailType != 'asset' || assetDetailInfo.isEvaluationAssessment == 'Y') && assetDetailInfo.registerAttachment?.qualityEvaluationFile?.length"> 1325 v-if="(detailType != 'asset' || assetDetailInfo.isEvaluationAssessment == 'Y') && assetDetailInfo.registerAttachment?.qualityEvaluationFile?.length">
1326 <span class="item_label" :style="{ width: 'auto', 'text-align': 'left' }">数据质量评价收集</span> 1326 <span class="item_label" :style="{ width: 'auto', 'text-align': 'left' }">数据质量评价收集</span>
1327 <span v-for="(item) in (assetDetailInfo.registerAttachment?.qualityEvaluationFile || [])" 1327 <span v-for="(item) in (assetDetailInfo.registerAttachment?.qualityEvaluationFile || [])"
...@@ -1358,11 +1358,11 @@ const handleClickDamCatalogDetail = () => { ...@@ -1358,11 +1358,11 @@ const handleClickDamCatalogDetail = () => {
1358 <div :style="{ right: '0px' }" class="file-preview" @click="onUploadFileDownload(item)">下载</div> 1358 <div :style="{ right: '0px' }" class="file-preview" @click="onUploadFileDownload(item)">下载</div>
1359 </div> 1359 </div>
1360 </span> 1360 </span>
1361 </div> 1361 </div> -->
1362 <div class="list_item is_block isFile" :style="{ width: '40%', 'margin-right': '28px' }" 1362 <div class="list_item is_block isFile" :style="{ width: '40%', 'margin-right': '28px' }"
1363 v-if="(detailType != 'asset' && detailType != 'qualityEvaluate' || assetDetailInfo.isEvaluationAssessment == 'Y') && assetDetailInfo.registerAttachment?.costAssessmentFile?.length"> 1363 v-if="assetDetailInfo.registerAttachment?.assessmentFile?.length">
1364 <span class="item_label" :style="{ width: 'auto', 'text-align': 'left' }">数据价值评估</span> 1364 <span class="item_label" :style="{ width: 'auto', 'text-align': 'left' }">数据价值评估</span>
1365 <span v-for="(item) in (assetDetailInfo.registerAttachment?.costAssessmentFile || [])" class="item_value" 1365 <span v-for="(item) in (assetDetailInfo.registerAttachment?.assessmentFile || [])" class="item_value"
1366 :style="{ 'padding-left': '0px' }"> 1366 :style="{ 'padding-left': '0px' }">
1367 <div class="file-operate"> 1367 <div class="file-operate">
1368 <template 1368 <template
...@@ -1397,11 +1397,11 @@ const handleClickDamCatalogDetail = () => { ...@@ -1397,11 +1397,11 @@ const handleClickDamCatalogDetail = () => {
1397 </div> 1397 </div>
1398 </span> 1398 </span>
1399 </div> 1399 </div>
1400 <div class="list_item is_block isFile" :style="{ width: '40%' }" 1400 <div class="list_item is_block isFile" :style="{ width: '40%', 'margin-right': '28px' }"
1401 v-if="(detailType == 'asset' && assetDetailInfo.isQualityAssessment == 'Y') && assetDetailInfo.registerAttachment?.qualityEvaluationFile?.length"> 1401 v-if="assetDetailInfo.registerAttachment?.evaluationFile?.length">
1402 <span class="item_label" :style="{ width: 'auto', 'text-align': 'left' }">质量评估报告</span> 1402 <span class="item_label" :style="{ width: 'auto', 'text-align': 'left' }">质量评估报告</span>
1403 <span v-for="(item) in (assetDetailInfo.registerAttachment?.qualityEvaluationFile || [])" 1403 <span v-for="(item) in (assetDetailInfo.registerAttachment?.evaluationFile || [])" class="item_value"
1404 class="item_value" :style="{ 'padding-left': '0px' }"> 1404 :style="{ 'padding-left': '0px' }">
1405 <div class="file-operate"> 1405 <div class="file-operate">
1406 <template 1406 <template
1407 v-if="item.name.substring(item.name.lastIndexOf('.') + 1) == 'xls' || item.name.substring(item.name.lastIndexOf('.') + 1) == 'xlsx' || item.name.substring(item.name.lastIndexOf('.') + 1) == 'csv'"> 1407 v-if="item.name.substring(item.name.lastIndexOf('.') + 1) == 'xls' || item.name.substring(item.name.lastIndexOf('.') + 1) == 'xlsx' || item.name.substring(item.name.lastIndexOf('.') + 1) == 'csv'">
......
...@@ -458,7 +458,7 @@ const formInfo = ref<any>({ ...@@ -458,7 +458,7 @@ const formInfo = ref<any>({
458 type: 'upload-file', 458 type: 'upload-file',
459 placeholder: '请选择', 459 placeholder: '请选择',
460 field: 'commitmentLetterInfo', 460 field: 'commitmentLetterInfo',
461 templateUrl: 'http://www.baidu.com', 461 templateUrl: '',
462 default: [], 462 default: [],
463 limit: 1, 463 limit: 1,
464 block: true, 464 block: true,
...@@ -472,7 +472,7 @@ const formInfo = ref<any>({ ...@@ -472,7 +472,7 @@ const formInfo = ref<any>({
472 type: 'upload-file', 472 type: 'upload-file',
473 placeholder: '请选择', 473 placeholder: '请选择',
474 field: 'accreditFileInfo', 474 field: 'accreditFileInfo',
475 templateUrl: 'http://www.baidu.com', 475 templateUrl: '',
476 default: [], 476 default: [],
477 limit: 1, 477 limit: 1,
478 block: true, 478 block: true,
...@@ -486,7 +486,7 @@ const formInfo = ref<any>({ ...@@ -486,7 +486,7 @@ const formInfo = ref<any>({
486 type: 'upload-file', 486 type: 'upload-file',
487 placeholder: '请选择', 487 placeholder: '请选择',
488 field: 'productDetailInfo', 488 field: 'productDetailInfo',
489 templateUrl: 'http://www.baidu.com', 489 templateUrl: '',
490 default: [], 490 default: [],
491 limit: 1, 491 limit: 1,
492 block: true, 492 block: true,
...@@ -1427,10 +1427,19 @@ onBeforeMount(() => { ...@@ -1427,10 +1427,19 @@ onBeforeMount(() => {
1427 1427
1428 // 获取模板信息 1428 // 获取模板信息
1429 const getTemplateInfo = () => { 1429 const getTemplateInfo = () => {
1430 console.log(userData, '--------route.query.exchangeGuid---------'); 1430 getTemplateFile({ tenantGuid: route.query.exchangeGuid }).then((res: any) => {
1431 getTemplateFile({ tenantGuid: userData.tenantGuid }).then((res: any) => {
1432 if (res.code == proxy.$passCode) { 1431 if (res.code == proxy.$passCode) {
1433 1432 formInfo.value.items.forEach(item => {
1433 if (item.field == 'commitmentLetterInfo') {
1434 item.templateUrl = res.data.commitment_letter || '';
1435 }
1436 if (item.field == 'accreditFileInfo') {
1437 item.templateUrl = res.data.authorization_file || '';
1438 }
1439 if (item.field == 'productDetailInfo') {
1440 item.templateUrl = res.data.detail_file || '';
1441 }
1442 })
1434 } else { 1443 } else {
1435 ElMessage({ 1444 ElMessage({
1436 type: "error", 1445 type: "error",
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!