Commit daefd74c5025c38fb7e5f7502fd92905d22a2469
1 parent
ae3be767
1.无主调权限可切换为主调bug修复
Showing
2 changed files
with
4 additions
and
1 deletions
src/main/resources/static/pages/control/lineallot_v2/main.html
| @@ -202,6 +202,7 @@ | @@ -202,6 +202,7 @@ | ||
| 202 | var codeMapps={}; //线路编码映射 | 202 | var codeMapps={}; //线路编码映射 |
| 203 | //滚动条 | 203 | //滚动条 |
| 204 | $('.line_list_all_wrap').perfectScrollbar(); | 204 | $('.line_list_all_wrap').perfectScrollbar(); |
| 205 | + window.localStorage.setItem("pattern", 0); | ||
| 205 | 206 | ||
| 206 | var ep = EventProxy.create('all_lines', 'user_author', 'company_data', function (allLines, userAuthor, company_data) { | 207 | var ep = EventProxy.create('all_lines', 'user_author', 'company_data', function (allLines, userAuthor, company_data) { |
| 207 | //按用户权限过滤线路 | 208 | //按用户权限过滤线路 |
| @@ -233,6 +234,7 @@ | @@ -233,6 +234,7 @@ | ||
| 233 | 234 | ||
| 234 | //登录模式 | 235 | //登录模式 |
| 235 | changePattern(userAuthor.pattern); | 236 | changePattern(userAuthor.pattern); |
| 237 | + window.localStorage.setItem("pattern", userAuthor.pattern); | ||
| 236 | if(!userAuthor.pattern) | 238 | if(!userAuthor.pattern) |
| 237 | $('.pattern_type_label').hide().find('input')[0].checked=false; | 239 | $('.pattern_type_label').hide().find('input')[0].checked=false; |
| 238 | else | 240 | else |
src/main/resources/static/real_control_v2/fragments/north/nav/user_change/user_change_modal.html
| @@ -45,6 +45,7 @@ | @@ -45,6 +45,7 @@ | ||
| 45 | user = gb_northToolbar.user(), | 45 | user = gb_northToolbar.user(), |
| 46 | operationMode = window.localStorage.getItem('operationMode'), | 46 | operationMode = window.localStorage.getItem('operationMode'), |
| 47 | f = $('.user_info>form', modal); | 47 | f = $('.user_info>form', modal); |
| 48 | + var pattern = window.localStorage.getItem("pattern"); | ||
| 48 | //用户名 | 49 | //用户名 |
| 49 | $('input[name=userName]', f).val(user.userName) | 50 | $('input[name=userName]', f).val(user.userName) |
| 50 | .on('input', function () { | 51 | .on('input', function () { |
| @@ -90,7 +91,7 @@ | @@ -90,7 +91,7 @@ | ||
| 90 | }); | 91 | }); |
| 91 | } | 92 | } |
| 92 | 93 | ||
| 93 | - if(data.operationMode != operationMode){ | 94 | + if(data.operationMode != operationMode && data.operationMode <= pattern){ |
| 94 | window.localStorage.setItem('operationMode', data.operationMode); | 95 | window.localStorage.setItem('operationMode', data.operationMode); |
| 95 | //切换调度模式 | 96 | //切换调度模式 |
| 96 | gb_dp_initHttpIntercept(); | 97 | gb_dp_initHttpIntercept(); |