fix 78429(国标、海外)

This commit is contained in:
赵霄
2024-02-02 11:52:03 +08:00
parent fbf328fc46
commit 9b7779feb6
3 changed files with 97 additions and 4 deletions
@@ -26,8 +26,17 @@
<div class="detail-page-part-form" v-if="part !== '过程稿件' && part !== 'Process Manuscript'">
<div class="detail-page-part-form-item" v-for="formItem in form[part]" :key="formItem.id">
<label>{{ formItem.dbFieldTxt }}</label>
<!--标准需要跳转是标准字段且有内容的情况下在这处理-->
<template v-if="standardFields.includes(formItem.dbFieldName) && !!detailData[formItem.dbFieldName]">
<div class="div-form-content">
<template v-for="(standard, standardIndex) in detailData[formItem.dbFieldName].split(',')">
<div class="can-click" :key="'standardKey' + standardIndex" @click="toStandardDetailPage(standard)">{{ standard }}</div>
<div v-if="standardIndex!==detailData[formItem.dbFieldName].split(',').length - 1">,</div>
</template>
</div>
</template>
<!--文件需要显示预览-->
<span v-if="!fileField.includes(formItem.dbFieldName)">
<span v-else-if="!fileField.includes(formItem.dbFieldName)">
{{
detailData[needDictFieldList.includes(formItem.fieldShowType) ? formItem.dbFieldName + '_dictText' : formItem.dbFieldName] || global.emptyLine
}}
@@ -140,7 +149,7 @@ import { downloadFile, getFileAccessHttpUrl } from '../../../api/manage.js'
import { previewPdf } from '../../../utils/previewPdf.js'
import { Base64 } from 'js-base64'
import { kkFilePreview } from '../../../utils/kkFilePreview'
import { previewFileCurrentWindowByFileId } from '../../../utils/util'
import { previewFileCurrentWindowByFileId, queryStandardInfoByStandardNumber } from '../../../utils/util'
// 国内标准权限
const DomesticStandardPermission = {
@@ -196,7 +205,9 @@ export default {
// 需要数据字段翻译的属性类型
needDictFieldList: [FieldType.USER_SINGLE.value, FieldType.ORGAN_SINGLE.value, FieldType.ORGAN_MORE.value, FieldType.OPTION_SINGLE.value, FieldType.OPTION_MORE.value, FieldType.TREE.value, FieldType.TREE_SINGLE.value],
image: false,
imageUrl: null
imageUrl: null,
// 标准字段,需要跳转标准详情
standardFields: ['substitute_standard_number', 'replaced_by_standard_number', 'reference_standard', 'referenced_standard', 'adopt_the_international_standard_number', 'associated_foreign_standards']
}
},
computed: {
@@ -424,6 +435,39 @@ export default {
*/
handleWatermarkedDownload (file) {
downloadFile(`/sys/common/download/${file.id}`, file.fileName)
},
async toStandardDetailPage (standardNumber) {
const standardInfo = await queryStandardInfoByStandardNumber(standardNumber)
if (!standardInfo) {
return
}
let path
// 根据来源跳转不同的详情页
switch (standardInfo.source) {
// 国内
case StandardSource.DOMESTIC.value:
path = '/standardRegulationLibrary/DomesticStandardDetail'
break
// 海外
case StandardSource.OVERSEAS.value:
path = '/standardRegulationLibrary/OverseasStandardDetail'
break
// 企标
case StandardSource.ENTERPRISE.value:
path = '/enterpriseStandardLibrary/enterpriseStandardDetail'
break
default:
break
}
if (!path) {
return
}
const query = {
id: standardInfo.id
}
this.$openPageNewSheet({
path, query
})
}
}
}
@@ -440,4 +484,25 @@ export default {
color: @primary-color;
font-size: 14px;
}
.div-form-content {
word-break: break-all;
white-space: pre-wrap;
font-size: 16px;
font-family: PingFang SC-Regular, PingFang SC, sans-serif;
color: #1D2129;
-ms-flex: 1;
flex: 1;
width: 0;
}
.div-form-content > div {
display: inline-block;
}
.can-click {
display: inline-block;
color: @primary-color;
cursor: pointer;
}
</style>