Przeglądaj źródła

Merge branch 'master' of http://gitlab.pubdata.cn/liangyibo/CameraMachine

rambo 8 miesięcy temu
rodzic
commit
4e0b239793

+ 17 - 0
electron/api/generate.js

@@ -0,0 +1,17 @@
+const { post,get } = require('./request')
+
+module.exports = {
+  // 生成主图详情页
+  generatePhotoDetail(data){
+    console.log('generatePhotoDetail')
+    console.log(data)
+    return post({
+      url: '/handle_detail',
+      data: data,
+      headers:{
+        'Content-Type':"application/json",
+      }
+    })
+  }
+
+}

+ 6 - 5
electron/config/builder.json

@@ -1,13 +1,14 @@
 {
-  "productName": "ee",
-  "appId": "com.electron.ee",
-  "copyright": "© 2025 哆啦好梦 Technology Co., Ltd.",
+  "productName": "ZhiHuiYin",
+  "appId": "valimart",
+  "copyright": "valimart",
   "directories": {
     "output": "out"
   },
   "asar": true,
   "files": [
     "**/*",
+    "dev-app-update.yml",
     "!frontend/",
     "!run/",
     "!logs/",
@@ -28,7 +29,7 @@
     "installerHeaderIcon": "build/icons/icon.ico",
     "createDesktopShortcut": true,
     "createStartMenuShortcut": true,
-    "shortcutName": "EE框架"
+    "shortcutName": "智惠映AI自动拍照机"
   },
   "publish": [
     {
@@ -59,4 +60,4 @@
     ],
     "category": "Utility"
   }
-}
+}

+ 2 - 2
electron/config/config.default.js

@@ -35,7 +35,7 @@ module.exports = (appInfo) => {
       webSecurity: false,
       contextIsolation: false, // false -> 可在渲染进程中使用electron的api,true->需要bridge.js(contextBridge)
       nodeIntegration: true,
-      preload: path.join(appInfo.baseDir, 'preload', 'bridge.js'),
+     // preload: path.join(appInfo.baseDir, 'preload', 'bridge.js'),
     },
     show: false,
     icon: path.join(appInfo.home, 'public', 'images', 'logo-32.png'),
@@ -173,7 +173,7 @@ module.exports = (appInfo) => {
     },
     tray: {
       enable: true,
-      title: "EE程序",
+      title: "智惠映AI自动拍照机",
       icon: "/public/images/tray.png",
     },
     security: {

+ 1 - 1
electron/config/config.local.js

@@ -60,7 +60,7 @@ module.exports = (appInfo) => {
    * 远程模式-web地址
    */
   config.remoteUrl = {
-    enable: true,
+    enable: false,
     url: 'http://localhost:3000/home'
   };
 

+ 23 - 2
electron/controller/camera.js

@@ -6,7 +6,7 @@ const { Controller } = require('ee-core');
 const { spawn } = require('child_process');
 const { liveShow, liveHide, setParams, capture, getParams,CMD } = require('../api/camera');
 const { dialog } = require('electron'); // 引入 electron 的 dialog 模块
-
+const { windowManager } = require('node-window-manager');
 // 检查并读取配置文件
 function readConfigFile(configPath) {
   try {
@@ -109,6 +109,27 @@ async function openCameraControlCmd() {
   })
 }
 
+function closeCameraControlTips() {
+  try {
+
+    const windows = windowManager.getWindows();
+
+    for (const window of windows) {
+      const title = window.getTitle();
+
+      if (title === "digiCamControl by Duka Istvan") {
+        console.log(title);
+        window.hide()
+        break;
+      }
+    }
+  }catch (e) {
+    console.log(e)
+  }
+
+
+}
+
 class CameraController extends Controller {
   constructor(ctx) {
     super(ctx);
@@ -118,9 +139,9 @@ class CameraController extends Controller {
     const win = this.app.electron.mainWindow;
     try {
   //    win.setAlwaysOnTop(true); // 置顶
-      console.log('aaaa')
        await checkCameraControlCmdExists()
       await  CMD('All_Minimize')
+      closeCameraControlTips()
   //    win.setAlwaysOnTop(false); // 置顶
 
       const res = await getParams('iso')

+ 43 - 0
electron/controller/generate.js

@@ -0,0 +1,43 @@
+'use strict';
+
+const { Controller } = require('ee-core');
+const Log = require('ee-core/log');
+const Services = require('ee-core/services');
+const path = require('path');
+const fs = require('fs');
+const { generatePhotoDetail } = require('../api/generate');
+
+const errData = {
+  msg :'请求失败,请联系管理员',
+  code:999
+}
+
+/**
+ * 设置控制器
+ * @class
+ */
+class GenerateController extends Controller {
+
+  constructor(ctx) {
+    super(ctx);
+    this.configPath = path.join(__dirname, '..', 'config', 'app.config.json');
+  }
+
+  /**
+   * 获取设备配置列表
+   */
+  async generatePhotoDetail(args) {
+    try {
+      const result = await generatePhotoDetail(args);
+      if(result.data)  return result.data
+      return errData;
+    } catch (error) {
+      Log.error('主图详情生成失败:', error);
+      return errData;
+    }
+  }
+
+}
+
+GenerateController.toString = () => '[class GenerateController]';
+module.exports = GenerateController;

+ 1 - 1
electron/controller/utils.js

@@ -54,7 +54,7 @@ class UtilsController extends Controller {
         webSecurity: false,
         contextIsolation: false, // false -> 可在渲染进程中使用electron的api,true->需要bridge.js(contextBridge)
         nodeIntegration: true,
-        preload: path.join('../preload/preload.js','../preload/bridge.js'),
+        // preload: path.join('../preload/preload.js','../preload/bridge.js'),
 
       },
     });

+ 0 - 5
frontend/src/App.vue

@@ -1,7 +1,5 @@
 
 <template>
-  <div id="app">
-
     <router-view v-slot="{ Component }">
       <keep-alive :include="keepAliveIncludes">
         <component :is="Component" />
@@ -10,9 +8,6 @@
 
     <Login v-model:dialogVisible="useUserInfoStore.loginShow" />
 
-
-
-  </div>
 </template>
 <script setup lang="ts">
 import { useRoute, useRouter } from 'vue-router'

+ 11 - 0
frontend/src/apis/other.ts

@@ -0,0 +1,11 @@
+import { GET,POST  } from "@/utils/http";
+// import type { UserRequest } from "@/apis/types/user";
+
+
+// 模板相关
+export async function getCompanyTemplatesApi(){
+    return GET('/api/ai_image/auto_photo/get_company_templates')
+}
+
+
+

+ 4 - 0
frontend/src/apis/types/other.ts

@@ -0,0 +1,4 @@
+// export interface UserRequest {
+//     username: string;
+//     password: string;
+// }

+ 6 - 2
frontend/src/components/check/index.vue

@@ -93,7 +93,7 @@ const checkInfoStore = checkInfo()
 const checkSuccess = ref(false);
 
 // 检测加载状态
-const checkLoading = ref(false);
+const checkLoading = ref(true);
 
 // 定义事件发射器,用于更新父组件的 modelValue 和触发 confirm 事件
 const emit = defineEmits(['update:modelValue', 'confirm']);
@@ -139,7 +139,11 @@ watchEffect(async ()=>{
   if( useUserInfoStore.userInfo.id && checkCount.value === 0){
     if(clientStore.isClient){
       visible.value = true
-      startProgress()
+      //python 启动有延时,延迟2秒执行
+      setTimeout(()=>{
+
+        startProgress()
+      },2000)
     }
     checkCount.value++;
   }

+ 18 - 6
frontend/src/components/header-bar/index.vue

@@ -18,6 +18,7 @@
       </div>-->
     </div>
   </div>
+  <div class="header-bar_blank"></div>
 </template>
 
 <script setup lang="ts">
@@ -115,6 +116,10 @@ function closeWindow() {
 </script>
 
 <style  lang="scss" scoped>
+.header-bar_blank {
+  width: 100%;
+  height:30px;
+}
 .header-bar {
   position: fixed;
   app-drag: drag;
@@ -125,13 +130,12 @@ function closeWindow() {
   z-index: 100000;
   background: #fff;
   box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  // padding: 0 10px;
 }
 
 .header-bar__menu {
+  position: absolute;
+  top: 0;
+  left: 0;
   display: flex;
   align-items: center;
 }
@@ -160,10 +164,15 @@ function closeWindow() {
 }
 
 .header-bar__title {
+  position: absolute;
+  top: 0;
+  left: 50%;
+  transform: translateX(-50%);
   display: flex;
+  height: 30px;
+  line-height: 30px;
   align-items: center;
-  justify-content: center; /* 居中显示标题 */
-  flex: 1; /* 占据剩余空间 */
+  justify-content: center;
 }
 
 .header-bar__logo {
@@ -179,6 +188,9 @@ function closeWindow() {
 }
 
 .header-bar__buttons {
+  position: absolute;
+  top: 0;
+  right: 0;
   display: flex;
   align-items: center;
 }

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

@@ -35,16 +35,25 @@ const routes: RouteRecordRaw[] = [
         path: "/photography/shot",
         name: "PhotographyShot",
         component: () => import("@/views/Photography/shot.vue"),
+        meta: {
+            title: '拍摄商品'
+        }
     },
     {
         path: "/photography/detail",
         name: "PhotographyDetail",
         component: () => import("@/views/Photography/detail.vue"),
+        meta: {
+            title: '主图与详情生成'
+        }
     },
     {
         path: "/photography/seniorDetail",
         name: "PhotographySeniorDetail",
         component: () => import("@/views/Photography/seniorDetail.vue"),
+        meta: {
+            title: '详情高级配置'
+        }
     },
 ];
 

+ 5 - 0
frontend/src/utils/ipc.ts

@@ -32,7 +32,12 @@ const icpList = {
     takePhoto:{
         getPhotoRecords: 'controller.takephoto.getPhotoRecords',
         delectGoodsArts: 'controller.takephoto.delectGoodsArts'
+    },
+    generate:{
+        generatePhotoDetail: 'controller.generate.generatePhotoDetail',
     }
+    
+
 }
 
 

+ 7 - 7
frontend/src/views/Photography/check.vue

@@ -2,11 +2,7 @@
 
   <headerBar
       title="拍摄物体镜头矫正"
-      :menu="[
-        {
-          type:'setting'
-        },
-    ]"
+      :menu="menu"
   />
   <div class="check-wrap flex">
 
@@ -59,13 +55,14 @@
   />
 </template>
 <script setup lang="ts">
-import  { watchEffect } from  'vue'
+import  { watchEffect,ref, reactive } from  'vue'
 import client from "@/stores/modules/client";
 import icpList from '@/utils/ipc'
 import useUserInfo from "@/stores/modules/user";
 import headerBar from '@/components/header-bar/index.vue'
 const clientStore = client();
 
+const menu = reactive([])
 const show = ref(true)
 
 const useUserInfoStore = useUserInfo()
@@ -85,6 +82,9 @@ const preview = ref(digiCamControlWEB+'liveview.jpg')
 const step = ref(1)
 function checkConfirm(){
   step.value =1
+  menu.push({
+    type:'setting'
+  })
   showVideo()
 }
 
@@ -143,7 +143,7 @@ function takePictures() {
 
   background-color: rgba(234, 236, 237, 1);
   width: 100%;
-  min-height: 100vh;
+  min-height: calc(100vh - 30px);
   display: flex;
 }
 .check-page {

+ 421 - 49
frontend/src/views/Photography/detail.vue

@@ -1,21 +1,70 @@
 <template>
+
+  <headerBar title="拍摄商品" :menu="[
+    {
+      type: 'setting'
+    },
+    {
+      name: '详情高级配置',
+      click: openPhotographySeniorDetail
+    }
+  ]" />
   <div class="detail-container">
-    <div style="padding: 20px;">
+    <div>
       <!-- 主图LOGO部分 -->
       <div class="logo-section flex left top">
         <div class="section-title">
           <img src="@/assets/images/Photography/zhuangshi.png" style="width: 32px; height: 32px;" />
           主图LOGO:
         </div>
-        <upload :value="form.logoImage" @input="onInput"></upload>
-        <router-link class="mar-left-20 " :to="{
-          name: 'PhotographySeniorDetail'
-        }">
-          <button class="generate-button button--primary1 mar-left-20" @click="generate">去高级详情</button>
-        </router-link>
+        <upload :value="form.logo_path" @input="onInput"></upload>
       </div>
 
       <el-divider />
+      <!-- 图片抠图与货号图生成 -->
+      <div class="section">
+        <div class="section-title">
+          <img src="@/assets/images/Photography/zhuangshi.png" style="width: 32px; height: 32px;" />
+          图片抠图与货号图生成
+        </div>
+        <div class="section-content">
+          <div v-if="showTips" class="instruction-out flex top left">
+            <img style="fill: #000" src="@/assets/images/xinxi.svg" />
+            <ol class="instruction-list">
+              <li>请在下方确认图片拍摄过程中的顺序,确保所有拍摄的图片的顺序一致。</li>
+              <li>使用中英文语号分隔。</li>
+              <li>图片的名称不能随意修改,否则无法正常生成详情页。</li>
+              <li>现有图片名称有:俯视、侧视、后视、鞋底、内里</li>
+            </ol>
+            <el-icon @click="showTips = false" class="close-icon">
+              <Close />
+            </el-icon>
+          </div>
+
+          <!-- 货号文件夹 -->
+          <!--    <div class="form-item">
+            <div class="label">货号文件夹:</div>
+            <div class="folder-warp">
+              <div class="folder-input">
+                <el-input style="width: 60%;" v-model="folderPath" type="textarea" :rows="2" readonly
+                  placeholder="请选择货号文件夹" />
+                <el-button class="check-button" type="primary" @click="selectFolder">
+                  <img src="@/assets/images/Photography/wenjian.png" style="width: 14px; " />
+                  选择目标文件夹</el-button>
+              </div>
+              <div class="hint">
+                <el-icon>
+                  <Warning />
+                </el-icon> <text>选择货号的上级文件夹</text>
+              </div>
+            </div>
+          </div>
+         -->
+
+        </div>
+      </div>
+      <el-divider />
+
       <!-- 选择详情模板部分 -->
       <div class="template-section ">
         <div class="flex between">
@@ -32,24 +81,62 @@
 
         <div class="template-list">
           <div v-for="(template, index) in visibleTemplates" :key="index" class="template-item"
-            @click="form.templateId = template.id">
-            <el-image :src="test_image_url" fit="contain" class="cur-p" style="width: 100%; display: block;" />
-            <div class="select-warp" :class="form.templateId == template.id ? 'active' : ''">
+            @click="form.selectTemplate = template">
+            <el-image :src="template.template_cover_image" fit="contain" class="cur-p"
+              style="width: 100%; display: block;" />
+            <div class="select-warp" :class="form.selectTemplate.id == template.id ? 'active' : ''">
               <el-icon color="#FFFFFF">
                 <Select />
               </el-icon>
             </div>
             <div class="template-info">
-              <span class="mar-left-10 chaochu_1">{{ template.templateId }}</span>
+              <span class="mar-left-10 chaochu_1">{{ template.template_name }}</span>
               <div class="template-view" @click="viewTemplate(template)">查看</div>
             </div>
           </div>
         </div>
       </div>
+      <el-divider />
 
+      <!-- 详情高级配置 -->
+      <div class="section">
+        <div class="section-title">
+          <img src="@/assets/images/Photography/zhuangshi.png" style="width: 32px; height: 32px;" />
+          详情高级配置
+        </div>
+        <div class="section-content">
+          <!-- 图片顺序 -->
+          <div class="form-item">
+            <div class="label">图片顺序:</div>
+            <el-input v-model="imageOrder" placeholder="请输入图片顺序" class="specific-page-input">
+              <template #append>
+                <el-button class="explain-btn" link type="primary">说明</el-button>
+              </template>
+            </el-input>
+          </div>
+
+          <!-- 同款检验 -->
+          <!--   <div class="form-item">
+            <div class="label">同款检验:</div>
+            <el-checkbox v-model="checkSimilar">同款下货号必须齐全</el-checkbox>
+          </div>
+-->
+          <!-- 可指定页面独修改 -->
+          <!--      <div class="form-item">
+            <div class="label">可指定页面独修改:</div>
+            <el-input v-model="specificPage" placeholder="请输入入需要单独修改的页面,示例:4:1 (需修改模版的编号:第一张)"
+              class="specific-page-input">
+              <template #append>
+                <el-button class="explain-btn" link type="primary">说明</el-button>
+              </template>
+            </el-input>
+          </div>
+          -->
+        </div>
+      </div>
+      <el-divider />
       <!-- 详情资料准备部分 -->
       <div class="data-prep-section">
-
         <div class="flex-item left">
           <div class="section-title">
             <img src="@/assets/images/Photography/zhuangshi.png" style="width: 32px; height: 32px;" />
@@ -75,44 +162,74 @@
           </div>
         </div>
       </div>
-
-      <!-- 开始生成按钮 -->
-      <button class="generate-button button--primary1" @click="generate">开始生成</button>
     </div>
-    <el-dialog v-model="dialogVisible">
-      <img w-full :src="dialogImageUrl" alt="Preview Image" />
-    </el-dialog>
+    <!-- 底部按钮 -->
+    <div class="footer">
+      <!-- <el-button class="button--primary1 footer-button" type="primary" @click="saveConfig">保存配置</el-button> -->
+      <!--  <el-button class="button--primary1 footer-button" type="primary" @click="startProcess">开始处理</el-button>  -->
+      <el-button class="button--primary1 footer-button" type="primary" @click="generate">开始生成</el-button>
+    </div>
   </div>
+
+
+  <loading-dialog v-model="loadingDialogVisible" :progress="progress" :message="message" :show-button="showButton"
+    @button-click="handleComplete" />
+  <el-dialog v-model="dialogVisible">
+    <img style="width: 100%;" :src="dialogImageUrl" alt="Preview Image" />
+  </el-dialog>
+
+
+
 </template>
 
 <script lang="ts" setup>
 
+import { getCompanyTemplatesApi } from '@/apis/other'
+import tokenInfo from '@/stores/modules/token';
+import useUserInfo from "@/stores/modules/user";
 
-import { ref, computed, reactive } from 'vue';
+import { ElMessage, ElMessageBox } from 'element-plus'
+
+import headerBar from '@/components/header-bar/index.vue'
+import { ref, computed, reactive, onMounted } from 'vue';
 import { Select } from '@element-plus/icons-vue'
 import upload from '@/components/upload'
 import client from "@/stores/modules/client";
 import icpList from '@/utils/ipc'
 const clientStore = client();
-const test_image_url = ref('https://ossimg.valimart.net/uploads/vali_ai/20230927/169580582298394.png')
-
-// 模拟数据
-const templates = [
-  { id: 1101, templateId: '某某模版编号1', preview: '...' },
-  { id: 1102, templateId: '某某模版编号2', preview: '...' },
-  { id: 1103, templateId: '某某模版编号3', preview: '...' },
-  { id: 1104, templateId: '某某模版编号4', preview: '...' },
-  { id: 1105, templateId: '某某模版编号5', preview: '...' },
-  { id: 1106, templateId: '某某模版编号6', preview: '...' },
-  { id: 1107, templateId: '某某模版编号7', preview: '...' },
-  { id: 1108, templateId: '某某模版编号8', preview: '...' },
-  { id: 1109, templateId: '某某模版编号9', preview: '...' },
-  { id: 1110, templateId: '某某模版编号10', preview: '...' },
-  { id: 1111, templateId: '某某模版编号11', preview: '...' },
-  { id: 1112, templateId: '某某模版编号12', preview: '...' },
-];
+import { getRouterUrl } from '@/utils/appfun'
+import { useRouter } from "vue-router";
+
+import { Close, Warning } from '@element-plus/icons-vue'
+import LoadingDialog from '@/views/Photography/components/LoadingDialog.vue'
+
+const showTips = ref(true)
+
+const folderPath = ref('') //货号文件夹
+// const reportMode = ref('normal') // 抠图模式
+const imageOrder = ref('俯视、侧视、后跟、鞋底、内里、组合、组合2、组合3') // 图片顺序
+const checkSimilar = ref(false) // 同款检验
+const specificPage = ref('')  // 可指定页面独修改
+
+// 路由和状态管理初始化
+const route = useRoute();
+const router = useRouter();
+
+// 完成目录
+const completeDirectory = ref('')
+
+
+const loadingDialogVisible = ref(false)
+const progress = ref(0)
+const message = ref('正在为您处理,请稍后')
+const showButton = ref(true)
+
+let templates = ref([])
+let goods_art_nos = ref([])
+
+
 // 状态变量
-const totalPage = ref(3);
+const totalPage = ref(0);
 const itemsPerPage = 4; // 每页显示的模板数量
 const dialogVisible = ref(false);
 const dialogImageUrl = ref('');
@@ -121,38 +238,109 @@ const queryParams = reactive({ // 分页查询参数
   current: 1,
 })
 const form = reactive({
+  selectTemplate: {}, //选中的模板 
   dataType: '1', // 1: 选择excel文件 2: 系统对接
-  logoImage: '', // 主图LOGO
-  templateId: 1101,
+  logo_path: '', // 主图LOGO
   excelFilePath: 'D:\\MyDocuments\\PythonCode\\MyPython\\red_dragonfly\\deal_pics\\auto_capture_V2\\auto_photo', // 商品基础资料EXCEL文件选择
-
 })
+onMounted(() => {
+  goods_art_nos.value =  route.query.goods_art_nos
+  getCompanyTemplates()
+})
+
+
 // 计算属性,获取当前页可见的模板
 const visibleTemplates = computed(() => {
   const startIndex = (queryParams.current - 1) * itemsPerPage;
-  const data = templates.slice(startIndex, startIndex + itemsPerPage);
+  const data = templates.value.slice(startIndex, startIndex + itemsPerPage);
   return data
 });
 // 查看模板详情
 const viewTemplate = (template) => {
-  console.log('查看模板详情', template);
   // 展示大图
   dialogVisible.value = true
-  dialogImageUrl.value = 'https://ossimg.valimart.net/uploads/vali_ai/20240312/171022217892595.png'
+  dialogImageUrl.value = template.template_preview_image
 
 };
+// 获取模版列表
+const getCompanyTemplates = async () => {
+  const { data } = await getCompanyTemplatesApi()
+  templates.value = data.list
+  // 默认选中第一个模板
+  if (templates.value.length > 0) {
+    form.selectTemplate = templates.value[0]
+  }
+  // 计算总页数
+  totalPage.value = Math.ceil(templates.value.length / itemsPerPage);
+}
+
+
 const onCurrentChange = (page) => {
   queryParams.current = page;
 };
 const onSizeChange = (data) => {
 };
+
+
+
 // 开始生成操作
-const generate = () => {
-  // 这里添加实际生成主图和详情的逻辑
-  console.log('queryParams', form)
-};
+const generate = async function () {
+  const tokenInfoStore = tokenInfo();
+  const token = tokenInfoStore.getToken; // 使用 getToken() 获取 token
+  let temp_list = []
+  templates.value.map(item => {
+    temp_list.push({
+      template_id: item.template_id,
+      template_local_classes: item.template_local_classes,
+    })
+  })
+  const params = {
+    goods_art_no: goods_art_nos.value,
+    logo_path: form.logo_path,
+    temp_name: form.selectTemplate.template_id,
+    excel_path: '',
+    template_image_order: form.selectTemplate.template_image_order,
+    temp_list,
+    token,
+  }
+  loadingDialogVisible.value = true
+  progress.value = 0
+  showButton.value = true
+
+  const interval = setInterval(() => {
+    if (progress.value < 100) {
+      progress.value += 10
+    }
+  }, 1000)
+  clientStore.ipc.removeAllListeners(icpList.generate.generatePhotoDetail);
+  clientStore.ipc.send(icpList.generate.generatePhotoDetail, params);
+  clientStore.ipc.on(icpList.generate.generatePhotoDetail, (event, result) => {
+    clientStore.ipc.removeAllListeners(icpList.generate.generatePhotoDetail);
+    console.log("%c Line:306 🍻 result", "color:#42b983", result);
+    clearInterval(interval)
+    if (result.code === 0) {
+      const href = result.data.out_put_dir
+      completeDirectory.value = href
+      progress.value = 100
+      message.value = '全部处理完毕'
+      showButton.value = false
+    } else {
+      showButton.value = false
+      if (result.msg) {
+        ElMessage.error(result.msg)
+      }
+    }
+  });
+}
+
+
+
+
+
+
+
 const onInput = (value) => {
-  form.logoImage = value
+  form.logo_path = value
 }
 
 function selectExcel() {
@@ -168,13 +356,80 @@ function selectExcel() {
     clientStore.ipc.removeAllListeners(icpList.utils.openFile);
   })
 }
+
+
+const Router = useRouter()
+//打开主图详情
+function openPhotographySeniorDetail() {
+
+  const { href } = Router.resolve({
+    name: 'PhotographySeniorDetail'
+  })
+
+  clientStore.ipc.removeAllListeners(icpList.utils.openMain);
+  let params = {
+    title: '详情高级配置',
+    width: 1000,
+    height: 630,
+    frame: true,
+    id: "PhotographySeniorDetail",
+    url: getRouterUrl(href)
+  }
+  clientStore.ipc.send(icpList.utils.openMain, params);
+}
+
+
+const startProcess = () => {
+  loadingDialogVisible.value = true
+  progress.value = 0
+  showButton.value = true
+  // 模拟进度更新
+  const interval = setInterval(() => {
+    if (progress.value < 100) {
+      progress.value += 10
+    } else {
+      clearInterval(interval)
+      message.value = '全部处理完毕'
+      showButton.value = false
+    }
+  }, 500)
+}
+
+const handleComplete = () => {
+  loadingDialogVisible.value = false
+  // 这里可以添加打开目录的逻辑
+  // 打开目录
+  clientStore.ipc.removeAllListeners(icpList.utils.openDirectory);
+  console.log('打开目录')
+  clientStore.ipc.removeAllListeners(icpList.utils.shellFun);
+  let params = {
+      action: 'openPath',
+      params: completeDirectory.value
+      // params: 'C:\Users\\21333\\Desktop\\HQT\\151405492752642685067862.jpg'
+  }
+  clientStore.ipc.send(icpList.utils.shellFun, params);
+}
+
+const selectFolder = () => {
+  clientStore.ipc.removeAllListeners(icpList.utils.openDirectory);
+  clientStore.ipc.send(icpList.utils.openDirectory);
+  clientStore.ipc.on(icpList.utils.openDirectory, async (event, result) => {
+    folderPath.value = result
+    clientStore.ipc.removeAllListeners(icpList.utils.openDirectory);
+  })
+}
+
+
 </script>
 
 <style lang="scss" scoped>
 .detail-container {
   background-color: #EAECED;
   width: 100%;
-  min-width: 600px
+  min-width: 600px;
+  padding: 20px;
+  overflow: hidden;
+
 }
 
 .logo-section,
@@ -302,4 +557,121 @@ function selectExcel() {
   margin-bottom: 16px;
   color: #474747;
 }
+
+
+
+.section {
+  margin-bottom: 24px;
+
+  .section-title {
+    display: flex;
+    align-items: center;
+    gap: 8px;
+    font-weight: bold;
+    margin-bottom: 16px;
+    color: #474747;
+  }
+
+  .section-content {
+    padding-left: 16px;
+  }
+}
+
+.instruction-out {
+  background: #EAF3FF;
+  border-radius: 4px;
+  border: 1px solid #CBE1FF;
+  padding: 10px 20px;
+  width: 80%;
+  position: relative;
+
+  .instruction-list {
+    margin: 0px 0 0 10px;
+    padding-left: 20px;
+    padding-right: 40px;
+    width: 100%;
+
+    li {
+      margin-bottom: 4px;
+      text-align: left;
+      font-size: 14px;
+    }
+  }
+
+  .close-icon {
+    position: absolute;
+    top: 12px;
+    right: 19px;
+  }
+}
+
+
+
+.form-item {
+  margin: 16px 0;
+  display: flex;
+
+
+  .label {
+    min-width: 120px;
+    margin-right: 12px;
+  }
+
+  .folder-warp {
+    width: 100%;
+    display: flex;
+    flex-direction: column;
+
+    .folder-input {
+      flex: 1;
+      display: flex;
+      align-items: center;
+
+      .check-button {
+        background: #DFE2E3;
+        border-radius: 6px;
+        padding: 6px 12px;
+        color: #2957FF;
+        margin-left: 20px;
+      }
+
+    }
+  }
+
+  .hint {
+    text-align: left;
+    color: #999;
+    margin-top: 6px;
+    font-size: 14px;
+    color: #FF4C00;
+    font-style: normal;
+  }
+
+  .specific-page-input {
+    flex: 1;
+  }
+}
+
+.image-order {
+  flex: 1;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
+
+.footer {
+  display: flex;
+  justify-content: center;
+  margin-top: 24px;
+
+  .footer-button {
+    padding: 10px 20px;
+  }
+}
+
+.explain-btn {
+  padding-left: 20px;
+  padding-right: 20px;
+  color: #2957FF !important;
+}
 </style>

+ 12 - 8
frontend/src/views/Photography/seniorDetail.vue

@@ -1,4 +1,7 @@
 <template>
+  <headerBar
+      title="主图与详情高级配置"
+  />
   <div class="image-config">
     <div class="config-card">
       <!-- 图片抠图与货号图生成 -->
@@ -92,20 +95,21 @@
       <!-- 底部按钮 -->
       <div class="footer">
         <el-button class="button--primary1  footer-button" type="primary" @click="saveConfig">保存配置</el-button>
-      
+
         <el-button class="button--primary1 footer-button" type="primary" @click="startProcess">开始处理</el-button>
       </div>
-  
+
     </div>
 
 
-    <loading-dialog v-model="dialogVisible" :progress="progress" :message="message" :show-button="showButton"
+    <loading-dialog v-model="loadingDialogVisible" :progress="progress" :message="message" :show-button="showButton"
       @button-click="handleComplete" />
   </div>
 
 </template>
 
 <script setup lang="ts">
+import headerBar from '@/components/header-bar/index.vue'
 import { ref } from 'vue'
 import { Close, Warning } from '@element-plus/icons-vue'
 import LoadingDialog from '@/views/Photography/components/LoadingDialog.vue'
@@ -122,7 +126,7 @@ const checkSimilar = ref(false) // 同款检验
 const specificPage = ref('')  // 可指定页面独修改
 
 
-const dialogVisible = ref(false)
+const loadingDialogVisible = ref(false)
 const progress = ref(0)
 const message = ref('正在为您处理,请稍后')
 const showButton = ref(true)
@@ -141,7 +145,7 @@ const saveConfig = () => {
 }
 
 const startProcess = () => {
-  dialogVisible.value = true
+  loadingDialogVisible.value = true
   progress.value = 0
   showButton.value = true
   // 模拟进度更新
@@ -157,7 +161,7 @@ const startProcess = () => {
 }
 
 const handleComplete = () => {
-  dialogVisible.value = false
+  loadingDialogVisible.value = false
   // 这里可以添加打开目录的逻辑
   console.log('打开目录')
 }
@@ -180,7 +184,7 @@ const selectFolder = () => {
     background: #EAECED;
     padding: 20px;
     overflow-x: hidden;
-    height: 100vh;
+    height: calc(100vh  - 30px);
 
     .card-header {
       display: flex;
@@ -308,4 +312,4 @@ const selectFolder = () => {
   padding-right: 20px;
   color: #2957FF !important;
 }
-</style>
+</style>

+ 29 - 4
frontend/src/views/Photography/shot.vue

@@ -145,7 +145,7 @@
             />
             <span class="empty-text">暂无数据</span>
           </div>-->
-          <div v-if="goodsList.length" class="next-step button--primary1 flex-col" @click="next"><span
+          <div v-if="goodsList.length" class="next-step button--primary1 flex-col" @click="openPhotographyDetail"><span
               class="next-step-text">拍摄完毕,进入下一步处理</span></div>
         </div>
 
@@ -159,7 +159,8 @@ import icpList from '@/utils/ipc'
 import client from "@/stores/modules/client";
 import socket from "@/stores/modules/socket";
 import { ElMessage ,ElMessageBox } from 'element-plus'
-import { getFilePath } from '@/utils/appfun'
+import { getFilePath,getRouterUrl } from '@/utils/appfun'
+import {useRouter} from "vue-router";
 
 
 const loading = ref(false)
@@ -169,6 +170,7 @@ const takePictureLoading = ref(false)
 
 const clientStore = client();
 
+const Router = useRouter()
 const goodsList = ref([])
 const  goods_art_no_tpl = ref('')
 const  goods_art_no = ref('')
@@ -358,6 +360,30 @@ onBeforeUnmount(() => {
 
 })
 
+
+
+//打开主图详情
+function openPhotographyDetail() {
+
+  const { href } = Router.resolve({
+    name: 'PhotographyDetail',
+    query:{
+      goods_art_nos:goodsList.value.map(item=>item.goods_art_no),
+    }
+  })
+
+  clientStore.ipc.removeAllListeners(icpList.utils.openMain);
+  let params = {
+    title: '主图与详情生成',
+    width: 1000,
+    height: 630,
+    frame: true,
+    id: "PhotographyDetail",
+    url: getRouterUrl(href)
+  }
+  clientStore.ipc.send(icpList.utils.openMain, params);
+}
+
 </script>
 
 <style  lang="scss">
@@ -776,8 +802,7 @@ onBeforeUnmount(() => {
 .history-section {
         background-color: rgba(234, 236, 237, 1);
         width: 332px;
-        height: 100vh;
-        padding-top: 30px;
+        height: calc(100vh - 30px);
 
         .history-title {
           width: calc(100% - 20px);

+ 4 - 5
frontend/src/views/Setting/index.vue

@@ -433,9 +433,8 @@ const deviceSpeedList = ref([
   { label: '三档', value: '3' },
 ]);
 const runModeList = ref([
-  { label: '普通模式', value: '1' },
-  { label: '自动模式', value: '2' },
-  { label: '手动模式', value: '3' },
+  { label: '普通抠图', value: '普通抠图' },
+  { label: '精细化抠图', value: '精细化抠图' }
 ]);
 const receiverList = ref([
   { label: '蓝牙', value: '1' },
@@ -796,11 +795,11 @@ body {
 }
 .container {
   margin: 0 auto;
-  height: 100vh;
+  height: calc(100vh - 30px);
   background: #EAECED;
   display: flex;
   flex-direction: column;
-  justify-content: center;
+  justify-content: flex-start;
 }
 .settings-nav {
   display: flex;

+ 5 - 4
package.json

@@ -1,7 +1,7 @@
 {
-  "name": "ee",
-  "version": "3.15.0",
-  "description": "A fast, desktop software development framework",
+  "name": "ZhiHuiYin",
+  "version": "1.0.0",
+  "description": "智慧拍照机是一种结合人工智能技术与传统摄影设备的创新产品,旨在为用户提供更加智能、便捷和高质量的拍摄体验。",
   "main": "main.js",
   "scripts": {
     "dev": "ee-bin dev",
@@ -44,7 +44,7 @@
     "electron-egg",
     "ElectronEgg"
   ],
-  "author": "哆啦好梦, Inc <530353222@qq.com>",
+  "author": "hlm",
   "license": "Apache",
   "devDependencies": {
     "@electron/rebuild": "3.2.13",
@@ -62,6 +62,7 @@
     "ee-core": "2.12.0",
     "electron-updater": "5.3.0",
     "lodash": "4.17.21",
+    "node-window-manager": "^2.2.4",
     "ws": "8.18.1"
   }
 }

+ 14 - 14
public/dist/index.html

@@ -1,14 +1,14 @@
-<!doctype html>
-<html lang="en">
-  <head>
-    <meta charset="UTF-8" />
-    <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-6PwDCeNx.js"></script>
-    <link rel="stylesheet" crossorigin href="./assets/index-CfZ73FPC.css">
-  </head>
-  <body>
-    <div id="app"></div>
-  </body>
-</html>
+<!doctype html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <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-CW4uQ-aR.js"></script>
+    <link rel="stylesheet" crossorigin href="./assets/index-CL_4evXq.css">
+  </head>
+  <body>
+    <div id="app"></div>

+  </body>
+</html>

+ 4 - 3
python/config.ini

@@ -16,14 +16,15 @@ works=1
 project=惠利玛
 [log]
 # 日志相关
-log_file_name=app.log 
+log_file_name=app.log
 #最大字节数
-max_bytes=102400 
+max_bytes=102400
 #备份数量
 backup_counts=3
 # 地址
 hlm_host=https://dev2.pubdata.cn
 
+project=红蜻蜓
 
 
 
@@ -39,4 +40,4 @@ left_foot_action_2 = 99
 right_foot_photograph = 99
 right_foot_action_1 = 99
 right_foot_action_2 = 99
-stop = 9
+stop = 9