Commit 7955776c98397adb792a664e4eb8954027bbf0ac

Authored by yiming
1 parent e299998a

时刻表管理,取消预加载,增加明细显示隐藏功能。

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
... ... @@ -36,8 +36,18 @@ angular.module(&#39;ScheduleApp&#39;).factory(
36 36  
37 37 // 查询对象类
38 38 var queryClass = service.rest;
39   -
  39 + var skbmx=false;
40 40 return {
  41 + getSKBMX:function (){
  42 + return skbmx;
  43 + },
  44 + changeSKBMX:function (){
  45 + if(skbmx){
  46 + skbmx=false;
  47 + }else {
  48 + skbmx=true;
  49 + }
  50 + },
41 51 getTtInfoQueryClass: function() {
42 52 return queryClass;
43 53 },
... ... @@ -132,14 +142,20 @@ angular.module(&#39;ScheduleApp&#39;).factory(
132 142 angular.module('ScheduleApp').controller(
133 143 'TtInfoManageIndexCtrl',
134 144 [
135   - '$state',
136   - function($state) {
  145 + '$state','TtInfoManageService',
  146 + function($state,service) {
137 147 var self = this;
138 148  
139 149 // 切换到时刻表form界面
140 150 self.toTtInfoManageForm = function() {
141 151 $state.go('ttInfoManage_form');
142 152 }
  153 + self.change=function (){
  154 + service.changeSKBMX();
  155 + }
  156 + self.isShow=function () {
  157 + return service.getSKBMX();
  158 + }
143 159 }
144 160 ]
145 161 );
... ... @@ -208,7 +224,7 @@ angular.module(&#39;ScheduleApp&#39;).controller(
208 224 );
209 225 };
210 226  
211   - self.doPage();
  227 + //self.doPage();
212 228  
213 229 // TODO:跳转到自动生成时刻表页面(jquery页面),之后会替换为Angularjs版本
214 230 self.toTtInfoDetailAuto = function(ttinfoid) {
... ... @@ -253,6 +269,9 @@ angular.module(&#39;ScheduleApp&#39;).controller(
253 269 }
254 270 );
255 271 };
  272 + self.isShow=function () {
  273 + return service.getSKBMX();
  274 + }
256 275 }
257 276 ]
258 277 );
... ...