diff --git a/src/views/spectrumAnalysis/components/MultiLevelMenu.vue b/src/views/spectrumAnalysis/components/MultiLevelMenu.vue index da1c86d..770ad4b 100644 --- a/src/views/spectrumAnalysis/components/MultiLevelMenu.vue +++ b/src/views/spectrumAnalysis/components/MultiLevelMenu.vue @@ -6,7 +6,7 @@
@@ -22,23 +22,23 @@ export default { props: { children: { type: Array, - default: () => [] + default: () => [], }, width: { type: String, - default: 'auto' - } + default: 'auto', + }, }, methods: { handleMenuClick(item) { - if (!item.children) { - this.$emit('menuClick', item) - } + // if (!item.children) { + this.$emit('menuClick', item) + // } }, handleSubMenuClick(item, child) { this.$emit('submenuClick', { item, child }) - } - } + }, + }, } diff --git a/src/views/spectrumAnalysis/index.vue b/src/views/spectrumAnalysis/index.vue index 23a0180..05014d0 100644 --- a/src/views/spectrumAnalysis/index.vue +++ b/src/views/spectrumAnalysis/index.vue @@ -512,7 +512,7 @@ export default { try { await fetchAndDownload(url, params, 'get') } catch (error) { - console.error(error) + console.error(error) } finally { this.isSaving = false } @@ -637,7 +637,7 @@ export default { }) // 处理当前的谱的reprocessing - if(inputFileName && sampleType !== 'B') { + if (inputFileName && sampleType !== 'B') { this.$refs.gammaAnalysisRef.reProcessing(false) } }, @@ -833,6 +833,23 @@ export default { children: [ { title: 'Save Results to File', + children: [ + { + title: 'Save Txt', + key: 'saveTxt', + show: this.isBetaGamma, + }, + { + title: 'Save Excel', + key: 'saveExcel', + show: this.isBetaGamma, + }, + { + title: 'Save Html', + key: 'saveHtml', + show: this.isBetaGamma, + }, + ], }, { title: 'Save Results to DB', @@ -844,6 +861,7 @@ export default { { title: 'Save All', key: 'all', + show: this.isGamma, }, ], key: 'resultsToDB', @@ -869,13 +887,23 @@ export default { on: { menuClick: () => { console.log(this.isBetaGamma, this.isGamma) - this.saveSettingModalVisible = true + if (this.isGamma) { + this.saveSettingModalVisible = true + } }, submenuClick: ({ item, child }) => { + console.log('item, child', item, child) + debugger if (item.key == 'resultsToDB') { this.handleSaveResultsToDB(child.key) } else if (item.key == 'phdToFile') { this.handleSavePHDToFile(child.key) + } else if (child.key == 'saveTxt') { + this.handleSaveResultsToFile('txt') + } else if (child.key == 'saveExcel') { + this.handleSaveResultsToFile('xls') + } else if (child.key == 'saveHtml') { + this.handleSaveResultsToFile('html') } }, },