|
@@ -2,7 +2,7 @@ import { defineComponent, onMounted, reactive, watch } from "vue";
|
|
import { useRoute } from "vue-router";
|
|
import { useRoute } from "vue-router";
|
|
// import { verifyMembershipServices } from "../vip-verify";
|
|
// import { verifyMembershipServices } from "../vip-verify";
|
|
import { api_lessonTrainingSubmitTraining } from "../../api";
|
|
import { api_lessonTrainingSubmitTraining } from "../../api";
|
|
-import state, { IDifficulty } from "/src/state";
|
|
|
|
|
|
+import state, { IDifficulty, handleSetSpeed } from "/src/state";
|
|
import { getQuery } from "/src/utils/queryString";
|
|
import { getQuery } from "/src/utils/queryString";
|
|
import { evaluatingData } from "/src/view/evaluating";
|
|
import { evaluatingData } from "/src/view/evaluating";
|
|
|
|
|
|
@@ -14,7 +14,7 @@ export default defineComponent({
|
|
default: () => ({}),
|
|
default: () => ({}),
|
|
},
|
|
},
|
|
},
|
|
},
|
|
- setup(props, {expose}) {
|
|
|
|
|
|
+ setup(props, { expose }) {
|
|
const query = getQuery();
|
|
const query = getQuery();
|
|
const evaluatingWorkData = reactive({
|
|
const evaluatingWorkData = reactive({
|
|
difficulty: "" as IDifficulty,
|
|
difficulty: "" as IDifficulty,
|
|
@@ -42,6 +42,10 @@ export default defineComponent({
|
|
if (["BEGINNER", "ADVANCED", "PERFORMER"].includes(trainingContent.evaluateDifficult)) {
|
|
if (["BEGINNER", "ADVANCED", "PERFORMER"].includes(trainingContent.evaluateDifficult)) {
|
|
evaluatingWorkData.difficulty = trainingContent.evaluateDifficult;
|
|
evaluatingWorkData.difficulty = trainingContent.evaluateDifficult;
|
|
state.setting.evaluationDifficulty = trainingContent.evaluateDifficult;
|
|
state.setting.evaluationDifficulty = trainingContent.evaluateDifficult;
|
|
|
|
+ //设置速度
|
|
|
|
+ if (trainingContent.evaluateSpeed) {
|
|
|
|
+ handleSetSpeed(trainingContent.evaluateSpeed);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
};
|
|
};
|
|
/** 添加记录 */
|
|
/** 添加记录 */
|
|
@@ -55,19 +59,19 @@ export default defineComponent({
|
|
console.log(error);
|
|
console.log(error);
|
|
}
|
|
}
|
|
};
|
|
};
|
|
- const handleAdd = () => {
|
|
|
|
- if (evaluatingData.resulstMode && evaluatingData.isComplete) {
|
|
|
|
- addEvaluatingWorkRecored(evaluatingData.resultData);
|
|
|
|
|
|
+ watch(
|
|
|
|
+ () => evaluatingData.resulstMode,
|
|
|
|
+ () => {
|
|
|
|
+ if (evaluatingData.resulstMode && evaluatingData.isComplete) {
|
|
|
|
+ addEvaluatingWorkRecored(evaluatingData.resultData);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
+ );
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
handleHide();
|
|
handleHide();
|
|
getWorkData();
|
|
getWorkData();
|
|
// verifyMembershipServices();
|
|
// verifyMembershipServices();
|
|
});
|
|
});
|
|
- expose({
|
|
|
|
- handleAdd
|
|
|
|
- })
|
|
|
|
return () => <div></div>;
|
|
return () => <div></div>;
|
|
},
|
|
},
|
|
});
|
|
});
|