diff --git a/web/src/router/index.js b/web/src/router/index.js
index e263e74..38df679 100644
--- a/web/src/router/index.js
+++ b/web/src/router/index.js
@@ -143,12 +143,6 @@ export const constantRoutes = [
name: '安全',
meta: { title: '安全', icon: 'security' },
children: [
- {
- path: 'attackProtection',
- name: '攻击防护',
- component: () => import('@/views/security/attackProtection/index'),
- meta: { title: '攻击防护', icon: 'attackProtection' }
- },
{
path: 'mfa',
name: '多因素身份认证',
diff --git a/web/src/views/app/appDetail.vue b/web/src/views/app/appDetail.vue
index f3dc2dd..f918855 100644
--- a/web/src/views/app/appDetail.vue
+++ b/web/src/views/app/appDetail.vue
@@ -287,7 +287,7 @@
@@ -296,11 +296,11 @@
已授权的API资源
-
+
-
+
{{ row.apiName }}
@@ -366,7 +366,7 @@
分配的角色
- 添加角色
+ 添加角色
@@ -407,7 +407,7 @@
-
+
-
+
- 详情
编辑
禁用
删除
@@ -128,7 +127,7 @@ export default {
this.$router.push('/app/create')
},
- detailApp(appId) {
+ editApp(appId) {
this.$router.push({
name: 'AppDetail',
params: { id: appId },
@@ -136,10 +135,6 @@ export default {
})
},
- editApp(app) {
- this.$message.info('打开编辑应用:' + app.name)
- },
-
enableApp(app) {
this.$confirm(`确定禁用应用?`, '提示', { type: 'warning' })
.then(() => this.$message.success('已禁用'))
diff --git a/web/src/views/auditLog/index.vue b/web/src/views/auditLog/index.vue
index cbe8a39..5249925 100644
--- a/web/src/views/auditLog/index.vue
+++ b/web/src/views/auditLog/index.vue
@@ -1,217 +1,1506 @@
+
+
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+ 今日
+ 本周
+ 本月
+ 自定义
+
查询
重置
- 导出日志
+
+
+
+
+
+
+
+
+
+ {{ item.label }}
+
+
+
+
+
+
+
+
+
+ {{ item.label }}
+
+
+
+
+
+
+
+
+ 成功
+
+
+ 失败
+
+
+ 警告
+
+
+
+
+
+
+
+ 高风险
+
+
+ 中风险
+
+
+ 低风险
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 快速筛选:
+
+ {{ filter.label }}
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
- 成功
- 失败
-
-
-
-
-
-
-
- 查看
-
-
-
-
-
-
-
diff --git a/web/src/views/identity/enterprise/create.vue b/web/src/views/identity/enterprise/create.vue
index 63def56..4b87160 100644
--- a/web/src/views/identity/enterprise/create.vue
+++ b/web/src/views/identity/enterprise/create.vue
@@ -82,55 +82,64 @@
-
-
-
-
-
-
-
- idp_
-
-
-
-
-
-
-
-
-
- 创建后是否立即启用该身份源
-
-
+
+
+
+ 基本信息
+
+
+
+
+
+
+
+
+
+
+
+ idp_
+
+
+
+
+
+
+
+
+
+
+
+ 创建后立即启用该身份源
+
+
+
@@ -154,10 +163,11 @@
ref="ldapForm"
:model="form"
:rules="ldapRules"
- label-width="160px"
- label-position="left"
+ label-width="120px"
+ label-position="right"
+ class="compact-form"
>
-
+
-
- 普通连接
- SSL/TLS
- STARTTLS
+
+ 普通连接
+ SSL/TLS
+ STARTTLS
-
+
@@ -196,8 +206,6 @@
-
-
@@ -206,39 +214,50 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
- {{ showAdvanced ? '收起' : '展开' }}高级配置
+ {{ showAdvanced ? '收起' : '展开' }}高级配置
-
-
- 秒
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 秒
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -256,14 +275,15 @@
ref="oidcForm"
:model="form"
:rules="oidcRules"
- label-width="160px"
- label-position="left"
+ label-width="120px"
+ label-position="right"
+ class="compact-form"
>
-
+
@@ -277,20 +297,20 @@
-
- openid
- profile
- email
- phone
- address
+
+ openid
+ profile
+ email
+ phone
+ address
-
+
复制
- 请在您的IdP中将此地址配置为允许的回调地址
+ 请在您的IdP中将此地址配置为允许的回调地址
@@ -308,13 +328,14 @@
ref="samlForm"
:model="form"
:rules="samlRules"
- label-width="160px"
- label-position="left"
+ label-width="120px"
+ label-position="right"
+ class="compact-form"
>
-
- Metadata URL
- 手动配置
+
+ Metadata URL
+ 手动配置
@@ -343,15 +364,15 @@
-
+
-
+
复制
-
+
复制
@@ -1044,34 +1065,119 @@ export default {
border: 1px solid #e8e8e8;
::v-deep .el-card__body {
- padding: 24px;
+ padding: 28px 32px;
}
.config-section {
+ &:not(:last-child) {
+ margin-bottom: 32px;
+ padding-bottom: 32px;
+ border-bottom: 1px solid #f0f0f0;
+ }
+
.section-title {
- font-size: 16px;
+ font-size: 15px;
font-weight: 600;
margin: 0 0 20px 0;
display: flex;
align-items: center;
gap: 8px;
- color: #333;
+ color: #262626;
i {
color: #1890ff;
+ font-size: 16px;
+ }
+ }
+ }
+
+ .compact-form {
+ .el-form-item {
+ margin-bottom: 20px;
+
+ &:last-child {
+ margin-bottom: 0;
+ }
+
+ .el-form-item__label {
+ font-size: 14px;
+ color: #595959;
+ font-weight: 500;
+ padding-right: 16px;
+ }
+
+ .el-form-item__content {
+ line-height: 32px;
+ }
+ }
+
+ .full-width-item {
+ .el-input,
+ .el-textarea {
+ width: 100%;
+ }
+ }
+
+ .switch-item {
+ .el-form-item__content {
+ display: flex;
+ align-items: center;
+ gap: 12px;
}
}
}
.form-tip {
font-size: 12px;
- color: #999;
+ color: #8c8c8c;
margin-top: 4px;
+ line-height: 1.5;
+ }
+
+ .form-tip-text {
+ font-size: 13px;
+ color: #8c8c8c;
+ margin-left: 8px;
+ }
+
+ .toggle-advanced-item {
+ margin-top: 8px;
+
+ .el-button--text {
+ font-size: 13px;
+ color: #595959;
+
+ i {
+ margin-right: 4px;
+ }
+
+ &:hover {
+ color: #1890ff;
+ }
+ }
+ }
+
+ .copy-field-item {
+ .el-input-group__append {
+ background: #fff;
+ padding: 0 12px;
+
+ .el-button {
+ color: #1890ff;
+ }
+ }
+ }
+
+ .config-section-sp {
+ height: 16px;
+ border-top: 1px solid #f0f0f0;
+ margin: 20px 0;
}
.unit {
margin-left: 8px;
- color: #666;
+ color: #595959;
+ font-size: 13px;
}
}
diff --git a/web/src/views/identity/enterprise/index.vue b/web/src/views/identity/enterprise/index.vue
index cafc9b0..d2e3c7f 100644
--- a/web/src/views/identity/enterprise/index.vue
+++ b/web/src/views/identity/enterprise/index.vue
@@ -6,11 +6,6 @@
企业身份源
连接和管理 LDAP、Active Directory、OIDC、SAML 等企业身份源,实现统一身份认证
-
@@ -183,7 +178,7 @@
-
+
@@ -265,208 +260,208 @@
diff --git a/web/src/views/permission/apiResource/index.vue b/web/src/views/permission/apiResource/index.vue
index 2588198..1fccf08 100644
--- a/web/src/views/permission/apiResource/index.vue
+++ b/web/src/views/permission/apiResource/index.vue
@@ -1,10 +1,18 @@
+
+
-
@@ -24,25 +32,16 @@
- 查询
+ 查询
重置
-
-
-
-
- {{ row.method }}
+ {{ row.method }}
@@ -107,7 +105,6 @@
@current-change="pageChange"
/>
-
@@ -162,7 +159,6 @@
确 定
-
@@ -190,15 +186,11 @@ export default {
currentPage: 1,
total: 6,
selectedRows: [],
-
- // 对话框
dialogVisible: false,
dialogTitle: '新增API资源',
isEdit: false,
submitLoading: false,
currentId: null,
-
- // 表单
resourceForm: {
name: '',
path: '',
@@ -206,16 +198,12 @@ export default {
description: ''
},
resourceRules: {
- name: [
- { required: true, message: '请输入API名称', trigger: 'blur' }
- ],
+ name: [{ required: true, message: '请输入API名称', trigger: 'blur' }],
path: [
{ required: true, message: '请输入请求路径', trigger: 'blur' },
{ pattern: /^\/.*/, message: '路径必须以/开头', trigger: 'blur' }
],
- method: [
- { required: true, message: '请选择请求方法', trigger: 'change' }
- ]
+ method: [{ required: true, message: '请选择请求方法', trigger: 'change' }]
}
}
},
@@ -224,8 +212,7 @@ export default {
this.loading = true
setTimeout(() => {
this.loading = false
- this.$message.success('查询成功')
- }, 500)
+ }, 300)
},
reset() {
this.searchForm = {
@@ -275,11 +262,11 @@ export default {
},
getMethodType(method) {
const typeMap = {
- 'GET': 'success',
- 'POST': 'primary',
- 'PUT': 'warning',
- 'DELETE': 'danger',
- 'PATCH': 'info'
+ GET: 'success',
+ POST: 'primary',
+ PUT: 'warning',
+ DELETE: 'danger',
+ PATCH: 'info'
}
return typeMap[method] || 'info'
},
@@ -320,10 +307,7 @@ export default {
if (this.isEdit) {
const index = this.tableData.findIndex(item => item.id === this.currentId)
if (index > -1) {
- this.tableData[index] = {
- ...this.tableData[index],
- ...this.resourceForm
- }
+ this.tableData[index] = { ...this.tableData[index], ...this.resourceForm }
}
this.$message.success('修改成功')
} else {
@@ -347,54 +331,73 @@ export default {
diff --git a/web/src/views/permission/generalResource/index.vue b/web/src/views/permission/generalResource/index.vue
index 3e19f9f..59f4d91 100644
--- a/web/src/views/permission/generalResource/index.vue
+++ b/web/src/views/permission/generalResource/index.vue
@@ -1,10 +1,18 @@
+
+
-
@@ -18,25 +26,16 @@
- 查询
+ 查询
重置
-
-
+
-
-
-
-
+
{{ row.name }}
@@ -84,23 +82,24 @@
-
+
添加子项
编辑
-
+
删除
-
@@ -149,7 +148,7 @@
-
+
@@ -175,7 +174,6 @@
确 定
-
@@ -239,15 +237,11 @@ export default {
}
],
selectedRows: [],
-
- // 对话框
dialogVisible: false,
dialogTitle: '新增资源',
isEdit: false,
submitLoading: false,
currentId: null,
-
- // 表单
resourceForm: {
parentId: null,
type: 'menu',
@@ -259,29 +253,46 @@ export default {
status: 'enabled'
},
resourceRules: {
- type: [
- { required: true, message: '请选择资源类型', trigger: 'change' }
- ],
- name: [
- { required: true, message: '请输入资源名称', trigger: 'blur' }
- ],
- code: [
- { required: true, message: '请输入资源编码', trigger: 'blur' }
- ]
+ type: [{ required: true, message: '请选择资源类型', trigger: 'change' }],
+ name: [{ required: true, message: '请输入资源名称', trigger: 'blur' }],
+ code: [{ required: true, message: '请输入资源编码', trigger: 'blur' }]
},
resourceOptions: []
}
},
+ computed: {
+ filteredTableData() {
+ if (!this.searchForm.name && !this.searchForm.type) {
+ return this.tableData
+ }
+ return this.filterTree(this.tableData)
+ }
+ },
mounted() {
this.generateResourceOptions()
},
methods: {
+ filterTree(data) {
+ return data.filter(item => {
+ let match = true
+ if (this.searchForm.name) {
+ match = item.name.toLowerCase().includes(this.searchForm.name.toLowerCase())
+ }
+ if (this.searchForm.type && match) {
+ match = item.type === this.searchForm.type
+ }
+ if (item.children && item.children.length) {
+ item.children = this.filterTree(item.children)
+ if (item.children.length) match = true
+ }
+ return match
+ })
+ },
search() {
this.loading = true
setTimeout(() => {
this.loading = false
- this.$message.success('查询成功')
- }, 500)
+ }, 300)
},
reset() {
this.searchForm = { name: '', type: '' }
@@ -324,10 +335,12 @@ export default {
batchDelete() {
this.$confirm(`确定删除选中的 ${this.selectedRows.length} 个资源吗?`, '提示', {
type: 'warning'
- }).then(() => {
- this.selectedRows = []
- this.$message.success('批量删除成功')
- }).catch(() => {})
+ })
+ .then(() => {
+ this.selectedRows = []
+ this.$message.success('批量删除成功')
+ })
+ .catch(() => {})
},
handleStatusChange(row) {
const statusText = row.status === 'enabled' ? '启用' : '禁用'
@@ -335,23 +348,22 @@ export default {
},
getResourceIcon(type) {
const iconMap = {
- 'menu': 'el-icon-folder-opened',
- 'button': 'el-icon-mouse',
- 'element': 'el-icon-s-operation'
+ menu: 'el-icon-folder-opened',
+ button: 'el-icon-mouse',
+ element: 'el-icon-s-operation'
}
return iconMap[type] || 'el-icon-question'
},
getTypeTag(type) {
- const tagMap = { 'menu': '', 'button': 'success', 'element': 'warning' }
+ const tagMap = { menu: '', button: 'success', element: 'warning' }
return tagMap[type] || 'info'
},
getTypeText(type) {
- const textMap = { 'menu': '菜单', 'button': '按钮', 'element': '页面元素' }
+ const textMap = { menu: '菜单', button: '按钮', element: '页面元素' }
return textMap[type] || type
},
generateResourceOptions() {
- // 生成级联选择器的数据
- const flatten = (data) => {
+ const flatten = data => {
return data.map(item => {
const result = { id: item.id, name: item.name }
if (item.children && item.children.length) {
@@ -404,54 +416,73 @@ export default {
diff --git a/web/src/views/security/attackProtection/index.vue b/web/src/views/security/attackProtection/index.vue
deleted file mode 100644
index e957930..0000000
--- a/web/src/views/security/attackProtection/index.vue
+++ /dev/null
@@ -1,420 +0,0 @@
-
-
-
-
-
-
-
-
- {{ item.name }}
- {{ item.description }}
-
-
- 今日拦截
- {{ item.todayBlocked }}
-
-
- 累计拦截
- {{ item.totalBlocked }}
-
-
-
-
-
-
-
-
-
- 防护配置
-
-
-
-
-
-
-
-
-
-
-
- {{ row.type === 'manual' ? '手动' : '自动' }}
-
-
-
-
-
-
-
-
-
- {{ row.status === 'active' ? '封禁中' : '已解封' }}
-
-
-
-
-
- 解封
- 删除
-
-
-
-
-
-
-
-
-
-
-
- 请求/秒
-
-
-
- 请求/秒
-
-
-
- 请求/秒
-
-
-
- 拒绝请求
- 要求验证码
- 延迟响应
-
-
-
- 保存配置
-
-
-
-
-
-
-
-
- {{ word.word }}
-
-
-
-
-
-
-
-
-
-
- 攻击拦截日志
- 刷新
-
-
-
-
-
-
- {{ row.type }}
-
-
-
-
-
-
-
- {{ row.action === 'blocked' ? '已拦截' : '已告警' }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 取消
- 确定
-
-
-
-
-
-
-
-
-
diff --git a/web/src/views/security/mfa/index.vue b/web/src/views/security/mfa/index.vue
index bbf16c9..69bcd90 100644
--- a/web/src/views/security/mfa/index.vue
+++ b/web/src/views/security/mfa/index.vue
@@ -1,142 +1,245 @@
-
-
-
-