fix 78429(国标、海外)
This commit is contained in:
@@ -96,6 +96,10 @@ const deleteProfileCenterTree = (params) => postAction('/laws/dataCenter/lawsDat
|
|||||||
// 资料中心-获取树节点树
|
// 资料中心-获取树节点树
|
||||||
const getProfileCenterTree = (params) => getAction('/laws/dataCenter/lawsDataCenterFolder/getTreeList', params)
|
const getProfileCenterTree = (params) => getAction('/laws/dataCenter/lawsDataCenterFolder/getTreeList', params)
|
||||||
|
|
||||||
|
// 国标、海外、企标通用接口
|
||||||
|
// 通过标准号获取信息
|
||||||
|
const getStandardInfoByStandardNumber = (params) => getAction('/laws/standard/common/getInfoByStandardNo', params)
|
||||||
|
|
||||||
export {
|
export {
|
||||||
// 国内标准
|
// 国内标准
|
||||||
getDomesticStandardSearchForm,
|
getDomesticStandardSearchForm,
|
||||||
@@ -149,5 +153,7 @@ export {
|
|||||||
addChildrenFolder,
|
addChildrenFolder,
|
||||||
editProfileCenterTree,
|
editProfileCenterTree,
|
||||||
deleteProfileCenterTree,
|
deleteProfileCenterTree,
|
||||||
getProfileCenterTree
|
getProfileCenterTree,
|
||||||
|
|
||||||
|
getStandardInfoByStandardNumber
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { ACCESS_TOKEN } from '@/store/mutation-types'
|
|||||||
import { getFileInfo } from '@/api/api'
|
import { getFileInfo } from '@/api/api'
|
||||||
import { dealUrl, kkFilePreview } from './kkFilePreview'
|
import { dealUrl, kkFilePreview } from './kkFilePreview'
|
||||||
import { previewPdf } from './previewPdf'
|
import { previewPdf } from './previewPdf'
|
||||||
|
import { getStandardInfoByStandardNumber } from '../api/standardRegulationLibraryApi'
|
||||||
// import onlineCommons from '@/components/onlineForm/onlineForm'
|
// import onlineCommons from '@/components/onlineForm/onlineForm'
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -715,3 +716,24 @@ export function previewFileCurrentWindowByFileId (fileId) {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过标准编号获取标准信息
|
||||||
|
* @param standardNumber
|
||||||
|
* @returns {Promise<unknown>}
|
||||||
|
*/
|
||||||
|
export function queryStandardInfoByStandardNumber (standardNumber) {
|
||||||
|
return new Promise(resolve => {
|
||||||
|
let result = false
|
||||||
|
getStandardInfoByStandardNumber({ standardNumber }).then(res => {
|
||||||
|
if (res.success && !!res.result) {
|
||||||
|
result = res.result
|
||||||
|
} else {
|
||||||
|
// 提示未找到对应标准
|
||||||
|
Vue.prototype.$message.warning('未找到对应标准信息')
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
resolve(result)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -26,8 +26,17 @@
|
|||||||
<div class="detail-page-part-form" v-if="part !== '过程稿件' && part !== 'Process Manuscript'">
|
<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">
|
<div class="detail-page-part-form-item" v-for="formItem in form[part]" :key="formItem.id">
|
||||||
<label>{{ formItem.dbFieldTxt }}</label>
|
<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
|
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 { previewPdf } from '../../../utils/previewPdf.js'
|
||||||
import { Base64 } from 'js-base64'
|
import { Base64 } from 'js-base64'
|
||||||
import { kkFilePreview } from '../../../utils/kkFilePreview'
|
import { kkFilePreview } from '../../../utils/kkFilePreview'
|
||||||
import { previewFileCurrentWindowByFileId } from '../../../utils/util'
|
import { previewFileCurrentWindowByFileId, queryStandardInfoByStandardNumber } from '../../../utils/util'
|
||||||
|
|
||||||
// 国内标准权限
|
// 国内标准权限
|
||||||
const DomesticStandardPermission = {
|
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],
|
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,
|
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: {
|
computed: {
|
||||||
@@ -424,6 +435,39 @@ export default {
|
|||||||
*/
|
*/
|
||||||
handleWatermarkedDownload (file) {
|
handleWatermarkedDownload (file) {
|
||||||
downloadFile(`/sys/common/download/${file.id}`, file.fileName)
|
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;
|
color: @primary-color;
|
||||||
font-size: 14px;
|
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>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user