WIP: Accept功能
This commit is contained in:
parent
90cfebf23e
commit
eddab8db4c
|
@ -107,7 +107,7 @@
|
|||
<a-button type="primary" @click="handleReplot">Replot</a-button>
|
||||
</div>
|
||||
<div class="peak-box-item">
|
||||
<a-button type="primary" @click="handleAccept">Accept</a-button>
|
||||
<a-button type="primary" :loading="isAccepting" @click="handleAccept">Accept</a-button>
|
||||
</div>
|
||||
<div class="peak-box-item">
|
||||
<a-button type="primary" @click="handleSwitchOperation">Cancel</a-button>
|
||||
|
@ -473,6 +473,7 @@ export default {
|
|||
isModifying: false, // 正在修改控制点
|
||||
isFitting: false, // 正在进行Fit操作
|
||||
firstFittingChannel: null, // Fit操作时点击的第一个channel
|
||||
isAccepting: false,
|
||||
|
||||
operationStack: [] // 操作记录
|
||||
}
|
||||
|
@ -524,25 +525,11 @@ export default {
|
|||
this.energy = energy
|
||||
this.BaseCtrls = BaseCtrls
|
||||
this.FitBaseLine = FitBaseLine
|
||||
this.barChart = barChart
|
||||
|
||||
const series = []
|
||||
|
||||
// 推入BaseLine
|
||||
series.push(this.buildBaseLine(channelBaseLineChart))
|
||||
|
||||
// 推入Count
|
||||
series.push(this.buildCountLine(channelCountChart))
|
||||
|
||||
// 推入Peak
|
||||
series.push(...this.buildPeaks(channelPeakChart))
|
||||
|
||||
// 推入基线控制点
|
||||
series.push(this.buildCtrlPoint(channelBaseCPChart))
|
||||
|
||||
this.thumbnailOption.series = this.buildBarChart(barChart)
|
||||
|
||||
this.setChartOption(channelBaseLineChart, channelCountChart, channelPeakChart, channelBaseCPChart, barChart)
|
||||
this.list = table
|
||||
this.option.series = series
|
||||
|
||||
} else {
|
||||
this.$message.error(message)
|
||||
}
|
||||
|
@ -551,6 +538,26 @@ export default {
|
|||
}
|
||||
},
|
||||
|
||||
setChartOption(baseLine, count, peaks, baseCP, bar) {
|
||||
const series = []
|
||||
|
||||
// 推入BaseLine
|
||||
series.push(this.buildBaseLine(baseLine))
|
||||
|
||||
// 推入Count
|
||||
series.push(this.buildCountLine(count))
|
||||
|
||||
// 推入Peak
|
||||
series.push(...this.buildPeaks(peaks))
|
||||
|
||||
// 推入基线控制点
|
||||
series.push(this.buildCtrlPoint(baseCP))
|
||||
|
||||
this.thumbnailOption.series = this.buildBarChart(bar)
|
||||
|
||||
this.option.series = series
|
||||
},
|
||||
|
||||
reset() {
|
||||
this.currChannel = undefined
|
||||
this.btnGroupType = 1
|
||||
|
@ -778,47 +785,20 @@ export default {
|
|||
|
||||
this.channelPeakChart = channelPeakChart
|
||||
this.channelBaseLineChart = channelBaseLineChart
|
||||
this.barChart = barChart
|
||||
|
||||
const series = []
|
||||
|
||||
// 推入BaseLine
|
||||
series.push(this.buildBaseLine(channelBaseLineChart))
|
||||
|
||||
// 推入旧的Count
|
||||
series.push(this.buildCountLine(this.channelCountChart))
|
||||
|
||||
// 推入Peak
|
||||
series.push(...this.buildPeaks(channelPeakChart))
|
||||
|
||||
// 推入旧的基线控制点
|
||||
series.push(this.buildCtrlPoint(this.channelBaseCPChart))
|
||||
|
||||
this.thumbnailOption.series = this.buildBarChart(barChart)
|
||||
|
||||
this.setChartOption(channelBaseLineChart, this.channelCountChart, channelPeakChart, this.channelBaseCPChart, barChart)
|
||||
this.list = table
|
||||
this.option.series = series
|
||||
},
|
||||
|
||||
// 点击 Fit Peak XXX 弹窗中的 Cancel 按钮
|
||||
handleCancelSuccess(result) {
|
||||
const { channelPeakChart, table } = result
|
||||
this.channelPeakChart = channelPeakChart
|
||||
const series = []
|
||||
|
||||
// 推入旧的BaseLine
|
||||
series.push(this.buildBaseLine(this.channelBaseLineChart))
|
||||
|
||||
// 推入旧的Count
|
||||
series.push(this.buildCountLine(this.channelCountChart))
|
||||
|
||||
// 推入Peak
|
||||
series.push(...this.buildPeaks(channelPeakChart))
|
||||
|
||||
// 推入旧的基线控制点
|
||||
series.push(this.buildCtrlPoint(this.channelBaseCPChart))
|
||||
this.setChartOption(this.channelBaseLineChart, this.channelCountChart, channelPeakChart, this.channelBaseCPChart, this.barChart)
|
||||
|
||||
this.list = table
|
||||
this.option.series = series
|
||||
},
|
||||
|
||||
// 删除
|
||||
|
@ -1316,22 +1296,48 @@ export default {
|
|||
const { inputFileName: fileName } = this.sampleData
|
||||
|
||||
try {
|
||||
this.isAccepting = true
|
||||
const { success, result, message } = await postAction('/gamma/acceptBaseLine', {
|
||||
...this.BaseCtrls,
|
||||
fileName
|
||||
})
|
||||
if (success) {
|
||||
console.log('%c [ ]-1312', 'font-size:13px; background:pink; color:#bf2c9f;', result)
|
||||
const {
|
||||
allData,
|
||||
barChart,
|
||||
channelBaseLineChart,
|
||||
peakSet,
|
||||
shadowChannelChart,
|
||||
shadowEnergyChart,
|
||||
shapeChannelData,
|
||||
shapeData,
|
||||
shapeEnergyData
|
||||
} = result
|
||||
|
||||
this.channelBaseLineChart = channelBaseLineChart
|
||||
this.channelPeakChart = peakSet
|
||||
this.shadowChannelChart = shadowChannelChart
|
||||
this.channelBaseCPChart = shapeChannelData
|
||||
this.barChart = barChart
|
||||
|
||||
this.btnGroupType = 1
|
||||
this.opts.notMerge = true
|
||||
this.clearRect()
|
||||
|
||||
this.setChartOption(channelBaseLineChart, this.channelCountChart, peakSet, this.channelBaseCPChart, barChart)
|
||||
this.$nextTick(() => {
|
||||
this.resetChartOpts()
|
||||
})
|
||||
|
||||
this.$bus.$emit('accept', result)
|
||||
} else {
|
||||
this.$message.error(message)
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
} finally {
|
||||
this.isAccepting = false
|
||||
}
|
||||
|
||||
this.handleSwitchOperation()
|
||||
|
||||
this.$bus.$emit('accept')
|
||||
},
|
||||
|
||||
// 右下角添加当前选中的nuclide
|
||||
|
|
|
@ -1163,11 +1163,37 @@ export default {
|
|||
|
||||
// 分析工具Accept时刷新部分数据
|
||||
handleAccept(data) {
|
||||
console.log('%c [ handleAccept ]-1088', 'font-size:13px; background:pink; color:#bf2c9f;', data)
|
||||
this.handleResetState()
|
||||
// data.DetailedInformation = this.detailedInfomation
|
||||
console.log('%c [ data ]-1166', 'font-size:13px; background:pink; color:#bf2c9f;', data)
|
||||
const {
|
||||
allData,
|
||||
barChart,
|
||||
channelBaseLineChart,
|
||||
peakSet,
|
||||
shadowChannelChart,
|
||||
shadowEnergyChart,
|
||||
shapeChannelData,
|
||||
shapeData,
|
||||
shapeEnergyData,
|
||||
} = data
|
||||
|
||||
this.clearCompareLine()
|
||||
// this.dataProsess(data)
|
||||
this.channelData.peakGroup = this.getLineData(allData, 'Peak', 'channel', true)
|
||||
this.energyData.peakGroup = this.getLineData(allData, 'Peak', 'energy', true)
|
||||
this.redrawPeakLine()
|
||||
|
||||
this.channelData.baseLine = this.getLineData(allData, 'BaseLine', 'channel')
|
||||
this.energyData.baseLine = this.getLineData(allData, 'BaseLine', 'energy')
|
||||
this.redrawLineBySeriesName(
|
||||
'BaseLine',
|
||||
this.energyData.baseLine,
|
||||
this.channelData.baseLine,
|
||||
this.graphAssistance.Baseline
|
||||
)
|
||||
|
||||
this.channelData.baseLineCP = shapeChannelData
|
||||
this.energyData.baseLineCP = shapeEnergyData
|
||||
this.redrawCtrlPointBySeriesName()
|
||||
|
||||
},
|
||||
|
||||
// 显示比较弹窗
|
||||
|
|
Loading…
Reference in New Issue
Block a user