Commit 2096476c authored by 刘帅's avatar 刘帅

1.BUG修复

parent 0625c764
......@@ -185,10 +185,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-- 动态排序字段:未过期标记为0(排前面),已过期标记为1(排后面)
CASE
WHEN ten.exam_start_time >= CURDATE() THEN 0
ELSE 1 END AS isExpired,
ter.exam_registration_id as examRegistrationId
ELSE 1 END AS isExpired
# ter.exam_registration_id as examRegistrationId
FROM tb_exam_notice ten
LEFT JOIN tb_exam_registration ter on ten.exam_id = ter.exam_id and ten.batch_index = ter.exam_batch_index
# LEFT JOIN tb_exam_registration ter on ten.exam_id = ter.exam_id and ten.batch_index = ter.exam_batch_index
WHERE ten.status = 0 AND ten.del_flag = 0
<if test="searchValue != null and searchValue != ''">
AND (ten.exam_notice_name LIKE CONCAT('%', #{searchValue}, '%') OR ten.exam_notice_introduce LIKE CONCAT('%', #{searchValue}, '%'))
......
......@@ -87,6 +87,7 @@
<span v-if="scope.row.examType ? scope.row.examType.includes('1') : false">模拟考试</span>
</template>
</el-table-column>
<el-table-column label="专业名称" align="center" prop="subjectWarehouseClassName" width="120px" />
<el-table-column label="等级" align="center" prop="level" width="100px">
<template slot-scope="scope">
<dict-tag :options="dict.type.tb_subject_level" :value="scope.row.level" />
......
......@@ -307,11 +307,19 @@ export default {
{ required: true, message: "内容不能为空", trigger: "blur" },
{
validator: (rule, value, callback) => {
if (!value || value.replace(/<[^>]+>/g, '').trim() === '') {
callback(new Error('请输入有效内容'));
} else {
callback();
if (!value) {
return callback(new Error('请输入有效内容'));
}
// 临时移除图片标签,检查剩余文本内容
const contentWithoutImages = value.replace(/<img[^>]*>/gi, '');
const cleanText = contentWithoutImages.replace(/<[^>]+>/g, '').trim();
// 如果有图片或者有文本内容,都算有效
const hasImages = /<img[^>]*>/i.test(value);
const hasText = cleanText !== '';
if (!hasImages && !hasText) {
return callback(new Error('请输入有效内容'));
}
callback();
},
trigger: 'blur'
}
......
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