feat: 新增资产管理视图及相关路由配置;更新国际化语言文件
This commit is contained in:
@@ -243,7 +243,9 @@ const local: App.I18n.Schema = {
|
|||||||
user_list: 'User List',
|
user_list: 'User List',
|
||||||
user_transfer: 'User Transfer',
|
user_transfer: 'User Transfer',
|
||||||
transfer: 'Transfer',
|
transfer: 'Transfer',
|
||||||
withdraw_approved: 'Approved Withdraw'
|
withdraw_approved: 'Approved Withdraw',
|
||||||
|
asset: 'Asset Management',
|
||||||
|
tradingpairs: 'Trading Pairs Management'
|
||||||
},
|
},
|
||||||
page: {
|
page: {
|
||||||
login: {
|
login: {
|
||||||
|
|||||||
@@ -239,7 +239,9 @@ const local: App.I18n.Schema = {
|
|||||||
user_bankcard: '用户银行卡',
|
user_bankcard: '用户银行卡',
|
||||||
user_bank: '银行管理',
|
user_bank: '银行管理',
|
||||||
user_transfer: '用户转账记录',
|
user_transfer: '用户转账记录',
|
||||||
transfer: '转账管理'
|
transfer: '转账管理',
|
||||||
|
asset: '资产管理',
|
||||||
|
tradingpairs: '交易对管理'
|
||||||
},
|
},
|
||||||
page: {
|
page: {
|
||||||
login: {
|
login: {
|
||||||
|
|||||||
@@ -39,15 +39,6 @@ export const generatedRoutes: GeneratedRoute[] = [
|
|||||||
hideInMenu: true
|
hideInMenu: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: 'asset',
|
|
||||||
path: '/asset',
|
|
||||||
component: 'layout.base$view.asset',
|
|
||||||
meta: {
|
|
||||||
title: 'asset',
|
|
||||||
i18nKey: 'route.asset'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: 'deposit',
|
name: 'deposit',
|
||||||
path: '/deposit',
|
path: '/deposit',
|
||||||
@@ -243,5 +234,15 @@ export const generatedRoutes: GeneratedRoute[] = [
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'asset',
|
||||||
|
path: '/asset',
|
||||||
|
component: 'layout.base$view.asset',
|
||||||
|
meta: {
|
||||||
|
title: 'asset',
|
||||||
|
i18nKey: 'route.asset',
|
||||||
|
order: 5
|
||||||
}
|
}
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,5 +1,61 @@
|
|||||||
<script lang="ts" setup></script>
|
<script lang="ts" setup>
|
||||||
|
import { useTemplateRef } from 'vue';
|
||||||
|
import { client, safeClient } from '@/service/api';
|
||||||
|
import type { TableBaseColumns, TableFetchData, TableFilterColumns, TableInst } from '@/components/table';
|
||||||
|
|
||||||
<template>Hello world</template>
|
const tableInst = useTemplateRef<TableInst>('tableInst');
|
||||||
|
|
||||||
|
const fetchData: TableFetchData = ({ pagination, filter }) => {
|
||||||
|
return safeClient(() =>
|
||||||
|
client.api.admin.assets.get({
|
||||||
|
query: { ...pagination, ...filter }
|
||||||
|
})
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const columns: TableBaseColumns = [
|
||||||
|
{
|
||||||
|
title: 'ID',
|
||||||
|
key: 'id'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '资产代码',
|
||||||
|
key: 'assetCode'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '资产名称',
|
||||||
|
key: 'assetName'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '资产类型',
|
||||||
|
key: 'assetType'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '创建时间',
|
||||||
|
key: 'createdAt'
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
const filterColumns: TableFilterColumns = [
|
||||||
|
{
|
||||||
|
title: '资产代码',
|
||||||
|
key: 'assetCode'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '资产名称',
|
||||||
|
key: 'assetName'
|
||||||
|
}
|
||||||
|
];
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<TableBase
|
||||||
|
ref="tableInst"
|
||||||
|
:columns="columns"
|
||||||
|
:fetch-data="fetchData"
|
||||||
|
show-header-operation
|
||||||
|
:filter-columns="filterColumns"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
|
||||||
<style lang="css" scoped></style>
|
<style lang="css" scoped></style>
|
||||||
|
|||||||
Reference in New Issue
Block a user