system-clients 3.3.2 → 3.3.3-v3

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 (58) hide show
  1. package/package.info +1 -0
  2. package/package.json +105 -105
  3. package/src/LodopFuncs.js +71 -103
  4. package/src/components/Main.vue +923 -935
  5. package/src/components/Util.js +15 -0
  6. package/src/components/equipment/PcAdd.vue +1 -1
  7. package/src/components/equipment/PcList.vue +3 -3
  8. package/src/components/equipment/PhoneAdd.vue +1 -1
  9. package/src/components/equipment/PhoneList.vue +2 -2
  10. package/src/components/equipment/PosAdd.vue +11 -7
  11. package/src/components/equipment/PosList.vue +5 -3
  12. package/src/components/equipment/PosManage.vue +1 -1
  13. package/src/components/equipment/PosParamAdd.vue +2 -2
  14. package/src/components/equipment/PosParamList.vue +2 -2
  15. package/src/components/materialManage/materialList.vue +1 -1
  16. package/src/components/parammanage/ParamPage.vue +12 -12
  17. package/src/components/parammanage/ParamPages.vue +2 -2
  18. package/src/components/parammanage/SinglePage.vue +8 -8
  19. package/src/components/parammanage/SinglePages.vue +2 -2
  20. package/src/components/server/AddChangeMsg.vue +1 -1
  21. package/src/components/server/ChangeDeclare.vue +1 -1
  22. package/src/components/server/Login.vue +558 -575
  23. package/src/components/server/ModifyPw.vue +0 -1
  24. package/src/components/server/PcdBuildingSelect.vue +6 -8
  25. package/src/components/server/ResSelect.vue +0 -3
  26. package/src/components/server/ResSelectGroup.vue +1 -1
  27. package/src/components/server/RoleSelector.vue +2 -3
  28. package/src/components/server/TestResSelectGroup.vue +1 -1
  29. package/src/filiale/baole/Login.vue +23 -21
  30. package/src/filiale/chengtou/Login.vue +23 -21
  31. package/src/filiale/dongguan/Login.vue +23 -21
  32. package/src/filiale/dongguan/Main.vue +3 -5
  33. package/src/filiale/furuike/Login.vue +24 -24
  34. package/src/filiale/furuike/Main.vue +26 -39
  35. package/src/filiale/gehua/Main.vue +3 -5
  36. package/src/filiale/konggang/Login.vue +23 -21
  37. package/src/filiale/qianneng/Login.vue +23 -21
  38. package/src/filiale/qianneng/Main.vue +3 -5
  39. package/src/filiale/qianneng/ModifyPw.vue +0 -1
  40. package/src/filiale/rizhao/Login.vue +22 -20
  41. package/src/filiale/rizhao/Main.vue +3 -3
  42. package/src/filiale/shiquan/Login.vue +23 -21
  43. package/src/filiale/tianyi/Login.vue +23 -21
  44. package/src/filiale/tongchuan/Login.vue +23 -21
  45. package/src/filiale/tongchuan/Main.vue +6 -8
  46. package/src/filiale/weinan/Main.vue +6 -7
  47. package/src/filiale/wenxi/Login.vue +23 -21
  48. package/src/filiale/wenxi/Main.vue +3 -5
  49. package/src/filiale/wuhai/Main.vue +3 -6
  50. package/src/filiale/yuchuan/Login.vue +24 -22
  51. package/src/filiale/yuchuan/Main.vue +3 -5
  52. package/src/filiale/zhoukou/Main.vue +3 -5
  53. package/src/plugins/EncryptUtil.js +1 -1
  54. package/src/plugins/GetLoginInfoService.js +85 -20
  55. package/src/stores/AppData.js +1 -1
  56. package/build.gradle +0 -6
  57. package/src/filiale/ruihua/Login.vue +0 -549
  58. package/src/filiale/ruihua/system.js +0 -5
@@ -178,8 +178,7 @@ let getwartermakr = async function (self) {
178
178
  tablename: 't_singlevalue',
179
179
  condition: " 1=1 and name=\'水印内容\'"
180
180
  };
181
- // todo v4
182
- let result = await self.$resetpost('api/af-revenue/sql/saleSingleTable', {data: param}, {resolveMsg: null, rejectMsg: null});
181
+ let result = await self.$resetpost('rs/sql/saleSingleTable', {data: param}, {resolveMsg: null, rejectMsg: null});
183
182
  if (result && result.data.length > 0) {
184
183
  self.showwatermakeflag = true;
185
184
  createWaterMark(`${result.data[0].value}${self.$login.f.ename}`);
@@ -328,7 +327,7 @@ export default {
328
327
  this.OrderDaiBan = ''
329
328
  this.AppDaiBan = ''
330
329
  let http = new HttpResetClass()
331
- await http.load('POST', '/api/af-system/sql/singleTable', {data: {
330
+ await http.load('POST', '/rs/sql/singleTable', {data: {
332
331
  tablename:'t_order_center',
333
332
  condition:` (f_orderstate != '预约成功' and f_orgstr ='${this.$login.f.orgid}' and f_orderstate != '预约失败' ) or f_orderstate is null`
334
333
  }}, {
@@ -400,44 +399,33 @@ export default {
400
399
  }
401
400
  },
402
401
  async workorderOverRemind(){
403
- var f_filialeids=this.$login.f.orgid
404
- const data = {
405
- condition: `f_filiale_id in ('${f_filialeids}') and overday >= 0`
406
- }
407
- new HttpResetClass().load('POST','rs/sql/serviceDetails/n', {data}, {resolveMsg: null, rejectMsg: null}).then(res=>{
408
- if(res.data && res.data.n !== 0){
409
- // this.$showMessage('你有'+res.data.n+'个工单已逾期,请尽快处理')
410
- this.yuqitishi = true
411
- this.num = res.data.n
402
+ if(this.functions && this.functions.f_role_name && this.functions.f_role_name.indexOf('管理员') !== -1 && this.functions.f_role_name.indexOf('管理人员') == -1){
403
+ let res = await new HttpResetClass().load('POST', '/rs/sql/tel_singleTable', {
404
+ "data": {
405
+ "items": "*",
406
+ "tablename": "t_organization",
407
+ "condition": `parentid = '${this.functions.orgid}'`
408
+ }
409
+ }, {resolveMsg: null, rejectMsg: null})
410
+ const f_filialeids = [this.functions.orgid]
411
+ for (const f of res.data) {
412
+ f_filialeids.push(f.id)
412
413
  }
413
- })
414
- // if(this.functions && this.functions.f_role_name && this.functions.f_role_name.indexOf('管理员') !== -1 && this.functions.f_role_name.indexOf('管理人员') == -1){
415
- // let res = await new HttpResetClass().load('POST', '/rs/sql/tel_singleTable', {
416
- // "data": {
417
- // "items": "*",
418
- // "tablename": "t_organization",
419
- // "condition": `parentid = '${this.functions.orgid}'`
420
- // }
421
- // }, {resolveMsg: null, rejectMsg: null})
422
- // const f_filialeids = [this.functions.orgid]
423
- // for (const f of res.data) {
424
- // f_filialeids.push(f.id)
425
- // }
426
- //
427
- // const data = {
428
- // condition: `f_filiale_id in (${f_filialeids.join(',')}) and overday >= 0`
429
- // }
430
- // new HttpResetClass().load('POST','rs/sql/serviceDetails/n', {data}, {resolveMsg: null, rejectMsg: null}).then(res=>{
431
- // if(res.data && res.data.n !== 0){
432
- // /*this.$showMessage('你有'+res.data.n+'个工单已逾期,请尽快处理')*/
433
- // this.yuqitishi = true
434
- // this.num = res.data.n
435
- // }
436
- // })
437
- // }
414
+
415
+ const data = {
416
+ condition: `f_filiale_id in (${f_filialeids.join(',')}) and overday >= 0`
417
+ }
418
+ new HttpResetClass().load('POST','rs/sql/serviceDetails/n', {data}, {resolveMsg: null, rejectMsg: null}).then(res=>{
419
+ if(res.data && res.data.n !== 0){
420
+ /*this.$showMessage('你有'+res.data.n+'个工单已逾期,请尽快处理')*/
421
+ this.yuqitishi = true
422
+ this.num = res.data.n
423
+ }
424
+ })
425
+ }
438
426
  },
439
427
  openUrl() {
440
- var url = `http://123.60.214.109:8406/submitTicket?contact=${this.$login.f.name}&orgName=${this.$login.f.orgs}&phone=${this.$login.f.f_user_telephone}`
428
+ var url = `https://liuli.aofengcloud.com:31467`
441
429
  window.open(url, '_blank')
442
430
  },
443
431
  hindsetting() {
@@ -516,7 +504,6 @@ export default {
516
504
  username: this.$login.f.name,
517
505
  usertelephone: this.$login.f.f_user_telephone
518
506
  }
519
- // todo v4
520
507
  await this.$resetpost('rs/logic/logOut', data, {resolveMsg: '退出成功', rejectMsg: null})
521
508
  window.location.reload()
522
509
  }
@@ -151,8 +151,7 @@ let getwartermakr = async function (self) {
151
151
  tablename: 't_singlevalue',
152
152
  condition: " 1=1 and name=\'水印内容\'"
153
153
  };
154
- // todo v4
155
- let result = await self.$resetpost('api/af-revenue/sql/saleSingleTable', {data: param}, {resolveMsg: null, rejectMsg: null});
154
+ let result = await self.$resetpost('rs/sql/saleSingleTable', {data: param}, {resolveMsg: null, rejectMsg: null});
156
155
  if (result && result.data.length > 0) {
157
156
  self.showwatermakeflag = true;
158
157
  createWaterMark(`${result.data[0].value}${self.$login.f.ename}`);
@@ -292,7 +291,7 @@ export default {
292
291
  this.OrderDaiBan = ''
293
292
  this.AppDaiBan = ''
294
293
  let http = new HttpResetClass()
295
- await http.load('POST', '/api/af-system/sql/singleTable', {data: {
294
+ await http.load('POST', '/rs/sql/singleTable', {data: {
296
295
  tablename:'t_order_center',
297
296
  condition:` (f_orderstate != '预约成功' and f_orgstr ='${this.$login.f.orgid}' and f_orderstate != '预约失败' ) or f_orderstate is null`
298
297
  }}, {
@@ -364,7 +363,7 @@ export default {
364
363
  }
365
364
  },
366
365
  openUrl() {
367
- var url = `http://123.60.214.109:8406/submitTicket?personName=${this.$login.f.name}&orgName=${this.$login.f.orgs}`
366
+ var url = `https://liuli.aofengcloud.com:31467`
368
367
  window.open(url, '_blank')
369
368
  },
370
369
  hindsetting() {
@@ -423,7 +422,6 @@ export default {
423
422
  username: this.$login.f.name,
424
423
  usertelephone: this.$login.f.f_user_telephone
425
424
  }
426
- // todo v4
427
425
  await this.$resetpost('rs/logic/logOut', data, {resolveMsg: '退出成功', rejectMsg: null})
428
426
  window.location.reload()
429
427
  }
@@ -134,6 +134,7 @@
134
134
  import $ from 'jquery'
135
135
  import Vue from 'vue'
136
136
  import {HttpResetClass} from 'vue-client'
137
+ import {isPasswordModificationExpired} from '../../components/Util'
137
138
 
138
139
 
139
140
 
@@ -162,7 +163,6 @@
162
163
  console.log('登录配置', self.config)
163
164
  if (self.config.isMac) {
164
165
  // 获取该登录人分公司下的mac配置
165
- // todo v4
166
166
  let getMacs = yield self.$resetpost('rs/sql/equipmentQuery', {data: {condition: `f_filialeids like '%${self.$login.f.f_orgids}%'`}}, {
167
167
  resolveMsg: null,
168
168
  rejectMsg: null
@@ -192,12 +192,15 @@
192
192
  }
193
193
  }
194
194
  console.log(self.$login.depPrompt)
195
- // 弱口令验证
196
- //跳转过来的不进行验证
197
- if ((!self.otherLogin) && self.config.weakPassword && !(/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,16}$/.test(self.model.password))) {
195
+ // 弱口令验证(默认开启,跳转过来的不进行验证)
196
+ if ((!self.otherLogin) && !(/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,16}$/.test(self.model.password))) {
198
197
  self.$showMessage('登录系统: 此账户的密码过于简单,请修改密码后重新登陆!!!', ['confirm']).then((res) => {
199
198
  self.modifyPwShow = true
200
199
  })
200
+ } else if ((!self.otherLogin) && isPasswordModificationExpired(self.$login.f.f_last_modification_time)) {
201
+ self.$showMessage('登录系统: 您的密码已超过两个半月未修改,请修改密码后重新登录!!!', ['confirm']).then((res) => {
202
+ self.modifyPwShow = true
203
+ })
201
204
  } else if ((!self.otherLogin) && self.$login.depPrompt) {
202
205
  self.depPromptShow = true
203
206
  if (self.$login.showDaiBan && self.$login.r.includes('展示预约信息')){
@@ -218,6 +221,8 @@
218
221
 
219
222
  } catch (ret) {
220
223
  console.error('登录失败', ret)
224
+ self.$login.s = null
225
+ self.$login['v3-session-key'] = null
221
226
  let msg
222
227
  if (ret instanceof Error) {
223
228
  msg = ret
@@ -241,19 +246,19 @@
241
246
  export default {
242
247
  title: '登录',
243
248
  async ready () {
244
- try{
245
- let http = new HttpResetClass()
246
- let res = await http.load('POST', 'api/af-system/sql/singleTable',
247
- {data:{
248
- tablename: 't_changedeclare',
249
- condition: ` f_type ='变更通知' `
250
- }
251
- }, {resolveMsg: null, rejectMsg: null})
252
- if(res.data.length>0){
253
- console.log("---------------获取通知",res.data[0].f_change_message)
254
- this.notice=res.data[0].f_change_message
255
- }
256
- }catch(e){}
249
+ // try{
250
+ // let http = new HttpResetClass()
251
+ // let res = await http.load('POST', 'rs/sql/singleTable',
252
+ // {data:{
253
+ // tablename: 't_changedeclare',
254
+ // condition: ` f_type ='变更通知' `
255
+ // }
256
+ // }, {resolveMsg: null, rejectMsg: null})
257
+ // if(res.data.length>0){
258
+ // console.log("---------------获取通知",res.data[0].f_change_message)
259
+ // this.notice=res.data[0].f_change_message
260
+ // }
261
+ // }catch(e){}
257
262
 
258
263
  this.loginother();
259
264
  $('#login-button').click(function (event) {
@@ -262,10 +267,8 @@
262
267
  })
263
268
  if (window.location.search && window.location.search.indexOf('af_key') !== -1&& window.location.search.indexOf('af_n') !== -1) {
264
269
  const subUrl = window.location.search.replace('?af_key=','').split('&af_n=')
265
- console.log(subUrl)
266
270
  this.model.ename = window.atob(subUrl[0])
267
271
  this.model.password = window.atob(subUrl[1])
268
- console.log('this.model.ename',this.model.ename)
269
272
  this.otherLogin = true
270
273
  this.confirm()
271
274
  }else{
@@ -327,7 +330,7 @@
327
330
  } else {
328
331
  condition =` f_orderstate is null and (f_address in( select f_address from t_user_address where f_slice_area='柠条塔') or f_address like '%柠条塔%') `
329
332
  }
330
- await http.load('POST', '/api/af-system/sql/singleTable', {data: {
333
+ await http.load('POST', '/rs/sql/singleTable', {data: {
331
334
  tablename:'t_order_center',
332
335
  condition:condition
333
336
  }}, {
@@ -371,7 +374,6 @@
371
374
  if (this.config.distanceLogin) {
372
375
  if (this.$login && this.$login.getUrlParames('name') ) {
373
376
  let ename = this.$login.getUrlParames('name');
374
- // todo v4
375
377
  let logininfo = await this.$resetpost('rs/logic/getLoginData',{data:{ename:ename}},{resolveMsg: null, rejectMsg: null});
376
378
  if(logininfo.data){
377
379
  if(logininfo.data.ename && logininfo.data.password){
@@ -145,6 +145,7 @@ import co from 'co'
145
145
  import $ from 'jquery'
146
146
  import Vue from 'vue'
147
147
  import {HttpResetClass} from 'vue-client'
148
+ import {isPasswordModificationExpired} from '../../components/Util'
148
149
  import cryptJS from "../../plugins/EncryptUtil";
149
150
 
150
151
  let daibanJson = require('../../util/Daiban.json')
@@ -175,7 +176,6 @@ let saveGen = function *(self) {
175
176
  console.log('登录配置', self.config)
176
177
  if (self.config.isMac) {
177
178
  // 获取该登录人分公司下的mac配置
178
- // todo v4
179
179
  let getMacs = yield self.$resetpost('rs/sql/equipmentQuery', {data: {condition: `f_filialeids like '%${self.$login.f.f_orgids}%'`}}, {
180
180
  resolveMsg: null,
181
181
  rejectMsg: null
@@ -205,12 +205,15 @@ let saveGen = function *(self) {
205
205
  }
206
206
  }
207
207
  console.log(self.$login.depPrompt)
208
- // 弱口令验证
209
- //跳转过来的不进行验证
210
- if ((!self.otherLogin) && self.config.weakPassword && !(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?!.*(.)(\1)+)(?!.*(123|321|abc|cba))[a-zA-Z\d!@#$%^&*()_+-=<>?]{8,16}$/.test(self.model.password))) {
208
+ // 弱口令验证(默认开启,跳转过来的不进行验证)
209
+ if ((!self.otherLogin) && !(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?!.*(.)(\1)+)(?!.*(123|321|abc|cba))[a-zA-Z\d!@#$%^&*()_+-=<>?]{8,16}$/.test(self.model.password))) {
211
210
  self.$showMessage('登录系统: 此账户的密码过于简单,请修改密码后重新登陆!!!', ['confirm']).then((res) => {
212
211
  self.modifyPwShow = true
213
212
  })
213
+ } else if ((!self.otherLogin) && isPasswordModificationExpired(self.$login.f.f_last_modification_time)) {
214
+ self.$showMessage('登录系统: 您的密码已超过两个半月未修改,请修改密码后重新登录!!!', ['confirm']).then((res) => {
215
+ self.modifyPwShow = true
216
+ })
214
217
  } else if ((!self.otherLogin) && self.$login.depPrompt) {
215
218
  self.depPromptShow = true
216
219
  if (self.$login.showDaiBan && self.$login.r.includes('展示预约信息')){
@@ -231,6 +234,8 @@ let saveGen = function *(self) {
231
234
  }
232
235
  } catch (ret) {
233
236
  console.error('登录失败', ret)
237
+ self.$login.s = null
238
+ self.$login['v3-session-key'] = null
234
239
  let msg
235
240
  if (ret instanceof Error) {
236
241
  msg = ret
@@ -259,19 +264,19 @@ export default {
259
264
  this.titleShow = this.$appdata.getSingleValue('关于我们')
260
265
  window.versionTime = window.versionTime ? window.versionTime : new Date().getTime()
261
266
  this.vTime = this.format(new Date(window.versionTime));
262
- try{
263
- let http = new HttpResetClass()
264
- let res = await http.load('POST', 'api/af-system/sql/singleTable',
265
- {data:{
266
- tablename: 't_changedeclare',
267
- condition: ` f_type ='变更通知' `
268
- }
269
- }, {resolveMsg: null, rejectMsg: null})
270
- if(res.data.length>0){
271
- console.log("---------------获取通知",res.data[0].f_change_message)
272
- this.notice=res.data[0].f_change_message
273
- }
274
- }catch(e){}
267
+ // try{
268
+ // let http = new HttpResetClass()
269
+ // let res = await http.load('POST', 'rs/sql/singleTable',
270
+ // {data:{
271
+ // tablename: 't_changedeclare',
272
+ // condition: ` f_type ='变更通知' `
273
+ // }
274
+ // }, {resolveMsg: null, rejectMsg: null})
275
+ // if(res.data.length>0){
276
+ // console.log("---------------获取通知",res.data[0].f_change_message)
277
+ // this.notice=res.data[0].f_change_message
278
+ // }
279
+ // }catch(e){}
275
280
 
276
281
  this.loginother();
277
282
  $('#login-button').click(function (event) {
@@ -295,10 +300,8 @@ export default {
295
300
  this.confirm()
296
301
  } else if (window.location.search && window.location.search.indexOf('af_key') !== -1&& window.location.search.indexOf('af_n') !== -1) {
297
302
  const subUrl = window.location.search.replace('?af_key=','').split('&af_n=')
298
- console.log(subUrl)
299
303
  this.model.ename = window.atob(subUrl[0])
300
304
  this.model.password = window.atob(subUrl[1])
301
- console.log('this.model.ename',this.model.ename)
302
305
  this.otherLogin = true
303
306
  this.confirm()
304
307
  }else{
@@ -378,7 +381,7 @@ export default {
378
381
  } else {
379
382
  condition =` f_orderstate is null and (f_address in( select f_address from t_user_address where f_slice_area='柠条塔') or f_address like '%柠条塔%') `
380
383
  }
381
- await http.load('POST', '/api/af-system/sql/singleTable', {data: {
384
+ await http.load('POST', '/rs/sql/singleTable', {data: {
382
385
  tablename:'t_order_center',
383
386
  condition:condition
384
387
  }}, {
@@ -454,7 +457,6 @@ export default {
454
457
  if (this.config.distanceLogin) {
455
458
  if (this.$login && this.$login.getUrlParames('name') ) {
456
459
  let ename = this.$login.getUrlParames('name');
457
- // todo v4
458
460
  let logininfo = await this.$resetpost('rs/logic/getLoginData',{data:{ename:ename}},{resolveMsg: null, rejectMsg: null});
459
461
  if(logininfo.data){
460
462
  if(logininfo.data.ename && logininfo.data.password){
@@ -161,8 +161,7 @@ let getwartermakr = async function (self) {
161
161
  tablename: 't_singlevalue',
162
162
  condition: " 1=1 and name=\'水印内容\'"
163
163
  };
164
- // todo v4
165
- let result = await self.$resetpost('api/af-revenue/sql/saleSingleTable', {data: param}, {resolveMsg: null, rejectMsg: null});
164
+ let result = await self.$resetpost('rs/sql/saleSingleTable', {data: param}, {resolveMsg: null, rejectMsg: null});
166
165
  if (result && result.data.length > 0) {
167
166
  self.showwatermakeflag = true;
168
167
  createWaterMark(`${result.data[0].value}${self.$login.f.ename}`);
@@ -301,7 +300,7 @@ export default {
301
300
  this.OrderDaiBan = ''
302
301
  this.AppDaiBan = ''
303
302
  let http = new HttpResetClass()
304
- await http.load('POST', '/api/af-system/sql/singleTable', {data: {
303
+ await http.load('POST', '/rs/sql/singleTable', {data: {
305
304
  tablename:'t_order_center',
306
305
  condition:` (f_orderstate != '预约成功' and f_orgstr ='${this.$login.f.orgid}' and f_orderstate != '预约失败' ) or f_orderstate is null`
307
306
  }}, {
@@ -373,7 +372,7 @@ export default {
373
372
  }
374
373
  },
375
374
  openUrl() {
376
- var url = `http://123.60.214.109:8406/submitTicket?personName=${this.$login.f.name}&orgName=${this.$login.f.orgs}`
375
+ var url = `https://liuli.aofengcloud.com:31467`
377
376
  window.open(url, '_blank')
378
377
  },
379
378
  hindsetting() {
@@ -432,7 +431,6 @@ export default {
432
431
  username: this.$login.f.name,
433
432
  usertelephone: this.$login.f.f_user_telephone
434
433
  }
435
- // todo v4
436
434
  await this.$resetpost('rs/logic/logOut', data, {resolveMsg: '退出成功', rejectMsg: null})
437
435
  window.location.reload()
438
436
  }
@@ -62,7 +62,6 @@
62
62
  // let res = yield self.$post('rs/db/modifypassword', {data: self.deliver})
63
63
  // let res = yield self.$resetpost('/rs/db/modifypwd', {data: self.deliver})
64
64
  // Util.f.password = self.deliver.newpassword
65
- // todo v4
66
65
  let res = yield self.$resetpost('/rs/user/modifypwd', {data: self.deliver })
67
66
  self.$login.f.password = self.deliver.newpassword
68
67
  if (res.data) {
@@ -124,10 +124,10 @@ import co from 'co'
124
124
  import $ from 'jquery'
125
125
  import Vue from 'vue'
126
126
  import {HttpResetClass} from 'vue-client'
127
+ import {isPasswordModificationExpired} from '../../components/Util'
127
128
 
128
129
 
129
130
 
130
- // todo v4
131
131
  let saveGen = function *(self) {
132
132
  try {
133
133
  if(self.$login){
@@ -183,12 +183,15 @@ let saveGen = function *(self) {
183
183
  }
184
184
  }
185
185
  console.log(self.$login.depPrompt)
186
- // 弱口令验证
187
- //跳转过来的不进行验证
188
- if ((!self.otherLogin) && self.config.weakPassword && !(/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,16}$/.test(self.model.password))) {
186
+ // 弱口令验证(默认开启,跳转过来的不进行验证)
187
+ if ((!self.otherLogin) && !(/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,16}$/.test(self.model.password))) {
189
188
  self.$showMessage('登录系统: 此账户的密码过于简单,请修改密码后重新登陆!!!', ['confirm']).then((res) => {
190
189
  self.modifyPwShow = true
191
190
  })
191
+ } else if ((!self.otherLogin) && isPasswordModificationExpired(self.$login.f.f_last_modification_time)) {
192
+ self.$showMessage('登录系统: 您的密码已超过两个半月未修改,请修改密码后重新登录!!!', ['confirm']).then((res) => {
193
+ self.modifyPwShow = true
194
+ })
192
195
  } else if ((!self.otherLogin) && self.$login.depPrompt) {
193
196
  self.depPromptShow = true
194
197
  } else {
@@ -205,6 +208,8 @@ let saveGen = function *(self) {
205
208
 
206
209
  } catch (ret) {
207
210
  console.error('登录失败', ret)
211
+ self.$login.s = null
212
+ self.$login['v3-session-key'] = null
208
213
  let msg
209
214
  if (ret instanceof Error) {
210
215
  msg = ret
@@ -228,19 +233,19 @@ let saveGen = function *(self) {
228
233
  export default {
229
234
  title: '登录',
230
235
  async ready () {
231
- try{
232
- let http = new HttpResetClass()
233
- let res = await http.load('POST', 'api/af-system/sql/singleTable',
234
- {data:{
235
- tablename: 't_changedeclare',
236
- condition: ` f_type ='变更通知' `
237
- }
238
- }, {resolveMsg: null, rejectMsg: null})
239
- if(res.data.length>0){
240
- console.log("---------------获取通知",res.data[0].f_change_message)
241
- this.notice=res.data[0].f_change_message
242
- }
243
- }catch(e){}
236
+ // try{
237
+ // let http = new HttpResetClass()
238
+ // let res = await http.load('POST', 'rs/sql/singleTable',
239
+ // {data:{
240
+ // tablename: 't_changedeclare',
241
+ // condition: ` f_type ='变更通知' `
242
+ // }
243
+ // }, {resolveMsg: null, rejectMsg: null})
244
+ // if(res.data.length>0){
245
+ // console.log("---------------获取通知",res.data[0].f_change_message)
246
+ // this.notice=res.data[0].f_change_message
247
+ // }
248
+ // }catch(e){}
244
249
 
245
250
  this.loginother();
246
251
  $('#login-button').click(function (event) {
@@ -249,10 +254,8 @@ export default {
249
254
  })
250
255
  if (window.location.search && window.location.search.indexOf('af_key') !== -1&& window.location.search.indexOf('af_n') !== -1) {
251
256
  const subUrl = window.location.search.replace('?af_key=','').split('&af_n=')
252
- console.log(subUrl)
253
257
  this.model.ename = window.atob(subUrl[0])
254
258
  this.model.password = window.atob(subUrl[1])
255
- console.log('this.model.ename',this.model.ename)
256
259
  this.otherLogin = true
257
260
  this.confirm()
258
261
  }else{
@@ -299,7 +302,6 @@ export default {
299
302
  if (this.config.distanceLogin) {
300
303
  if (this.$login && this.$login.getUrlParames('name') ) {
301
304
  let ename = this.$login.getUrlParames('name');
302
- // todo v4
303
305
  let logininfo = await this.$resetpost('rs/logic/getLoginData',{data:{ename:ename}},{resolveMsg: null, rejectMsg: null});
304
306
  if(logininfo.data){
305
307
  if(logininfo.data.ename && logininfo.data.password){
@@ -68,7 +68,7 @@ let getwartermakr = async function (self) {
68
68
  tablename: 't_singlevalue',
69
69
  condition: " 1=1 and name=\'水印内容\'"
70
70
  };
71
- let result = await self.$resetpost('api/af-revenue/sql/saleSingleTable', {data: param}, {resolveMsg: null, rejectMsg: null});
71
+ let result = await self.$resetpost('rs/sql/saleSingleTable', {data: param}, {resolveMsg: null, rejectMsg: null});
72
72
  if (result && result.data.length > 0) {
73
73
  self.showwatermakeflag = true;
74
74
  createWaterMark(result.data[0].value);
@@ -216,7 +216,7 @@ export default {
216
216
  }
217
217
  },
218
218
  openUrl() {
219
- var url = `http://123.60.214.109:8406/submitTicket?contact=${this.$login.f.name}&orgName=${this.$login.f.orgs}&phone=${this.$login.f.f_user_telephone}`
219
+ var url = `https://liuli.aofengcloud.com:31467`
220
220
  window.open(url, '_blank')
221
221
  },
222
222
  hindsetting() {
@@ -295,7 +295,7 @@ export default {
295
295
  username: this.$login.f.name,
296
296
  usertelephone: this.$login.f.f_user_telephone
297
297
  }
298
- await this.$resetpost('api/af-system/user/logout', data, {resolveMsg: '退出成功', rejectMsg: null})
298
+ await this.$resetpost('rs/logic/logOut', data, {resolveMsg: '退出成功', rejectMsg: null})
299
299
  window.location.reload()
300
300
  }
301
301
  })
@@ -145,6 +145,7 @@
145
145
  import $ from 'jquery'
146
146
  import Vue from 'vue'
147
147
  import {HttpResetClass} from 'vue-client'
148
+ import {isPasswordModificationExpired} from '../../components/Util'
148
149
 
149
150
  let daibanJson = require('../../util/Daiban.json')
150
151
 
@@ -174,7 +175,6 @@
174
175
  console.log('登录配置', self.config)
175
176
  if (self.config.isMac) {
176
177
  // 获取该登录人分公司下的mac配置
177
- // todo v4
178
178
  let getMacs = yield self.$resetpost('rs/sql/equipmentQuery', {data: {condition: `f_filialeids like '%${self.$login.f.f_orgids}%'`}}, {
179
179
  resolveMsg: null,
180
180
  rejectMsg: null
@@ -204,12 +204,15 @@
204
204
  }
205
205
  }
206
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))) {
207
+ // 弱口令验证(默认开启,跳转过来的不进行验证)
208
+ if ((!self.otherLogin) && !(/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,16}$/.test(self.model.password))) {
210
209
  self.$showMessage('登录系统: 此账户的密码过于简单,请修改密码后重新登陆!!!', ['confirm']).then((res) => {
211
210
  self.modifyPwShow = true
212
211
  })
212
+ } else if ((!self.otherLogin) && isPasswordModificationExpired(self.$login.f.f_last_modification_time)) {
213
+ self.$showMessage('登录系统: 您的密码已超过两个半月未修改,请修改密码后重新登录!!!', ['confirm']).then((res) => {
214
+ self.modifyPwShow = true
215
+ })
213
216
  } else if ((!self.otherLogin) && self.$login.depPrompt) {
214
217
  self.depPromptShow = true
215
218
  if (self.$login.showDaiBan && self.$login.r.includes('展示预约信息')){
@@ -230,6 +233,8 @@
230
233
  }
231
234
  } catch (ret) {
232
235
  console.error('登录失败', ret)
236
+ self.$login.s = null
237
+ self.$login['v3-session-key'] = null
233
238
  let msg
234
239
  if (ret instanceof Error) {
235
240
  msg = ret
@@ -258,19 +263,19 @@
258
263
  this.titleShow = this.$appdata.getSingleValue('关于我们')
259
264
  window.versionTime = window.versionTime ? window.versionTime : new Date().getTime()
260
265
  this.vTime = this.format(new Date(window.versionTime));
261
- try{
262
- let http = new HttpResetClass()
263
- let res = await http.load('POST', 'api/af-system/sql/singleTable',
264
- {data:{
265
- tablename: 't_changedeclare',
266
- condition: ` f_type ='变更通知' `
267
- }
268
- }, {resolveMsg: null, rejectMsg: null})
269
- if(res.data.length>0){
270
- console.log("---------------获取通知",res.data[0].f_change_message)
271
- this.notice=res.data[0].f_change_message
272
- }
273
- }catch(e){}
266
+ // try{
267
+ // let http = new HttpResetClass()
268
+ // let res = await http.load('POST', 'rs/sql/singleTable',
269
+ // {data:{
270
+ // tablename: 't_changedeclare',
271
+ // condition: ` f_type ='变更通知' `
272
+ // }
273
+ // }, {resolveMsg: null, rejectMsg: null})
274
+ // if(res.data.length>0){
275
+ // console.log("---------------获取通知",res.data[0].f_change_message)
276
+ // this.notice=res.data[0].f_change_message
277
+ // }
278
+ // }catch(e){}
274
279
 
275
280
  this.loginother();
276
281
  $('#login-button').click(function (event) {
@@ -279,10 +284,8 @@
279
284
  })
280
285
  if (window.location.search && window.location.search.indexOf('af_key') !== -1&& window.location.search.indexOf('af_n') !== -1) {
281
286
  const subUrl = window.location.search.replace('?af_key=','').split('&af_n=')
282
- console.log(subUrl)
283
287
  this.model.ename = window.atob(subUrl[0])
284
288
  this.model.password = window.atob(subUrl[1])
285
- console.log('this.model.ename',this.model.ename)
286
289
  this.otherLogin = true
287
290
  this.confirm()
288
291
  }else{
@@ -360,7 +363,7 @@
360
363
  } else {
361
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 '%柠条塔%') `
362
365
  }
363
- await http.load('POST', '/api/af-system/sql/singleTable', {data: {
366
+ await http.load('POST', '/rs/sql/singleTable', {data: {
364
367
  tablename:'t_order_center',
365
368
  condition:condition
366
369
  }}, {
@@ -436,7 +439,6 @@
436
439
  if (this.config.distanceLogin) {
437
440
  if (this.$login && this.$login.getUrlParames('name') ) {
438
441
  let ename = this.$login.getUrlParames('name');
439
- // todo v4
440
442
  let logininfo = await this.$resetpost('rs/logic/getLoginData',{data:{ename:ename}},{resolveMsg: null, rejectMsg: null});
441
443
  if(logininfo.data){
442
444
  if(logininfo.data.ename && logininfo.data.password){