|
@@ -42,9 +42,9 @@
|
|
|
@update:value="handleUpdateValue"
|
|
|
>
|
|
|
{{ year }}年{{ month }}月{{ date }}日 <br />
|
|
|
- <n-tag v-if="dataList[`${year}-${doubleMonth(month)}-${date}`]" type="success">
|
|
|
+ <n-tag v-if="dataList[`${year}-${doubleMonth(month)}-${doubleDay(date)}`]" type="success">
|
|
|
共有课时:
|
|
|
- {{ dataList[`${year}-${doubleMonth(month)}-${date}`] }}
|
|
|
+ {{ dataList[`${year}-${doubleMonth(month)}-${doubleDay(date)}`] }}
|
|
|
节
|
|
|
</n-tag>
|
|
|
<n-tag v-else> 共有课时:0 节 </n-tag>
|
|
@@ -131,8 +131,8 @@ const scheduleParamsOptions = ref<QueryScheduleParams>({
|
|
|
});
|
|
|
const dataList = reactive<{ [index: string]: any }>({});
|
|
|
function handleUpdateValue(_: number, { year, month, date }: { year: number; month: number; date: number }) {
|
|
|
- if (dataList[`${year}-${doubleMonth(month)}-${date}`]) {
|
|
|
- list.value = allList[`${year}-${doubleMonth(month)}-${date}`];
|
|
|
+ if (dataList[`${year}-${doubleMonth(month)}-${doubleDay(date)}`]) {
|
|
|
+ list.value = allList[`${year}-${doubleMonth(month)}-${doubleDay(date)}`];
|
|
|
showModal.value = true;
|
|
|
}
|
|
|
}
|
|
@@ -175,7 +175,9 @@ function studentOptionsSearch(keyword: string) {
|
|
|
function doubleMonth(month: number) {
|
|
|
return month < 10 ? `0${month}` : month;
|
|
|
}
|
|
|
-
|
|
|
+function doubleDay(day: number) {
|
|
|
+ return day < 10 ? `0${day}` : day;
|
|
|
+}
|
|
|
function handlePanelChange(event: { year: number; month: number }) {
|
|
|
scheduleParamsOptions.value.startTime = formatDate(getFirstDayOfMonth(new Date(event.year, event.month - 1)));
|
|
|
scheduleParamsOptions.value.endTime = formatDate(getLastDayOfMonth(new Date(event.year, event.month - 1)));
|