浏览代码

Merge remote-tracking branch 'origin/anheng' into anheng

rambo 5 小时之前
父节点
当前提交
7308fad84c

+ 1 - 1
electron/preload/index.js

@@ -13,5 +13,5 @@ module.exports = async () => {
   Addon.get("security").create();
   Addon.get("awaken").create();
   Addon.get("autoUpdater").create();
-   Services.get("cross").createPythonServer();
+  Services.get("cross").createPythonServer();
 };

+ 3 - 3
electron/utils/socket.js

@@ -27,9 +27,9 @@ const typeToMessage = {
   scene_progress:"PhotographyDetail",
   upload_goods_progress:"PhotographyDetail",
   detail_result_progress:"PhotographyDetail",
-  "get_dynamic_config":"seeting",
-  "set_dynamic_config":"seeting",
-  "get_dynamic_config_signle":"seeting"
+  "get_dynamic_config":"advancedConfig",
+  "set_dynamic_config":"advancedConfig",
+  "get_dynamic_config_signle":"advancedConfig"
 }
 
 // MCU 错误日志配置(从 config 读取,默认100条)

+ 21 - 2
frontend/src/components/header-bar/index.vue

@@ -239,14 +239,16 @@ const menuType = reactive({
   },
   developer: {
     name: '初始设备调频设置',
-    icon: iconsz,
     click: openDeveloper
   },
   oneDataSet: {
     name: '任一参数下发',
-    icon: iconsz,
     click: openOneDataSet
   },
+  advancedConfig: {
+    name: '高级设置',
+    click: openAdvancedConfig
+  },
   ota: {
     name: '当前版本:'+currentVersion.value,
     click: openOTA
@@ -348,6 +350,23 @@ function openOneDataSet() {
   clientStore.ipc.send(icpList.utils.openMain, params)
 }
 
+function openAdvancedConfig() {
+  const { href } = Router.resolve({
+    name: 'advancedConfig'
+  })
+
+  clientStore.ipc.removeAllListeners(icpList.utils.openMain)
+  let params = {
+    title: '高级设置',
+    width: 1200,
+    height: 800,
+    frame: true,
+    id: 'advancedConfig',
+    url: getRouterUrl(href)
+  }
+  clientStore.ipc.send(icpList.utils.openMain, params)
+}
+
 function openOTA() {
   const { href } = Router.resolve({
     name: 'ota'

+ 8 - 0
frontend/src/router/index.ts

@@ -112,6 +112,14 @@ const routes: RouteRecordRaw[] = [
             title: '任一参数下发'
         }
     },
+    {
+        path: "/developer/advanced",
+        name: "advancedConfig",
+        component: () => import("@/views/Developer/advanced.vue"),
+        meta: {
+            title: '高级设置'
+        }
+    },
     ...tpl,
     ...otaRoutes,
 ];

+ 17 - 0
frontend/src/views/Developer/advanced.vue

@@ -0,0 +1,17 @@
+<template>
+  <div class="advanced-page">
+    <AdvancedConfig />
+  </div>
+</template>
+
+<script setup lang="ts">
+import AdvancedConfig from '@/views/Setting/components/AdvancedConfig.vue'
+</script>
+
+<style scoped>
+.advanced-page {
+  height: 100vh;
+  overflow: auto;
+  background: #f5f7fa;
+}
+</style>

+ 4 - 1
frontend/src/views/Photography/check.vue

@@ -227,7 +227,10 @@ const menu = computed(() => {
           },
           {
             type: 'oneDataSet'
-          }
+          },
+          ...(useUserInfoStore.isHLM && configInfoStore.appModel === 1
+            ? [{ type: 'advancedConfig' }]
+            : [])
         ]
       },
       outputDirMenu

+ 4 - 1
frontend/src/views/Photography/mixin/usePhotography.ts

@@ -719,7 +719,10 @@ export default function usePhotography() {
               },
               {
                 type: 'oneDataSet'
-              }
+              },
+              ...(useUserInfoStore.isHLM && configInfoStore.appModel === 1
+                ? [{ type: 'advancedConfig' }]
+                : [])
             ]
           },
           generateMenu,

+ 1 - 1
frontend/src/views/Setting/components/AdvancedConfig.vue

@@ -284,7 +284,7 @@ $text-secondary: #909399;
 
 .advanced-config-wrap {
   padding: 0;
-  min-height: calc(100vh - 120px);
+  min-height: 100vh;
   border-radius: 8px;
 }
 

+ 2 - 25
frontend/src/views/Setting/index.vue

@@ -25,11 +25,6 @@
         <img src="@/assets/images/setting/icon4a.png" class="nav-icon" v-else/>
         <span>左右脚程序设置</span>
       </div>
-      <div class="nav-item" v-if="userInfoStore.isHLM && configInfoStore.appModel === 1" :class="{'active': activeIndex === 5}" @click="toggleTab(5)" v-log="{ describe: { action: '点击切换设置Tab', tab: '高级设置' } }">
-        <img src="@/assets/images/setting/icon1.png" class="nav-icon" v-if="activeIndex !== 5"/>
-        <img src="@/assets/images/setting/icon1a.png" class="nav-icon" v-else/>
-        <span>高级设置</span>
-      </div>
     </nav>
 
     <div class="form-container">
@@ -218,12 +213,9 @@
             <actionConfig/>
 
           </div>
-          <div v-if="activeIndex === 5">
-            <AdvancedConfig />
-          </div>
     </div>
       <div class="text-center mt-8">
-        <button class="bg-gradient-to-r from-primary" @click="onSava(activeIndex)" v-if="activeIndex !== 4 && activeIndex !== 5" v-log="{ describe: { action: '点击保存设置', tabIndex: activeIndex } }">
+        <button class="bg-gradient-to-r from-primary" @click="onSava(activeIndex)" v-if="activeIndex !== 4" v-log="{ describe: { action: '点击保存设置', tabIndex: activeIndex } }">
           保存
         </button>
       </div>
@@ -255,7 +247,6 @@ import { preview } from '@planckdev/element-plus/utils'
 import actionConfig from './components/action_config.vue'
 import otherConfig from './components/otherConfig'
 import CameraConfig from './components/CameraConfig';
-import AdvancedConfig from './components/AdvancedConfig.vue';
 import useUserInfo from '@/stores/modules/user';
 useCheckInfo();
 
@@ -543,15 +534,6 @@ const getConfig =  async (typeValue)=>{
   }
 
 }
-/**
- * 组件挂载时初始化activeIndex。
- */
-watch(() => userInfoStore.isHLM, (on) => {
-  if (!on && activeIndex.value === 5) {
-    activeIndex.value = 0
-  }
-})
-
 onMounted(async () => {
   // 确保用户信息已加载,特别是 brand_company_code 字段
   if (!userInfoStore.userInfo?.brand_company_code) {
@@ -629,7 +611,7 @@ const updateCameraConfigs = (configs) => {
 
 const toggleTab = async (item) => {
   const oldType = activeIndex.value;
-  // 切换前保存当前 Tab 配置(包含相机配置 3),高级设置(5)有独立保存逻辑,跳过自动保存
+  // 切换前保存当前 Tab 配置(包含相机配置 3)
   if ([0,1,2,3].includes(oldType)) {
     const next = await saveSetting(oldType);
     if (next === false) return false;
@@ -639,11 +621,6 @@ const toggleTab = async (item) => {
 };
 
 const onSava = async (index)=>{
-  // 高级设置(5)有独立保存逻辑
-  if (index === 5) {
-    ElMessage.info('请在高级设置中使用保存按钮保存');
-    return;
-  }
   const next =  await  saveSetting(index)
 
   if(next !== false){

+ 1 - 1
public/dist/index.html

@@ -5,7 +5,7 @@
     <link rel="icon" type="image/svg+xml" href="./vite.svg" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
     <title>智惠映AI自动拍照机</title>
-    <script type="module" crossorigin src="./assets/index-BzDVIlAS.js"></script>
+    <script type="module" crossorigin src="./assets/index-CwgzGZdA.js"></script>
     <link rel="stylesheet" crossorigin href="./assets/index-CUtW5LTp.css">
   </head>
   <body>