Merge branch 'feature-analysis-RLR-renpy' of http://git.hivekion.com:3000/xiaoguangbin/AnalysisSystemForRadionuclide_vue into master-dev
This commit is contained in:
commit
e9f17c6108
|
@ -631,14 +631,27 @@ export default {
|
||||||
// 如果文件系统可用
|
// 如果文件系统可用
|
||||||
if (this.canUseFilePicker) {
|
if (this.canUseFilePicker) {
|
||||||
const propNames = ['sampleFileName', 'gasFileName', 'detFileName', 'qcFileName']
|
const propNames = ['sampleFileName', 'gasFileName', 'detFileName', 'qcFileName']
|
||||||
|
const propStatus = ['sampleFileStatus', 'gasFileStatus', 'detFileStatus', 'qcFileStatus']
|
||||||
const files = []
|
const files = []
|
||||||
|
const allFiles = []
|
||||||
for (const item of this.list) {
|
for (const item of this.list) {
|
||||||
propNames.forEach((propName) => {
|
if (item.fileType) {
|
||||||
const value = item[propName]
|
let fileObj = {
|
||||||
if (value && value.file) {
|
files: [],
|
||||||
files.push(value.file)
|
fileType: item.fileType,
|
||||||
}
|
}
|
||||||
})
|
propNames.forEach((propName, index) => {
|
||||||
|
const value = item[propName]
|
||||||
|
if (value && value.file) {
|
||||||
|
fileObj[propStatus[index]] = true
|
||||||
|
files.push(value.file)
|
||||||
|
fileObj.files.push(value.file)
|
||||||
|
} else {
|
||||||
|
fileObj[propStatus[index]] = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
allFiles.push(fileObj)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!files.length) {
|
if (!files.length) {
|
||||||
this.$message.warn('File is Empty ')
|
this.$message.warn('File is Empty ')
|
||||||
|
@ -649,24 +662,45 @@ export default {
|
||||||
try {
|
try {
|
||||||
const { success, message } = await this.uploadZipFile(zipedFiles)
|
const { success, message } = await this.uploadZipFile(zipedFiles)
|
||||||
if (success) {
|
if (success) {
|
||||||
try {
|
let result = []
|
||||||
const { success, result, message } = await getAction('/spectrumAnalysis/getFilesBySampleFile', {
|
allFiles.forEach((el) => {
|
||||||
fileName: this.list
|
let obj = {}
|
||||||
.filter((item) => item.sampleFileName)
|
if (el.fileType == 'B') {
|
||||||
.map((item) => item.sampleFileName.file.name)
|
obj.sampleSystemType = el.fileType
|
||||||
.join(','),
|
el.files.forEach((item) => {
|
||||||
})
|
if (item.name.search('_S_')) {
|
||||||
if (success) {
|
obj.sampleFileName = item.name
|
||||||
this.visible = false
|
}
|
||||||
this.$emit('loadFormFile', result)
|
if (item.name.search('_G_')) {
|
||||||
|
obj.gasFileName = item.name
|
||||||
|
obj.gasFileStatus = el.gasFileStatus
|
||||||
|
}
|
||||||
|
if (item.name.search('_D_')) {
|
||||||
|
obj.detFileName = item.name
|
||||||
|
obj.detFileStatus = el.detFileStatus
|
||||||
|
}
|
||||||
|
if (item.name.search('_Q_')) {
|
||||||
|
obj.qcFileName = item.name
|
||||||
|
obj.qcFileStatus = el.qcFileStatus
|
||||||
|
}
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(message)
|
el.files.forEach((item) => {
|
||||||
|
if (item.name.search('_S_')) {
|
||||||
|
obj.sampleSystemType = el.fileType
|
||||||
|
obj.sampleFileName = item.name
|
||||||
|
obj.gasFileName = ''
|
||||||
|
obj.detFileName = ''
|
||||||
|
obj.qcFileName = ''
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
} catch (error) {
|
result.push(obj)
|
||||||
console.error(error)
|
})
|
||||||
} finally {
|
this.$emit('loadFormFile', result)
|
||||||
this.isUploadingZip = false
|
this.visible = false
|
||||||
}
|
this.isUploadingZip = false
|
||||||
|
// }
|
||||||
} else {
|
} else {
|
||||||
this.isUploadingZip = false
|
this.isUploadingZip = false
|
||||||
this.$message.error(message)
|
this.$message.error(message)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user