Toggle navigation
Toggle navigation
This project
Loading...
Sign in
김유현
/
How much are you earning now
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
김유현
2019-12-11 16:43:56 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
287d44d67575905ee23c19bbbbb4c5a81d7a35f2
287d44d6
1 parent
068aed5d
Modify 월간 graph -> 일간 graph
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
10 deletions
public/graph.html
public/graph.html
View file @
287d44d
...
...
@@ -9,7 +9,11 @@
<br>
<div
id =
"salary"
class=
"in"
></div>
<br>
<div
id =
"payPerDay"
class=
"in"
></div>
<br>
<div
id =
"moneyPerSec"
class=
"in"
></div>
</div>
<div
class=
"progress-bar"
></div>
<h1
class=
"count"
></h1>
...
...
@@ -31,14 +35,21 @@
var
workTime
=
Number
(
getParam
(
"workTime"
));
var
offWork
=
Number
(
getParam
(
"offWork"
));
var
workingDayNum
=
getParam
(
"workDay"
).
length
/
9
;
var
payPerDay
=
salary
/
(
4
*
workingDayNum
);
document
.
getElementById
(
"salary"
).
innerHTML
=
"salary : "
+
salary
;
document
.
getElementById
(
"payPerDay"
).
innerHTML
=
"charge per day : "
+
payPerDay
;
//document.getElementById("workDay").innerHTML = "working day : " + getParam("workDay");
//document.getElementById("workTime").innerHTML = "working time : " + workTime;
//document.getElementById("offWork").innerHTML = "time of work : " + offWork;
//document.getElementById("workedHour").innerHTML = "worked hour : " + String(offWork - workTime);
var
nowTime
=
new
Date
();
var
workStart
=
new
Date
(
nowTime
.
getFullYear
(),
nowTime
.
getMonth
(),
nowTime
.
getDate
(),
workTime
,
00
,
00
);
var
moneyPerSec
=
0
;
var
diff
=
(
nowTime
.
getTime
()
-
workStart
.
getTime
())
/
1000
;
//document.getElementById("diff").innerHTML = diff;
var
moneyPerSec
=
diff
*
salary
/
(
60
*
60
*
(
offWork
-
workTime
)
*
workingDayNum
*
4
);
setInterval
(
"dpTime()"
,
1
);
function
dpTime
(){
var
now
=
new
Date
();
...
...
@@ -46,12 +57,12 @@
minutes
=
now
.
getMinutes
();
seconds
=
now
.
getSeconds
();
if
(
hours
>
12
)
{
hours
-=
12
;
ampm
=
"오후 "
;
}
else
{
ampm
=
"오전 "
;
}
//
if (hours > 12)
//
{ hours -= 12;
//
ampm = "오후 ";
//
}else
//
{ ampm = "오전 ";
//
}
if
(
hours
<
10
){
hours
=
"0"
+
hours
;
}
if
(
minutes
<
10
){
...
...
@@ -59,7 +70,7 @@
}
if
(
seconds
<
10
){
seconds
=
"0"
+
seconds
;
}
document
.
getElementById
(
"dpTime"
).
innerHTML
=
"현재 시간 : "
+
ampm
+
hours
+
":"
+
minutes
+
":"
+
seconds
;
document
.
getElementById
(
"dpTime"
).
innerHTML
=
"현재 시간 : "
+
hours
+
":"
+
minutes
+
":"
+
seconds
;
if
(
hours
<
workTime
){
document
.
getElementById
(
"moneyPerSec"
).
innerHTML
=
"출근할 때까지 "
+
String
(
workTime
-
hours
)
+
"시간 남았당"
;
}
...
...
@@ -91,9 +102,10 @@
}
else
{
bar
.
style
.
width
=
i
+
'%'
;
i
=
(
moneyPerSec
/
payPerDay
)
*
100
;
bar
.
style
.
width
=
i
.
toFixed
(
4
)
+
'%'
;
counter
.
innerHTML
=
i
.
toFixed
(
4
)
+
'%'
;
i
=
moneyPerSec
/
salary
*
100
}
//if(r < throttle) { // Simulate d/l speed and uneven bitrate
// i = i + r;
...
...
Please
register
or
login
to post a comment