diff --git a/src/views/spectrumAnalysis/beta-analysis.vue b/src/views/spectrumAnalysis/beta-analysis.vue
index a5ecb49..95ec126 100644
--- a/src/views/spectrumAnalysis/beta-analysis.vue
+++ b/src/views/spectrumAnalysis/beta-analysis.vue
@@ -142,7 +142,7 @@ export default {
if (sampleData) {
const { data, from } = sampleData
this.sampleDetail = data
- // this.changeChartByType('sample')
+ this.handleChangeResult(data)
if (from == 'db') {
this.sampleDetail = data
this.emitGetFiles(data)
@@ -160,9 +160,6 @@ export default {
deep: true,
},
},
- mounted() {
- // this.getSelfStationSampleDetail()
- },
methods: {
refreshRoi(data) {
const { list, start, stop } = data
@@ -206,39 +203,7 @@ export default {
from: 'file',
})
this.sampleDetail = result
- const {
- spectrumData,
- betaEnergyData,
- gammaEnergyData,
- histogramDataList,
- ROIOneList,
- ROITwoList,
- ROIThreeList,
- ROIFourList,
- ROIOneStart,
- ROIOneStop,
- ROITwoStart,
- ROITwoStop,
- ROIThreeStart,
- ROIThreeStop,
- ROIFourStart,
- ROIFourStop,
- } = this.sampleDetail
- this.spectrumData = spectrumData
- this.histogramDataList = histogramDataList
- this.gammaEnergyData = gammaEnergyData
- this.betaEnergyData = betaEnergyData
- this.ROILists = [ROIOneList, ROITwoList, ROIThreeList, ROIFourList]
- let roiParam1 = { start: ROIOneStart, stop: ROIOneStop }
- let roiParam2 = { start: ROITwoStart, stop: ROITwoStop }
- let roiParam3 = { start: ROIThreeStart, stop: ROIThreeStop }
- let roiParam4 = { start: ROIFourStart, stop: ROIFourStop }
- this.roiParamList.push(roiParam1, roiParam2, roiParam3, roiParam4)
- let boundary1 = { minX: ROIOneStart, maxX: ROIOneStop, minY: 0, maxY: 4096 }
- let boundary2 = { minX: ROITwoStart, maxX: ROITwoStop, minY: 0, maxY: 4096 }
- let boundary3 = { minX: ROIThreeStart, maxX: ROIThreeStop, minY: 0, maxY: 4096 }
- let boundary4 = { minX: ROIFourStart, maxX: ROIFourStop, minY: 0, maxY: 4096 }
- this.boundaryList.push(boundary1, boundary2, boundary3, boundary4)
+ this.handleChangeResult(result)
this.isLoading = false
} else {
this.$message.error(message)
@@ -247,6 +212,41 @@ export default {
console.error(error)
}
},
+ handleChangeResult(res) {
+ const {
+ spectrumData,
+ betaEnergyData,
+ gammaEnergyData,
+ histogramDataList,
+ ROIOneList,
+ ROITwoList,
+ ROIThreeList,
+ ROIFourList,
+ ROIOneStart,
+ ROIOneStop,
+ ROITwoStart,
+ ROITwoStop,
+ ROIThreeStart,
+ ROIThreeStop,
+ ROIFourStart,
+ ROIFourStop,
+ } = this.sampleDetail
+ this.spectrumData = spectrumData
+ this.histogramDataList = histogramDataList
+ this.gammaEnergyData = gammaEnergyData
+ this.betaEnergyData = betaEnergyData
+ this.ROILists = [ROIOneList, ROITwoList, ROIThreeList, ROIFourList]
+ let roiParam1 = { start: ROIOneStart, stop: ROIOneStop }
+ let roiParam2 = { start: ROITwoStart, stop: ROITwoStop }
+ let roiParam3 = { start: ROIThreeStart, stop: ROIThreeStop }
+ let roiParam4 = { start: ROIFourStart, stop: ROIFourStop }
+ this.roiParamList.push(roiParam1, roiParam2, roiParam3, roiParam4)
+ let boundary1 = { minX: ROIOneStart, maxX: ROIOneStop, minY: 0, maxY: 4096 }
+ let boundary2 = { minX: ROITwoStart, maxX: ROITwoStop, minY: 0, maxY: 4096 }
+ let boundary3 = { minX: ROIThreeStart, maxX: ROIThreeStop, minY: 0, maxY: 4096 }
+ let boundary4 = { minX: ROIFourStart, maxX: ROIFourStop, minY: 0, maxY: 4096 }
+ this.boundaryList.push(boundary1, boundary2, boundary3, boundary4)
+ },
cancelLastRequest() {
if (this._cancelToken && typeof this._cancelToken == 'function') {
this._cancelToken()
diff --git a/src/views/spectrumAnalysis/components/BetaGammaSpectrum.vue b/src/views/spectrumAnalysis/components/BetaGammaSpectrum.vue
index 6889e59..209cf5d 100644
--- a/src/views/spectrumAnalysis/components/BetaGammaSpectrum.vue
+++ b/src/views/spectrumAnalysis/components/BetaGammaSpectrum.vue
@@ -33,8 +33,8 @@
-
-
+
+
@@ -43,7 +43,7 @@
import CustomChart from '@/components/CustomChart/index.vue'
import ColorPalette from './ColorPalette.vue'
import { getXAxisAndYAxisByPosition, rangeNumber } from '@/utils/chartHelper.js'
-import { getAction, putAction, deleteAction } from '../../../api/manage'
+import { putAction } from '../../../api/manage'
import SampleDataMixin from '../SampleDataMixin'
const buttons = ['Beta-Gamma', 'Gamma', 'Beta']
// Beta-Gamma 的配置
@@ -66,6 +66,9 @@ const twoDOption = {
lineStyle: {
type: 'dashed',
},
+ label: {
+ backgroundColor: 'rgba(119, 181, 213, 1)',
+ },
},
},
xAxis: {
@@ -325,6 +328,7 @@ const betaOption = {
type: 'line',
smooth: true,
showSymbol: false,
+ animation: false,
symbol: 'circle',
symbolSize: 6,
data: [],
@@ -823,12 +827,6 @@ export default {
// 点击Update
async handleUpdate() {
const { inputFileName } = this.sampleData
- let params = {
- sampleFileName: inputFileName,
- startChannel: this.startChannel,
- endChannel: this.endChannel,
- ROINum: this.currIdx + 1,
- }
try {
const { success, result, message } = await putAction(
`/selfStation/updateROI?sampleFileName=${inputFileName}&startChannel=${this.startChannel}&endChannel=${
@@ -851,13 +849,13 @@ export default {
}
this.$emit('refreshRoi', obj)
// this.$bus.$emit('updateRoi', obj.list)
- // this.boundaryData = {
- // minX: obj.start,
- // maxX: obj.stop,
- // minY: 0,
- // maxY: 4096,
- // color: '#99CA53',
- // }
+ this.boundaryData = {
+ minX: obj.start,
+ maxX: obj.stop,
+ minY: 0,
+ maxY: 4096,
+ color: '#99CA53',
+ }
// this.reDrawRect()
}
} catch (error) {
diff --git a/src/views/spectrumAnalysis/components/RoiLimits.vue b/src/views/spectrumAnalysis/components/RoiLimits.vue
index c974f14..5dd6ff7 100644
--- a/src/views/spectrumAnalysis/components/RoiLimits.vue
+++ b/src/views/spectrumAnalysis/components/RoiLimits.vue
@@ -27,7 +27,10 @@ const roiLimitsOption = {
right: 18,
bottom: 45,
},
- tooltip: {},
+ tooltip: {
+ show: true,
+ trigger: 'axis',
+ },
xAxis: {
type: 'category',
boundaryGap: false,
@@ -75,8 +78,8 @@ const roiLimitsOption = {
type: 'line',
smooth: true,
showSymbol: false,
- symbol: 'circle',
- symbolSize: 6,
+ // symbol: 'circle',
+ // symbolSize: 6,
data: [],
itemStyle: {
normal: {