|
@@ -16,6 +16,7 @@
|
|
|
<Dialog width="496px" customClass="dataStoreInfoDialog" :flag="pwdflag">
|
|
|
<div class="dialog-public-background">
|
|
|
<div class="title">修改密码</div>
|
|
|
+ <div class="message"><span class="el-icon-s-opportunity mg"></span>密码长度:{{PwdLengthBegin}}-{{PwdLengthEnd}}位字符;密码规则:必须包含{{PwdMessage}}</div>
|
|
|
<div class="content">
|
|
|
<el-form :model="dataForm" :rules="dataRules" ref="dataForm" class="demo-dataForm">
|
|
|
<el-form-item label="旧密码" prop="old">
|
|
@@ -63,6 +64,9 @@ export default {
|
|
|
},
|
|
|
data () {
|
|
|
return {
|
|
|
+ PwdLengthBegin: '',
|
|
|
+ PwdLengthEnd: '',
|
|
|
+ PwdMessage: '',
|
|
|
dataForm: { //数据项表单
|
|
|
old: '',
|
|
|
new: '',
|
|
@@ -82,7 +86,42 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapGetters(['pwdflag', 'outflag', 'name', 'firstLogin'])
|
|
|
+ ...mapGetters(['pwdflag', 'outflag', 'name', 'firstLogin', 'systemSet'])
|
|
|
+ },
|
|
|
+ created () {
|
|
|
+ const obj = typeof this.systemSet === "string" ? JSON.parse(this.systemSet) : this.systemSet
|
|
|
+ const { PwdLengthBegin, PwdLengthEnd, PwdStruc } = obj
|
|
|
+ const PwdArrs = `${PwdStruc}`.split('')
|
|
|
+ this.PwdLengthBegin = PwdLengthBegin
|
|
|
+ this.PwdLengthEnd = PwdLengthEnd
|
|
|
+ let [a1, a2, a3, a4] = [...PwdArrs]
|
|
|
+ a1 = Number(a1)
|
|
|
+ a2 = Number(a2)
|
|
|
+ a3 = Number(a3)
|
|
|
+ a4 = Number(a4)
|
|
|
+ if (a1 && a2) {
|
|
|
+ this.PwdMessage = '大写字母、小写字母'
|
|
|
+ } else if (a1 && a2 && a3) {
|
|
|
+ this.PwdMessage = '大写字母、小写字母、特殊字符'
|
|
|
+ } else if (a1 && a2 && a3 && a4) {
|
|
|
+ this.PwdMessage = '大写字母、小写字母、特殊字符、数字'
|
|
|
+ } else if (a1 && a3) {
|
|
|
+ this.PwdMessage = '大写字母、特殊字符'
|
|
|
+ } else if (a1 && a3 && a4) {
|
|
|
+ this.PwdMessage = '大写字母、特殊字符、数字'
|
|
|
+ } else if (a1 && a4) {
|
|
|
+ this.PwdMessage = '大写字母、数字'
|
|
|
+ } else if (a2 && a3) {
|
|
|
+ this.PwdMessage = '小写字母、特殊字符'
|
|
|
+ } else if (a2 && a3 && a4) {
|
|
|
+ this.PwdMessage = '小写字母、特殊字符、数字'
|
|
|
+ } else if (a2 && a4) {
|
|
|
+ this.PwdMessage = '小写字母、数字'
|
|
|
+ } else if (a3 && a4) {
|
|
|
+ this.PwdMessage = '特殊字符、数字'
|
|
|
+ } else {
|
|
|
+ this.PwdMessage = '暂无密码规则'
|
|
|
+ }
|
|
|
},
|
|
|
methods: {
|
|
|
//存储数据项-提交
|
|
@@ -158,6 +197,14 @@ export default {
|
|
|
display: none;
|
|
|
}
|
|
|
}
|
|
|
+ .message {
|
|
|
+ position: absolute;
|
|
|
+ top: 85px;
|
|
|
+ .mg {
|
|
|
+ margin-right: 8px;
|
|
|
+ color: #e6a23c;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|