Browse Source

mod:调整

panqiuyao 8 months ago
parent
commit
ecb6d92324

+ 5 - 0
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;

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

@@ -5,7 +5,7 @@ import { authGuard } from './plugins/authGuard'
 const routes: RouteRecordRaw[] = [
     {
         path: "/",
-        redirect: "/photography/check"
+        redirect: "/photography/shot"
     },
     {
         path: "/home",
@@ -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: '详情高级配置'
+        }
     },
 ];
 

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

@@ -1,4 +1,17 @@
 <template>
+
+  <headerBar
+      title="拍摄商品"
+      :menu="[
+        {
+          type:'setting'
+        },
+        {
+          name:'详情高级配置',
+          click:openPhotographySeniorDetail
+        }
+    ]"
+  />
   <div class="detail-container">
     <div style="padding: 20px;">
       <!-- 主图LOGO部分 -->
@@ -86,14 +99,15 @@
 </template>
 
 <script lang="ts" setup>
-
-
+import headerBar from '@/components/header-bar/index.vue'
 import { ref, computed, reactive } 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();
+import { getRouterUrl } from '@/utils/appfun'
+import {useRouter} from "vue-router";
 const test_image_url = ref('https://ossimg.valimart.net/uploads/vali_ai/20230927/169580582298394.png')
 
 // 模拟数据
@@ -168,6 +182,27 @@ 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);
+}
 </script>
 
 <style lang="scss" scoped>

+ 7 - 3
frontend/src/views/Photography/seniorDetail.vue

@@ -1,4 +1,7 @@
 <template>
+  <headerBar
+      title="主图与详情高级配置"
+  />
   <div class="image-config">
     <div class="config-card">
       <!-- 图片抠图与货号图生成 -->
@@ -92,10 +95,10 @@
       <!-- 底部按钮 -->
       <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>
 
 
@@ -106,6 +109,7 @@
 </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'
@@ -308,4 +312,4 @@ const selectFolder = () => {
   padding-right: 20px;
   color: #2957FF !important;
 }
-</style>
+</style>

+ 31 - 1
frontend/src/views/Photography/shot.vue

@@ -5,6 +5,10 @@
       :menu="[
         {
           type:'setting'
+        },
+        {
+          name:'跳转主图详情',
+          click:openPhotographyDetail
         }
     ]"
   />
@@ -159,7 +163,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 +174,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 +364,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">

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

@@ -796,11 +796,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;