瀏覽代碼

Merge remote-tracking branch 'origin/dev-frontend'

panqiuyao 8 月之前
父節點
當前提交
18dff846b2

+ 1 - 0
electron/controller/utils.js

@@ -35,6 +35,7 @@ class UtilsController extends Controller {
    * upload
    */
   async shellFun (params) {
+    console.log(params)
     shell[params.action](params.params)
   }
 

+ 1 - 1
frontend/src/composables/userCheck.ts

@@ -6,7 +6,7 @@ export function useCheckInfo() {
             ShowError()
         }
         window.addEventListener('storage',(e)=>{
-            if(e.key === 'check' && e.newValue === false && e.oldValue === true){
+            if(e.key === 'check' && e.newValue === 'false' && e.oldValue === 'true'){
                 ShowError()
             }
         })

+ 16 - 0
frontend/src/views/Home/index.vue

@@ -50,6 +50,7 @@
     <el-button type="info"  @click="connect_mcu__init">MCU初始化</el-button>
     <el-button type="info"  @click="connect_bluetooth">连接蓝牙</el-button>
     <el-button @click="socketDisconnect">socket 断开</el-button>
+    <el-button type="info"  @click="openFilePath">打开文件夹</el-button>
     <router-link
         class="mar-left-10"
         :to="{
@@ -267,6 +268,21 @@ async function connect_mcu__init(){
 }
 
 
+const openFilePath = () => {
+  // 这里可以添加打开目录的逻辑
+  /*
+  *
+  * E:\顶层\221
+  * */
+  clientStore.ipc.removeAllListeners(icpList.utils.shellFun);
+  let params = {
+    action: 'openPath',
+    params: paramsKey.value.replaceAll('/','\\')
+  }
+  clientStore.ipc.send(icpList.utils.shellFun, params);
+}
+
+
 
 async function connect_bluetooth(){
 

+ 1 - 2
frontend/src/views/Photography/detail.vue

@@ -448,11 +448,10 @@ function openPhotographySeniorDetail() {
 const handleComplete = () => {
   loadingDialogVisible.value = false
   // 这里可以添加打开目录的逻辑
-  clientStore.ipc.removeAllListeners(icpList.utils.openDirectory);
   clientStore.ipc.removeAllListeners(icpList.utils.shellFun);
   let params = {
     action: 'openPath',
-    params: completeDirectory.value
+    params: completeDirectory.value?.replaceAll('/','\\')
   }
   clientStore.ipc.send(icpList.utils.shellFun, params);
 }