feat(m11): add password reset, owner fields, system params

This commit is contained in:
2026-05-25 14:53:02 +08:00
parent d6750f1e93
commit 7104976bf9
10 changed files with 152 additions and 0 deletions
@@ -200,6 +200,12 @@ const routes = [
component: () => import("../views/AuditSearchView.vue"),
meta: { roles: ["SYS_ADMIN"], title: "审计日志" },
},
{
path: "admin/params",
name: "system-params",
component: () => import("../views/SystemParamsView.vue"),
meta: { roles: ["SYS_ADMIN"], title: "系统参数" },
},
],
},
{ path: "/403", name: "forbidden", component: () => import("../views/ForbiddenView.vue") },
@@ -0,0 +1,62 @@
<script setup>
import { ref, onMounted } from 'vue'
import { ElMessage } from 'element-plus'
const params = ref({
orphanSnStrictValidation: true,
deliveryGateEnabled: true,
sessionTimeoutMinutes: 60,
passwordMinLength: 6,
})
const loading = ref(false)
async function loadParams() {
try {
const stored = localStorage.getItem('systemParams')
if (stored) {
params.value = { ...params.value, ...JSON.parse(stored) }
}
} catch {
}
}
async function saveParams() {
loading.value = true
try {
localStorage.setItem('systemParams', JSON.stringify(params.value))
ElMessage.success('参数已保存(MVP: 存储于浏览器本地)')
} catch (e) {
ElMessage.error('保存失败')
} finally {
loading.value = false
}
}
onMounted(loadParams)
</script>
<template>
<div>
<h2>系统参数</h2>
<el-card shadow="never" style="margin-top:16px;max-width:560px">
<el-form label-width="200px" label-position="left">
<el-form-item label="孤儿 SN 严格校验">
<el-switch v-model="params.orphanSnStrictValidation" />
</el-form-item>
<el-form-item label="交付闸门启用">
<el-switch v-model="params.deliveryGateEnabled" />
</el-form-item>
<el-form-item label="会话超时(分钟)">
<el-input-number v-model="params.sessionTimeoutMinutes" :min="5" :max="1440" />
</el-form-item>
<el-form-item label="密码最小长度">
<el-input-number v-model="params.passwordMinLength" :min="4" :max="64" />
</el-form-item>
<el-form-item>
<el-button type="primary" :loading="loading" @click="saveParams">保存</el-button>
</el-form-item>
</el-form>
</el-card>
</div>
</template>