diff --git a/src/components/ListTables/headeraction.vue b/src/components/ListTables/headeraction.vue index d01725773..9a74c45c0 100644 --- a/src/components/ListTables/headeraction.vue +++ b/src/components/ListTables/headeraction.vue @@ -1,10 +1,12 @@ @@ -12,6 +14,16 @@ export default { prop: { + }, + props: { + hasSelection: { + type: Boolean, + default: () => true + }, + selectDisable: { + type: Boolean, + default: () => true + } }, data() { return { diff --git a/src/components/ListTables/table.vue b/src/components/ListTables/table.vue index bacb15657..99fb5bcf0 100644 --- a/src/components/ListTables/table.vue +++ b/src/components/ListTables/table.vue @@ -2,7 +2,7 @@
- + @@ -12,6 +12,7 @@ v-loading="loading" :data="tabledata" stripe + @selection-change="handleSelectionChange" > + > + >
@@ -89,7 +91,7 @@ export default { }, align: { type: String, - default: 'left', + default: 'left' }, hasSelect: { type: Boolean, @@ -120,7 +122,9 @@ export default { current_page: 1, total: 0, offset: 0, - headeractiontext: 'title' + headeractiontext: 'title', + multipleSelection: [], + selectDisable: true } }, created() { @@ -146,6 +150,10 @@ export default { this.loading = false }) }, + handleSelectionChange(val) { + this.multipleSelection = val; + (val.length > 0) ? (this.selectDisable = false) : (this.selectDisable = true) + }, handleEdit: function(index, row) { try { this.$router.push({ name: this.action.hasEdit, params: { id: row.id }}) @@ -199,4 +207,17 @@ export default { .table{ margin-top: 15px; } + +//分页 +.el-pagination /deep/ .el-pagination__total{ + float: left; +} + +.el-pagination /deep/ .el-pagination__sizes{ + float: left; +} +//修改颜色 +// .el-button--text{ +// color: #409EFF; +// } diff --git a/src/i18n/langs/cn.js b/src/i18n/langs/cn.js index a152c7300..eb1a5a8bd 100644 --- a/src/i18n/langs/cn.js +++ b/src/i18n/langs/cn.js @@ -47,11 +47,32 @@ const cn = { 'SystemUserList': '系统用户', 'LabelList': '标签管理', 'CommandFilterList': '命令过滤', - 'platformList': '平台列表', - 'applications': '应用管理', - 'perms': '权限管理', - 'sessions': '会话管理', - 'jobcenter': '作业中心' + 'PlatformList': '平台列表', + 'Applications': '应用管理', + 'RemoteApp': '远程应用', + 'DatabaseApp': '数据库应用', + 'Perms': '权限管理', + 'AssetPermission': '资产授权', + 'RemoteAppPermission': '远程应用授权', + 'DatabaseAppPermission': '数据库应用授权', + 'Sessions': '会话管理', + 'SessionOnline': '在线会话', + 'SessionOffline': '历史会话', + 'Commands': '命令记录', + 'WebTerminal': 'Web终端', + 'FileManager': '文件管理', + 'Terminal': '终端管理', + 'JobCenter': '作业中心', + 'TaskList': '任务列表', + 'BatchCommand': '批量命令', + 'TaskMonitor': '任务监控', + 'Tickets': '工单管理', + 'Audits': '日志审计', + 'LoginLog': '登录日志', + 'FtpLog': 'FTP日志', + 'OperateLog': '操作日志', + 'PasswordChangeLog': '改密日志', + 'Settings': '系统设置' }, // 用户模块翻译 users: { @@ -202,7 +223,7 @@ const cn = { 'SystemUserCreate': '创建系统用户', 'SystemUserUpdate': '更新系统用户', 'protocol': '协议', - 'login_mode': '登录模式', + 'loginMode': '登录模式', 'quick_update': '快速更新', 'auto_push': '自动更新', // 标签 diff --git a/src/router/index.js b/src/router/index.js index fdf4304ea..418a4c5d1 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -153,57 +153,192 @@ export const constantRoutes = [ }, { path: 'platforms', - name: 'platformList', + name: 'PlatformList', component: () => import('@/views/tree/index'), - meta: { title: 'platformList' } + meta: { title: 'PlatformList' } } ] }, { path: '/applications/', component: Layout, + redirect: '/applications/remote-apps/', name: 'applications', - meta: { title: 'applications', icon: 'th' }, + meta: { title: 'Applications', icon: 'th' }, children: [ { path: 'remote-apps', name: 'remoteAppList', - component: () => import('@/views/table/index'), - meta: { title: 'remoteAppList' } + component: () => import('@/views/tree/index'), + meta: { title: 'RemoteApp' } }, { - path: 'databases', - name: 'databaseList', + path: 'database-apps', + name: 'DatabaseAppList', component: () => import('@/views/tree/index'), - meta: { title: 'databaseList' } + meta: { title: 'DatabaseApp' } } ] }, { path: '/perms/', component: Layout, - name: 'perms', - meta: { title: 'perms', icon: 'edit' }, + redirect: '/perms/asset-permission/', + name: 'Perms', + meta: { title: 'Perms', icon: 'edit' }, children: [ { path: 'asset-permissions', - name: 'assetPermissionList', - component: () => import('@/views/table/index'), - meta: { title: 'assetPermissionList' } + name: 'AssetPermissionList', + component: import('@/views/tree/index'), + meta: { title: 'AssetPermission' } }, { - path: 'remote-apps-permissions', - name: 'remoteAppPermissionList', + path: 'remote-app-permissions', + name: 'RemoteAppPermissionList', component: () => import('@/views/tree/index'), - meta: { title: 'remoteAppPermissionList' } + meta: { title: 'RemoteAppPermission' } }, { - path: 'database-permissions', - name: 'databasePermissionList', + path: 'database-app-permissions', + name: 'DatabaseAppPermissionList', component: () => import('@/views/tree/index'), - meta: { title: 'databasePermissionList' } + meta: { title: 'DatabaseAppPermission' } } ] + }, + { + path: '/terminal/', + component: Layout, + redirect: '/terminal/session-online/', + name: 'Sessions', + meta: { title: 'Sessions', icon: 'rocket' }, + children: [ + { + path: 'session-online', + name: 'SessionOnlineList', + component: () => import('@/views/tree/index'), + meta: { title: 'SessionOnline' } + }, + { + path: 'session-offline', + name: 'SessionOfflineList', + component: () => import('@/views/tree/index'), + meta: { title: 'SessionOffline' } + }, + { + path: 'command', + name: 'CommandsList', + component: () => import('@/views/tree/index'), + meta: { title: 'Commands' } + }, + { + path: 'luna', + name: 'WebTerminal', + component: () => import('@/views/tree/index'), + meta: { title: 'WebTerminal' } + }, + { + path: 'sftp', + name: 'FileManager', + component: () => import('@/views/tree/index'), + meta: { title: 'FileManager' } + }, + { + path: 'terminal', + name: 'TerminalList', + component: () => import('@/views/tree/index'), + meta: { title: 'Terminal' } + } + ] + }, + { + path: '/ops/', + component: Layout, + redirect: '/ops/task/', + name: 'JobCenter', + meta: { title: 'JobCenter', icon: 'coffee' }, + children: [ + { + path: 'task', + name: 'TaskList', + component: () => import('@/views/tree/index'), + meta: { title: 'TaskList' } + }, + { + path: 'command-executions/create', + name: 'BatchCommand', + component: () => import('@/views/tree/index'), + meta: { title: 'BatchCommand' } + }, + { + path: 'flower', + name: 'TaskMonitor', + component: () => import('@/views/tree/index'), + meta: { title: 'TaskMonitor' } + } + ] + }, + { + path: '/tickets/', + component: Layout, + redirect: '/tickets/tickets/', + children: [{ + path: 'tickets', + name: 'Tickets', + component: () => import('@/views/tree/index'), + meta: { title: 'Tickets', icon: 'check-square-o' } + }] + }, + { + path: '/audits/', + component: Layout, + redirect: '/audits/login-log/', + name: 'Audits', + meta: { title: 'Audits', icon: 'history' }, + children: [ + { + path: 'login-log', + name: 'LoginLog', + component: () => import('@/views/tree/index'), + meta: { title: 'LoginLog' } + }, + { + path: 'ftp-log', + name: 'FtpLog', + component: () => import('@/views/tree/index'), + meta: { title: 'FtpLog' } + }, + { + path: 'operate-log', + name: 'OperateLog', + component: () => import('@/views/tree/index'), + meta: { title: 'OperateLog' } + }, + { + path: 'password-change-log', + name: 'PasswordChangeLog', + component: () => import('@/views/tree/index'), + meta: { title: 'PasswordChangeLog' } + }, + { + path: 'command-execution-log', + name: 'BatchCommand', + component: () => import('@/views/tree/index'), + meta: { title: 'BatchCommand' } + } + ] + }, + { + path: '/settings', + component: Layout, + redirect: '/settings/', + children: [{ + path: 'settings', + name: 'Settings', + component: () => import('@/views/tree/index'), + meta: { title: 'Settings', icon: 'gears' } + }] } ] diff --git a/src/views/assets/AdminUserList.vue b/src/views/assets/AdminUserList.vue index 6cdd0fdc3..967733b78 100644 --- a/src/views/assets/AdminUserList.vue +++ b/src/views/assets/AdminUserList.vue @@ -1,132 +1,63 @@ - diff --git a/src/views/assets/CommandFilterList.vue b/src/views/assets/CommandFilterList.vue index aab21396a..0acb60125 100644 --- a/src/views/assets/CommandFilterList.vue +++ b/src/views/assets/CommandFilterList.vue @@ -1,127 +1,58 @@ - diff --git a/src/views/assets/LabelList.vue b/src/views/assets/LabelList.vue index f0e11b38a..d609a96b9 100644 --- a/src/views/assets/LabelList.vue +++ b/src/views/assets/LabelList.vue @@ -1,118 +1,57 @@