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