|
@@ -2,7 +2,6 @@
|
|
{ "style": { "navigationBarTitleText": "待办", "navigationBarBackgroundColor": "#f2f3f6" } }
|
|
{ "style": { "navigationBarTitleText": "待办", "navigationBarBackgroundColor": "#f2f3f6" } }
|
|
</route>
|
|
</route>
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
-import PageHelperEvo from '@/components/page-helper-evo.vue'
|
|
|
|
import { createTodo, deleteTodo, getTodos, updateTodo } from '../../../core/libs/requests'
|
|
import { createTodo, deleteTodo, getTodos, updateTodo } from '../../../core/libs/requests'
|
|
import { useUserStore } from '../../../store'
|
|
import { useUserStore } from '../../../store'
|
|
import { storeToRefs } from 'pinia'
|
|
import { storeToRefs } from 'pinia'
|
|
@@ -36,10 +35,10 @@ const schema = ref<DataFormSchema>({
|
|
executionTime: {
|
|
executionTime: {
|
|
type: 'TimePick',
|
|
type: 'TimePick',
|
|
label: '时间:',
|
|
label: '时间:',
|
|
- labelWidth: 44,
|
|
|
|
|
|
+ labelWidth: 52,
|
|
props: { defaultValue: dayjs().toDate().getTime() },
|
|
props: { defaultValue: dayjs().toDate().getTime() },
|
|
},
|
|
},
|
|
- content: { type: 'Textarea', label: '备注:', labelWidth: 44, props: {} },
|
|
|
|
|
|
+ content: { type: 'Textarea', label: '备注:', labelWidth: 52, props: {} },
|
|
})
|
|
})
|
|
const formData = ref({
|
|
const formData = ref({
|
|
// executionTime: '',
|
|
// executionTime: '',
|
|
@@ -50,7 +49,7 @@ const handleAddTodo = () => {
|
|
const handleSubmit = async () => {
|
|
const handleSubmit = async () => {
|
|
console.log('提交')
|
|
console.log('提交')
|
|
await requestToast(
|
|
await requestToast(
|
|
- () => createTodo({ ...formData.value, creator: userInfo.value.userId.toString(), status: 0 }),
|
|
|
|
|
|
+ () => createTodo({ ...formData.value, creator: String(userInfo.value.userId), status: 0 }),
|
|
{
|
|
{
|
|
successTitle: '添加成功',
|
|
successTitle: '添加成功',
|
|
success: true,
|
|
success: true,
|
|
@@ -58,6 +57,7 @@ const handleSubmit = async () => {
|
|
)
|
|
)
|
|
await setData()
|
|
await setData()
|
|
addSheetVisible.value = false
|
|
addSheetVisible.value = false
|
|
|
|
+ formData.value = {}
|
|
}
|
|
}
|
|
const handleDelete = async (todo: Todo) => {
|
|
const handleDelete = async (todo: Todo) => {
|
|
console.log('删除')
|
|
console.log('删除')
|
|
@@ -80,7 +80,6 @@ onMounted(async () => {
|
|
<wd-calendar-view v-model="current" @change="handleCalendarChange" />
|
|
<wd-calendar-view v-model="current" @change="handleCalendarChange" />
|
|
<wd-floating-panel v-if="!addSheetVisible" :anchors="[260, 490]" :custom-class="'h-auto'">
|
|
<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="box-border p-4 flex flex-col gap-3.5">
|
|
- <!-- <PageHelperEvo :request=""></PageHelperEvo> -->
|
|
|
|
<div class="flex items-center gap-2.5">
|
|
<div class="flex items-center gap-2.5">
|
|
<div class="w-1 h-4 bg-[#2357e9] rounded-[20px]"></div>
|
|
<div class="w-1 h-4 bg-[#2357e9] rounded-[20px]"></div>
|
|
|
|
|
|
@@ -92,7 +91,7 @@ onMounted(async () => {
|
|
<wd-checkbox
|
|
<wd-checkbox
|
|
:modelValue="it.status === 1"
|
|
:modelValue="it.status === 1"
|
|
shape="square"
|
|
shape="square"
|
|
- @change="(e) => handleClick(e, it)"
|
|
|
|
|
|
+ @change="(e: any) => handleClick(e, it)"
|
|
></wd-checkbox>
|
|
></wd-checkbox>
|
|
<div
|
|
<div
|
|
class="text-base font-normal font-['PingFang_SC'] leading-relaxed"
|
|
class="text-base font-normal font-['PingFang_SC'] leading-relaxed"
|