system-clients 3.2.98-temp → 3.2.98-tongchuan

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "system-clients",
3
- "version": "3.2.98-temp",
3
+ "version": "3.2.98-tongchuan",
4
4
  "description": "系统基础框架",
5
5
  "main": "src/index.js",
6
6
  "directories": {
@@ -160,24 +160,6 @@
160
160
  </footer>
161
161
  </modal>
162
162
 
163
- <modal v-show="notReportShow" :show.sync="notReportShow" :backdrop="false">
164
- <header slot="modal-header" class="text-center">
165
- <h3>未上报用户提醒</h3>
166
- </header>
167
- <article slot="modal-body" class="modal-body">
168
- <form class="form-horizontal">
169
- <div class="row">
170
- <div class="col-sm-12">
171
- <span style="font-weight:normal">{{ notReportTitle }}</span>
172
- </div>
173
- </div>
174
- </form>
175
- </article>
176
- <footer slot="modal-footer" style="height: 8vh" class="modal-footer">
177
- <button class="button_search" @click="notReportShow = false">确认</button>
178
- </footer>
179
- </modal>
180
-
181
163
  <!-- 变更录入 模态框 -->
182
164
  <add-changemsg :show="AddChangeMsgShow" v-on:toggle="AddChangeMsgShow = false"></add-changemsg>
183
165
  <!-- 修改密码组件 -->
@@ -273,8 +255,6 @@ let createWaterMark = function (userName) {
273
255
  // img2: '/images/lefticon/退出系统.png',
274
256
  },
275
257
  treeOrIcon: false,
276
- notReportTitle: '',
277
- notReportShow: false,
278
258
  qrCode:false,
279
259
  isManger: false,
280
260
  show: false,
@@ -341,7 +321,9 @@ let createWaterMark = function (userName) {
341
321
  // }
342
322
  this.changeShow()
343
323
  const istelRemindTimes =this.$appdata.getSingleValue("是否开启工单提醒定时器")
324
+ this.getDaiBan()
344
325
  if(istelRemindTimes=='是'){
326
+ this.getOrderList()
345
327
  this.getTimesgotoWorkOrderSite()
346
328
  }
347
329
  const isapplyRemind =this.$appdata.getSingleValue("是否开启提醒")
@@ -355,28 +337,10 @@ let createWaterMark = function (userName) {
355
337
  if (this.config.approve) {
356
338
  this.getFlowList()
357
339
  }
358
- if (this.config.isGetNotReport) {
359
- this.getNotReport()
360
- }
361
340
  // 获取卡表动态库到期时间
362
341
  this.getExpireDate()
363
342
  },
364
343
  methods: {
365
- async getNotReport(){
366
- this.notReportTitle = ''
367
- let http = new HttpResetClass()
368
- await http.load('POST', 'rs/sql/getNotReportUserCount', {}, {
369
- resolveMsg: null,
370
- rejectMsg: null
371
- }).then((res) => {
372
- if (res.data.length > 0){
373
- this.notReportTitle = `当前系统物联网表用户有${res.data[0].f_total_web_count}户,超过7天未上报有${res.data[0].f_greater_than_seven_days}户,7天及以内未上报有${res.data[0].f_less_than_orequalto_seven_days}户。如需查询详情,请到物联查询中“失联查询”获取详细信息!`
374
- }
375
- }).catch((e)=>{})
376
- if(this.notReportTitle){
377
- this.notReportShow = true
378
- }
379
- },
380
344
  getOrderList(){
381
345
  let times = this.config.times * 60 * 1000
382
346
  console.log("=定时提示间隔=", times)
@@ -559,7 +523,7 @@ let createWaterMark = function (userName) {
559
523
  }
560
524
  },
561
525
  openUrl() {
562
- var url = `http://aote-office.8866.org:8406/submitTicket?contact=${this.$login.f.name}&orgName=${this.$login.f.orgs}&phone=${this.$login.f.f_user_telephone}`
526
+ 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}`
563
527
  window.open(url, '_blank')
564
528
  },
565
529
  hindsetting() {
@@ -76,6 +76,20 @@ export function parse3339String (strDate) {
76
76
  strDate.substr(11, 2), strDate.substr(14, 2), strDate.substr(17, 2)
77
77
  )
78
78
  }
79
+ // 判断密码最后修改时间是否超过两个半月(2个月零15天)
80
+ export function isPasswordModificationExpired (lastModificationTime) {
81
+ if (!lastModificationTime) {
82
+ return true
83
+ }
84
+ const lastMod = parse3339String(lastModificationTime)
85
+ if (isNaN(lastMod.getTime())) {
86
+ return true
87
+ }
88
+ const expireDate = new Date(lastMod)
89
+ expireDate.setMonth(expireDate.getMonth() + 2)
90
+ expireDate.setDate(expireDate.getDate() + 15)
91
+ return new Date() > expireDate
92
+ }
79
93
 
80
94
  export function format3339TimeString (dt) {
81
95
  let month = dt.getMonth() + 1
@@ -10,8 +10,8 @@
10
10
  </button>
11
11
  <span v-if="$login.versionTime">构建时间:{{ vTime }}</span>
12
12
  <div v-if="titleShow">
13
- <img src="../../../static/newStyle/login-info.png"/>
14
- <span @click="showus=true">关于我们</span>
13
+ <img src="../../../static/newStyle/login-info.png"/>
14
+ <span @click="showus=true">关于我们</span>
15
15
  </div>
16
16
  <!-- <img src="../../../static/newStyle/login-con.png"/>-->
17
17
  <!-- <span>联系我们</span>-->
@@ -99,12 +99,12 @@
99
99
  <label class="col-sm-5 ">当前登录人:</label>
100
100
  <label style="font-weight:normal">{{$login.f.name}}</label>
101
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> -->
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
108
  <!--</div>-->
109
109
  <div class="col-sm-12 form-group">
110
110
  <label class="col-sm-5">所在销售点:</label>
@@ -114,7 +114,7 @@
114
114
  </div> -->
115
115
  </div>
116
116
  <div class="col-sm-12 " v-if="AppDaiBan !==''">
117
- <label class="col-sm-2">报装待办:</label>
117
+ <label class="col-sm-2">报装待办:</label>
118
118
  <span style="font-weight:normal">{{AppDaiBan}}</span>
119
119
  </div>
120
120
  <div class="col-sm-12 " v-if="OrderDaiBan !==''">
@@ -143,8 +143,9 @@
143
143
  <script>
144
144
  import co from 'co'
145
145
  import $ from 'jquery'
146
- import Vue from 'vue'
147
146
  import {HttpResetClass} from 'vue-client'
147
+ import {isPasswordModificationExpired} from '../Util'
148
+ import { isStrongPassword } from '../../util/password-validation'
148
149
 
149
150
  let daibanJson = require('../../util/Daiban.json')
150
151
 
@@ -158,18 +159,6 @@ let saveGen = function *(self) {
158
159
  if(self.$appdata){
159
160
  yield self.$appdata.load()
160
161
  }
161
- if (Vue.$heatCompatibility) {
162
- try {
163
- if(self.$loginHeat){
164
- yield self.$loginHeat.login(self.model.ename, self.model.password)
165
- }
166
- if(self.$appdataHeat){
167
- yield self.$appdataHeat.load()
168
- }
169
- } catch (e) {
170
- console.log('热力系统登陆失败!')
171
- }
172
- }
173
162
  yield self.$getConfig(self, 'Login')
174
163
  console.log('登录配置', self.config)
175
164
  if (self.config.isMac) {
@@ -203,12 +192,15 @@ let saveGen = function *(self) {
203
192
  }
204
193
  }
205
194
  console.log(self.$login.depPrompt)
206
- // 弱口令验证
207
- //跳转过来的不进行验证
208
- if ((!self.otherLogin) && self.config.weakPassword && !(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?!.*(123|321|abc|cba))[a-zA-Z\d!@#$%^&*()_+-=<>?]{8,16}$/.test(self.model.password))) {
195
+ // 弱口令验证(默认开启,跳转过来的不进行验证)
196
+ if ((!self.otherLogin) && !isStrongPassword(self.model.password)) {
209
197
  self.$showMessage('登录系统: 此账户的密码过于简单,请修改密码后重新登陆!!!', ['confirm']).then((res) => {
210
198
  self.modifyPwShow = true
211
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
+ })
212
204
  } else if ((!self.otherLogin) && self.$login.depPrompt) {
213
205
  self.depPromptShow = true
214
206
  if (self.$login.showDaiBan && self.$login.r.includes('展示预约信息')){
@@ -229,6 +221,8 @@ let saveGen = function *(self) {
229
221
  }
230
222
  } catch (ret) {
231
223
  console.error('登录失败', ret)
224
+ self.$login.s = null
225
+ self.$login['v3-session-key'] = null
232
226
  let msg
233
227
  if (ret instanceof Error) {
234
228
  msg = ret
@@ -241,11 +235,6 @@ let saveGen = function *(self) {
241
235
  msg = ret.data
242
236
  } else if (ret.status === 555) {
243
237
  msg = ret.data
244
- } else if(ret.status === 789) {
245
- yield self.$showMessage(msg='您的密码已过期,请及时修改!!!', ['confirm']).then(() => {
246
- self.modifyPwShow = true
247
- })
248
- return
249
238
  }
250
239
  self.createCode()
251
240
  self.picLyanzhengma = ''
@@ -262,19 +251,19 @@ export default {
262
251
  this.titleShow = this.$appdata.getSingleValue('关于我们')
263
252
  window.versionTime = window.versionTime ? window.versionTime : new Date().getTime()
264
253
  this.vTime = this.format(new Date(window.versionTime));
265
- try{
266
- let http = new HttpResetClass()
267
- let res = await http.load('POST', 'rs/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){}
254
+ // try{
255
+ // let http = new HttpResetClass()
256
+ // let res = await http.load('POST', 'rs/sql/singleTable',
257
+ // {data:{
258
+ // tablename: 't_changedeclare',
259
+ // condition: ` f_type ='变更通知' `
260
+ // }
261
+ // }, {resolveMsg: null, rejectMsg: null})
262
+ // if(res.data.length>0){
263
+ // console.log("---------------获取通知",res.data[0].f_change_message)
264
+ // this.notice=res.data[0].f_change_message
265
+ // }
266
+ // }catch(e){}
278
267
 
279
268
  this.loginother();
280
269
  $('#login-button').click(function (event) {
@@ -283,10 +272,8 @@ export default {
283
272
  })
284
273
  if (window.location.search && window.location.search.indexOf('af_key') !== -1&& window.location.search.indexOf('af_n') !== -1) {
285
274
  const subUrl = window.location.search.replace('?af_key=','').split('&af_n=')
286
- console.log(subUrl)
287
275
  this.model.ename = window.atob(subUrl[0])
288
276
  this.model.password = window.atob(subUrl[1])
289
- console.log('this.model.ename',this.model.ename)
290
277
  this.otherLogin = true
291
278
  this.confirm()
292
279
  }else{
@@ -375,14 +362,14 @@ export default {
375
362
  }).then((res) => {
376
363
  let OrderDaiBan = {}
377
364
  res.data.forEach(item=>{
378
- OrderDaiBan[item.f_ordertype] = OrderDaiBan[item.f_ordertype] || []
379
- OrderDaiBan[item.f_ordertype].push(item)
365
+ OrderDaiBan[item.f_ordertype] = OrderDaiBan[item.f_ordertype] || []
366
+ OrderDaiBan[item.f_ordertype].push(item)
367
+ })
368
+ this.OrderDaiBan = `您有${res.data.length}条需要处理的微信预约业务!`
369
+ if (res.data.length> 0){
370
+ this.OrderDaiBan += `其中 ${Object.keys(OrderDaiBan).map(key=>`${key}:${OrderDaiBan[key].length}条`).join(', ')}`
371
+ }
380
372
  })
381
- this.OrderDaiBan = `您有${res.data.length}条需要处理的微信预约业务!`
382
- if (res.data.length> 0){
383
- this.OrderDaiBan += `其中 ${Object.keys(OrderDaiBan).map(key=>`${key}:${OrderDaiBan[key].length}条`).join(', ')}`
384
- }
385
- })
386
373
  let data = {
387
374
  condition: '1 = 1',
388
375
  data: {
@@ -396,14 +383,14 @@ export default {
396
383
  }).then((res) => {
397
384
  let AppDaiBan = {}
398
385
  res.data.forEach(item=>{
399
- AppDaiBan[item.defname] = AppDaiBan[item.defname] || []
400
- AppDaiBan[item.defname].push(item)
386
+ AppDaiBan[item.defname] = AppDaiBan[item.defname] || []
387
+ AppDaiBan[item.defname].push(item)
388
+ })
389
+ this.AppDaiBan = `您有${res.data.length}条需要处理的报建待办业务!`
390
+ if (res.data.length> 0){
391
+ this.AppDaiBan += `其中 ${Object.keys(AppDaiBan).map(key=>`${key}:${AppDaiBan[key].length}条`).join(', ')}`
392
+ }
401
393
  })
402
- this.AppDaiBan = `您有${res.data.length}条需要处理的报建待办业务!`
403
- if (res.data.length> 0){
404
- this.AppDaiBan += `其中 ${Object.keys(AppDaiBan).map(key=>`${key}:${AppDaiBan[key].length}条`).join(', ')}`
405
- }
406
- })
407
394
 
408
395
  },
409
396
  async getDaiBanA(){
@@ -415,8 +402,8 @@ export default {
415
402
  for (let daibanItem of daibanJson.daiban) {
416
403
  console.log("开始处理待办任务:" + daibanItem.title + "当前任务状态:" + daibanItem.enable?"开启":"关闭" )
417
404
  if (daibanItem.enable) { // 控制每一项通知是否开启
418
- let postResult = ''; //提示信息为
419
- await http.load("POST",daibanItem.url,{data:daibanItem.data},{ resolveMsg: null, rejectMsg: null})
405
+ let postResult = ''; //提示信息为
406
+ await http.load("POST",daibanItem.url,{data:daibanItem.data},{ resolveMsg: null, rejectMsg: null})
420
407
  .then((res)=>{
421
408
  let responseData = res.data
422
409
  for (let item of responseData) {
@@ -1,72 +1,72 @@
1
1
  <template>
2
2
  <div>
3
3
  <validator name="v">
4
- <modal :show.sync="show" v-ref:modal backdrop="false">
4
+ <modal :show.sync="show" v-ref:modal backdrop="false">
5
5
  <header slot="modal-header" class="modal-header">
6
6
  <button type="button" class="close" @click="rest"><span>&times;</span></button>
7
7
  <h4 class="modal-title">修改密码</h4>
8
8
  </header>
9
9
  <article slot="modal-body" class="modal-body modifystyle auto form-horizontal">
10
+ <div class="password-alert">
11
+ {{ passwordRuleHint }}
12
+ </div>
10
13
  <div class="has-feedback form-group"
11
14
  :class="{'has-warning':$v.password.required,'has-error': $v.password.required,
12
15
  'has-success':!$v.password.required}">
13
- <label for="password" class="col-sm-4 col-sm-offset-1 control-label">原始密码:&nbsp;&nbsp;</label>
14
- <div class="col-sm-4">
16
+ <label for="password" class="col-sm-3 control-label">原始密码</label>
17
+ <div class="col-sm-8 password-field-wrap">
15
18
  <input type="password" v-model="deliver.password" class="form-control" id="password" v-validate:password="{ required: true}">
16
19
  <span class="glyphicon glyphicon-ok form-control-feedback" v-if="!$v.password.required"></span>
17
- <span v-if="$v.password.required">不能为空</span>
20
+ <span class="field-error" v-if="$v.password.required">不能为空</span>
18
21
  </div>
19
22
  </div>
20
23
  <div class="has-feedback form-group"
21
- :class="{'has-warning':$v.newpassword.required,'has-error':($v.newpassword.numbersAndLetter8to16 || $v.newpassword.minlength)&& !$v.newpassword.required && !$v.newpassword.chinesePassword,
22
- 'has-success': !$v.newpassword.required && !$v.newpassword.numbersAndLetter8to16&&!$v.newpassword.minlength && !$v.newpassword.chinesePassword}">
23
- <label for="newpassword" class="col-sm-4 col-sm-offset-1 control-label">新的密码:&nbsp;&nbsp;</label>
24
- <div class="col-sm-4">
25
- <input type="password" v-model="deliver.newpassword" class="form-control" id="newpassword" v-validate:newpassword='{required:true, numbersAndLetter8to16: true, minlength: 6,chinesePassword: true}'>
26
- <span class="glyphicon glyphicon-ok form-control-feedback" v-if="!$v.newpassword.required && !$v.newpassword.minlength && !($v.newpassword.numbersAndLetter8to16 && !($v.newpassword.required)) && !($v.newpassword.chinesePassword) "></span>
27
- <span v-if="$v.newpassword.required">不能为空</span>
28
- <span v-if="($v.newpassword.numbersAndLetter8to16||$v.newpassword.minlength) && !($v.newpassword.required&&$v.newpassword.minlength)">密码必须是8~16位数字与大小字母外加特殊字符的组合,并且不能出现类似'123','abc'等连贯数字或者字母</span>
29
- <span v-if="$v.newpassword.chinesePassword">密码不能包含中文</span>
24
+ :class="{'has-warning':$v.newpassword.required,'has-error':($v.newpassword.numbersAndLetter8to16 || $v.newpassword.chinesePassword) && !$v.newpassword.required,
25
+ 'has-success': !$v.newpassword.required && !$v.newpassword.numbersAndLetter8to16 && !$v.newpassword.chinesePassword}">
26
+ <label for="newpassword" class="col-sm-3 control-label">新的密码</label>
27
+ <div class="col-sm-8 password-field-wrap">
28
+ <input type="password" v-model="deliver.newpassword" class="form-control" id="newpassword" v-validate:newpassword='{required:true, numbersAndLetter8to16: true, chinesePassword: true}'>
29
+ <span class="glyphicon glyphicon-ok form-control-feedback" v-if="!$v.newpassword.required && !$v.newpassword.numbersAndLetter8to16 && !$v.newpassword.chinesePassword"></span>
30
+ <span class="field-error" v-if="$v.newpassword.required">不能为空</span>
31
+ <span class="field-error" v-if="$v.newpassword.chinesePassword && !$v.newpassword.required">密码不能包含中文</span>
32
+ <div v-if="passwordStrength.visible" class="password-strength">
33
+ <span class="strength-label">密码强度</span>
34
+ <span class="strength-tag" :class="passwordStrength.type">{{ passwordStrength.label }}</span>
35
+ <span class="strength-desc">{{ passwordStrength.desc }}</span>
36
+ </div>
30
37
  </div>
31
38
  </div>
32
39
  <div class="has-feedback form-group"
33
40
  :class="{'has-warning':$v.affirmpassword.required,'has-error':$v.affirmpassword.equalValid && !($v.affirmpassword.required),
34
41
  'has-success': !$v.affirmpassword.required && !($v.affirmpassword.equalValid && !($v.affirmpassword.required))}">
35
- <label for="affirmpassword" class="col-sm-4 col-sm-offset-1 control-label">确认密码:&nbsp;&nbsp;</label>
36
- <div class="col-sm-4">
42
+ <label for="affirmpassword" class="col-sm-3 control-label">确认密码</label>
43
+ <div class="col-sm-8 password-field-wrap">
37
44
  <input type="password" v-model="deliver.affirmpassword" class="form-control" id="affirmpassword" v-validate:affirmpassword="{ required: true, equalValid: deliver.newpassword }">
38
45
  <span class="glyphicon glyphicon-ok form-control-feedback" v-if="!$v.affirmpassword.required && !($v.affirmpassword.equalValid && !($v.affirmpassword.required))"></span>
39
- <span v-if="$v.affirmpassword.required">不能为空</span>
40
- <span v-if="$v.affirmpassword.equalValid && !($v.affirmpassword.required)">两次密码不一致 !!</span>
46
+ <span class="field-error" v-if="$v.affirmpassword.required">不能为空</span>
47
+ <span class="field-error" v-if="$v.affirmpassword.equalValid && !($v.affirmpassword.required)">两次密码不一致</span>
41
48
  </div>
42
49
  </div>
43
50
  </article>
44
51
 
45
52
  <footer slot="modal-footer" class="modal-footer">
46
- <button type="button" class="btn btn-success" @click='confirm' :disabled="!$v.valid">确认</button>
47
- <button type="button" class="btn btn-default" @click='rest'>取消</button>
53
+ <button type="button" class="btn btn-success" @click='confirm' :disabled="!$v.valid">确认</button>
54
+ <button type="button" class="btn btn-default" @click='rest'>取消</button>
48
55
  </footer>
49
56
  </modal>
50
57
  </validator>
51
58
  </div>
52
-
53
-
54
59
  </template>
55
60
  <script>
56
61
  import co from 'co'
57
- import validator from '../../plugins/validation';
62
+ import validator from '../../plugins/validation'
63
+ import { getPasswordStrength, PASSWORD_RULE_HINT } from '../../util/password-validation'
58
64
 
59
65
  let saveGen = function * (self) {
60
66
  self.deliver.ename = self.functions.ename
61
- // let res = yield self.$post('rs/user/entity', {data: self.deliver})
62
- // let res = yield self.$post('rs/db/modifypassword', {data: self.deliver})
63
- // let res = yield self.$resetpost('/rs/db/modifypwd', {data: self.deliver})
64
- // Util.f.password = self.deliver.newpassword
65
67
  let res = yield self.$resetpost('/rs/user/modifypwd', {data: self.deliver }, {resolveMsg: null,rejectMsg: null})
66
68
  self.$login.f.password = self.deliver.newpassword
67
69
  if (res.data) {
68
- console.log("修改密码返回:" , res.data)
69
- // 兼容旧版ldao,旧版不返回code
70
70
  if (res.data.code === 200) {
71
71
  self.deliver.password = ''
72
72
  self.deliver.newpassword = ''
@@ -74,7 +74,6 @@
74
74
  self.show = false
75
75
  self.$showAlert("修改密码成功", 'success', 2000)
76
76
  } else {
77
- // 兼容旧版ldao,旧版不返回code
78
77
  self.deliver.password = ''
79
78
  self.deliver.newpassword = ''
80
79
  self.deliver.affirmpassword = ''
@@ -98,7 +97,13 @@
98
97
  newpassword: '',
99
98
  affirmpassword: ''
100
99
  },
101
- functions: this.$login.f
100
+ functions: this.$login.f,
101
+ passwordRuleHint: PASSWORD_RULE_HINT
102
+ }
103
+ },
104
+ computed: {
105
+ passwordStrength () {
106
+ return getPasswordStrength(this.deliver.newpassword)
102
107
  }
103
108
  },
104
109
  props: ['show'],
@@ -115,11 +120,77 @@
115
120
  }
116
121
  </script>
117
122
  <style>
118
- /*修改密码body界面样式*/
119
123
  .modifystyle {
120
- background: #FCFEEE;
124
+ background: #fff;
125
+ padding: 10px 20px 20px;
126
+ }
127
+
128
+ .modifystyle .control-label {
129
+ color: #333;
130
+ font-weight: normal;
131
+ padding-top: 7px;
132
+ }
133
+
134
+ .password-field-wrap {
135
+ padding-left: 0;
136
+ padding-right: 0;
137
+ }
138
+
139
+ .password-field-wrap .form-control {
140
+ width: 100%;
141
+ }
142
+
143
+ .password-alert {
144
+ margin: 0 0 16px;
145
+ padding: 10px 12px;
146
+ border-radius: 4px;
147
+ background: #f5f7fa;
148
+ border: 1px solid #e4e7ed;
149
+ color: #606266;
150
+ font-size: 13px;
151
+ line-height: 1.6;
121
152
  }
122
- .modifystyle span{
123
- color: red;
153
+
154
+ .field-error {
155
+ display: block;
156
+ margin-top: 6px;
157
+ color: #e74c3c;
158
+ font-size: 12px;
159
+ line-height: 1.4;
160
+ }
161
+
162
+ .password-strength {
163
+ margin-top: 8px;
164
+ font-size: 12px;
165
+ line-height: 1.6;
166
+ color: #606266;
167
+ }
168
+
169
+ .password-strength .strength-label {
170
+ margin-right: 6px;
171
+ color: #909399;
172
+ }
173
+
174
+ .password-strength .strength-tag {
175
+ display: inline-block;
176
+ margin-right: 8px;
177
+ padding: 1px 8px;
178
+ border-radius: 3px;
179
+ font-size: 12px;
180
+ line-height: 1.5;
181
+ }
182
+
183
+ .password-strength .strength-tag.success {
184
+ color: #2e7d32;
185
+ background: #e8f5e9;
186
+ }
187
+
188
+ .password-strength .strength-tag.error {
189
+ color: #c62828;
190
+ background: #ffebee;
191
+ }
192
+
193
+ .password-strength .strength-desc {
194
+ color: #606266;
124
195
  }
125
196
  </style>
@@ -161,15 +161,6 @@
161
161
  'parentresid'(){
162
162
  this.dealdata()
163
163
  },
164
- initresid: {
165
- handler(newVal, oldVal) {
166
- // 避免重复触发
167
- if (JSON.stringify(newVal) === JSON.stringify(oldVal)) {
168
- return;
169
- }
170
- this.dealdata();
171
- },
172
- }
173
164
  },
174
165
  }
175
166
  </script>
@@ -142,6 +142,7 @@
142
142
 
143
143
  <script>
144
144
  import co from 'co'
145
+ import { isStrongPassword } from '../../util/password-validation'
145
146
  import $ from 'jquery'
146
147
  import Vue from 'vue'
147
148
  import {HttpResetClass} from 'vue-client'
@@ -206,7 +207,7 @@ let saveGen = function *(self) {
206
207
  console.log(self.$login.depPrompt)
207
208
  // 弱口令验证
208
209
  //跳转过来的不进行验证
209
- if ((!self.otherLogin) && self.config.weakPassword && !(/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,16}$/.test(self.model.password))) {
210
+ if ((!self.otherLogin) && self.config.weakPassword && !isStrongPassword(self.model.password)) {
210
211
  self.$showMessage('登录系统: 此账户的密码过于简单,请修改密码后重新登陆!!!', ['confirm']).then((res) => {
211
212
  self.modifyPwShow = true
212
213
  })
@@ -140,6 +140,7 @@
140
140
 
141
141
  <script>
142
142
  import co from 'co'
143
+ import { isStrongPassword } from '../../util/password-validation'
143
144
  import $ from 'jquery'
144
145
  import Vue from 'vue'
145
146
  import {HttpResetClass} from 'vue-client'
@@ -204,7 +205,7 @@ let saveGen = function *(self) {
204
205
  console.log(self.$login.depPrompt)
205
206
  // 弱口令验证
206
207
  //跳转过来的不进行验证
207
- if ((!self.otherLogin) && self.config.weakPassword && !(/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,16}$/.test(self.model.password))) {
208
+ if ((!self.otherLogin) && self.config.weakPassword && !isStrongPassword(self.model.password)) {
208
209
  self.$showMessage('登录系统: 此账户的密码过于简单,请修改密码后重新登陆!!!', ['confirm']).then((res) => {
209
210
  self.modifyPwShow = true
210
211
  })
@@ -146,6 +146,7 @@
146
146
 
147
147
  <script>
148
148
  import co from 'co'
149
+ import { isStrongPassword } from '../../util/password-validation'
149
150
  import $ from 'jquery'
150
151
  import Vue from 'vue'
151
152
  import {HttpResetClass} from 'vue-client'
@@ -210,7 +211,7 @@ let saveGen = function *(self) {
210
211
  console.log(self.$login.depPrompt)
211
212
  // 弱口令验证
212
213
  //跳转过来的不进行验证
213
- if ((!self.otherLogin) && self.config.weakPassword && !(/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,16}$/.test(self.model.password))) {
214
+ if ((!self.otherLogin) && self.config.weakPassword && !isStrongPassword(self.model.password)) {
214
215
  self.$showMessage('登录系统: 此账户的密码过于简单,请修改密码后重新登陆!!!', ['confirm']).then((res) => {
215
216
  self.modifyPwShow = true
216
217
  })
@@ -133,6 +133,7 @@
133
133
 
134
134
  <script>
135
135
  import co from 'co'
136
+ import { isStrongPassword } from '../../util/password-validation'
136
137
  import $ from 'jquery'
137
138
  import Vue from 'vue'
138
139
  import {HttpResetClass} from 'vue-client'
@@ -197,7 +198,7 @@ let saveGen = function *(self) {
197
198
  console.log(self.$login.depPrompt)
198
199
  // 弱口令验证
199
200
  //跳转过来的不进行验证
200
- if ((!self.otherLogin) && self.config.weakPassword && !(/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,16}$/.test(self.model.password))) {
201
+ if ((!self.otherLogin) && self.config.weakPassword && !isStrongPassword(self.model.password)) {
201
202
  self.$showMessage('登录系统: 此账户的密码过于简单,请修改密码后重新登陆!!!', ['confirm']).then((res) => {
202
203
  self.modifyPwShow = true
203
204
  })
@@ -131,6 +131,7 @@
131
131
 
132
132
  <script>
133
133
  import co from 'co'
134
+ import { isStrongPassword } from '../../util/password-validation'
134
135
  import $ from 'jquery'
135
136
  import Vue from 'vue'
136
137
  import {HttpResetClass} from 'vue-client'
@@ -193,7 +194,7 @@
193
194
  console.log(self.$login.depPrompt)
194
195
  // 弱口令验证
195
196
  //跳转过来的不进行验证
196
- if ((!self.otherLogin) && self.config.weakPassword && !(/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,16}$/.test(self.model.password))) {
197
+ if ((!self.otherLogin) && self.config.weakPassword && !isStrongPassword(self.model.password)) {
197
198
  self.$showMessage('登录系统: 此账户的密码过于简单,请修改密码后重新登陆!!!', ['confirm']).then((res) => {
198
199
  self.modifyPwShow = true
199
200
  })
@@ -142,6 +142,7 @@
142
142
 
143
143
  <script>
144
144
  import co from 'co'
145
+ import { isStrongPassword } from '../../util/password-validation'
145
146
  import $ from 'jquery'
146
147
  import Vue from 'vue'
147
148
  import {HttpResetClass} from 'vue-client'
@@ -206,7 +207,7 @@ let saveGen = function *(self) {
206
207
  console.log(self.$login.depPrompt)
207
208
  // 弱口令验证
208
209
  //跳转过来的不进行验证
209
- if ((!self.otherLogin) && self.config.weakPassword && !(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?!.*(.)(\1)+)(?!.*(123|321|abc|cba))[a-zA-Z\d!@#$%^&*()_+-=<>?]{8,16}$/.test(self.model.password))) {
210
+ if ((!self.otherLogin) && self.config.weakPassword && !isStrongPassword(self.model.password)) {
210
211
  self.$showMessage('登录系统: 此账户的密码过于简单,请修改密码后重新登陆!!!', ['confirm']).then((res) => {
211
212
  self.modifyPwShow = true
212
213
  })