|
@@ -2,7 +2,7 @@ import { defineComponent, onMounted, reactive, watch } from "vue";
|
|
|
import { useRoute } from "vue-router";
|
|
|
// import { verifyMembershipServices } from "../vip-verify";
|
|
|
import { api_lessonTrainingSubmitTraining } from "../../api";
|
|
|
-import state, { IDifficulty, handleSetSpeed } from "/src/state";
|
|
|
+import state, { IDifficulty, handleSetSpeed, hanldeDirectSelection } from "/src/state";
|
|
|
import { getQuery } from "/src/utils/queryString";
|
|
|
import { evaluatingData } from "/src/view/evaluating";
|
|
|
|
|
@@ -19,6 +19,9 @@ export default defineComponent({
|
|
|
const evaluatingWorkData = reactive({
|
|
|
difficulty: "" as IDifficulty,
|
|
|
evaluatingRecord: props.workeData?.id,
|
|
|
+ start: "" as any,
|
|
|
+ end: "" as any,
|
|
|
+ evaluateSpeed: 0,
|
|
|
});
|
|
|
/** 隐藏评测功能 */
|
|
|
const handleHide = () => {
|
|
@@ -42,12 +45,39 @@ export default defineComponent({
|
|
|
if (["BEGINNER", "ADVANCED", "PERFORMER"].includes(trainingContent.evaluateDifficult)) {
|
|
|
evaluatingWorkData.difficulty = trainingContent.evaluateDifficult;
|
|
|
state.setting.evaluationDifficulty = trainingContent.evaluateDifficult;
|
|
|
- //设置速度
|
|
|
- if (trainingContent.evaluateSpeed) {
|
|
|
- handleSetSpeed(trainingContent.evaluateSpeed);
|
|
|
- }
|
|
|
+
|
|
|
+ evaluatingWorkData.evaluateSpeed = trainingContent.evaluateSpeed;
|
|
|
+ evaluatingWorkData.start = Number(trainingContent.practiceChapterBegin);
|
|
|
+ evaluatingWorkData.end = Number(trainingContent.practiceChapterEnd);
|
|
|
+ setSection();
|
|
|
}
|
|
|
};
|
|
|
+ /**设置小节 */
|
|
|
+ const setSection = () => {
|
|
|
+ const startNotes = state.times.filter(
|
|
|
+ (n: any) => n.noteElement.sourceMeasure.MeasureNumberXML == evaluatingWorkData.start
|
|
|
+ )
|
|
|
+ const endNotes = state.times.filter(
|
|
|
+ (n: any) => n.noteElement.sourceMeasure.MeasureNumberXML == evaluatingWorkData.end
|
|
|
+ )
|
|
|
+ const startNote = startNotes[0]
|
|
|
+ const endNote = endNotes[endNotes.length - 1]
|
|
|
+ // console.log('🚀 ~ activeNote', startNote, endNote, questionExtendsInfo.value.end)
|
|
|
+ if (startNote && endNote) {
|
|
|
+ state.isSelectMeasureMode = true;
|
|
|
+ // 设置小节
|
|
|
+ hanldeDirectSelection([startNote, endNote]);
|
|
|
+
|
|
|
+ // // 设置小节
|
|
|
+ // state.sectionStatus = true
|
|
|
+ // state.section = [startNote, endNote]
|
|
|
+
|
|
|
+ //设置速度
|
|
|
+ if (evaluatingWorkData.evaluateSpeed) {
|
|
|
+ handleSetSpeed(evaluatingWorkData.evaluateSpeed);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
/** 添加记录 */
|
|
|
const addEvaluatingWorkRecored = async (data: any) => {
|
|
|
try {
|