fix: 修复自建台站相互切换时XeData未更新的问题

This commit is contained in:
Xu Zhimeng 2024-10-10 09:59:09 +08:00
parent f50127371b
commit bbf9c1d783
2 changed files with 18 additions and 3 deletions

View File

@ -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'

View File

@ -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 = []