|
|
@@ -23,7 +23,7 @@
|
|
|
:border-color="''"
|
|
|
:component-move="componentMove"
|
|
|
/>
|
|
|
- <!-- <component :is="getSettingCom" ref="setting" /> -->
|
|
|
+ <component :is="getSettingCom" ref="setting" />
|
|
|
</div>
|
|
|
</div>
|
|
|
<footer style="text-align: right">
|
|
|
@@ -38,23 +38,52 @@ import SelectPage from '@/views/book/courseware/create/components/question/selec
|
|
|
import SelectSetting from '@/views/book/courseware/create/components/question/select/SelectSetting.vue';
|
|
|
import Judge from '@/views/book/courseware/create/components/question/judge/Judge.vue';
|
|
|
import JudgeSetting from '@/views/book/courseware/create/components/question/judge/JudgeSetting.vue';
|
|
|
+import SortPage from '@/views/book/courseware/create/components/question/sort/Sort.vue';
|
|
|
+import SortSetting from '@/views/book/courseware/create/components/question/sort/SortSetting.vue';
|
|
|
+import MatchingPage from '@/views/book/courseware/create/components/question/matching/Matching.vue';
|
|
|
+import MatchingSetting from '@/views/book/courseware/create/components/question/matching/MatchingSetting.vue';
|
|
|
+import FillPage from '@/views/book/courseware/create/components/question/fill/Fill.vue';
|
|
|
+import FillSetting from '@/views/book/courseware/create/components/question/fill/FillSetting.vue';
|
|
|
+import RecordInput from '@/views/book/courseware/create/components/question/record_input/RecordInput.vue';
|
|
|
+import RecordInputSetting from '@/views/book/courseware/create/components/question/record_input/RecordInputSetting.vue';
|
|
|
import RichText from '@/components/RichText.vue';
|
|
|
import { SaveCoursewareExercise } from '@/api/book';
|
|
|
export default {
|
|
|
name: 'ExerciseAdd',
|
|
|
- components: { SelectPage, SelectSetting, Judge, JudgeSetting, RichText },
|
|
|
+ components: {
|
|
|
+ SelectPage,
|
|
|
+ SelectSetting,
|
|
|
+ Judge,
|
|
|
+ JudgeSetting,
|
|
|
+ SortPage,
|
|
|
+ SortSetting,
|
|
|
+ MatchingPage,
|
|
|
+ MatchingSetting,
|
|
|
+ FillPage,
|
|
|
+ FillSetting,
|
|
|
+ RecordInput,
|
|
|
+ RecordInputSetting,
|
|
|
+ RichText,
|
|
|
+ },
|
|
|
props: ['exerciseContent'],
|
|
|
data() {
|
|
|
return {
|
|
|
typeList: [
|
|
|
{
|
|
|
- label: '选择题',
|
|
|
value: 'select',
|
|
|
+ label: '选择题',
|
|
|
},
|
|
|
{
|
|
|
- label: '判断题',
|
|
|
value: 'judge',
|
|
|
+ label: '判断题',
|
|
|
},
|
|
|
+ {
|
|
|
+ value: 'sort',
|
|
|
+ label: '排序题',
|
|
|
+ },
|
|
|
+ { value: 'matching', label: '连线题' },
|
|
|
+ { value: 'fill', label: '填空题' },
|
|
|
+ { value: 'record_input', label: '录音' },
|
|
|
],
|
|
|
typeValue: 'select',
|
|
|
title: '',
|
|
|
@@ -70,6 +99,15 @@ export default {
|
|
|
return SelectPage;
|
|
|
case 'judge':
|
|
|
return Judge;
|
|
|
+ case 'sort':
|
|
|
+ return SortPage;
|
|
|
+ case 'matching':
|
|
|
+ return MatchingPage;
|
|
|
+ case 'fill':
|
|
|
+ return FillPage;
|
|
|
+ case 'record_input':
|
|
|
+ return RecordInput;
|
|
|
+
|
|
|
default:
|
|
|
return SelectPage;
|
|
|
}
|
|
|
@@ -80,6 +118,14 @@ export default {
|
|
|
return SelectSetting;
|
|
|
case 'judge':
|
|
|
return JudgeSetting;
|
|
|
+ case 'sort':
|
|
|
+ return SortSetting;
|
|
|
+ case 'matching':
|
|
|
+ return MatchingSetting;
|
|
|
+ case 'fill':
|
|
|
+ return FillSetting;
|
|
|
+ case 'record_input':
|
|
|
+ return RecordInputSetting;
|
|
|
default:
|
|
|
return SelectSetting;
|
|
|
}
|
|
|
@@ -112,9 +158,14 @@ export default {
|
|
|
if (res.status === 1) {
|
|
|
this.$message.success('操作成功');
|
|
|
if (this.exercise_id) {
|
|
|
- this.$emit('submitAdd');
|
|
|
- } else {
|
|
|
this.$emit('submitAdd', res.exercise_id, this.typeList.find((p) => p.value === this.typeValue).label);
|
|
|
+ } else {
|
|
|
+ this.$emit(
|
|
|
+ 'submitAdd',
|
|
|
+ res.exercise_id,
|
|
|
+ this.typeList.find((p) => p.value === this.typeValue).label,
|
|
|
+ 'add',
|
|
|
+ );
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
@@ -158,7 +209,8 @@ export default {
|
|
|
}
|
|
|
</style>
|
|
|
<style lang="scss">
|
|
|
-.tox-tinymce-aux {
|
|
|
+.tox-tinymce-aux,
|
|
|
+.tox-tinymce-inline {
|
|
|
z-index: 9999 !important;
|
|
|
}
|
|
|
</style>
|