diff --git a/src/components/CustomModal/index.vue b/src/components/CustomModal/index.vue
index 6927dc4..a463199 100644
--- a/src/components/CustomModal/index.vue
+++ b/src/components/CustomModal/index.vue
@@ -63,8 +63,10 @@ export default {
if (this.okHandler instanceof Function) {
try {
this.confirmLoading = true
- await this.okHandler()
- this.visible = false
+ const success = await this.okHandler()
+ if(success !== false) {
+ this.visible = false
+ }
} catch (error) {
console.error(error)
} finally {
diff --git a/src/views/spectrumAnalysis/components/Modals/AnalyzeSettingModal.vue b/src/views/spectrumAnalysis/components/Modals/AnalyzeSettingModal.vue
index a855d14..cc39cab 100644
--- a/src/views/spectrumAnalysis/components/Modals/AnalyzeSettingModal.vue
+++ b/src/views/spectrumAnalysis/components/Modals/AnalyzeSettingModal.vue
@@ -203,7 +203,7 @@ export default {
} catch (error) {
console.error(error)
} finally {
- throw new Error('Not Close')
+ return false
}
},
},
diff --git a/src/views/spectrumAnalysis/components/Modals/EfficiencyCalibrationModal.vue b/src/views/spectrumAnalysis/components/Modals/EfficiencyCalibrationModal.vue
index 614d4bc..8b94e10 100644
--- a/src/views/spectrumAnalysis/components/Modals/EfficiencyCalibrationModal.vue
+++ b/src/views/spectrumAnalysis/components/Modals/EfficiencyCalibrationModal.vue
@@ -44,7 +44,7 @@
:pagination="false"
size="small"
:class="list.length ? 'has-data' : ''"
- :scroll="{ y: 182 }"
+ :scroll="{ y: 193 }"
:selectedRowKeys.sync="selectedRowKeys"
:canDeselect="false"
@rowClick="handleRowClick"
@@ -116,7 +116,7 @@
import ModalMixin from '@/mixins/ModalMixin'
import TitleOverBorder from '../TitleOverBorder.vue'
import CustomChart from '@/components/CustomChart/index.vue'
-import { getAction, postAction } from '@/api/manage'
+import { getAction, postAction, putAction } from '@/api/manage'
import { cloneDeep } from 'lodash'
import { buildLineSeries } from '@/utils/chartHelper'
import SampleDataMixin from '../../SampleDataMixin'
@@ -573,8 +573,20 @@ export default {
this.getData(item)
},
- handleSetToCurrent() {
+ async handleSetToCurrent() {
this.appliedDataSource = this.currSelectedDataSource
+ try {
+ const { inputFileName: fileName } = this.sampleData
+
+ const { success, message } = await putAction(
+ `/gamma/setCurrentEfficiency?fileName=${fileName}¤tName=${this.currSelectedDataSource}`
+ )
+ if (!success) {
+ this.$message.error(message)
+ }
+ } catch (error) {
+ console.error(error)
+ }
}
}
}
@@ -621,7 +633,7 @@ export default {
&.has-data {
::v-deep {
.ant-table-body {
- height: 182px;
+ height: 193px;
background-color: #06282a;
}
}
@@ -629,7 +641,7 @@ export default {
::v-deep {
.ant-table-placeholder {
- height: 183px;
+ height: 194px;
display: flex;
justify-content: center;
align-items: center;
diff --git a/src/views/spectrumAnalysis/components/Modals/EnergyCalibrationModal.vue b/src/views/spectrumAnalysis/components/Modals/EnergyCalibrationModal.vue
index fd35e5d..0da4f10 100644
--- a/src/views/spectrumAnalysis/components/Modals/EnergyCalibrationModal.vue
+++ b/src/views/spectrumAnalysis/components/Modals/EnergyCalibrationModal.vue
@@ -44,7 +44,7 @@
:pagination="false"
size="small"
:class="list.length ? 'has-data' : ''"
- :scroll="{ y: 182 }"
+ :scroll="{ y: 193 }"
:selectedRowKeys.sync="selectedRowKeys"
:canDeselect="false"
@rowClick="handleRowClick"
@@ -111,7 +111,7 @@
import ModalMixin from '@/mixins/ModalMixin'
import TitleOverBorder from '../TitleOverBorder.vue'
import CustomChart from '@/components/CustomChart/index.vue'
-import { getAction, postAction } from '@/api/manage'
+import { getAction, postAction, putAction } from '@/api/manage'
import { cloneDeep } from 'lodash'
import { buildLineSeries } from '@/utils/chartHelper'
import SampleDataMixin from '../../SampleDataMixin'
@@ -532,8 +532,20 @@ export default {
this.getData(item)
},
- handleSetToCurrent() {
+ async handleSetToCurrent() {
this.appliedDataSource = this.currSelectedDataSource
+ try {
+ const { inputFileName: fileName } = this.sampleData
+
+ const { success, message } = await putAction(
+ `/gamma/setCurrentEnergy?fileName=${fileName}¤tName=${this.currSelectedDataSource}`
+ )
+ if (!success) {
+ this.$message.error(message)
+ }
+ } catch (error) {
+ console.error(error)
+ }
}
}
}
@@ -580,7 +592,7 @@ export default {
&.has-data {
::v-deep {
.ant-table-body {
- height: 182px;
+ height: 193px;
background-color: #06282a;
}
}
@@ -588,7 +600,7 @@ export default {
::v-deep {
.ant-table-placeholder {
- height: 183px;
+ height: 194px;
display: flex;
justify-content: center;
align-items: center;
diff --git a/src/views/spectrumAnalysis/components/Modals/ResolutionCalibrationModal.vue b/src/views/spectrumAnalysis/components/Modals/ResolutionCalibrationModal.vue
index ca12e79..a092112 100644
--- a/src/views/spectrumAnalysis/components/Modals/ResolutionCalibrationModal.vue
+++ b/src/views/spectrumAnalysis/components/Modals/ResolutionCalibrationModal.vue
@@ -44,7 +44,7 @@
:pagination="false"
size="small"
:class="list.length ? 'has-data' : ''"
- :scroll="{ y: 182 }"
+ :scroll="{ y: 193 }"
:selectedRowKeys.sync="selectedRowKeys"
:canDeselect="false"
@rowClick="handleRowClick"
@@ -111,7 +111,7 @@
import ModalMixin from '@/mixins/ModalMixin'
import TitleOverBorder from '../TitleOverBorder.vue'
import CustomChart from '@/components/CustomChart/index.vue'
-import { getAction, postAction } from '@/api/manage'
+import { getAction, postAction, putAction } from '@/api/manage'
import { cloneDeep } from 'lodash'
import { buildLineSeries } from '@/utils/chartHelper'
import SampleDataMixin from '../../SampleDataMixin'
@@ -530,8 +530,20 @@ export default {
this.getData(item)
},
- handleSetToCurrent() {
+ async handleSetToCurrent() {
this.appliedDataSource = this.currSelectedDataSource
+ try {
+ const { inputFileName: fileName } = this.sampleData
+
+ const { success, message } = await putAction(
+ `/gamma/setCurrentResolution?fileName=${fileName}¤tName=${this.currSelectedDataSource}`
+ )
+ if (!success) {
+ this.$message.error(message)
+ }
+ } catch (error) {
+ console.error(error)
+ }
}
}
}
@@ -578,7 +590,7 @@ export default {
&.has-data {
::v-deep {
.ant-table-body {
- height: 182px;
+ height: 193px;
background-color: #06282a;
}
}
@@ -586,7 +598,7 @@ export default {
::v-deep {
.ant-table-placeholder {
- height: 183px;
+ height: 194px;
display: flex;
justify-content: center;
align-items: center;
diff --git a/src/views/spectrumAnalysis/gamma-analysis.vue b/src/views/spectrumAnalysis/gamma-analysis.vue
index bce2a30..b2a957c 100644
--- a/src/views/spectrumAnalysis/gamma-analysis.vue
+++ b/src/views/spectrumAnalysis/gamma-analysis.vue
@@ -90,6 +90,9 @@
/>