Skip to content

Commit fc59502

Browse files
authored
Merge pull request #40 from ReLive27/main
refactor(ui): optimize overall project page layout and structure
2 parents 0ae2af1 + 85cded6 commit fc59502

16 files changed

Lines changed: 4716 additions & 2286 deletions

File tree

web/src/router/index.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,6 @@ export const constantRoutes = [
143143
name: '安全',
144144
meta: { title: '安全', icon: 'security' },
145145
children: [
146-
{
147-
path: 'attackProtection',
148-
name: '攻击防护',
149-
component: () => import('@/views/security/attackProtection/index'),
150-
meta: { title: '攻击防护', icon: 'attackProtection' }
151-
},
152146
{
153147
path: 'mfa',
154148
name: '多因素身份认证',

web/src/views/app/appDetail.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@
287287
<!-- 头部标题 -->
288288
<div class="section-header">
289289
<h3 class="section-title">管理对 API 资源的访问</h3>
290-
<el-button type="primary" icon="el-icon-plus" @click="openApiAuthDialog">授权API资源</el-button>
290+
<el-button size="small" type="primary" icon="el-icon-plus" @click="openApiAuthDialog">授权API资源</el-button>
291291
</div>
292292

293293
<!-- 已授权的API资源列表 -->
@@ -296,11 +296,11 @@
296296
<span>已授权的API资源</span>
297297
</div>
298298

299-
<el-table :data="authorizedApis" style="width: 100%" v-loading="apiAuthLoading">
299+
<el-table v-loading="apiAuthLoading" :data="authorizedApis" style="width: 100%">
300300
<el-table-column prop="apiName" label="API资源名称" min-width="150">
301301
<template slot-scope="{ row }">
302302
<div class="api-name-cell">
303-
<i class="el-icon-s-operation" style="margin-right: 8px; color: #409eff;"></i>
303+
<i class="el-icon-s-operation" style="margin-right: 8px; color: #409eff;" />
304304
<span>{{ row.apiName }}</span>
305305
</div>
306306
</template>
@@ -366,7 +366,7 @@
366366
<el-card class="config-card role-card" shadow="never">
367367
<div slot="header">
368368
<span>分配的角色</span>
369-
<el-button type="primary" size="small" icon="el-icon-plus" @click="openRoleDialog" style="float: right;">添加角色</el-button>
369+
<el-button type="primary" size="small" icon="el-icon-plus" style="float: right;" @click="openRoleDialog">添加角色</el-button>
370370
</div>
371371

372372
<el-table :data="assignedRoles" style="width: 100%">
@@ -407,7 +407,7 @@
407407

408408
<!-- API授权添加/编辑弹窗 -->
409409
<el-dialog :title="isEditApiAuth ? '编辑API授权' : '授权API资源'" :visible.sync="apiAuthDialogVisible" width="600px">
410-
<el-form :model="apiAuthForm" label-width="120px" :rules="apiAuthRules" ref="apiAuthForm">
410+
<el-form ref="apiAuthForm" :model="apiAuthForm" label-width="120px" :rules="apiAuthRules">
411411
<el-form-item label="API资源" prop="apiId">
412412
<el-select v-model="apiAuthForm.apiId" placeholder="选择API资源" style="width: 100%" :disabled="isEditApiAuth">
413413
<el-option
@@ -445,7 +445,7 @@
445445

446446
<!-- 添加角色弹窗 -->
447447
<el-dialog title="添加角色" :visible.sync="roleDialogVisible" width="500px">
448-
<el-form :model="roleForm" label-width="100px" :rules="roleRules" ref="roleForm">
448+
<el-form ref="roleForm" :model="roleForm" label-width="100px" :rules="roleRules">
449449
<el-form-item label="选择角色" prop="roleId">
450450
<el-select v-model="roleForm.roleId" placeholder="选择要分配的角色" style="width: 100%">
451451
<el-option

web/src/views/app/index.vue

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@
6565

6666
<el-table-column label="操作" width="200">
6767
<template slot-scope="{ row }">
68-
<el-button size="mini" type="text" @click="detailApp(row)">详情</el-button>
6968
<el-button size="mini" type="text" @click="editApp(row)">编辑</el-button>
7069
<el-button size="mini" type="text" @click="enableApp(row)">禁用</el-button>
7170
<el-button size="mini" type="text" class="danger" @click="deleteApp(row)">删除</el-button>
@@ -128,18 +127,14 @@ export default {
128127
this.$router.push('/app/create')
129128
},
130129
131-
detailApp(appId) {
130+
editApp(appId) {
132131
this.$router.push({
133132
name: 'AppDetail',
134133
params: { id: appId },
135134
query: { from: 'create' }
136135
})
137136
},
138137
139-
editApp(app) {
140-
this.$message.info('打开编辑应用:' + app.name)
141-
},
142-
143138
enableApp(app) {
144139
this.$confirm(`确定禁用应用?`, '提示', { type: 'warning' })
145140
.then(() => this.$message.success('已禁用'))

0 commit comments

Comments
 (0)