system-clients 3.2.96 → 3.2.97-weinan

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