fix: 修复自建台站相互切换时XeData未更新的问题
This commit is contained in:
parent
f50127371b
commit
bbf9c1d783
|
@ -215,16 +215,22 @@ export default {
|
|||
async handler(newVal, oldVal) {
|
||||
const sampleData = getSampleData(newVal.inputFileName)
|
||||
if (sampleData) {
|
||||
this.cancelLastRequest()
|
||||
this.isLoading = false
|
||||
const { data } = sampleData
|
||||
console.log('%c [ data ]-221', 'font-size:13px; background:pink; color:#bf2c9f;', data)
|
||||
this.sampleDetail = data
|
||||
this.changeChartByType('sample')
|
||||
// 更新XeData
|
||||
this.resultDisplay = data.XeData
|
||||
} else {
|
||||
this.resultDisplay = []
|
||||
this.ROIAnalyzeLists = []
|
||||
if (newVal.sampleId) {
|
||||
this.getDetailFromDB()
|
||||
} else {
|
||||
this.getDetailFromFile()
|
||||
}
|
||||
this.ROIAnalyzeLists = []
|
||||
}
|
||||
},
|
||||
immediate: true,
|
||||
|
@ -275,6 +281,12 @@ export default {
|
|||
data: analyseList,
|
||||
})
|
||||
|
||||
updateSampleData({
|
||||
inputFileName,
|
||||
key: 'XeData',
|
||||
data: result.XeData,
|
||||
})
|
||||
|
||||
// 更新XeData
|
||||
this.resultDisplay = result.XeData
|
||||
} else {
|
||||
|
@ -458,7 +470,7 @@ export default {
|
|||
},
|
||||
|
||||
changeChartByType(val) {
|
||||
const currSampleDetail = this.sampleDetail[this.spectraType]
|
||||
const currSampleDetail = this.sampleDetail[val]
|
||||
if (!currSampleDetail) {
|
||||
this.$message.warning(`No ${this.spectraType} spectrum file!`)
|
||||
this.$nextTick(() => {
|
||||
|
@ -468,6 +480,7 @@ export default {
|
|||
}
|
||||
|
||||
this.prevSpectraType = val
|
||||
this.spectraType = val
|
||||
|
||||
if (val == 'sample') {
|
||||
this.currSpectrum = 'Sample'
|
||||
|
|
|
@ -485,7 +485,9 @@ export default {
|
|||
}
|
||||
}
|
||||
record.qcFileName = qcFileInfo
|
||||
} else if (phdParser.fileType == 'C') {
|
||||
}
|
||||
// 如果是自建台站,也查找其他文件
|
||||
else if (phdParser.fileType == 'C') {
|
||||
const iter = await this.directoryHanlder.values()
|
||||
const fileList = []
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user