system-clients 3.2.97 → 3.2.98-weinan

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