[update] 修改bug78429
This commit is contained in:
@@ -25,7 +25,16 @@
|
||||
<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>
|
||||
<div v-if="fileField.includes(formItem.dbFieldName)" class="file-box">
|
||||
<!--标准需要跳转,是标准字段且有内容的情况下在这处理-->
|
||||
<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>
|
||||
<div v-else-if="fileField.includes(formItem.dbFieldName)" class="file-box">
|
||||
<template v-if="detailData[formItem.dbFieldName]">
|
||||
<div class="detail-page-process-manuscript-file" v-for="file in detailData[formItem.dbFieldName + 'List']" :key="file.id">
|
||||
<div class="detail-page-process-manuscript-file-info">
|
||||
@@ -140,7 +149,7 @@
|
||||
|
||||
<script>
|
||||
import '@assets/less/common.less'
|
||||
import { FieldType } from '@/enums/commonEnums'
|
||||
import { FieldType, StandardSource } from '@/enums/commonEnums'
|
||||
import { downloadFile, getFileAccessHttpUrl } from '@/api/manage'
|
||||
import { getEnterpriseStandardInfoById, getEnterpriseStandardAddForm } from '@/api/enterpriseStandardLibraryApi'
|
||||
import UpdateRecordModal from './module/UpdateRecordModal'
|
||||
@@ -154,6 +163,7 @@ import UserSelectModal from '@comp/selection/UserSelectModal'
|
||||
import StandardResolutionSheetModal from '@views/standardRegulationLibrary/commonPage/modules/StandardResolutionSheetModal'
|
||||
import { kkFilePreview } from '@/utils/kkFilePreview'
|
||||
import TextContentModal from './module/TextContentModal'
|
||||
import { queryStandardInfoByStandardNumber } from '@/utils/util'
|
||||
|
||||
// 支持预览的文件后缀
|
||||
const CAN_PREVIEW_FILE_SUFFIX = ['jpg', 'jpeg', 'png', 'pdf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx']
|
||||
@@ -208,7 +218,9 @@ export default {
|
||||
dataSource: [], // 稽查内容数据
|
||||
image: false,
|
||||
imageUrl: '',
|
||||
showViewAllField: ['auth_dept'] // 需要显示展示查看全部按钮的字段
|
||||
showViewAllField: ['auth_dept'], // 需要显示展示查看全部按钮的字段
|
||||
// 标准字段,需要跳转标准详情
|
||||
standardFields: ['substitute_standard_number', 'replaced_by_standard_number', 'reference_standard', 'referenced_standard']
|
||||
}
|
||||
},
|
||||
created () {
|
||||
@@ -336,6 +348,39 @@ export default {
|
||||
viewAll (fieldName) {
|
||||
const data = this.detailData[fieldName + '_dictText'] || this.detailData[fieldName]
|
||||
this.$refs.textContentModal.open(data)
|
||||
},
|
||||
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
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -361,4 +406,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>
|
||||
|
||||
Reference in New Issue
Block a user