diff --git a/src/views/spectrumAnalysis/beta-gamma-analysis.vue b/src/views/spectrumAnalysis/beta-gamma-analysis.vue
index 6feec6c..922f554 100644
--- a/src/views/spectrumAnalysis/beta-gamma-analysis.vue
+++ b/src/views/spectrumAnalysis/beta-gamma-analysis.vue
@@ -242,55 +242,81 @@ export default {
console.error(error)
}
},
+ async getSampleDetail_file() {
+ this.spectraType = this.SampleType[0].value
+ let params = {
+ sampleFileName: this.sample.sampleFileName,
+ gasFileName: this.sample.gasFileName,
+ detFileName: this.sample.detFileName,
+ qcFileName: this.sample.qcFileStatus?this.sample.qcFileName:"",
+ }
+ try {
+ this.isLoading = true
+ const { success, result, message } = await getAction('/spectrumAnalysis/getFileSpectrumChart', params)
+ if (success) {
+ this.sampleDetail = result
+ this.changeChartByType('sample')
+ this.isLoading = false
+ } else {
+ this.$message.error(message)
+ }
+ } catch (error) {
+ console.error(error)
+ }
+ },
- changeChartByType() {
- const {
- betaOriginalData,
- betaProjectedData,
- betaEnergyData,
-
- gammaOriginalData,
- gammaProjectedData,
- gammaEnergyData,
-
- histogramDataList, // 左侧 Beta-Gamma Spectrum: Sample 图表
- histogramDataDList, // 左侧 Beta-Gamma Spectrum: Sample 图表的3D部分
- Boundary, // 左侧2d图表的矩形
-
- XeData, // 右下角Result Display
- spectrumData,
-
- AcqTimeBtn, // QC Flags 相关
- CollectTimeBtn, // QC Flags 相关
- SampleVolumeBtn, // QC Flags 相关
- XeVolumeBtn, // QC Flags 相关
- GasBgBtn, // QC Flags 相关
- DetBgBtn // QC Flags 相关
- } = this.sampleDetail[this.spectraType]
-
- this.spectrumData = spectrumData
-
- this.histogramDataList = histogramDataList
- this.histogramDataDList = histogramDataDList
- this.boundaryList = Boundary
-
- this.gammaOriginalData = gammaOriginalData
- this.gammaProjectedData = gammaProjectedData
- this.gammaEnergyData = gammaEnergyData
-
- this.betaOriginalData = betaOriginalData
- this.betaProjectedData = betaProjectedData
- this.betaEnergyData = betaEnergyData
-
- this.resultDisplay = XeData
-
- this.qcFlags = {
- AcqTimeBtn,
- CollectTimeBtn,
- SampleVolumeBtn,
- XeVolumeBtn,
- GasBgBtn,
- DetBgBtn
+ changeChartByType(val) {
+ if (val==="qc"&&!this.sample.qcFileStatus) {
+ this.$message.warning("No qc spectrum file!")
+ } else {
+ const {
+ betaOriginalData,
+ betaProjectedData,
+ betaEnergyData,
+
+ gammaOriginalData,
+ gammaProjectedData,
+ gammaEnergyData,
+
+ histogramDataList, // 左侧 Beta-Gamma Spectrum: Sample 图表
+ histogramDataDList, // 左侧 Beta-Gamma Spectrum: Sample 图表的3D部分
+ Boundary, // 左侧2d图表的矩形
+
+ XeData, // 右下角Result Display
+ spectrumData,
+
+ AcqTimeBtn, // QC Flags 相关
+ CollectTimeBtn, // QC Flags 相关
+ SampleVolumeBtn, // QC Flags 相关
+ XeVolumeBtn, // QC Flags 相关
+ GasBgBtn, // QC Flags 相关
+ DetBgBtn // QC Flags 相关
+ } = this.sampleDetail[this.spectraType]
+
+ this.spectrumData = spectrumData
+
+ this.histogramDataList = histogramDataList
+ this.histogramDataDList = histogramDataDList
+ this.boundaryList = Boundary
+
+ this.gammaOriginalData = gammaOriginalData
+ this.gammaProjectedData = gammaProjectedData
+ this.gammaEnergyData = gammaEnergyData
+
+ this.betaOriginalData = betaOriginalData
+ this.betaProjectedData = betaProjectedData
+ this.betaEnergyData = betaEnergyData
+
+ this.resultDisplay = XeData
+
+ this.qcFlags = {
+ AcqTimeBtn,
+ CollectTimeBtn,
+ SampleVolumeBtn,
+ XeVolumeBtn,
+ GasBgBtn,
+ DetBgBtn
+ }
}
},
@@ -363,8 +389,13 @@ export default {
},
watch: {
sample: {
- handler() {
- this.getSampleDetail()
+ handler(newVal, oldVal) {
+ console.log("newValnewVal", newVal);
+ if (newVal.sampleId) {
+ this.getSampleDetail()
+ } else {
+ this.getSampleDetail_file()
+ }
},
immediate: true
}
diff --git a/src/views/spectrumAnalysis/components/Modals/LoadFromFileModal.vue b/src/views/spectrumAnalysis/components/Modals/LoadFromFileModal.vue
index cb63499..39562ee 100644
--- a/src/views/spectrumAnalysis/components/Modals/LoadFromFileModal.vue
+++ b/src/views/spectrumAnalysis/components/Modals/LoadFromFileModal.vue
@@ -32,7 +32,7 @@
-
+
diff --git a/src/views/spectrumAnalysis/components/SpectraListInMenu.vue b/src/views/spectrumAnalysis/components/SpectraListInMenu.vue
index d7c59ac..6969a05 100644
--- a/src/views/spectrumAnalysis/components/SpectraListInMenu.vue
+++ b/src/views/spectrumAnalysis/components/SpectraListInMenu.vue
@@ -1,6 +1,6 @@