|
@@ -1,4 +1,3 @@
|
|
|
-import { Popup } from "@varlet/ui";
|
|
|
import { Transition, defineComponent, onMounted, reactive, watch } from "vue";
|
|
|
import {
|
|
|
connectWebsocket,
|
|
@@ -17,7 +16,7 @@ import state from "/src/state";
|
|
|
import { storeData } from "/src/store";
|
|
|
import { browser } from "/src/utils";
|
|
|
import { getNoteByMeasuresSlursStart } from "/src/helpers/formateMusic";
|
|
|
-import { Icon, showToast } from "vant";
|
|
|
+import { Icon, Popup, showToast } from "vant";
|
|
|
import EvaluatResult from "./evaluat-result";
|
|
|
import EvaluatAudio from "./evaluat-audio";
|
|
|
import { api_proxyServiceMessage, api_videoUpdate } from "/src/helpers/communication";
|
|
@@ -89,10 +88,18 @@ export default defineComponent({
|
|
|
}
|
|
|
const nextNote = state.times[index + 1];
|
|
|
// console.log("noteinfo", note.noteElement.isRestFlag && !!note.stave && !!nextNote)
|
|
|
- if (skip && (note.stave || !item.noteElement.isRestFlag || (nextNote && !nextNote.noteElement.isRestFlag))) {
|
|
|
+ if (
|
|
|
+ skip &&
|
|
|
+ (note.stave || !item.noteElement.isRestFlag || (nextNote && !nextNote.noteElement.isRestFlag))
|
|
|
+ ) {
|
|
|
skip = false;
|
|
|
}
|
|
|
- if (note.noteElement.isRestFlag && !!note.stave && !!nextNote && nextNote.noteElement.isRestFlag) {
|
|
|
+ if (
|
|
|
+ note.noteElement.isRestFlag &&
|
|
|
+ !!note.stave &&
|
|
|
+ !!nextNote &&
|
|
|
+ nextNote.noteElement.isRestFlag
|
|
|
+ ) {
|
|
|
skip = true;
|
|
|
}
|
|
|
// console.log(note.measureOpenIndex, item.measureOpenIndex, note);
|
|
@@ -128,7 +135,12 @@ export default defineComponent({
|
|
|
partIndex: state.partIndex,
|
|
|
behaviorId,
|
|
|
platform: browserInfo.ios ? "IOS" : browserInfo.android ? "ANDROID" : "WEB",
|
|
|
- clientId: storeData.platformType === "STUDENT" ? "student" : storeData.platformType === "TEACHER" ? "teacher" : "education",
|
|
|
+ clientId:
|
|
|
+ storeData.platformType === "STUDENT"
|
|
|
+ ? "student"
|
|
|
+ : storeData.platformType === "TEACHER"
|
|
|
+ ? "teacher"
|
|
|
+ : "education",
|
|
|
hertz: state.setting.frequency,
|
|
|
reactionTimeMs: state.setting.reactionTimeMs,
|
|
|
speed: state.speed,
|
|
@@ -151,7 +163,7 @@ export default defineComponent({
|
|
|
return;
|
|
|
} else if (type === "look") {
|
|
|
// 跳转
|
|
|
- handleViewReport('recordId', 'colexiu');
|
|
|
+ handleViewReport("recordId", "instrument");
|
|
|
return;
|
|
|
} else if (type === "practise") {
|
|
|
// 去练习
|
|
@@ -173,12 +185,12 @@ export default defineComponent({
|
|
|
evaluatModel.evaluatUpdateAudio = false;
|
|
|
api_videoUpdate((res: any) => {
|
|
|
if (res) {
|
|
|
- if (res?.content?.type === 'success'){
|
|
|
+ if (res?.content?.type === "success") {
|
|
|
handleSaveResult({
|
|
|
recordId: evaluatingData.resultData?.recordId,
|
|
|
filePath: res?.content?.filePath,
|
|
|
- })
|
|
|
- } else if (res?.content?.type === 'error') {
|
|
|
+ });
|
|
|
+ } else if (res?.content?.type === "error") {
|
|
|
showToast({
|
|
|
message: res.content?.message || "上传失败",
|
|
|
});
|
|
@@ -201,9 +213,7 @@ export default defineComponent({
|
|
|
},
|
|
|
body: _body,
|
|
|
});
|
|
|
- showToast({
|
|
|
- message: "上传成功",
|
|
|
- });
|
|
|
+ showToast("上传成功");
|
|
|
};
|
|
|
|
|
|
onMounted(() => {
|
|
@@ -235,19 +245,33 @@ export default defineComponent({
|
|
|
)}
|
|
|
</Transition>
|
|
|
|
|
|
- <div style={{ display: !evaluatingData.startBegin ? "" : "none" }} class={styles.dialogueBox} key="start">
|
|
|
+ <div
|
|
|
+ style={{ display: !evaluatingData.startBegin ? "" : "none" }}
|
|
|
+ class={styles.dialogueBox}
|
|
|
+ key="start"
|
|
|
+ >
|
|
|
<div class={styles.dialogue}>
|
|
|
<img class={styles.dialoguebg} src={iconTastBg} />
|
|
|
<div>演奏前请调整好乐器,保证最佳演奏状态。</div>
|
|
|
</div>
|
|
|
<Vue3Lottie class={styles.dialogueIcon} animationData={startData}></Vue3Lottie>
|
|
|
</div>
|
|
|
- <div style={{ display: evaluatingData.startBegin ? "" : "none" }} class={styles.dialogueBox} key="start">
|
|
|
+ <div
|
|
|
+ style={{ display: evaluatingData.startBegin ? "" : "none" }}
|
|
|
+ class={styles.dialogueBox}
|
|
|
+ key="start"
|
|
|
+ >
|
|
|
<div class={styles.dialogueing}>收音中...</div>
|
|
|
<Vue3Lottie class={styles.dialogueIcon} animationData={startingData}></Vue3Lottie>
|
|
|
</div>
|
|
|
|
|
|
- <Popup teleport="body" closeOnClickOverlay={false} defaultStyle={false} v-model:show={evaluatingData.earphoneMode}>
|
|
|
+ <Popup
|
|
|
+ teleport="body"
|
|
|
+ closeOnClickOverlay={false}
|
|
|
+ class={["popup-custom", "van-scale"]}
|
|
|
+ transition="van-scale"
|
|
|
+ v-model:show={evaluatingData.earphoneMode}
|
|
|
+ >
|
|
|
<Earphone
|
|
|
onClose={() => {
|
|
|
evaluatingData.earphoneMode = false;
|
|
@@ -255,7 +279,13 @@ export default defineComponent({
|
|
|
}}
|
|
|
/>
|
|
|
</Popup>
|
|
|
- <Popup teleport="body" closeOnClickOverlay={false} defaultStyle={false} v-model:show={evaluatingData.soundEffectMode}>
|
|
|
+ <Popup
|
|
|
+ teleport="body"
|
|
|
+ closeOnClickOverlay={false}
|
|
|
+ class={["popup-custom", "van-scale"]}
|
|
|
+ transition="van-scale"
|
|
|
+ v-model:show={evaluatingData.soundEffectMode}
|
|
|
+ >
|
|
|
<SoundEffect
|
|
|
onClose={(value: any) => {
|
|
|
evaluatingData.soundEffectMode = false;
|
|
@@ -268,13 +298,30 @@ export default defineComponent({
|
|
|
/>
|
|
|
</Popup>
|
|
|
|
|
|
- <Popup teleport="body" closeOnClickOverlay={false} defaultStyle={false} v-model:show={evaluatingData.resulstMode}>
|
|
|
+ <Popup
|
|
|
+ teleport="body"
|
|
|
+ closeOnClickOverlay={false}
|
|
|
+ class={["popup-custom", "van-scale"]}
|
|
|
+ transition="van-scale"
|
|
|
+ v-model:show={evaluatingData.resulstMode}
|
|
|
+ >
|
|
|
<EvaluatResult onClose={handleEvaluatResult} />
|
|
|
</Popup>
|
|
|
- <Popup teleport="body" closeOnClickOverlay={false} defaultStyle={false} v-model:show={evaluatModel.evaluatUpdateAudio}>
|
|
|
+ <Popup
|
|
|
+ teleport="body"
|
|
|
+ closeOnClickOverlay={false}
|
|
|
+ class={["popup-custom", "van-scale"]}
|
|
|
+ transition="van-scale"
|
|
|
+ v-model:show={evaluatModel.evaluatUpdateAudio}
|
|
|
+ >
|
|
|
<EvaluatAudio onClose={hanldeUpdateVideoAndAudio} />
|
|
|
</Popup>
|
|
|
- <Popup teleport="body" defaultStyle={false} v-model:show={evaluatModel.shareMode}>
|
|
|
+ <Popup
|
|
|
+ teleport="body"
|
|
|
+ class={["popup-custom", "van-scale"]}
|
|
|
+ transition="van-scale"
|
|
|
+ v-model:show={evaluatModel.shareMode}
|
|
|
+ >
|
|
|
<EvaluatShare onClose={() => (evaluatModel.shareMode = false)} />
|
|
|
</Popup>
|
|
|
</div>
|