|
@@ -293,7 +293,7 @@
|
|
|
color="#fff"
|
|
|
closable
|
|
|
:title="item.file_name"
|
|
|
- @close="deleteMaterialFile(i)"
|
|
|
+ @close="deleteMaterialFile(i, item.file_id)"
|
|
|
>
|
|
|
<span>{{ item.file_name }}</span>
|
|
|
</el-tag>
|
|
@@ -322,7 +322,8 @@ import {
|
|
|
GetCourseInfo_ContainCSItem,
|
|
|
GetCSItemInfoBox,
|
|
|
DeleteCSItem,
|
|
|
- AddLearningMaterialToCSItem
|
|
|
+ AddLearningMaterialToCSItem,
|
|
|
+ DeleteLearningMaterialFromCSItem
|
|
|
} from '@/api/course';
|
|
|
|
|
|
export default {
|
|
@@ -461,7 +462,18 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
|
|
|
- deleteMaterialFile(i) {},
|
|
|
+ deleteMaterialFile(i, file_id) {
|
|
|
+ this.$confirm('您确定要删除这个文件吗?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ DeleteLearningMaterialFromCSItem({ cs_item_id: this.curItemID, file_id }).then(() => {
|
|
|
+ this.$message.success('删除文件成功');
|
|
|
+ this.itemInfoBox.learning_material_list.splice(i, 1);
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
|
|
|
// 任务处理
|
|
|
newTask(time_type) {
|
|
@@ -604,7 +616,7 @@ export default {
|
|
|
margin-top: 6px;
|
|
|
|
|
|
.el-tag {
|
|
|
- margin-left: 8px;
|
|
|
+ margin-right: 8px;
|
|
|
margin-top: 6px;
|
|
|
}
|
|
|
}
|