Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gk
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
micro_app
gk
Commits
d43a505e
Commit
d43a505e
authored
Apr 28, 2020
by
sunyuhua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
自动打卡的前端的代码
parent
99c4e14c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
89 additions
and
10 deletions
+89
-10
RoadsGpsCheckpointController.java
...e/jadp/plugins/cmpt/web/RoadsGpsCheckpointController.java
+1
-0
autoscore.jsp
src/main/webapp/WEB-INF/views/cmpt/autoscore.jsp
+3
-3
autoscore.js
src/main/webapp/static/js/autoscore.js
+85
-7
No files found.
src/main/java/com/dlbridge/jadp/plugins/cmpt/web/RoadsGpsCheckpointController.java
View file @
d43a505e
...
@@ -111,6 +111,7 @@ public class RoadsGpsCheckpointController {
...
@@ -111,6 +111,7 @@ public class RoadsGpsCheckpointController {
@ResponseBody
@ResponseBody
public
Result
getRoadsGpsCheckpoint
(
@PathVariable
(
"cmptId"
)
int
cmptId
,
@PathVariable
(
"roadId"
)
int
roadId
)
{
public
Result
getRoadsGpsCheckpoint
(
@PathVariable
(
"cmptId"
)
int
cmptId
,
@PathVariable
(
"roadId"
)
int
roadId
)
{
List
<
RoadsGpsCheckpointMap
>
roadsGpsCheckpointMapList
=
roadsGpsCheckpointService
.
getRoadsGpsCheckpoint
(
cmptId
,
roadId
);
List
<
RoadsGpsCheckpointMap
>
roadsGpsCheckpointMapList
=
roadsGpsCheckpointService
.
getRoadsGpsCheckpoint
(
cmptId
,
roadId
);
log
.
info
(
"roadsGpsCheckpointMapList"
+
roadsGpsCheckpointMapList
);
return
Result
.
success
().
setContent
(
roadsGpsCheckpointMapList
);
return
Result
.
success
().
setContent
(
roadsGpsCheckpointMapList
);
}
}
}
}
src/main/webapp/WEB-INF/views/cmpt/autoscore.jsp
View file @
d43a505e
...
@@ -119,11 +119,11 @@
...
@@ -119,11 +119,11 @@
<div
class=
"data"
>
<div
class=
"data"
>
<div
class=
"road"
>
<div
class=
"road"
>
<c:forEach
var=
"item"
items=
"
${
roads
}
"
>
<c:forEach
var=
"item"
items=
"
${
roads
}
"
>
<div
class=
"road-name "
>
<div
class=
"road-name"
>
<input
type=
"hidden"
id=
"roadId"
name=
"roadId"
value=
"${item.roadId}"
>
<span>
${item.name}
</span>
<span>
${item.name}
</span>
</div>
</div>
</c:forEach>
</c:forEach>
</div>
</div>
<table
cellpadding=
"2px"
cellspacing=
"2px"
>
<table
cellpadding=
"2px"
cellspacing=
"2px"
>
...
@@ -134,7 +134,7 @@
...
@@ -134,7 +134,7 @@
</colgroup>
</colgroup>
<thead>
<thead>
<tr>
<tr>
<th>
姓名
</th><th>
路线标准
</th><th>
经纬度
</th>
<th>
打卡点
</th><th>
路线标注
</th><th>
经纬度
</th>
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
...
...
src/main/webapp/static/js/autoscore.js
View file @
d43a505e
$
(
document
).
ready
(
function
()
{
$
(
document
).
ready
(
function
()
{
//切换项目,获取不同计时的打卡点
getTimeCp
(
21177
);
//获取gpx路线上的打卡点
getGpsCp
(
21177
);
//初始化已经配置好的GPS计时点配置列表
//getCpGpsList(21177);
});
getCp
(
21177
)
//点击事件,切换不同项目,获取不同项目的GPS计时点配置信息
$
(
".road-name"
).
click
(
function
(
event
){
var
roadId
=
$
(
this
).
children
(
"input"
).
val
();
//获取计时系统的计时点列表
getTimeCp
(
roadId
);
//切换不同个项目,获取不同项目下的打卡点配置
getCpGpsList
(
roadId
);
});
//路线标注下来点击事情,获取下拉值,并更新选中的值
$
(
".selectgpscheckpoint"
).
change
(
function
(){
});
});
function
getCp
(
roadId
)
{
/**
* 初始化已经配置好的GPS计时点配置列表
* @param roadId
*/
function
getCpGpsList
(
roadId
)
{
//清空所有值
$
(
'tbody'
).
empty
();
$
.
ajax
({
$
.
ajax
({
url
:
'/gk/roadGpsCheckpoint/get
GpsCheckPointByRoadId
/'
+
getCId
()
+
"/"
+
roadId
,
url
:
'/gk/roadGpsCheckpoint/get
RoadsGpsCheckpoint
/'
+
getCId
()
+
"/"
+
roadId
,
success
:
function
(
data
)
{
success
:
function
(
data
)
{
if
(
data
.
status
){
if
(
data
.
status
){
$
.
each
(
data
.
content
,
function
(
i
,
e
)
{
$
.
each
(
data
.
content
,
function
(
i
,
e
)
{
$
(
'tbody'
).
append
(
'
\
n'
+
' <tr>
\
n'
+
' <td>'
+
e
.
checkpointName
+
'</td>
\
n'
+
' <td>
\
n'
+
' <div class="select-group">
\
n'
+
' <select class="selectgpscheckpoint">
\
n'
+
' <option value="'
+
e
.
checkpointGpsName
+
'">'
+
e
.
checkpointGpsName
+
'</option>
\
n'
+
' </select>
\
n'
+
' <span class="down-arrow"></span>
\
n'
+
' </div>
\
n'
+
' </td>
\
n'
+
' <td>'
+
Number
(
e
.
checkpointLatitude
).
toFixed
(
6
)
+
','
+
Number
(
e
.
checkpointLongitude
).
toFixed
(
6
)
+
'</td>
\
n'
+
' </tr>'
);
})
}
}
})
}
/**
* 获取计时的打卡点
* @param roadId
*/
function
getTimeCp
(
roadId
)
{
$
.
ajax
({
url
:
'/gk/roadGpsCheckpoint/getTimeCheckpointByRoadId/'
+
getCId
()
+
"/"
+
roadId
,
success
:
function
(
data
)
{
if
(
data
.
status
){
$
.
each
(
data
.
content
,
function
(
i
,
e
)
{
$
(
'tbody'
).
append
(
'
\
n'
+
$
(
'tbody'
).
append
(
'
\
n'
+
' <tr>
\
n'
+
' <tr>
\
n'
+
' <td>'
+
e
.
checkpoint
Gps
Name
+
'</td>
\
n'
+
' <td>'
+
e
.
checkpointName
+
'</td>
\
n'
+
' <td>
\
n'
+
' <td>
\
n'
+
' <div class="select-group">
\
n'
+
' <div class="select-group">
\
n'
+
' <select name="" class="select">
\
n'
+
' <select class="selectgpscheckpoint">
\
n'
+
' <option value="">-- --</option>
\
n'
+
' <option value="">1</option>
\
n'
+
' </select>
\
n'
+
' </select>
\
n'
+
' <span class="down-arrow"></span>
\
n'
+
' <span class="down-arrow"></span>
\
n'
+
' </div>
\
n'
+
' </div>
\
n'
+
...
@@ -31,4 +82,31 @@ function getCp(roadId) {
...
@@ -31,4 +82,31 @@ function getCp(roadId) {
}
}
}
}
})
})
}
/**
* 获取路线上的打卡点
* @param roadId
*/
function
getGpsCp
(
roadId
)
{
$
.
ajax
({
url
:
'/gk/roadGpsCheckpoint/getGpsCheckPointByRoadId/'
+
getCId
()
+
"/"
+
roadId
,
success
:
function
(
data
)
{
if
(
data
.
status
){
var
optionstring
=
""
;
//将之前的下拉框的值清空
$
(
".selectgpscheckpoint"
).
empty
();
$
.
each
(
data
.
content
,
function
(
i
,
e
)
{
//获取项目路线上的打卡点并初始化到下拉框
optionstring
+=
'<option value="'
+
e
.
checkpointGpsName
+
'">'
+
e
.
checkpointGpsName
+
'</option>'
;
});
console
.
log
(
optionstring
);
$
.
each
(
$
(
".selectgpscheckpoint"
),
function
(
i
,
e
)
{
$
(
e
).
append
(
optionstring
);
})
}
}
})
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment