| | |
| | | <template> |
| | | <up-popup |
| | | v-model:show="show" |
| | | mode="bottom" |
| | | <uni-popup |
| | | ref="popup" |
| | | type="bottom" |
| | | :round="20" |
| | | :safeAreaInsetBottom="true" |
| | | @close="handleClose" |
| | |
| | | @confirm="handleDateSelect" |
| | | @cancel="showDatePicker = false" |
| | | /> |
| | | </up-popup> |
| | | </uni-popup> |
| | | </template> |
| | | |
| | | <script setup> |
| | |
| | | import useUserStore from "@/store/modules/user"; |
| | | import dayjs from "dayjs"; |
| | | |
| | | |
| | | const { proxy } = getCurrentInstance(); |
| | | const userStore = useUserStore(); |
| | | const emit = defineEmits(['confirm']); |
| | | |
| | | // 弹窗显示状态 |
| | | const show = ref(false); |
| | | const popup = ref() |
| | | const submitting = ref(false); |
| | | |
| | | // 选择器显示状态 |
| | |
| | | |
| | | // 用户列表 |
| | | const userList = ref([]); |
| | | const userColumns = computed(() => [ |
| | | userList.value.map(user => ({ |
| | | const userColumns = computed(() => { |
| | | console.log('userList',userList) |
| | | return userList.value.map(user => ({ |
| | | label: user.nickName, |
| | | value: user.userId |
| | | })) |
| | | ]); |
| | | }); |
| | | |
| | | // 选中的用户名称(用于显示) |
| | | const selectedUserName = computed(() => { |
| | |
| | | schedulingUserId: userStore.id, |
| | | schedulingDate: dayjs().format("YYYY-MM-DD") |
| | | }); |
| | | |
| | | show.value = true; |
| | | popup.value.open() |
| | | } catch (error) { |
| | | uni.showToast({ |
| | | title: '加载用户列表失败', |
| | |
| | | |
| | | // 关闭弹窗 |
| | | const handleClose = () => { |
| | | show.value = false; |
| | | popup.value.close() |
| | | showUserPicker.value = false; |
| | | showDatePicker.value = false; |
| | | |