system-clients 3.2.78 → 3.2.79

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 (266) hide show
  1. package/.babelrc +5 -5
  2. package/.editorconfig +9 -9
  3. package/.eslintrc.js +16 -16
  4. package/.gradle/7.4/checksums/checksums.lock +0 -0
  5. package/.gradle/7.4/dependencies-accessors/dependencies-accessors.lock +0 -0
  6. package/.gradle/7.4/dependencies-accessors/gc.properties +0 -0
  7. package/.gradle/7.4/executionHistory/executionHistory.bin +0 -0
  8. package/.gradle/7.4/executionHistory/executionHistory.lock +0 -0
  9. package/.gradle/7.4/fileChanges/last-build.bin +0 -0
  10. package/.gradle/7.4/fileHashes/fileHashes.bin +0 -0
  11. package/.gradle/7.4/fileHashes/fileHashes.lock +0 -0
  12. package/.gradle/7.4/gc.properties +0 -0
  13. package/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  14. package/.gradle/buildOutputCleanup/cache.properties +2 -0
  15. package/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
  16. package/.gradle/file-system.probe +0 -0
  17. package/.gradle/vcs-1/gc.properties +0 -0
  18. package/CHANGELOG.md +51 -51
  19. package/README.md +36 -36
  20. package/SystemClient.iml +8 -8
  21. package/build/css-loaders.js +34 -34
  22. package/build/dev-client.js +8 -8
  23. package/build/example-server.js +80 -80
  24. package/build/release.sh +28 -28
  25. package/build/utils.js +71 -71
  26. package/build/webpack.base.conf.js +85 -85
  27. package/build/webpack.dev.conf.js +31 -31
  28. package/build/webpack.example.conf.js +49 -49
  29. package/build/webpack.prod.conf.js +60 -60
  30. package/build/webpack.test.conf.js +31 -31
  31. package/build.gradle +6 -6
  32. package/config/dev.env.js +6 -6
  33. package/config/index.js +38 -38
  34. package/config/prod.env.js +3 -3
  35. package/config/test.env.js +6 -6
  36. package/doc/Login.md +7 -7
  37. package/examples/LoginPage/App.vue +21 -21
  38. package/examples/LoginPage/index.html +11 -11
  39. package/examples/LoginPage/main.js +15 -15
  40. package/examples/ReadCard/App.vue +23 -23
  41. package/examples/ReadCard/index.html +11 -11
  42. package/examples/ReadCard/main.js +12 -12
  43. package/index.html +21 -21
  44. package/package.json +1 -1
  45. package/release.bat +5 -5
  46. package/src/App.vue +24 -24
  47. package/src/LodopFuncs.js +123 -123
  48. package/src/assets/binding.svg +1 -1
  49. package/src/assets/unbind.svg +1 -1
  50. package/src/assets//345/205/254/345/221/212.svg +1 -1
  51. package/src/assets//347/207/203/346/260/224/347/274/264/350/264/271.eps +116 -116
  52. package/src/assets//350/201/224/347/263/273/346/210/221/344/273/254.svg +1 -1
  53. package/src/components/List.vue +51 -51
  54. package/src/components/Main.vue +923 -923
  55. package/src/components/TabButton.vue +201 -201
  56. package/src/components/Table.js +74 -74
  57. package/src/components/Tabs.vue +67 -67
  58. package/src/components/Util.js +343 -343
  59. package/src/components/addressManage/AddressCascadingMenu.vue +145 -145
  60. package/src/components/common/ProgressBase.vue +83 -83
  61. package/src/components/equipment/EquipmentManage.vue +65 -65
  62. package/src/components/equipment/PcAdd.vue +105 -105
  63. package/src/components/equipment/PcList.vue +119 -119
  64. package/src/components/equipment/PcManage.vue +60 -60
  65. package/src/components/equipment/PhoneAdd.vue +107 -107
  66. package/src/components/equipment/PhoneList.vue +112 -112
  67. package/src/components/equipment/PhoneManage.vue +60 -60
  68. package/src/components/equipment/PosAdd.vue +323 -323
  69. package/src/components/equipment/PosList.vue +294 -294
  70. package/src/components/equipment/PosManage.vue +138 -138
  71. package/src/components/equipment/PosManageBoth.vue +125 -125
  72. package/src/components/equipment/PosParamAdd.vue +236 -236
  73. package/src/components/equipment/PosParamList.vue +121 -121
  74. package/src/components/equipment/PosParamManage.vue +51 -51
  75. package/src/components/materialManage/materialData.vue +44 -44
  76. package/src/components/materialManage/materialList.vue +255 -255
  77. package/src/components/parammanage/ParamManage.vue +42 -42
  78. package/src/components/parammanage/ParamManages.vue +43 -43
  79. package/src/components/parammanage/ParamPage.vue +337 -337
  80. package/src/components/parammanage/ParamPages.vue +222 -222
  81. package/src/components/parammanage/SinglePage.vue +235 -235
  82. package/src/components/parammanage/SinglePages.vue +167 -167
  83. package/src/components/server/AddChangeMsg.vue +66 -66
  84. package/src/components/server/ChangeDeclare.vue +45 -45
  85. package/src/components/server/IconTree.vue +26 -26
  86. package/src/components/server/ImageVieweTest.vue +56 -56
  87. package/src/components/server/ImageViewer.vue +350 -350
  88. package/src/components/server/LeftTree.vue +111 -111
  89. package/src/components/server/LoadData.vue +55 -55
  90. package/src/components/server/Login.vue +566 -566
  91. package/src/components/server/LoginPage.vue +235 -235
  92. package/src/components/server/LoginView.vue +128 -128
  93. package/src/components/server/Menu.vue +188 -188
  94. package/src/components/server/ModifyPw.vue +125 -125
  95. package/src/components/server/PcdBuildingSelect.vue +241 -241
  96. package/src/components/server/ResSelect.vue +166 -155
  97. package/src/components/server/ResSelectGroup.vue +6 -0
  98. package/src/components/server/RightTree.vue +348 -348
  99. package/src/components/server/RoleSelector.vue +88 -88
  100. package/src/components/server/TestResSelect.vue +58 -58
  101. package/src/components/server/TestResSelectGroup.vue +388 -388
  102. package/src/components/server/TestRightTree.vue +42 -42
  103. package/src/filiale/baole/Login.vue +568 -568
  104. package/src/filiale/baole/system.js +5 -5
  105. package/src/filiale/chengtou/Login.vue +537 -537
  106. package/src/filiale/chengtou/system.js +5 -5
  107. package/src/filiale/dongguan/Login.vue +900 -900
  108. package/src/filiale/dongguan/Main.vue +715 -715
  109. package/src/filiale/dongguan/system.js +6 -6
  110. package/src/filiale/furuike/Login.vue +583 -583
  111. package/src/filiale/furuike/Main.vue +827 -827
  112. package/src/filiale/furuike/system.js +7 -7
  113. package/src/filiale/gehua/Main.vue +807 -807
  114. package/src/filiale/gehua/system.js +6 -6
  115. package/src/filiale/konggang/Login.vue +470 -470
  116. package/src/filiale/konggang/system.js +7 -7
  117. package/src/filiale/qianneng/Login.vue +566 -566
  118. package/src/filiale/qianneng/Main.vue +816 -816
  119. package/src/filiale/qianneng/ModifyPw.vue +107 -107
  120. package/src/filiale/qianneng/system.js +11 -11
  121. package/src/filiale/rizhao/LeftTree.vue +111 -111
  122. package/src/filiale/rizhao/Login.vue +791 -791
  123. package/src/filiale/rizhao/Main.vue +611 -611
  124. package/src/filiale/rizhao/system.js +14 -14
  125. package/src/filiale/shiquan/Login.vue +564 -564
  126. package/src/filiale/shiquan/system.js +8 -8
  127. package/src/filiale/tianyi/Login.vue +571 -571
  128. package/src/filiale/tianyi/system.js +5 -5
  129. package/src/filiale/tongchuan/Login.vue +561 -561
  130. package/src/filiale/tongchuan/Main.vue +1019 -1019
  131. package/src/filiale/tongchuan/system.js +7 -7
  132. package/src/filiale/wenxi/Login.vue +535 -535
  133. package/src/filiale/wenxi/Main.vue +785 -785
  134. package/src/filiale/wenxi/system.js +10 -10
  135. package/src/filiale/wuhai/LeftTree.vue +141 -141
  136. package/src/filiale/wuhai/Main.vue +807 -807
  137. package/src/filiale/wuhai/system.js +10 -10
  138. package/src/filiale/yuchuan/Login.vue +889 -889
  139. package/src/filiale/yuchuan/Main.vue +864 -864
  140. package/src/filiale/yuchuan/system.js +10 -10
  141. package/src/filiale/zhoukou/Main.vue +807 -807
  142. package/src/filiale/zhoukou/system.js +6 -6
  143. package/src/index.js +7 -7
  144. package/src/plugins/EncryptUtil.js +53 -53
  145. package/src/plugins/GetLoginInfoService.js +536 -536
  146. package/src/plugins/HeatGetLoginInfoService.js +491 -491
  147. package/src/plugins/validation.js +15 -15
  148. package/src/project/ProjectPage.vue +24 -24
  149. package/src/project/State.js +17 -17
  150. package/src/stores/AppData.js +38 -38
  151. package/src/stores/HeatAppData.js +38 -38
  152. package/src/styles/fonts/glyphicons-halflings-regular.svg +288 -288
  153. package/src/styles/less/.csscomb.json +304 -304
  154. package/src/styles/less/.csslintrc +19 -19
  155. package/src/styles/less/alerts.less +73 -73
  156. package/src/styles/less/aofeng/animate.min.css +10 -10
  157. package/src/styles/less/aofeng/expandcss.less +569 -569
  158. package/src/styles/less/aofeng/login.less +367 -367
  159. package/src/styles/less/aofeng/standard.less +2507 -2507
  160. package/src/styles/less/aofeng/themeOne/BinaryTemplate.less +690 -690
  161. package/src/styles/less/aofeng/themeOne/loginStyle.less +1586 -1586
  162. package/src/styles/less/aofeng/themeOne/systemStyle.less +2650 -2650
  163. package/src/styles/less/aofeng/themeOne.less +17 -17
  164. package/src/styles/less/aofeng/themeTwo/newStyle1.less +415 -415
  165. package/src/styles/less/aofeng/themeTwo.less +3 -3
  166. package/src/styles/less/badges.less +66 -66
  167. package/src/styles/less/bootstrap.less +66 -66
  168. package/src/styles/less/breadcrumbs.less +26 -26
  169. package/src/styles/less/button-groups.less +247 -247
  170. package/src/styles/less/buttons.less +172 -172
  171. package/src/styles/less/carousel.less +269 -269
  172. package/src/styles/less/close.less +34 -34
  173. package/src/styles/less/code.less +69 -69
  174. package/src/styles/less/component-animations.less +33 -33
  175. package/src/styles/less/dropdowns.less +216 -216
  176. package/src/styles/less/fonts-list.less +25 -25
  177. package/src/styles/less/forms.less +626 -626
  178. package/src/styles/less/glyphicons.less +305 -305
  179. package/src/styles/less/grid.less +84 -84
  180. package/src/styles/less/input-groups.less +167 -167
  181. package/src/styles/less/jumbotron.less +52 -52
  182. package/src/styles/less/labels.less +64 -64
  183. package/src/styles/less/list-group.less +141 -141
  184. package/src/styles/less/manageStyle/manageChile.less +180 -180
  185. package/src/styles/less/manageStyle/manageStyle/manageChile.less +180 -180
  186. package/src/styles/less/manageStyle/manageStyle/manageStyle.less +1102 -1102
  187. package/src/styles/less/manageStyle/manageStyle/safeStyle.less +498 -498
  188. package/src/styles/less/manageStyle/manageStyle.less +1102 -1102
  189. package/src/styles/less/manageStyle/safeStyle.less +498 -498
  190. package/src/styles/less/media.less +66 -66
  191. package/src/styles/less/mixins/alerts.less +14 -14
  192. package/src/styles/less/mixins/background-variant.less +9 -9
  193. package/src/styles/less/mixins/border-radius.less +18 -18
  194. package/src/styles/less/mixins/buttons.less +69 -69
  195. package/src/styles/less/mixins/center-block.less +7 -7
  196. package/src/styles/less/mixins/clearfix.less +22 -22
  197. package/src/styles/less/mixins/forms.less +90 -90
  198. package/src/styles/less/mixins/gradients.less +59 -59
  199. package/src/styles/less/mixins/grid-framework.less +92 -92
  200. package/src/styles/less/mixins/grid.less +122 -122
  201. package/src/styles/less/mixins/hide-text.less +21 -21
  202. package/src/styles/less/mixins/image.less +33 -33
  203. package/src/styles/less/mixins/labels.less +12 -12
  204. package/src/styles/less/mixins/list-group.less +30 -30
  205. package/src/styles/less/mixins/nav-divider.less +10 -10
  206. package/src/styles/less/mixins/nav-vertical-align.less +9 -9
  207. package/src/styles/less/mixins/opacity.less +8 -8
  208. package/src/styles/less/mixins/pagination.less +24 -24
  209. package/src/styles/less/mixins/panels.less +24 -24
  210. package/src/styles/less/mixins/progress-bar.less +10 -10
  211. package/src/styles/less/mixins/reset-filter.less +8 -8
  212. package/src/styles/less/mixins/reset-text.less +18 -18
  213. package/src/styles/less/mixins/resize.less +6 -6
  214. package/src/styles/less/mixins/responsive-visibility.less +15 -15
  215. package/src/styles/less/mixins/size.less +10 -10
  216. package/src/styles/less/mixins/tab-focus.less +9 -9
  217. package/src/styles/less/mixins/table-row.less +44 -44
  218. package/src/styles/less/mixins/text-emphasis.less +9 -9
  219. package/src/styles/less/mixins/text-overflow.less +8 -8
  220. package/src/styles/less/mixins/vendor-prefixes.less +227 -227
  221. package/src/styles/less/mixins.less +40 -40
  222. package/src/styles/less/modals.less +151 -151
  223. package/src/styles/less/navbar.less +660 -660
  224. package/src/styles/less/navs.less +285 -285
  225. package/src/styles/less/normalize.less +424 -424
  226. package/src/styles/less/pager.less +76 -76
  227. package/src/styles/less/pagination.less +89 -89
  228. package/src/styles/less/panels.less +275 -275
  229. package/src/styles/less/popovers.less +131 -131
  230. package/src/styles/less/print.less +101 -101
  231. package/src/styles/less/progress-bars.less +87 -87
  232. package/src/styles/less/responsive-embed.less +35 -35
  233. package/src/styles/less/responsive-utilities.less +194 -194
  234. package/src/styles/less/scaffolding.less +161 -161
  235. package/src/styles/less/stand.less +207 -207
  236. package/src/styles/less/tables.less +312 -312
  237. package/src/styles/less/theme.less +291 -291
  238. package/src/styles/less/thumbnails.less +36 -36
  239. package/src/styles/less/tooltip.less +102 -102
  240. package/src/styles/less/type.less +316 -316
  241. package/src/styles/less/utilities.less +55 -55
  242. package/src/styles/less/variables.less +899 -899
  243. package/src/styles/less/wells.less +29 -29
  244. package/src/system.js +121 -121
  245. package/src/systemphone.js +11 -11
  246. package/src/util/Daiban.json +12 -12
  247. package/src/util/LdapHelper.js +75 -75
  248. package/test/e2e/custom-assertions/elementCount.js +26 -26
  249. package/test/e2e/nightwatch.conf.js +40 -40
  250. package/test/e2e/runner.js +30 -30
  251. package/test/e2e/specs/test.js +14 -14
  252. package/test/unit/.eslintrc +5 -5
  253. package/test/unit/index.js +13 -13
  254. package/test/unit/init.js +10 -10
  255. package/test/unit/karma.conf.js +49 -49
  256. package/test/unit/specs/base64.spec.js +5 -5
  257. package/test/unit/specs/components/parammanage/ParamPage.spec.js +20 -20
  258. package/test/unit/specs/components/parammanage/SinglePage.spec.js +20 -20
  259. package/test/unit/specs/components/server/LeftTree/App.vue +18 -18
  260. package/test/unit/specs/components/server/LeftTree/LeftTree.spec.js +22 -22
  261. package/test/unit/specs/components/server/LoadData.spec.js +24 -24
  262. package/test/unit/specs/components/server/Login.spec.js +61 -61
  263. package/test/unit/specs/components/server/RightTree.spec.js +50 -50
  264. package/test/unit/specs/plugins/GetLoginInfoService.spec.js +55 -55
  265. package/test/unit/test.html +76 -76
  266. package/yarn-error.log +6896 -6896
@@ -1,583 +1,583 @@
1
- <template>
2
- <div class="ssoLoadingMain" v-if="!showlogin && isSso">
3
- <img class="ssoLoadingImg" src="../../../static/newStyle/login-do.gif">
4
- </div>
5
- <div class="syslogin" v-if="showlogin">
6
- <img style="position: fixed; left: 50px; top: 50px; height: 70px" src="../../../static/furuike/logo2.jpg">
7
- <div class="login-title" >
8
- <div class="row auto">
9
- <marquee style="width:80%;margin-top:25px"><span style="font-size: 1.8rem;color: white;">{{notice}}</span></marquee>
10
- <div class="login-title-chi" style="white-space: nowrap;margin-right:-5%">
11
- <div v-if="titleShow">
12
- <img src="../../../static/newStyle/login-info.png"/>
13
- <span @click="showus=true">关于我们</span>
14
- </div>
15
- </div>
16
- </div>
17
- </div>
18
-
19
- <modal :show.sync="showus" backdrop="true" width="50%" style="width:auto;">
20
- <article slot="modal-body" class="modal-body" >
21
- <img style="height:100%;width:100%" src="../../../static/newStyle/about-us.png"/>
22
- </article>
23
- <footer slot="modal-footer" class="modal-footer">
24
- </footer>
25
- </modal>
26
-
27
-
28
- <div class="logoew" v-if="logoandroid" >
29
- <div v-if="logoandroid" class="imglogo"></div>
30
- <p class="logocontent">燃气客服系统Android版</p>
31
- <p class="logofooter">(仅浏览器扫描)</p>
32
- </div>
33
- <!--输入框-->
34
- <div class="loginmain">
35
- <!-- <img src="../../../static/login_title1.png" alt="图片加载未完成" class="img-responsive" style="margin: 0 auto; padding-top: 150px;" /> -->
36
- <div class="loginmain-left">
37
- <img class="loginmain-left-img" src="../../../static/newStyle/login-left.png">
38
- </div>
39
- <div class="loginmain-right" style="padding-top: 1%">
40
-
41
- <div style="display: flex;align-items: center;gap: 10px;height: fit-content">
42
- <img style="height: 50px; width: 60px" src="../../../static/furuike/logo1.jpg">
43
- <p @click="theme()" style="white-space: nowrap">{{config.title}}</p>
44
- </div>
45
-
46
-
47
- <form v-show="!login">
48
- <!-- <input type="text" placeholder="用户名" v-model="model.ename" class="usericon">-->
49
- <div class="login-input">
50
- <img src="../../../static/newStyle/login-user.png"/>
51
- <input type="text" style="display: inline;background-color: white!important;" placeholder="用户名" v-model="model.ename"/>
52
- </div>
53
- <div class="login-input">
54
- <img src="../../../static/newStyle/login-pwd.png"/>
55
- <input type="password" placeholder="密码" style="display: inline;background-color: darkgray;" v-model="model.password"
56
- @keyup.enter="confirm('key')"/>
57
- </div>
58
- <div class="login-input-1" v-if="$login.Verification">
59
- <img src="../../../static/newStyle/login-check.png"/>
60
- <input class="login-check" type="text" placeholder="请输入验证码"
61
- v-model="picLyanzhengma" @keyup.enter="confirm('key')"/>
62
- </div>
63
- <div class="login-input-2" v-if="$login.Verification">
64
- <input class="login-check-1" style="display: inline;background-color:#eeeeee !important;"
65
- type="button" @click="createCode" v-model="checkCode"/>
66
- </div>
67
- <div class="login-bt" :style="{marginTop: $login.Verification ? '30%' : '10%'}">
68
- <button type="button" id="login-button" class="login-button" @click.prevent="confirm('click')">登录</button>
69
- </div>
70
- </form>
71
- <div v-show="login" class="login_load">
72
- <img src="../../../static/newStyle/login-do.gif">
73
- </div>
74
- </div>
75
- </div>
76
- <div class="login-foot" v-show="false">
77
- 技术支持:西安奥枫软件有限公司
78
- </div>
79
- <div class="login-foot" v-show="$login.BAinformation">
80
- {{{ $login.BAinformation }}}
81
- </div>
82
-
83
- <modal v-if="depPromptShow" :show.sync="depPromptShow" :backdrop="false" v-ref:modal >
84
- <header slot="modal-header" style="height: 8vh" class="modal-header">
85
- <!--<h4 class="modal-title">登录信息</h4>-->
86
- </header>
87
- <article slot="modal-body" class="modal-body">
88
- <form class="form-horizontal">
89
- <div class="row">
90
- <div class="col-sm-12 form-group">
91
- <label class="col-sm-5 ">当前登录人:</label>
92
- <label style="font-weight:normal">{{$login.f.name}}</label>
93
- </div>
94
- <!--<div class="col-sm-12 form-group" v-if="$login.f.number">-->
95
- <!--<label class="col-sm-5 ">组&nbsp;织&nbsp;编&nbsp;码:</label>-->
96
- <!--<label style="font-weight:normal">{{$login.f.number}}</label>-->
97
- <!-- <div class="col-sm-7">
98
- <span >{{$login.f.number}}</span>
99
- </div> -->
100
- <!--</div>-->
101
- <div class="col-sm-12 form-group">
102
- <label class="col-sm-5">所在销售点:</label>
103
- <label style="font-weight:normal">{{$login.f.deps}}</label>
104
- <!-- <div class="col-sm-7">
105
- <span >{{$login.f.deps}}</span>
106
- </div> -->
107
- </div>
108
- <div class="col-sm-12 " v-if="AppDaiBan !==''">
109
- <label class="col-sm-2">报装待办:</label>
110
- <span style="font-weight:normal">{{AppDaiBan}}</span>
111
- </div>
112
- <div class="col-sm-12 " v-if="OrderDaiBan !==''">
113
- <label class="col-sm-2">预约待办:</label>
114
- <span style="font-weight:normal">{{OrderDaiBan}}</span>
115
- </div>
116
- <div class="col-sm-12 " v-for="daibanitem in safecheckDaiBan">
117
- <label class="col-sm-2">{{daibanitem.oldData.title}}:</label>
118
- <span style="font-weight:normal">{{daibanitem.text}}</span>
119
- </div>
120
- </div>
121
- </form>
122
- </article>
123
- <footer slot="modal-footer" style="height: 8vh" class="modal-footer">
124
- <button class="button_search" @click="depPromptConfirm">确认</button>
125
- <button class="button_clear" @click="depPromptCancel">取消</button>
126
- </footer>
127
- </modal>
128
-
129
- <!-- 修改密码组件 -->
130
- <modify-pw :show.sync="modifyPwShow" v-if="modifyPwShow"></modify-pw>
131
- </div>
132
- </template>
133
-
134
- <script>
135
- import co from 'co'
136
- import $ from 'jquery'
137
- import Vue from 'vue'
138
- import {HttpResetClass} from 'vue-client'
139
-
140
- let daibanJson = require('../../util/Daiban.json')
141
-
142
-
143
- let saveGen = function *(self) {
144
- try {
145
- if(self.$login){
146
- // 账号ename,密码password,是否显示异地登陆
147
- yield self.$login.login(self.model.ename, self.model.password, true)
148
- }
149
- if(self.$appdata){
150
- yield self.$appdata.load()
151
-
152
- }
153
- if (Vue.$heatCompatibility) {
154
- try {
155
- if(self.$loginHeat){
156
- yield self.$loginHeat.login(self.model.ename, self.model.password)
157
- }
158
- if(self.$appdataHeat){
159
- yield self.$appdataHeat.load()
160
- }
161
- } catch (e) {
162
- console.log('热力系统登陆失败!')
163
- }
164
- }
165
- yield self.$getConfig(self, 'Login')
166
- console.log('登录配置', self.config)
167
- if (self.config.isMac) {
168
- // 获取该登录人分公司下的mac配置
169
- let getMacs = yield self.$resetpost('rs/sql/equipmentQuery', {data: {condition: `f_filialeids like '%${self.$login.f.f_orgids}%'`}}, {
170
- resolveMsg: null,
171
- rejectMsg: null
172
- }).catch(() => {
173
- throw new Error('获取mac配置失败')
174
- })
175
- console.log('MAC地址信息', getMacs)
176
- // 获取本地mac地址
177
- let getLocalMac = yield self.$resetget('http://127.0.0.1:8003/loadmac', {
178
- resolveMsg: null,
179
- rejectMsg: null
180
- }).catch(() => {
181
- throw new Error('获取本地mac配置失败')
182
- })
183
- console.log('本地MAC地址信息', getLocalMac)
184
- // 对Mac地址进行匹配
185
- let macValidate = false
186
- for (let i = 0; i < getLocalMac.data.mac.length; i++) {
187
- for (let j = 0; j < getMacs.data.length; j++) {
188
- if (getMacs.data[j].f_mac_number.toLocaleUpperCase() === getLocalMac.data.mac[i]) {
189
- macValidate = true
190
- }
191
- }
192
- }
193
- if (!macValidate) {
194
- throw new Error('Mac地址验证失败, 请联系管理员!!')
195
- }
196
- }
197
- console.log(self.$login.depPrompt)
198
- // 弱口令验证
199
- //跳转过来的不进行验证
200
- if ((!self.otherLogin) && self.config.weakPassword && !(/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,16}$/.test(self.model.password))) {
201
- self.$showMessage('登录系统: 此账户的密码过于简单,请修改密码后重新登陆!!!', ['confirm']).then((res) => {
202
- self.modifyPwShow = true
203
- })
204
- } else if ((!self.otherLogin) && self.$login.depPrompt) {
205
- self.depPromptShow = true
206
- if (self.$login.showDaiBan && self.$login.r.includes('展示预约信息')){
207
- // 获取待办
208
- self.getDaiBan()
209
-
210
- }
211
- if (self.$login.showDaiBan && self.$login.r.includes('登录预约信息')){
212
- // 获取待办 在util下有个Daiban.jsond 文件 ,在里面进行配置,在功能权限界面增加登录预约信息
213
- self.getDaiBanA()
214
- }
215
- } else {
216
- self.showlogin = false
217
- self.$goto('home-page', {functions: self.$login.f,config: self.config})
218
- // if (self.otherLogin){
219
- // window.history.pushState(null,null,'')
220
- // }
221
- if (self.$login) {
222
- console.log('登录信息', self.$login.f)
223
- global.login=self.$login.f
224
- console.log('登录信息', global.login)
225
- }
226
- }
227
-
228
- } catch (ret) {
229
- console.error('登录失败', ret)
230
- let msg
231
- if (ret instanceof Error) {
232
- msg = ret
233
- }
234
- if (ret.status === 0) {
235
- msg = '服务连接错误,请确认服务状态'
236
- } else if (ret.status === 401) {
237
- msg = ret.data
238
- } else if (ret.status === 710) {
239
- msg = ret.data
240
- }
241
- self.createCode()
242
- self.picLyanzhengma = ''
243
- yield self.$showMessage(msg)
244
- self.model.ename = ''
245
- self.model.password = ''
246
- self.login = false
247
- $('form').fadeIn(500)
248
- }
249
- }
250
- export default {
251
- title: '登录',
252
- async ready () {
253
- if (window.location.href.includes('ticket')) {
254
- this.isSso = true
255
- this.showlogin = false
256
- let url = window.location.href.split("?")[1]
257
- let obj = {}
258
- for (let params of url.split("&")) {
259
- let kv = params.split("=")
260
- obj[kv[0]] = kv[1]
261
- }
262
- let params = {
263
- st: obj.ticket,
264
- serviceKey: this.config.serviceKey
265
- }
266
- this.$resetpost('/sso/logic/serviceValidate', params,{resolveMsg: null, rejectMsg: null}).then((re) => {
267
- // this.$showMessage("re----" + JSON.stringify(re))
268
- if (re.data.code === 200) {
269
- this.showlogin = false
270
- let condition = `ename = '${re.data.data.userName}'`
271
- this.$resetpost('rs/sql/singleTable', {data: { items: '*', tablename: 't_user', condition: condition}}, {resolveMsg: null, rejectMsg: null}).then((res) => {
272
- if (res.data && res.data.length > 0) {
273
- this.model.ename = res.data[0].ename
274
- this.model.password = res.data[0].password
275
- // this.$showMessage("re----" + JSON.stringify(this.model))
276
- let gen = saveGen(this)
277
- return co(gen)
278
- } else {
279
- this.$showMessage('此账户不存在,请重试!!!', ['confirm']).then((res) => {
280
- if(res === 'confirm') {
281
- this.showlogin = true
282
- }
283
- })
284
- }
285
- })
286
- } else {
287
- this.showlogin = true
288
- }
289
- this.isSso = false
290
- })
291
- } else {
292
- this.titleShow = this.$appdata.getSingleValue('关于我们')
293
- window.versionTime = window.versionTime ? window.versionTime : new Date().getTime()
294
- this.vTime = this.format(new Date(window.versionTime));
295
- try{
296
- let http = new HttpResetClass()
297
- let res = await http.load('POST', 'rs/sql/singleTable',
298
- {data:{
299
- tablename: 't_changedeclare',
300
- condition: ` f_type ='变更通知' `
301
- }
302
- }, {resolveMsg: null, rejectMsg: null})
303
- if(res.data.length>0){
304
- console.log("---------------获取通知",res.data[0].f_change_message)
305
- this.notice=res.data[0].f_change_message
306
- }
307
- }catch(e){}
308
-
309
- this.loginother();
310
- $('#login-button').click(function (event) {
311
- event.preventDefault()
312
- $('form').fadeOut(500)
313
- })
314
- if (window.location.search && window.location.search.indexOf('af_key') !== -1&& window.location.search.indexOf('af_n') !== -1) {
315
- const subUrl = window.location.search.replace('?af_key=','').split('&af_n=')
316
- console.log(subUrl)
317
- this.model.ename = window.atob(subUrl[0])
318
- this.model.password = window.atob(subUrl[1])
319
- console.log('this.model.ename',this.model.ename)
320
- this.otherLogin = true
321
- this.confirm()
322
- }else{
323
- //跳转不需要验证码
324
- this.createCode()
325
- }
326
- console.log(this.$login)
327
- }
328
- },
329
- data () {
330
- return {
331
- vTime: '',
332
- image:{
333
- img1: '/images/newStyle/login-info.png',
334
- img2: '/images/newStyle/login-con.png',
335
- img3: '/images/newStyle/login-left.png',
336
- img4: '/images/newStyle/login-user.png',
337
- img5: '/images/newStyle/login-pwd.png',
338
- img6: '/images/newStyle/login-check.png',
339
- img7: '/images/newStyle/login-do.png',
340
- },
341
- config: {
342
- isMac: false,
343
- depPrompt: false,
344
- weakPassword: false,
345
- title: '燃气客服系统',
346
- distanceLogin: false,
347
- // 那些角色可以定时获取预约提示
348
- isTip : false,
349
- // 那些角色可以定时获取预约提示
350
- msgRole : '预约处理人员',
351
- // 定时获取提示间隔 单位:分钟
352
- times: 25,
353
- serviceKey: '5d83a22dd2824234b1580ede32530e99'
354
- },
355
- showlogin: true,
356
- isSso: false,
357
- titleShow: true, //标题显示
358
- otherLogin:false,
359
- login: false,
360
- depPromptShow: false,
361
- model: {},
362
- show: false,
363
- checkCode: '',
364
- login_do:true,
365
- picLyanzhengma: '',
366
- // 修改密码弹框展示
367
- modifyPwShow: false,
368
- logoandroid:false,
369
- showus:false,
370
- notice:'',
371
- loginotherflag :true,
372
- // 报建待办
373
- AppDaiBan: '',
374
- //安检待办
375
- safecheckDaiBan:[],
376
- // 预约待处理
377
- OrderDaiBan: ''
378
- }
379
- },
380
- methods: {
381
- //格式化时间
382
- format(dat){
383
- //获取年月日,时间
384
- const year = dat.getFullYear();
385
- const mon = (dat.getMonth()+1) < 10 ? "0"+(dat.getMonth()+1) : dat.getMonth()+1;
386
- const data = dat.getDate() < 10 ? "0"+(dat.getDate()) : dat.getDate();
387
- const hour = dat.getHours() < 10 ? "0"+(dat.getHours()) : dat.getHours();
388
- const min = dat.getMinutes() < 10 ? "0"+(dat.getMinutes()) : dat.getMinutes();
389
- const seon = dat.getSeconds() < 10 ? "0"+(dat.getSeconds()) : dat.getSeconds();
390
-
391
- return year + "-" + mon + "-" + data + " " + hour + ":" + min + ":" + seon;
392
- },
393
- async getDaiBan(){
394
- let http = new HttpResetClass()
395
- let condition = ''
396
- if(this.$login.f.deps!=='柠条塔'){
397
- condition = ` (f_orderstate != '预约成功' and f_orderstate != '预约失败' ) or f_orderstate is null `
398
- } else {
399
- condition =` f_orderstate is null and (f_address in( select f_address from t_user_address where f_slice_area='柠条塔') or f_address like '%柠条塔%') `
400
- }
401
- await http.load('POST', '/rs/sql/singleTable', {data: {
402
- tablename:'t_order_center',
403
- condition:condition
404
- }}, {
405
- resolveMsg: null,
406
- rejectMsg: null
407
- }).then((res) => {
408
- let OrderDaiBan = {}
409
- res.data.forEach(item=>{
410
- OrderDaiBan[item.f_ordertype] = OrderDaiBan[item.f_ordertype] || []
411
- OrderDaiBan[item.f_ordertype].push(item)
412
- })
413
- this.OrderDaiBan = `您有${res.data.length}条需要处理的微信预约业务!`
414
- if (res.data.length> 0){
415
- this.OrderDaiBan += `其中 ${Object.keys(OrderDaiBan).map(key=>`${key}:${OrderDaiBan[key].length}条`).join(', ')}`
416
- }
417
- })
418
- let data = {
419
- condition: '1 = 1',
420
- data: {
421
- orgid: this.$login.f.orgid,
422
- id: this.$login.f.id
423
- }
424
- }
425
- await http.load('POST', '/rs/sql/checkuser', {data: data}, {
426
- resolveMsg: null,
427
- rejectMsg: null
428
- }).then((res) => {
429
- let AppDaiBan = {}
430
- res.data.forEach(item=>{
431
- AppDaiBan[item.defname] = AppDaiBan[item.defname] || []
432
- AppDaiBan[item.defname].push(item)
433
- })
434
- this.AppDaiBan = `您有${res.data.length}条需要处理的报建待办业务!`
435
- if (res.data.length> 0){
436
- this.AppDaiBan += `其中 ${Object.keys(AppDaiBan).map(key=>`${key}:${AppDaiBan[key].length}条`).join(', ')}`
437
- }
438
- })
439
-
440
- },
441
- async getDaiBanA(){
442
- // 是否全局开启待办通知
443
- if (daibanJson.enable) {
444
- console.log("当前获取到待办配置为" + JSON.stringify(daibanJson))
445
- let http = new HttpResetClass()
446
- let daibanArray = []
447
- for (let daibanItem of daibanJson.daiban) {
448
- console.log("开始处理待办任务:" + daibanItem.title + "当前任务状态:" + daibanItem.enable?"开启":"关闭" )
449
- if (daibanItem.enable) { // 控制每一项通知是否开启
450
- let postResult = ''; //提示信息为
451
- await http.load("POST",daibanItem.url,{data:daibanItem.data},{ resolveMsg: null, rejectMsg: null})
452
- .then((res)=>{
453
- let responseData = res.data
454
- for (let item of responseData) {
455
- postResult += eval(daibanItem.text) + "\n"
456
- }
457
- postResult += '\t'
458
- daibanArray.push({text:postResult,oldData:daibanItem})
459
- })
460
- }
461
- }
462
- console.log("安检数据为:"+JSON.stringify(daibanArray))
463
- this.safecheckDaiBan = daibanArray
464
- }else {
465
- console.log("待办提醒全局关闭。")
466
- }
467
-
468
-
469
-
470
-
471
- },
472
-
473
- async loginother(){
474
- if (this.config.distanceLogin) {
475
- if (this.$login && this.$login.getUrlParames('name') ) {
476
- let ename = this.$login.getUrlParames('name');
477
- let logininfo = await this.$resetpost('rs/logic/getLoginData',{data:{ename:ename}},{resolveMsg: null, rejectMsg: null});
478
- if(logininfo.data){
479
- if(logininfo.data.ename && logininfo.data.password){
480
- this.model.ename = logininfo.data.ename
481
- this.model.password =logininfo.data.password
482
- let gen = saveGen(this)
483
- return co(gen)
484
- }
485
- }
486
- }
487
- }
488
- },
489
- theme(){
490
- // var elementList = document.querySelectorAll('body');
491
- // console.log(elementList)
492
- // document.querySelectorAll('body')[0].className='themeTwo'
493
- // var elementList = document.querySelectorAll('body');
494
- // console.log(elementList)
495
- },
496
- onReady () {
497
- this.$emit('ready')
498
- },
499
- confirm (key) {
500
- this.login_do=!this.login_do
501
- // return
502
- if (key == 'key') {
503
- $('form').fadeOut(500)
504
- }
505
- this.login = true
506
- // let gen = saveGen(this)
507
- // return co(gen)
508
- if((!this.otherLogin) && this.$login && this.$login.Verification){
509
- console.log('跳转过来的不走验证')
510
- if(this.picLyanzhengma == '') {
511
- this.$showMessage("请输入验证码!").then(()=>{
512
- this.login = false
513
- $('form').fadeIn(500)
514
- this.createCode()
515
- })
516
- }else if(this.picLyanzhengma.toUpperCase() != this.checkCode ) {
517
- //若输入的验证码与产生的验证码不一致时
518
- this.$showMessage("验证码不正确").then(()=>{
519
- this.login = false
520
- $('form').fadeIn(500)
521
- this.createCode();//刷新验证码
522
- this.picLyanzhengma = '';
523
- })
524
- }else {
525
- this.login = true
526
- let gen = saveGen(this)
527
- return co(gen)
528
- }
529
- }else {
530
- this.login = true
531
- let gen = saveGen(this)
532
- return co(gen)
533
- }
534
- },
535
- createCode(){
536
- let code = "";
537
- let codeLength = 4;//验证码的长度
538
- let random = new Array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
539
- 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z');//随机数
540
- for (let i = 0; i < codeLength; i++) {
541
- //循环操作
542
- let index = Math.floor(Math.random() * 36);//取得随机数的索引(0~35)
543
- code += random[index];//根据索引取得随机数加到code上
544
- }
545
- this.checkCode = code;//把code值赋给验证码
546
- },
547
-
548
- async depPromptConfirm () {
549
- this.depPromptShow = false
550
- this.showlogin = false
551
- return this.$goto('home-page', {functions: this.$login.f,config: this.config})
552
- },
553
-
554
- depPromptCancel () {
555
- this.depPromptShow = false
556
- this.createCode()
557
- this.picLyanzhengma = ''
558
- this.model.ename = ''
559
- this.model.password = ''
560
- this.login = false
561
- $('form').fadeIn(500)
562
- }
563
- },
564
- watch: {
565
- 'modifyPwShow' (val){
566
- if (!val) {
567
- window.location.reload()
568
- }
569
- }
570
- }
571
- }
572
- </script>
573
-
574
- <style>
575
- .ssoLoadingMain .ssoLoadingImg {
576
- position: absolute;
577
- top:0;
578
- left: 0;
579
- bottom: 0;
580
- right: 0;
581
- margin: auto;
582
- }
583
- </style>
1
+ <template>
2
+ <div class="ssoLoadingMain" v-if="!showlogin && isSso">
3
+ <img class="ssoLoadingImg" src="../../../static/newStyle/login-do.gif">
4
+ </div>
5
+ <div class="syslogin" v-if="showlogin">
6
+ <img style="position: fixed; left: 50px; top: 50px; height: 70px" src="../../../static/furuike/logo2.jpg">
7
+ <div class="login-title" >
8
+ <div class="row auto">
9
+ <marquee style="width:80%;margin-top:25px"><span style="font-size: 1.8rem;color: white;">{{notice}}</span></marquee>
10
+ <div class="login-title-chi" style="white-space: nowrap;margin-right:-5%">
11
+ <div v-if="titleShow">
12
+ <img src="../../../static/newStyle/login-info.png"/>
13
+ <span @click="showus=true">关于我们</span>
14
+ </div>
15
+ </div>
16
+ </div>
17
+ </div>
18
+
19
+ <modal :show.sync="showus" backdrop="true" width="50%" style="width:auto;">
20
+ <article slot="modal-body" class="modal-body" >
21
+ <img style="height:100%;width:100%" src="../../../static/newStyle/about-us.png"/>
22
+ </article>
23
+ <footer slot="modal-footer" class="modal-footer">
24
+ </footer>
25
+ </modal>
26
+
27
+
28
+ <div class="logoew" v-if="logoandroid" >
29
+ <div v-if="logoandroid" class="imglogo"></div>
30
+ <p class="logocontent">燃气客服系统Android版</p>
31
+ <p class="logofooter">(仅浏览器扫描)</p>
32
+ </div>
33
+ <!--输入框-->
34
+ <div class="loginmain">
35
+ <!-- <img src="../../../static/login_title1.png" alt="图片加载未完成" class="img-responsive" style="margin: 0 auto; padding-top: 150px;" /> -->
36
+ <div class="loginmain-left">
37
+ <img class="loginmain-left-img" src="../../../static/newStyle/login-left.png">
38
+ </div>
39
+ <div class="loginmain-right" style="padding-top: 1%">
40
+
41
+ <div style="display: flex;align-items: center;gap: 10px;height: fit-content">
42
+ <img style="height: 50px; width: 60px" src="../../../static/furuike/logo1.jpg">
43
+ <p @click="theme()" style="white-space: nowrap">{{config.title}}</p>
44
+ </div>
45
+
46
+
47
+ <form v-show="!login">
48
+ <!-- <input type="text" placeholder="用户名" v-model="model.ename" class="usericon">-->
49
+ <div class="login-input">
50
+ <img src="../../../static/newStyle/login-user.png"/>
51
+ <input type="text" style="display: inline;background-color: white!important;" placeholder="用户名" v-model="model.ename"/>
52
+ </div>
53
+ <div class="login-input">
54
+ <img src="../../../static/newStyle/login-pwd.png"/>
55
+ <input type="password" placeholder="密码" style="display: inline;background-color: darkgray;" v-model="model.password"
56
+ @keyup.enter="confirm('key')"/>
57
+ </div>
58
+ <div class="login-input-1" v-if="$login.Verification">
59
+ <img src="../../../static/newStyle/login-check.png"/>
60
+ <input class="login-check" type="text" placeholder="请输入验证码"
61
+ v-model="picLyanzhengma" @keyup.enter="confirm('key')"/>
62
+ </div>
63
+ <div class="login-input-2" v-if="$login.Verification">
64
+ <input class="login-check-1" style="display: inline;background-color:#eeeeee !important;"
65
+ type="button" @click="createCode" v-model="checkCode"/>
66
+ </div>
67
+ <div class="login-bt" :style="{marginTop: $login.Verification ? '30%' : '10%'}">
68
+ <button type="button" id="login-button" class="login-button" @click.prevent="confirm('click')">登录</button>
69
+ </div>
70
+ </form>
71
+ <div v-show="login" class="login_load">
72
+ <img src="../../../static/newStyle/login-do.gif">
73
+ </div>
74
+ </div>
75
+ </div>
76
+ <div class="login-foot" v-show="false">
77
+ 技术支持:西安奥枫软件有限公司
78
+ </div>
79
+ <div class="login-foot" v-show="$login.BAinformation">
80
+ {{{ $login.BAinformation }}}
81
+ </div>
82
+
83
+ <modal v-if="depPromptShow" :show.sync="depPromptShow" :backdrop="false" v-ref:modal >
84
+ <header slot="modal-header" style="height: 8vh" class="modal-header">
85
+ <!--<h4 class="modal-title">登录信息</h4>-->
86
+ </header>
87
+ <article slot="modal-body" class="modal-body">
88
+ <form class="form-horizontal">
89
+ <div class="row">
90
+ <div class="col-sm-12 form-group">
91
+ <label class="col-sm-5 ">当前登录人:</label>
92
+ <label style="font-weight:normal">{{$login.f.name}}</label>
93
+ </div>
94
+ <!--<div class="col-sm-12 form-group" v-if="$login.f.number">-->
95
+ <!--<label class="col-sm-5 ">组&nbsp;织&nbsp;编&nbsp;码:</label>-->
96
+ <!--<label style="font-weight:normal">{{$login.f.number}}</label>-->
97
+ <!-- <div class="col-sm-7">
98
+ <span >{{$login.f.number}}</span>
99
+ </div> -->
100
+ <!--</div>-->
101
+ <div class="col-sm-12 form-group">
102
+ <label class="col-sm-5">所在销售点:</label>
103
+ <label style="font-weight:normal">{{$login.f.deps}}</label>
104
+ <!-- <div class="col-sm-7">
105
+ <span >{{$login.f.deps}}</span>
106
+ </div> -->
107
+ </div>
108
+ <div class="col-sm-12 " v-if="AppDaiBan !==''">
109
+ <label class="col-sm-2">报装待办:</label>
110
+ <span style="font-weight:normal">{{AppDaiBan}}</span>
111
+ </div>
112
+ <div class="col-sm-12 " v-if="OrderDaiBan !==''">
113
+ <label class="col-sm-2">预约待办:</label>
114
+ <span style="font-weight:normal">{{OrderDaiBan}}</span>
115
+ </div>
116
+ <div class="col-sm-12 " v-for="daibanitem in safecheckDaiBan">
117
+ <label class="col-sm-2">{{daibanitem.oldData.title}}:</label>
118
+ <span style="font-weight:normal">{{daibanitem.text}}</span>
119
+ </div>
120
+ </div>
121
+ </form>
122
+ </article>
123
+ <footer slot="modal-footer" style="height: 8vh" class="modal-footer">
124
+ <button class="button_search" @click="depPromptConfirm">确认</button>
125
+ <button class="button_clear" @click="depPromptCancel">取消</button>
126
+ </footer>
127
+ </modal>
128
+
129
+ <!-- 修改密码组件 -->
130
+ <modify-pw :show.sync="modifyPwShow" v-if="modifyPwShow"></modify-pw>
131
+ </div>
132
+ </template>
133
+
134
+ <script>
135
+ import co from 'co'
136
+ import $ from 'jquery'
137
+ import Vue from 'vue'
138
+ import {HttpResetClass} from 'vue-client'
139
+
140
+ let daibanJson = require('../../util/Daiban.json')
141
+
142
+
143
+ let saveGen = function *(self) {
144
+ try {
145
+ if(self.$login){
146
+ // 账号ename,密码password,是否显示异地登陆
147
+ yield self.$login.login(self.model.ename, self.model.password, true)
148
+ }
149
+ if(self.$appdata){
150
+ yield self.$appdata.load()
151
+
152
+ }
153
+ if (Vue.$heatCompatibility) {
154
+ try {
155
+ if(self.$loginHeat){
156
+ yield self.$loginHeat.login(self.model.ename, self.model.password)
157
+ }
158
+ if(self.$appdataHeat){
159
+ yield self.$appdataHeat.load()
160
+ }
161
+ } catch (e) {
162
+ console.log('热力系统登陆失败!')
163
+ }
164
+ }
165
+ yield self.$getConfig(self, 'Login')
166
+ console.log('登录配置', self.config)
167
+ if (self.config.isMac) {
168
+ // 获取该登录人分公司下的mac配置
169
+ let getMacs = yield self.$resetpost('rs/sql/equipmentQuery', {data: {condition: `f_filialeids like '%${self.$login.f.f_orgids}%'`}}, {
170
+ resolveMsg: null,
171
+ rejectMsg: null
172
+ }).catch(() => {
173
+ throw new Error('获取mac配置失败')
174
+ })
175
+ console.log('MAC地址信息', getMacs)
176
+ // 获取本地mac地址
177
+ let getLocalMac = yield self.$resetget('http://127.0.0.1:8003/loadmac', {
178
+ resolveMsg: null,
179
+ rejectMsg: null
180
+ }).catch(() => {
181
+ throw new Error('获取本地mac配置失败')
182
+ })
183
+ console.log('本地MAC地址信息', getLocalMac)
184
+ // 对Mac地址进行匹配
185
+ let macValidate = false
186
+ for (let i = 0; i < getLocalMac.data.mac.length; i++) {
187
+ for (let j = 0; j < getMacs.data.length; j++) {
188
+ if (getMacs.data[j].f_mac_number.toLocaleUpperCase() === getLocalMac.data.mac[i]) {
189
+ macValidate = true
190
+ }
191
+ }
192
+ }
193
+ if (!macValidate) {
194
+ throw new Error('Mac地址验证失败, 请联系管理员!!')
195
+ }
196
+ }
197
+ console.log(self.$login.depPrompt)
198
+ // 弱口令验证
199
+ //跳转过来的不进行验证
200
+ if ((!self.otherLogin) && self.config.weakPassword && !(/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,16}$/.test(self.model.password))) {
201
+ self.$showMessage('登录系统: 此账户的密码过于简单,请修改密码后重新登陆!!!', ['confirm']).then((res) => {
202
+ self.modifyPwShow = true
203
+ })
204
+ } else if ((!self.otherLogin) && self.$login.depPrompt) {
205
+ self.depPromptShow = true
206
+ if (self.$login.showDaiBan && self.$login.r.includes('展示预约信息')){
207
+ // 获取待办
208
+ self.getDaiBan()
209
+
210
+ }
211
+ if (self.$login.showDaiBan && self.$login.r.includes('登录预约信息')){
212
+ // 获取待办 在util下有个Daiban.jsond 文件 ,在里面进行配置,在功能权限界面增加登录预约信息
213
+ self.getDaiBanA()
214
+ }
215
+ } else {
216
+ self.showlogin = false
217
+ self.$goto('home-page', {functions: self.$login.f,config: self.config})
218
+ // if (self.otherLogin){
219
+ // window.history.pushState(null,null,'')
220
+ // }
221
+ if (self.$login) {
222
+ console.log('登录信息', self.$login.f)
223
+ global.login=self.$login.f
224
+ console.log('登录信息', global.login)
225
+ }
226
+ }
227
+
228
+ } catch (ret) {
229
+ console.error('登录失败', ret)
230
+ let msg
231
+ if (ret instanceof Error) {
232
+ msg = ret
233
+ }
234
+ if (ret.status === 0) {
235
+ msg = '服务连接错误,请确认服务状态'
236
+ } else if (ret.status === 401) {
237
+ msg = ret.data
238
+ } else if (ret.status === 710) {
239
+ msg = ret.data
240
+ }
241
+ self.createCode()
242
+ self.picLyanzhengma = ''
243
+ yield self.$showMessage(msg)
244
+ self.model.ename = ''
245
+ self.model.password = ''
246
+ self.login = false
247
+ $('form').fadeIn(500)
248
+ }
249
+ }
250
+ export default {
251
+ title: '登录',
252
+ async ready () {
253
+ if (window.location.href.includes('ticket')) {
254
+ this.isSso = true
255
+ this.showlogin = false
256
+ let url = window.location.href.split("?")[1]
257
+ let obj = {}
258
+ for (let params of url.split("&")) {
259
+ let kv = params.split("=")
260
+ obj[kv[0]] = kv[1]
261
+ }
262
+ let params = {
263
+ st: obj.ticket,
264
+ serviceKey: this.config.serviceKey
265
+ }
266
+ this.$resetpost('/sso/logic/serviceValidate', params,{resolveMsg: null, rejectMsg: null}).then((re) => {
267
+ // this.$showMessage("re----" + JSON.stringify(re))
268
+ if (re.data.code === 200) {
269
+ this.showlogin = false
270
+ let condition = `ename = '${re.data.data.userName}'`
271
+ this.$resetpost('rs/sql/singleTable', {data: { items: '*', tablename: 't_user', condition: condition}}, {resolveMsg: null, rejectMsg: null}).then((res) => {
272
+ if (res.data && res.data.length > 0) {
273
+ this.model.ename = res.data[0].ename
274
+ this.model.password = res.data[0].password
275
+ // this.$showMessage("re----" + JSON.stringify(this.model))
276
+ let gen = saveGen(this)
277
+ return co(gen)
278
+ } else {
279
+ this.$showMessage('此账户不存在,请重试!!!', ['confirm']).then((res) => {
280
+ if(res === 'confirm') {
281
+ this.showlogin = true
282
+ }
283
+ })
284
+ }
285
+ })
286
+ } else {
287
+ this.showlogin = true
288
+ }
289
+ this.isSso = false
290
+ })
291
+ } else {
292
+ this.titleShow = this.$appdata.getSingleValue('关于我们')
293
+ window.versionTime = window.versionTime ? window.versionTime : new Date().getTime()
294
+ this.vTime = this.format(new Date(window.versionTime));
295
+ try{
296
+ let http = new HttpResetClass()
297
+ let res = await http.load('POST', 'rs/sql/singleTable',
298
+ {data:{
299
+ tablename: 't_changedeclare',
300
+ condition: ` f_type ='变更通知' `
301
+ }
302
+ }, {resolveMsg: null, rejectMsg: null})
303
+ if(res.data.length>0){
304
+ console.log("---------------获取通知",res.data[0].f_change_message)
305
+ this.notice=res.data[0].f_change_message
306
+ }
307
+ }catch(e){}
308
+
309
+ this.loginother();
310
+ $('#login-button').click(function (event) {
311
+ event.preventDefault()
312
+ $('form').fadeOut(500)
313
+ })
314
+ if (window.location.search && window.location.search.indexOf('af_key') !== -1&& window.location.search.indexOf('af_n') !== -1) {
315
+ const subUrl = window.location.search.replace('?af_key=','').split('&af_n=')
316
+ console.log(subUrl)
317
+ this.model.ename = window.atob(subUrl[0])
318
+ this.model.password = window.atob(subUrl[1])
319
+ console.log('this.model.ename',this.model.ename)
320
+ this.otherLogin = true
321
+ this.confirm()
322
+ }else{
323
+ //跳转不需要验证码
324
+ this.createCode()
325
+ }
326
+ console.log(this.$login)
327
+ }
328
+ },
329
+ data () {
330
+ return {
331
+ vTime: '',
332
+ image:{
333
+ img1: '/images/newStyle/login-info.png',
334
+ img2: '/images/newStyle/login-con.png',
335
+ img3: '/images/newStyle/login-left.png',
336
+ img4: '/images/newStyle/login-user.png',
337
+ img5: '/images/newStyle/login-pwd.png',
338
+ img6: '/images/newStyle/login-check.png',
339
+ img7: '/images/newStyle/login-do.png',
340
+ },
341
+ config: {
342
+ isMac: false,
343
+ depPrompt: false,
344
+ weakPassword: false,
345
+ title: '燃气客服系统',
346
+ distanceLogin: false,
347
+ // 那些角色可以定时获取预约提示
348
+ isTip : false,
349
+ // 那些角色可以定时获取预约提示
350
+ msgRole : '预约处理人员',
351
+ // 定时获取提示间隔 单位:分钟
352
+ times: 25,
353
+ serviceKey: '5d83a22dd2824234b1580ede32530e99'
354
+ },
355
+ showlogin: true,
356
+ isSso: false,
357
+ titleShow: true, //标题显示
358
+ otherLogin:false,
359
+ login: false,
360
+ depPromptShow: false,
361
+ model: {},
362
+ show: false,
363
+ checkCode: '',
364
+ login_do:true,
365
+ picLyanzhengma: '',
366
+ // 修改密码弹框展示
367
+ modifyPwShow: false,
368
+ logoandroid:false,
369
+ showus:false,
370
+ notice:'',
371
+ loginotherflag :true,
372
+ // 报建待办
373
+ AppDaiBan: '',
374
+ //安检待办
375
+ safecheckDaiBan:[],
376
+ // 预约待处理
377
+ OrderDaiBan: ''
378
+ }
379
+ },
380
+ methods: {
381
+ //格式化时间
382
+ format(dat){
383
+ //获取年月日,时间
384
+ const year = dat.getFullYear();
385
+ const mon = (dat.getMonth()+1) < 10 ? "0"+(dat.getMonth()+1) : dat.getMonth()+1;
386
+ const data = dat.getDate() < 10 ? "0"+(dat.getDate()) : dat.getDate();
387
+ const hour = dat.getHours() < 10 ? "0"+(dat.getHours()) : dat.getHours();
388
+ const min = dat.getMinutes() < 10 ? "0"+(dat.getMinutes()) : dat.getMinutes();
389
+ const seon = dat.getSeconds() < 10 ? "0"+(dat.getSeconds()) : dat.getSeconds();
390
+
391
+ return year + "-" + mon + "-" + data + " " + hour + ":" + min + ":" + seon;
392
+ },
393
+ async getDaiBan(){
394
+ let http = new HttpResetClass()
395
+ let condition = ''
396
+ if(this.$login.f.deps!=='柠条塔'){
397
+ condition = ` (f_orderstate != '预约成功' and f_orderstate != '预约失败' ) or f_orderstate is null `
398
+ } else {
399
+ condition =` f_orderstate is null and (f_address in( select f_address from t_user_address where f_slice_area='柠条塔') or f_address like '%柠条塔%') `
400
+ }
401
+ await http.load('POST', '/rs/sql/singleTable', {data: {
402
+ tablename:'t_order_center',
403
+ condition:condition
404
+ }}, {
405
+ resolveMsg: null,
406
+ rejectMsg: null
407
+ }).then((res) => {
408
+ let OrderDaiBan = {}
409
+ res.data.forEach(item=>{
410
+ OrderDaiBan[item.f_ordertype] = OrderDaiBan[item.f_ordertype] || []
411
+ OrderDaiBan[item.f_ordertype].push(item)
412
+ })
413
+ this.OrderDaiBan = `您有${res.data.length}条需要处理的微信预约业务!`
414
+ if (res.data.length> 0){
415
+ this.OrderDaiBan += `其中 ${Object.keys(OrderDaiBan).map(key=>`${key}:${OrderDaiBan[key].length}条`).join(', ')}`
416
+ }
417
+ })
418
+ let data = {
419
+ condition: '1 = 1',
420
+ data: {
421
+ orgid: this.$login.f.orgid,
422
+ id: this.$login.f.id
423
+ }
424
+ }
425
+ await http.load('POST', '/rs/sql/checkuser', {data: data}, {
426
+ resolveMsg: null,
427
+ rejectMsg: null
428
+ }).then((res) => {
429
+ let AppDaiBan = {}
430
+ res.data.forEach(item=>{
431
+ AppDaiBan[item.defname] = AppDaiBan[item.defname] || []
432
+ AppDaiBan[item.defname].push(item)
433
+ })
434
+ this.AppDaiBan = `您有${res.data.length}条需要处理的报建待办业务!`
435
+ if (res.data.length> 0){
436
+ this.AppDaiBan += `其中 ${Object.keys(AppDaiBan).map(key=>`${key}:${AppDaiBan[key].length}条`).join(', ')}`
437
+ }
438
+ })
439
+
440
+ },
441
+ async getDaiBanA(){
442
+ // 是否全局开启待办通知
443
+ if (daibanJson.enable) {
444
+ console.log("当前获取到待办配置为" + JSON.stringify(daibanJson))
445
+ let http = new HttpResetClass()
446
+ let daibanArray = []
447
+ for (let daibanItem of daibanJson.daiban) {
448
+ console.log("开始处理待办任务:" + daibanItem.title + "当前任务状态:" + daibanItem.enable?"开启":"关闭" )
449
+ if (daibanItem.enable) { // 控制每一项通知是否开启
450
+ let postResult = ''; //提示信息为
451
+ await http.load("POST",daibanItem.url,{data:daibanItem.data},{ resolveMsg: null, rejectMsg: null})
452
+ .then((res)=>{
453
+ let responseData = res.data
454
+ for (let item of responseData) {
455
+ postResult += eval(daibanItem.text) + "\n"
456
+ }
457
+ postResult += '\t'
458
+ daibanArray.push({text:postResult,oldData:daibanItem})
459
+ })
460
+ }
461
+ }
462
+ console.log("安检数据为:"+JSON.stringify(daibanArray))
463
+ this.safecheckDaiBan = daibanArray
464
+ }else {
465
+ console.log("待办提醒全局关闭。")
466
+ }
467
+
468
+
469
+
470
+
471
+ },
472
+
473
+ async loginother(){
474
+ if (this.config.distanceLogin) {
475
+ if (this.$login && this.$login.getUrlParames('name') ) {
476
+ let ename = this.$login.getUrlParames('name');
477
+ let logininfo = await this.$resetpost('rs/logic/getLoginData',{data:{ename:ename}},{resolveMsg: null, rejectMsg: null});
478
+ if(logininfo.data){
479
+ if(logininfo.data.ename && logininfo.data.password){
480
+ this.model.ename = logininfo.data.ename
481
+ this.model.password =logininfo.data.password
482
+ let gen = saveGen(this)
483
+ return co(gen)
484
+ }
485
+ }
486
+ }
487
+ }
488
+ },
489
+ theme(){
490
+ // var elementList = document.querySelectorAll('body');
491
+ // console.log(elementList)
492
+ // document.querySelectorAll('body')[0].className='themeTwo'
493
+ // var elementList = document.querySelectorAll('body');
494
+ // console.log(elementList)
495
+ },
496
+ onReady () {
497
+ this.$emit('ready')
498
+ },
499
+ confirm (key) {
500
+ this.login_do=!this.login_do
501
+ // return
502
+ if (key == 'key') {
503
+ $('form').fadeOut(500)
504
+ }
505
+ this.login = true
506
+ // let gen = saveGen(this)
507
+ // return co(gen)
508
+ if((!this.otherLogin) && this.$login && this.$login.Verification){
509
+ console.log('跳转过来的不走验证')
510
+ if(this.picLyanzhengma == '') {
511
+ this.$showMessage("请输入验证码!").then(()=>{
512
+ this.login = false
513
+ $('form').fadeIn(500)
514
+ this.createCode()
515
+ })
516
+ }else if(this.picLyanzhengma.toUpperCase() != this.checkCode ) {
517
+ //若输入的验证码与产生的验证码不一致时
518
+ this.$showMessage("验证码不正确").then(()=>{
519
+ this.login = false
520
+ $('form').fadeIn(500)
521
+ this.createCode();//刷新验证码
522
+ this.picLyanzhengma = '';
523
+ })
524
+ }else {
525
+ this.login = true
526
+ let gen = saveGen(this)
527
+ return co(gen)
528
+ }
529
+ }else {
530
+ this.login = true
531
+ let gen = saveGen(this)
532
+ return co(gen)
533
+ }
534
+ },
535
+ createCode(){
536
+ let code = "";
537
+ let codeLength = 4;//验证码的长度
538
+ let random = new Array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
539
+ 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z');//随机数
540
+ for (let i = 0; i < codeLength; i++) {
541
+ //循环操作
542
+ let index = Math.floor(Math.random() * 36);//取得随机数的索引(0~35)
543
+ code += random[index];//根据索引取得随机数加到code上
544
+ }
545
+ this.checkCode = code;//把code值赋给验证码
546
+ },
547
+
548
+ async depPromptConfirm () {
549
+ this.depPromptShow = false
550
+ this.showlogin = false
551
+ return this.$goto('home-page', {functions: this.$login.f,config: this.config})
552
+ },
553
+
554
+ depPromptCancel () {
555
+ this.depPromptShow = false
556
+ this.createCode()
557
+ this.picLyanzhengma = ''
558
+ this.model.ename = ''
559
+ this.model.password = ''
560
+ this.login = false
561
+ $('form').fadeIn(500)
562
+ }
563
+ },
564
+ watch: {
565
+ 'modifyPwShow' (val){
566
+ if (!val) {
567
+ window.location.reload()
568
+ }
569
+ }
570
+ }
571
+ }
572
+ </script>
573
+
574
+ <style>
575
+ .ssoLoadingMain .ssoLoadingImg {
576
+ position: absolute;
577
+ top:0;
578
+ left: 0;
579
+ bottom: 0;
580
+ right: 0;
581
+ margin: auto;
582
+ }
583
+ </style>