From ee2d694703873068278a13288889ee24b7d27c3f Mon Sep 17 00:00:00 2001 From: lideqin <694785430@qq.com> Date: Wed, 22 May 2024 16:42:22 +0800 Subject: [PATCH] =?UTF-8?q?[update]=20=E5=9B=BD=E6=A0=87=E5=92=8C=E5=A4=96?= =?UTF-8?q?=E6=A0=87=E9=A2=84=E8=A7=88=E5=8F=91=E5=B8=83=E7=A8=BF=E4=BC=98?= =?UTF-8?q?=E5=85=88pdf=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/dashboard/search/AdvancedSearch.vue | 4 ++-- src/views/dashboard/search/GeneralSearch.vue | 4 ++-- .../domesticStandard/DomesticStandardList.vue | 12 +++--------- .../overseasStandard/OverseasStandardList.vue | 12 +++--------- 4 files changed, 10 insertions(+), 22 deletions(-) diff --git a/src/views/dashboard/search/AdvancedSearch.vue b/src/views/dashboard/search/AdvancedSearch.vue index 0ea78490..2bc7cbc1 100644 --- a/src/views/dashboard/search/AdvancedSearch.vue +++ b/src/views/dashboard/search/AdvancedSearch.vue @@ -386,8 +386,8 @@ export default { break } } - if (manuscriptName === 'publish_of_original') { - // 在发布稿就找到了,合并pdf和doc文件列表排序 + if (manuscriptName === 'publish_of_original' && this.currStandardType === StandardSource.ENTERPRISE.value) { + // 是企标,在发布稿就找到了,合并pdf和doc文件列表排序 newestFileList = [...pdfFileList, ...docFileList] } else { newestFileList = pdfFileList // 默认从pdf里选最新的文件 diff --git a/src/views/dashboard/search/GeneralSearch.vue b/src/views/dashboard/search/GeneralSearch.vue index 9d462fbf..b51f4850 100644 --- a/src/views/dashboard/search/GeneralSearch.vue +++ b/src/views/dashboard/search/GeneralSearch.vue @@ -610,8 +610,8 @@ export default { break } } - if (manuscriptName === 'publish_of_original') { - // 在发布稿就找到了,合并pdf和doc文件列表排序 + if (manuscriptName === 'publish_of_original' && record.resourceType === '3') { + // 是企标,在发布稿就找到了,合并pdf和doc文件列表排序 newestFileList = [...pdfFileList, ...docFileList] } else { newestFileList = pdfFileList // 默认从pdf里选最新的文件 diff --git a/src/views/standardRegulationLibrary/domesticStandard/DomesticStandardList.vue b/src/views/standardRegulationLibrary/domesticStandard/DomesticStandardList.vue index e32fa613..6ebeace0 100644 --- a/src/views/standardRegulationLibrary/domesticStandard/DomesticStandardList.vue +++ b/src/views/standardRegulationLibrary/domesticStandard/DomesticStandardList.vue @@ -658,7 +658,6 @@ export default { const pdfFileList = [] const docFileList = [] let newestFileList = [] - let manuscriptName = '' // 记录找到哪个稿件就找到文件了 // 按照过程稿件顺序寻找文件 for (const formItem of processManuscript) { const keyId = formItem.dbFieldName @@ -680,17 +679,12 @@ export default { } // 一旦一个过程中找到pdf或者doc,就可以退出 if (pdfFileList.length > 0 || docFileList.length > 0) { - manuscriptName = formItem.dbFieldName break } } - if (manuscriptName === 'publish_of_original') { - // 在发布稿就找到了,合并pdf和doc文件列表排序 - newestFileList = [...pdfFileList, ...docFileList] - } else { - newestFileList = pdfFileList // 默认从pdf里选最新的文件 - if (pdfFileList.length === 0)newestFileList = docFileList // 如果没有pdf文件,就从doc文件里选 - } + newestFileList = pdfFileList // 默认从pdf里选最新的文件 + if (pdfFileList.length === 0)newestFileList = docFileList // 如果没有pdf文件,就从doc文件里选 + file = await this.selectNewestFile(newestFileList) if (file === null) { // 没有找到文件就退出 console.log('没有找到符合要求的文件!') diff --git a/src/views/standardRegulationLibrary/overseasStandard/OverseasStandardList.vue b/src/views/standardRegulationLibrary/overseasStandard/OverseasStandardList.vue index deead0a6..daab5fcd 100644 --- a/src/views/standardRegulationLibrary/overseasStandard/OverseasStandardList.vue +++ b/src/views/standardRegulationLibrary/overseasStandard/OverseasStandardList.vue @@ -659,7 +659,6 @@ export default { const pdfFileList = [] const docFileList = [] let newestFileList = [] - let manuscriptName = '' // 记录找到哪个稿件就找到文件了 // 按照过程稿件顺序寻找文件 for (const formItem of processManuscript) { const keyId = formItem.dbFieldName @@ -681,17 +680,12 @@ export default { } // 一旦一个过程中找到pdf或者doc,就可以退出 if (pdfFileList.length > 0 || docFileList.length > 0) { - manuscriptName = formItem.dbFieldName break } } - if (manuscriptName === 'publish_of_original') { - // 在发布稿就找到了,合并pdf和doc文件列表排序 - newestFileList = [...pdfFileList, ...docFileList] - } else { - newestFileList = pdfFileList // 默认从pdf里选最新的文件 - if (pdfFileList.length === 0)newestFileList = docFileList // 如果没有pdf文件,就从doc文件里选 - } + newestFileList = pdfFileList // 默认从pdf里选最新的文件 + if (pdfFileList.length === 0)newestFileList = docFileList // 如果没有pdf文件,就从doc文件里选 + file = await this.selectNewestFile(newestFileList) if (file === null) { // 没有找到文件就退出 console.log('没有找到符合要求的文件!')