fix: 自建台站分析时,在非sample类型下错误应用到右侧4个图表的问题

This commit is contained in:
Xu Zhimeng 2024-08-23 15:27:15 +08:00
parent 42dacfa6f0
commit 8798ac5b66

View File

@ -215,13 +215,9 @@ export default {
async handler(newVal, oldVal) {
const sampleData = getSampleData(newVal.inputFileName)
if (sampleData) {
const { data, from } = sampleData
const { data } = sampleData
this.sampleDetail = data
this.changeChartByType('sample')
if (from == 'db') {
this.sampleDetail = data
}
this.ROIAnalyzeLists = data.ROIAnalyzeLists || []
} else {
if (newVal.sampleId) {
this.getDetailFromDB()
@ -272,7 +268,7 @@ export default {
const { success, result, message } = await postAction('/selfStation/Reprocessing', formData)
if (success) {
const analyseList = this.getROIAnalyzeListsFromResult(result)
this.ROIAnalyzeLists = analyseList
this.ROIAnalyzeLists = this.spectraType == 'sample' ? analyseList : []
updateSampleData({
inputFileName,
key: 'ROIAnalyzeLists',
@ -409,7 +405,7 @@ export default {
}
},
//
//
async getDetailFromDB() {
const { dbName, sampleId, analyst, inputFileName } = this.sample
try {
@ -434,7 +430,6 @@ export default {
})
const analyseList = this.getROIAnalyzeListsFromResult(result.sample)
this.ROIAnalyzeLists = analyseList
updateSampleData({
inputFileName,
key: 'ROIAnalyzeLists',