Merge branch 'dev_20241202_xukangle' into develop
Showing
5 changed files
with
77 additions
and
49 deletions
| ... | @@ -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); | ... | ... |
| ... | @@ -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> | ... | ... |
| ... | @@ -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, | ... | ... |
| ... | @@ -31,7 +31,7 @@ import { | ... | @@ -31,7 +31,7 @@ import { |
| 31 | import { passFlowData, rejectFlowData, revokeFlowData } from "@/api/modules/workFlowService"; | 31 | import { passFlowData, rejectFlowData, revokeFlowData } from "@/api/modules/workFlowService"; |
| 32 | import useDataAssetStore from "@/store/modules/dataAsset"; | 32 | import useDataAssetStore from "@/store/modules/dataAsset"; |
| 33 | import { changeNum, getDownloadUrl, download } from '@/utils/common'; | 33 | import { changeNum, getDownloadUrl, download } from '@/utils/common'; |
| 34 | 34 | import { onUploadFilePreview, onUploadFileDownload } from '@/api/modules/common'; | |
| 35 | 35 | ||
| 36 | const assetStore = useDataAssetStore(); | 36 | const assetStore = useDataAssetStore(); |
| 37 | 37 | ||
| ... | @@ -444,43 +444,43 @@ const getTenantDetail = () => { | ... | @@ -444,43 +444,43 @@ const getTenantDetail = () => { |
| 444 | // }); | 444 | // }); |
| 445 | } | 445 | } |
| 446 | 446 | ||
| 447 | const onUploadFilePreview = (file) => { | 447 | // const onUploadFilePreview = (file) => { |
| 448 | let url = file.url; | 448 | // let url = file.url; |
| 449 | getImageContent(url).then((res: any) => { | 449 | // getImageContent(url).then((res: any) => { |
| 450 | if (res && !res.msg) { | 450 | // if (res && !res.msg) { |
| 451 | let name = file.name; | 451 | // let name = file.name; |
| 452 | var fileSuffix = name ? name.substring(name.lastIndexOf('.') + 1).toLowerCase() : ''; | 452 | // var fileSuffix = name ? name.substring(name.lastIndexOf('.') + 1).toLowerCase() : ''; |
| 453 | if (fileSuffix === 'png' || fileSuffix === 'jpeg' || fileSuffix === 'jpg' || fileSuffix === 'pdf') { //浏览器可以支持图片和pdf预览 | 453 | // if (fileSuffix === 'png' || fileSuffix === 'jpeg' || fileSuffix === 'jpg' || fileSuffix === 'pdf') { //浏览器可以支持图片和pdf预览 |
| 454 | let fileUrl = <string>getDownloadUrl(res, name, fileSuffix); | 454 | // let fileUrl = <string>getDownloadUrl(res, name, fileSuffix); |
| 455 | let win = window.open(fileUrl, name); | 455 | // let win = window.open(fileUrl, name); |
| 456 | win && (win.document.title = name); | 456 | // win && (win.document.title = name); |
| 457 | } else { | 457 | // } else { |
| 458 | download(res, name, fileSuffix); | 458 | // download(res, name, fileSuffix); |
| 459 | } | 459 | // } |
| 460 | // if (fileSuffix === 'png' || fileSuffix === 'jpeg' || fileSuffix === 'jpg' || fileSuffix === 'pdf' || fileSuffix === 'zip' || fileSuffix === 'rar') { | 460 | // // if (fileSuffix === 'png' || fileSuffix === 'jpeg' || fileSuffix === 'jpg' || fileSuffix === 'pdf' || fileSuffix === 'zip' || fileSuffix === 'rar') { |
| 461 | // let win = window.open(fileUrl, name); | 461 | // // let win = window.open(fileUrl, name); |
| 462 | // win && (win.document.title = name); | 462 | // // win && (win.document.title = name); |
| 463 | // return win; | 463 | // // return win; |
| 464 | // } | 464 | // // } |
| 465 | // window.open('https://view.officeapps.live.com/op/view.aspx?src=' + encodeURIComponent(fileUrl)); | 465 | // // window.open('https://view.officeapps.live.com/op/view.aspx?src=' + encodeURIComponent(fileUrl)); |
| 466 | } else { | 466 | // } else { |
| 467 | res?.msg && ElMessage.error(res?.msg); | 467 | // res?.msg && ElMessage.error(res?.msg); |
| 468 | } | 468 | // } |
| 469 | }) | 469 | // }) |
| 470 | } | 470 | // } |
| 471 | 471 | ||
| 472 | const onUploadFileDownload = (file) => { | 472 | // const onUploadFileDownload = (file) => { |
| 473 | let url = file.url; | 473 | // let url = file.url; |
| 474 | getImageContent(url).then((res: any) => { | 474 | // getImageContent(url).then((res: any) => { |
| 475 | if (res && !res.msg) { | 475 | // if (res && !res.msg) { |
| 476 | let name = file.name; | 476 | // let name = file.name; |
| 477 | var fileSuffix = name ? name.substring(name.lastIndexOf('.') + 1) : ''; | 477 | // var fileSuffix = name ? name.substring(name.lastIndexOf('.') + 1) : ''; |
| 478 | download(res, name, fileSuffix); | 478 | // download(res, name, fileSuffix); |
| 479 | } else { | 479 | // } else { |
| 480 | res?.msg && ElMessage.error(res?.msg); | 480 | // res?.msg && ElMessage.error(res?.msg); |
| 481 | } | 481 | // } |
| 482 | }) | 482 | // }) |
| 483 | } | 483 | // } |
| 484 | 484 | ||
| 485 | const toolBtns: any = computed(() => { | 485 | const toolBtns: any = computed(() => { |
| 486 | let btnsArr: any = [{ | 486 | let btnsArr: any = [{ |
| ... | @@ -1363,7 +1363,7 @@ const formattedDate = (dateVal) => { | ... | @@ -1363,7 +1363,7 @@ const formattedDate = (dateVal) => { |
| 1363 | </div> | 1363 | </div> |
| 1364 | </span> | 1364 | </span> |
| 1365 | </div> | 1365 | </div> |
| 1366 | <div class="list_item is_block isFile" :style="{ width: '40%' }" | 1366 | <!-- <div class="list_item is_block isFile" :style="{ width: '40%' }" |
| 1367 | v-if="(detailType != 'asset' || assetDetailInfo.isEvaluationAssessment == 'Y') && assetDetailInfo.registerAttachment?.qualityEvaluationFile?.length"> | 1367 | v-if="(detailType != 'asset' || assetDetailInfo.isEvaluationAssessment == 'Y') && assetDetailInfo.registerAttachment?.qualityEvaluationFile?.length"> |
| 1368 | <span class="item_label" :style="{ width: 'auto', 'text-align': 'left' }">数据质量评价收集</span> | 1368 | <span class="item_label" :style="{ width: 'auto', 'text-align': 'left' }">数据质量评价收集</span> |
| 1369 | <span v-for="(item) in (assetDetailInfo.registerAttachment?.qualityEvaluationFile || [])" | 1369 | <span v-for="(item) in (assetDetailInfo.registerAttachment?.qualityEvaluationFile || [])" |
| ... | @@ -1400,11 +1400,11 @@ const formattedDate = (dateVal) => { | ... | @@ -1400,11 +1400,11 @@ const formattedDate = (dateVal) => { |
| 1400 | <div :style="{ right: '0px' }" class="file-preview" @click="onUploadFileDownload(item)">下载</div> | 1400 | <div :style="{ right: '0px' }" class="file-preview" @click="onUploadFileDownload(item)">下载</div> |
| 1401 | </div> | 1401 | </div> |
| 1402 | </span> | 1402 | </span> |
| 1403 | </div> | 1403 | </div> --> |
| 1404 | <div class="list_item is_block isFile" :style="{ width: '40%', 'margin-right': '28px' }" | 1404 | <div class="list_item is_block isFile" :style="{ width: '40%', 'margin-right': '28px' }" |
| 1405 | v-if="(detailType != 'asset' && detailType != 'qualityEvaluate' || assetDetailInfo.isEvaluationAssessment == 'Y') && assetDetailInfo.registerAttachment?.costAssessmentFile?.length"> | 1405 | v-if="assetDetailInfo.registerAttachment?.assessmentFile?.length"> |
| 1406 | <span class="item_label" :style="{ width: 'auto', 'text-align': 'left' }">数据价值评估</span> | 1406 | <span class="item_label" :style="{ width: 'auto', 'text-align': 'left' }">数据价值评估</span> |
| 1407 | <span v-for="(item) in (assetDetailInfo.registerAttachment?.costAssessmentFile || [])" class="item_value" | 1407 | <span v-for="(item) in (assetDetailInfo.registerAttachment?.assessmentFile || [])" class="item_value" |
| 1408 | :style="{ 'padding-left': '0px' }"> | 1408 | :style="{ 'padding-left': '0px' }"> |
| 1409 | <div class="file-operate"> | 1409 | <div class="file-operate"> |
| 1410 | <template | 1410 | <template | ... | ... |
| ... | @@ -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, |
| ... | @@ -1429,7 +1429,17 @@ onBeforeMount(() => { | ... | @@ -1429,7 +1429,17 @@ onBeforeMount(() => { |
| 1429 | const getTemplateInfo = () => { | 1429 | const getTemplateInfo = () => { |
| 1430 | getTemplateFile({ tenantGuid: route.query.exchangeGuid }).then((res: any) => { | 1430 | getTemplateFile({ tenantGuid: route.query.exchangeGuid }).then((res: any) => { |
| 1431 | if (res.code == proxy.$passCode) { | 1431 | if (res.code == proxy.$passCode) { |
| 1432 | 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 | }) | ||
| 1433 | } else { | 1443 | } else { |
| 1434 | ElMessage({ | 1444 | ElMessage({ |
| 1435 | type: "error", | 1445 | type: "error", | ... | ... |
-
Please register or sign in to post a comment