|
@@ -57,7 +57,9 @@
|
|
|
<div v-if="form.teaching_type === 10" class="task-template">
|
|
|
<el-form :model="liveForm" label-width="100px" label-position="left">
|
|
|
<el-form-item label="课件任务">
|
|
|
- <el-button><i class="el-icon-plus" /> 添加课件</el-button>
|
|
|
+ <el-button @click="dialogVisible = true">
|
|
|
+ <i class="el-icon-plus" /> 添加课件
|
|
|
+ </el-button>
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="上传文档">
|
|
@@ -96,7 +98,9 @@
|
|
|
<div v-else-if="form.teaching_type === 11" class="task-template">
|
|
|
<el-form :model="courseForm" label-width="100px" label-position="left">
|
|
|
<el-form-item label="课件任务">
|
|
|
- <el-button><i class="el-icon-plus" /> 添加课件</el-button>
|
|
|
+ <el-button @click="dialogVisible = true">
|
|
|
+ <i class="el-icon-plus" /> 添加课件
|
|
|
+ </el-button>
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="任务模式">
|
|
@@ -157,21 +161,26 @@
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
+
|
|
|
+ <select-course :id="cs_item_id" :dialog-visible="dialogVisible" @dialogClose="dialogClose" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import SelectCourse from '@/components/select/SelectCourse.vue';
|
|
|
import { GetTaskTeachingTypeList, GetTaskModeList, GetTeacherListByCourseID } from '@/api/select';
|
|
|
import { AddTaskToCSItem } from '@/api/course';
|
|
|
import { fileUpload } from '@/api/app';
|
|
|
|
|
|
export default {
|
|
|
name: 'NewTask',
|
|
|
+ components: { SelectCourse },
|
|
|
data() {
|
|
|
return {
|
|
|
id: this.$route.params.id,
|
|
|
time_type: this.$route.params.time_type,
|
|
|
cs_item_id: this.$route.params.cs_item_id,
|
|
|
+ dialogVisible: false,
|
|
|
type_list: [],
|
|
|
teacher_list: [],
|
|
|
mode_list: [],
|
|
@@ -251,6 +260,7 @@ export default {
|
|
|
});
|
|
|
data['file_id_list'] = file_info_list;
|
|
|
}
|
|
|
+
|
|
|
AddTaskToCSItem(data).then(({ status }) => {
|
|
|
if (status === 1) {
|
|
|
this.goBack();
|
|
@@ -289,6 +299,11 @@ export default {
|
|
|
},
|
|
|
closeFile(i, arr) {
|
|
|
arr.splice(i, 1);
|
|
|
+ },
|
|
|
+ // 选择课件
|
|
|
+ addCourse() {},
|
|
|
+ dialogClose() {
|
|
|
+ this.dialogVisible = false;
|
|
|
}
|
|
|
}
|
|
|
};
|