实训编制问题调整

This commit is contained in:
fan 2024-03-04 16:55:33 +08:00
parent 5dab51356d
commit 3d43eafa14
5 changed files with 15 additions and 11 deletions

View File

@ -21,7 +21,8 @@ const training = {
voiceStepIndex: -1, voiceStepIndex: -1,
examSwitch: false, // 考试开始结束标注 examSwitch: false, // 考试开始结束标注
stepRecord: [], // 操作记录 stepRecord: [], // 操作记录
joinTrainingInfo: null joinTrainingInfo: null,
isRecord: false
}, },
getters: { getters: {
teachMode: (state) => { teachMode: (state) => {
@ -131,6 +132,9 @@ const training = {
}, },
setJoinTrainingInfo: (state, joinTrainingInfo) => { setJoinTrainingInfo: (state, joinTrainingInfo) => {
state.joinTrainingInfo = joinTrainingInfo; state.joinTrainingInfo = joinTrainingInfo;
},
setIsRecord: (state, flag) => {
state.isRecord = flag;
} }
}, },
actions: { actions: {
@ -234,6 +238,9 @@ const training = {
}, },
setJoinTrainingInfo: ({ commit }, joinTrainingInfo ) => { setJoinTrainingInfo: ({ commit }, joinTrainingInfo ) => {
commit('setJoinTrainingInfo', joinTrainingInfo); commit('setJoinTrainingInfo', joinTrainingInfo);
},
setIsRecord: ({ commit }, flag) => {
commit('setIsRecord', flag);
} }
} }
}; };

View File

@ -247,7 +247,7 @@ export default {
} }
}, },
isRecord() { isRecord() {
return !!this.$route.query.record; return !!this.$store.state.trainingNew.record;
} }
}, },
watch:{ watch:{

View File

@ -31,7 +31,7 @@
<div class="chat-box-footer"> <div class="chat-box-footer">
<el-input v-model="textContent" size="small" placeholder="请输入会话文字点击T发送" style="flex: 1; margin-left: 5px;" :rows="1" /> <el-input v-model="textContent" size="small" placeholder="请输入会话文字点击T发送" style="flex: 1; margin-left: 5px;" :rows="1" />
<el-button :id="sendTextId" size="mini" class="chat-box-footer-create" :disabled="contentSend" @click="sendText">T</el-button> <el-button :id="sendTextId" size="mini" class="chat-box-footer-create" :disabled="contentSend" @click="sendText">T</el-button>
<el-button v-if="!$route.query.record" class="chat-box-footer-create chat-box-footer-send" :class="{'active': recordSending}" :disabled="audioPlay" size="mini" type="primary" @click="startRecording()"> <el-button v-if="!$store.state.trainingNew.isRecord" class="chat-box-footer-create chat-box-footer-send" :class="{'active': recordSending}" :disabled="audioPlay" size="mini" type="primary" @click="startRecording()">
<el-progress id="voice_progress_bar" type="circle" :show-text="false" :percentage="100/60*seconds" :width="40" :stroke-width="2" status="success" /> <el-progress id="voice_progress_bar" type="circle" :show-text="false" :percentage="100/60*seconds" :width="40" :stroke-width="2" status="success" />
<i v-if="recordSending" class="el-icon-close close_icon" @click.stop="cancleRecording()" /> <i v-if="recordSending" class="el-icon-close close_icon" @click.stop="cancleRecording()" />
<span class="iconfont icon-yuyin">&#xe62b;</span> <span class="iconfont icon-yuyin">&#xe62b;</span>

View File

@ -130,7 +130,6 @@ import EditOperate from './editOperate';
import CreateDraftTraining from './createDraftTraining'; import CreateDraftTraining from './createDraftTraining';
import GradeRules from './gradeRules'; import GradeRules from './gradeRules';
import TrackList from './trackList'; import TrackList from './trackList';
import { EventBus } from '@/scripts/event-bus';
export default { export default {
name: 'DesignIndex', name: 'DesignIndex',
@ -217,15 +216,13 @@ export default {
e.stopPropagation(); e.stopPropagation();
}); });
}, },
beforeDestroy() {
this.$store.dispatch('trainingNew/setIsRecord', false);
},
methods: { methods: {
goBackList() { goBackList() {
const qObj = {...this.$route.query}; this.$store.dispatch('trainingNew/setIsRecord', false);
qObj.record = false;
this.$router.replace({ query:{...qObj}});
this.showMode = 'draftTrainingList'; this.showMode = 'draftTrainingList';
this.$nextTick(() => {
EventBus.$emit('viewLoading', false);
});
}, },
computedRoleDisabled(role) { computedRoleDisabled(role) {
if (!this.editData.client) { if (!this.editData.client) {

View File

@ -203,7 +203,7 @@ export default {
return; return;
} }
const qObj = {...this.$route.query}; const qObj = {...this.$route.query};
qObj.record = true; this.$store.dispatch('trainingNew/setIsRecord', true);
this.$router.replace({ query:{...qObj}}); this.$router.replace({ query:{...qObj}});
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); //
getTrainingAll(row.id).then(resp => { getTrainingAll(row.id).then(resp => {