|
@@ -5,8 +5,10 @@ import { getQuery } from "/src/utils/queryString";
|
|
import { api_lessonTrainingTrainingStudentDetail } from "../../api";
|
|
import { api_lessonTrainingTrainingStudentDetail } from "../../api";
|
|
import { headTopData } from "../../header-top";
|
|
import { headTopData } from "../../header-top";
|
|
import { evaluatingData } from "/src/view/evaluating";
|
|
import { evaluatingData } from "/src/view/evaluating";
|
|
|
|
+import state from "/src/state";
|
|
|
|
|
|
const workHomeRef = ref();
|
|
const workHomeRef = ref();
|
|
|
|
+const workEvaluatRef = ref();
|
|
|
|
|
|
export const data = reactive({
|
|
export const data = reactive({
|
|
/** 作业类型:练习PRACTICE, 评测EVALUATION */
|
|
/** 作业类型:练习PRACTICE, 评测EVALUATION */
|
|
@@ -20,6 +22,17 @@ export const HANDLE_WORK_ADD = () => {
|
|
}
|
|
}
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+// 刷新谱面后,设置作业选段
|
|
|
|
+export const resetSection = () => {
|
|
|
|
+ if (data.trainingType === "PRACTICE"){
|
|
|
|
+ workHomeRef.value?.getWorkData();
|
|
|
|
+ }
|
|
|
|
+ if (data.trainingType === "EVALUATION") {
|
|
|
|
+ workHomeRef.value?.getWorkData();
|
|
|
|
+ }
|
|
|
|
+ state.workSectionNeedReset = false;
|
|
|
|
+};
|
|
|
|
+
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
name: "workIndex",
|
|
name: "workIndex",
|
|
setup(props) {
|
|
setup(props) {
|
|
@@ -56,7 +69,7 @@ export default defineComponent({
|
|
{data.trainingType === "PRACTICE" && <WorkHome ref={workHomeRef} workeData={data.worke} />}
|
|
{data.trainingType === "PRACTICE" && <WorkHome ref={workHomeRef} workeData={data.worke} />}
|
|
{/* 评测作业 */}
|
|
{/* 评测作业 */}
|
|
{data.trainingType === "EVALUATION" && (
|
|
{data.trainingType === "EVALUATION" && (
|
|
- <WorkEaluating workeData={data.worke} />
|
|
|
|
|
|
+ <WorkEaluating ref={workEvaluatRef} workeData={data.worke} />
|
|
)}
|
|
)}
|
|
</>
|
|
</>
|
|
);
|
|
);
|