更新 @riwa/api-types 依赖至 0.0.20,删除表格基础组件,新增 RWA 和用户管理相关页面及路由
This commit is contained in:
94
src/views/rwa/product/index.vue
Normal file
94
src/views/rwa/product/index.vue
Normal file
@@ -0,0 +1,94 @@
|
||||
<script lang="ts" setup>
|
||||
import { h, ref, useTemplateRef } from 'vue';
|
||||
import { NInputNumber, useDialog, useMessage } from 'naive-ui';
|
||||
import { client, safeClient } from '@/service/api';
|
||||
import { DepositTypeEnum } from '@/enum';
|
||||
import type { TableBaseColumns, TableFetchData, TableInst } from '@/components/table';
|
||||
|
||||
const dialog = useDialog();
|
||||
const message = useMessage();
|
||||
const tableInst = useTemplateRef<TableInst>('tableInst');
|
||||
|
||||
const fetchData: TableFetchData = () => {
|
||||
return safeClient(() =>
|
||||
client.api.admin.rwa.issuance.products.get({
|
||||
query: {}
|
||||
})
|
||||
);
|
||||
};
|
||||
|
||||
const columns: TableBaseColumns = [
|
||||
{
|
||||
title: 'ID',
|
||||
key: 'id'
|
||||
},
|
||||
{
|
||||
title: 'code',
|
||||
key: 'code'
|
||||
},
|
||||
{
|
||||
title: '产品名称',
|
||||
key: 'name'
|
||||
},
|
||||
{
|
||||
title: 'description',
|
||||
key: 'description'
|
||||
},
|
||||
{
|
||||
title: 'estimatedValue',
|
||||
key: 'estimatedValue'
|
||||
},
|
||||
{
|
||||
title: 'categoryId',
|
||||
key: 'categoryId'
|
||||
},
|
||||
{
|
||||
title: 'createdBy',
|
||||
key: 'createdBy'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
fixed: 'right',
|
||||
key: 'operation',
|
||||
width: 160,
|
||||
operations: (row: any) => [
|
||||
{
|
||||
contentText: '编辑',
|
||||
type: 'primary',
|
||||
onClick: () => {
|
||||
tableInst.value?.reload();
|
||||
}
|
||||
},
|
||||
{
|
||||
contentText: '删除',
|
||||
type: 'error',
|
||||
ghost: true,
|
||||
size: 'small',
|
||||
onClick: async () => {
|
||||
dialog.create({
|
||||
title: '提示',
|
||||
positiveText: '是',
|
||||
negativeText: '否',
|
||||
content: '确认删除该银行信息?',
|
||||
onPositiveClick: async () => {
|
||||
safeClient(() =>
|
||||
client.api.admin.deposit.reject({ orderId: row.id as string }).post({
|
||||
reviewNote: '管理员拒绝充值'
|
||||
})
|
||||
);
|
||||
// tableInst.value?.reload();
|
||||
message.success('删除成功');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<TableBase ref="tableInst" :columns="columns" :fetch-data="fetchData" />
|
||||
</template>
|
||||
|
||||
<style lang="css" scoped></style>
|
||||
94
src/views/rwa/producttype/index.vue
Normal file
94
src/views/rwa/producttype/index.vue
Normal file
@@ -0,0 +1,94 @@
|
||||
<script lang="ts" setup>
|
||||
import { h, ref, useTemplateRef } from 'vue';
|
||||
import { NInputNumber, useDialog, useMessage } from 'naive-ui';
|
||||
import { client, safeClient } from '@/service/api';
|
||||
import { DepositTypeEnum } from '@/enum';
|
||||
import type { TableBaseColumns, TableFetchData, TableInst } from '@/components/table';
|
||||
|
||||
const dialog = useDialog();
|
||||
const message = useMessage();
|
||||
const tableInst = useTemplateRef<TableInst>('tableInst');
|
||||
|
||||
const fetchData: TableFetchData = () => {
|
||||
return safeClient(() =>
|
||||
client.api.admin.rwa.issuance.categories.get({
|
||||
query: {}
|
||||
})
|
||||
);
|
||||
};
|
||||
|
||||
const columns: TableBaseColumns = [
|
||||
{
|
||||
title: 'ID',
|
||||
key: 'userId'
|
||||
},
|
||||
{
|
||||
title: 'code',
|
||||
key: 'code'
|
||||
},
|
||||
{
|
||||
title: 'name',
|
||||
key: 'name'
|
||||
},
|
||||
{
|
||||
title: 'description',
|
||||
key: 'description'
|
||||
},
|
||||
{
|
||||
title: 'displayOrder',
|
||||
key: 'displayOrder'
|
||||
},
|
||||
{
|
||||
title: 'createdAt',
|
||||
key: 'createdAt'
|
||||
},
|
||||
{
|
||||
title: 'updatedAt',
|
||||
key: 'updatedAt'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
fixed: 'right',
|
||||
key: 'operation',
|
||||
width: 160,
|
||||
operations: (row: any) => [
|
||||
{
|
||||
contentText: '编辑',
|
||||
type: 'primary',
|
||||
onClick: () => {
|
||||
tableInst.value?.reload();
|
||||
}
|
||||
},
|
||||
{
|
||||
contentText: '删除',
|
||||
type: 'error',
|
||||
ghost: true,
|
||||
size: 'small',
|
||||
onClick: async () => {
|
||||
dialog.create({
|
||||
title: '提示',
|
||||
positiveText: '是',
|
||||
negativeText: '否',
|
||||
content: '确认删除该银行信息?',
|
||||
onPositiveClick: async () => {
|
||||
safeClient(() =>
|
||||
client.api.admin.deposit.reject({ orderId: row.id as string }).post({
|
||||
reviewNote: '管理员拒绝充值'
|
||||
})
|
||||
);
|
||||
// tableInst.value?.reload();
|
||||
message.success('删除成功');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<TableBase ref="tableInst" :columns="columns" :fetch-data="fetchData" />
|
||||
</template>
|
||||
|
||||
<style lang="css" scoped></style>
|
||||
116
src/views/user/bank/index.vue
Normal file
116
src/views/user/bank/index.vue
Normal file
@@ -0,0 +1,116 @@
|
||||
<script lang="ts" setup>
|
||||
import { h, ref, useTemplateRef } from 'vue';
|
||||
import { NInputNumber, useDialog, useMessage } from 'naive-ui';
|
||||
import dayjs from 'dayjs';
|
||||
import { client, safeClient } from '@/service/api';
|
||||
import { DepositTypeEnum } from '@/enum';
|
||||
import type { TableBaseColumns, TableFetchData, TableInst } from '@/components/table';
|
||||
|
||||
const dialog = useDialog();
|
||||
const message = useMessage();
|
||||
const tableInst = useTemplateRef<TableInst>('tableInst');
|
||||
|
||||
const fetchData: TableFetchData = () => {
|
||||
return safeClient(() =>
|
||||
client.api.admin.bank_account.banks.get({
|
||||
query: {}
|
||||
})
|
||||
);
|
||||
};
|
||||
|
||||
const columns: TableBaseColumns = [
|
||||
{
|
||||
title: 'ID',
|
||||
key: 'id'
|
||||
},
|
||||
{
|
||||
title: '银行名称',
|
||||
key: 'nameCn'
|
||||
},
|
||||
{
|
||||
title: 'nameEn',
|
||||
key: 'nameEn'
|
||||
},
|
||||
{
|
||||
title: 'bankCode',
|
||||
key: 'bankCode'
|
||||
},
|
||||
{
|
||||
title: 'swiftCode',
|
||||
key: 'swiftCode'
|
||||
},
|
||||
{
|
||||
title: 'isActive',
|
||||
key: 'isActive'
|
||||
},
|
||||
{
|
||||
title: 'sortOrder',
|
||||
key: 'sortOrder'
|
||||
},
|
||||
{
|
||||
title: 'createdAt',
|
||||
key: 'createdAt',
|
||||
render(row: any) {
|
||||
return h('span', {}, row.createdAt ? dayjs(row.createdAt).format('YYYY-MM-DD HH:mm:ss') : '-');
|
||||
}
|
||||
},
|
||||
{
|
||||
title: 'updatedAt',
|
||||
key: 'updatedAt',
|
||||
render(row: any) {
|
||||
return h('span', {}, row.updatedAt ? dayjs(row.updatedAt).format('YYYY-MM-DD HH:mm:ss') : '-');
|
||||
}
|
||||
},
|
||||
{
|
||||
title: 'deletedAt',
|
||||
key: 'deletedAt',
|
||||
render(row: any) {
|
||||
return h('span', {}, row.deletedAt ? dayjs(row.deletedAt).format('YYYY-MM-DD HH:mm:ss') : '-');
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
fixed: 'right',
|
||||
key: 'operation',
|
||||
width: 160,
|
||||
operations: (row: any) => [
|
||||
{
|
||||
contentText: '编辑',
|
||||
type: 'primary',
|
||||
onClick: () => {
|
||||
tableInst.value?.reload();
|
||||
}
|
||||
},
|
||||
{
|
||||
contentText: '删除',
|
||||
type: 'error',
|
||||
ghost: true,
|
||||
size: 'small',
|
||||
onClick: async () => {
|
||||
dialog.create({
|
||||
title: '提示',
|
||||
positiveText: '是',
|
||||
negativeText: '否',
|
||||
content: '确认删除该银行信息?',
|
||||
onPositiveClick: async () => {
|
||||
safeClient(() =>
|
||||
client.api.admin.deposit.reject({ orderId: row.id as string }).post({
|
||||
reviewNote: '管理员拒绝充值'
|
||||
})
|
||||
);
|
||||
// tableInst.value?.reload();
|
||||
message.success('删除成功');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<TableBase ref="tableInst" :columns="columns" :fetch-data="fetchData" />
|
||||
</template>
|
||||
|
||||
<style lang="css" scoped></style>
|
||||
94
src/views/user/bankcard/index.vue
Normal file
94
src/views/user/bankcard/index.vue
Normal file
@@ -0,0 +1,94 @@
|
||||
<script lang="ts" setup>
|
||||
import { h, ref, useTemplateRef } from 'vue';
|
||||
import { NInputNumber, useDialog, useMessage } from 'naive-ui';
|
||||
import { client, safeClient } from '@/service/api';
|
||||
import { DepositTypeEnum } from '@/enum';
|
||||
import type { TableBaseColumns, TableFetchData, TableInst } from '@/components/table';
|
||||
|
||||
const dialog = useDialog();
|
||||
const message = useMessage();
|
||||
const tableInst = useTemplateRef<TableInst>('tableInst');
|
||||
|
||||
const fetchData: TableFetchData = () => {
|
||||
return safeClient(() =>
|
||||
client.api.admin.bank_account.get({
|
||||
query: {}
|
||||
})
|
||||
);
|
||||
};
|
||||
|
||||
const columns: TableBaseColumns = [
|
||||
{
|
||||
title: 'ID',
|
||||
key: 'userId'
|
||||
},
|
||||
{
|
||||
title: '银行卡名称',
|
||||
key: 'bankName'
|
||||
},
|
||||
{
|
||||
title: '银行卡号',
|
||||
key: 'bankCode'
|
||||
},
|
||||
{
|
||||
title: '账户名',
|
||||
key: 'accountName'
|
||||
},
|
||||
{
|
||||
title: 'maskAccountNumber',
|
||||
key: 'maskAccountNumber'
|
||||
},
|
||||
{
|
||||
title: 'country',
|
||||
key: 'country'
|
||||
},
|
||||
{
|
||||
title: 'branchName',
|
||||
key: 'branchName'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
fixed: 'right',
|
||||
key: 'operation',
|
||||
width: 160,
|
||||
operations: (row: any) => [
|
||||
{
|
||||
contentText: '编辑',
|
||||
type: 'primary',
|
||||
onClick: () => {
|
||||
tableInst.value?.reload();
|
||||
}
|
||||
},
|
||||
{
|
||||
contentText: '删除',
|
||||
type: 'error',
|
||||
ghost: true,
|
||||
size: 'small',
|
||||
onClick: async () => {
|
||||
dialog.create({
|
||||
title: '提示',
|
||||
positiveText: '是',
|
||||
negativeText: '否',
|
||||
content: '确认删除该银行信息?',
|
||||
onPositiveClick: async () => {
|
||||
safeClient(() =>
|
||||
client.api.admin.deposit.reject({ orderId: row.id as string }).post({
|
||||
reviewNote: '管理员拒绝充值'
|
||||
})
|
||||
);
|
||||
// tableInst.value?.reload();
|
||||
message.success('删除成功');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<TableBase ref="tableInst" :columns="columns" :fetch-data="fetchData" />
|
||||
</template>
|
||||
|
||||
<style lang="css" scoped></style>
|
||||
44
src/views/user/list/index.vue
Normal file
44
src/views/user/list/index.vue
Normal file
@@ -0,0 +1,44 @@
|
||||
<script lang="ts" setup>
|
||||
import { h, ref, useTemplateRef } from 'vue';
|
||||
import { NInputNumber, useDialog, useMessage } from 'naive-ui';
|
||||
import { client, safeClient } from '@/service/api';
|
||||
import { DepositTypeEnum } from '@/enum';
|
||||
import type { TableBaseColumns, TableFetchData, TableInst } from '@/components/table';
|
||||
|
||||
const dialog = useDialog();
|
||||
const message = useMessage();
|
||||
const tableInst = useTemplateRef<TableInst>('tableInst');
|
||||
|
||||
const fetchData: TableFetchData = () => {
|
||||
return safeClient(() =>
|
||||
client.api.user.profile.get({
|
||||
query: {}
|
||||
})
|
||||
);
|
||||
};
|
||||
|
||||
const columns: TableBaseColumns = [
|
||||
{
|
||||
title: 'ID',
|
||||
key: 'id'
|
||||
},
|
||||
{
|
||||
title: '用户名',
|
||||
key: 'name'
|
||||
},
|
||||
{
|
||||
title: '邮箱',
|
||||
key: 'email'
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
key: 'image'
|
||||
}
|
||||
];
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<TableBase ref="tableInst" :columns="columns" :fetch-data="fetchData" />
|
||||
</template>
|
||||
|
||||
<style lang="css" scoped></style>
|
||||
56
src/views/user/transfer/index.vue
Normal file
56
src/views/user/transfer/index.vue
Normal file
@@ -0,0 +1,56 @@
|
||||
<script lang="ts" setup>
|
||||
import { h, ref, useTemplateRef } from 'vue';
|
||||
import { NInputNumber, useDialog, useMessage } from 'naive-ui';
|
||||
import { client, safeClient } from '@/service/api';
|
||||
import { DepositTypeEnum } from '@/enum';
|
||||
import type { TableBaseColumns, TableFetchData, TableInst } from '@/components/table';
|
||||
|
||||
const dialog = useDialog();
|
||||
const message = useMessage();
|
||||
const tableInst = useTemplateRef<TableInst>('tableInst');
|
||||
|
||||
const fetchData: TableFetchData = () => {
|
||||
return safeClient(() =>
|
||||
client.api.admin.transfer.get({
|
||||
query: {}
|
||||
})
|
||||
);
|
||||
};
|
||||
|
||||
const columns: TableBaseColumns = [
|
||||
{
|
||||
title: 'ID',
|
||||
key: 'id'
|
||||
},
|
||||
{
|
||||
title: 'orderNo',
|
||||
key: 'orderNo'
|
||||
},
|
||||
{
|
||||
title: 'fromUserId',
|
||||
key: 'fromUserId'
|
||||
},
|
||||
{
|
||||
title: 'toUserId',
|
||||
key: 'toUserId'
|
||||
},
|
||||
{
|
||||
title: 'assetCode',
|
||||
key: 'assetCode'
|
||||
},
|
||||
{
|
||||
title: 'amount',
|
||||
key: 'amount'
|
||||
},
|
||||
{
|
||||
title: 'fee',
|
||||
key: 'fee'
|
||||
}
|
||||
];
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<TableBase ref="tableInst" :columns="columns" :fetch-data="fetchData" />
|
||||
</template>
|
||||
|
||||
<style lang="css" scoped></style>
|
||||
Reference in New Issue
Block a user