Browse Source

密码策略页面

hella_online_20240911
zhang_li 2 months ago
parent
commit
57b84f811c
  1. 123
      src/views/system/passwordRule/index.vue

123
src/views/system/passwordRule/index.vue

@ -0,0 +1,123 @@
<template>
<!-- 搜索 -->
<div v-loading="loading" class="box">
<el-form ref="formSmsLogin" :model="data" :rules="rules" label-width="70px" size="large">
<div
class="title"
style="font-size: 20px; text-align: center; margin-bottom: 20px; font-weight: bold"
>密码策略</div
>
<el-row type="flex" justify="center" align="middle">
<el-col>
<el-form-item label="密码难度" prop="passwordDifficulty" align="center">
<el-select v-model="data.passwordDifficulty" placeholder="请选择密码难度">
<el-option
v-for="item in difficultyList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col>
<el-form-item label="试错次数" prop="number">
<el-input-number
v-model="data.number"
:min="0"
:precision="0"
style="margin-right: 10px"
/>
</el-form-item>
</el-col>
<el-col>
<el-form-item label="锁定时长" prop="minute">
<el-input-number
v-model="data.minute"
:min="0"
:precision="0"
style="margin-right: 10px"
/>
</el-form-item>
</el-col>
<el-col>
<el-form-item label="更新周期" prop="cycle">
<el-input-number
v-model="data.cycle"
:min="0"
:precision="0"
style="margin-right: 10px"
/>
</el-form-item>
</el-col>
<el-col>
<el-form-item label="是否开启" prop="isEnabled">
<el-switch v-model="data.isEnabled" active-value="TRUE" inactive-value="'FALSE'" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="dialog-footer">
<el-button
type="primary"
@click="submitForm"
style="width: 100%; height: 40px; line-height: 40px"
> </el-button
>
<el-button type="danger" @click="reset" style="width: 100%; height: 40px; line-height: 40px"
> </el-button
>
</div>
</div>
</template>
<script lang="ts" setup>
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
defineOptions({ name: 'PasswordRule' })
const message = useMessage() //
const { t } = useI18n() //
const loading = ref(false)
const rules = {
password: [required],
againPassword: [required]
}
const data = ref({
passwordDifficulty: '', //
number: '', //
minute: '', //
cycle: '', //
isEnabled: 'TRUE' //
})
const difficultyList = ref([
{
value: '11',
label: '11'
}
])
const reset = () => {
data.value = {
passwordDifficulty: '', //
number: '', //
minute: '', //
cycle: '', //
isEnabled: 'TRUE' //
}
}
/** 初始化 **/
onMounted(async () => {})
</script>
<style lang="scss">
.box {
margin: 50px auto;
width: 500px;
background: white;
padding: 20px;
border: 1px solid #dedede;
}
.dialog-footer {
display: flex;
width: 160px;
margin: 0 auto;
}
</style>
Loading…
Cancel
Save