This commit is contained in:
xiaoguangbin 2023-11-09 16:39:58 +08:00
commit c3e7d78bdb
9 changed files with 83 additions and 30 deletions

View File

@ -183,15 +183,15 @@ export default {
sampleInfo: {
type: Object,
},
// analyseCurrentSpectrum: {
// type: Object,
// },
analyseCurrentSpectrum: {
type: Object,
},
},
data() {
this.SampleType = SampleType
return {
analyseCurrentSpectrum: {},
// analyseCurrentSpectrum: {},
qcFlags: {},
spectraVisible: false,
@ -224,10 +224,24 @@ export default {
currSample: {},
}
},
created() {
this.$bus.$on('ReAnalyse', this.redrawRect)
},
destroyed() {
this.cancelLastRequest()
this.$bus.$off('ReAnalyse', this.redrawRect)
},
methods: {
//
redrawRect(result) {
const keys = ['SampleBoundary', 'GasBoundary', 'DetBoundary', 'QCBoundary']
SampleType.forEach((item, index) => {
const value = result[keys[index]]
this.sampleDetail[item.value].Boundary = value || []
this.changeChartByType(this.spectraType)
})
},
handleGetFlag(val, obj) {
this.resultDisplay.forEach((item) => {
if (item.nuclideName === obj.nuclideName) {
@ -466,7 +480,8 @@ export default {
postAction('/spectrumAnalysis/analyseCurrentSpectrum', params).then((res) => {
if (res.success) {
// this.isReAnalyed_beta = true
this.analyseCurrentSpectrum = res.result
// this.analyseCurrentSpectrum = res.result
this.$emit('sendXeData', res.result.XeData)
if (res.result.XeData && res.result.XeData.length > 0) {
res.result.XeData.forEach((item) => {
item.conc = parseFloat(item.conc.toPrecision(6))
@ -493,7 +508,8 @@ export default {
}
postAction('/spectrumAnalysis/analyseAllSpectrum', params).then((res) => {
if (res.success) {
this.analyseCurrentSpectrum = res.result
// this.analyseCurrentSpectrum = res.result
this.$emit('sendXeData', res.result.XeData)
res.result.XeData.forEach((item) => {
item.conc = parseFloat(item.conc.toPrecision(6))
item.concErr = parseFloat(item.concErr.toPrecision(6))

View File

@ -799,7 +799,7 @@ export default {
shapeChannelData,
shapeEnergyData,
peak: table,
barChart: this.barChart
barChart: this.barChart,
})
this.channelPeakChart = channelPeakChart
@ -892,6 +892,7 @@ export default {
barChart: this.barChart,
})
this.opts.notMerge = true
this.channelPeakChart = channelPeakChart
const series = []
// BaseLine
@ -908,9 +909,10 @@ export default {
this.list = table
this.opts.notMerge = true
this.option.series = series
this.resetChartOpts()
this.$nextTick(() => {
this.resetChartOpts()
})
this.selectedKeys = []
@ -1438,7 +1440,7 @@ export default {
this.resetChartOpts()
})
this.$bus.$emit('accept', result)
this.$bus.$emit('accept', { ...result, BaseCtrls: cloneDeep(this.baseCtrls_Copy) })
} else {
this.$message.error(message)
}
@ -1818,7 +1820,12 @@ export default {
width: 100%;
}
}
::v-deep {
.ant-modal {
top: 5px;
padding-bottom: 7px;
}
}
.is-modify,
.is-fitting {
color: #f00;

View File

@ -10,7 +10,7 @@
>
<a-tabs :animated="false" v-model="currTab">
<a-tab-pane tab="Gamma Detector Calibration" key="gamma">
<gamma-detector-calibration @isFitting="getFittingFlag_gamma" :isFirstFitting="gammaEnergyValid"/>
<gamma-detector-calibration @isFitting="getFittingFlag_gamma" :isFirstFitting="gammaEnergyValid" />
</a-tab-pane>
<a-tab-pane tab="Beta Detector Calibration" key="beta">
<beta-detector-calibration @isFitting="getFittingFlag_beta" />
@ -71,7 +71,7 @@ export default {
},
betaEnergyValid: false,
gammaEnergyValid: false,
isReanlyze: false
isReanlyze: false,
}
},
methods: {
@ -90,14 +90,14 @@ export default {
this.betaEnergyValid = val
},
getFittingFlag_gamma(val) {
console.log("zhiqian>>>"+this.gammaEnergyValid);
console.log('zhiqian>>>' + this.gammaEnergyValid)
this.gammaEnergyValid = val
console.log("zhihou>>>"+this.gammaEnergyValid);
console.log('zhihou>>>' + this.gammaEnergyValid)
},
handleReAnalyse() {
// todo 1.fitting; 2.isReAnalyze
if(!this.gammaEnergyValid){
return false;
if (!this.gammaEnergyValid) {
return false
}
const regExp = /^([A-Z]{1,}\d{1,})_/
const regMatched = this.newSampleData.inputFileName.match(regExp)
@ -141,15 +141,16 @@ export default {
postAction('/spectrumAnalysis/ReAnalyse', params).then((res) => {
if (res.success) {
res.result.XeData.forEach((item) => {
item.conc = item.conc.toFixed(6)
item.concErr = item.concErr.toFixed(6)
item.lc = item.lc.toFixed(6)
item.mdc = item.mdc.toFixed(6)
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('sendXeData', res.result.XeData)
this.$message.success('Analyse Success!')
this.isReanlyze = true
this.handleExit()
this.$bus.$emit('ReAnalyse', res.result)
} else {
this.$message.warning(res.message)
}
@ -157,9 +158,9 @@ export default {
},
handleExit() {
this.gammaEnergyValid = this.isReanlyze
console.log("exit>>>this.isReanlyze>>>"+this.isReanlyze);
if(!this.isReanlyze && this.$ls.get("calibration-gamma:"+this.newSampleData.inputFileName)){
this.$ls.remove("calibration-gamma:"+this.newSampleData.inputFileName) // ReANalyzefitting 20231101:xiao
console.log('exit>>>this.isReanlyze>>>' + this.isReanlyze)
if (!this.isReanlyze && this.$ls.get('calibration-gamma:' + this.newSampleData.inputFileName)) {
this.$ls.remove('calibration-gamma:' + this.newSampleData.inputFileName) // ReANalyzefitting 20231101:xiao
}
this.visible = false
},
@ -182,6 +183,10 @@ export default {
<style lang="less" scoped>
::v-deep {
.ant-modal {
top: 5px;
padding-bottom: 15px;
}
.ant-form-item-label,
.ant-form-item-control {
line-height: 30px !important;

View File

@ -813,6 +813,12 @@ export default {
}
</script>
<style lang="less" scoped>
::v-deep {
.ant-modal {
top: 5px;
padding-bottom: 15px;
}
}
.border {
border: 1px solid #0b8c82;
}

View File

@ -721,4 +721,10 @@ export default {
.mt-20 {
margin-top: 20px;
}
::v-deep {
.ant-modal {
top: 5px;
padding-bottom: 15px;
}
}
</style>

View File

@ -680,4 +680,10 @@ export default {
.mt-20 {
margin-top: 20px;
}
::v-deep {
.ant-modal {
top: 5px;
padding-bottom: 15px;
}
}
</style>

View File

@ -679,4 +679,10 @@ export default {
.mt-20 {
margin-top: 20px;
}
::v-deep {
.ant-modal {
top: 5px;
padding-bottom: 15px;
}
}
</style>

View File

@ -1382,7 +1382,7 @@ export default {
// Accept
handleAccept(data) {
const { allData, peak, shadowChannelChart, shadowEnergyChart, shapeChannelData, shapeEnergyData, barChart } = data
const { allData, peak, shadowChannelChart, shadowEnergyChart, shapeChannelData, shapeEnergyData, barChart, BaseCtrls } = data
const result = {
DetailedInformation: this.detailedInfomation,
@ -1393,7 +1393,7 @@ export default {
shapeChannelData,
shapeEnergyData,
peak,
BaseCtrls: this.baseCtrls,
BaseCtrls,
bAnalyed: this.bAnalyed,
barChart
}

View File

@ -49,12 +49,13 @@
ref="betaGammaAnalysisRef"
@getFiles="getFiles"
@sendInfo="getStationName"
@sendXeData="getXeData"
@reAnalyCurr="getReAnalyCurr"
@reAnalyAll="getReAnalyAll"
:sampleInfo="sampleInfo"
:sample="sampleData"
:analyseCurrentSpectrum="analyseCurrentSpectrumData"
/>
<!-- :analyseCurrentSpectrum="analyseCurrentSpectrumData" -->
<!-- Beta-Gamma 分析 -->
<div v-else class="empty">Please Select a Sample</div>
<resize-observer @notify="handleResize" />
@ -376,7 +377,7 @@ export default {
betaGammaRlrModalVisible: false, // beta-gamma RLR
statisticsParamerHistoryModalVisible: false, // beta-gamma Statistics Paramer History
bgLogViewerVisible: false, // beta-gamma Log BG log viewer
// analyseCurrentSpectrumData: {},
analyseCurrentSpectrumData: {},
resultDisplayFlag: [],
params_toDB: {
comment: '',
@ -467,7 +468,7 @@ export default {
this.params_toDB.checkDet = val.checkDet
},
getXeData(val) {
// this.$set(this.analyseCurrentSpectrumData, 'XeData', val)
this.$set(this.analyseCurrentSpectrumData, 'XeData', val)
this.resultDisplayFlag = val
},
// formDB sampleData
@ -1304,7 +1305,7 @@ export default {
title: 'BG log viewer',
show: this.isBetaGamma,
handler: () => {
if(this.params_toDB.savedAnalysisResult) {
if (this.params_toDB.savedAnalysisResult) {
this.bgLogViewerVisible = true
}
},