WIP: Accept功能
This commit is contained in:
parent
90cfebf23e
commit
eddab8db4c
|
@ -107,7 +107,7 @@
|
||||||
<a-button type="primary" @click="handleReplot">Replot</a-button>
|
<a-button type="primary" @click="handleReplot">Replot</a-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="peak-box-item">
|
<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>
|
||||||
<div class="peak-box-item">
|
<div class="peak-box-item">
|
||||||
<a-button type="primary" @click="handleSwitchOperation">Cancel</a-button>
|
<a-button type="primary" @click="handleSwitchOperation">Cancel</a-button>
|
||||||
|
@ -473,6 +473,7 @@ export default {
|
||||||
isModifying: false, // 正在修改控制点
|
isModifying: false, // 正在修改控制点
|
||||||
isFitting: false, // 正在进行Fit操作
|
isFitting: false, // 正在进行Fit操作
|
||||||
firstFittingChannel: null, // Fit操作时点击的第一个channel
|
firstFittingChannel: null, // Fit操作时点击的第一个channel
|
||||||
|
isAccepting: false,
|
||||||
|
|
||||||
operationStack: [] // 操作记录
|
operationStack: [] // 操作记录
|
||||||
}
|
}
|
||||||
|
@ -524,25 +525,11 @@ export default {
|
||||||
this.energy = energy
|
this.energy = energy
|
||||||
this.BaseCtrls = BaseCtrls
|
this.BaseCtrls = BaseCtrls
|
||||||
this.FitBaseLine = FitBaseLine
|
this.FitBaseLine = FitBaseLine
|
||||||
|
this.barChart = barChart
|
||||||
|
|
||||||
const series = []
|
this.setChartOption(channelBaseLineChart, channelCountChart, channelPeakChart, channelBaseCPChart, barChart)
|
||||||
|
|
||||||
// 推入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.list = table
|
this.list = table
|
||||||
this.option.series = series
|
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(message)
|
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() {
|
reset() {
|
||||||
this.currChannel = undefined
|
this.currChannel = undefined
|
||||||
this.btnGroupType = 1
|
this.btnGroupType = 1
|
||||||
|
@ -778,47 +785,20 @@ export default {
|
||||||
|
|
||||||
this.channelPeakChart = channelPeakChart
|
this.channelPeakChart = channelPeakChart
|
||||||
this.channelBaseLineChart = channelBaseLineChart
|
this.channelBaseLineChart = channelBaseLineChart
|
||||||
|
this.barChart = barChart
|
||||||
|
|
||||||
const series = []
|
this.setChartOption(channelBaseLineChart, this.channelCountChart, channelPeakChart, this.channelBaseCPChart, barChart)
|
||||||
|
|
||||||
// 推入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.list = table
|
this.list = table
|
||||||
this.option.series = series
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 点击 Fit Peak XXX 弹窗中的 Cancel 按钮
|
// 点击 Fit Peak XXX 弹窗中的 Cancel 按钮
|
||||||
handleCancelSuccess(result) {
|
handleCancelSuccess(result) {
|
||||||
const { channelPeakChart, table } = result
|
const { channelPeakChart, table } = result
|
||||||
this.channelPeakChart = channelPeakChart
|
this.channelPeakChart = channelPeakChart
|
||||||
const series = []
|
|
||||||
|
|
||||||
// 推入旧的BaseLine
|
this.setChartOption(this.channelBaseLineChart, this.channelCountChart, channelPeakChart, this.channelBaseCPChart, this.barChart)
|
||||||
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.list = table
|
this.list = table
|
||||||
this.option.series = series
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 删除
|
// 删除
|
||||||
|
@ -1316,22 +1296,48 @@ export default {
|
||||||
const { inputFileName: fileName } = this.sampleData
|
const { inputFileName: fileName } = this.sampleData
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
this.isAccepting = true
|
||||||
const { success, result, message } = await postAction('/gamma/acceptBaseLine', {
|
const { success, result, message } = await postAction('/gamma/acceptBaseLine', {
|
||||||
...this.BaseCtrls,
|
...this.BaseCtrls,
|
||||||
fileName
|
fileName
|
||||||
})
|
})
|
||||||
if(success) {
|
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 {
|
} else {
|
||||||
this.$message.error(message)
|
this.$message.error(message)
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error)
|
console.error(error)
|
||||||
|
} finally {
|
||||||
|
this.isAccepting = false
|
||||||
}
|
}
|
||||||
|
|
||||||
this.handleSwitchOperation()
|
|
||||||
|
|
||||||
this.$bus.$emit('accept')
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 右下角添加当前选中的nuclide
|
// 右下角添加当前选中的nuclide
|
||||||
|
|
|
@ -1163,11 +1163,37 @@ export default {
|
||||||
|
|
||||||
// 分析工具Accept时刷新部分数据
|
// 分析工具Accept时刷新部分数据
|
||||||
handleAccept(data) {
|
handleAccept(data) {
|
||||||
console.log('%c [ handleAccept ]-1088', 'font-size:13px; background:pink; color:#bf2c9f;', data)
|
console.log('%c [ data ]-1166', 'font-size:13px; background:pink; color:#bf2c9f;', data)
|
||||||
this.handleResetState()
|
const {
|
||||||
// data.DetailedInformation = this.detailedInfomation
|
allData,
|
||||||
|
barChart,
|
||||||
|
channelBaseLineChart,
|
||||||
|
peakSet,
|
||||||
|
shadowChannelChart,
|
||||||
|
shadowEnergyChart,
|
||||||
|
shapeChannelData,
|
||||||
|
shapeData,
|
||||||
|
shapeEnergyData,
|
||||||
|
} = data
|
||||||
|
|
||||||
this.clearCompareLine()
|
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