|
@@ -3,7 +3,7 @@ import { connectWebsocket, evaluatingData, handleEndBegin, handleStartBegin, han
|
|
|
import Earphone from "./earphone";
|
|
|
import styles from "./index.module.less";
|
|
|
import SoundEffect from "./sound-effect";
|
|
|
-import state, { handleRessetState, resetPlaybackToStart, musicalInstrumentCodeInfo } from "/src/state";
|
|
|
+import state, { handleRessetState, resetPlaybackToStart, musicalInstrumentCodeInfo, clearSelection } from "/src/state";
|
|
|
import { storeData } from "/src/store";
|
|
|
import { browser } from "/src/utils";
|
|
|
import { getNoteByMeasuresSlursStart } from "/src/helpers/formateMusic";
|
|
@@ -135,6 +135,7 @@ export default defineComponent({
|
|
|
evaluatingData.earPhoneType = res?.content?.type || "";
|
|
|
if (evaluatingData.earPhoneType === "有线耳机") {
|
|
|
clearTimeout(checkErjiTimer);
|
|
|
+ checkErjiTimer = null;
|
|
|
setTimeout(() => {
|
|
|
evaluatingData.earphoneMode = false;
|
|
|
}, 3000);
|
|
@@ -364,6 +365,10 @@ export default defineComponent({
|
|
|
};
|
|
|
|
|
|
const startBtnHandle = async () => {
|
|
|
+ // 选段未完成时,清除选段状态
|
|
|
+ if (state.sectionStatus && state.section.length < 2) {
|
|
|
+ clearSelection();
|
|
|
+ }
|
|
|
// 如果是异常状态,先等待500ms再执行后续流程
|
|
|
if (evaluatingData.isErrorState && !state.setting.soundEffect) {
|
|
|
// console.log('异常流程1')
|
|
@@ -441,6 +446,7 @@ export default defineComponent({
|
|
|
|
|
|
onUnmounted(() => {
|
|
|
clearTimeout(checkErjiTimer);
|
|
|
+ checkErjiTimer = null;
|
|
|
});
|
|
|
|
|
|
return () => (
|
|
@@ -484,6 +490,7 @@ export default defineComponent({
|
|
|
earphoneType={evaluatingData.earPhoneType}
|
|
|
onClose={() => {
|
|
|
clearTimeout(checkErjiTimer);
|
|
|
+ checkErjiTimer = null;
|
|
|
evaluatingData.earphoneMode = false;
|
|
|
// handlePerformDetection();
|
|
|
checkEarphoneStatus("start");
|