dusenyao 3 lat temu
rodzic
commit
d5bc17bd60

+ 1 - 1
.vscode/javascript.code-snippets

@@ -3,7 +3,7 @@
     "scope": "javascript,typescript",
     "prefix": "api",
     "body": [
-      "export function n(data) {",
+      "export function ${0:n}(data) {",
       "  let params = getRequestParams('$1');",
       "",
       "  return request({",

+ 2 - 2
package-lock.json

@@ -10141,7 +10141,7 @@
     "node_modules/gcls-book-question-ui": {
       "version": "0.1.0",
       "resolved": "file:../gcls-book-question-ui-0.1.0.tgz",
-      "integrity": "sha512-zbYQGC9RkZ00zTq1ZL9sZH6TpXSq08QhAinkv9BFxTVuf1F1322z4fWpQo03d77un2zPLFcwo/pEoXSeEiX4cQ==",
+      "integrity": "sha512-0to64uRiQz1Qi0DFwxd25KFlq0JMk4oxxgXpsziIyCaA6iCDhNfEYIOymve7Stm7sZR2efNksJGpIPmyikkLzQ==",
       "dependencies": {
         "awe-dnd": "^0.3.4",
         "axios": "^0.21.1",
@@ -30809,7 +30809,7 @@
     },
     "gcls-book-question-ui": {
       "version": "file:..\\gcls-book-question-ui-0.1.0.tgz",
-      "integrity": "sha512-zbYQGC9RkZ00zTq1ZL9sZH6TpXSq08QhAinkv9BFxTVuf1F1322z4fWpQo03d77un2zPLFcwo/pEoXSeEiX4cQ==",
+      "integrity": "sha512-0to64uRiQz1Qi0DFwxd25KFlq0JMk4oxxgXpsziIyCaA6iCDhNfEYIOymve7Stm7sZR2efNksJGpIPmyikkLzQ==",
       "requires": {
         "awe-dnd": "^0.3.4",
         "axios": "^0.21.1",

+ 15 - 0
src/api/course.js

@@ -286,3 +286,18 @@ export function ApplyJoinCourse(data) {
     data
   });
 }
+
+/**
+ * 检测我的物品购买状态
+ * @param {Object} data
+ */
+export function CheckMyGoodsBuyStatus(data) {
+  let params = getRequestParams('order-order_manager-CheckMyGoodsBuyStatus');
+
+  return request({
+    method: 'post',
+    url: process.env.VUE_APP_LearnWebSI,
+    params,
+    data
+  });
+}

+ 15 - 1
src/api/live.js

@@ -108,7 +108,6 @@ export function GetCurMaterialSent(data) {
 /**
  * 完成推送给我的资料
  * @param { Object } data
- * @returns
  */
 export function FinishMyMaterial(data) {
   let params = getRequestParams('live_room-live_room_dispatch-FinishMyMaterial');
@@ -122,6 +121,21 @@ export function FinishMyMaterial(data) {
 }
 
 /**
+ * 得到推送资料的学员完成答案
+ * @param {Object} data
+ */
+export function GetStudentExamAnswer_FinishMaterial(data) {
+  let params = getRequestParams('live_room-live_room_dispatch-GetStudentExamAnswer_FinishMaterial');
+
+  return request({
+    method: 'post',
+    url: process.env.VUE_APP_LearnWebSI,
+    params,
+    data
+  });
+}
+
+/**
  * 得到直播间信息
  * @param {Object} data { task_id 任务ID }
  */

+ 29 - 6
src/components/live/CurMaterial.vue

@@ -9,7 +9,11 @@
     <div class="material-name">{{ materialName }}</div>
 
     <template v-if="materialType === 'COURSEWARE'">
-      <Bookquestion :context="context" />
+      <bookquestion
+        ref="courseware"
+        :context="context"
+        @handleBookUserAnswer="handleBookUserAnswer"
+      />
     </template>
     <template v-else>
       <template v-if="fileType === 'pdf'">
@@ -76,6 +80,7 @@ export default {
   data() {
     return {
       context: null,
+      exam_answer: '',
       file_relative_path: '',
       file_url_https: '',
       pdfSrc: '',
@@ -91,6 +96,16 @@ export default {
     }
   },
   watch: {
+    dialogVisibleMaterial(newVal) {
+      if (!newVal) {
+        this.context = null;
+        this.exam_answer = '';
+        this.file_relative_path = '';
+        this.file_url_https = '';
+        this.pdfSrc = '';
+        this.numPages = 1;
+      }
+    },
     materialId() {
       if (this.materialType === 'COURSEWARE') {
         this.getCoursewareContent_View();
@@ -105,13 +120,16 @@ export default {
     },
 
     getCoursewareContent_View() {
-      GetCoursewareContent_View({ id: this.materialId }).then(res => {
-        if (res.content) {
+      GetCoursewareContent_View({ id: this.materialId }).then(({ content }) => {
+        if (content) {
           this.context = {
             id: this.currentCourse,
-            ui_type: JSON.parse(res.content).question.ui_type,
-            content: JSON.parse(res.content)
+            ui_type: JSON.parse(content).question.ui_type,
+            content: JSON.parse(content)
           };
+          this.$nextTick(() => {
+            this.$refs.courseware.handleAnswerTimeStart();
+          });
         } else {
           this.context = null;
         }
@@ -147,11 +165,16 @@ export default {
         });
     },
 
+    handleBookUserAnswer(data) {
+      this.exam_answer = data;
+    },
+
     finishMyMaterial() {
       FinishMyMaterial({
         task_id: this.taskId,
         material_id: this.materialId,
-        material_type: this.materialType
+        material_type: this.materialType,
+        exam_answer: this.exam_answer
       }).then(() => {
         this.$message.success('完成推送资料成功');
         this.$emit('dialogMaterialClose');

+ 42 - 45
src/views/course_details/index.vue

@@ -9,7 +9,7 @@
         <div class="text">
           <p class="p1">{{ CourseData.name }}</p>
           <!-- 机构名称 -->
-          <p>Beijing language and Culture University</p>
+          <p>{{ CourseData.org_name }}</p>
           <p>
             {{ CourseData.teacher_list.length > 0 ? CourseData.teacher_list[0].teacher_name : '' }}
           </p>
@@ -22,7 +22,7 @@
             <span> {{ CourseData.end_date }} </span>
           </p>
 
-          <p v-if="backTime">距离关闭购买渠道还有</p>
+          <p v-if="backTime" class="tip">距离关闭购买渠道还有</p>
           <div class="operation">
             <div v-if="backTime" class="countdown">
               <div class="time">
@@ -36,7 +36,7 @@
                 </div>
                 <div>
                   <div class="time-num">{{ backTime.minutes }}</div>
-                  <div class="time-name">分</div>
+                  <div class="time-name">分</div>
                 </div>
                 <div>
                   <div class="time-num">{{ backTime.seconds }}</div>
@@ -44,15 +44,15 @@
                 </div>
               </div>
             </div>
-            <div v-else>The purchase channel has been closed</div>
-            <div>
+            <div v-else>购买渠道已关闭</div>
+
+            <div v-if="!readonly">
               <span class="price">
                 ¥ {{ CourseData.price }}
                 <span class="price_1" v-text="changePrice('1', CourseData.price)"></span>
                 <span class="price_2" v-text="changePrice('2', CourseData.price)"></span>
               </span>
-              <button v-if="!IsPurchase" class="get" @click="getPurchase">获取课程</button>
-              <button v-else class="acquired" @click="getPurchase">ACQUIRED</button>
+              <button class="get" @click="getPurchase">{{ is_buy ? '去学习' : '获取课程' }}</button>
             </div>
           </div>
         </div>
@@ -74,8 +74,9 @@
                   <span class="price_1" v-text="changePrice('1', item.book_price)"></span>
                   <span class="price_2" v-text="changePrice('2', item.book_price)"></span>
                 </span>
-                <button v-if="!IsPurchase" class="get">购买</button>
-                <button v-else class="acquired">ACQUIRED</button>
+                <button v-if="!readonly" :class="['get', is_buy ? 'acquired' : '']">
+                  {{ is_buy ? '已' : '' }}购买
+                </button>
               </div>
             </div>
           </div>
@@ -91,9 +92,7 @@
             <div class="text">
               <p class="p1">{{ item.teacher_name }}</p>
               <p>{{ item.teacher_org_name }}</p>
-              <p>
-                拌铍痹柔宫搏疲执胰逊持侨懈赫蜘秩锥畴陵黑阎停拢狂员棕鸟今纪秘也害棍亩疫潜,荫畜凉劈押望鹏艇从地赏果汛*隔微颊剪法震占
-              </p>
+              <p></p>
             </div>
           </div>
         </div>
@@ -525,7 +524,7 @@
         width="720px"
         :before-close="closeaudit"
       >
-        <audit :id="id" :data="CourseData" :goods-type="$route.query.goodsType" />
+        <audit :id="id" :data="CourseData" :goods-type="goodsType" />
       </el-dialog>
     </div>
   </div>
@@ -533,7 +532,7 @@
 
 <script>
 import Audit from '@/components/payment/Audit';
-import { GetCourseInfoBox } from '@/api/course';
+import { GetCourseInfoBox, CheckMyGoodsBuyStatus } from '@/api/course';
 
 export default {
   components: {
@@ -542,31 +541,34 @@ export default {
   data() {
     return {
       id: this.$route.query.id,
+      goodsType: this.$route.query.goodsType,
+      readonly: 'readonly' in this.$route.query ? this.$route.query.readonly : false,
       enshrine: false,
-      IsPurchase: false,
       SelectShow: '1', // 选择展示课程资源还是下载
       openList: [],
       timer: null, // 获取倒计时
       backTime: new Date(),
       auditShow: false,
       loading: false,
+      is_buy: false,
       CourseData: null
     };
   },
   created() {
     // 获取课程详情
     this.loading = true;
-    GetCourseInfoBox({
-      id: this.id
-    })
+    CheckMyGoodsBuyStatus({ goods_type: this.goodsType, goods_id: this.id }).then(({ is_buy }) => {
+      this.is_buy = is_buy === 'true';
+    });
+    GetCourseInfoBox({ id: this.id })
       .then(res => {
         this.CourseData = res;
+        this.getBackTime();
         this.loading = false;
       })
       .catch(() => {
         this.loading = false;
       });
-    this.getBackTime();
   },
   // 方法集合
   methods: {
@@ -609,10 +611,13 @@ export default {
     // 购买   需要先加入课程 审核 审核通过之后才能购买课程
     getPurchase() {
       // 购买通道关闭
-      // if (!this.backTime) {
-      //   this.$message.warning("购买渠道已关闭");
-      //   return;
-      // }
+      if (this.is_buy) {
+        return this.$router.push('/');
+      }
+      if (!this.backTime) {
+        this.$message.warning('购买渠道已关闭');
+        return;
+      }
       this.auditShow = true;
     },
     closeaudit() {
@@ -620,21 +625,20 @@ export default {
     },
     // 获取当前时间到指定时间的倒计时
     getBackTime() {
-      let targetTime = new Date('2021-7-30 13:00').getTime();
+      let targetTime = new Date(this.CourseData.end_date).getTime();
       // 目标时间戳 - 当前时间戳 = 倒计时
       this.timer = setInterval(() => {
-        let currentTime = new Date().getTime();
-        let backTime = targetTime - currentTime;
+        let backTime = targetTime - new Date().getTime();
         backTime = this.formatduring(backTime);
         this.backTime = backTime;
       }, 1000);
     },
     // 倒计时时间戳转换为 天 小时 分钟 秒
     formatduring(mss) {
-      var days = parseInt(mss / (1000 * 60 * 60 * 24));
-      var hours = parseInt((mss % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
-      var minutes = parseInt((mss % (1000 * 60 * 60)) / (1000 * 60));
-      var seconds = parseInt((mss % (1000 * 60)) / 1000);
+      let days = parseInt(mss / (1000 * 60 * 60 * 24));
+      let hours = parseInt((mss % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
+      let minutes = parseInt((mss % (1000 * 60 * 60)) / (1000 * 60));
+      let seconds = parseInt((mss % (1000 * 60)) / 1000);
       // 如果到时间了返回false  关闭购买通道  无法购买
       if (days <= 0 && hours <= 0 && minutes <= 0 && seconds <= 0) {
         return false;
@@ -681,7 +685,7 @@ export default {
         position: absolute;
         right: 0;
         top: 0;
-        // text-align: right;
+
         span {
           display: inline-block;
           color: #fff;
@@ -701,6 +705,10 @@ export default {
         width: 1100px;
         color: white;
 
+        .tip:not(.p1) {
+          margin-top: 36px;
+        }
+
         p {
           font-size: 16px;
         }
@@ -726,7 +734,6 @@ export default {
           display: flex;
           align-items: center;
           justify-content: space-between;
-          margin-top: 20px;
 
           .countdown {
             > p {
@@ -735,7 +742,6 @@ export default {
             // 倒计时
             .time {
               display: flex;
-              margin-top: 24px;
 
               div {
                 width: 48px;
@@ -813,11 +819,9 @@ export default {
       .moreList {
         width: 1300px;
         margin: 0 auto;
-        // margin-top: 20px;
         display: flex;
         flex-wrap: wrap;
-        // overflow-y: hidden;
-        // overflow-x: scroll;
+
         .moreOne {
           margin-right: 20px;
           margin-top: 20px;
@@ -873,16 +877,9 @@ export default {
             }
 
             .acquired {
-              width: 120px;
-              height: 40px;
+              @extend .get;
+
               background: #d5d5d5;
-              border-radius: 4px;
-              border: none;
-              outline: none;
-              color: white;
-              font-size: 16px;
-              margin-left: 30px;
-              cursor: pointer;
             }
 
             .price {

+ 0 - 5
src/views/live/student/index.vue

@@ -256,11 +256,6 @@ export default {
     this.GetGroupStatus();
   },
   beforeDestroy() {
-    // 清除所有定时器
-    // let end = setInterval(() => {}, 1000);
-    // for (let i = 1; i <= end; i++) {
-    //   clearInterval(i);
-    // }
     clearInterval(this.timer);
     clearInterval(this.timer_group);
     StudentExitLiveRoom({ task_id: this.task_id, room_user_id: this.room_user_id });

+ 121 - 14
src/views/live/teacher/CompleteList.vue

@@ -13,22 +13,43 @@
         <i class="el-icon-arrow-left" @click="listMove('left')" />
         <div ref="avatar" class="avatar-list">
           <div ref="list" class="avatar-list-wrapper" :style="{ 'margin-left': marginLeft + 'px' }">
-            <el-avatar
+            <span
               v-for="item in student_list"
               :key="item.student_id"
-              :class="{ active: curStudent === item.student_id }"
-              icon="el-icon-user"
-              :src="item.student_image_url"
-            />
+              :class="{ active: curStudentID === item.student_id }"
+            >
+              <el-avatar
+                icon="el-icon-user"
+                :src="item.student_image_url"
+                @click.native="
+                  getStudentExamAnswer_FinishMaterial(item.student_id, item.student_name)
+                "
+              />
+            </span>
           </div>
         </div>
         <i class="el-icon-arrow-right" @click="listMove('right')" />
       </div>
+      <div v-show="isStudent" class="answer-info">
+        <span class="current-student-name">{{ curStudentName }}:</span>
+        <span>用时</span>
+        <span class="answer-info-duration">{{ duration }}秒</span>
+        <span class="answer-info-label">正确</span>
+        <span class="answer-info-count-right">{{ count_right }}</span>
+        <span class="answer-info-label">错误</span>
+        <span class="answer-info-count-error">{{ count_error }}</span>
+      </div>
     </div>
 
     <div class="complete-list-container">
       <template v-if="material_type === 'COURSEWARE'">
-        <Bookquestion :context="context" />
+        <bookreport
+          v-if="isStudent"
+          :context="context"
+          :book-client-width="800"
+          :book-answer-content="bookAnswerContent"
+        />
+        <bookquestion v-else :context="context" />
       </template>
       <template v-else>
         <!-- pdf -->
@@ -58,7 +79,11 @@
 
 <script>
 import pdf from 'vue-pdf';
-import { GetCurMaterialSent, GetStudentList_FinishMaterial } from '@/api/live';
+import {
+  GetCurMaterialSent,
+  GetStudentList_FinishMaterial,
+  GetStudentExamAnswer_FinishMaterial
+} from '@/api/live';
 import { GetCoursewareContent_View } from '@/api/course';
 import { GetFileStoreInfo } from '@/api/app';
 
@@ -83,12 +108,18 @@ export default {
       material_type: '',
       material_picture_url: '',
       context: null,
+      bookAnswerContent: '',
+      duration: 0,
+      count_not_done: 0,
+      count_right: 0,
+      count_error: 0,
       file_relative_path: '',
       file_url_https: '',
       pdfSrc: '',
       numPages: 1,
       student_list: [],
-      curStudent: '',
+      curStudentID: '',
+      curStudentName: '',
       listTimer: null,
       marginLeft: 0
     };
@@ -99,6 +130,9 @@ export default {
         this.file_url_https.lastIndexOf('.') + 1,
         this.file_url_https.length
       );
+    },
+    isStudent() {
+      return this.curStudentID.length > 0;
     }
   },
   watch: {
@@ -112,6 +146,9 @@ export default {
         this.material_name = '';
         this.student_list = [];
         this.marginLeft = 0;
+        this.context = null;
+        this.curStudentID = '';
+        this.bookAnswerContent = '';
       }
     },
     material_id(newVal) {
@@ -157,12 +194,12 @@ export default {
     },
 
     getCoursewareContent_View() {
-      GetCoursewareContent_View({ id: this.material_id }).then(res => {
-        if (res.content) {
+      GetCoursewareContent_View({ id: this.material_id }).then(({ content }) => {
+        if (content) {
           this.context = {
             id: this.currentCourse,
-            ui_type: JSON.parse(res.content).question.ui_type,
-            content: JSON.parse(res.content)
+            ui_type: JSON.parse(content).question.ui_type,
+            content: JSON.parse(content)
           };
         } else {
           this.context = null;
@@ -214,6 +251,27 @@ export default {
         if (Math.abs(width) > w) width = -w;
         this.marginLeft = width > 0 ? 0 : width;
       }
+    },
+
+    getStudentExamAnswer_FinishMaterial(student_id, student_name) {
+      GetStudentExamAnswer_FinishMaterial({
+        task_id: this.taskId,
+        material_id: this.material_id,
+        material_type: this.material_type,
+        student_id
+      }).then(({ content, duration, count_not_done, count_right, count_error }) => {
+        this.bookAnswerContent = content;
+        this.duration = duration;
+        this.count_not_done = count_not_done;
+        this.count_right = count_right;
+        this.count_error = count_error;
+
+        this.curStudentID = '';
+        this.$nextTick(() => {
+          this.curStudentID = student_id;
+        });
+        this.curStudentName = student_name;
+      });
     }
   }
 };
@@ -236,19 +294,38 @@ export default {
     .student-list {
       display: flex;
       justify-content: space-between;
-      height: 44px;
+      height: 66px;
       align-items: center;
-      margin-bottom: 24px;
       overflow: hidden;
+      margin-bottom: 12px;
 
       .avatar-list {
         width: calc(100% - 48px);
+        height: 100%;
         overflow: hidden;
 
         &-wrapper {
           display: inline-block;
           white-space: nowrap;
 
+          .active {
+            display: inline-block;
+            position: relative;
+            width: 58px;
+
+            &::after {
+              content: '';
+              display: inline-block;
+              height: 8px;
+              width: 8px;
+              background-color: #2ece5b;
+              border-radius: 50%;
+              position: absolute;
+              top: 58px;
+              left: 24px;
+            }
+          }
+
           .el-avatar {
             cursor: pointer;
             margin: 0 9px;
@@ -258,9 +335,39 @@ export default {
 
       > i {
         font-size: 18px;
+        margin-top: -24px;
         cursor: pointer;
       }
     }
+
+    .answer-info {
+      display: flex;
+      align-items: center;
+      font-size: 16px;
+      margin-bottom: 12px;
+
+      .current-student-name {
+        font-weight: 700;
+        margin-right: 24px;
+      }
+
+      &-label {
+        margin-left: 24px;
+      }
+
+      &-duration,
+      &-count-right,
+      &-count-error {
+        min-width: 60px;
+        padding: 0 24px;
+        text-align: center;
+        border-right: 2px solid #dfdfdf;
+      }
+
+      &-count-error {
+        border-right-width: 0;
+      }
+    }
   }
 
   &-container {

+ 5 - 12
src/views/teacher/create_course/step_table/CourseInfo.vue

@@ -64,13 +64,9 @@
         </el-form-item>
 
         <el-form-item label="课程周期">
-          <el-date-picker
-            v-model="form.date"
-            type="daterange"
-            range-separator="~"
-            value-format="yyyy-MM-dd"
-            unlink-panels
-          />
+          <el-date-picker v-model="form.begin_date" type="date" value-format="yyyy-MM-dd" />
+          <span> ~ </span>
+          <el-date-picker v-model="form.end_date" type="date" value-format="yyyy-MM-dd" />
         </el-form-item>
 
         <el-form-item label="学生数量">
@@ -139,7 +135,6 @@ export default {
         intro: '',
         org_id: '',
         teacher_id_list: [],
-        date: [],
         begin_date: '',
         end_date: '',
         student_count_start: '',
@@ -184,7 +179,8 @@ export default {
           this.form.picture_id = picture_id;
           this.form.imageUrl = picture_url;
           this.form.intro = intro;
-          this.form.date = [begin_date, end_date];
+          this.form.begin_date = begin_date;
+          this.form.end_date = end_date;
           this.form.student_count_start = student_count_start;
           this.form.is_auto_close = is_auto_close === 'true';
           this.form.student_enter_control_type = student_enter_control_type;
@@ -203,9 +199,6 @@ export default {
     nextStep() {
       this.$refs.form.validate(valid => {
         if (valid) {
-          this.form.begin_date = this.form.date[0];
-          this.form.end_date = this.form.date[1];
-
           if (this.id) {
             this.form.id = this.id;
             UpdateCourse(this.form).then(() => {

+ 62 - 11
src/views/teacher/create_course/step_table/NewTask.vue

@@ -30,13 +30,23 @@
         </el-form-item>
 
         <el-form-item label="时间">
-          <el-date-picker
-            v-model="form.date"
-            type="datetimerange"
-            range-separator="~"
-            value-format="yyyy-MM-dd HH:mm:ss"
-            unlink-panels
-          />
+          <el-date-picker v-model="form.begin_date" type="date" value-format="yyyy-MM-dd" />&nbsp;
+          <el-select v-model="form.begin_date_hour" class="date-hour">
+            <el-option v-for="item in hourArr" :key="item" :label="item" :value="item" />
+          </el-select>
+          <span> : </span>
+          <el-select v-model="form.begin_date_minute" class="date-minute">
+            <el-option v-for="item in minuteArr" :key="item" :label="item" :value="item" />
+          </el-select>
+          <span> ~ </span>
+          <el-date-picker v-model="form.end_date" type="date" value-format="yyyy-MM-dd" />&nbsp;
+          <el-select v-model="form.end_date_hour" class="date-hour">
+            <el-option v-for="item in hourArr" :key="item" :label="item" :value="item" />
+          </el-select>
+          <span> : </span>
+          <el-select v-model="form.end_date_minute" class="date-minute">
+            <el-option v-for="item in minuteArr" :key="item" :label="item" :value="item" />
+          </el-select>
         </el-form-item>
 
         <el-form-item label="任务说明">
@@ -239,10 +249,17 @@ export default {
       form: {
         name: '',
         teacher_id: '',
-        date: [],
+        begin_date: '',
+        begin_date_hour: '00',
+        begin_date_minute: '00',
+        end_date: '',
+        end_date_hour: '00',
+        end_date_minute: '00',
         teaching_type: 12,
         content: ''
       },
+      hourArr: [],
+      minuteArr: [],
       rules: {
         name: { required: true, message: '任务名称不能为空', trigger: 'blur' },
         teacher_id: { trigger: 'blur', validator: validateTeacher }
@@ -266,6 +283,13 @@ export default {
     };
   },
   created() {
+    for (let i = 0; i < 60; i++) {
+      let item = String(i);
+      if (i < 10) item = '0' + item;
+      if (i < 24) this.hourArr.push(item);
+      this.minuteArr.push(item);
+    }
+
     this.getPageNeedPage();
     if (this.task_id) {
       this.getTaskInfo();
@@ -294,8 +318,8 @@ export default {
             name: this.form.name,
             time_type: Number(this.time_type),
             teaching_type: teaching_type,
-            begin_time: this.form.date[0],
-            end_time: this.form.date[1],
+            begin_time: `${this.form.begin_date} ${this.form.begin_date_hour}:${this.form.begin_date_minute}`,
+            end_time: `${this.form.end_date} ${this.form.end_date_hour}:${this.form.end_date_minute}`,
             teacher_id: this.form.teacher_id,
             content: this.form.content
           };
@@ -424,7 +448,21 @@ export default {
           courseware_visible_mode,
           zhibo_record_mode
         }) => {
-          this.form.date = [begin_time, end_time];
+          if (begin_time.length > 0) {
+            let begin = begin_time.split(' ');
+            this.form.begin_date = begin[0];
+            let bTime = begin[1].split(':');
+            this.form.begin_date_hour = bTime[0];
+            this.form.begin_date_minute = bTime[1];
+          }
+          if (end_time.length > 0) {
+            let end = end_time.split(' ');
+            this.form.end_date = end[0];
+            let eTime = end[1].split(':');
+            this.form.end_date_hour = eTime[0];
+            this.form.end_date_minute = eTime[1];
+          }
+
           this.time_type = time_type;
           this.form.teaching_type = teaching_type;
           this.form.name = name;
@@ -488,6 +526,19 @@ export default {
         width: 640px;
       }
 
+      .date-minute,
+      .date-hour {
+        width: 78px;
+
+        > .el-input {
+          width: 100%;
+        }
+      }
+
+      .el-date-editor.el-input {
+        width: 140px;
+      }
+
       .task-template {
         background-color: #fbfbfb;
         padding: 24px 32px;

+ 1 - 1
src/views/teacher/main/CurriculaList.vue

@@ -223,7 +223,7 @@ export default {
       this.$router.push(`/create_course_step_table/course_info?id=${id}`);
     },
     view(id) {
-      this.$router.push(`/GoodsDetail?id=${id}&goodsType=201`);
+      this.$router.push(`/GoodsDetail?id=${id}&goodsType=201&readonly=true`);
     }
   }
 };