From d8687c15a5c736e00860eb91071508dc8567a8b7 Mon Sep 17 00:00:00 2001 From: lideqin <694785430@qq.com> Date: Wed, 8 May 2024 11:29:54 +0800 Subject: [PATCH] =?UTF-8?q?[update]=20=E7=82=B9=E5=87=BB=E6=A0=87=E5=87=86?= =?UTF-8?q?=E7=BC=96=E5=8F=B7=E6=88=96=E6=A0=87=E5=87=86=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E6=96=87=E4=BB=B6=E4=BF=AE=E6=94=B9=E5=A6=82?= =?UTF-8?q?=E6=9E=9C=E5=9C=A8=E5=8F=91=E5=B8=83=E7=A8=BF=E4=B8=AD=E6=89=BE?= =?UTF-8?q?=E5=88=B0=E4=BA=86=E5=8F=AF=E4=BB=A5=E6=9F=A5=E7=9C=8B=E7=9A=84?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=B0=B1=E5=90=88=E5=B9=B6pdf=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=88=97=E8=A1=A8=E5=92=8Cdoc=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/dashboard/search/AdvancedSearch.vue | 11 +++++++++-- src/views/dashboard/search/GeneralSearch.vue | 11 +++++++++-- .../standard/EnterpriseStandardList.vue | 11 +++++++++-- .../domesticStandard/DomesticStandardList.vue | 11 +++++++++-- .../overseasStandard/OverseasStandardList.vue | 11 +++++++++-- 5 files changed, 45 insertions(+), 10 deletions(-) diff --git a/src/views/dashboard/search/AdvancedSearch.vue b/src/views/dashboard/search/AdvancedSearch.vue index 3fa85ef8..d01b5b64 100644 --- a/src/views/dashboard/search/AdvancedSearch.vue +++ b/src/views/dashboard/search/AdvancedSearch.vue @@ -360,6 +360,7 @@ export default { const pdfFileList = [] const docFileList = [] let newestFileList = [] + let manuscriptName = '' // 记录找到哪个稿件就找到文件了 // 按照过程稿件顺序寻找文件 for (const formItem of processManuscript) { const keyId = formItem.dbFieldName @@ -381,11 +382,17 @@ export default { } // 一旦一个过程中找到pdf或者doc,就可以退出 if (pdfFileList.length > 0 || docFileList.length > 0) { + manuscriptName = formItem.dbFieldName break } } - newestFileList = pdfFileList // 默认从pdf里选最新的文件 - if (pdfFileList.length === 0)newestFileList = docFileList // 如果没有pdf文件,就从doc文件里选 + if (manuscriptName === 'publish_of_original') { + // 在发布稿就找到了,合并pdf和doc文件列表排序 + newestFileList = [...pdfFileList, ...docFileList] + } else { + 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/dashboard/search/GeneralSearch.vue b/src/views/dashboard/search/GeneralSearch.vue index b26b91c6..00a469ff 100644 --- a/src/views/dashboard/search/GeneralSearch.vue +++ b/src/views/dashboard/search/GeneralSearch.vue @@ -584,6 +584,7 @@ export default { const pdfFileList = [] const docFileList = [] let newestFileList = [] + let manuscriptName = '' // 记录找到哪个稿件就找到文件了 // 按照过程稿件顺序寻找文件 for (const formItem of processManuscript) { const keyId = formItem.dbFieldName @@ -605,11 +606,17 @@ export default { } // 一旦一个过程中找到pdf或者doc,就可以退出 if (pdfFileList.length > 0 || docFileList.length > 0) { + manuscriptName = formItem.dbFieldName break } } - newestFileList = pdfFileList // 默认从pdf里选最新的文件 - if (pdfFileList.length === 0)newestFileList = docFileList // 如果没有pdf文件,就从doc文件里选 + if (manuscriptName === 'publish_of_original') { + // 在发布稿就找到了,合并pdf和doc文件列表排序 + newestFileList = [...pdfFileList, ...docFileList] + } else { + 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/enterpriseStandardLibrary/standard/EnterpriseStandardList.vue b/src/views/enterpriseStandardLibrary/standard/EnterpriseStandardList.vue index a34a5d02..0ad8628d 100644 --- a/src/views/enterpriseStandardLibrary/standard/EnterpriseStandardList.vue +++ b/src/views/enterpriseStandardLibrary/standard/EnterpriseStandardList.vue @@ -794,6 +794,7 @@ export default { const pdfFileList = [] const docFileList = [] let newestFileList = [] + let manuscriptName = '' // 记录找到哪个稿件就找到文件了 // 按照过程稿件顺序寻找文件 for (const formItem of processManuscript) { const keyId = formItem.dbFieldName @@ -815,11 +816,17 @@ export default { } // 一旦一个过程中找到pdf或者doc,就可以退出 if (pdfFileList.length > 0 || docFileList.length > 0) { + manuscriptName = formItem.dbFieldName break } } - newestFileList = pdfFileList // 默认从pdf里选最新的文件 - if (pdfFileList.length === 0)newestFileList = docFileList // 如果没有pdf文件,就从doc文件里选 + if (manuscriptName === 'publish_of_original') { + // 在发布稿就找到了,合并pdf和doc文件列表排序 + newestFileList = [...pdfFileList, ...docFileList] + } else { + 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/domesticStandard/DomesticStandardList.vue b/src/views/standardRegulationLibrary/domesticStandard/DomesticStandardList.vue index c25ab518..515203c8 100644 --- a/src/views/standardRegulationLibrary/domesticStandard/DomesticStandardList.vue +++ b/src/views/standardRegulationLibrary/domesticStandard/DomesticStandardList.vue @@ -658,6 +658,7 @@ export default { const pdfFileList = [] const docFileList = [] let newestFileList = [] + let manuscriptName = '' // 记录找到哪个稿件就找到文件了 // 按照过程稿件顺序寻找文件 for (const formItem of processManuscript) { const keyId = formItem.dbFieldName @@ -679,11 +680,17 @@ export default { } // 一旦一个过程中找到pdf或者doc,就可以退出 if (pdfFileList.length > 0 || docFileList.length > 0) { + manuscriptName = formItem.dbFieldName break } } - newestFileList = pdfFileList // 默认从pdf里选最新的文件 - if (pdfFileList.length === 0)newestFileList = docFileList // 如果没有pdf文件,就从doc文件里选 + if (manuscriptName === 'publish_of_original') { + // 在发布稿就找到了,合并pdf和doc文件列表排序 + newestFileList = [...pdfFileList, ...docFileList] + } else { + 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 1bee45e3..fb7cce78 100644 --- a/src/views/standardRegulationLibrary/overseasStandard/OverseasStandardList.vue +++ b/src/views/standardRegulationLibrary/overseasStandard/OverseasStandardList.vue @@ -659,6 +659,7 @@ export default { const pdfFileList = [] const docFileList = [] let newestFileList = [] + let manuscriptName = '' // 记录找到哪个稿件就找到文件了 // 按照过程稿件顺序寻找文件 for (const formItem of processManuscript) { const keyId = formItem.dbFieldName @@ -680,11 +681,17 @@ export default { } // 一旦一个过程中找到pdf或者doc,就可以退出 if (pdfFileList.length > 0 || docFileList.length > 0) { + manuscriptName = formItem.dbFieldName break } } - newestFileList = pdfFileList // 默认从pdf里选最新的文件 - if (pdfFileList.length === 0)newestFileList = docFileList // 如果没有pdf文件,就从doc文件里选 + if (manuscriptName === 'publish_of_original') { + // 在发布稿就找到了,合并pdf和doc文件列表排序 + newestFileList = [...pdfFileList, ...docFileList] + } else { + newestFileList = pdfFileList // 默认从pdf里选最新的文件 + if (pdfFileList.length === 0)newestFileList = docFileList // 如果没有pdf文件,就从doc文件里选 + } file = await this.selectNewestFile(newestFileList) if (file === null) { // 没有找到文件就退出 console.log('没有找到符合要求的文件!')