mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-10 11:20:17 +00:00
[Update] 增加平台列表组件
This commit is contained in:
@@ -252,7 +252,7 @@ const cn = {
|
|||||||
'create_platform': '创建系统平台',
|
'create_platform': '创建系统平台',
|
||||||
'update_platform': '更新系统平台',
|
'update_platform': '更新系统平台',
|
||||||
'platform_detail': '平台详情',
|
'platform_detail': '平台详情',
|
||||||
'base_platform': '基础平台',
|
'BasePlatform': '基础平台',
|
||||||
'charset': '编码',
|
'charset': '编码',
|
||||||
'meta': '元数据'
|
'meta': '元数据'
|
||||||
},
|
},
|
||||||
|
@@ -161,7 +161,7 @@ export const constantRoutes = [
|
|||||||
{
|
{
|
||||||
path: 'platforms',
|
path: 'platforms',
|
||||||
name: 'PlatformList',
|
name: 'PlatformList',
|
||||||
component: () => import('@/views/tree/index'),
|
component: () => import('@/views/assets/PlatformList'),
|
||||||
meta: { title: 'PlatformList' }
|
meta: { title: 'PlatformList' }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
52
src/views/assets/PlatformList.vue
Normal file
52
src/views/assets/PlatformList.vue
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
<template>
|
||||||
|
<GenericListPage :table-config="tableConfig" :header-actions="headerActions" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { GenericListPage } from '@/layout/components'
|
||||||
|
import DetailFormatter from '@/components/DataTable/formatters/DetailFormatter'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
GenericListPage
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
showTree: true,
|
||||||
|
tableConfig: {
|
||||||
|
url: '/api/v1/assets/platforms/',
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
prop: 'name',
|
||||||
|
label: this.$t('assets.name'),
|
||||||
|
formatter: DetailFormatter,
|
||||||
|
sortable: true,
|
||||||
|
route: 'CommandFilterDetail'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'base',
|
||||||
|
label: this.$t('assets.BasePlatform')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: '',
|
||||||
|
label: this.$t('assets.comment')
|
||||||
|
}
|
||||||
|
],
|
||||||
|
tableActions: {
|
||||||
|
hasEdit: true,
|
||||||
|
editRoute: '404'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headerActions: {
|
||||||
|
hasDelete: false,
|
||||||
|
hasUpdate: false,
|
||||||
|
createRoute: 'CommandFilterCreate'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
</style>
|
Reference in New Issue
Block a user