diff --git a/src/components/CustomChart/index.vue b/src/components/CustomChart/index.vue
index d568449..bc36294 100644
--- a/src/components/CustomChart/index.vue
+++ b/src/components/CustomChart/index.vue
@@ -6,7 +6,7 @@ import * as echarts from 'echarts'
import 'echarts-gl'
const events = ['click', 'brushEnd']
-const zrEvents = ['mousemove', 'mousedown', 'mouseup', 'click']
+const zrEvents = ['mousemove', 'mousedown', 'mouseup', 'click', 'dblclick']
export default {
props: {
option: {
diff --git a/src/utils/number.js b/src/utils/number.js
new file mode 100644
index 0000000..19df3b6
--- /dev/null
+++ b/src/utils/number.js
@@ -0,0 +1,10 @@
+import { isNullOrUndefined } from './util'
+
+/**
+ * 保留小数
+ * @param { string | number } num 数字
+ * @param { number } digit 保留位数
+ */
+export const toFixed = (num, digit) => {
+ return isNullOrUndefined(num) ? '' : Number(num).toFixed(digit)
+}
diff --git a/src/views/spectrumAnalysis/beta-gamma-analysis.vue b/src/views/spectrumAnalysis/beta-gamma-analysis.vue
index 6932644..072e3dc 100644
--- a/src/views/spectrumAnalysis/beta-gamma-analysis.vue
+++ b/src/views/spectrumAnalysis/beta-gamma-analysis.vue
@@ -11,7 +11,13 @@
QC Flags
-
+
@@ -353,12 +359,11 @@ export default {
// 重新分析,设置右侧折线图的Energy
reanalyse([type, data]) {
const energy = data.map(item => [item.y])
- if(type == 'gamma') {
+ if (type == 'gamma') {
this.gammaEnergyData = energy
} else {
this.betaEnergyData = energy
}
-
}
},
watch: {
@@ -386,6 +391,15 @@ export default {
}
}
+ .sample-select {
+ ::v-deep {
+ .ant-select-selection {
+ background-color: transparent !important;
+ color: #ade6ee;
+ }
+ }
+ }
+
&-main {
height: calc(100% - 51px);
display: flex;
diff --git a/src/views/spectrumAnalysis/components/Modals/ArrRrrModal.vue b/src/views/spectrumAnalysis/components/Modals/ArrRrrModal.vue
index 46d0c17..cf4f1b5 100644
--- a/src/views/spectrumAnalysis/components/Modals/ArrRrrModal.vue
+++ b/src/views/spectrumAnalysis/components/Modals/ArrRrrModal.vue
@@ -1,5 +1,5 @@
-
+
{{ content }}
@@ -113,7 +113,7 @@ export default {
diff --git a/src/views/spectrumAnalysis/gamma-analysis.vue b/src/views/spectrumAnalysis/gamma-analysis.vue
index ee7ec4a..0cdd518 100644
--- a/src/views/spectrumAnalysis/gamma-analysis.vue
+++ b/src/views/spectrumAnalysis/gamma-analysis.vue
@@ -50,6 +50,7 @@
:option="option"
:opts="opts"
@zr:click="handleChartClick"
+ @zr:dblclick="handleChartDblClick"
@zr:mousedown="handleMouseDown"
@zr:mouseup="handleMouseUp"
@brushEnd="handleBrushEnd"
@@ -614,10 +615,10 @@ export default {
this.thumbnailOption.series[0].symbol = 'none'
break
case 'Scatter':
- this.option.series[0].type = 'scatter'
+ this.option.series[0].type = 'scatterGL'
this.option.series[0].symbol = 'circle'
- this.thumbnailOption.series[0].type = 'scatter'
+ this.thumbnailOption.series[0].type = 'scatterGL'
this.thumbnailOption.series[0].symbol = 'circle'
break
}
@@ -727,6 +728,11 @@ export default {
}
},
+ // 双击还原
+ handleChartDblClick() {
+ this.handleReset()
+ },
+
// 获取 Nuclide Library 数据
async getSelPosNuclide(channel) {
this.currChannel = channel
diff --git a/src/views/spectrumAnalysis/index.vue b/src/views/spectrumAnalysis/index.vue
index 88e350d..16cfffe 100644
--- a/src/views/spectrumAnalysis/index.vue
+++ b/src/views/spectrumAnalysis/index.vue
@@ -104,10 +104,7 @@
-
+
@@ -127,11 +124,7 @@
-
+
@@ -153,10 +146,7 @@
-
+
@@ -190,9 +180,7 @@
-
+
@@ -235,6 +223,7 @@ import BetaGammaEnergyCalibrationModal from './components/Modals/BetaGammaModals
import StripModal from './components/Modals/StripModal.vue'
import AutomaticAnalysisLogModal from './components/Modals/BetaGammaModals/AutomaticAnalysisLogModal.vue'
import BetaGammaExtrapolationModal from './components/Modals/BetaGammaModals/BetaGammaExtrapolationModal.vue'
+import { getAction } from '@/api/manage'
// 分析类型
const ANALYZE_TYPE = {
@@ -384,10 +373,10 @@ export default {
},
handleLoadSampleFromFile(sampleList) {
let arr = sampleList.filter(item => {
- return Object.keys(item).length>4
+ return Object.keys(item).length > 4
})
arr.forEach(item => {
- item.sampleId = ""
+ item.sampleId = ''
item.inputFileName = item.sampleFileName
item.sampleType = item.sampleSystemType
})
@@ -424,8 +413,28 @@ export default {
* 保存结果到数据库
* @param { 'all' | 'current' } type
*/
- handleSaveResultsToDB(type) {
+ async handleSaveResultsToDB(type) {
console.log('%c [ saveResultsToDB ]-157', 'font-size:13px; background:pink; color:#bf2c9f;', type)
+ if (this.isBetaGamma) {
+ } else if (this.isGamma) {
+ if (type == 'current') {
+ const hideLoading = this.$message.loading('Saving...', 0)
+ try {
+ const { success, message } = await getAction('/gamma/saveToDB', {
+ fileName: this.sampleData.inputFileName
+ })
+ if (success) {
+ this.$message.success('Save Success')
+ } else {
+ this.$message.error(message)
+ }
+ } catch (error) {
+ console.error(error)
+ } finally {
+ hideLoading()
+ }
+ }
+ }
},
/**
@@ -906,7 +915,7 @@ export default {
type: 'a-menu-item',
title: 'Automatic Analysis Log',
handler: () => {
- this.autoAnalysisMogModalType = this.isGamma?1:this.isBetaGamma?2:1
+ this.autoAnalysisMogModalType = this.isGamma ? 1 : this.isBetaGamma ? 2 : 1
this.autoAnalysisMogModalVisible = true
}
},