From 366612bd8e8b88d02a98edf508f96d7add23ff9f Mon Sep 17 00:00:00 2001 From: pengwei <2071057782@qq.com> Date: 星期日, 27 四月 2025 16:03:38 +0800 Subject: [PATCH] 功能新增 --- 项目代码/伸缩杆/client/src/views/tts/PickAndDrop/Manualcontrol.vue | 220 +++++++++++++++++++++++++++++++++++++++++------------- 1 files changed, 165 insertions(+), 55 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 6b6b30e..e9e9859 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,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> \ No newline at end of file +</style> -- Gitblit v1.9.3