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

1.bug修复

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