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