system-clients 3.2.4 → 3.2.5-aodeToV4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +16 -16
- package/.gradle/7.1/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/.gradle/7.1/executionHistory/executionHistory.bin +0 -0
- package/.gradle/7.1/executionHistory/executionHistory.lock +0 -0
- package/.gradle/7.1/fileHashes/fileHashes.bin +0 -0
- package/.gradle/7.1/fileHashes/fileHashes.lock +0 -0
- package/.gradle/7.1/gc.properties +0 -0
- package/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/.gradle/buildOutputCleanup/cache.properties +2 -2
- package/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
- package/.gradle/checksums/checksums.lock +0 -0
- package/.gradle/vcs-1/gc.properties +0 -0
- package/SystemClient.iml +11 -11
- package/build/webpack.base.conf.js +78 -75
- package/build.gradle +6 -6
- package/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/gradle/wrapper/gradle-wrapper.properties +5 -0
- package/gradlew +185 -0
- package/gradlew.bat +89 -0
- package/index.html +21 -21
- package/package.json +2 -2
- package/src/App.vue +24 -24
- package/src/LodopFuncs.js +123 -123
- package/src/components/Main.vue +515 -621
- package/src/components/Util.js +343 -343
- package/src/components/equipment/EquipmentManage.vue +65 -65
- package/src/components/equipment/PcAdd.vue +105 -105
- package/src/components/equipment/PcList.vue +120 -119
- package/src/components/equipment/PcManage.vue +60 -60
- package/src/components/equipment/PhoneAdd.vue +94 -94
- package/src/components/equipment/PhoneList.vue +102 -102
- package/src/components/equipment/PhoneManage.vue +60 -60
- package/src/components/equipment/PosAdd.vue +156 -137
- package/src/components/equipment/PosList.vue +164 -164
- package/src/components/equipment/PosManage.vue +68 -67
- package/src/components/materialManage/materialData.vue +44 -44
- package/src/components/materialManage/materialList.vue +255 -255
- package/src/components/parammanage/ParamManage.vue +42 -42
- package/src/components/parammanage/ParamPage.vue +314 -314
- package/src/components/parammanage/ParamPages.vue +222 -222
- package/src/components/parammanage/SinglePage.vue +235 -235
- package/src/components/parammanage/SinglePages.vue +167 -167
- package/src/components/server/AddChangeMsg.vue +66 -66
- package/src/components/server/ChangeDeclare.vue +45 -45
- package/src/components/server/LeftTree.vue +111 -111
- package/src/components/server/LoadData.vue +36 -36
- package/src/components/server/Login.vue +630 -529
- package/src/components/server/Menu.vue +188 -188
- package/src/components/server/ModifyPw.vue +112 -106
- package/src/components/server/NewResSelectGroup.vue +211 -0
- package/src/components/server/ResSelect.vue +153 -150
- package/src/components/server/ResSelectGroup.vue +159 -142
- package/src/components/server/RightTree.vue +343 -263
- package/src/components/server/RoleSelector.vue +90 -89
- package/src/components/server/TestResSelect.vue +58 -58
- package/src/components/server/TestResSelectGroup.vue +388 -388
- package/src/plugins/EncryptUtil.js +53 -0
- package/src/plugins/GetLoginInfoService.js +499 -515
- package/src/plugins/HeatGetLoginInfoService.js +491 -0
- package/src/plugins/validation.js +7 -7
- package/src/project/State.js +17 -17
- package/src/stores/AppData.js +38 -38
- package/src/stores/HeatAppData.js +38 -0
- package/src/styles/fonts/PINGFANG LIGHT.TTF +0 -0
- package/src/styles/fonts/PingFangSC-Regular.ttf +0 -0
- package/src/styles/fonts/glyphicons-halflings-regular.eot +0 -0
- package/src/styles/fonts/glyphicons-halflings-regular.svg +288 -0
- package/src/styles/fonts/glyphicons-halflings-regular.ttf +0 -0
- package/src/styles/fonts/glyphicons-halflings-regular.woff +0 -0
- package/src/styles/fonts/glyphicons-halflings-regular.woff2 +0 -0
- package/src/styles/fonts/pingfang-bold.ttf +0 -0
- package/src/styles/fonts/pingfang-medium.ttf +0 -0
- package/src/styles/fonts/pingfang-regular.ttf +0 -0
- package/src/styles/fonts/trendstrends.ttf +0 -0
- package/src/styles/fonts//346/261/211/344/273/252/350/217/261/345/277/203/344/275/223/347/256/200.ttf +0 -0
- package/src/styles/less/.csscomb.json +304 -0
- package/src/styles/less/.csslintrc +19 -0
- package/src/styles/less/alerts.less +73 -0
- package/src/styles/less/aofeng/animate.min.css +11 -0
- package/src/styles/less/aofeng/expandcss.less +569 -0
- package/src/styles/less/aofeng/standard.less +2121 -0
- package/src/styles/less/aofeng/themeOne/BinaryTemplate.less +686 -0
- package/src/styles/less/aofeng/themeOne/loginStyle.less +1586 -0
- package/src/styles/less/aofeng/themeOne/systemStyle.less +2650 -0
- package/src/styles/less/aofeng/themeOne.less +17 -0
- package/src/styles/less/aofeng/themeTwo/newStyle1.less +415 -0
- package/src/styles/less/aofeng/themeTwo.less +3 -0
- package/src/styles/less/badges.less +66 -0
- package/src/styles/less/bootstrap.less +66 -0
- package/src/styles/less/breadcrumbs.less +26 -0
- package/src/styles/less/button-groups.less +247 -0
- package/src/styles/less/buttons.less +172 -0
- package/src/styles/less/carousel.less +269 -0
- package/src/styles/less/close.less +34 -0
- package/src/styles/less/code.less +69 -0
- package/src/styles/less/component-animations.less +33 -0
- package/src/styles/less/dropdowns.less +216 -0
- package/src/styles/less/fonts-list.less +25 -0
- package/src/styles/less/forms.less +626 -0
- package/src/styles/less/glyphicons.less +305 -0
- package/src/styles/less/grid.less +84 -0
- package/src/styles/less/input-groups.less +167 -0
- package/src/styles/less/jumbotron.less +52 -0
- package/src/styles/less/labels.less +64 -0
- package/src/styles/less/list-group.less +141 -0
- package/src/styles/less/manageStyle/manageChile.less +180 -0
- package/src/styles/less/manageStyle/manageStyle.less +1102 -0
- package/src/styles/less/manageStyle/safeStyle.less +498 -0
- package/src/styles/less/media.less +66 -0
- package/src/styles/less/mixins/alerts.less +14 -0
- package/src/styles/less/mixins/background-variant.less +9 -0
- package/src/styles/less/mixins/border-radius.less +18 -0
- package/src/styles/less/mixins/buttons.less +69 -0
- package/src/styles/less/mixins/center-block.less +7 -0
- package/src/styles/less/mixins/clearfix.less +22 -0
- package/src/styles/less/mixins/forms.less +90 -0
- package/src/styles/less/mixins/gradients.less +59 -0
- package/src/styles/less/mixins/grid-framework.less +92 -0
- package/src/styles/less/mixins/grid.less +122 -0
- package/src/styles/less/mixins/hide-text.less +21 -0
- package/src/styles/less/mixins/image.less +33 -0
- package/src/styles/less/mixins/labels.less +12 -0
- package/src/styles/less/mixins/list-group.less +30 -0
- package/src/styles/less/mixins/nav-divider.less +10 -0
- package/src/styles/less/mixins/nav-vertical-align.less +9 -0
- package/src/styles/less/mixins/opacity.less +8 -0
- package/src/styles/less/mixins/pagination.less +24 -0
- package/src/styles/less/mixins/panels.less +24 -0
- package/src/styles/less/mixins/progress-bar.less +10 -0
- package/src/styles/less/mixins/reset-filter.less +8 -0
- package/src/styles/less/mixins/reset-text.less +18 -0
- package/src/styles/less/mixins/resize.less +6 -0
- package/src/styles/less/mixins/responsive-visibility.less +15 -0
- package/src/styles/less/mixins/size.less +10 -0
- package/src/styles/less/mixins/tab-focus.less +9 -0
- package/src/styles/less/mixins/table-row.less +44 -0
- package/src/styles/less/mixins/text-emphasis.less +9 -0
- package/src/styles/less/mixins/text-overflow.less +8 -0
- package/src/styles/less/mixins/vendor-prefixes.less +227 -0
- package/src/styles/less/mixins.less +40 -0
- package/src/styles/less/modals.less +151 -0
- package/src/styles/less/navbar.less +660 -0
- package/src/styles/less/navs.less +285 -0
- package/src/styles/less/normalize.less +424 -0
- package/src/styles/less/pager.less +76 -0
- package/src/styles/less/pagination.less +89 -0
- package/src/styles/less/panels.less +275 -0
- package/src/styles/less/popovers.less +131 -0
- package/src/styles/less/print.less +101 -0
- package/src/styles/less/progress-bars.less +87 -0
- package/src/styles/less/responsive-embed.less +35 -0
- package/src/styles/less/responsive-utilities.less +194 -0
- package/src/styles/less/scaffolding.less +161 -0
- package/src/styles/less/stand.less +207 -0
- package/src/styles/less/tables.less +262 -0
- package/src/styles/less/theme.less +291 -0
- package/src/styles/less/thumbnails.less +36 -0
- package/src/styles/less/tooltip.less +102 -0
- package/src/styles/less/type.less +303 -0
- package/src/styles/less/utilities.less +55 -0
- package/src/styles/less/variables.less +896 -0
- package/src/styles/less/wells.less +29 -0
- package/src/system.js +85 -76
- package/static/aodelogo.png +0 -0
- package/static/aodenewlogo.png +0 -0
- package/static/ewmlogo.png +0 -0
- package/.gradle/3.5.1/taskHistory/taskHistory.lock +0 -0
- package/.gradle/buildOutputCleanup/cache.properties.lock +0 -1
- /package/.gradle/{buildOutputCleanup/built.bin → 7.1/dependencies-accessors/gc.properties} +0 -0
- /package/.gradle/{3.5.1/file-changes → 7.1/fileChanges}/last-build.bin +0 -0
@@ -1,515 +1,499 @@
|
|
1
|
-
import Vue from 'vue'
|
2
|
-
import
|
3
|
-
|
4
|
-
|
5
|
-
let
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
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
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
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
|
-
Vue.$login.
|
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
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
let
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
let
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
let
|
254
|
-
let
|
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
|
-
|
291
|
-
|
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
|
-
} else {
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
//
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
} else if (
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
element
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
}
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
return
|
388
|
-
},
|
389
|
-
|
390
|
-
|
391
|
-
// 求取当前时间的工具
|
392
|
-
let
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
let
|
397
|
-
let
|
398
|
-
let
|
399
|
-
|
400
|
-
let
|
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
|
-
if (
|
432
|
-
return
|
433
|
-
}
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
let
|
445
|
-
let
|
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
|
-
let
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
} else if (month < timeDiff && timeDiff <= year) {
|
501
|
-
des = `${Math.floor(timeDiff / month)}个月前`
|
502
|
-
} else if (year < timeDiff) {
|
503
|
-
des = `${Math.floor(timeDiff / year)}年前`
|
504
|
-
}
|
505
|
-
return des
|
506
|
-
},
|
507
|
-
|
508
|
-
nextMonth20 (date) {
|
509
|
-
let ds = date.split('-')
|
510
|
-
let nextMonth = ds[1] - 0 + 1
|
511
|
-
return ds[0] + '-' + (nextMonth < 10 ? '0' + nextMonth : nextMonth) + '-20 00:00:00'
|
512
|
-
}
|
513
|
-
}
|
514
|
-
|
515
|
-
export default GetLoginInfoService
|
1
|
+
import Vue from 'vue'
|
2
|
+
import {HttpResetClass} from 'vue-client'
|
3
|
+
|
4
|
+
let loginGen = async function (username, password, cue) {
|
5
|
+
let data = {username, password,resourceName:'客服系统'}
|
6
|
+
const getLogin = await Vue.resetpost('/api/af-auth/login', data,
|
7
|
+
{resolveMsg: null, rejectMsg: null,headerConfig:{'Content-type': "application/json"}
|
8
|
+
})
|
9
|
+
if (getLogin.data) {
|
10
|
+
//获取jwt
|
11
|
+
if (getLogin.data.resources.data && getLogin.data.resources.data.id){
|
12
|
+
Vue.$login.jwt = getLogin.data.resources.data.id
|
13
|
+
Vue.$login.f = getLogin.data.resources.data
|
14
|
+
}else {
|
15
|
+
Vue.$login.jwt = getLogin.data.resources.id
|
16
|
+
Vue.$login.f = getLogin.data.resources
|
17
|
+
}
|
18
|
+
Vue.$login.jwtNew = getLogin.data.access_token
|
19
|
+
// 把登录用户添加到cookie里
|
20
|
+
Vue.cookie.set('loginId', Vue.$login.f.id)
|
21
|
+
try {
|
22
|
+
//获取有权限的功能树
|
23
|
+
let hasRight = await Vue.resetpost(`/rs/search`, {
|
24
|
+
source: "tool.getFullTree(this.getRights().where(row.getType() == $function$))",
|
25
|
+
userid: Vue.$login.f.id
|
26
|
+
}, { resolveMsg: null, rejectMsg: null })
|
27
|
+
//准备替换功能树
|
28
|
+
var fun=[]
|
29
|
+
hasRight.data[0].children[0].children.forEach((item) => {
|
30
|
+
if(item.name=='客服系统'){
|
31
|
+
item.children.forEach((item1) => {
|
32
|
+
fun.push(item1)
|
33
|
+
})
|
34
|
+
}
|
35
|
+
})
|
36
|
+
Vue.$login.f.functions=fun
|
37
|
+
}catch (error) {
|
38
|
+
}
|
39
|
+
if (Vue.$login.f.id !== '11') {
|
40
|
+
try {
|
41
|
+
let getAllArea = await Vue.resetpost('/rs/search', {
|
42
|
+
source: 'this.getParentByType($organization$).getChildByName($片区$).getChildren()',
|
43
|
+
userid: Vue.$login.f.id
|
44
|
+
}, {resolveMsg: null, rejectMsg: null})
|
45
|
+
|
46
|
+
let areaTemp = []
|
47
|
+
for (let i = 0; i < getAllArea.data.length; i++) {
|
48
|
+
areaTemp.push({label: getAllArea.data[i].name, value: getAllArea.data[i]})
|
49
|
+
}
|
50
|
+
Vue.$login.f.f_allArea = areaTemp
|
51
|
+
}catch (error) {
|
52
|
+
Vue.$login.f.f_allArea =[]
|
53
|
+
console.log('获取区县',error)
|
54
|
+
}
|
55
|
+
// 获取抄表员
|
56
|
+
try {
|
57
|
+
let getGasman = await Vue.resetpost('/rs/search', {
|
58
|
+
source: 'this.getParentByType($organization$).getChildByName($抄表员$).getUsers()',
|
59
|
+
userid: Vue.$login.f.id
|
60
|
+
}, {resolveMsg: null, rejectMsg: null})
|
61
|
+
let gasman = []
|
62
|
+
for (let i = 0; i < getGasman.data.length; i++) {
|
63
|
+
gasman.push(getGasman.data[i])
|
64
|
+
}
|
65
|
+
Vue.$login.f.f_gasman = gasman
|
66
|
+
}catch (error) {
|
67
|
+
Vue.$login.f.f_gasman = []
|
68
|
+
console.log('抄表员模块',error)
|
69
|
+
}
|
70
|
+
// // 获取安装人
|
71
|
+
// try {
|
72
|
+
// let getInstallman = await Vue.resetpost('/rs/search', {
|
73
|
+
// source: 'this.getParentByType($organization$).getChildByName($安装员$).getUsers()',
|
74
|
+
// userid: Vue.$login.f.id
|
75
|
+
// }, {resolveMsg: null, rejectMsg: null})
|
76
|
+
// console.log('获取安装员', getInstallman)
|
77
|
+
// let installman = []
|
78
|
+
// for (let i = 0; i < getInstallman.data.length; i++) {
|
79
|
+
// installman.push(getInstallman.data[i])
|
80
|
+
// }
|
81
|
+
// Vue.$login.f.f_installman = installman
|
82
|
+
// }catch (error) {
|
83
|
+
// Vue.$login.f.f_installman =[]
|
84
|
+
// console.log('安装人模块',error)
|
85
|
+
// }
|
86
|
+
// 获取换表员
|
87
|
+
// try {
|
88
|
+
// let getChangeMeterman = await Vue.resetpost('/rs/search', {
|
89
|
+
// source: 'this.getParentByType($organization$).getChildByName($换表员$).getUsers()',
|
90
|
+
// userid: Vue.$login.f.id
|
91
|
+
// }, {resolveMsg: null, rejectMsg: null})
|
92
|
+
// let changemeterman = []
|
93
|
+
// for (let i = 0; i < getChangeMeterman.data.length; i++) {
|
94
|
+
// changemeterman.push(getChangeMeterman.data[i])
|
95
|
+
// }
|
96
|
+
// Vue.$login.f.f_changemeterman = changemeterman
|
97
|
+
// }catch (error) {
|
98
|
+
// Vue.$login.f.f_changemeterman = []
|
99
|
+
// console.log('换表员模块',error)
|
100
|
+
// }
|
101
|
+
// 获取资源服务权限
|
102
|
+
try {
|
103
|
+
let getLic = await Vue.resetpost('/rs/search', {data: {
|
104
|
+
source: 'this.getRights().where(row.getType()==$function$ && row.getPath($name$).indexOf($资源操作$) != -1)',
|
105
|
+
userid: Vue.$login.f.id
|
106
|
+
}}, {resolveMsg: null, rejectMsg: null})
|
107
|
+
let arry=[]
|
108
|
+
getLic.data.forEach((item) => {
|
109
|
+
arry.push(item.name)
|
110
|
+
})
|
111
|
+
Vue.$login.f.lics=arry
|
112
|
+
}catch (error) {
|
113
|
+
Vue.$login.f.f_gasman = []
|
114
|
+
console.log('资源服务权限',error)
|
115
|
+
}
|
116
|
+
// // 票据使用人
|
117
|
+
// try {
|
118
|
+
// let getPaperUseman = await Vue.resetpost('/rs/search', {
|
119
|
+
// source: 'this.getParentByType($organization$).getChildByName($票据使用人$).getUsers()',
|
120
|
+
// userid: Vue.$login.f.id
|
121
|
+
// }, {resolveMsg: null, rejectMsg: null})
|
122
|
+
// let perperuseman = []
|
123
|
+
// for (let i = 0; i < getPaperUseman.data.length; i++) {
|
124
|
+
// perperuseman.push(getPaperUseman.data[i])
|
125
|
+
// }
|
126
|
+
// Vue.$login.f.f_paperUseman = perperuseman
|
127
|
+
// }catch (error) {
|
128
|
+
// Vue.$login.f.f_paperUseman = []
|
129
|
+
// console.log('票据使用人模块',error)
|
130
|
+
//
|
131
|
+
// }
|
132
|
+
// // 票据分配人
|
133
|
+
// try {
|
134
|
+
// let getPaperAllotman = await Vue.resetpost('/rs/search', {
|
135
|
+
// source: 'this.getParentByType($organization$).getChildByName($票据分配人$).getUsers()',
|
136
|
+
// userid: Vue.$login.f.id
|
137
|
+
// }, {resolveMsg: null, rejectMsg: null})
|
138
|
+
// let paperallotman = []
|
139
|
+
// for (let i = 0; i < getPaperAllotman.data.length; i++) {
|
140
|
+
// paperallotman.push(getPaperAllotman.data[i])
|
141
|
+
// }
|
142
|
+
// Vue.$login.f.f_paperAllotman = paperallotman
|
143
|
+
// }catch (error) {
|
144
|
+
// Vue.$login.f.f_paperAllotman = []
|
145
|
+
// console.log('票据分配人模块',error)
|
146
|
+
// }
|
147
|
+
// TODO 处理界面细节
|
148
|
+
try {
|
149
|
+
let viewDetails = await Vue.resetpost('rs/search', {
|
150
|
+
source: 'this.getRights().where(row.getType()==$function$ && row.getPath($name$).indexOf($功能权限$) != -1)',
|
151
|
+
userid: Vue.$login.f.id
|
152
|
+
}, {resolveMsg: null, rejectMsg: null})
|
153
|
+
let r = viewDetails.data
|
154
|
+
Vue.$login.r = []
|
155
|
+
r.forEach(x => Vue.$login.r.push(x.name))
|
156
|
+
}catch (error) {
|
157
|
+
Vue.$login.r = []
|
158
|
+
console.log('加载模块失败',error)
|
159
|
+
}
|
160
|
+
// 调用登录后处理
|
161
|
+
for(let proc of Vue.$login.afterLogin) {
|
162
|
+
await proc(Vue.$login.f)
|
163
|
+
}
|
164
|
+
// 定时发送心跳
|
165
|
+
setInterval(()=> {
|
166
|
+
let http = new HttpResetClass()
|
167
|
+
//暂时不出现不出现异地登录校验
|
168
|
+
http.load('POST', `rs/user/access/${Vue.$login.f.id}`, {}, {resolveMsg: null, rejectMsg: null}).then((req) => {
|
169
|
+
if(req.data.status==710){
|
170
|
+
// Vue.showMessage(req.data.msg+",您将被强制退出系统", ['confirm']).then((res) => {
|
171
|
+
// if (res === 'confirm') {
|
172
|
+
// location.reload()
|
173
|
+
// }
|
174
|
+
// })
|
175
|
+
}
|
176
|
+
})
|
177
|
+
}, 2 * 60 * 1000)
|
178
|
+
}
|
179
|
+
|
180
|
+
} else {
|
181
|
+
let error = {status: 401, data: getLogin.data.states}
|
182
|
+
// 抛出错误
|
183
|
+
throw error
|
184
|
+
}
|
185
|
+
}
|
186
|
+
|
187
|
+
let GetLoginInfoService = {
|
188
|
+
// 登录后要处理的异步对象
|
189
|
+
afterLogin: [],
|
190
|
+
//验证码开关
|
191
|
+
Verification: true,
|
192
|
+
install (Vue, options) {
|
193
|
+
// 给vue增添对话框显示方法
|
194
|
+
Vue.$login = Vue.prototype.$login = GetLoginInfoService
|
195
|
+
},
|
196
|
+
|
197
|
+
f: {
|
198
|
+
|
199
|
+
},
|
200
|
+
|
201
|
+
/**
|
202
|
+
* 登录
|
203
|
+
* @param name
|
204
|
+
* @param password
|
205
|
+
*/
|
206
|
+
login (name, password) {
|
207
|
+
return loginGen(name, password)
|
208
|
+
},
|
209
|
+
|
210
|
+
convertToIn (val) {
|
211
|
+
let temp = ''
|
212
|
+
if (val instanceof Array) {
|
213
|
+
if (val.length >= 1) {
|
214
|
+
temp = '('
|
215
|
+
val.forEach((res) => {
|
216
|
+
temp += `'${res}',`
|
217
|
+
})
|
218
|
+
temp = temp.substr(0, temp.length - 1) + ')'
|
219
|
+
}
|
220
|
+
}
|
221
|
+
return temp
|
222
|
+
},
|
223
|
+
|
224
|
+
toStandardYearMonth () {
|
225
|
+
let dt = new Date()
|
226
|
+
let month = dt.getMonth() + 1
|
227
|
+
return dt.getFullYear() + '-' + (month < 10 ? '0' + month : month)
|
228
|
+
},
|
229
|
+
|
230
|
+
toStandardYearMonth1 () {
|
231
|
+
let dt = new Date()
|
232
|
+
let month = dt.getMonth() + 1
|
233
|
+
return dt.getFullYear() + (month < 10 ? '0' + month : month)
|
234
|
+
},
|
235
|
+
|
236
|
+
toStandardDateString () {
|
237
|
+
let dt = new Date()
|
238
|
+
let month = dt.getMonth() + 1
|
239
|
+
let date = dt.getDate()
|
240
|
+
return dt.getFullYear() + '-' + (month < 10 ? '0' + month : month) + '-' + (date < 10 ? '0' + date : date)
|
241
|
+
},
|
242
|
+
|
243
|
+
toStartAndEndDateString () {
|
244
|
+
let dt = new Date()
|
245
|
+
let month = dt.getMonth() + 1
|
246
|
+
// let date = dt.getDate()
|
247
|
+
return [dt.getFullYear() + '-' + (month < 10 ? '0' + month : month) + '-01',
|
248
|
+
dt.getFullYear() + '-' + (month < 10 ? '0' + month : month) + '-' + (new Date(dt.getFullYear(), month, 0).getDate())]
|
249
|
+
// return dt.getFullYear() + '-' + (month < 10 ? '0' + month : month) + '-' + (date < 10 ? '0' + date : date)
|
250
|
+
},
|
251
|
+
|
252
|
+
toStandardTimeString () {
|
253
|
+
let dt = new Date()
|
254
|
+
let month = dt.getMonth() + 1
|
255
|
+
let date = dt.getDate()
|
256
|
+
let hour = dt.getHours()
|
257
|
+
let min = dt.getMinutes()
|
258
|
+
let sec = dt.getSeconds()
|
259
|
+
return dt.getFullYear() + '-' + (month < 10 ? '0' + month : month) + '-' + (date < 10 ? '0' + date : date) +
|
260
|
+
' ' + (hour < 10 ? '0' + hour : hour) + ':' + (min < 10 ? '0' + min : min) + ':' + (sec < 10 ? '0' + sec : sec)
|
261
|
+
},
|
262
|
+
|
263
|
+
guid () {
|
264
|
+
let buf = new Uint16Array(8)
|
265
|
+
window.crypto.getRandomValues(buf)
|
266
|
+
let S4 = function (num) {
|
267
|
+
let ret = num.toString(16)
|
268
|
+
while (ret.length < 4) {
|
269
|
+
ret = '0' + ret
|
270
|
+
}
|
271
|
+
return ret
|
272
|
+
}
|
273
|
+
return (S4(buf[0]) + S4(buf[1]) + S4(buf[2]) + S4(buf[3]) + S4(buf[4]) + S4(buf[5]) + S4(buf[6]) + S4(buf[7]))
|
274
|
+
},
|
275
|
+
|
276
|
+
choices (role, param, hasBlank = false, blankHint = '请选择') {
|
277
|
+
if (role == 'view') {
|
278
|
+
Vue.getParams(param, [null])
|
279
|
+
} else {
|
280
|
+
let result = []
|
281
|
+
if (hasBlank)
|
282
|
+
result.push({label: blankHint, value: null})
|
283
|
+
if (!Vue.param || !Vue.param[param])
|
284
|
+
result.push({label: '请在系统设置里更新参数', value: '请在系统设置里更新参数'})
|
285
|
+
else {
|
286
|
+
let p = Vue.param[param]
|
287
|
+
p.forEach(function (item) {
|
288
|
+
result.push({label: item.name, value: item.name})
|
289
|
+
})
|
290
|
+
}
|
291
|
+
return result
|
292
|
+
}
|
293
|
+
},
|
294
|
+
|
295
|
+
required (param) {
|
296
|
+
if (typeof param === 'number' && param == 0)
|
297
|
+
return false
|
298
|
+
if (!param)
|
299
|
+
return true
|
300
|
+
param = param + ''
|
301
|
+
param = param.trim()
|
302
|
+
if (!param)
|
303
|
+
return true
|
304
|
+
return false
|
305
|
+
},
|
306
|
+
|
307
|
+
isInt (n) {
|
308
|
+
return !window.isNaN(n) && n % 1 === 0
|
309
|
+
},
|
310
|
+
|
311
|
+
isFloat (n) {
|
312
|
+
return !window.isNaN(n)
|
313
|
+
},
|
314
|
+
|
315
|
+
// this will convert all true/false to boolean
|
316
|
+
booleanFilter (paper) {
|
317
|
+
for (let key in paper) {
|
318
|
+
if (!paper.hasOwnProperty(key))
|
319
|
+
continue
|
320
|
+
if (typeof paper[key] == 'object' && paper[key] != null) {
|
321
|
+
booleanFilter(paper[key])
|
322
|
+
} else {
|
323
|
+
if (paper[key] === 'true' || paper[key] == 'false')
|
324
|
+
paper[key] = (paper[key] === 'true')
|
325
|
+
}
|
326
|
+
}
|
327
|
+
},
|
328
|
+
// recursively traverse through each path
|
329
|
+
ratifyPics (paper) {
|
330
|
+
for (let key in paper) {
|
331
|
+
if (key.endsWith('_path')) {
|
332
|
+
if (!paper[key]) {
|
333
|
+
paper[key] = 'rs/db/file/nopic.png'
|
334
|
+
} else {
|
335
|
+
paper[key] = 'rs/db/file/' + paper[key]
|
336
|
+
}
|
337
|
+
} else if (paper[key] !== null && typeof (paper[key]) == 'object') {
|
338
|
+
ratifyPics(paper[key])
|
339
|
+
}
|
340
|
+
}
|
341
|
+
},
|
342
|
+
|
343
|
+
// load script and other stuff
|
344
|
+
loadscript (type, fileName) {
|
345
|
+
return new Promise((resolve, reject) => {
|
346
|
+
let element
|
347
|
+
if (type == 'css') {
|
348
|
+
element = document.createElement('link')
|
349
|
+
element.setAttribute('rel', 'stylesheet')
|
350
|
+
element.setAttribute('type', 'text/css')
|
351
|
+
element.setAttribute('href', fileName)
|
352
|
+
} else if (type == 'js') {
|
353
|
+
element = document.createElement('script')
|
354
|
+
element.setAttribute('type', 'text/javascript')
|
355
|
+
element.setAttribute('src', fileName)
|
356
|
+
}
|
357
|
+
if (element) {
|
358
|
+
element.setAttribute('async', '')
|
359
|
+
element.setAttribute('defer', '')
|
360
|
+
element.addEventListener('load', function () {
|
361
|
+
resolve(element)
|
362
|
+
}, false)
|
363
|
+
element.addEventListener('error', function () {
|
364
|
+
reject(element)
|
365
|
+
}, false)
|
366
|
+
document.body.appendChild(element)
|
367
|
+
}
|
368
|
+
})
|
369
|
+
},
|
370
|
+
// 不能选择器中截取掉多余的字符
|
371
|
+
orgName (name) {
|
372
|
+
return name.substring(10)
|
373
|
+
},
|
374
|
+
|
375
|
+
getNowDate (name) {
|
376
|
+
// 求取当前时间的工具
|
377
|
+
let myweekday = ''
|
378
|
+
let year = ''
|
379
|
+
let mydate = new Date()
|
380
|
+
myweekday = mydate.getDay()
|
381
|
+
let mymonth = mydate.getMonth() + 1
|
382
|
+
let myday = mydate.getDate()
|
383
|
+
let myyear = mydate.getYear()
|
384
|
+
year = (myyear > 200) ? myyear : 1900 + myyear
|
385
|
+
let week = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期日', '星期六']
|
386
|
+
// document.write("<font color=#ffffff>今天是 "+year+"年"+mymonth+"月"+myday+"日 "+weekday+"</font>");
|
387
|
+
return year + '年' + mymonth + '月' + myday + '日 ' + week[myweekday]
|
388
|
+
},
|
389
|
+
|
390
|
+
addDate (date, days) {
|
391
|
+
// 求取当前时间的工具
|
392
|
+
let endDate = new Date(date)
|
393
|
+
endDate = endDate.valueOf()
|
394
|
+
endDate = endDate + days * 24 * 60 * 60 * 1000
|
395
|
+
endDate = new Date(endDate)
|
396
|
+
let month = endDate.getMonth() + 1
|
397
|
+
let day = endDate.getDate()
|
398
|
+
let hour = endDate.getHours()
|
399
|
+
let min = endDate.getMinutes()
|
400
|
+
let sec = endDate.getSeconds()
|
401
|
+
return endDate.getFullYear() + '-' + (month < 10 ? '0' + month : month) + '-' + (day < 10 ? '0' + day : day) +
|
402
|
+
' ' + (hour < 10 ? '0' + hour : hour) + ':' + (min < 10 ? '0' + min : min) + ':' + (sec < 10 ? '0' + sec : sec)
|
403
|
+
// return a
|
404
|
+
},
|
405
|
+
|
406
|
+
// 通过地址栏的参数获取参数内容
|
407
|
+
getUrlParames (param) {
|
408
|
+
var query = window.location.search
|
409
|
+
var iLen = param.length
|
410
|
+
var iStart = query.indexOf(param)
|
411
|
+
if (iStart === -1) {
|
412
|
+
return ''
|
413
|
+
}
|
414
|
+
iStart += iLen + 1
|
415
|
+
var iEnd = query.indexOf('&', iStart)
|
416
|
+
if (iEnd === -1) {
|
417
|
+
return query.substring(iStart)
|
418
|
+
}
|
419
|
+
return query.substring(iStart, iEnd)
|
420
|
+
},
|
421
|
+
|
422
|
+
// 从地址栏获取加密的参数
|
423
|
+
getUrlCompileParames (param) {
|
424
|
+
let code = unescape(window.location.search.slice(1, window.location.search.length))
|
425
|
+
let query = String.fromCharCode(code.charCodeAt(0) - code.length)
|
426
|
+
for (var i = 1; i < code.length; i++) {
|
427
|
+
query += String.fromCharCode(code.charCodeAt(i) - query.charCodeAt(i - 1))
|
428
|
+
}
|
429
|
+
let iLen = param.length
|
430
|
+
let iStart = query.indexOf(param)
|
431
|
+
if (iStart === -1) {
|
432
|
+
return ''
|
433
|
+
}
|
434
|
+
iStart += iLen + 1
|
435
|
+
let iEnd = query.indexOf('&', iStart)
|
436
|
+
if (iEnd === -1) {
|
437
|
+
return query.substring(iStart)
|
438
|
+
}
|
439
|
+
return query.substring(iStart, iEnd)
|
440
|
+
},
|
441
|
+
|
442
|
+
// 对字符串进行加密
|
443
|
+
compileStr (code) {
|
444
|
+
let c = String.fromCharCode(code.charCodeAt(0) + code.length)
|
445
|
+
for (let i = 1; i < code.length; i++) {
|
446
|
+
c += String.fromCharCode(code.charCodeAt(i) + code.charCodeAt(i - 1))
|
447
|
+
}
|
448
|
+
return escape(c)
|
449
|
+
},
|
450
|
+
// 字符串进行解密
|
451
|
+
uncompileStr (code) {
|
452
|
+
code = unescape(code)
|
453
|
+
let c = String.fromCharCode(code.charCodeAt(0) - code.length)
|
454
|
+
for (var i = 1; i < code.length; i++) {
|
455
|
+
c += String.fromCharCode(code.charCodeAt(i) - c.charCodeAt(i - 1))
|
456
|
+
}
|
457
|
+
return c
|
458
|
+
},
|
459
|
+
|
460
|
+
dateDescripte (date) {
|
461
|
+
let nowTime = new Date().getTime()
|
462
|
+
let oldTime = new Date(date).getTime()
|
463
|
+
let timeDiff = nowTime - oldTime
|
464
|
+
// 规则说明
|
465
|
+
// 小于等于2分钟为刚刚
|
466
|
+
// 大于2分钟小于等于1小时为取整的分钟前(例如:35分钟前)
|
467
|
+
// 大于1小时小于等于24小时为取整的小时前(例如:15小时前)
|
468
|
+
// 大于24小时小于等于30天为取整的天前(例如:12天前)
|
469
|
+
// 大于30天小于等于12月为取整的月前,月份统一为30天一月,不做额外处理(例如:3个月前)
|
470
|
+
// 大于365取整的年前,(例如:2年前)
|
471
|
+
let minute = 1000 * 60
|
472
|
+
let hour = minute * 60
|
473
|
+
let day = hour * 24
|
474
|
+
let month = day * 30
|
475
|
+
let year = month * 12
|
476
|
+
let des = ''
|
477
|
+
if (timeDiff <= minute * 2) {
|
478
|
+
des = '刚刚'
|
479
|
+
} else if (minute * 2 < timeDiff && timeDiff < hour) {
|
480
|
+
des = `${Math.floor(timeDiff / minute)}分钟前`
|
481
|
+
} else if (hour < timeDiff && timeDiff <= day) {
|
482
|
+
des = `${Math.floor(timeDiff / hour)}小时前`
|
483
|
+
} else if (day < timeDiff && timeDiff <= month) {
|
484
|
+
des = `${Math.floor(timeDiff / day)}天前`
|
485
|
+
} else if (month < timeDiff && timeDiff <= year) {
|
486
|
+
des = `${Math.floor(timeDiff / month)}个月前`
|
487
|
+
} else if (year < timeDiff) {
|
488
|
+
des = `${Math.floor(timeDiff / year)}年前`
|
489
|
+
}
|
490
|
+
return des
|
491
|
+
},
|
492
|
+
|
493
|
+
nextMonth20 (date) {
|
494
|
+
let ds = date.split('-')
|
495
|
+
let nextMonth = ds[1] - 0 + 1
|
496
|
+
return ds[0] + '-' + (nextMonth < 10 ? '0' + nextMonth : nextMonth) + '-20 00:00:00'
|
497
|
+
}
|
498
|
+
}
|
499
|
+
export default GetLoginInfoService
|