|
|
|
@ -143,7 +143,7 @@ |
|
|
|
|
<el-table-column label="排序" align="center" width="100"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<el-input v-model.trim="scope.row.sort" |
|
|
|
|
@input="practiceSortChange(scope.row, scope.$index)"></el-input> |
|
|
|
|
@change="practiceSortChange(scope.row, scope.$index)"></el-input> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="展示控制" align="center" width="100"> |
|
|
|
@ -317,7 +317,7 @@ export default { |
|
|
|
|
}, |
|
|
|
|
data () { |
|
|
|
|
return { |
|
|
|
|
cid: this.$route.query.cid, |
|
|
|
|
cid: this.$route.query.cid || '', |
|
|
|
|
isCopy: this.$route.query.copy, |
|
|
|
|
isAdd: true, |
|
|
|
|
editorConfig, |
|
|
|
@ -818,6 +818,7 @@ export default { |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
practiceSortChange (row, index) { // 处理排序 |
|
|
|
|
// debugger |
|
|
|
|
this.practiceData.splice(index, 1, row); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
@ -832,7 +833,7 @@ export default { |
|
|
|
|
if (step === 1) { |
|
|
|
|
this.$refs.form.validate(async (valid) => { |
|
|
|
|
if (valid) { |
|
|
|
|
const form = JSON.parse(JSON.stringify(this.form)) |
|
|
|
|
const form = _.cloneDeep(this.form) |
|
|
|
|
form.supplier = form.supplier.join() |
|
|
|
|
form.platformId = Setting.platformId |
|
|
|
|
this.submiting = true |
|
|
|
@ -843,7 +844,15 @@ export default { |
|
|
|
|
background: 'rgba(0, 0, 0, 0.7)' |
|
|
|
|
}) |
|
|
|
|
try { |
|
|
|
|
const res = await this.$post(this.api[cid && !this.isCopy ? 'modifyCourse' : 'createCurriculum'], form) |
|
|
|
|
let res |
|
|
|
|
if (this.isCopy) { |
|
|
|
|
const res1 = await this.$post(`${this.api.copySelfBuildCourse}?cid=${cid}`) |
|
|
|
|
form.cid = res1.cid |
|
|
|
|
res = await this.$post(this.api.modifyCourse, form) |
|
|
|
|
} else { |
|
|
|
|
form.cid = cid |
|
|
|
|
res = await this.$post(this.api[cid ? 'modifyCourse' : 'createCurriculum'], form) |
|
|
|
|
} |
|
|
|
|
if (next) { |
|
|
|
|
this.step = 2 |
|
|
|
|
if (!cid) { |
|
|
|
|