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
afabb5ab
Commit
afabb5ab
authored
Jul 03, 2020
by
yangshuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整成绩规则,默认排序
parent
77be9d67
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
57 additions
and
36 deletions
+57
-36
ScoreSettingController.java
...lbridge/jadp/plugins/cmpt/web/ScoreSettingController.java
+14
-11
road.jsp
src/main/webapp/WEB-INF/views/cmpt/road.jsp
+1
-1
scoreSetting.jsp
src/main/webapp/WEB-INF/views/cmpt/scoreSetting.jsp
+6
-1
road.css
src/main/webapp/static/cmpt/road.css
+4
-4
road-new.js
src/main/webapp/static/js/road-new.js
+31
-18
score_review.js
src/main/webapp/static/js/score_review.js
+1
-1
No files found.
src/main/java/com/dlbridge/jadp/plugins/cmpt/web/ScoreSettingController.java
View file @
afabb5ab
...
...
@@ -3,35 +3,27 @@ package com.dlbridge.jadp.plugins.cmpt.web;
import
com.dlbridge.feign.ScoreRuleService
;
import
com.dlbridge.feign.bean.CmptScoreRule
;
import
com.dlbridge.jadp.common.interceptor.PageView
;
import
com.dlbridge.jadp.job.CountJob
;
import
com.dlbridge.jadp.plugins.cmpt.bean.Album
;
import
com.dlbridge.jadp.plugins.cmpt.bean.Banner
;
import
com.dlbridge.jadp.common.utils.DateUtils
;
import
com.dlbridge.jadp.plugins.cmpt.bean.Road
;
import
com.dlbridge.jadp.plugins.cmpt.dao.model.Cmpt
;
import
com.dlbridge.jadp.plugins.cmpt.service.AlbumService
;
import
com.dlbridge.jadp.plugins.cmpt.service.BannerService
;
import
com.dlbridge.jadp.plugins.cmpt.service.CmptService
;
import
com.dlbridge.jadp.plugins.cmpt.service.RemoteService
;
import
com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand
;
import
com.netflix.hystrix.contrib.javanica.annotation.HystrixProperty
;
import
com.neusoft.www.utils.web.Result
;
import
lombok.extern.log4j.Log4j2
;
import
org.apache.commons.lang3.math.NumberUtils
;
import
org.springframework.data.redis.core.ValueOperations
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.servlet.ModelAndView
;
import
springfox.documentation.annotations.ApiIgnore
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.text.ParseException
;
import
java.time.LocalDateTime
;
import
java.time.format.DateTimeFormatter
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
@Controller
...
...
@@ -54,6 +46,17 @@ public class ScoreSettingController {
public
ModelAndView
getAlbumCounts
(
@PathVariable
(
"cmptId"
)
Integer
cmptId
,
ModelAndView
mv
)
{
Cmpt
cmpt
=
cmptService
.
queryCmptBycmptId
(
cmptId
);
int
currentRuleType
=
scoreRuleService
.
getCurrentRuleType
(
cmptId
);
try
{
Date
sdate
=
DateUtils
.
parseDate
(
cmpt
.
getStartTime
(),
"yyyy-MM-dd HH:mm:ss"
);
if
(
new
Date
().
after
(
sdate
)){
mv
.
addObject
(
"isStart"
,
true
);
}
else
{
mv
.
addObject
(
"isStart"
,
false
);
}
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
mv
.
addObject
(
"cmpt"
,
cmpt
);
mv
.
addObject
(
"currentRuleType"
,
currentRuleType
);
mv
.
setViewName
(
"cmpt/scoreSetting"
);
...
...
src/main/webapp/WEB-INF/views/cmpt/road.jsp
View file @
afabb5ab
...
...
@@ -118,7 +118,7 @@
<div
class=
"markers-edit"
>
<div
style=
"display: flex"
>
<span
class=
"edit-tip-distance"
>
里程
</span>
<span
class=
"edit-tip-distance"
>
里程
<
br/>
居起点
<
/span>
<span
class=
"edit-tip-cp"
>
用作
<br/>
计时点
</span>
</div>
</div>
...
...
src/main/webapp/WEB-INF/views/cmpt/scoreSetting.jsp
View file @
afabb5ab
...
...
@@ -133,12 +133,17 @@
<script
src=
"${ctxStatic}/newdermon/vendor/popper.js/umd/popper.min.js"
></script>
<script
src=
"${ctxStatic}/js/qikoo.js"
></script>
<input
type=
"hidden"
id=
"isStart"
value=
"${isStart}"
>
</body>
<script>
$
(
document
).
ready
(
function
()
{
// 修改成绩规则
$
(
'input[type=radio]'
).
click
(
function
()
{
if
(
$
(
'#isStart'
).
val
()
==
'true'
){
layer
.
msg
(
'比赛开始不能修改规则!'
,{
icon
:
5
,
duration
:
2000
});
$
(
'input[type=radio][value="${currentRuleType}"]'
)[
0
].
checked
=
true
return
}
var
index
=
layer
.
load
();
$
.
ajax
({
url
:
'/gk/rule/saveRule/'
+
getCId
()
+
"/"
+
$
(
this
).
val
(),
...
...
src/main/webapp/static/cmpt/road.css
View file @
afabb5ab
...
...
@@ -101,10 +101,10 @@
display
:
inline-block
;
text-align
:
right
;
flex
:
4
;
line-height
:
35
px
;
line-height
:
18
px
;
}
.marker
input
[
type
=
text
]
:first-child
{
width
:
1
60
px
;
width
:
1
35
px
;
height
:
50px
;
background
:
rgba
(
247
,
247
,
247
,
1
);
border-radius
:
4px
;
...
...
@@ -112,12 +112,12 @@
padding
:
0px
10px
0px
;
}
.marker
input
:nth-child
(
2n
)
{
width
:
8
0px
;
width
:
10
0px
;
height
:
50px
;
background
:
rgba
(
247
,
247
,
247
,
1
);
border-radius
:
4px
;
border
:
1px
solid
rgba
(
238
,
238
,
238
,
1
);
padding
:
0px
10px
0px
;
padding
:
0px
0px
0px
1
0px
;
}
.marker
input
[
type
=
checkbox
]
:checked::before
{
background-color
:
#ce3939
;
...
...
src/main/webapp/static/js/road-new.js
View file @
afabb5ab
...
...
@@ -34,28 +34,39 @@ $(document).ready(function () {
$
(
'body'
).
on
(
'click'
,
'.save'
,
function
()
{
var
obj
=
$
(
this
);
var
param
=
[];
var
flag
=
true
;
$
.
each
(
$
(
'.markers-edit .marker'
),
function
(
i
,
e
)
{
var
obj
=
{};
obj
.
checkpointId
=
$
(
e
).
attr
(
'data-checkpointid'
);
obj
.
distance
=
$
(
e
).
find
(
'input[type=number]'
).
val
();
obj
.
isTime
=
$
(
e
).
find
(
'input[type=checkbox]'
).
get
(
0
).
checked
;
obj
.
name
=
$
(
e
).
find
(
'input[type=text]'
).
val
();
param
.
push
(
obj
)
})
console
.
log
(
JSON
.
stringify
(
param
));
$
.
ajax
({
url
:
'/gk/road/saveCheckPoint'
,
type
:
'post'
,
contentType
:
'application/json'
,
data
:
JSON
.
stringify
(
param
),
success
:
function
(
data
)
{
if
(
data
.
code
==
200
){
layer
.
msg
(
'保存成功'
,
{
icon
:
1
,
time
:
1500
});
}
},
error
:
function
()
{
layer
.
msg
(
'操作失败'
,
{
icon
:
5
,
time
:
1500
});
if
(
obj
.
isTime
&&
!
obj
.
distance
&&
obj
.
distance
<=
0
){
flag
=
false
;
layer
.
msg
(
'请用计时点的里程,为必填项,请填入合法数据'
);
console
.
log
(
obj
)
return
true
;
}
obj
.
distance
=
obj
.
distance
*
1000
;
param
.
push
(
obj
);
})
if
(
flag
){
$
.
ajax
({
url
:
'/gk/road/saveCheckPoint'
,
type
:
'post'
,
contentType
:
'application/json'
,
data
:
JSON
.
stringify
(
param
),
success
:
function
(
data
)
{
if
(
data
.
code
==
200
){
layer
.
msg
(
'保存成功'
,
{
icon
:
1
,
time
:
1500
});
}
},
error
:
function
()
{
layer
.
msg
(
'操作失败'
,
{
icon
:
5
,
time
:
1500
});
}
})
}
});
$
(
'.back-div'
).
click
(
function
()
{
...
...
@@ -297,10 +308,13 @@ function getPlaceMakers(roadId) {
$
.
ajax
({
url
:
'/gk/road//getCheckPoints/'
+
roadId
,
success
:
function
(
data
)
{
console
.
log
(
JSON
.
stringify
(
data
))
if
(
data
.
code
==
200
){
$
(
'.markers .marker'
).
empty
();
$
(
'.markers-edit .marker'
).
empty
()
$
(
'.markers-edit .marker'
).
empty
();
if
(
data
.
content
.
length
==
0
){
layer
.
msg
(
"没有标记点,请导入有标记点的路线,以免影响您的后续使用!"
);
return
}
$
.
each
(
data
.
content
,
function
(
i
,
e
)
{
var
myIcon1
=
L
.
divIcon
({
html
:
'<div class="cp-div"><span>'
+
e
.
name
+
'</span></div>'
,
...
...
@@ -315,10 +329,9 @@ function getPlaceMakers(roadId) {
$
(
'.markers-edit'
).
append
(
'<div data-checkpointId="'
+
e
.
checkpointId
+
'" class="marker">'
+
'<input data-before="'
+
e
.
name
+
'" type="text" value="'
+
e
.
name
+
'">'
+
'<input type="number" value="'
+
(
e
.
distance
?
e
.
distance
:
""
)
+
'
">'
+
'<input type="number" value="'
+
(
e
.
distance
?
Number
(
e
.
distance
/
1000
).
toFixed
(
3
):
""
)
+
'" placeholder="单位:KM
">'
+
'<input type="checkbox" '
+
(
e
.
isTime
?
"checked=checked"
:
""
)
+
'></div>'
);
});
}
}
})
...
...
src/main/webapp/static/js/score_review.js
View file @
afabb5ab
...
...
@@ -309,7 +309,7 @@ $(document).ready(function () {
});
})
$
(
'.export-btn'
).
click
(
function
()
{
window
.
open
(
window
.
location
.
origin
+
"
/gk/score/export/"
+
getCId
())
window
.
open
(
"http://testzs.geexek.com.cn
/gk/score/export/"
+
getCId
())
})
reviewPage
.
getRoads
();
});
\ 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