From 2f0f5fd37886667e0825a3c625c157e39b03fb1b Mon Sep 17 00:00:00 2001 From: dyhj625 Date: Fri, 24 Jan 2025 13:53:38 +0900 Subject: [PATCH 1/5] =?UTF-8?q?=EC=B2=A8=EB=B6=80=ED=8C=8C=EC=9D=BC?= =?UTF-8?q?=EC=A0=80=EC=9E=A5=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/board/BoardWrite.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/views/board/BoardWrite.vue b/src/views/board/BoardWrite.vue index cdace2f..b7ef035 100644 --- a/src/views/board/BoardWrite.vue +++ b/src/views/board/BoardWrite.vue @@ -125,7 +125,8 @@ const write = async () => { }; const { data: boardResponse } = await axios.post('board', boardData); - const boardId = boardResponse.data.CMNBRDSEQ; + console.log(boardResponse.data); + const boardId = boardResponse.data; if (attachFiles.value && attachFiles.value.length > 0) { for (const file of attachFiles.value) { From fb12e345a7e0f8b35f839701aba596aec7212ded Mon Sep 17 00:00:00 2001 From: dyhj625 Date: Fri, 24 Jan 2025 14:44:18 +0900 Subject: [PATCH 2/5] =?UTF-8?q?=EA=B2=8C=EC=8B=9C=ED=8C=90=20=EC=A0=80?= =?UTF-8?q?=EC=9E=A5=20=EC=88=98=EC=A0=95=EC=A0=95,=ED=8C=8C=EC=9D=BC?= =?UTF-8?q?=EC=A0=9C=ED=95=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/input/FormFile.vue | 48 ++++++++++++++++++++---------- src/components/input/FormInput.vue | 2 +- src/views/board/BoardWrite.vue | 18 ++++++++--- 3 files changed, 48 insertions(+), 20 deletions(-) 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 @@
@@ -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,6 @@ const write = async () => { }; const { data: boardResponse } = await axios.post('board', boardData); - console.log(boardResponse.data); const boardId = boardResponse.data; if (attachFiles.value && attachFiles.value.length > 0) { From 480ba2bd8a6d5d497b6a0b827c44cbf4d33236c2 Mon Sep 17 00:00:00 2001 From: khj0414 Date: Fri, 24 Jan 2025 15:02:07 +0900 Subject: [PATCH 3/5] =?UTF-8?q?=EC=82=AC=EC=9A=A9=EC=9E=90=20=EB=AA=A9?= =?UTF-8?q?=EB=A1=9D=20=EA=B3=B5=ED=86=B5=ED=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/user/UserList.vue | 70 ++++++++++++++++++++++++++ src/router/index.js | 15 ++++++ src/stores/userList.js | 21 ++++++++ src/views/voteboard/TheVoteBoard.vue | 10 ++++ src/views/voteboard/voteboardWrite.vue | 39 ++++++++++++++ 5 files changed, 155 insertions(+) create mode 100644 src/components/user/UserList.vue create mode 100644 src/stores/userList.js create mode 100644 src/views/voteboard/TheVoteBoard.vue create mode 100644 src/views/voteboard/voteboardWrite.vue 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/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/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/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 @@ + + + From e5ccaa1a12de689015ea6b8d2306644934a5e88e Mon Sep 17 00:00:00 2001 From: khj0414 Date: Fri, 24 Jan 2025 15:02:19 +0900 Subject: [PATCH 4/5] =?UTF-8?q?=ED=88=AC=ED=91=9C=20=EC=BB=B4=ED=8F=AC?= =?UTF-8?q?=EB=84=8C=ED=8A=B8=20=EC=B6=94=EA=B0=80=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/voteboard/voteCard.vue | 50 +++++++++++++++ src/components/voteboard/voteCardCheck.vue | 27 ++++++++ .../voteboard/voteCardCheckList.vue | 16 +++++ src/components/voteboard/voteCardList.vue | 13 ++++ .../voteboard/voteCompleteUserList.vue | 23 +++++++ .../voteboard/voteCompleteUserListCard.vue | 13 ++++ .../voteboard/voteInCompleteUserList.vue | 23 +++++++ .../voteboard/voteInCompleteUserListCard.vue | 13 ++++ src/components/voteboard/voteResultCard.vue | 25 ++++++++ src/components/voteboard/voteResultList.vue | 19 ++++++ src/components/voteboard/voteResultRandom.vue | 16 +++++ .../voteboard/voteResultRandomList.vue | 19 ++++++ src/components/voteboard/voteRevoteEnd.vue | 16 +++++ src/components/voteboard/voteUserList.vue | 19 ++++++ src/views/voteboard/voteBoardList.vue | 63 +++++++++++++++++++ 15 files changed, 355 insertions(+) create mode 100644 src/components/voteboard/voteCard.vue create mode 100644 src/components/voteboard/voteCardCheck.vue create mode 100644 src/components/voteboard/voteCardCheckList.vue create mode 100644 src/components/voteboard/voteCardList.vue create mode 100644 src/components/voteboard/voteCompleteUserList.vue create mode 100644 src/components/voteboard/voteCompleteUserListCard.vue create mode 100644 src/components/voteboard/voteInCompleteUserList.vue create mode 100644 src/components/voteboard/voteInCompleteUserListCard.vue create mode 100644 src/components/voteboard/voteResultCard.vue create mode 100644 src/components/voteboard/voteResultList.vue create mode 100644 src/components/voteboard/voteResultRandom.vue create mode 100644 src/components/voteboard/voteResultRandomList.vue create mode 100644 src/components/voteboard/voteRevoteEnd.vue create mode 100644 src/components/voteboard/voteUserList.vue create mode 100644 src/views/voteboard/voteBoardList.vue 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/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 @@ + + + + From f32a45c69cff024ee7d23e9fff400a96fae6e855 Mon Sep 17 00:00:00 2001 From: Dang Date: Fri, 24 Jan 2025 15:03:55 +0900 Subject: [PATCH 5/5] =?UTF-8?q?=EC=9A=A9=EC=96=B4=EC=A7=91=20=EC=9E=91?= =?UTF-8?q?=EC=97=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/category/CategoryBtn.vue | 49 +++++++ .../wordDict/DictAlphabetFilter.vue | 48 +++++++ src/components/wordDict/DictCard.vue | 50 +++++++ src/components/wordDict/DictWrite.vue | 21 +++ src/views/wordDict/wordDict.vue | 129 +++++------------- 5 files changed, 203 insertions(+), 94 deletions(-) create mode 100644 src/components/category/CategoryBtn.vue create mode 100644 src/components/wordDict/DictAlphabetFilter.vue create mode 100644 src/components/wordDict/DictCard.vue create mode 100644 src/components/wordDict/DictWrite.vue 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/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/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;