|
@@ -30,12 +30,7 @@
|
|
|
putClasstimeClassTimeCalendar,
|
|
|
} from '/@/services/apis/ClassTimeCalendarController';
|
|
|
import { timeOptions } from '../../erasure/data.config';
|
|
|
- import { BasicOptionModel } from '/@/api/model/baseModel';
|
|
|
-
|
|
|
- const typeOptions: BasicOptionModel[] = [
|
|
|
- { label: '选中覆盖', value: 0 },
|
|
|
- { label: '全天覆盖(未选中则覆盖为空)', value: 1 },
|
|
|
- ];
|
|
|
+ import { typeOptions } from '../data.config';
|
|
|
|
|
|
const isUpdate = ref(true);
|
|
|
const modelRef = ref<Recordable>({});
|
|
@@ -71,28 +66,28 @@
|
|
|
getPopupContainer: () => document.body,
|
|
|
},
|
|
|
},
|
|
|
- // {
|
|
|
- // label: '补课课程',
|
|
|
- // field: 'time',
|
|
|
- // component: 'CheckboxGroup',
|
|
|
- // required: true,
|
|
|
- // colProps: { span: 24 },
|
|
|
- // componentProps: {
|
|
|
- // options: timeOptions,
|
|
|
- // getPopupContainer: () => document.body,
|
|
|
- // },
|
|
|
- // },
|
|
|
- // {
|
|
|
- // label: '覆盖方式',
|
|
|
- // field: 'timeType',
|
|
|
- // component: 'RadioGroup',
|
|
|
- // required: true,
|
|
|
- // colProps: { span: 24 },
|
|
|
- // componentProps: {
|
|
|
- // options: typeOptions,
|
|
|
- // getPopupContainer: () => document.body,
|
|
|
- // },
|
|
|
- // },
|
|
|
+ {
|
|
|
+ label: '补课课程',
|
|
|
+ field: 'timePeriod',
|
|
|
+ component: 'CheckboxGroup',
|
|
|
+ required: true,
|
|
|
+ colProps: { span: 24 },
|
|
|
+ componentProps: {
|
|
|
+ options: timeOptions,
|
|
|
+ getPopupContainer: () => document.body,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '覆盖方式',
|
|
|
+ field: 'coverType',
|
|
|
+ component: 'RadioGroup',
|
|
|
+ required: true,
|
|
|
+ colProps: { span: 24 },
|
|
|
+ componentProps: {
|
|
|
+ options: typeOptions,
|
|
|
+ getPopupContainer: () => document.body,
|
|
|
+ },
|
|
|
+ },
|
|
|
{
|
|
|
field: 'remark',
|
|
|
label: ' ',
|
|
@@ -129,6 +124,7 @@
|
|
|
const resData = await getHolidayDateInfo({ id: data.baseData.id });
|
|
|
resData['startDate'] = [resData['startDate'], resData['endDate']];
|
|
|
modelRef.value = { ...resData };
|
|
|
+ resData['timePeriod'] = resData['timePeriod']?.split(',') || [];
|
|
|
setFieldsValue({
|
|
|
...resData,
|
|
|
});
|
|
@@ -142,6 +138,7 @@
|
|
|
setModalProps({ confirmLoading: true });
|
|
|
const postParams = unref(modelRef);
|
|
|
Object.assign(postParams, values);
|
|
|
+ postParams['timePeriod'] = postParams['timePeriod'].join(',');
|
|
|
|
|
|
if (unref(isUpdate)) {
|
|
|
await putClasstimeClassTimeCalendar(postParams as API.UpdateClassTimeCalendarDto);
|