Commit f92b871712d15c551a7b2514e6fc38b614310b88
1 parent
d8d8969c
update
Showing
5 changed files
with
174 additions
and
9 deletions
src/main/resources/static/index.html
| ... | ... | @@ -201,14 +201,18 @@ tr.row-active td { |
| 201 | 201 | </div> |
| 202 | 202 | </div> |
| 203 | 203 | <div class="page-content-wrapper"> |
| 204 | - <div class="page-content" id="pjax-container"></div> | |
| 205 | - | |
| 206 | - <div class="page-content" ng-app="ScheduleApp" id="route-container"> | |
| 207 | - <div ng-controller="ScheduleAppController"> | |
| 208 | - <div ui-view class="fade-in-up"> </div> | |
| 204 | + <div class="page-content"> | |
| 205 | + <div id="pjax-container"></div> | |
| 206 | + <div id="route-container"> | |
| 207 | + <div ng-app="ScheduleApp"> | |
| 208 | + <div ng-controller="ScheduleAppController"> | |
| 209 | + <div ui-view class="fade-in-up"> </div> | |
| 210 | + </div> | |
| 211 | + </div> | |
| 209 | 212 | </div> |
| 210 | 213 | </div> |
| 211 | 214 | |
| 215 | + | |
| 212 | 216 | </div> |
| 213 | 217 | </div> |
| 214 | 218 | |
| ... | ... | @@ -330,12 +334,16 @@ $(function(){ |
| 330 | 334 | $(document).on('click','#leftMenuSidebar a[data-pjax]', function(){ |
| 331 | 335 | $('#leftMenuSidebar li.nav-item.active').removeClass('active'); |
| 332 | 336 | $(this).parent().addClass('active'); |
| 337 | + | |
| 338 | + showPjax(); | |
| 333 | 339 | }); |
| 334 | 340 | |
| 335 | 341 | //angularjs左菜单点击事件 |
| 336 | 342 | $(document).on('click','#leftMenuSidebar a[data-angularjs]', function(){ |
| 337 | 343 | $('#leftMenuSidebar li.nav-item.active').removeClass('active'); |
| 338 | 344 | $(this).parent().addClass('active'); |
| 345 | + | |
| 346 | + showAngJs(); | |
| 339 | 347 | }); |
| 340 | 348 | |
| 341 | 349 | //加载左菜单栏 |
| ... | ... | @@ -401,11 +409,15 @@ $(function(){ |
| 401 | 409 | } |
| 402 | 410 | |
| 403 | 411 | function showPjax(){ |
| 404 | - $(angJsContainer).html('').hide(); | |
| 412 | + console.log("showPjax"); | |
| 413 | + | |
| 414 | + $(angJsContainer).hide(); | |
| 405 | 415 | $(pjaxContainer).show(); |
| 406 | 416 | } |
| 407 | 417 | |
| 408 | 418 | function showAngJs(){ |
| 419 | + console.log("showAngJs"); | |
| 420 | + | |
| 409 | 421 | $(pjaxContainer).html('').hide(); |
| 410 | 422 | $(angJsContainer).show(); |
| 411 | 423 | } | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/guideboardManage/controller2.js
0 → 100644
| 1 | +// 路牌管理控制器放在这里 | |
| 2 | + | |
| 3 | +angular.module('ScheduleApp') | |
| 4 | + .controller('guideboardManageCtrl', ['GuideboardInfo', function(GuideboardInfo) { | |
| 5 | + var self = this; | |
| 6 | + self.totalItems = 0; | |
| 7 | + self.currentPage = 1; | |
| 8 | + self.infos = []; | |
| 9 | + self.pageChanged = function() { | |
| 10 | + console.log("页面跳转到:" + self.currentPage); | |
| 11 | + | |
| 12 | + GuideboardInfo.list({page: self.currentPage - 1}, function(result) { | |
| 13 | + console.log("后台返回记录数123:" + result.content.length); | |
| 14 | + self.totalItems = result.totalElements; | |
| 15 | + self.currentPage = result.number + 1; | |
| 16 | + self.infos = result.content; | |
| 17 | + }); | |
| 18 | + }; | |
| 19 | + | |
| 20 | + GuideboardInfo.list(function(result) { | |
| 21 | + console.log("后台返回记录数:" + result.content.length); | |
| 22 | + self.totalItems = result.totalElements; | |
| 23 | + self.currentPage = result.number + 1; | |
| 24 | + self.infos = result.content; | |
| 25 | + }); | |
| 26 | + }]); | |
| 0 | 27 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/guideboardManage/guideboardManage2.html
0 → 100644
| 1 | +<div class="page-head"> | |
| 2 | + <div class="page-title"> | |
| 3 | + <h1>路牌管理</h1> | |
| 4 | + </div> | |
| 5 | +</div> | |
| 6 | + | |
| 7 | +<ul class="page-breadcrumb breadcrumb"> | |
| 8 | + <li> | |
| 9 | + <a href="/pages/home.html" data-pjax>首页</a> | |
| 10 | + <i class="fa fa-circle"></i> | |
| 11 | + </li> | |
| 12 | + <li> | |
| 13 | + <span class="active">运营计划管理</span> | |
| 14 | + <i class="fa fa-circle"></i> | |
| 15 | + </li> | |
| 16 | + <li> | |
| 17 | + <span class="active">路牌管理</span> | |
| 18 | + </li> | |
| 19 | +</ul> | |
| 20 | + | |
| 21 | +<div class="row" id="guideboardManage"> | |
| 22 | + <div class="col-md-12" ng-controller="guideboardManageCtrl as gmc"> | |
| 23 | + <div class="portlet light bordered"> | |
| 24 | + <div class="portlet-title"> | |
| 25 | + <div class="caption font-dark"> | |
| 26 | + <i class="fa fa-database font-dark"></i> | |
| 27 | + <span class="caption-subject bold uppercase">路牌表</span> | |
| 28 | + </div> | |
| 29 | + <div class="actions"> | |
| 30 | + <a href="javascirpt:" class="btn btn-circle blue"> | |
| 31 | + <i class="fa fa-plus"></i> | |
| 32 | + 添加路牌 | |
| 33 | + </a> | |
| 34 | + <div class="btn-group"> | |
| 35 | + <a href="javascript:" class="btn red btn-outline btn-circle" data-toggle="dropdown"> | |
| 36 | + <i class="fa fa-share"></i> | |
| 37 | + <span>系统工具</span> | |
| 38 | + <i class="fa fa-angle-down"></i> | |
| 39 | + </a> | |
| 40 | + <ul class="dropdown-menu pull-right"> | |
| 41 | + <li> | |
| 42 | + <a href="javascript:" class="tool-action"> | |
| 43 | + <i class="fa fa-file-excel-o"></i> | |
| 44 | + 导出excel | |
| 45 | + </a> | |
| 46 | + </li> | |
| 47 | + <li class="divider"></li> | |
| 48 | + <li> | |
| 49 | + <a href="javascript:" class="tool-action"> | |
| 50 | + <i class="fa fa-refresh"></i> | |
| 51 | + 刷行数据 | |
| 52 | + </a> | |
| 53 | + </li> | |
| 54 | + </ul> | |
| 55 | + </div> | |
| 56 | + </div> | |
| 57 | + </div> | |
| 58 | + | |
| 59 | + <div class="portlet-body"> | |
| 60 | + <table class="table table-striped table-bordered table-hover table-checkable order-column" id="busConfigInfoTable"> | |
| 61 | + <thead> | |
| 62 | + <tr> | |
| 63 | + <th> | |
| 64 | + <input type="checkbox" class="group-checkable" data-set="#busConfigInfoTable.checkboxes"/> | |
| 65 | + </th> | |
| 66 | + <th>线路</th> | |
| 67 | + <th>路牌顺序号</th> | |
| 68 | + <th>路牌名称</th> | |
| 69 | + <th>路牌类型</th> | |
| 70 | + <th>操作</th> | |
| 71 | + </tr> | |
| 72 | + </thead> | |
| 73 | + <tbody> | |
| 74 | + <tr ng-repeat="info in gmc.infos" class="odd gradeX"> | |
| 75 | + <td> | |
| 76 | + <input type="checkbox" class="checkboxes"/> | |
| 77 | + </td> | |
| 78 | + <td> | |
| 79 | + <span ng-bind="info.xl"></span> | |
| 80 | + </td> | |
| 81 | + <td> | |
| 82 | + <span ng-bind="info.lpNo"></span> | |
| 83 | + </td> | |
| 84 | + <td> | |
| 85 | + <span ng-bind="info.lpName"></span> | |
| 86 | + </td> | |
| 87 | + <td> | |
| 88 | + <span ng-bind="info.lpType"></span> | |
| 89 | + </td> | |
| 90 | + </tr> | |
| 91 | + </tbody> | |
| 92 | + </table> | |
| 93 | + | |
| 94 | + <div style="text-align: right;"> | |
| 95 | + <uib-pagination total-items="gmc.totalItems" | |
| 96 | + ng-model="gmc.currentPage" | |
| 97 | + ng-change="gmc.pageChanged()" | |
| 98 | + previous-text="上一页" | |
| 99 | + next-text="下一页"> | |
| 100 | + </uib-pagination> | |
| 101 | + </div> | |
| 102 | + | |
| 103 | + </div> | |
| 104 | + </div> | |
| 105 | + </div> | |
| 106 | +</div> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/guideboardManage/service2.js
0 → 100644
| 1 | +// 路牌管理服务放在这里 | |
| 2 | + | |
| 3 | +angular.module('ScheduleApp').factory('GuideboardInfo', ['$resource', function($resource) { | |
| 4 | + return $resource( | |
| 5 | + '/gic', | |
| 6 | + {order: 'lpNo', direction: 'ASC'}, | |
| 7 | + { | |
| 8 | + list: { | |
| 9 | + method: 'GET', | |
| 10 | + params: { | |
| 11 | + page: 0 | |
| 12 | + } | |
| 13 | + } | |
| 14 | + } | |
| 15 | + ); | |
| 16 | +}]); | |
| 0 | 17 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/main.js
| ... | ... | @@ -46,7 +46,7 @@ ScheduleApp.config(['$stateProvider', '$urlRouterProvider', function($stateProvi |
| 46 | 46 | $stateProvider |
| 47 | 47 | // 车辆配置模块 |
| 48 | 48 | .state('busConfig', { |
| 49 | - url: '/busConfig.html', | |
| 49 | + url: '/abc.html', | |
| 50 | 50 | templateUrl: 'pages/scheduleApp/module/core/busConfig/busConfig2.html', |
| 51 | 51 | data: {}, |
| 52 | 52 | controller: 'busConfigCtrl', |
| ... | ... | @@ -66,13 +66,18 @@ ScheduleApp.config(['$stateProvider', '$urlRouterProvider', function($stateProvi |
| 66 | 66 | // 路牌管理 |
| 67 | 67 | .state('guideboardManage', { |
| 68 | 68 | url: '/guideboardManage.html', |
| 69 | - templateUrl: 'pages/scheduleApp/module/core/guideboardManage/guideboardManage.html', | |
| 69 | + templateUrl: 'pages/scheduleApp/module/core/guideboardManage/guideboardManage2.html', | |
| 70 | 70 | data: {}, |
| 71 | 71 | controller: 'guideboardManageCtrl', |
| 72 | 72 | resolve: { |
| 73 | 73 | deps: ['$ocLazyLoad', function($ocLazyLoad) { |
| 74 | 74 | return $ocLazyLoad.load({ |
| 75 | - name: '' | |
| 75 | + name: 'guideboardManage.html', | |
| 76 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 77 | + files: [ | |
| 78 | + 'pages/scheduleApp/module/core/guideboardManage/service2.js', | |
| 79 | + 'pages/scheduleApp/module/core/guideboardManage/controller2.js' | |
| 80 | + ] | |
| 76 | 81 | }); |
| 77 | 82 | }] |
| 78 | 83 | } | ... | ... |