|
|
|
@ -41,7 +41,7 @@ |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item class="req" label="适用专业" required> |
|
|
|
|
<div class="subject"> |
|
|
|
|
<div v-if="form.curriculumDisciplines && form.curriculumDisciplines.length" class="subject"> |
|
|
|
|
<div v-for="(item, i) in form.curriculumDisciplines" :key="i" class="line"> |
|
|
|
|
<el-form-item label="学科类别"> |
|
|
|
|
<el-select v-model="item.categoryId" @change="getProfessionalClass(item)"> |
|
|
|
@ -380,7 +380,6 @@ export default { |
|
|
|
|
multiplePractice: [], |
|
|
|
|
|
|
|
|
|
submiting: false, // 新增编辑防抖标识 |
|
|
|
|
loadIns: null, |
|
|
|
|
updateTime: 0, |
|
|
|
|
systemAll: [], |
|
|
|
|
systems: [], |
|
|
|
@ -425,6 +424,7 @@ export default { |
|
|
|
|
methods: { |
|
|
|
|
getInfoData () { |
|
|
|
|
this.$post(`${this.api.curriculumDetail}?cid=${this.cid}`).then(({ data }) => { |
|
|
|
|
if (!data.coverUrl) data.coverUrl = 'https://izhixinyun.com/images/course-cover.png' |
|
|
|
|
this.form = data |
|
|
|
|
this.practiceData = data.practiceConfig |
|
|
|
|
this.assessmentData = data.assessmentConfig |
|
|
|
@ -781,16 +781,16 @@ export default { |
|
|
|
|
this.step-- |
|
|
|
|
}, |
|
|
|
|
async save (next) { |
|
|
|
|
if (this.submiting) return false |
|
|
|
|
const { step, cid } = this |
|
|
|
|
// 第一步 |
|
|
|
|
if (step === 1) { |
|
|
|
|
this.$refs.form.validate(async (valid) => { |
|
|
|
|
if (valid) { |
|
|
|
|
if (this.submiting) return false |
|
|
|
|
const form = JSON.parse(JSON.stringify(this.form)) |
|
|
|
|
form.platformId = Setting.platformId |
|
|
|
|
this.submiting = true |
|
|
|
|
this.loadIns = this.$loading({ |
|
|
|
|
const load = this.$loading({ |
|
|
|
|
lock: true, |
|
|
|
|
text: 'Loading', |
|
|
|
|
spinner: 'el-icon-loading', |
|
|
|
@ -798,7 +798,6 @@ export default { |
|
|
|
|
}) |
|
|
|
|
try { |
|
|
|
|
const res = await this.$post(this.api[cid && !this.isCopy ? 'modifyCourse' : 'createCurriculum'], form) |
|
|
|
|
this.loadIns.close() |
|
|
|
|
if (next) { |
|
|
|
|
this.step = 2 |
|
|
|
|
if (!cid) { |
|
|
|
@ -810,7 +809,7 @@ export default { |
|
|
|
|
} |
|
|
|
|
} finally { |
|
|
|
|
this.submiting = false |
|
|
|
|
this.loadIns.close() |
|
|
|
|
load.close() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
@ -819,25 +818,36 @@ export default { |
|
|
|
|
if (!this.practiceData.length) { |
|
|
|
|
return this.$message.warning("请添加练习项目配置") |
|
|
|
|
} else { |
|
|
|
|
this.submiting = true |
|
|
|
|
const load = this.$loading({ |
|
|
|
|
lock: true, |
|
|
|
|
text: 'Loading', |
|
|
|
|
spinner: 'el-icon-loading', |
|
|
|
|
background: 'rgba(0, 0, 0, 0.7)' |
|
|
|
|
}) |
|
|
|
|
const list = this.practiceData.map(i => { |
|
|
|
|
let obj = { |
|
|
|
|
return { |
|
|
|
|
isShow: i.isShow, |
|
|
|
|
projectId: i.projectId || '', |
|
|
|
|
paperId: i.paperId || '', |
|
|
|
|
sort: Number(i.sort), |
|
|
|
|
systemId: i.systemId |
|
|
|
|
} |
|
|
|
|
return obj |
|
|
|
|
}); |
|
|
|
|
list.sort((a, b) => a.sort - b.sort) |
|
|
|
|
await this.$post(this.api.configureCourseProject, { |
|
|
|
|
cid: this.cid, |
|
|
|
|
systemIdByPractice: list |
|
|
|
|
}) |
|
|
|
|
if (next) { |
|
|
|
|
this.step = 3 |
|
|
|
|
} else { |
|
|
|
|
this.back() |
|
|
|
|
list.sort((a, b) => a.sort - b.sort) |
|
|
|
|
try { |
|
|
|
|
await this.$post(this.api.configureCourseProject, { |
|
|
|
|
cid: this.cid, |
|
|
|
|
systemIdByPractice: list |
|
|
|
|
}) |
|
|
|
|
if (next) { |
|
|
|
|
this.step = 3 |
|
|
|
|
} else { |
|
|
|
|
this.back() |
|
|
|
|
} |
|
|
|
|
} finally { |
|
|
|
|
this.submiting = false |
|
|
|
|
load.close() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} else if (step === 3) { |
|
|
|
@ -845,28 +855,38 @@ export default { |
|
|
|
|
if (!this.assessmentData.length) { |
|
|
|
|
return this.$message.warning("请添加考核项目配置") |
|
|
|
|
} else { |
|
|
|
|
this.submiting = true |
|
|
|
|
const load = this.$loading({ |
|
|
|
|
lock: true, |
|
|
|
|
text: 'Loading', |
|
|
|
|
spinner: 'el-icon-loading', |
|
|
|
|
background: 'rgba(0, 0, 0, 0.7)' |
|
|
|
|
}) |
|
|
|
|
const list = this.assessmentData.map(i => { |
|
|
|
|
let obj = { |
|
|
|
|
return { |
|
|
|
|
isShow: i.isShow, |
|
|
|
|
projectId: i.projectId, |
|
|
|
|
paperId: i.paperId || '', |
|
|
|
|
sort: Number(i.sort), |
|
|
|
|
systemId: i.systemId |
|
|
|
|
}; |
|
|
|
|
return obj; |
|
|
|
|
}); |
|
|
|
|
list.sort((a, b) => a.sort - b.sort) |
|
|
|
|
await this.$post(this.api.configureCourseProject, { |
|
|
|
|
cid: this.cid, |
|
|
|
|
systemIdByAssessment: list |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
this.step = 4 |
|
|
|
|
list.sort((a, b) => a.sort - b.sort) |
|
|
|
|
try { |
|
|
|
|
await this.$post(this.api.configureCourseProject, { |
|
|
|
|
cid: this.cid, |
|
|
|
|
systemIdByAssessment: list |
|
|
|
|
}) |
|
|
|
|
this.step = 4 |
|
|
|
|
} finally { |
|
|
|
|
this.submiting = false |
|
|
|
|
load.close() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 返回上一页 |
|
|
|
|
// 返回 |
|
|
|
|
back () { |
|
|
|
|
this.loadIns && this.loadIns.close() |
|
|
|
|
this.$router.push(this.$store.state.lesson.referrer || 'list') |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -1150,7 +1170,7 @@ export default { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.lines { |
|
|
|
|
height: calc(100vh - 186px); |
|
|
|
|
height: calc(100vh - 239px); |
|
|
|
|
padding-right: 10px; |
|
|
|
|
margin-top: 10px; |
|
|
|
|
overflow: auto; |
|
|
|
|