system-clients 3.0.47-fanxian → 3.0.48-fanxian

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