From c6e8b600398de38b6684f5fa1eaaaade8562859b Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期六, 20 九月 2025 15:16:56 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/ZhiHuiQiCe/LongDeLiLiKu

---
 项目代码/WCS/WCSClient/src/views/LineComponent.vue |  406 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 406 insertions(+), 0 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSClient/src/views/LineComponent.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSClient/src/views/LineComponent.vue"
new file mode 100644
index 0000000..3faff30
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSClient/src/views/LineComponent.vue"
@@ -0,0 +1,406 @@
+<template>
+  <div>
+    <el-row>
+      <template v-for="item in 32" :key="item">
+        <el-col :span="0.9">
+          <span class="image-text"></span>
+          <img src="../../public/璐ф灦.jpeg" />
+        </el-col>
+      </template>
+    </el-row>
+    <el-row style="padding-bottom: 5px;">
+      <template v-for="item in 32" :key="item">
+        <el-col :span="0.9">
+          <span class="image-text"></span>
+          <img src="../../public/璐ф灦.jpeg" />
+        </el-col>
+      </template>
+    </el-row>
+  </div>
+  <div class="line-container">
+    <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 - 59 : 0}px)` }"
+      ref="childDot" @click="mouseClick"></div>
+  </div>
+  <div>
+    <el-row style="padding-top: 5px;">
+      <template v-for="item in 32" :key="item">
+        <el-col :span="0.9">
+          <span class="image-text"></span>
+          <img src="../../public/璐ф灦.jpeg" />
+        </el-col>
+      </template>
+    </el-row>
+    <el-row style="padding-bottom: 5px;">
+      <template v-for="item in 32" :key="item">
+        <el-col :span="0.9">
+          <span class="image-text"></span>
+          <img src="../../public/璐ф灦.jpeg" />
+        </el-col>
+      </template>
+    </el-row>
+  </div>
+
+  <el-dialog v-model="dialogVisible" title="鍫嗗灈鏈轰俊鎭煡鐪�" :before-close="handleClose">
+    <el-form ref="$form" :model="StackerCrane" label-position="left" label-width="120px" 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="璁惧缂栧彿锛�">
+            <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="StackerCrane.Fault" 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="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="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" style="margin-bottom: 10px;">
+        <el-col :span="12" :offset="0" :push="0" :pull="0" tag="div">
+          <el-form-item label="浣滀笟鐘舵��:">
+            <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="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.StackerAlarm" type="primary" ellipsis></j-el-description>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-divider />
+      <h4 style="margin-bottom: 20px;">鎵嬪姩鎿嶄綔</h4>
+      <el-form ref="form" :model="form" label-width="90px">
+        <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">
+              <el-select size="large" v-model="form.TaskType" placeholder="璇烽�夋嫨浠诲姟鍛戒护">
+                <el-option label="鍏ュ簱" value="17" />
+                <el-option label="鍑哄簱" value="18" />
+                <el-option label="绉诲簱" value="20" />
+                <el-option label="鍙栬揣" value="24" />
+                <el-option label="鏀捐揣" value="48" />
+              </el-select>
+            </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="璧风偣琛屽垪灞�:">
+              <el-input size="large" v-model="form.SourceAddress" style="width: 800px" placeholder="璇疯緭鍏ヨ捣鐐硅鍒楀眰" />
+            </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="缁堢偣琛屽垪灞�:">
+              <el-input size="large" v-model="form.TargetAddress" style="width: 800px" placeholder="璇疯緭鍏ョ粓鐐硅鍒楀眰" />
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <el-divider />
+      <el-row :gutter="20" type="flex" justify="start" align="top" 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="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="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>
+    </el-form>
+    <template #footer>
+      <div class="dialog-footer">
+        <el-button @click="dialogVisible = false">鍙栨秷</el-button>
+        <el-button type="primary" @click="dialogVisible = false">
+          纭
+        </el-button>
+      </div>
+    </template>
+  </el-dialog>
+</template>
+
+<script>
+import { id } from "element-plus/es/locale";
+import JElDescription from "./JElDescription";
+export default {
+  components: {
+    JElDescription
+  },
+  data() {
+    return {
+      x: 0, // 鍒濆x鍊�
+      url: "api/Equipment/GetStackerInfoByNo",
+      dialogVisible: false,
+      StackerCrane: {
+        Automatic: "",
+        Fault: "",
+        CurrentLayer: "1",
+        CurrentRow: "1",
+        CurrentColumn: "1",
+        CurrentTaskNum: "",
+        Running: "",
+        DeviceName: "",
+        DeviceCode: "",
+        StackerAlarm:"",
+      },
+      form: {
+        TaskType: "",
+        SourceAddress: "",
+        TargetAddress: "",
+        DeviceCode: "",
+      },
+    };
+  },
+  props: {
+    equipNo: {
+      type: String,
+      default: "0",
+    },
+  },
+  computed: {
+    dotPosition() {
+      return this.x;
+    },
+  },
+  mounted() {
+    this.moveDot(this.x);
+  },
+  methods: {
+    moveDot(x) {
+      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;
+      this.StackerCrane.CurrentTaskNum = x.CurrentTaskNum;
+      this.StackerCrane.StackerAlarm = x.StackerAlarm;
+      this.form.DeviceCode = x.DeviceCode;
+    },
+    update() {
+      if (this.StackerCrane.Automatic == "鑱旀満妯″紡" && this.StackerCrane.Fault != "鏁呴殰" && this.StackerCrane.Running == "寰呮満") {
+        return 'dot-Automatic ';
+      }
+      else if (this.StackerCrane.Automatic == "鑱旀満妯″紡" && 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;
+      this.fullscreenLoading = false;
+    },
+    start() {
+      this.fullscreenLoading = true;
+      this.http.post("api/DeviceInfo/StackerHandTask", this.form)
+        .then((x) => {
+          if (!x.status) {
+            this.$message.error(x.message);
+          } else {
+            this.$Message.success("鍫嗗灈鏈哄懡浠ゅ凡涓嬪彂");
+            // $vue.success("鎴愬姛.");
+            this.show = false;
+            $vue.refresh();
+          }
+        })
+        .finally(() => {
+          this.fullscreenLoading = false;
+        });
+    }, reset() {
+      this.fullscreenLoading = true;
+      this.http.post("api/DeviceInfo/StackerReset?DeviceCode=" + this.form.DeviceCode)
+        .then((x) => {
+          if (!x.status) {
+            this.$message.error(x.message);
+          } else {
+            this.$Message.success("澶嶄綅鎴愬姛");
+            // $vue.success("鎴愬姛.");
+            this.show = false;
+            $vue.refresh();
+          }
+        })
+        .finally(() => {
+          this.fullscreenLoading = false;
+        });
+    },
+    
+    emergencyStop() {
+      this.fullscreenLoading = true;
+      this.http.post("api/DeviceInfo/StackerEmergencyStop?DeviceCode=" + this.form.DeviceCode)
+        .then((x) => {
+          if (!x.status) {
+            this.$message.error(x.message);
+          } else {
+            this.$Message.success("鎬ュ仠宸叉寜涓�");
+            // $vue.success("鎴愬姛.");
+            // this.show = false;
+            // $vue.refresh();
+          }
+        })
+        .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;
+        });
+    }
+  },
+};
+</script>
+
+<style scoped>
+.line-container {
+  position: relative;
+  height: 20px;
+  background-color: #ecf5ff;
+  width: 960px;
+}
+
+.line {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  height: 1px;
+  background-color: #a0cfff;
+}
+
+.dot-Running {
+  position: absolute;
+  top: -5px;
+  width: 25px;
+  height: 25px;
+  border-radius: 50%;
+  background-color: #409eff;
+  transition: transform 0.3s ease;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  font-size: 9px;
+  font-weight: bold;
+  color: white;
+}
+
+.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: 30px;
+  height: 25px;
+}
+
+.image-text {
+  position: absolute;
+  top: 5px;
+  /* left: 10px;  */
+  color: white;
+  /* 鏂囧瓧棰滆壊 */
+  font-size: 12px;
+  /* 瀛楀彿澶у皬 */
+  font-weight: bold;
+  /* 瀛椾綋绮楃粏 */
+  margin-left: 5px;
+}
+</style>

--
Gitblit v1.9.3