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,573 +1,571 @@
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>构建时间:{{ 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" style="padding: 0% 3% 2% 3%;">
40
- <div style="height: 27%;display: flex;text-align: center;justify-content: center">
41
- <img style="height: 100%" src="../../../static/newStyle/tianyi-logo.png">
42
- </div>
43
- <img class="loginmain-left-img" style="height: 75%;" src="../../../static/newStyle/login-left.png">
44
- </div>
45
- <div class="loginmain-right">
46
-
47
- <p @click="theme()" style="white-space: nowrap">{{config.title}}</p>
48
-
49
- <form v-show="!login">
50
- <!-- <input type="text" placeholder="用户名" v-model="model.ename" class="usericon">-->
51
- <div class="login-input">
52
- <img src="../../../static/newStyle/login-user.png"/>
53
- <input type="text" style="display: inline;background-color: white!important;" placeholder="用户名" v-model="model.ename"/>
54
- </div>
55
- <div class="login-input">
56
- <img src="../../../static/newStyle/login-pwd.png"/>
57
- <input type="password" placeholder="密码" style="display: inline;background-color: darkgray;" v-model="model.password"
58
- @keyup.enter="confirm('key')"/>
59
- </div>
60
- <div class="login-input-1" v-if="$login.Verification">
61
- <img src="../../../static/newStyle/login-check.png"/>
62
- <input v-if="$login.Verification" class="login-check" type="text" placeholder="请输入验证码"
63
- v-model="picLyanzhengma" @keyup.enter="confirm('key')"/>
64
- </div>
65
- <div class="login-input-2" >
66
- <input v-if="$login.Verification" class="login-check-1" style="display: inline;background-color:#eeeeee !important;"
67
- type="button" @click="createCode" v-model="checkCode"/>
68
- </div>
69
- <div class="login-bt">
70
- <button type="button" id="login-button" class="login-button" @click.prevent="confirm('click')">登录</button>
71
- </div>
72
- <!-- <input type="password" placeholder="密码" v-model="model.password" class="psicon"-->
73
- <!-- @keyup.enter="confirm('key')">-->
74
- <!-- <input v-if="$login.Verification" styljiaoyane="width: 40%; display: inline" type="text" placeholder="请输入验证码"-->
75
- <!-- v-model="picLyanzhengma" @keyup.enter="confirm('key')">-->
76
- <!-- <input v-if="$login.Verification" style="width: 30%; display: inline;background-color: darkgray;"-->
77
- <!-- type="button" @click="createCode" v-model="checkCode"/><br>-->
78
-
79
- <!-- <button type="button" id="login-button" @click.prevent="confirm()"><strong>注册</strong></button> -->
80
- <!-- <span @click="register()">还没有注册,现在注册>>></span> -->
81
- </form>
82
- <div v-show="login" class="login_load">
83
- <img src="../../../static/newStyle/login-do.gif">
84
- </div>
85
- </div>
86
- </div>
87
- <div class="login-foot" v-show="false">
88
- 技术支持:西安奥枫软件有限公司
89
- </div>
90
- <div class="login-foot" v-show="$login.BAinformation">
91
- {{{ $login.BAinformation }}}
92
- </div>
93
-
94
- <modal v-if="depPromptShow" :show.sync="depPromptShow" :backdrop="false" v-ref:modal >
95
- <header slot="modal-header" style="height: 8vh" class="modal-header">
96
- <!--<h4 class="modal-title">登录信息</h4>-->
97
- </header>
98
- <article slot="modal-body" class="modal-body">
99
- <form class="form-horizontal">
100
- <div class="row">
101
- <div class="col-sm-12 form-group">
102
- <label class="col-sm-5 ">当前登录人:</label>
103
- <label style="font-weight:normal">{{$login.f.name}}</label>
104
- </div>
105
- <!--<div class="col-sm-12 form-group" v-if="$login.f.number">-->
106
- <!--<label class="col-sm-5 ">组&nbsp;织&nbsp;编&nbsp;码:</label>-->
107
- <!--<label style="font-weight:normal">{{$login.f.number}}</label>-->
108
- <!-- <div class="col-sm-7">
109
- <span >{{$login.f.number}}</span>
110
- </div> -->
111
- <!--</div>-->
112
- <div class="col-sm-12 form-group">
113
- <label class="col-sm-5">所在销售点:</label>
114
- <label style="font-weight:normal">{{$login.f.deps}}</label>
115
- <!-- <div class="col-sm-7">
116
- <span >{{$login.f.deps}}</span>
117
- </div> -->
118
- </div>
119
- <div class="col-sm-12 " v-if="AppDaiBan !==''">
120
- <label class="col-sm-2">报装待办:</label>
121
- <span style="font-weight:normal">{{AppDaiBan}}</span>
122
- </div>
123
- <div class="col-sm-12 " v-if="OrderDaiBan !==''">
124
- <label class="col-sm-2">预约待办:</label>
125
- <span style="font-weight:normal">{{OrderDaiBan}}</span>
126
- </div>
127
- <div class="col-sm-12 " v-for="daibanitem in safecheckDaiBan">
128
- <label class="col-sm-2">{{daibanitem.oldData.title}}:</label>
129
- <span style="font-weight:normal">{{daibanitem.text}}</span>
130
- </div>
131
- </div>
132
- </form>
133
- </article>
134
- <footer slot="modal-footer" style="height: 8vh" class="modal-footer">
135
- <button class="button_search" @click="depPromptConfirm">确认</button>
136
- <button class="button_clear" @click="depPromptCancel">取消</button>
137
- </footer>
138
- </modal>
139
-
140
- <!-- 修改密码组件 -->
141
- <modify-pw :show.sync="modifyPwShow" v-if="modifyPwShow"></modify-pw>
142
- </div>
143
-
144
- </template>
145
-
146
- <script>
147
- import co from 'co'
148
- import $ from 'jquery'
149
- import Vue from 'vue'
150
- import {HttpResetClass} from 'vue-client'
151
-
152
- let daibanJson = require('../../util/Daiban.json')
153
-
154
-
155
- let saveGen = function *(self) {
156
- try {
157
- if(self.$login){
158
- // 账号ename,密码password,是否显示异地登陆
159
- yield self.$login.login(self.model.ename, self.model.password, self.$login.showYiDi)
160
- }
161
- if(self.$appdata){
162
- yield self.$appdata.load()
163
-
164
- }
165
- if (Vue.$heatCompatibility) {
166
- try {
167
- if(self.$loginHeat){
168
- yield self.$loginHeat.login(self.model.ename, self.model.password)
169
- }
170
- if(self.$appdataHeat){
171
- yield self.$appdataHeat.load()
172
- }
173
- } catch (e) {
174
- console.log('热力系统登陆失败!')
175
- }
176
- }
177
- yield self.$getConfig(self, 'Login')
178
- console.log('登录配置', self.config)
179
- if (self.config.isMac) {
180
- // 获取该登录人分公司下的mac配置
181
- // todo v4
182
- let getMacs = yield self.$resetpost('rs/sql/equipmentQuery', {data: {condition: `f_filialeids like '%${self.$login.f.f_orgids}%'`}}, {
183
- resolveMsg: null,
184
- rejectMsg: null
185
- }).catch(() => {
186
- throw new Error('获取mac配置失败')
187
- })
188
- console.log('MAC地址信息', getMacs)
189
- // 获取本地mac地址
190
- let getLocalMac = yield self.$resetget('http://127.0.0.1:8003/loadmac', {
191
- resolveMsg: null,
192
- rejectMsg: null
193
- }).catch(() => {
194
- throw new Error('获取本地mac配置失败')
195
- })
196
- console.log('本地MAC地址信息', getLocalMac)
197
- // 对Mac地址进行匹配
198
- let macValidate = false
199
- for (let i = 0; i < getLocalMac.data.mac.length; i++) {
200
- for (let j = 0; j < getMacs.data.length; j++) {
201
- if (getMacs.data[j].f_mac_number.toLocaleUpperCase() === getLocalMac.data.mac[i]) {
202
- macValidate = true
203
- }
204
- }
205
- }
206
- if (!macValidate) {
207
- throw new Error('Mac地址验证失败, 请联系管理员!!')
208
- }
209
- }
210
- console.log(self.$login.depPrompt)
211
- // 弱口令验证
212
- //跳转过来的不进行验证
213
- if ((!self.otherLogin) && self.config.weakPassword && !(/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,16}$/.test(self.model.password))) {
214
- self.$showMessage('登录系统: 此账户的密码过于简单,请修改密码后重新登陆!!!', ['confirm']).then((res) => {
215
- self.modifyPwShow = true
216
- })
217
- } else if ((!self.otherLogin) && self.$login.depPrompt) {
218
- self.depPromptShow = true
219
- if (self.$login.showDaiBan && self.$login.r.includes('展示预约信息')){
220
- // 获取待办
221
- self.getDaiBan()
222
-
223
- }
224
- if (self.$login.showDaiBan && self.$login.r.includes('登录预约信息')){
225
- // 获取待办 在util下有个Daiban.jsond 文件 ,在里面进行配置,在功能权限界面增加登录预约信息
226
- self.getDaiBanA()
227
- }
228
- } else {
229
- self.$goto('home-page', {functions: self.$login.f,config: self.config})
230
- // if (self.otherLogin){
231
- // window.history.pushState(null,null,'')
232
- // }
233
- if (self.$login) {
234
- console.log('登录信息', self.$login.f)
235
- global.login=self.$login.f
236
- console.log('登录信息', global.login)
237
- }
238
- }
239
-
240
- } catch (ret) {
241
- console.error('登录失败', ret)
242
- let msg
243
- if (ret instanceof Error) {
244
- msg = ret
245
- }
246
- if (ret.status === 0) {
247
- msg = '服务连接错误,请确认服务状态'
248
- } else if (ret.status === 401) {
249
- msg = ret.data
250
- } else if (ret.status === 710) {
251
- msg = ret.data
252
- }
253
- self.createCode()
254
- self.picLyanzhengma = ''
255
- yield self.$showMessage(msg)
256
- self.model.ename = ''
257
- self.model.password = ''
258
- self.login = false
259
- $('form').fadeIn(500)
260
- }
261
- }
262
- export default {
263
- title: '登录',
264
- async ready () {
265
- this.titleShow = this.$appdata.getSingleValue('关于我们')
266
- window.versionTime = window.versionTime ? window.versionTime : new Date().getTime()
267
- this.vTime = this.format(new Date(window.versionTime));
268
- try{
269
- let http = new HttpResetClass()
270
- let res = await http.load('POST', 'api/af-system/sql/singleTable',
271
- {data:{
272
- tablename: 't_changedeclare',
273
- condition: ` f_type ='变更通知' `
274
- }
275
- }, {resolveMsg: null, rejectMsg: null})
276
- if(res.data.length>0){
277
- console.log("---------------获取通知",res.data[0].f_change_message)
278
- this.notice=res.data[0].f_change_message
279
- }
280
- }catch(e){}
281
-
282
- this.loginother();
283
- $('#login-button').click(function (event) {
284
- event.preventDefault()
285
- $('form').fadeOut(500)
286
- })
287
- if (window.location.search && window.location.search.indexOf('af_key') !== -1&& window.location.search.indexOf('af_n') !== -1) {
288
- const subUrl = window.location.search.replace('?af_key=','').split('&af_n=')
289
- console.log(subUrl)
290
- this.model.ename = window.atob(subUrl[0])
291
- this.model.password = window.atob(subUrl[1])
292
- console.log('this.model.ename',this.model.ename)
293
- this.otherLogin = true
294
- this.confirm()
295
- }else{
296
- //跳转不需要验证码
297
- this.createCode()
298
- }
299
- console.log(this.$login)
300
- },
301
- data () {
302
- return {
303
- vTime: '',
304
- image:{
305
- img1: '/images/newStyle/login-info.png',
306
- img2: '/images/newStyle/login-con.png',
307
- img3: '/images/newStyle/login-left.png',
308
- img4: '/images/newStyle/login-user.png',
309
- img5: '/images/newStyle/login-pwd.png',
310
- img6: '/images/newStyle/login-check.png',
311
- img7: '/images/newStyle/login-do.png',
312
- },
313
- config: {
314
- isMac: false,
315
- depPrompt: false,
316
- weakPassword: false,
317
- title: '燃气客服系统',
318
- distanceLogin: false,
319
- // 那些角色可以定时获取预约提示
320
- isTip : false,
321
- // 那些角色可以定时获取预约提示
322
- msgRole : '预约处理人员',
323
- // 定时获取提示间隔 单位:分钟
324
- times: 25,
325
- },
326
- titleShow: true, //标题显示
327
- otherLogin:false,
328
- login: false,
329
- depPromptShow: false,
330
- model: {},
331
- show: false,
332
- checkCode: '',
333
- login_do:true,
334
- picLyanzhengma: '',
335
- // 修改密码弹框展示
336
- modifyPwShow: false,
337
- logoandroid:false,
338
- showus:false,
339
- notice:'',
340
- loginotherflag :true,
341
- // 报建待办
342
- AppDaiBan: '',
343
- //安检待办
344
- safecheckDaiBan:[],
345
- // 预约待处理
346
- OrderDaiBan: ''
347
- }
348
- },
349
- methods: {
350
- //格式化时间
351
- format(dat){
352
- //获取年月日,时间
353
- const year = dat.getFullYear();
354
- const mon = (dat.getMonth()+1) < 10 ? "0"+(dat.getMonth()+1) : dat.getMonth()+1;
355
- const data = dat.getDate() < 10 ? "0"+(dat.getDate()) : dat.getDate();
356
- const hour = dat.getHours() < 10 ? "0"+(dat.getHours()) : dat.getHours();
357
- const min = dat.getMinutes() < 10 ? "0"+(dat.getMinutes()) : dat.getMinutes();
358
- const seon = dat.getSeconds() < 10 ? "0"+(dat.getSeconds()) : dat.getSeconds();
359
-
360
- return year + "-" + mon + "-" + data + " " + hour + ":" + min + ":" + seon;
361
- },
362
- async getDaiBan(){
363
- let http = new HttpResetClass()
364
- let condition = ''
365
- if(this.$login.f.deps!=='柠条塔'){
366
- condition = ` (f_orderstate != '预约成功' and f_orderstate != '预约失败' ) or f_orderstate is null `
367
- } else {
368
- condition =` f_orderstate is null and (f_address in( select f_address from t_user_address where f_slice_area='柠条塔') or f_address like '%柠条塔%') `
369
- }
370
- await http.load('POST', '/api/af-system/sql/singleTable', {data: {
371
- tablename:'t_order_center',
372
- condition:condition
373
- }}, {
374
- resolveMsg: null,
375
- rejectMsg: null
376
- }).then((res) => {
377
- let OrderDaiBan = {}
378
- res.data.forEach(item=>{
379
- OrderDaiBan[item.f_ordertype] = OrderDaiBan[item.f_ordertype] || []
380
- OrderDaiBan[item.f_ordertype].push(item)
381
- })
382
- this.OrderDaiBan = `您有${res.data.length}条需要处理的微信预约业务!`
383
- if (res.data.length> 0){
384
- this.OrderDaiBan += `其中 ${Object.keys(OrderDaiBan).map(key=>`${key}:${OrderDaiBan[key].length}条`).join(', ')}`
385
- }
386
- })
387
- let data = {
388
- condition: '1 = 1',
389
- data: {
390
- orgid: this.$login.f.orgid,
391
- id: this.$login.f.id
392
- }
393
- }
394
- await http.load('POST', '/rs/sql/checkuser', {data: data}, {
395
- resolveMsg: null,
396
- rejectMsg: null
397
- }).then((res) => {
398
- let AppDaiBan = {}
399
- res.data.forEach(item=>{
400
- AppDaiBan[item.defname] = AppDaiBan[item.defname] || []
401
- AppDaiBan[item.defname].push(item)
402
- })
403
- this.AppDaiBan = `您有${res.data.length}条需要处理的报建待办业务!`
404
- if (res.data.length> 0){
405
- this.AppDaiBan += `其中 ${Object.keys(AppDaiBan).map(key=>`${key}:${AppDaiBan[key].length}条`).join(', ')}`
406
- }
407
- })
408
-
409
- },
410
- async getDaiBanA(){
411
- // 是否全局开启待办通知
412
- if (daibanJson.enable) {
413
- console.log("当前获取到待办配置为" + JSON.stringify(daibanJson))
414
- let http = new HttpResetClass()
415
- let daibanArray = []
416
- for (let daibanItem of daibanJson.daiban) {
417
- console.log("开始处理待办任务:" + daibanItem.title + "当前任务状态:" + daibanItem.enable?"开启":"关闭" )
418
- if (daibanItem.enable) { // 控制每一项通知是否开启
419
- let postResult = ''; //提示信息为
420
- await http.load("POST",daibanItem.url,{data:daibanItem.data},{ resolveMsg: null, rejectMsg: null})
421
- .then((res)=>{
422
- let responseData = res.data
423
- for (let item of responseData) {
424
- postResult += eval(daibanItem.text) + "\n"
425
- }
426
- postResult += '\t'
427
- daibanArray.push({text:postResult,oldData:daibanItem})
428
- })
429
- }
430
- }
431
- console.log("安检数据为:"+JSON.stringify(daibanArray))
432
- this.safecheckDaiBan = daibanArray
433
- }else {
434
- console.log("待办提醒全局关闭。")
435
- }
436
-
437
-
438
-
439
-
440
- },
441
-
442
- async loginother(){
443
- if (this.config.distanceLogin) {
444
- if (this.$login && this.$login.getUrlParames('name') ) {
445
- let ename = this.$login.getUrlParames('name');
446
- // todo v4
447
- let logininfo = await this.$resetpost('rs/logic/getLoginData',{data:{ename:ename}},{resolveMsg: null, rejectMsg: null});
448
- if(logininfo.data){
449
- if(logininfo.data.ename && logininfo.data.password){
450
- this.model.ename = logininfo.data.ename
451
- this.model.password =logininfo.data.password
452
- let gen = saveGen(this)
453
- return co(gen)
454
- }
455
- }
456
- }
457
- }
458
- },
459
- theme(){
460
- // var elementList = document.querySelectorAll('body');
461
- // console.log(elementList)
462
- // document.querySelectorAll('body')[0].className='themeTwo'
463
- // var elementList = document.querySelectorAll('body');
464
- // console.log(elementList)
465
- },
466
- onReady () {
467
- this.$emit('ready')
468
- },
469
- confirm (key) {
470
- this.login_do=!this.login_do
471
- // return
472
- if (key == 'key') {
473
- $('form').fadeOut(500)
474
- }
475
- this.login = true
476
- // let gen = saveGen(this)
477
- // return co(gen)
478
- if((!this.otherLogin) && this.$login && this.$login.Verification){
479
- console.log('跳转过来的不走验证')
480
- if(this.picLyanzhengma == '') {
481
- this.$showMessage("请输入验证码!").then(()=>{
482
- this.login = false
483
- $('form').fadeIn(500)
484
- this.createCode()
485
- })
486
- }else if(this.picLyanzhengma.toUpperCase() != this.checkCode ) {
487
- //若输入的验证码与产生的验证码不一致时
488
- this.$showMessage("验证码不正确").then(()=>{
489
- this.login = false
490
- $('form').fadeIn(500)
491
- this.createCode();//刷新验证码
492
- this.picLyanzhengma = '';
493
- })
494
- }else {
495
- this.login = true
496
- let gen = saveGen(this)
497
- return co(gen)
498
- }
499
- }else {
500
- this.login = true
501
- let gen = saveGen(this)
502
- return co(gen)
503
- }
504
- },
505
- createCode(){
506
- let code = "";
507
- let codeLength = 4;//验证码的长度
508
- 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',
509
- 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z');//随机数
510
- for (let i = 0; i < codeLength; i++) {
511
- //循环操作
512
- let index = Math.floor(Math.random() * 36);//取得随机数的索引(0~35)
513
- code += random[index];//根据索引取得随机数加到code
514
- }
515
- this.checkCode = code;//把code值赋给验证码
516
- },
517
-
518
- async depPromptConfirm () {
519
- this.depPromptShow = false
520
- return this.$goto('home-page', {functions: this.$login.f,config: this.config})
521
- },
522
-
523
- depPromptCancel () {
524
- this.depPromptShow = false
525
- this.createCode()
526
- this.picLyanzhengma = ''
527
- this.model.ename = ''
528
- this.model.password = ''
529
- this.login = false
530
- $('form').fadeIn(500)
531
- },
532
- delCookie() {
533
- let cookies = document.cookie.split(";");
534
- console.log("点击触发了")
535
- for (let i = 0; i < cookies.length; i++) {
536
- let cookie = cookies[i];
537
- let eqPos = cookie.indexOf("=");
538
- let name = eqPos > -1 ? cookie.substr(0, eqPos) : cookie;
539
- document.cookie =
540
- name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/";
541
- }
542
- if (cookies.length > 0) {
543
- for (let i = 0; i < cookies.length; i++) {
544
- let cookie = cookies[i];
545
- let eqPos = cookie.indexOf("=");
546
- let name = eqPos > -1 ? cookie.substr(0, eqPos) : cookie;
547
- let domain = location.host.substr(location.host.indexOf("."));
548
- document.cookie =
549
- name +
550
- "=;expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; domain=" +
551
- domain;
552
- }
553
- }
554
- localStorage.clear()
555
- sessionStorage.clear()
556
- window.location.reload()
557
- }
558
-
559
- },
560
- watch: {
561
- 'modifyPwShow' (val){
562
- if (!val) {
563
- window.location.reload()
564
- }
565
- }
566
- }
567
- }
568
- </script>
569
-
570
- <style>
571
- .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}
572
- .my_button_search:hover img{ filter: opacity(0.8);}
573
- </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>构建时间:{{ 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" style="padding: 0% 3% 2% 3%;">
40
+ <div style="height: 27%;display: flex;text-align: center;justify-content: center">
41
+ <img style="height: 100%" src="../../../static/newStyle/tianyi-logo.png">
42
+ </div>
43
+ <img class="loginmain-left-img" style="height: 75%;" src="../../../static/newStyle/login-left.png">
44
+ </div>
45
+ <div class="loginmain-right">
46
+
47
+ <p @click="theme()" style="white-space: nowrap">{{config.title}}</p>
48
+
49
+ <form v-show="!login">
50
+ <!-- <input type="text" placeholder="用户名" v-model="model.ename" class="usericon">-->
51
+ <div class="login-input">
52
+ <img src="../../../static/newStyle/login-user.png"/>
53
+ <input type="text" style="display: inline;background-color: white!important;" placeholder="用户名" v-model="model.ename"/>
54
+ </div>
55
+ <div class="login-input">
56
+ <img src="../../../static/newStyle/login-pwd.png"/>
57
+ <input type="password" placeholder="密码" style="display: inline;background-color: darkgray;" v-model="model.password"
58
+ @keyup.enter="confirm('key')"/>
59
+ </div>
60
+ <div class="login-input-1" v-if="$login.Verification">
61
+ <img src="../../../static/newStyle/login-check.png"/>
62
+ <input v-if="$login.Verification" class="login-check" type="text" placeholder="请输入验证码"
63
+ v-model="picLyanzhengma" @keyup.enter="confirm('key')"/>
64
+ </div>
65
+ <div class="login-input-2" >
66
+ <input v-if="$login.Verification" class="login-check-1" style="display: inline;background-color:#eeeeee !important;"
67
+ type="button" @click="createCode" v-model="checkCode"/>
68
+ </div>
69
+ <div class="login-bt">
70
+ <button type="button" id="login-button" class="login-button" @click.prevent="confirm('click')">登录</button>
71
+ </div>
72
+ <!-- <input type="password" placeholder="密码" v-model="model.password" class="psicon"-->
73
+ <!-- @keyup.enter="confirm('key')">-->
74
+ <!-- <input v-if="$login.Verification" styljiaoyane="width: 40%; display: inline" type="text" placeholder="请输入验证码"-->
75
+ <!-- v-model="picLyanzhengma" @keyup.enter="confirm('key')">-->
76
+ <!-- <input v-if="$login.Verification" style="width: 30%; display: inline;background-color: darkgray;"-->
77
+ <!-- type="button" @click="createCode" v-model="checkCode"/><br>-->
78
+
79
+ <!-- <button type="button" id="login-button" @click.prevent="confirm()"><strong>注册</strong></button> -->
80
+ <!-- <span @click="register()">还没有注册,现在注册>>></span> -->
81
+ </form>
82
+ <div v-show="login" class="login_load">
83
+ <img src="../../../static/newStyle/login-do.gif">
84
+ </div>
85
+ </div>
86
+ </div>
87
+ <div class="login-foot" v-show="false">
88
+ 技术支持:西安奥枫软件有限公司
89
+ </div>
90
+ <div class="login-foot" v-show="$login.BAinformation">
91
+ {{{ $login.BAinformation }}}
92
+ </div>
93
+
94
+ <modal v-if="depPromptShow" :show.sync="depPromptShow" :backdrop="false" v-ref:modal >
95
+ <header slot="modal-header" style="height: 8vh" class="modal-header">
96
+ <!--<h4 class="modal-title">登录信息</h4>-->
97
+ </header>
98
+ <article slot="modal-body" class="modal-body">
99
+ <form class="form-horizontal">
100
+ <div class="row">
101
+ <div class="col-sm-12 form-group">
102
+ <label class="col-sm-5 ">当前登录人:</label>
103
+ <label style="font-weight:normal">{{$login.f.name}}</label>
104
+ </div>
105
+ <!--<div class="col-sm-12 form-group" v-if="$login.f.number">-->
106
+ <!--<label class="col-sm-5 ">组&nbsp;织&nbsp;编&nbsp;码:</label>-->
107
+ <!--<label style="font-weight:normal">{{$login.f.number}}</label>-->
108
+ <!-- <div class="col-sm-7">
109
+ <span >{{$login.f.number}}</span>
110
+ </div> -->
111
+ <!--</div>-->
112
+ <div class="col-sm-12 form-group">
113
+ <label class="col-sm-5">所在销售点:</label>
114
+ <label style="font-weight:normal">{{$login.f.deps}}</label>
115
+ <!-- <div class="col-sm-7">
116
+ <span >{{$login.f.deps}}</span>
117
+ </div> -->
118
+ </div>
119
+ <div class="col-sm-12 " v-if="AppDaiBan !==''">
120
+ <label class="col-sm-2">报装待办:</label>
121
+ <span style="font-weight:normal">{{AppDaiBan}}</span>
122
+ </div>
123
+ <div class="col-sm-12 " v-if="OrderDaiBan !==''">
124
+ <label class="col-sm-2">预约待办:</label>
125
+ <span style="font-weight:normal">{{OrderDaiBan}}</span>
126
+ </div>
127
+ <div class="col-sm-12 " v-for="daibanitem in safecheckDaiBan">
128
+ <label class="col-sm-2">{{daibanitem.oldData.title}}:</label>
129
+ <span style="font-weight:normal">{{daibanitem.text}}</span>
130
+ </div>
131
+ </div>
132
+ </form>
133
+ </article>
134
+ <footer slot="modal-footer" style="height: 8vh" class="modal-footer">
135
+ <button class="button_search" @click="depPromptConfirm">确认</button>
136
+ <button class="button_clear" @click="depPromptCancel">取消</button>
137
+ </footer>
138
+ </modal>
139
+
140
+ <!-- 修改密码组件 -->
141
+ <modify-pw :show.sync="modifyPwShow" v-if="modifyPwShow"></modify-pw>
142
+ </div>
143
+
144
+ </template>
145
+
146
+ <script>
147
+ import co from 'co'
148
+ import $ from 'jquery'
149
+ import Vue from 'vue'
150
+ import {HttpResetClass} from 'vue-client'
151
+
152
+ let daibanJson = require('../../util/Daiban.json')
153
+
154
+
155
+ let saveGen = function *(self) {
156
+ try {
157
+ if(self.$login){
158
+ // 账号ename,密码password,是否显示异地登陆
159
+ yield self.$login.login(self.model.ename, self.model.password, self.$login.showYiDi)
160
+ }
161
+ if(self.$appdata){
162
+ yield self.$appdata.load()
163
+
164
+ }
165
+ if (Vue.$heatCompatibility) {
166
+ try {
167
+ if(self.$loginHeat){
168
+ yield self.$loginHeat.login(self.model.ename, self.model.password)
169
+ }
170
+ if(self.$appdataHeat){
171
+ yield self.$appdataHeat.load()
172
+ }
173
+ } catch (e) {
174
+ console.log('热力系统登陆失败!')
175
+ }
176
+ }
177
+ yield self.$getConfig(self, 'Login')
178
+ console.log('登录配置', self.config)
179
+ if (self.config.isMac) {
180
+ // 获取该登录人分公司下的mac配置
181
+ let getMacs = yield self.$resetpost('rs/sql/equipmentQuery', {data: {condition: `f_filialeids like '%${self.$login.f.f_orgids}%'`}}, {
182
+ resolveMsg: null,
183
+ rejectMsg: null
184
+ }).catch(() => {
185
+ throw new Error('获取mac配置失败')
186
+ })
187
+ console.log('MAC地址信息', getMacs)
188
+ // 获取本地mac地址
189
+ let getLocalMac = yield self.$resetget('http://127.0.0.1:8003/loadmac', {
190
+ resolveMsg: null,
191
+ rejectMsg: null
192
+ }).catch(() => {
193
+ throw new Error('获取本地mac配置失败')
194
+ })
195
+ console.log('本地MAC地址信息', getLocalMac)
196
+ // 对Mac地址进行匹配
197
+ let macValidate = false
198
+ for (let i = 0; i < getLocalMac.data.mac.length; i++) {
199
+ for (let j = 0; j < getMacs.data.length; j++) {
200
+ if (getMacs.data[j].f_mac_number.toLocaleUpperCase() === getLocalMac.data.mac[i]) {
201
+ macValidate = true
202
+ }
203
+ }
204
+ }
205
+ if (!macValidate) {
206
+ throw new Error('Mac地址验证失败, 请联系管理员!!')
207
+ }
208
+ }
209
+ console.log(self.$login.depPrompt)
210
+ // 弱口令验证
211
+ //跳转过来的不进行验证
212
+ if ((!self.otherLogin) && self.config.weakPassword && !(/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,16}$/.test(self.model.password))) {
213
+ self.$showMessage('登录系统: 此账户的密码过于简单,请修改密码后重新登陆!!!', ['confirm']).then((res) => {
214
+ self.modifyPwShow = true
215
+ })
216
+ } else if ((!self.otherLogin) && self.$login.depPrompt) {
217
+ self.depPromptShow = true
218
+ if (self.$login.showDaiBan && self.$login.r.includes('展示预约信息')){
219
+ // 获取待办
220
+ self.getDaiBan()
221
+
222
+ }
223
+ if (self.$login.showDaiBan && self.$login.r.includes('登录预约信息')){
224
+ // 获取待办 在util下有个Daiban.jsond 文件 ,在里面进行配置,在功能权限界面增加登录预约信息
225
+ self.getDaiBanA()
226
+ }
227
+ } else {
228
+ self.$goto('home-page', {functions: self.$login.f,config: self.config})
229
+ // if (self.otherLogin){
230
+ // window.history.pushState(null,null,'')
231
+ // }
232
+ if (self.$login) {
233
+ console.log('登录信息', self.$login.f)
234
+ global.login=self.$login.f
235
+ console.log('登录信息', global.login)
236
+ }
237
+ }
238
+
239
+ } catch (ret) {
240
+ console.error('登录失败', ret)
241
+ let msg
242
+ if (ret instanceof Error) {
243
+ msg = ret
244
+ }
245
+ if (ret.status === 0) {
246
+ msg = '服务连接错误,请确认服务状态'
247
+ } else if (ret.status === 401) {
248
+ msg = ret.data
249
+ } else if (ret.status === 710) {
250
+ msg = ret.data
251
+ }
252
+ self.createCode()
253
+ self.picLyanzhengma = ''
254
+ yield self.$showMessage(msg)
255
+ self.model.ename = ''
256
+ self.model.password = ''
257
+ self.login = false
258
+ $('form').fadeIn(500)
259
+ }
260
+ }
261
+ export default {
262
+ title: '登录',
263
+ async ready () {
264
+ this.titleShow = this.$appdata.getSingleValue('关于我们')
265
+ window.versionTime = window.versionTime ? window.versionTime : new Date().getTime()
266
+ this.vTime = this.format(new Date(window.versionTime));
267
+ try{
268
+ let http = new HttpResetClass()
269
+ let res = await http.load('POST', 'rs/sql/singleTable',
270
+ {data:{
271
+ tablename: 't_changedeclare',
272
+ condition: ` f_type ='变更通知' `
273
+ }
274
+ }, {resolveMsg: null, rejectMsg: null})
275
+ if(res.data.length>0){
276
+ console.log("---------------获取通知",res.data[0].f_change_message)
277
+ this.notice=res.data[0].f_change_message
278
+ }
279
+ }catch(e){}
280
+
281
+ this.loginother();
282
+ $('#login-button').click(function (event) {
283
+ event.preventDefault()
284
+ $('form').fadeOut(500)
285
+ })
286
+ if (window.location.search && window.location.search.indexOf('af_key') !== -1&& window.location.search.indexOf('af_n') !== -1) {
287
+ const subUrl = window.location.search.replace('?af_key=','').split('&af_n=')
288
+ console.log(subUrl)
289
+ this.model.ename = window.atob(subUrl[0])
290
+ this.model.password = window.atob(subUrl[1])
291
+ console.log('this.model.ename',this.model.ename)
292
+ this.otherLogin = true
293
+ this.confirm()
294
+ }else{
295
+ //跳转不需要验证码
296
+ this.createCode()
297
+ }
298
+ console.log(this.$login)
299
+ },
300
+ data () {
301
+ return {
302
+ vTime: '',
303
+ image:{
304
+ img1: '/images/newStyle/login-info.png',
305
+ img2: '/images/newStyle/login-con.png',
306
+ img3: '/images/newStyle/login-left.png',
307
+ img4: '/images/newStyle/login-user.png',
308
+ img5: '/images/newStyle/login-pwd.png',
309
+ img6: '/images/newStyle/login-check.png',
310
+ img7: '/images/newStyle/login-do.png',
311
+ },
312
+ config: {
313
+ isMac: false,
314
+ depPrompt: false,
315
+ weakPassword: false,
316
+ title: '燃气客服系统',
317
+ distanceLogin: false,
318
+ // 那些角色可以定时获取预约提示
319
+ isTip : false,
320
+ // 那些角色可以定时获取预约提示
321
+ msgRole : '预约处理人员',
322
+ // 定时获取提示间隔 单位:分钟
323
+ times: 25,
324
+ },
325
+ titleShow: true, //标题显示
326
+ otherLogin:false,
327
+ login: false,
328
+ depPromptShow: false,
329
+ model: {},
330
+ show: false,
331
+ checkCode: '',
332
+ login_do:true,
333
+ picLyanzhengma: '',
334
+ // 修改密码弹框展示
335
+ modifyPwShow: false,
336
+ logoandroid:false,
337
+ showus:false,
338
+ notice:'',
339
+ loginotherflag :true,
340
+ // 报建待办
341
+ AppDaiBan: '',
342
+ //安检待办
343
+ safecheckDaiBan:[],
344
+ // 预约待处理
345
+ OrderDaiBan: ''
346
+ }
347
+ },
348
+ methods: {
349
+ //格式化时间
350
+ format(dat){
351
+ //获取年月日,时间
352
+ const year = dat.getFullYear();
353
+ const mon = (dat.getMonth()+1) < 10 ? "0"+(dat.getMonth()+1) : dat.getMonth()+1;
354
+ const data = dat.getDate() < 10 ? "0"+(dat.getDate()) : dat.getDate();
355
+ const hour = dat.getHours() < 10 ? "0"+(dat.getHours()) : dat.getHours();
356
+ const min = dat.getMinutes() < 10 ? "0"+(dat.getMinutes()) : dat.getMinutes();
357
+ const seon = dat.getSeconds() < 10 ? "0"+(dat.getSeconds()) : dat.getSeconds();
358
+
359
+ return year + "-" + mon + "-" + data + " " + hour + ":" + min + ":" + seon;
360
+ },
361
+ async getDaiBan(){
362
+ let http = new HttpResetClass()
363
+ let condition = ''
364
+ if(this.$login.f.deps!=='柠条塔'){
365
+ condition = ` (f_orderstate != '预约成功' and f_orderstate != '预约失败' ) or f_orderstate is null `
366
+ } else {
367
+ condition =` f_orderstate is null and (f_address in( select f_address from t_user_address where f_slice_area='柠条塔') or f_address like '%柠条塔%') `
368
+ }
369
+ await http.load('POST', '/rs/sql/singleTable', {data: {
370
+ tablename:'t_order_center',
371
+ condition:condition
372
+ }}, {
373
+ resolveMsg: null,
374
+ rejectMsg: null
375
+ }).then((res) => {
376
+ let OrderDaiBan = {}
377
+ res.data.forEach(item=>{
378
+ OrderDaiBan[item.f_ordertype] = OrderDaiBan[item.f_ordertype] || []
379
+ OrderDaiBan[item.f_ordertype].push(item)
380
+ })
381
+ this.OrderDaiBan = `您有${res.data.length}条需要处理的微信预约业务!`
382
+ if (res.data.length> 0){
383
+ this.OrderDaiBan += `其中 ${Object.keys(OrderDaiBan).map(key=>`${key}:${OrderDaiBan[key].length}条`).join(', ')}`
384
+ }
385
+ })
386
+ let data = {
387
+ condition: '1 = 1',
388
+ data: {
389
+ orgid: this.$login.f.orgid,
390
+ id: this.$login.f.id
391
+ }
392
+ }
393
+ await http.load('POST', '/rs/sql/checkuser', {data: data}, {
394
+ resolveMsg: null,
395
+ rejectMsg: null
396
+ }).then((res) => {
397
+ let AppDaiBan = {}
398
+ res.data.forEach(item=>{
399
+ AppDaiBan[item.defname] = AppDaiBan[item.defname] || []
400
+ AppDaiBan[item.defname].push(item)
401
+ })
402
+ this.AppDaiBan = `您有${res.data.length}条需要处理的报建待办业务!`
403
+ if (res.data.length> 0){
404
+ this.AppDaiBan += `其中 ${Object.keys(AppDaiBan).map(key=>`${key}:${AppDaiBan[key].length}条`).join(', ')}`
405
+ }
406
+ })
407
+
408
+ },
409
+ async getDaiBanA(){
410
+ // 是否全局开启待办通知
411
+ if (daibanJson.enable) {
412
+ console.log("当前获取到待办配置为" + JSON.stringify(daibanJson))
413
+ let http = new HttpResetClass()
414
+ let daibanArray = []
415
+ for (let daibanItem of daibanJson.daiban) {
416
+ console.log("开始处理待办任务:" + daibanItem.title + "当前任务状态:" + daibanItem.enable?"开启":"关闭" )
417
+ if (daibanItem.enable) { // 控制每一项通知是否开启
418
+ let postResult = ''; //提示信息为
419
+ await http.load("POST",daibanItem.url,{data:daibanItem.data},{ resolveMsg: null, rejectMsg: null})
420
+ .then((res)=>{
421
+ let responseData = res.data
422
+ for (let item of responseData) {
423
+ postResult += eval(daibanItem.text) + "\n"
424
+ }
425
+ postResult += '\t'
426
+ daibanArray.push({text:postResult,oldData:daibanItem})
427
+ })
428
+ }
429
+ }
430
+ console.log("安检数据为:"+JSON.stringify(daibanArray))
431
+ this.safecheckDaiBan = daibanArray
432
+ }else {
433
+ console.log("待办提醒全局关闭。")
434
+ }
435
+
436
+
437
+
438
+
439
+ },
440
+
441
+ async loginother(){
442
+ if (this.config.distanceLogin) {
443
+ if (this.$login && this.$login.getUrlParames('name') ) {
444
+ let ename = this.$login.getUrlParames('name');
445
+ let logininfo = await this.$resetpost('rs/logic/getLoginData',{data:{ename:ename}},{resolveMsg: null, rejectMsg: null});
446
+ if(logininfo.data){
447
+ if(logininfo.data.ename && logininfo.data.password){
448
+ this.model.ename = logininfo.data.ename
449
+ this.model.password =logininfo.data.password
450
+ let gen = saveGen(this)
451
+ return co(gen)
452
+ }
453
+ }
454
+ }
455
+ }
456
+ },
457
+ theme(){
458
+ // var elementList = document.querySelectorAll('body');
459
+ // console.log(elementList)
460
+ // document.querySelectorAll('body')[0].className='themeTwo'
461
+ // var elementList = document.querySelectorAll('body');
462
+ // console.log(elementList)
463
+ },
464
+ onReady () {
465
+ this.$emit('ready')
466
+ },
467
+ confirm (key) {
468
+ this.login_do=!this.login_do
469
+ // return
470
+ if (key == 'key') {
471
+ $('form').fadeOut(500)
472
+ }
473
+ this.login = true
474
+ // let gen = saveGen(this)
475
+ // return co(gen)
476
+ if((!this.otherLogin) && this.$login && this.$login.Verification){
477
+ console.log('跳转过来的不走验证')
478
+ if(this.picLyanzhengma == '') {
479
+ this.$showMessage("请输入验证码!").then(()=>{
480
+ this.login = false
481
+ $('form').fadeIn(500)
482
+ this.createCode()
483
+ })
484
+ }else if(this.picLyanzhengma.toUpperCase() != this.checkCode ) {
485
+ //若输入的验证码与产生的验证码不一致时
486
+ this.$showMessage("验证码不正确").then(()=>{
487
+ this.login = false
488
+ $('form').fadeIn(500)
489
+ this.createCode();//刷新验证码
490
+ this.picLyanzhengma = '';
491
+ })
492
+ }else {
493
+ this.login = true
494
+ let gen = saveGen(this)
495
+ return co(gen)
496
+ }
497
+ }else {
498
+ this.login = true
499
+ let gen = saveGen(this)
500
+ return co(gen)
501
+ }
502
+ },
503
+ createCode(){
504
+ let code = "";
505
+ let codeLength = 4;//验证码的长度
506
+ 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',
507
+ 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z');//随机数
508
+ for (let i = 0; i < codeLength; i++) {
509
+ //循环操作
510
+ let index = Math.floor(Math.random() * 36);//取得随机数的索引(0~35)
511
+ code += random[index];//根据索引取得随机数加到code上
512
+ }
513
+ this.checkCode = code;//把code值赋给验证码
514
+ },
515
+
516
+ async depPromptConfirm () {
517
+ this.depPromptShow = false
518
+ return this.$goto('home-page', {functions: this.$login.f,config: this.config})
519
+ },
520
+
521
+ depPromptCancel () {
522
+ this.depPromptShow = false
523
+ this.createCode()
524
+ this.picLyanzhengma = ''
525
+ this.model.ename = ''
526
+ this.model.password = ''
527
+ this.login = false
528
+ $('form').fadeIn(500)
529
+ },
530
+ delCookie() {
531
+ let cookies = document.cookie.split(";");
532
+ console.log("点击触发了")
533
+ for (let i = 0; i < cookies.length; i++) {
534
+ let cookie = cookies[i];
535
+ let eqPos = cookie.indexOf("=");
536
+ let name = eqPos > -1 ? cookie.substr(0, eqPos) : cookie;
537
+ document.cookie =
538
+ name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/";
539
+ }
540
+ if (cookies.length > 0) {
541
+ for (let i = 0; i < cookies.length; i++) {
542
+ let cookie = cookies[i];
543
+ let eqPos = cookie.indexOf("=");
544
+ let name = eqPos > -1 ? cookie.substr(0, eqPos) : cookie;
545
+ let domain = location.host.substr(location.host.indexOf("."));
546
+ document.cookie =
547
+ name +
548
+ "=;expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; domain=" +
549
+ domain;
550
+ }
551
+ }
552
+ localStorage.clear()
553
+ sessionStorage.clear()
554
+ window.location.reload()
555
+ }
556
+
557
+ },
558
+ watch: {
559
+ 'modifyPwShow' (val){
560
+ if (!val) {
561
+ window.location.reload()
562
+ }
563
+ }
564
+ }
565
+ }
566
+ </script>
567
+
568
+ <style>
569
+ .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}
570
+ .my_button_search:hover img{ filter: opacity(0.8);}
571
+ </style>