system-phone 3.0.2 → 3.0.3

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 (267) hide show
  1. package/.babelrc +5 -5
  2. package/.editorconfig +9 -9
  3. package/.eslintrc.js +16 -16
  4. package/.gradle/buildOutputCleanup/cache.properties +2 -2
  5. package/.gradle/checksums/checksums.lock +0 -0
  6. package/.gradle/checksums/md5-checksums.bin +0 -0
  7. package/.gradle/checksums/sha1-checksums.bin +0 -0
  8. package/CHANGELOG.md +1 -1
  9. package/Dockerfile +3 -3
  10. package/README.md +36 -36
  11. package/SystemPhone.iml +8 -8
  12. package/build/css-loaders.js +34 -34
  13. package/build/dev-client.js +8 -8
  14. package/build/dev-server.js +141 -141
  15. package/build/example-server.js +80 -80
  16. package/build/release.sh +28 -28
  17. package/build/utils.js +71 -71
  18. package/build/webpack.base.conf.js +82 -82
  19. package/build/webpack.dev.conf.js +31 -31
  20. package/build/webpack.example.conf.js +49 -49
  21. package/build/webpack.prod.conf.js +60 -60
  22. package/build/webpack.test.conf.js +31 -31
  23. package/build.gradle +27 -27
  24. package/config/dev.env.js +6 -6
  25. package/config/index.js +38 -38
  26. package/config/prod.env.js +3 -3
  27. package/config/test.env.js +6 -6
  28. package/gradle/wrapper/gradle-wrapper.properties +5 -5
  29. package/gradlew +183 -183
  30. package/gradlew.bat +100 -100
  31. package/index.html +21 -21
  32. package/nginx.conf +304 -304
  33. package/package.json +1 -1
  34. package/release.bat +5 -5
  35. package/src/App.vue +25 -25
  36. package/src/Util.js +415 -415
  37. package/src/android-bootstrap/fonts/glyphicons-halflings-regular.svg +287 -287
  38. package/src/android-bootstrap/less/.csscomb.json +304 -304
  39. package/src/android-bootstrap/less/.csslintrc +19 -19
  40. package/src/android-bootstrap/less/alerts.less +73 -73
  41. package/src/android-bootstrap/less/badges.less +66 -66
  42. package/src/android-bootstrap/less/bootstrap.less +56 -56
  43. package/src/android-bootstrap/less/breadcrumbs.less +26 -26
  44. package/src/android-bootstrap/less/button-groups.less +247 -247
  45. package/src/android-bootstrap/less/buttons.less +173 -173
  46. package/src/android-bootstrap/less/carousel.less +269 -269
  47. package/src/android-bootstrap/less/close.less +34 -34
  48. package/src/android-bootstrap/less/code.less +69 -69
  49. package/src/android-bootstrap/less/component-animations.less +33 -33
  50. package/src/android-bootstrap/less/dropdowns.less +216 -216
  51. package/src/android-bootstrap/less/forms.less +626 -626
  52. package/src/android-bootstrap/less/glyphicons.less +305 -305
  53. package/src/android-bootstrap/less/grid.less +84 -84
  54. package/src/android-bootstrap/less/input-groups.less +167 -167
  55. package/src/android-bootstrap/less/jumbotron.less +52 -52
  56. package/src/android-bootstrap/less/labels.less +64 -64
  57. package/src/android-bootstrap/less/list-group.less +141 -141
  58. package/src/android-bootstrap/less/media.less +66 -66
  59. package/src/android-bootstrap/less/mixins/alerts.less +14 -14
  60. package/src/android-bootstrap/less/mixins/background-variant.less +9 -9
  61. package/src/android-bootstrap/less/mixins/border-radius.less +18 -18
  62. package/src/android-bootstrap/less/mixins/buttons.less +69 -69
  63. package/src/android-bootstrap/less/mixins/center-block.less +7 -7
  64. package/src/android-bootstrap/less/mixins/clearfix.less +22 -22
  65. package/src/android-bootstrap/less/mixins/forms.less +90 -90
  66. package/src/android-bootstrap/less/mixins/gradients.less +59 -59
  67. package/src/android-bootstrap/less/mixins/grid-framework.less +92 -92
  68. package/src/android-bootstrap/less/mixins/grid.less +122 -122
  69. package/src/android-bootstrap/less/mixins/hide-text.less +21 -21
  70. package/src/android-bootstrap/less/mixins/image.less +33 -33
  71. package/src/android-bootstrap/less/mixins/labels.less +12 -12
  72. package/src/android-bootstrap/less/mixins/list-group.less +30 -30
  73. package/src/android-bootstrap/less/mixins/nav-divider.less +10 -10
  74. package/src/android-bootstrap/less/mixins/nav-vertical-align.less +9 -9
  75. package/src/android-bootstrap/less/mixins/opacity.less +8 -8
  76. package/src/android-bootstrap/less/mixins/pagination.less +24 -24
  77. package/src/android-bootstrap/less/mixins/panels.less +24 -24
  78. package/src/android-bootstrap/less/mixins/progress-bar.less +10 -10
  79. package/src/android-bootstrap/less/mixins/reset-filter.less +8 -8
  80. package/src/android-bootstrap/less/mixins/reset-text.less +18 -18
  81. package/src/android-bootstrap/less/mixins/resize.less +6 -6
  82. package/src/android-bootstrap/less/mixins/responsive-visibility.less +15 -15
  83. package/src/android-bootstrap/less/mixins/size.less +10 -10
  84. package/src/android-bootstrap/less/mixins/tab-focus.less +9 -9
  85. package/src/android-bootstrap/less/mixins/table-row.less +44 -44
  86. package/src/android-bootstrap/less/mixins/text-emphasis.less +9 -9
  87. package/src/android-bootstrap/less/mixins/text-overflow.less +8 -8
  88. package/src/android-bootstrap/less/mixins/vendor-prefixes.less +227 -227
  89. package/src/android-bootstrap/less/mixins.less +40 -40
  90. package/src/android-bootstrap/less/modals.less +151 -151
  91. package/src/android-bootstrap/less/navbar.less +660 -660
  92. package/src/android-bootstrap/less/navs.less +290 -290
  93. package/src/android-bootstrap/less/normalize.less +424 -424
  94. package/src/android-bootstrap/less/pager.less +76 -76
  95. package/src/android-bootstrap/less/pagination.less +89 -89
  96. package/src/android-bootstrap/less/panels.less +274 -274
  97. package/src/android-bootstrap/less/popovers.less +131 -131
  98. package/src/android-bootstrap/less/print.less +101 -101
  99. package/src/android-bootstrap/less/progress-bars.less +87 -87
  100. package/src/android-bootstrap/less/responsive-embed.less +35 -35
  101. package/src/android-bootstrap/less/responsive-utilities.less +194 -194
  102. package/src/android-bootstrap/less/scaffolding.less +161 -161
  103. package/src/android-bootstrap/less/tables.less +262 -262
  104. package/src/android-bootstrap/less/theme.less +291 -291
  105. package/src/android-bootstrap/less/thumbnails.less +36 -36
  106. package/src/android-bootstrap/less/tooltip.less +102 -102
  107. package/src/android-bootstrap/less/type.less +303 -303
  108. package/src/android-bootstrap/less/utilities.less +55 -55
  109. package/src/android-bootstrap/less/variables.less +896 -896
  110. package/src/android-bootstrap/less/wells.less +29 -29
  111. package/src/bootstrap/fonts/glyphicons-halflings-regular.svg +287 -287
  112. package/src/bootstrap/less/.csscomb.json +304 -304
  113. package/src/bootstrap/less/.csslintrc +19 -19
  114. package/src/bootstrap/less/alerts.less +73 -73
  115. package/src/bootstrap/less/badges.less +66 -66
  116. package/src/bootstrap/less/bootstrap.less +56 -56
  117. package/src/bootstrap/less/breadcrumbs.less +26 -26
  118. package/src/bootstrap/less/button-groups.less +247 -247
  119. package/src/bootstrap/less/buttons.less +172 -172
  120. package/src/bootstrap/less/carousel.less +269 -269
  121. package/src/bootstrap/less/close.less +34 -34
  122. package/src/bootstrap/less/code.less +69 -69
  123. package/src/bootstrap/less/component-animations.less +33 -33
  124. package/src/bootstrap/less/dropdowns.less +216 -216
  125. package/src/bootstrap/less/forms.less +626 -626
  126. package/src/bootstrap/less/glyphicons.less +305 -305
  127. package/src/bootstrap/less/grid.less +84 -84
  128. package/src/bootstrap/less/input-groups.less +167 -167
  129. package/src/bootstrap/less/jumbotron.less +52 -52
  130. package/src/bootstrap/less/labels.less +64 -64
  131. package/src/bootstrap/less/list-group.less +141 -141
  132. package/src/bootstrap/less/media.less +66 -66
  133. package/src/bootstrap/less/mixins/alerts.less +14 -14
  134. package/src/bootstrap/less/mixins/background-variant.less +9 -9
  135. package/src/bootstrap/less/mixins/border-radius.less +18 -18
  136. package/src/bootstrap/less/mixins/buttons.less +69 -69
  137. package/src/bootstrap/less/mixins/center-block.less +7 -7
  138. package/src/bootstrap/less/mixins/clearfix.less +22 -22
  139. package/src/bootstrap/less/mixins/forms.less +90 -90
  140. package/src/bootstrap/less/mixins/gradients.less +59 -59
  141. package/src/bootstrap/less/mixins/grid-framework.less +92 -92
  142. package/src/bootstrap/less/mixins/grid.less +122 -122
  143. package/src/bootstrap/less/mixins/hide-text.less +21 -21
  144. package/src/bootstrap/less/mixins/image.less +33 -33
  145. package/src/bootstrap/less/mixins/labels.less +12 -12
  146. package/src/bootstrap/less/mixins/list-group.less +30 -30
  147. package/src/bootstrap/less/mixins/nav-divider.less +10 -10
  148. package/src/bootstrap/less/mixins/nav-vertical-align.less +9 -9
  149. package/src/bootstrap/less/mixins/opacity.less +8 -8
  150. package/src/bootstrap/less/mixins/pagination.less +24 -24
  151. package/src/bootstrap/less/mixins/panels.less +24 -24
  152. package/src/bootstrap/less/mixins/progress-bar.less +10 -10
  153. package/src/bootstrap/less/mixins/reset-filter.less +8 -8
  154. package/src/bootstrap/less/mixins/reset-text.less +18 -18
  155. package/src/bootstrap/less/mixins/resize.less +6 -6
  156. package/src/bootstrap/less/mixins/responsive-visibility.less +15 -15
  157. package/src/bootstrap/less/mixins/size.less +10 -10
  158. package/src/bootstrap/less/mixins/tab-focus.less +9 -9
  159. package/src/bootstrap/less/mixins/table-row.less +44 -44
  160. package/src/bootstrap/less/mixins/text-emphasis.less +9 -9
  161. package/src/bootstrap/less/mixins/text-overflow.less +8 -8
  162. package/src/bootstrap/less/mixins/vendor-prefixes.less +227 -227
  163. package/src/bootstrap/less/mixins.less +40 -40
  164. package/src/bootstrap/less/modals.less +151 -151
  165. package/src/bootstrap/less/navbar.less +660 -660
  166. package/src/bootstrap/less/navs.less +286 -286
  167. package/src/bootstrap/less/normalize.less +424 -424
  168. package/src/bootstrap/less/pager.less +76 -76
  169. package/src/bootstrap/less/pagination.less +89 -89
  170. package/src/bootstrap/less/panels.less +275 -275
  171. package/src/bootstrap/less/popovers.less +131 -131
  172. package/src/bootstrap/less/print.less +101 -101
  173. package/src/bootstrap/less/progress-bars.less +87 -87
  174. package/src/bootstrap/less/responsive-embed.less +35 -35
  175. package/src/bootstrap/less/responsive-utilities.less +194 -194
  176. package/src/bootstrap/less/scaffolding.less +161 -161
  177. package/src/bootstrap/less/tables.less +262 -262
  178. package/src/bootstrap/less/theme.less +291 -291
  179. package/src/bootstrap/less/thumbnails.less +36 -36
  180. package/src/bootstrap/less/tooltip.less +102 -102
  181. package/src/bootstrap/less/type.less +303 -303
  182. package/src/bootstrap/less/utilities.less +55 -55
  183. package/src/bootstrap/less/variables.less +895 -895
  184. package/src/bootstrap/less/wells.less +29 -29
  185. package/src/components/AloneLoadParams.vue +26 -26
  186. package/src/components/AlreadyService.vue +193 -193
  187. package/src/components/AttendManage.vue +397 -397
  188. package/src/components/LoadAppdata.vue +38 -38
  189. package/src/components/LoginApp.vue +625 -625
  190. package/src/components/LoginAppNew.vue +587 -587
  191. package/src/components/ModifyPassWord.vue +192 -192
  192. package/src/components/NavBottom.vue +117 -117
  193. package/src/components/NavBottomV.vue +141 -141
  194. package/src/components/NavBottomVVV.vue +185 -185
  195. package/src/components/OnlineManage.vue +79 -9
  196. package/src/components/PhoneChangemeterInfo.vue +116 -116
  197. package/src/components/PhoneInfoTable.vue +39 -39
  198. package/src/components/PhoneRepairInfo.vue +146 -146
  199. package/src/components/PhoneSellInfo.vue +123 -123
  200. package/src/components/PhoneSellInfoLite.vue +112 -112
  201. package/src/components/PhoneUser.vue +202 -202
  202. package/src/components/PhoneUserDetil.vue +70 -70
  203. package/src/components/PhoneUserFind.vue +138 -138
  204. package/src/components/RightTree.vue +214 -214
  205. package/src/components/SystemSetUp.vue +298 -298
  206. package/src/components/TabBarPhone.vue +81 -81
  207. package/src/components/Test.vue +14 -14
  208. package/src/components/ToolsPage.vue +165 -165
  209. package/src/components/UploadManage.vue +194 -194
  210. package/src/components/gaomi/NavBottomV.vue +223 -223
  211. package/src/components/gaomi/NavBottomVVVV.vue +210 -210
  212. package/src/components/gaomi/Scroller.vue +63 -63
  213. package/src/components/gaomi/SystemSetUp.vue +186 -186
  214. package/src/components/gaomi/ToolsPage.vue +168 -168
  215. package/src/components/idea/feedBack.vue +150 -150
  216. package/src/components/idea/feedbackAdd.vue +366 -366
  217. package/src/components/iot/InstructMessage.vue +313 -313
  218. package/src/components/iot/IotBaseInfo.vue +97 -97
  219. package/src/components/iot/IotMeterInfo.vue +77 -77
  220. package/src/components/iot/iotMonitoringMain.vue +501 -501
  221. package/src/components/online/ApplyOnline.vue +581 -581
  222. package/src/components/online/BJZhongRan/ApplyOnline.vue +600 -600
  223. package/src/components/screen/ChargeContentPage.vue +656 -656
  224. package/src/components/screen/ContentPage.vue +611 -611
  225. package/src/components/screen/GongdanContentPage.vue +149 -149
  226. package/src/components/screen/ListCountItem.vue +93 -93
  227. package/src/components/screen/ModuleTitle.vue +48 -48
  228. package/src/components/screen/SafeOrderContentPage.vue +440 -440
  229. package/src/components/screen/SecurityCheckItem.vue +50 -50
  230. package/src/components/screen/TotalItem.vue +76 -76
  231. package/src/components/screen/TotalUserNumber.vue +77 -77
  232. package/src/components/screen/WorkOrderItem.vue +51 -51
  233. package/src/components/screen/WorkOrderRightDownItem.vue +103 -103
  234. package/src/components/screen/WorkOrderRightItem.vue +115 -115
  235. package/src/components/userinfo/paymentQuery.vue +189 -189
  236. package/src/components/userinfo/queryFile.vue +190 -190
  237. package/src/components/wasm.vue +18 -18
  238. package/src/expandcssAndroid.less +521 -521
  239. package/src/index.js +9 -9
  240. package/src/main.js +38 -38
  241. package/src/plugins/GetStringData.js +18 -18
  242. package/src/plugins/LoadParams.js +24 -24
  243. package/src/plugins/const.js +404 -404
  244. package/src/plugins/vue-py.js +37 -37
  245. package/src/services/ConfigService.js +24 -24
  246. package/src/stores/AppData.js +63 -63
  247. package/src/systemphone-gaomi.js +105 -105
  248. package/src/systemphone.js +58 -58
  249. package/src/systemphonegrid.js +186 -186
  250. package/src/util/LdapHelper.js +75 -75
  251. package/static/app.json +4 -4
  252. package/static/const.js +404 -404
  253. package/static/globals.txt +74 -74
  254. package/static/layui/font/iconfont.svg +554 -554
  255. package/static/vue-py.js +37 -37
  256. package/static/wasm_exec.js +465 -465
  257. package/test/unit/.eslintrc +5 -5
  258. package/test/unit/TestUtil.js +35 -35
  259. package/test/unit/context.html +20 -20
  260. package/test/unit/index.js +13 -13
  261. package/test/unit/init.js +13 -13
  262. package/test/unit/karma.conf.js +50 -50
  263. package/test/unit/specs/App.spec.js +17 -17
  264. package/test/unit/specs/Test.spec.js +28 -28
  265. package/test/unit/specs/components/LoginApp.spec.js +21 -21
  266. package/test/unit/specs/sevices/ConfigService.spec.js +23 -23
  267. package/test/unit/specs/sevices/GetDBTest.spec.js +28 -28
@@ -1,625 +1,625 @@
1
- <template>
2
- <div class="loginbg" id="outheight">
3
- <!--输入框-->
4
- <div class="htmleaf-container">
5
- <div class="wrapper" :class="{'form-success': login}">
6
- <div class="container">
7
- <h3 style="color:white; margin-top: 15px">欢迎使用</h3>
8
- <p class="form" style="margin-top:{{margintop}}px">
9
- <input type="text" v-model="ename" class="usericon">
10
- <input :type="showpass==true?'text':'password'" v-model="password" class="psicon"><img :src="imageurl" style="width: 20px;margin-bottom: 5px;position: absolute;left: 62%;bottom: 43%;" alt="" @click="changepass()">
11
- <button type="button" id="login-button" @click.prevent="confirm()"><strong>登录</strong></button>
12
- </p>
13
- <div class="row">
14
- <img src="../assets/选中.png" style="width: 20px;margin-bottom: 5px" alt="" v-if="showsave"@click="showoff()">
15
- <img src="../assets/未选.png" style="width: 20px;margin-bottom: 5px" alt="" v-if="!showsave" @click="showon()">
16
- <span class="text-left font">记住密码</span>
17
- <img src="../assets/选中.png" style="width: 20px;margin-bottom: 5px" alt="" v-if="showauto == '1'"@click="showoff1()">
18
- <img src="../assets/未选.png" style="width: 20px;margin-bottom: 5px" alt="" v-if="showauto == '2'" @click="showon1()">
19
- <span class="text-left font">自动登录</span>
20
- <p></p>
21
- <span class="devicetext">设备码:{{deviceIemi}}</span>
22
- </div>
23
- </div>
24
- </div>
25
- </div>
26
- <!--<load-appdata @ready="onReady"></load-appdata>-->
27
- <div style="width: 100%;height: 100%;position: fixed;top: 0px;" v-show="loaderShow">
28
- <div id="loading" class="loading">登陆中...</div>
29
- </div>
30
- <modal :show.sync="modifyPassword" backdrop="false">
31
- <header slot="modal-header" class="modal-header">
32
- </header>
33
- <article slot="modal-body" class="modal-body">
34
- <modify-pass-word :sourse="login" :weak-password="weakPassword" v-if="modifyPassword" v-on:success="success"></modify-pass-word>
35
- </article>
36
- <footer slot="modal-footer" class="modal-footer">
37
- </footer>
38
- </modal>
39
- </div>
40
- </template>
41
- <script>
42
- import Vue from 'vue'
43
- import * as Util from '../Util'
44
- import JSEncrypt from 'jsencrypt'
45
- import $ from 'jquery'
46
- import co from 'co'
47
- //获取json配置文件
48
- let asyncReady = async function(self,url) {
49
- // 获取配置信息
50
- try {
51
- // console.log(`获取参数信息++++${Vue.user.f_orgids}+++++${Vue.androidUtil.getProxyUrl()}`)
52
- await self.$appdata.load()
53
- let that = self
54
- let res = await Vue.resetget(`${url}/phone/rs/vue`,{data: {}},{resolveMsg: null, rejectMsg: null})
55
- that.$set('config',res.data)
56
- Vue.config2 = res.data
57
- // 判断是否需要弱密码校验
58
- if(self.config && self.config.telephone && self.config.telephone.LoginApp && "undefined" != typeof self.config.telephone.LoginApp.weakPassword){
59
- self.weakPassword = self.config.telephone.LoginApp.weakPassword
60
- }
61
- console.log("手机端获取.json文件")
62
- console.log(JSON.stringify(self.config))
63
- return true
64
- } catch (error) {
65
- // 此处业务数据装载异常不做任何处理,理论上不会有任何异常
66
- self.$showMessage('登录系统: 获取配置文件失败,请检查网络后重新登陆!')
67
- return false
68
- }
69
- }
70
-
71
- //装载业务数据
72
- let asyncLoadData = async function(self,url) {
73
- try {
74
- // 读取报建本地配置文件
75
- var result = HostApp.readLocalFile('workflow_apply.json')
76
- if(result.code == 500){
77
- console.log('不存在流程配置文件,即不使用报建app')
78
- return
79
- }
80
- var data = JSON.parse(result.data)
81
- console.log('读取报建配置文件成功,存入缓存中的data=>' + JSON.stringify(data))
82
- Vue.workflow_vue = Vue.prototype.$workflow_vue = data
83
- } catch (error) {
84
- // 此处业务数据装载异常不做任何处理,理论上不会有任何异常,只有当app版本端版本较低无readlocalfile时会异常
85
- console.log(error)
86
- }
87
- }
88
-
89
- export default {
90
- title: '登录系统',
91
- data() {
92
- return {
93
- loaderShow:false,
94
- config:{},
95
- weakPassword:false,
96
- modifyPassword:false,
97
- ename: '',
98
- login:'login',
99
- password: '',
100
- showsave:true,
101
- showauto:'2', // 1 自动登陆 2取消自动登陆
102
- showpass:false,
103
- imageurl:require('../assets/miwen.png'),
104
- deviceIemi:'无法获取该设备码,请联系管理员',
105
- loginSafe:false,
106
- margintop: document.documentElement.clientHeight * 0.1
107
- }
108
- },
109
-
110
- ready () {
111
- if(Vue.android) {
112
- let userPp1 = this.$androidUtil.getPreference('login_user_cache')
113
- this.showauto = this.$androidUtil.getPreference('auto_login')
114
- this.showauto = this.showauto ? this.showauto : '2'
115
- console.log(`自动登陆标识ready:${this.showauto}`)
116
- if(userPp1){
117
- console.log(`1返回值是:${userPp1}`)
118
- userPp1 = userPp1.replace(/\'/g,'\"')
119
- console.log(`2返回值是:${userPp1}`)
120
- let userZs = JSON.parse(userPp1)
121
- this.password = userZs.password
122
- this.ename = userZs.username
123
- }
124
- this.deviceIemi = this.$androidUtil.getDeviceIEMI()
125
- console.log(`手机设备码:${this.deviceIemi}`)
126
- if(this.showauto == '1' && this.password){
127
- this.confirm()
128
- }
129
- }
130
-
131
- // if(Vue.android) {
132
- // let version = HostApp.getAppVersion().data
133
- // this.$set('version', version)
134
- // }
135
- },
136
- methods: {
137
- success(val){
138
- // 修改密码成功
139
- this.modifyPassword = false
140
- this.password = val
141
- },
142
- // 对资源菜单进行排序
143
- sortFunctions(val){
144
- if(val && val.length > 0){
145
- for(var i = 0;i<val.length-1;i++){
146
- for(var j = 0;j<val.length-1-i;j++){
147
- if(val[j].position > val[j+1].position){
148
- var temp = val[j+1]
149
- val[j+1] = val[j]
150
- val[j] = temp;
151
- }
152
- }
153
- }
154
- return val
155
- }
156
- return val
157
- },
158
- // 记住密码选中/未选中
159
- showoff(){
160
- this.showsave = false
161
- },
162
- showon(){
163
- this.showsave = true
164
- },
165
- showoff1(){
166
- this.showauto = '2'
167
- },
168
- showon1(){
169
- this.showauto = '1'
170
- },
171
- changepass(){
172
- this.showpass=this.showpass?false:true
173
- if(this.showpass){
174
- this.imageurl=require("../assets/mingwen.png")
175
- }else{
176
- this.imageurl=require("../assets/miwen.png")
177
- }
178
-
179
- },
180
- async confirm() {
181
- this.loaderShow=true
182
- console.log('Vue.android:' + Vue.android)
183
- let data = {username: this.ename, password: this.password}
184
- console.log('获取登陆信息:' + data)
185
- Vue.dataUrl = this.$androidUtil.getProxyUrl() + "/"
186
- // rsa加密
187
- let encrypt = new JSEncrypt();
188
- encrypt.setPublicKey('MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqPvovSfXcwBbW8cKMCgwqNpsYuzF8RPAPFb7LGsnVo44JhM/xxzDyzoYtdfNmtbIuKVi9PzIsyp6rg+09gbuI6UGwBZ5DWBDBMqv5MPdOF5dCQkB2Bbr5yPfURPENypUz+pBFBg41d+BC+rwRiXELwKy7Y9caD/MtJyHydj8OUwIDAQAB');
189
- data = encrypt.encrypt(JSON.stringify(data))
190
- console.log(data)
191
- try {
192
- let ret={}
193
- try{
194
- ret = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/user/userLogin/手机服务`, data, {
195
- resolveMsg: null,
196
- rejectMsg: null
197
- })
198
- console.log('获取登陆信息:' + JSON.stringify(ret.data) )
199
- console.log('当前登录维修员:' + ret.data.name)
200
- }catch (e) {
201
- if (Vue.android){
202
- this.loaderShow=false
203
- this.$showMessage("登陆失败,请检查账号密码是否有误,如多次失败请联系管理员核对账号密码!")
204
- }
205
- return
206
- }
207
- // 设置登录人
208
- Vue.user = Util.f = ret.data
209
- if (ret.data.state != '在职') {
210
- this.loaderShow=false
211
- return this.$showMessage("登陆失败,该账号已被注销!")
212
- }
213
- // 对资源菜单进行排序
214
- let viewDetails = await Vue.resetpost(`${this.$androidUtil.getProxyUrl()}/rs/search`, {
215
- source: 'this.getRights().where(row.getType()==$function$ && row.getPath($name$).indexOf($功能权限$) != -1)',
216
- userid: Vue.user.id
217
- }, {resolveMsg: null, rejectMsg: null})
218
- let r = viewDetails.data
219
- Vue.user.r = []
220
- r.forEach(x => Vue.user.r.push(x.name))
221
-
222
-
223
- Vue.functions = this.sortFunctions(ret.data.functions)
224
- console.log('登陆人信息',JSON.stringify(Vue.user))
225
- let userStr
226
- if (Vue.android){
227
- console.log(`Device_IEMI:${this.$androidUtil.getPreference('Device_IEMI')}`)
228
- // 判断是否需要验证 设备码
229
- if(this.$androidUtil.getPreference('Device_IEMI')){
230
- console.log(`手机设备码:${this.deviceIemi}`)
231
- let result = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/sql/tel_singleTable_OrderBy`,{data: {items: '*', tablename: 't_equipment', orderitem: 'id desc', condition:`f_terminal_number = '${this.deviceIemi}' and f_state = '正常'`}},{resolveMsg: null, rejectMsg: null})
232
- console.log(`检测设备码存在是否:${result.data.length}`)
233
- if(result.data.length == 0){
234
- HostApp.alert('设备码未绑定,请联系管理员!')
235
- return
236
- }
237
- }
238
- if(this.showsave){
239
- userStr = `{'username':'${this.ename}','password':'${this.password}'}`
240
- }else{
241
- userStr = `{'username':'${this.ename}','password':''}`
242
- }
243
- console.log(this.showauto)
244
- this.$androidUtil.setPreference('login_user_cache', userStr)
245
- this.$androidUtil.setPreference('f_repairman_id', Util.f.id)
246
- this.$androidUtil.setPreference('f_repairman_name', Util.f.name)
247
- this.$androidUtil.setPreference('f_role_name', Util.f.f_role_name || '')
248
- console.log("自动登陆标识"+Util.f.f_role_name)
249
- console.log(this.showauto)
250
- this.$androidUtil.setPreference('auto_login',this.showauto)
251
- }
252
- Vue.$login = {jwt: ret.data.id}
253
- // 获取参数
254
- console.log('获取参数system以及安检参数')
255
- var flag = await asyncReady(this,this.$androidUtil.getProxyUrl())
256
- if(!flag){
257
- this.loaderShow=false
258
- console.log('获取参数异常')
259
- return
260
- }
261
- console.log('获取参数结束')
262
- // console.log('登陆验证成功时装载业务数据')
263
- // asyncLoadData()
264
- // console.log('装载业务数据结束')
265
- this.loaderShow=false
266
- // 弱口令验证
267
- if (this.weakPassword && !(/^(?:(?=.*[a-zA-Z])(?=.*[0-9])(?=.*[^A-Za-z0-9])).*$/.test(this.password))) {
268
- await this.$showMessage('登录系统: 此账户的密码过于简单,请修改密码后重新登陆!!!', ['confirm'])
269
- this.modifyPassword = true
270
- return
271
- }
272
- this.$goto('nav-bottom')
273
- }catch (e) {
274
- if (Vue.android)
275
- this.loaderShow=false
276
- this.$showMessage("登陆失败!")
277
- }
278
- },
279
- // readConfig (url) {
280
- // let gen =
281
- // return co(gen)
282
- // },
283
- },
284
- watch:{
285
- 'config'(val){
286
- Vue.config = val
287
- }
288
- }
289
- }
290
- </script>
291
- <style scoped="">
292
- .devicetext {
293
- font: 13px PingFang-SC-Medium;
294
- position:fixed;
295
- width:100%;
296
- bottom:13px;
297
- transform: translate(-50%, -50%);
298
- }
299
- /*输入框样式*/
300
- /*@import url(http://fonts.useso.com/css?family=Source+Sans+Pro:200,300);*/
301
- * {
302
- box-sizing: border-box;
303
- margin: 0;
304
- padding: 0;
305
- font-weight: 300;
306
- }
307
- .loginbg {
308
- font-family: 'Source Sans Pro', sans-serif;
309
- color: white;
310
- font-weight: 300;
311
- }
312
- .loginbg ::-webkit-input-placeholder {
313
- /* WebKit browsers */
314
- font-family: 'Source Sans Pro', sans-serif;
315
- color: white;
316
- font-weight: 300;
317
- }
318
- .loginbg :-moz-placeholder {
319
- /* Mozilla Firefox 4 to 18 */
320
- font-family: 'Source Sans Pro', sans-serif;
321
- color: white;
322
- opacity: 1;
323
- font-weight: 300;
324
- }
325
- .loginbg ::-moz-placeholder {
326
- /* Mozilla Firefox 19+ */
327
- font-family: 'Source Sans Pro', sans-serif;
328
- color: white;
329
- opacity: 1;
330
- font-weight: 300;
331
- }
332
- .loginbg :-ms-input-placeholder {
333
- /* Internet Explorer 10+ */
334
- font-family: 'Source Sans Pro', sans-serif;
335
- color: white;
336
- font-weight: 300;
337
- }
338
- .wrapper {
339
- /*background: #2D83BA;
340
- background: -webkit-linear-gradient(top left, #2D83BA 0%, #2D83BA 100%);
341
- background: linear-gradient(to bottom right, #2D83BA 0%, #2D83BA 100%);
342
- opacity: 0.8;*/
343
- /*position: absolute;*/
344
- /*top: 50%;
345
- right: 10%;
346
- width: 40%;
347
- height: 350px;
348
- margin-top: -150px;*/
349
- overflow: hidden;
350
- }
351
-
352
- .wrapper.form-success .container h3{
353
- -webkit-transform: translateY(85px);
354
- -ms-transform: translateY(85px);
355
- transform: translateY(85px);
356
- }
357
- .container {
358
- /*max-width: 350px;*/
359
- margin: 0 auto;
360
- /*padding: 30px 100px 50px 100px;
361
- height: 350px;*/
362
- text-align: center;
363
- /*以下增加*/
364
- /*background: #2D83BA;
365
- background: -webkit-linear-gradient(top left, #2D83BA 0%, #2D83BA 100%);
366
- background: linear-gradient(to bottom right, #2D83BA 0%, #2D83BA 100%);*/
367
- opacity: 0.8;
368
- }
369
- .container h3{
370
- font-size: 40px;
371
- -webkit-transition-duration: 1s;
372
- transition-duration: 1s;
373
- -webkit-transition-timing-function: ease-in-put;
374
- transition-timing-function: ease-in-put;
375
- font-weight: 200;
376
- }
377
- .form {
378
- padding: 20px 0;
379
- /*margin-top: 15%;*/
380
- position: relative;
381
- z-index: 2;
382
- }
383
- .form input {
384
- -webkit-appearance: none;
385
- -moz-appearance: none;
386
- appearance: none;
387
- outline: 0;
388
- border: 1px solid #50ABE6;
389
- background-color: #50ABE6;
390
- width: 250px;
391
- border-radius: 3px;
392
- padding: 10px 15px;
393
- margin: 0 auto 10px auto;
394
- display: block;
395
- text-align: center;
396
- font-size: 18px;
397
- color: white;
398
- -webkit-transition-duration: 0.25s;
399
- transition-duration: 0.25s;
400
- font-weight: 300;
401
- }
402
- .form input:hover {
403
- background-color: rgba(255, 255, 255, 0.4);
404
- }
405
- .form input:focus {
406
- background-color: white;
407
- width: 300px;
408
- color: #53e3a6;
409
- }
410
- .usericon {
411
- background-image: url(../assets/usericon.png);
412
- background-repeat: no-repeat;
413
- background-size: 30px;
414
- background-position-x: 8px;
415
- background-position-y: 8px;
416
- }
417
- .psicon {
418
- background-image: url(../assets/psicon.png);
419
- background-repeat: no-repeat;
420
- background-size: 30px;
421
- background-position-x: 8px;
422
- background-position-y: 8px;
423
- }
424
- .form button {
425
- -webkit-appearance: none;
426
- -moz-appearance: none;
427
- appearance: none;
428
- outline: 0;
429
- background-color: white;
430
- border: 0;
431
- padding: 10px 15px;
432
- color: #253830;
433
- border-radius: 3px;
434
- width: 250px;
435
- cursor: pointer;
436
- font-size: 18px;
437
- -webkit-transition-duration: 0.25s;
438
- transition-duration: 0.25s;
439
- }
440
- .form button:hover {
441
- background-color: #f5f7f9;
442
- }
443
-
444
- /*注册字体样式*/
445
- .form span {
446
- color: #fff;
447
- display: table-footer-group;
448
- position: absolute;
449
- right: 10px;
450
- margin-top: 10px;
451
- cursor: pointer;
452
- }
453
- .logotitle {
454
- color: #fff;
455
- position: absolute;
456
- top: 50px;
457
- left: 50px;
458
- font-size: 50px;
459
- }
460
- /*注册模态框界面样式*/
461
- .modifystyle {
462
- background: #FCFEEE;
463
- }
464
- .modifystyle div{
465
- height: auto;
466
- margin-bottom: 15px;
467
- /*text-align: center;*/
468
- /*margin-left: 20%;*/
469
- }
470
- /*bootstrap字体图标要手动调整,所以使用字体图标的span必须紧跟在input后面,负责会错位*/
471
- .modifystyle div input + span{
472
- top: 0!important;
473
- right: 32%;
474
- }
475
- .modifystyle span{
476
- color: red;
477
- }
478
-
479
- /* 通告区内容 */
480
- .notice-board {
481
- height: auto;
482
- position: absolute;
483
- top: 50%;
484
- margin-top: -150px;
485
- margin-left: 100px;
486
- color: #fff;
487
- }
488
- /*修改密码底部按钮部分样式*/
489
- .footerbtn {
490
- text-align: center;
491
- padding: 15px;
492
- }
493
- .footerbtn button {
494
- width: 100px;
495
- margin-left: 20px;
496
- }
497
- .bg-bubbles {
498
- position: absolute;
499
- top: 0;
500
- left: 0;
501
- width: 100%;
502
- height: 100%;
503
- z-index: 1;
504
- }
505
- .bg-bubbles li {
506
- position: absolute;
507
- list-style: none;
508
- display: block;
509
- width: 40px;
510
- height: 40px;
511
- background-color: rgba(255, 255, 255, 0.15);
512
- bottom: -160px;
513
- -webkit-animation: square 25s infinite;
514
- animation: square 25s infinite;
515
- -webkit-transition-timing-function: linear;
516
- transition-timing-function: linear;
517
- }
518
- .bg-bubbles li:nth-child(1) {
519
- left: 10%;
520
- }
521
- .bg-bubbles li:nth-child(2) {
522
- left: 20%;
523
- width: 80px;
524
- height: 80px;
525
- -webkit-animation-delay: 2s;
526
- animation-delay: 2s;
527
- -webkit-animation-duration: 17s;
528
- animation-duration: 17s;
529
- }
530
- .bg-bubbles li:nth-child(3) {
531
- left: 25%;
532
- -webkit-animation-delay: 4s;
533
- animation-delay: 4s;
534
- }
535
- .bg-bubbles li:nth-child(4) {
536
- left: 40%;
537
- width: 60px;
538
- height: 60px;
539
- -webkit-animation-duration: 22s;
540
- animation-duration: 22s;
541
- background-color: rgba(255, 255, 255, 0.25);
542
- }
543
- .bg-bubbles li:nth-child(5) {
544
- left: 70%;
545
- }
546
- .bg-bubbles li:nth-child(6) {
547
- left: 80%;
548
- width: 120px;
549
- height: 120px;
550
- -webkit-animation-delay: 3s;
551
- animation-delay: 3s;
552
- background-color: rgba(255, 255, 255, 0.2);
553
- }
554
- .bg-bubbles li:nth-child(7) {
555
- left: 32%;
556
- width: 160px;
557
- height: 160px;
558
- -webkit-animation-delay: 7s;
559
- animation-delay: 7s;
560
- }
561
- .bg-bubbles li:nth-child(8) {
562
- left: 55%;
563
- width: 20px;
564
- height: 20px;
565
- -webkit-animation-delay: 15s;
566
- animation-delay: 15s;
567
- -webkit-animation-duration: 40s;
568
- animation-duration: 40s;
569
- }
570
- .bg-bubbles li:nth-child(9) {
571
- left: 25%;
572
- width: 10px;
573
- height: 10px;
574
- -webkit-animation-delay: 2s;
575
- animation-delay: 2s;
576
- -webkit-animation-duration: 40s;
577
- animation-duration: 40s;
578
- background-color: rgba(255, 255, 255, 0.3);
579
- }
580
- .bg-bubbles li:nth-child(10) {
581
- left: 90%;
582
- width: 160px;
583
- height: 160px;
584
- -webkit-animation-delay: 11s;
585
- animation-delay: 11s;
586
- }
587
- @-webkit-keyframes square {
588
- 0% {
589
- -webkit-transform: translateY(0);
590
- transform: translateY(0);
591
- }
592
- 100% {
593
- -webkit-transform: translateY(-700px) rotate(600deg);
594
- transform: translateY(-700px) rotate(600deg);
595
- }
596
- }
597
- @keyframes square {
598
- 0% {
599
- -webkit-transform: translateY(0);
600
- transform: translateY(0);
601
- }
602
- 100% {
603
- -webkit-transform: translateY(-700px) rotate(600deg);
604
- transform: translateY(-700px) rotate(600deg);
605
- }
606
- }
607
- .loading {
608
- width: 36%;
609
- height: 7%;
610
- position: absolute;
611
- top: 30%;
612
- left: 32%;
613
- line-height: 56px;
614
- color: #fff;
615
- padding-left: 60px;
616
- font-size: 15px;
617
- background: #000 url(../assets/loging.gif) no-repeat 10px 50%;
618
- opacity: 0.7;
619
- z-index: 9999;
620
- -moz-border-radius: 20px;
621
- -webkit-border-radius: 20px;
622
- border-radius: 20px;
623
- filter: progid:DXImageTransform.Microsoft.Alpha(opacity=70);
624
- }
625
- </style>
1
+ <template>
2
+ <div class="loginbg" id="outheight">
3
+ <!--输入框-->
4
+ <div class="htmleaf-container">
5
+ <div class="wrapper" :class="{'form-success': login}">
6
+ <div class="container">
7
+ <h3 style="color:white; margin-top: 15px">欢迎使用</h3>
8
+ <p class="form" style="margin-top:{{margintop}}px">
9
+ <input type="text" v-model="ename" class="usericon">
10
+ <input :type="showpass==true?'text':'password'" v-model="password" class="psicon"><img :src="imageurl" style="width: 20px;margin-bottom: 5px;position: absolute;left: 62%;bottom: 43%;" alt="" @click="changepass()">
11
+ <button type="button" id="login-button" @click.prevent="confirm()"><strong>登录</strong></button>
12
+ </p>
13
+ <div class="row">
14
+ <img src="../assets/选中.png" style="width: 20px;margin-bottom: 5px" alt="" v-if="showsave"@click="showoff()">
15
+ <img src="../assets/未选.png" style="width: 20px;margin-bottom: 5px" alt="" v-if="!showsave" @click="showon()">
16
+ <span class="text-left font">记住密码</span>
17
+ <img src="../assets/选中.png" style="width: 20px;margin-bottom: 5px" alt="" v-if="showauto == '1'"@click="showoff1()">
18
+ <img src="../assets/未选.png" style="width: 20px;margin-bottom: 5px" alt="" v-if="showauto == '2'" @click="showon1()">
19
+ <span class="text-left font">自动登录</span>
20
+ <p></p>
21
+ <span class="devicetext">设备码:{{deviceIemi}}</span>
22
+ </div>
23
+ </div>
24
+ </div>
25
+ </div>
26
+ <!--<load-appdata @ready="onReady"></load-appdata>-->
27
+ <div style="width: 100%;height: 100%;position: fixed;top: 0px;" v-show="loaderShow">
28
+ <div id="loading" class="loading">登陆中...</div>
29
+ </div>
30
+ <modal :show.sync="modifyPassword" backdrop="false">
31
+ <header slot="modal-header" class="modal-header">
32
+ </header>
33
+ <article slot="modal-body" class="modal-body">
34
+ <modify-pass-word :sourse="login" :weak-password="weakPassword" v-if="modifyPassword" v-on:success="success"></modify-pass-word>
35
+ </article>
36
+ <footer slot="modal-footer" class="modal-footer">
37
+ </footer>
38
+ </modal>
39
+ </div>
40
+ </template>
41
+ <script>
42
+ import Vue from 'vue'
43
+ import * as Util from '../Util'
44
+ import JSEncrypt from 'jsencrypt'
45
+ import $ from 'jquery'
46
+ import co from 'co'
47
+ //获取json配置文件
48
+ let asyncReady = async function(self,url) {
49
+ // 获取配置信息
50
+ try {
51
+ // console.log(`获取参数信息++++${Vue.user.f_orgids}+++++${Vue.androidUtil.getProxyUrl()}`)
52
+ await self.$appdata.load()
53
+ let that = self
54
+ let res = await Vue.resetget(`${url}/phone/rs/vue`,{data: {}},{resolveMsg: null, rejectMsg: null})
55
+ that.$set('config',res.data)
56
+ Vue.config2 = res.data
57
+ // 判断是否需要弱密码校验
58
+ if(self.config && self.config.telephone && self.config.telephone.LoginApp && "undefined" != typeof self.config.telephone.LoginApp.weakPassword){
59
+ self.weakPassword = self.config.telephone.LoginApp.weakPassword
60
+ }
61
+ console.log("手机端获取.json文件")
62
+ console.log(JSON.stringify(self.config))
63
+ return true
64
+ } catch (error) {
65
+ // 此处业务数据装载异常不做任何处理,理论上不会有任何异常
66
+ self.$showMessage('登录系统: 获取配置文件失败,请检查网络后重新登陆!')
67
+ return false
68
+ }
69
+ }
70
+
71
+ //装载业务数据
72
+ let asyncLoadData = async function(self,url) {
73
+ try {
74
+ // 读取报建本地配置文件
75
+ var result = HostApp.readLocalFile('workflow_apply.json')
76
+ if(result.code == 500){
77
+ console.log('不存在流程配置文件,即不使用报建app')
78
+ return
79
+ }
80
+ var data = JSON.parse(result.data)
81
+ console.log('读取报建配置文件成功,存入缓存中的data=>' + JSON.stringify(data))
82
+ Vue.workflow_vue = Vue.prototype.$workflow_vue = data
83
+ } catch (error) {
84
+ // 此处业务数据装载异常不做任何处理,理论上不会有任何异常,只有当app版本端版本较低无readlocalfile时会异常
85
+ console.log(error)
86
+ }
87
+ }
88
+
89
+ export default {
90
+ title: '登录系统',
91
+ data() {
92
+ return {
93
+ loaderShow:false,
94
+ config:{},
95
+ weakPassword:false,
96
+ modifyPassword:false,
97
+ ename: '',
98
+ login:'login',
99
+ password: '',
100
+ showsave:true,
101
+ showauto:'2', // 1 自动登陆 2取消自动登陆
102
+ showpass:false,
103
+ imageurl:require('../assets/miwen.png'),
104
+ deviceIemi:'无法获取该设备码,请联系管理员',
105
+ loginSafe:false,
106
+ margintop: document.documentElement.clientHeight * 0.1
107
+ }
108
+ },
109
+
110
+ ready () {
111
+ if(Vue.android) {
112
+ let userPp1 = this.$androidUtil.getPreference('login_user_cache')
113
+ this.showauto = this.$androidUtil.getPreference('auto_login')
114
+ this.showauto = this.showauto ? this.showauto : '2'
115
+ console.log(`自动登陆标识ready:${this.showauto}`)
116
+ if(userPp1){
117
+ console.log(`1返回值是:${userPp1}`)
118
+ userPp1 = userPp1.replace(/\'/g,'\"')
119
+ console.log(`2返回值是:${userPp1}`)
120
+ let userZs = JSON.parse(userPp1)
121
+ this.password = userZs.password
122
+ this.ename = userZs.username
123
+ }
124
+ this.deviceIemi = this.$androidUtil.getDeviceIEMI()
125
+ console.log(`手机设备码:${this.deviceIemi}`)
126
+ if(this.showauto == '1' && this.password){
127
+ this.confirm()
128
+ }
129
+ }
130
+
131
+ // if(Vue.android) {
132
+ // let version = HostApp.getAppVersion().data
133
+ // this.$set('version', version)
134
+ // }
135
+ },
136
+ methods: {
137
+ success(val){
138
+ // 修改密码成功
139
+ this.modifyPassword = false
140
+ this.password = val
141
+ },
142
+ // 对资源菜单进行排序
143
+ sortFunctions(val){
144
+ if(val && val.length > 0){
145
+ for(var i = 0;i<val.length-1;i++){
146
+ for(var j = 0;j<val.length-1-i;j++){
147
+ if(val[j].position > val[j+1].position){
148
+ var temp = val[j+1]
149
+ val[j+1] = val[j]
150
+ val[j] = temp;
151
+ }
152
+ }
153
+ }
154
+ return val
155
+ }
156
+ return val
157
+ },
158
+ // 记住密码选中/未选中
159
+ showoff(){
160
+ this.showsave = false
161
+ },
162
+ showon(){
163
+ this.showsave = true
164
+ },
165
+ showoff1(){
166
+ this.showauto = '2'
167
+ },
168
+ showon1(){
169
+ this.showauto = '1'
170
+ },
171
+ changepass(){
172
+ this.showpass=this.showpass?false:true
173
+ if(this.showpass){
174
+ this.imageurl=require("../assets/mingwen.png")
175
+ }else{
176
+ this.imageurl=require("../assets/miwen.png")
177
+ }
178
+
179
+ },
180
+ async confirm() {
181
+ this.loaderShow=true
182
+ console.log('Vue.android:' + Vue.android)
183
+ let data = {username: this.ename, password: this.password}
184
+ console.log('获取登陆信息:' + data)
185
+ Vue.dataUrl = this.$androidUtil.getProxyUrl() + "/"
186
+ // rsa加密
187
+ let encrypt = new JSEncrypt();
188
+ encrypt.setPublicKey('MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqPvovSfXcwBbW8cKMCgwqNpsYuzF8RPAPFb7LGsnVo44JhM/xxzDyzoYtdfNmtbIuKVi9PzIsyp6rg+09gbuI6UGwBZ5DWBDBMqv5MPdOF5dCQkB2Bbr5yPfURPENypUz+pBFBg41d+BC+rwRiXELwKy7Y9caD/MtJyHydj8OUwIDAQAB');
189
+ data = encrypt.encrypt(JSON.stringify(data))
190
+ console.log(data)
191
+ try {
192
+ let ret={}
193
+ try{
194
+ ret = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/user/userLogin/手机服务`, data, {
195
+ resolveMsg: null,
196
+ rejectMsg: null
197
+ })
198
+ console.log('获取登陆信息:' + JSON.stringify(ret.data) )
199
+ console.log('当前登录维修员:' + ret.data.name)
200
+ }catch (e) {
201
+ if (Vue.android){
202
+ this.loaderShow=false
203
+ this.$showMessage("登陆失败,请检查账号密码是否有误,如多次失败请联系管理员核对账号密码!")
204
+ }
205
+ return
206
+ }
207
+ // 设置登录人
208
+ Vue.user = Util.f = ret.data
209
+ if (ret.data.state != '在职') {
210
+ this.loaderShow=false
211
+ return this.$showMessage("登陆失败,该账号已被注销!")
212
+ }
213
+ // 对资源菜单进行排序
214
+ let viewDetails = await Vue.resetpost(`${this.$androidUtil.getProxyUrl()}/rs/search`, {
215
+ source: 'this.getRights().where(row.getType()==$function$ && row.getPath($name$).indexOf($功能权限$) != -1)',
216
+ userid: Vue.user.id
217
+ }, {resolveMsg: null, rejectMsg: null})
218
+ let r = viewDetails.data
219
+ Vue.user.r = []
220
+ r.forEach(x => Vue.user.r.push(x.name))
221
+
222
+
223
+ Vue.functions = this.sortFunctions(ret.data.functions)
224
+ console.log('登陆人信息',JSON.stringify(Vue.user))
225
+ let userStr
226
+ if (Vue.android){
227
+ console.log(`Device_IEMI:${this.$androidUtil.getPreference('Device_IEMI')}`)
228
+ // 判断是否需要验证 设备码
229
+ if(this.$androidUtil.getPreference('Device_IEMI')){
230
+ console.log(`手机设备码:${this.deviceIemi}`)
231
+ let result = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/sql/tel_singleTable_OrderBy`,{data: {items: '*', tablename: 't_equipment', orderitem: 'id desc', condition:`f_terminal_number = '${this.deviceIemi}' and f_state = '正常'`}},{resolveMsg: null, rejectMsg: null})
232
+ console.log(`检测设备码存在是否:${result.data.length}`)
233
+ if(result.data.length == 0){
234
+ HostApp.alert('设备码未绑定,请联系管理员!')
235
+ return
236
+ }
237
+ }
238
+ if(this.showsave){
239
+ userStr = `{'username':'${this.ename}','password':'${this.password}'}`
240
+ }else{
241
+ userStr = `{'username':'${this.ename}','password':''}`
242
+ }
243
+ console.log(this.showauto)
244
+ this.$androidUtil.setPreference('login_user_cache', userStr)
245
+ this.$androidUtil.setPreference('f_repairman_id', Util.f.id)
246
+ this.$androidUtil.setPreference('f_repairman_name', Util.f.name)
247
+ this.$androidUtil.setPreference('f_role_name', Util.f.f_role_name || '')
248
+ console.log("自动登陆标识"+Util.f.f_role_name)
249
+ console.log(this.showauto)
250
+ this.$androidUtil.setPreference('auto_login',this.showauto)
251
+ }
252
+ Vue.$login = {jwt: ret.data.id}
253
+ // 获取参数
254
+ console.log('获取参数system以及安检参数')
255
+ var flag = await asyncReady(this,this.$androidUtil.getProxyUrl())
256
+ if(!flag){
257
+ this.loaderShow=false
258
+ console.log('获取参数异常')
259
+ return
260
+ }
261
+ console.log('获取参数结束')
262
+ // console.log('登陆验证成功时装载业务数据')
263
+ // asyncLoadData()
264
+ // console.log('装载业务数据结束')
265
+ this.loaderShow=false
266
+ // 弱口令验证
267
+ if (this.weakPassword && !(/^(?:(?=.*[a-zA-Z])(?=.*[0-9])(?=.*[^A-Za-z0-9])).*$/.test(this.password))) {
268
+ await this.$showMessage('登录系统: 此账户的密码过于简单,请修改密码后重新登陆!!!', ['confirm'])
269
+ this.modifyPassword = true
270
+ return
271
+ }
272
+ this.$goto('nav-bottom')
273
+ }catch (e) {
274
+ if (Vue.android)
275
+ this.loaderShow=false
276
+ this.$showMessage("登陆失败!")
277
+ }
278
+ },
279
+ // readConfig (url) {
280
+ // let gen =
281
+ // return co(gen)
282
+ // },
283
+ },
284
+ watch:{
285
+ 'config'(val){
286
+ Vue.config = val
287
+ }
288
+ }
289
+ }
290
+ </script>
291
+ <style scoped="">
292
+ .devicetext {
293
+ font: 13px PingFang-SC-Medium;
294
+ position:fixed;
295
+ width:100%;
296
+ bottom:13px;
297
+ transform: translate(-50%, -50%);
298
+ }
299
+ /*输入框样式*/
300
+ /*@import url(http://fonts.useso.com/css?family=Source+Sans+Pro:200,300);*/
301
+ * {
302
+ box-sizing: border-box;
303
+ margin: 0;
304
+ padding: 0;
305
+ font-weight: 300;
306
+ }
307
+ .loginbg {
308
+ font-family: 'Source Sans Pro', sans-serif;
309
+ color: white;
310
+ font-weight: 300;
311
+ }
312
+ .loginbg ::-webkit-input-placeholder {
313
+ /* WebKit browsers */
314
+ font-family: 'Source Sans Pro', sans-serif;
315
+ color: white;
316
+ font-weight: 300;
317
+ }
318
+ .loginbg :-moz-placeholder {
319
+ /* Mozilla Firefox 4 to 18 */
320
+ font-family: 'Source Sans Pro', sans-serif;
321
+ color: white;
322
+ opacity: 1;
323
+ font-weight: 300;
324
+ }
325
+ .loginbg ::-moz-placeholder {
326
+ /* Mozilla Firefox 19+ */
327
+ font-family: 'Source Sans Pro', sans-serif;
328
+ color: white;
329
+ opacity: 1;
330
+ font-weight: 300;
331
+ }
332
+ .loginbg :-ms-input-placeholder {
333
+ /* Internet Explorer 10+ */
334
+ font-family: 'Source Sans Pro', sans-serif;
335
+ color: white;
336
+ font-weight: 300;
337
+ }
338
+ .wrapper {
339
+ /*background: #2D83BA;
340
+ background: -webkit-linear-gradient(top left, #2D83BA 0%, #2D83BA 100%);
341
+ background: linear-gradient(to bottom right, #2D83BA 0%, #2D83BA 100%);
342
+ opacity: 0.8;*/
343
+ /*position: absolute;*/
344
+ /*top: 50%;
345
+ right: 10%;
346
+ width: 40%;
347
+ height: 350px;
348
+ margin-top: -150px;*/
349
+ overflow: hidden;
350
+ }
351
+
352
+ .wrapper.form-success .container h3{
353
+ -webkit-transform: translateY(85px);
354
+ -ms-transform: translateY(85px);
355
+ transform: translateY(85px);
356
+ }
357
+ .container {
358
+ /*max-width: 350px;*/
359
+ margin: 0 auto;
360
+ /*padding: 30px 100px 50px 100px;
361
+ height: 350px;*/
362
+ text-align: center;
363
+ /*以下增加*/
364
+ /*background: #2D83BA;
365
+ background: -webkit-linear-gradient(top left, #2D83BA 0%, #2D83BA 100%);
366
+ background: linear-gradient(to bottom right, #2D83BA 0%, #2D83BA 100%);*/
367
+ opacity: 0.8;
368
+ }
369
+ .container h3{
370
+ font-size: 40px;
371
+ -webkit-transition-duration: 1s;
372
+ transition-duration: 1s;
373
+ -webkit-transition-timing-function: ease-in-put;
374
+ transition-timing-function: ease-in-put;
375
+ font-weight: 200;
376
+ }
377
+ .form {
378
+ padding: 20px 0;
379
+ /*margin-top: 15%;*/
380
+ position: relative;
381
+ z-index: 2;
382
+ }
383
+ .form input {
384
+ -webkit-appearance: none;
385
+ -moz-appearance: none;
386
+ appearance: none;
387
+ outline: 0;
388
+ border: 1px solid #50ABE6;
389
+ background-color: #50ABE6;
390
+ width: 250px;
391
+ border-radius: 3px;
392
+ padding: 10px 15px;
393
+ margin: 0 auto 10px auto;
394
+ display: block;
395
+ text-align: center;
396
+ font-size: 18px;
397
+ color: white;
398
+ -webkit-transition-duration: 0.25s;
399
+ transition-duration: 0.25s;
400
+ font-weight: 300;
401
+ }
402
+ .form input:hover {
403
+ background-color: rgba(255, 255, 255, 0.4);
404
+ }
405
+ .form input:focus {
406
+ background-color: white;
407
+ width: 300px;
408
+ color: #53e3a6;
409
+ }
410
+ .usericon {
411
+ background-image: url(../assets/usericon.png);
412
+ background-repeat: no-repeat;
413
+ background-size: 30px;
414
+ background-position-x: 8px;
415
+ background-position-y: 8px;
416
+ }
417
+ .psicon {
418
+ background-image: url(../assets/psicon.png);
419
+ background-repeat: no-repeat;
420
+ background-size: 30px;
421
+ background-position-x: 8px;
422
+ background-position-y: 8px;
423
+ }
424
+ .form button {
425
+ -webkit-appearance: none;
426
+ -moz-appearance: none;
427
+ appearance: none;
428
+ outline: 0;
429
+ background-color: white;
430
+ border: 0;
431
+ padding: 10px 15px;
432
+ color: #253830;
433
+ border-radius: 3px;
434
+ width: 250px;
435
+ cursor: pointer;
436
+ font-size: 18px;
437
+ -webkit-transition-duration: 0.25s;
438
+ transition-duration: 0.25s;
439
+ }
440
+ .form button:hover {
441
+ background-color: #f5f7f9;
442
+ }
443
+
444
+ /*注册字体样式*/
445
+ .form span {
446
+ color: #fff;
447
+ display: table-footer-group;
448
+ position: absolute;
449
+ right: 10px;
450
+ margin-top: 10px;
451
+ cursor: pointer;
452
+ }
453
+ .logotitle {
454
+ color: #fff;
455
+ position: absolute;
456
+ top: 50px;
457
+ left: 50px;
458
+ font-size: 50px;
459
+ }
460
+ /*注册模态框界面样式*/
461
+ .modifystyle {
462
+ background: #FCFEEE;
463
+ }
464
+ .modifystyle div{
465
+ height: auto;
466
+ margin-bottom: 15px;
467
+ /*text-align: center;*/
468
+ /*margin-left: 20%;*/
469
+ }
470
+ /*bootstrap字体图标要手动调整,所以使用字体图标的span必须紧跟在input后面,负责会错位*/
471
+ .modifystyle div input + span{
472
+ top: 0!important;
473
+ right: 32%;
474
+ }
475
+ .modifystyle span{
476
+ color: red;
477
+ }
478
+
479
+ /* 通告区内容 */
480
+ .notice-board {
481
+ height: auto;
482
+ position: absolute;
483
+ top: 50%;
484
+ margin-top: -150px;
485
+ margin-left: 100px;
486
+ color: #fff;
487
+ }
488
+ /*修改密码底部按钮部分样式*/
489
+ .footerbtn {
490
+ text-align: center;
491
+ padding: 15px;
492
+ }
493
+ .footerbtn button {
494
+ width: 100px;
495
+ margin-left: 20px;
496
+ }
497
+ .bg-bubbles {
498
+ position: absolute;
499
+ top: 0;
500
+ left: 0;
501
+ width: 100%;
502
+ height: 100%;
503
+ z-index: 1;
504
+ }
505
+ .bg-bubbles li {
506
+ position: absolute;
507
+ list-style: none;
508
+ display: block;
509
+ width: 40px;
510
+ height: 40px;
511
+ background-color: rgba(255, 255, 255, 0.15);
512
+ bottom: -160px;
513
+ -webkit-animation: square 25s infinite;
514
+ animation: square 25s infinite;
515
+ -webkit-transition-timing-function: linear;
516
+ transition-timing-function: linear;
517
+ }
518
+ .bg-bubbles li:nth-child(1) {
519
+ left: 10%;
520
+ }
521
+ .bg-bubbles li:nth-child(2) {
522
+ left: 20%;
523
+ width: 80px;
524
+ height: 80px;
525
+ -webkit-animation-delay: 2s;
526
+ animation-delay: 2s;
527
+ -webkit-animation-duration: 17s;
528
+ animation-duration: 17s;
529
+ }
530
+ .bg-bubbles li:nth-child(3) {
531
+ left: 25%;
532
+ -webkit-animation-delay: 4s;
533
+ animation-delay: 4s;
534
+ }
535
+ .bg-bubbles li:nth-child(4) {
536
+ left: 40%;
537
+ width: 60px;
538
+ height: 60px;
539
+ -webkit-animation-duration: 22s;
540
+ animation-duration: 22s;
541
+ background-color: rgba(255, 255, 255, 0.25);
542
+ }
543
+ .bg-bubbles li:nth-child(5) {
544
+ left: 70%;
545
+ }
546
+ .bg-bubbles li:nth-child(6) {
547
+ left: 80%;
548
+ width: 120px;
549
+ height: 120px;
550
+ -webkit-animation-delay: 3s;
551
+ animation-delay: 3s;
552
+ background-color: rgba(255, 255, 255, 0.2);
553
+ }
554
+ .bg-bubbles li:nth-child(7) {
555
+ left: 32%;
556
+ width: 160px;
557
+ height: 160px;
558
+ -webkit-animation-delay: 7s;
559
+ animation-delay: 7s;
560
+ }
561
+ .bg-bubbles li:nth-child(8) {
562
+ left: 55%;
563
+ width: 20px;
564
+ height: 20px;
565
+ -webkit-animation-delay: 15s;
566
+ animation-delay: 15s;
567
+ -webkit-animation-duration: 40s;
568
+ animation-duration: 40s;
569
+ }
570
+ .bg-bubbles li:nth-child(9) {
571
+ left: 25%;
572
+ width: 10px;
573
+ height: 10px;
574
+ -webkit-animation-delay: 2s;
575
+ animation-delay: 2s;
576
+ -webkit-animation-duration: 40s;
577
+ animation-duration: 40s;
578
+ background-color: rgba(255, 255, 255, 0.3);
579
+ }
580
+ .bg-bubbles li:nth-child(10) {
581
+ left: 90%;
582
+ width: 160px;
583
+ height: 160px;
584
+ -webkit-animation-delay: 11s;
585
+ animation-delay: 11s;
586
+ }
587
+ @-webkit-keyframes square {
588
+ 0% {
589
+ -webkit-transform: translateY(0);
590
+ transform: translateY(0);
591
+ }
592
+ 100% {
593
+ -webkit-transform: translateY(-700px) rotate(600deg);
594
+ transform: translateY(-700px) rotate(600deg);
595
+ }
596
+ }
597
+ @keyframes square {
598
+ 0% {
599
+ -webkit-transform: translateY(0);
600
+ transform: translateY(0);
601
+ }
602
+ 100% {
603
+ -webkit-transform: translateY(-700px) rotate(600deg);
604
+ transform: translateY(-700px) rotate(600deg);
605
+ }
606
+ }
607
+ .loading {
608
+ width: 36%;
609
+ height: 7%;
610
+ position: absolute;
611
+ top: 30%;
612
+ left: 32%;
613
+ line-height: 56px;
614
+ color: #fff;
615
+ padding-left: 60px;
616
+ font-size: 15px;
617
+ background: #000 url(../assets/loging.gif) no-repeat 10px 50%;
618
+ opacity: 0.7;
619
+ z-index: 9999;
620
+ -moz-border-radius: 20px;
621
+ -webkit-border-radius: 20px;
622
+ border-radius: 20px;
623
+ filter: progid:DXImageTransform.Microsoft.Alpha(opacity=70);
624
+ }
625
+ </style>