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