[update] 修改bug87492
This commit is contained in:
@@ -95,16 +95,8 @@ export const StandardStatus = {
|
|||||||
|
|
||||||
// 企标状态
|
// 企标状态
|
||||||
export const EnterpriseStandardStatus = {
|
export const EnterpriseStandardStatus = {
|
||||||
DRAFT: { text: '起草', value: '1' },
|
|
||||||
SEEK_FOR_OPTIONS: { text: '征求意见', value: '2' },
|
|
||||||
EXAMINE: { text: '审查', value: '3' },
|
|
||||||
APPROVAL: { text: '报批', value: '4' },
|
|
||||||
PRE_RELEASE: { text: '预发布', value: '5' },
|
|
||||||
RELEASE: { text: '发布', value: '6' },
|
|
||||||
TRIAL_OPERATION: { text: '试运行', value: '7' },
|
|
||||||
CURRENTLY_EFFECTIVE: { text: '现行有效', value: '8' },
|
CURRENTLY_EFFECTIVE: { text: '现行有效', value: '8' },
|
||||||
ABOLISH: { text: '废止', value: '9' },
|
ABOLISH: { text: '废止', value: '9' }
|
||||||
ARCHIVE: { text: '封存', value: '10' }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 标准化活动类型
|
// 标准化活动类型
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
<template v-if="standardFields.includes(formItem.dbFieldName) && !!detailData[formItem.dbFieldName]">
|
<template v-if="standardFields.includes(formItem.dbFieldName) && !!detailData[formItem.dbFieldName]">
|
||||||
<div class="div-form-content">
|
<div class="div-form-content">
|
||||||
<template v-for="(standard, standardIndex) in detailData[formItem.dbFieldName].split(',')">
|
<template v-for="(standard, standardIndex) in detailData[formItem.dbFieldName].split(',')">
|
||||||
<div class="can-click" :key="'standardKey' + standardIndex" @click="toStandardDetailPage(standard)">{{ standard }}</div>
|
<div class="can-click" :key="'standardKey' + standardIndex" @click="toStandardDetailPage(standard.split('|')[0])">{{ standard }}</div>
|
||||||
<div v-if="standardIndex!==detailData[formItem.dbFieldName].split(',').length - 1">,</div>
|
<div v-if="standardIndex!==detailData[formItem.dbFieldName].split(',').length - 1">,</div>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
@@ -69,17 +69,20 @@
|
|||||||
</div>
|
</div>
|
||||||
<template v-if="detailData[formItem.dbFieldName]">
|
<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" v-for="file in detailData[formItem.dbFieldName + 'List']" :key="file.id">
|
||||||
<div class="detail-page-process-manuscript-file-info">
|
<div class="detail-page-process-manuscript-file-info"
|
||||||
|
:class="newestManuScriptField.includes(formItem.dbFieldName) && file.id !== manuScriptNewestFileId ? 'disabled-file-info' : ''">
|
||||||
<a-icon type="link" />
|
<a-icon type="link" />
|
||||||
<div class="detail-page-process-manuscript-file-name" @click="handlePreview(file)">{{ file.fileName }}</div>
|
<div class="detail-page-process-manuscript-file-name" @click="handlePreview(file, formItem)">{{ file.fileName }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="detail-page-process-manuscript-file-operate">
|
<div class="detail-page-process-manuscript-file-operate">
|
||||||
<!-- 下载-->
|
<!-- 下载-->
|
||||||
<a-button type="link" icon="download" @click="handleDownload(file)" v-has="'enterpriseStandard:detail:download'">
|
<a-button type="link" icon="download" @click="handleDownload(file)" v-has="'enterpriseStandard:detail:download'"
|
||||||
|
:disabled="newestManuScriptField.includes(formItem.dbFieldName) && file.id !== manuScriptNewestFileId">
|
||||||
{{ $t('download') }}
|
{{ $t('download') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
<!-- 无水印下载-->
|
<!-- 无水印下载-->
|
||||||
<a-button type="link" @click="downloadDraftNoWater(file)" v-has="'enterpriseStandard:detail:noWaterDownload'">
|
<a-button type="link" @click="downloadDraftNoWater(file)" v-has="'enterpriseStandard:detail:noWaterDownload'"
|
||||||
|
:disabled="newestManuScriptField.includes(formItem.dbFieldName) && file.id !== manuScriptNewestFileId">
|
||||||
<i class="iconfont icon-water-drop-slash"></i>
|
<i class="iconfont icon-water-drop-slash"></i>
|
||||||
{{ $t('unwatermarkedDownload') }}
|
{{ $t('unwatermarkedDownload') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
@@ -127,7 +130,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import '@assets/less/common.less'
|
import '@assets/less/common.less'
|
||||||
import { DisplayAreaManagement, FieldType, StandardSource } from '@/enums/commonEnums'
|
import { DisplayAreaManagement, FieldType, StandardSource, EnterpriseStandardStatus } from '@/enums/commonEnums'
|
||||||
import { downloadFile, getFileAccessHttpUrl } from '@/api/manage'
|
import { downloadFile, getFileAccessHttpUrl } from '@/api/manage'
|
||||||
import { getEnterpriseStandardInfoById, getEnterpriseStandardAddForm } from '@/api/enterpriseStandardLibraryApi'
|
import { getEnterpriseStandardInfoById, getEnterpriseStandardAddForm } from '@/api/enterpriseStandardLibraryApi'
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
@@ -196,7 +199,11 @@ export default {
|
|||||||
imageUrl: '',
|
imageUrl: '',
|
||||||
showViewAllField: ['auth_dept'], // 需要显示展示查看全部按钮的字段
|
showViewAllField: ['auth_dept'], // 需要显示展示查看全部按钮的字段
|
||||||
// 标准字段,需要跳转标准详情
|
// 标准字段,需要跳转标准详情
|
||||||
standardFields: ['substitute_standard_number', 'replaced_by_standard_number', 'reference_standard', 'referenced_standard']
|
standardFields: ['substitute_standard_number', 'replaced_by_standard_number', 'reference_standard', 'referenced_standard'],
|
||||||
|
// 参与只允许查看最新稿件排序的字段顺序(发布稿>征求意见稿)
|
||||||
|
newestManuScriptField: ['publish_of_original', 'draft_for_comment'],
|
||||||
|
// 过程稿件中可以查看的最新文件id
|
||||||
|
manuScriptNewestFileId: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
@@ -242,6 +249,17 @@ export default {
|
|||||||
this.$set(this.detailData, item + 'List', fileInfoList)
|
this.$set(this.detailData, item + 'List', fileInfoList)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
// 不是废止状态的话,获取过程稿件中可以查看的最新文件id
|
||||||
|
if (this.detailData.standard_state !== EnterpriseStandardStatus.ABOLISH.value) {
|
||||||
|
for (const item of this.newestManuScriptField) {
|
||||||
|
if (this.detailData[item]) {
|
||||||
|
// 从文件列表里面获取
|
||||||
|
const sortFileIdArr = this.detailData[item].split(',').sort((a, b) => b - a) // 日期只精确到天,用id更能区分
|
||||||
|
this.manuScriptNewestFileId = sortFileIdArr[0]
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(res.message)
|
this.$message.warning(res.message)
|
||||||
}
|
}
|
||||||
@@ -259,10 +277,14 @@ export default {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handlePreview (file) {
|
handlePreview (file, formItem) {
|
||||||
if (!file || !file.url) {
|
if (!file || !file.url) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if (this.newestManuScriptField.includes(formItem.dbFieldName) && file.id !== this.manuScriptNewestFileId) {
|
||||||
|
// 参与最新稿件不预览的不是最新的稿件不能预览
|
||||||
|
return
|
||||||
|
}
|
||||||
if (file.pdfId) {
|
if (file.pdfId) {
|
||||||
// 说明是onlyOffice生成的
|
// 说明是onlyOffice生成的
|
||||||
const url = previewPdf(file.pdfId)
|
const url = previewPdf(file.pdfId)
|
||||||
|
|||||||
+2
-2
@@ -19,7 +19,7 @@
|
|||||||
<template v-if="standardFields.includes(formItem.dbFieldName) && !!detailData[formItem.dbFieldName]">
|
<template v-if="standardFields.includes(formItem.dbFieldName) && !!detailData[formItem.dbFieldName]">
|
||||||
<div class="div-form-content">
|
<div class="div-form-content">
|
||||||
<template v-for="(standard, standardIndex) in detailData[formItem.dbFieldName].split(',')">
|
<template v-for="(standard, standardIndex) in detailData[formItem.dbFieldName].split(',')">
|
||||||
<div class="can-click" :key="'standardKey' + standardIndex" @click="toStandardDetailPage(standard)">{{ standard }}</div>
|
<div class="can-click" :key="'standardKey' + standardIndex" @click="toStandardDetailPage(standard.split('|')[0])">{{ standard }}</div>
|
||||||
<div v-if="standardIndex!==detailData[formItem.dbFieldName].split(',').length - 1">,</div>
|
<div v-if="standardIndex!==detailData[formItem.dbFieldName].split(',').length - 1">,</div>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
@@ -373,7 +373,7 @@ export default {
|
|||||||
switch (standardInfo.source) {
|
switch (standardInfo.source) {
|
||||||
// 国内
|
// 国内
|
||||||
case StandardSource.FOREIGN.value:
|
case StandardSource.FOREIGN.value:
|
||||||
path = '/standardRegulationLibrary/ForeignStandardDetail'
|
path = '/standardRegulationLibrary/foreignStandardDetailPage'
|
||||||
break
|
break
|
||||||
// 企标
|
// 企标
|
||||||
case StandardSource.ENTERPRISE.value:
|
case StandardSource.ENTERPRISE.value:
|
||||||
|
|||||||
Reference in New Issue
Block a user