system-clients 3.2.6-rongcheng → 3.2.7-rongcheng
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/.gradle/3.5.1/file-changes/last-build.bin +0 -0
- package/.gradle/3.5.1/taskHistory/taskHistory.lock +0 -0
- package/package.json +1 -1
- package/src/components/server/Login.vue +638 -625
- package/src/components/server/ResSelectGroup.vue +198 -198
- package/src/plugins/GetLoginInfoService.js +515 -515
@@ -1,625 +1,638 @@
|
|
1
|
-
<template>
|
2
|
-
<div class="syslogin">
|
3
|
-
<div class="login-title" >
|
4
|
-
<div class="login-title-chi" style="white-space: nowrap">
|
5
|
-
<img src="../../../static/newStyle/login-info.png"/>
|
6
|
-
<span>关于我们</span>
|
7
|
-
<img src="../../../static/newStyle/login-con.png"/>
|
8
|
-
<span>联系我们</span>
|
9
|
-
</div>
|
10
|
-
</div>
|
11
|
-
<!--输入框-->
|
12
|
-
<div class="loginmain">
|
13
|
-
<!-- <img src="../../../static/login_title1.png" alt="图片加载未完成" class="img-responsive" style="margin: 0 auto; padding-top: 150px;" /> -->
|
14
|
-
<div class="loginmain-left">
|
15
|
-
<img class="loginmain-left-img" src="../../../static/newStyle/login-left.png">
|
16
|
-
</div>
|
17
|
-
<div class="loginmain-right">
|
18
|
-
|
19
|
-
<p @click="theme()" style="white-space: nowrap">燃气客服系统</p>
|
20
|
-
|
21
|
-
<form v-show="!login">
|
22
|
-
<!-- <input type="text" placeholder="用户名" v-model="model.ename" class="usericon">-->
|
23
|
-
<div class="login-input">
|
24
|
-
<img src="../../../static/newStyle/login-user.png"/>
|
25
|
-
<input type="text" style="display: inline;background-color: white!important;" placeholder="用户名" v-model="model.ename"/>
|
26
|
-
</div>
|
27
|
-
<div class="login-input">
|
28
|
-
<img src="../../../static/newStyle/login-pwd.png"/>
|
29
|
-
<input type="password" placeholder="密码" style="display: inline;background-color: darkgray;" v-model="model.password"
|
30
|
-
@keyup.enter="confirm('key')"/>
|
31
|
-
</div>
|
32
|
-
<div class="login-input-1">
|
33
|
-
<img src="../../../static/newStyle/login-check.png"/>
|
34
|
-
<input v-if="$login.Verification" class="login-check" type="text" placeholder="请输入验证码"
|
35
|
-
v-model="picLyanzhengma" @keyup.enter="confirm('key')"/>
|
36
|
-
</div>
|
37
|
-
<div class="login-input-2" >
|
38
|
-
<input v-if="$login.Verification" class="login-check-1" style="display: inline;background-color:#eeeeee !important;"
|
39
|
-
type="button" @click="createCode" v-model="checkCode"/>
|
40
|
-
</div>
|
41
|
-
<div class="login-bt">
|
42
|
-
<button type="button" id="login-button" class="login-button" @click.prevent="confirm('click')">登录</button>
|
43
|
-
</div>
|
44
|
-
<!-- <input type="password" placeholder="密码" v-model="model.password" class="psicon"-->
|
45
|
-
<!-- @keyup.enter="confirm('key')">-->
|
46
|
-
<!-- <input v-if="$login.Verification" styljiaoyane="width: 40%; display: inline" type="text" placeholder="请输入验证码"-->
|
47
|
-
<!-- v-model="picLyanzhengma" @keyup.enter="confirm('key')">-->
|
48
|
-
<!-- <input v-if="$login.Verification" style="width: 30%; display: inline;background-color: darkgray;"-->
|
49
|
-
<!-- type="button" @click="createCode" v-model="checkCode"/><br>-->
|
50
|
-
|
51
|
-
<!-- <button type="button" id="login-button" @click.prevent="confirm()"><strong>注册</strong></button> -->
|
52
|
-
<!-- <span @click="register()">还没有注册,现在注册>>></span> -->
|
53
|
-
</form>
|
54
|
-
<div v-show="login" class="login_load">
|
55
|
-
<img src="../../../static/newStyle/login-do.gif">
|
56
|
-
</div>
|
57
|
-
</div>
|
58
|
-
</div>
|
59
|
-
<div class="login-foot" v-show="false">
|
60
|
-
技术支持:西安奥枫软件有限公司
|
61
|
-
</div>
|
62
|
-
|
63
|
-
<modal v-if="depPromptShow" :show.sync="depPromptShow" :backdrop="false" v-ref:modal >
|
64
|
-
<header slot="modal-header" class="modal-header">
|
65
|
-
<h4 class="modal-title">登录信息</h4>
|
66
|
-
</header>
|
67
|
-
<article slot="modal-body" class="modal-body">
|
68
|
-
<form class="form-horizontal">
|
69
|
-
<div class="row">
|
70
|
-
<div class="col-sm-12 form-group">
|
71
|
-
<label class="col-sm-5 control-label">当前登录人</label>
|
72
|
-
<div class="col-sm-7">
|
73
|
-
<p class="form-control-static">{{$login.f.name}}</p>
|
74
|
-
</div>
|
75
|
-
</div>
|
76
|
-
<div class="col-sm-12 form-group">
|
77
|
-
<label class="col-sm-5 control-label">所在销售点</label>
|
78
|
-
<div class="col-sm-7">
|
79
|
-
<p class="form-control-static">{{$login.f.deps}}</p>
|
80
|
-
</div>
|
81
|
-
</div>
|
82
|
-
</div>
|
83
|
-
</form>
|
84
|
-
</article>
|
85
|
-
<footer slot="modal-footer" class="modal-footer">
|
86
|
-
<button class="button_search" @click="depPromptConfirm">确认</button>
|
87
|
-
<button class="button_clear" @click="depPromptCancel">取消</button>
|
88
|
-
</footer>
|
89
|
-
</modal>
|
90
|
-
</div>
|
91
|
-
|
92
|
-
</template>
|
93
|
-
|
94
|
-
<script>
|
95
|
-
import co from 'co'
|
96
|
-
import $ from 'jquery'
|
97
|
-
|
98
|
-
let saveGen = function *(self) {
|
99
|
-
try {
|
100
|
-
yield self.$login.login(self.model.ename, self.model.password)
|
101
|
-
yield self.$appdata.load()
|
102
|
-
|
103
|
-
yield self.$getConfig(self, 'Login')
|
104
|
-
console.log('登录配置', self.config)
|
105
|
-
if (self.config.isMac) {
|
106
|
-
// 获取该登录人分公司下的mac配置
|
107
|
-
let getMacs = yield self.$resetpost('rs/sql/equipmentQuery', {data: {condition: `f_filialeids like '%${self.$login.f.f_orgids}%'`}}, {
|
108
|
-
resolveMsg: null,
|
109
|
-
rejectMsg: null
|
110
|
-
}).catch(() => {
|
111
|
-
throw new Error('获取mac配置失败')
|
112
|
-
})
|
113
|
-
console.log('MAC地址信息', getMacs)
|
114
|
-
// 获取本地mac地址
|
115
|
-
let getLocalMac = yield self.$resetget('http://127.0.0.1:8003/loadmac', {
|
116
|
-
resolveMsg: null,
|
117
|
-
rejectMsg: null
|
118
|
-
}).catch(() => {
|
119
|
-
throw new Error('获取本地mac配置失败')
|
120
|
-
})
|
121
|
-
console.log('本地MAC地址信息', getLocalMac)
|
122
|
-
// 对Mac地址进行匹配
|
123
|
-
let macValidate = false
|
124
|
-
for (let i = 0; i < getLocalMac.data.mac.length; i++) {
|
125
|
-
for (let j = 0; j < getMacs.data.length; j++) {
|
126
|
-
if (getMacs.data[j].f_mac_number.toLocaleUpperCase() === getLocalMac.data.mac[i]) {
|
127
|
-
macValidate = true
|
128
|
-
}
|
129
|
-
}
|
130
|
-
}
|
131
|
-
if (!macValidate) {
|
132
|
-
throw new Error('Mac地址验证失败, 请联系管理员!!')
|
133
|
-
}
|
134
|
-
}
|
135
|
-
if (self.config.depPrompt) {
|
136
|
-
self.depPromptShow = true
|
137
|
-
} else {
|
138
|
-
self.$goto('home-page', {functions: self.$login.f})
|
139
|
-
}
|
140
|
-
|
141
|
-
} catch (ret) {
|
142
|
-
console.error('登录失败', ret)
|
143
|
-
let msg
|
144
|
-
if (ret instanceof Error) {
|
145
|
-
msg = ret
|
146
|
-
}
|
147
|
-
if (ret.status === 0) {
|
148
|
-
msg = '服务连接错误,请确认服务状态'
|
149
|
-
} else if (ret.status === 401) {
|
150
|
-
msg = ret.data
|
151
|
-
} else if (ret.status === 710) {
|
152
|
-
msg = ret.data
|
153
|
-
}
|
154
|
-
self.createCode()
|
155
|
-
self.picLyanzhengma = ''
|
156
|
-
yield self.$showMessage(msg)
|
157
|
-
self.model.ename = ''
|
158
|
-
self.model.password = ''
|
159
|
-
self.login = false
|
160
|
-
$('form').fadeIn(500)
|
161
|
-
}
|
162
|
-
}
|
163
|
-
export default {
|
164
|
-
title: '登录',
|
165
|
-
ready () {
|
166
|
-
if (this.$login && this.$login.getUrlCompileParames('name') && this.$login.getUrlCompileParames('password')) {
|
167
|
-
this.model.ename = this.$login.getUrlCompileParames('name')
|
168
|
-
this.model.password = this.$login.getUrlCompileParames('password')
|
169
|
-
this.$login.Verification = false
|
170
|
-
this.confirm()
|
171
|
-
}
|
172
|
-
$('#login-button').click(function (event) {
|
173
|
-
event.preventDefault()
|
174
|
-
$('form').fadeOut(500)
|
175
|
-
}),
|
176
|
-
this.
|
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
|
-
|
227
|
-
this.
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
this.
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
let
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
this.
|
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
|
-
font-weight: 300;
|
300
|
-
}
|
301
|
-
|
302
|
-
body
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
font-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
font-
|
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
|
-
margin:
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
}
|
358
|
-
|
359
|
-
.container
|
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
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
color:
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
background-
|
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
|
-
background-color:
|
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
|
-
.modifystyle
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
margin-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
}
|
557
|
-
|
558
|
-
.bg-bubbles li:nth-child(
|
559
|
-
left:
|
560
|
-
width:
|
561
|
-
height:
|
562
|
-
-webkit-animation-
|
563
|
-
animation-
|
564
|
-
background-color: rgba(255, 255, 255, 0.
|
565
|
-
}
|
566
|
-
|
567
|
-
.bg-bubbles li:nth-child(
|
568
|
-
left:
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
animation-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
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
|
-
|
1
|
+
<template>
|
2
|
+
<div class="syslogin">
|
3
|
+
<div class="login-title" >
|
4
|
+
<div class="login-title-chi" style="white-space: nowrap">
|
5
|
+
<img src="../../../static/newStyle/login-info.png"/>
|
6
|
+
<span>关于我们</span>
|
7
|
+
<img src="../../../static/newStyle/login-con.png"/>
|
8
|
+
<span>联系我们</span>
|
9
|
+
</div>
|
10
|
+
</div>
|
11
|
+
<!--输入框-->
|
12
|
+
<div class="loginmain">
|
13
|
+
<!-- <img src="../../../static/login_title1.png" alt="图片加载未完成" class="img-responsive" style="margin: 0 auto; padding-top: 150px;" /> -->
|
14
|
+
<div class="loginmain-left">
|
15
|
+
<img class="loginmain-left-img" src="../../../static/newStyle/login-left.png">
|
16
|
+
</div>
|
17
|
+
<div class="loginmain-right">
|
18
|
+
|
19
|
+
<p @click="theme()" style="white-space: nowrap">燃气客服系统</p>
|
20
|
+
|
21
|
+
<form v-show="!login">
|
22
|
+
<!-- <input type="text" placeholder="用户名" v-model="model.ename" class="usericon">-->
|
23
|
+
<div class="login-input">
|
24
|
+
<img src="../../../static/newStyle/login-user.png"/>
|
25
|
+
<input type="text" style="display: inline;background-color: white!important;" placeholder="用户名" v-model="model.ename"/>
|
26
|
+
</div>
|
27
|
+
<div class="login-input">
|
28
|
+
<img src="../../../static/newStyle/login-pwd.png"/>
|
29
|
+
<input type="password" placeholder="密码" style="display: inline;background-color: darkgray;" v-model="model.password"
|
30
|
+
@keyup.enter="confirm('key')"/>
|
31
|
+
</div>
|
32
|
+
<div class="login-input-1">
|
33
|
+
<img src="../../../static/newStyle/login-check.png"/>
|
34
|
+
<input v-if="$login.Verification" class="login-check" type="text" placeholder="请输入验证码"
|
35
|
+
v-model="picLyanzhengma" @keyup.enter="confirm('key')"/>
|
36
|
+
</div>
|
37
|
+
<div class="login-input-2" >
|
38
|
+
<input v-if="$login.Verification" class="login-check-1" style="display: inline;background-color:#eeeeee !important;"
|
39
|
+
type="button" @click="createCode" v-model="checkCode"/>
|
40
|
+
</div>
|
41
|
+
<div class="login-bt">
|
42
|
+
<button type="button" id="login-button" class="login-button" @click.prevent="confirm('click')">登录</button>
|
43
|
+
</div>
|
44
|
+
<!-- <input type="password" placeholder="密码" v-model="model.password" class="psicon"-->
|
45
|
+
<!-- @keyup.enter="confirm('key')">-->
|
46
|
+
<!-- <input v-if="$login.Verification" styljiaoyane="width: 40%; display: inline" type="text" placeholder="请输入验证码"-->
|
47
|
+
<!-- v-model="picLyanzhengma" @keyup.enter="confirm('key')">-->
|
48
|
+
<!-- <input v-if="$login.Verification" style="width: 30%; display: inline;background-color: darkgray;"-->
|
49
|
+
<!-- type="button" @click="createCode" v-model="checkCode"/><br>-->
|
50
|
+
|
51
|
+
<!-- <button type="button" id="login-button" @click.prevent="confirm()"><strong>注册</strong></button> -->
|
52
|
+
<!-- <span @click="register()">还没有注册,现在注册>>></span> -->
|
53
|
+
</form>
|
54
|
+
<div v-show="login" class="login_load">
|
55
|
+
<img src="../../../static/newStyle/login-do.gif">
|
56
|
+
</div>
|
57
|
+
</div>
|
58
|
+
</div>
|
59
|
+
<div class="login-foot" v-show="false">
|
60
|
+
技术支持:西安奥枫软件有限公司
|
61
|
+
</div>
|
62
|
+
|
63
|
+
<modal v-if="depPromptShow" :show.sync="depPromptShow" :backdrop="false" v-ref:modal >
|
64
|
+
<header slot="modal-header" class="modal-header">
|
65
|
+
<h4 class="modal-title">登录信息</h4>
|
66
|
+
</header>
|
67
|
+
<article slot="modal-body" class="modal-body">
|
68
|
+
<form class="form-horizontal">
|
69
|
+
<div class="row">
|
70
|
+
<div class="col-sm-12 form-group">
|
71
|
+
<label class="col-sm-5 control-label">当前登录人</label>
|
72
|
+
<div class="col-sm-7">
|
73
|
+
<p class="form-control-static">{{$login.f.name}}</p>
|
74
|
+
</div>
|
75
|
+
</div>
|
76
|
+
<div class="col-sm-12 form-group">
|
77
|
+
<label class="col-sm-5 control-label">所在销售点</label>
|
78
|
+
<div class="col-sm-7">
|
79
|
+
<p class="form-control-static">{{$login.f.deps}}</p>
|
80
|
+
</div>
|
81
|
+
</div>
|
82
|
+
</div>
|
83
|
+
</form>
|
84
|
+
</article>
|
85
|
+
<footer slot="modal-footer" class="modal-footer">
|
86
|
+
<button class="button_search" @click="depPromptConfirm">确认</button>
|
87
|
+
<button class="button_clear" @click="depPromptCancel">取消</button>
|
88
|
+
</footer>
|
89
|
+
</modal>
|
90
|
+
</div>
|
91
|
+
|
92
|
+
</template>
|
93
|
+
|
94
|
+
<script>
|
95
|
+
import co from 'co'
|
96
|
+
import $ from 'jquery'
|
97
|
+
|
98
|
+
let saveGen = function *(self) {
|
99
|
+
try {
|
100
|
+
yield self.$login.login(self.model.ename, self.model.password,self.uuid,self.checkCode)
|
101
|
+
yield self.$appdata.load()
|
102
|
+
|
103
|
+
yield self.$getConfig(self, 'Login')
|
104
|
+
console.log('登录配置', self.config)
|
105
|
+
if (self.config.isMac) {
|
106
|
+
// 获取该登录人分公司下的mac配置
|
107
|
+
let getMacs = yield self.$resetpost('rs/sql/equipmentQuery', {data: {condition: `f_filialeids like '%${self.$login.f.f_orgids}%'`}}, {
|
108
|
+
resolveMsg: null,
|
109
|
+
rejectMsg: null
|
110
|
+
}).catch(() => {
|
111
|
+
throw new Error('获取mac配置失败')
|
112
|
+
})
|
113
|
+
console.log('MAC地址信息', getMacs)
|
114
|
+
// 获取本地mac地址
|
115
|
+
let getLocalMac = yield self.$resetget('http://127.0.0.1:8003/loadmac', {
|
116
|
+
resolveMsg: null,
|
117
|
+
rejectMsg: null
|
118
|
+
}).catch(() => {
|
119
|
+
throw new Error('获取本地mac配置失败')
|
120
|
+
})
|
121
|
+
console.log('本地MAC地址信息', getLocalMac)
|
122
|
+
// 对Mac地址进行匹配
|
123
|
+
let macValidate = false
|
124
|
+
for (let i = 0; i < getLocalMac.data.mac.length; i++) {
|
125
|
+
for (let j = 0; j < getMacs.data.length; j++) {
|
126
|
+
if (getMacs.data[j].f_mac_number.toLocaleUpperCase() === getLocalMac.data.mac[i]) {
|
127
|
+
macValidate = true
|
128
|
+
}
|
129
|
+
}
|
130
|
+
}
|
131
|
+
if (!macValidate) {
|
132
|
+
throw new Error('Mac地址验证失败, 请联系管理员!!')
|
133
|
+
}
|
134
|
+
}
|
135
|
+
if (self.config.depPrompt) {
|
136
|
+
self.depPromptShow = true
|
137
|
+
} else {
|
138
|
+
self.$goto('home-page', {functions: self.$login.f})
|
139
|
+
}
|
140
|
+
|
141
|
+
} catch (ret) {
|
142
|
+
console.error('登录失败', ret)
|
143
|
+
let msg
|
144
|
+
if (ret instanceof Error) {
|
145
|
+
msg = ret
|
146
|
+
}
|
147
|
+
if (ret.status === 0) {
|
148
|
+
msg = '服务连接错误,请确认服务状态'
|
149
|
+
} else if (ret.status === 401) {
|
150
|
+
msg = ret.data
|
151
|
+
} else if (ret.status === 710) {
|
152
|
+
msg = ret.data
|
153
|
+
}
|
154
|
+
self.createCode()
|
155
|
+
self.picLyanzhengma = ''
|
156
|
+
yield self.$showMessage(msg)
|
157
|
+
self.model.ename = ''
|
158
|
+
self.model.password = ''
|
159
|
+
self.login = false
|
160
|
+
$('form').fadeIn(500)
|
161
|
+
}
|
162
|
+
}
|
163
|
+
export default {
|
164
|
+
title: '登录',
|
165
|
+
ready () {
|
166
|
+
if (this.$login && this.$login.getUrlCompileParames('name') && this.$login.getUrlCompileParames('password')) {
|
167
|
+
this.model.ename = this.$login.getUrlCompileParames('name')
|
168
|
+
this.model.password = this.$login.getUrlCompileParames('password')
|
169
|
+
this.$login.Verification = false
|
170
|
+
this.confirm()
|
171
|
+
}
|
172
|
+
$('#login-button').click(function (event) {
|
173
|
+
event.preventDefault()
|
174
|
+
$('form').fadeOut(500)
|
175
|
+
}),
|
176
|
+
this.uuid = this.guid()
|
177
|
+
this.createCode()
|
178
|
+
},
|
179
|
+
data () {
|
180
|
+
return {
|
181
|
+
image:{
|
182
|
+
img1: '/images/newStyle/login-info.png',
|
183
|
+
img2: '/images/newStyle/login-con.png',
|
184
|
+
img3: '/images/newStyle/login-left.png',
|
185
|
+
img4: '/images/newStyle/login-user.png',
|
186
|
+
img5: '/images/newStyle/login-pwd.png',
|
187
|
+
img6: '/images/newStyle/login-check.png',
|
188
|
+
img7: '/images/newStyle/login-do.png',
|
189
|
+
},
|
190
|
+
config: {
|
191
|
+
isMac: false,
|
192
|
+
depPrompt: false,
|
193
|
+
},
|
194
|
+
login: false,
|
195
|
+
depPromptShow: false,
|
196
|
+
model: {},
|
197
|
+
uuid: '',
|
198
|
+
show: false,
|
199
|
+
checkCode: '',
|
200
|
+
login_do:true,
|
201
|
+
picLyanzhengma: ''
|
202
|
+
}
|
203
|
+
},
|
204
|
+
methods: {
|
205
|
+
theme(){
|
206
|
+
// var elementList = document.querySelectorAll('body');
|
207
|
+
// console.log(elementList)
|
208
|
+
// document.querySelectorAll('body')[0].className='themeTwo'
|
209
|
+
// var elementList = document.querySelectorAll('body');
|
210
|
+
// console.log(elementList)
|
211
|
+
},
|
212
|
+
onReady () {
|
213
|
+
this.$emit('ready')
|
214
|
+
},
|
215
|
+
confirm (key) {
|
216
|
+
this.login_do=!this.login_do
|
217
|
+
// return
|
218
|
+
if (key == 'key') {
|
219
|
+
$('form').fadeOut(500)
|
220
|
+
}
|
221
|
+
this.login = true
|
222
|
+
// let gen = saveGen(this)
|
223
|
+
// return co(gen)
|
224
|
+
if(this.$login.Verification){
|
225
|
+
if(this.picLyanzhengma == '') {
|
226
|
+
this.$showMessage("请输入验证码!").then(()=>{
|
227
|
+
this.login = false
|
228
|
+
$('form').fadeIn(500)
|
229
|
+
this.createCode()
|
230
|
+
})
|
231
|
+
}else if(this.picLyanzhengma.toUpperCase() != this.checkCode ) {
|
232
|
+
//若输入的验证码与产生的验证码不一致时
|
233
|
+
this.$showMessage("验证码不正确").then(()=>{
|
234
|
+
this.login = false
|
235
|
+
$('form').fadeIn(500)
|
236
|
+
this.createCode();//刷新验证码
|
237
|
+
this.picLyanzhengma = '';
|
238
|
+
})
|
239
|
+
}else {
|
240
|
+
this.login = true
|
241
|
+
let gen = saveGen(this)
|
242
|
+
return co(gen)
|
243
|
+
}
|
244
|
+
}else {
|
245
|
+
this.login = true
|
246
|
+
let gen = saveGen(this)
|
247
|
+
return co(gen)
|
248
|
+
}
|
249
|
+
},
|
250
|
+
createCode(){
|
251
|
+
let code = "";
|
252
|
+
let codeLength = 4;//验证码的长度
|
253
|
+
let random = new Array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
|
254
|
+
'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z');//随机数
|
255
|
+
for (let i = 0; i < codeLength; i++) {
|
256
|
+
//循环操作
|
257
|
+
let index = Math.floor(Math.random() * 36);//取得随机数的索引(0~35)
|
258
|
+
code += random[index];//根据索引取得随机数加到code上
|
259
|
+
}
|
260
|
+
this.checkCode = code;//把code值赋给验证码
|
261
|
+
// 保存验证码
|
262
|
+
this.$resetpost('rs/logic/saveCheckCode', {checkCode: this.checkCode, uuid: this.uuid},{rejectMsg: null,resolveMsg: null}).then((res) => {
|
263
|
+
})
|
264
|
+
},
|
265
|
+
// uuid
|
266
|
+
guid () {
|
267
|
+
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
268
|
+
let r = Math.random() * 16 | 0,
|
269
|
+
v = c == 'x' ? r : (r & 0x3 | 0x8)
|
270
|
+
return v.toString(16)
|
271
|
+
})
|
272
|
+
},
|
273
|
+
|
274
|
+
async depPromptConfirm () {
|
275
|
+
this.depPromptShow = false
|
276
|
+
return this.$goto('home-page', {functions: this.$login.f})
|
277
|
+
},
|
278
|
+
|
279
|
+
depPromptCancel () {
|
280
|
+
this.depPromptShow = false
|
281
|
+
this.createCode()
|
282
|
+
this.picLyanzhengma = ''
|
283
|
+
this.model.ename = ''
|
284
|
+
this.model.password = ''
|
285
|
+
this.login = false
|
286
|
+
$('form').fadeIn(500)
|
287
|
+
}
|
288
|
+
}
|
289
|
+
}
|
290
|
+
</script>
|
291
|
+
|
292
|
+
<style>
|
293
|
+
/*输入框样式*/
|
294
|
+
/*@import url(http://fonts.useso.com/css?family=Source+Sans+Pro:200,300);*/
|
295
|
+
* {
|
296
|
+
box-sizing: border-box;
|
297
|
+
margin: 0;
|
298
|
+
padding: 0;
|
299
|
+
font-weight: 300;
|
300
|
+
}
|
301
|
+
|
302
|
+
body {
|
303
|
+
font-family: 'Source Sans Pro', sans-serif;
|
304
|
+
color: white;
|
305
|
+
font-weight: 300;
|
306
|
+
}
|
307
|
+
|
308
|
+
body ::-webkit-input-placeholder {
|
309
|
+
/* WebKit browsers */
|
310
|
+
font-family: 'Source Sans Pro', sans-serif;
|
311
|
+
color: white;
|
312
|
+
font-weight: 300;
|
313
|
+
}
|
314
|
+
|
315
|
+
body :-moz-placeholder {
|
316
|
+
/* Mozilla Firefox 4 to 18 */
|
317
|
+
font-family: 'Source Sans Pro', sans-serif;
|
318
|
+
color: white;
|
319
|
+
opacity: 1;
|
320
|
+
font-weight: 300;
|
321
|
+
}
|
322
|
+
|
323
|
+
body ::-moz-placeholder {
|
324
|
+
/* Mozilla Firefox 19+ */
|
325
|
+
font-family: 'Source Sans Pro', sans-serif;
|
326
|
+
color: white;
|
327
|
+
opacity: 1;
|
328
|
+
font-weight: 300;
|
329
|
+
}
|
330
|
+
|
331
|
+
body :-ms-input-placeholder {
|
332
|
+
/* Internet Explorer 10+ */
|
333
|
+
font-family: 'Source Sans Pro', sans-serif;
|
334
|
+
color: white;
|
335
|
+
font-weight: 300;
|
336
|
+
}
|
337
|
+
|
338
|
+
.wrapper {
|
339
|
+
/*background: #2D83BA;
|
340
|
+
background: -webkit-linear-gradient(top left, #2D83BA 0%, #2D83BA 100%);
|
341
|
+
background: linear-gradient(to bottom right, #2D83BA 0%, #2D83BA 100%);
|
342
|
+
opacity: 0.8;*/
|
343
|
+
position: absolute;
|
344
|
+
top: 50%;
|
345
|
+
right: -60px;
|
346
|
+
width: 40%;
|
347
|
+
height: 400px;
|
348
|
+
margin-top: -150px;
|
349
|
+
overflow: hidden;
|
350
|
+
|
351
|
+
}
|
352
|
+
|
353
|
+
.wrapper.form-success .container h3 {
|
354
|
+
-webkit-transform: translateY(85px);
|
355
|
+
-ms-transform: translateY(85px);
|
356
|
+
transform: translateY(85px);
|
357
|
+
}
|
358
|
+
|
359
|
+
.container {
|
360
|
+
max-width: 350px;
|
361
|
+
margin: 0 auto;
|
362
|
+
padding: 30px 100px 50px 100px;
|
363
|
+
height: 400px;
|
364
|
+
text-align: center;
|
365
|
+
/*以下增加*/
|
366
|
+
background: #2D83BA;
|
367
|
+
background: -webkit-linear-gradient(top left, #2D83BA 0%, #2D83BA 100%);
|
368
|
+
background: linear-gradient(to bottom right, #2D83BA 0%, #2D83BA 100%);
|
369
|
+
opacity: 0.8;
|
370
|
+
}
|
371
|
+
|
372
|
+
.container h3 {
|
373
|
+
font-size: 40px;
|
374
|
+
-webkit-transition-duration: 1s;
|
375
|
+
transition-duration: 1s;
|
376
|
+
-webkit-transition-timing-function: ease-in-put;
|
377
|
+
transition-timing-function: ease-in-put;
|
378
|
+
font-weight: 200;
|
379
|
+
}
|
380
|
+
|
381
|
+
.form {
|
382
|
+
padding: 20px 0;
|
383
|
+
position: relative;
|
384
|
+
z-index: 2;
|
385
|
+
}
|
386
|
+
|
387
|
+
.form input {
|
388
|
+
-webkit-appearance: none;
|
389
|
+
-moz-appearance: none;
|
390
|
+
appearance: none;
|
391
|
+
outline: 0;
|
392
|
+
border: 1px solid #50ABE6;
|
393
|
+
background-color: #50ABE6;
|
394
|
+
width: 250px;
|
395
|
+
border-radius: 3px;
|
396
|
+
padding: 10px 15px;
|
397
|
+
margin: 0 auto 10px auto;
|
398
|
+
display: block;
|
399
|
+
text-align: center;
|
400
|
+
font-size: 18px;
|
401
|
+
color: white;
|
402
|
+
-webkit-transition-duration: 0.25s;
|
403
|
+
transition-duration: 0.25s;
|
404
|
+
font-weight: 300;
|
405
|
+
}
|
406
|
+
|
407
|
+
.form input:hover {
|
408
|
+
background-color: rgba(255, 255, 255, 0.4);
|
409
|
+
}
|
410
|
+
|
411
|
+
.form input:focus {
|
412
|
+
background-color: white;
|
413
|
+
width: 300px;
|
414
|
+
color: #53e3a6;
|
415
|
+
}
|
416
|
+
|
417
|
+
.usericon {
|
418
|
+
background-image: url(../../../static/usericon.png);
|
419
|
+
background-repeat: no-repeat;
|
420
|
+
background-size: 30px;
|
421
|
+
background-position-x: 8px;
|
422
|
+
background-position-y: 8px;
|
423
|
+
}
|
424
|
+
|
425
|
+
.psicon {
|
426
|
+
background-image: url(../../../static/psicon.png);
|
427
|
+
background-repeat: no-repeat;
|
428
|
+
background-size: 30px;
|
429
|
+
background-position-x: 8px;
|
430
|
+
background-position-y: 8px;
|
431
|
+
}
|
432
|
+
|
433
|
+
.form button {
|
434
|
+
-webkit-appearance: none;
|
435
|
+
-moz-appearance: none;
|
436
|
+
appearance: none;
|
437
|
+
outline: 0;
|
438
|
+
background-color: white;
|
439
|
+
border: 0;
|
440
|
+
padding: 10px 15px;
|
441
|
+
color: #253830;
|
442
|
+
border-radius: 3px;
|
443
|
+
width: 250px;
|
444
|
+
cursor: pointer;
|
445
|
+
font-size: 18px;
|
446
|
+
-webkit-transition-duration: 0.25s;
|
447
|
+
transition-duration: 0.25s;
|
448
|
+
}
|
449
|
+
|
450
|
+
.form button:hover {
|
451
|
+
background-color: #f5f7f9;
|
452
|
+
}
|
453
|
+
|
454
|
+
/*注册字体样式*/
|
455
|
+
.form span {
|
456
|
+
color: #fff;
|
457
|
+
display: table-footer-group;
|
458
|
+
position: absolute;
|
459
|
+
right: 10px;
|
460
|
+
margin-top: 10px;
|
461
|
+
cursor: pointer;
|
462
|
+
}
|
463
|
+
|
464
|
+
.logotitle {
|
465
|
+
color: #fff;
|
466
|
+
position: absolute;
|
467
|
+
top: 50px;
|
468
|
+
left: 50px;
|
469
|
+
font-size: 50px;
|
470
|
+
}
|
471
|
+
|
472
|
+
/*注册模态框界面样式*/
|
473
|
+
.modifystyle {
|
474
|
+
background: #FCFEEE;
|
475
|
+
}
|
476
|
+
|
477
|
+
.modifystyle div {
|
478
|
+
height: auto;
|
479
|
+
margin-bottom: 15px;
|
480
|
+
/*text-align: center;*/
|
481
|
+
/*margin-left: 20%;*/
|
482
|
+
}
|
483
|
+
|
484
|
+
/*bootstrap字体图标要手动调整,所以使用字体图标的span必须紧跟在input后面,负责会错位*/
|
485
|
+
.modifystyle div input + span {
|
486
|
+
top: 0 !important;
|
487
|
+
right: 32%;
|
488
|
+
}
|
489
|
+
|
490
|
+
.modifystyle span {
|
491
|
+
color: red;
|
492
|
+
}
|
493
|
+
|
494
|
+
/* 通告区内容 */
|
495
|
+
.notice-board {
|
496
|
+
height: auto;
|
497
|
+
position: absolute;
|
498
|
+
top: 50%;
|
499
|
+
margin-top: -150px;
|
500
|
+
margin-left: 100px;
|
501
|
+
color: #fff;
|
502
|
+
}
|
503
|
+
|
504
|
+
/*修改密码底部按钮部分样式*/
|
505
|
+
.footerbtn {
|
506
|
+
text-align: center;
|
507
|
+
padding: 15px;
|
508
|
+
}
|
509
|
+
|
510
|
+
.footerbtn button {
|
511
|
+
width: 100px;
|
512
|
+
margin-left: 20px;
|
513
|
+
}
|
514
|
+
|
515
|
+
.bg-bubbles {
|
516
|
+
position: absolute;
|
517
|
+
top: 0;
|
518
|
+
left: 0;
|
519
|
+
width: 100%;
|
520
|
+
height: 100%;
|
521
|
+
z-index: 1;
|
522
|
+
}
|
523
|
+
|
524
|
+
.bg-bubbles li {
|
525
|
+
position: absolute;
|
526
|
+
list-style: none;
|
527
|
+
display: block;
|
528
|
+
width: 40px;
|
529
|
+
height: 40px;
|
530
|
+
background-color: rgba(255, 255, 255, 0.15);
|
531
|
+
bottom: -160px;
|
532
|
+
-webkit-animation: square 25s infinite;
|
533
|
+
animation: square 25s infinite;
|
534
|
+
-webkit-transition-timing-function: linear;
|
535
|
+
transition-timing-function: linear;
|
536
|
+
}
|
537
|
+
|
538
|
+
.bg-bubbles li:nth-child(1) {
|
539
|
+
left: 10%;
|
540
|
+
}
|
541
|
+
|
542
|
+
.bg-bubbles li:nth-child(2) {
|
543
|
+
left: 20%;
|
544
|
+
width: 80px;
|
545
|
+
height: 80px;
|
546
|
+
-webkit-animation-delay: 2s;
|
547
|
+
animation-delay: 2s;
|
548
|
+
-webkit-animation-duration: 17s;
|
549
|
+
animation-duration: 17s;
|
550
|
+
}
|
551
|
+
|
552
|
+
.bg-bubbles li:nth-child(3) {
|
553
|
+
left: 25%;
|
554
|
+
-webkit-animation-delay: 4s;
|
555
|
+
animation-delay: 4s;
|
556
|
+
}
|
557
|
+
|
558
|
+
.bg-bubbles li:nth-child(4) {
|
559
|
+
left: 40%;
|
560
|
+
width: 60px;
|
561
|
+
height: 60px;
|
562
|
+
-webkit-animation-duration: 22s;
|
563
|
+
animation-duration: 22s;
|
564
|
+
background-color: rgba(255, 255, 255, 0.25);
|
565
|
+
}
|
566
|
+
|
567
|
+
.bg-bubbles li:nth-child(5) {
|
568
|
+
left: 70%;
|
569
|
+
}
|
570
|
+
|
571
|
+
.bg-bubbles li:nth-child(6) {
|
572
|
+
left: 80%;
|
573
|
+
width: 120px;
|
574
|
+
height: 120px;
|
575
|
+
-webkit-animation-delay: 3s;
|
576
|
+
animation-delay: 3s;
|
577
|
+
background-color: rgba(255, 255, 255, 0.2);
|
578
|
+
}
|
579
|
+
|
580
|
+
.bg-bubbles li:nth-child(7) {
|
581
|
+
left: 32%;
|
582
|
+
width: 160px;
|
583
|
+
height: 160px;
|
584
|
+
-webkit-animation-delay: 7s;
|
585
|
+
animation-delay: 7s;
|
586
|
+
}
|
587
|
+
|
588
|
+
.bg-bubbles li:nth-child(8) {
|
589
|
+
left: 55%;
|
590
|
+
width: 20px;
|
591
|
+
height: 20px;
|
592
|
+
-webkit-animation-delay: 15s;
|
593
|
+
animation-delay: 15s;
|
594
|
+
-webkit-animation-duration: 40s;
|
595
|
+
animation-duration: 40s;
|
596
|
+
}
|
597
|
+
|
598
|
+
.bg-bubbles li:nth-child(9) {
|
599
|
+
left: 25%;
|
600
|
+
width: 10px;
|
601
|
+
height: 10px;
|
602
|
+
-webkit-animation-delay: 2s;
|
603
|
+
animation-delay: 2s;
|
604
|
+
-webkit-animation-duration: 40s;
|
605
|
+
animation-duration: 40s;
|
606
|
+
background-color: rgba(255, 255, 255, 0.3);
|
607
|
+
}
|
608
|
+
|
609
|
+
.bg-bubbles li:nth-child(10) {
|
610
|
+
left: 90%;
|
611
|
+
width: 160px;
|
612
|
+
height: 160px;
|
613
|
+
-webkit-animation-delay: 11s;
|
614
|
+
animation-delay: 11s;
|
615
|
+
}
|
616
|
+
|
617
|
+
@-webkit-keyframes square {
|
618
|
+
0% {
|
619
|
+
-webkit-transform: translateY(0);
|
620
|
+
transform: translateY(0);
|
621
|
+
}
|
622
|
+
100% {
|
623
|
+
-webkit-transform: translateY(-700px) rotate(600deg);
|
624
|
+
transform: translateY(-700px) rotate(600deg);
|
625
|
+
}
|
626
|
+
}
|
627
|
+
|
628
|
+
@keyframes square {
|
629
|
+
0% {
|
630
|
+
-webkit-transform: translateY(0);
|
631
|
+
transform: translateY(0);
|
632
|
+
}
|
633
|
+
100% {
|
634
|
+
-webkit-transform: translateY(-700px) rotate(600deg);
|
635
|
+
transform: translateY(-700px) rotate(600deg);
|
636
|
+
}
|
637
|
+
}
|
638
|
+
</style>
|