system-clients 3.2.1-ycapply-1 → 3.2.2-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.
Files changed (179) hide show
  1. package/.eslintrc.js +16 -16
  2. package/.gradle/3.5/file-changes/last-build.bin +0 -0
  3. package/.gradle/3.5/taskHistory/taskHistory.lock +0 -0
  4. package/.gradle/7.1/dependencies-accessors/dependencies-accessors.lock +0 -0
  5. package/.gradle/7.1/executionHistory/executionHistory.bin +0 -0
  6. package/.gradle/7.1/executionHistory/executionHistory.lock +0 -0
  7. package/.gradle/7.1/fileHashes/fileHashes.bin +0 -0
  8. package/.gradle/7.1/fileHashes/fileHashes.lock +0 -0
  9. package/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  10. package/.gradle/buildOutputCleanup/cache.properties +2 -0
  11. package/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
  12. package/.gradle/checksums/checksums.lock +0 -0
  13. package/.gradle/vcs-1/gc.properties +0 -0
  14. package/SystemClient.iml +11 -8
  15. package/build/webpack.base.conf.js +78 -85
  16. package/build.gradle +6 -6
  17. package/gradlew.bat +89 -89
  18. package/index.html +21 -21
  19. package/package.json +4 -5
  20. package/src/App.vue +1 -1
  21. package/src/LodopFuncs.js +123 -123
  22. package/src/components/Main.vue +432 -699
  23. package/src/components/Util.js +343 -343
  24. package/src/components/equipment/EquipmentManage.vue +65 -65
  25. package/src/components/equipment/PcAdd.vue +105 -105
  26. package/src/components/equipment/PcList.vue +119 -119
  27. package/src/components/equipment/PcManage.vue +60 -60
  28. package/src/components/equipment/PhoneAdd.vue +94 -107
  29. package/src/components/equipment/PhoneList.vue +102 -112
  30. package/src/components/equipment/PhoneManage.vue +60 -60
  31. package/src/components/equipment/PosAdd.vue +156 -323
  32. package/src/components/equipment/PosList.vue +164 -294
  33. package/src/components/equipment/PosManage.vue +68 -138
  34. package/src/components/materialManage/materialData.vue +44 -44
  35. package/src/components/materialManage/materialList.vue +255 -255
  36. package/src/components/parammanage/ParamManage.vue +42 -42
  37. package/src/components/parammanage/ParamPage.vue +314 -336
  38. package/src/components/parammanage/ParamPages.vue +222 -222
  39. package/src/components/parammanage/SinglePage.vue +235 -235
  40. package/src/components/parammanage/SinglePages.vue +167 -167
  41. package/src/components/server/AddChangeMsg.vue +66 -66
  42. package/src/components/server/ChangeDeclare.vue +45 -45
  43. package/src/components/server/LeftTree.vue +111 -111
  44. package/src/components/server/LoadData.vue +36 -55
  45. package/src/components/server/Login.vue +726 -844
  46. package/src/components/server/Menu.vue +188 -188
  47. package/src/components/server/ModifyPw.vue +112 -111
  48. package/src/components/server/NewResSelectGroup.vue +211 -0
  49. package/src/components/server/ResSelect.vue +153 -155
  50. package/src/components/server/ResSelectGroup.vue +159 -198
  51. package/src/components/server/RightTree.vue +343 -348
  52. package/src/components/server/RoleSelector.vue +90 -89
  53. package/src/components/server/TestResSelect.vue +58 -58
  54. package/src/components/server/TestResSelectGroup.vue +388 -388
  55. package/src/plugins/EncryptUtil.js +53 -53
  56. package/src/plugins/GetLoginInfoService.js +499 -515
  57. package/src/plugins/HeatGetLoginInfoService.js +491 -491
  58. package/src/plugins/validation.js +7 -15
  59. package/src/project/State.js +1 -1
  60. package/src/stores/AppData.js +38 -38
  61. package/src/stores/HeatAppData.js +38 -38
  62. package/src/styles/fonts/glyphicons-halflings-regular.svg +287 -287
  63. package/src/styles/less/.csscomb.json +304 -304
  64. package/src/styles/less/.csslintrc +19 -19
  65. package/src/styles/less/alerts.less +73 -73
  66. package/src/styles/less/aofeng/animate.min.css +10 -10
  67. package/src/styles/less/aofeng/expandcss.less +569 -569
  68. package/src/styles/less/aofeng/standard.less +2121 -2507
  69. package/src/styles/less/aofeng/themeOne/BinaryTemplate.less +686 -686
  70. package/src/styles/less/aofeng/themeOne/loginStyle.less +1586 -1586
  71. package/src/styles/less/aofeng/themeOne/systemStyle.less +2650 -2650
  72. package/src/styles/less/aofeng/themeOne.less +17 -17
  73. package/src/styles/less/aofeng/themeTwo/newStyle1.less +415 -415
  74. package/src/styles/less/aofeng/themeTwo.less +3 -3
  75. package/src/styles/less/badges.less +66 -66
  76. package/src/styles/less/bootstrap.less +66 -66
  77. package/src/styles/less/breadcrumbs.less +26 -26
  78. package/src/styles/less/button-groups.less +247 -247
  79. package/src/styles/less/buttons.less +172 -172
  80. package/src/styles/less/carousel.less +269 -269
  81. package/src/styles/less/close.less +34 -34
  82. package/src/styles/less/code.less +69 -69
  83. package/src/styles/less/component-animations.less +33 -33
  84. package/src/styles/less/dropdowns.less +216 -216
  85. package/src/styles/less/fonts-list.less +25 -25
  86. package/src/styles/less/forms.less +626 -626
  87. package/src/styles/less/glyphicons.less +305 -305
  88. package/src/styles/less/grid.less +84 -84
  89. package/src/styles/less/input-groups.less +167 -167
  90. package/src/styles/less/jumbotron.less +52 -52
  91. package/src/styles/less/labels.less +64 -64
  92. package/src/styles/less/list-group.less +141 -141
  93. package/src/styles/less/manageStyle/manageChile.less +180 -180
  94. package/src/styles/less/manageStyle/manageStyle.less +1102 -1102
  95. package/src/styles/less/manageStyle/safeStyle.less +498 -498
  96. package/src/styles/less/media.less +66 -66
  97. package/src/styles/less/mixins/alerts.less +14 -14
  98. package/src/styles/less/mixins/background-variant.less +9 -9
  99. package/src/styles/less/mixins/border-radius.less +18 -18
  100. package/src/styles/less/mixins/buttons.less +69 -69
  101. package/src/styles/less/mixins/center-block.less +7 -7
  102. package/src/styles/less/mixins/clearfix.less +22 -22
  103. package/src/styles/less/mixins/forms.less +90 -90
  104. package/src/styles/less/mixins/gradients.less +59 -59
  105. package/src/styles/less/mixins/grid-framework.less +92 -92
  106. package/src/styles/less/mixins/grid.less +122 -122
  107. package/src/styles/less/mixins/hide-text.less +21 -21
  108. package/src/styles/less/mixins/image.less +33 -33
  109. package/src/styles/less/mixins/labels.less +12 -12
  110. package/src/styles/less/mixins/list-group.less +30 -30
  111. package/src/styles/less/mixins/nav-divider.less +10 -10
  112. package/src/styles/less/mixins/nav-vertical-align.less +9 -9
  113. package/src/styles/less/mixins/opacity.less +8 -8
  114. package/src/styles/less/mixins/pagination.less +24 -24
  115. package/src/styles/less/mixins/panels.less +24 -24
  116. package/src/styles/less/mixins/progress-bar.less +10 -10
  117. package/src/styles/less/mixins/reset-filter.less +8 -8
  118. package/src/styles/less/mixins/reset-text.less +18 -18
  119. package/src/styles/less/mixins/resize.less +6 -6
  120. package/src/styles/less/mixins/responsive-visibility.less +15 -15
  121. package/src/styles/less/mixins/size.less +10 -10
  122. package/src/styles/less/mixins/tab-focus.less +9 -9
  123. package/src/styles/less/mixins/table-row.less +44 -44
  124. package/src/styles/less/mixins/text-emphasis.less +9 -9
  125. package/src/styles/less/mixins/text-overflow.less +8 -8
  126. package/src/styles/less/mixins/vendor-prefixes.less +227 -227
  127. package/src/styles/less/mixins.less +40 -40
  128. package/src/styles/less/modals.less +151 -151
  129. package/src/styles/less/navbar.less +660 -660
  130. package/src/styles/less/navs.less +285 -285
  131. package/src/styles/less/normalize.less +424 -424
  132. package/src/styles/less/pager.less +76 -76
  133. package/src/styles/less/pagination.less +89 -89
  134. package/src/styles/less/panels.less +275 -275
  135. package/src/styles/less/popovers.less +131 -131
  136. package/src/styles/less/print.less +101 -101
  137. package/src/styles/less/progress-bars.less +87 -87
  138. package/src/styles/less/responsive-embed.less +35 -35
  139. package/src/styles/less/responsive-utilities.less +194 -194
  140. package/src/styles/less/scaffolding.less +161 -161
  141. package/src/styles/less/stand.less +207 -207
  142. package/src/styles/less/tables.less +262 -312
  143. package/src/styles/less/theme.less +291 -291
  144. package/src/styles/less/thumbnails.less +36 -36
  145. package/src/styles/less/tooltip.less +102 -102
  146. package/src/styles/less/type.less +303 -316
  147. package/src/styles/less/utilities.less +55 -55
  148. package/src/styles/less/variables.less +896 -899
  149. package/src/styles/less/wells.less +29 -29
  150. package/src/system.js +85 -109
  151. package/static/aodelogo.png +0 -0
  152. package/static/aodenewlogo.png +0 -0
  153. package/static/ewmlogo.png +0 -0
  154. package/src/components/TabButton.vue +0 -201
  155. package/src/components/Tabs.vue +0 -67
  156. package/src/components/addressManage/AddressCascadingMenu.vue +0 -145
  157. package/src/components/equipment/PosManageBoth.vue +0 -125
  158. package/src/components/equipment/PosParamAdd.vue +0 -236
  159. package/src/components/equipment/PosParamList.vue +0 -121
  160. package/src/components/equipment/PosParamManage.vue +0 -51
  161. package/src/components/server/ImageVieweTest.vue +0 -56
  162. package/src/components/server/ImageViewer.vue +0 -350
  163. package/src/components/server/PcdBuildingSelect.vue +0 -241
  164. package/src/filiale/konggang/Login.vue +0 -840
  165. package/src/filiale/konggang/system.js +0 -7
  166. package/src/filiale/qianneng/ModifyPw.vue +0 -107
  167. package/src/filiale/qianneng/system.js +0 -7
  168. package/src/filiale/rizhao/LeftTree.vue +0 -111
  169. package/src/filiale/rizhao/Login.vue +0 -791
  170. package/src/filiale/rizhao/Main.vue +0 -606
  171. package/src/filiale/rizhao/system.js +0 -14
  172. package/src/styles/less/manageStyle/manageStyle/manageChile.less +0 -180
  173. package/src/styles/less/manageStyle/manageStyle/manageStyle.less +0 -1102
  174. package/src/styles/less/manageStyle/manageStyle/safeStyle.less +0 -498
  175. package/static/images/lefticon//345/220/210/345/220/214/347/256/241/347/220/206.png +0 -0
  176. package/static/logo.png +0 -0
  177. package/static/newStyle/about-us.png +0 -0
  178. package/static/rizhao.png +0 -0
  179. package/yarn-error.log +0 -6896
@@ -1,844 +1,726 @@
1
- <template>
2
- <div class="syslogin">
3
- <div class="login-title" >
4
- <div class="row auto">
5
- <marquee style="width:80%;margin-top:25px"><span style="font-size: 1.8rem;color: white;">{{notice}}</span></marquee>
6
- <div class="login-title-chi" style="white-space: nowrap;margin-right:-5%">
7
- <div v-if="titleShow">
8
- <img src="../../../static/newStyle/login-info.png"/>
9
- <span @click="showus=true">关于我们</span>
10
- </div>
11
- <!-- <img src="../../../static/newStyle/login-con.png"/>-->
12
- <!-- <span>联系我们</span>-->
13
- </div>
14
- </div>
15
- </div>
16
-
17
- <modal :show.sync="showus" backdrop="true" width="50%" style="width:auto;">
18
- <article slot="modal-body" class="modal-body" >
19
- <img style="height:100%;width:100%" src="../../../static/newStyle/about-us.png"/>
20
- </article>
21
- <footer slot="modal-footer" class="modal-footer">
22
- </footer>
23
- </modal>
24
-
25
-
26
- <div class="logoew" v-if="logoandroid" >
27
- <div v-if="logoandroid" class="imglogo"></div>
28
- <p class="logocontent">燃气客服系统Android版</p>
29
- <p class="logofooter">(仅浏览器扫描)</p>
30
- </div>
31
- <!--输入框-->
32
- <div class="loginmain">
33
- <!-- <img src="../../../static/login_title1.png" alt="图片加载未完成" class="img-responsive" style="margin: 0 auto; padding-top: 150px;" /> -->
34
- <div class="loginmain-left">
35
- <img class="loginmain-left-img" src="../../../static/newStyle/login-left.png">
36
- </div>
37
- <div class="loginmain-right">
38
-
39
- <p @click="theme()" style="white-space: nowrap">{{config.title}}</p>
40
-
41
- <form v-show="!login">
42
- <!-- <input type="text" placeholder="用户名" v-model="model.ename" class="usericon">-->
43
- <div class="login-input">
44
- <img src="../../../static/newStyle/login-user.png"/>
45
- <input type="text" style="display: inline;background-color: white!important;" placeholder="用户名" v-model="model.ename"/>
46
- </div>
47
- <div class="login-input">
48
- <img src="../../../static/newStyle/login-pwd.png"/>
49
- <input type="password" placeholder="密码" style="display: inline;background-color: darkgray;" v-model="model.password"
50
- @keyup.enter="confirm('key')"/>
51
- </div>
52
- <div class="login-input-1" v-if="$login.Verification">
53
- <img src="../../../static/newStyle/login-check.png"/>
54
- <input v-if="$login.Verification" class="login-check" type="text" placeholder="请输入验证码"
55
- v-model="picLyanzhengma" @keyup.enter="confirm('key')"/>
56
- </div>
57
- <div class="login-input-2" >
58
- <input v-if="$login.Verification" class="login-check-1" style="display: inline;background-color:#eeeeee !important;"
59
- type="button" @click="createCode" v-model="checkCode"/>
60
- </div>
61
- <div class="login-bt">
62
- <button type="button" id="login-button" class="login-button" @click.prevent="confirm('click')">登录</button>
63
- </div>
64
- <!-- <input type="password" placeholder="密码" v-model="model.password" class="psicon"-->
65
- <!-- @keyup.enter="confirm('key')">-->
66
- <!-- <input v-if="$login.Verification" styljiaoyane="width: 40%; display: inline" type="text" placeholder="请输入验证码"-->
67
- <!-- v-model="picLyanzhengma" @keyup.enter="confirm('key')">-->
68
- <!-- <input v-if="$login.Verification" style="width: 30%; display: inline;background-color: darkgray;"-->
69
- <!-- type="button" @click="createCode" v-model="checkCode"/><br>-->
70
-
71
- <!-- <button type="button" id="login-button" @click.prevent="confirm()"><strong>注册</strong></button> -->
72
- <!-- <span @click="register()">还没有注册,现在注册>>></span> -->
73
- </form>
74
- <div v-show="login" class="login_load">
75
- <img src="../../../static/newStyle/login-do.gif">
76
- </div>
77
- </div>
78
- </div>
79
- <div class="login-foot" v-show="false">
80
- 技术支持:西安奥枫软件有限公司
81
- </div>
82
- <div class="login-foot" v-show="$login.BAinformation">
83
- {{{ $login.BAinformation }}}
84
- </div>
85
-
86
- <modal v-if="depPromptShow" :show.sync="depPromptShow" :backdrop="false" v-ref:modal >
87
- <header slot="modal-header" style="height: 8vh" class="modal-header">
88
- <!--<h4 class="modal-title">登录信息</h4>-->
89
- </header>
90
- <article slot="modal-body" class="modal-body">
91
- <form class="form-horizontal">
92
- <div class="row">
93
- <div class="col-sm-12 form-group">
94
- <label class="col-sm-5 ">当前登录人:</label>
95
- <label style="font-weight:normal">{{$login.f.name}}</label>
96
- </div>
97
- <!--<div class="col-sm-12 form-group" v-if="$login.f.number">-->
98
- <!--<label class="col-sm-5 ">组&nbsp;织&nbsp;编&nbsp;码:</label>-->
99
- <!--<label style="font-weight:normal">{{$login.f.number}}</label>-->
100
- <!-- <div class="col-sm-7">
101
- <span >{{$login.f.number}}</span>
102
- </div> -->
103
- <!--</div>-->
104
- <div class="col-sm-12 form-group">
105
- <label class="col-sm-5">所在销售点:</label>
106
- <label style="font-weight:normal">{{$login.f.deps}}</label>
107
- <!-- <div class="col-sm-7">
108
- <span >{{$login.f.deps}}</span>
109
- </div> -->
110
- </div>
111
- <div class="col-sm-12 " v-if="AppDaiBan !==''">
112
- <label class="col-sm-2">报装待办:</label>
113
- <span style="font-weight:normal">{{AppDaiBan}}</span>
114
- </div>
115
- <div class="col-sm-12 " v-if="OrderDaiBan !==''">
116
- <label class="col-sm-2">预约待办:</label>
117
- <span style="font-weight:normal">{{OrderDaiBan}}</span>
118
- </div>
119
- </div>
120
- </form>
121
- </article>
122
- <footer slot="modal-footer" style="height: 8vh" class="modal-footer">
123
- <button class="button_search" @click="depPromptConfirm">确认</button>
124
- <button class="button_clear" @click="depPromptCancel">取消</button>
125
- </footer>
126
- </modal>
127
-
128
- <!-- 修改密码组件 -->
129
- <modify-pw :show.sync="modifyPwShow" v-if="modifyPwShow"></modify-pw>
130
- </div>
131
-
132
- </template>
133
-
134
- <script>
135
- import co from 'co'
136
- import $ from 'jquery'
137
- import Vue from 'vue'
138
- import {HttpResetClass} from 'vue-client'
139
-
140
-
141
-
142
- let saveGen = function *(self) {
143
- try {
144
- if(self.$login){
145
- yield self.$login.login(self.model.ename, self.model.password)
146
- }
147
- if(self.$appdata){
148
- yield self.$appdata.load()
149
-
150
- }
151
- if (Vue.$heatCompatibility) {
152
- try {
153
- if(self.$loginHeat){
154
- yield self.$loginHeat.login(self.model.ename, self.model.password)
155
- }
156
- if(self.$appdataHeat){
157
- yield self.$appdataHeat.load()
158
- }
159
- } catch (e) {
160
- console.log('热力系统登陆失败!')
161
- }
162
- }
163
- yield self.$getConfig(self, 'Login')
164
- console.log('登录配置', self.config)
165
- if (self.config.isMac) {
166
- // 获取该登录人分公司下的mac配置
167
- let getMacs = yield self.$resetpost('rs/sql/equipmentQuery', {data: {condition: `f_filialeids like '%${self.$login.f.f_orgids}%'`}}, {
168
- resolveMsg: null,
169
- rejectMsg: null
170
- }).catch(() => {
171
- throw new Error('获取mac配置失败')
172
- })
173
- console.log('MAC地址信息', getMacs)
174
- // 获取本地mac地址
175
- let getLocalMac = yield self.$resetget('http://127.0.0.1:8003/loadmac', {
176
- resolveMsg: null,
177
- rejectMsg: null
178
- }).catch(() => {
179
- throw new Error('获取本地mac配置失败')
180
- })
181
- console.log('本地MAC地址信息', getLocalMac)
182
- // 对Mac地址进行匹配
183
- let macValidate = false
184
- for (let i = 0; i < getLocalMac.data.mac.length; i++) {
185
- for (let j = 0; j < getMacs.data.length; j++) {
186
- if (getMacs.data[j].f_mac_number.toLocaleUpperCase() === getLocalMac.data.mac[i]) {
187
- macValidate = true
188
- }
189
- }
190
- }
191
- if (!macValidate) {
192
- throw new Error('Mac地址验证失败, 请联系管理员!!')
193
- }
194
- }
195
- console.log(self.$login.depPrompt)
196
- // 弱口令验证
197
- //跳转过来的不进行验证
198
- if ((!self.otherLogin) && self.config.weakPassword && !(/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,16}$/.test(self.model.password))) {
199
- self.$showMessage('登录系统: 此账户的密码过于简单,请修改密码后重新登陆!!!', ['confirm']).then((res) => {
200
- self.modifyPwShow = true
201
- })
202
- } else if ((!self.otherLogin) && self.$login.depPrompt) {
203
- self.depPromptShow = true
204
- if (self.$login.showDaiBan && self.$login.r.includes('展示预约信息')){
205
- // 获取待办
206
- self.getDaiBan()
207
- }
208
- } else {
209
- self.$goto('home-page', {functions: self.$login.f,config: self.config})
210
- // if (self.otherLogin){
211
- // window.history.pushState(null,null,'')
212
- // }
213
- if (self.$login) {
214
- console.log('登录信息', self.$login.f)
215
- global.login=self.$login.f
216
- console.log('登录信息', global.login)
217
- }
218
- }
219
-
220
- } catch (ret) {
221
- console.error('登录失败', ret)
222
- let msg
223
- if (ret instanceof Error) {
224
- msg = ret
225
- }
226
- if (ret.status === 0) {
227
- msg = '服务连接错误,请确认服务状态'
228
- } else if (ret.status === 401) {
229
- msg = ret.data
230
- } else if (ret.status === 710) {
231
- msg = ret.data
232
- }
233
- self.createCode()
234
- self.picLyanzhengma = ''
235
- yield self.$showMessage(msg)
236
- self.model.ename = ''
237
- self.model.password = ''
238
- self.login = false
239
- $('form').fadeIn(500)
240
- }
241
- }
242
- export default {
243
- title: '登录',
244
- async ready () {
245
- this.titleShow = this.$appdata.getSingleValue('关于我们')
246
- try{
247
- let http = new HttpResetClass()
248
- let res = await http.load('POST', 'rs/sql/singleTable',
249
- {data:{
250
- tablename: 't_changedeclare',
251
- condition: ` f_type ='变更通知' `
252
- }
253
- }, {resolveMsg: null, rejectMsg: null})
254
- if(res.data.length>0){
255
- console.log("---------------获取通知",res.data[0].f_change_message)
256
- this.notice=res.data[0].f_change_message
257
- }
258
- }catch(e){}
259
-
260
- this.loginother();
261
- $('#login-button').click(function (event) {
262
- event.preventDefault()
263
- $('form').fadeOut(500)
264
- })
265
- if (window.location.search && window.location.search.indexOf('af_key') !== -1&& window.location.search.indexOf('af_n') !== -1) {
266
- const subUrl = window.location.search.replace('?af_key=','').split('&af_n=')
267
- console.log(subUrl)
268
- this.model.ename = window.atob(subUrl[0])
269
- this.model.password = window.atob(subUrl[1])
270
- console.log('this.model.ename',this.model.ename)
271
- this.otherLogin = true
272
- this.confirm()
273
- }else{
274
- //跳转不需要验证码
275
- this.createCode()
276
- }
277
- console.log(this.$login)
278
- },
279
- data () {
280
- return {
281
- image:{
282
- img1: '/images/newStyle/login-info.png',
283
- img2: '/images/newStyle/login-con.png',
284
- img3: '/images/newStyle/login-left.png',
285
- img4: '/images/newStyle/login-user.png',
286
- img5: '/images/newStyle/login-pwd.png',
287
- img6: '/images/newStyle/login-check.png',
288
- img7: '/images/newStyle/login-do.png',
289
- },
290
- config: {
291
- isMac: false,
292
- depPrompt: false,
293
- weakPassword: false,
294
- title: '燃气客服系统',
295
- distanceLogin: false,
296
- // 那些角色可以定时获取预约提示
297
- isTip : false,
298
- // 那些角色可以定时获取预约提示
299
- msgRole : '预约处理人员',
300
- // 定时获取提示间隔 单位:分钟
301
- times: 25,
302
- },
303
- titleShow: true, //标题显示
304
- otherLogin:false,
305
- login: false,
306
- depPromptShow: false,
307
- model: {},
308
- show: false,
309
- checkCode: '',
310
- login_do:true,
311
- picLyanzhengma: '',
312
- // 修改密码弹框展示
313
- modifyPwShow: false,
314
- logoandroid:false,
315
- showus:false,
316
- notice:'',
317
- loginotherflag :true,
318
- // 报建待办
319
- AppDaiBan: '',
320
- // 预约待处理
321
- OrderDaiBan: ''
322
- }
323
- },
324
- methods: {
325
- async getDaiBan(){
326
- let http = new HttpResetClass()
327
- let condition = ''
328
- if(this.$login.f.deps!=='柠条塔'){
329
- condition = ` (f_orderstate != '预约成功' and f_orderstate != '预约失败' ) or f_orderstate is null `
330
- } else {
331
- condition =` f_orderstate is null and (f_address in( select f_address from t_user_address where f_slice_area='柠条塔') or f_address like '%柠条塔%') `
332
- }
333
- await http.load('POST', '/rs/sql/singleTable', {data: {
334
- tablename:'t_order_center',
335
- condition:condition
336
- }}, {
337
- resolveMsg: null,
338
- rejectMsg: null
339
- }).then((res) => {
340
- let OrderDaiBan = {}
341
- res.data.forEach(item=>{
342
- OrderDaiBan[item.f_ordertype] = OrderDaiBan[item.f_ordertype] || []
343
- OrderDaiBan[item.f_ordertype].push(item)
344
- })
345
- this.OrderDaiBan = `您有${res.data.length}条需要处理的微信预约业务!`
346
- if (res.data.length> 0){
347
- this.OrderDaiBan += `其中 ${Object.keys(OrderDaiBan).map(key=>`${key}:${OrderDaiBan[key].length}条`).join(', ')}`
348
- }
349
- })
350
- let data = {
351
- condition: '1 = 1',
352
- data: {
353
- orgid: this.$login.f.orgid,
354
- id: this.$login.f.id
355
- }
356
- }
357
- await http.load('POST', '/rs/sql/checkuser', {data: data}, {
358
- resolveMsg: null,
359
- rejectMsg: null
360
- }).then((res) => {
361
- let AppDaiBan = {}
362
- res.data.forEach(item=>{
363
- AppDaiBan[item.defname] = AppDaiBan[item.defname] || []
364
- AppDaiBan[item.defname].push(item)
365
- })
366
- this.AppDaiBan = `您有${res.data.length}条需要处理的报建待办业务!`
367
- if (res.data.length> 0){
368
- this.AppDaiBan += `其中 ${Object.keys(AppDaiBan).map(key=>`${key}:${AppDaiBan[key].length}条`).join(', ')}`
369
- }
370
- })
371
-
372
- },
373
- async loginother(){
374
- if (this.config.distanceLogin) {
375
- if (this.$login && this.$login.getUrlParames('name') ) {
376
- let ename = this.$login.getUrlParames('name');
377
- let logininfo = await this.$resetpost('rs/logic/getLoginData',{data:{ename:ename}},{resolveMsg: null, rejectMsg: null});
378
- if(logininfo.data){
379
- if(logininfo.data.ename && logininfo.data.password){
380
- this.model.ename = logininfo.data.ename
381
- this.model.password =logininfo.data.password
382
- let gen = saveGen(this)
383
- return co(gen)
384
- }
385
- }
386
- }
387
- }
388
- },
389
- theme(){
390
- // var elementList = document.querySelectorAll('body');
391
- // console.log(elementList)
392
- // document.querySelectorAll('body')[0].className='themeTwo'
393
- // var elementList = document.querySelectorAll('body');
394
- // console.log(elementList)
395
- },
396
- onReady () {
397
- this.$emit('ready')
398
- },
399
- confirm (key) {
400
- this.login_do=!this.login_do
401
- // return
402
- if (key == 'key') {
403
- $('form').fadeOut(500)
404
- }
405
- this.login = true
406
- // let gen = saveGen(this)
407
- // return co(gen)
408
- if((!this.otherLogin) && this.$login && this.$login.Verification){
409
- console.log('跳转过来的不走验证')
410
- if(this.picLyanzhengma == '') {
411
- this.$showMessage("请输入验证码!").then(()=>{
412
- this.login = false
413
- $('form').fadeIn(500)
414
- this.createCode()
415
- })
416
- }else if(this.picLyanzhengma.toUpperCase() != this.checkCode ) {
417
- //若输入的验证码与产生的验证码不一致时
418
- this.$showMessage("验证码不正确").then(()=>{
419
- this.login = false
420
- $('form').fadeIn(500)
421
- this.createCode();//刷新验证码
422
- this.picLyanzhengma = '';
423
- })
424
- }else {
425
- this.login = true
426
- let gen = saveGen(this)
427
- return co(gen)
428
- }
429
- }else {
430
- this.login = true
431
- let gen = saveGen(this)
432
- return co(gen)
433
- }
434
- },
435
- createCode(){
436
- let code = "";
437
- let codeLength = 4;//验证码的长度
438
- 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',
439
- 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z');//随机数
440
- for (let i = 0; i < codeLength; i++) {
441
- //循环操作
442
- let index = Math.floor(Math.random() * 36);//取得随机数的索引(0~35)
443
- code += random[index];//根据索引取得随机数加到code上
444
- }
445
- this.checkCode = code;//把code值赋给验证码
446
- },
447
-
448
- async depPromptConfirm () {
449
- this.depPromptShow = false
450
- return this.$goto('home-page', {functions: this.$login.f,config: this.config})
451
- },
452
-
453
- depPromptCancel () {
454
- this.depPromptShow = false
455
- this.createCode()
456
- this.picLyanzhengma = ''
457
- this.model.ename = ''
458
- this.model.password = ''
459
- this.login = false
460
- $('form').fadeIn(500)
461
- }
462
- },
463
- watch: {
464
- 'modifyPwShow' (val){
465
- if (!val) {
466
- window.location.reload()
467
- }
468
- }
469
- }
470
- }
471
- </script>
472
-
473
- <style>
474
-
475
- /*输入框样式*/
476
- /*@import url(http://fonts.useso.com/css?family=Source+Sans+Pro:200,300);*/
477
- * {
478
- box-sizing: border-box;
479
- margin: 0;
480
- padding: 0;
481
- font-weight: 400;
482
- outline: none;
483
- }
484
-
485
- body {
486
- font-family: 'Source Sans Pro', sans-serif;
487
- color: white;
488
- font-weight: 400;
489
- }
490
-
491
- body ::-webkit-input-placeholder {
492
- /* WebKit browsers */
493
- font-family: 'Source Sans Pro', sans-serif;
494
- color: white;
495
- font-weight: 400;
496
- }
497
-
498
- body :-moz-placeholder {
499
- /* Mozilla Firefox 4 to 18 */
500
- font-family: 'Source Sans Pro', sans-serif;
501
- color: white;
502
- opacity: 1;
503
- font-weight: 400;
504
- }
505
-
506
- body ::-moz-placeholder {
507
- /* Mozilla Firefox 19+ */
508
- font-family: 'Source Sans Pro', sans-serif;
509
- color: white;
510
- opacity: 1;
511
- font-weight: 400;
512
- }
513
-
514
- body :-ms-input-placeholder {
515
- /* Internet Explorer 10+ */
516
- font-family: 'Source Sans Pro', sans-serif;
517
- color: white;
518
- font-weight: 400;
519
- }
520
-
521
- .wrapper {
522
- /*background: #2D83BA;
523
- background: -webkit-linear-gradient(top left, #2D83BA 0%, #2D83BA 100%);
524
- background: linear-gradient(to bottom right, #2D83BA 0%, #2D83BA 100%);
525
- opacity: 0.8;*/
526
- position: absolute;
527
- top: 50%;
528
- right: -60px;
529
- width: 40%;
530
- height: 400px;
531
- margin-top: -150px;
532
- overflow: hidden;
533
-
534
- }
535
-
536
- .wrapper.form-success .container h3 {
537
- -webkit-transform: translateY(85px);
538
- -ms-transform: translateY(85px);
539
- transform: translateY(85px);
540
- }
541
-
542
- .container {
543
- max-width: 350px;
544
- margin: 0 auto;
545
- padding: 30px 100px 50px 100px;
546
- height: 400px;
547
- text-align: center;
548
- /*以下增加*/
549
- background: #2D83BA;
550
- background: -webkit-linear-gradient(top left, #2D83BA 0%, #2D83BA 100%);
551
- background: linear-gradient(to bottom right, #2D83BA 0%, #2D83BA 100%);
552
- opacity: 0.8;
553
- }
554
-
555
- .container h3 {
556
- font-size: 40px;
557
- -webkit-transition-duration: 1s;
558
- transition-duration: 1s;
559
- -webkit-transition-timing-function: ease-in-put;
560
- transition-timing-function: ease-in-put;
561
- font-weight: 200;
562
- }
563
-
564
- .form {
565
- padding: 20px 0;
566
- position: relative;
567
- z-index: 2;
568
- }
569
-
570
- .form input {
571
- -webkit-appearance: none;
572
- -moz-appearance: none;
573
- appearance: none;
574
- outline: 0;
575
- border: 1px solid #50ABE6;
576
- background-color: #50ABE6;
577
- width: 250px;
578
- border-radius: 3px;
579
- padding: 10px 15px;
580
- margin: 0 auto 10px auto;
581
- display: block;
582
- text-align: center;
583
- font-size: 18px;
584
- color: white;
585
- -webkit-transition-duration: 0.25s;
586
- transition-duration: 0.25s;
587
- font-weight: 400;
588
- }
589
-
590
- .form input:hover {
591
- background-color: rgba(255, 255, 255, 0.4);
592
- }
593
-
594
- .form input:focus {
595
- background-color: white;
596
- width: 300px;
597
- color: #53e3a6;
598
- }
599
-
600
- .usericon {
601
- background-image: url(../../../static/usericon.png);
602
- background-repeat: no-repeat;
603
- background-size: 30px;
604
- background-position-x: 8px;
605
- background-position-y: 8px;
606
- }
607
-
608
- .psicon {
609
- background-image: url(../../../static/psicon.png);
610
- background-repeat: no-repeat;
611
- background-size: 30px;
612
- background-position-x: 8px;
613
- background-position-y: 8px;
614
- }
615
-
616
- .form button {
617
- -webkit-appearance: none;
618
- -moz-appearance: none;
619
- appearance: none;
620
- outline: 0;
621
- background-color: white;
622
- border: 0;
623
- padding: 10px 15px;
624
- color: #253830;
625
- border-radius: 3px;
626
- width: 250px;
627
- cursor: pointer;
628
- font-size: 18px;
629
- -webkit-transition-duration: 0.25s;
630
- transition-duration: 0.25s;
631
- }
632
-
633
- .form button:hover {
634
- background-color: #f5f7f9;
635
- }
636
-
637
- /*注册字体样式*/
638
- .form span {
639
- color: #fff;
640
- display: table-footer-group;
641
- position: absolute;
642
- right: 10px;
643
- margin-top: 10px;
644
- cursor: pointer;
645
- }
646
-
647
- .logotitle {
648
- color: #fff;
649
- position: absolute;
650
- top: 50px;
651
- left: 50px;
652
- font-size: 50px;
653
- }
654
-
655
- /*注册模态框界面样式*/
656
- .modifystyle {
657
- background: #FCFEEE;
658
- }
659
-
660
- .modifystyle div {
661
- height: auto;
662
- margin-bottom: 15px;
663
- /*text-align: center;*/
664
- /*margin-left: 20%;*/
665
- }
666
-
667
- /*bootstrap字体图标要手动调整,所以使用字体图标的span必须紧跟在input后面,负责会错位*/
668
- .modifystyle div input + span {
669
- top: 0 !important;
670
- right: 32%;
671
- }
672
-
673
- .modifystyle span {
674
- color: red;
675
- }
676
-
677
- /* 通告区内容 */
678
- .notice-board {
679
- height: auto;
680
- position: absolute;
681
- top: 50%;
682
- margin-top: -150px;
683
- margin-left: 100px;
684
- color: #fff;
685
- }
686
-
687
- /*修改密码底部按钮部分样式*/
688
- .footerbtn {
689
- text-align: center;
690
- padding: 15px;
691
- }
692
-
693
- .footerbtn button {
694
- width: 100px;
695
- margin-left: 20px;
696
- }
697
-
698
- .bg-bubbles {
699
- position: absolute;
700
- top: 0;
701
- left: 0;
702
- width: 100%;
703
- height: 100%;
704
- z-index: 1;
705
- }
706
-
707
- .bg-bubbles li {
708
- position: absolute;
709
- list-style: none;
710
- display: block;
711
- width: 40px;
712
- height: 40px;
713
- background-color: rgba(255, 255, 255, 0.15);
714
- bottom: -160px;
715
- -webkit-animation: square 25s infinite;
716
- animation: square 25s infinite;
717
- -webkit-transition-timing-function: linear;
718
- transition-timing-function: linear;
719
- }
720
-
721
- .bg-bubbles li:nth-child(1) {
722
- left: 10%;
723
- }
724
-
725
- .bg-bubbles li:nth-child(2) {
726
- left: 20%;
727
- width: 80px;
728
- height: 80px;
729
- -webkit-animation-delay: 2s;
730
- animation-delay: 2s;
731
- -webkit-animation-duration: 17s;
732
- animation-duration: 17s;
733
- }
734
-
735
- .bg-bubbles li:nth-child(3) {
736
- left: 25%;
737
- -webkit-animation-delay: 4s;
738
- animation-delay: 4s;
739
- }
740
-
741
- .bg-bubbles li:nth-child(4) {
742
- left: 40%;
743
- width: 60px;
744
- height: 60px;
745
- -webkit-animation-duration: 22s;
746
- animation-duration: 22s;
747
- background-color: rgba(255, 255, 255, 0.25);
748
- }
749
-
750
- .bg-bubbles li:nth-child(5) {
751
- left: 70%;
752
- }
753
-
754
- .bg-bubbles li:nth-child(6) {
755
- left: 80%;
756
- width: 120px;
757
- height: 120px;
758
- -webkit-animation-delay: 3s;
759
- animation-delay: 3s;
760
- background-color: rgba(255, 255, 255, 0.2);
761
- }
762
-
763
- .bg-bubbles li:nth-child(7) {
764
- left: 32%;
765
- width: 160px;
766
- height: 160px;
767
- -webkit-animation-delay: 7s;
768
- animation-delay: 7s;
769
- }
770
-
771
- .bg-bubbles li:nth-child(8) {
772
- left: 55%;
773
- width: 20px;
774
- height: 20px;
775
- -webkit-animation-delay: 15s;
776
- animation-delay: 15s;
777
- -webkit-animation-duration: 40s;
778
- animation-duration: 40s;
779
- }
780
-
781
- .bg-bubbles li:nth-child(9) {
782
- left: 25%;
783
- width: 10px;
784
- height: 10px;
785
- -webkit-animation-delay: 2s;
786
- animation-delay: 2s;
787
- -webkit-animation-duration: 40s;
788
- animation-duration: 40s;
789
- background-color: rgba(255, 255, 255, 0.3);
790
- }
791
-
792
- .bg-bubbles li:nth-child(10) {
793
- left: 90%;
794
- width: 160px;
795
- height: 160px;
796
- -webkit-animation-delay: 11s;
797
- animation-delay: 11s;
798
- }
799
- .logofooter{
800
- font-size: 12px;
801
- color:#fff;
802
- width:150px;
803
- margin-left: 17px;
804
- }
805
- .logocontent{
806
- font-size: 14px;
807
- color:#fff;
808
- width:150px;
809
- margin: 3px -15px;
810
- }
811
- .imglogo {
812
- background:url(../../../static/logo.png);
813
- background-size:100%;
814
- }
815
- .logoew {
816
- width:120px;
817
- height:120px;
818
- float:right;
819
- margin-right:8.5%;
820
- margin-top:10px;
821
- }
822
-
823
- @-webkit-keyframes square {
824
- 0% {
825
- -webkit-transform: translateY(0);
826
- transform: translateY(0);
827
- }
828
- 100% {
829
- -webkit-transform: translateY(-700px) rotate(600deg);
830
- transform: translateY(-700px) rotate(600deg);
831
- }
832
- }
833
-
834
- @keyframes square {
835
- 0% {
836
- -webkit-transform: translateY(0);
837
- transform: translateY(0);
838
- }
839
- 100% {
840
- -webkit-transform: translateY(-700px) rotate(600deg);
841
- transform: translateY(-700px) rotate(600deg);
842
- }
843
- }
844
- </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
+ <div class="logopic">
12
+ <div class="aodelogo"></div>
13
+ </div>
14
+ <div class="logoew" v-if="logoandroid">
15
+ <div v-if="logoandroid" class="imglogo"></div>
16
+ <p class="logocontent">燃气客服系统Android版</p>
17
+ <p class="logofooter">(仅浏览器扫描)</p>
18
+ </div>
19
+ <!--输入框-->
20
+ <div class="loginmain">
21
+ <!-- <img src="../../../static/login_title1.png" alt="图片加载未完成" class="img-responsive" style="margin: 0 auto; padding-top: 150px;" /> -->
22
+ <div class="loginmain-left">
23
+ <img class="loginmain-left-img" src="../../../static/newStyle/login-left.png">
24
+ </div>
25
+ <div class="loginmain-right" style="width:45%">
26
+
27
+ <p @click="theme()" style="white-space: nowrap">燃气客服系统</p>
28
+
29
+ <form v-show="!login">
30
+ <!-- <input type="text" placeholder="用户名" v-model="model.ename" class="usericon">-->
31
+ <div class="login-input">
32
+ <img src="../../../static/newStyle/login-user.png"/>
33
+ <input type="text" style="display: inline;background-color: white!important;" placeholder="用户名"
34
+ v-model="model.ename"/>
35
+ </div>
36
+ <div class="login-input">
37
+ <img src="../../../static/newStyle/login-pwd.png"/>
38
+ <input type="password" placeholder="密码" style="display: inline;background-color: darkgray;"
39
+ v-model="model.password"
40
+ @keyup.enter="confirm('key')"/>
41
+ </div>
42
+ <div class="login-input-1">
43
+ <img src="../../../static/newStyle/login-check.png"/>
44
+ <input v-if="$login.Verification" class="login-check" type="text" placeholder="请输入验证码"
45
+ v-model="picLyanzhengma" @keyup.enter="confirm('key')"/>
46
+ </div>
47
+ <div class="login-input-2">
48
+ <input v-if="$login.Verification" class="login-check-1"
49
+ style="display: inline;background-color:#eeeeee !important;"
50
+ type="button" @click="createCode" v-model="checkCode"/>
51
+ </div>
52
+ <div class="login-bt">
53
+ <button type="button" id="login-button" class="login-button" @click.prevent="confirm('click')">登录</button>
54
+ </div>
55
+ <!-- <input type="password" placeholder="密码" v-model="model.password" class="psicon"-->
56
+ <!-- @keyup.enter="confirm('key')">-->
57
+ <!-- <input v-if="$login.Verification" styljiaoyane="width: 40%; display: inline" type="text" placeholder="请输入验证码"-->
58
+ <!-- v-model="picLyanzhengma" @keyup.enter="confirm('key')">-->
59
+ <!-- <input v-if="$login.Verification" style="width: 30%; display: inline;background-color: darkgray;"-->
60
+ <!-- type="button" @click="createCode" v-model="checkCode"/><br>-->
61
+
62
+ <!-- <button type="button" id="login-button" @click.prevent="confirm()"><strong>注册</strong></button> -->
63
+ <!-- <span @click="register()">还没有注册,现在注册>>></span> -->
64
+ </form>
65
+ <div v-show="login" class="login_load">
66
+ <img src="../../../static/newStyle/login-do.gif">
67
+ </div>
68
+ </div>
69
+ </div>
70
+ <div class="login-foot" v-show="false">
71
+ 技术支持:西安奥枫软件有限公司
72
+ </div>
73
+
74
+ <modal v-if="depPromptShow" :show.sync="depPromptShow" :backdrop="false" v-ref:modal>
75
+ <header slot="modal-header" class="modal-header">
76
+ <h4 class="modal-title">登录信息</h4>
77
+ </header>
78
+ <article slot="modal-body" class="modal-body">
79
+ <form class="form-horizontal">
80
+ <div class="row">
81
+ <div class="col-sm-12 form-group">
82
+ <label class="col-sm-5 control-label">当前登录人</label>
83
+ <div class="col-sm-7">
84
+ <p class="form-control-static">{{ $login.f.name }}</p>
85
+ </div>
86
+ </div>
87
+ <div class="col-sm-12 form-group">
88
+ <label class="col-sm-5 control-label">组&nbsp;织&nbsp;编&nbsp;码</label>
89
+ <div class="col-sm-7">
90
+ <p class="form-control-static">{{ $login.f.number }}</p>
91
+ </div>
92
+ </div>
93
+ <div class="col-sm-12 form-group">
94
+ <label class="col-sm-5 control-label">所在销售点</label>
95
+ <div class="col-sm-7">
96
+ <p class="form-control-static">{{ $login.f.deps }}</p>
97
+ </div>
98
+ </div>
99
+ </div>
100
+ </form>
101
+ </article>
102
+ <footer slot="modal-footer" class="modal-footer">
103
+ <button class="button_search" @click="depPromptConfirm">确认</button>
104
+ <button class="button_clear" @click="depPromptCancel">取消</button>
105
+ </footer>
106
+ </modal>
107
+
108
+ <!-- 修改密码组件 -->
109
+ <modify-pw :show.sync="modifyPwShow" v-if="modifyPwShow"></modify-pw>
110
+ </div>
111
+
112
+ </template>
113
+
114
+ <script>
115
+ import co from 'co'
116
+ import $ from 'jquery'
117
+ import Vue from 'vue'
118
+ import cryptJS from '../../plugins/EncryptUtil'
119
+ let saveGen = function* (self) {
120
+ try {
121
+ yield self.$login.login(self.model.ename, self.model.password)
122
+ yield self.$appdata.load()
123
+
124
+ // 热力系统登录
125
+ if (Vue.$heatCompatibility) {
126
+ try {
127
+ yield self.$loginHeat.login(self.model.ename, self.model.password)
128
+ yield self.$appdataHeat.load()
129
+ } catch (e) {
130
+ console.log('热力系统登陆失败!')
131
+ }
132
+ }
133
+
134
+ yield self.$getConfig(self, 'Login')
135
+ console.log('登录配置', self.config)
136
+ if (self.config.isMac) {
137
+ // 获取该登录人分公司下的mac配置
138
+ let getMacs = yield self.$resetpost('api/af-system/sql/equipmentQuery', {data: {condition: `f_filialeids like '%${self.$login.f.f_orgids}%'`}}, {
139
+ resolveMsg: null,
140
+ rejectMsg: null
141
+ }).catch(() => {
142
+ throw new Error('获取mac配置失败')
143
+ })
144
+ console.log('MAC地址信息', getMacs)
145
+ // 获取本地mac地址
146
+ let getLocalMac = yield self.$resetget('http://127.0.0.1:8003/loadmac', {
147
+ resolveMsg: null,
148
+ rejectMsg: null
149
+ }).catch(() => {
150
+ throw new Error('获取本地mac配置失败')
151
+ })
152
+ console.log('本地MAC地址信息', getLocalMac)
153
+ // 对Mac地址进行匹配
154
+ let macValidate = false
155
+ for (let i = 0; i < getLocalMac.data.mac.length; i++) {
156
+ for (let j = 0; j < getMacs.data.length; j++) {
157
+ if (getMacs.data[j].f_mac_number.toLocaleUpperCase() === getLocalMac.data.mac[i]) {
158
+ macValidate = true
159
+ }
160
+ }
161
+ }
162
+ if (!macValidate) {
163
+ throw new Error('Mac地址验证失败, 请联系管理员!!')
164
+ }
165
+ }
166
+ // 弱口令验证
167
+ if (self.config.weakPassword && !(/^(?:(?=.*[a-zA-Z])(?=.*[0-9])(?=.*[^A-Za-z0-9])).*$/.test(self.model.password))) {
168
+ self.$showMessage('登录系统: 此账户的密码过于简单,请修改密码后重新登陆!!!', ['confirm']).then((res) => {
169
+ self.modifyPwShow = true
170
+ })
171
+ } else if (self.config.depPrompt) {
172
+ self.depPromptShow = true
173
+ } else {
174
+ self.$goto('home-page', {functions: self.$login.f})
175
+ if (self.$login) {
176
+ console.log('登录信息', self.$login.f)
177
+ global.login = self.$login.f
178
+ console.log('登录信息', global.login)
179
+ }
180
+ }
181
+
182
+ } catch (ret) {
183
+ console.error('登录失败', ret)
184
+ let msg
185
+ if (ret instanceof Error) {
186
+ msg = ret
187
+ }
188
+ if (ret.status === 0) {
189
+ msg = '服务连接错误,请确认服务状态'
190
+ } else {
191
+ msg = ret.data
192
+ }
193
+ self.createCode()
194
+ self.picLyanzhengma = ''
195
+ yield self.$showMessage(msg)
196
+ self.model.ename = ''
197
+ self.model.password = ''
198
+ self.login = false
199
+ $('form').fadeIn(500)
200
+ }
201
+ }
202
+ export default {
203
+ title: '登录',
204
+ ready() {
205
+ if (this.$login && this.$login.getUrlCompileParames('name') && this.$login.getUrlCompileParames('password')) {
206
+ this.model.ename = this.$login.getUrlCompileParames('name')
207
+ this.model.password = this.$login.getUrlCompileParames('password')
208
+ this.confirm()
209
+ }
210
+ if(this.$login&&this.$login.getUrlParames('token')){
211
+ console.log(this.$login.getUrlParames('token'))
212
+ let param = cryptJS.AESDecrypt(this.$login.getUrlParames('token'),'3KMKqvgwR8ULbR8Z')
213
+ console.log(param)
214
+ // param = JSON.parse(param)
215
+ this.$login.Verification = false
216
+ this.model.ename = param.username
217
+ this.model.password = param.password
218
+ this.confirm()
219
+ }
220
+ $('#login-button').click(function (event) {
221
+ event.preventDefault()
222
+ $('form').fadeOut(500)
223
+ }),
224
+ this.createCode()
225
+ },
226
+ data() {
227
+ return {
228
+ image: {
229
+ img1: '/images/newStyle/login-info.png',
230
+ img2: '/images/newStyle/login-con.png',
231
+ img3: '/images/newStyle/login-left.png',
232
+ img4: '/images/newStyle/login-user.png',
233
+ img5: '/images/newStyle/login-pwd.png',
234
+ img6: '/images/newStyle/login-check.png',
235
+ img7: '/images/newStyle/login-do.png',
236
+ },
237
+ config: {
238
+ isMac: false,
239
+ depPrompt: false,
240
+ weakPassword: true
241
+ },
242
+ login: false,
243
+ depPromptShow: false,
244
+ model: {},
245
+ show: false,
246
+ checkCode: '',
247
+ login_do: true,
248
+ picLyanzhengma: '',
249
+ // 修改密码弹框展示
250
+ modifyPwShow: false,
251
+ logoandroid: true
252
+ }
253
+ },
254
+ methods: {
255
+ theme() {
256
+ // var elementList = document.querySelectorAll('body');
257
+ // console.log(elementList)
258
+ // document.querySelectorAll('body')[0].className='themeTwo'
259
+ // var elementList = document.querySelectorAll('body');
260
+ // console.log(elementList)
261
+ },
262
+ onReady() {
263
+ this.$emit('ready')
264
+ },
265
+ confirm(key) {
266
+ this.login_do = !this.login_do
267
+ if (key == 'key') {
268
+ $('form').fadeOut(500)
269
+ }
270
+ this.login = true
271
+ // let gen = saveGen(this)
272
+ // return co(gen)
273
+ if (this.$login.Verification) {
274
+ if (!this.picLyanzhengma) {
275
+ this.$showMessage("请输入验证码!").then(() => {
276
+ this.login = false
277
+ $('form').fadeIn(500)
278
+ this.createCode()
279
+ })
280
+ } else if (this.picLyanzhengma.toUpperCase() != this.checkCode) {
281
+ //若输入的验证码与产生的验证码不一致时
282
+ this.$showMessage("验证码不正确").then(() => {
283
+ this.login = false
284
+ $('form').fadeIn(500)
285
+ this.createCode();//刷新验证码
286
+ this.picLyanzhengma = '';
287
+ })
288
+ } else {
289
+ this.login = true
290
+ let gen = saveGen(this)
291
+ return co(gen)
292
+ }
293
+ } else {
294
+ this.login = true
295
+ let gen = saveGen(this)
296
+ return co(gen)
297
+ }
298
+ },
299
+ createCode() {
300
+ let code = "";
301
+ let codeLength = 4;//验证码的长度
302
+ 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',
303
+ 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z');//随机数
304
+ for (let i = 0; i < codeLength; i++) {
305
+ //循环操作
306
+ let index = Math.floor(Math.random() * 36);//取得随机数的索引(0~35)
307
+ code += random[index];//根据索引取得随机数加到code上
308
+ }
309
+ this.checkCode = code;//把code值赋给验证码
310
+ },
311
+
312
+ async depPromptConfirm() {
313
+ this.depPromptShow = false
314
+ return this.$goto('home-page', {functions: this.$login.f})
315
+ },
316
+
317
+ depPromptCancel() {
318
+ this.depPromptShow = false
319
+ this.createCode()
320
+ this.picLyanzhengma = ''
321
+ this.model.ename = ''
322
+ this.model.password = ''
323
+ this.login = false
324
+ $('form').fadeIn(500)
325
+ }
326
+ },
327
+ watch: {
328
+ 'modifyPwShow'(val) {
329
+ if (!val) {
330
+ window.location.reload()
331
+ }
332
+ }
333
+ }
334
+ }
335
+ </script>
336
+
337
+ <style>
338
+
339
+ /*输入框样式*/
340
+ /*@import url(http://fonts.useso.com/css?family=Source+Sans+Pro:200,300);*/
341
+ * {
342
+ box-sizing: border-box;
343
+ margin: 0;
344
+ padding: 0;
345
+ font-weight: 300;
346
+ }
347
+
348
+ body {
349
+ font-family: 'Source Sans Pro', sans-serif;
350
+ color: white;
351
+ font-weight: 300;
352
+ }
353
+
354
+ body ::-webkit-input-placeholder {
355
+ /* WebKit browsers */
356
+ font-family: 'Source Sans Pro', sans-serif;
357
+ color: white;
358
+ font-weight: 300;
359
+ }
360
+
361
+ body :-moz-placeholder {
362
+ /* Mozilla Firefox 4 to 18 */
363
+ font-family: 'Source Sans Pro', sans-serif;
364
+ color: white;
365
+ opacity: 1;
366
+ font-weight: 300;
367
+ }
368
+
369
+ body ::-moz-placeholder {
370
+ /* Mozilla Firefox 19+ */
371
+ font-family: 'Source Sans Pro', sans-serif;
372
+ color: white;
373
+ opacity: 1;
374
+ font-weight: 300;
375
+ }
376
+
377
+ body :-ms-input-placeholder {
378
+ /* Internet Explorer 10+ */
379
+ font-family: 'Source Sans Pro', sans-serif;
380
+ color: white;
381
+ font-weight: 300;
382
+ }
383
+
384
+ .wrapper {
385
+ /*background: #2D83BA;
386
+ background: -webkit-linear-gradient(top left, #2D83BA 0%, #2D83BA 100%);
387
+ background: linear-gradient(to bottom right, #2D83BA 0%, #2D83BA 100%);
388
+ opacity: 0.8;*/
389
+ position: absolute;
390
+ top: 50%;
391
+ right: -60px;
392
+ width: 40%;
393
+ height: 400px;
394
+ margin-top: -150px;
395
+ overflow: hidden;
396
+
397
+ }
398
+
399
+ .wrapper.form-success .container h3 {
400
+ -webkit-transform: translateY(85px);
401
+ -ms-transform: translateY(85px);
402
+ transform: translateY(85px);
403
+ }
404
+
405
+ .container {
406
+ max-width: 350px;
407
+ margin: 0 auto;
408
+ padding: 30px 100px 50px 100px;
409
+ height: 400px;
410
+ text-align: center;
411
+ /*以下增加*/
412
+ background: #2D83BA;
413
+ background: -webkit-linear-gradient(top left, #2D83BA 0%, #2D83BA 100%);
414
+ background: linear-gradient(to bottom right, #2D83BA 0%, #2D83BA 100%);
415
+ opacity: 0.8;
416
+ }
417
+
418
+ .container h3 {
419
+ font-size: 40px;
420
+ -webkit-transition-duration: 1s;
421
+ transition-duration: 1s;
422
+ -webkit-transition-timing-function: ease-in-put;
423
+ transition-timing-function: ease-in-put;
424
+ font-weight: 200;
425
+ }
426
+
427
+ .form {
428
+ padding: 20px 0;
429
+ position: relative;
430
+ z-index: 2;
431
+ }
432
+
433
+ .form input {
434
+ -webkit-appearance: none;
435
+ -moz-appearance: none;
436
+ appearance: none;
437
+ outline: 0;
438
+ border: 1px solid #50ABE6;
439
+ background-color: #50ABE6;
440
+ width: 250px;
441
+ border-radius: 3px;
442
+ padding: 10px 15px;
443
+ margin: 0 auto 10px auto;
444
+ display: block;
445
+ text-align: center;
446
+ font-size: 18px;
447
+ color: white;
448
+ -webkit-transition-duration: 0.25s;
449
+ transition-duration: 0.25s;
450
+ font-weight: 300;
451
+ }
452
+
453
+ .form input:hover {
454
+ background-color: rgba(255, 255, 255, 0.4);
455
+ }
456
+
457
+ .form input:focus {
458
+ background-color: white;
459
+ width: 300px;
460
+ color: #53e3a6;
461
+ }
462
+
463
+ .usericon {
464
+ background-image: url(../../../static/usericon.png);
465
+ background-repeat: no-repeat;
466
+ background-size: 30px;
467
+ background-position-x: 8px;
468
+ background-position-y: 8px;
469
+ }
470
+
471
+ .psicon {
472
+ background-image: url(../../../static/psicon.png);
473
+ background-repeat: no-repeat;
474
+ background-size: 30px;
475
+ background-position-x: 8px;
476
+ background-position-y: 8px;
477
+ }
478
+
479
+ .form button {
480
+ -webkit-appearance: none;
481
+ -moz-appearance: none;
482
+ appearance: none;
483
+ outline: 0;
484
+ background-color: white;
485
+ border: 0;
486
+ padding: 10px 15px;
487
+ color: #253830;
488
+ border-radius: 3px;
489
+ width: 250px;
490
+ cursor: pointer;
491
+ font-size: 18px;
492
+ -webkit-transition-duration: 0.25s;
493
+ transition-duration: 0.25s;
494
+ }
495
+
496
+ .form button:hover {
497
+ background-color: #f5f7f9;
498
+ }
499
+
500
+ /*注册字体样式*/
501
+ .form span {
502
+ color: #fff;
503
+ display: table-footer-group;
504
+ position: absolute;
505
+ right: 10px;
506
+ margin-top: 10px;
507
+ cursor: pointer;
508
+ }
509
+
510
+ .logotitle {
511
+ color: #fff;
512
+ position: absolute;
513
+ top: 50px;
514
+ left: 50px;
515
+ font-size: 50px;
516
+ }
517
+
518
+ /*注册模态框界面样式*/
519
+ .modifystyle {
520
+ background: #FCFEEE;
521
+ }
522
+
523
+ .modifystyle div {
524
+ height: auto;
525
+ margin-bottom: 15px;
526
+ /*text-align: center;*/
527
+ /*margin-left: 20%;*/
528
+ }
529
+
530
+ /*bootstrap字体图标要手动调整,所以使用字体图标的span必须紧跟在input后面,负责会错位*/
531
+ .modifystyle div input + span {
532
+ top: 0 !important;
533
+ right: 32%;
534
+ }
535
+
536
+ .modifystyle span {
537
+ color: red;
538
+ }
539
+
540
+ /* 通告区内容 */
541
+ .notice-board {
542
+ height: auto;
543
+ position: absolute;
544
+ top: 50%;
545
+ margin-top: -150px;
546
+ margin-left: 100px;
547
+ color: #fff;
548
+ }
549
+
550
+ /*修改密码底部按钮部分样式*/
551
+ .footerbtn {
552
+ text-align: center;
553
+ padding: 15px;
554
+ }
555
+
556
+ .footerbtn button {
557
+ width: 100px;
558
+ margin-left: 20px;
559
+ }
560
+
561
+ .bg-bubbles {
562
+ position: absolute;
563
+ top: 0;
564
+ left: 0;
565
+ width: 100%;
566
+ height: 100%;
567
+ z-index: 1;
568
+ }
569
+
570
+ .bg-bubbles li {
571
+ position: absolute;
572
+ list-style: none;
573
+ display: block;
574
+ width: 40px;
575
+ height: 40px;
576
+ background-color: rgba(255, 255, 255, 0.15);
577
+ bottom: -160px;
578
+ -webkit-animation: square 25s infinite;
579
+ animation: square 25s infinite;
580
+ -webkit-transition-timing-function: linear;
581
+ transition-timing-function: linear;
582
+ }
583
+
584
+ .bg-bubbles li:nth-child(1) {
585
+ left: 10%;
586
+ }
587
+
588
+ .bg-bubbles li:nth-child(2) {
589
+ left: 20%;
590
+ width: 80px;
591
+ height: 80px;
592
+ -webkit-animation-delay: 2s;
593
+ animation-delay: 2s;
594
+ -webkit-animation-duration: 17s;
595
+ animation-duration: 17s;
596
+ }
597
+
598
+ .bg-bubbles li:nth-child(3) {
599
+ left: 25%;
600
+ -webkit-animation-delay: 4s;
601
+ animation-delay: 4s;
602
+ }
603
+
604
+ .bg-bubbles li:nth-child(4) {
605
+ left: 40%;
606
+ width: 60px;
607
+ height: 60px;
608
+ -webkit-animation-duration: 22s;
609
+ animation-duration: 22s;
610
+ background-color: rgba(255, 255, 255, 0.25);
611
+ }
612
+
613
+ .bg-bubbles li:nth-child(5) {
614
+ left: 70%;
615
+ }
616
+
617
+ .bg-bubbles li:nth-child(6) {
618
+ left: 80%;
619
+ width: 120px;
620
+ height: 120px;
621
+ -webkit-animation-delay: 3s;
622
+ animation-delay: 3s;
623
+ background-color: rgba(255, 255, 255, 0.2);
624
+ }
625
+
626
+ .bg-bubbles li:nth-child(7) {
627
+ left: 32%;
628
+ width: 160px;
629
+ height: 160px;
630
+ -webkit-animation-delay: 7s;
631
+ animation-delay: 7s;
632
+ }
633
+
634
+ .bg-bubbles li:nth-child(8) {
635
+ left: 55%;
636
+ width: 20px;
637
+ height: 20px;
638
+ -webkit-animation-delay: 15s;
639
+ animation-delay: 15s;
640
+ -webkit-animation-duration: 40s;
641
+ animation-duration: 40s;
642
+ }
643
+
644
+ .bg-bubbles li:nth-child(9) {
645
+ left: 25%;
646
+ width: 10px;
647
+ height: 10px;
648
+ -webkit-animation-delay: 2s;
649
+ animation-delay: 2s;
650
+ -webkit-animation-duration: 40s;
651
+ animation-duration: 40s;
652
+ background-color: rgba(255, 255, 255, 0.3);
653
+ }
654
+
655
+ .bg-bubbles li:nth-child(10) {
656
+ left: 90%;
657
+ width: 160px;
658
+ height: 160px;
659
+ -webkit-animation-delay: 11s;
660
+ animation-delay: 11s;
661
+ }
662
+
663
+ .logofooter {
664
+ font-size: 12px;
665
+ color: #fff;
666
+ width: 150px;
667
+ margin-left: 17px;
668
+ }
669
+
670
+ .logocontent {
671
+ font-size: 14px;
672
+ color: #fff;
673
+ width: 150px;
674
+ margin: 3px -15px;
675
+ }
676
+
677
+ .aodelogo {
678
+ background: url(../../../static/aodelogo.png);
679
+ background-size: 100%;
680
+ background-repeat: no-repeat;
681
+ }
682
+
683
+ .imglogo {
684
+ background: url(../../../static/ewmlogo.png);
685
+ background-size: 100%;
686
+ background-repeat: no-repeat;
687
+ }
688
+
689
+ .logoew {
690
+ width: 120px;
691
+ height: 120px;
692
+ float: right;
693
+ margin-right: 8.5%;
694
+ margin-top: 10px;
695
+ }
696
+
697
+ .logopic {
698
+ width: 23%;
699
+ height: 100px;
700
+ float: left;
701
+ margin-left: 3.5%;
702
+ margin-top: 10px;
703
+ }
704
+
705
+ @-webkit-keyframes square {
706
+ 0% {
707
+ -webkit-transform: translateY(0);
708
+ transform: translateY(0);
709
+ }
710
+ 100% {
711
+ -webkit-transform: translateY(-700px) rotate(600deg);
712
+ transform: translateY(-700px) rotate(600deg);
713
+ }
714
+ }
715
+
716
+ @keyframes square {
717
+ 0% {
718
+ -webkit-transform: translateY(0);
719
+ transform: translateY(0);
720
+ }
721
+ 100% {
722
+ -webkit-transform: translateY(-700px) rotate(600deg);
723
+ transform: translateY(-700px) rotate(600deg);
724
+ }
725
+ }
726
+ </style>