From 0f8d019a562c6876fe4b8c9424ffeeebd92a5c04 Mon Sep 17 00:00:00 2001 From: Xu Zhimeng Date: Tue, 17 Oct 2023 10:00:48 +0800 Subject: [PATCH 01/20] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=E9=83=A8?= =?UTF-8?q?=E5=88=86=E9=80=BB=E8=BE=91=E5=92=8C=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../spectrumAnalysis/beta-gamma-analysis.vue | 3 ++- .../AnalyzeInteractiveToolModal/index.vue | 27 ++++++++++++------- src/views/spectrumAnalysis/index.vue | 6 +++-- 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/src/views/spectrumAnalysis/beta-gamma-analysis.vue b/src/views/spectrumAnalysis/beta-gamma-analysis.vue index 7fb98b8..82eda6e 100644 --- a/src/views/spectrumAnalysis/beta-gamma-analysis.vue +++ b/src/views/spectrumAnalysis/beta-gamma-analysis.vue @@ -251,7 +251,6 @@ export default { if (success) { this.sampleDetail = result this.changeChartByType('sample') - this.isLoading = false this.$emit('getFiles', { detFileName: result.detBg.fileName, gasFileName: result.gasBg.fileName, @@ -262,6 +261,8 @@ export default { } } catch (error) { console.error(error) + } finally { + this.isLoading = false } }, async getSampleDetail_file() { diff --git a/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/index.vue b/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/index.vue index 2a42fd6..0c6f33b 100644 --- a/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/index.vue +++ b/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/index.vue @@ -476,7 +476,8 @@ export default { isAccepting: false, isReploting: false, - operationStack: [] // 操作记录 + operationStack: [], // 操作记录 + replotNeeded: false } }, created() { @@ -563,6 +564,7 @@ export default { this.btnGroupType = 1 this.opts.notMerge = false this.isFitting = false + this.replotNeeded = false this.$nextTick(() => { this.option.brush = { toolbox: [] } this.selectedKeys = [] @@ -611,13 +613,12 @@ export default { } } - const selectedRow = this.list[index] - - this.selectedKeys = [selectedRow.index] - - this.getSelPosNuclide(selectedRow) - - this.selectedTableItem = selectedRow + if (this.list.length) { + const selectedRow = this.list[index] + this.selectedKeys = [selectedRow.index] + this.getSelPosNuclide(selectedRow) + this.selectedTableItem = selectedRow + } // 如果点击了Fit按钮 if (this.isFitting) { @@ -1027,6 +1028,7 @@ export default { if (this.btnGroupType == 1) { this.btnGroupType = 2 this.baseCtrls_Copy = cloneDeep(this.BaseCtrls) + this.replotNeeded = false // 供编辑的白色基线 const baseLineEditSeries = buildLineSeries( @@ -1100,6 +1102,7 @@ export default { // 重新生成基线 redrawBaseLine() { + this.replotNeeded = true try { console.time('updateBaseLine') const res = updateBaseLine(JSON.stringify(this.baseCtrls_Copy)) @@ -1117,7 +1120,7 @@ export default { // 重绘Peaks redrawPeaks(peakList) { - this.option.series = this.option.series.filter((item) => { + this.option.series = this.option.series.filter(item => { return !item.name.includes('Peak_') }) this.option.series.push(...this.buildPeaks(peakList)) @@ -1257,13 +1260,16 @@ export default { // 将原先的基线和控制点移动到新位置 async handleReplot() { + if (!this.replotNeeded) { + return + } try { const { inputFileName: fileName } = this.sampleData this.isReploting = true const { success, result, message } = await postAction('/gamma/replotBaseLine', { ...this.baseCtrls_Copy, fileName, - replotNeeded: true + replotNeeded: this.replotNeeded }) if (success) { const { chartData, peakSet, shapeData } = result @@ -1295,6 +1301,7 @@ export default { }) this.BaseCtrls = cloneDeep(this.baseCtrls_Copy) + this.replotNeeded = false } else { this.$message.error(message) } diff --git a/src/views/spectrumAnalysis/index.vue b/src/views/spectrumAnalysis/index.vue index e0a0afa..d1b5a9f 100644 --- a/src/views/spectrumAnalysis/index.vue +++ b/src/views/spectrumAnalysis/index.vue @@ -794,6 +794,7 @@ export default { key: 'all', }, ], + key: 'resultsToDB' }, { title: 'Save PHD to File', @@ -807,6 +808,7 @@ export default { key: 'all', }, ], + key: 'phdToFile' }, ], width: '170px', @@ -817,9 +819,9 @@ export default { this.saveSettingModalVisible = true }, submenuClick: ({ item, child }) => { - if (item.title == 'Save Results to DB') { + if (item.key == 'resultsToDB') { this.handleSaveResultsToDB(child.key) - } else if (item.title == 'Save PHD to File') { + } else if (item.key == 'phdToFile') { this.handleSavePHDToFile(child.key) } }, From 83d3da81adb407d246ef2c147dae07b66b06056c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=BB=E7=8F=AE=E5=AE=87?= Date: Tue, 17 Oct 2023 14:35:56 +0800 Subject: [PATCH 02/20] =?UTF-8?q?gamma=20File-Format-Ftransit=20=E5=BC=B9?= =?UTF-8?q?=E7=AA=97=E4=B8=ADSpectrum=20Transfer=20=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E5=89=8D=E7=AB=AF=E4=BB=A3=E7=A0=81=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/CanberraIECImsTransfer.vue | 42 +++++++++++++++++-- .../components/IntSpcImsTransfer.vue | 42 +++++++++++++++++-- 2 files changed, 78 insertions(+), 6 deletions(-) diff --git a/src/views/spectrumAnalysis/components/Modals/FtransltModal/components/CanberraIECImsTransfer.vue b/src/views/spectrumAnalysis/components/Modals/FtransltModal/components/CanberraIECImsTransfer.vue index 26c9c6f..0249d07 100644 --- a/src/views/spectrumAnalysis/components/Modals/FtransltModal/components/CanberraIECImsTransfer.vue +++ b/src/views/spectrumAnalysis/components/Modals/FtransltModal/components/CanberraIECImsTransfer.vue @@ -100,16 +100,24 @@
-
Canberra IEC1455(.IEC)
+
+ +
Canberra IEC1455(.IEC)
+
+
Data type
-
IMS .ims .rms
+
+ +
IMS .ims .rms
+
+
- +
@@ -137,8 +145,32 @@ export default { backgroundMea: '0', transmitTime: moment(new Date()).format('YYYY/MM/DD HH:mm:ss'), }, + dataSource: [], + targetKeys: [], } }, + methods: { + ortecBeforeUpload(file, fileList) { + console.log(file, fileList) + this.dataSource = fileList.map((item) => { + return { + key: item.uid, + title: item.name, + } + }) + }, + imsBeforeUpload(file, fileList) { + console.log(file, fileList) + let arr = fileList.map((item) => { + return { + key: item.uid, + title: item.name, + } + }) + this.targetKeys = arr.map((item) => item.key) + this.dataSource.push(...arr) + }, + }, } @@ -239,6 +271,10 @@ export default { background-color: #225a6a; height: 32px; line-height: 32px; + /deep/.ant-upload { + width: 100%; + cursor: pointer; + } } } diff --git a/src/views/spectrumAnalysis/components/Modals/FtransltModal/components/IntSpcImsTransfer.vue b/src/views/spectrumAnalysis/components/Modals/FtransltModal/components/IntSpcImsTransfer.vue index bc4f7e9..5a2ff6a 100644 --- a/src/views/spectrumAnalysis/components/Modals/FtransltModal/components/IntSpcImsTransfer.vue +++ b/src/views/spectrumAnalysis/components/Modals/FtransltModal/components/IntSpcImsTransfer.vue @@ -100,16 +100,24 @@
-
ORTEC int.spc
+
+ +
ORTEC int.spc
+
+
Data type
-
IMS .ims .rms
+
+ +
IMS .ims .rms
+
+
- +
@@ -137,8 +145,32 @@ export default { backgroundMea: '0', transmitTime: moment(new Date()).format('YYYY/MM/DD HH:mm:ss'), }, + dataSource: [], + targetKeys: [], } }, + methods: { + ortecBeforeUpload(file, fileList) { + console.log(file, fileList) + this.dataSource = fileList.map((item) => { + return { + key: item.uid, + title: item.name, + } + }) + }, + imsBeforeUpload(file, fileList) { + console.log(file, fileList) + let arr = fileList.map((item) => { + return { + key: item.uid, + title: item.name, + } + }) + this.targetKeys = arr.map((item) => item.key) + this.dataSource.push(...arr) + }, + }, } @@ -239,6 +271,10 @@ export default { background-color: #225a6a; height: 32px; line-height: 32px; + /deep/.ant-upload { + width: 100%; + cursor: pointer; + } } } From f0dc11679319122a5f9999644042b55095db65ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=BB=E7=8F=AE=E5=AE=87?= Date: Tue, 17 Oct 2023 15:15:42 +0800 Subject: [PATCH 03/20] =?UTF-8?q?beta=20=E6=A8=A1=E5=9D=97=20view=20ARR=20?= =?UTF-8?q?=E5=92=8C=20Automatic=20Analysis=20Log=20=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E6=9D=83=E9=99=90=EF=BC=8C=E5=8F=8A=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/spectrumAnalysis/index.vue | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/views/spectrumAnalysis/index.vue b/src/views/spectrumAnalysis/index.vue index d1b5a9f..35ca69e 100644 --- a/src/views/spectrumAnalysis/index.vue +++ b/src/views/spectrumAnalysis/index.vue @@ -794,7 +794,7 @@ export default { key: 'all', }, ], - key: 'resultsToDB' + key: 'resultsToDB', }, { title: 'Save PHD to File', @@ -808,7 +808,7 @@ export default { key: 'all', }, ], - key: 'phdToFile' + key: 'phdToFile', }, ], width: '170px', @@ -1077,12 +1077,16 @@ export default { { type: 'a-menu-item', title: 'View ARR', - handler: () => { - this.arrOrRRRModalVisible = true - this.arrOrRRRModalExtraData = {} - this.arrOrRRRModalType = 3 - }, show: this.isBetaGamma, + handler: () => { + if (this.newSampleData.sampleId) { + this.arrOrRRRModalVisible = true + this.arrOrRRRModalExtraData = {} + this.arrOrRRRModalType = 3 + } else { + this.$message.warning("The file isn't existed.") + } + }, }, { type: 'a-menu-item', @@ -1141,16 +1145,13 @@ export default { title: 'Automatic Analysis Log', show: this.isBetaGamma || this.isGamma, handler: () => { - if (this.isGamma) { + if (this.isBetaGamma || this.isGamma) { if (this.newSampleData.sampleId) { this.autoAnalysisMogModalType = this.isGamma ? 1 : this.isBetaGamma ? 2 : 1 this.autoAnalysisMogModalVisible = true } else { this.$message.warning("The file isn't existed.") } - } else if (this.isBetaGamma) { - this.autoAnalysisMogModalType = this.isGamma ? 1 : this.isBetaGamma ? 2 : 1 - this.autoAnalysisMogModalVisible = true } }, }, From d2878ecd36462c1bbdbbdcf14628b3ad1d277f4d Mon Sep 17 00:00:00 2001 From: Xu Zhimeng Date: Tue, 17 Oct 2023 15:25:53 +0800 Subject: [PATCH 04/20] =?UTF-8?q?feat:=20Strip=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modals/CompareFileListModal.vue | 30 ++------- .../components/Modals/StripModal.vue | 36 +++++++--- src/views/spectrumAnalysis/gamma-analysis.vue | 67 +++++++++++++++---- src/views/spectrumAnalysis/index.vue | 14 +--- 4 files changed, 91 insertions(+), 56 deletions(-) diff --git a/src/views/spectrumAnalysis/components/Modals/CompareFileListModal.vue b/src/views/spectrumAnalysis/components/Modals/CompareFileListModal.vue index b49e6ec..de8c912 100644 --- a/src/views/spectrumAnalysis/components/Modals/CompareFileListModal.vue +++ b/src/views/spectrumAnalysis/components/Modals/CompareFileListModal.vue @@ -12,7 +12,7 @@ @change="handleTableChange" >
- Compare + Ok Cancel
@@ -22,7 +22,6 @@ import { getAction } from '@/api/manage' import { JeecgListMixin } from '@/mixins/JeecgListMixin' import ModalMixin from '@/mixins/ModalMixin' -import SampleDataMixin from '../../SampleDataMixin' const columns = [ { @@ -56,7 +55,7 @@ const formItems = [ ] export default { - mixins: [ModalMixin, JeecgListMixin, SampleDataMixin], + mixins: [ModalMixin, JeecgListMixin], data() { this.columns = columns this.formItems = formItems @@ -64,8 +63,7 @@ export default { return { queryParam: {}, selectedRowKeys: [], - selectionRows: [], - isComparing: false + selectionRows: [] } }, methods: { @@ -109,27 +107,9 @@ export default { this.$message.warn('Please Select A File to Compare') return } - try { - const { inputFileName: fileName } = this.sampleData - const compareFileName = this.selectionRows[0].name - this.isComparing = true - - const { success, result, message } = await getAction('/gamma/Compare', { - fileName, - compareFileName - }) - if (success) { - this.visible = false - this.$emit('compareWithFile', result) - } else { - this.$message.error(message) - } - } catch (error) { - console.error(error) - } finally { - this.isComparing = false - } + this.$emit('fileSelect', this.selectionRows[0].name) + this.visible = false } } } diff --git a/src/views/spectrumAnalysis/components/Modals/StripModal.vue b/src/views/spectrumAnalysis/components/Modals/StripModal.vue index f5cc095..f340871 100644 --- a/src/views/spectrumAnalysis/components/Modals/StripModal.vue +++ b/src/views/spectrumAnalysis/components/Modals/StripModal.vue @@ -1,25 +1,45 @@ From 52e360eca5e30cf310dfbf35351dc388a26f1ea8 Mon Sep 17 00:00:00 2001 From: Xu Zhimeng Date: Wed, 18 Oct 2023 17:59:53 +0800 Subject: [PATCH 12/20] =?UTF-8?q?feat:=20=E5=AF=B9=E6=8E=A5=E5=88=86?= =?UTF-8?q?=E6=9E=90=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BetaGammaExtrapolationModal.vue | 199 +++++++++++++----- 1 file changed, 147 insertions(+), 52 deletions(-) diff --git a/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BetaGammaExtrapolationModal.vue b/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BetaGammaExtrapolationModal.vue index 62837f1..6f7ebb9 100644 --- a/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BetaGammaExtrapolationModal.vue +++ b/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BetaGammaExtrapolationModal.vue @@ -89,16 +89,18 @@
Gamma Window Setting
Gamma Window Begin:
- Channel + + Channel
Gamma Window End:
- Channel + + Channel
Parameter Setting
Min of Energy:
- keV + keV
Half Life:
Day
@@ -106,16 +108,16 @@
Function of Fitting
- - Linear - 2-polynomial + + Linear + 2-polynomial
- Analyse + Analyse Exit
@@ -133,8 +135,10 @@ :class="tableList.length ? 'has-data' : ''" :scroll="{ y: 101 }" > - diff --git a/src/views/spectrumAnalysis/components/Modals/FtransltModal/components/IntSpcImsTransfer.vue b/src/views/spectrumAnalysis/components/Modals/FtransltModal/components/IntSpcImsTransfer.vue index 5a2ff6a..00e85b4 100644 --- a/src/views/spectrumAnalysis/components/Modals/FtransltModal/components/IntSpcImsTransfer.vue +++ b/src/views/spectrumAnalysis/components/Modals/FtransltModal/components/IntSpcImsTransfer.vue @@ -3,10 +3,10 @@
- + - + @@ -14,7 +14,7 @@ show-time format="YYYY/MM/DD HH:mm:ss" valueFormat="YYYY/MM/DD HH:mm:ss" - v-model="intSpacImsParams.startTime" + v-model="params.collect_start" /> @@ -22,12 +22,12 @@ show-time format="YYYY/MM/DD HH:mm:ss" valueFormat="YYYY/MM/DD HH:mm:ss" - v-model="intSpacImsParams.stopTime" + v-model="params.collect_stop" />

Total air volume sampled

- +
@@ -35,43 +35,43 @@
- + Designator
- +
- + Station code
- +
- + Detector code
- +
- + Sample geometry
- +
- + P G B - + PREL FULL @@ -80,44 +80,27 @@

Sample reference identification

- +

Background measurement identification

- +
- Transmit time + Transmit time
-
-
- -
ORTEC int.spc
-
-
-
- Data type -
- -
-
-
- -
IMS .ims .rms
-
-
-
- +
@@ -125,50 +108,58 @@ + + \ No newline at end of file diff --git a/src/views/spectrumAnalysis/components/Modals/FtransltModal/index.vue b/src/views/spectrumAnalysis/components/Modals/FtransltModal/index.vue index 9323783..7f5a87b 100644 --- a/src/views/spectrumAnalysis/components/Modals/FtransltModal/index.vue +++ b/src/views/spectrumAnalysis/components/Modals/FtransltModal/index.vue @@ -1,5 +1,5 @@