From 52756e8a22ff5d3c5e9cf90dfa5b87742c60350d Mon Sep 17 00:00:00 2001
From: 艺术家 <10819716+q100102@user.noreply.gitee.com>
Date: 星期四, 22 五月 2025 16:24:23 +0800
Subject: [PATCH] 功能优化

---
 项目代码/伸缩杆/client/src/views/tts/PickAndDrop/Manualcontrol.vue |  183 ++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 169 insertions(+), 14 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/\344\274\270\347\274\251\346\235\206/client/src/views/tts/PickAndDrop/Manualcontrol.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/\344\274\270\347\274\251\346\235\206/client/src/views/tts/PickAndDrop/Manualcontrol.vue"
index 819777e..93d1536 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/\344\274\270\347\274\251\346\235\206/client/src/views/tts/PickAndDrop/Manualcontrol.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/\344\274\270\347\274\251\346\235\206/client/src/views/tts/PickAndDrop/Manualcontrol.vue"
@@ -1,6 +1,104 @@
 <template>
   <div class="Manualcontrol">
     <div class="button">
+      <div class="button_l">
+        <el-button
+          @click="handleAutoPickAndDrop('浼稿嚭')"
+          type="primary"
+          size="small"
+          style="
+            width: 14.69rem;
+            height: 5.06rem;
+            color: rgba(64, 253, 240, 1);
+            background-color: rgba(6, 229, 231, 0.3);
+            border: none;
+            border-top: 0.25rem solid rgba(6, 229, 231, 1);
+          "
+        >
+          <div class="btnicon">
+            <span
+              style="
+                width: 1rem;
+                height: 1rem;
+                display: flex;
+                justify-content: center;
+                align-items: center;
+                border-radius: 50% 50%;
+                border: 0.1rem solid rgb(0, 0, 0);
+                color: rgb(0, 0, 0);
+                font-size: 0.75rem;
+                margin-left: 0.1rem;
+              "
+              >i</span
+            >
+          </div>
+          <span style="font-size: 2.25rem; text-align: center">瀹氫綅浼告寜閽�</span>
+        </el-button>
+        <el-button
+          @click="handleAutoPickAndDrop('缂╁洖')"
+          type="primary"
+          size="small"
+          style="
+            width: 14.69rem;
+            height: 5.06rem;
+            color: rgba(64, 253, 240, 1);
+            background-color: rgba(6, 229, 231, 0.3);
+            border: none;
+            border-top: 0.25rem solid rgba(6, 229, 231, 1);
+          "
+        >
+          <div class="btnicon">
+            <span
+              style="
+                width: 1rem;
+                height: 1rem;
+                display: flex;
+                justify-content: center;
+                align-items: center;
+                border-radius: 50% 50%;
+                border: 0.1rem solid rgb(0, 0, 0);
+                color: rgb(0, 0, 0);
+                font-size: 0.75rem;
+                margin-left: 0.1rem;
+              "
+              >i</span
+            >
+          </div>
+          <span style="font-size: 2.25rem; text-align: center">瀹氫綅缂╂寜閽�</span>
+        </el-button>
+        <el-button
+          @click="handlePouse"
+          type="primary"
+          size="small"
+          style="
+            width: 14.69rem;
+            height: 5.06rem;
+            color: rgba(64, 253, 240, 1);
+            background-color: rgba(6, 229, 231, 0.3);
+            border: none;
+            border-top: 0.25rem solid rgba(6, 229, 231, 1);
+          "
+        >
+          <div class="btnicon">
+            <span
+              style="
+                width: 1rem;
+                height: 1rem;
+                display: flex;
+                justify-content: center;
+                align-items: center;
+                border-radius: 50% 50%;
+                border: 0.1rem solid rgb(0, 0, 0);
+                color: rgb(0, 0, 0);
+                font-size: 0.75rem;
+                margin-left: 0.1rem;
+              "
+              >i</span
+            >
+          </div>
+          <span style="font-size: 2.25rem; text-align: center">鏆傚仠</span>
+        </el-button>
+      </div>
       <el-button
         @click="jumpRouter('/PickAndDrop')"
         class="btn"
@@ -81,6 +179,9 @@
               </div>
               <span style="font-size: 2.25rem; text-align: center">缂╁洖</span>
             </el-button>
+            <div style="color: #fff; font-size: 2rem; margin-left: 15rem">
+              鍙充晶浼哥缉鏉�
+            </div>
           </div>
         </div>
         <div class="operate">
@@ -173,6 +274,9 @@
               </div>
               <span style="font-size: 2.25rem; text-align: center">缂╁洖</span>
             </el-button>
+            <div style="color: #fff; font-size: 2rem; margin-left: 15rem">
+              宸︿晶浼哥缉鏉�
+            </div>
           </div>
         </div>
         <div class="operate">
@@ -233,7 +337,7 @@
                   >i</span
                 >
               </div>
-              <span style="font-size: 2.25rem; text-align: center">浼稿嚭</span>
+              <span style="font-size: 2.25rem; text-align: center">鐐瑰姩浼�</span>
             </el-button>
             <el-button
               @click="handManualOperation('宸�', '缂╁洖')"
@@ -265,12 +369,13 @@
                   >i</span
                 >
               </div>
-              <span style="font-size: 2.25rem; text-align: center">缂╁洖</span>
+              <span style="font-size: 2.25rem; text-align: center">鐐瑰姩缂�</span>
             </el-button>
           </div>
-          <div style="color: #fff; font-size: 2rem; margin-left: 20rem">
-            宸︿晶浼哥缉鏉�
-          </div>
+          <div style="color: #fff; font-size: 2rem">宸︿晶浼哥缉鏉�</div>
+          <span style="color: #fff; font-size: 2rem"
+            >褰撳墠浼哥缉鏉嗕綅缃細{{ Position.right }}</span
+          >
         </div>
         <div class="operate">
           <div class="item">浼稿埌浣�</div>
@@ -328,7 +433,7 @@
                   >i</span
                 >
               </div>
-              <span style="font-size: 2.25rem; text-align: center">浼稿嚭</span>
+              <span style="font-size: 2.25rem; text-align: center">鐐瑰姩浼�</span>
             </el-button>
             <el-button
               @click="handManualOperation('鍙�', '缂╁洖')"
@@ -360,12 +465,13 @@
                   >i</span
                 >
               </div>
-              <span style="font-size: 2.25rem; text-align: center">缂╁洖</span>
+              <span style="font-size: 2.25rem; text-align: center">鐐瑰姩缂�</span>
             </el-button>
           </div>
-          <div style="color: #fff; font-size: 2rem; margin-left: 20rem">
-            鍙充晶浼哥缉鏉�
-          </div>
+          <div style="color: #fff; font-size: 2rem">鍙充晶浼哥缉鏉�</div>
+          <span style="color: #fff; font-size: 2rem"
+            >褰撳墠浼哥缉鏉嗕綅缃細{{ Position.right }}</span
+          >
         </div>
         <div class="operate">
           <div class="item">浼稿埌浣�</div>
@@ -397,10 +503,20 @@
 import { ref, onMounted, nextTick } from "vue";
 import { useRouter } from "vue-router";
 import { ElMessage } from "element-plus";
-import { ManualOperation } from "@/api/newapi/Parameters.js";
+import {
+  ManualOperation,
+  GetPosition,
+  AutoPickAndDrop,
+  Pouse,
+} from "@/api/newapi/Parameters.js";
 
 const router = useRouter();
 const isMobile = ref(false);
+const Position = ref({
+  left: 0,
+  right: 0,
+});
+
 const jumpRouter = (path) => {
   router.push(path);
 };
@@ -430,6 +546,44 @@
 
   console.log(res);
 };
+const handleAutoPickAndDrop = async (val) => {
+  try {
+    const response = await AutoPickAndDrop({
+      ExtendedState: val,
+    });
+    if (response.code === 0) {
+      ElMessage.success(`${val}鎴愬姛`);
+    } else {
+      ElMessage.error(`${val}澶辫触`);
+    }
+  } catch (error) {
+    console.error(error);
+    ElMessage.error("鎿嶄綔澶辫触");
+  }
+};
+const handlePouse = async () => {
+  try {
+    const response = await Pouse();
+    if (response.code === 0) {
+      ElMessage.success(response.message);
+    } else {
+      ElMessage.error(response.message);
+    }
+  } catch (error) {
+    console.error(error);
+    ElMessage.error(error);
+  }
+};
+
+//鑾峰彇褰撳墠浣嶇疆
+const getPosition = () => {
+  GetPosition().then((res) => {
+    if (res.code == 0) {
+      Position.value.left = res.data.left;
+      Position.value.right = res.data.right;
+    }
+  });
+};
 onMounted(() => {
   // 鐩戝惉绐楀彛澶у皬鍙樺寲
   window.addEventListener("resize", () => {
@@ -449,6 +603,7 @@
     // 濡傛灉绐楀彛瀹藉害灏忎簬绛変簬1080px锛屾墽琛岀浉搴旂殑鎿嶄綔
     isMobile.value = false;
   }
+  getPosition();
 });
 </script>
 <style lang="scss" scoped>
@@ -460,7 +615,7 @@
   .button {
     height: 7.83rem;
     display: flex;
-    justify-content: center;
+    justify-content: space-between;
 
     .btn {
       position: relative;
@@ -876,7 +1031,7 @@
 
       .model {
         display: flex;
-
+        justify-content: space-between;
         .model_btn {
           display: flex;
 
@@ -1031,7 +1186,7 @@
 
       .model {
         display: flex;
-
+        justify-content: space-between;
         .model_btn {
           display: flex;
 

--
Gitblit v1.9.3