Browse Source

将 create_course 目录重构

dusenyao 2 years ago
parent
commit
6745d401e6
49 changed files with 76 additions and 65 deletions
  1. 28 26
      src/components/StepBar.vue
  2. 8 7
      src/router/index.js
  3. 2 2
      src/views/new_task_view/index.vue
  4. 0 0
      src/views/teacher/create_course/step_four/NewTask.vue
  5. 0 0
      src/views/teacher/create_course/step_one/CourseInfo.vue
  6. 0 0
      src/views/teacher/create_course/step_three/components/TaskExplain/ExpandContract.vue
  7. 0 0
      src/views/teacher/create_course/step_three/components/TaskExplain/index.vue
  8. 0 0
      src/views/teacher/create_course/step_three/components/common/AudioShow.vue
  9. 0 0
      src/views/teacher/create_course/step_three/components/common/VideoShow.vue
  10. 0 0
      src/views/teacher/create_course/step_three/components/data/TaskClassify.js
  11. 0 0
      src/views/teacher/create_course/step_three/components/data/TaskData.js
  12. 0 0
      src/views/teacher/create_course/step_three/components/data/TaskType.js
  13. 0 0
      src/views/teacher/create_course/step_three/components/layouts/LeftSidebar.vue
  14. 0 0
      src/views/teacher/create_course/step_three/components/layouts/RightSidebar.vue
  15. 0 0
      src/views/teacher/create_course/step_three/components/layouts/TaskEditor.vue
  16. 0 0
      src/views/teacher/create_course/step_three/components/layouts/create_csitem/index.vue
  17. 0 0
      src/views/teacher/create_course/step_three/components/pop-up/FillName.vue
  18. 0 0
      src/views/teacher/create_course/step_three/components/pop-up/SelectTaskClassify.vue
  19. 0 0
      src/views/teacher/create_course/step_three/components/pop-up/VideoRecording.vue
  20. 0 0
      src/views/teacher/create_course/step_three/components/preview/TaskExplain.vue
  21. 0 0
      src/views/teacher/create_course/step_three/components/preview/index.vue
  22. 0 0
      src/views/teacher/create_course/step_three/components/preview/mind_mapping/index.vue
  23. 0 0
      src/views/teacher/create_course/step_three/components/preview/task_preview/components/PreviewFile.vue
  24. 0 0
      src/views/teacher/create_course/step_three/components/preview/task_preview/components/PreviewMessage.vue
  25. 0 0
      src/views/teacher/create_course/step_three/components/preview/task_preview/components/SubtaskItem.vue
  26. 0 0
      src/views/teacher/create_course/step_three/components/preview/task_preview/index.vue
  27. 0 0
      src/views/teacher/create_course/step_three/components/task_template/CreateTask.vue
  28. 0 0
      src/views/teacher/create_course/step_three/components/task_template/TaskTemplate.vue
  29. 0 0
      src/views/teacher/create_course/step_three/components/task_template/components/TemplateCourseware.vue
  30. 0 0
      src/views/teacher/create_course/step_three/components/task_template/components/TemplateFile.vue
  31. 0 0
      src/views/teacher/create_course/step_three/components/task_template/components/TemplateRecording.vue
  32. 0 0
      src/views/teacher/create_course/step_three/components/task_template/components/courseware.js
  33. 0 0
      src/views/teacher/create_course/step_three/components/task_template/components/play.js
  34. 0 0
      src/views/teacher/create_course/step_three/components/task_template/components/recording.js
  35. 0 0
      src/views/teacher/create_course/step_three/components/task_template/index.vue
  36. 0 0
      src/views/teacher/create_course/step_three/components/task_template/subtask/SubTask.vue
  37. 0 0
      src/views/teacher/create_course/step_three/components/task_template/subtask/SubtaskContainer.vue
  38. 0 0
      src/views/teacher/create_course/step_three/components/task_template/subtask/data.js
  39. 0 0
      src/views/teacher/create_course/step_three/components/utils/drag.js
  40. 0 0
      src/views/teacher/create_course/step_three/components/utils/file.js
  41. 0 0
      src/views/teacher/create_course/step_three/components/utils/mouseEvent.js
  42. 0 0
      src/views/teacher/create_course/step_three/components/utils/preview.js
  43. 0 0
      src/views/teacher/create_course/step_three/components/utils/wheel.js
  44. 0 0
      src/views/teacher/create_course/step_three/index.js
  45. 0 0
      src/views/teacher/create_course/step_three/index.vue
  46. 0 0
      src/views/teacher/create_course/step_three_old/AddItem.vue
  47. 0 0
      src/views/teacher/create_course/step_three_old/CreateTask.vue
  48. 0 0
      src/views/teacher/create_course/step_two/SelectBook.vue
  49. 38 30
      src/views/teacher/student_list/SendMessage.vue

+ 28 - 26
src/components/StepBar.vue

@@ -17,35 +17,37 @@
 
 <script>
 export default {
-  name: 'StepBar',
-  props: {
-    // 步骤条第几步,以 0 开始
-    stepNumber: {
-      default: 0,
-      type: Number
-    }
-  },
-  data() {
-    return {
-      stepList: [
-        {
-          name: 'Key264'
-        },
-        { name: 'Key275' },
-        { name: 'Key265' }
-      ]
-    };
-  },
-  methods: {
-    stepName(num) {
-      if (num === this.stepNumber) return this.$i18n.t('Key282');
-      if (num > this.stepNumber) return this.$i18n.t('Key263');
-      if (num < this.stepNumber) return this.$i18n.t('Key623');
-    }
-  }
+  name: 'StepBar'
 };
 </script>
 
+<script setup>
+import { inject } from 'vue';
+
+const props = defineProps({
+  // 步骤条第几步,以 0 开始
+  stepNumber: {
+    default: 0,
+    type: Number
+  }
+});
+
+const stepList = [
+  {
+    name: 'Key264'
+  },
+  { name: 'Key275' },
+  { name: 'Key265' }
+];
+
+const $t = inject('$t');
+function stepName(num) {
+  if (num === props.stepNumber) return $t('Key282');
+  if (num > props.stepNumber) return $t('Key263');
+  if (num < props.stepNumber) return $t('Key623');
+}
+</script>
+
 <style lang="scss" scoped>
 .step {
   position: fixed;

+ 8 - 7
src/router/index.js

@@ -76,37 +76,38 @@ const routes = [
       {
         path: '/create_course_step_table/course_info',
         component: () =>
-          import(/* webpackChunkName: 'create_course'*/ '@/views/teacher/create_course/step_table/CourseInfo')
+          import(/* webpackChunkName: 'create_course'*/ '@/views/teacher/create_course/step_one/CourseInfo.vue')
       },
       // 分步表单 -> 第二步
       {
         path: '/create_course_step_table/select_book/:id',
         name: 'SelectBook',
         component: () =>
-          import(/* webpackChunkName: 'create_course'*/ '@/views/teacher/create_course/step_table/SelectBook')
+          import(/* webpackChunkName: 'create_course'*/ '@/views/teacher/create_course/step_two/SelectBook.vue')
       },
       /* 旧创建课节 开始 */
       // 分步表单 -> 第三步
       {
         path: '/create_course_step_table/old_create_task/:id',
         component: () =>
-          import(/* webpackChunkName: 'old_create_course'*/ '@/views/teacher/create_course/step_table/CreateTask')
+          import(
+            /* webpackChunkName: 'old_create_course'*/ '@/views/teacher/create_course/step_three_old/CreateTask.vue'
+          )
       },
       // 分步表单 -> 第四步 -> 新建课节任务
       {
         path: '/create_course_step_table/new_task/:time_type/:id/:curItemID',
         component: () =>
-          import(/* webpackChunkName: 'old_create_course'*/ '@/views/teacher/create_course/step_table/NewTask')
+          import(/* webpackChunkName: 'old_create_course'*/ '@/views/teacher/create_course/step_four/NewTask.vue')
       },
       /* 旧创建课节 结束 */
+
       /* 新创建课节 */
       // 分步表单 -> 第三步
       {
         path: '/create_course_step_table/create_task/:id',
         component: () =>
-          import(
-            /* webpackChunkName: 'create_course'*/ '@/views/teacher/create_course/step_table/create_task/index.vue'
-          )
+          import(/* webpackChunkName: 'create_course'*/ '@/views/teacher/create_course/step_three/index.vue')
       }
     ]
   },

+ 2 - 2
src/views/new_task_view/index.vue

@@ -47,8 +47,8 @@ import { ref } from 'vue';
 import store from '@/store';
 import { useTask } from './index';
 import { useTaskType, TASK_EXPLAIN } from './components/data/TaskType';
-import { useScale, useWheel, scale } from '@/views/teacher/create_course/step_table/create_task/components/utils/wheel';
-import { useMouseEvent } from '@/views/teacher/create_course/step_table/create_task/components/utils/mouseEvent';
+import { useScale, useWheel, scale } from '@/views/teacher/create_course/step_three/components/utils/wheel';
+import { useMouseEvent } from '@/views/teacher/create_course/step_three/components/utils/mouseEvent';
 
 import StudentView from './components/student/index.vue';
 import TeacherView from './components/teacher/index.vue';

+ 0 - 0
src/views/teacher/create_course/step_table/NewTask.vue → src/views/teacher/create_course/step_four/NewTask.vue


+ 0 - 0
src/views/teacher/create_course/step_table/CourseInfo.vue → src/views/teacher/create_course/step_one/CourseInfo.vue


+ 0 - 0
src/views/teacher/create_course/step_table/create_task/components/TaskExplain/ExpandContract.vue → src/views/teacher/create_course/step_three/components/TaskExplain/ExpandContract.vue


+ 0 - 0
src/views/teacher/create_course/step_table/create_task/components/TaskExplain/index.vue → src/views/teacher/create_course/step_three/components/TaskExplain/index.vue


+ 0 - 0
src/views/teacher/create_course/step_table/create_task/components/common/AudioShow.vue → src/views/teacher/create_course/step_three/components/common/AudioShow.vue


+ 0 - 0
src/views/teacher/create_course/step_table/create_task/components/common/VideoShow.vue → src/views/teacher/create_course/step_three/components/common/VideoShow.vue


+ 0 - 0
src/views/teacher/create_course/step_table/create_task/components/data/TaskClassify.js → src/views/teacher/create_course/step_three/components/data/TaskClassify.js


+ 0 - 0
src/views/teacher/create_course/step_table/create_task/components/data/TaskData.js → src/views/teacher/create_course/step_three/components/data/TaskData.js


+ 0 - 0
src/views/teacher/create_course/step_table/create_task/components/data/TaskType.js → src/views/teacher/create_course/step_three/components/data/TaskType.js


+ 0 - 0
src/views/teacher/create_course/step_table/create_task/components/layouts/LeftSidebar.vue → src/views/teacher/create_course/step_three/components/layouts/LeftSidebar.vue


+ 0 - 0
src/views/teacher/create_course/step_table/create_task/components/layouts/RightSidebar.vue → src/views/teacher/create_course/step_three/components/layouts/RightSidebar.vue


+ 0 - 0
src/views/teacher/create_course/step_table/create_task/components/layouts/TaskEditor.vue → src/views/teacher/create_course/step_three/components/layouts/TaskEditor.vue


+ 0 - 0
src/views/teacher/create_course/step_table/create_task/components/layouts/create_csitem/index.vue → src/views/teacher/create_course/step_three/components/layouts/create_csitem/index.vue


+ 0 - 0
src/views/teacher/create_course/step_table/create_task/components/pop-up/FillName.vue → src/views/teacher/create_course/step_three/components/pop-up/FillName.vue


+ 0 - 0
src/views/teacher/create_course/step_table/create_task/components/pop-up/SelectTaskClassify.vue → src/views/teacher/create_course/step_three/components/pop-up/SelectTaskClassify.vue


+ 0 - 0
src/views/teacher/create_course/step_table/create_task/components/pop-up/VideoRecording.vue → src/views/teacher/create_course/step_three/components/pop-up/VideoRecording.vue


+ 0 - 0
src/views/teacher/create_course/step_table/create_task/components/preview/TaskExplain.vue → src/views/teacher/create_course/step_three/components/preview/TaskExplain.vue


+ 0 - 0
src/views/teacher/create_course/step_table/create_task/components/preview/index.vue → src/views/teacher/create_course/step_three/components/preview/index.vue


+ 0 - 0
src/views/teacher/create_course/step_table/create_task/components/preview/mind_mapping/index.vue → src/views/teacher/create_course/step_three/components/preview/mind_mapping/index.vue


+ 0 - 0
src/views/teacher/create_course/step_table/create_task/components/preview/task_preview/components/PreviewFile.vue → src/views/teacher/create_course/step_three/components/preview/task_preview/components/PreviewFile.vue


+ 0 - 0
src/views/teacher/create_course/step_table/create_task/components/preview/task_preview/components/PreviewMessage.vue → src/views/teacher/create_course/step_three/components/preview/task_preview/components/PreviewMessage.vue


+ 0 - 0
src/views/teacher/create_course/step_table/create_task/components/preview/task_preview/components/SubtaskItem.vue → src/views/teacher/create_course/step_three/components/preview/task_preview/components/SubtaskItem.vue


+ 0 - 0
src/views/teacher/create_course/step_table/create_task/components/preview/task_preview/index.vue → src/views/teacher/create_course/step_three/components/preview/task_preview/index.vue


+ 0 - 0
src/views/teacher/create_course/step_table/create_task/components/task_template/CreateTask.vue → src/views/teacher/create_course/step_three/components/task_template/CreateTask.vue


+ 0 - 0
src/views/teacher/create_course/step_table/create_task/components/task_template/TaskTemplate.vue → src/views/teacher/create_course/step_three/components/task_template/TaskTemplate.vue


+ 0 - 0
src/views/teacher/create_course/step_table/create_task/components/task_template/components/TemplateCourseware.vue → src/views/teacher/create_course/step_three/components/task_template/components/TemplateCourseware.vue


+ 0 - 0
src/views/teacher/create_course/step_table/create_task/components/task_template/components/TemplateFile.vue → src/views/teacher/create_course/step_three/components/task_template/components/TemplateFile.vue


+ 0 - 0
src/views/teacher/create_course/step_table/create_task/components/task_template/components/TemplateRecording.vue → src/views/teacher/create_course/step_three/components/task_template/components/TemplateRecording.vue


+ 0 - 0
src/views/teacher/create_course/step_table/create_task/components/task_template/components/courseware.js → src/views/teacher/create_course/step_three/components/task_template/components/courseware.js


+ 0 - 0
src/views/teacher/create_course/step_table/create_task/components/task_template/components/play.js → src/views/teacher/create_course/step_three/components/task_template/components/play.js


+ 0 - 0
src/views/teacher/create_course/step_table/create_task/components/task_template/components/recording.js → src/views/teacher/create_course/step_three/components/task_template/components/recording.js


+ 0 - 0
src/views/teacher/create_course/step_table/create_task/components/task_template/index.vue → src/views/teacher/create_course/step_three/components/task_template/index.vue


+ 0 - 0
src/views/teacher/create_course/step_table/create_task/components/task_template/subtask/SubTask.vue → src/views/teacher/create_course/step_three/components/task_template/subtask/SubTask.vue


+ 0 - 0
src/views/teacher/create_course/step_table/create_task/components/task_template/subtask/SubtaskContainer.vue → src/views/teacher/create_course/step_three/components/task_template/subtask/SubtaskContainer.vue


+ 0 - 0
src/views/teacher/create_course/step_table/create_task/components/task_template/subtask/data.js → src/views/teacher/create_course/step_three/components/task_template/subtask/data.js


+ 0 - 0
src/views/teacher/create_course/step_table/create_task/components/utils/drag.js → src/views/teacher/create_course/step_three/components/utils/drag.js


+ 0 - 0
src/views/teacher/create_course/step_table/create_task/components/utils/file.js → src/views/teacher/create_course/step_three/components/utils/file.js


+ 0 - 0
src/views/teacher/create_course/step_table/create_task/components/utils/mouseEvent.js → src/views/teacher/create_course/step_three/components/utils/mouseEvent.js


+ 0 - 0
src/views/teacher/create_course/step_table/create_task/components/utils/preview.js → src/views/teacher/create_course/step_three/components/utils/preview.js


+ 0 - 0
src/views/teacher/create_course/step_table/create_task/components/utils/wheel.js → src/views/teacher/create_course/step_three/components/utils/wheel.js


+ 0 - 0
src/views/teacher/create_course/step_table/create_task/index.js → src/views/teacher/create_course/step_three/index.js


+ 0 - 0
src/views/teacher/create_course/step_table/create_task/index.vue → src/views/teacher/create_course/step_three/index.vue


+ 0 - 0
src/views/teacher/create_course/step_table/AddItem.vue → src/views/teacher/create_course/step_three_old/AddItem.vue


+ 0 - 0
src/views/teacher/create_course/step_table/CreateTask.vue → src/views/teacher/create_course/step_three_old/CreateTask.vue


+ 0 - 0
src/views/teacher/create_course/step_table/SelectBook.vue → src/views/teacher/create_course/step_two/SelectBook.vue


+ 38 - 30
src/views/teacher/student_list/SendMessage.vue

@@ -20,38 +20,46 @@
 
 <script>
 export default {
-  props: {
-    visible: {
-      default: false,
-      type: Boolean
-    },
-    titleName: {
-      default: '',
-      type: String
-    }
-  },
-  data() {
-    return {
-      message: ''
-    };
-  },
-  watch: {
-    visible(newVal) {
-      if (!newVal) return;
-      this.message = '';
-    }
+  name: 'SendMessage'
+};
+</script>
+
+<script setup>
+import { ref, watch, inject } from 'vue';
+import { Message } from 'element-ui';
+
+const props = defineProps({
+  visible: {
+    default: false,
+    type: Boolean
   },
-  methods: {
-    close() {
-      this.$emit('update:visible', false);
-    },
-
-    send() {
-      if (this.message.length === 0) return this.$message.warning(this.$i18n.t('Key300'));
-      this.$emit('sendMessage', this.message);
-    }
+  titleName: {
+    default: '',
+    type: String
   }
-};
+});
+
+const emits = defineEmits(['update:visible', 'sendMessage']);
+
+const $t = inject('$t');
+
+let message = ref('');
+watch(
+  () => props.visible,
+  (newVal) => {
+    if (!newVal) return;
+    message.value = '';
+  }
+);
+
+function close() {
+  emits('update:visible', false);
+}
+
+function send() {
+  if (message.value.length === 0) return Message.warning($t('Key300'));
+  emits('sendMessage', message.value);
+}
 </script>
 
 <style lang="scss">