From 3fba99c4b89dfcc56d08cfe99c7391dbae082713 Mon Sep 17 00:00:00 2001
From: wu <731351411@qq.com>
Date: 星期五, 11 十月 2024 08:09:24 +0800
Subject: [PATCH] 增加报工管理前后台,中英文等

---
 JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/job/PLCScanQrCodesReport.java                 |   11 +
 JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/md/service/PrimitiveTaskService.java          |   17 +++
 JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/md/controller/PrimitiveTaskController.java    |   28 +++++
 JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/md/service/impl/TaskingServiceImpl.java       |    5 +
 UI-Project/src/lang/zh.js                                                                                                |    8 +
 UI-Project/src/router/index.js                                                                                           |   26 ++--
 UI-Project/src/views/ScanQrCodesReport/scanQrCodesReport.vue                                                             |   66 ++++++++-----
 JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/job/PLCManualReporting.java                   |   59 +++++++++++
 JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/md/service/impl/PrimitiveTaskServiceImpl.java |   24 ++++
 9 files changed, 196 insertions(+), 48 deletions(-)

diff --git a/JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/job/PLCManualReporting.java b/JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/job/PLCManualReporting.java
new file mode 100644
index 0000000..e83d7c1
--- /dev/null
+++ b/JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/job/PLCManualReporting.java
@@ -0,0 +1,59 @@
+package com.mes.job;
+
+import cn.hutool.json.JSONObject;
+import com.mes.common.S7object;
+import com.mes.device.PlcParameterObject;
+import com.mes.md.entity.PrimitiveTask;
+import com.mes.md.mapper.MachineMapper;
+import com.mes.md.service.PrimitiveTaskService;
+import com.mes.md.service.TaskingService;
+import com.mes.tools.WebSocketServer;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author SNG-010
+ */
+@Component
+@Slf4j
+public class PLCManualReporting {
+
+    PlcParameterObject plcParameterObject = S7object.getinstance().PlcMesObject;
+    @Autowired
+    TaskingService taskingService;
+    @Autowired
+    MachineMapper machineMapper;
+    @Autowired
+    PrimitiveTaskService primitiveTaskService;
+
+    //@Scheduled(fixedDelay = 500)
+    @Scheduled(fixedDelay = 1000)
+    public void manualReporting() {
+
+        JSONObject jsonObject = new JSONObject();
+        List<PrimitiveTask> taskingList = primitiveTaskService.selectPrimitiveTask(new PrimitiveTask());
+        jsonObject.append("taskingList", taskingList);
+        ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("manualReporting");
+        if (sendwServer != null) {
+            for (WebSocketServer webserver : sendwServer) {
+                if (webserver != null) {
+                    webserver.sendMessage(jsonObject.toString());
+                    List<String> messages = webserver.getMessages();
+                    if (!messages.isEmpty()) {
+                        // // 灏嗘渶鍚庝竴涓秷鎭浆鎹负鏁存暟绫诲瀷鐨勫垪琛�
+                        webserver.clearMessages();
+                    }
+                } else {
+                    log.info("Home is closed");
+                }
+            }
+
+        }
+    }
+
+}
\ No newline at end of file
diff --git a/JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/job/PLCScanQrCodesReport.java b/JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/job/PLCScanQrCodesReport.java
index ed2e439..8977be5 100644
--- a/JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/job/PLCScanQrCodesReport.java
+++ b/JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/job/PLCScanQrCodesReport.java
@@ -4,10 +4,12 @@
 import com.mes.md.entity.Machine;
 import com.mes.md.entity.Tasking;
 import com.mes.md.mapper.MachineMapper;
+import com.mes.md.service.PrimitiveTaskService;
 import com.mes.md.service.TaskingService;
 import com.mes.tools.WebSocketServer;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 import com.mes.device.PlcParameterObject;
 
@@ -27,14 +29,15 @@
     TaskingService taskingService;
     @Autowired
     MachineMapper machineMapper;
+    @Autowired
+    PrimitiveTaskService primitiveTaskService;
     //@Scheduled(fixedDelay = 500)
     public void pLCScanQR() {
         //鑾峰彇褰撳墠浠诲姟琛ㄦ渶鏂扮殑涓�鍧椾换鍔$姸鎬�
         //鎵爜绾跨▼
-        //鐢垫皵鍘绘牴鎹笂涓�涓换鍔′紶閫掍笅鏉ョ殑鐘舵�佽嚜宸卞垽鏂渶涓嶉渶瑕佹壂鐮�,濡傛灉闇�瑕佹壂鐮佺洿鎺ヤ紶杈撴壂鐮乮d
         String scanId = plcParameterObject.getPlcParameter("scanId").getValue();
         if(!Objects.equals(scanId, "")){
-           boolean result = taskingService.insertTaskingPro(scanId);
+           boolean result = primitiveTaskService.updateReportCount(scanId);
            if (result){
                //娣诲姞鎴愬姛鏃跺彂閫佽繃鐗囦俊鍙�
                S7object.getinstance().plccontrol.writeWord(plcParameterObject.getPlcParameter("scan").getAddress(), Integer.parseInt("1"));
@@ -45,7 +48,7 @@
         }
 
     }
-//    @Scheduled(fixedDelay = 1000)
+    @Scheduled(fixedDelay = 1000)
     public void scanQrCode() {
         //鑾峰彇褰撳墠浠诲姟琛ㄦ渶鏂扮殑涓�鍧椾换鍔$姸鎬�
         JSONObject jsonObject = new JSONObject();
@@ -56,7 +59,7 @@
 //            //log.info("鎶ヨ淇℃伅锛�"+warning);
 //            jsonObject.append("warning", warning);
 //        }
-        Machine machine=machineMapper.selectById(25L);
+        Machine machine=machineMapper.selectById(23L);
         List<Tasking> taskingList=taskingService.findMachineTask(machine);
         jsonObject.append("taskingList", taskingList);
         jsonObject.append("machine", machine);
diff --git a/JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/md/controller/PrimitiveTaskController.java b/JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/md/controller/PrimitiveTaskController.java
index cc4935b..ca0f4f2 100644
--- a/JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/md/controller/PrimitiveTaskController.java
+++ b/JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/md/controller/PrimitiveTaskController.java
@@ -1,9 +1,17 @@
 package com.mes.md.controller;
 
 
-import org.springframework.web.bind.annotation.RequestMapping;
+import com.mes.md.entity.Machine;
+import com.mes.md.entity.PrimitiveTask;
+import com.mes.md.entity.Tasking;
+import com.mes.md.service.PrimitiveTaskService;
+import com.mes.md.service.TaskingService;
+import com.mes.utils.Result;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
 
-import org.springframework.web.bind.annotation.RestController;
+import java.util.List;
 
 /**
  * <p>
@@ -16,6 +24,22 @@
 @RestController
 @RequestMapping("/primitiveTask")
 public class PrimitiveTaskController {
+    @Autowired
+    private PrimitiveTaskService primitiveTaskService;
+    @ApiOperation("鏌ヨ褰撳墠璁惧锛屾湭瀹屽伐鐘舵�佺殑绾夸笂浠诲姟")
+    @PostMapping("/selectPrimitiveTask")
+    @ResponseBody
+    public Result findMachineTask(@RequestBody PrimitiveTask primitiveTask) {
+        List<PrimitiveTask> list =primitiveTaskService.selectPrimitiveTask(primitiveTask);
+        return Result.build(200,"鎴愬姛",list);
+    }
 
+    @ApiOperation("鏍规嵁鎵规鍙疯繘琛屾墜鍔ㄦ姤宸�")
+    @PostMapping("/updatePrimitiveTask")
+    @ResponseBody
+    public Result updatePrimitiveTask(@RequestBody PrimitiveTask primitiveTask) {
+        boolean list =primitiveTaskService.updatePrimitiveTask(primitiveTask);
+        return Result.build(200,"鎴愬姛",list);
+    }
 }
 
diff --git a/JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/md/service/PrimitiveTaskService.java b/JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/md/service/PrimitiveTaskService.java
index a5c216e..6b3cb37 100644
--- a/JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/md/service/PrimitiveTaskService.java
+++ b/JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/md/service/PrimitiveTaskService.java
@@ -4,6 +4,8 @@
 import com.mes.md.entity.PrimitiveTask;
 import com.baomidou.mybatisplus.extension.service.IService;
 
+import java.util.List;
+
 /**
  * <p>
  * 鍘熷浠诲姟琛� 鏈嶅姟绫�
@@ -13,7 +15,20 @@
  * @since 2024-08-28
  */
 public interface PrimitiveTaskService extends MPJBaseService<PrimitiveTask> {
-    // 鏇存柊鎶ュ伐鏁伴噺
+    /**
+     *鎵爜鏇存柊瀹氬埗鐜荤拑鐨勬姤宸ユ暟閲�
+     * @return
+     */
     boolean updateReportCount(String scanId);
+    /**
+            *鎵嬪姩鏇存柊鎶ュ伐鏁伴噺
+     * @return
+             */
+    boolean updatePrimitiveTask(PrimitiveTask task);
+    /**
+     *鏌ヨ寰呮姤宸ョ殑鏁版嵁
+     * @return
+     */
+    List<PrimitiveTask> selectPrimitiveTask(PrimitiveTask task);
 
 }
diff --git a/JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/md/service/impl/PrimitiveTaskServiceImpl.java b/JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/md/service/impl/PrimitiveTaskServiceImpl.java
index 9e86eba..9190452 100644
--- a/JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/md/service/impl/PrimitiveTaskServiceImpl.java
+++ b/JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/md/service/impl/PrimitiveTaskServiceImpl.java
@@ -1,11 +1,15 @@
 package com.mes.md.service.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.github.yulichang.base.MPJBaseServiceImpl;
 import com.mes.md.entity.PrimitiveTask;
 import com.mes.md.mapper.PrimitiveTaskMapper;
 import com.mes.md.service.PrimitiveTaskService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.stereotype.Service;
+
+import java.util.List;
 
 /**
  * <p>
@@ -21,6 +25,24 @@
     @Override
     public boolean updateReportCount(String scanId) {
         //鏇存柊鎶ュ伐鏁伴噺
-        return false;
+        UpdateWrapper<PrimitiveTask> wrapper = new UpdateWrapper<>();
+        wrapper.eq("scan_id", scanId)
+                .set("report_count",1);
+        return update(wrapper);
+    }
+
+    @Override
+    public boolean updatePrimitiveTask(PrimitiveTask task) {
+        //鎵嬪姩鎶ュ伐鏇存敼鏁伴噺
+        UpdateWrapper<PrimitiveTask> wrapper = new UpdateWrapper<>();
+        wrapper.eq("batch_number", task.getBatchNumber())
+                .set("report_count", task.getReportCount());
+        return update(wrapper);
+    }
+
+    @Override
+    public List<PrimitiveTask> selectPrimitiveTask(PrimitiveTask task) {
+        //鏌ヨ鎶ュ伐鏁版嵁
+        return list(new QueryWrapper<>(task)) ;
     }
 }
diff --git a/JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/md/service/impl/TaskingServiceImpl.java b/JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/md/service/impl/TaskingServiceImpl.java
index 900cf68..f35a9ac 100644
--- a/JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/md/service/impl/TaskingServiceImpl.java
+++ b/JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/md/service/impl/TaskingServiceImpl.java
@@ -179,6 +179,11 @@
         return resultCount;
     }
 
+    public int test(List<Tasking> taskingList) {
+        int resultCount=0;
+        //
+        return resultCount;
+    }
 
 //
 //    @Override
diff --git a/UI-Project/src/lang/zh.js b/UI-Project/src/lang/zh.js
index de8f2ba..1ba58f0 100644
--- a/UI-Project/src/lang/zh.js
+++ b/UI-Project/src/lang/zh.js
@@ -142,7 +142,8 @@
         workState: '浠诲姟鐘舵��',
         lineConfigurationId: '鎵�鍦ㄤ綅缃�',
         state: '鐢熶骇鐘舵��',
-        glassState: '鐜荤拑鐘舵��'
+        glassState: '鐜荤拑鐘舵��',
+        reportCount: '鎶ュ伐鏁伴噺',
     },
     machine: {
         upperSlice:'鑷姩涓婄墖鏈�',
@@ -159,6 +160,7 @@
         rotate:'鏃嬭浆鍙�',
         lamination:'璐磋啘鏈�',
         scanQrCodesReport:'鎵爜鎶ュ伐',
+        manualReporting:'鎵嬪姩鎶ュ伐',
     },
     functionState:{
         deleteTips:'鏄惁纭鐮存崯锛�',
@@ -175,7 +177,9 @@
         topLine :'涓婄嚎',
         start :'寮�宸�',
         stop :'鏆傚仠',
-        bound:'缁戝畾'
+        bound:'缁戝畾',
+        reporting:'鎶ュ伐',
+        reportingcount:'鎶ュ伐鏁伴噺',
 
     }
     ,
diff --git a/UI-Project/src/router/index.js b/UI-Project/src/router/index.js
index 332ae58..a43459d 100644
--- a/UI-Project/src/router/index.js
+++ b/UI-Project/src/router/index.js
@@ -192,19 +192,19 @@
         //     }
         //   ]
         // },
-        // {
-        //   /*----------- 鎶ュ伐绠$悊 ----------------*/
-        //   path: 'ZiDongShangpian',
-        //   name: 'zidongshangpian',
-        //   component: () => import('../views/Marking/marking.vue'),
-        //   children: [
-        //     {
-        //       path: '/Marking/marking',
-        //       name: 'marking',
-        //       component: () => import('../views/Marking/marking.vue'),
-        //     }
-        //   ]
-        // },
+        {
+          /*----------- 鎶ュ伐绠$悊 ----------------*/
+          path: 'ManualReporting',
+          name: 'manualReporting',
+          component: () => import('../views/ManualReporting/manualReporting.vue'),
+          children: [
+            {
+              path: '/ManualReporting/manualReporting',
+              name: 'manualReporting',
+              component: () => import('../views/ManualReporting/manualReporting.vue'),
+            }
+          ]
+        },
         // {
         //   /*----------- 鎶ヨ〃绠$悊 ----------------*/
         //   path: 'ZiDongShangpian',
diff --git a/UI-Project/src/views/ScanQrCodesReport/scanQrCodesReport.vue b/UI-Project/src/views/ScanQrCodesReport/scanQrCodesReport.vue
index 6919e53..f0ac399 100644
--- a/UI-Project/src/views/ScanQrCodesReport/scanQrCodesReport.vue
+++ b/UI-Project/src/views/ScanQrCodesReport/scanQrCodesReport.vue
@@ -17,12 +17,13 @@
 const machineId=23;//褰撳墠椤甸潰鐨勮澶嘔D
 //浣跨敤WebSocket鏂瑰紡灞曠ず鏁版嵁
 let socket = null;
-const socketUrl = `ws://${WebSocketHost}:${host}/api/deviceInteraction/api/talk/edging`;
+const socketUrl = `ws://${WebSocketHost}:${host}/api/deviceInteraction/api/talk/scanQrCodesReport`;
 // 瀹氫箟娑堟伅澶勭悊鍑芥暟锛屾洿鏂� receivedData 鍙橀噺
 const handleMessage = (data) => {
   // 鏇存柊 tableData 鐨勬暟鎹�
   loadData.value = data.taskingList[0];
   findMachine.value = data.machine[0];
+  // console.log(data);
 };
 onUnmounted(() => {
   if (socket) {
@@ -37,6 +38,7 @@
 onMounted(async () => {
   //浣跨敤WebSocket鏂瑰紡灞曠ず鏁版嵁
   socket = initializeWebSocket(socketUrl, handleMessage);// 鍒濆鍖� WebSocket锛屽苟浼犻�掓秷鎭鐞嗗嚱鏁�
+
 
   //浣跨敤鎺ュ彛鏂瑰紡灞曠ず鏁版嵁
   //load();
@@ -86,11 +88,11 @@
     return;
   }
   ElMessageBox.confirm(
-        t('marking.tips'),
+        t('functionState.tips'),
         t('delivery.prompt'),  
         {
-          confirmButtonText: t('marking.sure'),
-          cancelButtonText: t('marking.cancel'),
+          confirmButtonText: t('functionState.sure'),
+          cancelButtonText: t('functionState.cancel'),
           type: 'warning',
         }
       )
@@ -110,7 +112,7 @@
         .catch(() => {
           ElMessage({
             type: 'info',
-            message: t('marking.cancel'),
+            message: t('functionState.cancel'),
           })
         })
 
@@ -119,11 +121,11 @@
 //寮�宸�/鏆傚仠
 const machineStatus = async(state) => {
   ElMessageBox.confirm(
-        t('marking.tips'),
+        t('functionState.tips'),
         t('delivery.prompt'),  
         {
-          confirmButtonText: t('marking.sure'),
-          cancelButtonText: t('marking.cancel'),
+          confirmButtonText: t('functionState.sure'),
+          cancelButtonText: t('functionState.cancel'),
           type: 'warning',
         }
       )
@@ -144,18 +146,18 @@
         .catch(() => {
           ElMessage({
             type: 'info',
-            message: t('marking.cancel'),
+            message: t('functionState.cancel'),
           })
         })
 }
 //鐮存崯
 const damagedTask = async(row) => {
   ElMessageBox.confirm(
-        t('marking.tips'),
+        t('functionState.tips'),
         t('delivery.prompt'),  
         {
-          confirmButtonText: t('marking.sure'),
-          cancelButtonText: t('marking.cancel'),
+          confirmButtonText: t('functionState.sure'),
+          cancelButtonText: t('functionState.cancel'),
           type: 'warning',
         }
       )
@@ -175,18 +177,18 @@
         .catch(() => {
           ElMessage({
             type: 'info',
-            message: t('marking.cancel'),
+            message: t('functionState.cancel'),
           })
         })
 }
 //涓嬬嚎(鎷胯蛋)
 const glassDownLine = async(row) => {
   ElMessageBox.confirm(
-        t('marking.tips'),
+        t('functionState.tips'),
         t('delivery.prompt'),  
         {
-          confirmButtonText: t('marking.sure'),
-          cancelButtonText: t('marking.cancel'),
+          confirmButtonText: t('functionState.sure'),
+          cancelButtonText: t('functionState.cancel'),
           type: 'warning',
         }
       )
@@ -206,7 +208,7 @@
         .catch(() => {
           ElMessage({
             type: 'info',
-            message: t('marking.cancel'),
+            message: t('functionState.cancel'),
           })
         })
 }
@@ -219,14 +221,14 @@
 <template>
   <div ref="content" style="padding:0 20px;">
     <div id="div-title" style="font-size: 20px; font-weight: bold; margin:10px 0 10px 0;padding-left: 20px;">
-      {{$t('machine.edging')}}
+      {{$t('machine.scanQrCodesReport')}}
     </div>
     <hr />
     <br>
     <div id="search" >
       <!-- 鍔熻兘 -->
-      <el-button type="primary" id="ButtonMachineStatus" @click="machineStatus((findMachine['state']=='鏆傚仠'?'寮�宸�':'鏆傚仠'))">{{findMachine['state']=='寮�宸�'?$t('functionState.start'):$t('functionState.stop')}}</el-button>
-      <el-button type="primary" id="ButtonTopLine" @click="topLine">{{$t('functionState.topLine')}}</el-button>
+      <!-- <el-button :type="(findMachine['state']=='鏆傚仠'?'danger':'success')" id="ButtonMachineStatus" @click="machineStatus((findMachine['state']=='鏆傚仠'?'寮�宸�':'鏆傚仠'))">{{findMachine['state']=='寮�宸�'?$t('functionState.start'):$t('functionState.stop')}}</el-button>
+      <el-button type="primary" id="ButtonTopLine" @click="topLine">{{$t('functionState.topLine')}}</el-button> -->
       <!-- <el-button type="primary" id="searchButton" @click="downLine('涓嬬嚎')">涓嬬嚎</el-button>
       <el-button type="primary" id="searchButton" @click="workStatus('鐮存崯')">鐮存崯</el-button>
       <el-button type="primary" id="searchButton" @click="workStatus('瀹屽伐')">瀹屽伐</el-button> -->
@@ -245,27 +247,41 @@
         <el-table-column prop="width" :label="$t('glassInfo.width')"/>
         <el-table-column prop="thickness" :label="$t('glassInfo.thickness')"/>
         <el-table-column prop="workState" :label="$t('glassInfo.workState')"/>
-        <el-table-column fixed="right" :label="$t('productStock.operate')" align="center" width="270">
+        <!-- <el-table-column fixed="right" :label="$t('productStock.operate')" align="center" width="270">
           <template #default="scope">
             <el-button size="mini" link type="primary" plain @click="workStatus(scope.row, '閲嶅彂')" >{{$t('functionState.anew')}}</el-button>
             <el-button size="mini" link type="primary" plain @click="workStatus(scope.row, '瀹屽伐')">{{$t('functionState.finish')}}</el-button>
             <el-button size="mini" link type="primary" plain @click="damagedTask(scope.row)">{{$t('functionState.lose')}}</el-button>
             <el-button size="mini" link type="primary" plain @click="glassDownLine(scope.row)">{{$t('functionState.downLine')}}</el-button>
           </template>
-        </el-table-column>
+        </el-table-column> -->
       </el-table>
     </div>
 
-    <div id="main-body"
-      style="width: 50%; height: 460px; margin: auto;background-image: url(../../src/assets/鎵爜璇嗗埆.png) ;background-size: 100% 100%;">
+    <div id="main-body1" 
+      style="width: 70%; height: 400px;margin:20px auto;background-size: 100% 100%;">
       <!-- 鐢诲浘鍐呭 -->
-      <div style="width: 150px; height: 100px; background-color: red; position: relative; top: 171px; left: 328px">
+      <div :style="{
+        width: loadData.length > 0 ? loadData[0]['length'] + 'px' : '200px',
+        height: loadData.length > 0 ? loadData[0]['width'] + 'px' : '100px',
+        backgroundColor: 'red',
+        position: 'relative',
+        top: '60px', 
+        left: '28px',
+        textAlign: 'center'
+      }">
+        <p v-if="loadData.length > 0">{{ loadData[0]['scanId'] }}</p>
+        <p v-if="loadData.length > 0">
+          {{ loadData[0]['length'] }} * {{ loadData[0]['width'] }}
+        </p>
+        <p v-else>鏆傛棤鏁版嵁</p> <!-- 鍙�夛細鏄剧ず榛樿娑堟伅 -->
       </div>
     </div>
   </div>
 </template>
 
 <style scoped>
+
 table {
   text-align: center;
   width: 100%;

--
Gitblit v1.8.0