diff --git a/src/components/category/CategoryBtn.vue b/src/components/category/CategoryBtn.vue new file mode 100644 index 0000000..912348c --- /dev/null +++ b/src/components/category/CategoryBtn.vue @@ -0,0 +1,49 @@ + + + + + + \ No newline at end of file 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 @@ - - diff --git a/src/components/input/FormInput.vue b/src/components/input/FormInput.vue index 7f005e6..731824c 100644 --- a/src/components/input/FormInput.vue +++ b/src/components/input/FormInput.vue @@ -2,7 +2,7 @@
+ + + + + + 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 @@ + + + + + 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 @@ + + + + + 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 @@ + + + + + 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/components/wordDict/DictAlphabetFilter.vue b/src/components/wordDict/DictAlphabetFilter.vue new file mode 100644 index 0000000..bdc0c15 --- /dev/null +++ b/src/components/wordDict/DictAlphabetFilter.vue @@ -0,0 +1,48 @@ + + + + + \ No newline at end of file diff --git a/src/components/wordDict/DictCard.vue b/src/components/wordDict/DictCard.vue new file mode 100644 index 0000000..9477747 --- /dev/null +++ b/src/components/wordDict/DictCard.vue @@ -0,0 +1,50 @@ + + + \ No newline at end of file diff --git a/src/components/wordDict/DictWrite.vue b/src/components/wordDict/DictWrite.vue new file mode 100644 index 0000000..441ffbe --- /dev/null +++ b/src/components/wordDict/DictWrite.vue @@ -0,0 +1,21 @@ + + + \ No newline at end of file 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/BoardWrite.vue b/src/views/board/BoardWrite.vue index cdace2f..30d432a 100644 --- a/src/views/board/BoardWrite.vue +++ b/src/views/board/BoardWrite.vue @@ -57,6 +57,7 @@ name="files" :is-alert="attachFilesAlert" @update:data="attachFiles = $event" + @update:isValid="isFileValid = $event" />
@@ -71,8 +72,17 @@
- - + +
@@ -94,6 +104,7 @@ const password = ref(''); const category = ref(0); // 기본값 0 const content = ref(''); const attachFiles = ref(null); +const isFileValid = ref(true); // 파일 유효성 상태 추가 const titleAlert = ref(false); const passwordAlert = ref(false); @@ -112,7 +123,7 @@ const write = async () => { passwordAlert.value = category.value === 1 && !password.value; contentAlert.value = !content.value; - if (titleAlert.value || passwordAlert.value || contentAlert.value) { + if (titleAlert.value || passwordAlert.value || contentAlert.value || !isFileValid.value) { return; } @@ -125,7 +136,7 @@ const write = async () => { }; const { data: boardResponse } = await axios.post('board', boardData); - const boardId = boardResponse.data.CMNBRDSEQ; + const boardId = boardResponse.data; if (attachFiles.value && attachFiles.value.length > 0) { for (const file of attachFiles.value) { 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 @@ + + + diff --git a/src/views/wordDict/wordDict.vue b/src/views/wordDict/wordDict.vue index 4382d55..1ba0c77 100644 --- a/src/views/wordDict/wordDict.vue +++ b/src/views/wordDict/wordDict.vue @@ -15,47 +15,26 @@
단어 : {{ filteredList.length }} - +
+
- +
-
- +
+ +
+ + +
+
-
+
로딩 중...
@@ -63,48 +42,18 @@
{{ error }}
-
    -
  • -
    -
    - ({{ item.category }}) {{ item.WRDDICTTL }} -
    - -
    -

    {{ item.WRDDICCON }}

    -
    - 최초 작성자 - 최초 작성자 {{ item.author.name }} - 작성일 {{ new Date(item.author.createdAt).toLocaleString() }} -
    -
    - 최근 수정자 - 최근 수정자 {{ item.lastEditor.name }} - 수정일 {{ new Date(item.lastEditor.updatedAt).toLocaleString() }} -
    -
  • +
      +
    용어집의 용어가 없습니다.
- - -
-
- - - -
-
- -
-
- - -
-
@@ -116,35 +65,36 @@ import axios from '@api'; import SearchBar from '@c/search/SearchBar.vue'; import WriteButton from '@c/button/WriteBtn.vue'; - import QEditor from '@/components/editor/QEditor.vue'; - import FormInput from '@/components/input/FormInput.vue'; - import FormSelect from '@/components/input/FormSelect.vue'; + import CategoryBtn from '@/components/category/CategoryBtn.vue'; + import DictCard from '@/components/wordDict/DictCard.vue'; + import DictWrite from '@/components/wordDict/DictWrite.vue'; + import DictAlphabetFilter from '@/components/wordDict/DictAlphabetFilter.vue'; + - // /** 상세로 이동 */ - // const goDetail = idx => { - // router.push(`/board/get/${idx}`); - // }; + // 공통 + const loading = ref(false); + const error = ref(''); // 용어집 const wordList = ref([]); // 카테고리 const cateList = ref([]); - const loading = ref(false); - const error = ref(''); // 검색 const searchText = ref(''); - // 단어 및 카테고리 목록 통합 API 호출 + // 작성 + const isWriteVisible = ref(false); + + // 용어집 및 카테고리 목록 통합 API 호출 const fetchAllData = async () => { loading.value = true; error.value = ''; try { - // 단어 + // 용어집 const wordResponse = await axios.get('worddict/getWordList'); wordList.value = wordResponse.data.data.data; - console.log('단어 데이터:', wordList.value); - + console.log('용어집 데이터:', wordList.value); // 카테고리 const categoryResponse = await axios.get('worddict/getWordCategory'); cateList.value = categoryResponse.data.data; @@ -173,8 +123,10 @@ ) ); - - + // 작성 toggle + const toggleWriteForm = () => { + isWriteVisible.value = !isWriteVisible.value; + }; // `watchEffect`로 API 호출 watchEffect(() => { @@ -189,17 +141,6 @@ padding: 0 30px } -.word-list { - padding-left: 0; -} -.word-list li { - list-style: none; -} - -.word-list li ~ li { - margin-top: 20px; -} - .error { color: red; font-weight: bold;