Merge branch 'feature-analysis-RLR-renpy' of http://git.hivekion.com:3000/xiaoguangbin/AnalysisSystemForRadionuclide_vue into master-dev
This commit is contained in:
commit
1b8069890c
|
@ -6,16 +6,29 @@
|
||||||
<a-checkbox v-if="slot.isCheckbox" :key="index" v-model="record[slot.dataIndex]">
|
<a-checkbox v-if="slot.isCheckbox" :key="index" v-model="record[slot.dataIndex]">
|
||||||
Fixed
|
Fixed
|
||||||
</a-checkbox>
|
</a-checkbox>
|
||||||
<a-input v-else :key="index" v-model="record[slot.dataIndex]" :readOnly="slot.isStatic"></a-input>
|
<a-input
|
||||||
|
v-else
|
||||||
|
:key="index"
|
||||||
|
v-model="record[slot.dataIndex]"
|
||||||
|
:readOnly="slot.isStatic"
|
||||||
|
@change="handleInput(record, slot.dataIndex)"
|
||||||
|
></a-input>
|
||||||
</template>
|
</template>
|
||||||
</custom-table>
|
</custom-table>
|
||||||
</a-spin>
|
</a-spin>
|
||||||
<div slot="custom-footer">
|
<div slot="custom-footer">
|
||||||
<a-space>
|
<a-space>
|
||||||
<a-button type="primary" :disabled="isCanceling || isLoading" :loading="isAcceptting" @click="handlePeaks">
|
<a-button
|
||||||
|
type="primary"
|
||||||
|
:disabled="isCanceling || isLoading"
|
||||||
|
:loading="isAcceptting"
|
||||||
|
@click="handlePeaks(true)"
|
||||||
|
>
|
||||||
Peaks
|
Peaks
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button :disabled="isAcceptting || isLoading" :loading="isCanceling" @click="handleCancel">Cancel</a-button>
|
<a-button :disabled="isAcceptting || isLoading" :loading="isCanceling" @click="handlePeaks(false)"
|
||||||
|
>Cancel</a-button
|
||||||
|
>
|
||||||
</a-space>
|
</a-space>
|
||||||
</div>
|
</div>
|
||||||
</custom-modal>
|
</custom-modal>
|
||||||
|
@ -25,6 +38,7 @@
|
||||||
import { getAction, postAction } from '@/api/manage'
|
import { getAction, postAction } from '@/api/manage'
|
||||||
import ModalMixin from '@/mixins/ModalMixin'
|
import ModalMixin from '@/mixins/ModalMixin'
|
||||||
import SampleDataMixin from '@/views/spectrumAnalysis/SampleDataMixin'
|
import SampleDataMixin from '@/views/spectrumAnalysis/SampleDataMixin'
|
||||||
|
import { cloneDeep } from 'lodash'
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
|
@ -116,8 +130,14 @@ const columns = [
|
||||||
export default {
|
export default {
|
||||||
mixins: [ModalMixin, SampleDataMixin],
|
mixins: [ModalMixin, SampleDataMixin],
|
||||||
props: {
|
props: {
|
||||||
curChan: {
|
channel_1: {
|
||||||
type: Number
|
type: Number
|
||||||
|
},
|
||||||
|
channel_2: {
|
||||||
|
type: Number
|
||||||
|
},
|
||||||
|
isInsertPeak: {
|
||||||
|
type: Boolean
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
@ -129,18 +149,20 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 接收
|
async handlePeaks(accept) {
|
||||||
async handlePeaks() {
|
|
||||||
try {
|
try {
|
||||||
this.isAcceptting = true
|
this.isAcceptting = true
|
||||||
const { inputFileName: fileName } = this.sampleData
|
const { inputFileName: fileName } = this.sampleData
|
||||||
const { success, result, message } = await postAction('/gamma/acceptResults', {
|
const { success, result, message } = await postAction('/gamma/acceptResults', {
|
||||||
fileName,
|
fileName,
|
||||||
accept: true
|
accept,
|
||||||
|
oldPeaks: this.oldPeaks,
|
||||||
|
newPeak: this.newPeaks,
|
||||||
|
flag: this.isInsertPeak ? 'insert' : 'fit'
|
||||||
})
|
})
|
||||||
if (success) {
|
if (success) {
|
||||||
this.visible = false
|
this.visible = false
|
||||||
this.$emit('result', result)
|
this.$emit(accept ? 'result' : 'cancel', result)
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(message)
|
this.$message.error(message)
|
||||||
}
|
}
|
||||||
|
@ -151,46 +173,51 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 取消
|
// 值变化
|
||||||
async handleCancel() {
|
handleInput(record, index) {
|
||||||
try {
|
const find = this.newPeaks.find(item => item.index == record.lab)
|
||||||
this.isCanceling = true
|
if (find) {
|
||||||
const { inputFileName: fileName } = this.sampleData
|
const table2NewPeakMap = {
|
||||||
const { success, result, message } = await postAction('/gamma/acceptResults', {
|
energy: 'energy',
|
||||||
fileName,
|
netArea: 'area',
|
||||||
accept: false,
|
fwhm: 'fwhm'
|
||||||
oldPeak: this.oldPeaks
|
|
||||||
})
|
|
||||||
if (success) {
|
|
||||||
this.visible = false
|
|
||||||
this.$emit('cancel', result)
|
|
||||||
} else {
|
|
||||||
this.$message.error(message)
|
|
||||||
}
|
}
|
||||||
} catch (error) {
|
|
||||||
console.error(error)
|
find[table2NewPeakMap[index]] = record[index]
|
||||||
} finally {
|
|
||||||
this.isCanceling = false
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
async getData() {
|
async getData() {
|
||||||
|
const { sampleId, inputFileName: fileName } = this.sampleData
|
||||||
try {
|
try {
|
||||||
|
let url = '/gamma/fitPeak'
|
||||||
|
let params = {
|
||||||
|
left: this.channel_1,
|
||||||
|
right: this.channel_2,
|
||||||
|
fileName
|
||||||
|
}
|
||||||
|
|
||||||
|
// 如果是Insert Peak
|
||||||
|
if (this.isInsertPeak) {
|
||||||
|
url = '/gamma/insertPeak'
|
||||||
|
params = {
|
||||||
|
sampleId,
|
||||||
|
fileName,
|
||||||
|
curChan: Math.ceil(this.channel_1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.isLoading = true
|
this.isLoading = true
|
||||||
const { sampleId, inputFileName } = this.sampleData
|
const { success, result, message } = await getAction(url, params)
|
||||||
const { success, result, message } = await getAction('/gamma/insertPeak', {
|
|
||||||
sampleId,
|
|
||||||
fileName: inputFileName,
|
|
||||||
curChan: Math.ceil(this.curChan)
|
|
||||||
})
|
|
||||||
if (success) {
|
if (success) {
|
||||||
const { oldPeaks, tablePeaksList } = result
|
const { newPeaks, oldPeaks, tablePeaksList } = result
|
||||||
tablePeaksList.forEach(item => {
|
tablePeaksList.forEach(item => {
|
||||||
item.energy = Number(item.energy).toPrecision(6)
|
item.energy = Number(item.energy).toPrecision(6)
|
||||||
item.netArea = Number(item.netArea).toPrecision(6)
|
item.netArea = Number(item.netArea).toPrecision(6)
|
||||||
item.fwhm = Number(item.fwhm).toPrecision(6)
|
item.fwhm = Number(item.fwhm).toPrecision(6)
|
||||||
})
|
})
|
||||||
this.list = tablePeaksList
|
this.list = tablePeaksList
|
||||||
|
this.newPeaks = newPeaks
|
||||||
this.oldPeaks = oldPeaks
|
this.oldPeaks = oldPeaks
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(message)
|
this.$message.error(message)
|
||||||
|
|
|
@ -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>
|
||||||
|
@ -181,7 +181,9 @@
|
||||||
<!-- Fit Peaks and Baseline弹窗 开始 -->
|
<!-- Fit Peaks and Baseline弹窗 开始 -->
|
||||||
<fit-peaks-and-base-line-modal
|
<fit-peaks-and-base-line-modal
|
||||||
v-model="fitPeaksAndBaselineModalVisible"
|
v-model="fitPeaksAndBaselineModalVisible"
|
||||||
:curChan="currChannel"
|
:channel_1="channel_1"
|
||||||
|
:channel_2="channel_2"
|
||||||
|
:isInsertPeak="isInsertPeak"
|
||||||
@result="handleInsertSuccess"
|
@result="handleInsertSuccess"
|
||||||
@cancel="handleCancelSuccess"
|
@cancel="handleCancelSuccess"
|
||||||
/>
|
/>
|
||||||
|
@ -461,11 +463,17 @@ export default {
|
||||||
model: cloneDeep(nuclideIdentifyModal),
|
model: cloneDeep(nuclideIdentifyModal),
|
||||||
|
|
||||||
currChannel: undefined, // 当currChannel前选中的channel
|
currChannel: undefined, // 当currChannel前选中的channel
|
||||||
|
|
||||||
|
channel_1: undefined, // 用于Fit Peaks And Baseline Modal的道值
|
||||||
|
channel_2: undefined,
|
||||||
|
isInsertPeak: false, // 是否是插入Peak
|
||||||
|
|
||||||
selectedTableItem: undefined, // 当前选中的表格项
|
selectedTableItem: undefined, // 当前选中的表格项
|
||||||
|
|
||||||
isModifying: false, // 正在修改控制点
|
isModifying: false, // 正在修改控制点
|
||||||
isFitting: false, // 正在进行Fit操作
|
isFitting: false, // 正在进行Fit操作
|
||||||
firstFittingChannel: null, // Fit操作时点击的第一个channel
|
firstFittingChannel: null, // Fit操作时点击的第一个channel
|
||||||
|
isAccepting: false,
|
||||||
|
|
||||||
operationStack: [] // 操作记录
|
operationStack: [] // 操作记录
|
||||||
}
|
}
|
||||||
|
@ -517,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)
|
||||||
}
|
}
|
||||||
|
@ -544,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
|
||||||
|
@ -636,6 +650,9 @@ export default {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.channel_1 = left
|
||||||
|
this.channel_2 = right
|
||||||
|
this.isInsertPeak = false
|
||||||
this.fitPeaksAndBaselineModalVisible = true
|
this.fitPeaksAndBaselineModalVisible = true
|
||||||
|
|
||||||
this.isFitting = false
|
this.isFitting = false
|
||||||
|
@ -737,7 +754,10 @@ export default {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.channel_1 = this.currChannel
|
||||||
|
|
||||||
this.fitPeaksAndBaselineModalVisible = true
|
this.fitPeaksAndBaselineModalVisible = true
|
||||||
|
this.isInsertPeak = true
|
||||||
},
|
},
|
||||||
|
|
||||||
// 点击 Fit Peak XXX 弹窗中的 Peaks 按钮
|
// 点击 Fit Peak XXX 弹窗中的 Peaks 按钮
|
||||||
|
@ -765,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(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
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 点击 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
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 删除
|
// 删除
|
||||||
|
@ -1278,31 +1271,73 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
// 确定对Baseline Control Points 的操作
|
// 确定对Baseline Control Points 的操作
|
||||||
handleAccept() {
|
async handleAccept() {
|
||||||
this.BaseCtrls = cloneDeep(this.baseCtrls_Copy)
|
this.BaseCtrls = cloneDeep(this.baseCtrls_Copy)
|
||||||
const { baseline, xctrl, yctrl } = this.BaseCtrls
|
const { baseline, xctrl, yctrl } = this.BaseCtrls
|
||||||
this.channelBaseLineChart.pointlist = baseline.map((val, index) => {
|
// this.channelBaseLineChart.pointlist = baseline.map((val, index) => {
|
||||||
return {
|
// return {
|
||||||
x: index + 1,
|
// x: index + 1,
|
||||||
y: val
|
// y: val
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
|
||||||
|
// this.channelBaseCPChart = xctrl.map((val, index) => {
|
||||||
|
// return {
|
||||||
|
// color: this.channelBaseCPChart[0].color,
|
||||||
|
// name: index.toString(),
|
||||||
|
// point: {
|
||||||
|
// x: val,
|
||||||
|
// y: yctrl[index]
|
||||||
|
// },
|
||||||
|
// size: 4
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
|
||||||
|
const { inputFileName: fileName } = this.sampleData
|
||||||
|
|
||||||
|
try {
|
||||||
|
this.isAccepting = true
|
||||||
|
const { success, result, message } = await postAction('/gamma/acceptBaseLine', {
|
||||||
|
...this.BaseCtrls,
|
||||||
|
fileName
|
||||||
|
})
|
||||||
|
if (success) {
|
||||||
|
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)
|
||||||
this.channelBaseCPChart = xctrl.map((val, index) => {
|
} finally {
|
||||||
return {
|
this.isAccepting = false
|
||||||
color: this.channelBaseCPChart[0].color,
|
}
|
||||||
name: index.toString(),
|
|
||||||
point: {
|
|
||||||
x: val,
|
|
||||||
y: yctrl[index]
|
|
||||||
},
|
|
||||||
size: 4
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
this.handleSwitchOperation()
|
|
||||||
|
|
||||||
this.$bus.$emit('accept')
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 右下角添加当前选中的nuclide
|
// 右下角添加当前选中的nuclide
|
||||||
|
|
|
@ -596,6 +596,7 @@ export default {
|
||||||
count: 0, //反算时需要传递的数值 非反算的情况下不需要传递 数值大小是 第一次调用接口时返回的tableWidgets 大小
|
count: 0, //反算时需要传递的数值 非反算的情况下不需要传递 数值大小是 第一次调用接口时返回的tableWidgets 大小
|
||||||
isFirstFitting: true,
|
isFirstFitting: true,
|
||||||
isInverse: false, // 是否需要反算
|
isInverse: false, // 是否需要反算
|
||||||
|
betaIsFitting: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
@ -869,6 +870,8 @@ export default {
|
||||||
})
|
})
|
||||||
if (success) {
|
if (success) {
|
||||||
this.isFirstFitting = false
|
this.isFirstFitting = false
|
||||||
|
this.betaIsFitting = true
|
||||||
|
this.$emit('isFitting', this.betaIsFitting)
|
||||||
|
|
||||||
const { EToC, newLineSeries, newScatterSeriesData, tableWidgets, CToE } = result
|
const { EToC, newLineSeries, newScatterSeriesData, tableWidgets, CToE } = result
|
||||||
this.newE2C = EToC
|
this.newE2C = EToC
|
||||||
|
|
|
@ -467,6 +467,7 @@ export default {
|
||||||
count: 0, //反算时需要传递的数值 非反算的情况下不需要传递 数值大小是 第一次调用接口时返回的tableWidgets 大小
|
count: 0, //反算时需要传递的数值 非反算的情况下不需要传递 数值大小是 第一次调用接口时返回的tableWidgets 大小
|
||||||
isFirstFitting: true,
|
isFirstFitting: true,
|
||||||
isInverse: false, // 是否需要反算
|
isInverse: false, // 是否需要反算
|
||||||
|
gammaIsFitting: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
@ -646,6 +647,8 @@ export default {
|
||||||
})
|
})
|
||||||
if (success) {
|
if (success) {
|
||||||
this.isFirstFitting = false
|
this.isFirstFitting = false
|
||||||
|
this.gammaIsFitting = false
|
||||||
|
this.$emit('isFitting', this.gammaIsFitting)
|
||||||
|
|
||||||
const { EToC, newLineSeries, newScatterSeriesData, tableWidgets, CToE } = result
|
const { EToC, newLineSeries, newScatterSeriesData, tableWidgets, CToE } = result
|
||||||
this.newE2C = EToC
|
this.newE2C = EToC
|
||||||
|
|
|
@ -9,19 +9,19 @@
|
||||||
>
|
>
|
||||||
<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 />
|
<gamma-detector-calibration @isFitting="getFittingFlag_gamma" />
|
||||||
</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 />
|
<beta-detector-calibration @isFitting="getFittingFlag_beta" />
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
</a-tabs>
|
</a-tabs>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
<title-over-border title="New Calibration is Applied to">
|
<title-over-border title="New Calibration is Applied to">
|
||||||
<a-radio-group v-model="newCalibrationIsAppliedTo">
|
<a-radio-group v-model="newCalibrationIsAppliedTo">
|
||||||
<p>
|
<p>
|
||||||
<a-radio value="1">All Spectra</a-radio>
|
<a-radio value="AllSpectrum">All Spectra</a-radio>
|
||||||
</p>
|
</p>
|
||||||
<a-radio value="2">Current Spectrum</a-radio>
|
<a-radio value="CurrentSpectrum">Current Spectrum</a-radio>
|
||||||
</a-radio-group>
|
</a-radio-group>
|
||||||
</title-over-border>
|
</title-over-border>
|
||||||
<title-over-border title="Recalculate ROI Counts For">
|
<title-over-border title="Recalculate ROI Counts For">
|
||||||
|
@ -44,22 +44,26 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import ModalMixin from '@/mixins/ModalMixin'
|
import ModalMixin from '@/mixins/ModalMixin'
|
||||||
|
import SampleDataMixin from '@/views/spectrumAnalysis/SampleDataMixin'
|
||||||
|
import { postAction } from '@/api/manage'
|
||||||
import BetaDetectorCalibration from './components/BetaDetectorCalibration.vue'
|
import BetaDetectorCalibration from './components/BetaDetectorCalibration.vue'
|
||||||
import GammaDetectorCalibration from './components/GammaDetectorCalibration.vue'
|
import GammaDetectorCalibration from './components/GammaDetectorCalibration.vue'
|
||||||
import TitleOverBorder from '@/views/spectrumAnalysis/components/TitleOverBorder.vue'
|
import TitleOverBorder from '@/views/spectrumAnalysis/components/TitleOverBorder.vue'
|
||||||
export default {
|
export default {
|
||||||
components: { BetaDetectorCalibration, GammaDetectorCalibration, TitleOverBorder },
|
components: { BetaDetectorCalibration, GammaDetectorCalibration, TitleOverBorder },
|
||||||
mixins: [ModalMixin],
|
mixins: [ModalMixin, SampleDataMixin],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
currTab: 'gamma',
|
currTab: 'gamma',
|
||||||
newCalibrationIsAppliedTo: '2',
|
newCalibrationIsAppliedTo: 'CurrentSpectrum',
|
||||||
recalculateROICountsFor: [],
|
recalculateROICountsFor: [],
|
||||||
checkFlag: {
|
checkFlag: {
|
||||||
checkSample: false,
|
checkSample: false,
|
||||||
checkGas: false,
|
checkGas: false,
|
||||||
checkDet: false,
|
checkDet: false,
|
||||||
},
|
},
|
||||||
|
betaEnergyValid: false,
|
||||||
|
gammaEnergyValid: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -74,8 +78,42 @@ export default {
|
||||||
this.checkFlag.checkDet = checkedVal.includes('detBg') ? true : false
|
this.checkFlag.checkDet = checkedVal.includes('detBg') ? true : false
|
||||||
this.$emit('sendInfo', this.checkFlag)
|
this.$emit('sendInfo', this.checkFlag)
|
||||||
},
|
},
|
||||||
|
getFittingFlag_beta(val) {
|
||||||
|
this.betaEnergyValid = val
|
||||||
|
},
|
||||||
|
getFittingFlag_gamma(val) {
|
||||||
|
this.gammaEnergyValid = val
|
||||||
|
},
|
||||||
handleReAnalyse() {
|
handleReAnalyse() {
|
||||||
console.log(this.currTab)
|
let params = {
|
||||||
|
applyType: this.newCalibrationIsAppliedTo,
|
||||||
|
sampleData: this.recalculateROICountsFor.includes('sample') ? true : false,
|
||||||
|
gasBgData: this.recalculateROICountsFor.includes('gasBg') ? true : false,
|
||||||
|
detBgData: this.recalculateROICountsFor.includes('detBg') ? true : false,
|
||||||
|
qcData: this.recalculateROICountsFor.includes('qc') ? true : false,
|
||||||
|
betaEnergyValid: this.betaEnergyValid,
|
||||||
|
gammaEnergyValid: this.gammaEnergyValid,
|
||||||
|
dbNames: [this.newSampleData.dbName],
|
||||||
|
sampleIds: [this.newSampleData.sampleId ? this.newSampleData.sampleId : ''],
|
||||||
|
sampleFileNames: [this.newSampleData.inputFileName],
|
||||||
|
gasFileNames: [this.newSampleData.gasFileName],
|
||||||
|
detFileNames: [this.newSampleData.detFileName],
|
||||||
|
qcFileNames: [this.newSampleData.qcFileName],
|
||||||
|
currentFileName: this.newSampleData.inputFileName,
|
||||||
|
}
|
||||||
|
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)
|
||||||
|
})
|
||||||
|
this.$emit('sendXeData', res.result.XeData)
|
||||||
|
} else {
|
||||||
|
this.$message.warning(res.message)
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
handleExit() {
|
handleExit() {
|
||||||
this.visible = false
|
this.visible = false
|
||||||
|
|
|
@ -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()
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 显示比较弹窗
|
// 显示比较弹窗
|
||||||
|
|
|
@ -160,7 +160,11 @@
|
||||||
<!-- Beta-Gamma 的Comments 结束 -->
|
<!-- Beta-Gamma 的Comments 结束 -->
|
||||||
|
|
||||||
<!-- Beta-Gamma 的Energy Calibration开始 -->
|
<!-- Beta-Gamma 的Energy Calibration开始 -->
|
||||||
<beta-gamma-energy-calibration-modal v-model="betaGammaEnergyCalibrationModalVisible" @sendInfo="getCheckFlag" />
|
<beta-gamma-energy-calibration-modal
|
||||||
|
v-model="betaGammaEnergyCalibrationModalVisible"
|
||||||
|
@sendInfo="getCheckFlag"
|
||||||
|
@sendXeData="getXeData"
|
||||||
|
/>
|
||||||
<!-- Beta-Gamma 的Energy Calibration结束 -->
|
<!-- Beta-Gamma 的Energy Calibration结束 -->
|
||||||
|
|
||||||
<!-- Beta-Gamma 的 Extrapolation 弹窗开始 -->
|
<!-- Beta-Gamma 的 Extrapolation 弹窗开始 -->
|
||||||
|
@ -404,6 +408,12 @@ export default {
|
||||||
this.params_toDB.comment = val.spectrumAnalysisCommentInfo
|
this.params_toDB.comment = val.spectrumAnalysisCommentInfo
|
||||||
},
|
},
|
||||||
getStationName(arg, val) {
|
getStationName(arg, val) {
|
||||||
|
arg.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)
|
||||||
|
})
|
||||||
this.resultDisplayFlag = arg
|
this.resultDisplayFlag = arg
|
||||||
this.params_toDB.stationName = val
|
this.params_toDB.stationName = val
|
||||||
},
|
},
|
||||||
|
@ -412,6 +422,10 @@ export default {
|
||||||
this.params_toDB.checkGas = val.checkGas
|
this.params_toDB.checkGas = val.checkGas
|
||||||
this.params_toDB.checkDet = val.checkDet
|
this.params_toDB.checkDet = val.checkDet
|
||||||
},
|
},
|
||||||
|
getXeData(val) {
|
||||||
|
this.$set(this.analyseCurrentSpectrumData, 'XeData', val)
|
||||||
|
this.resultDisplayFlag = val
|
||||||
|
},
|
||||||
// formDB 来源 吧接口返回的文件名称添加到sampleData
|
// formDB 来源 吧接口返回的文件名称添加到sampleData
|
||||||
getFiles(val) {
|
getFiles(val) {
|
||||||
this.newSampleData = { ...this.sampleData, ...val }
|
this.newSampleData = { ...this.sampleData, ...val }
|
||||||
|
@ -610,10 +624,11 @@ export default {
|
||||||
getAnalyzeCurrentSpectrum() {
|
getAnalyzeCurrentSpectrum() {
|
||||||
let params = {
|
let params = {
|
||||||
dbNames: [this.newSampleData.dbName],
|
dbNames: [this.newSampleData.dbName],
|
||||||
sampleIds: [this.newSampleData.sampleId],
|
sampleIds: [this.newSampleData.sampleId ? this.newSampleData.sampleId : ''],
|
||||||
sampleFileNames: [this.newSampleData.inputFileName],
|
sampleFileNames: [this.newSampleData.inputFileName],
|
||||||
gasFileNames: [this.newSampleData.gasFileName],
|
gasFileNames: [this.newSampleData.gasFileName],
|
||||||
detFileNames: [this.newSampleData.detFileName],
|
detFileNames: [this.newSampleData.detFileName],
|
||||||
|
qcFileNames: [this.newSampleData.qcFileName],
|
||||||
}
|
}
|
||||||
postAction('/spectrumAnalysis/analyseCurrentSpectrum', params).then((res) => {
|
postAction('/spectrumAnalysis/analyseCurrentSpectrum', params).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
|
@ -630,6 +645,32 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
getAnalyzeAllSpectrum() {
|
||||||
|
let params = {
|
||||||
|
dbNames: [this.newSampleData.dbName],
|
||||||
|
sampleIds: [this.newSampleData.sampleId ? this.newSampleData.sampleId : ''],
|
||||||
|
sampleFileNames: [this.newSampleData.inputFileName],
|
||||||
|
gasFileNames: [this.newSampleData.gasFileName],
|
||||||
|
detFileNames: [this.newSampleData.detFileName],
|
||||||
|
qcFileNames: [this.newSampleData.qcFileName],
|
||||||
|
currentFileName: this.newSampleData.inputFileName,
|
||||||
|
}
|
||||||
|
postAction('/spectrumAnalysis/analyseAllSpectrum', params).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
console.log(res)
|
||||||
|
this.analyseCurrentSpectrumData = res.result
|
||||||
|
this.resultDisplayFlag = res.result.XeData
|
||||||
|
this.resultDisplayFlag.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)
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$message.warning(res.message)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
handleEnergyCalib() {
|
handleEnergyCalib() {
|
||||||
if (this.newSampleData.sampleId) {
|
if (this.newSampleData.sampleId) {
|
||||||
if (this.newSampleData.qcFileName) {
|
if (this.newSampleData.qcFileName) {
|
||||||
|
@ -823,7 +864,9 @@ export default {
|
||||||
type: 'a-menu-item',
|
type: 'a-menu-item',
|
||||||
title: 'Analyze all spectra',
|
title: 'Analyze all spectra',
|
||||||
show: this.isBetaGamma,
|
show: this.isBetaGamma,
|
||||||
handler: () => {},
|
handler: () => {
|
||||||
|
this.getAnalyzeAllSpectrum()
|
||||||
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user