

231205 김성훈 매칭관리 세부통계 진행중
@359ea056ebbbd7af672e51afa971e15c65926b53
--- client/views/pages/admin/statistics/MatchingStatistics.vue
+++ client/views/pages/admin/statistics/MatchingStatistics.vue
... | ... | @@ -131,7 +131,7 @@ |
131 | 131 |
<div class="table-zone"> |
132 | 132 |
<div class="btn-wrap"> |
133 | 133 |
|
134 |
- <button class="blue-border-bnt" @click="detailLogExcel()">Excel 다운로드</button> |
|
134 |
+ <button class="blue-border-bnt" @click="statisticsDetailLogExcel()">Excel 다운로드</button> |
|
135 | 135 |
</div> |
136 | 136 |
<table class="statistics-table"> |
137 | 137 |
<colgroup> |
... | ... | @@ -155,14 +155,31 @@ |
155 | 155 |
<tr v-for="(item, idx) in companyDetailStatistics" :key="idx"> |
156 | 156 |
<td v-if="idx === 0" :rowspan="companyDetailStatistics.length">{{ company_nm }}</td> |
157 | 157 |
<td>{{ item.company_nm }}</td> |
158 |
- <td v-if="item.division == 'reception'">요청받음</td> |
|
158 |
+ <td>{{ item.division }}</td> |
|
159 |
+ <td>{{ item.state }}</td> |
|
160 |
+ <!-- <td v-if="item.division == 'reception'">요청받음</td> |
|
159 | 161 |
<td v-else>요청함</td> |
160 | 162 |
<td v-if="item.complete_yn && item.refuse_yn == 'N'">성공</td> |
161 | 163 |
<td v-else-if="item.division == 'reception' && item.refuse_yn == 'Y'">거절함</td> |
162 | 164 |
<td v-else-if="item.division == 'dispatch' && item.refuse_yn == 'Y'">거절됨</td> |
163 |
- <td v-else>진행중</td> |
|
165 |
+ <td v-else>진행중</td> --> |
|
164 | 166 |
</tr> |
165 | 167 |
</tbody> |
168 |
+<!-- |
|
169 |
+ <tbody v-else> |
|
170 |
+ <tr v-for="(item, idx) in companyDetailStatistics" :key="idx"> |
|
171 |
+ <td v-if="idx === 0" :rowspan="companyDetailStatistics.length">{{ company_nm }}</td> |
|
172 |
+ <td>{{ item.company_nm }}</td> |
|
173 |
+ <td v-if="item.division == 'reception'">요청받음</td> |
|
174 |
+ <td v-else>요청함</td> |
|
175 |
+ <td v-if="item.complete_yn && item.refuse_yn == 'N' && !item.cancel_yn">성공</td> |
|
176 |
+ <td v-else-if="item.cancel_yn">성공 후 취소</td> |
|
177 |
+ <td v-else-if="item.division == 'reception' && item.refuse_yn == 'Y'">거절함</td> |
|
178 |
+ <td v-else-if="item.division == 'dispatch' && item.refuse_yn == 'Y'">거절됨</td> |
|
179 |
+ <td v-else>진행중</td> |
|
180 |
+ </tr> |
|
181 |
+ </tbody> --> |
|
182 |
+ |
|
166 | 183 |
</table> |
167 | 184 |
<table class="sum-table"> |
168 | 185 |
<colgroup> |
... | ... | @@ -174,14 +191,10 @@ |
174 | 191 |
<tbody> |
175 | 192 |
<tr> |
176 | 193 |
<th>합계</th> |
177 |
- <td colspan="3">성공건수</td> |
|
194 |
+ <td colspan="3">{{ detailTotalCount }}</td> |
|
178 | 195 |
</tr> |
179 | 196 |
</tbody> |
180 | 197 |
</table> |
181 |
- </div> |
|
182 |
- <div class="bottom-wrap"> |
|
183 |
- <PaginationButton v-model:currentPage="listSearch.currentPage" :perPage="listSearch.perPage" |
|
184 |
- :total-count="companySelectListCount" :max-range="5" :click="detailTypeCheck" /> |
|
185 | 198 |
</div> |
186 | 199 |
</div> |
187 | 200 |
</div> |
... | ... | @@ -220,15 +233,13 @@ |
220 | 233 |
company_nm: null, |
221 | 234 |
companyList: [], |
222 | 235 |
companyDetailStatistics: [], |
223 |
- detailTotalCount: {}, |
|
236 |
+ detailTotalCount: 0, |
|
224 | 237 |
}; |
225 | 238 |
}, |
226 | 239 |
methods: { |
227 | 240 |
currentTabChange: function (index) { |
228 | 241 |
this.currentTab = index; |
229 |
- if (index == 1) { |
|
230 |
- this.companySelectList(); |
|
231 |
- } else { |
|
242 |
+ if (index == 0) { |
|
232 | 243 |
this.listTypeCheck(); |
233 | 244 |
} |
234 | 245 |
}, |
... | ... | @@ -288,8 +299,8 @@ |
288 | 299 |
/** 선택기업 픽 세부통계 */ |
289 | 300 |
companyDetailPickStatistics: function () { |
290 | 301 |
const vm = this; |
291 |
- vm.listSearch.company_id = vm.company_id; |
|
292 | 302 |
|
303 |
+ vm.listSearch.company_id = vm.company_id; |
|
293 | 304 |
axios({ |
294 | 305 |
url: '/statistics/companyDetailPickStatistics.json', |
295 | 306 |
method: 'post', |
... | ... | @@ -298,9 +309,8 @@ |
298 | 309 |
}, |
299 | 310 |
data: vm.listSearch |
300 | 311 |
}).then(function (response) { |
301 |
- vm.companyDetailStatistics = response.data; |
|
302 |
- console.log(vm.companyDetailStatistics) |
|
303 |
- // vm.detailTotalCount = response.data.data.totalCount; |
|
312 |
+ vm.companyDetailStatistics = response.data.companyDetailPickStatistics; |
|
313 |
+ vm.detailTotalCount = response.data.totalCount; |
|
304 | 314 |
}).catch(function (error) { |
305 | 315 |
console.log("error - ", error) |
306 | 316 |
alert("PICK 통계 조회 오류, 관리자에게 문의하세요."); |
... | ... | @@ -310,6 +320,8 @@ |
310 | 320 |
/** 선택기업 매칭 세부통계 */ |
311 | 321 |
companyDetailMatchingStatistics: function () { |
312 | 322 |
const vm = this; |
323 |
+ |
|
324 |
+ vm.listSearch.company_id = vm.company_id; |
|
313 | 325 |
axios({ |
314 | 326 |
url: '/statistics/companyDetailMatchingStatistics.json', |
315 | 327 |
method: 'post', |
... | ... | @@ -318,8 +330,8 @@ |
318 | 330 |
}, |
319 | 331 |
data: vm.listSearch |
320 | 332 |
}).then(function (response) { |
321 |
- vm.companyDetailStatistics = response.data.companyMatchingStatistics; |
|
322 |
- vm.detailTotalCount = response.data.data.totalCount; |
|
333 |
+ vm.companyDetailStatistics = response.data.companyDetailMatchingStatistics; |
|
334 |
+ vm.detailTotalCount = response.data.totalCount; |
|
323 | 335 |
}).catch(function (error) { |
324 | 336 |
console.log("error - ", error) |
325 | 337 |
alert("MATCHING 통계 조회 오류, 관리자에게 문의하세요."); |
... | ... | @@ -331,7 +343,7 @@ |
331 | 343 |
if (this.selectedOption1 == 'pick') { |
332 | 344 |
this.companyPickStatistics(); |
333 | 345 |
} else { |
334 |
- this.companyDetailMatchingStatistics(); |
|
346 |
+ this.companyMatchingStatistics(); |
|
335 | 347 |
} |
336 | 348 |
}, |
337 | 349 |
|
... | ... | @@ -350,10 +362,10 @@ |
350 | 362 |
|
351 | 363 |
/**매칭관리 세부통계 타입 검사 */ |
352 | 364 |
detailTypeCheck: function () { |
353 |
- if (this.selectedOption1 == 'pick') { |
|
365 |
+ if (this.selectedOption2 == 'pick') { |
|
354 | 366 |
this.companyDetailPickStatistics(); |
355 | 367 |
} else { |
356 |
- this.companyMatchingStatistics(); |
|
368 |
+ this.companyDetailMatchingStatistics(); |
|
357 | 369 |
} |
358 | 370 |
}, |
359 | 371 |
|
... | ... | @@ -402,7 +414,7 @@ |
402 | 414 |
}) |
403 | 415 |
}, |
404 | 416 |
|
405 |
- /** 기업 별 pick 통계 엑셀 다운로드 */ |
|
417 |
+ /** 기업 별 통계 엑셀 다운로드 */ |
|
406 | 418 |
statisticsLogExcel: function() { |
407 | 419 |
const vm = this; |
408 | 420 |
|
... | ... | @@ -415,6 +427,48 @@ |
415 | 427 |
|
416 | 428 |
axios({ |
417 | 429 |
url: "/statistics/pickStatisticsLogExcel.json", |
430 |
+ method: "post", |
|
431 |
+ herders: { |
|
432 |
+ "Content-Type": "application/json; charset=UTF-8", |
|
433 |
+ }, |
|
434 |
+ responseType: 'arraybuffer', |
|
435 |
+ data: vm.listSearch, |
|
436 |
+ }) |
|
437 |
+ .then(function (response) { |
|
438 |
+ const url = window.URL.createObjectURL(new Blob([response.data], { type: response.headers["content-type"] })); |
|
439 |
+ const link = document.createElement("a"); |
|
440 |
+ link.href = url; |
|
441 |
+ let today = COMMON_UTIL.today(); |
|
442 |
+ if(vm.selectedOption1 == 'pick') { |
|
443 |
+ link.download = '[' + today + ']' + '기업별 pick 통계'; |
|
444 |
+ } else { |
|
445 |
+ link.download = '[' + today + ']' + '기업별 matching 통계'; |
|
446 |
+ } |
|
447 |
+ |
|
448 |
+ link.click(); |
|
449 |
+ window.URL.revokeObjectURL(url); |
|
450 |
+ }) |
|
451 |
+ .catch(function (error) { |
|
452 |
+ console.log("userAccessLogExcel - error : ", error); |
|
453 |
+ alert("통계 Excel 다운로드 오류, 관리자에게 문의해주세요."); |
|
454 |
+ }); |
|
455 |
+ }, |
|
456 |
+ |
|
457 |
+ /** 세부통계 엑셀 다운로드 */ |
|
458 |
+ statisticsDetailLogExcel: function() { |
|
459 |
+ const vm = this; |
|
460 |
+ |
|
461 |
+ vm.listSearch.company_nm = vm.company_nm |
|
462 |
+ |
|
463 |
+ if(vm.companySelectListCount === 0) { |
|
464 |
+ alert("데이터가 없어 EXCEL 다운로드를 실행할 수 없습니다.") |
|
465 |
+ return |
|
466 |
+ } |
|
467 |
+ |
|
468 |
+ vm.listSearch.selectedOption2 = vm.selectedOption2; |
|
469 |
+ |
|
470 |
+ axios({ |
|
471 |
+ url: "/statistics/detailStatisticsLogExcel.json", |
|
418 | 472 |
method: "post", |
419 | 473 |
herders: { |
420 | 474 |
"Content-Type": "application/json; charset=UTF-8", |
... | ... | @@ -460,6 +514,8 @@ |
460 | 514 |
mounted() { |
461 | 515 |
console.log(this.selectedOption1) |
462 | 516 |
this.companyPickStatistics(); |
517 |
+ this.companySelectList(); |
|
518 |
+ |
|
463 | 519 |
}, |
464 | 520 |
}; |
465 | 521 |
</script> |
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?