This commit is contained in:
任珮宇 2023-12-11 15:20:04 +08:00
commit 0d5dc20105
4 changed files with 68 additions and 7 deletions

View File

@ -876,12 +876,18 @@ export default {
},
// Reset Button
handleReset() {
async handleReset() {
this.removeCache("CALIBRATION_BETA_"+this.newSampleData.inputFileName) // fitting 20231101:xiao
this.newCalibrationFuncModel = cloneDeep(newCalibrationFuncModel)
this.list = []
this.newE2C = []
// reset 20231211xiao
const res = await postAction('/spectrumAnalysis/resetButton', {
tabName: "beta",
sampleFileName: this.newSampleData.inputFileName
})
this.figureChartOption = this.oldChartOption
this.figureChartOption = cloneDeep(this.oldChartOption)

View File

@ -656,12 +656,18 @@ export default {
},
// Reset Button
handleReset() {
async handleReset() {
this.$ls.remove("CALIBRATION_GAMMA_"+this.newSampleData.inputFileName) // fitting 20231101:xiao
this.newCalibrationFuncModel = cloneDeep(newCalibrationFuncModel)
this.list = []
this.newE2C = []
// reset 20231211xiao
const res = await postAction('/spectrumAnalysis/resetButton', {
tabName: "gamma",
sampleFileName: this.newSampleData.inputFileName
})
this.figureChartOption = cloneDeep(this.oldChartOption)
this.isFirstFitting = false
this.isInverse = false
@ -687,10 +693,11 @@ export default {
// ? this.oldScatterSeries
// : this.list.map((item) => ({ x: item.channel, y: item.energy })),
count: this.isFirstFitting || !this.isInverse ? undefined : this.count,
fittingBtn : this.isFirstFitting
})
if (success) {
// this.isFirstFitting = true
this.gammaIsFitting = false
this.gammaIsFitting = true
this.$emit('isFitting', true) // reAnalyzeisFirstFittingtrue 20231101xiao
this.setCache("CALIBRATION_GAMMA_"+this.newSampleData.inputFileName, result) // ReAnalyze 20231101xiao

View File

@ -1433,13 +1433,17 @@ export default {
},
//
showCompareModal(isStrip) {
showCompareModal(isStrip, isOperating) {
if (this.isLoading) {
this.$message.warn('Sample is Loading')
return
}
this.handleResetChart()
this.clearCompareLine()
if(isOperating) {
return
}
this.isStrip = isStrip
if (FilePicker.canUse()) {
this.chooseFileFromFS()
@ -1512,6 +1516,8 @@ export default {
this.$nextTick(() => {
this.thumbnailOption.yAxis.max = getAxisMax(this.getChart(), 'yAxis')
})
this.$emit('compareSuccess', this.isStrip)
} else {
this.$message.error(message)
}

View File

@ -18,7 +18,13 @@
<template v-for="(child, index) in operation.children">
<component v-if="child.show !== false" :is="child.type" :key="index" v-bind="child.attrs" v-on="child.on">
<template v-for="item in child.children">
<component v-if="item.show !== false" :is="item.type" :key="item.title" @click="item.handler">
<component
v-if="item.show !== false"
:is="item.type"
:key="item.title"
v-bind="item.attrs"
@click="item.handler"
>
{{ item.title }}
</component>
</template>
@ -40,6 +46,7 @@
:currSampleDet="currSampleDet"
:updateFlag="updateFlag"
@reAnalyed="handleReAnalyed"
@compareSuccess="handleCompareSuccess"
/>
<!-- Gamma 分析 -->
@ -430,6 +437,9 @@ export default {
analysedFileName: '', //
currSampleDet: [], // DetailedInformation
allSampleDet: {}, // DetailedInformation all
isComparing: false,
isStriping: false,
}
},
created() {
@ -963,6 +973,16 @@ export default {
this.colorConfig = colorConfig
this.$refs.gammaAnalysisRef.handleColorChange(colorConfig)
},
// Compare Strip
handleCompareSuccess(isStrip) {
console.log('%c [ isStrip ]-973', 'font-size:13px; background:pink; color:#bf2c9f;', isStrip)
if (isStrip) {
this.isStriping = true
} else {
this.isComparing = true
}
},
},
computed: {
//
@ -988,13 +1008,35 @@ export default {
type: 'a-menu-item',
title: 'Compare',
show: this.isGamma,
handler: () => this.$refs.gammaAnalysisRef.showCompareModal(false),
handler: () => {
this.isStriping = false
this.$refs.gammaAnalysisRef.showCompareModal(false, this.isComparing)
if (this.isComparing) {
this.isComparing = false
}
},
attrs: {
style: {
color: this.isComparing ? 'red' : '#fff',
},
},
},
{
type: 'a-menu-item',
title: 'Strip',
show: this.isGamma,
handler: () => this.$refs.gammaAnalysisRef.showCompareModal(true),
handler: () => {
this.isComparing = false
this.$refs.gammaAnalysisRef.showCompareModal(true, this.isStriping)
if (this.isStriping) {
this.isStriping = false
}
},
attrs: {
style: {
color: this.isStriping ? 'red' : '#fff',
},
},
},
{
type: 'a-menu-item',