Commit 293e867a authored by 刘帅's avatar 刘帅

1.bug修复

parent 8448298a
...@@ -231,8 +231,9 @@ public class TbMajorClassServiceImpl implements ITbMajorClassService ...@@ -231,8 +231,9 @@ public class TbMajorClassServiceImpl implements ITbMajorClassService
Map<String, Object> majorCourseInfo = tbMajorClassMapper.getMajorCourseInfo(params); Map<String, Object> majorCourseInfo = tbMajorClassMapper.getMajorCourseInfo(params);
if (!majorCourseInfo.isEmpty()) { if (!majorCourseInfo.isEmpty()) {
long courseId = MapUtils.getLong(majorCourseInfo, "courseId"); long courseId = MapUtils.getLong(majorCourseInfo, "courseId");
if (majorCourseInfo.get("courseSyllabus") == null) {
majorCourseInfo.put("courseSyllabus", courseChapterService.getCourseChapterTreeList(courseId)); majorCourseInfo.put("courseSyllabus", courseChapterService.getCourseChapterTreeList(courseId));
}
HashMap<String, Object> map = new HashMap<>(); HashMap<String, Object> map = new HashMap<>();
map.put("courseId", courseId); map.put("courseId", courseId);
majorCourseInfo.put("teacherList", tbTeacherCourseService.getTeacherList(map)); majorCourseInfo.put("teacherList", tbTeacherCourseService.getTeacherList(map));
......
...@@ -279,6 +279,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -279,6 +279,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
CONVERT(IFNULL(tc.course_details, ''), CHAR) AS courseDetails, CONVERT(IFNULL(tc.course_details, ''), CHAR) AS courseDetails,
CONVERT(IFNULL(tc.course_overview, ''), CHAR) AS courseOverview, CONVERT(IFNULL(tc.course_overview, ''), CHAR) AS courseOverview,
CONVERT(IFNULL(tc.course_syllabus, ''), CHAR) AS courseSyllabus,
CONVERT(IFNULL(tc.course_knowledge, ''), CHAR) AS courseKnowledge, CONVERT(IFNULL(tc.course_knowledge, ''), CHAR) AS courseKnowledge,
CONVERT(IFNULL(tc.course_certificate, ''), CHAR) AS courseCertificate, CONVERT(IFNULL(tc.course_certificate, ''), CHAR) AS courseCertificate,
CONVERT(IFNULL(tc.course_information, ''), CHAR) AS courseInformation CONVERT(IFNULL(tc.course_information, ''), CHAR) AS courseInformation
......
...@@ -303,7 +303,19 @@ export default { ...@@ -303,7 +303,19 @@ export default {
publicationTime: [ publicationTime: [
{ required: true, message: "发布时间不能为空", trigger: "blur" }, { required: true, message: "发布时间不能为空", trigger: "blur" },
], ],
content: [{ required: true, message: "内容不能为空", trigger: "blur" }], content: [
{ required: true, message: "内容不能为空", trigger: "blur" },
{
validator: (rule, value, callback) => {
if (!value || value.replace(/<[^>]+>/g, '').trim() === '') {
callback(new Error('请输入有效内容'));
} else {
callback();
}
},
trigger: 'blur'
}
],
updateTime: [ updateTime: [
{ required: true, message: "更新时间不能为空", trigger: "blur" }, { required: true, message: "更新时间不能为空", trigger: "blur" },
], ],
...@@ -361,7 +373,7 @@ export default { ...@@ -361,7 +373,7 @@ export default {
showImg: null, showImg: null,
publisher: this.$store.getters.name, publisher: this.$store.getters.name,
publicationTime: null, publicationTime: null,
content: null, content: undefined,
createTime: null, createTime: null,
createBy: null, createBy: null,
updateTime: null, updateTime: null,
...@@ -414,10 +426,10 @@ export default { ...@@ -414,10 +426,10 @@ export default {
if (this.form.type !== 1) { if (this.form.type !== 1) {
this.form.typeTwo = 0; this.form.typeTwo = 0;
} }
if (this.form.content.length <= 11) { // if (this.form.content.length <= 11) {
this.$modal.msgError('内容不能为空') // this.$modal.msgError('内容不能为空')
return // return
} // }
if (this.form.noticeId != null) { if (this.form.noticeId != null) {
updateNotice(this.form).then((response) => { updateNotice(this.form).then((response) => {
......
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