|
@@ -16,6 +16,15 @@ import { DataFormSchema } from '../../../components/data-form'
|
|
|
const userStore = useUserStore()
|
|
|
const { userInfo } = storeToRefs(userStore)
|
|
|
const current = ref(Date.now())
|
|
|
+const { data: list, run: setList } = useRequest(
|
|
|
+ () =>
|
|
|
+ getTodos({
|
|
|
+ brokerId: String(userInfo.value.userId)
|
|
|
+ }),
|
|
|
+ {
|
|
|
+ initialData: [],
|
|
|
+ },
|
|
|
+)
|
|
|
const { data, run: setData } = useRequest(
|
|
|
() =>
|
|
|
getTodos({
|
|
@@ -73,11 +82,24 @@ const handleCalendarChange = async () => {
|
|
|
}
|
|
|
onMounted(async () => {
|
|
|
await setData()
|
|
|
+ await setList()
|
|
|
})
|
|
|
</script>
|
|
|
<template>
|
|
|
<div class="flex-grow">
|
|
|
- <wd-calendar-view v-model="current" @change="handleCalendarChange" />
|
|
|
+ <wd-calendar-view v-model="current" @change="handleCalendarChange" :formatter="(day: any) => {
|
|
|
+ let date = dayjs(new Date(day.date)).format('YYYY-MM-DD')
|
|
|
+ for(const {executionTime} of list) {
|
|
|
+ let date2 = dayjs(new Date(executionTime)).format('YYYY-MM-DD')
|
|
|
+ if (date === date2) {
|
|
|
+ day.bottomInfo = '⏺'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return day
|
|
|
+ }" />
|
|
|
+ <div v-for="({content,id,executionTime}, i) in list" :key="i">
|
|
|
+ <div>{{content}}-{{id}}-{{dayjs(executionTime).format('YYYY.MM.DD HH:mm')}}</div>
|
|
|
+ </div>
|
|
|
<wd-floating-panel v-if="!addSheetVisible" :anchors="[260, 490]" :custom-class="'h-auto'">
|
|
|
<div class="box-border p-4 flex flex-col gap-3.5">
|
|
|
<div class="flex items-center gap-2.5">
|