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