Commit 3b6dabb6 by lizhi

年份学期必填

parent a5998f7d
......@@ -1037,29 +1037,46 @@ export default {
});
},
submitGoOnForm() {
this.$confirm("是否要提交", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.goOnForm.umsUserCourses = this.goOnForm.userCourseList; //新来的后端比较菜,原来的接口字段不会改,只能搞了个新的名字
this.goOnForm.umsUserCourses.forEach(item => {
item.courseName = item.auditCourseName;
});
addCurrentTermCourse(this.goOnForm).then(response => {
this.goOnForm.userCourseList.forEach(item => {
if (!item.yearTime || !item.term) {
this.$message({
type: "success",
message: "提交成功",
type: "error",
message: "请填写年份学期",
duration: 1000
});
this.courseInfoVisible = false;
this.editCourseInfoVisible = false;
this.editCourseTitleVisible = false;
this.goOnVisible = false;
this.getCourseList();
this.$forceUpdate();
});
// console.log("NO");
this.isOK = false;
} else {
// console.log("OK");
this.isOK = true;
}
});
if (this.isOK) {
this.$confirm("是否要提交", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.goOnForm.umsUserCourses = this.goOnForm.userCourseList; //新来的后端比较菜,原来的接口字段不会改,只能搞了个新的名字
this.goOnForm.umsUserCourses.forEach(item => {
item.courseName = item.auditCourseName;
});
addCurrentTermCourse(this.goOnForm).then(response => {
this.$message({
type: "success",
message: "提交成功",
duration: 1000
});
this.courseInfoVisible = false;
this.editCourseInfoVisible = false;
this.editCourseTitleVisible = false;
this.goOnVisible = false;
this.getCourseList();
this.$forceUpdate();
});
});
}
},
cancel(formName) {
this.courseInfoVisible = false;
......
......@@ -39,12 +39,7 @@
</p>
<p>
<!-- {{ list.term.slice(0, 1).toUpperCase() + list.term.slice(1) }} -->
{{
list.term
.toLowerCase()
.replace(/( |^)[a-z]/g, L => L.toUpperCase())
}}
{{ list.term.replace(/( |^)[a-z]/g, L => L.toUpperCase()) }}
{{ list.yearTime }}
</p>
<!-- <p>{{ list.yearTime }}</p> -->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment