system-phone 3.0.48 → 3.0.49-10

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