From c414e66e2bb288cfb8912c4a2047aada401391fc Mon Sep 17 00:00:00 2001 From: he-zhi-cheng <2753731935@qq.com> Date: Thu, 18 Sep 2025 17:23:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E6=94=B9=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E5=87=BA=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src-tauri/config.json | 2 +- src/DataView/APPDataview.vue | 23 +- src/DataView/assets/加载失败.svg | 1 + src/DataView/menuvue/menubar.vue | 63 ++- src/DataView/vuecomponents/GuiForDataShow.vue | 117 ++++- src/DataView/vuecomponents/GuiForPlotShow.vue | 275 ++++++++--- src/DataView/vuecomponents/GuiLeftSider.vue | 104 +++- src/DataView/vuecomponents/MapContainer.vue | 17 +- src/components/menubar.vue | 36 +- src/utils/irisDataDispose.js | 444 ++++++++++-------- src/utils/spectralDataService.js | 24 +- 11 files changed, 794 insertions(+), 312 deletions(-) create mode 100644 src/DataView/assets/加载失败.svg diff --git a/src-tauri/config.json b/src-tauri/config.json index d0a3e2b..a830e05 100644 --- a/src-tauri/config.json +++ b/src-tauri/config.json @@ -1 +1 @@ -{"pathofsave":null,"Filename":"testaa","caijiavgNumber":"1","useSG":false,"usehighpass":false,"Dispatcher":{"isenable":true,"begin":"06:25","end":"23:59"},"sensor_typeforset":"IRIS-IS11"} \ No newline at end of file +{"pathofsave":null,"Filename":"testaa","caijiavgNumber":"1","useSG":false,"usehighpass":false,"Dispatcher":{"isenable":true,"begin":"09:28","end":"23:59"},"sensor_typeforset":"IS11"} \ No newline at end of file diff --git a/src/DataView/APPDataview.vue b/src/DataView/APPDataview.vue index b45b53f..fc77f6b 100644 --- a/src/DataView/APPDataview.vue +++ b/src/DataView/APPDataview.vue @@ -13,7 +13,7 @@ @@ -36,6 +36,7 @@ import GuiForDataShow from './vuecomponents/GuiForDataShow.vue'; import GuiLeftSider from './vuecomponents/GuiLeftSider.vue'; import SaveFileDialog from './vuecomponents/SaveFileDialog.vue'; import { fs } from '@tauri-apps/api'; +import { ElMessage } from 'element-plus'; export default { name: 'APPDataview', @@ -171,7 +172,7 @@ export default { await fs.copyFile(file.path, targetPath) } - this.$message.success(`成功保存 ${files.length} 个文件到 ${location}`) + ElMessage.success(`成功保存 ${files.length} 个文件到 ${location}`) } catch (error) { console.error('保存文件失败:', error) alert('保存文件失败: ' + error.message) @@ -182,13 +183,21 @@ export default { handleCancelSave() { this.showSaveDialog = false this.filesToSave = [] - } + }, + async openCurveSaveDialogForSelectedFiles() { + const paths = (this.selectedFilePaths && this.selectedFilePaths.length > 0) + ? this.selectedFilePaths + : (this.selectedFilePath ? [this.selectedFilePath] : []); + + if (!paths.length) { + alert('请先选择一个或多个文件后再导出'); + return; + } + + this.$refs.GuiForDataShow.openSaveCurveDialogByPaths(paths); + }, }, - - - } -