From b31d961a3f0bcd2e555ea12b76c30c453826deba Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期一, 28 七月 2025 09:42:58 +0800
Subject: [PATCH] 代码提交

---
 项目代码/WCS/WIDESEAWCS_Client/src/views/LineComponent.vue |  131 +++++++++++++++++++++++++++----------------
 1 files changed, 81 insertions(+), 50 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 573faf3..5c5043c 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"
@@ -1,7 +1,7 @@
 <template>
   <div>
     <el-row>
-      <template v-for="item in 56" :key="item">
+      <template v-for="item in 32" :key="item">
         <el-col :span="0.9">
           <span class="image-text"></span>
           <img src="../../public/璐ф灦.jpeg" />
@@ -9,7 +9,7 @@
       </template>
     </el-row>
     <el-row style="padding-bottom: 5px;">
-      <template v-for="item in 56" :key="item">
+      <template v-for="item in 32" :key="item">
         <el-col :span="0.9">
           <span class="image-text"></span>
           <img src="../../public/璐ф灦.jpeg" />
@@ -19,11 +19,12 @@
   </div>
   <div class="line-container">
     <div class="line"></div>
-    <div class="dot" :style="{ right: dotPosition + 'px' }" ref="childDot" @click="mouseClick"></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)` }" ref="childDot" @click="mouseClick"></div>
   </div>
   <div>
     <el-row style="padding-top: 5px;">
-      <template v-for="item in 56" :key="item">
+      <template v-for="item in 32" :key="item">
         <el-col :span="0.9">
           <span class="image-text"></span>
           <img src="../../public/璐ф灦.jpeg" />
@@ -31,7 +32,7 @@
       </template>
     </el-row>
     <el-row style="padding-bottom: 5px;">
-      <template v-for="item in 56" :key="item">
+      <template v-for="item in 32" :key="item">
         <el-col :span="0.9">
           <span class="image-text"></span>
           <img src="../../public/璐ф灦.jpeg" />
@@ -41,17 +42,17 @@
   </div>
 
   <el-dialog v-model="dialogVisible" title="淇℃伅鏌ョ湅" :before-close="handleClose">
-    <el-form ref="$form" :model="stackerItemInfo" label-position="left" label-width="100px" size="medium">
+    <el-form ref="$form" :model="StackerCrane" label-position="left" label-width="100px" size="medium">
       <el-row :gutter="20" type="flex" justify="start" align="top" tag="div">
         <el-col :span="12" :offset="0" :push="0" :pull="0" tag="div">
           <el-form-item label="璁惧缂栧彿锛�">
             <!-- <el-input v-model="equipNo"></el-input> -->
-            <j-el-description :value="equipNo" type="primary" ellipsis></j-el-description>
+            <j-el-description :value="StackerCrane.DeviceName" type="primary" ellipsis></j-el-description>
           </el-form-item>
         </el-col>
         <el-col :span="12" :offset="0" :push="0" :pull="0" tag="div">
           <el-form-item label="璁惧鐘舵��:">
-            <j-el-description :value="stackerItemInfo.r_Stack_EquipmentStatus" type="primary"
+            <j-el-description :value="StackerCrane.Fault" type="primary"
               ellipsis></j-el-description>
           </el-form-item>
         </el-col>
@@ -59,25 +60,25 @@
       <el-row :gutter="20" type="flex" justify="start" align="top" tag="div">
         <el-col :span="12" :offset="0" :push="0" :pull="0" tag="div">
           <el-form-item label="宸ヤ綔妯″紡:">
-            <j-el-description :value="stackerItemInfo.r_Stack_WorkPattern" type="primary" ellipsis></j-el-description>
+            <j-el-description :value="StackerCrane.Automatic" type="primary" ellipsis></j-el-description>
           </el-form-item>
         </el-col>
         <el-col :span="12" :offset="0" :push="0" :pull="0" tag="div">
           <el-form-item label="浠诲姟鍙凤細">
-            <j-el-description :value="stackerItemInfo.r_Stack_tasknumber" type="primary" ellipsis></j-el-description>
+            <j-el-description :value="StackerCrane.CurrentTaskNum" 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">
         <el-col :span="12" :offset="0" :push="0" :pull="0" tag="div">
           <el-form-item label="浣滀笟鐘舵��:">
-            <j-el-description :value="stackerItemInfo.r_Stack_jobstate" type="primary" ellipsis></j-el-description>
+            <j-el-description :value="StackerCrane.Running" type="primary" ellipsis></j-el-description>
           </el-form-item>
         </el-col>
         <el-col :span="12" :offset="0" :push="0" :pull="0" tag="div">
           <el-form-item label="褰撳墠琛屽垪灞傦細">
             <j-el-description
-              :value="stackerItemInfo.r_Stack_linenum + '-' + stackerItemInfo.r_Stack_olumnnum + '-' + stackerItemInfo.r_Stack_layernum"
+              :value="StackerCrane.CurrentRow + '-' + StackerCrane.CurrentColumn + '-' + StackerCrane.CurrentLayer"
               type="primary" ellipsis></j-el-description>
           </el-form-item>
         </el-col>
@@ -95,6 +96,7 @@
 </template>
 
 <script>
+import { id } from "element-plus/es/locale";
 import JElDescription from "./JElDescription";
 export default {
   components: {
@@ -105,15 +107,15 @@
       x: 0, // 鍒濆x鍊�
       url: "api/Equipment/GetStackerInfoByNo",
       dialogVisible: false,
-      stackerItemInfo: {
-        r_Stack_EquipmentStatus: "",
-        r_Stack_jobstate: "",
-        r_Stack_layernum: "",
-        r_Stack_linenum: "",
-        r_Stack_olumnnum: "",
-        r_Stack_tasknumber: "",
-        r_Stack_WalkingLaserValue: "",
-        r_Stack_WorkPattern: "",
+      StackerCrane: {
+        Automatic: "",
+        Fault: "",
+        CurrentLayer: "1",
+        CurrentRow: "1",
+        CurrentColumn: "1",
+        CurrentTaskNum: "",
+        Running: "",
+        DeviceName: "",
       }
     };
   },
@@ -125,36 +127,38 @@
   },
   computed: {
     dotPosition() {
-      return -this.x;
+      return this.x;
     },
   },
   mounted() {
-    this.moveDot(-this.x);
+    this.moveDot(this.x);
   },
   methods: {
     moveDot(x) {
-      const dot = this.$refs.childDot;
-      dot.style.transform = `translateX(${-x}px)`;
+        this.StackerCrane.Automatic=x.Automatic==null?"鏁呴殰":x.Automatic;
+				this.StackerCrane.Fault=x.Fault==null?"鏁呴殰":x.Fault;
+				this.StackerCrane.Running=x.Running==null?"鏁呴殰":x.Running;
+				this.StackerCrane.CurrentColumn=x.CurrentColumn==undefined?1:x.CurrentColumn;
+				this.StackerCrane.CurrentLayer=x.CurrentLayer==undefined?1:x.CurrentLayer;
+				this.StackerCrane.LevelPoint=x.LevelPoint;
+				this.StackerCrane.DeviceName=x.DeviceName;
     },
+    update(){
+        if(this.StackerCrane.Automatic&&!this.StackerCrane.Fault&&!this.StackerCrane.Running){
+          return 'dot-Automatic ';
+        }
+        else if(!this.StackerCrane.Fault&&this.StackerCrane.Running){
+          return 'dot-Running ';
+        }else if(this.StackerCrane.Fault){
+          return 'dot-Fault ';
+        }else{
+          return 'dot-Fault ';
+        }
+		},
     mouseClick() {
       this.fullscreenLoading = true;
       this.dialogVisible = true;
-      // 澶勭悊鐐瑰嚮浜嬩欢
-      if (this.url != "") {
-        this.http.post(this.url + "?equipNo=" + this.equipNo, null, "")
-          .then((x) => {
-            if (x.status) {
-              this.stackerItemInfo = x.data;
-            } else {
-              this.$message({
-                type: "error",
-                message: x.message,
-              });
-            }
-          });
-      }
       this.fullscreenLoading = false;
-      // this.dialogVisible = false;
     },
   },
 };
@@ -163,9 +167,9 @@
 <style scoped>
 .line-container {
   position: relative;
-  height: 10px;
+  height: 20px;
   background-color: #ecf5ff;
-  width: 1570px;
+  width: 960px;
 }
 
 .line {
@@ -177,11 +181,11 @@
   background-color: #a0cfff;
 }
 
-.dot {
+.dot-Running {
   position: absolute;
   top: -5px;
-  width: 20px;
-  height: 20px;
+  width: 25px;
+  height: 25px;
   border-radius: 50%;
   background-color: #409eff;
   transition: transform 0.3s ease;
@@ -191,14 +195,41 @@
   font-size: 9px;
   font-weight: bold;
   color: white;
-  /* background-image: url("../../public/鍫嗗灈鏈�.png");
-  background-repeat: no-repeat;
-  background-size: cover;
-  background-position: center; */
+}
+.dot-Automatic {
+  position: absolute;
+  top: -5px;
+  width: 25px;
+  height: 25px;
+  border-radius: 50%;
+  background-color: #0df705;
+  transition: transform 0.3s ease;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  font-size: 9px;
+  font-weight: bold;
+  color: white;
+}
+
+.dot-Fault {
+  position: absolute;
+  top: -5px;
+  width: 25px;
+  height: 25px;
+  border-radius: 50%;
+  background-color: #f80410;
+  transition: transform 0.3s ease;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  font-size: 9px;
+  font-weight: bold;
+  color: white;
 }
 
 img {
-  width: 28px;
+  width: 30px;
   height: 25px;
 }
 

--
Gitblit v1.9.3