dusenyao 3 years ago
parent
commit
32de465917
1 changed files with 9 additions and 6 deletions
  1. 9 6
      src/views/task_details/student/index.vue

+ 9 - 6
src/views/task_details/student/index.vue

@@ -9,12 +9,12 @@
       <div class="learning-material">
         <div class="learning-material-title">学习资料</div>
         <el-tag
-          v-for="item in learning_material_list"
+          v-for="item in cs_item_learning_material_list"
           :key="item.file_id"
           color="#fff"
           :title="item.file_name"
         >
-          <span>{{ item.file_name }}</span>
+          <a :href="item.file_url" target="_blank">{{ item.file_name }}</a>
         </el-tag>
       </div>
     </div>
@@ -93,7 +93,7 @@ export default {
       time_space_view_txt: '',
       courseware_list: [],
       accessory_list: [],
-      learning_material_list: [],
+      cs_item_learning_material_list: [],
       file_list: []
     };
   },
@@ -113,7 +113,8 @@ export default {
   },
   created() {
     GetTaskInfo({
-      id: this.id
+      id: this.id,
+      is_contain_cs_item_learning_material: true
     }).then(
       ({
         name,
@@ -124,7 +125,7 @@ export default {
         end_time,
         courseware_list,
         accessory_list,
-        learning_material_list,
+        cs_item_learning_material_list,
         task_mode,
         content,
         time_space_view_txt
@@ -139,7 +140,7 @@ export default {
         this.courseware_list = courseware_list;
         this.accessory_list = accessory_list;
         this.task_mode = task_mode;
-        this.learning_material_list = learning_material_list;
+        this.cs_item_learning_material_list = cs_item_learning_material_list;
         this.time_space_view_txt = time_space_view_txt;
       }
     );
@@ -193,6 +194,7 @@ $bor-color: #d9d9d9;
     @include el-tag;
 
     border-radius: 4px;
+    margin-right: 8px;
     border-color: $bor-color;
   }
 
@@ -227,6 +229,7 @@ $bor-color: #d9d9d9;
 
       &-title {
         font-size: 18px;
+        margin-bottom: 16px;
       }
     }
   }