|
|
@ -80,8 +80,8 @@ |
|
|
|
<el-card shadow="hover"> |
|
|
|
<el-card shadow="hover"> |
|
|
|
<div class="cover-wrap"> |
|
|
|
<div class="cover-wrap"> |
|
|
|
<el-upload name="file" accept=".jpg,.png,.jpeg,.gif" ref="upload" drag :on-remove="handleRemove" |
|
|
|
<el-upload name="file" accept=".jpg,.png,.jpeg,.gif" ref="upload" drag :on-remove="handleRemove" |
|
|
|
:on-error="uploadError" :before-remove="beforeRemove" :limit="1" :on-exceed="handleExceed" action="" |
|
|
|
:on-error="uploadError" :before-remove="beforeRemove" :limit="10000" :file-list="fileList" |
|
|
|
:http-request="handleRequest"> |
|
|
|
:on-exceed="handleExceed" action="" :http-request="handleRequest"> |
|
|
|
<i class="el-icon-upload"></i> |
|
|
|
<i class="el-icon-upload"></i> |
|
|
|
<div class="el-upload__text"> |
|
|
|
<div class="el-upload__text"> |
|
|
|
<p>将图片拖到此处,或<em>点击上传</em></p> |
|
|
|
<p>将图片拖到此处,或<em>点击上传</em></p> |
|
|
@ -225,7 +225,7 @@ |
|
|
|
<ul class="systems"> |
|
|
|
<ul class="systems"> |
|
|
|
<li v-for="(item, i) in systems" :key="i" :title="item.systemName"> |
|
|
|
<li v-for="(item, i) in systems" :key="i" :title="item.systemName"> |
|
|
|
<div class="line"> |
|
|
|
<div class="line"> |
|
|
|
<el-checkbox v-model="item.check" @change="val => courseChange(val, item)"></el-checkbox> |
|
|
|
<!-- <el-checkbox v-model="item.check" @change="val => courseChange(val, item)"></el-checkbox> --> |
|
|
|
<div :class="['name', { active: curCourse == item.cid }]" @click="getProject(item)"> |
|
|
|
<div :class="['name', { active: curCourse == item.cid }]" @click="getProject(item)"> |
|
|
|
<span>{{ item.label }}</span> |
|
|
|
<span>{{ item.label }}</span> |
|
|
|
<i class="el-icon-arrow-right"></i> |
|
|
|
<i class="el-icon-arrow-right"></i> |
|
|
@ -234,7 +234,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
<div v-if="item.systemInfo" class="children"> |
|
|
|
<div v-if="item.systemInfo" class="children"> |
|
|
|
<div v-for="(system, j) in item.systemInfo" :key="j" :title="system.label" class="line"> |
|
|
|
<div v-for="(system, j) in item.systemInfo" :key="j" :title="system.label" class="line"> |
|
|
|
<el-checkbox v-model="system.check" @change="val => systemChange(val, system, item)"></el-checkbox> |
|
|
|
<!-- <el-checkbox v-model="system.check" @change="val => systemChange(val, system, item)"></el-checkbox> --> |
|
|
|
<div :class="['name', { active: curCourse == item.cid && curSystem == system.systemId }]" |
|
|
|
<div :class="['name', { active: curCourse == item.cid && curSystem == system.systemId }]" |
|
|
|
@click="getProject(item, system)"> |
|
|
|
@click="getProject(item, system)"> |
|
|
|
<span>{{ system.systemName }}</span> |
|
|
|
<span>{{ system.systemName }}</span> |
|
|
@ -269,8 +269,7 @@ |
|
|
|
<el-button type="text" @click="batchDelChecked">批量移除</el-button> |
|
|
|
<el-button type="text" @click="batchDelChecked">批量移除</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<el-input placeholder="请输入实训项目名称、理论试卷名称" prefix-icon="el-icon-search" v-model="checkedKeyword" |
|
|
|
<el-input placeholder="请输入项目名称" prefix-icon="el-icon-search" v-model="checkedKeyword" clearable></el-input> |
|
|
|
clearable></el-input> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="lines"> |
|
|
|
<div class="lines"> |
|
|
|
<template v-for="(item, i) in checkeds"> |
|
|
|
<template v-for="(item, i) in checkeds"> |
|
|
@ -320,6 +319,7 @@ export default { |
|
|
|
isAdd: true, |
|
|
|
isAdd: true, |
|
|
|
editorConfig, |
|
|
|
editorConfig, |
|
|
|
step: 1, |
|
|
|
step: 1, |
|
|
|
|
|
|
|
defaultCover: 'https://izhixinyun.com/images/course-cover.png', |
|
|
|
form: { |
|
|
|
form: { |
|
|
|
curriculumName: "", |
|
|
|
curriculumName: "", |
|
|
|
curriculumType: '', |
|
|
|
curriculumType: '', |
|
|
@ -332,7 +332,7 @@ export default { |
|
|
|
teachingObjectives: "", |
|
|
|
teachingObjectives: "", |
|
|
|
systemIdByAssessment: [], |
|
|
|
systemIdByAssessment: [], |
|
|
|
systemIdByPractice: [], |
|
|
|
systemIdByPractice: [], |
|
|
|
coverUrl: 'https://izhixinyun.com/images/course-cover.png', |
|
|
|
coverUrl: '', |
|
|
|
curriculumDisciplines: [ |
|
|
|
curriculumDisciplines: [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
professionalClassList: [], |
|
|
|
professionalClassList: [], |
|
|
@ -343,6 +343,7 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
], |
|
|
|
], |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
fileList: [], |
|
|
|
rules: { |
|
|
|
rules: { |
|
|
|
curriculumName: [ |
|
|
|
curriculumName: [ |
|
|
|
{ required: true, message: "请输入课程名称", trigger: "blur" } |
|
|
|
{ required: true, message: "请输入课程名称", trigger: "blur" } |
|
|
@ -414,19 +415,25 @@ export default { |
|
|
|
this.getProject() |
|
|
|
this.getProject() |
|
|
|
}, 500) |
|
|
|
}, 500) |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
created () { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
mounted () { |
|
|
|
mounted () { |
|
|
|
if (this.cid) this.isAdd = false |
|
|
|
if (this.cid) this.isAdd = false |
|
|
|
|
|
|
|
this.form.coverUrl = this.defaultCover |
|
|
|
this.getSubject() |
|
|
|
this.getSubject() |
|
|
|
this.cid && this.getInfoData() |
|
|
|
this.cid && this.getInfoData() |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
getInfoData () { |
|
|
|
getInfoData () { |
|
|
|
this.$post(`${this.api.curriculumDetail}?cid=${this.cid}`).then(({ data }) => { |
|
|
|
this.$post(`${this.api.curriculumDetail}?cid=${this.cid}`).then(({ data }) => { |
|
|
|
if (!data.coverUrl) data.coverUrl = 'https://izhixinyun.com/images/course-cover.png' |
|
|
|
const cover = data.coverUrl |
|
|
|
|
|
|
|
if (!cover) { |
|
|
|
|
|
|
|
data.coverUrl = this.defaultCover |
|
|
|
|
|
|
|
} else if (!cover.includes('course-cover')) { |
|
|
|
|
|
|
|
this.fileList = [{ |
|
|
|
|
|
|
|
name: cover, |
|
|
|
|
|
|
|
url: cover, |
|
|
|
|
|
|
|
}] |
|
|
|
|
|
|
|
} |
|
|
|
this.form = data |
|
|
|
this.form = data |
|
|
|
this.practiceData = data.practiceConfig |
|
|
|
this.practiceData = data.practiceConfig |
|
|
|
this.assessmentData = data.assessmentConfig |
|
|
|
this.assessmentData = data.assessmentConfig |
|
|
@ -532,6 +539,10 @@ export default { |
|
|
|
async handleRequest ({ file }) { |
|
|
|
async handleRequest ({ file }) { |
|
|
|
Oss.upload(file).then(res => { |
|
|
|
Oss.upload(file).then(res => { |
|
|
|
this.form.coverUrl = res.url |
|
|
|
this.form.coverUrl = res.url |
|
|
|
|
|
|
|
this.fileList = [{ |
|
|
|
|
|
|
|
name: res.url, |
|
|
|
|
|
|
|
url: res.url |
|
|
|
|
|
|
|
}] |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
uploadError (err, file, fileList) { |
|
|
|
uploadError (err, file, fileList) { |
|
|
@ -546,7 +557,7 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleRemove () { |
|
|
|
handleRemove () { |
|
|
|
Oss.del(this.form.coverUrl) |
|
|
|
Oss.del(this.form.coverUrl) |
|
|
|
this.form.coverUrl = '' |
|
|
|
this.form.coverUrl = this.defaultCover |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 课程选择回调 |
|
|
|
// 课程选择回调 |
|
|
|