林旭祥 3 giorni fa
parent
commit
cd2b3bbec1
1 ha cambiato i file con 9 aggiunte e 8 eliminazioni
  1. 9 8
      src/components/OptionWindow/index.vue

+ 9 - 8
src/components/OptionWindow/index.vue

@@ -209,10 +209,7 @@ const timeListHeartbeat = [
 const data = reactive<any>({
   optionForm: {
     gesture: true,
-    standard: 0,
-    standHBL: '110',
-    standHBH: '160',
-    highHB: '180'
+    standard: 0
   },
   optionWindow: {
     show: false,
@@ -247,9 +244,13 @@ const open = async (data: any) => {
     }
   } else if (['heartbeat'].includes(project.value.key)) {
     optionForm.value.time = 45; //默认45分钟
+    optionForm.value.standHBL = '110';
+    optionForm.value.standHBH = '160';
+    optionForm.value.highHB = '180';
   } else {
     optionForm.value.gesture = false;
   }
+
   chooseAllState.value = false;
   optionWindow.value.show = true;
 };
@@ -309,7 +310,7 @@ const getClass = async () => {
 
 //选择测试区
 const getChooseArea = (data: any) => {
-  console.log("111111",data)
+  console.log('111111', data);
   let id = data.key;
   let inData = chooseArea.value.includes(id);
   if (inData) {
@@ -319,10 +320,10 @@ const getChooseArea = (data: any) => {
     });
   } else {
     //不存在就点选
-    if(['skiprope','heartbeat'].includes(project.value.key)){
+    if (['skiprope', 'heartbeat'].includes(project.value.key)) {
       chooseArea.value = [];
       chooseArea.value.push(id);
-    }else{
+    } else {
       chooseArea.value.push(id);
     }
   }
@@ -407,7 +408,7 @@ const confirm = () => {
   } else if (['run50', 'run70', 'run100', 'run200', 'run400', 'run800', 'run1000', 'run15x4', 'run10x4', 'run50x8'].includes(project.value.key)) {
     //跑步项目
     router.push({ path: '/train/run', query: optionForm.value });
-  } else if (['skiprope','heartbeat'].includes(project.value.key)) {
+  } else if (['skiprope', 'heartbeat'].includes(project.value.key)) {
     //设备项目
     router.push({ path: '/train/device', query: optionForm.value });
   } else {