fix: 自建台站分析后的右下角数据修改,修改load from db对于重复的谱的判断逻辑

This commit is contained in:
Xu Zhimeng 2024-08-22 17:47:31 +08:00
parent 80b77a2eb7
commit 42dacfa6f0
3 changed files with 16 additions and 110 deletions

View File

@ -186,6 +186,10 @@ export default {
sample: {
type: Object,
},
sampleList: {
type: Array,
default: () => [],
},
},
data() {
this.SampleType = SampleType
@ -251,13 +255,14 @@ export default {
return arr
},
//
async getAnalyzeCurrentSpectrum() {
if (this.isLoading) {
return
}
try {
const { inputFileName, detFileName } = this.sample
const { inputFileName } = this.sample
const userId = store.getters.userInfo.id
this.isLoading = true
@ -273,6 +278,8 @@ export default {
key: 'ROIAnalyzeLists',
data: analyseList,
})
this.resultDisplay = result.XeData
} else {
const arr = message.split('\n')
this.$warning({
@ -280,58 +287,6 @@ export default {
content: () => arr.map((text) => <div>{text}</div>),
})
}
let XeData = [
{
sampleId: null,
idAnalysis: null,
nuclideName: 'Xe131m',
conc: -0.049,
concErr: 0.04272,
mdc: 0.14539,
lc: 0.06362626536110005,
nidFlag: 0,
moddate: null,
color: 'red',
},
{
sampleId: null,
idAnalysis: null,
nuclideName: 'Xe133',
conc: 0.07727,
concErr: 0.0631,
mdc: 0.23981,
lc: 0.09916332268275692,
nidFlag: 0,
moddate: null,
color: '#ffcc30',
},
{
sampleId: null,
idAnalysis: null,
nuclideName: 'Xe133m',
conc: -0.07186,
concErr: 0.03596,
mdc: 0.11014,
lc: 0.044521536189968125,
nidFlag: 0,
moddate: null,
color: 'red',
},
{
sampleId: null,
idAnalysis: null,
nuclideName: 'Xe135',
conc: 0.26636,
concErr: 0.23193,
mdc: 0.77578,
lc: 0.3655879636569543,
nidFlag: 0,
moddate: null,
color: '#ffcc30',
},
]
this.resultDisplay = XeData
// this.$emit('reAnalyCurr', true, XeData)
} catch (error) {
console.error(error)
} finally {
@ -339,59 +294,9 @@ export default {
}
},
//
getAnalyzeAllSpectrum() {
let XeData = [
{
sampleId: null,
idAnalysis: null,
nuclideName: 'Xe131m',
conc: -0.049,
concErr: 0.04272,
mdc: 0.14539,
lc: 0.06362626536110005,
nidFlag: 0,
moddate: null,
color: 'red',
},
{
sampleId: null,
idAnalysis: null,
nuclideName: 'Xe133',
conc: 0.07727,
concErr: 0.0631,
mdc: 0.23981,
lc: 0.09916332268275692,
nidFlag: 0,
moddate: null,
color: '#ffcc30',
},
{
sampleId: null,
idAnalysis: null,
nuclideName: 'Xe133m',
conc: -0.07186,
concErr: 0.03596,
mdc: 0.11014,
lc: 0.044521536189968125,
nidFlag: 0,
moddate: null,
color: 'red',
},
{
sampleId: null,
idAnalysis: null,
nuclideName: 'Xe135',
conc: 0.26636,
concErr: 0.23193,
mdc: 0.77578,
lc: 0.3655879636569543,
nidFlag: 0,
moddate: null,
color: '#ffcc30',
},
]
this.resultDisplay = XeData
// this.$emit('reAnalyCurr', true, XeData)
this.$message.warning('尚未实现该功能')
},
// Update
@ -571,6 +476,7 @@ export default {
this.ROIAnalyzeLists = []
}
if (val == 'detBg') this.currSpectrum = 'Det'
if (val == 'qc') this.currSpectrum = 'QC'
this.roiParamList = cloneDeep(InitialRoiParamList)
this.ROILists = []
const {

View File

@ -60,7 +60,7 @@ const columns = [
title: 'Isotope',
dataIndex: 'nuclideName',
ellipsis: true,
width: 76,
width: 80,
},
{
title: 'Concentration',

View File

@ -50,7 +50,7 @@
/>
<!-- Gamma 分析 -->
<beta-analysis v-else-if="isBeta" ref="betaAnalysisRef" :sample="sampleData" />
<beta-analysis v-else-if="isBeta" ref="betaAnalysisRef" :sample="sampleData" :sampleList="sampleList" />
<!-- Beta-Gamma 分析 -->
<!-- <beta-gamma-analysis v-else-if="isBetaGamma" ref="betaGammaAnalysisRef" :sample="sampleData" /> -->
@ -562,8 +562,8 @@ export default {
* @param {any[]} sampleList
*/
handleLoadSampleFromDB(sampleList) {
const ids = this.sampleList.map((item) => item.sampleId) // Sampleid
const willAddList = sampleList.filter((item) => !ids.includes(item.sampleId))
const names = this.sampleList.map((item) => item.inputFileName) // SampleinputFileName
const willAddList = sampleList.filter((item) => !names.includes(item.inputFileName))
this.callInitValue(willAddList)
this.sampleList = this.sampleList.concat(willAddList)
},
@ -599,7 +599,7 @@ export default {
item.inputFileName = item.sampleFileName
item.sampleType = item.sampleSystemType
})
const names = this.sampleList.map((item) => item.inputFileName) // Sampleid
const names = this.sampleList.map((item) => item.inputFileName) // SampleinputFileName
const willAddList = arr.filter((item) => !names.includes(item.inputFileName))
this.callInitValue(willAddList)
this.sampleList = this.sampleList.concat(willAddList)