pengwei
2025-05-15 b9260c7807d064f2b77ef9e92005a8c3257ec2e1
ÏîÄ¿´úÂë/ÉìËõ¸Ë/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
              >å·¦PLC自动伸出缩回速度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
              >右PLC自动伸出缩回速度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
              >å·¦PLC手动伸出缩回速度m/min:</span
            >
          </template>
          <el-input
@@ -55,7 +55,7 @@
        <el-form-item prop="manualRetraction">
          <template #label>
            <span style="color: rgba(0, 9, 56, 1); font-size: 0.88rem"
              >手动缩回速度m/min:</span
              >右PLC手动伸出缩回速度m/min:</span
            >
          </template>
          <el-input
@@ -179,9 +179,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,6 +194,7 @@
  manualExtend: 0,
  manualRetraction: 0,
  depid: userInfo.depid,
  account: userInfo.userName,
});
//保存
@@ -204,6 +205,23 @@
    }
  });
};
//获取参数
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;
    }
  });
};
onMounted(() => {
  getParameter();
});
</script>
<style lang="scss" scoped>
.Parametersettings {