Commit a753ceed85122207c139d36b25c95983bf4606d6
Merge branch 'pudong' of 192.168.168.201:panzhaov5/bsth_control into pudong
Showing
58 changed files
with
1778 additions
and
102 deletions
src/main/resources/static/pages/scheduleApp/Gruntfile.js
| ... | ... | @@ -89,6 +89,7 @@ module.exports = function (grunt) { |
| 89 | 89 | 'module/common/dts2/bcGroup/saBcgroup.js', // 班次选择整合指令 |
| 90 | 90 | 'module/common/dts2/ttinfotable/saTimeTable.js', // 时刻表显示指令 |
| 91 | 91 | 'module/common/dts2/ttinfotable/saTimeTableScrolly1.js', // 时刻表滚动1显示指令 |
| 92 | + 'module/common/dts2/queryOption/saOrderOption.js', // saOrderoption指令,搜索时的排序选项(在搜索时可以使用,通用的) | |
| 92 | 93 | 'module/common/dts2/scheduleplan/saScpdate.js', // saScpdate指令(非通用指令,只在排班计划form中使用) |
| 93 | 94 | 'module/common/dts2/scheduleplan/saSrule.js', // saSrule指令(非通用指令,只在排班计划form中使用) |
| 94 | 95 | 'module/common/dts2/scheduleplan/saPlaninfoedit.js', // saPlaninfoedit指令(非通用指令,只在调度执勤日报中使用) | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/busInfoManage/index.html
| ... | ... | @@ -20,6 +20,15 @@ |
| 20 | 20 | |
| 21 | 21 | <div class="row"> |
| 22 | 22 | <div class="col-md-12" ng-controller="BusInfoManageCtrl as ctrl"> |
| 23 | + <style> | |
| 24 | + .dropdown-menu { | |
| 25 | + border-color: #32c5d2; | |
| 26 | + } | |
| 27 | + .btn-group > .dropdown-menu:before { | |
| 28 | + border-bottom-color: #32c5d2; | |
| 29 | + } | |
| 30 | + </style> | |
| 31 | + | |
| 23 | 32 | <div class="portlet light bordered"> |
| 24 | 33 | <div class="portlet-title"> |
| 25 | 34 | <div class="caption font-dark"> |
| ... | ... | @@ -27,13 +36,13 @@ |
| 27 | 36 | <span class="caption-subject bold uppercase">车辆信息表</span> |
| 28 | 37 | </div> |
| 29 | 38 | <div class="actions"> |
| 30 | - <a href="javascript:" class="btn btn-circle blue" ng-click="ctrl.goForm()"> | |
| 39 | + <a href="javascript:" class="btn blue" ng-click="ctrl.goForm()"> | |
| 31 | 40 | <i class="fa fa-plus"></i> |
| 32 | 41 | 添加车辆信息 |
| 33 | 42 | </a> |
| 34 | 43 | |
| 35 | 44 | <div class="btn-group"> |
| 36 | - <a href="javascript:" class="btn red btn-outline btn-circle" data-toggle="dropdown"> | |
| 45 | + <a href="javascript:" class="btn red btn-outline" data-toggle="dropdown"> | |
| 37 | 46 | <i class="fa fa-share"></i> |
| 38 | 47 | <span>数据工具</span> |
| 39 | 48 | <i class="fa fa-angle-down"></i> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/busInfoManage/list.html
| ... | ... | @@ -9,11 +9,11 @@ |
| 9 | 9 | <th style="width: 120px;">内部编号</th> |
| 10 | 10 | <th style="width: 120px;">设备编号</th> |
| 11 | 11 | <th style="width: 120px;">车牌号</th> |
| 12 | - <th style="width: 150px;">所在公司</th> | |
| 13 | - <th style="width: 160px;">所在分公司</th> | |
| 12 | + <th >所在公司</th> | |
| 13 | + <th >所在分公司</th> | |
| 14 | 14 | <th style="width: 60px">电车</th> |
| 15 | 15 | <th style="width: 80px;" >状态</th> |
| 16 | - <th style="width: 100%">操作</th> | |
| 16 | + <th >操作</th> | |
| 17 | 17 | </tr> |
| 18 | 18 | <tr role="row" class="filter"> |
| 19 | 19 | <td></td> |
| ... | ... | @@ -68,9 +68,24 @@ |
| 68 | 68 | </label> |
| 69 | 69 | </td> |
| 70 | 70 | <td> |
| 71 | - <button class="btn btn-sm green btn-outline filter-submit margin-bottom" | |
| 72 | - ng-click="ctrl.doPage()"> | |
| 73 | - <i class="fa fa-search"></i> 搜索</button> | |
| 71 | + <div class="btn-group"> | |
| 72 | + <button class="btn btn-sm green btn-outline filter-submit margin-bottom" style="margin-right: 0;" | |
| 73 | + ng-click="ctrl.doPage()"> | |
| 74 | + <i class="fa fa-search"></i> 搜索</button> | |
| 75 | + <button class="btn btn-sm green btn-outline filter-submit margin-bottom dropdown-toggle" | |
| 76 | + data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |
| 77 | + <span class="caret"></span> | |
| 78 | + <span class="sr-only">dropdown</span> | |
| 79 | + </button> | |
| 80 | + <ul class="dropdown-menu pull-right"> | |
| 81 | + <li> | |
| 82 | + <a href="javascript:" class="tool-action" ng-click="ctrl.customOrder()"> | |
| 83 | + <i class="fa fa-sort-amount-asc" aria-hidden="true"></i> | |
| 84 | + 排序选项 | |
| 85 | + </a> | |
| 86 | + </li> | |
| 87 | + </ul> | |
| 88 | + </div> | |
| 74 | 89 | |
| 75 | 90 | <button class="btn btn-sm red btn-outline filter-cancel" |
| 76 | 91 | ng-click="ctrl.reset()"> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/busInfoManage/module.js
| ... | ... | @@ -26,6 +26,23 @@ angular.module('ScheduleApp').factory( |
| 26 | 26 | uiToRecord: 0 // 页面绑定,当前页到第几条记录 |
| 27 | 27 | }; |
| 28 | 28 | |
| 29 | + // 字段描述 | |
| 30 | + var columns = [ | |
| 31 | + {name: "carCode", desc: "车辆编号"}, | |
| 32 | + {name: "insideCode", desc: "自编号"}, | |
| 33 | + {name: "equipmentCode", desc: "设备编号"}, | |
| 34 | + {name: "carPlate", desc: "车牌号"}, | |
| 35 | + {name: "company", desc: "所在公司"}, | |
| 36 | + {name: "brancheCompany", desc: "所在分公司"}, | |
| 37 | + {name: "sfdc", desc: "是否电车"}, | |
| 38 | + {name: "scrapState", desc: "是否报废"} | |
| 39 | + ]; | |
| 40 | + // 排序字段 | |
| 41 | + var orderColumns = { | |
| 42 | + order: "carCode", | |
| 43 | + direction: "ASC" | |
| 44 | + }; | |
| 45 | + | |
| 29 | 46 | // 查询对象 |
| 30 | 47 | var queryClass = service.rest; |
| 31 | 48 | |
| ... | ... | @@ -33,6 +50,12 @@ angular.module('ScheduleApp').factory( |
| 33 | 50 | getQueryClass: function() { |
| 34 | 51 | return queryClass; |
| 35 | 52 | }, |
| 53 | + getColumns: function() { | |
| 54 | + return columns; | |
| 55 | + }, | |
| 56 | + getOrderColumns: function() { | |
| 57 | + return orderColumns; | |
| 58 | + }, | |
| 36 | 59 | /** |
| 37 | 60 | * 获取查询条件信息, |
| 38 | 61 | * 用于给controller用来和页面数据绑定。 |
| ... | ... | @@ -44,6 +67,10 @@ angular.module('ScheduleApp').factory( |
| 44 | 67 | currentSearchCondition["cgsbm_in"] = UserPrincipal.getGsStrs().join(","); |
| 45 | 68 | } |
| 46 | 69 | |
| 70 | + // 重置排序字段条件 | |
| 71 | + currentSearchCondition.order = orderColumns.order; | |
| 72 | + currentSearchCondition.direction = orderColumns.direction; | |
| 73 | + | |
| 47 | 74 | return currentSearchCondition; |
| 48 | 75 | }, |
| 49 | 76 | /** |
| ... | ... | @@ -236,8 +263,8 @@ angular.module('ScheduleApp').controller( |
| 236 | 263 | 'BusInfoManageListCtrl', |
| 237 | 264 | [ |
| 238 | 265 | 'BusInfoManageService', |
| 239 | - '$scope', | |
| 240 | - function(service, $scope) { | |
| 266 | + '$uibModal', | |
| 267 | + function(service, $uibModal) { | |
| 241 | 268 | var self = this; |
| 242 | 269 | var Cars = service.getQueryClass(); |
| 243 | 270 | |
| ... | ... | @@ -276,6 +303,51 @@ angular.module('ScheduleApp').controller( |
| 276 | 303 | }; |
| 277 | 304 | |
| 278 | 305 | self.doPage(); |
| 306 | + | |
| 307 | + self.customOrder = function() { | |
| 308 | + // large方式弹出模态对话框 | |
| 309 | + var modalInstance = $uibModal.open({ | |
| 310 | + templateUrl: '/pages/scheduleApp/module/basicInfo/busInfoManage/orderOptionOpen.html', | |
| 311 | + size: "sm", | |
| 312 | + animation: true, | |
| 313 | + backdrop: 'static', | |
| 314 | + resolve: { | |
| 315 | + }, | |
| 316 | + windowClass: 'center-modal', | |
| 317 | + controller: "BusInfoManageListOrderOptionModalInstanceCtrl", | |
| 318 | + controllerAs: "$ctrl", | |
| 319 | + bindToController: true | |
| 320 | + }); | |
| 321 | + modalInstance.result.then( | |
| 322 | + function(result) { | |
| 323 | + console.log("dataImport.html打开"); | |
| 324 | + }, | |
| 325 | + function() { | |
| 326 | + console.log("dataImport.html消失"); | |
| 327 | + } | |
| 328 | + ); | |
| 329 | + }; | |
| 330 | + } | |
| 331 | + ] | |
| 332 | +); | |
| 333 | + | |
| 334 | +angular.module('ScheduleApp').controller( | |
| 335 | + "BusInfoManageListOrderOptionModalInstanceCtrl", | |
| 336 | + [ | |
| 337 | + "BusInfoManageService", | |
| 338 | + "$modalInstance", | |
| 339 | + function(service, $modalInstance) { | |
| 340 | + var self = this; | |
| 341 | + | |
| 342 | + self.columns = service.getColumns(); | |
| 343 | + self.orderColumns = service.getOrderColumns(); | |
| 344 | + | |
| 345 | + self.confirm = function(result) { | |
| 346 | + // console.log(result); | |
| 347 | + // console.log(service.getOrderColumns()); | |
| 348 | + $modalInstance.dismiss("cancel"); | |
| 349 | + | |
| 350 | + } | |
| 279 | 351 | } |
| 280 | 352 | ] |
| 281 | 353 | ); | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/busInfoManage/orderOptionOpen.html
0 → 100644
| 1 | +<div class="modal-header"> | |
| 2 | + <div class="modal-title"> | |
| 3 | + <h3> | |
| 4 | + <i class="fa fa-sort-amount-asc" aria-hidden="true"></i> | |
| 5 | + <span class="caption-subject bold uppercase">排序字段选择</span> | |
| 6 | + </h3> | |
| 7 | + </div> | |
| 8 | +</div> | |
| 9 | +<div class="modal-body"> | |
| 10 | + <!--order={{$ctrl.orderColumns.order}}--> | |
| 11 | + <!--<br>--> | |
| 12 | + <!--direction={{$ctrl.orderColumns.direction}}--> | |
| 13 | + <sa-Orderoption name="orderOptions" columns="$ctrl.columns" ordercolumns="$ctrl.orderColumns"> | |
| 14 | + </sa-Orderoption> | |
| 15 | +</div> | |
| 16 | +<div class="modal-footer"> | |
| 17 | + <button class="btn btn-primary" ng-click="$ctrl.confirm($ctrl.orderColumns)">确定</button> | |
| 18 | +</div> | |
| 0 | 19 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/deviceInfoManage/index.html
| ... | ... | @@ -27,7 +27,7 @@ |
| 27 | 27 | <span class="caption-subject bold uppercase">设备信息表</span> |
| 28 | 28 | </div> |
| 29 | 29 | <div class="actions"> |
| 30 | - <a href="javascript:" class="btn btn-circle blue" ng-click="ctrl.goForm()"> | |
| 30 | + <a href="javascript:" class="btn blue" ng-click="ctrl.goForm()"> | |
| 31 | 31 | <i class="fa fa-plus"></i> |
| 32 | 32 | 添加设备信息 |
| 33 | 33 | </a> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/deviceInfoManage/list.html
| 1 | 1 | <!-- ui-route deviceInfoManage.list --> |
| 2 | 2 | <div ng-controller="DeviceInfoManageListCtrl as ctrl"> |
| 3 | + <style> | |
| 4 | + .dropdown-menu { | |
| 5 | + border-color: #32c5d2; | |
| 6 | + } | |
| 7 | + .btn-group > .dropdown-menu:before { | |
| 8 | + border-bottom-color: #32c5d2; | |
| 9 | + } | |
| 10 | + </style> | |
| 11 | + | |
| 12 | + | |
| 3 | 13 | <div style="width: 100%; height: 100%; overflow: auto"> |
| 4 | 14 | <table class="fixTable table table-striped table-bordered table-hover table-checkable order-column"> |
| 5 | 15 | <thead> |
| ... | ... | @@ -11,7 +21,6 @@ |
| 11 | 21 | <th>旧设备编号</th> |
| 12 | 22 | <th>新设备编号</th> |
| 13 | 23 | <th style="width: 180px;">操作人/操作时间</th> |
| 14 | - <th style="width: 80px;" >状态</th> | |
| 15 | 24 | <th style="width: 150pt;">操作</th> |
| 16 | 25 | </tr> |
| 17 | 26 | <tr role="row" class="filter"> |
| ... | ... | @@ -38,14 +47,24 @@ |
| 38 | 47 | <td></td> |
| 39 | 48 | <td></td> |
| 40 | 49 | <td> |
| 41 | - <label class="checkbox-inline input"> | |
| 42 | - <input type="checkbox" ng-model="ctrl.searchCondition()['isCancel_eq']" />已作废 | |
| 43 | - </label> | |
| 44 | - </td> | |
| 45 | - <td> | |
| 46 | - <button class="btn btn-sm green btn-outline filter-submit margin-bottom" | |
| 47 | - ng-click="ctrl.doPage()"> | |
| 48 | - <i class="fa fa-search"></i> 搜索</button> | |
| 50 | + <div class="btn-group"> | |
| 51 | + <button class="btn btn-sm green btn-outline filter-submit margin-bottom" style="margin-right: 0;" | |
| 52 | + ng-click="ctrl.doPage()"> | |
| 53 | + <i class="fa fa-search"></i> 搜索</button> | |
| 54 | + <button class="btn btn-sm green btn-outline filter-submit margin-bottom dropdown-toggle" | |
| 55 | + data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |
| 56 | + <span class="caret"></span> | |
| 57 | + <span class="sr-only">dropdown</span> | |
| 58 | + </button> | |
| 59 | + <ul class="dropdown-menu pull-right"> | |
| 60 | + <li> | |
| 61 | + <a href="javascript:" class="tool-action" ng-click="ctrl.customOrder()"> | |
| 62 | + <i class="fa fa-sort-amount-asc" aria-hidden="true"></i> | |
| 63 | + 排序选项 | |
| 64 | + </a> | |
| 65 | + </li> | |
| 66 | + </ul> | |
| 67 | + </div> | |
| 49 | 68 | |
| 50 | 69 | <button class="btn btn-sm red btn-outline filter-cancel" |
| 51 | 70 | ng-click="ctrl.reset()"> |
| ... | ... | @@ -94,10 +113,6 @@ |
| 94 | 113 | |
| 95 | 114 | </td> |
| 96 | 115 | <td> |
| 97 | - <span class="glyphicon glyphicon-ok" ng-if="info.isCancel == '0'"></span> | |
| 98 | - <span class="glyphicon glyphicon-remove" ng-if="info.isCancel == '1'"></span> | |
| 99 | - </td> | |
| 100 | - <td> | |
| 101 | 116 | <!--<a href="details.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm"> 详细 </a>--> |
| 102 | 117 | <!--<a href="edit.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm"> 修改 </a>--> |
| 103 | 118 | <a ui-sref="deviceInfoManage_detail({id: info.id})" class="btn btn-info btn-sm"> 详细 </a> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/deviceInfoManage/module.js
| ... | ... | @@ -20,6 +20,20 @@ angular.module('ScheduleApp').factory( |
| 20 | 20 | uiToRecord: 0 // 页面绑定,当前页到第几条记录 |
| 21 | 21 | }; |
| 22 | 22 | |
| 23 | + // 字段描述 | |
| 24 | + var columns = [ | |
| 25 | + {name: "xl", desc: "线路名称"}, | |
| 26 | + {name: "clZbh", desc: "车辆内部编号"}, | |
| 27 | + {name: "qyrq", desc: "启用日期"}, | |
| 28 | + {name: "oldDeviceNo", desc: "旧设备编号"}, | |
| 29 | + {name: "newDeviceNo", desc: "新终端号"} | |
| 30 | + ]; | |
| 31 | + // 排序字段 | |
| 32 | + var orderColumns = { | |
| 33 | + order: "xl,clZbh,qyrq", | |
| 34 | + direction: "ASC,ASC,DESC" | |
| 35 | + }; | |
| 36 | + | |
| 23 | 37 | // 查询对象 |
| 24 | 38 | var queryClass = service; |
| 25 | 39 | |
| ... | ... | @@ -27,6 +41,12 @@ angular.module('ScheduleApp').factory( |
| 27 | 41 | getQueryClass: function() { |
| 28 | 42 | return queryClass; |
| 29 | 43 | }, |
| 44 | + getColumns: function() { | |
| 45 | + return columns; | |
| 46 | + }, | |
| 47 | + getOrderColumns: function() { | |
| 48 | + return orderColumns; | |
| 49 | + }, | |
| 30 | 50 | getSearchCondition: function() { |
| 31 | 51 | currentSearchCondition.page = currentPage.uiNumber - 1; |
| 32 | 52 | |
| ... | ... | @@ -34,6 +54,10 @@ angular.module('ScheduleApp').factory( |
| 34 | 54 | currentSearchCondition["cgsbm_in"] = UserPrincipal.getGsStrs().join(","); |
| 35 | 55 | } |
| 36 | 56 | |
| 57 | + // 重置排序字段条件 | |
| 58 | + currentSearchCondition.order = orderColumns.order; | |
| 59 | + currentSearchCondition.direction = orderColumns.direction; | |
| 60 | + | |
| 37 | 61 | return currentSearchCondition; |
| 38 | 62 | }, |
| 39 | 63 | getPage: function(page) { |
| ... | ... | @@ -92,7 +116,8 @@ angular.module('ScheduleApp').controller( |
| 92 | 116 | 'DeviceInfoManageListCtrl', |
| 93 | 117 | [ |
| 94 | 118 | 'DeviceInfoManageService', |
| 95 | - function(service) { | |
| 119 | + '$uibModal', | |
| 120 | + function(service, $uibModal) { | |
| 96 | 121 | var self = this; |
| 97 | 122 | var CarDevice = service.getQueryClass(); |
| 98 | 123 | |
| ... | ... | @@ -127,11 +152,55 @@ angular.module('ScheduleApp').controller( |
| 127 | 152 | |
| 128 | 153 | self.doPage(); |
| 129 | 154 | |
| 155 | + self.customOrder = function() { | |
| 156 | + // large方式弹出模态对话框 | |
| 157 | + var modalInstance = $uibModal.open({ | |
| 158 | + templateUrl: '/pages/scheduleApp/module/basicInfo/deviceInfoManage/orderOptionOpen.html', | |
| 159 | + size: "sm", | |
| 160 | + animation: true, | |
| 161 | + backdrop: 'static', | |
| 162 | + resolve: { | |
| 163 | + }, | |
| 164 | + windowClass: 'center-modal', | |
| 165 | + controller: "DeviceInfoManageListOrderOptionModalInstanceCtrl", | |
| 166 | + controllerAs: "$ctrl", | |
| 167 | + bindToController: true | |
| 168 | + }); | |
| 169 | + modalInstance.result.then( | |
| 170 | + function(result) { | |
| 171 | + console.log("dataImport.html打开"); | |
| 172 | + }, | |
| 173 | + function() { | |
| 174 | + console.log("dataImport.html消失"); | |
| 175 | + } | |
| 176 | + ); | |
| 177 | + }; | |
| 130 | 178 | |
| 131 | 179 | } |
| 132 | 180 | ] |
| 133 | 181 | ); |
| 134 | 182 | |
| 183 | +angular.module('ScheduleApp').controller( | |
| 184 | + "DeviceInfoManageListOrderOptionModalInstanceCtrl", | |
| 185 | + [ | |
| 186 | + "DeviceInfoManageService", | |
| 187 | + "$modalInstance", | |
| 188 | + function(service, $modalInstance) { | |
| 189 | + var self = this; | |
| 190 | + | |
| 191 | + self.columns = service.getColumns(); | |
| 192 | + self.orderColumns = service.getOrderColumns(); | |
| 193 | + | |
| 194 | + self.confirm = function(result) { | |
| 195 | + // console.log(result); | |
| 196 | + // console.log(service.getOrderColumns()); | |
| 197 | + $modalInstance.dismiss("cancel"); | |
| 198 | + | |
| 199 | + } | |
| 200 | + } | |
| 201 | + ] | |
| 202 | +); | |
| 203 | + | |
| 135 | 204 | // form.html控制器 |
| 136 | 205 | angular.module('ScheduleApp').controller( |
| 137 | 206 | 'DeviceInfoManageFormCtrl', | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/deviceInfoManage/orderOptionOpen.html
0 → 100644
| 1 | +<div class="modal-header"> | |
| 2 | + <div class="modal-title"> | |
| 3 | + <h3> | |
| 4 | + <i class="fa fa-sort-amount-asc" aria-hidden="true"></i> | |
| 5 | + <span class="caption-subject bold uppercase">排序字段选择</span> | |
| 6 | + </h3> | |
| 7 | + </div> | |
| 8 | +</div> | |
| 9 | +<div class="modal-body"> | |
| 10 | + <!--order={{$ctrl.orderColumns.order}}--> | |
| 11 | + <!--<br>--> | |
| 12 | + <!--direction={{$ctrl.orderColumns.direction}}--> | |
| 13 | + <sa-Orderoption name="orderOptions" columns="$ctrl.columns" ordercolumns="$ctrl.orderColumns"> | |
| 14 | + </sa-Orderoption> | |
| 15 | +</div> | |
| 16 | +<div class="modal-footer"> | |
| 17 | + <button class="btn btn-primary" ng-click="$ctrl.confirm($ctrl.orderColumns)">确定</button> | |
| 18 | +</div> | |
| 0 | 19 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/deviceInfoManage/service.js
| ... | ... | @@ -2,7 +2,7 @@ |
| 2 | 2 | angular.module('ScheduleApp').factory('DeviceInfoManageService_g', ['$resource', function($resource) { |
| 3 | 3 | return $resource( |
| 4 | 4 | '/cde_sc/:id', |
| 5 | - {order: 'xl,isCancel,cl,qyrq', direction: 'ASC,ASC,ASC,DESC', id: '@id'}, | |
| 5 | + {order: 'xl,clZbh,qyrq', direction: 'ASC,ASC,DESC', id: '@id'}, | |
| 6 | 6 | { |
| 7 | 7 | list: { |
| 8 | 8 | method: 'GET', | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/employeeInfoManage/index.html
| ... | ... | @@ -20,6 +20,15 @@ |
| 20 | 20 | |
| 21 | 21 | <div class="row"> |
| 22 | 22 | <div class="col-md-12" ng-controller="EmployeeInfoManageCtrl as ctrl"> |
| 23 | + <style> | |
| 24 | + .dropdown-menu { | |
| 25 | + border-color: #32c5d2; | |
| 26 | + } | |
| 27 | + .btn-group > .dropdown-menu:before { | |
| 28 | + border-bottom-color: #32c5d2; | |
| 29 | + } | |
| 30 | + </style> | |
| 31 | + | |
| 23 | 32 | <div class="portlet light bordered"> |
| 24 | 33 | <div class="portlet-title"> |
| 25 | 34 | <div class="caption font-dark"> |
| ... | ... | @@ -27,13 +36,13 @@ |
| 27 | 36 | <span class="caption-subject bold uppercase">人员信息表</span> |
| 28 | 37 | </div> |
| 29 | 38 | <div class="actions"> |
| 30 | - <a href="javascript:" class="btn btn-circle blue" ng-click="ctrl.goForm()"> | |
| 39 | + <a href="javascript:" class="btn blue" ng-click="ctrl.goForm()"> | |
| 31 | 40 | <i class="fa fa-plus"></i> |
| 32 | 41 | 添加人员信息 |
| 33 | 42 | </a> |
| 34 | 43 | |
| 35 | 44 | <div class="btn-group"> |
| 36 | - <a href="javascript:" class="btn red btn-outline btn-circle" data-toggle="dropdown"> | |
| 45 | + <a href="javascript:" class="btn red btn-outline" data-toggle="dropdown"> | |
| 37 | 46 | <i class="fa fa-share"></i> |
| 38 | 47 | <span>数据工具</span> |
| 39 | 48 | <i class="fa fa-angle-down"></i> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/employeeInfoManage/list.html
| ... | ... | @@ -12,7 +12,7 @@ |
| 12 | 12 | <th style="width: 15%;">所在公司</th> |
| 13 | 13 | <th >分公司</th> |
| 14 | 14 | <th style="width: 20%;">工种</th> |
| 15 | - <th style="width: 21%">操作</th> | |
| 15 | + <th >操作</th> | |
| 16 | 16 | </tr> |
| 17 | 17 | <tr role="row" class="filter"> |
| 18 | 18 | <td> |
| ... | ... | @@ -73,16 +73,29 @@ |
| 73 | 73 | </sa-Select5> |
| 74 | 74 | </td> |
| 75 | 75 | <td> |
| 76 | - <div> | |
| 77 | - <button class="btn btn-sm green btn-outline filter-submit margin-bottom" | |
| 76 | + <div class="btn-group"> | |
| 77 | + <button class="btn btn-sm green btn-outline filter-submit margin-bottom" style="margin-right: 0;" | |
| 78 | 78 | ng-click="ctrl.doPage()"> |
| 79 | 79 | <i class="fa fa-search"></i> 搜索</button> |
| 80 | - | |
| 81 | - <button class="btn btn-sm red btn-outline filter-cancel" | |
| 82 | - ng-click="ctrl.reset()"> | |
| 83 | - <i class="fa fa-times"></i> 重置</button> | |
| 80 | + <button class="btn btn-sm green btn-outline filter-submit margin-bottom dropdown-toggle" | |
| 81 | + data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |
| 82 | + <span class="caret"></span> | |
| 83 | + <span class="sr-only">dropdown</span> | |
| 84 | + </button> | |
| 85 | + <ul class="dropdown-menu pull-right"> | |
| 86 | + <li> | |
| 87 | + <a href="javascript:" class="tool-action" ng-click="ctrl.customOrder()"> | |
| 88 | + <i class="fa fa-sort-amount-asc" aria-hidden="true"></i> | |
| 89 | + 排序选项 | |
| 90 | + </a> | |
| 91 | + </li> | |
| 92 | + </ul> | |
| 84 | 93 | </div> |
| 85 | 94 | |
| 95 | + <button class="btn btn-sm red btn-outline filter-cancel" | |
| 96 | + ng-click="ctrl.reset()"> | |
| 97 | + <i class="fa fa-times"></i> 重置</button> | |
| 98 | + | |
| 86 | 99 | </td> |
| 87 | 100 | |
| 88 | 101 | </tr> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/employeeInfoManage/module.js
| ... | ... | @@ -26,6 +26,21 @@ angular.module('ScheduleApp').factory( |
| 26 | 26 | uiToRecord: 0 // 页面绑定,当前页到第几条记录 |
| 27 | 27 | }; |
| 28 | 28 | |
| 29 | + // 字段描述 | |
| 30 | + var columns = [ | |
| 31 | + {name: "personnelName", desc: "姓名"}, | |
| 32 | + {name: "jobCodeori", desc: "工号"}, | |
| 33 | + {name: "personnelType", desc: "性别"}, | |
| 34 | + {name: "company", desc: "所在公司"}, | |
| 35 | + {name: "brancheCompany", desc: "分公司"}, | |
| 36 | + {name: "posts", desc: "工种"} | |
| 37 | + ]; | |
| 38 | + // 排序字段 | |
| 39 | + var orderColumns = { | |
| 40 | + order: "jobCodeori", | |
| 41 | + direction: "ASC" | |
| 42 | + }; | |
| 43 | + | |
| 29 | 44 | // 查询对象 |
| 30 | 45 | var queryClass = service.rest; |
| 31 | 46 | |
| ... | ... | @@ -33,6 +48,12 @@ angular.module('ScheduleApp').factory( |
| 33 | 48 | getQueryClass: function() { |
| 34 | 49 | return queryClass; |
| 35 | 50 | }, |
| 51 | + getColumns: function() { | |
| 52 | + return columns; | |
| 53 | + }, | |
| 54 | + getOrderColumns: function() { | |
| 55 | + return orderColumns; | |
| 56 | + }, | |
| 36 | 57 | /** |
| 37 | 58 | * 获取查询条件信息, |
| 38 | 59 | * 用于给controller用来和页面数据绑定。 |
| ... | ... | @@ -44,6 +65,10 @@ angular.module('ScheduleApp').factory( |
| 44 | 65 | currentSearchCondition["cgsbm_in"] = UserPrincipal.getGsStrs().join(","); |
| 45 | 66 | } |
| 46 | 67 | |
| 68 | + // 重置排序字段条件 | |
| 69 | + currentSearchCondition.order = orderColumns.order; | |
| 70 | + currentSearchCondition.direction = orderColumns.direction; | |
| 71 | + | |
| 47 | 72 | return currentSearchCondition; |
| 48 | 73 | }, |
| 49 | 74 | /** |
| ... | ... | @@ -214,7 +239,8 @@ angular.module('ScheduleApp').controller( |
| 214 | 239 | 'EmployeeInfoManageListCtrl', |
| 215 | 240 | [ |
| 216 | 241 | 'EmployeeInfoManageService', |
| 217 | - function(service) { | |
| 242 | + '$uibModal', | |
| 243 | + function(service, $uibModal) { | |
| 218 | 244 | var self = this; |
| 219 | 245 | var Employee = service.getQueryClass(); |
| 220 | 246 | |
| ... | ... | @@ -254,6 +280,51 @@ angular.module('ScheduleApp').controller( |
| 254 | 280 | |
| 255 | 281 | self.doPage(); |
| 256 | 282 | |
| 283 | + self.customOrder = function() { | |
| 284 | + // large方式弹出模态对话框 | |
| 285 | + var modalInstance = $uibModal.open({ | |
| 286 | + templateUrl: '/pages/scheduleApp/module/basicInfo/employeeInfoManage/orderOptionOpen.html', | |
| 287 | + size: "sm", | |
| 288 | + animation: true, | |
| 289 | + backdrop: 'static', | |
| 290 | + resolve: { | |
| 291 | + }, | |
| 292 | + windowClass: 'center-modal', | |
| 293 | + controller: "EmployeeInfoManageListOrderOptionModalInstanceCtrl", | |
| 294 | + controllerAs: "$ctrl", | |
| 295 | + bindToController: true | |
| 296 | + }); | |
| 297 | + modalInstance.result.then( | |
| 298 | + function(result) { | |
| 299 | + console.log("dataImport.html打开"); | |
| 300 | + }, | |
| 301 | + function() { | |
| 302 | + console.log("dataImport.html消失"); | |
| 303 | + } | |
| 304 | + ); | |
| 305 | + }; | |
| 306 | + | |
| 307 | + } | |
| 308 | + ] | |
| 309 | +); | |
| 310 | + | |
| 311 | +angular.module('ScheduleApp').controller( | |
| 312 | + "EmployeeInfoManageListOrderOptionModalInstanceCtrl", | |
| 313 | + [ | |
| 314 | + "EmployeeInfoManageService", | |
| 315 | + "$modalInstance", | |
| 316 | + function(service, $modalInstance) { | |
| 317 | + var self = this; | |
| 318 | + | |
| 319 | + self.columns = service.getColumns(); | |
| 320 | + self.orderColumns = service.getOrderColumns(); | |
| 321 | + | |
| 322 | + self.confirm = function(result) { | |
| 323 | + // console.log(result); | |
| 324 | + // console.log(service.getOrderColumns()); | |
| 325 | + $modalInstance.dismiss("cancel"); | |
| 326 | + | |
| 327 | + } | |
| 257 | 328 | } |
| 258 | 329 | ] |
| 259 | 330 | ); | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/employeeInfoManage/orderOptionOpen.html
0 → 100644
| 1 | +<div class="modal-header"> | |
| 2 | + <div class="modal-title"> | |
| 3 | + <h3> | |
| 4 | + <i class="fa fa-sort-amount-asc" aria-hidden="true"></i> | |
| 5 | + <span class="caption-subject bold uppercase">排序字段选择</span> | |
| 6 | + </h3> | |
| 7 | + </div> | |
| 8 | +</div> | |
| 9 | +<div class="modal-body"> | |
| 10 | + <!--order={{$ctrl.orderColumns.order}}--> | |
| 11 | + <!--<br>--> | |
| 12 | + <!--direction={{$ctrl.orderColumns.direction}}--> | |
| 13 | + <sa-Orderoption name="orderOptions" columns="$ctrl.columns" ordercolumns="$ctrl.orderColumns"> | |
| 14 | + </sa-Orderoption> | |
| 15 | +</div> | |
| 16 | +<div class="modal-footer"> | |
| 17 | + <button class="btn btn-primary" ng-click="$ctrl.confirm($ctrl.orderColumns)">确定</button> | |
| 18 | +</div> | |
| 0 | 19 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/employeeInfoManage/service.js
src/main/resources/static/pages/scheduleApp/module/common/dts2/queryOption/saOrderOption.js
0 → 100644
| 1 | +/** | |
| 2 | + * saOrderoption指令,搜索时的排序选项(在搜索时可以使用,通用的) | |
| 3 | + * 属性如下: | |
| 4 | + * name(必须):控件的名字 | |
| 5 | + * columns(必须,独立作用域):字段名字列表,格式:[{name:[字段名],desc:[字段描述]}...] | |
| 6 | + * ordercolumns(必须,独立作用域):字段排序列表,格式:{order: '字段1,字段2',direction: 'ASC,DESC'} | |
| 7 | + */ | |
| 8 | +angular.module('ScheduleApp').directive( | |
| 9 | + 'saOrderoption', | |
| 10 | + [ | |
| 11 | + function() { | |
| 12 | + return { | |
| 13 | + restrict: 'E', | |
| 14 | + templateUrl: '/pages/scheduleApp/module/common/dts2/queryOption/saOrderOptionTemplate.html', | |
| 15 | + scope: { | |
| 16 | + columns: '=', | |
| 17 | + ordercolumns: '=' | |
| 18 | + }, | |
| 19 | + controllerAs: '$saOrderOptionCtrl', | |
| 20 | + bindToController: true, | |
| 21 | + controller: function() { | |
| 22 | + var self = this; | |
| 23 | + | |
| 24 | + // 字段列表是否预载入 | |
| 25 | + self.$$columns_loaded = false; | |
| 26 | + // 字段排序是否预载入 | |
| 27 | + self.$$ordercolumns_loaded = false; | |
| 28 | + | |
| 29 | + | |
| 30 | + // 每组选项内部数据源 | |
| 31 | + // 格式:[{column:[选中的字段名],dir:[ASC/DESC]}] | |
| 32 | + self.$$selectgroupds = []; | |
| 33 | + | |
| 34 | + // TODO:选择事件 | |
| 35 | + | |
| 36 | + self.$$select_column_change = function() { | |
| 37 | + self.$$refresh_selectgroupds(); | |
| 38 | + }; | |
| 39 | + | |
| 40 | + self.$$select_dir_change = function() { | |
| 41 | + self.$$refresh_selectgroupds(); | |
| 42 | + }; | |
| 43 | + | |
| 44 | + self.$$add_option_click = function(index) { | |
| 45 | + self.$$selectgroupds.splice(index, 0, { | |
| 46 | + column: self.columns[0].name, | |
| 47 | + dir: "ASC" | |
| 48 | + }); | |
| 49 | + self.$$refresh_selectgroupds(); | |
| 50 | + }; | |
| 51 | + self.$$del_option_click = function(index) { | |
| 52 | + self.$$selectgroupds.splice(index, 1); | |
| 53 | + self.$$refresh_selectgroupds(); | |
| 54 | + }; | |
| 55 | + | |
| 56 | + // 刷新选项内部数据源 | |
| 57 | + self.$$refresh_selectgroupds = function() { | |
| 58 | + if (!self.$$columns_loaded || !self.$$ordercolumns_loaded || self.columns.length == 0) { | |
| 59 | + // 没有载入完成,或者字段列表为空 | |
| 60 | + return; | |
| 61 | + } | |
| 62 | + | |
| 63 | + if (self.$$selectgroupds.length == 0) { // 默认添加一组排序 | |
| 64 | + self.$$selectgroupds.push({ | |
| 65 | + column: self.columns[0].name, | |
| 66 | + dir: "ASC" | |
| 67 | + }); | |
| 68 | + } | |
| 69 | + | |
| 70 | + // 重新计算ordercolumns | |
| 71 | + | |
| 72 | + var aColumn = []; | |
| 73 | + var aDir = []; | |
| 74 | + for (var i = 0; i < self.$$selectgroupds.length; i++) { | |
| 75 | + aColumn.push(self.$$selectgroupds[i].column); | |
| 76 | + aDir.push(self.$$selectgroupds[i].dir); | |
| 77 | + } | |
| 78 | + if (self.ordercolumns) { | |
| 79 | + self.ordercolumns.order = aColumn.join(","); | |
| 80 | + self.ordercolumns.direction = aDir.join(","); | |
| 81 | + } else { | |
| 82 | + self.ordercolumns = {order: aColumn.join(","), direction: aDir.join(",")} | |
| 83 | + } | |
| 84 | + | |
| 85 | + } | |
| 86 | + }, | |
| 87 | + compile: function(tElem, tAttrs) { | |
| 88 | + // 获取所有属性,并验证 | |
| 89 | + var $name_attr = tAttrs['name']; // 控件的名字 | |
| 90 | + if (!$name_attr) { | |
| 91 | + throw "必须有名称属性"; | |
| 92 | + } | |
| 93 | + | |
| 94 | + // controlAs名字 | |
| 95 | + var ctrlAs = '$saOrderOptionCtrl'; | |
| 96 | + | |
| 97 | + // TODO: | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + return { | |
| 102 | + pre: function(scope, element, attr) { | |
| 103 | + | |
| 104 | + }, | |
| 105 | + | |
| 106 | + post: function(scope, element, attr) { | |
| 107 | + | |
| 108 | + //--------------------- 监控属性方法 -------------------// | |
| 109 | + // 监控字段名字列表 | |
| 110 | + scope.$watch( | |
| 111 | + function() { | |
| 112 | + return scope[ctrlAs].columns; | |
| 113 | + }, | |
| 114 | + function(newValue, oldValue) { | |
| 115 | + if (!scope[ctrlAs].$$columns_loaded) { | |
| 116 | + // TODO:格式判定以后做,假设格式是对的 | |
| 117 | + | |
| 118 | + | |
| 119 | + } | |
| 120 | + | |
| 121 | + scope[ctrlAs].$$columns_loaded = true; | |
| 122 | + scope[ctrlAs].$$refresh_selectgroupds(); | |
| 123 | + }, | |
| 124 | + true | |
| 125 | + ); | |
| 126 | + // 监控字段排序列表 | |
| 127 | + scope.$watch( | |
| 128 | + function() { | |
| 129 | + return scope[ctrlAs].ordercolumns; | |
| 130 | + }, | |
| 131 | + function(newValue, oldValue) { | |
| 132 | + if (!scope[ctrlAs].$$ordercolumns_loaded) { | |
| 133 | + if (newValue) { | |
| 134 | + var aColumns = []; // 排序的字段 | |
| 135 | + var aDirs = []; // 排序字段对应的排序方向 | |
| 136 | + | |
| 137 | + if (newValue.order) { | |
| 138 | + aColumns = newValue.order.split(","); | |
| 139 | + } | |
| 140 | + if (newValue.direction) { | |
| 141 | + aDirs = newValue.direction.split(","); | |
| 142 | + } | |
| 143 | + | |
| 144 | + for (var i = 0; i < aColumns.length; i++) { | |
| 145 | + if (i < aDirs.length) { | |
| 146 | + scope[ctrlAs].$$selectgroupds.push({ | |
| 147 | + column: aColumns[i], | |
| 148 | + dir: aDirs[i] | |
| 149 | + }); | |
| 150 | + } else { | |
| 151 | + scope[ctrlAs].$$selectgroupds.push({ | |
| 152 | + column: aColumns[i], | |
| 153 | + dir: 'ASC' | |
| 154 | + }); | |
| 155 | + } | |
| 156 | + } | |
| 157 | + } | |
| 158 | + } | |
| 159 | + scope[ctrlAs].$$ordercolumns_loaded = true; | |
| 160 | + scope[ctrlAs].$$refresh_selectgroupds(); | |
| 161 | + | |
| 162 | + }, | |
| 163 | + true | |
| 164 | + ); | |
| 165 | + } | |
| 166 | + | |
| 167 | + }; | |
| 168 | + } | |
| 169 | + }; | |
| 170 | + } | |
| 171 | + ] | |
| 172 | +); | |
| 0 | 173 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/common/dts2/queryOption/saOrderOptionTemplate.html
0 → 100644
| 1 | +<style> | |
| 2 | + .option_panel { | |
| 3 | + height: 100%; | |
| 4 | + margin: 0; | |
| 5 | + padding: 0; | |
| 6 | + } | |
| 7 | + .option_panel .detail-wrap { | |
| 8 | + padding: 0; | |
| 9 | + max-height: 300px; | |
| 10 | + border: 1px solid #ddd; | |
| 11 | + background: #fafafa; | |
| 12 | + border-radius: 10px !important; | |
| 13 | + moz-user-select: -moz-none; | |
| 14 | + -moz-user-select: none; | |
| 15 | + -o-user-select: none; | |
| 16 | + -khtml-user-select: none; | |
| 17 | + -webkit-user-select: none; | |
| 18 | + -ms-user-select: none; | |
| 19 | + user-select: none; | |
| 20 | + overflow: auto; | |
| 21 | + } | |
| 22 | + | |
| 23 | + .option_panel .detail-wrap > .option { | |
| 24 | + margin-top: 5px; | |
| 25 | + } | |
| 26 | + | |
| 27 | + .option_panel .detail-wrap > .option:nth-last-child(1) { | |
| 28 | + margin-bottom: 5px; | |
| 29 | + } | |
| 30 | + | |
| 31 | + .option_panel .detail-wrap > .option .option_column { | |
| 32 | + padding-left: 3px; | |
| 33 | + padding-right: 5px; | |
| 34 | + } | |
| 35 | + .option_panel .detail-wrap > .option .option_dir { | |
| 36 | + padding-left: 0px; | |
| 37 | + padding-right: 5px; | |
| 38 | + } | |
| 39 | + .option_panel .detail-wrap > .option .option_opt { | |
| 40 | + width: 70px; | |
| 41 | + padding-left: 0px; | |
| 42 | + padding-right: 0px; | |
| 43 | + } | |
| 44 | + | |
| 45 | + .option_panel .detail-wrap .option .form-control { | |
| 46 | + font-size: 10px; | |
| 47 | + } | |
| 48 | + | |
| 49 | + | |
| 50 | + .option_scrollbar::-webkit-scrollbar { | |
| 51 | + width: 18px; | |
| 52 | + height: 18px; | |
| 53 | + } | |
| 54 | + | |
| 55 | + .option_scrollbar::-webkit-scrollbar-track, ::-webkit-scrollbar-thumb { | |
| 56 | + border-radius: 999px; | |
| 57 | + border: 5px solid transparent; | |
| 58 | + } | |
| 59 | + | |
| 60 | + .option_scrollbar::-webkit-scrollbar-track { | |
| 61 | + box-shadow: 1px 1px 5px rgba(0, 0, 0, .2) inset; | |
| 62 | + } | |
| 63 | + | |
| 64 | + .option_scrollbar::-webkit-scrollbar-thumb { | |
| 65 | + min-height: 20px; | |
| 66 | + background-clip: content-box; | |
| 67 | + box-shadow: 0 0 0 5px rgba(0, 0, 0, .2) inset; | |
| 68 | + } | |
| 69 | + | |
| 70 | + .option_scrollbar::-webkit-scrollbar-corner { | |
| 71 | + background: transparent; | |
| 72 | + } | |
| 73 | + | |
| 74 | +</style> | |
| 75 | + | |
| 76 | +<div> | |
| 77 | + <div class="option_panel"> | |
| 78 | + <div class="detail-wrap option_scrollbar"> | |
| 79 | + | |
| 80 | + <div class="col-md-12 option" ng-repeat="$option in $saOrderOptionCtrl.$$selectgroupds track by $index" ng-init="rowIndex = $index"> | |
| 81 | + <div class="col-md-5 option_column"> | |
| 82 | + <select class="form-control aria-invalid="false" ng-model="$option.column" ng-change="$saOrderOptionCtrl.$$select_column_change()"> | |
| 83 | + <option ng-repeat="$column in $saOrderOptionCtrl.columns track by $index" | |
| 84 | + ng-init="colIndex = $index" | |
| 85 | + ng-selected="$option.column==$column.name" | |
| 86 | + value="{{$column.name}}"> | |
| 87 | + {{$column.desc}} | |
| 88 | + </option> | |
| 89 | + </select> | |
| 90 | + </div> | |
| 91 | + <div class="col-md-3 option_dir"> | |
| 92 | + <select class="form-control aria-invalid="false" ng-model="$option.dir" ng-change="$saOrderOptionCtrl.$$select_dir_change()"> | |
| 93 | + <option value="ASC" ng-selected="$option.dir=='ASC'">升序</option> | |
| 94 | + <option value="DESC" ng-selected="$option.dir=='DESC'">降序</option> | |
| 95 | + </select> | |
| 96 | + </div> | |
| 97 | + <div class="col-md-3 btn-group option_opt"> | |
| 98 | + <button type="button" class="btn btn-default" ng-click="$saOrderOptionCtrl.$$add_option_click(rowIndex)">+</button> | |
| 99 | + <button type="button" class="btn btn-default" ng-click="$saOrderOptionCtrl.$$del_option_click(rowIndex)">-</button> | |
| 100 | + </div> | |
| 101 | + | |
| 102 | + </div> | |
| 103 | + | |
| 104 | + | |
| 105 | + </div> | |
| 106 | + | |
| 107 | + | |
| 108 | + </div> | |
| 109 | + | |
| 110 | +</div> | |
| 0 | 111 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/common/prj-common-directive.js
| ... | ... | @@ -4451,6 +4451,178 @@ angular.module('ScheduleApp').directive( |
| 4451 | 4451 | } |
| 4452 | 4452 | ] |
| 4453 | 4453 | ); |
| 4454 | +/** | |
| 4455 | + * saOrderoption指令,搜索时的排序选项(在搜索时可以使用,通用的) | |
| 4456 | + * 属性如下: | |
| 4457 | + * name(必须):控件的名字 | |
| 4458 | + * columns(必须,独立作用域):字段名字列表,格式:[{name:[字段名],desc:[字段描述]}...] | |
| 4459 | + * ordercolumns(必须,独立作用域):字段排序列表,格式:{order: '字段1,字段2',direction: 'ASC,DESC'} | |
| 4460 | + */ | |
| 4461 | +angular.module('ScheduleApp').directive( | |
| 4462 | + 'saOrderoption', | |
| 4463 | + [ | |
| 4464 | + function() { | |
| 4465 | + return { | |
| 4466 | + restrict: 'E', | |
| 4467 | + templateUrl: '/pages/scheduleApp/module/common/dts2/queryOption/saOrderOptionTemplate.html', | |
| 4468 | + scope: { | |
| 4469 | + columns: '=', | |
| 4470 | + ordercolumns: '=' | |
| 4471 | + }, | |
| 4472 | + controllerAs: '$saOrderOptionCtrl', | |
| 4473 | + bindToController: true, | |
| 4474 | + controller: function() { | |
| 4475 | + var self = this; | |
| 4476 | + | |
| 4477 | + // 字段列表是否预载入 | |
| 4478 | + self.$$columns_loaded = false; | |
| 4479 | + // 字段排序是否预载入 | |
| 4480 | + self.$$ordercolumns_loaded = false; | |
| 4481 | + | |
| 4482 | + | |
| 4483 | + // 每组选项内部数据源 | |
| 4484 | + // 格式:[{column:[选中的字段名],dir:[ASC/DESC]}] | |
| 4485 | + self.$$selectgroupds = []; | |
| 4486 | + | |
| 4487 | + // TODO:选择事件 | |
| 4488 | + | |
| 4489 | + self.$$select_column_change = function() { | |
| 4490 | + self.$$refresh_selectgroupds(); | |
| 4491 | + }; | |
| 4492 | + | |
| 4493 | + self.$$select_dir_change = function() { | |
| 4494 | + self.$$refresh_selectgroupds(); | |
| 4495 | + }; | |
| 4496 | + | |
| 4497 | + self.$$add_option_click = function(index) { | |
| 4498 | + self.$$selectgroupds.splice(index, 0, { | |
| 4499 | + column: self.columns[0].name, | |
| 4500 | + dir: "ASC" | |
| 4501 | + }); | |
| 4502 | + self.$$refresh_selectgroupds(); | |
| 4503 | + }; | |
| 4504 | + self.$$del_option_click = function(index) { | |
| 4505 | + self.$$selectgroupds.splice(index, 1); | |
| 4506 | + self.$$refresh_selectgroupds(); | |
| 4507 | + }; | |
| 4508 | + | |
| 4509 | + // 刷新选项内部数据源 | |
| 4510 | + self.$$refresh_selectgroupds = function() { | |
| 4511 | + if (!self.$$columns_loaded || !self.$$ordercolumns_loaded || self.columns.length == 0) { | |
| 4512 | + // 没有载入完成,或者字段列表为空 | |
| 4513 | + return; | |
| 4514 | + } | |
| 4515 | + | |
| 4516 | + if (self.$$selectgroupds.length == 0) { // 默认添加一组排序 | |
| 4517 | + self.$$selectgroupds.push({ | |
| 4518 | + column: self.columns[0].name, | |
| 4519 | + dir: "ASC" | |
| 4520 | + }); | |
| 4521 | + } | |
| 4522 | + | |
| 4523 | + // 重新计算ordercolumns | |
| 4524 | + | |
| 4525 | + var aColumn = []; | |
| 4526 | + var aDir = []; | |
| 4527 | + for (var i = 0; i < self.$$selectgroupds.length; i++) { | |
| 4528 | + aColumn.push(self.$$selectgroupds[i].column); | |
| 4529 | + aDir.push(self.$$selectgroupds[i].dir); | |
| 4530 | + } | |
| 4531 | + if (self.ordercolumns) { | |
| 4532 | + self.ordercolumns.order = aColumn.join(","); | |
| 4533 | + self.ordercolumns.direction = aDir.join(","); | |
| 4534 | + } else { | |
| 4535 | + self.ordercolumns = {order: aColumn.join(","), direction: aDir.join(",")} | |
| 4536 | + } | |
| 4537 | + | |
| 4538 | + } | |
| 4539 | + }, | |
| 4540 | + compile: function(tElem, tAttrs) { | |
| 4541 | + // 获取所有属性,并验证 | |
| 4542 | + var $name_attr = tAttrs['name']; // 控件的名字 | |
| 4543 | + if (!$name_attr) { | |
| 4544 | + throw "必须有名称属性"; | |
| 4545 | + } | |
| 4546 | + | |
| 4547 | + // controlAs名字 | |
| 4548 | + var ctrlAs = '$saOrderOptionCtrl'; | |
| 4549 | + | |
| 4550 | + // TODO: | |
| 4551 | + | |
| 4552 | + | |
| 4553 | + | |
| 4554 | + return { | |
| 4555 | + pre: function(scope, element, attr) { | |
| 4556 | + | |
| 4557 | + }, | |
| 4558 | + | |
| 4559 | + post: function(scope, element, attr) { | |
| 4560 | + | |
| 4561 | + //--------------------- 监控属性方法 -------------------// | |
| 4562 | + // 监控字段名字列表 | |
| 4563 | + scope.$watch( | |
| 4564 | + function() { | |
| 4565 | + return scope[ctrlAs].columns; | |
| 4566 | + }, | |
| 4567 | + function(newValue, oldValue) { | |
| 4568 | + if (!scope[ctrlAs].$$columns_loaded) { | |
| 4569 | + // TODO:格式判定以后做,假设格式是对的 | |
| 4570 | + | |
| 4571 | + | |
| 4572 | + } | |
| 4573 | + | |
| 4574 | + scope[ctrlAs].$$columns_loaded = true; | |
| 4575 | + scope[ctrlAs].$$refresh_selectgroupds(); | |
| 4576 | + }, | |
| 4577 | + true | |
| 4578 | + ); | |
| 4579 | + // 监控字段排序列表 | |
| 4580 | + scope.$watch( | |
| 4581 | + function() { | |
| 4582 | + return scope[ctrlAs].ordercolumns; | |
| 4583 | + }, | |
| 4584 | + function(newValue, oldValue) { | |
| 4585 | + if (!scope[ctrlAs].$$ordercolumns_loaded) { | |
| 4586 | + if (newValue) { | |
| 4587 | + var aColumns = []; // 排序的字段 | |
| 4588 | + var aDirs = []; // 排序字段对应的排序方向 | |
| 4589 | + | |
| 4590 | + if (newValue.order) { | |
| 4591 | + aColumns = newValue.order.split(","); | |
| 4592 | + } | |
| 4593 | + if (newValue.direction) { | |
| 4594 | + aDirs = newValue.direction.split(","); | |
| 4595 | + } | |
| 4596 | + | |
| 4597 | + for (var i = 0; i < aColumns.length; i++) { | |
| 4598 | + if (i < aDirs.length) { | |
| 4599 | + scope[ctrlAs].$$selectgroupds.push({ | |
| 4600 | + column: aColumns[i], | |
| 4601 | + dir: aDirs[i] | |
| 4602 | + }); | |
| 4603 | + } else { | |
| 4604 | + scope[ctrlAs].$$selectgroupds.push({ | |
| 4605 | + column: aColumns[i], | |
| 4606 | + dir: 'ASC' | |
| 4607 | + }); | |
| 4608 | + } | |
| 4609 | + } | |
| 4610 | + } | |
| 4611 | + } | |
| 4612 | + scope[ctrlAs].$$ordercolumns_loaded = true; | |
| 4613 | + scope[ctrlAs].$$refresh_selectgroupds(); | |
| 4614 | + | |
| 4615 | + }, | |
| 4616 | + true | |
| 4617 | + ); | |
| 4618 | + } | |
| 4619 | + | |
| 4620 | + }; | |
| 4621 | + } | |
| 4622 | + }; | |
| 4623 | + } | |
| 4624 | + ] | |
| 4625 | +); | |
| 4454 | 4626 | /** |
| 4455 | 4627 | * saScpdate指令(非通用指令,只在排班计划form中使用)。 |
| 4456 | 4628 | * 属性如下: | ... | ... |
src/main/resources/static/pages/scheduleApp/module/common/prj-common-globalservice.js
| ... | ... | @@ -84,7 +84,7 @@ angular.module('ScheduleApp').factory( |
| 84 | 84 | angular.module('ScheduleApp').factory('DeviceInfoManageService_g', ['$resource', function($resource) { |
| 85 | 85 | return $resource( |
| 86 | 86 | '/cde_sc/:id', |
| 87 | - {order: 'xl,isCancel,cl,qyrq', direction: 'ASC,ASC,ASC,DESC', id: '@id'}, | |
| 87 | + {order: 'xl,clZbh,qyrq', direction: 'ASC,ASC,DESC', id: '@id'}, | |
| 88 | 88 | { |
| 89 | 89 | list: { |
| 90 | 90 | method: 'GET', |
| ... | ... | @@ -129,7 +129,7 @@ angular.module('ScheduleApp').factory( |
| 129 | 129 | return { |
| 130 | 130 | rest : $resource( |
| 131 | 131 | '/ee/:id', |
| 132 | - {order: 'jobCode', direction: 'ASC', id: '@id'}, | |
| 132 | + {order: 'jobCodeori', direction: 'ASC', id: '@id'}, | |
| 133 | 133 | { |
| 134 | 134 | list: { |
| 135 | 135 | method: 'GET', |
| ... | ... | @@ -189,7 +189,7 @@ angular.module('ScheduleApp').factory('BusConfigService_g', ['$resource', 'UserP |
| 189 | 189 | return { |
| 190 | 190 | rest : $resource( |
| 191 | 191 | '/cci/:id', |
| 192 | - {order: 'xl.id,cl.insideCode,isCancel', direction: 'ASC', id: '@id'}, | |
| 192 | + {order: 'xl.name,cl.insideCode,isCancel', direction: 'ASC', id: '@id'}, | |
| 193 | 193 | { |
| 194 | 194 | list: { |
| 195 | 195 | method: 'GET', |
| ... | ... | @@ -260,7 +260,7 @@ angular.module('ScheduleApp').factory('EmployeeConfigService_g', ['$resource', f |
| 260 | 260 | return { |
| 261 | 261 | rest : $resource( |
| 262 | 262 | '/eci/:id', |
| 263 | - {order: 'xl.id,isCancel,dbbmFormula', direction: 'ASC', id: '@id'}, | |
| 263 | + {order: 'xl.name,isCancel,dbbmFormula', direction: 'ASC', id: '@id'}, | |
| 264 | 264 | { |
| 265 | 265 | list: { |
| 266 | 266 | method: 'GET', |
| ... | ... | @@ -459,7 +459,7 @@ angular.module('ScheduleApp').factory('SchedulePlanManageService_g', ['$resource |
| 459 | 459 | return { |
| 460 | 460 | rest : $resource( |
| 461 | 461 | '/spc/:id', |
| 462 | - {order: 'xl.id,createDate', direction: 'DESC,DESC', id: '@id'}, | |
| 462 | + {order: 'xl.name,createDate', direction: 'DESC,DESC', id: '@id'}, | |
| 463 | 463 | { |
| 464 | 464 | list: { |
| 465 | 465 | method: 'GET', |
| ... | ... | @@ -627,7 +627,7 @@ angular.module('ScheduleApp').factory('ScheduleRuleManageService_g', ['$resource |
| 627 | 627 | return { |
| 628 | 628 | rest: $resource( |
| 629 | 629 | '/sr1fc/:id', |
| 630 | - {order: 'xl.id,updateDate,carConfigInfo.cl.insideCode', direction: 'ASC,DESC,ASC', id: '@id'}, | |
| 630 | + {order: 'xl.name,updateDate,carConfigInfo.cl.insideCode', direction: 'ASC,DESC,ASC', id: '@id'}, | |
| 631 | 631 | { |
| 632 | 632 | list: { |
| 633 | 633 | method: 'GET', |
| ... | ... | @@ -690,7 +690,7 @@ angular.module('ScheduleApp').factory( |
| 690 | 690 | return { |
| 691 | 691 | rest: $resource( |
| 692 | 692 | '/tic_ec/:id', |
| 693 | - {order: 'xl,isCancel,isEnableDisTemplate,qyrq', direction: 'DESC,ASC,DESC,DESC', id: '@id'}, | |
| 693 | + {order: 'xl.name,isCancel,isEnableDisTemplate,qyrq', direction: 'DESC,ASC,DESC,DESC', id: '@id'}, | |
| 694 | 694 | { |
| 695 | 695 | list: { |
| 696 | 696 | method: 'GET', | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/busConfig/index.html
| ... | ... | @@ -20,6 +20,15 @@ |
| 20 | 20 | |
| 21 | 21 | <div class="row"> |
| 22 | 22 | <div class="col-md-12" ng-controller="BusConfigCtrl as ctrl"> |
| 23 | + <style> | |
| 24 | + .dropdown-menu { | |
| 25 | + border-color: #32c5d2; | |
| 26 | + } | |
| 27 | + .btn-group > .dropdown-menu:before { | |
| 28 | + border-bottom-color: #32c5d2; | |
| 29 | + } | |
| 30 | + </style> | |
| 31 | + | |
| 23 | 32 | <div class="portlet light bordered"> |
| 24 | 33 | <div class="portlet-title"> |
| 25 | 34 | <div class="caption font-dark"> |
| ... | ... | @@ -27,13 +36,13 @@ |
| 27 | 36 | <span class="caption-subject bold uppercase">配置表</span> |
| 28 | 37 | </div> |
| 29 | 38 | <div class="actions"> |
| 30 | - <a href="javascript:" class="btn btn-circle blue" ng-click="ctrl.goForm()"> | |
| 39 | + <a href="javascript:" class="btn blue" ng-click="ctrl.goForm()"> | |
| 31 | 40 | <i class="fa fa-plus"></i> |
| 32 | 41 | 添加配置 |
| 33 | 42 | </a> |
| 34 | 43 | |
| 35 | 44 | <div class="btn-group"> |
| 36 | - <a href="javascript:" class="btn red btn-outline btn-circle" data-toggle="dropdown"> | |
| 45 | + <a href="javascript:" class="btn red btn-outline" data-toggle="dropdown"> | |
| 37 | 46 | <i class="fa fa-share"></i> |
| 38 | 47 | <span>数据工具</span> |
| 39 | 48 | <i class="fa fa-angle-down"></i> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/busConfig/list.html
| ... | ... | @@ -75,9 +75,24 @@ |
| 75 | 75 | </label> |
| 76 | 76 | </td> |
| 77 | 77 | <td> |
| 78 | - <button class="btn btn-sm green btn-outline filter-submit margin-bottom" | |
| 79 | - ng-click="ctrl.doPage()"> | |
| 80 | - <i class="fa fa-search"></i> 搜索</button> | |
| 78 | + <div class="btn-group"> | |
| 79 | + <button class="btn btn-sm green btn-outline filter-submit margin-bottom" style="margin-right: 0;" | |
| 80 | + ng-click="ctrl.doPage()"> | |
| 81 | + <i class="fa fa-search"></i> 搜索</button> | |
| 82 | + <button class="btn btn-sm green btn-outline filter-submit margin-bottom dropdown-toggle" | |
| 83 | + data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |
| 84 | + <span class="caret"></span> | |
| 85 | + <span class="sr-only">dropdown</span> | |
| 86 | + </button> | |
| 87 | + <ul class="dropdown-menu pull-right"> | |
| 88 | + <li> | |
| 89 | + <a href="javascript:" class="tool-action" ng-click="ctrl.customOrder()"> | |
| 90 | + <i class="fa fa-sort-amount-asc" aria-hidden="true"></i> | |
| 91 | + 排序选项 | |
| 92 | + </a> | |
| 93 | + </li> | |
| 94 | + </ul> | |
| 95 | + </div> | |
| 81 | 96 | |
| 82 | 97 | <button class="btn btn-sm red btn-outline filter-cancel" |
| 83 | 98 | ng-click="ctrl.reset()"> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/busConfig/module.js
| ... | ... | @@ -19,6 +19,22 @@ angular.module('ScheduleApp').factory( |
| 19 | 19 | uiToRecord: 0 // 页面绑定,当前页到第几条记录 |
| 20 | 20 | }; |
| 21 | 21 | |
| 22 | + // 字段描述 | |
| 23 | + var columns = [ | |
| 24 | + {name: "xl.name", desc: "线路名称"}, | |
| 25 | + {name: "company", desc: "所在公司"}, | |
| 26 | + {name: "brancheCompany", desc: "分公司"}, | |
| 27 | + {name: "cl.insideCode", desc: "内部编号"}, | |
| 28 | + {name: "equipmentCode", desc: "设备编号"}, | |
| 29 | + {name: "qyrq", desc: "启用日期"}, | |
| 30 | + {name: "isCancel", desc: "是否作废"} | |
| 31 | + ]; | |
| 32 | + // 排序字段 | |
| 33 | + var orderColumns = { | |
| 34 | + order: "xl.name,cl.insideCode,isCancel", | |
| 35 | + direction: "ASC,ASC,ASC" | |
| 36 | + }; | |
| 37 | + | |
| 22 | 38 | // 查询对象 |
| 23 | 39 | var queryClass = service.rest; |
| 24 | 40 | |
| ... | ... | @@ -26,6 +42,12 @@ angular.module('ScheduleApp').factory( |
| 26 | 42 | getQueryClass: function() { |
| 27 | 43 | return queryClass; |
| 28 | 44 | }, |
| 45 | + getColumns: function() { | |
| 46 | + return columns; | |
| 47 | + }, | |
| 48 | + getOrderColumns: function() { | |
| 49 | + return orderColumns; | |
| 50 | + }, | |
| 29 | 51 | /** |
| 30 | 52 | * 获取查询条件信息, |
| 31 | 53 | * 用于给controller用来和页面数据绑定。 |
| ... | ... | @@ -38,6 +60,10 @@ angular.module('ScheduleApp').factory( |
| 38 | 60 | currentSearchCondition["xl.cgsbm_in"] = UserPrincipal.getGsStrs().join(","); |
| 39 | 61 | } |
| 40 | 62 | |
| 63 | + // 重置排序字段条件 | |
| 64 | + currentSearchCondition.order = orderColumns.order; | |
| 65 | + currentSearchCondition.direction = orderColumns.direction; | |
| 66 | + | |
| 41 | 67 | return currentSearchCondition; |
| 42 | 68 | }, |
| 43 | 69 | /** |
| ... | ... | @@ -193,7 +219,8 @@ angular.module('ScheduleApp').controller( |
| 193 | 219 | 'BusConfigListCtrl', |
| 194 | 220 | [ |
| 195 | 221 | 'BusConfigService', |
| 196 | - function(service) { | |
| 222 | + '$uibModal', | |
| 223 | + function(service, $uibModal) { | |
| 197 | 224 | var self = this; |
| 198 | 225 | var BusConfig = service.getQueryClass(); |
| 199 | 226 | |
| ... | ... | @@ -228,6 +255,51 @@ angular.module('ScheduleApp').controller( |
| 228 | 255 | |
| 229 | 256 | self.doPage(); |
| 230 | 257 | |
| 258 | + self.customOrder = function() { | |
| 259 | + // large方式弹出模态对话框 | |
| 260 | + var modalInstance = $uibModal.open({ | |
| 261 | + templateUrl: '/pages/scheduleApp/module/core/busConfig/orderOptionOpen.html', | |
| 262 | + size: "sm", | |
| 263 | + animation: true, | |
| 264 | + backdrop: 'static', | |
| 265 | + resolve: { | |
| 266 | + }, | |
| 267 | + windowClass: 'center-modal', | |
| 268 | + controller: "BusConfigListOrderOptionModalInstanceCtrl", | |
| 269 | + controllerAs: "$ctrl", | |
| 270 | + bindToController: true | |
| 271 | + }); | |
| 272 | + modalInstance.result.then( | |
| 273 | + function(result) { | |
| 274 | + console.log("dataImport.html打开"); | |
| 275 | + }, | |
| 276 | + function() { | |
| 277 | + console.log("dataImport.html消失"); | |
| 278 | + } | |
| 279 | + ); | |
| 280 | + }; | |
| 281 | + | |
| 282 | + } | |
| 283 | + ] | |
| 284 | +); | |
| 285 | + | |
| 286 | +angular.module('ScheduleApp').controller( | |
| 287 | + "BusConfigListOrderOptionModalInstanceCtrl", | |
| 288 | + [ | |
| 289 | + "BusConfigService", | |
| 290 | + "$modalInstance", | |
| 291 | + function(service, $modalInstance) { | |
| 292 | + var self = this; | |
| 293 | + | |
| 294 | + self.columns = service.getColumns(); | |
| 295 | + self.orderColumns = service.getOrderColumns(); | |
| 296 | + | |
| 297 | + self.confirm = function(result) { | |
| 298 | + // console.log(result); | |
| 299 | + // console.log(service.getOrderColumns()); | |
| 300 | + $modalInstance.dismiss("cancel"); | |
| 301 | + | |
| 302 | + } | |
| 231 | 303 | } |
| 232 | 304 | ] |
| 233 | 305 | ); | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/busConfig/orderOptionOpen.html
0 → 100644
| 1 | +<div class="modal-header"> | |
| 2 | + <div class="modal-title"> | |
| 3 | + <h3> | |
| 4 | + <i class="fa fa-sort-amount-asc" aria-hidden="true"></i> | |
| 5 | + <span class="caption-subject bold uppercase">排序字段选择</span> | |
| 6 | + </h3> | |
| 7 | + </div> | |
| 8 | +</div> | |
| 9 | +<div class="modal-body"> | |
| 10 | + <!--order={{$ctrl.orderColumns.order}}--> | |
| 11 | + <!--<br>--> | |
| 12 | + <!--direction={{$ctrl.orderColumns.direction}}--> | |
| 13 | + <sa-Orderoption name="orderOptions" columns="$ctrl.columns" ordercolumns="$ctrl.orderColumns"> | |
| 14 | + </sa-Orderoption> | |
| 15 | +</div> | |
| 16 | +<div class="modal-footer"> | |
| 17 | + <button class="btn btn-primary" ng-click="$ctrl.confirm($ctrl.orderColumns)">确定</button> | |
| 18 | +</div> | |
| 0 | 19 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/busConfig/service.js
| ... | ... | @@ -3,7 +3,7 @@ angular.module('ScheduleApp').factory('BusConfigService_g', ['$resource', 'UserP |
| 3 | 3 | return { |
| 4 | 4 | rest : $resource( |
| 5 | 5 | '/cci/:id', |
| 6 | - {order: 'xl.id,cl.insideCode,isCancel', direction: 'ASC', id: '@id'}, | |
| 6 | + {order: 'xl.name,cl.insideCode,isCancel', direction: 'ASC', id: '@id'}, | |
| 7 | 7 | { |
| 8 | 8 | list: { |
| 9 | 9 | method: 'GET', | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/employeeConfig/index.html
| ... | ... | @@ -20,6 +20,15 @@ |
| 20 | 20 | |
| 21 | 21 | <div class="row"> |
| 22 | 22 | <div class="col-md-12" ng-controller="EmployeeConfigCtrl as ctrl"> |
| 23 | + <style> | |
| 24 | + .dropdown-menu { | |
| 25 | + border-color: #32c5d2; | |
| 26 | + } | |
| 27 | + .btn-group > .dropdown-menu:before { | |
| 28 | + border-bottom-color: #32c5d2; | |
| 29 | + } | |
| 30 | + </style> | |
| 31 | + | |
| 23 | 32 | <div class="portlet light bordered"> |
| 24 | 33 | <div class="portlet-title"> |
| 25 | 34 | <div class="caption font-dark"> |
| ... | ... | @@ -27,13 +36,13 @@ |
| 27 | 36 | <span class="caption-subject bold uppercase">配置表</span> |
| 28 | 37 | </div> |
| 29 | 38 | <div class="actions"> |
| 30 | - <a href="javascript:" class="btn btn-circle blue" ng-click="ctrl.goForm()"> | |
| 39 | + <a href="javascript:" class="btn blue" ng-click="ctrl.goForm()"> | |
| 31 | 40 | <i class="fa fa-plus"></i> |
| 32 | 41 | 添加配置 |
| 33 | 42 | </a> |
| 34 | 43 | |
| 35 | 44 | <div class="btn-group"> |
| 36 | - <a href="javascript:" class="btn red btn-outline btn-circle" data-toggle="dropdown"> | |
| 45 | + <a href="javascript:" class="btn red btn-outline" data-toggle="dropdown"> | |
| 37 | 46 | <i class="fa fa-share"></i> |
| 38 | 47 | <span>数据工具</span> |
| 39 | 48 | <i class="fa fa-angle-down"></i> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/employeeConfig/list.html
| ... | ... | @@ -51,9 +51,24 @@ |
| 51 | 51 | </label> |
| 52 | 52 | </td> |
| 53 | 53 | <td> |
| 54 | - <button class="btn btn-sm green btn-outline filter-submit margin-bottom" | |
| 55 | - ng-click="ctrl.doPage()"> | |
| 56 | - <i class="fa fa-search"></i> 搜索</button> | |
| 54 | + <div class="btn-group"> | |
| 55 | + <button class="btn btn-sm green btn-outline filter-submit margin-bottom" style="margin-right: 0;" | |
| 56 | + ng-click="ctrl.doPage()"> | |
| 57 | + <i class="fa fa-search"></i> 搜索</button> | |
| 58 | + <button class="btn btn-sm green btn-outline filter-submit margin-bottom dropdown-toggle" | |
| 59 | + data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |
| 60 | + <span class="caret"></span> | |
| 61 | + <span class="sr-only">dropdown</span> | |
| 62 | + </button> | |
| 63 | + <ul class="dropdown-menu pull-right"> | |
| 64 | + <li> | |
| 65 | + <a href="javascript:" class="tool-action" ng-click="ctrl.customOrder()"> | |
| 66 | + <i class="fa fa-sort-amount-asc" aria-hidden="true"></i> | |
| 67 | + 排序选项 | |
| 68 | + </a> | |
| 69 | + </li> | |
| 70 | + </ul> | |
| 71 | + </div> | |
| 57 | 72 | |
| 58 | 73 | <button class="btn btn-sm red btn-outline filter-cancel" |
| 59 | 74 | ng-click="ctrl.reset()"> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/employeeConfig/module.js
| ... | ... | @@ -19,6 +19,22 @@ angular.module('ScheduleApp').factory( |
| 19 | 19 | uiToRecord: 0 // 页面绑定,当前页到第几条记录 |
| 20 | 20 | }; |
| 21 | 21 | |
| 22 | + // 字段描述 | |
| 23 | + var columns = [ | |
| 24 | + {name: "xl.name", desc: "线路名称"}, | |
| 25 | + {name: "dbbmFormula", desc: "搭班编码"}, | |
| 26 | + {name: "jsy.jobCodeori", desc: "驾驶员工号"}, | |
| 27 | + {name: "jsy.personnelName", desc: "驾驶员姓名"}, | |
| 28 | + {name: "spy.jobCodeori", desc: "售票员工号"}, | |
| 29 | + {name: "spy.personnelName", desc: "售票员姓名"}, | |
| 30 | + {name: "isCancel", desc: "是否作废"} | |
| 31 | + ]; | |
| 32 | + // 排序字段 | |
| 33 | + var orderColumns = { | |
| 34 | + order: "xl.name,isCancel,dbbmFormula", | |
| 35 | + direction: "ASC,ASC,ASC" | |
| 36 | + }; | |
| 37 | + | |
| 22 | 38 | // 查询对象类 |
| 23 | 39 | var queryClass = service.rest; |
| 24 | 40 | |
| ... | ... | @@ -26,6 +42,12 @@ angular.module('ScheduleApp').factory( |
| 26 | 42 | getQueryClass: function() { |
| 27 | 43 | return queryClass; |
| 28 | 44 | }, |
| 45 | + getColumns: function() { | |
| 46 | + return columns; | |
| 47 | + }, | |
| 48 | + getOrderColumns: function() { | |
| 49 | + return orderColumns; | |
| 50 | + }, | |
| 29 | 51 | /** |
| 30 | 52 | * 获取查询条件信息, |
| 31 | 53 | * 用于给controller用来和页面数据绑定。 |
| ... | ... | @@ -38,6 +60,10 @@ angular.module('ScheduleApp').factory( |
| 38 | 60 | currentSearchCondition["xl.cgsbm_in"] = UserPrincipal.getGsStrs().join(","); |
| 39 | 61 | } |
| 40 | 62 | |
| 63 | + // 重置排序字段条件 | |
| 64 | + currentSearchCondition.order = orderColumns.order; | |
| 65 | + currentSearchCondition.direction = orderColumns.direction; | |
| 66 | + | |
| 41 | 67 | return currentSearchCondition; |
| 42 | 68 | }, |
| 43 | 69 | /** |
| ... | ... | @@ -198,7 +224,8 @@ angular.module('ScheduleApp').controller( |
| 198 | 224 | 'EmployeeConfigListCtrl', |
| 199 | 225 | [ |
| 200 | 226 | 'EmployeeConfigService', |
| 201 | - function(service) { | |
| 227 | + '$uibModal', | |
| 228 | + function(service, $uibModal) { | |
| 202 | 229 | var self = this; |
| 203 | 230 | var EmpConfig = service.getQueryClass(); |
| 204 | 231 | |
| ... | ... | @@ -232,6 +259,51 @@ angular.module('ScheduleApp').controller( |
| 232 | 259 | }; |
| 233 | 260 | |
| 234 | 261 | self.doPage(); |
| 262 | + | |
| 263 | + self.customOrder = function() { | |
| 264 | + // large方式弹出模态对话框 | |
| 265 | + var modalInstance = $uibModal.open({ | |
| 266 | + templateUrl: '/pages/scheduleApp/module/core/employeeConfig/orderOptionOpen.html', | |
| 267 | + size: "sm", | |
| 268 | + animation: true, | |
| 269 | + backdrop: 'static', | |
| 270 | + resolve: { | |
| 271 | + }, | |
| 272 | + windowClass: 'center-modal', | |
| 273 | + controller: "EmployeeConfigListOrderOptionModalInstanceCtrl", | |
| 274 | + controllerAs: "$ctrl", | |
| 275 | + bindToController: true | |
| 276 | + }); | |
| 277 | + modalInstance.result.then( | |
| 278 | + function(result) { | |
| 279 | + console.log("dataImport.html打开"); | |
| 280 | + }, | |
| 281 | + function() { | |
| 282 | + console.log("dataImport.html消失"); | |
| 283 | + } | |
| 284 | + ); | |
| 285 | + }; | |
| 286 | + } | |
| 287 | + ] | |
| 288 | +); | |
| 289 | + | |
| 290 | +angular.module('ScheduleApp').controller( | |
| 291 | + "EmployeeConfigListOrderOptionModalInstanceCtrl", | |
| 292 | + [ | |
| 293 | + "EmployeeConfigService", | |
| 294 | + "$modalInstance", | |
| 295 | + function(service, $modalInstance) { | |
| 296 | + var self = this; | |
| 297 | + | |
| 298 | + self.columns = service.getColumns(); | |
| 299 | + self.orderColumns = service.getOrderColumns(); | |
| 300 | + | |
| 301 | + self.confirm = function(result) { | |
| 302 | + // console.log(result); | |
| 303 | + // console.log(service.getOrderColumns()); | |
| 304 | + $modalInstance.dismiss("cancel"); | |
| 305 | + | |
| 306 | + } | |
| 235 | 307 | } |
| 236 | 308 | ] |
| 237 | 309 | ); | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/employeeConfig/orderOptionOpen.html
0 → 100644
| 1 | +<div class="modal-header"> | |
| 2 | + <div class="modal-title"> | |
| 3 | + <h3> | |
| 4 | + <i class="fa fa-sort-amount-asc" aria-hidden="true"></i> | |
| 5 | + <span class="caption-subject bold uppercase">排序字段选择</span> | |
| 6 | + </h3> | |
| 7 | + </div> | |
| 8 | +</div> | |
| 9 | +<div class="modal-body"> | |
| 10 | + <!--order={{$ctrl.orderColumns.order}}--> | |
| 11 | + <!--<br>--> | |
| 12 | + <!--direction={{$ctrl.orderColumns.direction}}--> | |
| 13 | + <sa-Orderoption name="orderOptions" columns="$ctrl.columns" ordercolumns="$ctrl.orderColumns"> | |
| 14 | + </sa-Orderoption> | |
| 15 | +</div> | |
| 16 | +<div class="modal-footer"> | |
| 17 | + <button class="btn btn-primary" ng-click="$ctrl.confirm($ctrl.orderColumns)">确定</button> | |
| 18 | +</div> | |
| 0 | 19 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/employeeConfig/service.js
| ... | ... | @@ -3,7 +3,7 @@ angular.module('ScheduleApp').factory('EmployeeConfigService_g', ['$resource', f |
| 3 | 3 | return { |
| 4 | 4 | rest : $resource( |
| 5 | 5 | '/eci/:id', |
| 6 | - {order: 'xl.id,isCancel,dbbmFormula', direction: 'ASC', id: '@id'}, | |
| 6 | + {order: 'xl.name,isCancel,dbbmFormula', direction: 'ASC', id: '@id'}, | |
| 7 | 7 | { |
| 8 | 8 | list: { |
| 9 | 9 | method: 'GET', | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/guideboardManage/index.html
| ... | ... | @@ -20,6 +20,15 @@ |
| 20 | 20 | |
| 21 | 21 | <div class="row"> |
| 22 | 22 | <div class="col-md-12" ng-controller="GuideboardManageCtrl as ctrl"> |
| 23 | + <style> | |
| 24 | + .dropdown-menu { | |
| 25 | + border-color: #32c5d2; | |
| 26 | + } | |
| 27 | + .btn-group > .dropdown-menu:before { | |
| 28 | + border-bottom-color: #32c5d2; | |
| 29 | + } | |
| 30 | + </style> | |
| 31 | + | |
| 23 | 32 | <div class="portlet light bordered"> |
| 24 | 33 | <div class="portlet-title"> |
| 25 | 34 | <div class="caption font-dark"> |
| ... | ... | @@ -27,13 +36,13 @@ |
| 27 | 36 | <span class="caption-subject bold uppercase">路牌表</span> |
| 28 | 37 | </div> |
| 29 | 38 | <div class="actions"> |
| 30 | - <a ui-sref="guideboardManage_form" class="btn btn-circle blue"> | |
| 39 | + <a ui-sref="guideboardManage_form" class="btn blue"> | |
| 31 | 40 | <i class="fa fa-plus"></i> |
| 32 | 41 | 添加路牌 |
| 33 | 42 | </a> |
| 34 | 43 | |
| 35 | 44 | <div class="btn-group"> |
| 36 | - <a href="javascript:" class="btn red btn-outline btn-circle" data-toggle="dropdown"> | |
| 45 | + <a href="javascript:" class="btn red btn-outline" data-toggle="dropdown"> | |
| 37 | 46 | <i class="fa fa-share"></i> |
| 38 | 47 | <span>数据工具</span> |
| 39 | 48 | <i class="fa fa-angle-down"></i> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/guideboardManage/list.html
| ... | ... | @@ -41,9 +41,24 @@ |
| 41 | 41 | </label> |
| 42 | 42 | </td> |
| 43 | 43 | <td> |
| 44 | - <button class="btn btn-sm green btn-outline filter-submit margin-bottom" | |
| 45 | - ng-click="ctrl.doPage()"> | |
| 46 | - <i class="fa fa-search"></i> 搜索</button> | |
| 44 | + <div class="btn-group"> | |
| 45 | + <button class="btn btn-sm green btn-outline filter-submit margin-bottom" style="margin-right: 0;" | |
| 46 | + ng-click="ctrl.doPage()"> | |
| 47 | + <i class="fa fa-search"></i> 搜索</button> | |
| 48 | + <button class="btn btn-sm green btn-outline filter-submit margin-bottom dropdown-toggle" | |
| 49 | + data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |
| 50 | + <span class="caret"></span> | |
| 51 | + <span class="sr-only">dropdown</span> | |
| 52 | + </button> | |
| 53 | + <ul class="dropdown-menu pull-right"> | |
| 54 | + <li> | |
| 55 | + <a href="javascript:" class="tool-action" ng-click="ctrl.customOrder()"> | |
| 56 | + <i class="fa fa-sort-amount-asc" aria-hidden="true"></i> | |
| 57 | + 排序选项 | |
| 58 | + </a> | |
| 59 | + </li> | |
| 60 | + </ul> | |
| 61 | + </div> | |
| 47 | 62 | |
| 48 | 63 | <button class="btn btn-sm red btn-outline filter-cancel" |
| 49 | 64 | ng-click="ctrl.reset()"> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/guideboardManage/module.js
| ... | ... | @@ -20,6 +20,20 @@ angular.module('ScheduleApp').factory( |
| 20 | 20 | uiToRecord: 0 // 页面绑定,当前页到第几条记录 |
| 21 | 21 | }; |
| 22 | 22 | |
| 23 | + // 字段描述 | |
| 24 | + var columns = [ | |
| 25 | + {name: "xl.name", desc: "线路名称"}, | |
| 26 | + {name: "lpNo", desc: "路牌编号"}, | |
| 27 | + {name: "lpName", desc: "路牌名称"}, | |
| 28 | + {name: "lpType", desc: "路牌类型"}, | |
| 29 | + {name: "isCancel", desc: "是否作废"} | |
| 30 | + ]; | |
| 31 | + // 排序字段 | |
| 32 | + var orderColumns = { | |
| 33 | + order: "xl.name,isCancel,lpNo", | |
| 34 | + direction: "DESC,ASC,ASC" | |
| 35 | + }; | |
| 36 | + | |
| 23 | 37 | // 查询对象类 |
| 24 | 38 | var queryClass = service.rest; |
| 25 | 39 | |
| ... | ... | @@ -27,7 +41,12 @@ angular.module('ScheduleApp').factory( |
| 27 | 41 | getGbQueryClass: function() { |
| 28 | 42 | return queryClass; |
| 29 | 43 | }, |
| 30 | - | |
| 44 | + getColumns: function() { | |
| 45 | + return columns; | |
| 46 | + }, | |
| 47 | + getOrderColumns: function() { | |
| 48 | + return orderColumns; | |
| 49 | + }, | |
| 31 | 50 | /** |
| 32 | 51 | * 获取查询条件信息, |
| 33 | 52 | * 用于给controller用来和页面数据绑定。 |
| ... | ... | @@ -40,6 +59,10 @@ angular.module('ScheduleApp').factory( |
| 40 | 59 | currentSearchCondition["xl.cgsbm_in"] = UserPrincipal.getGsStrs().join(","); |
| 41 | 60 | } |
| 42 | 61 | |
| 62 | + // 重置排序字段条件 | |
| 63 | + currentSearchCondition.order = orderColumns.order; | |
| 64 | + currentSearchCondition.direction = orderColumns.direction; | |
| 65 | + | |
| 43 | 66 | return currentSearchCondition; |
| 44 | 67 | }, |
| 45 | 68 | /** |
| ... | ... | @@ -201,7 +224,8 @@ angular.module('ScheduleApp').controller( |
| 201 | 224 | 'GuideboardManageListCtrl', |
| 202 | 225 | [ |
| 203 | 226 | 'GuideboardManageService', |
| 204 | - function(service) { | |
| 227 | + '$uibModal', | |
| 228 | + function(service, $uibModal) { | |
| 205 | 229 | var self = this; |
| 206 | 230 | var Gb = service.getGbQueryClass(); |
| 207 | 231 | |
| ... | ... | @@ -236,6 +260,51 @@ angular.module('ScheduleApp').controller( |
| 236 | 260 | }; |
| 237 | 261 | |
| 238 | 262 | self.doPage(); |
| 263 | + | |
| 264 | + self.customOrder = function() { | |
| 265 | + // large方式弹出模态对话框 | |
| 266 | + var modalInstance = $uibModal.open({ | |
| 267 | + templateUrl: '/pages/scheduleApp/module/core/guideboardManage/orderOptionOpen.html', | |
| 268 | + size: "sm", | |
| 269 | + animation: true, | |
| 270 | + backdrop: 'static', | |
| 271 | + resolve: { | |
| 272 | + }, | |
| 273 | + windowClass: 'center-modal', | |
| 274 | + controller: "GuideboardManageListOrderOptionModalInstanceCtrl", | |
| 275 | + controllerAs: "$ctrl", | |
| 276 | + bindToController: true | |
| 277 | + }); | |
| 278 | + modalInstance.result.then( | |
| 279 | + function(result) { | |
| 280 | + console.log("dataImport.html打开"); | |
| 281 | + }, | |
| 282 | + function() { | |
| 283 | + console.log("dataImport.html消失"); | |
| 284 | + } | |
| 285 | + ); | |
| 286 | + }; | |
| 287 | + } | |
| 288 | + ] | |
| 289 | +); | |
| 290 | + | |
| 291 | +angular.module('ScheduleApp').controller( | |
| 292 | + "GuideboardManageListOrderOptionModalInstanceCtrl", | |
| 293 | + [ | |
| 294 | + "GuideboardManageService", | |
| 295 | + "$modalInstance", | |
| 296 | + function(service, $modalInstance) { | |
| 297 | + var self = this; | |
| 298 | + | |
| 299 | + self.columns = service.getColumns(); | |
| 300 | + self.orderColumns = service.getOrderColumns(); | |
| 301 | + | |
| 302 | + self.confirm = function(result) { | |
| 303 | + // console.log(result); | |
| 304 | + // console.log(service.getOrderColumns()); | |
| 305 | + $modalInstance.dismiss("cancel"); | |
| 306 | + | |
| 307 | + } | |
| 239 | 308 | } |
| 240 | 309 | ] |
| 241 | 310 | ); | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/guideboardManage/orderOptionOpen.html
0 → 100644
| 1 | +<div class="modal-header"> | |
| 2 | + <div class="modal-title"> | |
| 3 | + <h3> | |
| 4 | + <i class="fa fa-sort-amount-asc" aria-hidden="true"></i> | |
| 5 | + <span class="caption-subject bold uppercase">排序字段选择</span> | |
| 6 | + </h3> | |
| 7 | + </div> | |
| 8 | +</div> | |
| 9 | +<div class="modal-body"> | |
| 10 | + <!--order={{$ctrl.orderColumns.order}}--> | |
| 11 | + <!--<br>--> | |
| 12 | + <!--direction={{$ctrl.orderColumns.direction}}--> | |
| 13 | + <sa-Orderoption name="orderOptions" columns="$ctrl.columns" ordercolumns="$ctrl.orderColumns"> | |
| 14 | + </sa-Orderoption> | |
| 15 | +</div> | |
| 16 | +<div class="modal-footer"> | |
| 17 | + <button class="btn btn-primary" ng-click="$ctrl.confirm($ctrl.orderColumns)">确定</button> | |
| 18 | +</div> | |
| 0 | 19 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/guideboardManage/service.js
| ... | ... | @@ -3,7 +3,7 @@ angular.module('ScheduleApp').factory('GuideboardManageService_g', ['$resource', |
| 3 | 3 | return { |
| 4 | 4 | rest: $resource( |
| 5 | 5 | '/gic/:id', |
| 6 | - {order: 'xl,isCancel,lpNo', direction: 'DESC,ASC,ASC', id: '@id'}, | |
| 6 | + {order: 'xl.name,isCancel,lpNo', direction: 'DESC,ASC,ASC', id: '@id'}, | |
| 7 | 7 | { |
| 8 | 8 | list: { |
| 9 | 9 | method: 'GET', | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/rerunManage/index.html
| ... | ... | @@ -20,6 +20,15 @@ |
| 20 | 20 | |
| 21 | 21 | <div class="row"> |
| 22 | 22 | <div class="col-md-12" ng-controller="RerunManageCtrl as ctrl"> |
| 23 | + <style> | |
| 24 | + .dropdown-menu { | |
| 25 | + border-color: #32c5d2; | |
| 26 | + } | |
| 27 | + .btn-group > .dropdown-menu:before { | |
| 28 | + border-bottom-color: #32c5d2; | |
| 29 | + } | |
| 30 | + </style> | |
| 31 | + | |
| 23 | 32 | <div class="portlet light bordered"> |
| 24 | 33 | <div class="portlet-title"> |
| 25 | 34 | <div class="caption font-dark"> |
| ... | ... | @@ -27,7 +36,7 @@ |
| 27 | 36 | <span class="caption-subject bold uppercase">套跑信息</span> |
| 28 | 37 | </div> |
| 29 | 38 | <div class="actions"> |
| 30 | - <a href="javascript:" class="btn btn-circle blue" ng-click="ctrl.goForm()"> | |
| 39 | + <a href="javascript:" class="btn blue" ng-click="ctrl.goForm()"> | |
| 31 | 40 | <i class="fa fa-plus"></i> |
| 32 | 41 | 添加套跑 |
| 33 | 42 | </a> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/rerunManage/list.html
| ... | ... | @@ -5,13 +5,13 @@ |
| 5 | 5 | <tr role="row" class="heading"> |
| 6 | 6 | <th style="width: 70px;">序号</th> |
| 7 | 7 | <th style="width: 150px;">套跑线路</th> |
| 8 | - <th style="width: 180px">套跑时刻表/路牌</th> | |
| 8 | + <th >套跑时刻表/路牌</th> | |
| 9 | 9 | <th style="width: 100px">套跑类型</th> |
| 10 | 10 | <th style="width: 150px;">线路</th> |
| 11 | - <th style="width: 50px">路牌</th> | |
| 11 | + <th style="width: 100px">路牌</th> | |
| 12 | 12 | <th width="100px">车辆</th> |
| 13 | 13 | <th width="80px">状态</th> |
| 14 | - <th style="width: 21%">操作</th> | |
| 14 | + <th >操作</th> | |
| 15 | 15 | </tr> |
| 16 | 16 | <tr role="row" class="filter"> |
| 17 | 17 | <td></td> |
| ... | ... | @@ -40,9 +40,24 @@ |
| 40 | 40 | </label> |
| 41 | 41 | </td> |
| 42 | 42 | <td> |
| 43 | - <button class="btn btn-sm green btn-outline filter-submit margin-bottom" | |
| 44 | - ng-click="ctrl.doPage()"> | |
| 45 | - <i class="fa fa-search"></i> 搜索</button> | |
| 43 | + <div class="btn-group"> | |
| 44 | + <button class="btn btn-sm green btn-outline filter-submit margin-bottom" style="margin-right: 0;" | |
| 45 | + ng-click="ctrl.doPage()"> | |
| 46 | + <i class="fa fa-search"></i> 搜索</button> | |
| 47 | + <button class="btn btn-sm green btn-outline filter-submit margin-bottom dropdown-toggle" | |
| 48 | + data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |
| 49 | + <span class="caret"></span> | |
| 50 | + <span class="sr-only">dropdown</span> | |
| 51 | + </button> | |
| 52 | + <ul class="dropdown-menu pull-right"> | |
| 53 | + <li> | |
| 54 | + <a href="javascript:" class="tool-action" ng-click="ctrl.customOrder()"> | |
| 55 | + <i class="fa fa-sort-amount-asc" aria-hidden="true"></i> | |
| 56 | + 排序选项 | |
| 57 | + </a> | |
| 58 | + </li> | |
| 59 | + </ul> | |
| 60 | + </div> | |
| 46 | 61 | |
| 47 | 62 | <button class="btn btn-sm red btn-outline filter-cancel" |
| 48 | 63 | ng-click="ctrl.reset()"> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/rerunManage/module.js
| ... | ... | @@ -19,6 +19,21 @@ angular.module('ScheduleApp').factory( |
| 19 | 19 | uiToRecord: 0 // 页面绑定,当前页到第几条记录 |
| 20 | 20 | }; |
| 21 | 21 | |
| 22 | + // 字段描述 | |
| 23 | + var columns = [ | |
| 24 | + {name: "rerunXl.name", desc: "套跑线路"}, | |
| 25 | + {name: "rerunTtinfo.name", desc: "套跑时刻表"}, | |
| 26 | + {name: "rerunLp.lpName", desc: "套跑路牌"}, | |
| 27 | + {name: "rerunType", desc: "套跑类型"}, | |
| 28 | + {name: "useXl.name", desc: "线路"}, | |
| 29 | + {name: "isCancel", desc: "是否作废"} | |
| 30 | + ]; | |
| 31 | + // 排序字段 | |
| 32 | + var orderColumns = { | |
| 33 | + order: "rerunXl.name,isCancel", | |
| 34 | + direction: "ASC,ASC" | |
| 35 | + }; | |
| 36 | + | |
| 22 | 37 | // 查询对象 |
| 23 | 38 | var queryClass = service.rest; |
| 24 | 39 | |
| ... | ... | @@ -26,6 +41,12 @@ angular.module('ScheduleApp').factory( |
| 26 | 41 | getQueryClass: function() { |
| 27 | 42 | return queryClass; |
| 28 | 43 | }, |
| 44 | + getColumns: function() { | |
| 45 | + return columns; | |
| 46 | + }, | |
| 47 | + getOrderColumns: function() { | |
| 48 | + return orderColumns; | |
| 49 | + }, | |
| 29 | 50 | getSearchCondition: function() { |
| 30 | 51 | currentSearchCondition.page = currentPage.uiNumber - 1; |
| 31 | 52 | |
| ... | ... | @@ -34,6 +55,10 @@ angular.module('ScheduleApp').factory( |
| 34 | 55 | currentSearchCondition["rerunXl.cgsbm_in"] = UserPrincipal.getGsStrs().join(","); |
| 35 | 56 | } |
| 36 | 57 | |
| 58 | + // 重置排序字段条件 | |
| 59 | + currentSearchCondition.order = orderColumns.order; | |
| 60 | + currentSearchCondition.direction = orderColumns.direction; | |
| 61 | + | |
| 37 | 62 | return currentSearchCondition; |
| 38 | 63 | }, |
| 39 | 64 | getPage: function(page) { |
| ... | ... | @@ -91,7 +116,8 @@ angular.module('ScheduleApp').controller( |
| 91 | 116 | 'RerunManageListCtrl', |
| 92 | 117 | [ |
| 93 | 118 | 'RerunManageService', |
| 94 | - function(service) { | |
| 119 | + '$uibModal', | |
| 120 | + function(service, $uibModal) { | |
| 95 | 121 | var self = this; |
| 96 | 122 | var RM = service.getQueryClass(); |
| 97 | 123 | |
| ... | ... | @@ -126,11 +152,55 @@ angular.module('ScheduleApp').controller( |
| 126 | 152 | |
| 127 | 153 | self.doPage(); |
| 128 | 154 | |
| 155 | + self.customOrder = function() { | |
| 156 | + // large方式弹出模态对话框 | |
| 157 | + var modalInstance = $uibModal.open({ | |
| 158 | + templateUrl: '/pages/scheduleApp/module/core/rerunManage/orderOptionOpen.html', | |
| 159 | + size: "sm", | |
| 160 | + animation: true, | |
| 161 | + backdrop: 'static', | |
| 162 | + resolve: { | |
| 163 | + }, | |
| 164 | + windowClass: 'center-modal', | |
| 165 | + controller: "RerunManageListOrderOptionModalInstanceCtrl", | |
| 166 | + controllerAs: "$ctrl", | |
| 167 | + bindToController: true | |
| 168 | + }); | |
| 169 | + modalInstance.result.then( | |
| 170 | + function(result) { | |
| 171 | + console.log("dataImport.html打开"); | |
| 172 | + }, | |
| 173 | + function() { | |
| 174 | + console.log("dataImport.html消失"); | |
| 175 | + } | |
| 176 | + ); | |
| 177 | + }; | |
| 129 | 178 | |
| 130 | 179 | } |
| 131 | 180 | ] |
| 132 | 181 | ); |
| 133 | 182 | |
| 183 | +angular.module('ScheduleApp').controller( | |
| 184 | + "RerunManageListOrderOptionModalInstanceCtrl", | |
| 185 | + [ | |
| 186 | + "RerunManageService", | |
| 187 | + "$modalInstance", | |
| 188 | + function(service, $modalInstance) { | |
| 189 | + var self = this; | |
| 190 | + | |
| 191 | + self.columns = service.getColumns(); | |
| 192 | + self.orderColumns = service.getOrderColumns(); | |
| 193 | + | |
| 194 | + self.confirm = function(result) { | |
| 195 | + // console.log(result); | |
| 196 | + // console.log(service.getOrderColumns()); | |
| 197 | + $modalInstance.dismiss("cancel"); | |
| 198 | + | |
| 199 | + } | |
| 200 | + } | |
| 201 | + ] | |
| 202 | +); | |
| 203 | + | |
| 134 | 204 | // form.html控制器 |
| 135 | 205 | angular.module('ScheduleApp').controller( |
| 136 | 206 | 'RerunManageFormCtrl', | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/rerunManage/orderOptionOpen.html
0 → 100644
| 1 | +<div class="modal-header"> | |
| 2 | + <div class="modal-title"> | |
| 3 | + <h3> | |
| 4 | + <i class="fa fa-sort-amount-asc" aria-hidden="true"></i> | |
| 5 | + <span class="caption-subject bold uppercase">排序字段选择</span> | |
| 6 | + </h3> | |
| 7 | + </div> | |
| 8 | +</div> | |
| 9 | +<div class="modal-body"> | |
| 10 | + <!--order={{$ctrl.orderColumns.order}}--> | |
| 11 | + <!--<br>--> | |
| 12 | + <!--direction={{$ctrl.orderColumns.direction}}--> | |
| 13 | + <sa-Orderoption name="orderOptions" columns="$ctrl.columns" ordercolumns="$ctrl.orderColumns"> | |
| 14 | + </sa-Orderoption> | |
| 15 | +</div> | |
| 16 | +<div class="modal-footer"> | |
| 17 | + <button class="btn btn-primary" ng-click="$ctrl.confirm($ctrl.orderColumns)">确定</button> | |
| 18 | +</div> | |
| 0 | 19 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/rerunManage/service.js
| ... | ... | @@ -3,7 +3,7 @@ angular.module('ScheduleApp').factory('rerunManageService_g', ['$resource', func |
| 3 | 3 | return { |
| 4 | 4 | rest: $resource( |
| 5 | 5 | '/rms/:id', |
| 6 | - {order: 'rerunXl.id,isCancel', direction: 'ASC', id: '@id'}, | |
| 6 | + {order: 'rerunXl.name,isCancel', direction: 'ASC', id: '@id'}, | |
| 7 | 7 | { |
| 8 | 8 | list: { |
| 9 | 9 | method: 'GET', | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/index.html
| ... | ... | @@ -20,6 +20,15 @@ |
| 20 | 20 | |
| 21 | 21 | <div class="row"> |
| 22 | 22 | <div class="col-md-12" ng-controller="SchedulePlanManageCtrl as ctrl"> |
| 23 | + <style> | |
| 24 | + .dropdown-menu { | |
| 25 | + border-color: #32c5d2; | |
| 26 | + } | |
| 27 | + .btn-group > .dropdown-menu:before { | |
| 28 | + border-bottom-color: #32c5d2; | |
| 29 | + } | |
| 30 | + </style> | |
| 31 | + | |
| 23 | 32 | <div class="portlet light bordered"> |
| 24 | 33 | <div class="portlet-title"> |
| 25 | 34 | <div class="caption font-dark"> |
| ... | ... | @@ -27,7 +36,7 @@ |
| 27 | 36 | <span class="caption-subject bold uppercase">排班计划</span> |
| 28 | 37 | </div> |
| 29 | 38 | <div class="actions"> |
| 30 | - <a href="javascript:" class="btn btn-circle blue" ng-click="ctrl.goForm()"> | |
| 39 | + <a href="javascript:" class="btn blue" ng-click="ctrl.goForm()"> | |
| 31 | 40 | <i class="fa fa-plus"></i> |
| 32 | 41 | 生成计划 |
| 33 | 42 | </a> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/list.html
| ... | ... | @@ -63,9 +63,24 @@ |
| 63 | 63 | <td></td> |
| 64 | 64 | <td></td> |
| 65 | 65 | <td> |
| 66 | - <button class="btn btn-sm green btn-outline filter-submit margin-bottom" | |
| 67 | - ng-click="ctrl.doPage()"> | |
| 68 | - <i class="fa fa-search"></i> 搜索</button> | |
| 66 | + <div class="btn-group"> | |
| 67 | + <button class="btn btn-sm green btn-outline filter-submit margin-bottom" style="margin-right: 0;" | |
| 68 | + ng-click="ctrl.doPage()"> | |
| 69 | + <i class="fa fa-search"></i> 搜索</button> | |
| 70 | + <button class="btn btn-sm green btn-outline filter-submit margin-bottom dropdown-toggle" | |
| 71 | + data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |
| 72 | + <span class="caret"></span> | |
| 73 | + <span class="sr-only">dropdown</span> | |
| 74 | + </button> | |
| 75 | + <ul class="dropdown-menu pull-right"> | |
| 76 | + <li> | |
| 77 | + <a href="javascript:" class="tool-action" ng-click="ctrl.customOrder()"> | |
| 78 | + <i class="fa fa-sort-amount-asc" aria-hidden="true"></i> | |
| 79 | + 排序选项 | |
| 80 | + </a> | |
| 81 | + </li> | |
| 82 | + </ul> | |
| 83 | + </div> | |
| 69 | 84 | |
| 70 | 85 | <button class="btn btn-sm red btn-outline filter-cancel" |
| 71 | 86 | ng-click="ctrl.reset()"> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/module.js
| ... | ... | @@ -19,6 +19,19 @@ angular.module('ScheduleApp').factory( |
| 19 | 19 | uiToRecord: 0 // 页面绑定,当前页到第几条记录 |
| 20 | 20 | }; |
| 21 | 21 | |
| 22 | + // 字段描述 | |
| 23 | + var columns = [ | |
| 24 | + {name: "xl.name", desc: "线路名称"}, | |
| 25 | + {name: "scheduleFromTime", desc: "排班开始日期"}, | |
| 26 | + {name: "scheduleToTime", desc: "排班结束日期"}, | |
| 27 | + {name: "createDate", desc: "操作时间"} | |
| 28 | + ]; | |
| 29 | + // 排序字段 | |
| 30 | + var orderColumns = { | |
| 31 | + order: "xl.name,createDate", | |
| 32 | + direction: "DESC,DESC" | |
| 33 | + }; | |
| 34 | + | |
| 22 | 35 | // 查询对象 |
| 23 | 36 | var queryClass = service.rest; |
| 24 | 37 | |
| ... | ... | @@ -26,6 +39,12 @@ angular.module('ScheduleApp').factory( |
| 26 | 39 | getQueryClass: function() { |
| 27 | 40 | return queryClass; |
| 28 | 41 | }, |
| 42 | + getColumns: function() { | |
| 43 | + return columns; | |
| 44 | + }, | |
| 45 | + getOrderColumns: function() { | |
| 46 | + return orderColumns; | |
| 47 | + }, | |
| 29 | 48 | getSearchCondition: function() { |
| 30 | 49 | currentSearchCondition.page = currentPage.uiNumber - 1; |
| 31 | 50 | |
| ... | ... | @@ -34,6 +53,10 @@ angular.module('ScheduleApp').factory( |
| 34 | 53 | currentSearchCondition["xl.cgsbm_in"] = UserPrincipal.getGsStrs().join(","); |
| 35 | 54 | } |
| 36 | 55 | |
| 56 | + // 重置排序字段条件 | |
| 57 | + currentSearchCondition.order = orderColumns.order; | |
| 58 | + currentSearchCondition.direction = orderColumns.direction; | |
| 59 | + | |
| 37 | 60 | return currentSearchCondition; |
| 38 | 61 | }, |
| 39 | 62 | getPage: function(page) { |
| ... | ... | @@ -91,7 +114,8 @@ angular.module('ScheduleApp').controller( |
| 91 | 114 | 'SchedulePlanManageService', |
| 92 | 115 | '$filter', |
| 93 | 116 | 'TTInfoManageService_g', |
| 94 | - function(service, $filter, ttInfoService) { | |
| 117 | + '$uibModal', | |
| 118 | + function(service, $filter, ttInfoService, $uibModal) { | |
| 95 | 119 | var self = this; |
| 96 | 120 | // 日期 日期控件开关 |
| 97 | 121 | self.scheduleFromTime = false; |
| ... | ... | @@ -192,6 +216,51 @@ angular.module('ScheduleApp').controller( |
| 192 | 216 | // 转换日期成str |
| 193 | 217 | self.toDateStr = function(time) { |
| 194 | 218 | return $filter('date')(new Date(time), 'yyyy-MM-dd'); |
| 219 | + }; | |
| 220 | + | |
| 221 | + self.customOrder = function() { | |
| 222 | + // large方式弹出模态对话框 | |
| 223 | + var modalInstance = $uibModal.open({ | |
| 224 | + templateUrl: '/pages/scheduleApp/module/core/schedulePlanManage/orderOptionOpen.html', | |
| 225 | + size: "sm", | |
| 226 | + animation: true, | |
| 227 | + backdrop: 'static', | |
| 228 | + resolve: { | |
| 229 | + }, | |
| 230 | + windowClass: 'center-modal', | |
| 231 | + controller: "SchedulePlanManageListOrderOptionModalInstanceCtrl", | |
| 232 | + controllerAs: "$ctrl", | |
| 233 | + bindToController: true | |
| 234 | + }); | |
| 235 | + modalInstance.result.then( | |
| 236 | + function(result) { | |
| 237 | + console.log("dataImport.html打开"); | |
| 238 | + }, | |
| 239 | + function() { | |
| 240 | + console.log("dataImport.html消失"); | |
| 241 | + } | |
| 242 | + ); | |
| 243 | + }; | |
| 244 | + } | |
| 245 | + ] | |
| 246 | +); | |
| 247 | + | |
| 248 | +angular.module('ScheduleApp').controller( | |
| 249 | + "SchedulePlanManageListOrderOptionModalInstanceCtrl", | |
| 250 | + [ | |
| 251 | + "SchedulePlanManageService", | |
| 252 | + "$modalInstance", | |
| 253 | + function(service, $modalInstance) { | |
| 254 | + var self = this; | |
| 255 | + | |
| 256 | + self.columns = service.getColumns(); | |
| 257 | + self.orderColumns = service.getOrderColumns(); | |
| 258 | + | |
| 259 | + self.confirm = function(result) { | |
| 260 | + // console.log(result); | |
| 261 | + // console.log(service.getOrderColumns()); | |
| 262 | + $modalInstance.dismiss("cancel"); | |
| 263 | + | |
| 195 | 264 | } |
| 196 | 265 | } |
| 197 | 266 | ] | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/orderOptionOpen.html
0 → 100644
| 1 | +<div class="modal-header"> | |
| 2 | + <div class="modal-title"> | |
| 3 | + <h3> | |
| 4 | + <i class="fa fa-sort-amount-asc" aria-hidden="true"></i> | |
| 5 | + <span class="caption-subject bold uppercase">排序字段选择</span> | |
| 6 | + </h3> | |
| 7 | + </div> | |
| 8 | +</div> | |
| 9 | +<div class="modal-body"> | |
| 10 | + <!--order={{$ctrl.orderColumns.order}}--> | |
| 11 | + <!--<br>--> | |
| 12 | + <!--direction={{$ctrl.orderColumns.direction}}--> | |
| 13 | + <sa-Orderoption name="orderOptions" columns="$ctrl.columns" ordercolumns="$ctrl.orderColumns"> | |
| 14 | + </sa-Orderoption> | |
| 15 | +</div> | |
| 16 | +<div class="modal-footer"> | |
| 17 | + <button class="btn btn-primary" ng-click="$ctrl.confirm($ctrl.orderColumns)">确定</button> | |
| 18 | +</div> | |
| 0 | 19 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/service.js
| ... | ... | @@ -3,7 +3,7 @@ angular.module('ScheduleApp').factory('SchedulePlanManageService_g', ['$resource |
| 3 | 3 | return { |
| 4 | 4 | rest : $resource( |
| 5 | 5 | '/spc/:id', |
| 6 | - {order: 'xl.id,createDate', direction: 'DESC,DESC', id: '@id'}, | |
| 6 | + {order: 'xl.name,createDate', direction: 'DESC,DESC', id: '@id'}, | |
| 7 | 7 | { |
| 8 | 8 | list: { |
| 9 | 9 | method: 'GET', | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/scheduleRuleManage/index.html
| ... | ... | @@ -20,6 +20,15 @@ |
| 20 | 20 | |
| 21 | 21 | <div class="row"> |
| 22 | 22 | <div class="col-md-12" ng-controller="ScheduleRuleManageCtrl as ctrl"> |
| 23 | + <style> | |
| 24 | + .dropdown-menu { | |
| 25 | + border-color: #32c5d2; | |
| 26 | + } | |
| 27 | + .btn-group > .dropdown-menu:before { | |
| 28 | + border-bottom-color: #32c5d2; | |
| 29 | + } | |
| 30 | + </style> | |
| 31 | + | |
| 23 | 32 | <div class="portlet light bordered"> |
| 24 | 33 | <div class="portlet-title"> |
| 25 | 34 | <div class="caption font-dark"> |
| ... | ... | @@ -27,13 +36,13 @@ |
| 27 | 36 | <span class="caption-subject bold uppercase">排班规则</span> |
| 28 | 37 | </div> |
| 29 | 38 | <div class="actions"> |
| 30 | - <a href="javascript:" class="btn btn-circle blue" ng-click="ctrl.goForm()"> | |
| 39 | + <a href="javascript:" class="btn blue" ng-click="ctrl.goForm()"> | |
| 31 | 40 | <i class="fa fa-plus"></i> |
| 32 | 41 | 添加规则 |
| 33 | 42 | </a> |
| 34 | 43 | |
| 35 | 44 | <div class="btn-group"> |
| 36 | - <a href="javascript:" class="btn red btn-outline btn-circle" data-toggle="dropdown"> | |
| 45 | + <a href="javascript:" class="btn red btn-outline" data-toggle="dropdown"> | |
| 37 | 46 | <i class="fa fa-share"></i> |
| 38 | 47 | <span>数据工具</span> |
| 39 | 48 | <i class="fa fa-angle-down"></i> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/scheduleRuleManage/list.html
| ... | ... | @@ -44,9 +44,24 @@ |
| 44 | 44 | <td></td> |
| 45 | 45 | <td></td> |
| 46 | 46 | <td> |
| 47 | - <button class="btn btn-sm green btn-outline filter-submit margin-bottom" | |
| 48 | - ng-click="ctrl.doPage()"> | |
| 49 | - <i class="fa fa-search"></i> 搜索</button> | |
| 47 | + <div class="btn-group"> | |
| 48 | + <button class="btn btn-sm green btn-outline filter-submit margin-bottom" style="margin-right: 0;" | |
| 49 | + ng-click="ctrl.doPage()"> | |
| 50 | + <i class="fa fa-search"></i> 搜索</button> | |
| 51 | + <button class="btn btn-sm green btn-outline filter-submit margin-bottom dropdown-toggle" | |
| 52 | + data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |
| 53 | + <span class="caret"></span> | |
| 54 | + <span class="sr-only">dropdown</span> | |
| 55 | + </button> | |
| 56 | + <ul class="dropdown-menu pull-right"> | |
| 57 | + <li> | |
| 58 | + <a href="javascript:" class="tool-action" ng-click="ctrl.customOrder()"> | |
| 59 | + <i class="fa fa-sort-amount-asc" aria-hidden="true"></i> | |
| 60 | + 排序选项 | |
| 61 | + </a> | |
| 62 | + </li> | |
| 63 | + </ul> | |
| 64 | + </div> | |
| 50 | 65 | |
| 51 | 66 | <button class="btn btn-sm red btn-outline filter-cancel" |
| 52 | 67 | ng-click="ctrl.reset()"> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/scheduleRuleManage/module.js
| ... | ... | @@ -19,6 +19,19 @@ angular.module('ScheduleApp').factory( |
| 19 | 19 | uiToRecord: 0 // 页面绑定,当前页到第几条记录 |
| 20 | 20 | }; |
| 21 | 21 | |
| 22 | + // 字段描述 | |
| 23 | + var columns = [ | |
| 24 | + {name: "xl.name", desc: "线路名称"}, | |
| 25 | + {name: "updateDate", desc: "修改时间"}, | |
| 26 | + {name: "qyrq", desc: "启用日期"}, | |
| 27 | + {name: "carConfigInfo.cl.insideCode", desc: "车辆"} | |
| 28 | + ]; | |
| 29 | + // 排序字段 | |
| 30 | + var orderColumns = { | |
| 31 | + order: "xl.name,updateDate,carConfigInfo.cl.insideCode", | |
| 32 | + direction: "ASC,DESC,ASC" | |
| 33 | + }; | |
| 34 | + | |
| 22 | 35 | // 查询对象 |
| 23 | 36 | var queryClass = service.rest; |
| 24 | 37 | |
| ... | ... | @@ -26,7 +39,12 @@ angular.module('ScheduleApp').factory( |
| 26 | 39 | getQueryClass: function() { |
| 27 | 40 | return queryClass; |
| 28 | 41 | }, |
| 29 | - | |
| 42 | + getColumns: function() { | |
| 43 | + return columns; | |
| 44 | + }, | |
| 45 | + getOrderColumns: function() { | |
| 46 | + return orderColumns; | |
| 47 | + }, | |
| 30 | 48 | /** |
| 31 | 49 | * 获取查询条件信息, |
| 32 | 50 | * 用于给controller用来和页面数据绑定。 |
| ... | ... | @@ -39,6 +57,10 @@ angular.module('ScheduleApp').factory( |
| 39 | 57 | currentSearchCondition["xl.cgsbm_in"] = UserPrincipal.getGsStrs().join(","); |
| 40 | 58 | } |
| 41 | 59 | |
| 60 | + // 重置排序字段条件 | |
| 61 | + currentSearchCondition.order = orderColumns.order; | |
| 62 | + currentSearchCondition.direction = orderColumns.direction; | |
| 63 | + | |
| 42 | 64 | return currentSearchCondition; |
| 43 | 65 | }, |
| 44 | 66 | getPage: function(page) { |
| ... | ... | @@ -209,7 +231,8 @@ angular.module('ScheduleApp').controller( |
| 209 | 231 | 'ScheduleRuleManageListCtrl', |
| 210 | 232 | [ |
| 211 | 233 | 'ScheduleRuleManageService', |
| 212 | - function(service) { | |
| 234 | + '$uibModal', | |
| 235 | + function(service, $uibModal) { | |
| 213 | 236 | var self = this; |
| 214 | 237 | var ScheduleRuleManage = service.getQueryClass(); |
| 215 | 238 | |
| ... | ... | @@ -250,6 +273,51 @@ angular.module('ScheduleApp').controller( |
| 250 | 273 | return type == "FBGSMODE"; |
| 251 | 274 | } |
| 252 | 275 | |
| 276 | + self.customOrder = function() { | |
| 277 | + // large方式弹出模态对话框 | |
| 278 | + var modalInstance = $uibModal.open({ | |
| 279 | + templateUrl: '/pages/scheduleApp/module/core/scheduleRuleManage/orderOptionOpen.html', | |
| 280 | + size: "sm", | |
| 281 | + animation: true, | |
| 282 | + backdrop: 'static', | |
| 283 | + resolve: { | |
| 284 | + }, | |
| 285 | + windowClass: 'center-modal', | |
| 286 | + controller: "ScheduleRuleManageListOrderOptionModalInstanceCtrl", | |
| 287 | + controllerAs: "$ctrl", | |
| 288 | + bindToController: true | |
| 289 | + }); | |
| 290 | + modalInstance.result.then( | |
| 291 | + function(result) { | |
| 292 | + console.log("dataImport.html打开"); | |
| 293 | + }, | |
| 294 | + function() { | |
| 295 | + console.log("dataImport.html消失"); | |
| 296 | + } | |
| 297 | + ); | |
| 298 | + }; | |
| 299 | + | |
| 300 | + } | |
| 301 | + ] | |
| 302 | +); | |
| 303 | + | |
| 304 | +angular.module('ScheduleApp').controller( | |
| 305 | + "ScheduleRuleManageListOrderOptionModalInstanceCtrl", | |
| 306 | + [ | |
| 307 | + "ScheduleRuleManageService", | |
| 308 | + "$modalInstance", | |
| 309 | + function(service, $modalInstance) { | |
| 310 | + var self = this; | |
| 311 | + | |
| 312 | + self.columns = service.getColumns(); | |
| 313 | + self.orderColumns = service.getOrderColumns(); | |
| 314 | + | |
| 315 | + self.confirm = function(result) { | |
| 316 | + // console.log(result); | |
| 317 | + // console.log(service.getOrderColumns()); | |
| 318 | + $modalInstance.dismiss("cancel"); | |
| 319 | + | |
| 320 | + } | |
| 253 | 321 | } |
| 254 | 322 | ] |
| 255 | 323 | ); | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/scheduleRuleManage/orderOptionOpen.html
0 → 100644
| 1 | +<div class="modal-header"> | |
| 2 | + <div class="modal-title"> | |
| 3 | + <h3> | |
| 4 | + <i class="fa fa-sort-amount-asc" aria-hidden="true"></i> | |
| 5 | + <span class="caption-subject bold uppercase">排序字段选择</span> | |
| 6 | + </h3> | |
| 7 | + </div> | |
| 8 | +</div> | |
| 9 | +<div class="modal-body"> | |
| 10 | + <!--order={{$ctrl.orderColumns.order}}--> | |
| 11 | + <!--<br>--> | |
| 12 | + <!--direction={{$ctrl.orderColumns.direction}}--> | |
| 13 | + <sa-Orderoption name="orderOptions" columns="$ctrl.columns" ordercolumns="$ctrl.orderColumns"> | |
| 14 | + </sa-Orderoption> | |
| 15 | +</div> | |
| 16 | +<div class="modal-footer"> | |
| 17 | + <button class="btn btn-primary" ng-click="$ctrl.confirm($ctrl.orderColumns)">确定</button> | |
| 18 | +</div> | |
| 0 | 19 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/scheduleRuleManage/service.js
| ... | ... | @@ -3,7 +3,7 @@ angular.module('ScheduleApp').factory('ScheduleRuleManageService_g', ['$resource |
| 3 | 3 | return { |
| 4 | 4 | rest: $resource( |
| 5 | 5 | '/sr1fc/:id', |
| 6 | - {order: 'xl.id,updateDate,carConfigInfo.cl.insideCode', direction: 'ASC,DESC,ASC', id: '@id'}, | |
| 6 | + {order: 'xl.name,updateDate,carConfigInfo.cl.insideCode', direction: 'ASC,DESC,ASC', id: '@id'}, | |
| 7 | 7 | { |
| 8 | 8 | list: { |
| 9 | 9 | method: 'GET', | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/index.html
| ... | ... | @@ -20,6 +20,15 @@ |
| 20 | 20 | |
| 21 | 21 | <div class="row"> |
| 22 | 22 | <div class="col-md-12" ng-controller="TtInfoManageIndexCtrl as ctrl"> |
| 23 | + <style> | |
| 24 | + .dropdown-menu { | |
| 25 | + border-color: #32c5d2; | |
| 26 | + } | |
| 27 | + .btn-group > .dropdown-menu:before { | |
| 28 | + border-bottom-color: #32c5d2; | |
| 29 | + } | |
| 30 | + </style> | |
| 31 | + | |
| 23 | 32 | <div class="portlet light bordered"> |
| 24 | 33 | <div class="portlet-title"> |
| 25 | 34 | <div class="caption font-dark"> |
| ... | ... | @@ -31,7 +40,7 @@ |
| 31 | 40 | <!--<i class="fa fa-plus"></i>--> |
| 32 | 41 | <!--测试--> |
| 33 | 42 | <!--</a>--> |
| 34 | - <a href="javascript:" class="btn btn-circle blue" ng-click="ctrl.toTtInfoManageForm()"> | |
| 43 | + <a href="javascript:" class="btn blue" ng-click="ctrl.toTtInfoManageForm()"> | |
| 35 | 44 | <i class="fa fa-plus"></i> |
| 36 | 45 | 添加时刻表 |
| 37 | 46 | </a> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/list.html
| ... | ... | @@ -47,9 +47,24 @@ |
| 47 | 47 | </td> |
| 48 | 48 | <td></td> |
| 49 | 49 | <td> |
| 50 | - <button class="btn btn-sm green btn-outline filter-submit margin-bottom" | |
| 51 | - ng-click="ctrl.doPage()"> | |
| 52 | - <i class="fa fa-search"></i> 搜索</button> | |
| 50 | + <div class="btn-group"> | |
| 51 | + <button class="btn btn-sm green btn-outline filter-submit margin-bottom" style="margin-right: 0;" | |
| 52 | + ng-click="ctrl.doPage()"> | |
| 53 | + <i class="fa fa-search"></i> 搜索</button> | |
| 54 | + <button class="btn btn-sm green btn-outline filter-submit margin-bottom dropdown-toggle" | |
| 55 | + data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |
| 56 | + <span class="caret"></span> | |
| 57 | + <span class="sr-only">dropdown</span> | |
| 58 | + </button> | |
| 59 | + <ul class="dropdown-menu pull-right"> | |
| 60 | + <li> | |
| 61 | + <a href="javascript:" class="tool-action" ng-click="ctrl.customOrder()"> | |
| 62 | + <i class="fa fa-sort-amount-asc" aria-hidden="true"></i> | |
| 63 | + 排序选项 | |
| 64 | + </a> | |
| 65 | + </li> | |
| 66 | + </ul> | |
| 67 | + </div> | |
| 53 | 68 | |
| 54 | 69 | <button class="btn btn-sm red btn-outline filter-cancel" |
| 55 | 70 | ng-click="ctrl.reset()"> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/module.js
| ... | ... | @@ -19,6 +19,21 @@ angular.module('ScheduleApp').factory( |
| 19 | 19 | uiToRecord: 0 // 页面绑定,当前页到第几条记录 |
| 20 | 20 | }; |
| 21 | 21 | |
| 22 | + // 字段描述 | |
| 23 | + var columns = [ | |
| 24 | + {name: "xl.name", desc: "线路名称"}, | |
| 25 | + {name: "name", desc: "时刻表名称"}, | |
| 26 | + {name: "xlDir", desc: "上下行"}, | |
| 27 | + {name: "isEnableDisTemplate", desc: "是否启用"}, | |
| 28 | + {name: "qyrq", desc: "启用日期"}, | |
| 29 | + {name: "isCancel", desc: "是否作废"} | |
| 30 | + ]; | |
| 31 | + // 排序字段 | |
| 32 | + var orderColumns = { | |
| 33 | + order: "xl.name,isCancel,isEnableDisTemplate,qyrq", | |
| 34 | + direction: "DESC,ASC,DESC,DESC" | |
| 35 | + }; | |
| 36 | + | |
| 22 | 37 | // 查询对象类 |
| 23 | 38 | var queryClass = service.rest; |
| 24 | 39 | |
| ... | ... | @@ -26,6 +41,12 @@ angular.module('ScheduleApp').factory( |
| 26 | 41 | getTtInfoQueryClass: function() { |
| 27 | 42 | return queryClass; |
| 28 | 43 | }, |
| 44 | + getColumns: function() { | |
| 45 | + return columns; | |
| 46 | + }, | |
| 47 | + getOrderColumns: function() { | |
| 48 | + return orderColumns; | |
| 49 | + }, | |
| 29 | 50 | getSearchCondition: function() { |
| 30 | 51 | currentSearchCondition.page = currentPage.uiNumber - 1; |
| 31 | 52 | |
| ... | ... | @@ -34,6 +55,10 @@ angular.module('ScheduleApp').factory( |
| 34 | 55 | currentSearchCondition["xl.cgsbm_in"] = UserPrincipal.getGsStrs().join(","); |
| 35 | 56 | } |
| 36 | 57 | |
| 58 | + // 重置排序字段条件 | |
| 59 | + currentSearchCondition.order = orderColumns.order; | |
| 60 | + currentSearchCondition.direction = orderColumns.direction; | |
| 61 | + | |
| 37 | 62 | return currentSearchCondition; |
| 38 | 63 | }, |
| 39 | 64 | getPage: function(page) { |
| ... | ... | @@ -125,7 +150,8 @@ angular.module('ScheduleApp').controller( |
| 125 | 150 | [ |
| 126 | 151 | 'TtInfoManageService', |
| 127 | 152 | 'FileDownload_g', |
| 128 | - function(service, fileDownload) { | |
| 153 | + '$uibModal', | |
| 154 | + function(service, fileDownload, $uibModal) { | |
| 129 | 155 | var self = this; |
| 130 | 156 | var TtInfo = service.getTtInfoQueryClass(); |
| 131 | 157 | |
| ... | ... | @@ -204,7 +230,50 @@ angular.module('ScheduleApp').controller( |
| 204 | 230 | |
| 205 | 231 | }; |
| 206 | 232 | |
| 207 | - // TODO: | |
| 233 | + self.customOrder = function() { | |
| 234 | + // large方式弹出模态对话框 | |
| 235 | + var modalInstance = $uibModal.open({ | |
| 236 | + templateUrl: '/pages/scheduleApp/module/core/ttInfoManage/orderOptionOpen.html', | |
| 237 | + size: "sm", | |
| 238 | + animation: true, | |
| 239 | + backdrop: 'static', | |
| 240 | + resolve: { | |
| 241 | + }, | |
| 242 | + windowClass: 'center-modal', | |
| 243 | + controller: "TtInfoManageListOrderOptionModalInstanceCtrl", | |
| 244 | + controllerAs: "$ctrl", | |
| 245 | + bindToController: true | |
| 246 | + }); | |
| 247 | + modalInstance.result.then( | |
| 248 | + function(result) { | |
| 249 | + console.log("dataImport.html打开"); | |
| 250 | + }, | |
| 251 | + function() { | |
| 252 | + console.log("dataImport.html消失"); | |
| 253 | + } | |
| 254 | + ); | |
| 255 | + }; | |
| 256 | + } | |
| 257 | + ] | |
| 258 | +); | |
| 259 | + | |
| 260 | +angular.module('ScheduleApp').controller( | |
| 261 | + "TtInfoManageListOrderOptionModalInstanceCtrl", | |
| 262 | + [ | |
| 263 | + "TtInfoManageService", | |
| 264 | + "$modalInstance", | |
| 265 | + function(service, $modalInstance) { | |
| 266 | + var self = this; | |
| 267 | + | |
| 268 | + self.columns = service.getColumns(); | |
| 269 | + self.orderColumns = service.getOrderColumns(); | |
| 270 | + | |
| 271 | + self.confirm = function(result) { | |
| 272 | + // console.log(result); | |
| 273 | + // console.log(service.getOrderColumns()); | |
| 274 | + $modalInstance.dismiss("cancel"); | |
| 275 | + | |
| 276 | + } | |
| 208 | 277 | } |
| 209 | 278 | ] |
| 210 | 279 | ); | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/orderOptionOpen.html
0 → 100644
| 1 | +<div class="modal-header"> | |
| 2 | + <div class="modal-title"> | |
| 3 | + <h3> | |
| 4 | + <i class="fa fa-sort-amount-asc" aria-hidden="true"></i> | |
| 5 | + <span class="caption-subject bold uppercase">排序字段选择</span> | |
| 6 | + </h3> | |
| 7 | + </div> | |
| 8 | +</div> | |
| 9 | +<div class="modal-body"> | |
| 10 | + <!--order={{$ctrl.orderColumns.order}}--> | |
| 11 | + <!--<br>--> | |
| 12 | + <!--direction={{$ctrl.orderColumns.direction}}--> | |
| 13 | + <sa-Orderoption name="orderOptions" columns="$ctrl.columns" ordercolumns="$ctrl.orderColumns"> | |
| 14 | + </sa-Orderoption> | |
| 15 | +</div> | |
| 16 | +<div class="modal-footer"> | |
| 17 | + <button class="btn btn-primary" ng-click="$ctrl.confirm($ctrl.orderColumns)">确定</button> | |
| 18 | +</div> | |
| 0 | 19 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/service.js
| ... | ... | @@ -7,7 +7,7 @@ angular.module('ScheduleApp').factory( |
| 7 | 7 | return { |
| 8 | 8 | rest: $resource( |
| 9 | 9 | '/tic_ec/:id', |
| 10 | - {order: 'xl,isCancel,isEnableDisTemplate,qyrq', direction: 'DESC,ASC,DESC,DESC', id: '@id'}, | |
| 10 | + {order: 'xl.name,isCancel,isEnableDisTemplate,qyrq', direction: 'DESC,ASC,DESC,DESC', id: '@id'}, | |
| 11 | 11 | { |
| 12 | 12 | list: { |
| 13 | 13 | method: 'GET', | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage2/index.html
| ... | ... | @@ -20,6 +20,15 @@ |
| 20 | 20 | |
| 21 | 21 | <div class="row"> |
| 22 | 22 | <div class="col-md-12" ng-controller="TtInfoManage2IndexCtrl as ctrl"> |
| 23 | + <style> | |
| 24 | + .dropdown-menu { | |
| 25 | + border-color: #32c5d2; | |
| 26 | + } | |
| 27 | + .btn-group > .dropdown-menu:before { | |
| 28 | + border-bottom-color: #32c5d2; | |
| 29 | + } | |
| 30 | + </style> | |
| 31 | + | |
| 23 | 32 | <div class="portlet light bordered"> |
| 24 | 33 | <div class="portlet-title"> |
| 25 | 34 | <div class="caption font-dark"> |
| ... | ... | @@ -31,7 +40,7 @@ |
| 31 | 40 | <!--<i class="fa fa-plus"></i>--> |
| 32 | 41 | <!--测试--> |
| 33 | 42 | <!--</a>--> |
| 34 | - <a href="javascript:" class="btn btn-circle blue" ng-click="ctrl.toTtInfoManageForm()"> | |
| 43 | + <a href="javascript:" class="btn blue" ng-click="ctrl.toTtInfoManageForm()"> | |
| 35 | 44 | <i class="fa fa-plus"></i> |
| 36 | 45 | 添加时刻表 |
| 37 | 46 | </a> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage2/list.html
| ... | ... | @@ -47,9 +47,24 @@ |
| 47 | 47 | </td> |
| 48 | 48 | <td></td> |
| 49 | 49 | <td> |
| 50 | - <button class="btn btn-sm green btn-outline filter-submit margin-bottom" | |
| 51 | - ng-click="ctrl.doPage()"> | |
| 52 | - <i class="fa fa-search"></i> 搜索</button> | |
| 50 | + <div class="btn-group"> | |
| 51 | + <button class="btn btn-sm green btn-outline filter-submit margin-bottom" style="margin-right: 0;" | |
| 52 | + ng-click="ctrl.doPage()"> | |
| 53 | + <i class="fa fa-search"></i> 搜索</button> | |
| 54 | + <button class="btn btn-sm green btn-outline filter-submit margin-bottom dropdown-toggle" | |
| 55 | + data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |
| 56 | + <span class="caret"></span> | |
| 57 | + <span class="sr-only">dropdown</span> | |
| 58 | + </button> | |
| 59 | + <ul class="dropdown-menu pull-right"> | |
| 60 | + <li> | |
| 61 | + <a href="javascript:" class="tool-action" ng-click="ctrl.customOrder()"> | |
| 62 | + <i class="fa fa-sort-amount-asc" aria-hidden="true"></i> | |
| 63 | + 排序选项 | |
| 64 | + </a> | |
| 65 | + </li> | |
| 66 | + </ul> | |
| 67 | + </div> | |
| 53 | 68 | |
| 54 | 69 | <button class="btn btn-sm red btn-outline filter-cancel" |
| 55 | 70 | ng-click="ctrl.reset()"> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage2/module.js
| ... | ... | @@ -19,6 +19,21 @@ angular.module('ScheduleApp').factory( |
| 19 | 19 | uiToRecord: 0 // 页面绑定,当前页到第几条记录 |
| 20 | 20 | }; |
| 21 | 21 | |
| 22 | + // 字段描述 | |
| 23 | + var columns = [ | |
| 24 | + {name: "xl.name", desc: "线路名称"}, | |
| 25 | + {name: "name", desc: "时刻表名称"}, | |
| 26 | + {name: "xlDir", desc: "上下行"}, | |
| 27 | + {name: "isEnableDisTemplate", desc: "是否启用"}, | |
| 28 | + {name: "qyrq", desc: "启用日期"}, | |
| 29 | + {name: "isCancel", desc: "是否作废"} | |
| 30 | + ]; | |
| 31 | + // 排序字段 | |
| 32 | + var orderColumns = { | |
| 33 | + order: "xl.name,isCancel,isEnableDisTemplate,qyrq", | |
| 34 | + direction: "DESC,ASC,DESC,DESC" | |
| 35 | + }; | |
| 36 | + | |
| 22 | 37 | // 查询对象类 |
| 23 | 38 | var queryClass = service.rest; |
| 24 | 39 | |
| ... | ... | @@ -26,6 +41,12 @@ angular.module('ScheduleApp').factory( |
| 26 | 41 | getTtInfoQueryClass: function() { |
| 27 | 42 | return queryClass; |
| 28 | 43 | }, |
| 44 | + getColumns: function() { | |
| 45 | + return columns; | |
| 46 | + }, | |
| 47 | + getOrderColumns: function() { | |
| 48 | + return orderColumns; | |
| 49 | + }, | |
| 29 | 50 | getSearchCondition: function() { |
| 30 | 51 | currentSearchCondition.page = currentPage.uiNumber - 1; |
| 31 | 52 | |
| ... | ... | @@ -34,6 +55,10 @@ angular.module('ScheduleApp').factory( |
| 34 | 55 | currentSearchCondition["xl.cgsbm_in"] = UserPrincipal.getGsStrs().join(","); |
| 35 | 56 | } |
| 36 | 57 | |
| 58 | + // 重置排序字段条件 | |
| 59 | + currentSearchCondition.order = orderColumns.order; | |
| 60 | + currentSearchCondition.direction = orderColumns.direction; | |
| 61 | + | |
| 37 | 62 | return currentSearchCondition; |
| 38 | 63 | }, |
| 39 | 64 | getPage: function(page) { |
| ... | ... | @@ -125,7 +150,8 @@ angular.module('ScheduleApp').controller( |
| 125 | 150 | [ |
| 126 | 151 | 'TtInfoManage2Service', |
| 127 | 152 | 'FileDownload_g', |
| 128 | - function(service, fileDownload) { | |
| 153 | + '$uibModal', | |
| 154 | + function(service, fileDownload, $uibModal) { | |
| 129 | 155 | var self = this; |
| 130 | 156 | var TtInfo = service.getTtInfoQueryClass(); |
| 131 | 157 | |
| ... | ... | @@ -204,7 +230,50 @@ angular.module('ScheduleApp').controller( |
| 204 | 230 | |
| 205 | 231 | }; |
| 206 | 232 | |
| 207 | - // TODO: | |
| 233 | + self.customOrder = function() { | |
| 234 | + // large方式弹出模态对话框 | |
| 235 | + var modalInstance = $uibModal.open({ | |
| 236 | + templateUrl: '/pages/scheduleApp/module/core/ttInfoManage2/orderOptionOpen.html', | |
| 237 | + size: "sm", | |
| 238 | + animation: true, | |
| 239 | + backdrop: 'static', | |
| 240 | + resolve: { | |
| 241 | + }, | |
| 242 | + windowClass: 'center-modal', | |
| 243 | + controller: "TtInfoManage2ListOrderOptionModalInstanceCtrl", | |
| 244 | + controllerAs: "$ctrl", | |
| 245 | + bindToController: true | |
| 246 | + }); | |
| 247 | + modalInstance.result.then( | |
| 248 | + function(result) { | |
| 249 | + console.log("dataImport.html打开"); | |
| 250 | + }, | |
| 251 | + function() { | |
| 252 | + console.log("dataImport.html消失"); | |
| 253 | + } | |
| 254 | + ); | |
| 255 | + }; | |
| 256 | + } | |
| 257 | + ] | |
| 258 | +); | |
| 259 | + | |
| 260 | +angular.module('ScheduleApp').controller( | |
| 261 | + "TtInfoManage2ListOrderOptionModalInstanceCtrl", | |
| 262 | + [ | |
| 263 | + "TtInfoManage2Service", | |
| 264 | + "$modalInstance", | |
| 265 | + function(service, $modalInstance) { | |
| 266 | + var self = this; | |
| 267 | + | |
| 268 | + self.columns = service.getColumns(); | |
| 269 | + self.orderColumns = service.getOrderColumns(); | |
| 270 | + | |
| 271 | + self.confirm = function(result) { | |
| 272 | + // console.log(result); | |
| 273 | + // console.log(service.getOrderColumns()); | |
| 274 | + $modalInstance.dismiss("cancel"); | |
| 275 | + | |
| 276 | + } | |
| 208 | 277 | } |
| 209 | 278 | ] |
| 210 | 279 | ); | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage2/orderOptionOpen.html
0 → 100644
| 1 | +<div class="modal-header"> | |
| 2 | + <div class="modal-title"> | |
| 3 | + <h3> | |
| 4 | + <i class="fa fa-sort-amount-asc" aria-hidden="true"></i> | |
| 5 | + <span class="caption-subject bold uppercase">排序字段选择</span> | |
| 6 | + </h3> | |
| 7 | + </div> | |
| 8 | +</div> | |
| 9 | +<div class="modal-body"> | |
| 10 | + <!--order={{$ctrl.orderColumns.order}}--> | |
| 11 | + <!--<br>--> | |
| 12 | + <!--direction={{$ctrl.orderColumns.direction}}--> | |
| 13 | + <sa-Orderoption name="orderOptions" columns="$ctrl.columns" ordercolumns="$ctrl.orderColumns"> | |
| 14 | + </sa-Orderoption> | |
| 15 | +</div> | |
| 16 | +<div class="modal-footer"> | |
| 17 | + <button class="btn btn-primary" ng-click="$ctrl.confirm($ctrl.orderColumns)">确定</button> | |
| 18 | +</div> | |
| 0 | 19 | \ No newline at end of file | ... | ... |