system-clients 4.0.4 → 4.0.5

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