课程添加自考开关
This commit is contained in:
@@ -24,7 +24,13 @@
|
||||
<el-form-item label="排序" prop="sort">
|
||||
<el-input v-model="dataForm.sort" placeholder="排序"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="自考开关" prop="canzk">
|
||||
<el-switch
|
||||
v-model="dataForm.canzk"
|
||||
active-text="开启"
|
||||
inactive-text="关闭">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="课程图"
|
||||
prop="image"
|
||||
@@ -243,7 +249,8 @@ export default {
|
||||
id: 0,
|
||||
title: "",
|
||||
etitle:'',
|
||||
titleAbbr:''
|
||||
titleAbbr:'',
|
||||
canzk: false, // 是否开启自考
|
||||
// publisherName: '',
|
||||
// splits: 0,
|
||||
// authorId: [],
|
||||
@@ -420,6 +427,7 @@ export default {
|
||||
attr.push(img);
|
||||
this.fileList = attr;
|
||||
}
|
||||
data.canzk = data.canzk == '1' ? true : false
|
||||
this.dataForm = { ...data };
|
||||
}
|
||||
});
|
||||
@@ -461,6 +469,7 @@ export default {
|
||||
data: this.$http.adornData({
|
||||
id: this.dataForm.id || undefined,
|
||||
title: this.dataForm.title,
|
||||
canzk: this.dataForm.canzk ? '1' : '0', // 是否可以自考 0/ 1 0 否 1 是
|
||||
sort: this.dataForm.sort,
|
||||
image: this.dataForm.image,
|
||||
content: this.dataForm.content,
|
||||
@@ -478,6 +487,8 @@ export default {
|
||||
this.visible = false;
|
||||
this.relationProductIds = []
|
||||
this.relationProducts = []
|
||||
this.dataForm.canzk = false
|
||||
|
||||
this.$emit("refreshDataList");
|
||||
}
|
||||
});
|
||||
|
||||
@@ -533,13 +533,13 @@ export default {
|
||||
examTime:parseInt(this.ClassModelForm.examTime), // 考试时长
|
||||
})
|
||||
}).then(({ data }) => {
|
||||
this.flag = false;
|
||||
if (data && data.code == 0) {
|
||||
this.$message.success("操作成功");
|
||||
this.$nextTick(() => {
|
||||
this.handleClose();
|
||||
});
|
||||
} else {
|
||||
this.flag = false;
|
||||
this.$message.error(data.msg);
|
||||
}
|
||||
}).catch(e =>{
|
||||
@@ -637,6 +637,7 @@ export default {
|
||||
this.$refs["ClassModelForm"].resetFields();
|
||||
this.userList = [];
|
||||
this.courseList = [];
|
||||
this.flag = false;
|
||||
});
|
||||
this.$emit("handleClose");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user