|
|
@ -15,7 +15,7 @@ |
|
|
|
</el-col> |
|
|
|
<el-col> |
|
|
|
<el-form-item label="密码难度" prop="ruleLevel" align="center"> |
|
|
|
<el-select v-model="passwordConfig.ruleLevel" placeholder="请选择密码难度"> |
|
|
|
<el-select v-model="passwordConfig.ruleLevel" placeholder="请选择密码难度" @change="changeRule"> |
|
|
|
<el-option |
|
|
|
v-for="item in ruleList" |
|
|
|
:key="item.value" |
|
|
@ -25,6 +25,7 @@ |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<div>{{passwordConfig.ruleDesc}}</div> |
|
|
|
<el-col> |
|
|
|
<el-form-item label="每分钟密码输入错误" prop="tryCount"> |
|
|
|
<el-input-number |
|
|
@ -107,7 +108,7 @@ const reset = () => { |
|
|
|
passwordConfig.value = { |
|
|
|
status: true, |
|
|
|
ruleLevel: "简单", |
|
|
|
ruleDesc: "", |
|
|
|
ruleDesc: "1", |
|
|
|
tryCount: 3, |
|
|
|
lockHours: 1, |
|
|
|
updatePeriod: 30, |
|
|
@ -134,6 +135,13 @@ const getConfig = async () => { |
|
|
|
loading.value = false |
|
|
|
} |
|
|
|
} |
|
|
|
const changeRule = async(v) =>{ |
|
|
|
ruleList.value.forEach((item) => { |
|
|
|
if(item.ruleLevel == v){ |
|
|
|
passwordConfig.value.ruleDesc = item.desc |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
const ruleList = ref([]) |
|
|
|
/** 获取规则等级 */ |
|
|
|
const getRuleList = async () => { |
|
|
|