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/Parametersettings/Parametersettings.vue | 64 ++++++++++++++++++++++++++++--- 1 files changed, 57 insertions(+), 7 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/Parametersettings/Parametersettings.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/Parametersettings/Parametersettings.vue" index bc55d75..6ba99b5 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/Parametersettings/Parametersettings.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/Parametersettings/Parametersettings.vue" @@ -19,7 +19,7 @@ <el-form-item prop="extendSpeed"> <template #label> <span style="color: rgba(0, 9, 56, 1); font-size: 0.88rem" - >鑷姩浼稿嚭閫熷害m/min锛�</span + >宸LC鑷姩浼稿嚭缂╁洖閫熷害m/min锛�</span > </template> <el-input @@ -31,7 +31,7 @@ <el-form-item prop="retractionSpeed"> <template #label> <span style="color: rgba(0, 9, 56, 1); font-size: 0.88rem" - >鑷姩缂╁洖閫熷害m/min锛�</span + >鍙砅LC鑷姩浼稿嚭缂╁洖閫熷害m/min锛�</span > </template> <el-input @@ -43,7 +43,7 @@ <el-form-item prop="manualExtend"> <template #label> <span style="color: rgba(0, 9, 56, 1); font-size: 0.88rem" - >鎵嬪姩浼稿嚭閫熷害m/min锛�</span + >宸LC鎵嬪姩浼稿嚭缂╁洖閫熷害m/min锛�</span > </template> <el-input @@ -55,13 +55,37 @@ <el-form-item prop="manualRetraction"> <template #label> <span style="color: rgba(0, 9, 56, 1); font-size: 0.88rem" - >鎵嬪姩缂╁洖閫熷害m/min锛�</span + >鍙砅LC鎵嬪姩浼稿嚭缂╁洖閫熷害m/min锛�</span > </template> <el-input style="height: 1.88rem" placeholder="璇疯緭鍏�" v-model="ruleForm.manualRetraction" + /> + </el-form-item> + <el-form-item prop="leftPosition"> + <template #label> + <span style="color: rgba(0, 9, 56, 1); font-size: 0.88rem" + >宸LC鑷姩浼稿埌浣嶏細</span + > + </template> + <el-input + style="height: 1.88rem" + placeholder="璇疯緭鍏�" + v-model="ruleForm.leftPosition" + /> + </el-form-item> + <el-form-item prop="rightPosition"> + <template #label> + <span style="color: rgba(0, 9, 56, 1); font-size: 0.88rem" + >鍙砅LC鑷姩浼稿埌浣嶏細</span + > + </template> + <el-input + style="height: 1.88rem" + placeholder="璇疯緭鍏�" + v-model="ruleForm.rightPosition" /> </el-form-item> <el-form-item> @@ -179,9 +203,9 @@ </div> </template> <script setup> -import { ref } from "vue"; +import { onMounted, ref } from "vue"; import { ElMessage } from "element-plus"; -import { AddData } from "@/api/newapi/Parameters"; +import { AddData, GetParameter } from "@/api/newapi/Parameters"; const userInfo = JSON.parse(localStorage.getItem("user")); const ruleForm = ref({ creater: "string", @@ -194,16 +218,42 @@ manualExtend: 0, manualRetraction: 0, depid: userInfo.depid, + account: userInfo.userName, + leftPosition: 0, + rightPosition: 0, }); - //淇濆瓨 const submitForm = () => { + console.log(ruleForm.value); + AddData(ruleForm.value).then((res) => { if (res.code == 0) { ElMessage.success("淇濆瓨鎴愬姛"); } }); }; +//鑾峰彇鍙傛暟 +const getParameter = () => { + GetParameter().then((res) => { + if (res.code == 0) { + ruleForm.value.extendSpeed = res.data == null ? 0 : res.data.extendSpeed; + ruleForm.value.retractionSpeed = + res.data == null ? 0 : res.data.retractionSpeed; + ruleForm.value.manualExtend = + res.data == null ? 0 : res.data.manualExtend; + ruleForm.value.manualRetraction = + res.data == null ? 0 : res.data.manualRetraction; + ruleForm.value.leftPosition = + res.data == null ? 0 : res.data.leftPosition; + ruleForm.value.rightPosition = + res.data == null ? 0 : res.data.rightPosition; + } + }); +}; + +onMounted(() => { + getParameter(); +}); </script> <style lang="scss" scoped> .Parametersettings { -- Gitblit v1.9.3