pengwei
2025-04-27 366612bd8e8b88d02a98edf508f96d7add23ff9f
ÏîÄ¿´úÂë/ÉìËõ¸Ë/client/src/views/tts/PickAndDrop/Manualcontrol.vue
@@ -1,25 +1,38 @@
<template>
  <div class="Manualcontrol">
    <div class="button">
      <el-button @click="jumpRouter('/PickAndDrop')" class="btn" type="primary" size="small"
        style="width: 27.52rem; height: 4.29rem; color: rgba(255, 255, 255, 1)">
        <span class="Aspan" style="font-size: 2.25rem; text-align: center">返回</span>
      <el-button
        @click="jumpRouter('/PickAndDrop')"
        class="btn"
        type="primary"
        size="small"
        style="width: 27.52rem; height: 4.29rem; color: rgba(255, 255, 255, 1)"
      >
        <span class="Aspan" style="font-size: 2.25rem; text-align: center"
          >返回</span
        >
      </el-button>
    </div>
    <div v-if="isMobile" class="content">
      <div class="content_l">
        <div class="model">
          <div class="model_btn">
            <el-button type="primary" size="small" style="
            <el-button
              @click="handManualOperation('å·¦', '伸出')"
              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="
                <span
                  style="
                    width: 1rem;
                    height: 1rem;
                    display: flex;
@@ -30,20 +43,28 @@
                    color: rgb(0, 0, 0);
                    font-size: 0.75rem;
                    margin-left: 0.1rem;
                  ">i</span>
                  "
                  >i</span
                >
              </div>
              <span style="font-size: 2.25rem; text-align: center">伸出</span>
            </el-button>
            <el-button type="primary" size="small" style="
            <el-button
              @click="handManualOperation('å·¦', '缩回')"
              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="
                <span
                  style="
                    width: 1rem;
                    height: 1rem;
                    display: flex;
@@ -54,7 +75,9 @@
                    color: rgb(0, 0, 0);
                    font-size: 0.75rem;
                    margin-left: 0.1rem;
                  ">i</span>
                  "
                  >i</span
                >
              </div>
              <span style="font-size: 2.25rem; text-align: center">缩回</span>
            </el-button>
@@ -78,16 +101,22 @@
      <div class="content_r">
        <div class="model">
          <div class="model_btn">
            <el-button type="primary" size="small" style="
            <el-button
              @click="handManualOperation('右', '伸出')"
              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="
                <span
                  style="
                    width: 1rem;
                    height: 1rem;
                    display: flex;
@@ -98,20 +127,28 @@
                    color: rgb(0, 0, 0);
                    font-size: 0.75rem;
                    margin-left: 0.1rem;
                  ">i</span>
                  "
                  >i</span
                >
              </div>
              <span style="font-size: 2.25rem; text-align: center">伸出</span>
            </el-button>
            <el-button type="primary" size="small" style="
            <el-button
              @click="handManualOperation('右', '缩回')"
              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="
                <span
                  style="
                    width: 1rem;
                    height: 1rem;
                    display: flex;
@@ -122,12 +159,13 @@
                    color: rgb(0, 0, 0);
                    font-size: 0.75rem;
                    margin-left: 0.1rem;
                  ">i</span>
                  "
                  >i</span
                >
              </div>
              <span style="font-size: 2.25rem; text-align: center">缩回</span>
            </el-button>
          </div>
        </div>
        <div class="operate">
          <div class="item">伸到位</div>
@@ -149,16 +187,22 @@
      <div class="content_l">
        <div class="model">
          <div class="model_btn">
            <el-button type="primary" size="small" style="
            <el-button
              @click="handManualOperation('å·¦', '伸出')"
              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="
                <span
                  style="
                    width: 1rem;
                    height: 1rem;
                    display: flex;
@@ -169,20 +213,28 @@
                    color: rgb(0, 0, 0);
                    font-size: 0.75rem;
                    margin-left: 0.1rem;
                  ">i</span>
                  "
                  >i</span
                >
              </div>
              <span style="font-size: 2.25rem; text-align: center">伸出</span>
            </el-button>
            <el-button type="primary" size="small" style="
            <el-button
              @click="handManualOperation('å·¦', '缩回')"
              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="
                <span
                  style="
                    width: 1rem;
                    height: 1rem;
                    display: flex;
@@ -193,12 +245,16 @@
                    color: rgb(0, 0, 0);
                    font-size: 0.75rem;
                    margin-left: 0.1rem;
                  ">i</span>
                  "
                  >i</span
                >
              </div>
              <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; margin-left: 20rem">
            å·¦ä¾§ä¼¸ç¼©æ†
          </div>
        </div>
        <div class="operate">
          <div class="item">伸到位</div>
@@ -218,16 +274,22 @@
      <div class="content_r">
        <div class="model">
          <div class="model_btn">
            <el-button type="primary" size="small" style="
            <el-button
              @click="handManualOperation('右', '伸出')"
              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="
                <span
                  style="
                    width: 1rem;
                    height: 1rem;
                    display: flex;
@@ -238,20 +300,28 @@
                    color: rgb(0, 0, 0);
                    font-size: 0.75rem;
                    margin-left: 0.1rem;
                  ">i</span>
                  "
                  >i</span
                >
              </div>
              <span style="font-size: 2.25rem; text-align: center">伸出</span>
            </el-button>
            <el-button type="primary" size="small" style="
            <el-button
              @click="handManualOperation('右', '缩回')"
              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="
                <span
                  style="
                    width: 1rem;
                    height: 1rem;
                    display: flex;
@@ -262,12 +332,16 @@
                    color: rgb(0, 0, 0);
                    font-size: 0.75rem;
                    margin-left: 0.1rem;
                  ">i</span>
                  "
                  >i</span
                >
              </div>
              <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; margin-left: 20rem">
            å³ä¾§ä¼¸ç¼©æ†
          </div>
        </div>
        <div class="operate">
          <div class="item">伸到位</div>
@@ -290,12 +364,40 @@
<script setup>
import { ref, onMounted, nextTick } from "vue";
import { useRouter } from "vue-router";
import { ElMessage } from "element-plus";
import { ManualOperation } from "@/api/newapi/Parameters.js";
const router = useRouter();
const isMobile = ref(false);
const jumpRouter = (path) => {
  router.push(path);
};
const handManualOperation = async (position, ExtendedState) => {
  try {
    const res = await ManualOperation({
      position: position,
      ExtendedState: ExtendedState,
    });
    if (res.code === 0) {
      ElMessage({
        message: `${position}ä¾§${ExtendedState}成功`,
        type: "success",
      });
    } else {
      ElMessage({
        message: `${position}ä¾§${ExtendedState}失败`,
        type: "error",
      });
    }
  } catch (error) {
    ElMessage({
      message: "操作失败",
      type: "error",
    });
  }
  console.log(res);
};
onMounted(() => {
  // ç›‘听窗口大小变化
  window.addEventListener("resize", () => {
@@ -452,10 +554,12 @@
          width: 8.75rem;
          height: 4.19rem;
          border-radius: 0.31rem;
          background: linear-gradient(90deg,
              rgba(0, 224, 255, 0.74) 0%,
              rgba(0, 224, 255, 0.4) 60%,
              rgba(235, 242, 243, 0.13) 100%);
          background: linear-gradient(
            90deg,
            rgba(0, 224, 255, 0.74) 0%,
            rgba(0, 224, 255, 0.4) 60%,
            rgba(235, 242, 243, 0.13) 100%
          );
          color: rgba(16, 16, 16, 1);
          color: rgb(255, 255, 255);
          font-size: 1.13rem;
@@ -598,10 +702,12 @@
          width: 8.75rem;
          height: 4.19rem;
          border-radius: 0.31rem;
          background: linear-gradient(90deg,
              rgba(0, 224, 255, 0.74) 0%,
              rgba(0, 224, 255, 0.4) 60%,
              rgba(235, 242, 243, 0.13) 100%);
          background: linear-gradient(
            90deg,
            rgba(0, 224, 255, 0.74) 0%,
            rgba(0, 224, 255, 0.4) 60%,
            rgba(235, 242, 243, 0.13) 100%
          );
          color: rgba(16, 16, 16, 1);
          color: rgb(255, 255, 255);
          font-size: 1.13rem;
@@ -747,10 +853,12 @@
          width: 8.75rem;
          height: 4.19rem;
          border-radius: 0.31rem;
          background: linear-gradient(90deg,
              rgba(0, 224, 255, 0.74) 0%,
              rgba(0, 224, 255, 0.4) 60%,
              rgba(235, 242, 243, 0.13) 100%);
          background: linear-gradient(
            90deg,
            rgba(0, 224, 255, 0.74) 0%,
            rgba(0, 224, 255, 0.4) 60%,
            rgba(235, 242, 243, 0.13) 100%
          );
          color: rgba(16, 16, 16, 1);
          color: rgb(255, 255, 255);
          font-size: 1.13rem;
@@ -893,10 +1001,12 @@
          width: 8.75rem;
          height: 4.19rem;
          border-radius: 0.31rem;
          background: linear-gradient(90deg,
              rgba(0, 224, 255, 0.74) 0%,
              rgba(0, 224, 255, 0.4) 60%,
              rgba(235, 242, 243, 0.13) 100%);
          background: linear-gradient(
            90deg,
            rgba(0, 224, 255, 0.74) 0%,
            rgba(0, 224, 255, 0.4) 60%,
            rgba(235, 242, 243, 0.13) 100%
          );
          color: rgba(16, 16, 16, 1);
          color: rgb(255, 255, 255);
          font-size: 1.13rem;
@@ -994,4 +1104,4 @@
    }
  }
}
</style>
</style>