Prechádzať zdrojové kódy

mod:仅处理图像 调整

panqiuyao 8 mesiacov pred
rodič
commit
201adb94ff

+ 1 - 1
frontend/src/router/index.ts

@@ -5,7 +5,7 @@ import { authGuard } from './plugins/authGuard'
 const routes: RouteRecordRaw[] = [
     {
         path: "/",
-        redirect: "/photography/check"
+        redirect: "/home"
     },
     {
         path: "/home",

+ 9 - 3
frontend/src/stores/modules/config.ts

@@ -5,13 +5,19 @@ import { ref, computed } from 'vue';
 export const configInfo = defineStore('config',()=>{
   const digiCamControlPath = ref("C:\\Program Files (x86)\\digiCamControl")
   const updateDigiCamControlPath = (data:string)=>{
-    console.log("updateDigiCamControlPath",data)
     digiCamControlPath.value = data
-    console.log(digiCamControlPath.value)
+  }
+
+  //  1 为拍照并处理图像 2 为仅处理图像
+  const appModel = ref(1)
+  const updateAppModel = (data:number)=>{
+    appModel.value = data
   }
   return {
     digiCamControlPath,
-    updateDigiCamControlPath
+    updateDigiCamControlPath,
+    appModel,
+    updateAppModel
   }
 },{
   persist:true,

+ 24 - 323
frontend/src/views/Home/index.vue

@@ -2,366 +2,67 @@
 
 
   <headerBar
-    title="拍摄物体镜头矫正"
-    :menu="[
-        {
-          type:'setting'
-        },
-        {
-          type:'remoteControl'
-        },{
-            type: 'developer'
-        }
-    ]"
+      title="首页"
   />
   <div class="mb-4">
-
-    <template v-if="!show">
-      <div>{{useUserInfoStore.userInfo.account_name}}</div>
-      <div>{{useUserInfoStore.userInfo.brand_company_code}}</div>
-    </template>
-    <template v-else>
-      <img :src="src" width="500px" height="500px"/>
-      <img :src="preview" width="500px" height="500px"/>
-  </template>
-
 <!--
-    <el-button @click="showVideo">实时预览</el-button>
-    <el-button @click="hideVideo">关闭预览</el-button>
-    <el-button @click="takePictures">拍照</el-button>
-    <el-button @click="socketConnect">socket 连接</el-button>
-    <el-button @click="connect_mcu">发送设备连接检测请求</el-button>
-    <el-button @click="connect_bluetooth">发送遥控器请求</el-button>
-    <el-button @click="socketDisconnect">socket 断开</el-button>
-    <el-button @click="loginError">登录失败</el-button>
-    <el-button type="primary" @click="loginIn">登录成功</el-button>
-    <el-button type="success" @click="showLoginDialog">登录</el-button>
-    <el-button type="info" @click="checkVisible = true">软件检查</el-button>
-
-
--->
-
-    <el-button type="info"  @click="openSeeting">打开设置</el-button>
-    <el-button type="info"  @click="openTplSeeting">打开主图和详情设置</el-button>
-    <el-button type="info"  @click="opendigiCamControl">打开digiCamControl</el-button>
-
-
-
-    <el-button type="info"  @click="connect_mcu">链接MCU</el-button>
-    <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="{
           name:'PhotographyCheck'
       }"
     >
-      <el-button type="warning">拍摄物体</el-button>
-    </router-link>
-    <router-link
+      <el-button type="warning">拍摄图像并处理</el-button>
+    </router-link>-->
+    <el-button type="warning" @click="goCheck">拍摄图像并处理</el-button>
+
+    <el-button type="warning" @click="goShot">仅处理图像</el-button>
+<!--    <router-link
         class="mar-left-10"
-      :to="{
+        :to="{
           name:'PhotographyShot'
       }"
-  >
-    <el-button type="warning">拍摄商品</el-button>
-  </router-link>
-
-<!--    <hardware-check v-model="checkVisible" @confirm="onCheckComplete"></hardware-check>-->
-    <Login v-model:dialogVisible="dialogVisible" @login-success="handleLoginSuccess"/>
-    <el-button
-        class="mar-left-10"
-        type="primary"  @click="loginIn">登录成功</el-button>
-  </div>
-
-
-  <div class="mb-4">
-      <el-input v-model="paramsKey" placeholder="参数名称"></el-input>
-      <el-input v-model="paramsValue" placeholder="参数值"></el-input>
-      <el-button @click="setParams">保存</el-button>
+    >
+      <el-button type="warning" @click="goShot">仅处理图像</el-button>
+    </router-link>-->
   </div>
-
 </template>
 
 <script setup lang="ts">
-import { ref } from 'vue'
-import useUserInfo from "@/stores/modules/user";
-import { login, getUserInfo } from '@/apis/user';
-import Login from '@/components/login/index.vue';
-import HardwareCheck from '@/components/check/index.vue'
-import headerBar from '@/components/header-bar/index.vue'
-
-import { getFilePath,getRouterUrl } from '@/utils/appfun'
+import headerBar from "@/components/header-bar/index.vue";
 import {useRouter} from "vue-router";
-const Router = useRouter()
-
+import  configInfo  from '@/stores/modules/config';
+const configInfoStore = configInfo();
+const router = useRouter()
 
 
-const useUserInfoStore = useUserInfo();
-const dialogVisible = ref(false);
-const checkVisible = ref(false)
-import client from "@/stores/modules/client";
-import  icpList from '@/utils/ipc'
 import socket from "@/stores/modules/socket";
-const clientStore = client();
-
-function showLoginDialog() {
-  dialogVisible.value = true;
-}
-
-function handleLoginSuccess() {
-  // 处理登录成功后的逻辑
-  console.log('登录成功');
-}
-function onCheckComplete(){
-
-}
-
-async function loginIn() {
-  console.log('aaa')
-  const res = await login({
-    "site":1,
-    "username":"13777879245",
-    "password":"753159",
-    "type":1,
-    "device":"aigc-photo"
-  })
-
-  const userRes = await getUserInfo({
-    "site":1,
-    "token":res.data.token
-  })
-
-  useUserInfoStore.updateUserInfo(userRes.data)
-}
-
-async function loginError() {
-  const res = await login({
-    "site":1,
-    "username":"18679381902",
-    "password":"123456",
-    "device":"aigc-photo"
-  })
-  console.log(res)
-}
-
-const show = ref(false)
-const imgKey = ref(0)
-const src = ref('http://localhost:5513/liveview.jpg')
-let interval:any = null
-function showVideo(){
-  if(clientStore.isClient){
-
-
-    clientStore.ipc.removeAllListeners(icpList.camera.PreviewShow);
-
-    clientStore.ipc.send(icpList.camera.PreviewShow);
-    clientStore.ipc.on(icpList.camera.PreviewShow, async (event, result) => {
-
-      show.value = true;
-      src.value = `http://localhost:5513/liveview.jpg?key=${imgKey.value}`
-      interval = setInterval(()=>{
-        imgKey.value++;
-        src.value = `http://localhost:5513/liveview.jpg?key=${imgKey.value}`
-      },100)
-
-    })
-  }
-
-}
-
-const preview = ref('http://localhost:5513/preview.jpg')
-const previewKey = ref(0)
-
-function hideVideo(){
-  if(clientStore.isClient){
-
-    clientStore.ipc.removeAllListeners(icpList.camera.PreviewHide);
-
-    clientStore.ipc.send(icpList.camera.PreviewHide);
-    clientStore.ipc.on(icpList.camera.PreviewHide, async (event, result) => {
-      show.value = false;
-      if(interval) clearInterval(interval)
-    })
-  }
-
-}
-
-const paramsKey = ref('')
-const paramsValue = ref('')
-
-
-function setParams(){
-  if(clientStore.isClient){
-
-    clientStore.ipc.removeAllListeners(icpList.camera.setParams);
-
-    clientStore.ipc.send(icpList.camera.setParams,{
-      key:paramsKey.value,
-      value:paramsValue.value
-    });
-  }
-
-}
-
-
-function takePictures(){
-  if(clientStore.isClient){
-
-    clientStore.ipc.removeAllListeners(icpList.camera.takePictures);
-
-    clientStore.ipc.send(icpList.camera.takePictures);
-
-    clientStore.ipc.on(icpList.camera.takePictures, async (event, result) => {
-
-
-      setTimeout(()=>{
-        previewKey.value++;
-        preview.value = `http://localhost:5513/preview.jpg?key=${previewKey.value}`
-      },1000)
-    })
-  }
-}
-
 // 初始化 WebSocket 状态管理
 const socketStore = socket()
 
 function socketConnect(){
-
-  if(clientStore.isClient){
     socketStore.connectSocket()
-
-    clientStore.ipc.on(icpList.socket.message, async (event, result) => {
-      console.log(result)
-    })
-  }
-
 }
 
 
 
-async function connect_mcu(){
 
-  if(clientStore.isClient){
-
-    await socketStore.connectSocket();
-    socketStore.sendMessage({
-      type: 'connect_mcu',
-      data:"connect_mcu"
-    })
-  }
-
-}
-
-async function connect_mcu__init(){
-
-  if(clientStore.isClient){
-
-    await socketStore.connectSocket();
-
-    socketStore.sendMessage({
-      type: 'init_mcu',
-      data:{
-        value:true
-      }
-    })
-  }
-
-}
+const goCheck = ()=>{
 
-
-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(){
-
-  await socketStore.connectSocket();
-     socketStore.sendMessage({type: 'connect_bluetooth',})
-
-      clientStore.ipc.on(icpList.socket.message+'_blue_tooth', (event, result) => {
-        console.log('4')
-        console.log(result)
-      });
-
-}
-
-
-
-function socketDisconnect(){
-
-  if(clientStore.isClient){
-
-    socketStore.disconnectSocket()
-  }
-}
-
-
-
-function openSeeting(){
-  console.log('aaaaa')
-  clientStore.ipc.removeAllListeners(icpList.utils.openMain);
-  let params = {
-    title: '设置',
-    width: 900,
-    height: 630,
-    frame: true,
-    id:"seeting",
-    url:"http://localhost:3000/#/setting"
-  }
-  clientStore.ipc.send(icpList.utils.openMain,params);
-}
-function openTplSeeting(){
-
-  const { href } = Router.resolve({
-    name: 'PhotographyDetail',
-    query:{
-      goods_art_nos:['ARN1411512'],
-    }
+  configInfoStore.updateAppModel(1)
+  router.push({
+    name:'PhotographyCheck'
   })
-  clientStore.ipc.removeAllListeners(icpList.utils.openMain);
-  let params = {
-    title: '主图和详情设置',
-    width: 900,
-    height: 650,
-    frame: true,
-    id:"photographyDetail",
-    url:getRouterUrl(href)
-  }
-  clientStore.ipc.send(icpList.utils.openMain,params);
 }
 
-
-import  configInfo  from '@/stores/modules/config';
-const configInfoStore = configInfo();
-const  opendigiCamControl = ()=>{
-
-  clientStore.ipc.removeAllListeners(icpList.camera.connect);
-  clientStore.ipc.send(icpList.camera.connect,configInfoStore.digiCamControlPath);
-  clientStore.ipc.on(icpList.camera.digiCamControlPath, async (event, result) => {
-    clientStore.ipc.removeAllListeners(icpList.camera.digiCamControlPath);
-    if(result.code === 0 && result.data){
-      configInfoStore.updateDigiCamControlPath(result.data)
-    }
-
+const goShot = ()=>{
+  socketConnect()
+  configInfoStore.updateAppModel(2)
+  router.push({
+    name:'PhotographyShot'
   })
 }
 
-
 </script>
 
 <style scoped>

+ 369 - 0
frontend/src/views/Home/index_old.vue

@@ -0,0 +1,369 @@
+<template>
+
+
+  <headerBar
+    title="拍摄物体镜头矫正"
+    :menu="[
+        {
+          type:'setting'
+        },
+        {
+          type:'remoteControl'
+        },{
+            type: 'developer'
+        }
+    ]"
+  />
+  <div class="mb-4">
+
+    <template v-if="!show">
+      <div>{{useUserInfoStore.userInfo.account_name}}</div>
+      <div>{{useUserInfoStore.userInfo.brand_company_code}}</div>
+    </template>
+    <template v-else>
+      <img :src="src" width="500px" height="500px"/>
+      <img :src="preview" width="500px" height="500px"/>
+  </template>
+
+<!--
+    <el-button @click="showVideo">实时预览</el-button>
+    <el-button @click="hideVideo">关闭预览</el-button>
+    <el-button @click="takePictures">拍照</el-button>
+    <el-button @click="socketConnect">socket 连接</el-button>
+    <el-button @click="connect_mcu">发送设备连接检测请求</el-button>
+    <el-button @click="connect_bluetooth">发送遥控器请求</el-button>
+    <el-button @click="socketDisconnect">socket 断开</el-button>
+    <el-button @click="loginError">登录失败</el-button>
+    <el-button type="primary" @click="loginIn">登录成功</el-button>
+    <el-button type="success" @click="showLoginDialog">登录</el-button>
+    <el-button type="info" @click="checkVisible = true">软件检查</el-button>
+
+
+-->
+
+    <el-button type="info"  @click="openSeeting">打开设置</el-button>
+    <el-button type="info"  @click="openTplSeeting">打开主图和详情设置</el-button>
+    <el-button type="info"  @click="opendigiCamControl">打开digiCamControl</el-button>
+
+
+
+    <el-button type="info"  @click="connect_mcu">链接MCU</el-button>
+    <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="{
+          name:'PhotographyCheck'
+      }"
+    >
+      <el-button type="warning">拍摄物体</el-button>
+    </router-link>
+    <router-link
+        class="mar-left-10"
+      :to="{
+          name:'PhotographyShot'
+      }"
+  >
+    <el-button type="warning">拍摄商品</el-button>
+  </router-link>
+
+<!--    <hardware-check v-model="checkVisible" @confirm="onCheckComplete"></hardware-check>-->
+    <Login v-model:dialogVisible="dialogVisible" @login-success="handleLoginSuccess"/>
+    <el-button
+        class="mar-left-10"
+        type="primary"  @click="loginIn">登录成功</el-button>
+  </div>
+
+
+  <div class="mb-4">
+      <el-input v-model="paramsKey" placeholder="参数名称"></el-input>
+      <el-input v-model="paramsValue" placeholder="参数值"></el-input>
+      <el-button @click="setParams">保存</el-button>
+  </div>
+
+</template>
+
+<script setup lang="ts">
+import { ref } from 'vue'
+import useUserInfo from "@/stores/modules/user";
+import { login, getUserInfo } from '@/apis/user';
+import Login from '@/components/login/index.vue';
+import HardwareCheck from '@/components/check/index.vue'
+import headerBar from '@/components/header-bar/index.vue'
+
+import { getFilePath,getRouterUrl } from '@/utils/appfun'
+import {useRouter} from "vue-router";
+const Router = useRouter()
+
+
+
+const useUserInfoStore = useUserInfo();
+const dialogVisible = ref(false);
+const checkVisible = ref(false)
+import client from "@/stores/modules/client";
+import  icpList from '@/utils/ipc'
+import socket from "@/stores/modules/socket";
+const clientStore = client();
+
+function showLoginDialog() {
+  dialogVisible.value = true;
+}
+
+function handleLoginSuccess() {
+  // 处理登录成功后的逻辑
+  console.log('登录成功');
+}
+function onCheckComplete(){
+
+}
+
+async function loginIn() {
+  console.log('aaa')
+  const res = await login({
+    "site":1,
+    "username":"13777879245",
+    "password":"753159",
+    "type":1,
+    "device":"aigc-photo"
+  })
+
+  const userRes = await getUserInfo({
+    "site":1,
+    "token":res.data.token
+  })
+
+  useUserInfoStore.updateUserInfo(userRes.data)
+}
+
+async function loginError() {
+  const res = await login({
+    "site":1,
+    "username":"18679381902",
+    "password":"123456",
+    "device":"aigc-photo"
+  })
+  console.log(res)
+}
+
+const show = ref(false)
+const imgKey = ref(0)
+const src = ref('http://localhost:5513/liveview.jpg')
+let interval:any = null
+function showVideo(){
+  if(clientStore.isClient){
+
+
+    clientStore.ipc.removeAllListeners(icpList.camera.PreviewShow);
+
+    clientStore.ipc.send(icpList.camera.PreviewShow);
+    clientStore.ipc.on(icpList.camera.PreviewShow, async (event, result) => {
+
+      show.value = true;
+      src.value = `http://localhost:5513/liveview.jpg?key=${imgKey.value}`
+      interval = setInterval(()=>{
+        imgKey.value++;
+        src.value = `http://localhost:5513/liveview.jpg?key=${imgKey.value}`
+      },100)
+
+    })
+  }
+
+}
+
+const preview = ref('http://localhost:5513/preview.jpg')
+const previewKey = ref(0)
+
+function hideVideo(){
+  if(clientStore.isClient){
+
+    clientStore.ipc.removeAllListeners(icpList.camera.PreviewHide);
+
+    clientStore.ipc.send(icpList.camera.PreviewHide);
+    clientStore.ipc.on(icpList.camera.PreviewHide, async (event, result) => {
+      show.value = false;
+      if(interval) clearInterval(interval)
+    })
+  }
+
+}
+
+const paramsKey = ref('')
+const paramsValue = ref('')
+
+
+function setParams(){
+  if(clientStore.isClient){
+
+    clientStore.ipc.removeAllListeners(icpList.camera.setParams);
+
+    clientStore.ipc.send(icpList.camera.setParams,{
+      key:paramsKey.value,
+      value:paramsValue.value
+    });
+  }
+
+}
+
+
+function takePictures(){
+  if(clientStore.isClient){
+
+    clientStore.ipc.removeAllListeners(icpList.camera.takePictures);
+
+    clientStore.ipc.send(icpList.camera.takePictures);
+
+    clientStore.ipc.on(icpList.camera.takePictures, async (event, result) => {
+
+
+      setTimeout(()=>{
+        previewKey.value++;
+        preview.value = `http://localhost:5513/preview.jpg?key=${previewKey.value}`
+      },1000)
+    })
+  }
+}
+
+// 初始化 WebSocket 状态管理
+const socketStore = socket()
+
+function socketConnect(){
+
+  if(clientStore.isClient){
+    socketStore.connectSocket()
+
+    clientStore.ipc.on(icpList.socket.message, async (event, result) => {
+      console.log(result)
+    })
+  }
+
+}
+
+
+
+async function connect_mcu(){
+
+  if(clientStore.isClient){
+
+    await socketStore.connectSocket();
+    socketStore.sendMessage({
+      type: 'connect_mcu',
+      data:"connect_mcu"
+    })
+  }
+
+}
+
+async function connect_mcu__init(){
+
+  if(clientStore.isClient){
+
+    await socketStore.connectSocket();
+
+    socketStore.sendMessage({
+      type: 'init_mcu',
+      data:{
+        value:true
+      }
+    })
+  }
+
+}
+
+
+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(){
+
+  await socketStore.connectSocket();
+     socketStore.sendMessage({type: 'connect_bluetooth',})
+
+      clientStore.ipc.on(icpList.socket.message+'_blue_tooth', (event, result) => {
+        console.log('4')
+        console.log(result)
+      });
+
+}
+
+
+
+function socketDisconnect(){
+
+  if(clientStore.isClient){
+
+    socketStore.disconnectSocket()
+  }
+}
+
+
+
+function openSeeting(){
+  console.log('aaaaa')
+  clientStore.ipc.removeAllListeners(icpList.utils.openMain);
+  let params = {
+    title: '设置',
+    width: 900,
+    height: 630,
+    frame: true,
+    id:"seeting",
+    url:"http://localhost:3000/#/setting"
+  }
+  clientStore.ipc.send(icpList.utils.openMain,params);
+}
+function openTplSeeting(){
+
+  const { href } = Router.resolve({
+    name: 'PhotographyDetail',
+    query:{
+      goods_art_nos:['ARN1411512'],
+    }
+  })
+  clientStore.ipc.removeAllListeners(icpList.utils.openMain);
+  let params = {
+    title: '主图和详情设置',
+    width: 900,
+    height: 650,
+    frame: true,
+    id:"photographyDetail",
+    url:getRouterUrl(href)
+  }
+  clientStore.ipc.send(icpList.utils.openMain,params);
+}
+
+
+import  configInfo  from '@/stores/modules/config';
+const configInfoStore = configInfo();
+const  opendigiCamControl = ()=>{
+
+  clientStore.ipc.removeAllListeners(icpList.camera.connect);
+  clientStore.ipc.send(icpList.camera.connect,configInfoStore.digiCamControlPath);
+  clientStore.ipc.on(icpList.camera.digiCamControlPath, async (event, result) => {
+    clientStore.ipc.removeAllListeners(icpList.camera.digiCamControlPath);
+    if(result.code === 0 && result.data){
+      configInfoStore.updateDigiCamControlPath(result.data)
+    }
+
+  })
+}
+
+
+</script>
+
+<style scoped>
+
+</style>

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

@@ -133,9 +133,9 @@ function checkConfirm(init){
     menu.push({
       type:'developer'
     })
-  /*  if(useUserInfoStore.userInfo.brand_company_code === '1300'){
-
-    }*/
+    menu.push({
+      type:'toggleModel'
+    })
   }
   if(!init) previewKey.value++;
 

+ 90 - 56
frontend/src/views/Photography/shot.vue

@@ -1,7 +1,7 @@
 <template>
 
   <headerBar
-      title="拍摄商品"
+      :title="configInfoStore.appModel === 1 ? '拍摄商品' : '处理图像'"
       showUser
       :menu="menu"
   />
@@ -10,68 +10,74 @@
 
   <div class="photography-page flex-col">
     <div class="main-container">
-      <div class="content-wrapper flex-row">
-<!--        <img class="camera-image" referrerpolicy="no-referrer" src="@/assets/images/Photography/camera-icon.png" />-->
-        <div class="step-number flex-col"><span class="text_22">1</span></div>
-        <div class="step-one flex-col justify-between">
-          <div class="step-header flex-row">
-            <span class="step-title">第一步:获取商品货号</span>
-            <img class="step-icon" referrerpolicy="no-referrer" src="@/assets/images/Photography/step1-icon.png" />
-            <img class="step-divider" referrerpolicy="no-referrer"
-              src="@/assets/images/Photography/step-divider-line.png" />
-          </div>
-          <div class="step-content flex-row justify-between">
-            <div class="method-container flex-col">
-              <div class="input-container flex-row">
-                <el-input class="input-item" v-model="goods_art_no" placeholder="请输入货号"> </el-input>
+      <template v-if="configInfoStore.appModel === 1 ">
+
+        <div class="content-wrapper flex-row">
+  <!--        <img class="camera-image" referrerpolicy="no-referrer" src="@/assets/images/Photography/camera-icon.png" />-->
+          <div class="step-number flex-col"><span class="text_22">1</span></div>
+          <div class="step-one flex-col justify-between">
+            <div class="step-header flex-row">
+              <span class="step-title">第一步:获取商品货号</span>
+              <img class="step-icon" referrerpolicy="no-referrer" src="@/assets/images/Photography/step1-icon.png" />
+              <img class="step-divider" referrerpolicy="no-referrer"
+                src="@/assets/images/Photography/step-divider-line.png" />
+            </div>
+            <div class="step-content flex-row justify-between">
+              <div class="method-container flex-col">
+                <div class="input-container flex-row">
+                  <el-input class="input-item" v-model="goods_art_no" placeholder="请输入货号"> </el-input>
 
-              </div>
-              <div class="auto-method flex-row justify-between">
-                <div class="text-method-tag flex-col"><span class="text_4">自动获取</span></div>
-                <span class="method-description">用遥控器扫描商品资料二维码</span>
-              </div>
-              <div class="scan-method flex-row justify-between">
-                <div class="remote-control flex-col">
                 </div>
-<!--                <span class="scan-label">遥控器扫描键</span>-->
+                <div class="auto-method flex-row justify-between">
+                  <div class="text-method-tag flex-col"><span class="text_4">自动获取</span></div>
+                  <span class="method-description">用遥控器扫描商品资料二维码</span>
+                </div>
+                <div class="scan-method flex-row justify-between">
+                  <div class="remote-control flex-col">
+                  </div>
+  <!--                <span class="scan-label">遥控器扫描键</span>-->
+                </div>
               </div>
+              <img class="remote-image" referrerpolicy="no-referrer"
+                src="@/assets/images/Photography/remote-control.png" />
             </div>
-            <img class="remote-image" referrerpolicy="no-referrer"
-              src="@/assets/images/Photography/remote-control.png" />
           </div>
-        </div>
-        <div class="step-number flex-col"><span class="text_22">2</span></div>
-        <div class="step-two flex-col justify-between">
-          <span class="step-title">第二步:启动拍摄(根据按遥控器左右键启动)</span>
-          <div class="shooting-container flex-col">
-            <div class="shooting-tips flex-row justify-between">
-              <img class="info-icon" referrerpolicy="no-referrer" src="@/assets/images/Photography/info-icon.png" />
-              <span class="tips-text">遥控左右按键可启动拍摄,中间按钮可在拍摄5张主图后解锁,用于拍摄自定义图</span>
-            </div>
-            <div class="wifi mar-top-20">
-              <img  referrerpolicy="no-referrer"
-                   src="@/assets/images/Photography/wifi.png" style="width: 60px" />
-            </div>
-            <div class="remote-control-wrap">
-              <RemoteControl
-                  @onRemoteControl="onRemoteControl"
-              />
-            </div>
+          <div class="step-number flex-col"><span class="text_22">2</span></div>
+          <div class="step-two flex-col justify-between">
+            <span class="step-title">第二步:启动拍摄(根据按遥控器左右键启动)</span>
+            <div class="shooting-container flex-col">
+              <div class="shooting-tips flex-row justify-between">
+                <img class="info-icon" referrerpolicy="no-referrer" src="@/assets/images/Photography/info-icon.png" />
+                <span class="tips-text">遥控左右按键可启动拍摄,中间按钮可在拍摄5张主图后解锁,用于拍摄自定义图</span>
+              </div>
+              <div class="wifi mar-top-20">
+                <img  referrerpolicy="no-referrer"
+                     src="@/assets/images/Photography/wifi.png" style="width: 60px" />
+              </div>
+              <div class="remote-control-wrap">
+                <RemoteControl
+                    @onRemoteControl="onRemoteControl"
+                />
+              </div>
 
+            </div>
           </div>
+
         </div>
 
-      </div>
+        <div class="last-photo" v-show="showlastPhoto" v-key="lastPhoto.file_path">
+          <div>{{lastPhtotoName[lastPhoto.image_index] || ''}}</div>
+          <el-image  :src="getFilePath(lastPhoto.file_path)"  fit="contain" ></el-image>
+        </div>
 
-      <div class="last-photo" v-show="showlastPhoto" v-key="lastPhoto.file_path">
-        <div>{{lastPhtotoName[lastPhoto.image_index] || ''}}</div>
-        <el-image  :src="getFilePath(lastPhoto.file_path)"  fit="contain" ></el-image>
-      </div>
-      <div class="history-section flex-col">
+      </template>
+      <div class="history-section flex-col"
+        :class="configInfoStore.appModel === 2 ? 'koutu-section' : ''"
+      >
           <span class="history-title flex between">
             <div>拍摄记录</div>
-            <div class="c-666 fs-12" v-if="goodsList.length">
-                    <el-button :disabled="!(runLoading || takePictureLoading)" @click="oneClickStop" class="input-button" type="primary" size="mini">一键停止</el-button>
+            <div class="c-666 fs-12" v-if="goodsList.length" >
+                    <el-button :disabled="!(runLoading || takePictureLoading)" @click="oneClickStop" v-if="configInfoStore.appModel === 1" class="input-button" type="primary" size="mini">一键停止</el-button>
                     <el-button :disabled="runLoading || takePictureLoading" @click="delAll" class="input-button" type="primary" size="mini">一键删除</el-button>
             </div>
           </span>
@@ -86,8 +92,8 @@
               <div v-else class="history-item clearfix"  v-for="item,index in goodsList" style="padding:10px;">
                 <div class="flex  between flex-item  c-333">
                   <div class="chaochu flex-item flex left">货号:{{ item.goods_art_no }}</div>
-                  <div>
-                    <el-button size="small" :disabled="runLoading || takePictureLoading"  type="primary"  @click="reTakePictureNos(item.goods_art_no,item)" plain>重拍</el-button>
+                  <div >
+                    <el-button size="small" :disabled="runLoading || takePictureLoading"  type="primary"  @click="reTakePictureNos(item.goods_art_no,item)" plain v-if="configInfoStore.appModel === 1">重拍</el-button>
                     <el-button size="small" :disabled="runLoading || takePictureLoading" @click="delGoods({goods_art_nos:[item.goods_art_no]})">删除</el-button>
                   </div>
                 </div>
@@ -102,9 +108,11 @@
 
                     >
                       <el-popover
-                          popper-class="shot-image-popper"
-                          placement="left"
+                          :popper-class="configInfoStore.appModel === 1  ? 'shot-image-popper' : 'koutu-image-popper'"
+                          :placement=" configInfoStore.appModel === 1  ? 'left' : 'right'"
                           :hide-after="0"
+                          width="50%"
+                          offset="20"
                           v-if="image.image_path"
                       >
                         <template #reference>
@@ -151,7 +159,7 @@
             <span class="empty-text">暂无数据</span>
           </div>-->
           <div v-if="goodsList.length" class="next-step button--primary1 flex-col" @click="openPhotographyDetail"><span
-              class="next-step-text">拍摄完毕,进入下一步处理</span></div>
+              class="next-step-text">{{ configInfoStore.appModel === 1 ? '拍摄完毕,进入下一步处理' : '下一步'}}</span></div>
         </div>
 
     </div>
@@ -179,7 +187,26 @@ const takePictureLoading = ref(false)
 import useUserInfo from "@/stores/modules/user";
 const useUserInfoStore = useUserInfo();
 
+import  configInfo  from '@/stores/modules/config';
+const configInfoStore = configInfo();
+
 const menu = computed(()=>{
+  if(configInfoStore.appModel === 2){
+    return [
+      {
+        type:'setting'
+      },
+      {
+        name:'切换到拍摄模式',
+        click(){
+          configInfoStore.updateAppModel(1)
+          Router.push({
+            name:'PhotographyCheck'
+          })
+        }
+      }
+    ]
+  }
   if(useUserInfoStore.userInfo.brand_company_code === '1300'){
     return [
       {
@@ -1163,6 +1190,12 @@ function openPhotographyDetail() {
         width: 332px;
         height: calc(100vh - 30px);
 
+          &.koutu-section {
+            width: 100%;
+            .reset-button {
+              display: none  !important;
+            }
+          }
         .history-title {
           width: calc(100% - 20px);
           height: 22px;
@@ -1322,6 +1355,7 @@ function openPhotographyDetail() {
 
           }
         }
+
       }
 .last-photo{
   position: fixed;

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

@@ -14,7 +14,7 @@
         <img src="@/assets/images/setting/icon3a.png" class="nav-icon" v-else/>
         <span>其他设置</span>
       </div>
-      <div class="nav-item" :class="{'active': activeIndex === 4}" @click="activeIndex = 4">
+      <div class="nav-item" v-if="configInfoStore.appModel === 1" :class="{'active': activeIndex === 4}" @click="activeIndex = 4">
         <img src="@/assets/images/setting/icon4.png" class="nav-icon" v-if="activeIndex !== 4"/>
         <img src="@/assets/images/setting/icon4a.png" class="nav-icon" v-else/>
         <span>左右脚程序设置</span>
@@ -172,6 +172,10 @@ const folderPath = ref(''); // 文件夹路径
 const activeIndex = ref(0); // 当前激活的索引
 const socketStore = socket(); // WebSocket状态管理实例
 
+
+import  configInfo  from '@/stores/modules/config';
+const configInfoStore = configInfo();
+
 /**
  * 表单数据对象,用于存储设备配置信息。
  */