diff --git a/package-lock.json b/package-lock.json index b68528b..76b850a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "front", - "version": "0.0.0", + "version": "0.0.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "front", - "version": "0.0.0", + "version": "0.0.1", "dependencies": { "@fullcalendar/core": "^6.1.15", "@fullcalendar/daygrid": "^6.1.15", diff --git a/src/App.vue b/src/App.vue index 04bd0bd..6bc4eb2 100644 --- a/src/App.vue +++ b/src/App.vue @@ -2,16 +2,16 @@ - + - \ No newline at end of file + diff --git a/src/components/input/ArrInput.vue b/src/components/input/ArrInput.vue index bb99de6..4fe159f 100644 --- a/src/components/input/ArrInput.vue +++ b/src/components/input/ArrInput.vue @@ -114,7 +114,6 @@ const emitAddressData = () => { postcode: postcode.value, address: address.value, detailAddress: detailAddress.value, - fullAddress: `${address.value} ${detailAddress.value}`.trim() }; emits('update:data', fullAddress); }; diff --git a/src/components/input/FormFile.vue b/src/components/input/FormFile.vue index 4fbfce7..71070db 100644 --- a/src/components/input/FormFile.vue +++ b/src/components/input/FormFile.vue @@ -1,17 +1,25 @@ - {{ title }} + {{ title }} - + + + {{ errorMsg }} + - {{ errorMsg }} - - diff --git a/src/components/input/FormInput.vue b/src/components/input/FormInput.vue index 12a8e79..731824c 100644 --- a/src/components/input/FormInput.vue +++ b/src/components/input/FormInput.vue @@ -1,8 +1,8 @@ - + {{ title }} - * + * - + {{ title }} * - + - {{ item }} + + {{ isCommon ? item.label : item }} + {{ title }}을 확인해주세요. @@ -50,19 +52,30 @@ const props = defineProps({ isLabel : { type: Boolean, default: true, - required: true, + required: false, }, isRow : { type: Boolean, default: true, - required: true, + required: false, + }, + isCommon : { + type: Boolean, + default: false, + required: false, } }); const emit = defineEmits(['update:data']); const selectData = ref(props.value); + watchEffect(() => { + if (props.isCommon && props.data.length > 0) { + selectData.value = props.data[0].value; // 첫 번째 옵션의 값으로 설정 + } else { + selectData.value = props.value; // 기본값으로 설정 + } emit('update:data', selectData.value); }) diff --git a/src/components/input/UserFormInput.vue b/src/components/input/UserFormInput.vue index 4e0217d..54024ec 100644 --- a/src/components/input/UserFormInput.vue +++ b/src/components/input/UserFormInput.vue @@ -11,9 +11,10 @@ class="form-control" :type="type" @input="updateInput" - :value="value" + :value="computedValue" :maxLength="maxlength" :placeholder="title" + @blur="$emit('blur')" /> @ localhost.co.kr @@ -23,78 +24,90 @@ class="form-control" :type="type" @input="updateInput" - :value="value" + :value="computedValue" :maxLength="maxlength" :placeholder="title" + @blur="$emit('blur')" /> - {{ title }}를 확인해주세요. - - diff --git a/src/components/list/BoardCard.vue b/src/components/list/BoardCard.vue index d47ff53..456aa3e 100644 --- a/src/components/list/BoardCard.vue +++ b/src/components/list/BoardCard.vue @@ -11,26 +11,34 @@ /> - + {{ category }} - {{ title }} + + {{ title }} + + + + - {{ content }} + - {{ formatDate(date) }} - + {{ formattedDate }} + - {{ likes || 0 }} + {{ views || 0 }} - - {{ comments || 0 }} + + {{ likes }} + + + {{ comments }} @@ -40,49 +48,64 @@ - diff --git a/src/components/user/UserList.vue b/src/components/user/UserList.vue new file mode 100644 index 0000000..aaf9f7a --- /dev/null +++ b/src/components/user/UserList.vue @@ -0,0 +1,70 @@ + + + + + + + + + + + diff --git a/src/components/voteboard/voteCard.vue b/src/components/voteboard/voteCard.vue new file mode 100644 index 0000000..71a6542 --- /dev/null +++ b/src/components/voteboard/voteCard.vue @@ -0,0 +1,50 @@ + + + + + + + + + 공공이 + + + + + + 종료 + + + + + + + + 회식장소 고릅시다. + 24.12.12 11:02 ~ 24.12.12 16:02 + + + + + + + + + + + + + + + diff --git a/src/components/voteboard/voteCardCheck.vue b/src/components/voteboard/voteCardCheck.vue new file mode 100644 index 0000000..ea2c37a --- /dev/null +++ b/src/components/voteboard/voteCardCheck.vue @@ -0,0 +1,27 @@ + + + + + + + + + 저장 + + + + 투표하기 + + + + + diff --git a/src/components/voteboard/voteCardCheckList.vue b/src/components/voteboard/voteCardCheckList.vue new file mode 100644 index 0000000..bb273e4 --- /dev/null +++ b/src/components/voteboard/voteCardCheckList.vue @@ -0,0 +1,16 @@ + + + + + case1 + + + + + + + diff --git a/src/components/voteboard/voteCardList.vue b/src/components/voteboard/voteCardList.vue new file mode 100644 index 0000000..acdb01c --- /dev/null +++ b/src/components/voteboard/voteCardList.vue @@ -0,0 +1,13 @@ + + + + + + + + + diff --git a/src/components/voteboard/voteCompleteUserList.vue b/src/components/voteboard/voteCompleteUserList.vue new file mode 100644 index 0000000..e7d3203 --- /dev/null +++ b/src/components/voteboard/voteCompleteUserList.vue @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + diff --git a/src/components/voteboard/voteCompleteUserListCard.vue b/src/components/voteboard/voteCompleteUserListCard.vue new file mode 100644 index 0000000..b4200bd --- /dev/null +++ b/src/components/voteboard/voteCompleteUserListCard.vue @@ -0,0 +1,13 @@ + + + + + + + + + diff --git a/src/components/voteboard/voteInCompleteUserList.vue b/src/components/voteboard/voteInCompleteUserList.vue new file mode 100644 index 0000000..ec2c887 --- /dev/null +++ b/src/components/voteboard/voteInCompleteUserList.vue @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + diff --git a/src/components/voteboard/voteInCompleteUserListCard.vue b/src/components/voteboard/voteInCompleteUserListCard.vue new file mode 100644 index 0000000..1b7ce7a --- /dev/null +++ b/src/components/voteboard/voteInCompleteUserListCard.vue @@ -0,0 +1,13 @@ + + + + + + + + + diff --git a/src/components/voteboard/voteResultCard.vue b/src/components/voteboard/voteResultCard.vue new file mode 100644 index 0000000..2c318a5 --- /dev/null +++ b/src/components/voteboard/voteResultCard.vue @@ -0,0 +1,25 @@ + + + + + + + + + + 투표결과 + + 돼지고기 + + + + + + + + + diff --git a/src/components/voteboard/voteResultList.vue b/src/components/voteboard/voteResultList.vue new file mode 100644 index 0000000..c0f9a66 --- /dev/null +++ b/src/components/voteboard/voteResultList.vue @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + diff --git a/src/components/voteboard/voteResultRandom.vue b/src/components/voteboard/voteResultRandom.vue new file mode 100644 index 0000000..52816cc --- /dev/null +++ b/src/components/voteboard/voteResultRandom.vue @@ -0,0 +1,16 @@ + + 1위가 중복 되었습니다 + + + + 랜덤 1위 뽑기 + + + + + + diff --git a/src/components/voteboard/voteResultRandomList.vue b/src/components/voteboard/voteResultRandomList.vue new file mode 100644 index 0000000..56f7ceb --- /dev/null +++ b/src/components/voteboard/voteResultRandomList.vue @@ -0,0 +1,19 @@ + + + + + + 돼지고기 + + + + + + + + + diff --git a/src/components/voteboard/voteRevoteEnd.vue b/src/components/voteboard/voteRevoteEnd.vue new file mode 100644 index 0000000..fa64686 --- /dev/null +++ b/src/components/voteboard/voteRevoteEnd.vue @@ -0,0 +1,16 @@ + + + + 소고기 + 재투표 + + + + + + + diff --git a/src/components/voteboard/voteUserList.vue b/src/components/voteboard/voteUserList.vue new file mode 100644 index 0000000..556e6ae --- /dev/null +++ b/src/components/voteboard/voteUserList.vue @@ -0,0 +1,19 @@ + + + + + + + + + + + + + diff --git a/src/layouts/TheMenu.vue b/src/layouts/TheMenu.vue index 44b32a0..ea814c5 100644 --- a/src/layouts/TheMenu.vue +++ b/src/layouts/TheMenu.vue @@ -43,6 +43,18 @@ Board + + + + wordDict + + + + + + voteboard + + diff --git a/src/main.js b/src/main.js index 12ed27d..05f6a5c 100644 --- a/src/main.js +++ b/src/main.js @@ -5,13 +5,15 @@ import App from './App.vue' import router from '@/router' import dayjs from '@p/dayjs' import ToastModal from '@c/modal/ToastModal.vue'; - +import common from '@/common/common.js' + const pinia = createPinia() pinia.use(piniaPersist) const app = createApp(App) app.use(router) .use(pinia) + .use(common) .use(dayjs) .component('ToastModal',ToastModal) .mount('#app') diff --git a/src/router/index.js b/src/router/index.js index 95a331f..c72c9ad 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -50,6 +50,21 @@ const routes = [ component: () => import('@v/user/TheRegister.vue'), meta: { layout: 'NoLayout' }, }, + { + path: '/voteboard', + component: () => import('@v/voteboard/TheVoteBoard.vue'), + children: [ + { + path: '', + component: () => import('@v/voteboard/voteBoardList.vue') + }, + { + path: 'write', + component: () => import('@v/voteboard/voteboardWrite.vue') + }, + + ] + }, { path: '/sample', component: () => import('@c/calendar/SampleCalendar.vue'), diff --git a/src/stores/userList.js b/src/stores/userList.js new file mode 100644 index 0000000..25fbb9a --- /dev/null +++ b/src/stores/userList.js @@ -0,0 +1,21 @@ +/* + 작성자 : 공현지 + 작성일 : 2025-01-24 + 수정자 : + 수정일 : + 설명 : 사용자 전체 목록 +*/ +import { defineStore } from "pinia"; +import axios from "@api"; + +export const useUserStore = defineStore("userStore", { + state: () => ({ + userList: [], + }), + actions: { + async fetchUserList() { + const response = await axios.get('user/allUserList'); + this.userList = response.data.data; + }, + }, +}); diff --git a/src/views/board/BoardList.vue b/src/views/board/BoardList.vue index 3aa5861..87c4d0a 100644 --- a/src/views/board/BoardList.vue +++ b/src/views/board/BoardList.vue @@ -1,24 +1,66 @@ - - + + + + + + - - - + + + + - + + + + 공지사항 + + + + + - + + + + 일반게시판 + + + + + 최신날짜 + 조회수 + + + + + + + + + + - @@ -27,7 +69,7 @@ - - diff --git a/src/views/board/BoardView.vue b/src/views/board/BoardView.vue index d848449..fd20dc0 100644 --- a/src/views/board/BoardView.vue +++ b/src/views/board/BoardView.vue @@ -5,17 +5,19 @@ - + {{ boardTitle }} - + + + - - - {{ attachment.name }} + + + {{ attachment.name }} @@ -23,10 +25,7 @@ @@ -42,11 +41,13 @@ import BoardProfile from '@c/board/BoardProfile.vue'; import { ref, onMounted } from 'vue'; import { useRoute, useRouter } from 'vue-router'; import axios from '@api'; +import Quill from 'quill'; // 게시물 데이터 상태 const profileName = ref('익명 사용자'); const boardTitle = ref('제목 없음'); -const boardContent = ref('내용 없음'); +const boardContent = ref(''); +const convertedContent = ref('내용 없음'); const comments = ref([]); const attachments = ref([]); @@ -54,7 +55,6 @@ const attachments = ref([]); const route = useRoute(); const router = useRouter(); const currentBoardId = ref(Number(route.params.id)); -console.log(currentBoardId.value) // 글 수정 페이지로 이동 const goToEditPage = () => { @@ -71,7 +71,8 @@ const fetchBoardDetails = async () => { const boardDetail = data.boardDetail || {}; profileName.value = boardDetail.author || '익명 사용자'; boardTitle.value = boardDetail.title || '제목 없음'; - boardContent.value = boardDetail.content || '내용 없음'; + boardContent.value = boardDetail.content || ''; + attachments.value = data.attachments || []; comments.value = data.comments || []; @@ -83,7 +84,6 @@ const fetchBoardDetails = async () => { // 컴포넌트 마운트 시 데이터 로드 onMounted(() => { - console.log('Route Params:', route.params); fetchBoardDetails(); }); diff --git a/src/views/board/BoardWrite.vue b/src/views/board/BoardWrite.vue index 97249fd..30d432a 100644 --- a/src/views/board/BoardWrite.vue +++ b/src/views/board/BoardWrite.vue @@ -9,37 +9,80 @@ - - - - - + + + 카테고리 * + + + + + {{ categoryName }} + + + + + + + + + + + 내용 - * + * 내용을 확인해주세요. - - - + + + + + + @@ -49,114 +92,77 @@ - - diff --git a/src/views/user/TheLogin.vue b/src/views/user/TheLogin.vue index dfbac2a..cc10bb1 100644 --- a/src/views/user/TheLogin.vue +++ b/src/views/user/TheLogin.vue @@ -2,7 +2,7 @@ - + @@ -11,9 +11,6 @@ import LoginForm from '@c/user/LoginForm.vue'; import LogoHeader from '@c/user/LogoHeader.vue'; - const handleSubmit = async ({ id, password }) => { - console.log('Login'); - }; diff --git a/src/views/user/TheRegister.vue b/src/views/user/TheRegister.vue index 7c7ec8e..4296715 100644 --- a/src/views/user/TheRegister.vue +++ b/src/views/user/TheRegister.vue @@ -1,7 +1,7 @@ - + @@ -9,9 +9,6 @@ diff --git a/src/views/voteboard/TheVoteBoard.vue b/src/views/voteboard/TheVoteBoard.vue new file mode 100644 index 0000000..da14c4a --- /dev/null +++ b/src/views/voteboard/TheVoteBoard.vue @@ -0,0 +1,10 @@ + + + + + diff --git a/src/views/voteboard/voteBoardList.vue b/src/views/voteboard/voteBoardList.vue new file mode 100644 index 0000000..20a3434 --- /dev/null +++ b/src/views/voteboard/voteBoardList.vue @@ -0,0 +1,63 @@ + + + + + + + + + + + + 내가 한 투표 + + + + + + + + + + + + + + + + + + diff --git a/src/views/voteboard/voteboardWrite.vue b/src/views/voteboard/voteboardWrite.vue new file mode 100644 index 0000000..bb6f3d5 --- /dev/null +++ b/src/views/voteboard/voteboardWrite.vue @@ -0,0 +1,39 @@ + + + + + + + + + + + 투표 인원 + + + + + + + + + + + + +
{{ content }}