

231109 김성훈 기업홍보관 수정
@4266d6960230a5b778890708447cede00a18cf27
--- client/views/pages/user/networking/Matching.vue
+++ client/views/pages/user/networking/Matching.vue
... | ... | @@ -40,7 +40,8 @@ |
40 | 40 |
<img :src="'http://localhost:8080'+item.file_path +'\\' + item.file_nm + '.' + item.file_extn_nm" width="20px" alt=""> |
41 | 41 |
<p>{{ company_info }}</p> |
42 | 42 |
<div class="matchingbox-1"> |
43 |
- <p><i class="fa-regular fa-heart fa-lg" style="color: #3f87f7;"></i> {{ item.company_pick_cnt }} </p> |
|
43 |
+ <p v-if="item.pick_yn === 0" @click.stop="pickModal(item)"><i class="fa-regular fa-heart fa-lg" style="color: #3f87f7;"></i> {{ item.company_pick_cnt }} </p> |
|
44 |
+ <p v-else @click.stop="pickCancelModal(item)"><i class="fa fa-heart fa-lg" style="color: #d41515;"></i> {{ item.company_pick_cnt }} </p> |
|
44 | 45 |
<p class="matchingbox-text">조회수 <span>{{ item.view_cnt }}</span></p> |
45 | 46 |
</div> |
46 | 47 |
<div class="matching-span"> |
... | ... | @@ -59,14 +60,15 @@ |
59 | 60 |
<div class="matching-box-main-two"> |
60 | 61 |
<div class="w1400"> |
61 | 62 |
<div class="matching-box-grid-two"> |
62 |
- <div class="matching-box-2"> |
|
63 |
- <div v-for="(item, idx) in companyList" :key="idx" @click="companySelectOnePage(item)"> |
|
63 |
+ <div class="matching-box-2" v-for="(item, idx) in companyList" :key="idx" @click="companySelectOnePage(item)"> |
|
64 |
+ <div> |
|
64 | 65 |
<h5>{{ item.company_nm }}</h5> |
65 | 66 |
<div class="matching-span"> |
66 | 67 |
<span v-for="(item, idx) in keywordList" :key="idx">#{{ item }}</span> |
67 | 68 |
</div> |
68 | 69 |
<div class="matchingbox-2"> |
69 |
- <p><i class="fa-regular fa-heart fa-lg" style="color: #3f87f7;"></i> {{ item.company_pick_cnt }} </p> |
|
70 |
+ <p v-if="item.pick_yn === 0" @click.stop="pickModal(item)"><i class="fa-regular fa-heart fa-lg" style="color: #3f87f7;"></i> {{ item.company_pick_cnt }} </p> |
|
71 |
+ <p v-else @click.stop="pickCancelModal(item)"><i class="fa fa-heart fa-lg" style="color: #d41515;"></i> {{ item.company_pick_cnt }} </p> |
|
70 | 72 |
<p>조회수 <span>{{ item.view_cnt }}</span> </p> |
71 | 73 |
</div> |
72 | 74 |
|
... | ... | @@ -97,7 +99,9 @@ |
97 | 99 |
keywordList:[], |
98 | 100 |
companyTop6List:[], |
99 | 101 |
companyListCount: 0, |
100 |
- companyIdx: 0 |
|
102 |
+ companyIdx: 0, |
|
103 |
+ |
|
104 |
+ pickModalOpen: false |
|
101 | 105 |
} |
102 | 106 |
}, |
103 | 107 |
methods: { |
... | ... | @@ -116,14 +120,68 @@ |
116 | 120 |
vm.companyListCount = response.data.companySelectListCount; |
117 | 121 |
vm.companyIdx = vm.companyListCount - (vm.companyListSearch.currentPage - 1) * vm.companyListSearch.perPage; |
118 | 122 |
vm.companyTop6List = response.data.companyTop6; |
123 |
+ |
|
119 | 124 |
for( let i = 0; i < vm.companyList.length; i++) { |
120 | 125 |
vm.keywordList = vm.companyList[i].keyword.split('#'); |
121 |
- console.log('keyword', vm.keywordList); |
|
122 | 126 |
} |
123 | 127 |
|
124 | 128 |
}).then(function() { |
125 | 129 |
vm.keywordList.splice(0, 1); |
126 |
- console.log( vm.keywordList); |
|
130 |
+ }).catch(function(error) { |
|
131 |
+ console.log('error - ', error) |
|
132 |
+ alert('기업 목록 조회 오류, 관리자에게 문의하세요.'); |
|
133 |
+ }) |
|
134 |
+ }, |
|
135 |
+ |
|
136 |
+ pickModal: function(item) { |
|
137 |
+ if(confirm(item.company_nm + "에 PICK 신청을 하시겠습니까?")) { |
|
138 |
+ this.pick(item) |
|
139 |
+ } |
|
140 |
+ }, |
|
141 |
+ |
|
142 |
+ pickCancelModal: function(item) { |
|
143 |
+ if(confirm(item.company_nm + "에게 신청한 PICK을 취소 하시겠습니까?")) { |
|
144 |
+ this.pickCancel(item) |
|
145 |
+ } |
|
146 |
+ }, |
|
147 |
+ |
|
148 |
+ pick: function(item) { |
|
149 |
+ const vm = this; |
|
150 |
+ |
|
151 |
+ axios({ |
|
152 |
+ url: '/matching/pick.json', |
|
153 |
+ method: 'post', |
|
154 |
+ hearder: { |
|
155 |
+ 'Content-Type': "application/json; charset=UTF-8", |
|
156 |
+ }, |
|
157 |
+ data: item |
|
158 |
+ }).then(function(response) { |
|
159 |
+ alert(response.data); |
|
160 |
+ vm.companySelectList(); |
|
161 |
+ }).catch(function(error) { |
|
162 |
+ console.log('error - ', error) |
|
163 |
+ alert('기업 목록 조회 오류, 관리자에게 문의하세요.'); |
|
164 |
+ }) |
|
165 |
+ }, |
|
166 |
+ |
|
167 |
+ pickCancel: function(item) { |
|
168 |
+ const vm = this; |
|
169 |
+ |
|
170 |
+ axios({ |
|
171 |
+ url: '/matching/pickCancel.json', |
|
172 |
+ method: 'post', |
|
173 |
+ hearder: { |
|
174 |
+ 'Content-Type': "application/json; charset=UTF-8", |
|
175 |
+ }, |
|
176 |
+ data: item |
|
177 |
+ }).then(function(response) { |
|
178 |
+ if(response.data > 0) { |
|
179 |
+ alert("PICK 취소 완료 되었습니다.") |
|
180 |
+ vm.companySelectList(); |
|
181 |
+ } else { |
|
182 |
+ alert("이미 취소된 PICK입니다.") |
|
183 |
+ } |
|
184 |
+ |
|
127 | 185 |
}).catch(function(error) { |
128 | 186 |
console.log('error - ', error) |
129 | 187 |
alert('기업 목록 조회 오류, 관리자에게 문의하세요.'); |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?