Commit 450f5ba965c821ea88b6a260718bbcd2158902f4

Authored by 王通
2 parents 900d5939 cb89a8d2

Merge branch 'jiading' of http://192.168.168.201:8888/panzhaov5/bsth_control.git into jiading

Showing 32 changed files with 487 additions and 48 deletions
src/main/java/com/bsth/controller/sys/UserController.java
... ... @@ -12,6 +12,9 @@ import com.bsth.service.sys.CompanyAuthorityService;
12 12 import com.bsth.service.sys.SysUserService;
13 13 import com.google.common.collect.ArrayListMultimap;
14 14 import org.apache.commons.lang3.StringUtils;
  15 +import org.joda.time.DateTime;
  16 +import org.joda.time.Period;
  17 +import org.joda.time.PeriodType;
15 18 import org.slf4j.Logger;
16 19 import org.slf4j.LoggerFactory;
17 20 import org.springframework.beans.factory.annotation.Autowired;
... ... @@ -101,6 +104,19 @@ public class UserController extends BaseController<SysUser, Integer> {
101 104 return rs;
102 105 }
103 106  
  107 + // 检验密码有效期
  108 + Date lastPwdDate = user.getLastPwdDate();
  109 + if (lastPwdDate != null) {
  110 + Integer validPeriod = user.getPwdValidPeriod();
  111 + if (validPeriod == null) {
  112 + validPeriod = 180; // 默认180天
  113 + }
  114 + Period p = new Period(new DateTime(lastPwdDate), new DateTime(new Date()), PeriodType.days());
  115 + if (p.getDays() > validPeriod) {
  116 + return put(rs, "msg", validPeriod + "天没有修改密码,不能登录,请联系管理员");
  117 + }
  118 + }
  119 +
104 120 // 登录
105 121 SecurityUtils.login(user, request);
106 122 //session里写入用户名,webSocket连接时标识身份用
... ... @@ -270,6 +286,16 @@ public class UserController extends BaseController<SysUser, Integer> {
270 286 return msg;
271 287 }
272 288  
  289 + @RequestMapping(value = "/resetPWD", method = RequestMethod.POST)
  290 + public String resetPWD(@RequestParam Integer user_id, @RequestParam Integer reset_day, @RequestParam String reset_passord) {
  291 + try {
  292 + sysUserService.resetPWD(user_id, reset_passord, reset_day);
  293 + return "修改成功!";
  294 + } catch (Exception exp) {
  295 + return exp.getMessage();
  296 + }
  297 + }
  298 +
273 299 @RequestMapping(value = "/register", method = RequestMethod.POST)
274 300 public Map<String, Object> register(SysUser u) {
275 301 return sysUserService.register(u);
... ...
src/main/java/com/bsth/entity/Cars.java
... ... @@ -24,7 +24,7 @@ import java.util.Date;
24 24  
25 25 @Entity
26 26 @Table(name = "bsth_c_cars")
27   -@JsonIgnoreProperties(value={"hibernateLazyInitializer","handler","fieldHandler"})
  27 +@JsonIgnoreProperties(value={"hibernateLazyInitializer","handler","fieldHandler"}, ignoreUnknown = true)
28 28 public class Cars extends BEntity implements Serializable {
29 29  
30 30 /** 主键Id */
... ...
src/main/java/com/bsth/entity/schedule/GuideboardInfo.java
... ... @@ -37,6 +37,9 @@ public class GuideboardInfo extends BEntity {
37 37 @Column(nullable = false)
38 38 private String lpType;
39 39  
  40 + /** 加油公里字段 */
  41 + private Double jygl;
  42 +
40 43 /** 是否删除(标记) */
41 44 @Column(nullable = false)
42 45 private Boolean isCancel = false;
... ... @@ -116,4 +119,12 @@ public class GuideboardInfo extends BEntity {
116 119 public void setIsCancel(Boolean isCancel) {
117 120 this.isCancel = isCancel;
118 121 }
  122 +
  123 + public Double getJygl() {
  124 + return jygl;
  125 + }
  126 +
  127 + public void setJygl(Double jygl) {
  128 + this.jygl = jygl;
  129 + }
119 130 }
... ...
src/main/java/com/bsth/entity/sys/SysUser.java
... ... @@ -33,6 +33,11 @@ public class SysUser {
33 33 @Column(name = "last_loginDate", columnDefinition = "timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP")
34 34 private Date lastLoginDate;
35 35  
  36 + /** 最近密码更新时间 */
  37 + private Date lastPwdDate;
  38 + /** 密码有效期 */
  39 + private Integer pwdValidPeriod;
  40 +
36 41 private String agencies;
37 42  
38 43 private boolean enabled;
... ... @@ -112,4 +117,20 @@ public class SysUser {
112 117 public void setRoles(Set<Role> roles) {
113 118 this.roles = roles;
114 119 }
  120 +
  121 + public Date getLastPwdDate() {
  122 + return lastPwdDate;
  123 + }
  124 +
  125 + public void setLastPwdDate(Date lastPwdDate) {
  126 + this.lastPwdDate = lastPwdDate;
  127 + }
  128 +
  129 + public Integer getPwdValidPeriod() {
  130 + return pwdValidPeriod;
  131 + }
  132 +
  133 + public void setPwdValidPeriod(Integer pwdValidPeriod) {
  134 + this.pwdValidPeriod = pwdValidPeriod;
  135 + }
115 136 }
... ...
src/main/java/com/bsth/repository/sys/SysUserRepository.java
... ... @@ -22,7 +22,7 @@ public interface SysUserRepository extends BaseRepository&lt;SysUser, Integer&gt;{
22 22  
23 23 @Transactional
24 24 @Modifying
25   - @Query(value="update bsth_c_sys_user set password=?2 where id=?1",nativeQuery=true)
  25 + @Query(value="update bsth_c_sys_user set password=?2, last_pwd_date = now() where id=?1",nativeQuery=true)
26 26 int changePWD(int id,String newPWD);
27 27  
28 28 @EntityGraph(value = "sysUser_role", type = EntityGraph.EntityGraphType.FETCH)
... ...
src/main/java/com/bsth/service/schedule/impl/CarsServiceImpl.java
... ... @@ -39,7 +39,7 @@ public class CarsServiceImpl extends BServiceImpl&lt;Cars, Integer&gt; implements Cars
39 39  
40 40 @Override
41 41 public Cars save(Cars cars) {
42   - if (cars.getId() != null && cars.getScrapState()) { // 更新车辆信息,报废车辆
  42 + if (cars.getId() != null && cars.getScrapState() != null && cars.getScrapState()) { // 更新车辆信息,报废车辆
43 43 // 1、作废的车辆,修改报废号
44 44 String eCode = cars.getEquipmentCode();
45 45 cars.setEquipmentCode("BF-" + eCode);
... ...
src/main/java/com/bsth/service/sys/SysUserService.java
... ... @@ -14,6 +14,8 @@ public interface SysUserService extends BaseService&lt;SysUser, Integer&gt;{
14 14  
15 15 int changePWD(int id,String newPWD);
16 16  
  17 + void resetPWD(int id, String newPWD, int validperiod);
  18 +
17 19 Map<String,Object> register(SysUser u);
18 20  
19 21 List<SysUser> findAll_distinct();
... ...
src/main/java/com/bsth/service/sys/impl/SysUserServiceImpl.java
... ... @@ -51,7 +51,14 @@ public class SysUserServiceImpl extends BaseServiceImpl&lt;SysUser, Integer&gt; implem
51 51 return sysUserRepository.changePWD(id,new BCryptPasswordEncoder(4).encode(newPWD));
52 52 }
53 53  
54   - @Override
  54 + @Override
  55 + public void resetPWD(int id, String newPWD, int validperiod) {
  56 + SysUser user = sysUserRepository.findOne(id);
  57 + user.setPwdValidPeriod(validperiod);
  58 + sysUserRepository.changePWD(id, new BCryptPasswordEncoder(4).encode(newPWD));
  59 + }
  60 +
  61 + @Override
55 62 public Map<String, Object> register(SysUser u) {
56 63 Map<String, Object> rs = new HashMap();
57 64 try{
... ...
src/main/resources/static/assets/plugins/passwordRulesHelper/passwordRulesHelper.css 0 → 100644
  1 +div.rules-list
  2 +{
  3 +margin-top:10px;
  4 +}
  5 +
  6 +div.rules-list .rules
  7 +{
  8 + list-style-type:none;
  9 + padding:0;
  10 +}
  11 +
  12 +div.rules-list li
  13 + {
  14 + position:relative;
  15 + }
  16 +
  17 + div.rules-list li.ko::before
  18 + {
  19 + content:'\f00d';
  20 + font: normal normal normal 14px/1 FontAwesome;
  21 + width: 32px;
  22 + font-size: 14px;
  23 + display: inline-block;
  24 + text-align: right;
  25 + margin-right: 10px;
  26 + color:#F00;
  27 + }
  28 + div.rules-list li.ok::before
  29 + {
  30 + content:'\f00c';
  31 + font: normal normal normal 14px/1 FontAwesome;
  32 + width: 32px;
  33 + font-size: 14px;
  34 + display: inline-block;
  35 + text-align: right;
  36 + margin-right: 10px;
  37 + color:#008000;
  38 + }
  39 +
  40 +
0 41 \ No newline at end of file
... ...
src/main/resources/static/assets/plugins/passwordRulesHelper/passwordRulesHelper.js 0 → 100644
  1 +(function ($) {
  2 +
  3 + $.fn.passwordRulesValidator = function (aOptions) {
  4 +
  5 +
  6 + // Define default's parameters
  7 + var aDefauts =
  8 + {
  9 + 'rules' : {
  10 + 'length' : {
  11 + 'regex': '.{8,}',
  12 + 'name': 'length',
  13 + 'message': '8 characters',
  14 + 'enable': true
  15 + },
  16 + 'lowercase' :{
  17 + 'regex': '[a-z]{1,}',
  18 + 'name': 'lowercase',
  19 + 'message': '1 lowercase',
  20 + 'enable': true
  21 + },
  22 + 'uppercase' : {
  23 + 'regex': '[A-Z]{1,}',
  24 + 'name': 'uppercase',
  25 + 'message': '1 uppercase',
  26 + 'enable': true
  27 + },
  28 + 'number' : {
  29 + 'regex': '[0-9]{1,}',
  30 + 'name': 'number',
  31 + 'message': '1 digit',
  32 + 'enable': true
  33 + },
  34 + 'specialChar' : {
  35 + 'regex': '[^a-zA-Z0-9]{1,}',
  36 + 'name': 'special-char',
  37 + 'message': '1 special character',
  38 + 'enable': true
  39 + }
  40 + },
  41 + 'msgRules': 'Your password must contain :',
  42 + 'container': undefined,
  43 + 'containerClass': null,
  44 + 'containerId': 'checkRulesList',
  45 + 'okClass': null,
  46 + 'koClass': null,
  47 + 'onLoad': undefined
  48 + };
  49 +
  50 + /**
  51 + * @param {object} oRegex
  52 + * @param {string} sVal
  53 + * @param {string} sName
  54 + * @param {string} sIdContainer
  55 + */
  56 + function validateRule(oRegex, sVal, sName, sIdContainer)
  57 + {
  58 + if (oRegex.test(sVal)) {
  59 + $('#' + sIdContainer + ' li.' + sName).removeClass('ko ' + aParameters.koClass).addClass('ok ' + aParameters.okClass);
  60 + } else {
  61 + $('#' + sIdContainer + ' li.' + sName).removeClass('ok ' +aParameters.okClass).addClass('ko ' +aParameters.koClass);
  62 + }
  63 + }
  64 +
  65 + /**
  66 + * @param {array} aParemeters
  67 + * @param {string} sVal
  68 + * @param {string} sIdContainer
  69 + */
  70 + function checkRules(aParemeters, sVal, sIdContainer)
  71 + {
  72 + $.each(aParameters.rules, function(iKey, aRule) {
  73 + if(aRule.enable) {
  74 + validateRule(new RegExp(aRule.regex, 'g'), sVal, aRule.name, sIdContainer);
  75 + }
  76 + });
  77 +
  78 + }
  79 +
  80 + var aParameters = $.extend(true, aDefauts, aOptions);
  81 +
  82 + return this.each(function () {
  83 +
  84 + // Execute onLoad fonction
  85 + if ($.isFunction(aParameters.onLoad)) {
  86 + aParameters.onLoad();
  87 + }
  88 +
  89 + // Build rules check list
  90 + oRulesBuilder = '<span class="rules">' + aParameters.msgRules + '</span>';
  91 + oRulesBuilder += '<ul class="rules">';
  92 +
  93 + // Build lists
  94 + $.each(aParameters.rules, function(iKey, aRule) {
  95 + if(aRule.enable) {
  96 + oRulesBuilder += '<li class="ko ' + aParameters.koClass + ' '+ aRule.name +'">' + aRule.message + '</li>';
  97 + }
  98 + });
  99 +
  100 + oRulesBuilder += '</ul>';
  101 +
  102 + // Create or populate container
  103 + if (typeof (aParameters.container) === 'undefined') {
  104 + $(this).after('<div class="rules-list ' + aParameters.containerClass + '" id="' + aParameters.containerId + '"></div>');
  105 + $(oRulesBuilder).appendTo('#' + aParameters.containerId);
  106 + } else {
  107 + aParameters.container.addClass('rules-list');
  108 + $(oRulesBuilder).appendTo(aParameters.container);
  109 + }
  110 +
  111 + var sIdContainer = typeof (aParameters.container) === 'undefined' ? aParameters.containerId : aParameters.container.attr('id');
  112 +
  113 + // Execute checkRules on load
  114 + checkRules(aParameters, $(this).val(), sIdContainer);
  115 +
  116 + // Execute checkRules fonction
  117 + $(this).keyup(function () {
  118 + checkRules(aParameters, $(this).val(), sIdContainer);
  119 + });
  120 +
  121 + $(this).on('paste', function () {
  122 + checkRules(aParameters, $(this).val(), sIdContainer);
  123 + });
  124 +
  125 + $(this).change(function () {
  126 + checkRules(aParameters, $(this).val(), sIdContainer);
  127 + });
  128 + });
  129 + };
  130 +})(jQuery);
  131 +
  132 +
... ...
src/main/resources/static/assets/plugins/passwordRulesHelper/passwordRulesHelper.min.css 0 → 100644
  1 +div.rules-list li.ko::before,div.rules-list li.ok::before{width:32px;display:inline-block;text-align:right;margin-right:10px}div.rules-list{margin-top:10px}div.rules-list .rules{list-style-type:none;padding:0}div.rules-list li{position:relative}div.rules-list li.ko::before{content:'\f00d';font:normal normal normal 14px/1 FontAwesome;font-size:14px;color:red}div.rules-list li.ok::before{content:'\f00c';font:normal normal normal 14px/1 FontAwesome;font-size:14px;color:green}
... ...
src/main/resources/static/assets/plugins/passwordRulesHelper/passwordRulesHelper.min.js 0 → 100644
  1 +!function(a){a.fn.passwordRulesValidator=function(b){function d(b,c,d,e){b.test(c)?a("#"+e+" li."+d).removeClass("ko "+f.koClass).addClass("ok "+f.okClass):a("#"+e+" li."+d).removeClass("ok "+f.okClass).addClass("ko "+f.koClass)}function e(b,c,e){a.each(f.rules,function(a,b){b.enable&&d(new RegExp(b.regex,"g"),c,b.name,e)})}var c={rules:{length:{regex:".{8,}",name:"length",message:"8 characters",enable:!0},lowercase:{regex:"[a-z]{1,}",name:"lowercase",message:"1 lowercase",enable:!0},uppercase:{regex:"[A-Z]{1,}",name:"uppercase",message:"1 uppercase",enable:!0},number:{regex:"[0-9]{1,}",name:"number",message:"1 digit",enable:!0},specialChar:{regex:"[^a-zA-Z0-9]{1,}",name:"special-char",message:"1 special character",enable:!0}},msgRules:"Your password must contain :",container:void 0,containerClass:null,containerId:"checkRulesList",okClass:null,koClass:null,onLoad:void 0},f=a.extend(!0,c,b);return this.each(function(){a.isFunction(f.onLoad)&&f.onLoad(),oRulesBuilder='<span class="rules">'+f.msgRules+"</span>",oRulesBuilder+='<ul class="rules">',a.each(f.rules,function(a,b){b.enable&&(oRulesBuilder+='<li class="ko '+f.koClass+" "+b.name+'">'+b.message+"</li>")}),oRulesBuilder+="</ul>","undefined"==typeof f.container?(a(this).after('<div class="rules-list '+f.containerClass+'" id="'+f.containerId+'"></div>'),a(oRulesBuilder).appendTo("#"+f.containerId)):(f.container.addClass("rules-list"),a(oRulesBuilder).appendTo(f.container));var b="undefined"==typeof f.container?f.containerId:f.container.attr("id");e(f,a(this).val(),b),a(this).keyup(function(){e(f,a(this).val(),b)}),a(this).on("paste",function(){e(f,a(this).val(),b)}),a(this).change(function(){e(f,a(this).val(),b)})})}}(jQuery);
0 2 \ No newline at end of file
... ...
src/main/resources/static/index.html
... ... @@ -71,6 +71,10 @@
71 71 <!-- sweetalert样式 -->
72 72 <link rel="stylesheet"
73 73 href="/assets/bower_components/sweetalert/dist/sweetalert.css" />
  74 + <!-- passwordRulesHelper样式 -->
  75 + <link rel="stylesheet"
  76 + href="/assets/plugins/passwordRulesHelper/passwordRulesHelper.min.css" />
  77 +
74 78 <!-- schedule计划调度AngularJS模块主css -->
75 79 <link rel="stylesheet" href="/pages/scheduleApp/module/common/main.css"
76 80 type="text/css" />
... ... @@ -414,6 +418,9 @@
414 418 <script src="/assets/js/dictionary.js"></script>
415 419 <!-- tipso JS -->
416 420 <script src="/metronic_v4.5.4/plugins/tipso/js/tipso.js"></script>
  421 +<!-- passwordRulesHelper插件 -->
  422 +<script src="/assets/plugins/passwordRulesHelper/passwordRulesHelper.min.js"></script>
  423 +
417 424 <script data-exclude=1>
418 425 //初始打开的片段地址
419 426 var initFragment = "^_^initFragment^_^";
... ...
src/main/resources/static/pages/permission/user/changePWD.html
... ... @@ -5,27 +5,27 @@
5 5 <div class="portlet-body">
6 6 <form class="form-horizontal" id="changePWDForm">
7 7 <div class="form-group" style="margin-top: 60px">
8   - <label class="control-label col-md-5">原始密码:
  8 + <label class="control-label col-md-4">原始密码:
9 9 </label>
10   - <div class="col-md-4">
  10 + <div class="col-md-6">
11 11 <div class="input-icon right">
12 12 <i class="fa"></i>
13 13 <input type="password" class="form-control" name="oldPWD" /> </div>
14 14 </div>
15 15 </div>
16 16 <div class="form-group">
17   - <label class="control-label col-md-5">输入新密码:
  17 + <label class="control-label col-md-4">输入新密码:
18 18 </label>
19   - <div class="col-md-4">
  19 + <div class="col-md-6">
20 20 <div class="input-icon right">
21 21 <i class="fa"></i>
22   - <input type="password" class="form-control" name="newPWD" /> </div>
  22 + <input type="password" class="form-control" name="newPWD" id="newPWD" /> </div>
23 23 </div>
24 24 </div>
25 25 <div class="form-group">
26   - <label class="control-label col-md-5">确认新密码:
  26 + <label class="control-label col-md-4">确认新密码:
27 27 </label>
28   - <div class="col-md-4">
  28 + <div class="col-md-6">
29 29 <div class="input-icon right">
30 30 <i class="fa"></i>
31 31 <input type="password" class="form-control" name="cnewPWD" /> </div>
... ... @@ -47,6 +47,44 @@
47 47  
48 48 <script>
49 49 $(function(){
  50 + // passwordRulesHelper 密码验证
  51 + $('#newPWD').passwordRulesValidator({
  52 + 'msgRules':'你填写的密码必须符合下面的规则:',
  53 + 'rules' : {
  54 + 'length' : {
  55 + 'regex': '.{8,}',
  56 + 'name': 'length',
  57 + 'message': '密码必须大于8个字符',
  58 + 'enable': true
  59 + },
  60 + 'lowercase' :{
  61 + 'regex': '[a-z]{1,}',
  62 + 'name': 'lowercase',
  63 + 'message': '至少需要一个小写字母',
  64 + 'enable': true
  65 + },
  66 + 'uppercase' : {
  67 + 'regex': '[A-Z]{1,}',
  68 + 'name': 'uppercase',
  69 + 'message': '至少需要一个大写字母',
  70 + 'enable': true
  71 + },
  72 + 'number' : {
  73 + 'regex': '[0-9]{1,}',
  74 + 'name': 'number',
  75 + 'message': '至少需要一个数字',
  76 + 'enable': true
  77 + },
  78 + 'specialChar' : {
  79 + 'regex': '[^a-zA-Z0-9]{1,}',
  80 + 'name': 'special-char',
  81 + 'message': '至少需要一个特殊字符',
  82 + 'enable': true
  83 + }
  84 + }
  85 + });
  86 +
  87 +
50 88 $("#confirm").on("click",function(){
51 89 var data = $('#changePWDForm').serializeJSON();
52 90 $.post('/user/changePWD',data,function(msg){
... ...
src/main/resources/static/pages/permission/user/list.html
... ... @@ -115,6 +115,7 @@
115 115  
116 116 <td>
117 117 <a class="btn btn-sm blue btn-outline" href="edit.html?no={{obj.id}}" data-pjax><i class="fa fa-edit"></i> 编辑</a>
  118 + <a class="btn btn-sm blue btn-outline resetpwd" style="display: {{obj.showpdc}}" onclick="resetPassword({{obj.id}}, {{obj.lastPwdDate}});"><i class="fa fa-edit"></i> 重置密码</a>
118 119 <!--<button type="button" class="btn btn-sm line_allot_btn" data-id="{{obj.id}}">线调线路分配</button>-->
119 120 </td>
120 121 </tr>
... ... @@ -171,23 +172,40 @@ $(function(){
171 172 params['order'] = 'lastLoginDate';
172 173 params['page'] = page;
173 174 var i = layer.load(2);
174   - $get('/user' ,params, function(data){
175   - $.each(data.content, function(i, obj) {
176   - obj.lastLoginDate = moment(obj.lastLoginDate).format("YYYY-MM-DD HH:mm:ss");
  175 + $get('/user' ,params, function(data) {
  176 + // 获取当前登录用户
  177 + $get('/user/currentUser',{}, function(user) {
  178 + var b_isAdmin = false; // 是否是管理员用户
  179 + $.each(user.authorities, function(i, obj) {
  180 + if (obj.authority === 'ROLE_ADMIN') {
  181 + b_isAdmin = true;
  182 + }
  183 + });
  184 +
  185 + $.each(data.content, function(i, obj) {
  186 + obj.lastLoginDate = moment(obj.lastLoginDate).format("YYYY-MM-DD HH:mm:ss");
  187 + if (b_isAdmin) {
  188 + obj.showpdc = ''; // 显示重置密码按钮
  189 + } else {
  190 + obj.showpdc = 'none';
  191 + }
  192 + });
  193 + var bodyHtm = template('user_list_temp', {list: data.content});
  194 +
  195 + $('#datatable_user tbody').html(bodyHtm)
  196 + .find('.icheck').iCheck(icheckOptions)
  197 + .on('ifChanged', iCheckChange);
  198 + if(pagination && data.content.length > 0){
  199 + //重新分页
  200 + initPagination = true;
  201 + showPagination(data);
  202 + }
  203 + layer.close(i);
  204 +
  205 + $('.line_allot_btn').on('click', openAllotWindow);
  206 +
177 207 });
178   - var bodyHtm = template('user_list_temp', {list: data.content});
179   -
180   - $('#datatable_user tbody').html(bodyHtm)
181   - .find('.icheck').iCheck(icheckOptions)
182   - .on('ifChanged', iCheckChange);
183   - if(pagination && data.content.length > 0){
184   - //重新分页
185   - initPagination = true;
186   - showPagination(data);
187   - }
188   - layer.close(i);
189 208  
190   - $('.line_allot_btn').on('click', openAllotWindow);
191 209 });
192 210 }
193 211  
... ... @@ -263,4 +281,22 @@ function changeEnabled(id,enabled){
263 281 jsDoQuery(null, true);
264 282 })
265 283 }
  284 +// 重置密码
  285 +function resetPassword(userId, ld) {
  286 + $.get('/pages/permission/user/resetPWD.html', function (content) {
  287 + layer.open({
  288 + type: 1,
  289 + area: ['600px', '360px'],
  290 + content: content,
  291 + title: '修改密码',
  292 + shift: 5,
  293 + scrollbar: false,
  294 + success: function (layero, index) {
  295 + $(layero).find('#user_id').val(userId);
  296 + $(layero).find('#last_pwd_date').val(ld ? moment(ld).format("YYYY-MM-DD HH:mm:ss") : '');
  297 + }
  298 + });
  299 + });
  300 +
  301 +}
266 302 </script>
267 303 \ No newline at end of file
... ...
src/main/resources/static/pages/permission/user/resetPWD.html 0 → 100644
  1 +<div class="row">
  2 + <div class="col-md-12">
  3 + <!-- BEGIN VALIDATION STATES-->
  4 + <div class="portlet light portlet-fit portlet-form bordered">
  5 + <div class="portlet-body">
  6 + <form class="form-horizontal" id="resetPWDForm">
  7 + <input type="hidden" id="user_id" name="user_id">
  8 + <div class="form-group" style="margin-top: 60px">
  9 + <label class="control-label col-md-4">最近密码更新时间:
  10 + </label>
  11 + <div class="col-md-6">
  12 + <div class="input-icon right">
  13 + <i class="fa"></i>
  14 + <input type="text" readonly class="form-control" name="last_pwd_date" id="last_pwd_date" value="" /> </div>
  15 + </div>
  16 + </div>
  17 +
  18 + <div class="form-group" >
  19 + <label class="control-label col-md-4">密码有效期(天):
  20 + </label>
  21 + <div class="col-md-6">
  22 + <div class="input-icon right">
  23 + <i class="fa"></i>
  24 + <input type="number" class="form-control" name="reset_day" id="reset_day" value="180" /> </div>
  25 + </div>
  26 + </div>
  27 + <div class="form-group">
  28 + <label class="control-label col-md-4">默认密码:
  29 + </label>
  30 + <div class="col-md-6">
  31 + <div class="input-icon right">
  32 + <i class="fa"></i>
  33 + <input type="text" class="form-control" name="reset_passord" id="reset_passord" value="123456" /> </div>
  34 + </div>
  35 + </div>
  36 + <div class="form-actions">
  37 + <div class="row">
  38 + <div class="col-md-offset-5 col-md-7">
  39 + <button type="button" id="confirm" class="btn green">确定</button>
  40 + <button type="button" class="btn default">取消</button>
  41 + </div>
  42 + </div>
  43 + </div>
  44 + </form>
  45 + </div>
  46 + </div>
  47 + </div>
  48 +</div>
  49 +
  50 +
  51 +<script>
  52 + $(function(){
  53 +
  54 + $("#confirm").on("click",function(){
  55 + var data = $('#resetPWDForm').serializeJSON();
  56 + console.log(data);
  57 + $.post('/user/resetPWD',data,function(msg){
  58 + layer.alert(msg);
  59 + });
  60 + });
  61 + });
  62 +</script>
0 63 \ No newline at end of file
... ...
src/main/resources/static/pages/scheduleApp/module/basicInfo/busInfoManage/module.js
... ... @@ -308,12 +308,12 @@ angular.module(&#39;ScheduleApp&#39;).controller(
308 308 // large方式弹出模态对话框
309 309 var modalInstance = $uibModal.open({
310 310 templateUrl: '/pages/scheduleApp/module/basicInfo/busInfoManage/orderOptionOpen.html',
311   - size: "sm",
  311 + // size: "sm",
312 312 animation: true,
313 313 backdrop: 'static',
314 314 resolve: {
315 315 },
316   - windowClass: 'center-modal',
  316 + windowClass: 'order-option-modal',
317 317 controller: "BusInfoManageListOrderOptionModalInstanceCtrl",
318 318 controllerAs: "$ctrl",
319 319 bindToController: true
... ...
src/main/resources/static/pages/scheduleApp/module/basicInfo/deviceInfoManage/module.js
... ... @@ -156,12 +156,12 @@ angular.module(&#39;ScheduleApp&#39;).controller(
156 156 // large方式弹出模态对话框
157 157 var modalInstance = $uibModal.open({
158 158 templateUrl: '/pages/scheduleApp/module/basicInfo/deviceInfoManage/orderOptionOpen.html',
159   - size: "sm",
  159 + // size: "sm",
160 160 animation: true,
161 161 backdrop: 'static',
162 162 resolve: {
163 163 },
164   - windowClass: 'center-modal',
  164 + windowClass: 'order-option-modal',
165 165 controller: "DeviceInfoManageListOrderOptionModalInstanceCtrl",
166 166 controllerAs: "$ctrl",
167 167 bindToController: true
... ...
src/main/resources/static/pages/scheduleApp/module/basicInfo/employeeInfoManage/module.js
... ... @@ -284,12 +284,12 @@ angular.module(&#39;ScheduleApp&#39;).controller(
284 284 // large方式弹出模态对话框
285 285 var modalInstance = $uibModal.open({
286 286 templateUrl: '/pages/scheduleApp/module/basicInfo/employeeInfoManage/orderOptionOpen.html',
287   - size: "sm",
  287 + // size: "sm",
288 288 animation: true,
289 289 backdrop: 'static',
290 290 resolve: {
291 291 },
292   - windowClass: 'center-modal',
  292 + windowClass: 'order-option-modal',
293 293 controller: "EmployeeInfoManageListOrderOptionModalInstanceCtrl",
294 294 controllerAs: "$ctrl",
295 295 bindToController: true
... ...
src/main/resources/static/pages/scheduleApp/module/common/main.css
... ... @@ -19,6 +19,7 @@ form input.ng-valid.ng-dirty.ng-valid-required {
19 19 background-color: #78FA89;
20 20 }
21 21  
  22 +/** 居中弹出框(如:导入弹出框) */
22 23 .center-modal {
23 24 position: fixed;
24 25 top: 10%;
... ... @@ -29,6 +30,16 @@ form input.ng-valid.ng-dirty.ng-valid-required {
29 30 margin-left: -10%;
30 31 }
31 32  
  33 +/* 排序选项弹出框 */
  34 +.order-option-modal .modal-dialog {
  35 + position: fixed;
  36 + top: 10%;
  37 + left: 30%;
  38 + z-index: 1050;
  39 + width: 40%;
  40 + height: 80%;
  41 +}
  42 +
32 43 .fixDiv {
33 44 min-height: 200px;
34 45 min-width: 600px;
... ...
src/main/resources/static/pages/scheduleApp/module/core/busConfig/module.js
... ... @@ -259,12 +259,12 @@ angular.module(&#39;ScheduleApp&#39;).controller(
259 259 // large方式弹出模态对话框
260 260 var modalInstance = $uibModal.open({
261 261 templateUrl: '/pages/scheduleApp/module/core/busConfig/orderOptionOpen.html',
262   - size: "sm",
  262 + // size: "sm",
263 263 animation: true,
264 264 backdrop: 'static',
265 265 resolve: {
266 266 },
267   - windowClass: 'center-modal',
  267 + windowClass: 'order-option-modal',
268 268 controller: "BusConfigListOrderOptionModalInstanceCtrl",
269 269 controllerAs: "$ctrl",
270 270 bindToController: true
... ...
src/main/resources/static/pages/scheduleApp/module/core/employeeConfig/module.js
... ... @@ -264,12 +264,12 @@ angular.module(&#39;ScheduleApp&#39;).controller(
264 264 // large方式弹出模态对话框
265 265 var modalInstance = $uibModal.open({
266 266 templateUrl: '/pages/scheduleApp/module/core/employeeConfig/orderOptionOpen.html',
267   - size: "sm",
  267 + // size: "sm",
268 268 animation: true,
269 269 backdrop: 'static',
270 270 resolve: {
271 271 },
272   - windowClass: 'center-modal',
  272 + windowClass: 'order-option-modal',
273 273 controller: "EmployeeConfigListOrderOptionModalInstanceCtrl",
274 274 controllerAs: "$ctrl",
275 275 bindToController: true
... ...
src/main/resources/static/pages/scheduleApp/module/core/guideboardManage/detail.html
... ... @@ -72,6 +72,14 @@
72 72 </div>
73 73 </div>
74 74  
  75 + <div class="form-group has-success has-feedback">
  76 + <label class="col-md-2 control-label">加油公里:</label>
  77 + <div class="col-md-3">
  78 + <input type="text" class="form-control" name="lpType"
  79 + ng-model="ctrl.guideboardForDetail.jygl" readonly/>
  80 + </div>
  81 + </div>
  82 +
75 83 <!-- 其他form-group -->
76 84  
77 85 </div>
... ...
src/main/resources/static/pages/scheduleApp/module/core/guideboardManage/edit.html
... ... @@ -99,6 +99,20 @@
99 99 </div>
100 100 </div>
101 101  
  102 + <div class="form-group">
  103 + <label class="col-md-2 control-label">加油公里:</label>
  104 + <div class="col-md-3">
  105 + <input type="text" class="form-control" name="jygl"
  106 + ng-model="ctrl.guideboardManageForForm.jygl" ng-pattern="ctrl.float_regex"
  107 + />
  108 + </div>
  109 + <!-- 隐藏块,显示验证信息 -->
  110 + <div class="alert alert-danger well-sm" ng-show="myForm.jygl.$error.pattern">
  111 + 输入数字
  112 + </div>
  113 +
  114 + </div>
  115 +
102 116 <!-- 路牌类型暂时是普通路牌,默认填写了 -->
103 117  
104 118  
... ...
src/main/resources/static/pages/scheduleApp/module/core/guideboardManage/form.html
... ... @@ -99,6 +99,20 @@
99 99 </div>
100 100 </div>
101 101  
  102 + <div class="form-group">
  103 + <label class="col-md-2 control-label">加油公里:</label>
  104 + <div class="col-md-3">
  105 + <input type="text" class="form-control" name="jygl"
  106 + ng-model="ctrl.guideboardManageForForm.jygl" ng-pattern="ctrl.float_regex"
  107 + />
  108 + </div>
  109 + <!-- 隐藏块,显示验证信息 -->
  110 + <div class="alert alert-danger well-sm" ng-show="myForm.jygl.$error.pattern">
  111 + 输入数字
  112 + </div>
  113 +
  114 + </div>
  115 +
102 116 <!-- 路牌类型暂时是普通路牌,默认填写了 -->
103 117  
104 118  
... ...
src/main/resources/static/pages/scheduleApp/module/core/guideboardManage/list.html
... ... @@ -8,6 +8,7 @@
8 8 <th style="width: 150px;">线路</th>
9 9 <th style="width: 100px;">路牌编号</th>
10 10 <th >路牌名称</th>
  11 + <th style="width: 100px;">加油公里</th>
11 12 <th style="width: 100px;">路牌类型</th>
12 13 <th style="width: 80px;">状态</th>
13 14 <th style="width: 20%">操作</th>
... ... @@ -35,6 +36,7 @@
35 36 <input type="text" class="form-control form-filter input-sm" ng-model="ctrl.searchCondition()['lpName_like']" placeholder="请输入路牌名字..."/>
36 37 </td>
37 38 <td></td>
  39 + <td></td>
38 40 <td>
39 41 <label class="checkbox-inline">
40 42 <input type="checkbox" ng-model="ctrl.searchCondition()['isCancel_eq']"/>已作废
... ... @@ -86,6 +88,9 @@
86 88 <span ng-bind="info.lpName"></span>
87 89 </td>
88 90 <td>
  91 + <span ng-bind="info.jygl"></span>
  92 + </td>
  93 + <td>
89 94 <span ng-bind="info.lpType"></span>
90 95 </td>
91 96 <td>
... ...
src/main/resources/static/pages/scheduleApp/module/core/guideboardManage/module.js
... ... @@ -265,12 +265,12 @@ angular.module(&#39;ScheduleApp&#39;).controller(
265 265 // large方式弹出模态对话框
266 266 var modalInstance = $uibModal.open({
267 267 templateUrl: '/pages/scheduleApp/module/core/guideboardManage/orderOptionOpen.html',
268   - size: "sm",
  268 + // size: "lg",
269 269 animation: true,
270 270 backdrop: 'static',
271 271 resolve: {
272 272 },
273   - windowClass: 'center-modal',
  273 + windowClass: 'order-option-modal',
274 274 controller: "GuideboardManageListOrderOptionModalInstanceCtrl",
275 275 controllerAs: "$ctrl",
276 276 bindToController: true
... ... @@ -321,6 +321,9 @@ angular.module(&#39;ScheduleApp&#39;).controller(
321 321 var self = this;
322 322 var Gb = service.getGbQueryClass();
323 323  
  324 + // 小数
  325 + self.float_regex = /^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/;
  326 +
324 327 // 欲保存的表单信息,双向绑定
325 328 self.guideboardManageForForm = new Gb;
326 329 self.guideboardManageForForm.xl = {};
... ...
src/main/resources/static/pages/scheduleApp/module/core/rerunManage/module.js
... ... @@ -156,12 +156,12 @@ angular.module(&#39;ScheduleApp&#39;).controller(
156 156 // large方式弹出模态对话框
157 157 var modalInstance = $uibModal.open({
158 158 templateUrl: '/pages/scheduleApp/module/core/rerunManage/orderOptionOpen.html',
159   - size: "sm",
  159 + // size: "sm",
160 160 animation: true,
161 161 backdrop: 'static',
162 162 resolve: {
163 163 },
164   - windowClass: 'center-modal',
  164 + windowClass: 'order-option-modal',
165 165 controller: "RerunManageListOrderOptionModalInstanceCtrl",
166 166 controllerAs: "$ctrl",
167 167 bindToController: true
... ...
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/module.js
... ... @@ -222,12 +222,12 @@ angular.module(&#39;ScheduleApp&#39;).controller(
222 222 // large方式弹出模态对话框
223 223 var modalInstance = $uibModal.open({
224 224 templateUrl: '/pages/scheduleApp/module/core/schedulePlanManage/orderOptionOpen.html',
225   - size: "sm",
  225 + // size: "sm",
226 226 animation: true,
227 227 backdrop: 'static',
228 228 resolve: {
229 229 },
230   - windowClass: 'center-modal',
  230 + windowClass: 'order-option-modal',
231 231 controller: "SchedulePlanManageListOrderOptionModalInstanceCtrl",
232 232 controllerAs: "$ctrl",
233 233 bindToController: true
... ...
src/main/resources/static/pages/scheduleApp/module/core/scheduleRuleManage/module.js
... ... @@ -277,12 +277,12 @@ angular.module(&#39;ScheduleApp&#39;).controller(
277 277 // large方式弹出模态对话框
278 278 var modalInstance = $uibModal.open({
279 279 templateUrl: '/pages/scheduleApp/module/core/scheduleRuleManage/orderOptionOpen.html',
280   - size: "sm",
  280 + // size: "sm",
281 281 animation: true,
282 282 backdrop: 'static',
283 283 resolve: {
284 284 },
285   - windowClass: 'center-modal',
  285 + windowClass: 'order-option-modal',
286 286 controller: "ScheduleRuleManageListOrderOptionModalInstanceCtrl",
287 287 controllerAs: "$ctrl",
288 288 bindToController: true
... ...
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/module.js
... ... @@ -234,12 +234,12 @@ angular.module(&#39;ScheduleApp&#39;).controller(
234 234 // large方式弹出模态对话框
235 235 var modalInstance = $uibModal.open({
236 236 templateUrl: '/pages/scheduleApp/module/core/ttInfoManage/orderOptionOpen.html',
237   - size: "sm",
  237 + // size: "sm",
238 238 animation: true,
239 239 backdrop: 'static',
240 240 resolve: {
241 241 },
242   - windowClass: 'center-modal',
  242 + windowClass: 'order-option-modal',
243 243 controller: "TtInfoManageListOrderOptionModalInstanceCtrl",
244 244 controllerAs: "$ctrl",
245 245 bindToController: true
... ...
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage2/module.js
... ... @@ -234,12 +234,12 @@ angular.module(&#39;ScheduleApp&#39;).controller(
234 234 // large方式弹出模态对话框
235 235 var modalInstance = $uibModal.open({
236 236 templateUrl: '/pages/scheduleApp/module/core/ttInfoManage2/orderOptionOpen.html',
237   - size: "sm",
  237 + // size: "sm",
238 238 animation: true,
239 239 backdrop: 'static',
240 240 resolve: {
241 241 },
242   - windowClass: 'center-modal',
  242 + windowClass: 'order-option-modal',
243 243 controller: "TtInfoManage2ListOrderOptionModalInstanceCtrl",
244 244 controllerAs: "$ctrl",
245 245 bindToController: true
... ...