beta 重新分析接口对接,及save to DB 功能调试
This commit is contained in:
		
							parent
							
								
									0db383e436
								
							
						
					
					
						commit
						90cfebf23e
					
				| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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