[update] 外标和企标详情页同步获取文件列表
This commit is contained in:
@@ -317,16 +317,16 @@ export default {
|
|||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.detailData = res.result
|
this.detailData = res.result
|
||||||
this.dataSource = this.detailData.checkList
|
this.dataSource = this.detailData.checkList
|
||||||
this.fileField.forEach(item => {
|
this.fileField.forEach(async item => {
|
||||||
if (this.detailData[item]) {
|
if (this.detailData[item]) {
|
||||||
const fileList = this.detailData[item].split(',')
|
const fileList = this.detailData[item].split(',')
|
||||||
const fileInfoList = []
|
const fileInfoList = []
|
||||||
fileList.forEach(async id => {
|
for (const id of fileList) {
|
||||||
const fileInfo = await this.getFileInfo(id)
|
const fileInfo = await this.getFileInfo(id)
|
||||||
if (fileInfo) {
|
if (fileInfo) {
|
||||||
fileInfoList.push(fileInfo)
|
fileInfoList.push(fileInfo)
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
this.$set(this.detailData, item + 'List', fileInfoList)
|
this.$set(this.detailData, item + 'List', fileInfoList)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
+3
-3
@@ -308,16 +308,16 @@ export default {
|
|||||||
this.operateApiFunc.getDetailData({ id, standardNumber, type: 1 }).then(res => {
|
this.operateApiFunc.getDetailData({ id, standardNumber, type: 1 }).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.detailData = Object.assign({}, res.result || {})
|
this.detailData = Object.assign({}, res.result || {})
|
||||||
this.fileField.forEach(item => {
|
this.fileField.map(async item => {
|
||||||
if (this.detailData[item]) {
|
if (this.detailData[item]) {
|
||||||
const fileList = this.detailData[item].split(',')
|
const fileList = this.detailData[item].split(',')
|
||||||
const fileInfoList = []
|
const fileInfoList = []
|
||||||
fileList.forEach(async id => {
|
for (const id of fileList) {
|
||||||
const fileInfo = await this.getFileInfo(id)
|
const fileInfo = await this.getFileInfo(id)
|
||||||
if (fileInfo) {
|
if (fileInfo) {
|
||||||
fileInfoList.push(fileInfo)
|
fileInfoList.push(fileInfo)
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
this.$set(this.detailData, item + 'List', fileInfoList)
|
this.$set(this.detailData, item + 'List', fileInfoList)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user