Commit 7c9a72d46d0763ba12e865afdcd925437bf03621
1 parent
657931da
update
Showing
34 changed files
with
2523 additions
and
391 deletions
src/main/resources/datatools/config-prod.properties
0 → 100644
| 1 | +# 配置数据导入导出用到的配置信息 | |
| 2 | + | |
| 3 | +# 上传文件目录配置(根据不同的环境需要修正) | |
| 4 | +#datatools.fileupload_dir=/opt/bsth_control_u_d_files | |
| 5 | +datatools.fileupload_dir=/Users/xu/resource/project/bsth_control_u_d_files | |
| 6 | +# ktr转换文件,中配置的错误输出目录(根据不同的环境需要修正) | |
| 7 | +#datatools.trans_errordir=/opt/bsth_control_u_d_files/erroroutput | |
| 8 | +datatools.trans_errordir=/Users/xu/resource/project/bsth_control_u_d_files/erroroutput | |
| 9 | +# 临时输出文件目录 | |
| 10 | +#datatools.trans_tempdir=/opt/bsth_control_u_d_files/temp | |
| 11 | +datatools.trans_tempdir=/Users/xu/resource/project/bsth_control_u_d_files/temp | |
| 12 | + | |
| 13 | +#------------------- ktr主配置文件路径(类路径) ------------------ | |
| 14 | +datatools.kettle_properties=/datatools/kettle.properties | |
| 15 | + | |
| 16 | +##------------------ ktr通用变量 ------------------ | |
| 17 | +#数据库ip地址 | |
| 18 | +#datatools.kvars_dbip=192.168.168.201 | |
| 19 | +datatools.kvars_dbip=192.168.168.171 | |
| 20 | +#数据库用户名 | |
| 21 | +datatools.kvars_dbuname=root | |
| 22 | +#数据库密码 | |
| 23 | +#datatools.kvars_dbpwd=123456 | |
| 24 | +datatools.kvars_dbpwd=root2jsp | |
| 25 | + | |
| 26 | +# 以下是封装数据导入导出逻辑的ktr转换文件,类路径,以后考虑放到数据库中 | |
| 27 | +# 测试temp的ktr转换文件 | |
| 28 | +datatools.temp_datainputktr=/datatools/ktrs/test.ktr | |
| 29 | +# 车辆信息导入ktr转换 | |
| 30 | +datatools.cars_datainputktr=/datatools/ktrs/carsDataInput.ktr | |
| 31 | +# 人员信息导入 | |
| 32 | +datatools.employees_datainputktr=/datatools/ktrs/employeesDataInput.ktr | |
| 33 | +# 路牌信息导入 | |
| 34 | +datatools.guideboards_datainputktr=/datatools/ktrs/guideboardDataInput.ktr | |
| 35 | +# 时刻表基础信息导入 | |
| 36 | +datatools.ttinfo_datainputktr=/datatools/ktrs/ttinfoDataInput.ktr | |
| 37 | +# 时刻表明细信息导入(元数据) | |
| 38 | +datatools.ttinfodetail_metadatainputktr=/datatools/ktrs/ttinfodetailMetaData.ktr | |
| 39 | +# 时刻表明细编辑用数据(TODO:之后要换成元数据形式输入) | |
| 40 | +datatools.ttinfodetail_foreditktr=/datatools/ktrs/ttinfodetailoutputforedit.ktr | |
| 41 | +# 时刻表明细信息导入 | |
| 42 | +datatools.ttinfodetail_datainputktr=/datatools/ktrs/ttinfodetailDataInput.ktr | |
| 43 | + | |
| 44 | +# 车辆配置信息导入 | |
| 45 | +datatools.carsconfig_datainputktr=/datatools/ktrs/carsConfigDataInput.ktr | |
| 46 | +# 人员配置信息导入 | |
| 47 | +datatools.employeesconfig_datainputktr=/datatools/ktrs/employeesConfigDataInput.ktr | |
| 48 | + | |
| 49 | +# 排班规则信息导入 | |
| 50 | + | ... | ... |
src/main/resources/datatools/config.properties
| 1 | 1 | # 配置数据导入导出用到的配置信息 |
| 2 | 2 | |
| 3 | 3 | # 上传文件目录配置(根据不同的环境需要修正) |
| 4 | -datatools.fileupload_dir=/opt/bsth_control_u_d_files | |
| 4 | +datatools.fileupload_dir=/Users/xu/resource/project/bsth_control_u_d_files | |
| 5 | 5 | # ktr转换文件,中配置的错误输出目录(根据不同的环境需要修正) |
| 6 | -datatools.trans_errordir=/opt/bsth_control_u_d_files/erroroutput | |
| 6 | +datatools.trans_errordir=/Users/xu/resource/project/bsth_control_u_d_files/erroroutput | |
| 7 | 7 | # 临时输出文件目录 |
| 8 | -datatools.trans_tempdir=/opt/bsth_control_u_d_files/temp | |
| 8 | +datatools.trans_tempdir=/Users/xu/resource/project/bsth_control_u_d_files/temp | |
| 9 | 9 | |
| 10 | 10 | #------------------- ktr主配置文件路径(类路径) ------------------ |
| 11 | 11 | datatools.kettle_properties=/datatools/kettle.properties |
| 12 | 12 | |
| 13 | 13 | ##------------------ ktr通用变量 ------------------ |
| 14 | 14 | #数据库ip地址 |
| 15 | -#datatools.kvars_dbip=192.168.168.201 | |
| 16 | -datatools.kvars_dbip=192.168.168.171 | |
| 15 | +datatools.kvars_dbip=localhost | |
| 17 | 16 | #数据库用户名 |
| 18 | 17 | datatools.kvars_dbuname=root |
| 19 | 18 | #数据库密码 |
| 20 | -#datatools.kvars_dbpwd=123456 | |
| 21 | -datatools.kvars_dbpwd=root2jsp | |
| 19 | +datatools.kvars_dbpwd= | |
| 22 | 20 | |
| 23 | 21 | # 以下是封装数据导入导出逻辑的ktr转换文件,类路径,以后考虑放到数据库中 |
| 24 | 22 | # 测试temp的ktr转换文件 | ... | ... |
src/main/resources/static/index.html
| ... | ... | @@ -38,7 +38,7 @@ |
| 38 | 38 | <link rel="stylesheet" href="http://api.map.baidu.com/library/DrawingManager/1.4/src/DrawingManager_min.css" type="text/css" /> |
| 39 | 39 | |
| 40 | 40 | <!-- schedule计划调度AngularJS模块主css --> |
| 41 | -<link rel="stylesheet" href="/pages/scheduleApp/module/main.css" type="text/css"/> | |
| 41 | +<link rel="stylesheet" href="/pages/scheduleApp/module/common/main.css" type="text/css"/> | |
| 42 | 42 | |
| 43 | 43 | <style type="text/css"> |
| 44 | 44 | .searchForm{ |
| ... | ... | @@ -309,7 +309,11 @@ tr.row-active td { |
| 309 | 309 | <script src="/assets/bower_components/oclazyload/dist/ocLazyLoad.min.js" data-exclude=1></script> |
| 310 | 310 | <script src="/assets/bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js" data-exclude=1></script> |
| 311 | 311 | <!-- schedule计划调度AngularJS模块主JS --> |
| 312 | -<script src="/pages/scheduleApp/module/main.js" data-exclude=1></script> | |
| 312 | +<script src="/pages/scheduleApp/module/common/main.js" data-exclude=1></script> | |
| 313 | +<script src="/pages/scheduleApp/module/common/prj-common-globalservice.js" data-exclude=1></script> | |
| 314 | +<script src="/pages/scheduleApp/module/common/prj-common-filter.js" data-exclude=1></script> | |
| 315 | +<script src="/pages/scheduleApp/module/common/prj-common-directive.js" data-exclude=1></script> | |
| 316 | +<script src="/pages/scheduleApp/module/common/prj-common-ui-route-state.js" data-exclude=1></script> | |
| 313 | 317 | |
| 314 | 318 | <script data-exclude=1> |
| 315 | 319 | //初始打开的片段地址 | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/busInfoManage/busInfoManage.js
| ... | ... | @@ -26,7 +26,7 @@ angular.module('ScheduleApp').factory('BusInfoManageService', ['BusInfoManageSer |
| 26 | 26 | resetSearchCondition: function() { |
| 27 | 27 | var key; |
| 28 | 28 | for (key in currentSearchCondition) { |
| 29 | - currentSearchCondition[key] = null; | |
| 29 | + currentSearchCondition[key] = undefined; | |
| 30 | 30 | } |
| 31 | 31 | currentPageNo = 1; |
| 32 | 32 | }, | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/busInfoManage/edit.html
| ... | ... | @@ -63,14 +63,18 @@ |
| 63 | 63 | <div class="form-group has-success has-feedback"> |
| 64 | 64 | <label class="col-md-2 control-label">所属公司*:</label> |
| 65 | 65 | <div class="col-md-3"> |
| 66 | - <sa-Select model="ctrl.busInfoForSave" | |
| 67 | - dicgroup="gsType" | |
| 68 | - placeholder="请选择所属公司..." | |
| 69 | - name="gs" | |
| 70 | - codename="businessCode" | |
| 71 | - dicname="company" | |
| 72 | - required="true"> | |
| 73 | - </sa-Select> | |
| 66 | + <sa-Select3 model="ctrl.busInfoForSave" | |
| 67 | + name="gs" | |
| 68 | + placeholder="请选择所属公司..." | |
| 69 | + dcvalue="{{ctrl.busInfoForSave.businessCode}}" | |
| 70 | + dcname="businessCode" | |
| 71 | + icname="code" | |
| 72 | + dcname2="company" | |
| 73 | + icname2="name" | |
| 74 | + icnames="name" | |
| 75 | + datatype="gsType" | |
| 76 | + required > | |
| 77 | + </sa-Select3> | |
| 74 | 78 | </div> |
| 75 | 79 | <!-- 隐藏块,显示验证信息 --> |
| 76 | 80 | <div class="alert alert-danger well-sm" ng-show="myForm.gs.$error.required"> |
| ... | ... | @@ -121,13 +125,16 @@ |
| 121 | 125 | <div class="form-group has-success has-feedback"> |
| 122 | 126 | <label class="col-md-2 control-label">设备供应厂商*:</label> |
| 123 | 127 | <div class="col-md-3"> |
| 124 | - <sa-Select model="ctrl.busInfoForSave" | |
| 125 | - dicgroup="snames" | |
| 126 | - placeholder="请选择设备厂商..." | |
| 127 | - name="supplierName" | |
| 128 | - codename="supplierName" | |
| 129 | - required="true"> | |
| 130 | - </sa-Select> | |
| 128 | + <sa-Select3 model="ctrl.busInfoForSave" | |
| 129 | + name="supplierName" | |
| 130 | + placeholder="请选择设备厂商..." | |
| 131 | + dcvalue="{{ctrl.busInfoForSave.supplierName}}" | |
| 132 | + dcname="supplierName" | |
| 133 | + icname="code" | |
| 134 | + icnames="name" | |
| 135 | + datatype="snames" | |
| 136 | + required > | |
| 137 | + </sa-Select3> | |
| 131 | 138 | </div> |
| 132 | 139 | <!-- 隐藏快,显示验证信息 --> |
| 133 | 140 | <div class="alert alert-danger well-sm" ng-show="myForm.supplierName.$error.required"> |
| ... | ... | @@ -337,36 +344,45 @@ |
| 337 | 344 | <div class="form-group"> |
| 338 | 345 | <label class="col-md-2 control-label">车辆类型:</label> |
| 339 | 346 | <div class="col-md-3"> |
| 340 | - <sa-Select model="ctrl.busInfoForSave" | |
| 341 | - dicgroup="carType" | |
| 342 | - placeholder="请选择车辆类型..." | |
| 343 | - name="carType" | |
| 344 | - codename="carType" > | |
| 345 | - </sa-Select> | |
| 347 | + <sa-Select3 model="ctrl.busInfoForSave" | |
| 348 | + name="carType" | |
| 349 | + placeholder="请选择车辆类型..." | |
| 350 | + dcvalue="{{ctrl.busInfoForSave.carType}}" | |
| 351 | + dcname="carType" | |
| 352 | + icname="code" | |
| 353 | + icnames="name" | |
| 354 | + datatype="carType" > | |
| 355 | + </sa-Select3> | |
| 346 | 356 | </div> |
| 347 | 357 | </div> |
| 348 | 358 | |
| 349 | 359 | <div class="form-group"> |
| 350 | 360 | <label class="col-md-2 control-label">是否机动车:</label> |
| 351 | 361 | <div class="col-md-3"> |
| 352 | - <sa-Select model="ctrl.busInfoForSave" | |
| 353 | - dicgroup="jdcType" | |
| 354 | - placeholder="请选择机动车类型..." | |
| 355 | - name="vehicleStats" | |
| 356 | - codename="vehicleStats" > | |
| 357 | - </sa-Select> | |
| 362 | + <sa-Select3 model="ctrl.busInfoForSave" | |
| 363 | + name="vehicleStats" | |
| 364 | + placeholder="请选择机动车类型..." | |
| 365 | + dcvalue="{{ctrl.busInfoForSave.vehicleStats}}" | |
| 366 | + dcname="vehicleStats" | |
| 367 | + icname="code" | |
| 368 | + icnames="name" | |
| 369 | + datatype="jdcType" > | |
| 370 | + </sa-Select3> | |
| 358 | 371 | </div> |
| 359 | 372 | </div> |
| 360 | 373 | |
| 361 | 374 | <div class="form-group"> |
| 362 | 375 | <label class="col-md-2 control-label">营运状态:</label> |
| 363 | 376 | <div class="col-md-3"> |
| 364 | - <sa-Select model="ctrl.busInfoForSave" | |
| 365 | - dicgroup="yyztType" | |
| 366 | - placeholder="请选择营运状态..." | |
| 367 | - name="operatorsState" | |
| 368 | - codename="operatorsState" > | |
| 369 | - </sa-Select> | |
| 377 | + <sa-Select3 model="ctrl.busInfoForSave" | |
| 378 | + name="operatorsState" | |
| 379 | + placeholder="请选择营运状态..." | |
| 380 | + dcvalue="{{ctrl.busInfoForSave.operatorsState}}" | |
| 381 | + dcname="operatorsState" | |
| 382 | + icname="code" | |
| 383 | + icnames="name" | |
| 384 | + datatype="yyztType" > | |
| 385 | + </sa-Select3> | |
| 370 | 386 | </div> |
| 371 | 387 | </div> |
| 372 | 388 | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/busInfoManage/form.html
| ... | ... | @@ -63,14 +63,19 @@ |
| 63 | 63 | <div class="form-group has-success has-feedback"> |
| 64 | 64 | <label class="col-md-2 control-label">所属公司*:</label> |
| 65 | 65 | <div class="col-md-3"> |
| 66 | - <sa-Select model="ctrl.busInfoForSave" | |
| 67 | - dicgroup="gsType" | |
| 68 | - placeholder="请选择所属公司..." | |
| 69 | - name="gs" | |
| 70 | - codename="businessCode" | |
| 71 | - dicname="company" | |
| 72 | - required="true"> | |
| 73 | - </sa-Select> | |
| 66 | + <sa-Select3 model="ctrl.busInfoForSave" | |
| 67 | + name="gs" | |
| 68 | + placeholder="请选择所属公司..." | |
| 69 | + dcvalue="{{ctrl.busInfoForSave.businessCode}}" | |
| 70 | + dcname="businessCode" | |
| 71 | + icname="code" | |
| 72 | + dcname2="company" | |
| 73 | + icname2="name" | |
| 74 | + icnames="name" | |
| 75 | + datatype="gsType" | |
| 76 | + required > | |
| 77 | + </sa-Select3> | |
| 78 | + | |
| 74 | 79 | </div> |
| 75 | 80 | <!-- 隐藏块,显示验证信息 --> |
| 76 | 81 | <div class="alert alert-danger well-sm" ng-show="myForm.gs.$error.required"> |
| ... | ... | @@ -121,13 +126,16 @@ |
| 121 | 126 | <div class="form-group has-success has-feedback"> |
| 122 | 127 | <label class="col-md-2 control-label">设备供应厂商*:</label> |
| 123 | 128 | <div class="col-md-3"> |
| 124 | - <sa-Select model="ctrl.busInfoForSave" | |
| 125 | - dicgroup="snames" | |
| 126 | - placeholder="请选择设备厂商..." | |
| 127 | - name="supplierName" | |
| 128 | - codename="supplierName" | |
| 129 | - required="true"> | |
| 130 | - </sa-Select> | |
| 129 | + <sa-Select3 model="ctrl.busInfoForSave" | |
| 130 | + name="supplierName" | |
| 131 | + placeholder="请选择设备厂商..." | |
| 132 | + dcvalue="{{ctrl.busInfoForSave.supplierName}}" | |
| 133 | + dcname="supplierName" | |
| 134 | + icname="code" | |
| 135 | + icnames="name" | |
| 136 | + datatype="snames" | |
| 137 | + required > | |
| 138 | + </sa-Select3> | |
| 131 | 139 | </div> |
| 132 | 140 | <!-- 隐藏快,显示验证信息 --> |
| 133 | 141 | <div class="alert alert-danger well-sm" ng-show="myForm.supplierName.$error.required"> |
| ... | ... | @@ -337,36 +345,45 @@ |
| 337 | 345 | <div class="form-group"> |
| 338 | 346 | <label class="col-md-2 control-label">车辆类型:</label> |
| 339 | 347 | <div class="col-md-3"> |
| 340 | - <sa-Select model="ctrl.busInfoForSave" | |
| 341 | - dicgroup="carType" | |
| 342 | - placeholder="请选择车辆类型..." | |
| 343 | - name="carType" | |
| 344 | - codename="carType" > | |
| 345 | - </sa-Select> | |
| 348 | + <sa-Select3 model="ctrl.busInfoForSave" | |
| 349 | + name="carType" | |
| 350 | + placeholder="请选择车辆类型..." | |
| 351 | + dcvalue="{{ctrl.busInfoForSave.carType}}" | |
| 352 | + dcname="carType" | |
| 353 | + icname="code" | |
| 354 | + icnames="name" | |
| 355 | + datatype="carType" > | |
| 356 | + </sa-Select3> | |
| 346 | 357 | </div> |
| 347 | 358 | </div> |
| 348 | 359 | |
| 349 | 360 | <div class="form-group"> |
| 350 | 361 | <label class="col-md-2 control-label">是否机动车:</label> |
| 351 | 362 | <div class="col-md-3"> |
| 352 | - <sa-Select model="ctrl.busInfoForSave" | |
| 353 | - dicgroup="jdcType" | |
| 354 | - placeholder="请选择机动车类型..." | |
| 355 | - name="vehicleStats" | |
| 356 | - codename="vehicleStats" > | |
| 357 | - </sa-Select> | |
| 363 | + <sa-Select3 model="ctrl.busInfoForSave" | |
| 364 | + name="vehicleStats" | |
| 365 | + placeholder="请选择机动车类型..." | |
| 366 | + dcvalue="{{ctrl.busInfoForSave.vehicleStats}}" | |
| 367 | + dcname="vehicleStats" | |
| 368 | + icname="code" | |
| 369 | + icnames="name" | |
| 370 | + datatype="jdcType" > | |
| 371 | + </sa-Select3> | |
| 358 | 372 | </div> |
| 359 | 373 | </div> |
| 360 | 374 | |
| 361 | 375 | <div class="form-group"> |
| 362 | 376 | <label class="col-md-2 control-label">营运状态:</label> |
| 363 | 377 | <div class="col-md-3"> |
| 364 | - <sa-Select model="ctrl.busInfoForSave" | |
| 365 | - dicgroup="yyztType" | |
| 366 | - placeholder="请选择营运状态..." | |
| 367 | - name="operatorsState" | |
| 368 | - codename="operatorsState" > | |
| 369 | - </sa-Select> | |
| 378 | + <sa-Select3 model="ctrl.busInfoForSave" | |
| 379 | + name="operatorsState" | |
| 380 | + placeholder="请选择营运状态..." | |
| 381 | + dcvalue="{{ctrl.busInfoForSave.operatorsState}}" | |
| 382 | + dcname="operatorsState" | |
| 383 | + icname="code" | |
| 384 | + icnames="name" | |
| 385 | + datatype="yyztType" > | |
| 386 | + </sa-Select3> | |
| 370 | 387 | </div> |
| 371 | 388 | </div> |
| 372 | 389 | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/busInfoManage/list.html
| 1 | 1 | <!-- ui-route busInfoManage.list --> |
| 2 | 2 | <div ng-controller="BusInfoManageListCtrl as ctrl"> |
| 3 | - <div style="width: 100%; height: 100%; overflow: auto"> | |
| 3 | + <div class="fixDiv"> | |
| 4 | 4 | <table class="fixTable table table-striped table-bordered table-hover table-checkable order-column"> |
| 5 | 5 | <thead> |
| 6 | 6 | <tr role="row" class="heading"> |
| ... | ... | @@ -30,12 +30,15 @@ |
| 30 | 30 | </td> |
| 31 | 31 | <td> |
| 32 | 32 | <div> |
| 33 | - <sa-Select model="ctrl.searchCondition()" | |
| 34 | - dicgroup="gsType" | |
| 35 | - placeholder="请选择..." | |
| 36 | - name="gs" | |
| 37 | - codename="businessCode_eq"> | |
| 38 | - </sa-Select> | |
| 33 | + <sa-Select3 model="ctrl.searchCondition()" | |
| 34 | + name="gs" | |
| 35 | + placeholder="请选择..." | |
| 36 | + dcvalue="{{ctrl.searchCondition().businessCode_eq}}" | |
| 37 | + dcname="businessCode_eq" | |
| 38 | + icname="code" | |
| 39 | + icnames="name" | |
| 40 | + datatype="gsType"> | |
| 41 | + </sa-Select3> | |
| 39 | 42 | </div> |
| 40 | 43 | </td> |
| 41 | 44 | <td> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/employeeInfoManage/edit.html
| ... | ... | @@ -36,14 +36,18 @@ |
| 36 | 36 | <div class="form-group has-success has-feedback"> |
| 37 | 37 | <label class="col-md-2 control-label">所属公司*:</label> |
| 38 | 38 | <div class="col-md-3"> |
| 39 | - <sa-Select model="ctrl.employeeInfoForSave" | |
| 40 | - dicgroup="gsType" | |
| 41 | - placeholder="请选择所属公司..." | |
| 42 | - name="gs" | |
| 43 | - codename="companyCode" | |
| 44 | - dicname="company" | |
| 45 | - required="true"> | |
| 46 | - </sa-Select> | |
| 39 | + <sa-Select3 model="ctrl.employeeInfoForSave" | |
| 40 | + name="gs" | |
| 41 | + placeholder="请选择所属公司..." | |
| 42 | + dcvalue="{{ctrl.employeeInfoForSave.companyCode}}" | |
| 43 | + dcname="companyCode" | |
| 44 | + icname="code" | |
| 45 | + dcname2="company" | |
| 46 | + icname2="name" | |
| 47 | + icnames="name" | |
| 48 | + datatype="gsType" | |
| 49 | + required > | |
| 50 | + </sa-Select3> | |
| 47 | 51 | </div> |
| 48 | 52 | <!-- 隐藏块,显示验证信息 --> |
| 49 | 53 | <div class="alert alert-danger well-sm" ng-show="myForm.gs.$error.required"> |
| ... | ... | @@ -121,12 +125,15 @@ |
| 121 | 125 | <div class="form-group"> |
| 122 | 126 | <label class="col-md-2 control-label">工种:</label> |
| 123 | 127 | <div class="col-md-4"> |
| 124 | - <sa-Select model="ctrl.employeeInfoForSave" | |
| 125 | - dicgroup="gzType" | |
| 126 | - placeholder="请选择工种..." | |
| 127 | - name="posts" | |
| 128 | - codename="posts" > | |
| 129 | - </sa-Select> | |
| 128 | + <sa-Select3 model="ctrl.employeeInfoForSave" | |
| 129 | + name="posts" | |
| 130 | + placeholder="请选择工种..." | |
| 131 | + dcvalue="{{ctrl.employeeInfoForSave.posts}}" | |
| 132 | + dcname="posts" | |
| 133 | + icname="code" | |
| 134 | + icnames="name" | |
| 135 | + datatype="gzType"> | |
| 136 | + </sa-Select3> | |
| 130 | 137 | </div> |
| 131 | 138 | </div> |
| 132 | 139 | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/employeeInfoManage/form.html
| ... | ... | @@ -36,14 +36,18 @@ |
| 36 | 36 | <div class="form-group has-success has-feedback"> |
| 37 | 37 | <label class="col-md-2 control-label">所属公司*:</label> |
| 38 | 38 | <div class="col-md-3"> |
| 39 | - <sa-Select model="ctrl.employeeInfoForSave" | |
| 40 | - dicgroup="gsType" | |
| 41 | - placeholder="请选择所属公司..." | |
| 42 | - name="gs" | |
| 43 | - codename="companyCode" | |
| 44 | - dicname="company" | |
| 45 | - required="true"> | |
| 46 | - </sa-Select> | |
| 39 | + <sa-Select3 model="ctrl.employeeInfoForSave" | |
| 40 | + name="gs" | |
| 41 | + placeholder="请选择所属公司..." | |
| 42 | + dcvalue="{{ctrl.employeeInfoForSave.companyCode}}" | |
| 43 | + dcname="companyCode" | |
| 44 | + icname="code" | |
| 45 | + dcname2="company" | |
| 46 | + icname2="name" | |
| 47 | + icnames="name" | |
| 48 | + datatype="gsType" | |
| 49 | + required > | |
| 50 | + </sa-Select3> | |
| 47 | 51 | </div> |
| 48 | 52 | <!-- 隐藏块,显示验证信息 --> |
| 49 | 53 | <div class="alert alert-danger well-sm" ng-show="myForm.gs.$error.required"> |
| ... | ... | @@ -121,12 +125,15 @@ |
| 121 | 125 | <div class="form-group"> |
| 122 | 126 | <label class="col-md-2 control-label">工种:</label> |
| 123 | 127 | <div class="col-md-4"> |
| 124 | - <sa-Select model="ctrl.employeeInfoForSave" | |
| 125 | - dicgroup="gzType" | |
| 126 | - placeholder="请选择工种..." | |
| 127 | - name="posts" | |
| 128 | - codename="posts" > | |
| 129 | - </sa-Select> | |
| 128 | + <sa-Select3 model="ctrl.employeeInfoForSave" | |
| 129 | + name="posts" | |
| 130 | + placeholder="请选择工种..." | |
| 131 | + dcvalue="{{ctrl.employeeInfoForSave.posts}}" | |
| 132 | + dcname="posts" | |
| 133 | + icname="code" | |
| 134 | + icnames="name" | |
| 135 | + datatype="gzType"> | |
| 136 | + </sa-Select3> | |
| 130 | 137 | </div> |
| 131 | 138 | </div> |
| 132 | 139 | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/employeeInfoManage/list.html
| 1 | 1 | <!-- ui-route employeeInfoManage.list --> |
| 2 | 2 | <div ng-controller="EmployeeInfoManageListCtrl as ctrl"> |
| 3 | - <div style="width: 100%; height: 100%; overflow: auto"> | |
| 3 | + <div class="fixDiv"> | |
| 4 | 4 | <table class="fixTable table table-striped table-bordered table-hover table-checkable order-column"> |
| 5 | 5 | <thead> |
| 6 | 6 | <tr role="row" class="heading"> |
| ... | ... | @@ -26,12 +26,15 @@ |
| 26 | 26 | </td> |
| 27 | 27 | <td> |
| 28 | 28 | <div> |
| 29 | - <sa-Select model="ctrl.searchCondition()" | |
| 30 | - dicgroup="gsType" | |
| 31 | - placeholder="请选择..." | |
| 32 | - name="gs" | |
| 33 | - codename="companyCode_eq"> | |
| 34 | - </sa-Select> | |
| 29 | + <sa-Select3 model="ctrl.searchCondition()" | |
| 30 | + name="gs" | |
| 31 | + placeholder="请选择..." | |
| 32 | + dcvalue="{{ctrl.searchCondition().companyCode_eq}}" | |
| 33 | + dcname="companyCode_eq" | |
| 34 | + icname="code" | |
| 35 | + icnames="name" | |
| 36 | + datatype="gsType"> | |
| 37 | + </sa-Select3> | |
| 35 | 38 | </div> |
| 36 | 39 | </td> |
| 37 | 40 | <td style="width: 100px"> |
| ... | ... | @@ -39,12 +42,15 @@ |
| 39 | 42 | </td> |
| 40 | 43 | <td> |
| 41 | 44 | <div> |
| 42 | - <sa-Select model="ctrl.searchCondition()" | |
| 43 | - dicgroup="gzType" | |
| 44 | - placeholder="请选择..." | |
| 45 | - name="posts" | |
| 46 | - codename="posts_eq"> | |
| 47 | - </sa-Select> | |
| 45 | + <sa-Select3 model="ctrl.searchCondition()" | |
| 46 | + name="gs" | |
| 47 | + placeholder="请选择..." | |
| 48 | + dcvalue="{{ctrl.searchCondition().posts_eq}}" | |
| 49 | + dcname="posts_eq" | |
| 50 | + icname="code" | |
| 51 | + icnames="name" | |
| 52 | + datatype="gzType"> | |
| 53 | + </sa-Select3> | |
| 48 | 54 | </div> |
| 49 | 55 | </td> |
| 50 | 56 | <td> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/common/dt/MyUiSelectWrapTemplate1.html
0 → 100644
| 1 | +<div class="input-group"> | |
| 2 | + <ui-select ng-model="$saSelectCtrl.$$internalmodel" on-select="$saSelectCtrl.$$internal_select_fn($item)" | |
| 3 | + theme="bootstrap" name="{{$saSelectCtrl.$name}}" > | |
| 4 | + <ui-select-match placeholder="{{$saSelectCtrl.$placeholder}}">{{$select.selected[$saSelectCtrl.$icname_s]}}</ui-select-match> | |
| 5 | + <ui-select-choices repeat="item[$saSelectCtrl.$icname] as item in $saSelectCtrl.$$data" | |
| 6 | + refresh="$saSelectCtrl.$$internal_refresh_fn($select.search)" | |
| 7 | + refresh-delay="10"> | |
| 8 | + <span ng-bind="item[$saSelectCtrl.$icname_s]"></span> | |
| 9 | + </ui-select-choices> | |
| 10 | + </ui-select> | |
| 11 | + <span class="input-group-btn"> | |
| 12 | + <button type="button" ng-click="$saSelectCtrl.$$internal_remove_fn()" class="btn btn-default"> | |
| 13 | + <span class="glyphicon glyphicon-trash"></span> | |
| 14 | + </button> | |
| 15 | + </span> | |
| 16 | +</div> | |
| 0 | 17 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/common/main.css
0 → 100644
| 1 | +form input.ng-invalid.ng-dirty.ng-invalid-required { | |
| 2 | + background-color: #FFC0CB; | |
| 3 | +} | |
| 4 | +form input.ng-valid.ng-dirty.ng-valid-required { | |
| 5 | + background-color: #78FA89; | |
| 6 | +} | |
| 7 | + | |
| 8 | +/*.ng-invalid.ng-dirty {*/ | |
| 9 | + /*background-color: #FFC0CB;*/ | |
| 10 | +/*}*/ | |
| 11 | +/*.ng-valid.ng-dirty {*/ | |
| 12 | + /*background-color: #78FA89;*/ | |
| 13 | +/*}*/ | |
| 14 | + | |
| 15 | +.ui-select-container.ng-invalid.ng-dirty.ng-invalid-required .form-control { | |
| 16 | + background-color: #FFC0CB; | |
| 17 | +} | |
| 18 | +.ui-select-container.ng-valid.ng-dirty.ng-valid-required .form-control { | |
| 19 | + background-color: #78FA89; | |
| 20 | +} | |
| 21 | + | |
| 22 | +.center-modal { | |
| 23 | + position: fixed; | |
| 24 | + top: 10%; | |
| 25 | + left: 18.5%; | |
| 26 | + z-index: 1050; | |
| 27 | + width: 80%; | |
| 28 | + height: 80%; | |
| 29 | + margin-left: -10%; | |
| 30 | +} | |
| 31 | + | |
| 32 | +.fixDiv { | |
| 33 | + min-height: 200px; | |
| 34 | + min-width: 600px; | |
| 35 | + width: 100%; | |
| 36 | + height: 100%; | |
| 37 | + overflow: auto; | |
| 38 | +} | |
| 39 | + | |
| 40 | +/* 固定表格,防止内容撑出表格 */ | |
| 41 | +.fixTable { | |
| 42 | + table-layout: fixed; | |
| 43 | +} | |
| 44 | + | |
| 45 | +/** 内容不换行,多余的用...表示 */ | |
| 46 | +.fixTable thead th { | |
| 47 | + white-space: nowrap; | |
| 48 | + overflow: hidden; | |
| 49 | + text-overflow: ellipsis; | |
| 50 | +} | |
| 51 | + | |
| 52 | +/** 内容不换行,多余的用...表示 */ | |
| 53 | +.fixTable tbody td { | |
| 54 | + white-space: nowrap; | |
| 55 | + overflow: hidden; | |
| 56 | + text-overflow: ellipsis; | |
| 57 | +} | ... | ... |
src/main/resources/static/pages/scheduleApp/module/common/main.js
0 → 100644
| 1 | +// angular 主程序js,必须先导入,配置一些全局设置 | |
| 2 | + | |
| 3 | +var ScheduleApp = angular.module('ScheduleApp', [ | |
| 4 | + 'ui.router', // ui-route跳转 | |
| 5 | + 'ui.bootstrap', // ui bootstrap封装 | |
| 6 | + 'oc.lazyLoad', // 动态加载模块(html,js,css等) | |
| 7 | + 'ngSanitize', // 净化html标签,配合ng-bind-html使用 | |
| 8 | + 'ngResource' // resource服务 | |
| 9 | +]); | |
| 10 | + | |
| 11 | +ScheduleApp.config(['$httpProvider', function($httpProvider) { | |
| 12 | + $httpProvider.defaults.headers.common["X-Requested-With"] = "XMLHttpRequest"; | |
| 13 | +}]); | |
| 14 | + | |
| 15 | +/** ocLazyLoader 配置 */ | |
| 16 | +ScheduleApp.config(['$ocLazyLoadProvider', function($ocLazyLoadProvider) { | |
| 17 | + $ocLazyLoadProvider.config({ | |
| 18 | + // TODO:全局配置在这里 | |
| 19 | + }); | |
| 20 | +}]); | |
| 21 | + | |
| 22 | +/** 配置全局配置信息 */ | |
| 23 | +ScheduleApp.factory('settings', ['$rootScope', function($rootScope) { | |
| 24 | + // 封装 settings服务,并设置给 $rootScope同名对象 | |
| 25 | + var settings = { | |
| 26 | + // TODO: | |
| 27 | + }; | |
| 28 | + | |
| 29 | + $rootScope.settings = settings; | |
| 30 | + | |
| 31 | + return settings; | |
| 32 | +}]); | |
| 33 | + | |
| 34 | +/** Schedule App 主应用控制器 */ | |
| 35 | +ScheduleApp.controller('ScheduleAppController', ['$scope', function($scope) { | |
| 36 | + $scope.$on('$viewContentLoaded', function(event) { | |
| 37 | + console.log("子页面已载入:" + event); | |
| 38 | + }); | |
| 39 | +}]); | |
| 0 | 40 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/common/prj-common-directive.js
0 → 100644
| 1 | +// 自定义指令,指令模版在dt目录下 | |
| 2 | + | |
| 3 | +angular.module('ScheduleApp').directive("saSelect", ['$timeout', function($timeout) { | |
| 4 | + return { | |
| 5 | + restrict: 'E', | |
| 6 | + templateUrl: '/pages/scheduleApp/module/other/MyDictionarySelectTemplate.html', | |
| 7 | + scope: { | |
| 8 | + model: "=" | |
| 9 | + }, | |
| 10 | + controllerAs: "$saSelectCtrl", | |
| 11 | + bindToController: true, | |
| 12 | + controller: function() { | |
| 13 | + var self = this; | |
| 14 | + self.datas = []; // 关联的字典数据,内部格式 {code:{值},name:{名字}} | |
| 15 | + }, | |
| 16 | + /** | |
| 17 | + * 此阶段可以改dom结构,此时angular还没扫描指令, | |
| 18 | + * 这里就可以动态添加其他angularjs的指令字符串,如required指令字符串。 | |
| 19 | + * @param tElem | |
| 20 | + * @param tAttrs | |
| 21 | + * @returns {{pre: Function, post: Function}} | |
| 22 | + */ | |
| 23 | + compile: function(tElem, tAttrs) { | |
| 24 | + // 确定是否使用angularjs required验证 | |
| 25 | + // 属性 required | |
| 26 | + // 如果没有填写,内部不添加验证,如果填写了,并且等于true添加验证,否则不添加 | |
| 27 | + var required_attr = tAttrs["required"]; | |
| 28 | + if (required_attr) { | |
| 29 | + if (required_attr == "true") { | |
| 30 | + // 添加required属性指令 | |
| 31 | + tElem.find("ui-select").attr("required", ""); | |
| 32 | + } else { | |
| 33 | + // 不等于true,不添加required属性指令 | |
| 34 | + } | |
| 35 | + } else { | |
| 36 | + // 不添加required属性指令 | |
| 37 | + } | |
| 38 | + | |
| 39 | + //console.log("saSelect" + ":compile = >" + tElem.html()); | |
| 40 | + | |
| 41 | + return { | |
| 42 | + pre: function(scope, element, attr) { | |
| 43 | + // TODO: | |
| 44 | + }, | |
| 45 | + /** | |
| 46 | + * 相当于link函数。 | |
| 47 | + * | |
| 48 | + * 重要属性如下: | |
| 49 | + * model 是绑定外部值。 | |
| 50 | + * dicgroup 字典组的类型 | |
| 51 | + * name input name属性值 | |
| 52 | + */ | |
| 53 | + post: function(scope, element, attr) { | |
| 54 | + // 1、获取属性 | |
| 55 | + var dicgroup_attr = attr['dicgroup']; // 字典组的类型 | |
| 56 | + var name_attr = attr['name']; // input name属性值 | |
| 57 | + var dicname_attr = attr['dicname']; // model关联的字典名字段 | |
| 58 | + var codename_attr = attr['codename']; // model关联的字典值字段 | |
| 59 | + var placeholder_attr = attr['placeholder']; // select placeholder提示 | |
| 60 | + | |
| 61 | + // 系统的字典对象,使用dictionaryUtils类获取 | |
| 62 | + var origin_dicgroup; | |
| 63 | + var dic_key; // 字典key | |
| 64 | + | |
| 65 | + if (dicgroup_attr) { // 赋值指定的字典数据 | |
| 66 | + origin_dicgroup = dictionaryUtils.getByGroup(dicgroup_attr); | |
| 67 | + for (dic_key in origin_dicgroup) { | |
| 68 | + var data = {}; // 重新组合的字典元素对象 | |
| 69 | + if (dic_key == "true") | |
| 70 | + data.code = true; | |
| 71 | + else | |
| 72 | + data.code = dic_key; | |
| 73 | + data.name = origin_dicgroup[dic_key]; | |
| 74 | + scope["$saSelectCtrl"].datas.push(data); | |
| 75 | + } | |
| 76 | + } | |
| 77 | + | |
| 78 | + if (name_attr) { | |
| 79 | + scope["$saSelectCtrl"].nv = name_attr; | |
| 80 | + } | |
| 81 | + if (placeholder_attr) { | |
| 82 | + scope["$saSelectCtrl"].ph = placeholder_attr; | |
| 83 | + } | |
| 84 | + | |
| 85 | + scope["$saSelectCtrl"].select = function($item) { | |
| 86 | + if (codename_attr) { | |
| 87 | + scope["$saSelectCtrl"].model[codename_attr] = $item.code; | |
| 88 | + } | |
| 89 | + if (dicname_attr) { | |
| 90 | + scope["$saSelectCtrl"].model[dicname_attr] = $item.name; | |
| 91 | + } | |
| 92 | + }; | |
| 93 | + | |
| 94 | + scope["$saSelectCtrl"].remove = function() { | |
| 95 | + if (codename_attr) { | |
| 96 | + scope["$saSelectCtrl"].model[codename_attr] = null; | |
| 97 | + } | |
| 98 | + if (dicname_attr) { | |
| 99 | + scope["$saSelectCtrl"].model[dicname_attr] = null; | |
| 100 | + } | |
| 101 | + scope["$saSelectCtrl"].cmodel = null; | |
| 102 | + }; | |
| 103 | + | |
| 104 | + $timeout(function() { | |
| 105 | + // 创建内部使用的绑定对象 | |
| 106 | + var model_code = scope["$saSelectCtrl"].model[codename_attr]; | |
| 107 | + scope["$saSelectCtrl"].cmodel = model_code; | |
| 108 | + }, 0); | |
| 109 | + } | |
| 110 | + } | |
| 111 | + } | |
| 112 | + }; | |
| 113 | +}]); | |
| 114 | + | |
| 115 | +angular.module('ScheduleApp').directive("saRadiogroup", [function() { | |
| 116 | + /** | |
| 117 | + * 使用字典数据的单选按钮组的指令。 | |
| 118 | + * 指令名称:truefalse-Dic | |
| 119 | + */ | |
| 120 | + return { | |
| 121 | + restrict: 'E', | |
| 122 | + templateUrl: '/pages/scheduleApp/module/other/MyDictionaryRadioGroupTemplate.html', | |
| 123 | + scope: { | |
| 124 | + model: "=" | |
| 125 | + }, | |
| 126 | + controllerAs: "ctrl", | |
| 127 | + bindToController: true, | |
| 128 | + controller: function($scope) { | |
| 129 | + //$scope["model"] = {selectedOption: null}; | |
| 130 | + //console.log("controller"); | |
| 131 | + //console.log("controller:" + $scope["model"]); | |
| 132 | + }, | |
| 133 | + /** | |
| 134 | + * 重要属性如下: | |
| 135 | + * model 是绑定外部值。 | |
| 136 | + * disabled 说明是否不能修改 | |
| 137 | + * dicgroup 字典组的类型 | |
| 138 | + * name input name属性值 | |
| 139 | + */ | |
| 140 | + link: function(scope, element, attr) { | |
| 141 | + //console.log("link"); | |
| 142 | + //console.log("link:" + scope.model); | |
| 143 | + //scope["model"] = {selectedOption: null}; | |
| 144 | + | |
| 145 | + if (attr["name"]) { | |
| 146 | + scope["ctrl"].nv = attr["name"]; | |
| 147 | + } | |
| 148 | + | |
| 149 | + if (attr["disabled"]) { | |
| 150 | + scope["ctrl"].disabled = true; | |
| 151 | + } | |
| 152 | + if (attr["dicgroup"]) { | |
| 153 | + var obj = dictionaryUtils.getByGroup(attr['dicgroup']); | |
| 154 | + scope["ctrl"].dic = obj; | |
| 155 | + // 处理 scope["dic"] key值 | |
| 156 | + scope["ctrl"].dicvalueCalcu = function(value) { | |
| 157 | + if (value == "true") { | |
| 158 | + //console.log(value); | |
| 159 | + return true; | |
| 160 | + } else if (value == "false") { | |
| 161 | + //console.log(value); | |
| 162 | + return false; | |
| 163 | + } else { | |
| 164 | + return value; | |
| 165 | + } | |
| 166 | + }; | |
| 167 | + } | |
| 168 | + } | |
| 169 | + }; | |
| 170 | +}]); | |
| 171 | + | |
| 172 | +angular.module('ScheduleApp').directive("remoteValidaton", [ | |
| 173 | + 'BusInfoManageService_g', | |
| 174 | + 'EmployeeInfoManageService_g', | |
| 175 | + function( | |
| 176 | + busInfoManageService_g, | |
| 177 | + employeeInfoManageService_g | |
| 178 | + ) { | |
| 179 | + /** | |
| 180 | + * 远端验证指令,依赖于ngModel | |
| 181 | + * 指令名称 remote-Validation | |
| 182 | + * 需要属性 rvtype 表示验证类型 | |
| 183 | + */ | |
| 184 | + return { | |
| 185 | + restrict: "A", | |
| 186 | + require: "^ngModel", | |
| 187 | + link: function(scope, element, attr, ngModelCtrl) { | |
| 188 | + element.bind("keyup", function() { | |
| 189 | + var modelValue = ngModelCtrl.$modelValue; | |
| 190 | + var rv1_attr = attr["rv1"]; | |
| 191 | + if (attr["rvtype"]) { | |
| 192 | + | |
| 193 | + // 根据rvtype的值,确定使用那个远端验证的url, | |
| 194 | + // rv1, rv2, rv3是关联比较值,暂时使用rv1 | |
| 195 | + // 这个貌似没法通用,根据业务变换 | |
| 196 | + // TODO:暂时有点乱以后改 | |
| 197 | + if (attr["rvtype"] == "insideCode") { | |
| 198 | + busInfoManageService_g.validate.insideCode( | |
| 199 | + {"insideCode_eq": modelValue, type: "equale"}, | |
| 200 | + function(result) { | |
| 201 | + //console.log(result); | |
| 202 | + if (result.status == "SUCCESS") { | |
| 203 | + ngModelCtrl.$setValidity('remote', true); | |
| 204 | + } else { | |
| 205 | + ngModelCtrl.$setValidity('remote', false); | |
| 206 | + } | |
| 207 | + }, | |
| 208 | + function(result) { | |
| 209 | + //console.log(result); | |
| 210 | + ngModelCtrl.$setValidity('remote', true); | |
| 211 | + } | |
| 212 | + ); | |
| 213 | + } else if (attr["rvtype"] == "jobCode") { | |
| 214 | + if (!rv1_attr) { | |
| 215 | + ngModelCtrl.$setValidity('remote', false); | |
| 216 | + return; | |
| 217 | + } | |
| 218 | + | |
| 219 | + employeeInfoManageService_g.validate.jobCode( | |
| 220 | + {"jobCode_eq": modelValue, "companyCode_eq": rv1_attr, type: "equale"}, | |
| 221 | + function(result) { | |
| 222 | + //console.log(result); | |
| 223 | + if (result.status == "SUCCESS") { | |
| 224 | + ngModelCtrl.$setValidity('remote', true); | |
| 225 | + } else { | |
| 226 | + ngModelCtrl.$setValidity('remote', false); | |
| 227 | + } | |
| 228 | + }, | |
| 229 | + function(result) { | |
| 230 | + //console.log(result); | |
| 231 | + ngModelCtrl.$setValidity('remote', true); | |
| 232 | + } | |
| 233 | + ); | |
| 234 | + } | |
| 235 | + } else { | |
| 236 | + // 没有rvtype,就不用远端验证了 | |
| 237 | + ngModelCtrl.$setValidity('remote', true); | |
| 238 | + } | |
| 239 | + | |
| 240 | + attr.$observe("rv1", function(value) { | |
| 241 | + if (attr["rvtype"] == "jobCode") { | |
| 242 | + if (!value) { | |
| 243 | + ngModelCtrl.$setValidity('remote', false); | |
| 244 | + return; | |
| 245 | + } | |
| 246 | + | |
| 247 | + employeeInfoManageService_g.validate.jobCode( | |
| 248 | + {"jobCode_eq": modelValue, "companyCode_eq": rv1_attr, type: "equale"}, | |
| 249 | + function(result) { | |
| 250 | + //console.log(result); | |
| 251 | + if (result.status == "SUCCESS") { | |
| 252 | + ngModelCtrl.$setValidity('remote', true); | |
| 253 | + } else { | |
| 254 | + ngModelCtrl.$setValidity('remote', false); | |
| 255 | + } | |
| 256 | + }, | |
| 257 | + function(result) { | |
| 258 | + //console.log(result); | |
| 259 | + ngModelCtrl.$setValidity('remote', true); | |
| 260 | + } | |
| 261 | + ); | |
| 262 | + } | |
| 263 | + | |
| 264 | + }); | |
| 265 | + }); | |
| 266 | + } | |
| 267 | + }; | |
| 268 | + }]); | |
| 269 | + | |
| 270 | + | |
| 271 | +/** | |
| 272 | + * saSelect2指令,根据属性值,动态载入数据,然后支持拼音搜索,点击右边的按钮清除选择并重新载入数据。 | |
| 273 | + * 1、compile阶段使用的属性如下: | |
| 274 | + * required:用于和表单验证连接,指定成required="true"才有效。 | |
| 275 | + * 2、link阶段使用的属性如下 | |
| 276 | + * model:关联的模型对象 | |
| 277 | + * name:表单验证时需要的名字 | |
| 278 | + * type:关联的那种数据值(xl/cl/ry)-> 对应线路信息/车辆信息/人员信息,后面有的继续加 | |
| 279 | + * modelcolname1:关联的模型字段名字1(一般应该是编码字段) | |
| 280 | + * modelcolname2:关联的模型字段名字2(一般应该是名字字段) | |
| 281 | + * datacolname1;内部数据对应的字段名字1(与模型字段1对应) | |
| 282 | + * datacolname2:内部数据对应的字段名字2(与模型字段2对应) | |
| 283 | + * showcolname:下拉框显示的内部数据字段名(注意:不是模型数据字段名),TODO:以后考虑放动态表达式,并在compile阶段使用 | |
| 284 | + * placeholder:select placeholder字符串描述 | |
| 285 | + * | |
| 286 | + * $$pyFilter,内部的filter指令,结合简拼音进行拼音过滤。 | |
| 287 | + * $$SearchInfoService_g,内部使用的数据服务 | |
| 288 | + */ | |
| 289 | +// saSelect2指令使用的内部信service | |
| 290 | +angular.module('ScheduleApp').factory('$$SearchInfoService_g', ['$resource', function($resource) { | |
| 291 | + return { | |
| 292 | + xl: $resource( | |
| 293 | + '/line/:type', | |
| 294 | + {order: 'name', direction: 'ASC'}, | |
| 295 | + { | |
| 296 | + list: { | |
| 297 | + method: 'GET', | |
| 298 | + isArray: true | |
| 299 | + } | |
| 300 | + } | |
| 301 | + ), | |
| 302 | + ry: $resource( | |
| 303 | + '/personnel/:type', | |
| 304 | + {order: 'personnelName', direction: 'ASC'}, | |
| 305 | + { | |
| 306 | + list: { | |
| 307 | + method: 'GET', | |
| 308 | + isArray: true | |
| 309 | + } | |
| 310 | + } | |
| 311 | + ), | |
| 312 | + cl: $resource( | |
| 313 | + '/cars/:type', | |
| 314 | + {order: "insideCode", direction: 'ASC'}, | |
| 315 | + { | |
| 316 | + list: { | |
| 317 | + method: 'GET', | |
| 318 | + isArray: true | |
| 319 | + } | |
| 320 | + } | |
| 321 | + ), | |
| 322 | + ttInfo: $resource( | |
| 323 | + '/tic/:type', | |
| 324 | + {order: "name", direction: 'ASC'}, | |
| 325 | + { | |
| 326 | + list: { | |
| 327 | + method: 'GET', | |
| 328 | + isArray: true | |
| 329 | + } | |
| 330 | + } | |
| 331 | + ), | |
| 332 | + cci: $resource( | |
| 333 | + '/cci/cars', | |
| 334 | + {}, | |
| 335 | + { | |
| 336 | + list: { | |
| 337 | + method: 'GET', | |
| 338 | + isArray: true | |
| 339 | + } | |
| 340 | + } | |
| 341 | + | |
| 342 | + ) | |
| 343 | + } | |
| 344 | +}]); | |
| 345 | +angular.module('ScheduleApp').filter("$$pyFilter", function() { | |
| 346 | + return function(items, props) { | |
| 347 | + var out = []; | |
| 348 | + var limit = props["limit"] || 20; // 默认20条记录 | |
| 349 | + | |
| 350 | + if (angular.isArray(items)) { | |
| 351 | + items.forEach(function(item) { | |
| 352 | + if (out.length < limit) { | |
| 353 | + if (props.search) { | |
| 354 | + var upTerm = props.search.toUpperCase(); | |
| 355 | + if(item.fullChars.indexOf(upTerm) != -1 | |
| 356 | + || item.camelChars.indexOf(upTerm) != -1) { | |
| 357 | + out.push(item); | |
| 358 | + } | |
| 359 | + } | |
| 360 | + } | |
| 361 | + }); | |
| 362 | + } | |
| 363 | + | |
| 364 | + return out; | |
| 365 | + }; | |
| 366 | +}); | |
| 367 | +angular.module('ScheduleApp').directive("saSelect2", [ | |
| 368 | + '$timeout', '$$SearchInfoService_g', | |
| 369 | + function($timeout, $$searchInfoService_g) { | |
| 370 | + return { | |
| 371 | + restrict: 'E', | |
| 372 | + templateUrl: '/pages/scheduleApp/module/other/MySearchSelectTemplate.html', | |
| 373 | + scope: { | |
| 374 | + model: "=" // 独立作用域,关联外部的模型对象 | |
| 375 | + }, | |
| 376 | + controllerAs: "$saSelectCtrl", | |
| 377 | + bindToController: true, | |
| 378 | + controller: function($scope) { | |
| 379 | + var self = this; | |
| 380 | + self.$$data = []; // 内部关联的数据 | |
| 381 | + }, | |
| 382 | + /** | |
| 383 | + * 此阶段可以改dom结构,此时angular还没扫描指令, | |
| 384 | + * 这里就可以动态添加其他angularjs的指令字符串,如required指令字符串。 | |
| 385 | + * @param tElem | |
| 386 | + * @param tAttrs | |
| 387 | + * @returns {{pre: Function, post: Function}} | |
| 388 | + */ | |
| 389 | + compile: function(tElem, tAttrs) { | |
| 390 | + // 1、获取此阶段使用的属性 | |
| 391 | + var $required_attr = tAttrs["required"]; // 用于和表单验证连接,指定成required="true"才有效。 | |
| 392 | + | |
| 393 | + // 2、处理属性 | |
| 394 | + | |
| 395 | + // 确定是否使用angularjs required验证 | |
| 396 | + // 属性 required | |
| 397 | + // 如果没有填写,内部不添加验证,如果填写了,并且等于true添加验证,否则不添加 | |
| 398 | + if ($required_attr) { | |
| 399 | + if ($required_attr == "true") { | |
| 400 | + // 添加required属性指令 | |
| 401 | + tElem.find("ui-select").attr("required", ""); | |
| 402 | + } else { | |
| 403 | + // 不等于true,不添加required属性指令 | |
| 404 | + } | |
| 405 | + } else { | |
| 406 | + // 不添加required属性指令 | |
| 407 | + } | |
| 408 | + | |
| 409 | + //console.log("saSelect" + ":compile = >" + tElem.html()); | |
| 410 | + | |
| 411 | + return { | |
| 412 | + pre: function(scope, element, attr) { | |
| 413 | + // TODO: | |
| 414 | + }, | |
| 415 | + /** | |
| 416 | + * 相当于link函数。 | |
| 417 | + * | |
| 418 | + * 重要属性如下: | |
| 419 | + * model 是绑定外部值。 | |
| 420 | + * dicgroup 字典组的类型 | |
| 421 | + * name input name属性值 | |
| 422 | + */ | |
| 423 | + post: function(scope, element, attr) { | |
| 424 | + // 1、获取此阶段使用的属性 | |
| 425 | + var $name_attr = attr["name"]; // 表单验证时需要的名字 | |
| 426 | + var $type_attr = attr["type"]; // 关联的那种数据值(xl/cl/ry)-> 对应线路信息/车辆信息/人员信息,后面有的继续加 | |
| 427 | + var $modelcolname1_attr = attr["modelcolname1"]; // 关联的模型字段名字1(一般应该是编码字段) | |
| 428 | + var $modelcolname2_attr = attr["modelcolname2"]; // 关联的模型字段名字2(一般应该是名字字段) | |
| 429 | + var $datacolname1_attr = attr["datacolname1"]; // 内部数据对应的字段名字1(与模型字段1对应) | |
| 430 | + var $datacolname2_attr = attr["datacolname2"]; // 内部数据对应的字段名字2(与模型字段2对应) | |
| 431 | + var $showcolname_attr = attr["showcolname"]; // 下拉框显示的内部数据字段名 | |
| 432 | + var $placeholder_attr = attr["placeholder"]; // select placeholder字符串描述 | |
| 433 | + | |
| 434 | + // 2、处理属性、转换成$saSelectCtrl内部使用的属性 | |
| 435 | + if ($name_attr) { | |
| 436 | + scope["$saSelectCtrl"].$name_attr = $name_attr; | |
| 437 | + } | |
| 438 | + if ($placeholder_attr) { | |
| 439 | + scope["$saSelectCtrl"].$placeholder_attr = $placeholder_attr; | |
| 440 | + } | |
| 441 | + if ($showcolname_attr) { | |
| 442 | + scope["$saSelectCtrl"].$showcolname_attr = $showcolname_attr; | |
| 443 | + } | |
| 444 | + | |
| 445 | + // 2-1、添加内部方法,根据type值,改变$$data的值 | |
| 446 | + scope["$saSelectCtrl"].$$internal_data_change_fn = function() { | |
| 447 | + // 根据type属性动态载入数据 | |
| 448 | + if ($type_attr) { | |
| 449 | + $$searchInfoService_g[$type_attr].list( | |
| 450 | + {type: "all"}, | |
| 451 | + function(result) { | |
| 452 | + scope["$saSelectCtrl"].$$data = []; | |
| 453 | + for (var i = 0; i < result.length; i ++) { | |
| 454 | + var data = {}; // data是result的一部分属性集合,根据配置来确定 | |
| 455 | + if ($datacolname1_attr) { | |
| 456 | + data[$datacolname1_attr] = result[i][$datacolname1_attr]; | |
| 457 | + } | |
| 458 | + if ($datacolname2_attr) { | |
| 459 | + data[$datacolname2_attr] = result[i][$datacolname2_attr]; | |
| 460 | + } | |
| 461 | + if ($showcolname_attr) { | |
| 462 | + // 动态添加基于名字的拼音 | |
| 463 | + data[$showcolname_attr] = result[i][$showcolname_attr]; | |
| 464 | + if (data[$showcolname_attr]) { | |
| 465 | + data["fullChars"] = pinyin.getFullChars(result[i][$showcolname_attr]).toUpperCase(); // 全拼 | |
| 466 | + data["camelChars"] = pinyin.getCamelChars(result[i][$showcolname_attr]); // 简拼 | |
| 467 | + } | |
| 468 | + } | |
| 469 | + if (data["fullChars"]) | |
| 470 | + scope["$saSelectCtrl"].$$data.push(data); | |
| 471 | + } | |
| 472 | + }, | |
| 473 | + function(result) { | |
| 474 | + | |
| 475 | + } | |
| 476 | + ); | |
| 477 | + } | |
| 478 | + }; | |
| 479 | + | |
| 480 | + // 3、选择、删除事件映射模型和内部数据对应的字段 | |
| 481 | + scope["$saSelectCtrl"].$select_fn_attr = function($item) { | |
| 482 | + if ($modelcolname1_attr && $datacolname1_attr) { | |
| 483 | + scope["$saSelectCtrl"].model[$modelcolname1_attr] = $item[$datacolname1_attr]; | |
| 484 | + } | |
| 485 | + if ($modelcolname2_attr && $datacolname2_attr) { | |
| 486 | + scope["$saSelectCtrl"].model[$modelcolname2_attr] = $item[$datacolname2_attr]; | |
| 487 | + } | |
| 488 | + }; | |
| 489 | + scope["$saSelectCtrl"].$remove_fn_attr = function() { | |
| 490 | + if ($modelcolname1_attr) { | |
| 491 | + scope["$saSelectCtrl"].model[$modelcolname1_attr] = null; | |
| 492 | + } | |
| 493 | + if ($modelcolname2_attr) { | |
| 494 | + scope["$saSelectCtrl"].model[$modelcolname2_attr] = null; | |
| 495 | + } | |
| 496 | + scope["$saSelectCtrl"].$$cmodel = null; // 内部模型清空 | |
| 497 | + | |
| 498 | + scope["$saSelectCtrl"].$$internal_data_change_fn(); | |
| 499 | + }; | |
| 500 | + | |
| 501 | + // 4、搜索事件 | |
| 502 | + scope["$saSelectCtrl"].$refreshdata_fn_attr = function($search) { | |
| 503 | + //var fullChars = pinyin.getFullChars($search).toUpperCase(); | |
| 504 | + //var camelChars = pinyin.getCamelChars($search); | |
| 505 | + // | |
| 506 | + //console.log(fullChars + " " + camelChars); | |
| 507 | + // TODO:事件暂时没用,放着以后再说 | |
| 508 | + }; | |
| 509 | + | |
| 510 | + // 5、全部载入后,输入的 | |
| 511 | + $timeout(function() { | |
| 512 | + // 创建内部使用的绑定对象,用于确认选中那个值 | |
| 513 | + scope["$saSelectCtrl"].$$cmodel = scope["$saSelectCtrl"].model[$modelcolname1_attr]; | |
| 514 | + | |
| 515 | + scope["$saSelectCtrl"].$$internal_data_change_fn(); | |
| 516 | + }, 0); | |
| 517 | + } | |
| 518 | + } | |
| 519 | + } | |
| 520 | + }; | |
| 521 | + } | |
| 522 | +]); | |
| 523 | + | |
| 524 | +/** | |
| 525 | + * saSelect3指令 | |
| 526 | + * 属性如下: | |
| 527 | + * model(必须):指定一个外部object,独立作用域,如:model=ctrl.employeeInfoForSave | |
| 528 | + * name(必须):控件的名字 | |
| 529 | + * placeholder(可选):占位符字符串 | |
| 530 | + * dcvalue(必须):绑定的model字段值,如:dcvalue={{ctrl.employeeInfoForSave.xl.id}} | |
| 531 | + * dcname(必须):绑定的model字段名,如:dcname=xl.id | |
| 532 | + * icname(必须):内部与之对应的字段名,如:icname=code | |
| 533 | + * dcname2(可选):其他需要赋值的model字段名2,如:dcname2=xl.name | |
| 534 | + * icname2(可选):内部与之对应的字段名2,如:icname2=name | |
| 535 | + * icnames(必须):用于用于显示,以及简评处理的内部数据字段,如:icnames=name | |
| 536 | + * required(可选):是否要用required验证 | |
| 537 | + * datatype(必须):业务数据类型,有字典类型,动态数据类型,暂时写的死点 | |
| 538 | + * mlp(可选):是否多级属性(这里假设外部model如果多级,内部model也是多级) | |
| 539 | + * | |
| 540 | + */ | |
| 541 | +angular.module('ScheduleApp').directive("saSelect3", [ | |
| 542 | + '$timeout', | |
| 543 | + '$$SearchInfoService_g', | |
| 544 | + function($timeout, $$searchInfoService_g) { | |
| 545 | + return { | |
| 546 | + restrict: 'E', | |
| 547 | + templateUrl: '/pages/scheduleApp/module/common/dt/MyUiSelectWrapTemplate1.html', | |
| 548 | + scope: { | |
| 549 | + model: "=" // 独立作用域,关联外部的模型object | |
| 550 | + }, | |
| 551 | + controllerAs: "$saSelectCtrl", | |
| 552 | + bindToController: true, | |
| 553 | + controller: function($scope) { | |
| 554 | + var self = this; | |
| 555 | + self.$$data = []; // ui-select显示用的数据源 | |
| 556 | + self.$$data_real= []; // 内部真实的数据源 | |
| 557 | + }, | |
| 558 | + | |
| 559 | + /** | |
| 560 | + * 此阶段可以改dom结构,此时angular还没扫描指令, | |
| 561 | + * 这里就可以动态添加其他angularjs的指令字符串,如required指令字符串。 | |
| 562 | + * @param tElem | |
| 563 | + * @param tAttrs | |
| 564 | + * @returns {{pre: Function, post: Function}} | |
| 565 | + */ | |
| 566 | + compile: function(tElem, tAttrs) { | |
| 567 | + // 获取所有的属性 | |
| 568 | + var $name_attr = tAttrs["name"]; // 控件的名字 | |
| 569 | + var $placeholder_attr = tAttrs["placeholder"]; // 占位符的名字 | |
| 570 | + var $dcname_attr = tAttrs["dcname"]; // 绑定的model字段名 | |
| 571 | + var $icname_attr = tAttrs["icname"]; // 内部与之对应的字段名 | |
| 572 | + var $dcname2_attr = tAttrs["dcname2"]; // 其他需要赋值的model字段名2 | |
| 573 | + var $icname2_attr = tAttrs["icname2"]; // 内部与之对应的字段名2 | |
| 574 | + var $icname_s_attr = tAttrs["icnames"]; // 用于用于显示,以及简评处理的内部数据字段 | |
| 575 | + var $datatype_attr = tAttrs["datatype"]; // 内部业务数据类型 | |
| 576 | + var $required_attr = tAttrs["required"]; // 是否需要required验证 | |
| 577 | + var $mlp_attr = tAttrs["mlp"]; // 是否多级属性 | |
| 578 | + | |
| 579 | + // controlAs名字 | |
| 580 | + var ctrlAs = "$saSelectCtrl"; | |
| 581 | + | |
| 582 | + // 数据源初始化标志 | |
| 583 | + var $$data_init = false; | |
| 584 | + // 如果有required属性,添加angularjs required验证 | |
| 585 | + if ($required_attr != undefined) { | |
| 586 | + tElem.find("ui-select").attr("required", ""); | |
| 587 | + } | |
| 588 | + | |
| 589 | + // 由于有的属性是多级的如xl.name,所以要在compile阶段重写属性绑定属性定义 | |
| 590 | + // 原来的设置:{{$select.selected[$saSelectCtrl.$icname_s]}} | |
| 591 | + tElem.find("ui-select-match").html("{{$select.selected" + "." + $icname_s_attr + "}}"); | |
| 592 | + // 原来的设置:item[$saSelectCtrl.$icname] as item in $saSelectCtrl.$$data | |
| 593 | + tElem.find("ui-select-choices").attr("repeat", "item" + "." + $icname_attr + " as item in $saSelectCtrl.$$data"); | |
| 594 | + // 原来的设置:item[$saSelectCtrl.$icname_s] | |
| 595 | + tElem.find("ui-select-choices span").attr("ng-bind", "item" + "." + $icname_s_attr); | |
| 596 | + // 原来的设置:{{$saSelectCtrl.$name}} | |
| 597 | + tElem.find("ui-select").attr("name", $name_attr); | |
| 598 | + // 原来的设置:{{$saSelectCtrl.$placeholder}} | |
| 599 | + tElem.find("ui-select-match").attr("placeholder", $placeholder_attr); | |
| 600 | + | |
| 601 | + return { | |
| 602 | + pre: function(scope, element, attr) { | |
| 603 | + // TODO: | |
| 604 | + }, | |
| 605 | + /** | |
| 606 | + * 相当于link函数。 | |
| 607 | + * @param scope | |
| 608 | + * @param element | |
| 609 | + * @param attr | |
| 610 | + */ | |
| 611 | + post: function(scope, element, attr) { | |
| 612 | + // 添加选中事件处理函数 | |
| 613 | + scope[ctrlAs].$$internal_select_fn = function($item) { | |
| 614 | + if ($dcname_attr && $icname_attr) { | |
| 615 | + if ($mlp_attr) { | |
| 616 | + eval("scope[ctrlAs].model" + "." + $dcname_attr + " = $item" + "." + $icname_attr + ";"); | |
| 617 | + } else { | |
| 618 | + scope[ctrlAs].model[$dcname_attr] = $item[$icname_attr]; | |
| 619 | + } | |
| 620 | + } | |
| 621 | + if ($dcname2_attr && $icname2_attr) { | |
| 622 | + if ($mlp_attr) { | |
| 623 | + eval("scope[ctrlAs].model" + "." + $dcname2_attr + " = $item" + "." + $icname2_attr + ";"); | |
| 624 | + } else { | |
| 625 | + scope[ctrlAs].model[$dcname2_attr] = $item[$icname2_attr]; | |
| 626 | + } | |
| 627 | + } | |
| 628 | + }; | |
| 629 | + | |
| 630 | + // 删除选中事件处理函数 | |
| 631 | + scope[ctrlAs].$$internal_remove_fn = function() { | |
| 632 | + scope[ctrlAs].$$internalmodel = undefined; | |
| 633 | + if ($mlp_attr) { | |
| 634 | + eval("scope[ctrlAs].model" + "." + $dcname_attr + " = undefined;"); | |
| 635 | + } else { | |
| 636 | + scope[ctrlAs].model[$dcname_attr] = undefined; | |
| 637 | + } | |
| 638 | + | |
| 639 | + if ($dcname2_attr) { | |
| 640 | + if ($mlp_attr) { | |
| 641 | + eval("scope[ctrlAs].model" + "." + $dcname2_attr + " = undefined;"); | |
| 642 | + } else { | |
| 643 | + scope[ctrlAs].model[$dcname2_attr] = undefined; | |
| 644 | + } | |
| 645 | + } | |
| 646 | + }; | |
| 647 | + | |
| 648 | + /** | |
| 649 | + * 内部方法,读取字典数据作为数据源。 | |
| 650 | + * @param dicgroup 字典类型,如:gsType | |
| 651 | + * @param ccol 代码字段名 | |
| 652 | + * @param ncol 名字字段名 | |
| 653 | + */ | |
| 654 | + scope[ctrlAs].$$internal_dic_data = function(dicgroup, ccol, ncol) { | |
| 655 | + var origin_dicgroup = dictionaryUtils.getByGroup(dicgroup); | |
| 656 | + var dic_key; // 字典key | |
| 657 | + // 清空内部数据 | |
| 658 | + scope[ctrlAs].$$data_real = []; | |
| 659 | + for (dic_key in origin_dicgroup) { | |
| 660 | + var data = {}; // 重新组合的字典元素对象 | |
| 661 | + if (dic_key == "true") | |
| 662 | + data[ccol] = true; | |
| 663 | + else | |
| 664 | + data[ccol] = dic_key; | |
| 665 | + data[ncol] = origin_dicgroup[dic_key]; | |
| 666 | + scope[ctrlAs].$$data_real.push(data); | |
| 667 | + } | |
| 668 | + // 这里直接将$$data_real数据深拷贝到$$data | |
| 669 | + angular.copy(scope[ctrlAs].$$data_real, scope[ctrlAs].$$data); | |
| 670 | + }; | |
| 671 | + | |
| 672 | + /** | |
| 673 | + * TODO:这个方法有性能问题,result一多就会卡一卡,之后再解决把 | |
| 674 | + * 内部方法,读取字典数据作为数据源。 | |
| 675 | + * @param result 原始数据 | |
| 676 | + * @param dcvalue 传入的关联数据 | |
| 677 | + */ | |
| 678 | + scope[ctrlAs].$$internal_other_data = function(result, dcvalue) { | |
| 679 | + //console.log("start"); | |
| 680 | + // 清空内部数据 | |
| 681 | + scope[ctrlAs].$$data_real = []; | |
| 682 | + for (var i = 0; i < result.length; i ++) { | |
| 683 | + var data = {}; // data是result的一部分属性集合,根据配置来确定 | |
| 684 | + if ($icname_attr) { | |
| 685 | + if ($mlp_attr) { | |
| 686 | + eval("data" + "." + $icname_attr + " = result[i]" + "." + $icname_attr + ";"); | |
| 687 | + } else { | |
| 688 | + data[$icname_attr] = result[i][$icname_attr]; | |
| 689 | + } | |
| 690 | + } | |
| 691 | + if ($icname2_attr) { | |
| 692 | + if ($mlp_attr) { | |
| 693 | + eval("data" + "." + $icname2_attr + " = result[i]" + "." + $icname2_attr + ";"); | |
| 694 | + } else { | |
| 695 | + data[$icname2_attr] = result[i][$icname2_attr]; | |
| 696 | + } | |
| 697 | + } | |
| 698 | + if ($icname_s_attr) { | |
| 699 | + // 动态添加基于名字的拼音 | |
| 700 | + if ($mlp_attr) { | |
| 701 | + eval("data" + "." + $icname_s_attr + " = result[i]" + "." + $icname_s_attr + ";"); | |
| 702 | + if (eval("data" + "." + $icname_s_attr)) { | |
| 703 | + // 全拼 | |
| 704 | + data["fullChars"] = pinyin.getFullChars(eval("result[i]" + "." + $icname_s_attr)).toUpperCase(); | |
| 705 | + // 简拼 | |
| 706 | + data["camelChars"] = pinyin.getCamelChars(eval("result[i]" + "." + $icname_s_attr)); | |
| 707 | + } | |
| 708 | + } else { | |
| 709 | + data[$icname_s_attr] = result[i][$icname_s_attr]; | |
| 710 | + if (data[$icname_s_attr]) { | |
| 711 | + data["fullChars"] = pinyin.getFullChars(result[i][$icname_s_attr]).toUpperCase(); // 全拼 | |
| 712 | + data["camelChars"] = pinyin.getCamelChars(result[i][$icname_s_attr]); // 简拼 | |
| 713 | + } | |
| 714 | + } | |
| 715 | + } | |
| 716 | + if (data["fullChars"]) { // 有拼音的加入数据源 | |
| 717 | + scope[ctrlAs].$$data_real.push(data); | |
| 718 | + } | |
| 719 | + } | |
| 720 | + //console.log("start2"); | |
| 721 | + | |
| 722 | + // 数量太大取前10条记录作为显示 | |
| 723 | + if (angular.isArray(scope[ctrlAs].$$data_real)) { | |
| 724 | + // 先迭代循环查找已经传过来的值 | |
| 725 | + if (scope[ctrlAs].$$data_real.length > 0) { | |
| 726 | + if (dcvalue) { | |
| 727 | + for (var j = 0; j < scope[ctrlAs].$$data_real.length; j++) { | |
| 728 | + if (scope[ctrlAs].$$data_real[j][$icname_attr] == dcvalue) { | |
| 729 | + scope[ctrlAs].$$data.push(angular.copy(scope[ctrlAs].$$data_real[j])); | |
| 730 | + break; | |
| 731 | + } | |
| 732 | + } | |
| 733 | + } | |
| 734 | + } | |
| 735 | + // 在插入剩余的数据 | |
| 736 | + for (var k = 0; k < scope[ctrlAs].$$data_real.length; k++) { | |
| 737 | + if (scope[ctrlAs].$$data.length < 10) { | |
| 738 | + if ($mlp_attr) { | |
| 739 | + if (eval("scope[ctrlAs].$$data_real[k]" + "." + $icname_attr + " != dcvalue")) { | |
| 740 | + scope[ctrlAs].$$data.push(angular.copy(scope[ctrlAs].$$data_real[k])); | |
| 741 | + } | |
| 742 | + } else { | |
| 743 | + if (scope[ctrlAs].$$data_real[k][$icname_attr] != dcvalue) { | |
| 744 | + scope[ctrlAs].$$data.push(angular.copy(scope[ctrlAs].$$data_real[k])); | |
| 745 | + } | |
| 746 | + } | |
| 747 | + } else { | |
| 748 | + break; | |
| 749 | + } | |
| 750 | + } | |
| 751 | + } | |
| 752 | + | |
| 753 | + //console.log("end"); | |
| 754 | + }; | |
| 755 | + | |
| 756 | + // 刷新数据 | |
| 757 | + scope[ctrlAs].$$internal_refresh_fn = function(search) { | |
| 758 | + // 绑定的model字段值,此属性是绑定属性,只能在link阶段获取 | |
| 759 | + var $dcvalue_attr = attr["dcvalue"]; | |
| 760 | + | |
| 761 | + console.log("刷新数据:" + $dcvalue_attr); | |
| 762 | + | |
| 763 | + if (!$$data_init) { // 只初始化$$data_real一次,重新载入页面才能重新初始化 | |
| 764 | + if (dictionaryUtils.getByGroup($datatype_attr)) { // 判定是否字典类型数据源 | |
| 765 | + scope[ctrlAs].$$internal_dic_data( | |
| 766 | + $datatype_attr, $icname_attr, $icname_s_attr); | |
| 767 | + if ($dcvalue_attr) { | |
| 768 | + scope[ctrlAs].$$internalmodel = $dcvalue_attr; | |
| 769 | + } | |
| 770 | + } else { // 非字典类型数据源 | |
| 771 | + $$searchInfoService_g[$datatype_attr].list( | |
| 772 | + {type: "all"}, | |
| 773 | + function(result) { | |
| 774 | + //console.log("ok:" + $datatype_attr); | |
| 775 | + scope[ctrlAs].$$internal_other_data(result, $dcvalue_attr); | |
| 776 | + //console.log("ok2:" + $datatype_attr); | |
| 777 | + if ($dcvalue_attr) { | |
| 778 | + scope[ctrlAs].$$internalmodel = $dcvalue_attr; | |
| 779 | + } | |
| 780 | + | |
| 781 | + $$data_init = true; | |
| 782 | + }, | |
| 783 | + function(result) { | |
| 784 | + | |
| 785 | + } | |
| 786 | + ); | |
| 787 | + } | |
| 788 | + } | |
| 789 | + | |
| 790 | + if ($$data_init) { | |
| 791 | + if (search && search != "") { // 有search值 | |
| 792 | + if (!dictionaryUtils.getByGroup($datatype_attr)) { // 其他数据源 | |
| 793 | + // 处理search | |
| 794 | + console.log("search:" + search); | |
| 795 | + | |
| 796 | + scope[ctrlAs].$$data = []; | |
| 797 | + for (var k = 0; k < scope[ctrlAs].$$data_real.length; k++) { | |
| 798 | + var upTerm = search.toUpperCase(); | |
| 799 | + if (scope[ctrlAs].$$data.length < 10) { | |
| 800 | + if (scope[ctrlAs].$$data_real[k].fullChars.indexOf(upTerm) != -1 | |
| 801 | + || scope[ctrlAs].$$data_real[k].camelChars.indexOf(upTerm) != -1) { | |
| 802 | + scope[ctrlAs].$$data.push(angular.copy(scope[ctrlAs].$$data_real[k])); | |
| 803 | + } | |
| 804 | + } else { | |
| 805 | + break; | |
| 806 | + } | |
| 807 | + } | |
| 808 | + } | |
| 809 | + } | |
| 810 | + | |
| 811 | + } | |
| 812 | + | |
| 813 | + }; | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + // TODO: | |
| 825 | + | |
| 826 | + // dom全部载入后调用 | |
| 827 | + $timeout(function() { | |
| 828 | + // TODO: | |
| 829 | + | |
| 830 | + console.log("dom全部载入后调用"); | |
| 831 | + }, 0); | |
| 832 | + // 监控dcvalue model值变换 | |
| 833 | + attr.$observe("dcvalue", function(value) { | |
| 834 | + // TODO: | |
| 835 | + | |
| 836 | + console.log("监控dc1 model值变换:" + value); | |
| 837 | + scope[ctrlAs].$$internalmodel = value; | |
| 838 | + } | |
| 839 | + ); | |
| 840 | + } | |
| 841 | + }; | |
| 842 | + } | |
| 843 | + }; | |
| 844 | + | |
| 845 | + } | |
| 846 | +]); | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | ... | ... |
src/main/resources/static/pages/scheduleApp/module/common/prj-common-filter.js
0 → 100644
| 1 | +// 自定义filter | |
| 2 | + | |
| 3 | +angular.module('ScheduleApp').filter("dict", [function() { | |
| 4 | + /** | |
| 5 | + * 字典过滤器,将后台的字典编码转换成文字说明。 | |
| 6 | + * code,过滤的值,group,过滤的参数(字典group类型),dv没有匹配到的默认值 | |
| 7 | + * 用例:sfdc | dict:'dctype':'默认值' | |
| 8 | + */ | |
| 9 | + return function(code, group, dv) { | |
| 10 | + if (code == null) { | |
| 11 | + return dv; | |
| 12 | + } else { | |
| 13 | + return dictionaryUtils.transformCode(group, code); | |
| 14 | + } | |
| 15 | + }; | |
| 16 | +}]); | |
| 0 | 17 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/common/prj-common-globalservice.js
0 → 100644
| 1 | +// 项目通用的全局service服务,供不同的controller使用,自定义指令不使用 | |
| 2 | + | |
| 3 | +// 车辆信息service | |
| 4 | +angular.module('ScheduleApp').factory('BusInfoManageService_g', ['$resource', function($resource) { | |
| 5 | + return { | |
| 6 | + rest: $resource( | |
| 7 | + '/cars/:id', | |
| 8 | + {order: 'carCode', direction: 'ASC', id: '@id_route'}, | |
| 9 | + { | |
| 10 | + list: { | |
| 11 | + method: 'GET', | |
| 12 | + params: { | |
| 13 | + page: 0 | |
| 14 | + } | |
| 15 | + }, | |
| 16 | + get: { | |
| 17 | + method: 'GET' | |
| 18 | + }, | |
| 19 | + save: { | |
| 20 | + method: 'POST' | |
| 21 | + } | |
| 22 | + } | |
| 23 | + ), | |
| 24 | + validate: $resource( | |
| 25 | + '/cars/validate/:type', | |
| 26 | + {}, | |
| 27 | + { | |
| 28 | + insideCode: { | |
| 29 | + method: 'GET' | |
| 30 | + } | |
| 31 | + } | |
| 32 | + ) | |
| 33 | + }; | |
| 34 | +}]); | |
| 35 | +// 人员信息service | |
| 36 | +angular.module('ScheduleApp').factory('EmployeeInfoManageService_g', ['$resource', function($resource) { | |
| 37 | + return { | |
| 38 | + rest : $resource( | |
| 39 | + '/personnel/:id', | |
| 40 | + {order: 'jobCode', direction: 'ASC', id: '@id_route'}, | |
| 41 | + { | |
| 42 | + list: { | |
| 43 | + method: 'GET', | |
| 44 | + params: { | |
| 45 | + page: 0 | |
| 46 | + } | |
| 47 | + }, | |
| 48 | + get: { | |
| 49 | + method: 'GET' | |
| 50 | + }, | |
| 51 | + save: { | |
| 52 | + method: 'POST' | |
| 53 | + } | |
| 54 | + } | |
| 55 | + ), | |
| 56 | + validate: $resource( | |
| 57 | + '/personnel/validate/:type', | |
| 58 | + {}, | |
| 59 | + { | |
| 60 | + jobCode: { | |
| 61 | + method: 'GET' | |
| 62 | + } | |
| 63 | + } | |
| 64 | + ) | |
| 65 | + }; | |
| 66 | +}]); | |
| 67 | +// 车辆设备信息service | |
| 68 | +angular.module('ScheduleApp').factory('DeviceInfoManageService_g', ['$resource', function($resource) { | |
| 69 | + return $resource( | |
| 70 | + '/carDevice/:id', | |
| 71 | + {order: 'createDate', direction: 'DESC', id: '@id_route'}, | |
| 72 | + { | |
| 73 | + list: { | |
| 74 | + method: 'GET', | |
| 75 | + params: { | |
| 76 | + page: 0 | |
| 77 | + } | |
| 78 | + }, | |
| 79 | + get: { | |
| 80 | + method: 'GET' | |
| 81 | + }, | |
| 82 | + save: { | |
| 83 | + method: 'POST' | |
| 84 | + } | |
| 85 | + } | |
| 86 | + ); | |
| 87 | +}]); | |
| 88 | + | |
| 89 | +// 车辆配置service | |
| 90 | +angular.module('ScheduleApp').factory('BusConfigService_g', ['$resource', function($resource) { | |
| 91 | + return { | |
| 92 | + rest : $resource( | |
| 93 | + '/cci/:id', | |
| 94 | + {order: 'createDate', direction: 'ASC', id: '@id_route'}, | |
| 95 | + { | |
| 96 | + list: { | |
| 97 | + method: 'GET', | |
| 98 | + params: { | |
| 99 | + page: 0 | |
| 100 | + } | |
| 101 | + }, | |
| 102 | + get: { | |
| 103 | + method: 'GET' | |
| 104 | + }, | |
| 105 | + save: { | |
| 106 | + method: 'POST' | |
| 107 | + } | |
| 108 | + } | |
| 109 | + ) | |
| 110 | + }; | |
| 111 | +}]); | |
| 112 | + | |
| 113 | +// 人员配置service | |
| 114 | +angular.module('ScheduleApp').factory('EmployeeConfigService_g', ['$resource', function($resource) { | |
| 115 | + return { | |
| 116 | + rest : $resource( | |
| 117 | + '/eci/:id', | |
| 118 | + {order: 'createDate', direction: 'ASC', id: '@id_route'}, | |
| 119 | + { | |
| 120 | + list: { | |
| 121 | + method: 'GET', | |
| 122 | + params: { | |
| 123 | + page: 0 | |
| 124 | + } | |
| 125 | + }, | |
| 126 | + get: { | |
| 127 | + method: 'GET' | |
| 128 | + }, | |
| 129 | + save: { | |
| 130 | + method: 'POST' | |
| 131 | + } | |
| 132 | + } | |
| 133 | + ), | |
| 134 | + validate: $resource( // TODO: | |
| 135 | + '/personnel/validate/:type', | |
| 136 | + {}, | |
| 137 | + { | |
| 138 | + jobCode: { | |
| 139 | + method: 'GET' | |
| 140 | + } | |
| 141 | + } | |
| 142 | + ) | |
| 143 | + }; | |
| 144 | +}]); | |
| 145 | + | |
| 146 | +// 路牌管理service | |
| 147 | +angular.module('ScheduleApp').factory('GuideboardManageService_g', ['$resource', function($resource) { | |
| 148 | + return { | |
| 149 | + rest: $resource( | |
| 150 | + '/gic/:id', | |
| 151 | + {order: 'createDate', direction: 'DESC', id: '@id_route'}, | |
| 152 | + { | |
| 153 | + list: { | |
| 154 | + method: 'GET', | |
| 155 | + params: { | |
| 156 | + page: 0 | |
| 157 | + } | |
| 158 | + }, | |
| 159 | + get: { | |
| 160 | + method: 'GET' | |
| 161 | + }, | |
| 162 | + save: { | |
| 163 | + method: 'POST' | |
| 164 | + } | |
| 165 | + } | |
| 166 | + ) | |
| 167 | + }; | |
| 168 | +}]); | |
| 169 | + | |
| 170 | +// 排班管理service | |
| 171 | +angular.module('ScheduleApp').factory('ScheduleRuleManageService_g', ['$resource', function($resource) { | |
| 172 | + return { | |
| 173 | + rest: $resource( | |
| 174 | + '/sr1fc/:id', | |
| 175 | + {order: 'createDate', direction: 'DESC', id: '@id_route'}, | |
| 176 | + { | |
| 177 | + list: { | |
| 178 | + method: 'GET', | |
| 179 | + params: { | |
| 180 | + page: 0 | |
| 181 | + } | |
| 182 | + }, | |
| 183 | + get: { | |
| 184 | + method: 'GET' | |
| 185 | + }, | |
| 186 | + save: { | |
| 187 | + method: 'POST' | |
| 188 | + } | |
| 189 | + } | |
| 190 | + ) | |
| 191 | + }; | |
| 192 | +}]); | |
| 193 | + | |
| 194 | +// 时刻表管理service | |
| 195 | +angular.module('ScheduleApp').factory('TimeTableManageService_g', ['$resource', function($resource) { | |
| 196 | + return { | |
| 197 | + rest: $resource( | |
| 198 | + '/tic/:id', | |
| 199 | + {order: 'createDate', direction: 'DESC', id: '@id_route'}, | |
| 200 | + { | |
| 201 | + list: { | |
| 202 | + method: 'GET', | |
| 203 | + params: { | |
| 204 | + page: 0 | |
| 205 | + } | |
| 206 | + }, | |
| 207 | + get: { | |
| 208 | + method: 'GET' | |
| 209 | + }, | |
| 210 | + save: { | |
| 211 | + method: 'POST' | |
| 212 | + } | |
| 213 | + } | |
| 214 | + ) | |
| 215 | + }; | |
| 216 | +}]); | |
| 217 | +// 时刻表明细管理service | |
| 218 | +angular.module('ScheduleApp').factory('TimeTableDetailManageService_g', ['$resource', function($resource) { | |
| 219 | + return { | |
| 220 | + rest: $resource( | |
| 221 | + '/tidc/:id', | |
| 222 | + {order: 'createDate', direction: 'DESC', id: '@id_route'}, | |
| 223 | + { | |
| 224 | + get: { | |
| 225 | + method: 'GET' | |
| 226 | + }, | |
| 227 | + save: { | |
| 228 | + method: 'POST' | |
| 229 | + } | |
| 230 | + } | |
| 231 | + ), | |
| 232 | + edit: $resource( | |
| 233 | + '/tidc/edit/:xlid/:ttid', | |
| 234 | + {}, | |
| 235 | + { | |
| 236 | + list: { | |
| 237 | + method: 'GET' | |
| 238 | + } | |
| 239 | + } | |
| 240 | + ) | |
| 241 | + }; | |
| 242 | +}]); | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | +// 排班计划管理service | |
| 247 | +angular.module('ScheduleApp').factory('SchedulePlanManageService_g', ['$resource', function($resource) { | |
| 248 | + return { | |
| 249 | + rest : $resource( | |
| 250 | + '/spc/:id', | |
| 251 | + {order: 'createDate', direction: 'DESC', id: '@id_route'}, | |
| 252 | + { | |
| 253 | + list: { | |
| 254 | + method: 'GET', | |
| 255 | + params: { | |
| 256 | + page: 0 | |
| 257 | + } | |
| 258 | + }, | |
| 259 | + get: { | |
| 260 | + method: 'GET' | |
| 261 | + }, | |
| 262 | + save: { | |
| 263 | + method: 'POST' | |
| 264 | + } | |
| 265 | + } | |
| 266 | + ) | |
| 267 | + }; | |
| 268 | +}]); | |
| 269 | + | |
| 270 | +// 排班计划明细管理service | |
| 271 | +angular.module('ScheduleApp').factory('SchedulePlanInfoManageService_g', ['$resource', function($resource) { | |
| 272 | + return { | |
| 273 | + rest : $resource( | |
| 274 | + '/spic/:id', | |
| 275 | + {order: 'scheduleDate,lp,fcno', direction: 'ASC', id: '@id_route'}, | |
| 276 | + { | |
| 277 | + list: { | |
| 278 | + method: 'GET', | |
| 279 | + params: { | |
| 280 | + page: 0 | |
| 281 | + } | |
| 282 | + }, | |
| 283 | + get: { | |
| 284 | + method: 'GET' | |
| 285 | + }, | |
| 286 | + save: { | |
| 287 | + method: 'POST' | |
| 288 | + } | |
| 289 | + } | |
| 290 | + ) | |
| 291 | + }; | |
| 292 | +}]); | |
| 293 | + | |
| 294 | +// 线路运营统计service | |
| 295 | +angular.module('ScheduleApp').factory('BusLineInfoStatService_g', ['$resource', function($resource) { | |
| 296 | + return $resource( | |
| 297 | + '/bic/:id', | |
| 298 | + {order: 'createDate', direction: 'DESC', id: '@id_route'}, // TODO:以后需要根据属性对象的属性查询 | |
| 299 | + { | |
| 300 | + list: { | |
| 301 | + method: 'GET', | |
| 302 | + params: { | |
| 303 | + page: 0 | |
| 304 | + } | |
| 305 | + } | |
| 306 | + } | |
| 307 | + ); | |
| 308 | +}]); | |
| 309 | + | |
| 310 | + | ... | ... |
src/main/resources/static/pages/scheduleApp/module/common/prj-common-ui-route-state.js
0 → 100644
| 1 | +// ui route 配置 | |
| 2 | + | |
| 3 | +/** 配置所有模块页面route */ | |
| 4 | +ScheduleApp.config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $urlRouterProvider) { | |
| 5 | + // 默认路由 | |
| 6 | + //$urlRouterProvider.otherwise('/busConfig.html'); | |
| 7 | + | |
| 8 | + $stateProvider | |
| 9 | + // 车辆基础信息模块配置 | |
| 10 | + .state("busInfoManage", { | |
| 11 | + url: '/busInfoManage', | |
| 12 | + views: { | |
| 13 | + "": { | |
| 14 | + templateUrl: 'pages/scheduleApp/module/basicInfo/busInfoManage/index.html' | |
| 15 | + }, | |
| 16 | + "busInfoManage_list@busInfoManage": { | |
| 17 | + templateUrl: 'pages/scheduleApp/module/basicInfo/busInfoManage/list.html' | |
| 18 | + } | |
| 19 | + }, | |
| 20 | + | |
| 21 | + resolve: { | |
| 22 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 23 | + return $ocLazyLoad.load({ | |
| 24 | + name: 'busInfoManage_module', | |
| 25 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 26 | + files: [ | |
| 27 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 28 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 29 | + "assets/bower_components/angular-file-upload/dist/angular-file-upload.min.js", | |
| 30 | + "pages/scheduleApp/module/basicInfo/busInfoManage/busInfoManage.js" | |
| 31 | + ] | |
| 32 | + }); | |
| 33 | + }] | |
| 34 | + } | |
| 35 | + }) | |
| 36 | + .state("busInfoManage_form", { | |
| 37 | + url: '/busInfoManage_form', | |
| 38 | + views: { | |
| 39 | + "": {templateUrl: 'pages/scheduleApp/module/basicInfo/busInfoManage/form.html'} | |
| 40 | + }, | |
| 41 | + resolve: { | |
| 42 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 43 | + return $ocLazyLoad.load({ | |
| 44 | + name: 'busInfoManage_form_module', | |
| 45 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 46 | + files: [ | |
| 47 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 48 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 49 | + "pages/scheduleApp/module/basicInfo/busInfoManage/busInfoManage.js" | |
| 50 | + ] | |
| 51 | + }); | |
| 52 | + }] | |
| 53 | + } | |
| 54 | + }) | |
| 55 | + .state("busInfoManage_edit", { | |
| 56 | + url: '/busInfoManage_edit/:id', | |
| 57 | + views: { | |
| 58 | + "": {templateUrl: 'pages/scheduleApp/module/basicInfo/busInfoManage/edit.html'} | |
| 59 | + }, | |
| 60 | + resolve: { | |
| 61 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 62 | + return $ocLazyLoad.load({ | |
| 63 | + name: 'busInfoManage_edit_module', | |
| 64 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 65 | + files: [ | |
| 66 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 67 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 68 | + "pages/scheduleApp/module/basicInfo/busInfoManage/busInfoManage.js" | |
| 69 | + ] | |
| 70 | + }); | |
| 71 | + }] | |
| 72 | + } | |
| 73 | + }) | |
| 74 | + .state("busInfoManage_detail", { | |
| 75 | + url: '/busInfoManage_detail/:id', | |
| 76 | + views: { | |
| 77 | + "": {templateUrl: 'pages/scheduleApp/module/basicInfo/busInfoManage/detail.html'} | |
| 78 | + }, | |
| 79 | + resolve: { | |
| 80 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 81 | + return $ocLazyLoad.load({ | |
| 82 | + name: 'busInfoManage_detail_module', | |
| 83 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 84 | + files: [ | |
| 85 | + "pages/scheduleApp/module/basicInfo/busInfoManage/busInfoManage.js" | |
| 86 | + ] | |
| 87 | + }); | |
| 88 | + }] | |
| 89 | + } | |
| 90 | + }) | |
| 91 | + | |
| 92 | + // 人员基础信息模块配置 | |
| 93 | + .state("employeeInfoManage", { | |
| 94 | + url: '/employeeInfoManage', | |
| 95 | + views: { | |
| 96 | + "": { | |
| 97 | + templateUrl: 'pages/scheduleApp/module/basicInfo/employeeInfoManage/index.html' | |
| 98 | + }, | |
| 99 | + "employeeInfoManage_list@employeeInfoManage": { | |
| 100 | + templateUrl: 'pages/scheduleApp/module/basicInfo/employeeInfoManage/list.html' | |
| 101 | + } | |
| 102 | + }, | |
| 103 | + | |
| 104 | + resolve: { | |
| 105 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 106 | + return $ocLazyLoad.load({ | |
| 107 | + name: 'employeeInfoManage_module', | |
| 108 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 109 | + files: [ | |
| 110 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 111 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 112 | + "assets/bower_components/angular-file-upload/dist/angular-file-upload.min.js", | |
| 113 | + "pages/scheduleApp/module/basicInfo/employeeInfoManage/employeeInfoManage.js" | |
| 114 | + ] | |
| 115 | + }); | |
| 116 | + }] | |
| 117 | + } | |
| 118 | + }) | |
| 119 | + .state("employeeInfoManage_form", { | |
| 120 | + url: '/employeeInfoManage_form', | |
| 121 | + views: { | |
| 122 | + "": {templateUrl: 'pages/scheduleApp/module/basicInfo/employeeInfoManage/form.html'} | |
| 123 | + }, | |
| 124 | + resolve: { | |
| 125 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 126 | + return $ocLazyLoad.load({ | |
| 127 | + name: 'employeeInfoManage_form_module', | |
| 128 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 129 | + files: [ | |
| 130 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 131 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 132 | + "pages/scheduleApp/module/basicInfo/employeeInfoManage/employeeInfoManage.js" | |
| 133 | + ] | |
| 134 | + }); | |
| 135 | + }] | |
| 136 | + } | |
| 137 | + }) | |
| 138 | + .state("employeeInfoManage_edit", { | |
| 139 | + url: '/employeeInfoManage_edit/:id', | |
| 140 | + views: { | |
| 141 | + "": {templateUrl: 'pages/scheduleApp/module/basicInfo/employeeInfoManage/edit.html'} | |
| 142 | + }, | |
| 143 | + resolve: { | |
| 144 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 145 | + return $ocLazyLoad.load({ | |
| 146 | + name: 'employeeInfoManage_edit_module', | |
| 147 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 148 | + files: [ | |
| 149 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 150 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 151 | + "pages/scheduleApp/module/basicInfo/employeeInfoManage/employeeInfoManage.js" | |
| 152 | + ] | |
| 153 | + }); | |
| 154 | + }] | |
| 155 | + } | |
| 156 | + }) | |
| 157 | + .state("employeeInfoManage_detail", { | |
| 158 | + url: '/employeeInfoManage_detail/:id', | |
| 159 | + views: { | |
| 160 | + "": {templateUrl: 'pages/scheduleApp/module/basicInfo/employeeInfoManage/detail.html'} | |
| 161 | + }, | |
| 162 | + resolve: { | |
| 163 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 164 | + return $ocLazyLoad.load({ | |
| 165 | + name: 'employeeInfoManage_detail_module', | |
| 166 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 167 | + files: [ | |
| 168 | + "pages/scheduleApp/module/basicInfo/employeeInfoManage/employeeInfoManage.js" | |
| 169 | + ] | |
| 170 | + }); | |
| 171 | + }] | |
| 172 | + } | |
| 173 | + }) | |
| 174 | + | |
| 175 | + // 车辆设备信息模块配置 | |
| 176 | + .state("deviceInfoManage", { | |
| 177 | + url: '/deviceInfoManage', | |
| 178 | + views: { | |
| 179 | + "": { | |
| 180 | + templateUrl: 'pages/scheduleApp/module/basicInfo/deviceInfoManage/index.html' | |
| 181 | + }, | |
| 182 | + "deviceInfoManage_list@deviceInfoManage": { | |
| 183 | + templateUrl: 'pages/scheduleApp/module/basicInfo/deviceInfoManage/list.html' | |
| 184 | + } | |
| 185 | + }, | |
| 186 | + | |
| 187 | + resolve: { | |
| 188 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 189 | + return $ocLazyLoad.load({ | |
| 190 | + name: 'deviceInfoManage_module', | |
| 191 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 192 | + files: [ | |
| 193 | + "pages/scheduleApp/module/basicInfo/deviceInfoManage/deviceInfoManage.js" | |
| 194 | + ] | |
| 195 | + }); | |
| 196 | + }] | |
| 197 | + } | |
| 198 | + }) | |
| 199 | + .state("deviceInfoManage_form", { | |
| 200 | + url: '/deviceInfoManage_form', | |
| 201 | + views: { | |
| 202 | + "": {templateUrl: 'pages/scheduleApp/module/basicInfo/deviceInfoManage/form.html'} | |
| 203 | + }, | |
| 204 | + resolve: { | |
| 205 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 206 | + return $ocLazyLoad.load({ | |
| 207 | + name: 'deviceInfoManage_form_module', | |
| 208 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 209 | + files: [ | |
| 210 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 211 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 212 | + "pages/scheduleApp/module/basicInfo/deviceInfoManage/deviceInfoManage.js" | |
| 213 | + ] | |
| 214 | + }); | |
| 215 | + }] | |
| 216 | + } | |
| 217 | + }) | |
| 218 | + .state("deviceInfoManage_edit", { | |
| 219 | + url: '/deviceInfoManage_edit/:id', | |
| 220 | + views: { | |
| 221 | + "": {templateUrl: 'pages/scheduleApp/module/basicInfo/deviceInfoManage/edit.html'} | |
| 222 | + }, | |
| 223 | + resolve: { | |
| 224 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 225 | + return $ocLazyLoad.load({ | |
| 226 | + name: 'deviceInfoManage_edit_module', | |
| 227 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 228 | + files: [ | |
| 229 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 230 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 231 | + "pages/scheduleApp/module/basicInfo/deviceInfoManage/deviceInfoManage.js" | |
| 232 | + ] | |
| 233 | + }); | |
| 234 | + }] | |
| 235 | + } | |
| 236 | + }) | |
| 237 | + .state("deviceInfoManage_detail", { | |
| 238 | + url: '/deviceInfoManage_detail/:id', | |
| 239 | + views: { | |
| 240 | + "": {templateUrl: 'pages/scheduleApp/module/basicInfo/deviceInfoManage/detail.html'} | |
| 241 | + }, | |
| 242 | + resolve: { | |
| 243 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 244 | + return $ocLazyLoad.load({ | |
| 245 | + name: 'deviceInfoManage_detail_module', | |
| 246 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 247 | + files: [ | |
| 248 | + "pages/scheduleApp/module/basicInfo/deviceInfoManage/deviceInfoManage.js" | |
| 249 | + ] | |
| 250 | + }); | |
| 251 | + }] | |
| 252 | + } | |
| 253 | + }) | |
| 254 | + | |
| 255 | + // 车辆配置模块 | |
| 256 | + .state("busConfig", { | |
| 257 | + url: '/busConfig', | |
| 258 | + views: { | |
| 259 | + "": { | |
| 260 | + templateUrl: 'pages/scheduleApp/module/core/busConfig/index.html' | |
| 261 | + }, | |
| 262 | + "busConfig_list@busConfig": { | |
| 263 | + templateUrl: 'pages/scheduleApp/module/core/busConfig/list.html' | |
| 264 | + } | |
| 265 | + }, | |
| 266 | + | |
| 267 | + resolve: { | |
| 268 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 269 | + return $ocLazyLoad.load({ | |
| 270 | + name: 'busConfig_module', | |
| 271 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 272 | + files: [ | |
| 273 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 274 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 275 | + "assets/bower_components/angular-file-upload/dist/angular-file-upload.min.js", | |
| 276 | + "pages/scheduleApp/module/core/busConfig/busConfig.js" | |
| 277 | + ] | |
| 278 | + }); | |
| 279 | + }] | |
| 280 | + } | |
| 281 | + }) | |
| 282 | + .state("busConfig_form", { | |
| 283 | + url: '/busConfig_form', | |
| 284 | + views: { | |
| 285 | + "": {templateUrl: 'pages/scheduleApp/module/core/busConfig/form.html'} | |
| 286 | + }, | |
| 287 | + resolve: { | |
| 288 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 289 | + return $ocLazyLoad.load({ | |
| 290 | + name: 'busConfig_form_module', | |
| 291 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 292 | + files: [ | |
| 293 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 294 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 295 | + "pages/scheduleApp/module/core/busConfig/busConfig.js" | |
| 296 | + ] | |
| 297 | + }); | |
| 298 | + }] | |
| 299 | + } | |
| 300 | + }) | |
| 301 | + .state("busConfig_edit", { | |
| 302 | + url: '/busConfig_edit/:id', | |
| 303 | + views: { | |
| 304 | + "": {templateUrl: 'pages/scheduleApp/module/core/busConfig/edit.html'} | |
| 305 | + }, | |
| 306 | + resolve: { | |
| 307 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 308 | + return $ocLazyLoad.load({ | |
| 309 | + name: 'busConfig_edit_module', | |
| 310 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 311 | + files: [ | |
| 312 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 313 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 314 | + "pages/scheduleApp/module/core/busConfig/busConfig.js" | |
| 315 | + ] | |
| 316 | + }); | |
| 317 | + }] | |
| 318 | + } | |
| 319 | + }) | |
| 320 | + .state("busConfig_detail", { | |
| 321 | + url: '/busConfig_detail/:id', | |
| 322 | + views: { | |
| 323 | + "": {templateUrl: 'pages/scheduleApp/module/core/busConfig/detail.html'} | |
| 324 | + }, | |
| 325 | + resolve: { | |
| 326 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 327 | + return $ocLazyLoad.load({ | |
| 328 | + name: 'busConfig_detail_module', | |
| 329 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 330 | + files: [ | |
| 331 | + "pages/scheduleApp/module/core/busConfig/busConfig.js" | |
| 332 | + ] | |
| 333 | + }); | |
| 334 | + }] | |
| 335 | + } | |
| 336 | + }) | |
| 337 | + | |
| 338 | + // 人员配置模块 | |
| 339 | + .state("employeeConfig", { | |
| 340 | + url: '/employeeConfig', | |
| 341 | + views: { | |
| 342 | + "": { | |
| 343 | + templateUrl: 'pages/scheduleApp/module/core/employeeConfig/index.html' | |
| 344 | + }, | |
| 345 | + "employeeConfig_list@employeeConfig": { | |
| 346 | + templateUrl: 'pages/scheduleApp/module/core/employeeConfig/list.html' | |
| 347 | + } | |
| 348 | + }, | |
| 349 | + | |
| 350 | + resolve: { | |
| 351 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 352 | + return $ocLazyLoad.load({ | |
| 353 | + name: 'employeeConfig_module', | |
| 354 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 355 | + files: [ | |
| 356 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 357 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 358 | + "assets/bower_components/angular-file-upload/dist/angular-file-upload.min.js", | |
| 359 | + "pages/scheduleApp/module/core/employeeConfig/employeeConfig.js" | |
| 360 | + ] | |
| 361 | + }); | |
| 362 | + }] | |
| 363 | + } | |
| 364 | + }) | |
| 365 | + .state("employeeConfig_form", { | |
| 366 | + url: '/employeeConfig_form', | |
| 367 | + views: { | |
| 368 | + "": {templateUrl: 'pages/scheduleApp/module/core/employeeConfig/form.html'} | |
| 369 | + }, | |
| 370 | + resolve: { | |
| 371 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 372 | + return $ocLazyLoad.load({ | |
| 373 | + name: 'employeeConfig_form_module', | |
| 374 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 375 | + files: [ | |
| 376 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 377 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 378 | + "pages/scheduleApp/module/core/employeeConfig/employeeConfig.js" | |
| 379 | + ] | |
| 380 | + }); | |
| 381 | + }] | |
| 382 | + } | |
| 383 | + }) | |
| 384 | + .state("employeeConfig_edit", { | |
| 385 | + url: '/employeeConfig_edit/:id', | |
| 386 | + views: { | |
| 387 | + "": {templateUrl: 'pages/scheduleApp/module/core/employeeConfig/edit.html'} | |
| 388 | + }, | |
| 389 | + resolve: { | |
| 390 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 391 | + return $ocLazyLoad.load({ | |
| 392 | + name: 'employeeConfig_edit_module', | |
| 393 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 394 | + files: [ | |
| 395 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 396 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 397 | + "pages/scheduleApp/module/core/employeeConfig/employeeConfig.js" | |
| 398 | + ] | |
| 399 | + }); | |
| 400 | + }] | |
| 401 | + } | |
| 402 | + }) | |
| 403 | + .state("employeeConfig_detail", { | |
| 404 | + url: '/employeeConfig_detail/:id', | |
| 405 | + views: { | |
| 406 | + "": {templateUrl: 'pages/scheduleApp/module/core/employeeConfig/detail.html'} | |
| 407 | + }, | |
| 408 | + resolve: { | |
| 409 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 410 | + return $ocLazyLoad.load({ | |
| 411 | + name: 'employeeConfig_detail_module', | |
| 412 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 413 | + files: [ | |
| 414 | + "pages/scheduleApp/module/core/employeeConfig/employeeConfig.js" | |
| 415 | + ] | |
| 416 | + }); | |
| 417 | + }] | |
| 418 | + } | |
| 419 | + }) | |
| 420 | + | |
| 421 | + // 路牌管理 | |
| 422 | + .state("guideboardManage", { | |
| 423 | + url: '/guideboardManage', | |
| 424 | + views: { | |
| 425 | + "": { | |
| 426 | + templateUrl: 'pages/scheduleApp/module/core/guideboardManage/index.html' | |
| 427 | + }, | |
| 428 | + "guideboardManage_list@guideboardManage": { | |
| 429 | + templateUrl: 'pages/scheduleApp/module/core/guideboardManage/list.html' | |
| 430 | + } | |
| 431 | + }, | |
| 432 | + | |
| 433 | + resolve: { | |
| 434 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 435 | + return $ocLazyLoad.load({ | |
| 436 | + name: 'guideboardManage_module', | |
| 437 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 438 | + files: [ | |
| 439 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 440 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 441 | + "assets/bower_components/angular-file-upload/dist/angular-file-upload.min.js", | |
| 442 | + "pages/scheduleApp/module/core/guideboardManage/guideboardManage.js" | |
| 443 | + ] | |
| 444 | + }); | |
| 445 | + }] | |
| 446 | + } | |
| 447 | + }) | |
| 448 | + .state("guideboardManage_detail", { | |
| 449 | + url: '/guideboardManage_detail/:id', | |
| 450 | + views: { | |
| 451 | + "": {templateUrl: 'pages/scheduleApp/module/core/guideboardManage/detail.html'} | |
| 452 | + }, | |
| 453 | + resolve: { | |
| 454 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 455 | + return $ocLazyLoad.load({ | |
| 456 | + name: 'guideboardManage_detail_module', | |
| 457 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 458 | + files: [ | |
| 459 | + "pages/scheduleApp/module/core/guideboardManage/guideboardManage.js" | |
| 460 | + ] | |
| 461 | + }); | |
| 462 | + }] | |
| 463 | + } | |
| 464 | + }) | |
| 465 | + | |
| 466 | + | |
| 467 | + // 时刻表管理 | |
| 468 | + .state("timeTableManage", { | |
| 469 | + url: '/timeTableManage', | |
| 470 | + views: { | |
| 471 | + "": { | |
| 472 | + templateUrl: 'pages/scheduleApp/module/core/timeTableManage/index.html' | |
| 473 | + }, | |
| 474 | + "timeTableManage_list@timeTableManage": { | |
| 475 | + templateUrl: 'pages/scheduleApp/module/core/timeTableManage/list.html' | |
| 476 | + } | |
| 477 | + }, | |
| 478 | + | |
| 479 | + resolve: { | |
| 480 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 481 | + return $ocLazyLoad.load({ | |
| 482 | + name: 'timeTableManage_module', | |
| 483 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 484 | + files: [ | |
| 485 | + "assets/bower_components/angular-file-upload/dist/angular-file-upload.min.js", | |
| 486 | + "pages/scheduleApp/module/core/timeTableManage/timeTableManage.js" | |
| 487 | + ] | |
| 488 | + }); | |
| 489 | + }] | |
| 490 | + } | |
| 491 | + }) | |
| 492 | + .state("timeTableManage_form", { | |
| 493 | + url: '/timeTableManage_form', | |
| 494 | + views: { | |
| 495 | + "": {templateUrl: 'pages/scheduleApp/module/core/timeTableManage/form.html'} | |
| 496 | + }, | |
| 497 | + resolve: { | |
| 498 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 499 | + return $ocLazyLoad.load({ | |
| 500 | + name: 'timeTableManage_form_module', | |
| 501 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 502 | + files: [ | |
| 503 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 504 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 505 | + "pages/scheduleApp/module/core/timeTableManage/timeTableManage.js" | |
| 506 | + ] | |
| 507 | + }); | |
| 508 | + }] | |
| 509 | + } | |
| 510 | + }) | |
| 511 | + .state("timeTableManage_edit", { | |
| 512 | + url: '/timeTableManage_edit/:id', | |
| 513 | + views: { | |
| 514 | + "": {templateUrl: 'pages/scheduleApp/module/core/timeTableManage/edit.html'} | |
| 515 | + }, | |
| 516 | + resolve: { | |
| 517 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 518 | + return $ocLazyLoad.load({ | |
| 519 | + name: 'timeTableManage_edit_module', | |
| 520 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 521 | + files: [ | |
| 522 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 523 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 524 | + "pages/scheduleApp/module/core/timeTableManage/timeTableManage.js" | |
| 525 | + ] | |
| 526 | + }); | |
| 527 | + }] | |
| 528 | + } | |
| 529 | + }) | |
| 530 | + .state("timeTableManage_detail", { | |
| 531 | + url: '/timeTableManage_detail/:id', | |
| 532 | + views: { | |
| 533 | + "": {templateUrl: 'pages/scheduleApp/module/core/timeTableManage/detail.html'} | |
| 534 | + }, | |
| 535 | + resolve: { | |
| 536 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 537 | + return $ocLazyLoad.load({ | |
| 538 | + name: 'timeTableManage_detail_module', | |
| 539 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 540 | + files: [ | |
| 541 | + "pages/scheduleApp/module/core/timeTableManage/timeTableManage.js" | |
| 542 | + ] | |
| 543 | + }); | |
| 544 | + }] | |
| 545 | + } | |
| 546 | + }) | |
| 547 | + .state("timeTableDetailInfoManage", { | |
| 548 | + url: '/timeTableDetailInfoManage/:xlid/:ttid', | |
| 549 | + views: { | |
| 550 | + "": {templateUrl: 'pages/scheduleApp/module/core/timeTableManage/detail_info.html'} | |
| 551 | + }, | |
| 552 | + resolve: { | |
| 553 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 554 | + return $ocLazyLoad.load({ | |
| 555 | + name: 'timeTableDetailInfoManage_module', | |
| 556 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 557 | + files: [ | |
| 558 | + "pages/scheduleApp/module/core/timeTableManage/timeTableDetailManage.js" | |
| 559 | + ] | |
| 560 | + }); | |
| 561 | + }] | |
| 562 | + } | |
| 563 | + }) | |
| 564 | + | |
| 565 | + // 排班规则管理模块 | |
| 566 | + .state("scheduleRuleManage", { | |
| 567 | + url: '/scheduleRuleManage', | |
| 568 | + views: { | |
| 569 | + "": { | |
| 570 | + templateUrl: 'pages/scheduleApp/module/core/scheduleRuleManage/index.html' | |
| 571 | + }, | |
| 572 | + "scheduleRuleManage_list@scheduleRuleManage": { | |
| 573 | + templateUrl: 'pages/scheduleApp/module/core/scheduleRuleManage/list.html' | |
| 574 | + } | |
| 575 | + }, | |
| 576 | + | |
| 577 | + resolve: { | |
| 578 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 579 | + return $ocLazyLoad.load({ | |
| 580 | + name: 'scheduleRuleManage_module', | |
| 581 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 582 | + files: [ | |
| 583 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 584 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 585 | + "pages/scheduleApp/module/core/scheduleRuleManage/scheduleRuleManage.js" | |
| 586 | + ] | |
| 587 | + }); | |
| 588 | + }] | |
| 589 | + } | |
| 590 | + }) | |
| 591 | + .state("scheduleRuleManage_form", { | |
| 592 | + url: '/scheduleRuleManage_form', | |
| 593 | + views: { | |
| 594 | + "": {templateUrl: 'pages/scheduleApp/module/core/scheduleRuleManage/form.html'} | |
| 595 | + }, | |
| 596 | + resolve: { | |
| 597 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 598 | + return $ocLazyLoad.load({ | |
| 599 | + name: 'scheduleRuleManage_form_module', | |
| 600 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 601 | + files: [ | |
| 602 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 603 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 604 | + "pages/scheduleApp/module/core/scheduleRuleManage/scheduleRuleManage.js" | |
| 605 | + ] | |
| 606 | + }); | |
| 607 | + }] | |
| 608 | + } | |
| 609 | + }) | |
| 610 | + .state("scheduleRuleManage_edit", { | |
| 611 | + url: '/scheduleRuleManage_edit/:id', | |
| 612 | + views: { | |
| 613 | + "": {templateUrl: 'pages/scheduleApp/module/core/scheduleRuleManage/edit.html'} | |
| 614 | + }, | |
| 615 | + resolve: { | |
| 616 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 617 | + return $ocLazyLoad.load({ | |
| 618 | + name: 'scheduleRuleManage_edit_module', | |
| 619 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 620 | + files: [ | |
| 621 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 622 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 623 | + "pages/scheduleApp/module/core/scheduleRuleManage/scheduleRuleManage.js" | |
| 624 | + ] | |
| 625 | + }); | |
| 626 | + }] | |
| 627 | + } | |
| 628 | + }) | |
| 629 | + .state("scheduleRuleManage_detail", { | |
| 630 | + url: '/scheduleRuleManage_detail/:id', | |
| 631 | + views: { | |
| 632 | + "": {templateUrl: 'pages/scheduleApp/module/core/scheduleRuleManage/detail.html'} | |
| 633 | + }, | |
| 634 | + resolve: { | |
| 635 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 636 | + return $ocLazyLoad.load({ | |
| 637 | + name: 'scheduleRuleManage_detail_module', | |
| 638 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 639 | + files: [ | |
| 640 | + "pages/scheduleApp/module/core/scheduleRuleManage/scheduleRuleManage.js" | |
| 641 | + ] | |
| 642 | + }); | |
| 643 | + }] | |
| 644 | + } | |
| 645 | + }) | |
| 646 | + | |
| 647 | + // 排班计划管理模块 | |
| 648 | + .state("schedulePlanManage", { | |
| 649 | + url: '/schedulePlanManage', | |
| 650 | + views: { | |
| 651 | + "": { | |
| 652 | + templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/index.html' | |
| 653 | + }, | |
| 654 | + "schedulePlanManage_list@schedulePlanManage": { | |
| 655 | + templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/list.html' | |
| 656 | + } | |
| 657 | + }, | |
| 658 | + | |
| 659 | + resolve: { | |
| 660 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 661 | + return $ocLazyLoad.load({ | |
| 662 | + name: 'schedulePlanManage_module', | |
| 663 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 664 | + files: [ | |
| 665 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 666 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 667 | + "pages/scheduleApp/module/core/schedulePlanManage/schedulePlanManage.js" | |
| 668 | + ] | |
| 669 | + }); | |
| 670 | + }] | |
| 671 | + } | |
| 672 | + }) | |
| 673 | + .state("schedulePlanManage_form", { | |
| 674 | + url: '/schedulePlanManage_form', | |
| 675 | + views: { | |
| 676 | + "": { | |
| 677 | + templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/form.html' | |
| 678 | + } | |
| 679 | + }, | |
| 680 | + | |
| 681 | + resolve: { | |
| 682 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 683 | + return $ocLazyLoad.load({ | |
| 684 | + name: 'schedulePlanManage_form_module', | |
| 685 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 686 | + files: [ | |
| 687 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 688 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 689 | + "pages/scheduleApp/module/core/schedulePlanManage/schedulePlanManage.js" | |
| 690 | + ] | |
| 691 | + }); | |
| 692 | + }] | |
| 693 | + } | |
| 694 | + }) | |
| 695 | + | |
| 696 | + // 排班计划明细管理模块 | |
| 697 | + .state("schedulePlanInfoManage", { | |
| 698 | + url: '/schedulePlanInfoManage/:spid/:xlname/:ttname/:stime/:etime', | |
| 699 | + views: { | |
| 700 | + "": { | |
| 701 | + templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/index_info.html' | |
| 702 | + }, | |
| 703 | + "schedulePlanInfoManage_list@schedulePlanInfoManage": { | |
| 704 | + templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/list_info.html' | |
| 705 | + } | |
| 706 | + }, | |
| 707 | + | |
| 708 | + resolve: { | |
| 709 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 710 | + return $ocLazyLoad.load({ | |
| 711 | + name: 'schedulePlanInfoManage_module', | |
| 712 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 713 | + files: [ | |
| 714 | + "pages/scheduleApp/module/core/schedulePlanManage/schedulePlanInfoManage.js" | |
| 715 | + ] | |
| 716 | + }); | |
| 717 | + }] | |
| 718 | + } | |
| 719 | + }) | |
| 720 | + | |
| 721 | + // 线路运营概览模块 | |
| 722 | + .state("busLineInfoStat", { | |
| 723 | + url: '/busLineInfoStat', | |
| 724 | + views: { | |
| 725 | + "": { | |
| 726 | + templateUrl: 'pages/scheduleApp/module/core/busLineInfoStat/index.html' | |
| 727 | + }, | |
| 728 | + "busLineInfoStat_list@busLineInfoStat": { | |
| 729 | + templateUrl: 'pages/scheduleApp/module/core/busLineInfoStat/list.html' | |
| 730 | + } | |
| 731 | + }, | |
| 732 | + | |
| 733 | + resolve: { | |
| 734 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 735 | + return $ocLazyLoad.load({ | |
| 736 | + name: 'busLineInfoStat_module', | |
| 737 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 738 | + files: [ | |
| 739 | + "pages/scheduleApp/module/core/busLineInfoStat/busLineInfoStat.js" | |
| 740 | + ] | |
| 741 | + }); | |
| 742 | + }] | |
| 743 | + } | |
| 744 | + }) | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + // TODO: | |
| 751 | + | |
| 752 | + ; | |
| 753 | +}]); | |
| 0 | 754 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/busConfig/busConfig.js
| ... | ... | @@ -202,7 +202,7 @@ angular.module('ScheduleApp').controller('BusConfigFormCtrl', ['BusConfigService |
| 202 | 202 | }; |
| 203 | 203 | |
| 204 | 204 | // 欲保存的busInfo信息,绑定 |
| 205 | - self.busConfigForSave = {}; | |
| 205 | + self.busConfigForSave = {xl:{}, cl:{}}; | |
| 206 | 206 | |
| 207 | 207 | // 获取传过来的id,有的话就是修改,获取一遍数据 |
| 208 | 208 | var id = $stateParams.id; |
| ... | ... | @@ -214,10 +214,6 @@ angular.module('ScheduleApp').controller('BusConfigFormCtrl', ['BusConfigService |
| 214 | 214 | for (key in result) { |
| 215 | 215 | self.busConfigForSave[key] = result[key]; |
| 216 | 216 | } |
| 217 | - | |
| 218 | - // 添加xl_id,cl_id | |
| 219 | - self.busConfigForSave["xl_id"] = self.busConfigForSave.xl.id; | |
| 220 | - self.busConfigForSave["cl_id"] = self.busConfigForSave.cl.id; | |
| 221 | 217 | }, |
| 222 | 218 | function(result) { |
| 223 | 219 | alert("出错啦!"); |
| ... | ... | @@ -228,17 +224,6 @@ angular.module('ScheduleApp').controller('BusConfigFormCtrl', ['BusConfigService |
| 228 | 224 | // 提交方法 |
| 229 | 225 | self.submit = function() { |
| 230 | 226 | console.log(self.busConfigForSave); |
| 231 | - | |
| 232 | - var mf = $scope.myForm; | |
| 233 | - | |
| 234 | - // xl_id,cl_id要组织成对象,然后删除 | |
| 235 | - self.busConfigForSave["xl"] = {}; | |
| 236 | - self.busConfigForSave.xl["id"] = self.busConfigForSave["xl_id"]; | |
| 237 | - delete self.busConfigForSave["xl_id"]; | |
| 238 | - self.busConfigForSave["cl"] = {}; | |
| 239 | - self.busConfigForSave.cl["id"] = self.busConfigForSave["cl_id"]; | |
| 240 | - delete self.busConfigForSave["cl_id"]; | |
| 241 | - | |
| 242 | 227 | busConfigService.saveDetail(self.busConfigForSave).then( |
| 243 | 228 | function(result) { |
| 244 | 229 | // TODO:弹出框方式以后改 | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/busConfig/edit.html
| ... | ... | @@ -43,15 +43,17 @@ |
| 43 | 43 | <div class="form-group has-success has-feedback"> |
| 44 | 44 | <label class="col-md-2 control-label">线路*:</label> |
| 45 | 45 | <div class="col-md-3"> |
| 46 | - <sa-Select2 model="ctrl.busConfigForSave" | |
| 46 | + <sa-Select3 model="ctrl.busConfigForSave" | |
| 47 | 47 | name="xl" |
| 48 | - required="true" | |
| 49 | - type="xl" | |
| 50 | - modelcolname1="xl_id" | |
| 51 | - datacolname1="id" | |
| 52 | - showcolname="name" | |
| 53 | - placeholder="请输拼音..."> | |
| 54 | - </sa-Select2> | |
| 48 | + placeholder="请输拼音..." | |
| 49 | + dcvalue="{{ctrl.busConfigForSave.xl.id}}" | |
| 50 | + dcname="xl.id" | |
| 51 | + icname="id" | |
| 52 | + icnames="name" | |
| 53 | + datatype="xl" | |
| 54 | + mlp="true" | |
| 55 | + required > | |
| 56 | + </sa-Select3> | |
| 55 | 57 | </div> |
| 56 | 58 | <!-- 隐藏块,显示验证信息 --> |
| 57 | 59 | <div class="alert alert-danger well-sm" ng-show="myForm.xl.$error.required"> |
| ... | ... | @@ -61,15 +63,17 @@ |
| 61 | 63 | <div class="form-group has-success has-feedback"> |
| 62 | 64 | <label class="col-md-2 control-label">车辆*:</label> |
| 63 | 65 | <div class="col-md-3"> |
| 64 | - <sa-Select2 model="ctrl.busConfigForSave" | |
| 66 | + <sa-Select3 model="ctrl.busConfigForSave" | |
| 65 | 67 | name="cl" |
| 66 | - required="true" | |
| 67 | - type="cl" | |
| 68 | - modelcolname1="cl_id" | |
| 69 | - datacolname1="id" | |
| 70 | - showcolname="insideCode" | |
| 71 | - placeholder="请输拼音..."> | |
| 72 | - </sa-Select2> | |
| 68 | + placeholder="请输拼音..." | |
| 69 | + dcvalue="{{ctrl.busConfigForSave.cl.id}}" | |
| 70 | + dcname="cl.id" | |
| 71 | + icname="id" | |
| 72 | + icnames="insideCode" | |
| 73 | + datatype="cl" | |
| 74 | + mlp="true" | |
| 75 | + required > | |
| 76 | + </sa-Select3> | |
| 73 | 77 | </div> |
| 74 | 78 | <!-- 隐藏块,显示验证信息 --> |
| 75 | 79 | <div class="alert alert-danger well-sm" ng-show="myForm.cl.$error.required"> |
| ... | ... | @@ -140,11 +144,7 @@ |
| 140 | 144 | <div class="row"> |
| 141 | 145 | <div class="col-md-offset-3 col-md-4"> |
| 142 | 146 | <button type="submit" class="btn green" |
| 143 | - ng-disabled="myForm.xl.$error.required || | |
| 144 | - myForm.cl.$error.required || | |
| 145 | - myForm.qyrq.$error.required || | |
| 146 | - myForm.tcd.$error.required" | |
| 147 | - ><i class="fa fa-check"></i> 提交</button> | |
| 147 | + ng-disabled="!myForm.$valid"><i class="fa fa-check"></i> 提交</button> | |
| 148 | 148 | <a type="button" class="btn default" ui-sref="busConfig" ><i class="fa fa-times"></i> 取消</a> |
| 149 | 149 | </div> |
| 150 | 150 | </div> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/busConfig/form.html
| ... | ... | @@ -43,15 +43,17 @@ |
| 43 | 43 | <div class="form-group has-success has-feedback"> |
| 44 | 44 | <label class="col-md-2 control-label">线路*:</label> |
| 45 | 45 | <div class="col-md-3"> |
| 46 | - <sa-Select2 model="ctrl.busConfigForSave" | |
| 46 | + <sa-Select3 model="ctrl.busConfigForSave" | |
| 47 | 47 | name="xl" |
| 48 | - required="true" | |
| 49 | - type="xl" | |
| 50 | - modelcolname1="xl_id" | |
| 51 | - datacolname1="id" | |
| 52 | - showcolname="name" | |
| 53 | - placeholder="请输拼音..."> | |
| 54 | - </sa-Select2> | |
| 48 | + placeholder="请输拼音..." | |
| 49 | + dcvalue="{{ctrl.busConfigForSave.xl.id}}" | |
| 50 | + dcname="xl.id" | |
| 51 | + icname="id" | |
| 52 | + icnames="name" | |
| 53 | + datatype="xl" | |
| 54 | + mlp="true" | |
| 55 | + required > | |
| 56 | + </sa-Select3> | |
| 55 | 57 | </div> |
| 56 | 58 | <!-- 隐藏块,显示验证信息 --> |
| 57 | 59 | <div class="alert alert-danger well-sm" ng-show="myForm.xl.$error.required"> |
| ... | ... | @@ -61,15 +63,17 @@ |
| 61 | 63 | <div class="form-group has-success has-feedback"> |
| 62 | 64 | <label class="col-md-2 control-label">车辆*:</label> |
| 63 | 65 | <div class="col-md-3"> |
| 64 | - <sa-Select2 model="ctrl.busConfigForSave" | |
| 66 | + <sa-Select3 model="ctrl.busConfigForSave" | |
| 65 | 67 | name="cl" |
| 66 | - required="true" | |
| 67 | - type="cl" | |
| 68 | - modelcolname1="cl_id" | |
| 69 | - datacolname1="id" | |
| 70 | - showcolname="insideCode" | |
| 71 | - placeholder="请输拼音..."> | |
| 72 | - </sa-Select2> | |
| 68 | + placeholder="请输拼音..." | |
| 69 | + dcvalue="{{ctrl.busConfigForSave.cl.id}}" | |
| 70 | + dcname="cl.id" | |
| 71 | + icname="id" | |
| 72 | + icnames="insideCode" | |
| 73 | + datatype="cl" | |
| 74 | + mlp="true" | |
| 75 | + required > | |
| 76 | + </sa-Select3> | |
| 73 | 77 | </div> |
| 74 | 78 | <!-- 隐藏块,显示验证信息 --> |
| 75 | 79 | <div class="alert alert-danger well-sm" ng-show="myForm.cl.$error.required"> |
| ... | ... | @@ -140,11 +144,7 @@ |
| 140 | 144 | <div class="row"> |
| 141 | 145 | <div class="col-md-offset-3 col-md-4"> |
| 142 | 146 | <button type="submit" class="btn green" |
| 143 | - ng-disabled="myForm.xl.$error.required || | |
| 144 | - myForm.cl.$error.required || | |
| 145 | - myForm.qyrq.$error.required || | |
| 146 | - myForm.tcd.$error.required" | |
| 147 | - ><i class="fa fa-check"></i> 提交</button> | |
| 147 | + ng-disabled="!myForm.$valid"><i class="fa fa-check"></i> 提交</button> | |
| 148 | 148 | <a type="button" class="btn default" ui-sref="busConfig" ><i class="fa fa-times"></i> 取消</a> |
| 149 | 149 | </div> |
| 150 | 150 | </div> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/busConfig/list.html
| ... | ... | @@ -16,13 +16,15 @@ |
| 16 | 16 | <td></td> |
| 17 | 17 | <td> |
| 18 | 18 | <div> |
| 19 | - <sa-Select2 model="ctrl.searchCondition()" | |
| 20 | - type="xl" | |
| 21 | - modelcolname1="xl.lineCode_eq" | |
| 22 | - datacolname1="lineCode" | |
| 23 | - showcolname="name" | |
| 24 | - placeholder="请输拼音..."> | |
| 25 | - </sa-Select2> | |
| 19 | + <sa-Select3 model="ctrl.searchCondition()" | |
| 20 | + name="xl" | |
| 21 | + placeholder="请输拼音..." | |
| 22 | + dcvalue="{{ctrl.searchCondition()['xl.lineCode_eq']}}" | |
| 23 | + dcname="xl.lineCode_eq" | |
| 24 | + icname="lineCode" | |
| 25 | + icnames="name" | |
| 26 | + datatype="xl"> | |
| 27 | + </sa-Select3> | |
| 26 | 28 | </div> |
| 27 | 29 | </td> |
| 28 | 30 | <td></td> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/employeeConfig/edit.html
| ... | ... | @@ -43,15 +43,17 @@ |
| 43 | 43 | <div class="form-group has-success has-feedback"> |
| 44 | 44 | <label class="col-md-2 control-label">线路*:</label> |
| 45 | 45 | <div class="col-md-3"> |
| 46 | - <sa-Select2 model="ctrl.employeeConfigForSave" | |
| 46 | + <sa-Select3 model="ctrl.employeeConfigForSave" | |
| 47 | 47 | name="xl" |
| 48 | - required="true" | |
| 49 | - type="xl" | |
| 50 | - modelcolname1="xl_id" | |
| 51 | - datacolname1="id" | |
| 52 | - showcolname="name" | |
| 53 | - placeholder="请输拼音..."> | |
| 54 | - </sa-Select2> | |
| 48 | + placeholder="请输拼音..." | |
| 49 | + dcvalue="{{ctrl.employeeConfigForSave.xl.id}}" | |
| 50 | + dcname="xl.id" | |
| 51 | + icname="id" | |
| 52 | + icnames="name" | |
| 53 | + datatype="xl" | |
| 54 | + mlp="true" | |
| 55 | + required > | |
| 56 | + </sa-Select3> | |
| 55 | 57 | </div> |
| 56 | 58 | <!-- 隐藏块,显示验证信息 --> |
| 57 | 59 | <div class="alert alert-danger well-sm" ng-show="myForm.xl.$error.required"> |
| ... | ... | @@ -74,15 +76,17 @@ |
| 74 | 76 | <div class="form-group has-success has-feedback"> |
| 75 | 77 | <label class="col-md-2 control-label">驾驶员*:</label> |
| 76 | 78 | <div class="col-md-3"> |
| 77 | - <sa-Select2 model="ctrl.employeeConfigForSave" | |
| 79 | + <sa-Select3 model="ctrl.employeeConfigForSave" | |
| 78 | 80 | name="jsy" |
| 79 | - required="true" | |
| 80 | - type="ry" | |
| 81 | - modelcolname1="jsy_id" | |
| 82 | - datacolname1="id" | |
| 83 | - showcolname="personnelName" | |
| 84 | - placeholder="请输拼音..."> | |
| 85 | - </sa-Select2> | |
| 81 | + placeholder="请输拼音..." | |
| 82 | + dcvalue="{{ctrl.employeeConfigForSave.jsy.id}}" | |
| 83 | + dcname="jsy.id" | |
| 84 | + icname="id" | |
| 85 | + icnames="personnelName" | |
| 86 | + datatype="ry" | |
| 87 | + mlp="true" | |
| 88 | + required > | |
| 89 | + </sa-Select3> | |
| 86 | 90 | </div> |
| 87 | 91 | <!-- 隐藏块,显示验证信息 --> |
| 88 | 92 | <div class="alert alert-danger well-sm" ng-show="myForm.jsy.$error.required"> |
| ... | ... | @@ -91,16 +95,18 @@ |
| 91 | 95 | </div> |
| 92 | 96 | |
| 93 | 97 | <div class="form-group has-success has-feedback"> |
| 94 | - <label class="col-md-2 control-label">售票员*:</label> | |
| 98 | + <label class="col-md-2 control-label">售票员:</label> | |
| 95 | 99 | <div class="col-md-3"> |
| 96 | - <sa-Select2 model="ctrl.employeeConfigForSave" | |
| 100 | + <sa-Select3 model="ctrl.employeeConfigForSave" | |
| 97 | 101 | name="spy" |
| 98 | - type="ry" | |
| 99 | - modelcolname1="spy_id" | |
| 100 | - datacolname1="id" | |
| 101 | - showcolname="personnelName" | |
| 102 | - placeholder="请输拼音..."> | |
| 103 | - </sa-Select2> | |
| 102 | + placeholder="请输拼音..." | |
| 103 | + dcvalue="{{ctrl.employeeConfigForSave.spy.id}}" | |
| 104 | + dcname="spy.id" | |
| 105 | + icname="id" | |
| 106 | + icnames="personnelName" | |
| 107 | + datatype="ry" | |
| 108 | + mlp="true" > | |
| 109 | + </sa-Select3> | |
| 104 | 110 | </div> |
| 105 | 111 | </div> |
| 106 | 112 | |
| ... | ... | @@ -113,11 +119,7 @@ |
| 113 | 119 | <div class="row"> |
| 114 | 120 | <div class="col-md-offset-3 col-md-4"> |
| 115 | 121 | <button type="submit" class="btn green" |
| 116 | - ng-disabled="myForm.xl.$error.required || | |
| 117 | - myForm.dbbm.$error.required || | |
| 118 | - myForm.jsy.$error.required || | |
| 119 | - myForm.spy.$error.required" | |
| 120 | - ><i class="fa fa-check"></i> 提交</button> | |
| 122 | + ng-disabled="!myForm.$valid"><i class="fa fa-check"></i> 提交</button> | |
| 121 | 123 | <a type="button" class="btn default" ui-sref="employeeConfig" ><i class="fa fa-times"></i> 取消</a> |
| 122 | 124 | </div> |
| 123 | 125 | </div> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/employeeConfig/employeeConfig.js
| ... | ... | @@ -21,7 +21,7 @@ angular.module('ScheduleApp').factory('EmployeeConfigService', ['EmployeeConfigS |
| 21 | 21 | resetSearchCondition: function() { |
| 22 | 22 | var key; |
| 23 | 23 | for (key in currentSearchCondition) { |
| 24 | - currentSearchCondition[key] = ""; | |
| 24 | + currentSearchCondition[key] = null; | |
| 25 | 25 | } |
| 26 | 26 | }, |
| 27 | 27 | /** |
| ... | ... | @@ -179,7 +179,9 @@ angular.module('ScheduleApp').controller('EmployeeConfigListCtrl', ['EmployeeCon |
| 179 | 179 | }; |
| 180 | 180 | // 重置查询条件 |
| 181 | 181 | self.resetSearchCondition = function() { |
| 182 | - return employeeConfigService.resetSearchCondition(); | |
| 182 | + employeeConfigService.resetSearchCondition(); | |
| 183 | + self.pageInfo.currentPage = 1; | |
| 184 | + self.pageChanaged(); | |
| 183 | 185 | }; |
| 184 | 186 | }]); |
| 185 | 187 | |
| ... | ... | @@ -187,7 +189,7 @@ angular.module('ScheduleApp').controller('EmployeeConfigFormCtrl', ['EmployeeCon |
| 187 | 189 | var self = this; |
| 188 | 190 | |
| 189 | 191 | // 欲保存的busInfo信息,绑定 |
| 190 | - self.employeeConfigForSave = {}; | |
| 192 | + self.employeeConfigForSave = {xl:{}, jsy:{}, spy:{}}; | |
| 191 | 193 | |
| 192 | 194 | // 获取传过来的id,有的话就是修改,获取一遍数据 |
| 193 | 195 | var id = $stateParams.id; |
| ... | ... | @@ -200,12 +202,6 @@ angular.module('ScheduleApp').controller('EmployeeConfigFormCtrl', ['EmployeeCon |
| 200 | 202 | self.employeeConfigForSave[key] = result[key]; |
| 201 | 203 | } |
| 202 | 204 | |
| 203 | - // 添加xl_id,jsy_id,spy_id | |
| 204 | - self.employeeConfigForSave["xl_id"] = self.employeeConfigForSave.xl.id; | |
| 205 | - self.employeeConfigForSave["jsy_id"] = self.employeeConfigForSave.jsy.id; | |
| 206 | - self.employeeConfigForSave["spy_id"] = | |
| 207 | - self.employeeConfigForSave.spy || self.employeeConfigForSave.spy.id; | |
| 208 | - | |
| 209 | 205 | }, |
| 210 | 206 | function(result) { |
| 211 | 207 | alert("出错啦!"); |
| ... | ... | @@ -217,17 +213,6 @@ angular.module('ScheduleApp').controller('EmployeeConfigFormCtrl', ['EmployeeCon |
| 217 | 213 | self.submit = function() { |
| 218 | 214 | console.log(self.employeeConfigForSave); |
| 219 | 215 | |
| 220 | - // jsy_id,cl_id要组织成对象,然后删除 | |
| 221 | - self.employeeConfigForSave["xl"] = {}; | |
| 222 | - self.employeeConfigForSave.xl["id"] = self.employeeConfigForSave["xl_id"]; | |
| 223 | - delete self.employeeConfigForSave["xl_id"]; | |
| 224 | - self.employeeConfigForSave["jsy"] = {}; | |
| 225 | - self.employeeConfigForSave.jsy["id"] = self.employeeConfigForSave["jsy_id"]; | |
| 226 | - delete self.employeeConfigForSave["jsy_id"]; | |
| 227 | - self.employeeConfigForSave["spy"] = {}; | |
| 228 | - self.employeeConfigForSave.spy["id"] = self.employeeConfigForSave["spy_id"]; | |
| 229 | - delete self.employeeConfigForSave["spy_id"]; | |
| 230 | - | |
| 231 | 216 | employeeConfigService.saveDetail(self.employeeConfigForSave).then( |
| 232 | 217 | function(result) { |
| 233 | 218 | // TODO:弹出框方式以后改 | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/employeeConfig/form.html
| ... | ... | @@ -43,15 +43,17 @@ |
| 43 | 43 | <div class="form-group has-success has-feedback"> |
| 44 | 44 | <label class="col-md-2 control-label">线路*:</label> |
| 45 | 45 | <div class="col-md-3"> |
| 46 | - <sa-Select2 model="ctrl.employeeConfigForSave" | |
| 46 | + <sa-Select3 model="ctrl.employeeConfigForSave" | |
| 47 | 47 | name="xl" |
| 48 | - required="true" | |
| 49 | - type="xl" | |
| 50 | - modelcolname1="xl_id" | |
| 51 | - datacolname1="id" | |
| 52 | - showcolname="name" | |
| 53 | - placeholder="请输拼音..."> | |
| 54 | - </sa-Select2> | |
| 48 | + placeholder="请输拼音..." | |
| 49 | + dcvalue="{{ctrl.employeeConfigForSave.xl.id}}" | |
| 50 | + dcname="xl.id" | |
| 51 | + icname="id" | |
| 52 | + icnames="name" | |
| 53 | + datatype="xl" | |
| 54 | + mlp="true" | |
| 55 | + required > | |
| 56 | + </sa-Select3> | |
| 55 | 57 | </div> |
| 56 | 58 | <!-- 隐藏块,显示验证信息 --> |
| 57 | 59 | <div class="alert alert-danger well-sm" ng-show="myForm.xl.$error.required"> |
| ... | ... | @@ -74,15 +76,17 @@ |
| 74 | 76 | <div class="form-group has-success has-feedback"> |
| 75 | 77 | <label class="col-md-2 control-label">驾驶员*:</label> |
| 76 | 78 | <div class="col-md-3"> |
| 77 | - <sa-Select2 model="ctrl.employeeConfigForSave" | |
| 79 | + <sa-Select3 model="ctrl.employeeConfigForSave" | |
| 78 | 80 | name="jsy" |
| 79 | - required="true" | |
| 80 | - type="ry" | |
| 81 | - modelcolname1="jsy_id" | |
| 82 | - datacolname1="id" | |
| 83 | - showcolname="personnelName" | |
| 84 | - placeholder="请输拼音..."> | |
| 85 | - </sa-Select2> | |
| 81 | + placeholder="请输拼音..." | |
| 82 | + dcvalue="{{ctrl.employeeConfigForSave.jsy.id}}" | |
| 83 | + dcname="jsy.id" | |
| 84 | + icname="id" | |
| 85 | + icnames="personnelName" | |
| 86 | + datatype="ry" | |
| 87 | + mlp="true" | |
| 88 | + required > | |
| 89 | + </sa-Select3> | |
| 86 | 90 | </div> |
| 87 | 91 | <!-- 隐藏块,显示验证信息 --> |
| 88 | 92 | <div class="alert alert-danger well-sm" ng-show="myForm.jsy.$error.required"> |
| ... | ... | @@ -91,16 +95,18 @@ |
| 91 | 95 | </div> |
| 92 | 96 | |
| 93 | 97 | <div class="form-group has-success has-feedback"> |
| 94 | - <label class="col-md-2 control-label">售票员*:</label> | |
| 98 | + <label class="col-md-2 control-label">售票员:</label> | |
| 95 | 99 | <div class="col-md-3"> |
| 96 | - <sa-Select2 model="ctrl.employeeConfigForSave" | |
| 100 | + <sa-Select3 model="ctrl.employeeConfigForSave" | |
| 97 | 101 | name="spy" |
| 98 | - type="ry" | |
| 99 | - modelcolname1="spy_id" | |
| 100 | - datacolname1="id" | |
| 101 | - showcolname="personnelName" | |
| 102 | - placeholder="请输拼音..."> | |
| 103 | - </sa-Select2> | |
| 102 | + placeholder="请输拼音..." | |
| 103 | + dcvalue="{{ctrl.employeeConfigForSave.spy.id}}" | |
| 104 | + dcname="spy.id" | |
| 105 | + icname="id" | |
| 106 | + icnames="personnelName" | |
| 107 | + datatype="ry" | |
| 108 | + mlp="true" > | |
| 109 | + </sa-Select3> | |
| 104 | 110 | </div> |
| 105 | 111 | </div> |
| 106 | 112 | |
| ... | ... | @@ -113,11 +119,7 @@ |
| 113 | 119 | <div class="row"> |
| 114 | 120 | <div class="col-md-offset-3 col-md-4"> |
| 115 | 121 | <button type="submit" class="btn green" |
| 116 | - ng-disabled="myForm.xl.$error.required || | |
| 117 | - myForm.dbbm.$error.required || | |
| 118 | - myForm.jsy.$error.required || | |
| 119 | - myForm.spy.$error.required" | |
| 120 | - ><i class="fa fa-check"></i> 提交</button> | |
| 122 | + ng-disabled="!myForm.$valid"><i class="fa fa-check"></i> 提交</button> | |
| 121 | 123 | <a type="button" class="btn default" ui-sref="employeeConfig" ><i class="fa fa-times"></i> 取消</a> |
| 122 | 124 | </div> |
| 123 | 125 | </div> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/employeeConfig/list.html
| ... | ... | @@ -17,26 +17,30 @@ |
| 17 | 17 | <td></td> |
| 18 | 18 | <td> |
| 19 | 19 | <div> |
| 20 | - <sa-Select2 model="ctrl.searchCondition()" | |
| 21 | - type="xl" | |
| 22 | - modelcolname1="xl.lineCode_eq" | |
| 23 | - datacolname1="lineCode" | |
| 24 | - showcolname="name" | |
| 25 | - placeholder="请输拼音..."> | |
| 26 | - </sa-Select2> | |
| 20 | + <sa-Select3 model="ctrl.searchCondition()" | |
| 21 | + name="xl" | |
| 22 | + placeholder="请输拼音..." | |
| 23 | + dcvalue="{{ctrl.searchCondition()['xl.lineCode_eq']}}" | |
| 24 | + dcname="xl.lineCode_eq" | |
| 25 | + icname="lineCode" | |
| 26 | + icnames="name" | |
| 27 | + datatype="xl"> | |
| 28 | + </sa-Select3> | |
| 27 | 29 | </div> |
| 28 | 30 | </td> |
| 29 | 31 | <td></td> |
| 30 | 32 | <td></td> |
| 31 | 33 | <td> |
| 32 | 34 | <div> |
| 33 | - <sa-Select2 model="ctrl.searchCondition()" | |
| 34 | - type="ry" | |
| 35 | - modelcolname1="jsy.id_eq" | |
| 36 | - datacolname1="id" | |
| 37 | - showcolname="personnelName" | |
| 38 | - placeholder="请输拼音..."> | |
| 39 | - </sa-Select2> | |
| 35 | + <sa-Select3 model="ctrl.searchCondition()" | |
| 36 | + name="ry" | |
| 37 | + placeholder="请输拼音..." | |
| 38 | + dcvalue="{{ctrl.searchCondition()['jsy.id_eq']}}" | |
| 39 | + dcname="jsy.id_eq" | |
| 40 | + icname="id" | |
| 41 | + icnames="personnelName" | |
| 42 | + datatype="ry"> | |
| 43 | + </sa-Select3> | |
| 40 | 44 | </div> |
| 41 | 45 | </td> |
| 42 | 46 | <td></td> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/guideboardManage/guideboardManage.js
| ... | ... | @@ -178,7 +178,9 @@ angular.module('ScheduleApp').controller('GuideboardManageListCtrl', ['Guideboar |
| 178 | 178 | }; |
| 179 | 179 | // 重置查询条件 |
| 180 | 180 | self.resetSearchCondition = function() { |
| 181 | - return guideboardManageService.resetSearchCondition(); | |
| 181 | + guideboardManageService.resetSearchCondition(); | |
| 182 | + self.pageInfo.currentPage = 1; | |
| 183 | + self.pageChanaged(); | |
| 182 | 184 | }; |
| 183 | 185 | |
| 184 | 186 | }]); | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/guideboardManage/list.html
| ... | ... | @@ -15,13 +15,15 @@ |
| 15 | 15 | <td></td> |
| 16 | 16 | <td> |
| 17 | 17 | <div> |
| 18 | - <sa-Select2 model="ctrl.searchCondition()" | |
| 19 | - type="xl" | |
| 20 | - modelcolname1="xl.lineCode_eq" | |
| 21 | - datacolname1="lineCode" | |
| 22 | - showcolname="name" | |
| 23 | - placeholder="请输拼音..."> | |
| 24 | - </sa-Select2> | |
| 18 | + <sa-Select3 model="ctrl.searchCondition()" | |
| 19 | + name="xl" | |
| 20 | + placeholder="请输拼音..." | |
| 21 | + dcvalue="{{ctrl.searchCondition()['xl.lineCode_eq']}}" | |
| 22 | + dcname="xl.lineCode_eq" | |
| 23 | + icname="lineCode" | |
| 24 | + icnames="name" | |
| 25 | + datatype="xl"> | |
| 26 | + </sa-Select3> | |
| 25 | 27 | </div> |
| 26 | 28 | </td> |
| 27 | 29 | <td></td> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/form.html
| ... | ... | @@ -43,15 +43,17 @@ |
| 43 | 43 | <div class="form-group has-success has-feedback"> |
| 44 | 44 | <label class="col-md-2 control-label">线路*:</label> |
| 45 | 45 | <div class="col-md-3"> |
| 46 | - <sa-Select2 model="ctrl.schedulePlanManageForSave" | |
| 46 | + <sa-Select3 model="ctrl.schedulePlanManageForSave" | |
| 47 | 47 | name="xl" |
| 48 | - required="true" | |
| 49 | - type="xl" | |
| 50 | - modelcolname1="xl_id" | |
| 51 | - datacolname1="id" | |
| 52 | - showcolname="name" | |
| 53 | - placeholder="请输拼音..."> | |
| 54 | - </sa-Select2> | |
| 48 | + placeholder="请输拼音..." | |
| 49 | + dcvalue="{{ctrl.schedulePlanManageForSave.xl.id}}" | |
| 50 | + dcname="xl.id" | |
| 51 | + icname="id" | |
| 52 | + icnames="name" | |
| 53 | + datatype="xl" | |
| 54 | + mlp="true" | |
| 55 | + required > | |
| 56 | + </sa-Select3> | |
| 55 | 57 | </div> |
| 56 | 58 | <!-- 隐藏块,显示验证信息 --> |
| 57 | 59 | <div class="alert alert-danger well-sm" ng-show="myForm.xl.$error.required"> |
| ... | ... | @@ -111,10 +113,7 @@ |
| 111 | 113 | <div class="row"> |
| 112 | 114 | <div class="col-md-offset-3 col-md-4"> |
| 113 | 115 | <button type="submit" class="btn green" |
| 114 | - ng-disabled="myForm.xl.$error.required || | |
| 115 | - myForm.scheduleFromTime.$error.required || | |
| 116 | - myForm.scheduleToTime.$error.required" | |
| 117 | - ><i class="fa fa-check"></i> 提交</button> | |
| 116 | + ng-disabled="!myForm.$valid"><i class="fa fa-check"></i> 提交</button> | |
| 118 | 117 | <a type="button" class="btn default" ui-sref="schedulePlanManage" ><i class="fa fa-times"></i> 取消</a> |
| 119 | 118 | </div> |
| 120 | 119 | </div> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/list.html
| ... | ... | @@ -15,13 +15,15 @@ |
| 15 | 15 | <tr role="row" class="filter"> |
| 16 | 16 | <td></td> |
| 17 | 17 | <td> |
| 18 | - <sa-Select2 model="ctrl.searchCondition()" | |
| 19 | - type="xl" | |
| 20 | - modelcolname1="xl.id_eq" | |
| 21 | - datacolname1="id" | |
| 22 | - showcolname="name" | |
| 23 | - placeholder="请输拼音..."> | |
| 24 | - </sa-Select2> | |
| 18 | + <sa-Select3 model="ctrl.searchCondition()" | |
| 19 | + name="xl" | |
| 20 | + placeholder="请输拼音..." | |
| 21 | + dcvalue="{{ctrl.searchCondition()['xl.id_eq']}}" | |
| 22 | + dcname="xl.id_eq" | |
| 23 | + icname="id" | |
| 24 | + icnames="name" | |
| 25 | + datatype="xl"> | |
| 26 | + </sa-Select3> | |
| 25 | 27 | </td> |
| 26 | 28 | <td></td> |
| 27 | 29 | <td></td> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/schedulePlanManage.js
| ... | ... | @@ -108,7 +108,9 @@ angular.module('ScheduleApp').controller('SchedulePlanManageListCtrl', ['Schedul |
| 108 | 108 | }; |
| 109 | 109 | // 重置查询条件 |
| 110 | 110 | self.resetSearchCondition = function() { |
| 111 | - return schedulePlanManageService.resetSearchCondition(); | |
| 111 | + schedulePlanManageService.resetSearchCondition(); | |
| 112 | + self.pageInfo.currentPage = 1; | |
| 113 | + self.pageChanaged(); | |
| 112 | 114 | }; |
| 113 | 115 | |
| 114 | 116 | }]); |
| ... | ... | @@ -130,22 +132,12 @@ angular.module('ScheduleApp').controller('SchedulePlanManageFormCtrl', ['Schedul |
| 130 | 132 | }; |
| 131 | 133 | |
| 132 | 134 | // 欲保存的busInfo信息,绑定 |
| 133 | - self.schedulePlanManageForSave = {}; | |
| 135 | + self.schedulePlanManageForSave = {xl: {}}; | |
| 134 | 136 | |
| 135 | 137 | // 提交方法 |
| 136 | 138 | self.submit = function() { |
| 137 | 139 | console.log(self.schedulePlanManageForSave); |
| 138 | 140 | |
| 139 | - var mf = $scope.myForm; | |
| 140 | - | |
| 141 | - // xl_id,ttInfo_id要组织成对象,然后删除 | |
| 142 | - self.schedulePlanManageForSave["xl"] = {}; | |
| 143 | - self.schedulePlanManageForSave.xl["id"] = self.schedulePlanManageForSave["xl_id"]; | |
| 144 | - delete self.schedulePlanManageForSave["xl_id"]; | |
| 145 | - self.schedulePlanManageForSave["ttInfo"] = {}; | |
| 146 | - self.schedulePlanManageForSave.ttInfo["id"] = self.schedulePlanManageForSave["ttInfo_id"]; | |
| 147 | - delete self.schedulePlanManageForSave["ttInfo_id"]; | |
| 148 | - | |
| 149 | 141 | schedulePlanManageService.saveDetail(self.schedulePlanManageForSave).then( |
| 150 | 142 | function(result) { |
| 151 | 143 | // TODO:弹出框方式以后改 | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/scheduleRuleManage/edit.html
| ... | ... | @@ -43,15 +43,17 @@ |
| 43 | 43 | <div class="form-group has-success has-feedback"> |
| 44 | 44 | <label class="col-md-2 control-label">线路*:</label> |
| 45 | 45 | <div class="col-md-3"> |
| 46 | - <sa-Select2 model="ctrl.scheduleRuleManageForSave" | |
| 46 | + <sa-Select3 model="ctrl.scheduleRuleManageForSave" | |
| 47 | 47 | name="xl" |
| 48 | - required="true" | |
| 49 | - type="xl" | |
| 50 | - modelcolname1="xl_id" | |
| 51 | - datacolname1="id" | |
| 52 | - showcolname="name" | |
| 53 | - placeholder="请输拼音..."> | |
| 54 | - </sa-Select2> | |
| 48 | + placeholder="请输拼音..." | |
| 49 | + dcvalue="{{ctrl.scheduleRuleManageForSave.xl.id}}" | |
| 50 | + dcname="xl.id" | |
| 51 | + icname="id" | |
| 52 | + icnames="name" | |
| 53 | + datatype="xl" | |
| 54 | + mlp="true" | |
| 55 | + required > | |
| 56 | + </sa-Select3> | |
| 55 | 57 | </div> |
| 56 | 58 | <!-- 隐藏块,显示验证信息 --> |
| 57 | 59 | <div class="alert alert-danger well-sm" ng-show="myForm.xl.$error.required"> |
| ... | ... | @@ -59,17 +61,19 @@ |
| 59 | 61 | </div> |
| 60 | 62 | </div> |
| 61 | 63 | <div class="form-group has-success has-feedback"> |
| 62 | - <label class="col-md-2 control-label">车辆*:</label> | |
| 64 | + <label class="col-md-2 control-label">车辆配置*:</label> | |
| 63 | 65 | <div class="col-md-3"> |
| 64 | - <sa-Select2 model="ctrl.scheduleRuleManageForSave" | |
| 66 | + <sa-Select3 model="ctrl.scheduleRuleManageForSave" | |
| 65 | 67 | name="cl" |
| 66 | - required="true" | |
| 67 | - type="ccl" | |
| 68 | - modelcolname1="cl_id" | |
| 69 | - datacolname1="id" | |
| 70 | - showcolname="nbbm" | |
| 71 | - placeholder="请输拼音..."> | |
| 72 | - </sa-Select2> | |
| 68 | + placeholder="请输拼音..." | |
| 69 | + dcvalue="{{ctrl.scheduleRuleManageForSave.carConfigInfo.id}}" | |
| 70 | + dcname="carConfigInfo.id" | |
| 71 | + icname="id" | |
| 72 | + icnames="nbbm" | |
| 73 | + datatype="cci" | |
| 74 | + mlp="true" | |
| 75 | + required > | |
| 76 | + </sa-Select3> | |
| 73 | 77 | </div> |
| 74 | 78 | <!-- 隐藏块,显示验证信息 --> |
| 75 | 79 | <div class="alert alert-danger well-sm" ng-show="myForm.cl.$error.required"> |
| ... | ... | @@ -165,14 +169,7 @@ |
| 165 | 169 | <div class="row"> |
| 166 | 170 | <div class="col-md-offset-3 col-md-4"> |
| 167 | 171 | <button type="submit" class="btn green" |
| 168 | - ng-disabled="myForm.xl.$error.required || | |
| 169 | - myForm.cl.$error.required || | |
| 170 | - myForm.qyrq.$error.required || | |
| 171 | - myForm.lpNames.$error.required || | |
| 172 | - myForm.lpStart.$error.required || | |
| 173 | - myForm.ryDbbms.$error.required || | |
| 174 | - myForm.ryStart.$error.required" | |
| 175 | - ><i class="fa fa-check"></i> 提交</button> | |
| 172 | + ng-disabled="!myForm.$valid"><i class="fa fa-check"></i> 提交</button> | |
| 176 | 173 | <a type="button" class="btn default" ui-sref="scheduleRuleManage" ><i class="fa fa-times"></i> 取消</a> |
| 177 | 174 | </div> |
| 178 | 175 | </div> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/scheduleRuleManage/form.html
| ... | ... | @@ -43,15 +43,17 @@ |
| 43 | 43 | <div class="form-group has-success has-feedback"> |
| 44 | 44 | <label class="col-md-2 control-label">线路*:</label> |
| 45 | 45 | <div class="col-md-3"> |
| 46 | - <sa-Select2 model="ctrl.scheduleRuleManageForSave" | |
| 46 | + <sa-Select3 model="ctrl.scheduleRuleManageForSave" | |
| 47 | 47 | name="xl" |
| 48 | - required="true" | |
| 49 | - type="xl" | |
| 50 | - modelcolname1="xl_id" | |
| 51 | - datacolname1="id" | |
| 52 | - showcolname="name" | |
| 53 | - placeholder="请输拼音..."> | |
| 54 | - </sa-Select2> | |
| 48 | + placeholder="请输拼音..." | |
| 49 | + dcvalue="{{ctrl.scheduleRuleManageForSave.xl.id}}" | |
| 50 | + dcname="xl.id" | |
| 51 | + icname="id" | |
| 52 | + icnames="name" | |
| 53 | + datatype="xl" | |
| 54 | + mlp="true" | |
| 55 | + required > | |
| 56 | + </sa-Select3> | |
| 55 | 57 | </div> |
| 56 | 58 | <!-- 隐藏块,显示验证信息 --> |
| 57 | 59 | <div class="alert alert-danger well-sm" ng-show="myForm.xl.$error.required"> |
| ... | ... | @@ -61,15 +63,17 @@ |
| 61 | 63 | <div class="form-group has-success has-feedback"> |
| 62 | 64 | <label class="col-md-2 control-label">车辆*:</label> |
| 63 | 65 | <div class="col-md-3"> |
| 64 | - <sa-Select2 model="ctrl.scheduleRuleManageForSave" | |
| 66 | + <sa-Select3 model="ctrl.scheduleRuleManageForSave" | |
| 65 | 67 | name="cl" |
| 66 | - required="true" | |
| 67 | - type="ccl" | |
| 68 | - modelcolname1="cl_id" | |
| 69 | - datacolname1="id" | |
| 70 | - showcolname="nbbm" | |
| 71 | - placeholder="请输拼音..."> | |
| 72 | - </sa-Select2> | |
| 68 | + placeholder="请输拼音..." | |
| 69 | + dcvalue="{{ctrl.scheduleRuleManageForSave.carConfigInfo.id}}" | |
| 70 | + dcname="carConfigInfo.id" | |
| 71 | + icname="id" | |
| 72 | + icnames="nbbm" | |
| 73 | + datatype="cci" | |
| 74 | + mlp="true" | |
| 75 | + required > | |
| 76 | + </sa-Select3> | |
| 73 | 77 | </div> |
| 74 | 78 | <!-- 隐藏块,显示验证信息 --> |
| 75 | 79 | <div class="alert alert-danger well-sm" ng-show="myForm.cl.$error.required"> |
| ... | ... | @@ -165,14 +169,7 @@ |
| 165 | 169 | <div class="row"> |
| 166 | 170 | <div class="col-md-offset-3 col-md-4"> |
| 167 | 171 | <button type="submit" class="btn green" |
| 168 | - ng-disabled="myForm.xl.$error.required || | |
| 169 | - myForm.cl.$error.required || | |
| 170 | - myForm.qyrq.$error.required || | |
| 171 | - myForm.lpNames.$error.required || | |
| 172 | - myForm.lpStart.$error.required || | |
| 173 | - myForm.ryDbbms.$error.required || | |
| 174 | - myForm.ryStart.$error.required" | |
| 175 | - ><i class="fa fa-check"></i> 提交</button> | |
| 172 | + ng-disabled="!myForm.$valid"><i class="fa fa-check"></i> 提交</button> | |
| 176 | 173 | <a type="button" class="btn default" ui-sref="scheduleRuleManage" ><i class="fa fa-times"></i> 取消</a> |
| 177 | 174 | </div> |
| 178 | 175 | </div> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/scheduleRuleManage/list.html
| ... | ... | @@ -18,13 +18,15 @@ |
| 18 | 18 | <tr role="row" class="filter"> |
| 19 | 19 | <td></td> |
| 20 | 20 | <td> |
| 21 | - <sa-Select2 model="ctrl.searchCondition()" | |
| 22 | - type="xl" | |
| 23 | - modelcolname1="xl.id_eq" | |
| 24 | - datacolname1="id" | |
| 25 | - showcolname="name" | |
| 26 | - placeholder="请输拼音..."> | |
| 27 | - </sa-Select2> | |
| 21 | + <sa-Select3 model="ctrl.searchCondition()" | |
| 22 | + name="xl" | |
| 23 | + placeholder="请输拼音..." | |
| 24 | + dcvalue="{{ctrl.searchCondition()['xl.id_eq']}}" | |
| 25 | + dcname="xl.id_eq" | |
| 26 | + icname="id" | |
| 27 | + icnames="name" | |
| 28 | + datatype="xl"> | |
| 29 | + </sa-Select3> | |
| 28 | 30 | </td> |
| 29 | 31 | <td></td> |
| 30 | 32 | <td></td> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/scheduleRuleManage/scheduleRuleManage.js
| ... | ... | @@ -135,7 +135,7 @@ angular.module('ScheduleApp').controller('ScheduleRuleManageFormCtrl', ['Schedul |
| 135 | 135 | }; |
| 136 | 136 | |
| 137 | 137 | // 欲保存的busInfo信息,绑定 |
| 138 | - self.scheduleRuleManageForSave = {}; | |
| 138 | + self.scheduleRuleManageForSave = {xl: {}, carConfigInfo: {}}; | |
| 139 | 139 | |
| 140 | 140 | // 获取传过来的id,有的话就是修改,获取一遍数据 |
| 141 | 141 | var id = $stateParams.id; |
| ... | ... | @@ -147,10 +147,6 @@ angular.module('ScheduleApp').controller('ScheduleRuleManageFormCtrl', ['Schedul |
| 147 | 147 | for (key in result) { |
| 148 | 148 | self.scheduleRuleManageForSave[key] = result[key]; |
| 149 | 149 | } |
| 150 | - | |
| 151 | - // 添加xl_id,cl_id | |
| 152 | - self.scheduleRuleManageForSave["xl_id"] = self.scheduleRuleManageForSave.xl.id; | |
| 153 | - self.scheduleRuleManageForSave["cl_id"] = self.scheduleRuleManageForSave.cl.id; | |
| 154 | 150 | }, |
| 155 | 151 | function(result) { |
| 156 | 152 | alert("出错啦!"); |
| ... | ... | @@ -162,16 +158,6 @@ angular.module('ScheduleApp').controller('ScheduleRuleManageFormCtrl', ['Schedul |
| 162 | 158 | self.submit = function() { |
| 163 | 159 | console.log(self.scheduleRuleManageForSave); |
| 164 | 160 | |
| 165 | - var mf = $scope.myForm; | |
| 166 | - | |
| 167 | - // xl_id,cl_id要组织成对象,然后删除 | |
| 168 | - self.scheduleRuleManageForSave["xl"] = {}; | |
| 169 | - self.scheduleRuleManageForSave.xl["id"] = self.scheduleRuleManageForSave["xl_id"]; | |
| 170 | - delete self.scheduleRuleManageForSave["xl_id"]; | |
| 171 | - self.scheduleRuleManageForSave["carConfigInfo"] = {}; | |
| 172 | - self.scheduleRuleManageForSave.carConfigInfo["id"] = self.scheduleRuleManageForSave["cl_id"]; | |
| 173 | - delete self.scheduleRuleManageForSave["cl_id"]; | |
| 174 | - | |
| 175 | 161 | scheduleRuleManageService.saveDetail(self.scheduleRuleManageForSave).then( |
| 176 | 162 | function(result) { |
| 177 | 163 | // TODO:弹出框方式以后改 | ... | ... |