1. from file 加载两个谱,切回另外一个谱的时候没有刷新分析后的数据
1)加载谱之后,详细信息还是正常的,先切换到第二个谱然后点击reprocess all 2)分析完之后第二个谱有详细数据,切换回第一个,曲线有数据了,但是详细信息没有数据了 Save all to db,返回错误信息之后,save 按钮上的效果应该去掉了
This commit is contained in:
parent
71353914bc
commit
0ff3f3a003
|
@ -22,6 +22,13 @@ const sample = {
|
||||||
find.data[key] = data
|
find.data[key] = data
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
UPDATE_SAMPLE_DATA_ANALY: (state, { inputFileName, data }) => {
|
||||||
|
const find = state.sampleList.find(item => item.inputFileName == inputFileName)
|
||||||
|
if (find) {
|
||||||
|
data.DetailedInformation = find.data.DetailedInformation
|
||||||
|
find.data = data
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
REMOVE_SAMPLE_DATA: (state, inputFileName) => {
|
REMOVE_SAMPLE_DATA: (state, inputFileName) => {
|
||||||
const findIndex = state.sampleList.findIndex(item => item.inputFileName == inputFileName)
|
const findIndex = state.sampleList.findIndex(item => item.inputFileName == inputFileName)
|
||||||
|
|
|
@ -734,20 +734,26 @@ export default {
|
||||||
let count = 0
|
let count = 0
|
||||||
let gammaList = this.sampleList.filter(({ sampleType }) => sampleType !== 'B')
|
let gammaList = this.sampleList.filter(({ sampleType }) => sampleType !== 'B')
|
||||||
let length = gammaList.length
|
let length = gammaList.length
|
||||||
gammaList.forEach(({ inputFileName: fileName }) => {
|
for (let i = 0; i < gammaList; i++) {
|
||||||
|
const { inputFileName: fileName } = array[i]
|
||||||
|
|
||||||
const params = {
|
const params = {
|
||||||
fileName,
|
fileName,
|
||||||
}
|
}
|
||||||
getAction('/gamma/saveToDB', params).then(({ result }) => {
|
const { result, success } = await getAction('/gamma/saveToDB', params)
|
||||||
// this.allSampleDet[fileName]= [...result.DetailedInformation]
|
if (success) {
|
||||||
this.$set(this.allSampleDet, fileName, [...result.DetailedInformation])
|
this.$set(this.allSampleDet, fileName, [...result.DetailedInformation])
|
||||||
count += 1
|
count += 1
|
||||||
if (count == length) {
|
if (count == length) {
|
||||||
this.isSaving = false
|
this.isSaving = false
|
||||||
this.currSampleDet = this.allSampleDet[this.sampleData.inputFileName]
|
this.currSampleDet = this.allSampleDet[this.sampleData.inputFileName]
|
||||||
}
|
}
|
||||||
})
|
} else {
|
||||||
})
|
this.isSaving = false
|
||||||
|
this.$message.error(message)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$message.warn('Please Analyse Spectrum First')
|
this.$message.warn('Please Analyse Spectrum First')
|
||||||
|
@ -856,10 +862,9 @@ export default {
|
||||||
try {
|
try {
|
||||||
const { success, result, message } = await postAction(`/gamma/Reprocessing?fileName=${fileNames[0]}`)
|
const { success, result, message } = await postAction(`/gamma/Reprocessing?fileName=${fileNames[0]}`)
|
||||||
if (success) {
|
if (success) {
|
||||||
this.$store.commit('ADD_SAMPLE_DATA', {
|
this.$store.commit('UPDATE_SAMPLE_DATA_ANALY', {
|
||||||
inputFileName: fileNames[0],
|
inputFileName: fileNames[0],
|
||||||
data: result,
|
data: result,
|
||||||
from: '',
|
|
||||||
})
|
})
|
||||||
this.finishCont++
|
this.finishCont++
|
||||||
this.percentBar = this.finishCont / this.gammaSampleNum
|
this.percentBar = this.finishCont / this.gammaSampleNum
|
||||||
|
|
Loading…
Reference in New Issue
Block a user