dev_202412
yujialong 2 months ago
parent ae9e964d61
commit b1d17d3fa9
  1. 2
      src/layouts/navbar/index.vue
  2. 78
      src/pages/lesson/detail/index.vue
  3. 2
      src/pages/lesson/list/index.vue

@ -158,7 +158,7 @@ export default {
<style lang="scss" scoped>
.menus {
z-index: 1000;
z-index: 2000;
position: sticky;
top: 0;
display: flex;

@ -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;

@ -79,7 +79,7 @@
</template>
</el-table-column>
<el-table-column prop="expectedCourse" label="预计课时" width="90" align="center"></el-table-column>
<el-table-column prop="orderVolume" label="上架范围" width="90" align="center"></el-table-column>
<el-table-column prop="className" label="上架范围" align="center"></el-table-column>
<el-table-column prop="userName" label="创建人" width="120" align="center"></el-table-column>
<el-table-column label="上架/下架" width="90" align="center">
<template slot-scope="scope">

Loading…
Cancel
Save