system-clients 3.2.97 → 3.2.98-temp

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