dusenyao 3 سال پیش
والد
کامیت
19738954c3
39فایلهای تغییر یافته به همراه1114 افزوده شده و 278 حذف شده
  1. 1 0
      .vscode/settings.json
  2. 716 24
      package-lock.json
  3. 3 0
      package.json
  4. 14 0
      src/api/app.js
  5. BIN
      src/assets/login/project1-1-1.png
  6. BIN
      src/assets/login/project1-1.png
  7. BIN
      src/assets/login/project1.png
  8. BIN
      src/assets/login/project2-2-2.png
  9. BIN
      src/assets/login/project2-2.png
  10. BIN
      src/assets/login/project2.png
  11. BIN
      src/assets/login/project3-3-3.png
  12. BIN
      src/assets/login/project3-3.png
  13. BIN
      src/assets/login/project3.png
  14. BIN
      src/assets/login/project4-4-4.png
  15. BIN
      src/assets/login/project4-4.png
  16. BIN
      src/assets/login/project4.png
  17. BIN
      src/assets/login/project5-5-5.png
  18. BIN
      src/assets/login/project5-5.png
  19. BIN
      src/assets/login/project5.png
  20. BIN
      src/assets/login/project6-6-6.png
  21. BIN
      src/assets/login/project6-6.png
  22. BIN
      src/assets/login/project6.png
  23. 32 11
      src/components/course/CompletionView.vue
  24. 30 10
      src/components/course/FinishCourseware.vue
  25. 33 9
      src/components/live/CurMaterial.vue
  26. 27 9
      src/components/select/SelectCourse.vue
  27. 1 0
      src/layouts/components/BreadCrumb.vue
  28. 33 197
      src/layouts/components/LayoutHeader.vue
  29. 1 0
      src/layouts/index.vue
  30. 12 0
      src/main.js
  31. 4 0
      src/router/index.js
  32. 2 1
      src/store/getters.js
  33. 1 0
      src/store/modules/app.js
  34. 15 2
      src/styles/index.scss
  35. 11 0
      src/utils/common.js
  36. 32 12
      src/views/live/teacher/CompleteList.vue
  37. 93 0
      src/views/task_details/ShowCourseware.vue
  38. 50 2
      src/views/task_details/TaskTop.vue
  39. 3 1
      src/views/task_details/teacher/index.vue

+ 1 - 0
.vscode/settings.json

@@ -1,5 +1,6 @@
 {
   "cSpell.words": [
+    "AILP",
     "GCLS",
     "KHPJ",
     "XYZP"

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 716 - 24
package-lock.json


+ 3 - 0
package.json

@@ -11,11 +11,13 @@
     "lint": "eslint --ext .js,.vue src"
   },
   "dependencies": {
+    "ailp-book-question-ui": "file:../ailp-book-question-ui-0.1.0.tgz",
     "awe-dnd": "^0.3.4",
     "axios": "^0.21.1",
     "core-js": "^3.10.1",
     "element-ui": "^2.15.1",
     "gcls-book-question-ui": "file:../gcls-book-question-ui-0.1.0.tgz",
+    "jquery": "^3.6.0",
     "js-cookie": "^2.2.1",
     "normalize.css": "^8.0.1",
     "nprogress": "^0.2.0",
@@ -23,6 +25,7 @@
     "vue-i18n": "^8.24.0",
     "vue-pdf": "^4.3.0",
     "vue-router": "^3.5.1",
+    "vue-video-player": "^5.0.2",
     "vuex": "^3.6.2"
   },
   "devDependencies": {

+ 14 - 0
src/api/app.js

@@ -119,6 +119,20 @@ export function GetLogo() {
 }
 
 /**
+ * 得到用户能进入的子系统列表(电脑端)
+ */
+export function GetChildSysList_CanEnter_PC(data) {
+  let params = getRequestParams('login_control-GetChildSysList_CanEnter_PC');
+
+  return request({
+    method: 'post',
+    url: process.env.VUE_APP_FileServer,
+    params,
+    data
+  });
+}
+
+/**
  * 通用请求
  * @param {String} MethodName 方法名
  * @param {Object} data

BIN
src/assets/login/project1-1-1.png


BIN
src/assets/login/project1-1.png


BIN
src/assets/login/project1.png


BIN
src/assets/login/project2-2-2.png


BIN
src/assets/login/project2-2.png


BIN
src/assets/login/project2.png


BIN
src/assets/login/project3-3-3.png


BIN
src/assets/login/project3-3.png


BIN
src/assets/login/project3.png


BIN
src/assets/login/project4-4-4.png


BIN
src/assets/login/project4-4.png


BIN
src/assets/login/project4.png


BIN
src/assets/login/project5-5-5.png


BIN
src/assets/login/project5-5.png


BIN
src/assets/login/project5.png


BIN
src/assets/login/project6-6-6.png


BIN
src/assets/login/project6-6.png


BIN
src/assets/login/project6.png


+ 32 - 11
src/components/course/CompletionView.vue

@@ -11,12 +11,23 @@
       </div>
     </div>
 
-    <bookreport
-      v-if="dialogVisible"
-      :context="context"
-      :book-client-width="800"
-      :book-answer-content="bookAnswerContent"
-    />
+    <template v-if="sys_type === 'GCLS'">
+      <bookreport
+        v-if="dialogVisible"
+        :context="context"
+        :book-client-width="800"
+        :book-answer-content="bookAnswerContent"
+      />
+    </template>
+    <template v-else>
+      <bookailp
+        v-if="dialogVisible"
+        :context="context"
+        :ui-type="ui_type"
+        :preview-width="800"
+        :preview-height="450"
+      />
+    </template>
 
     <div slot="footer"></div>
   </el-dialog>
@@ -55,6 +66,8 @@ export default {
       count_right: 0,
       count_error: 0,
       context: null,
+      ui_type: '',
+      sys_type: this.$store.getters.sys_type,
       bookAnswerContent: ''
     };
   },
@@ -68,11 +81,19 @@ export default {
       this.getTaskMaterialStudentExamAnswer().then(() => {
         GetCoursewareContent_View({ id: this.curCoursewareId }).then(({ content }) => {
           if (content) {
-            this.context = {
-              id: this.curCoursewareId,
-              ui_type: JSON.parse(content).question.ui_type,
-              content: JSON.parse(content)
-            };
+            if (this.sys_type === 'GCLS') {
+              this.context = {
+                id: this.curCoursewareId,
+                ui_type: JSON.parse(content).question.ui_type,
+                content: JSON.parse(content)
+              };
+            } else {
+              const contents = JSON.parse(content);
+              if (contents.question && contents.question.length > 0) {
+                this.context = JSON.parse(contents.question);
+                this.ui_type = contents.ui_type ? contents.ui_type : '';
+              }
+            }
           } else {
             this.context = null;
           }

+ 30 - 10
src/components/course/FinishCourseware.vue

@@ -8,11 +8,21 @@
     @close="dialogClose"
   >
     <bookquestion
+      v-if="sys_type === 'GCLS'"
       ref="courseware"
       :context="context"
       @handleBookUserAnswer="handleBookUserAnswer"
     />
 
+    <bookailp
+      v-else
+      :context="context"
+      :ui-type="ui_type"
+      :preview-width="820"
+      :preview-height="461"
+      @handleBookUserAnswer="handleBookUserAnswer"
+    />
+
     <div slot="footer">
       <el-button type="primary" @click="finishTaskMaterial">完成</el-button>
     </div>
@@ -40,7 +50,9 @@ export default {
   data() {
     return {
       context: null,
-      exam_answer: ''
+      ui_type: '',
+      exam_answer: '',
+      sys_type: this.$store.getters.sys_type
     };
   },
   watch: {
@@ -53,14 +65,22 @@ export default {
 
       GetCoursewareContent_View({ id: this.coursewareId }).then(({ content }) => {
         if (content) {
-          this.context = {
-            id: this.coursewareId,
-            ui_type: JSON.parse(content).question.ui_type,
-            content: JSON.parse(content)
-          };
-          this.$nextTick(() => {
-            this.$refs.courseware.handleAnswerTimeStart();
-          });
+          if (this.sys_type === 'GCLS') {
+            this.context = {
+              id: this.coursewareId,
+              ui_type: JSON.parse(content).question.ui_type,
+              content: JSON.parse(content)
+            };
+            this.$nextTick(() => {
+              this.$refs.courseware.handleAnswerTimeStart();
+            });
+          } else {
+            const contents = JSON.parse(content);
+            if (contents.question && contents.question.length > 0) {
+              this.context = JSON.parse(contents.question);
+              this.ui_type = contents.ui_type ? contents.ui_type : '';
+            }
+          }
         } else {
           this.context = null;
         }
@@ -69,7 +89,7 @@ export default {
   },
   methods: {
     finishTaskMaterial() {
-      if (this.exam_answer.length === 0) {
+      if (this.exam_answer.length === 0 && this.sys_type === 'GCLS') {
         this.$message.warning('请完成课件');
         return;
       }

+ 33 - 9
src/components/live/CurMaterial.vue

@@ -17,10 +17,20 @@
 
     <template v-if="materialType === 'COURSEWARE'">
       <bookquestion
+        v-if="sys_type === 'GCLS'"
         ref="courseware"
         :context="context"
         @handleBookUserAnswer="handleBookUserAnswer"
       />
+
+      <bookailp
+        v-else
+        :context="context"
+        :ui-type="ui_type"
+        :preview-width="850"
+        :preview-height="478"
+        @handleBookUserAnswer="handleBookUserAnswer"
+      />
     </template>
     <template v-else>
       <template v-if="fileType === 'pdf'">
@@ -88,6 +98,8 @@ export default {
     return {
       context: null,
       exam_answer: '',
+      ui_type: '',
+      sys_type: this.$store.getters.sys_type,
       file_relative_path: '',
       file_url_https: '',
       pdfSrc: '',
@@ -133,14 +145,22 @@ export default {
     getCoursewareContent_View() {
       GetCoursewareContent_View({ id: this.materialId }).then(({ content }) => {
         if (content) {
-          this.context = {
-            id: this.materialId,
-            ui_type: JSON.parse(content).question.ui_type,
-            content: JSON.parse(content)
-          };
-          this.$nextTick(() => {
-            this.$refs.courseware.handleAnswerTimeStart();
-          });
+          if (this.sys_type === 'GCLS') {
+            this.context = {
+              id: this.materialId,
+              ui_type: JSON.parse(content).question.ui_type,
+              content: JSON.parse(content)
+            };
+            this.$nextTick(() => {
+              this.$refs.courseware.handleAnswerTimeStart();
+            });
+          } else {
+            const contents = JSON.parse(content);
+            if (contents.question && contents.question.length > 0) {
+              this.context = JSON.parse(contents.question);
+              this.ui_type = contents.ui_type ? contents.ui_type : '';
+            }
+          }
         } else {
           this.context = null;
         }
@@ -181,7 +201,11 @@ export default {
     },
 
     finishMyMaterial() {
-      if (this.materialType === 'COURSEWARE' && this.exam_answer.length === 0) {
+      if (
+        this.materialType === 'COURSEWARE' &&
+        this.exam_answer.length === 0 &&
+        this.sys_type === 'GCLS'
+      ) {
         this.$message.warning('请完成课件');
         return;
       }

+ 27 - 9
src/components/select/SelectCourse.vue

@@ -27,7 +27,15 @@
         />
       </div>
       <div class="content-structure-container">
-        <Bookquestion :context="context" />
+        <bookquestion v-if="sys_type === 'GCLS'" :context="context" />
+
+        <bookailp
+          v-else
+          :context="context"
+          :ui-type="ui_type"
+          :preview-width="720"
+          :preview-height="405"
+        />
       </div>
     </div>
 
@@ -62,7 +70,9 @@ export default {
       currentCourse: '',
       book_list: [],
       nodes: [],
-      context: null
+      context: null,
+      ui_type: '',
+      sys_type: this.$store.getters.sys_type
     };
   },
   watch: {
@@ -108,13 +118,21 @@ export default {
       this.curBook = book;
     },
     getCoursewareContent_View() {
-      GetCoursewareContent_View({ id: this.currentCourse }).then(res => {
-        if (res.content) {
-          this.context = {
-            id: this.currentCourse,
-            ui_type: JSON.parse(res.content).question.ui_type,
-            content: JSON.parse(res.content)
-          };
+      GetCoursewareContent_View({ id: this.currentCourse }).then(({ content }) => {
+        if (content) {
+          if (this.sys_type === 'GCLS') {
+            this.context = {
+              id: this.currentCourse,
+              ui_type: JSON.parse(content).question.ui_type,
+              content: JSON.parse(content)
+            };
+          } else {
+            const contents = JSON.parse(content);
+            if (contents.question && contents.question.length > 0) {
+              this.context = JSON.parse(contents.question);
+              this.ui_type = contents.ui_type ? contents.ui_type : '';
+            }
+          }
         } else {
           this.context = null;
         }

+ 1 - 0
src/layouts/components/BreadCrumb.vue

@@ -53,6 +53,7 @@ export default {
   height: 56px;
   line-height: 56px;
   background-color: #f6ecdd;
+  z-index: 999;
 
   &-container {
     width: $basicWidth;

+ 33 - 197
src/layouts/components/LayoutHeader.vue

@@ -2,7 +2,9 @@
   <!-- 顶部登录导航 -->
   <div class="LoginNav">
     <div class="logo">
-      <span class="logo-img"> logo </span>
+      <span class="logo-img">
+        <el-image :src="$store.state.app.config.logo_image_url" />
+      </span>
       <el-menu
         :default-active="activeIndex"
         class="el-menu-demo"
@@ -33,7 +35,7 @@
                 >
                   <img
                     style="position: relative; width: 24px"
-                    :src="require('../../assets/login/' + item.img + '.png')"
+                    :src="item.icon_url_memu_default"
                     alt=""
                   />
                   <span style="margin-left: 16px">
@@ -93,7 +95,7 @@
 <script>
 import { mapGetters } from 'vuex';
 import { getToken, removeToken } from '@/utils/auth';
-import { GetLanguageList } from '@/api/app';
+import { GetLanguageList, GetChildSysList_CanEnter_PC } from '@/api/app';
 import { setI18nLang } from '@/utils/i18n';
 import { IsExistMyMessage_NotRead } from '@/api/user';
 
@@ -105,56 +107,6 @@ export default {
       LoginNavIndex: 0, // 下拉框导航索引
       projectName: '教学中心',
       projectList: [],
-      teacherProList: [
-        // 普通教师
-        {
-          id: 0,
-          name: '教学中心',
-          img: 'project1'
-        },
-        {
-          id: 2,
-          name: '教培中心',
-          img: 'project3'
-        },
-        {
-          id: 3,
-          name: '教研中心',
-          img: 'project4'
-        },
-        {
-          id: 4,
-          name: '考试中心',
-          img: 'project5'
-        },
-        {
-          id: 5,
-          name: '学习中心',
-          img: 'project6'
-        },
-        {
-          id: 6,
-          name: '个人中心',
-          img: 'project7'
-        }
-      ],
-      stuProList: [
-        {
-          id: 0,
-          name: '教学中心',
-          img: 'project1'
-        },
-        {
-          id: 5,
-          name: '学习中心',
-          img: 'project6'
-        },
-        {
-          id: 6,
-          name: '个人中心',
-          img: 'project7'
-        }
-      ],
       userMessage: null,
       userShow: false,
       language_list: [],
@@ -166,31 +118,23 @@ export default {
     ...mapGetters(['language_type'])
   },
   created() {
-    let { token, isHas } = getToken();
+    this.getChildSysList();
+    const { token, isHas } = getToken();
     if (isHas) {
       this.userMessage = token;
-      let popedom_code_list = this.userMessage.popedom_code_list;
-      if (this.userMessage.user_type === 'TEACHER') {
-        this.projectList = this.handleProList(popedom_code_list);
-      } else if (this.userMessage.user_type === 'STUDENT') {
-        this.projectList = this.stuProList;
-      }
-      this.projectList.forEach((item, index) => {
-        if (item.id === 0) {
-          this.LoginNavIndex = index;
-        }
-      });
+
+      let interval = setInterval(() => {
+        IsExistMyMessage_NotRead()
+          .then(({ is_exist }) => {
+            this.isNotRead = JSON.parse(is_exist);
+          })
+          .catch(() => {
+            clearInterval(interval);
+          });
+      }, 120000);
+
+      this.getLangList();
     }
-    this.getLangList();
-    let interval = setInterval(() => {
-      IsExistMyMessage_NotRead()
-        .then(({ is_exist }) => {
-          this.isNotRead = JSON.parse(is_exist);
-        })
-        .catch(() => {
-          clearInterval(interval);
-        });
-    }, 120000);
   },
   methods: {
     // 切换导航
@@ -210,31 +154,8 @@ export default {
         return;
       }
       this.projectName = this.projectList[command].name;
-      let id = this.projectList[command].id;
-      let url = '';
-      if (id === 0) {
-        // 教学管理系统
-        url = `/GCLS-Learn/#/EnterSys`;
-      } else if (id === 1) {
-        // 教材管理系统
-        url = `/GCLS-Book/#/EnterSys`;
-      } else if (id === 2) {
-        // 教培中心
-        url = `/GCLS-TRC/#/EnterSys`;
-      } else if (id === 3) {
-        // 教研中心
-        url = `/GCLS-TC/#/EnterSys`;
-      } else if (id === 4) {
-        // 考试中心
-        url = `/GCLS-Test/#/EnterSys`;
-      } else if (id === 5) {
-        // 学习中心
-        url = `/GCLS-LC/#/EnterSys`;
-      } else {
-        // 个人中心
-        url = `/GCLS-Personal/#/EnterSys`;
-      }
-      window.location.href = url;
+      let relative_path = this.projectList[command].relative_path;
+      location.href = relative_path;
     },
     goPersonal() {
       window.location.href = `/GCLS-Personal/#/EnterSys`;
@@ -261,96 +182,21 @@ export default {
       await setI18nLang(language_type);
       this.$router.go(0);
     },
-    handleProList(list) {
-      let projectList = [];
-      if (list.length === 0) {
-        let arr = [
-          {
-            id: 2,
-            name: '教培中心',
-            img: 'project3'
-          },
-          {
-            id: 3,
-            name: '教研中心',
-            img: 'project4'
-          },
-          {
-            id: 5,
-            name: '学习中心',
-            img: 'project6'
-          },
-          {
-            id: 6,
-            name: '个人中心',
-            img: 'project7'
-          }
-        ];
-        projectList = arr;
-      } else if (list.includes(2000001)) {
-        projectList = JSON.parse(JSON.stringify(this.teacherProList));
-        for (let i = 0; i < list.length; i++) {
-          if (list[i] === 2000003) {
-            projectList.push({
-              id: 1,
-              name: '教材管理系统',
-              img: 'project2'
+    getChildSysList() {
+      GetChildSysList_CanEnter_PC()
+        .then(({ child_sys_list }) => {
+          if (child_sys_list && child_sys_list.length > 0) {
+            this.projectList = child_sys_list;
+            this.projectList.forEach((item, index) => {
+              if (item.key === 'GCLS-Learn') {
+                this.LoginNavIndex = index;
+              }
             });
           }
-        }
-      } else {
-        for (let i = 0; i < list.length; i++) {
-          let code = list[i];
-          if (code === 2000002) {
-            projectList.push({
-              id: 0,
-              name: '教学管理系统',
-              img: 'project1'
-            });
-          } else if (code === 2000003) {
-            projectList.push({
-              id: 1,
-              name: '教材管理系统',
-              img: 'project2'
-            });
-          } else if (code === 2000004) {
-            projectList.push({
-              id: 2,
-              name: '教培中心',
-              img: 'project3'
-            });
-          } else if (code === 2000005) {
-            projectList.push({
-              id: 4,
-              name: '考试中心',
-              img: 'project5'
-            });
-          } else if (code === 2000006) {
-            projectList.push({
-              id: 3,
-              name: '教研中心',
-              img: 'project4'
-            });
-          }
-        }
-        projectList.push({
-          id: 6,
-          name: '个人中心',
-          img: 'project7'
+        })
+        .catch(err => {
+          console.log(err);
         });
-      }
-      // 排序
-      for (let i = 0; i < projectList.length - 1; i++) {
-        for (let j = 0; j < projectList.length - 1 - i; j++) {
-          // 相邻元素两两对比,元素交换,大的元素交换到后面
-          if (projectList[j].id > projectList[j + 1].id) {
-            let temp = projectList[j];
-            projectList[j] = projectList[j + 1];
-            projectList[j + 1] = temp;
-          }
-        }
-      }
-      return projectList;
     }
   }
 };
@@ -374,16 +220,6 @@ export default {
     display: flex;
     align-items: center;
 
-    &-img {
-      font-style: normal;
-      font-weight: 600;
-      font-size: 30px;
-      font-variant: small-caps;
-      color: #000;
-      margin-right: 29px;
-      line-height: 74px;
-    }
-
     .el-menu-demo {
       background: rgba(0, 0, 0, 0);
 

+ 1 - 0
src/layouts/index.vue

@@ -41,6 +41,7 @@ export default {
   padding-top: $header-h;
 
   &-header {
+    z-index: 1002;
     position: fixed;
     top: 0;
     left: 0;

+ 12 - 0
src/main.js

@@ -2,11 +2,21 @@ import Vue from 'vue';
 import App from './App.vue';
 import router from './router';
 import store from './store';
+import $ from 'jquery';
+window.$ = $;
+
+import VideoPlayer from 'vue-video-player';
+import 'video.js/dist/video-js.css';
+import 'vue-video-player/src/custom-theme.css';
 
 import ElementUI from 'element-ui';
 import 'element-ui/lib/theme-chalk/index.css';
+
 import GCLSBookQuestionUI from 'gcls-book-question-ui';
 import 'gcls-book-question-ui/dist/gcls-book-question-ui.css';
+import AILPBookQuestionUI from 'ailp-book-question-ui';
+import 'ailp-book-question-ui/dist/ailp-book-question-ui.css';
+
 import VueDND from 'awe-dnd';
 
 import '@/icons';
@@ -19,6 +29,8 @@ import '@/permission'; // 权限控制
 
 Vue.use(ElementUI);
 Vue.use(GCLSBookQuestionUI);
+Vue.use(AILPBookQuestionUI);
+Vue.use(VideoPlayer);
 Vue.use(VueDND);
 
 Vue.config.productionTip = false;

+ 4 - 0
src/router/index.js

@@ -115,6 +115,10 @@ const routes = [
       }
     ]
   },
+  {
+    path: '/task_detail/show_courseware/:coursewareId',
+    component: () => import('@/views/task_details/ShowCourseware')
+  },
   // 课程列表 -> 学生列表
   {
     path: '/student_list',

+ 2 - 1
src/store/getters.js

@@ -1,7 +1,8 @@
 const getters = {
   language_type: state => state.user.language_type,
   showProgress: state => state.app.showProgress,
-  percentage: state => state.app.percentage
+  percentage: state => state.app.percentage,
+  sys_type: state => state.app.config.sys_type
 };
 
 export default getters;

+ 1 - 0
src/store/modules/app.js

@@ -21,6 +21,7 @@ const getDefaultSate = () => {
     percentage: 0,
     config: {
       title: isHas ? token.title : '',
+      logo_image_url: isHas ? token.logo_image_url : '',
       logo_image_url_home: isHas ? token.logo_image_url_home : '',
       sys_type: isHas ? token.sys_type : ''
     }

+ 15 - 2
src/styles/index.scss

@@ -8,8 +8,7 @@ body {
   text-rendering: optimizeLegibility;
   overflow: hidden;
   /* stylelint-disable-next-line */
-  font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, '微软雅黑',
-    Arial, sans-serif;
+  font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, '微软雅黑', Arial, sans-serif;
 }
 
 label {
@@ -69,3 +68,17 @@ div:focus {
 .tip {
   color: #aaa;
 }
+
+.vjs-custom-skin > .video-js .vjs-big-play-button {
+  width: 225px;
+  height: 225px !important;
+  margin-top: -112px !important;
+  margin-left: -112px !important;
+  border: 0;
+}
+
+.vjs-icon-play::before,
+.video-js .vjs-big-play-button .vjs-icon-placeholder::before,
+.video-js .vjs-play-control .vjs-icon-placeholder::before {
+  content: none;
+}

+ 11 - 0
src/utils/common.js

@@ -0,0 +1,11 @@
+// 全屏方法兼容
+export function fullScreenCompatibility(dom) {
+  if (dom.requestFullscreen) {
+    return dom.requestFullscreen();
+  } else if (dom.webkitRequestFullScreen) {
+    return dom.webkitRequestFullScreen();
+  } else if (dom.mozRequestFullScreen) {
+    return dom.mozRequestFullScreen();
+  }
+  return dom.msRequestFullscreen();
+}

+ 32 - 12
src/views/live/teacher/CompleteList.vue

@@ -51,13 +51,23 @@
 
     <div class="complete-list-container">
       <template v-if="material_type === 'COURSEWARE'">
-        <bookreport
-          v-if="isStudent"
-          :context="context"
-          :book-client-width="800"
-          :book-answer-content="bookAnswerContent"
-        />
-        <bookquestion v-else :context="context" />
+        <template v-if="sys_type === 'GCLS'">
+          <bookreport
+            v-if="isStudent"
+            :context="context"
+            :book-client-width="800"
+            :book-answer-content="bookAnswerContent"
+          />
+          <bookquestion v-else :context="context" />
+        </template>
+        <template v-else>
+          <bookailp
+            :context="context"
+            :ui-type="ui_type"
+            :preview-width="800"
+            :preview-height="450"
+          />
+        </template>
       </template>
       <template v-else>
         <!-- pdf -->
@@ -116,6 +126,8 @@ export default {
       material_type: '',
       material_picture_url: '',
       context: null,
+      ui_type: '',
+      sys_type: this.$store.getters.sys_type,
       bookAnswerContent: '',
       duration: 0,
       count_not_done: 0,
@@ -205,11 +217,19 @@ export default {
     getCoursewareContent_View() {
       GetCoursewareContent_View({ id: this.material_id }).then(({ content }) => {
         if (content) {
-          this.context = {
-            id: this.currentCourse,
-            ui_type: JSON.parse(content).question.ui_type,
-            content: JSON.parse(content)
-          };
+          if (this.sys_type === 'GCLS') {
+            this.context = {
+              id: this.currentCourse,
+              ui_type: JSON.parse(content).question.ui_type,
+              content: JSON.parse(content)
+            };
+          } else {
+            const contents = JSON.parse(content);
+            if (contents.question && contents.question.length > 0) {
+              this.context = JSON.parse(contents.question);
+              this.ui_type = contents.ui_type ? contents.ui_type : '';
+            }
+          }
         } else {
           this.context = null;
         }

+ 93 - 0
src/views/task_details/ShowCourseware.vue

@@ -0,0 +1,93 @@
+<template>
+  <div class="show-courseware">
+    <header class="header">
+      <el-button type="primary" @click="requestFullScreen">全屏</el-button>
+    </header>
+
+    <template v-if="sys_type === 'GCLS'">
+      <bookquestion id="AILPcontent" :context="context" :book-client-width="1200" />
+    </template>
+    <template v-else>
+      <bookailp
+        v-if="context"
+        id="AILPcontent"
+        :context="context"
+        :ui-type="ui_type"
+        :preview-width="previewWidth"
+        :preview-height="previewHeight"
+      />
+    </template>
+  </div>
+</template>
+
+<script>
+import { GetCoursewareContent_View } from '@/api/course';
+
+export default {
+  data() {
+    return {
+      coursewareId: this.$route.params.coursewareId,
+      context: null,
+      ui_type: '',
+      previewWidth: window.screen.width,
+      previewHeight: window.screen.height,
+      sys_type: this.$store.getters.sys_type
+    };
+  },
+  created() {
+    GetCoursewareContent_View({ id: this.coursewareId }).then(({ content }) => {
+      if (content) {
+        if (this.sys_type === 'GCLS') {
+          this.context = {
+            id: this.coursewareId,
+            ui_type: JSON.parse(content).question.ui_type,
+            content: JSON.parse(content)
+          };
+          this.$nextTick(() => {
+            this.$refs.courseware.handleAnswerTimeStart();
+          });
+        } else {
+          const contents = JSON.parse(content);
+          if (contents.question && contents.question.length > 0) {
+            this.context = JSON.parse(contents.question);
+            this.ui_type = contents.ui_type ? contents.ui_type : '';
+          }
+        }
+      } else {
+        this.context = null;
+      }
+    });
+  },
+  methods: {
+    requestFullScreen() {
+      let element = document.getElementById('AILPcontent');
+      let requestMethod =
+        element.requestFullScreen ||
+        element.webkitRequestFullScreen ||
+        element.mozRequestFullScreen ||
+        element.msRequestFullScreen;
+      this.previewWidth = window.screen.width;
+      this.previewHeight = window.screen.height;
+      if (requestMethod) {
+        requestMethod.call(element);
+      } else if (typeof window.ActiveXObject !== 'undefined') {
+        let wscript = new ActiveXObject('WScript.Shell');
+        if (wscript !== null) {
+          wscript.SendKeys('{F11}');
+        }
+      }
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.show-courseware {
+  height: 100%;
+  overflow: auto;
+
+  .header {
+    margin: 12px 60px;
+  }
+}
+</style>

+ 50 - 2
src/views/task_details/TaskTop.vue

@@ -5,6 +5,26 @@
       <span class="title-time">{{ itemInfo.time_space_view_txt }}</span>
     </div>
     <div class="cs_item_name">{{ itemInfo.cs_item_name }}</div>
+    <div class="courseware-list">
+      <div class="courseware-list-title">课件</div>
+      <el-tag
+        v-for="item in itemInfo.courseware_list"
+        :key="item.courseware_id"
+        color="#fff"
+        :title="item.courseware_name"
+      >
+        <div class="courseware">
+          <svg-icon icon-class="courseware" />
+          <router-link
+            target="_blank"
+            :to="{ path: `/task_detail/show_courseware/${item.courseware_id}` }"
+            class="courseware_name"
+          >
+            {{ item.courseware_name }}
+          </router-link>
+        </div>
+      </el-tag>
+    </div>
     <div class="learning-material">
       <div class="learning-material-title">学习资料</div>
       <el-tag
@@ -28,7 +48,8 @@ export default {
           course_name: '',
           time_space_view_txt: '',
           cs_item_name: '',
-          cs_item_learning_material_list: ''
+          cs_item_learning_material_list: [],
+          courseware_list: []
         };
       },
       type: Object
@@ -68,14 +89,41 @@ export default {
   }
 
   .learning-material {
-    border-top: 1px solid #d9d9d9;
+    margin-bottom: 16px;
+
+    &-title {
+      font-size: 18px;
+      margin-bottom: 16px;
+    }
+  }
+
+  .courseware-list {
     padding-top: 24px;
     margin-bottom: 16px;
+    border-top: 1px solid #d9d9d9;
 
     &-title {
       font-size: 18px;
       margin-bottom: 16px;
     }
+
+    .el-tag {
+      cursor: pointer;
+
+      .courseware {
+        overflow: hidden;
+
+        .svg-icon {
+          font-size: 18px;
+          margin-right: 12px;
+        }
+
+        &_name {
+          display: inline-block;
+          max-width: 120px;
+        }
+      }
+    }
   }
 }
 </style>

+ 3 - 1
src/views/task_details/teacher/index.vue

@@ -134,6 +134,7 @@ export default {
         course_name: '',
         cs_item_name: '',
         cs_item_learning_material_list: [],
+        courseware_list: [],
         time_space_view_txt: ''
       },
       time_type: '',
@@ -190,7 +191,8 @@ export default {
             time_space_view_txt,
             course_name,
             cs_item_name,
-            cs_item_learning_material_list
+            cs_item_learning_material_list,
+            courseware_list
           };
           this.name = name;
           this.teaching_type = teaching_type;

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است