931d27ec
Andy
unit
|
1
2
3
4
5
6
7
8
9
10
11
|
/**
* Created by mac on 17/5/8.
*/
sysComm = {
sysCode: '1001',//企业云系统编码
gvnSysCode: '1002',//政府系统编码
grantType: 'PASSWORD',//授权模式
clientType: 'WEB'//客户端类型
}
|
931d27ec
Andy
unit
|
12
|
//var baseUrl = 'http://localhost:8089/';// url公用地址
|
e89f1648
Andy
unit
|
13
|
//var parkcloudbaseUrl = 'http://localhost:8099/';// url公用地址
|
931d27ec
Andy
unit
|
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
// var authUrl = 'http://localhost:8089/';// 鉴权URL公用地址192.168.1.196:8090
//阿里云环境,别删
// var baseUrl = 'http://sys.service.rnting.com/';// url公用地址
// var parkcloudbaseUrl = 'http://120.26.116.79:8093/';// url公用地址
// var authUrl = 'http://sys.service.rnting.com/';// 鉴权URL公用地址
//61环境,别删
var baseUrl = 'http://61.177.139.228:18088/';// url公用地址
var parkcloudbaseUrl = 'http://61.177.139.228:18093/';// url公用地址
var authUrl = 'http://61.177.139.228:18088/';// 鉴权URL公用地址
var dataUrl = dataUrl || {};
// dataUrl.util = {
//
//
//
// }
dataUrl.util = {
//系统管理start
//查询字典信息
|
e89f1648
Andy
unit
|
39
40
|
getdatadicinfo: function () {
return baseUrl + 'datadic/getdatadicinfo';
|
931d27ec
Andy
unit
|
41
42
|
},
//登录日志
|
e89f1648
Andy
unit
|
43
44
|
queryLoginLog: function () {
return baseUrl + 'sysLoginLog/queryLoginLog';
|
931d27ec
Andy
unit
|
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
|
},
//获取验证码
getLoginImageCode: function () {
return baseUrl + 'oauth/imageCode?' + Math.random()
},
//登录
getLogin: function () {
return baseUrl + 'oauth/login'
},
//登出
getLoginOut: function () {
return baseUrl + 'oauth/loginout'
},
//获取菜单
getMenuByOpId: baseUrl + 'sysOp/queryMenuByOpId',
//查询角色
getQueryRoles: function () {
return baseUrl + 'sysRole/queryRoles'
},
//查询职能
getQueryJobFunc: function () {
return baseUrl + 'sysJobFunc/pageQuerySysjobFunc'
},
//根据职能ID 获取 改职能下有哪些资源
queryResByJobFunId: baseUrl + 'sysJobFunc/queryResIdByJobFunId',
//新增或更新 职能信息 职能与资源的关联关系
saveOrUpdateJobFunWithResIds: baseUrl + 'sysJobFunc/saveOrUpdateJobFunWithResIds',
//根据职能id查询角色
getRoleByJobFuncId: baseUrl + 'sysJobFunc/queryResIdByJobFunId',
//删除职能
deleteJobFun: baseUrl + 'sysJobFunc/deleteSysJobFunc',
//更新职能
updateJobFun: baseUrl + 'sysJobFunc/updateJobFun',
//保存职能
saveJobFun: baseUrl + 'sysJobFunc/saveJobFun',
//根据职能id查询角色信息
getRolesByJobFuncId: function () {
return baseUrl + 'sysJobFunc/queryRolesByJobId';
},
//保存职能与角色关系
batchSaveRoleJobFunByJobFunId: function () {
return baseUrl + 'sysJobFunc/batchSaveRoleJobFunByJobFunId';
},
//通过syscode查询职能
getJobFuncsBySysCode: function () {
return baseUrl + 'sysJobFunc/queryJobFuncsBySysCode'
},
//通过角色查询职能
queryJobFuncsByRoleId: function () {
return baseUrl + 'sysJobFunc/queryJobFuncsByRoleId'
},
//修改密码
modifyPass: baseUrl + 'sysOp/modifyPass',
isUsedForRoleByRoleId: function () {
return baseUrl + 'sysRole/isUsedForRoleByRoleId';
},
saveRole: function () {
return baseUrl + 'sysRole/add'
},
updateRole: function () {
return baseUrl + 'sysRole/update'
},
deleteRole: function () {
return baseUrl + 'sysRole/delete'
},
//2017-08-10
//获取省
getTbAreaProvince: function () {
return baseUrl + 'area/getTbAreaProvince'
},
//查询区域下一级
queryNextLeverById: function () {
return baseUrl + 'area/queryNextLeverById'
},
//查询用户分页列表
getQueryUsersList: function () {
return baseUrl + 'sysOp/queryOpsBySysCode'
},
//查询根据sysCode获取系统对象
querySysBySysCode: function () {
return baseUrl + 'sysCode/querySysBySysCode'
},
//查询获取停车场分页列表
queryParkingLotByPark: function () {
return baseUrl + 'sysOrg/queryParkingLotByPark'
},
//根据组织ID查询该组织下所有的用户
queryOpByorgIdForPage: function () {
return baseUrl + 'sysOrg/queryOpByorgIdForPage'
},
//查询用户名loginCode是否可以用
queryLoginCodeIsUsed: baseUrl + 'sysOp/loginCodeIsUsed',
//保存用户
saveUser: baseUrl + 'sysOp/insertUser',
//修改用户
updateUser: baseUrl + '/sysOp/modifyUser',
//删除用户
deleteUser: baseUrl + '/sysOp/deleteUser',
//重置密码
resetUserPwd: baseUrl + 'sysOp/modifyUserPassword',
//添加用户时查询角色列表
getQueryRolesList: baseUrl + 'sysOp/queryRolesBySysCode',
//条件查询时查询部门(组织)列表
getQueryOrgsList: baseUrl + 'sysOp/queryOrgsBySysCode',
//查询组织分页列表
getQueryOrgsPageList: baseUrl + 'sysOrg/getQueryOrgList',
//添加组织
saveOrg: baseUrl + 'sysOrg/insertOrg',
//修改组织
updateOrg: baseUrl + 'sysOrg/modifyOrg',
//删除组织
deleteOrg: baseUrl + 'sysOrg/deleteOrg',
//判断组织是否被占用
isUsedForOrgByOrgId: baseUrl + 'sysOrg/isUsedForOrgByOrgId',
//通过sysCode构建树形组织
getOrgTreeBySysCode: function () {
return baseUrl + 'sysOrg/getOrgTreeBySysCode'
},
//查询菜单
getSysResBySysCode: function () {
return baseUrl + 'sysRes/queryResBySysCode'
},
//通过syscode查询菜单树
getResTreeBySysCode: function () {
return baseUrl + 'sysRes/getResTreeBySysCode'
},
//判断角色名称是否已经存在?
queryRoleExistByRoleName: function () {
return baseUrl + 'sysRole/queryRoleExistByRoleName'
},
//删除菜单
deleteRes: function () {
return baseUrl + 'sysRes/delete'
},
//保存或更新菜单
saveOrUpdateRes: function () {
return baseUrl + 'sysRes/saveOrUpdate'
},
//判断某菜单是否已经被使用
isUsedForMenuByMenuId: function () {
return baseUrl + 'sysRes/isUsedForResByResId'
},
/**通过系统编码查询所有角色列表 wangfs Edit.*/
queryRoleBysysCode: function () {
return baseUrl + 'sysRole/queryRoleBySysCode'
},
/**获取用户Session信息 wangfs Edit.*/
getSessionUserInfo: function () {
return baseUrl + 'sysOp/querySessionUserInfo'
},
/**获取用户Session信息 wangfs Edit.*/
queryRolesByUserId: function () {
return baseUrl + 'sysRole/queryRolesByUserId'
},
/**获取用户Session信息 wangfs Edit.*/
saveUserRoles: function () {
return baseUrl + 'sysOp/saveUserRoles'
},
/**查询当前用户对应的组织 wangfs Edit.*/
queryOrgIdsByOpIds: function () {
return baseUrl + 'sysOp/queryOrgIdsByOpIds'
},
/**保存当前用户对应的组织 wangfs Edit.*/
saveSysOpAndSysOrgRelation: function () {
return baseUrl + 'sysOp/saveSysOpAndSysOrgRelation'
},
//查询根据sysCode获取系统对象
querySysBySysCode: function () {
return baseUrl + 'sysCode/querySysBySysCode'
},
//获取区域tree
|
e89f1648
Andy
unit
|
216
|
getAreatree: function () {
|
931d27ec
Andy
unit
|
217
218
219
|
return baseUrl + 'area/getAreatree'
},
//保存组织区域关系数据
|
e89f1648
Andy
unit
|
220
|
batchSaveOrgAreaRelation: function () {
|
931d27ec
Andy
unit
|
221
222
223
|
return baseUrl + 'area/batchSaveOrgAreaRelation'
},
//通过组织id查询已关联的区域list
|
e89f1648
Andy
unit
|
224
|
queryAreaIdsByorgId: function () {
|
931d27ec
Andy
unit
|
225
226
227
|
return baseUrl + 'area/queryAreaIdsByorgId'
},
//用过用户Id更新用户组织ID
|
e89f1648
Andy
unit
|
228
|
updateSysOpOrgIdByOpId: function () {
|
931d27ec
Andy
unit
|
229
230
231
232
|
return baseUrl + 'sysOp/updateSysOpOrgIdByOpId'
},
//获取块列表
|
e89f1648
Andy
unit
|
233
|
getParkBlockNamesByUserId: function () {
|
931d27ec
Andy
unit
|
234
235
|
return baseUrl + 'area/getParkBlockNamesByUserId';
},
|
e89f1648
Andy
unit
|
236
|
getParkBlockNamesByBlockId: function () {
|
931d27ec
Andy
unit
|
237
238
239
|
return baseUrl + 'area/getParkBlockNamesByBlockId';
},
//通过数据状态构建树形菜单
|
e89f1648
Andy
unit
|
240
|
queryAllResTree: function () {
|
931d27ec
Andy
unit
|
241
242
243
|
return baseUrl + 'sysRes/queryAllResTree';
},
//通过组织等级查询组织树菜单
|
e89f1648
Andy
unit
|
244
|
queryOrgByOrgLevelTree: function () {
|
931d27ec
Andy
unit
|
245
246
247
|
return baseUrl + 'sysOrg/queryOrgByOrgLevelTree';
},
//批量保存组织与资源关系
|
e89f1648
Andy
unit
|
248
|
batchInsertOrgRes: function () {
|
931d27ec
Andy
unit
|
249
250
251
|
return baseUrl + 'sysRes/batchInsertOrgRes';
},
//通过组织id查询已经分配的资源ids
|
e89f1648
Andy
unit
|
252
|
queryResIdsByOrgId: function () {
|
931d27ec
Andy
unit
|
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
|
return baseUrl + 'sysRes/queryResIdsByOrgId';
},
//系统管理end
//云平台接口start
//停车场数据统计-车流量管理
//停车场信息统计
getParkLotStatistic: function () {
return parkcloudbaseUrl + 'parklotstatistic/getParkLotStatistic'
},
//日账单
getBillManagementTable: function () {
return parkcloudbaseUrl + 'bill/queryBillforDayForPage'
},
//日账单停车场不分组
queryBillforDayTotalForPageNoGroupByPark: function () {
return parkcloudbaseUrl + 'bill/queryBillforDayTotalForPageNoGroupByPark'
},
//日账单查看
getBillManagementTablecheck: function () {
return parkcloudbaseUrl + 'bill/queryBillForDay'
},
//日账单下载
getBillManagementTableDownload: function () {
return parkcloudbaseUrl + 'bill/exportToExcleForBillForDay'
},
//月账单-表格查询
getMonthBillMngtStatistic: function () {
return parkcloudbaseUrl + 'monthbill/queryBillforMonthForPage'
},
//2017-9-15langlw 恢复月账单统计列表
queryBillforMonthList: function () {
return parkcloudbaseUrl + 'monthbill/queryBillforMonthList'
},
//月账汇总单查询(统计图)
|
e89f1648
Andy
unit
|
291
|
queryBillforMonthTotal: function () {
|
931d27ec
Andy
unit
|
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
|
return parkcloudbaseUrl + 'monthbill/queryBillforMonthTotal'
},
//月账单列表所有下载
exportToExcleForBillForMonth: function () {
return parkcloudbaseUrl + 'monthbill/exportToExcleForBillForMonth'
},
//月账单年卡月卡导出
exportToExcleForBillForYearOrMonth: function () {
return parkcloudbaseUrl + 'monthbill/exportToExcleForBillForYearOrMonth'
},
//月账单临停导出
exportToExcleForBillForMonthTmp: function () {
return parkcloudbaseUrl + 'monthbill/exportToExcleForBillForMonthTmp'
},
//临停总账单
getTemstopMngtStatistic: function () {
return parkcloudbaseUrl + 'monthbill/queryBillforMonthDetail'
},
//年卡月卡总账单
getCardMngtStatistic: function () {
return parkcloudbaseUrl + 'monthbill/queryBillforMonthDetail'
},
//临停停车场分组账单
getTemParkStatistic: function () {
return parkcloudbaseUrl + 'monthbill/queryBillforMonthDetail'
},
//年卡月卡停车场分组账单
getCardParkStatistic: function () {
return parkcloudbaseUrl + 'monthbill/queryBillforMonthDetail'
},
//分页查询停车场数据统计车位总流量
getParkingLotUseStatisticForPage: function () {
return parkcloudbaseUrl + 'VehicleFlowStatistic/getVehicleFlowStatisticForPage'
},
//车流量 图
getVehicleFlowForLineChart: function () {
return parkcloudbaseUrl + 'VehicleFlowStatistic/getVehicleFlowForLineChart'
},
//查询停车场数据统计最大值与最小值
getParkingLotUseStatisticMaxAndMin: function () {
return parkcloudbaseUrl + 'VehicleFlowStatistic/getVehicleFlowMaxAndMin'
},
//导出停车场数据统计车位总流量excel
getParkingLotUseStatisticExcel: function () {
return parkcloudbaseUrl + 'VehicleFlowStatistic/exportVehicleFlowStatisticExcel'
},
//月报表导出车流量
exportVehicleFlowStatisticExcelForMonth: function () {
return parkcloudbaseUrl + 'VehicleFlowStatistic/exportVehicleFlowStatisticExcelForMonth'
},
//日报表下载车流量
downloadVehicleFlowStatisticExcel: function () {
return parkcloudbaseUrl + 'VehicleFlowStatistic/downloadVehicleFlowStatisticExcel'
},
//月报表下载车流量
downloadVehicleFlowStatisticExcelForMonth: function () {
return parkcloudbaseUrl + 'VehicleFlowStatistic/downloadVehicleFlowStatisticExcelForMonth'
},
//按月统计进出场车流量和占用率和周转率
queryMonthVehicleFlowAndVacancyRateAndTurnover: function () {
return parkcloudbaseUrl + 'VehicleFlowStatistic/queryMonthVehicleFlowAndVacancyRateAndTurnover'
},
//获取停车场列表
getParkLotNamesByUserId: function () {
return baseUrl + 'area/getParkLotNamesByUserId';
},
getSysCodeValueByKind: function () {
return baseUrl + 'common/getSysCodeValueByKind';
},
//停车场数据统计-车位管理
//查询停车场数据统计pie
getStatisticSummary: function () {
return parkcloudbaseUrl + 'parking/getstatisticsummary';
},
//查询停车场数据统计车位管理分页表格数据
getstatisticlist: function () {
return parkcloudbaseUrl + 'parking/getstatisticlist';
},
//车位使用管理空置率
getFreeRatioBerthForLineChart: function () {
return parkcloudbaseUrl + 'parking/getFreeRatioBerthForLineChart';
},
//车位使用管理周转率
getTurnOverBerthForLineChart: function () {
return parkcloudbaseUrl + 'parking/getTurnOverBerthForLineChart';
},
//数据统计 车位管理 导出excel
exportBerthStatisticExcel: function () {
return parkcloudbaseUrl + 'parking/exportBerthStatisticExcel';
},
//数据统计 日报表车位管理 下载
|
e89f1648
Andy
unit
|
385
|
downloadBerthStatisticExcel: function () {
|
931d27ec
Andy
unit
|
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
|
return parkcloudbaseUrl + 'parking/downloadBerthStatisticExcel';
},
//按月导出车位管理excel
exportBerthStatisticExcelForMonth: function () {
return parkcloudbaseUrl + 'parking/exportBerthStatisticExcelForMonth';
},
//月报表车位管理下载
downloadBerthStatisticExcelForMonth: function () {
return parkcloudbaseUrl + 'parking/downloadBerthStatisticExcelForMonth';
},
//停车场数据统计-交易管理
//获取交易详情
getordertrancdetails: function () {
return parkcloudbaseUrl + 'transaction/getordertrancdetails';
},
//停车收入统计--折线图
getOrderTransactionFoldLine: function () {
return parkcloudbaseUrl + 'transaction/getOrderTransactionFoldLine';
},
//获取统计提取总计信息
gettransactionstatisticsummary: function () {
return parkcloudbaseUrl + 'transaction/gettransactionstatisticsummary';
},
//获取交易统计数据列表
gettransactionstatisticlist: function () {
return parkcloudbaseUrl + 'transaction/gettransactionstatisticlist';
},
//导出交易数据excel
exportTransactionStatisticExcel: function () {
return parkcloudbaseUrl + 'transaction/exportTransactionStatisticExcel';
},
//首页
//今日收入 和 逃逸金额
getTodayIncome: function () {
return parkcloudbaseUrl + 'index/queryCustIncomeTotal';
},
//车流量
getCurVehicleFlow: function () {
return parkcloudbaseUrl + 'index/realtimeGetCurVehicleFlow';
},
//今日空置率
getCurFreeRatio: function () {
return parkcloudbaseUrl + 'index/realtimeGetCurFreeRatio';
},
//首页饼图
getPieData: function () {
return parkcloudbaseUrl + 'index/queryCustIncomeTotalForPark';
},
//首页柱图 支付方式echarts
getBarData: function () {
return parkcloudbaseUrl + 'index/queryCustIncomeForPayType';
},
//实时查询当前总车流量
realtimeGetCurVehicleFlow: function () {
return parkcloudbaseUrl + 'index/realtimeGetCurVehicleFlow';
},
// 根据停车场编号获取该停车场今日车流量和车位折线图
getTodayVehicleFlowForLineChart: function () {
return parkcloudbaseUrl + 'index/getTodayVehicleFlowForLineChart';
},
//企业云平台首页-->停车次数统计(饼图)
queryParingCount: function () {
return parkcloudbaseUrl + 'index/queryParingCount';
},
//云平台首页->企业客户负责所有的停车场汇总
queryCustIncomeTotal: function () {
return parkcloudbaseUrl + 'index/queryCustIncomeTotal';
},
//云平台首页->企业客户负责某个停车收入情况
queryCustIncomeTotalForPark: function () {
return parkcloudbaseUrl + 'index/queryCustIncomeTotalForPark';
},
//云平台首页->企业客户负责某个停车不同的支付方式收入情况
queryCustIncomeForPayType: function () {
return parkcloudbaseUrl + 'index/queryCustIncomeForPayType';
},
//企业云平台->数据统计->进出场上报数据统计
queryInOutParkForList: function () {
return parkcloudbaseUrl + 'inOutParkStatistic/queryInOutParkForList';
},
//企业云平台->数据统计->数据统计进出场上报折线图
queryInOutParkForChart: function () {
return parkcloudbaseUrl + 'inOutParkStatistic/queryInOutParkForChart';
},
//企业云平台->数据统计->导出进出场统计excel
exportInOutParkStatisticExcel: function () {
return parkcloudbaseUrl + 'inOutParkStatistic/exportInOutParkStatisticExcel';
},
//企业云平台->数据统计->年卡月卡统计
queryYearMonthCardStatistic: function () {
return parkcloudbaseUrl + 'yearMonthCardStatistic/queryYearMonthCardStatistic';
},
//企业云平台->数据统计->年卡月卡统计折线图
queryYearMonthCardStatisticForChart: function () {
return parkcloudbaseUrl + 'yearMonthCardStatistic/queryYearMonthCardStatisticForChart';
},
//企业云平台->数据统计->导出年卡月卡统计excel
exportYearMonthStatisticExcel: function () {
return parkcloudbaseUrl + 'yearMonthCardStatistic/exportYearMonthStatisticExcel';
}, do_s_eqpRoundList_json: function () {
return eqpUrl + 'ATMS-Park/EqpRoundMng/do_s_eqpRoundList_json';
}, do_s_eqpRoundMsgList_json: function () {
return eqpUrl + 'ATMS-Park/EqpRoundMng/do_s_eqpRoundMsgList_json';
},
//企业云平台->数据统计->车位信息统计
statisticParkLotEqpCountByPlNos: function () {
return parkcloudbaseUrl + 'index/statisticParkLotEqpCountByPlNos';
},
getParkStaticsticAndTodayAmount: function () {
return parkcloudbaseUrl + 'parking/getParkStaticsticAndTodayAmount';
},
//首页签到记录
|
e89f1648
Andy
unit
|
503
504
|
queryIndexSignRecord: function () {
return parkcloudbaseUrl + 'index/queryIndexSignRecord';
|
931d27ec
Andy
unit
|
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
|
},
//今日实时停车次数
getRealtimeParkingOutNum: function () {
return parkcloudbaseUrl + 'index/realtimeParkingOutNum';
},
//今日实时周转率
getRealtimeTurnoverRate: function () {
return parkcloudbaseUrl + 'index/realtimeTurnoverRate';
},//今日实时占用率
getRealtimeoccupationRate: function () {
return parkcloudbaseUrl + 'index/realtimeoccupationRate';
},
//查询今日车流量占用率周转率
queryTodayVehicleFlowOccupyRateAndTurnOver: function () {
return parkcloudbaseUrl + 'index/queryTodayVehicleFlowOccupyRateAndTurnOver';
},
//决策分析->日报表->停车收费统计->统计图
|
e89f1648
Andy
unit
|
522
|
queryBillforDayTotal: function () {
|
931d27ec
Andy
unit
|
523
524
525
|
return parkcloudbaseUrl + 'bill/queryBillforDayTotal';
},
//决策分析->日报表->停车时长统计->折线图
|
e89f1648
Andy
unit
|
526
|
echartsForParkDurationForDay: function () {
|
931d27ec
Andy
unit
|
527
528
529
|
return parkcloudbaseUrl + 'parkDuration/queryEchartsForParkDurationForDay';
},
//决策分析->日报表->停车时长统计->excle导出
|
e89f1648
Andy
unit
|
530
|
exportToExcleForParkDurationForDay: function () {
|
931d27ec
Andy
unit
|
531
532
533
|
return parkcloudbaseUrl + 'parkDuration/exportToExcleForParkDurationForDay';
},
//决策分析->日报表->停车时长统计->下载详情
|
e89f1648
Andy
unit
|
534
|
exportExcleForParkDurationDetail: function () {
|
931d27ec
Andy
unit
|
535
536
|
return parkcloudbaseUrl + 'parkDuration/exportExcleForParkDurationDetail';
},
|
e89f1648
Andy
unit
|
537
|
queryEchartsForParkDurationDayForPage: function () {
|
931d27ec
Andy
unit
|
538
539
540
|
return parkcloudbaseUrl + 'parkDuration/queryEchartsForParkDurationDayForPage';
},
//根据查询条件查询停车订单
|
e89f1648
Andy
unit
|
541
542
|
queryParkOrderByCondition: function () {
return parkcloudbaseUrl + 'order/queryParkOrderByCondition';
|
931d27ec
Andy
unit
|
543
544
|
},
//根据条件查询欠费停车订单
|
e89f1648
Andy
unit
|
545
546
|
queryArrearOrderByCondition: function () {
return parkcloudbaseUrl + 'order/queryArrearOrderByCondition';
|
931d27ec
Andy
unit
|
547
548
|
},
//决策分析->月报表->停车时长统计->折线图
|
e89f1648
Andy
unit
|
549
|
echartsForParkDurationForMonth: function () {
|
931d27ec
Andy
unit
|
550
551
552
|
return parkcloudbaseUrl + 'parkDuration/queryEchartsForParkDurationForMonth';
},
//决策分析->月报表->停车时长统计->表格数据
|
e89f1648
Andy
unit
|
553
|
queryEchartsForParkDurationMonthForPage: function () {
|
931d27ec
Andy
unit
|
554
555
556
|
return parkcloudbaseUrl + 'parkDuration/queryEchartsForParkDurationMonthForPage';
},
//决策分析->月报表->停车时长统计->excle导出
|
e89f1648
Andy
unit
|
557
|
exportToExcleForParkDurationForMonth: function () {
|
931d27ec
Andy
unit
|
558
559
560
|
return parkcloudbaseUrl + 'parkDuration/exportToExcleForParkDurationForMonth';
},
//决策分析->月报表->停车时长统计->excle下载
|
e89f1648
Andy
unit
|
561
|
downloadParkDurationExcelForMonth: function () {
|
931d27ec
Andy
unit
|
562
563
564
565
|
return parkcloudbaseUrl + 'parkDuration/downloadParkDurationExcelForMonth';
},
//根据查询条件导出停车订单
|
e89f1648
Andy
unit
|
566
567
|
exportAllParkOrderByCondition: function () {
return parkcloudbaseUrl + 'order/exportAllParkOrderByCondition';
|
931d27ec
Andy
unit
|
568
569
|
},
//根据查询条件导出所有欠费停车订单
|
e89f1648
Andy
unit
|
570
571
|
exportArrearageParkOrderByCondition: function () {
return parkcloudbaseUrl + 'order/exportArrearageParkOrderByCondition';
|
931d27ec
Andy
unit
|
572
573
|
},
//月账单年卡月卡统计-详情导出
|
e89f1648
Andy
unit
|
574
575
|
exportYearMonthCardIncomeStatistic: function () {
return parkcloudbaseUrl + 'monthbill/exportYearMonthCardIncomeStatistic';
|
931d27ec
Andy
unit
|
576
577
|
},
//区域管理-查询区域列表
|
e89f1648
Andy
unit
|
578
579
|
queryAreaAndBlockTree: function () {
return parkcloudbaseUrl + 'areaManage/queryAreaAndBlockTree';
|
931d27ec
Andy
unit
|
580
581
|
},
//根据区块id集合查询 省市区
|
e89f1648
Andy
unit
|
582
|
queryProvinceCityAreaByBlockIds: function () {
|
931d27ec
Andy
unit
|
583
584
585
|
return parkcloudbaseUrl + 'areaManage/queryProvinceCityAreaByBlockIds'
},
//根据区县ID-查询区块ID
|
e89f1648
Andy
unit
|
586
587
|
queryAreaBlockByParentId: function () {
return baseUrl + 'area/queryAreaBlockByParentId';
|
931d27ec
Andy
unit
|
588
589
|
},
//区块新增或修改
|
e89f1648
Andy
unit
|
590
591
|
saveOrUpdateAreaBlock: function () {
return baseUrl + 'area/saveOrUpdateAreaBlock';
|
931d27ec
Andy
unit
|
592
593
|
},
//区块删除
|
e89f1648
Andy
unit
|
594
595
|
deleteAreaBlockByAreaBlockId: function () {
return baseUrl + 'area/deleteAreaBlockByAreaBlockId';
|
931d27ec
Andy
unit
|
596
597
|
},
//根据区块ID查询区块下停车场数量
|
e89f1648
Andy
unit
|
598
599
|
queryParkInfoNumByAreaBlockIds: function () {
return parkcloudbaseUrl + 'areaManage/queryParkInfoNumByAreaBlockIds';
|
931d27ec
Andy
unit
|
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
|
},
//分析决策-泊位周转率
queryTurnOverForMap: function () {
return parkcloudbaseUrl + 'analysis/queryTurnOverForMap';
},
//分析决策-泊位周转率详情
berthTurnOverDetail: function () {
return parkcloudbaseUrl + 'analysis/berthTurnOverDetail';
},
//分析决策-泊位周转率详情-导出
exportBerthTurnOverExcel: function () {
return parkcloudbaseUrl + 'analysis/exportBerthTurnOverExcel';
},
//基础信息-泊位管理-分页查询
berthInfoList: function () {
return parkcloudbaseUrl + 'berth/berthInfoList';
},
//基础信息-泊位管理-泊位修改
updateBerthInfo: function () {
return parkcloudbaseUrl + 'berth/updateBerthInfo';
},
//基础信息-泊位管理-泊位删除
deleteBerths: function () {
return parkcloudbaseUrl + 'berth/deleteBerths';
},
//基础信息-泊位管理-泊位新增
saveBerthInfo: function () {
return parkcloudbaseUrl + 'berth/saveBerthInfo';
},
//基础信息-泊位管理-泊位导出
exportBerthsInfoExcel: function () {
return parkcloudbaseUrl + 'berth/exportBerthInfoExcel';
},
//获取泊位区间tree
|
e89f1648
Andy
unit
|
634
|
getBerthAreatree: function () {
|
931d27ec
Andy
unit
|
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
|
return parkcloudbaseUrl + 'area/getBerthAreatree'
},
//基础信息-泊位区间管理-分页查询
queryTpPRegionAreaForPage: function () {
return parkcloudbaseUrl + 'regionArea/queryTpPRegionAreaForPage';
},
//基础信息-泊位区间管理-添加或修改
saveOrUpdateTpPRegionArea: function () {
return parkcloudbaseUrl + 'regionArea/saveOrUpdateTpPRegionArea';
},
//基础信息-泊位区间管理-删除
deleteTpPRegionArea: function () {
return parkcloudbaseUrl + 'regionArea/deleteTpPRegionArea';
},
//基础信息-泊位区间管理-导出
exportTpPRegionAreaExcel: function () {
return parkcloudbaseUrl + 'regionArea/exportTpPRegionAreaExcel';
},
//实时监控-点位监控-查询泊位分页
queryBerthByBerthForPage: function () {
return parkcloudbaseUrl + 'realTime/queryBerthByBerthForPage';
},
//实时监控-点位监控-查询PDA
queryParkPdaMonitor: function () {
return parkcloudbaseUrl + 'realTime/queryParkPdaMonitor';
},
//实时监控-点位监控-查询停车场PDA信息(电子围栏)
queryParkPdaInfo: function () {
return parkcloudbaseUrl + 'realTime/queryParkPdaInfo';
},
//实时监控-点位监控-分组查询停车场占用率
queryParkBerthOccupancyRate: function () {
return parkcloudbaseUrl + 'realTime/queryParkBerthOccupancyRate';
},
//通过停车场集合查询停车场信息
|
e89f1648
Andy
unit
|
670
|
queryParkingLotGeoByPlNos: function () {
|
931d27ec
Andy
unit
|
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
|
return parkcloudbaseUrl + 'realTime/queryParkingLotGeoByPlNos';
},
//云平台接口end
//停车场管理-分页查询
queryParkingLotPageByPark: function () {
return parkcloudbaseUrl + 'parkLotManage/queryParkingLotPageByPark';
},
//基础信息-停车场管理-停车场导出
parkingToExcleForPage: function () {
return parkcloudbaseUrl + 'parkLotManage/parkingToExcleForPage';
},
//基础信息-停车场管理-停车场添加
saveParkingLotInfo: function () {
return parkcloudbaseUrl + 'parkLotManage/saveParkingLotInfo';
},
//基础信息-停车场管理-停车场查询
queryParkingLotByPkNo: function () {
return parkcloudbaseUrl + 'parkLotManage/queryParkingLotByPkNo';
},
//基础信息-停车场管理-停车场修改
updateParkingLotInfo: function () {
return parkcloudbaseUrl + 'parkLotManage/updateParkingLotInfo';
},
//基础信息-停车场管理-刷新中session用户所绑定的停车场
|
e89f1648
Andy
unit
|
696
|
refreshParkLotCache: function () {
|
931d27ec
Andy
unit
|
697
698
699
|
return parkcloudbaseUrl + 'parkLotManage/refreshParkLotCache';
},
//基础信息-停车场管理-停车场删除
|
e89f1648
Andy
unit
|
700
|
deleteParkingLotInfoByPlNos: function () {
|
931d27ec
Andy
unit
|
701
702
703
|
return parkcloudbaseUrl + 'parkLotManage/deleteParkingLotInfoByPlNos';
},
//设备运维-地磁管理-地磁查询
|
e89f1648
Andy
unit
|
704
|
queryEqpPage: function () {
|
931d27ec
Andy
unit
|
705
706
707
|
return parkcloudbaseUrl + 'geomagnetic/records';
},
//设备运维-地磁管理-泊位查询
|
e89f1648
Andy
unit
|
708
|
getBerthMsgByPlNo: function () {
|
931d27ec
Andy
unit
|
709
710
711
|
return parkcloudbaseUrl + 'geomagnetic/getBerthMsgByPlNo';
},
//设备运维-地磁管理-地磁添加
|
e89f1648
Andy
unit
|
712
|
saveEqpMsg: function () {
|
931d27ec
Andy
unit
|
713
714
715
|
return parkcloudbaseUrl + 'geomagnetic/insertone';
},
//设备运维-地磁管理-地磁修改
|
e89f1648
Andy
unit
|
716
|
updateEqpMsg: function () {
|
931d27ec
Andy
unit
|
717
718
719
|
return parkcloudbaseUrl + 'geomagnetic/updateone';
},
//设备运维-地磁管理-地磁删除
|
e89f1648
Andy
unit
|
720
|
deleteEqpMsgById: function () {
|
931d27ec
Andy
unit
|
721
722
723
|
return parkcloudbaseUrl + 'geomagnetic/deleteall';
},
//设备运维-地磁管理-地磁导出
|
e89f1648
Andy
unit
|
724
|
eqpMsgToExcleForPage: function () {
|
931d27ec
Andy
unit
|
725
726
727
|
return parkcloudbaseUrl + 'geomagnetic/eqpMsgToExcleForPage';
},
//过车查询
|
e89f1648
Andy
unit
|
728
729
|
queryPassedca4pabe: function () {
return parkcloudbaseUrl + 'padinfo/queryPassedca4pabe';
|
931d27ec
Andy
unit
|
730
731
|
},
//导出过车信息
|
e89f1648
Andy
unit
|
732
733
|
exportPassCarInfoExcel: function () {
return parkcloudbaseUrl + 'padinfo/exportPassCarInfoExcel';
|
931d27ec
Andy
unit
|
734
735
|
},
//PDA分页信息
|
e89f1648
Andy
unit
|
736
737
|
queryPdaInfo4pabe: function () {
return parkcloudbaseUrl + 'padinfo/queryPdaInfo4pabe';
|
931d27ec
Andy
unit
|
738
739
|
},
//添加PDA
|
e89f1648
Andy
unit
|
740
741
|
insertPda: function () {
return parkcloudbaseUrl + 'padinfo/insertPda';
|
931d27ec
Andy
unit
|
742
743
|
},
//修改PDA
|
e89f1648
Andy
unit
|
744
745
|
updatePda: function () {
return parkcloudbaseUrl + 'padinfo/updatePda';
|
931d27ec
Andy
unit
|
746
747
|
},
//删除pda
|
e89f1648
Andy
unit
|
748
749
|
deletePda: function () {
return parkcloudbaseUrl + 'padinfo/deletePda';
|
931d27ec
Andy
unit
|
750
751
|
},
//导出pda
|
e89f1648
Andy
unit
|
752
753
|
exportBerthInfoExcel: function () {
return parkcloudbaseUrl + 'padinfo/exportBerthInfoExcel';
|
931d27ec
Andy
unit
|
754
755
|
},
//分页查询设备维护信息
|
e89f1648
Andy
unit
|
756
757
|
queryEpqOperationForPage: function () {
return parkcloudbaseUrl + 'eqpOperation/queryEpqOperationForPage';
|
931d27ec
Andy
unit
|
758
759
|
},
//通过PDA设备编号查询PDA信息
|
e89f1648
Andy
unit
|
760
761
|
queryPdaByPdaNo: function () {
return parkcloudbaseUrl + 'eqpOperation/queryPdaByPdaNo';
|
931d27ec
Andy
unit
|
762
763
|
},
//通过设备编号和厂家编号查询设备
|
e89f1648
Andy
unit
|
764
765
|
selectEqpByEqpNoAndFactory: function () {
return parkcloudbaseUrl + 'eqpOperation/selectEqpByEqpNoAndFactory';
|
931d27ec
Andy
unit
|
766
767
|
},
//新增或修改设备维护信息
|
e89f1648
Andy
unit
|
768
769
|
saveOrModifyEqpOperation: function () {
return parkcloudbaseUrl + 'eqpOperation/saveOrModifyEqpOperation';
|
931d27ec
Andy
unit
|
770
771
|
},
//删除设备维护信息
|
e89f1648
Andy
unit
|
772
773
|
updateEqpOperationForDelete: function () {
return parkcloudbaseUrl + 'eqpOperation/updateEqpOperationForDelete';
|
931d27ec
Andy
unit
|
774
775
|
},
//导出设备维护信息列表excel
|
e89f1648
Andy
unit
|
776
777
|
exportEqpOperationExcel: function () {
return parkcloudbaseUrl + 'eqpOperation/exportEqpOperationExcel';
|
931d27ec
Andy
unit
|
778
779
|
},
//查询厂家列表
|
e89f1648
Andy
unit
|
780
781
|
queryFactoryInfoForList: function () {
return parkcloudbaseUrl + 'eqpOperation/queryFactoryInfoForList';
|
931d27ec
Andy
unit
|
782
783
|
},
//停车收费时长统计-提供财务
|
e89f1648
Andy
unit
|
784
785
|
queryParkOrderForFinance: function () {
return parkcloudbaseUrl + 'order/queryParkOrderForFinance';
|
931d27ec
Andy
unit
|
786
787
|
},
//停车收费时长统计-提供财务
|
e89f1648
Andy
unit
|
788
789
|
excleImportParkOrderForFinance: function () {
return parkcloudbaseUrl + 'order/excleImportParkOrderForFinance';
|
931d27ec
Andy
unit
|
790
791
792
|
},
//结算管理
//结算管理-日账单管理-分页查询日账单区域收入汇总
|
e89f1648
Andy
unit
|
793
794
|
queryBillforDayTotalForBlockPage: function () {
return parkcloudbaseUrl + 'bill/queryBillforDayTotalForBlockPage';
|
931d27ec
Andy
unit
|
795
796
|
},
//结算管理-日账单管理-分页查询日账单停车场收入汇总
|
e89f1648
Andy
unit
|
797
798
|
queryBillforDayTotalForParkPage: function () {
return parkcloudbaseUrl + 'bill/queryBillforDayTotalForParkPage';
|
931d27ec
Andy
unit
|
799
800
|
},
//结算管理-日账单管理-分页查询日账单泊位区间收入汇总
|
e89f1648
Andy
unit
|
801
802
|
queryBillforDayTotalForAreaBerthPage: function () {
return parkcloudbaseUrl + 'bill/queryBillforDayTotalForAreaBerthPage';
|
931d27ec
Andy
unit
|
803
804
|
},
//结算管理-日账单管理-查询日账单区域收入汇总
|
e89f1648
Andy
unit
|
805
806
|
queryBillforDayTotals: function () {
return parkcloudbaseUrl + 'bill/queryBillforDayTotals';
|
931d27ec
Andy
unit
|
807
808
809
|
},
//对账单行政区下拉框
getAreaForCountry: function () {
|
e89f1648
Andy
unit
|
810
|
return parkcloudbaseUrl + 'selectItem/getAreaForCountry';
|
931d27ec
Andy
unit
|
811
812
813
|
},
//对账单块
getAlock: function () {
|
e89f1648
Andy
unit
|
814
|
return parkcloudbaseUrl + 'selectItem/getAlock';
|
931d27ec
Andy
unit
|
815
816
|
},
//对账单停车场信息
|
e89f1648
Andy
unit
|
817
818
|
getParkInfoS: function () {
return parkcloudbaseUrl + 'selectItem/getParkInfo';
|
931d27ec
Andy
unit
|
819
820
|
},
//对账泊位区间
|
e89f1648
Andy
unit
|
821
822
|
getParkAreaSelectItem: function () {
return parkcloudbaseUrl + 'selectItem/getParkAreaSelectItem';
|
931d27ec
Andy
unit
|
823
824
|
},
//对账单汇总查询
|
e89f1648
Andy
unit
|
825
826
|
queryBillFillTotalForPayType: function () {
return parkcloudbaseUrl + 'billReconciliation/queryBillFillTotalForPayType';
|
931d27ec
Andy
unit
|
827
828
829
|
},
//对账单明细查询
|
e89f1648
Andy
unit
|
830
831
|
queryBlancacforDayDetailPage: function () {
return parkcloudbaseUrl + 'billReconciliation/queryBlancacforDayDetailPage';
|
931d27ec
Andy
unit
|
832
833
|
},
//对账单明细导出
|
e89f1648
Andy
unit
|
834
835
|
exportToBlancacforDayDetail: function () {
return parkcloudbaseUrl + 'billReconciliation/exportToBlancacforDayDetail';
|
931d27ec
Andy
unit
|
836
837
|
},
//对账单汇总导出
|
e89f1648
Andy
unit
|
838
839
|
exportToBlancacforDayAll: function () {
return parkcloudbaseUrl + 'billReconciliation/exportToBlancacforDayAll';
|
931d27ec
Andy
unit
|
840
841
|
},
//添加备注
|
e89f1648
Andy
unit
|
842
843
|
saveQeualRemarks: function () {
return parkcloudbaseUrl + 'billReconciliation/saveQeualRemarks';
|
931d27ec
Andy
unit
|
844
845
|
},
//结算管理月账单-导出
|
e89f1648
Andy
unit
|
846
847
|
exportToExcleForBillForAll: function () {
return parkcloudbaseUrl + 'monthbill/exportToExcleForBillForAll';
|
931d27ec
Andy
unit
|
848
|
},
|
e89f1648
Andy
unit
|
849
850
|
|
931d27ec
Andy
unit
|
851
|
//结算管理-日账单管理-日账单区域收入汇总导出
|
e89f1648
Andy
unit
|
852
853
|
exportToBillExcleforDayTotals: function () {
return parkcloudbaseUrl + 'bill/exportToBillExcleforDayTotals';
|
931d27ec
Andy
unit
|
854
855
856
|
},
/***************************会员卡购买begin*****************************************/
//会员卡管理-批量导入
|
e89f1648
Andy
unit
|
857
858
|
batchImportVipCardCustInfo: function () {
return parkcloudbaseUrl + 'vipCardCustInfo/batchImportVipCardCustInfo';
|
931d27ec
Andy
unit
|
859
860
|
},
//会员卡模版下载
|
e89f1648
Andy
unit
|
861
862
|
excleTemplateDownLoad: function () {
return parkcloudbaseUrl + 'vipCardCustInfo/excleTemplateDownLoad';
|
931d27ec
Andy
unit
|
863
|
},
|
e89f1648
Andy
unit
|
864
865
|
queryVipCardCustInfoForPage: function () {
return parkcloudbaseUrl + 'vipCardCustInfo/queryVipCardCustInfoForPage';
|
931d27ec
Andy
unit
|
866
867
|
},
/***************************会员卡购买end*****************************************/
|
e89f1648
Andy
unit
|
868
|
|
931d27ec
Andy
unit
|
869
870
871
|
/***************************会员卡规则begin***************************************/
//会员卡类型下拉框
queryVIPCardRuleForPage: function () {
|
e89f1648
Andy
unit
|
872
|
return parkcloudbaseUrl + 'vipCardRule/queryVIPCardRuleForPage';
|
931d27ec
Andy
unit
|
873
874
875
|
},
//会员卡停车场树
vipCardSelectParkTree: function () {
|
e89f1648
Andy
unit
|
876
|
return parkcloudbaseUrl + 'vipCardRule/vipCardSelectParkTree';
|
931d27ec
Andy
unit
|
877
878
879
|
},
//插入会员卡数据
insertVipCard: function () {
|
e89f1648
Andy
unit
|
880
|
return parkcloudbaseUrl + 'vipCardRule/insertVipCard';
|
931d27ec
Andy
unit
|
881
882
883
|
},
//更新会员卡数据
updateVipCard: function () {
|
e89f1648
Andy
unit
|
884
|
return parkcloudbaseUrl + 'vipCardRule/updateVipCard';
|
931d27ec
Andy
unit
|
885
|
},
|
e89f1648
Andy
unit
|
886
|
//删除会员卡数据
|
931d27ec
Andy
unit
|
887
|
deleteVipCard: function () {
|
e89f1648
Andy
unit
|
888
|
return parkcloudbaseUrl + 'vipCardRule/deleteVipCard';
|
931d27ec
Andy
unit
|
889
|
},
|
e89f1648
Andy
unit
|
890
|
|
931d27ec
Andy
unit
|
891
892
|
//校验会员卡是否重复创建
checkVipCardPark: function () {
|
e89f1648
Andy
unit
|
893
894
895
896
897
|
return parkcloudbaseUrl + 'vipCardRule/checkVipCardPark';
},
/***************************会员卡规则end***************************************/
|
931d27ec
Andy
unit
|
898
899
900
|
//会员卡类型下拉框
getVipCardListSelectItem: function () {
|
e89f1648
Andy
unit
|
901
|
return parkcloudbaseUrl + 'selectItem/getVipCardListSelectItem';
|
931d27ec
Andy
unit
|
902
903
904
|
},
//会员卡类型对应的会员卡名称下拉框
getVipCardSelectItem: function () {
|
e89f1648
Andy
unit
|
905
|
return parkcloudbaseUrl + 'selectItem/getVipCardSelectItem';
|
931d27ec
Andy
unit
|
906
907
908
|
},
//新增会员卡时会员卡名称下拉框
getVipCardNameListSelectItem: function () {
|
e89f1648
Andy
unit
|
909
|
return parkcloudbaseUrl + 'selectItem/getVipCardNameListSelectItem';
|
931d27ec
Andy
unit
|
910
911
912
|
},
//新增会员卡时会员卡名称下拉框
queryVipCardCustInfoForPage: function () {
|
e89f1648
Andy
unit
|
913
|
return parkcloudbaseUrl + 'vipCardCustInfo/queryVipCardCustInfoForPage';
|
931d27ec
Andy
unit
|
914
915
916
|
},
//根据会员卡编码查询会员卡信息
queryVipCardByVipCard: function () {
|
e89f1648
Andy
unit
|
917
|
return parkcloudbaseUrl + 'vipCardCustInfo/queryVipCardByVipCard';
|
931d27ec
Andy
unit
|
918
919
920
|
},
//保存会员卡和客户信息
saveVipCardCustInfoAndPerson: function () {
|
e89f1648
Andy
unit
|
921
|
return parkcloudbaseUrl + 'vipCardCustInfo/saveVipCardCustInfoAndPerson';
|
931d27ec
Andy
unit
|
922
923
924
|
},
//修改会员卡和客户信息
updateVipCardCustInfoAndPerson: function () {
|
e89f1648
Andy
unit
|
925
|
return parkcloudbaseUrl + 'vipCardCustInfo/updateVipCardCustInfoAndPerson';
|
931d27ec
Andy
unit
|
926
927
928
|
},
//通过主键修改个人会员卡信息(续费)
updateVipCardCustInfoById: function () {
|
e89f1648
Andy
unit
|
929
|
return parkcloudbaseUrl + 'vipCardCustInfo/updateVipCardCustInfoById';
|
931d27ec
Andy
unit
|
930
|
},
|
e89f1648
Andy
unit
|
931
932
933
934
|
/***************************白名单规则管理开始***********************************/
//分页查询白名单信息
queryWhitelistRuleForPage: function () {
return parkcloudbaseUrl + 'whitelist/queryWhitelistRuleForPage';
|
931d27ec
Andy
unit
|
935
936
|
},
//查询白名单信息
|
e89f1648
Andy
unit
|
937
938
|
queryWhiteRuleById: function () {
return parkcloudbaseUrl + 'whitelist/queryWhiteRuleById';
|
931d27ec
Andy
unit
|
939
940
|
},
//修改白名单信息
|
e89f1648
Andy
unit
|
941
942
|
updateWhiteRuleById: function () {
return parkcloudbaseUrl + 'whitelist/updateWhiteRuleById';
|
931d27ec
Andy
unit
|
943
944
|
},
//删除白名单信息
|
e89f1648
Andy
unit
|
945
946
|
deleteWhiteRuleById: function () {
return parkcloudbaseUrl + 'whitelist/deleteWhiteRuleById';
|
931d27ec
Andy
unit
|
947
948
|
},
//添加白名单信息
|
e89f1648
Andy
unit
|
949
950
|
addWhiteRuleById: function () {
return parkcloudbaseUrl + 'whitelist/addWhiteRuleById';
|
931d27ec
Andy
unit
|
951
|
},
|
e89f1648
Andy
unit
|
952
953
954
955
956
|
/***************************白名单规则管理结束***********************************/
/***************************折扣规则管理开始***********************************/
//分页查询折扣信息
queryDiscountRuleForPage: function () {
return parkcloudbaseUrl + 'discount/queryDiscountRuleForPage';
|
931d27ec
Andy
unit
|
957
958
|
},
//查询折扣信息
|
e89f1648
Andy
unit
|
959
960
|
queryDiscountRuleById: function () {
return parkcloudbaseUrl + 'discount/queryDiscountRuleById';
|
931d27ec
Andy
unit
|
961
962
|
},
//修改折扣信息
|
e89f1648
Andy
unit
|
963
964
|
updateDiscountRuleById: function () {
return parkcloudbaseUrl + 'discount/updateDiscountRuleById';
|
931d27ec
Andy
unit
|
965
966
|
},
//删除折扣信息
|
e89f1648
Andy
unit
|
967
968
|
deleteDiscountRuleById: function () {
return parkcloudbaseUrl + 'discount/deleteDiscountRuleById';
|
931d27ec
Andy
unit
|
969
970
|
},
//添加折扣信息
|
e89f1648
Andy
unit
|
971
972
|
addDiscountRule: function () {
return parkcloudbaseUrl + 'discount/addDiscountRule';
|
931d27ec
Andy
unit
|
973
|
},
|
e89f1648
Andy
unit
|
974
|
/***************************折扣规则管理结束***********************************/
|
931d27ec
Andy
unit
|
975
976
|
/***************************收费员管理开始***********************************/
//获取行政区域和管理单位
|
e89f1648
Andy
unit
|
977
978
|
queryAreaCodeAndDeptCodes: function () {
return parkcloudbaseUrl + 'personnelmngt/queryAreaCodeAndDeptCodes';
|
931d27ec
Andy
unit
|
979
980
|
},
//根据行政区域和管理单位获取收费组
|
e89f1648
Andy
unit
|
981
982
|
queryCashierGroups: function () {
return parkcloudbaseUrl + 'personnelmngt/queryCashierGroups';
|
931d27ec
Andy
unit
|
983
984
|
},
//分页查询收费员信息
|
e89f1648
Andy
unit
|
985
986
|
queryCashierListInfo: function () {
return parkcloudbaseUrl + 'personnelmngt/queryCashierListInfo';
|
931d27ec
Andy
unit
|
987
988
|
},
//收费员详情
|
e89f1648
Andy
unit
|
989
990
|
getCashierDetailInfo: function () {
return parkcloudbaseUrl + 'personnelmngt/getCashierDetailInfo';
|
931d27ec
Andy
unit
|
991
992
|
},
/***************************收费员管理结束***********************************/
|
e89f1648
Andy
unit
|
993
994
995
996
|
/***************************计费规则开始***********************************/
// 模拟计费-根据停车场编码与车辆类型查询计费规则
queryBillingRuleByPlNoAndCarType: function () {
return parkcloudbaseUrl + 'billingRule/queryBillingRuleByPlNoAndCarType';
|
931d27ec
Andy
unit
|
997
998
|
},
// 模拟计费
|
e89f1648
Andy
unit
|
999
1000
|
billing: function () {
return parkcloudbaseUrl + 'billing/billing';
|
931d27ec
Andy
unit
|
1001
1002
|
},
//计费日志-明细
|
e89f1648
Andy
unit
|
1003
1004
|
queryBillingLogByLogId: function () {
return parkcloudbaseUrl + 'billing/queryBillingLogByLogId';
|
931d27ec
Andy
unit
|
1005
1006
|
},
//计费日志-图
|
e89f1648
Andy
unit
|
1007
1008
|
queryBillingLogForLineChart: function () {
return parkcloudbaseUrl + 'billingLog/queryBillingLogForLineChart';
|
931d27ec
Andy
unit
|
1009
|
},
|
e89f1648
Andy
unit
|
1010
|
/***************************计费规则结束***********************************/
|
931d27ec
Andy
unit
|
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
|
// 人员管理-收费员管理
getCashierGroupListURL: function () {
return parkcloudbaseUrl + 'personnelmngt/cashier/grouplist';
},
// 生成一条收费员记录
createACashierRecURL: function () {
return parkcloudbaseUrl + 'personnelmngt/cashier/insertone';
},
updateoneACashierRecURL: function () {
return parkcloudbaseUrl + 'personnelmngt/cashier/updateone';
},
resetpwdACashierRecURL: function () {
return parkcloudbaseUrl + 'personnelmngt/resetpwd';
},
|
e89f1648
Andy
unit
|
1025
|
|
931d27ec
Andy
unit
|
1026
1027
1028
1029
1030
1031
1032
1033
1034
|
// 获取指定收费组编号所管理的所有泊位区间数据
queryBerthAreaInfoListByGroupCodeURL: function () {
return parkcloudbaseUrl + 'personnelmngt/queryberthareainfolistbygroupcode';
},
// 更新收费员编号与泊位区间的绑定关系
bindOrUnbindCashierCodeWithBerthAreasURL: function () {
return parkcloudbaseUrl + 'personnelmngt/bindorunbindwithberthareas';
},
// 获取编辑收费员信息
|
e89f1648
Andy
unit
|
1035
1036
1037
1038
1039
1040
|
getEditCashierDetailInfo: function () {
return parkcloudbaseUrl + 'personnelmngt/getCashierDetailInfo';
},
//计费规则管理
queryBillingRuleCollects: function () {
return parkcloudbaseUrl + 'billingRule/queryBillingRuleCollects';
|
931d27ec
Andy
unit
|
1041
1042
1043
1044
1045
1046
|
}
}
//公共方法
fn = {
//获取物联网小镇停过车查询停车点
|
e89f1648
Andy
unit
|
1047
|
getParkPoint: function (callBack) {
|
931d27ec
Andy
unit
|
1048
1049
1050
|
fn.getCommonDict('WWW_PARK_POINT_CODE', callBack);
},
//获取车辆类型
|
e89f1648
Andy
unit
|
1051
|
getCarType: function (callBack) {
|
931d27ec
Andy
unit
|
1052
1053
1054
|
fn.getCommonDict('SYS_CODE_CAR_TYPE', callBack);
},
//获取停车场类型
|
e89f1648
Andy
unit
|
1055
|
getParkLotType: function (callBack) {
|
931d27ec
Andy
unit
|
1056
1057
1058
|
fn.getCommonDict('SYS_CODE_PARK_LOT_TYPE', callBack);
},
//获取停车场类型属性-路内
|
e89f1648
Andy
unit
|
1059
|
getParkTypePropOne: function (callBack) {
|
931d27ec
Andy
unit
|
1060
1061
1062
|
fn.getCommonDict('SYS_CODE_PARK_TYPE_PROP_1', callBack);
},
//获取停车场类型属性-路外
|
e89f1648
Andy
unit
|
1063
|
getParkTypePropTwo: function (callBack) {
|
931d27ec
Andy
unit
|
1064
1065
1066
|
fn.getCommonDict('SYS_CODE_PARK_TYPE_PROP_2', callBack);
},
//获取停车场商圈属性
|
e89f1648
Andy
unit
|
1067
|
getParkBusiCircle: function (callBack) {
|
931d27ec
Andy
unit
|
1068
1069
1070
|
fn.getCommonDict('SYS_CODE_PARK_BUSI_CIRCLE', callBack);
},
//获取停车场经纬度类型
|
e89f1648
Andy
unit
|
1071
|
getParkLonLatType: function (callBack) {
|
931d27ec
Andy
unit
|
1072
1073
1074
|
fn.getCommonDict('SYS_CODE_LON_LAT_TYPE', callBack);
},
//获取停车场状态
|
e89f1648
Andy
unit
|
1075
|
getParkLotState: function (callBack) {
|
931d27ec
Andy
unit
|
1076
1077
1078
|
fn.getCommonDict('SYS_CODE_PARK_LOT_STATE', callBack);
},
//获取停车场停车方式
|
e89f1648
Andy
unit
|
1079
|
getParkStyle: function (callBack) {
|
931d27ec
Andy
unit
|
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
|
fn.getCommonDict('SYS_CODE_PARK_STYLE', callBack);
},
//获取停车状态
getParkStatus: function (callBack) {
fn.getCommonDict('SYS_CODE_PARK_STATUS', callBack);
},
//获取停车类型
getParkType: function (callBack) {
fn.getCommonDict('SYS_CODE_PARK_TYPE', callBack);
},
//获取停车场类型
getParkLotType: function (callBack) {
fn.getCommonDict('SYS_CODE_PARKLOT_TYPE', callBack);
},
|
e89f1648
Andy
unit
|
1094
1095
|
getArrearOrderStatus: function (callBack) {
fn.getCommonDict('SYS_CODE_ORDER_ARREAR_STATUS', callBack);
|
931d27ec
Andy
unit
|
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
|
},
//获取支付类型
getPayType: function (callBack) {
fn.getCommonDict('SYS_CODE_PAY_TYPE', callBack);
},
//地磁状态获取
getEqpStateType: function (callBack) {
fn.getCommonDict('TP_P_EQP_IS_ONLINE', callBack);
},
//pda类型获取
getPdaType: function (callBack) {
fn.getCommonDict('SYS_CODE_PDA_TYPE', callBack);
},
//pda状态获取
getPdaStatus: function (callBack) {
fn.getCommonDict('SYS_CODE_PDA_STATUS', callBack);
},
|
e89f1648
Andy
unit
|
1113
|
//白名单匹配规则
|
931d27ec
Andy
unit
|
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
|
getMatchType: function (callBack) {
fn.getCommonDict('BILL_WHITE_LIST_MATCH_TYPE', callBack);
},
//白名单收费类型
getChargeType: function (callBack) {
fn.getCommonDict('BILL_WHITE_LIST_CHARGE_TYPE', callBack);
},
//根据字典表类型获取系统字典表公共参数,callBack为获取成功后的回调函数
getCommonDict: function (dictKind, callBack) {
var commonPrefix = 'sys_common_code_';
if (undefined == dictKind) {
|
e89f1648
Andy
unit
|
1125
1126
|
return null;
session
|
931d27ec
Andy
unit
|
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
|
}
var codeValue = sessionStorage.getItem(commonPrefix + dictKind);
if (codeValue && codeValue != null && codeValue.length > 0) {
callBack(JSON.parse(codeValue));
}
var req = {
sysCode: sysComm.sysCode,
sysCodeKind: dictKind
}
var opt = {
data: JSON.stringify(req),
method: "POST",
url: dataUrl.util.getSysCodeValueByKind(),
success: function (res) {
if (res.code == '8888') {
codeValue = JSON.stringify(res.data);
|
e89f1648
Andy
unit
|
1146
|
if (codeValue.length > 1) {
|
931d27ec
Andy
unit
|
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
|
sessionStorage.setItem(commonPrefix + dictKind, codeValue);
}
callBack(JSON.parse(codeValue));
}
}
}
sysAjax(opt);
},
//根据字典表类型获取系统字典表公共参数
//获取块信息
getParkBlock: function () {
var parkBlock = sessionStorage.getItem('sys_parkBlock');
if (parkBlock && parkBlock != null && parkBlock.length > 2) {
return JSON.parse(parkBlock);
}
var req = {sysCode: sysComm.sysCode};
var opt = {
async: false,
data: req,
method: "get",
url: dataUrl.util.getParkBlockNamesByUserId(),
success: function (res) {
if (res.code == '8888') {
parkBlock = JSON.stringify(res.data);
sessionStorage.setItem('sys_parkBlock', parkBlock);
}
}
}
sysAjax(opt);
return JSON.parse(parkBlock);
},
//清除停车场缓存
|
e89f1648
Andy
unit
|
1180
|
removeParkLotCache: function () {
|
931d27ec
Andy
unit
|
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
|
sessionStorage.removeItem('sys_parkLot');
},
//获取停车场
getParkLot: function () {
var parkLot = sessionStorage.getItem('sys_parkLot');
if (parkLot && parkLot != null && parkLot.length > 2) {
return JSON.parse(parkLot);
}
var req = {sysCode: sysComm.sysCode};
var opt = {
async: false,
data: req,
method: "get",
url: dataUrl.util.getParkLotNamesByUserId(),
success: function (res) {
if (res.code == '8888') {
|
e89f1648
Andy
unit
|
1198
|
if (parkLot == null || parkLot.length == 0) {
|
931d27ec
Andy
unit
|
1199
|
parkLot = [{
|
e89f1648
Andy
unit
|
1200
1201
1202
|
code: "-9999",
name: "无关联停车场",
type: "-9"
|
931d27ec
Andy
unit
|
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
|
}]
}
parkLot = JSON.stringify(res.data);
sessionStorage.setItem('sys_parkLot', parkLot);
}
}
}
sysAjax(opt);
return JSON.parse(parkLot);
},
//获取厂家信息
|
e89f1648
Andy
unit
|
1215
|
getFactoryInfo: function (callBack) {
|
931d27ec
Andy
unit
|
1216
1217
1218
1219
|
var factoryInfo = sessionStorage.getItem("factory_info");
if (factoryInfo && factoryInfo != null && factoryInfo.length > 2) {
factoryInfo = JSON.parse(factoryInfo)
callBack(factoryInfo);
|
e89f1648
Andy
unit
|
1220
|
} else {
|
931d27ec
Andy
unit
|
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
|
var req = {sysCode: sysComm.sysCode};
var opt = {
data: JSON.stringify(req),
method: "post",
url: dataUrl.util.queryFactoryInfoForList(),
success: function (res) {
if (res.code == '8888') {
factoryInfo = res.data;
sessionStorage.setItem('factory_info', JSON.stringify(factoryInfo));
callBack(factoryInfo);
}
}
}
sysAjax(opt);
}
},
//获取普通API鉴权token
getToken: function () {
var token = sessionStorage.getItem("token");
if (StrUtil.isEmpty(token)) {
token = '';
}
return token;
},
//设置普通API鉴权token
setToken: function (token) {
sessionStorage.setItem("token", token);
},
getUserAccount: function () {
return sessionStorage.getItem("userAccount");
},
setUserAccount: function (userAccount) {
sessionStorage.setItem("userAccount", userAccount);
},
getUserName: function () {
return sessionStorage.getItem("userName");
},
setUserName: function (userName) {
sessionStorage.setItem("userName", userName);
},
getOpImgPath: function () {
return sessionStorage.getItem("imgPath");
},
setOpImgPath: function (imgPath) {
sessionStorage.setItem("imgPath", imgPath);
},
getUserId: function () {
return sessionStorage.getItem("userId");
},
setUserId: function (userId) {
sessionStorage.setItem("userId", userId);
},
//跳转到登录界面
toLoginPage: function () {
sessionStorage.setItem("sys_parkLot", '');
window.location.href = 'login.html'
},
//登出系统
loginOut: function () {
sessionStorage.clear()
var token = fn.getToken();
fn.setToken('');
if (StrUtil.isNotEmpty()) {
var req = {'token': token, 'url': dataUrl.util.getLoginOut()}
sysAjax(req);
}
fn.toLoginPage();
}
}
DateUtil = {
dataFormat: function (longTime, formatStr) {
//格式化时间
//longTime 要进行格式化的long类型的时间
//formatStr 要格式化成的字符串类型
var data = new Date(longTime);
return data.Format(formatStr);
},
isLongTime: function (longTime) {
//判断是否是longTime时间类型
}
}
//cookie操作工具类
CkUtil = {
//获取cookie
getCookie: function (name) {
var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
if (arr = document.cookie.match(reg))
return unescape(arr[2]);
else
return null;
},
//删除cookie
delCookie: function (name) {
var exp = new Date();
exp.setTime(exp.getTime() - 1);
var cval = CkUtil.getCookie(name);
if (cval != null)
document.cookie = name + "=" + cval + ";expires=" + exp.toUTCString();
},
//设置cookie,time单位毫秒
setCookie: function (name, value, time) {
var exp = new Date();
exp.setTime(exp.getTime() + time);
document.cookie = name + "=" + escape(value) + ";expires=" + exp.toUTCString();
},
//获取毫秒数 1s的毫秒数为 getSec('s1') 1小时为 getSec('h1')
getSec: function (str) {
var str1 = str.substring(1, str.length) * 1;
var str2 = str.substring(0, 1);
if (str2 == "s") {
return str1 * 1000;
}
else if (str2 == "h") {
return str1 * 60 * 60 * 1000;
}
else if (str2 == "d") {
return str1 * 24 * 60 * 60 * 1000;
}
}
}
ArrayUtils = {
/**判断属性是否已经在数组中存在*/
|
e89f1648
Andy
unit
|
1351
|
contains: function (array, obj) {
|
931d27ec
Andy
unit
|
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
|
var i = array.length;
while (i--) {
if (array[i] === obj) {
return true;
}
}
return false;
}
}
StrUtil = {
isEmpty: function (str) {
if (str == undefined || null == str || StrUtil.trim(str).length == 0) {
return true;
}
return false;
},
isNotEmpty: function (str) {
return !StrUtil.isEmpty(str);
},
trim: function (str) {
//删除左右两端的空格
return str.replace(/(^\s*)|(\s*$)/g, "");
},
ltrim: function (str) {
//删除左边的空格
return str.replace(/(^\s*)/g, "");
},
rtrim: function (str) {
//删除右边的空格
return str.replace(/(\s*$)/g, "");
}
}
// 对Date的扩展,将 Date 转化为指定格式的String
// 月(M)、日(d)、小时(h)、分(m)、秒(s)、季度(q) 可以用 1-2 个占位符,
// 年(y)可以用 1-4 个占位符,毫秒(S)只能用 1 个占位符(是 1-3 位的数字)
// 例子:
// (new Date()).Format("yyyy-MM-dd hh:mm:ss.S") ==> 2006-07-02 08:09:04.423
// (new Date()).Format("yyyy-M-d h:m:s.S") ==> 2006-7-2 8:9:4.18
Date.prototype.Format = function (fmt) { //author: meizz
var o = {
"M+": this.getMonth() + 1, //月份
"d+": this.getDate(), //日
"h+": this.getHours(), //小时
"m+": this.getMinutes(), //分
"s+": this.getSeconds(), //秒
"q+": Math.floor((this.getMonth() + 3) / 3), //季度
"S": this.getMilliseconds() //毫秒
};
if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
for (var k in o)
if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
return fmt;
}
|
931d27ec
Andy
unit
|
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
|
//公用接口调用
function sysAjax(opts) {
//一.设置默认参数
var defaults = {
method: 'GET',
url: '',
dataType: 'json',
data: '',
async: true,
cache: false,
contentType: 'application/json; charset=utf-8',
success: function () {
},
error: function () {
}
};
//二.用户参数覆盖默认参数
for (var key in opts) {
defaults[key] = opts[key];
}
// console.log("请求相关参数:");
// console.log(defaults)
$.ajax({
type: defaults.method,
url: defaults.url,
dataType: defaults.dataType,
contentType: defaults.contentType,
data: defaults.data,
async: defaults.async,
beforeSend: function (xhr) {
//设置请求头
//xhr.setRequestHeader("User-Agent", "headertest");
//console.log(JSON.stringify(sysComm));
xhr.setRequestHeader("x-auth-token", fn.getToken());
},
success: function (res, status, xhr) {
//console.log('获取header:'+xhr.getAllResponseHeaders());
// console.log("服务器响应信息:");
// console.log(res)
var msg = (typeof res.msg == 'string') && (res.msg.constructor == String) ? res.msg : res.errMsg;
//成功
if (res.code == "2003") {
//授权令牌不存在或已失效,请重新登录后在尝试
window.location.href = 'login.html'
} else if (res.code == "2004") {
//授权令牌不合法,请重新登录收尝试
//alert(res.msg);
window.location.href = 'login.html'
} else if (res.code == "2005") {
//无此权限
alert(msg);
} else {
defaults.success(res, status, xhr);
}
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
if (textStatus == "timeout") {
//alert('请求超时,请重试');
} else {
//alert("请求报错")
console.log(errorThrown);
}
}
});
}
function ajaxCommon(opts) {
//一.设置默认参数
var defaults = {
method: 'GET',
url: '',
data: '',
async: true,
cache: false,
contentType: 'application/json; charset=utf-8',
beforeSend: function (xhr) {
//设置请求头
//xhr.setRequestHeader("User-Agent", "headertest");
//console.log(JSON.stringify(sysComm));
xhr.setRequestHeader("x-auth-token", fn.getToken());
},
success: function () {
},
error: function () {
}
};
//二.用户参数覆盖默认参数
for (var key in opts) {
defaults[key] = opts[key];
}
defaults.method = defaults.method.toUpperCase(); //处理 method
//三.对数据进行处理
//如果数据是对象,并且 方法为 get方法时,将data拼接到url后面
if (typeof defaults.data === 'object' && defaults.method === 'GET') { //处理 data
var str = '';
for (var key in defaults.data) {
str += key + '=' + defaults.data[key] + '&';
}
defaults.data = str.substring(0, str.length - 1);
}
defaults.cache = defaults.cache ? '' : '&' + new Date().getTime();//处理 cache
if (defaults.method === 'GET' && (defaults.data || defaults.cache)) defaults.url += '?' + defaults.data + defaults.cache; //处理 url
//四.开始编写ajax
//1.创建ajax对象
var oXhr = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP');
//2.和服务器建立联系,告诉服务器你要取什么文件
oXhr.open(defaults.method, defaults.url, defaults.async);
//3.发送请求
if (defaults.method === 'GET')
oXhr.send(null);
else {
oXhr.setRequestHeader("Content-type", defaults.contentType);
oXhr.send(defaults.data);
}
//4.等待服务器回应
oXhr.onreadystatechange = function () {
if (oXhr.readyState === 4) {
if (oXhr.status === 200)
defaults.success.call(oXhr, oXhr.responseText);
else {
defaults.error();
}
}
};
}
|