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: { sampleInfo: {
type: Object, type: Object,
}, },
// analyseCurrentSpectrum: { analyseCurrentSpectrum: {
// type: Object, type: Object,
// }, },
}, },
data() { data() {
this.SampleType = SampleType this.SampleType = SampleType
return { return {
analyseCurrentSpectrum: {}, // analyseCurrentSpectrum: {},
qcFlags: {}, qcFlags: {},
spectraVisible: false, spectraVisible: false,
@ -224,10 +224,24 @@ export default {
currSample: {}, currSample: {},
} }
}, },
created() {
this.$bus.$on('ReAnalyse', this.redrawRect)
},
destroyed() { destroyed() {
this.cancelLastRequest() this.cancelLastRequest()
this.$bus.$off('ReAnalyse', this.redrawRect)
}, },
methods: { 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) { handleGetFlag(val, obj) {
this.resultDisplay.forEach((item) => { this.resultDisplay.forEach((item) => {
if (item.nuclideName === obj.nuclideName) { if (item.nuclideName === obj.nuclideName) {
@ -466,7 +480,8 @@ export default {
postAction('/spectrumAnalysis/analyseCurrentSpectrum', params).then((res) => { postAction('/spectrumAnalysis/analyseCurrentSpectrum', params).then((res) => {
if (res.success) { if (res.success) {
// this.isReAnalyed_beta = true // 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) { if (res.result.XeData && res.result.XeData.length > 0) {
res.result.XeData.forEach((item) => { res.result.XeData.forEach((item) => {
item.conc = parseFloat(item.conc.toPrecision(6)) item.conc = parseFloat(item.conc.toPrecision(6))
@ -493,7 +508,8 @@ export default {
} }
postAction('/spectrumAnalysis/analyseAllSpectrum', params).then((res) => { postAction('/spectrumAnalysis/analyseAllSpectrum', params).then((res) => {
if (res.success) { if (res.success) {
this.analyseCurrentSpectrum = res.result // this.analyseCurrentSpectrum = res.result
this.$emit('sendXeData', res.result.XeData)
res.result.XeData.forEach((item) => { res.result.XeData.forEach((item) => {
item.conc = parseFloat(item.conc.toPrecision(6)) item.conc = parseFloat(item.conc.toPrecision(6))
item.concErr = parseFloat(item.concErr.toPrecision(6)) item.concErr = parseFloat(item.concErr.toPrecision(6))

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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