fix: Beta Energy Calibration及QC Flags相关问题修改
This commit is contained in:
parent
47e6b19c8c
commit
8c974aaf35
|
@ -8,14 +8,18 @@
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="settings">
|
<div class="settings">
|
||||||
<div class="channel-and-width">
|
<div class="channel-and-width">
|
||||||
<span> Channel: {{ betaGammaInfo.channel }} </span>
|
<div>
|
||||||
<span>
|
<label>Channel:</label>
|
||||||
|
<span>{{ betaGammaInfo.channel }}</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
Gamma Channel Width:
|
Gamma Channel Width:
|
||||||
<a-input-number :min="1" v-model="gammaChannelWidth" size="small"></a-input-number>
|
<a-input-number :min="1" v-model="gammaChannelWidth" size="small"></a-input-number>
|
||||||
</span>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="energy">
|
<div class="energy">
|
||||||
Energy: <span>{{ betaGammaInfo.energy }}</span>
|
<label>Energy:</label>
|
||||||
|
<span>{{ betaGammaInfo.energy }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="beta-gamma-chart">
|
<div class="beta-gamma-chart">
|
||||||
|
@ -38,28 +42,30 @@
|
||||||
<div class="gamma-gated-beta-spectrum">
|
<div class="gamma-gated-beta-spectrum">
|
||||||
<p>Gamma-gated Beta Spectrum: QC</p>
|
<p>Gamma-gated Beta Spectrum: QC</p>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="gamma-gated-chart">
|
<a-spin :spinning="isLoadingGammaGated">
|
||||||
<custom-chart
|
<div class="gamma-gated-chart">
|
||||||
ref="gammaGatedChartRef"
|
<custom-chart
|
||||||
:option="gammaGatedChartOption"
|
ref="gammaGatedChartRef"
|
||||||
@zr:click="handleGammaGatedSpectrumChartClick"
|
:option="gammaGatedChartOption"
|
||||||
/>
|
@zr:click="handleGammaGatedSpectrumChartClick"
|
||||||
<a-button type="primary" size="small" @click="handleSnapshot($refs.gammaGatedChartRef)"
|
/>
|
||||||
>Snapshot</a-button
|
<a-button type="primary" size="small" @click="handleSnapshot($refs.gammaGatedChartRef)"
|
||||||
>
|
>Snapshot</a-button
|
||||||
<!-- 自定义tooltip,用于点击图表后的tooltip显示 -->
|
>
|
||||||
<div
|
<!-- 自定义tooltip,用于点击图表后的tooltip显示 -->
|
||||||
v-if="tooltipVisible"
|
<div
|
||||||
class="custom-tool-tip"
|
v-if="tooltipVisible"
|
||||||
:style="{
|
class="custom-tool-tip"
|
||||||
top: tooltipPosition.top + 'px',
|
:style="{
|
||||||
left: tooltipPosition.left + 'px',
|
top: tooltipPosition.top + 'px',
|
||||||
}"
|
left: tooltipPosition.left + 'px',
|
||||||
>
|
}"
|
||||||
<div class="channel">Channel: {{ tooltipChannel }}</div>
|
>
|
||||||
|
<div class="channel">Channel: {{ tooltipChannel }}</div>
|
||||||
|
</div>
|
||||||
|
<!-- tooltip结束 -->
|
||||||
</div>
|
</div>
|
||||||
<!-- tooltip结束 -->
|
</a-spin>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="content channel-and-energy">
|
<div class="content channel-and-energy">
|
||||||
<a-form-model layout="inline">
|
<a-form-model layout="inline">
|
||||||
|
@ -180,6 +186,7 @@ import { exportEchartImg, getXAxisAndYAxisByPosition, splitAxis } from '@/utils/
|
||||||
import { graphic } from 'echarts'
|
import { graphic } from 'echarts'
|
||||||
import { isNullOrUndefined } from '@/utils/util'
|
import { isNullOrUndefined } from '@/utils/util'
|
||||||
import SampleDataMixin from '@/views/spectrumAnalysis/SampleDataMixin'
|
import SampleDataMixin from '@/views/spectrumAnalysis/SampleDataMixin'
|
||||||
|
import axios from 'axios'
|
||||||
|
|
||||||
const initialBetaGammaChartOption = {
|
const initialBetaGammaChartOption = {
|
||||||
grid: {
|
grid: {
|
||||||
|
@ -538,11 +545,6 @@ const newCalibrationFuncModel = {
|
||||||
export default {
|
export default {
|
||||||
mixins: [SampleDataMixin],
|
mixins: [SampleDataMixin],
|
||||||
components: { CustomChart, TitleOverBorder },
|
components: { CustomChart, TitleOverBorder },
|
||||||
props: {
|
|
||||||
sampleId: {
|
|
||||||
type: Number,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
this.columns = columns
|
this.columns = columns
|
||||||
|
|
||||||
|
@ -553,6 +555,7 @@ export default {
|
||||||
|
|
||||||
list: [],
|
list: [],
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
|
isLoadingGammaGated: false,
|
||||||
|
|
||||||
gammaEnergy: [],
|
gammaEnergy: [],
|
||||||
gammaGatedBetaSpectrum: [],
|
gammaGatedBetaSpectrum: [],
|
||||||
|
@ -596,9 +599,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
// if (this.sampleId) {
|
|
||||||
this.getData()
|
this.getData()
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleExit() {
|
handleExit() {
|
||||||
|
@ -676,17 +677,27 @@ export default {
|
||||||
// 获取右侧图表数据
|
// 获取右侧图表数据
|
||||||
async getGammaGated(gammaChannel) {
|
async getGammaGated(gammaChannel) {
|
||||||
try {
|
try {
|
||||||
|
this.cancelLastRequest()
|
||||||
|
const cancelToken = this.createCancelToken()
|
||||||
|
this.isLoadingGammaGated = true
|
||||||
|
const { sampleId, qcFileName } = this.newSampleData
|
||||||
const {
|
const {
|
||||||
success,
|
success,
|
||||||
result: { data },
|
result: { data },
|
||||||
message,
|
message,
|
||||||
} = await getAction('/spectrumAnalysis/getGammaGated', {
|
} = await getAction(
|
||||||
gammaChannel,
|
'/spectrumAnalysis/getGammaGated',
|
||||||
sampleId: this.sampleId,
|
{
|
||||||
chartHeight: this.gammaEnergy.length,
|
gammaChannel,
|
||||||
channelWidth: this.gammaChannelWidth,
|
sampleId,
|
||||||
})
|
chartHeight: this.gammaEnergy.length,
|
||||||
|
channelWidth: this.gammaChannelWidth,
|
||||||
|
qcFileName,
|
||||||
|
},
|
||||||
|
cancelToken
|
||||||
|
)
|
||||||
if (success) {
|
if (success) {
|
||||||
|
this.isLoadingGammaGated = false
|
||||||
const max = Math.max(...data.map(({ y }) => y))
|
const max = Math.max(...data.map(({ y }) => y))
|
||||||
|
|
||||||
const { max: _max, interval } = splitAxis(max, 0, 4)
|
const { max: _max, interval } = splitAxis(max, 0, 4)
|
||||||
|
@ -702,6 +713,19 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
cancelLastRequest() {
|
||||||
|
if (this._cancelToken && typeof this._cancelToken == 'function') {
|
||||||
|
this._cancelToken()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
createCancelToken() {
|
||||||
|
const cancelToken = new axios.CancelToken((c) => {
|
||||||
|
this._cancelToken = c
|
||||||
|
})
|
||||||
|
return cancelToken
|
||||||
|
},
|
||||||
|
|
||||||
// 绿框跟随鼠标移动
|
// 绿框跟随鼠标移动
|
||||||
handleBetaGammaChartMouseMove(param) {
|
handleBetaGammaChartMouseMove(param) {
|
||||||
const { offsetX, offsetY } = param
|
const { offsetX, offsetY } = param
|
||||||
|
@ -974,6 +998,20 @@ p {
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.energy {
|
||||||
|
span {
|
||||||
|
color: #f00;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.channel-and-width,
|
||||||
|
.energy {
|
||||||
|
label {
|
||||||
|
width: 60px;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.beta-gamma-chart {
|
.beta-gamma-chart {
|
||||||
height: 353px;
|
height: 353px;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
|
@ -434,11 +434,6 @@ const newCalibrationFuncModel = {
|
||||||
export default {
|
export default {
|
||||||
mixins: [SampleDataMixin],
|
mixins: [SampleDataMixin],
|
||||||
components: { CustomChart, TitleOverBorder },
|
components: { CustomChart, TitleOverBorder },
|
||||||
props: {
|
|
||||||
sampleId: {
|
|
||||||
type: Number,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
this.columns = columns
|
this.columns = columns
|
||||||
|
|
||||||
|
@ -475,9 +470,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
// if (this.sampleId) {
|
|
||||||
this.getData()
|
this.getData()
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleExit() {
|
handleExit() {
|
||||||
|
|
|
@ -9,10 +9,10 @@
|
||||||
>
|
>
|
||||||
<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 :sampleId="sampleId" />
|
<gamma-detector-calibration />
|
||||||
</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 :sampleId="sampleId" />
|
<beta-detector-calibration />
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
</a-tabs>
|
</a-tabs>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
|
@ -50,11 +50,6 @@ import TitleOverBorder from '@/views/spectrumAnalysis/components/TitleOverBorder
|
||||||
export default {
|
export default {
|
||||||
components: { BetaDetectorCalibration, GammaDetectorCalibration, TitleOverBorder },
|
components: { BetaDetectorCalibration, GammaDetectorCalibration, TitleOverBorder },
|
||||||
mixins: [ModalMixin],
|
mixins: [ModalMixin],
|
||||||
props: {
|
|
||||||
sampleId: {
|
|
||||||
type: Number,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
currTab: 'gamma',
|
currTab: 'gamma',
|
||||||
|
@ -68,6 +63,10 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
beforeModalOpen() {
|
||||||
|
this.currTab = 'gamma'
|
||||||
|
},
|
||||||
|
|
||||||
recalculateROICountsForChange(checkedVal) {
|
recalculateROICountsForChange(checkedVal) {
|
||||||
this.recalculateROICountsFor = checkedVal
|
this.recalculateROICountsFor = checkedVal
|
||||||
this.checkFlag.checkSample = checkedVal.includes('sample') ? true : false
|
this.checkFlag.checkSample = checkedVal.includes('sample') ? true : false
|
||||||
|
|
|
@ -63,7 +63,7 @@ export default {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: 150px;
|
width: 150px;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
cursor: default;
|
cursor: pointer;
|
||||||
|
|
||||||
&:not(:last-child) {
|
&:not(:last-child) {
|
||||||
margin-right: 2px;
|
margin-right: 2px;
|
||||||
|
|
|
@ -158,7 +158,6 @@
|
||||||
<!-- Beta-Gamma 的Energy Calibration开始 -->
|
<!-- Beta-Gamma 的Energy Calibration开始 -->
|
||||||
<beta-gamma-energy-calibration-modal
|
<beta-gamma-energy-calibration-modal
|
||||||
v-model="betaGammaEnergyCalibrationModalVisible"
|
v-model="betaGammaEnergyCalibrationModalVisible"
|
||||||
:sampleId="this.sampleData.sampleId"
|
|
||||||
@sendInfo="getCheckFlag"
|
@sendInfo="getCheckFlag"
|
||||||
/>
|
/>
|
||||||
<!-- Beta-Gamma 的Energy Calibration结束 -->
|
<!-- Beta-Gamma 的Energy Calibration结束 -->
|
||||||
|
|
Loading…
Reference in New Issue
Block a user