system-clients 4.0.4 → 4.0.5

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