Spaces:
Running
Running
Update index.html
Browse files- index.html +152 -97
index.html
CHANGED
@@ -28,9 +28,11 @@
|
|
28 |
border-radius: 8px;
|
29 |
/*box-shadow: 0 2px 4px rgba(0,0,0,0.1);*/
|
30 |
}
|
|
|
31 |
.table-task-list tbody tr.selected {
|
32 |
background-color: #e9ecef !important; /* ์งํ ํ์์กฐ๋ก ๋ณ๊ฒฝ */
|
33 |
}
|
|
|
34 |
.table-task-list, .table-task-detail {
|
35 |
width: 100%;
|
36 |
border-collapse: collapse;
|
@@ -38,12 +40,14 @@
|
|
38 |
border: 1px solid #e5e7eb;
|
39 |
margin-top: 20px; /* ๋ ํ
์ด๋ธ ์ฌ์ด์ ๊ณต๋ฐฑ ์ถ๊ฐ */
|
40 |
}
|
|
|
41 |
.table-task-list thead, .table-task-detail thead {
|
42 |
background-color: white;
|
43 |
color: black;
|
44 |
font-weight: bold;
|
45 |
text-align: left;
|
46 |
}
|
|
|
47 |
.table-task-list td, .table-task-detail td {
|
48 |
border-top: none;
|
49 |
border-bottom: none;
|
@@ -51,27 +55,34 @@
|
|
51 |
padding: 8px;
|
52 |
text-align: left;
|
53 |
}
|
|
|
54 |
.table-task-detail thead tr th{
|
55 |
padding:5px 10px;
|
56 |
}
|
|
|
57 |
.table-task-list td:last-child, .table-task-detail td:last-child {
|
58 |
border-right: 1px solid #e5e7eb;
|
59 |
}
|
|
|
60 |
.table-task-list tbody tr:hover, .table-task-detail tbody tr:hover {
|
61 |
background-color: #f1f1f1;
|
62 |
cursor: pointer;
|
63 |
}
|
|
|
64 |
.table-task-list tbody tr:nth-child(odd), .table-task-detail tbody tr:nth-child(odd) {
|
65 |
background-color: #f9fafb;
|
66 |
}
|
|
|
67 |
.table-task-list tbody tr:nth-child(even), .table-task-detail tbody tr:nth-child(even) {
|
68 |
background-color: white;
|
69 |
}
|
|
|
70 |
.tabs {
|
71 |
display: flex;
|
72 |
margin-bottom: 0;
|
73 |
border-bottom: 1px solid #e5e7eb;
|
74 |
}
|
|
|
75 |
.tab-link {
|
76 |
font-size: 20px;
|
77 |
padding: 10px 20px;
|
@@ -85,27 +96,33 @@
|
|
85 |
position: relative;
|
86 |
transition: color 0.3s, background-color 0.3s;
|
87 |
}
|
|
|
88 |
.tab-link.active {
|
89 |
color: black;
|
90 |
z-index: 1;
|
91 |
margin-bottom: -1px;
|
92 |
}
|
|
|
93 |
.tab-content {
|
94 |
border: 1px solid #e5e7eb;
|
95 |
border-top: none;
|
96 |
padding: 10px;
|
97 |
position: relative;
|
98 |
}
|
|
|
99 |
.tab-link:hover {
|
100 |
color: black;
|
101 |
}
|
|
|
102 |
.notice-task-name{
|
103 |
margin: 0px 0px 15px 0px;
|
104 |
}
|
|
|
105 |
.notice-task-period{
|
106 |
font-weight: 500;
|
107 |
font-size:20px;
|
108 |
}
|
|
|
109 |
.custom-hr {
|
110 |
border: none;
|
111 |
height: 1px;
|
@@ -242,58 +259,91 @@
|
|
242 |
</div>
|
243 |
</body>
|
244 |
<script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
245 |
now_task = "progress"
|
|
|
246 |
$(document).ready(function() {
|
247 |
getRow(now_task);
|
|
|
248 |
$('.tab-link').click(function () {
|
249 |
var selectedTab = $(this).attr('id').split('-')[1];
|
250 |
now_task = selectedTab;
|
251 |
console.log(now_task)
|
252 |
$('.tab-link').removeClass('active');
|
253 |
$(this).addClass('active');
|
|
|
254 |
$('.tab').hide();
|
255 |
getRow(now_task);
|
256 |
});
|
|
|
257 |
$('.table-task-list tbody').on('click', 'tr', function() {
|
258 |
$('.table-task-list tr').removeClass('selected');
|
259 |
$(this).addClass('selected');
|
260 |
});
|
261 |
});
|
|
|
262 |
function getRow(checked_task){
|
263 |
postdata = {"checked_progress":checked_task}
|
|
|
|
|
|
|
|
|
264 |
$.ajax({
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
contentType: "application/json",
|
270 |
success: function(response) {
|
271 |
console.log(response)
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
|
|
297 |
},
|
298 |
error: function(request, status, error) {
|
299 |
alert('ajax ํต์ ์คํจ');
|
@@ -301,77 +351,83 @@
|
|
301 |
}
|
302 |
})
|
303 |
}
|
304 |
-
function TaskRowClicked(
|
305 |
-
|
306 |
-
'checked_progress':now_task,
|
307 |
-
no: item[0],
|
308 |
-
taskName: item[1],
|
309 |
-
taskPeriod: item[2],
|
310 |
-
status: item[3]
|
311 |
-
};
|
312 |
// ์ AJAX ์์ฒญ์ ๋ณด๋
๋๋ค.
|
313 |
$.ajax({
|
|
|
314 |
type: 'GET',
|
315 |
-
url: '
|
316 |
-
data: JSON.stringify(postdata),
|
317 |
-
dataType: 'JSON',
|
318 |
-
contentType: "application/json",
|
319 |
success: function(response) {
|
320 |
console.log("Response received:", response);
|
321 |
-
if (response.status === "success") {
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
375 |
},
|
376 |
error: function(xhr, status, error) {
|
377 |
alert('Error: ' + error.message);
|
@@ -380,4 +436,3 @@
|
|
380 |
}
|
381 |
</script>
|
382 |
</html>
|
383 |
-
|
|
|
28 |
border-radius: 8px;
|
29 |
/*box-shadow: 0 2px 4px rgba(0,0,0,0.1);*/
|
30 |
}
|
31 |
+
|
32 |
.table-task-list tbody tr.selected {
|
33 |
background-color: #e9ecef !important; /* ์งํ ํ์์กฐ๋ก ๋ณ๊ฒฝ */
|
34 |
}
|
35 |
+
|
36 |
.table-task-list, .table-task-detail {
|
37 |
width: 100%;
|
38 |
border-collapse: collapse;
|
|
|
40 |
border: 1px solid #e5e7eb;
|
41 |
margin-top: 20px; /* ๋ ํ
์ด๋ธ ์ฌ์ด์ ๊ณต๋ฐฑ ์ถ๊ฐ */
|
42 |
}
|
43 |
+
|
44 |
.table-task-list thead, .table-task-detail thead {
|
45 |
background-color: white;
|
46 |
color: black;
|
47 |
font-weight: bold;
|
48 |
text-align: left;
|
49 |
}
|
50 |
+
|
51 |
.table-task-list td, .table-task-detail td {
|
52 |
border-top: none;
|
53 |
border-bottom: none;
|
|
|
55 |
padding: 8px;
|
56 |
text-align: left;
|
57 |
}
|
58 |
+
|
59 |
.table-task-detail thead tr th{
|
60 |
padding:5px 10px;
|
61 |
}
|
62 |
+
|
63 |
.table-task-list td:last-child, .table-task-detail td:last-child {
|
64 |
border-right: 1px solid #e5e7eb;
|
65 |
}
|
66 |
+
|
67 |
.table-task-list tbody tr:hover, .table-task-detail tbody tr:hover {
|
68 |
background-color: #f1f1f1;
|
69 |
cursor: pointer;
|
70 |
}
|
71 |
+
|
72 |
.table-task-list tbody tr:nth-child(odd), .table-task-detail tbody tr:nth-child(odd) {
|
73 |
background-color: #f9fafb;
|
74 |
}
|
75 |
+
|
76 |
.table-task-list tbody tr:nth-child(even), .table-task-detail tbody tr:nth-child(even) {
|
77 |
background-color: white;
|
78 |
}
|
79 |
+
|
80 |
.tabs {
|
81 |
display: flex;
|
82 |
margin-bottom: 0;
|
83 |
border-bottom: 1px solid #e5e7eb;
|
84 |
}
|
85 |
+
|
86 |
.tab-link {
|
87 |
font-size: 20px;
|
88 |
padding: 10px 20px;
|
|
|
96 |
position: relative;
|
97 |
transition: color 0.3s, background-color 0.3s;
|
98 |
}
|
99 |
+
|
100 |
.tab-link.active {
|
101 |
color: black;
|
102 |
z-index: 1;
|
103 |
margin-bottom: -1px;
|
104 |
}
|
105 |
+
|
106 |
.tab-content {
|
107 |
border: 1px solid #e5e7eb;
|
108 |
border-top: none;
|
109 |
padding: 10px;
|
110 |
position: relative;
|
111 |
}
|
112 |
+
|
113 |
.tab-link:hover {
|
114 |
color: black;
|
115 |
}
|
116 |
+
|
117 |
.notice-task-name{
|
118 |
margin: 0px 0px 15px 0px;
|
119 |
}
|
120 |
+
|
121 |
.notice-task-period{
|
122 |
font-weight: 500;
|
123 |
font-size:20px;
|
124 |
}
|
125 |
+
|
126 |
.custom-hr {
|
127 |
border: none;
|
128 |
height: 1px;
|
|
|
259 |
</div>
|
260 |
</body>
|
261 |
<script>
|
262 |
+
var taskOrdtmStatusCdMap = {
|
263 |
+
TEMP_STOR: "์์ ์ ์ฅ",
|
264 |
+
REG_COMP: "๋ฑ๋ก ์๋ฃ",
|
265 |
+
PUB_COMP: "๊ณต๊ณ ์๋ฃ",
|
266 |
+
OPER_ING: "๊ณผ์ ์ด์ ์ค",
|
267 |
+
OPER_END: "๊ณผ์ ์ข
๋ฃ",
|
268 |
+
OPER_WAIT: "์ด์์ ํ์ธ ๋๊ธฐ",
|
269 |
+
SUB_END: "์ ์ถ ๋๊ธฐ",
|
270 |
+
OKAY_ING: "์น์ธ ์์ฒญ ์ค",
|
271 |
+
OKAY_END: "์น์ธ ์๋ฃ",
|
272 |
+
OKAY_FAIL: "์ ์ถ ๋ฐ๋ ค",
|
273 |
+
RE_OKAY_ING: "์ฌ์น์ธ ์์ฒญ ์ค",
|
274 |
+
RE_OKAY_FAIL: "์ฌ์น์ธ ๋ฐ๋ ค",
|
275 |
+
DELETE: "์ญ์ "
|
276 |
+
};
|
277 |
+
|
278 |
+
var taskOrdtmTyCdMap = {
|
279 |
+
PRER: "์ฌ์ ๊ณต๊ฐ",
|
280 |
+
CPTHB: "๊ฒฝ์ง ๋ํ",
|
281 |
+
ORDTM: "์์ ๊ณผ์ ",
|
282 |
+
ACADEMCON: "ํ์ ๋ํ",
|
283 |
+
TRIRUN: "์๋ฒ ์ด์"
|
284 |
+
};
|
285 |
+
|
286 |
now_task = "progress"
|
287 |
+
|
288 |
$(document).ready(function() {
|
289 |
getRow(now_task);
|
290 |
+
|
291 |
$('.tab-link').click(function () {
|
292 |
var selectedTab = $(this).attr('id').split('-')[1];
|
293 |
now_task = selectedTab;
|
294 |
console.log(now_task)
|
295 |
$('.tab-link').removeClass('active');
|
296 |
$(this).addClass('active');
|
297 |
+
|
298 |
$('.tab').hide();
|
299 |
getRow(now_task);
|
300 |
});
|
301 |
+
|
302 |
$('.table-task-list tbody').on('click', 'tr', function() {
|
303 |
$('.table-task-list tr').removeClass('selected');
|
304 |
$(this).addClass('selected');
|
305 |
});
|
306 |
});
|
307 |
+
|
308 |
function getRow(checked_task){
|
309 |
postdata = {"checked_progress":checked_task}
|
310 |
+
var clCd = (now_task === "progress") ? "ING_TASK" : "END_TASK";
|
311 |
+
|
312 |
+
// var url = "http://signlab.iptime.org:19021/taskOrdtm/useTaskOrdtmListData.do?clCd=" + clCd + "&siteType=USERLIST&partInYN=N"
|
313 |
+
var url = "https://kli.korean.go.kr/benchmark/taskOrdtm/useTaskOrdtmListData.do?clCd="+clCd+"&siteType=USERLIST&partInYN=N"
|
314 |
$.ajax({
|
315 |
+
type: 'GET',
|
316 |
+
url: url,
|
317 |
+
// dataType: 'JSON',
|
318 |
+
// contentType: "application/json",
|
|
|
319 |
success: function(response) {
|
320 |
console.log(response)
|
321 |
+
var tableBody = (checked_task === "progress") ? $('#table-progress tbody') : $('#table-past tbody');
|
322 |
+
tableBody.empty(); // ๊ธฐ์กด ๋ด์ฉ์ ๋น์๋๋ค.
|
323 |
+
var rowNum = 0
|
324 |
+
var data = JSON.parse(response);
|
325 |
+
data.forEach(function(item) {
|
326 |
+
console.log(item['taskOrdtmNm'])
|
327 |
+
rowNum = rowNum + 1
|
328 |
+
var row = $('<tr>').attr('data-taskid', item['taskOrdtmId']); // ๊ณผ์ ์๋ณ ID๋ฅผ data-taskid ์์ฑ์ผ๋ก ์ถ๊ฐ
|
329 |
+
// var row = $('<tr>');
|
330 |
+
row.append($('<td>').text(rowNum)); // No
|
331 |
+
row.append($('<td>').text(item['taskOrdtmNm'])); // ๊ณผ์ ๋ช
|
332 |
+
row.append($('<td>').text(taskOrdtmTyCdMap[item['taskOrdtmTyCd']])); // ๊ณผ์ ๋ถ๋ฅ(์ฌ์ ๊ณต๊ฐ ๋ฑ)
|
333 |
+
row.append($('<td>').text(item['taskOrdtmBgngDt'] + " - " + item['taskOrdtmEndDt'])); // ๊ณผ์ ๊ธฐ๊ฐ
|
334 |
+
row.append($('<td>').text(taskOrdtmStatusCdMap[item['taskOrdtmStatusCd']])); // ๊ณผ์ ์ํ (์ฌ์ ๊ณต๊ฐ์ค ๋ฑ)
|
335 |
+
tableBody.append(row);
|
336 |
+
|
337 |
+
// ํด๋ฆญ ์ด๋ฒคํธ ์ถ๊ฐ
|
338 |
+
row.on('click', function() {
|
339 |
+
$('tr').removeClass('selected');
|
340 |
+
$(this).addClass('selected');
|
341 |
+
var taskId = $(this).data('taskid'); // data-taskid ์์ฑ์์ ๊ณผ์ ์๋ณ ID ๊ฐ์ ธ์ค๊ธฐ
|
342 |
+
TaskRowClicked(taskId); // ๊ณผ์ ์๋ณ ID๋ฅผ ์ธ์๋ก ๋๊ฒจ์ฃผ๋ฉด์ ํจ์ ์คํ
|
343 |
+
});
|
344 |
+
});
|
345 |
+
// console.log("task-"+now_task)
|
346 |
+
$('#task-' + now_task).show(); // Show the selected tab
|
347 |
},
|
348 |
error: function(request, status, error) {
|
349 |
alert('ajax ํต์ ์คํจ');
|
|
|
351 |
}
|
352 |
})
|
353 |
}
|
354 |
+
function TaskRowClicked(taskId) {
|
355 |
+
console.log("Clicked task ID:", taskId);
|
|
|
|
|
|
|
|
|
|
|
|
|
356 |
// ์ AJAX ์์ฒญ์ ๋ณด๋
๋๋ค.
|
357 |
$.ajax({
|
358 |
+
// type: 'POST',
|
359 |
type: 'GET',
|
360 |
+
url: 'https://kli.korean.go.kr/benchmark/taskOrdtm/taskLeaderBoardData.do?taskOrdtmId='+taskId,
|
361 |
+
// data: JSON.stringify(postdata),
|
362 |
+
// dataType: 'JSON',
|
363 |
+
// contentType: "application/json",
|
364 |
success: function(response) {
|
365 |
console.log("Response received:", response);
|
366 |
+
// if (response.status === "success") {
|
367 |
+
// console.log(response.data)
|
368 |
+
// var hrArea = now_task === "progress" ? $('#hr-area-progress') : $('#hr-area-past');
|
369 |
+
// hrArea.empty();
|
370 |
+
// hrArea.html("<br><br><hr class=\"custom-hr\"><br>");
|
371 |
+
//
|
372 |
+
//
|
373 |
+
// //์ผ๋จ task์ ๋ํ ์ ๋ณด๋ฅผ ์ ์ด์ค์ผ ํจ.
|
374 |
+
// var noticeDetail = now_task === "progress" ? $('#task-progress-notice-div') : $('#task-past-notice-div');
|
375 |
+
// var taskNameDiv = noticeDetail.find('.notice-task-name');
|
376 |
+
// var taskPeriodDiv = noticeDetail.find('.notice-task-period');
|
377 |
+
// var taskInfoDiv = noticeDetail.find('.notice-task-info');
|
378 |
+
//
|
379 |
+
// taskNameDiv.empty();
|
380 |
+
// taskPeriodDiv.empty();
|
381 |
+
// taskInfoDiv.empty();
|
382 |
+
//
|
383 |
+
// var formattedTaskInfo = response.data.task_info.replace(/\n/g, '<br>');
|
384 |
+
//
|
385 |
+
// console.log(response.data.task_name)
|
386 |
+
// taskNameDiv.html(response.data.task_name);
|
387 |
+
// taskPeriodDiv.html(response.data.task_period);
|
388 |
+
// taskInfoDiv.html("<p style='font-weight:bold;'>[๊ณผ์ ๊ฐ์]</p>"+formattedTaskInfo);
|
389 |
+
//
|
390 |
+
// var tableTitle = now_task === "progress" ? $('#table-progress-detail-title') : $('#table-past-detail-title');
|
391 |
+
// tableTitle.empty();
|
392 |
+
// tableTitle.html("<p style='font-weight:bold;'><br>[์์ํ]</p>");
|
393 |
+
// // ํ์ฌ ํ์คํฌ์ ๋ฐ๋ผ ์ ์ ํ ํ
์ด๋ธ๊ณผ ํค๋ ์ ํ
|
394 |
+
// var tableDetail = now_task === "progress" ? $('#table-progress-detail') : $('#table-past-detail');
|
395 |
+
// var thead = tableDetail.find('thead');
|
396 |
+
// var tbody = tableDetail.find('tbody');
|
397 |
+
//
|
398 |
+
// tableDetail.show(); // ํ
์ด๋ธ์ ๋ณด์ด๊ฒ ํฉ๋๋ค.
|
399 |
+
// tableDetail.css("display", "table"); // ํ
์ด๋ธ์ ๋ณด์ด๊ฒ ํฉ๋๋ค.
|
400 |
+
//
|
401 |
+
// // ํค๋๋ฅผ ์
๋ฐ์ดํธํฉ๋๋ค.
|
402 |
+
// thead.empty(); // ๊ธฐ์กด์ ํค๋ ๋ด์ฉ์ ๋น์๋๋ค.
|
403 |
+
// var headerRow = $('<tr>');
|
404 |
+
// // ์ฒซ ๋ฒ์งธ ๋ฆฌ๋๋ณด๋ ์์ดํ
์ ์์ธ ํ๊ฐ ๊ฒฐ๊ณผ ํค ๊ฐ์ ธ์ค๊ธฐ
|
405 |
+
// var detailsKeys = Object.keys(response.data.leaderboard[0].evaluation_result_detail);
|
406 |
+
//
|
407 |
+
// // ํค๋ ์ ๋ชฉ ์ค์
|
408 |
+
// var headers = ["ranking", "team_name", "model_name", "evaluation_result"].concat(detailsKeys, "submit_date");
|
409 |
+
// headers.forEach(function(headerTitle) {
|
410 |
+
// headerRow.append($('<th>').text(headerTitle));
|
411 |
+
// });
|
412 |
+
// thead.append(headerRow);
|
413 |
+
//
|
414 |
+
//
|
415 |
+
// // ์ธ๋ถ ์ ๋ณด๋ฅผ ํ์ ์ถ๊ฐํฉ๋๋ค.
|
416 |
+
// tbody.empty(); // ๊ธฐ์กด ๋ด์ฉ์ ๋น์๋๋ค.
|
417 |
+
// response.data.leaderboard.forEach(function(entry) {
|
418 |
+
// var detailRow = $('<tr>');
|
419 |
+
// headers.forEach(function(header) {
|
420 |
+
// if (header in entry.evaluation_result_detail) {
|
421 |
+
// // ํ๊ฐ ์์ธ ๊ฒฐ๊ณผ ์ฒ๋ฆฌ
|
422 |
+
// detailRow.append($('<td>').text(entry.evaluation_result_detail[header]));
|
423 |
+
// } else {
|
424 |
+
// // ์ผ๋ฐ์ ์ธ ๋ฐ์ดํฐ ์ฒ๋ฆฌ
|
425 |
+
// detailRow.append($('<td>').text(entry[header]));
|
426 |
+
// }
|
427 |
+
// });
|
428 |
+
// tbody.append(detailRow);
|
429 |
+
// });
|
430 |
+
// }
|
431 |
},
|
432 |
error: function(xhr, status, error) {
|
433 |
alert('Error: ' + error.message);
|
|
|
436 |
}
|
437 |
</script>
|
438 |
</html>
|
|