system-clients 3.2.97 → 3.2.98-weinan

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