Commit 9ce10c65d40fbb5255d7eee6a34b7852e0c22f66
1 parent
5ee836e7
时刻表管理,取消预加载,增加明细显示隐藏功能。
Showing
3 changed files
with
32 additions
and
8 deletions
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/index.html
| ... | ... | @@ -40,6 +40,11 @@ |
| 40 | 40 | <!--<i class="fa fa-plus"></i>--> |
| 41 | 41 | <!--测试--> |
| 42 | 42 | <!--</a>--> |
| 43 | + <a href="javascript:" class="btn blue" ng-click="ctrl.change()"> | |
| 44 | + <i ng-show="ctrl.isShow()"class="fa fa-toggle-on"></i> | |
| 45 | + <i ng-show="!ctrl.isShow()"class="fa fa-toggle-off"></i> | |
| 46 | + 明细 | |
| 47 | + </a> | |
| 43 | 48 | <a href="javascript:" class="btn blue" ng-click="ctrl.toTtInfoManageForm()"> |
| 44 | 49 | <i class="fa fa-plus"></i> |
| 45 | 50 | 添加时刻表 | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/list.html
| ... | ... | @@ -11,8 +11,8 @@ |
| 11 | 11 | <th style="width: 50px;">启用</th> |
| 12 | 12 | <th style="width: 130px">操作日期</th> |
| 13 | 13 | <th style="width: 80px">状态</th> |
| 14 | - <th style="width: 60%">时刻表明细</th> | |
| 15 | - <th style="width: 40%">操作</th> | |
| 14 | + <th ng-show="ctrl.isShow()" style="width: 100%">时刻表明细</th> | |
| 15 | + <th style="width: 200px">操作</th> | |
| 16 | 16 | </tr> |
| 17 | 17 | <tr role="row" class="filter"> |
| 18 | 18 | <td></td> |
| ... | ... | @@ -45,7 +45,7 @@ |
| 45 | 45 | <input type="checkbox" ng-model="ctrl.searchCondition()['isCancel_eq']"/>已作废 |
| 46 | 46 | </label> |
| 47 | 47 | </td> |
| 48 | - <td></td> | |
| 48 | + <td ng-show="ctrl.isShow()"></td> | |
| 49 | 49 | <td> |
| 50 | 50 | <div class="btn-group"> |
| 51 | 51 | <button class="btn btn-sm green btn-outline filter-submit margin-bottom" style="margin-right: 0;" |
| ... | ... | @@ -184,7 +184,7 @@ |
| 184 | 184 | <span class="glyphicon glyphicon-ok" ng-if="info.isCancel == '0'"></span> |
| 185 | 185 | <span class="glyphicon glyphicon-remove" ng-if="info.isCancel == '1'"></span> |
| 186 | 186 | </td> |
| 187 | - <td> | |
| 187 | + <td ng-show="ctrl.isShow()"> | |
| 188 | 188 | <!--<a ui-sref="ttInfoDetailManage_edit({xlid: info.xl.id, ttid : info.id, xlname: info.xl.name, ttname : info.name, rflag : true})"--> |
| 189 | 189 | <!--class="btn btn-info btn-sm" ng-if="info.isCancel == '0'"> 编辑 </a>--> |
| 190 | 190 | <!--<a ui-sref="ttInfoDetailManage_edit2({xlid: info.xl.id, ttid : info.id, xlname: info.xl.name, ttname : info.name})"--> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/module.js
| ... | ... | @@ -37,8 +37,18 @@ angular.module('ScheduleApp').factory( |
| 37 | 37 | |
| 38 | 38 | // 查询对象类 |
| 39 | 39 | var queryClass = service.rest; |
| 40 | - | |
| 40 | + var skbmx=false; | |
| 41 | 41 | return { |
| 42 | + getSKBMX:function (){ | |
| 43 | + return skbmx; | |
| 44 | + }, | |
| 45 | + changeSKBMX:function (){ | |
| 46 | + if(skbmx){ | |
| 47 | + skbmx=false; | |
| 48 | + }else { | |
| 49 | + skbmx=true; | |
| 50 | + } | |
| 51 | + }, | |
| 42 | 52 | getTtInfoQueryClass: function() { |
| 43 | 53 | return queryClass; |
| 44 | 54 | }, |
| ... | ... | @@ -133,14 +143,20 @@ angular.module('ScheduleApp').factory( |
| 133 | 143 | angular.module('ScheduleApp').controller( |
| 134 | 144 | 'TtInfoManageIndexCtrl', |
| 135 | 145 | [ |
| 136 | - '$state', | |
| 137 | - function($state) { | |
| 146 | + '$state','TtInfoManageService', | |
| 147 | + function($state,service) { | |
| 138 | 148 | var self = this; |
| 139 | 149 | |
| 140 | 150 | // 切换到时刻表form界面 |
| 141 | 151 | self.toTtInfoManageForm = function() { |
| 142 | 152 | $state.go('ttInfoManage_form'); |
| 143 | 153 | } |
| 154 | + self.change=function (){ | |
| 155 | + service.changeSKBMX(); | |
| 156 | + } | |
| 157 | + self.isShow=function () { | |
| 158 | + return service.getSKBMX(); | |
| 159 | + } | |
| 144 | 160 | } |
| 145 | 161 | ] |
| 146 | 162 | ); |
| ... | ... | @@ -209,7 +225,7 @@ angular.module('ScheduleApp').controller( |
| 209 | 225 | ); |
| 210 | 226 | }; |
| 211 | 227 | |
| 212 | - self.doPage(); | |
| 228 | + //self.doPage(); | |
| 213 | 229 | |
| 214 | 230 | // TODO:跳转到自动生成时刻表页面(jquery页面),之后会替换为Angularjs版本 |
| 215 | 231 | self.toTtInfoDetailAuto = function(ttinfoid) { |
| ... | ... | @@ -254,6 +270,9 @@ angular.module('ScheduleApp').controller( |
| 254 | 270 | } |
| 255 | 271 | ); |
| 256 | 272 | }; |
| 273 | + self.isShow=function () { | |
| 274 | + return service.getSKBMX(); | |
| 275 | + } | |
| 257 | 276 | } |
| 258 | 277 | ] |
| 259 | 278 | ); | ... | ... |