新增前端vue

This commit is contained in:
2025-12-11 11:55:22 +08:00
parent a86c2ce57e
commit b71e1331dd

View File

@@ -35,7 +35,11 @@
const { showMessage } = useMessage(); const { showMessage } = useMessage();
const { meta } = unref(router.currentRoute); const { meta } = unref(router.currentRoute);
const record = ref<BizCalendarSchedule>({} as BizCalendarSchedule); const record = ref<BizCalendarSchedule>({} as BizCalendarSchedule);
const RcTimestamp = () => {
return `RC_${Date.now()}`;
};
const getTitle = computed(() => ({ const getTitle = computed(() => ({
icon: meta.icon || 'i-ant-design:book-outlined', icon: meta.icon || 'i-ant-design:book-outlined',
value: record.value.isNewRecord ? t('新增日程信息') : t('编辑日程信息'), value: record.value.isNewRecord ? t('新增日程信息') : t('编辑日程信息'),
@@ -60,6 +64,7 @@
maxlength: 64, maxlength: 64,
}, },
required: true, required: true,
dynamicDisabled: true,
}, },
{ {
label: t('通知人员'), label: t('通知人员'),
@@ -76,6 +81,7 @@
field: 'content', field: 'content',
component: 'InputTextArea', component: 'InputTextArea',
colProps: { md: 24, lg: 24 }, colProps: { md: 24, lg: 24 },
required: true,
}, },
{ {
label: t('开始时间'), label: t('开始时间'),
@@ -85,7 +91,6 @@
format: 'YYYY-MM-DD HH:mm', format: 'YYYY-MM-DD HH:mm',
showTime: { format: 'HH:mm' }, showTime: { format: 'HH:mm' },
}, },
required: true,
}, },
{ {
label: t('结束时间'), label: t('结束时间'),
@@ -95,7 +100,6 @@
format: 'YYYY-MM-DD HH:mm', format: 'YYYY-MM-DD HH:mm',
showTime: { format: 'HH:mm' }, showTime: { format: 'HH:mm' },
}, },
required: true,
}, },
{ {
label: t('是否全天'), label: t('是否全天'),
@@ -159,6 +163,9 @@
const res = await bizCalendarScheduleForm(data); const res = await bizCalendarScheduleForm(data);
record.value = (res.bizCalendarSchedule || {}) as BizCalendarSchedule; record.value = (res.bizCalendarSchedule || {}) as BizCalendarSchedule;
record.value.__t = new Date().getTime(); record.value.__t = new Date().getTime();
if (record.value.isNewRecord) {
record.value.scheduleNo = RcTimestamp();
}
await setFieldsValue(record.value); await setFieldsValue(record.value);
setDrawerProps({ loading: false }); setDrawerProps({ loading: false });
}); });