[update] 点击标准编号或标准名称查看文件修改如果在发布稿中找到了可以查看的文件就合并pdf文件列表和doc文件列表排序
This commit is contained in:
@@ -360,6 +360,7 @@ export default {
|
|||||||
const pdfFileList = []
|
const pdfFileList = []
|
||||||
const docFileList = []
|
const docFileList = []
|
||||||
let newestFileList = []
|
let newestFileList = []
|
||||||
|
let manuscriptName = '' // 记录找到哪个稿件就找到文件了
|
||||||
// 按照过程稿件顺序寻找文件
|
// 按照过程稿件顺序寻找文件
|
||||||
for (const formItem of processManuscript) {
|
for (const formItem of processManuscript) {
|
||||||
const keyId = formItem.dbFieldName
|
const keyId = formItem.dbFieldName
|
||||||
@@ -381,11 +382,17 @@ export default {
|
|||||||
}
|
}
|
||||||
// 一旦一个过程中找到pdf或者doc,就可以退出
|
// 一旦一个过程中找到pdf或者doc,就可以退出
|
||||||
if (pdfFileList.length > 0 || docFileList.length > 0) {
|
if (pdfFileList.length > 0 || docFileList.length > 0) {
|
||||||
|
manuscriptName = formItem.dbFieldName
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
newestFileList = pdfFileList // 默认从pdf里选最新的文件
|
if (manuscriptName === 'publish_of_original') {
|
||||||
if (pdfFileList.length === 0)newestFileList = docFileList // 如果没有pdf文件,就从doc文件里选
|
// 在发布稿就找到了,合并pdf和doc文件列表排序
|
||||||
|
newestFileList = [...pdfFileList, ...docFileList]
|
||||||
|
} else {
|
||||||
|
newestFileList = pdfFileList // 默认从pdf里选最新的文件
|
||||||
|
if (pdfFileList.length === 0)newestFileList = docFileList // 如果没有pdf文件,就从doc文件里选
|
||||||
|
}
|
||||||
file = await this.selectNewestFile(newestFileList)
|
file = await this.selectNewestFile(newestFileList)
|
||||||
if (file === null) { // 没有找到文件就退出
|
if (file === null) { // 没有找到文件就退出
|
||||||
console.log('没有找到符合要求的文件!')
|
console.log('没有找到符合要求的文件!')
|
||||||
|
|||||||
@@ -584,6 +584,7 @@ export default {
|
|||||||
const pdfFileList = []
|
const pdfFileList = []
|
||||||
const docFileList = []
|
const docFileList = []
|
||||||
let newestFileList = []
|
let newestFileList = []
|
||||||
|
let manuscriptName = '' // 记录找到哪个稿件就找到文件了
|
||||||
// 按照过程稿件顺序寻找文件
|
// 按照过程稿件顺序寻找文件
|
||||||
for (const formItem of processManuscript) {
|
for (const formItem of processManuscript) {
|
||||||
const keyId = formItem.dbFieldName
|
const keyId = formItem.dbFieldName
|
||||||
@@ -605,11 +606,17 @@ export default {
|
|||||||
}
|
}
|
||||||
// 一旦一个过程中找到pdf或者doc,就可以退出
|
// 一旦一个过程中找到pdf或者doc,就可以退出
|
||||||
if (pdfFileList.length > 0 || docFileList.length > 0) {
|
if (pdfFileList.length > 0 || docFileList.length > 0) {
|
||||||
|
manuscriptName = formItem.dbFieldName
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
newestFileList = pdfFileList // 默认从pdf里选最新的文件
|
if (manuscriptName === 'publish_of_original') {
|
||||||
if (pdfFileList.length === 0)newestFileList = docFileList // 如果没有pdf文件,就从doc文件里选
|
// 在发布稿就找到了,合并pdf和doc文件列表排序
|
||||||
|
newestFileList = [...pdfFileList, ...docFileList]
|
||||||
|
} else {
|
||||||
|
newestFileList = pdfFileList // 默认从pdf里选最新的文件
|
||||||
|
if (pdfFileList.length === 0)newestFileList = docFileList // 如果没有pdf文件,就从doc文件里选
|
||||||
|
}
|
||||||
file = await this.selectNewestFile(newestFileList)
|
file = await this.selectNewestFile(newestFileList)
|
||||||
if (file === null) { // 没有找到文件就退出
|
if (file === null) { // 没有找到文件就退出
|
||||||
console.log('没有找到符合要求的文件!')
|
console.log('没有找到符合要求的文件!')
|
||||||
|
|||||||
@@ -794,6 +794,7 @@ export default {
|
|||||||
const pdfFileList = []
|
const pdfFileList = []
|
||||||
const docFileList = []
|
const docFileList = []
|
||||||
let newestFileList = []
|
let newestFileList = []
|
||||||
|
let manuscriptName = '' // 记录找到哪个稿件就找到文件了
|
||||||
// 按照过程稿件顺序寻找文件
|
// 按照过程稿件顺序寻找文件
|
||||||
for (const formItem of processManuscript) {
|
for (const formItem of processManuscript) {
|
||||||
const keyId = formItem.dbFieldName
|
const keyId = formItem.dbFieldName
|
||||||
@@ -815,11 +816,17 @@ export default {
|
|||||||
}
|
}
|
||||||
// 一旦一个过程中找到pdf或者doc,就可以退出
|
// 一旦一个过程中找到pdf或者doc,就可以退出
|
||||||
if (pdfFileList.length > 0 || docFileList.length > 0) {
|
if (pdfFileList.length > 0 || docFileList.length > 0) {
|
||||||
|
manuscriptName = formItem.dbFieldName
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
newestFileList = pdfFileList // 默认从pdf里选最新的文件
|
if (manuscriptName === 'publish_of_original') {
|
||||||
if (pdfFileList.length === 0)newestFileList = docFileList // 如果没有pdf文件,就从doc文件里选
|
// 在发布稿就找到了,合并pdf和doc文件列表排序
|
||||||
|
newestFileList = [...pdfFileList, ...docFileList]
|
||||||
|
} else {
|
||||||
|
newestFileList = pdfFileList // 默认从pdf里选最新的文件
|
||||||
|
if (pdfFileList.length === 0)newestFileList = docFileList // 如果没有pdf文件,就从doc文件里选
|
||||||
|
}
|
||||||
file = await this.selectNewestFile(newestFileList)
|
file = await this.selectNewestFile(newestFileList)
|
||||||
if (file === null) { // 没有找到文件就退出
|
if (file === null) { // 没有找到文件就退出
|
||||||
console.log('没有找到符合要求的文件!')
|
console.log('没有找到符合要求的文件!')
|
||||||
|
|||||||
@@ -658,6 +658,7 @@ export default {
|
|||||||
const pdfFileList = []
|
const pdfFileList = []
|
||||||
const docFileList = []
|
const docFileList = []
|
||||||
let newestFileList = []
|
let newestFileList = []
|
||||||
|
let manuscriptName = '' // 记录找到哪个稿件就找到文件了
|
||||||
// 按照过程稿件顺序寻找文件
|
// 按照过程稿件顺序寻找文件
|
||||||
for (const formItem of processManuscript) {
|
for (const formItem of processManuscript) {
|
||||||
const keyId = formItem.dbFieldName
|
const keyId = formItem.dbFieldName
|
||||||
@@ -679,11 +680,17 @@ export default {
|
|||||||
}
|
}
|
||||||
// 一旦一个过程中找到pdf或者doc,就可以退出
|
// 一旦一个过程中找到pdf或者doc,就可以退出
|
||||||
if (pdfFileList.length > 0 || docFileList.length > 0) {
|
if (pdfFileList.length > 0 || docFileList.length > 0) {
|
||||||
|
manuscriptName = formItem.dbFieldName
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
newestFileList = pdfFileList // 默认从pdf里选最新的文件
|
if (manuscriptName === 'publish_of_original') {
|
||||||
if (pdfFileList.length === 0)newestFileList = docFileList // 如果没有pdf文件,就从doc文件里选
|
// 在发布稿就找到了,合并pdf和doc文件列表排序
|
||||||
|
newestFileList = [...pdfFileList, ...docFileList]
|
||||||
|
} else {
|
||||||
|
newestFileList = pdfFileList // 默认从pdf里选最新的文件
|
||||||
|
if (pdfFileList.length === 0)newestFileList = docFileList // 如果没有pdf文件,就从doc文件里选
|
||||||
|
}
|
||||||
file = await this.selectNewestFile(newestFileList)
|
file = await this.selectNewestFile(newestFileList)
|
||||||
if (file === null) { // 没有找到文件就退出
|
if (file === null) { // 没有找到文件就退出
|
||||||
console.log('没有找到符合要求的文件!')
|
console.log('没有找到符合要求的文件!')
|
||||||
|
|||||||
@@ -659,6 +659,7 @@ export default {
|
|||||||
const pdfFileList = []
|
const pdfFileList = []
|
||||||
const docFileList = []
|
const docFileList = []
|
||||||
let newestFileList = []
|
let newestFileList = []
|
||||||
|
let manuscriptName = '' // 记录找到哪个稿件就找到文件了
|
||||||
// 按照过程稿件顺序寻找文件
|
// 按照过程稿件顺序寻找文件
|
||||||
for (const formItem of processManuscript) {
|
for (const formItem of processManuscript) {
|
||||||
const keyId = formItem.dbFieldName
|
const keyId = formItem.dbFieldName
|
||||||
@@ -680,11 +681,17 @@ export default {
|
|||||||
}
|
}
|
||||||
// 一旦一个过程中找到pdf或者doc,就可以退出
|
// 一旦一个过程中找到pdf或者doc,就可以退出
|
||||||
if (pdfFileList.length > 0 || docFileList.length > 0) {
|
if (pdfFileList.length > 0 || docFileList.length > 0) {
|
||||||
|
manuscriptName = formItem.dbFieldName
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
newestFileList = pdfFileList // 默认从pdf里选最新的文件
|
if (manuscriptName === 'publish_of_original') {
|
||||||
if (pdfFileList.length === 0)newestFileList = docFileList // 如果没有pdf文件,就从doc文件里选
|
// 在发布稿就找到了,合并pdf和doc文件列表排序
|
||||||
|
newestFileList = [...pdfFileList, ...docFileList]
|
||||||
|
} else {
|
||||||
|
newestFileList = pdfFileList // 默认从pdf里选最新的文件
|
||||||
|
if (pdfFileList.length === 0)newestFileList = docFileList // 如果没有pdf文件,就从doc文件里选
|
||||||
|
}
|
||||||
file = await this.selectNewestFile(newestFileList)
|
file = await this.selectNewestFile(newestFileList)
|
||||||
if (file === null) { // 没有找到文件就退出
|
if (file === null) { // 没有找到文件就退出
|
||||||
console.log('没有找到符合要求的文件!')
|
console.log('没有找到符合要求的文件!')
|
||||||
|
|||||||
Reference in New Issue
Block a user