调整 beta 普重计算接口代码调整
This commit is contained in:
parent
6cc9d9ae69
commit
98ce272d05
|
@ -121,7 +121,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction } from '../../api/manage'
|
||||
import { getAction, postAction } from '../../api/manage'
|
||||
import BetaGammaChartContainer from './components/BetaGammaChartContainer.vue'
|
||||
import BetaGammaSpectrumChart from './components/BetaGammaSpectrumChart.vue'
|
||||
import StatisticsParamerHistoryModalForQcFlags from './components/Modals/BetaGammaModals/StatisticsParamerHistoryModalForQCFlags.vue'
|
||||
|
@ -180,14 +180,15 @@ export default {
|
|||
sample: {
|
||||
type: Object,
|
||||
},
|
||||
analyseCurrentSpectrum: {
|
||||
type: Object,
|
||||
},
|
||||
// analyseCurrentSpectrum: {
|
||||
// type: Object,
|
||||
// },
|
||||
},
|
||||
data() {
|
||||
this.SampleType = SampleType
|
||||
|
||||
return {
|
||||
analyseCurrentSpectrum: {},
|
||||
qcFlags: {},
|
||||
|
||||
spectraVisible: false,
|
||||
|
@ -449,6 +450,58 @@ export default {
|
|||
this.betaEnergyData = energy
|
||||
}
|
||||
},
|
||||
// beta Analyze current spectrum 分析接口
|
||||
getAnalyzeCurrentSpectrum() {
|
||||
let params = {
|
||||
dbNames: [this.sample.dbName],
|
||||
sampleIds: [this.sample.sampleId ? this.sample.sampleId : ''],
|
||||
sampleFileNames: [this.sample.inputFileName],
|
||||
gasFileNames: [this.sample.gasFileName],
|
||||
detFileNames: [this.sample.detFileName],
|
||||
qcFileNames: [this.sample.qcFileName],
|
||||
}
|
||||
postAction('/spectrumAnalysis/analyseCurrentSpectrum', params).then((res) => {
|
||||
console.log('分析分析', res)
|
||||
if (res.success) {
|
||||
// this.isReAnalyed_beta = true
|
||||
this.analyseCurrentSpectrum = res.result
|
||||
res.result.XeData.forEach((item) => {
|
||||
item.conc = parseFloat(item.conc.toPrecision(6))
|
||||
item.concErr = parseFloat(item.concErr.toPrecision(6))
|
||||
item.lc = parseFloat(item.lc.toPrecision(6))
|
||||
item.mdc = parseFloat(item.mdc.toPrecision(6))
|
||||
})
|
||||
this.$emit('reAnalyCurr', true, res.result.XeData)
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
},
|
||||
getAnalyzeAllSpectrum() {
|
||||
let params = {
|
||||
dbNames: [this.sample.dbName],
|
||||
sampleIds: [this.sample.sampleId ? this.sample.sampleId : ''],
|
||||
sampleFileNames: [this.sample.inputFileName],
|
||||
gasFileNames: [this.sample.gasFileName],
|
||||
detFileNames: [this.sample.detFileName],
|
||||
qcFileNames: [this.sample.qcFileName],
|
||||
currentFileName: this.sample.inputFileName,
|
||||
}
|
||||
postAction('/spectrumAnalysis/analyseAllSpectrum', params).then((res) => {
|
||||
if (res.success) {
|
||||
this.analyseCurrentSpectrum = res.result
|
||||
res.result.XeData.forEach((item) => {
|
||||
item.conc = parseFloat(item.conc.toPrecision(6))
|
||||
item.concErr = parseFloat(item.concErr.toPrecision(6))
|
||||
item.lc = parseFloat(item.lc.toPrecision(6))
|
||||
item.mdc = parseFloat(item.mdc.toPrecision(6))
|
||||
})
|
||||
this.$emit('reAnalyAll', true, res.result.XeData)
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
sample: {
|
||||
|
@ -482,7 +535,7 @@ export default {
|
|||
this.$store.commit('UPDATE_SAMPLE_DATA', {
|
||||
inputFileName: this.sample.inputFileName,
|
||||
key: 'XeData',
|
||||
data: newVal.XeData
|
||||
data: newVal.XeData,
|
||||
})
|
||||
},
|
||||
immediate: true,
|
||||
|
|
|
@ -49,6 +49,8 @@
|
|||
ref="betaGammaAnalysisRef"
|
||||
@getFiles="getFiles"
|
||||
@sendInfo="getStationName"
|
||||
@reAnalyCurr="getReAnalyCurr"
|
||||
@reAnalyAll="getReAnalyAll"
|
||||
:sample="sampleData"
|
||||
:analyseCurrentSpectrum="analyseCurrentSpectrumData"
|
||||
/>
|
||||
|
@ -422,6 +424,13 @@ export default {
|
|||
},
|
||||
|
||||
methods: {
|
||||
getReAnalyCurr(flag, val) {
|
||||
this.isReAnalyed_beta = flag
|
||||
this.resultDisplayFlag = val
|
||||
},
|
||||
getReAnalyAll(val) {
|
||||
this.resultDisplayFlag = val
|
||||
},
|
||||
handleReAnalyed(val) {
|
||||
this.isReAnalyed_gamma = val
|
||||
},
|
||||
|
@ -709,57 +718,6 @@ export default {
|
|||
handleReanalyse(...data) {
|
||||
this.$refs.betaGammaAnalysisRef.reanalyse(data)
|
||||
},
|
||||
// beta Analyze current spectrum 分析接口
|
||||
getAnalyzeCurrentSpectrum() {
|
||||
let params = {
|
||||
dbNames: [this.newSampleData.dbName],
|
||||
sampleIds: [this.newSampleData.sampleId ? this.newSampleData.sampleId : ''],
|
||||
sampleFileNames: [this.newSampleData.inputFileName],
|
||||
gasFileNames: [this.newSampleData.gasFileName],
|
||||
detFileNames: [this.newSampleData.detFileName],
|
||||
qcFileNames: [this.newSampleData.qcFileName],
|
||||
}
|
||||
postAction('/spectrumAnalysis/analyseCurrentSpectrum', params).then((res) => {
|
||||
if (res.success) {
|
||||
this.isReAnalyed_beta = true
|
||||
this.analyseCurrentSpectrumData = res.result
|
||||
this.resultDisplayFlag = res.result.XeData
|
||||
this.resultDisplayFlag.forEach((item) => {
|
||||
item.conc = parseFloat(item.conc.toPrecision(6))
|
||||
item.concErr = parseFloat(item.concErr.toPrecision(6))
|
||||
item.lc = parseFloat(item.lc.toPrecision(6))
|
||||
item.mdc = parseFloat(item.mdc.toPrecision(6))
|
||||
})
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
},
|
||||
getAnalyzeAllSpectrum() {
|
||||
let params = {
|
||||
dbNames: [this.newSampleData.dbName],
|
||||
sampleIds: [this.newSampleData.sampleId ? this.newSampleData.sampleId : ''],
|
||||
sampleFileNames: [this.newSampleData.inputFileName],
|
||||
gasFileNames: [this.newSampleData.gasFileName],
|
||||
detFileNames: [this.newSampleData.detFileName],
|
||||
qcFileNames: [this.newSampleData.qcFileName],
|
||||
currentFileName: this.newSampleData.inputFileName,
|
||||
}
|
||||
postAction('/spectrumAnalysis/analyseAllSpectrum', params).then((res) => {
|
||||
if (res.success) {
|
||||
this.analyseCurrentSpectrumData = res.result
|
||||
this.resultDisplayFlag = res.result.XeData
|
||||
this.resultDisplayFlag.forEach((item) => {
|
||||
item.conc = parseFloat(item.conc.toPrecision(6))
|
||||
item.concErr = parseFloat(item.concErr.toPrecision(6))
|
||||
item.lc = parseFloat(item.lc.toPrecision(6))
|
||||
item.mdc = parseFloat(item.mdc.toPrecision(6))
|
||||
})
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
},
|
||||
handleEnergyCalib() {
|
||||
if (this.newSampleData.sampleId) {
|
||||
if (this.newSampleData.qcFileName) {
|
||||
|
@ -998,7 +956,8 @@ export default {
|
|||
title: 'Analyze current spectrum',
|
||||
show: this.isBetaGamma,
|
||||
handler: () => {
|
||||
this.getAnalyzeCurrentSpectrum()
|
||||
// this.getAnalyzeCurrentSpectrum()
|
||||
this.$refs.betaGammaAnalysisRef.getAnalyzeCurrentSpectrum()
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -1006,7 +965,8 @@ export default {
|
|||
title: 'Analyze all spectra',
|
||||
show: this.isBetaGamma,
|
||||
handler: () => {
|
||||
this.getAnalyzeAllSpectrum()
|
||||
// this.getAnalyzeAllSpectrum()
|
||||
this.$refs.betaGammaAnalysisRef.getAnalyzeAllSpectrum()
|
||||
},
|
||||
},
|
||||
],
|
||||
|
|
Loading…
Reference in New Issue
Block a user