This commit is contained in:
Pengxiansen
2025-02-24 20:24:27 +08:00
parent 8627d11239
commit 76a7070020
15 changed files with 254 additions and 140 deletions

View File

@@ -182,7 +182,7 @@ const rulesRef = ref({
],
});
const { validate } = Form.useForm(formData.info, rulesRef);
let validate = Form.useForm(formData.value.info, rulesRef).validate;
// 关闭弹窗
const closeDrawer = () => {
if (step.value > 1) {
@@ -192,7 +192,7 @@ const closeDrawer = () => {
dateTime.value = [];
formData.reset();
formData.value.info = {
voteStemDtoList:[]
voteStemDtoList: [],
};
}
};
@@ -211,7 +211,10 @@ async function confirm() {
message.warning(errorFields[0].errors.join());
throw Error("数据校验不通过");
});
if (dayjs().isAfter(dayjs(formData.value.info.voteEndTime))) {
message.warning("考试结束时间不能小于当前时间");
return;
}
// 专业力ID
formData.value.growthId = props.growId;
// 任务类型
@@ -242,6 +245,7 @@ function openDrawer(row) {
dayjs(row.info.voteStartTime, "YYYY-MM-DD HH:mm"),
dayjs(row.info.voteEndTime, "YYYY-MM-DD HH:mm"),
]);
row && (validate = Form.useForm(formData.value.info, rulesRef).validate);
visible.value = true;
}