Commit bcc25ca7 authored by yangshuxing's avatar yangshuxing

成绩附加项附加项

parent 1e1bdb89
......@@ -55,11 +55,16 @@ public class ScoreController {
@Resource
private ScoreService scoreService;
@Resource
CmptScoreRuleService cmptScoreRuleService;
@Resource
RemoteService remoteService;
@Resource
private FuncSettingService funcSettingService;
@RequestMapping("index/{cmptId}")
@PageView
public ModelAndView index(@PathVariable("cmptId") Integer cmptId, ModelAndView mv) {
......@@ -78,9 +83,10 @@ public class ScoreController {
}else{
mv.addObject("isClose",false);
}
FuncSetting settingByCmptId = funcSettingService.getSettingByCmptId(cmptId);
mv.addObject("rules",rules);
mv.addObject("fields",fields);
mv.addObject("setting",settingByCmptId);
mv.setViewName("cmpt/score");
mv.addObject("cmpt", cmpt);
return mv;
......
......@@ -174,11 +174,14 @@
<span class="road-notice"></span>
<span class="road-notice-txt">每一个附加项在每次成绩上传时均为必填,请谨慎启用</span>
</div>
<div class="add-btn">
<span>+</span>
<span>添加照片项</span>
</div>
<div class="extra-item">
<span>里程</span>
<div class="radio status ${setting.mileage == 1?'checked':'unchecked'}" >
<span class="txt">${setting.mileage == 1?'启动':'未启动'}</span>
<span class="dot"></span>
</div>
</div>
</div>
</div>
......
......@@ -277,4 +277,11 @@ label{
height:42px;
background:rgba(206,57,57,1);
border-radius:4px;
}
.extra-item{
height: 80px;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 20px;
}
\ No newline at end of file
$(document).ready(function () {
$('body').on('click', '.status', function () {
var checked = $(this).hasClass('checked');
var status = !checked ? 1 : 0;
if (checked) {
$(this).removeClass("checked");
$(this).addClass("unchecked");
$(this).find('.txt').text('未启动')
} else {
$(this).removeClass("unchecked");
$(this).addClass("checked");
$(this).find('.txt').text('启动')
}
$.ajax({
url: "/setting/upMileage/"+getCmptId()+"/"+status,
type: 'post',
success: function (data) {
console.log(data);
}
})
})
$('#search').click(function () {
var param = $('.search').val();
if(!param){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment