From 19724b0969eb2f91b38efb262a6ef4de04d6b0c5 Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期二, 14 十月 2025 12:07:58 +0800
Subject: [PATCH] 新增“有货状态”显示及数据处理逻辑支持在Home.vue和 LineComponent.vue中新增了“有货状态”显示功能,为 RGV 和堆垛机对象添加了 InStock属性。 修改了 Home.vue 的 created生命周期和 LineComponent.vue的 update 方法,增加了对 inStock数据的处理逻辑。删除了三个旧的二进制文件,新增了六个新的二进制文件,可能与项目构建或依赖更新相关。优化了任务分配和状态判断逻辑,确保任务执行更加准确和高效。

---
 项目代码/WCS/WIDESEAWCS_Client/src/views/LineComponent.vue |   73 ++++++++++++++++++++++++++++++++----
 1 files changed, 65 insertions(+), 8 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Client/src/views/LineComponent.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Client/src/views/LineComponent.vue"
index 0aebd5a..b10bd49 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Client/src/views/LineComponent.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Client/src/views/LineComponent.vue"
@@ -21,7 +21,7 @@
     <div class="line"></div>
     <!-- <div class="dot" :style="{ right: dotPosition + 'px' }" ref="childDot" @click="mouseClick"></div> -->
     <div :class="update()"
-      :style="{ transform: `translateX(${StackerCrane.CurrentColumn < 33 ? StackerCrane.CurrentColumn * 30 - 29 : 0}px)` }"
+      :style="{ transform: `translateX(${StackerCrane.CurrentColumn < 33 ? StackerCrane.CurrentColumn * 30 - 59 : 0}px)` }"
       ref="childDot" @click="mouseClick"></div>
   </div>
   <div>
@@ -78,8 +78,15 @@
         <el-col :span="12" :offset="0" :push="0" :pull="0" tag="div">
           <el-form-item label="褰撳墠琛屽垪灞傦細">
             <j-el-description
-              :value="StackerCrane.CurrentRow + '-' + StackerCrane.CurrentColumn + '-' + StackerCrane.CurrentLayer"
+              :value="StackerCrane.CurrentRow + '-' + StackerCrane.CurrentLayer + '-' + StackerCrane.CurrentColumn "
               type="primary" ellipsis></j-el-description>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row :gutter="20" type="flex" justify="start" align="top" tag="div" style="margin-bottom: 10px;">
+        <el-col :span="24" :offset="0" :push="0" :pull="0" tag="div">
+          <el-form-item label="鏈夎揣鐘舵��:">
+            <j-el-description :value="StackerCrane.InStock" type="primary" ellipsis></j-el-description>
           </el-form-item>
         </el-col>
       </el-row>
@@ -91,8 +98,18 @@
         </el-col>
       </el-row>
       <el-divider />
-      <h4 style="margin-bottom: 50px;">鎵嬪姩鎿嶄綔</h4>
+      <h4 style="margin-bottom: 20px;">鎵嬪姩鎿嶄綔</h4>
       <el-form ref="form" :model="form" label-width="90px">
+        <el-row :gutter="24" type="flex" justify="start" align="top" tag="div">
+          <el-col :span="16" :offset="0" :push="0" :pull="0" tag="div">
+            <el-form-item label="鍧愭爣:">
+              <!-- <j-el-description type="primary" ellipsis></j-el-description> -->
+              <span style="font-size: 20px;color: #fc0303;">涓�妤煎簱鍓嶅嚭搴撳潗鏍囷細2-1-1銆� 鍏ュ簱鍧愭爣锛�3-1-1</span>
+              <span style="font-size: 20px;color: #fc0303;">涓�妤煎簱鍚庡嚭搴撳潗鏍囷細3-1-34銆佸叆搴撳潗鏍囷細2-1-34</span>
+              <span style="font-size: 20px;color: #fc0303;">浜屾ゼ搴撳墠鍑哄簱鍧愭爣锛�2-2-1銆� 鍏ュ簱鍧愭爣锛�3-2-1</span>
+            </el-form-item>
+          </el-col>
+        </el-row>
         <el-row :gutter="20" type="flex" justify="start" align="top" tag="div">
           <el-col :span="16" :offset="0" :push="0" :pull="0" tag="div">
             <el-form-item label="浠诲姟鍛戒护"  prop="TargetAddress">
@@ -123,21 +140,30 @@
       </el-form>
       <el-divider />
       <el-row :gutter="20" type="flex" justify="start" align="top" tag="div">
-        <el-col :span="8" :offset="0" :push="0" :pull="0" tag="div">
+        <el-col :span="5" :offset="0" :push="0" :pull="0" tag="div">
           <el-button type="primary" size="small" plain @click="start">
             <i class="el-icon-check">鍚姩</i>
           </el-button>
 
         </el-col>
-        <el-col :span="8" :offset="0" :push="0" :pull="0" tag="div">
+        <el-col :span="5" :offset="0" :push="0" :pull="0" tag="div">
           <el-button type="warning" size="small" plain @click="reset">
             <i class="el-icon-check">澶嶄綅</i>
           </el-button>
-
         </el-col>
-        <el-col :span="8" :offset="0" :push="0" :pull="0" tag="div">
+        <el-col :span="5" :offset="0" :push="0" :pull="0" tag="div">
+          <el-button type="danger" size="small" plain @click="disconnected">
+            <i class="el-icon-check">涓柇</i>
+          </el-button>
+        </el-col>
+        <el-col :span="5" :offset="0" :push="0" :pull="0" tag="div">
           <el-button type="danger" size="small" plain @click="emergencyStop">
             <i class="el-icon-check">鎬ュ仠</i>
+          </el-button>
+        </el-col>
+        <el-col :span="4" :offset="0" :push="0" :pull="0" tag="div">
+          <el-button type="danger" size="small" plain @click="StackerRecall">
+            <i class="el-icon-check">鍙洖</i>
           </el-button>
         </el-col>
       </el-row>
@@ -176,6 +202,7 @@
         DeviceName: "",
         DeviceCode: "",
         StackerAlarm:"",
+        InStock:"",
       },
       form: {
         TaskType: "",
@@ -208,8 +235,10 @@
       this.StackerCrane.CurrentLayer = x.CurrentLayer == undefined ? 1 : x.CurrentLayer;
       this.StackerCrane.LevelPoint = x.LevelPoint;
       this.StackerCrane.DeviceName = x.DeviceName;
+      this.StackerCrane.CurrentTaskNum = x.CurrentTaskNum;
       this.StackerCrane.StackerAlarm = x.StackerAlarm;
       this.form.DeviceCode = x.DeviceCode;
+      this.StackerCrane.InStock = x.InStock;
     },
     update() {
       if (this.StackerCrane.Automatic == "鑱旀満妯″紡" && this.StackerCrane.Fault != "鏁呴殰" && this.StackerCrane.Running == "寰呮満") {
@@ -261,7 +290,7 @@
           this.fullscreenLoading = false;
         });
     },
-
+    
     emergencyStop() {
       this.fullscreenLoading = true;
       this.http.post("api/DeviceInfo/StackerEmergencyStop?DeviceCode=" + this.form.DeviceCode)
@@ -278,6 +307,34 @@
         .finally(() => {
           this.fullscreenLoading = false;
         });
+    },
+    disconnected() {
+      this.fullscreenLoading = true;
+      this.http.post("api/DeviceInfo/StackerDisconnected?DeviceCode=" + this.form.DeviceCode)
+        .then((x) => {
+          if (!x.status) {
+            this.$message.error(x.message);
+          } else {
+            this.$Message.success("涓柇鍫嗗灈鏈轰换鍔�");
+          }
+        })
+        .finally(() => {
+          this.fullscreenLoading = false;
+        });
+    },
+    StackerRecall() {
+      this.fullscreenLoading = true;
+      this.http.post("api/DeviceInfo/StackerRecall?DeviceCode=" + this.form.DeviceCode)
+        .then((x) => {
+          if (!x.status) {
+            this.$message.error(x.message);
+          } else {
+            this.$Message.success("鍙洖鍫嗗灈鏈�");
+          }
+        })
+        .finally(() => {
+          this.fullscreenLoading = false;
+        });
     }
   },
 };

--
Gitblit v1.9.3