更新 @riwa/api-types 依赖至 0.0.20,删除表格基础组件,新增 RWA 和用户管理相关页面及路由
This commit is contained in:
@@ -50,7 +50,7 @@
|
||||
"@better-scroll/core": "2.5.1",
|
||||
"@elysiajs/eden": "^1.4.5",
|
||||
"@iconify/vue": "5.0.0",
|
||||
"@riwa/api-types": "http://192.168.1.36:9527/api/riwa-api-types-0.0.23.tgz",
|
||||
"@riwa/api-types": "http://192.168.1.36:9527/api/riwa-api-types-0.0.20.tgz",
|
||||
"@sa/axios": "workspace:*",
|
||||
"@sa/color": "workspace:*",
|
||||
"@sa/hooks": "workspace:*",
|
||||
|
||||
12
pnpm-lock.yaml
generated
12
pnpm-lock.yaml
generated
@@ -18,8 +18,8 @@ importers:
|
||||
specifier: 5.0.0
|
||||
version: 5.0.0(vue@3.5.25(typescript@5.9.3))
|
||||
'@riwa/api-types':
|
||||
specifier: http://192.168.1.36:9527/api/riwa-api-types-0.0.23.tgz
|
||||
version: http://192.168.1.36:9527/api/riwa-api-types-0.0.23.tgz(@elysiajs/eden@1.4.5(elysia@1.4.19(@sinclair/typebox@0.34.41)(exact-mirror@0.2.5(@sinclair/typebox@0.34.41))(file-type@21.1.1)(openapi-types@12.1.3)(typescript@5.9.3)))
|
||||
specifier: http://192.168.1.36:9527/api/riwa-api-types-0.0.20.tgz
|
||||
version: http://192.168.1.36:9527/api/riwa-api-types-0.0.20.tgz(@elysiajs/eden@1.4.5(elysia@1.4.19(@sinclair/typebox@0.34.41)(exact-mirror@0.2.5(@sinclair/typebox@0.34.41))(file-type@21.1.1)(openapi-types@12.1.3)(typescript@5.9.3)))
|
||||
'@sa/axios':
|
||||
specifier: workspace:*
|
||||
version: link:packages/axios
|
||||
@@ -1074,9 +1074,9 @@ packages:
|
||||
'@quansync/fs@0.1.6':
|
||||
resolution: {integrity: sha512-zoA8SqQO11qH9H8FCBR7NIbowYARIPmBz3nKjgAaOUDi/xPAAu1uAgebtV7KXHTc6CDZJVRZ1u4wIGvY5CWYaw==}
|
||||
|
||||
'@riwa/api-types@http://192.168.1.36:9527/api/riwa-api-types-0.0.23.tgz':
|
||||
resolution: {tarball: http://192.168.1.36:9527/api/riwa-api-types-0.0.23.tgz}
|
||||
version: 0.0.23
|
||||
'@riwa/api-types@http://192.168.1.36:9527/api/riwa-api-types-0.0.20.tgz':
|
||||
resolution: {tarball: http://192.168.1.36:9527/api/riwa-api-types-0.0.20.tgz}
|
||||
version: 0.0.20
|
||||
peerDependencies:
|
||||
'@elysiajs/eden': ^1.4.5
|
||||
|
||||
@@ -5082,7 +5082,7 @@ snapshots:
|
||||
dependencies:
|
||||
quansync: 0.3.0
|
||||
|
||||
'@riwa/api-types@http://192.168.1.36:9527/api/riwa-api-types-0.0.23.tgz(@elysiajs/eden@1.4.5(elysia@1.4.19(@sinclair/typebox@0.34.41)(exact-mirror@0.2.5(@sinclair/typebox@0.34.41))(file-type@21.1.1)(openapi-types@12.1.3)(typescript@5.9.3)))':
|
||||
'@riwa/api-types@http://192.168.1.36:9527/api/riwa-api-types-0.0.20.tgz(@elysiajs/eden@1.4.5(elysia@1.4.19(@sinclair/typebox@0.34.41)(exact-mirror@0.2.5(@sinclair/typebox@0.34.41))(file-type@21.1.1)(openapi-types@12.1.3)(typescript@5.9.3)))':
|
||||
dependencies:
|
||||
'@elysiajs/eden': 1.4.5(elysia@1.4.19(@sinclair/typebox@0.34.41)(exact-mirror@0.2.5(@sinclair/typebox@0.34.41))(file-type@21.1.1)(openapi-types@12.1.3)(typescript@5.9.3))
|
||||
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
<script lang="ts" setup>
|
||||
import { computed, onMounted, ref } from 'vue';
|
||||
import type { DataTableColumns, PaginationProps } from 'naive-ui';
|
||||
|
||||
const props = defineProps<{
|
||||
fetchData: (pagination: PaginationProps) => Promise<{ data: any[]; itemCount: number }>;
|
||||
columns: DataTableColumns;
|
||||
pagination: PaginationProps;
|
||||
}>();
|
||||
|
||||
const data = ref<any[]>([]);
|
||||
const headerColumns = computed(() => {
|
||||
return props.columns
|
||||
.filter(col => {
|
||||
return !col.fixed;
|
||||
})
|
||||
.map(col => {
|
||||
return {
|
||||
key: col.key,
|
||||
title: col.title,
|
||||
checked: true,
|
||||
visible: true
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
async function loadData() {
|
||||
const result = await props.fetchData(props.pagination);
|
||||
data.value = result.data;
|
||||
props.pagination!.itemCount = result.itemCount;
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
loadData();
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="space-y-5">
|
||||
<TableHeaderOperation :columns="headerColumns" />
|
||||
<NDataTable :columns="columns" :data="data!" :pagination="pagination" :bordered="false" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="css" scoped></style>
|
||||
@@ -228,7 +228,15 @@ const local: App.I18n.Schema = {
|
||||
deposit: '充值管理',
|
||||
deposit_fiat: '法币充值',
|
||||
withdraw: '提现管理',
|
||||
withdraw_fiat: '法币提现'
|
||||
withdraw_fiat: '法币提现',
|
||||
rwa: 'RWA管理',
|
||||
rwa_product: 'RWA产品',
|
||||
rwa_producttype: '产品类型',
|
||||
user: '用户管理',
|
||||
user_list: '用户列表',
|
||||
user_bankcard: '用户银行卡',
|
||||
user_bank: '银行管理',
|
||||
user_transfer: '用户转账记录'
|
||||
},
|
||||
page: {
|
||||
login: {
|
||||
|
||||
@@ -22,5 +22,11 @@ export const views: Record<LastLevelRouteKey, RouteComponent | (() => Promise<Ro
|
||||
login: () => import("@/views/_builtin/login/index.vue"),
|
||||
deposit_fiat: () => import("@/views/deposit/fiat/index.vue"),
|
||||
home: () => import("@/views/home/index.vue"),
|
||||
rwa_product: () => import("@/views/rwa/product/index.vue"),
|
||||
rwa_producttype: () => import("@/views/rwa/producttype/index.vue"),
|
||||
user_bank: () => import("@/views/user/bank/index.vue"),
|
||||
user_bankcard: () => import("@/views/user/bankcard/index.vue"),
|
||||
user_list: () => import("@/views/user/list/index.vue"),
|
||||
user_transfer: () => import("@/views/user/transfer/index.vue"),
|
||||
withdraw_fiat: () => import("@/views/withdraw/fiat/index.vue"),
|
||||
};
|
||||
|
||||
@@ -96,6 +96,84 @@ export const generatedRoutes: GeneratedRoute[] = [
|
||||
hideInMenu: true
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'rwa',
|
||||
path: '/rwa',
|
||||
component: 'layout.base',
|
||||
meta: {
|
||||
title: 'rwa',
|
||||
i18nKey: 'route.rwa',
|
||||
order: 5
|
||||
},
|
||||
children: [
|
||||
{
|
||||
name: 'rwa_product',
|
||||
path: '/rwa/product',
|
||||
component: 'view.rwa_product',
|
||||
meta: {
|
||||
title: 'rwa_product',
|
||||
i18nKey: 'route.rwa_product'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'rwa_producttype',
|
||||
path: '/rwa/producttype',
|
||||
component: 'view.rwa_producttype',
|
||||
meta: {
|
||||
title: 'rwa_producttype',
|
||||
i18nKey: 'route.rwa_producttype'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'user',
|
||||
path: '/user',
|
||||
component: 'layout.base',
|
||||
meta: {
|
||||
title: 'user',
|
||||
i18nKey: 'route.user',
|
||||
order: 2
|
||||
},
|
||||
children: [
|
||||
{
|
||||
name: 'user_bank',
|
||||
path: '/user/bank',
|
||||
component: 'view.user_bank',
|
||||
meta: {
|
||||
title: 'user_bank',
|
||||
i18nKey: 'route.user_bank'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'user_bankcard',
|
||||
path: '/user/bankcard',
|
||||
component: 'view.user_bankcard',
|
||||
meta: {
|
||||
title: 'user_bankcard',
|
||||
i18nKey: 'route.user_bankcard'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'user_list',
|
||||
path: '/user/list',
|
||||
component: 'view.user_list',
|
||||
meta: {
|
||||
title: 'user_list',
|
||||
i18nKey: 'route.user_list'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'user_transfer',
|
||||
path: '/user/transfer',
|
||||
component: 'view.user_transfer',
|
||||
meta: {
|
||||
title: 'user_transfer',
|
||||
i18nKey: 'route.user_transfer'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'withdraw',
|
||||
path: '/withdraw',
|
||||
|
||||
@@ -171,6 +171,14 @@ const routeMap: RouteMap = {
|
||||
"home": "/home",
|
||||
"iframe-page": "/iframe-page/:url",
|
||||
"login": "/login/:module(pwd-login|code-login|register|reset-pwd|bind-wechat)?",
|
||||
"rwa": "/rwa",
|
||||
"rwa_product": "/rwa/product",
|
||||
"rwa_producttype": "/rwa/producttype",
|
||||
"user": "/user",
|
||||
"user_bank": "/user/bank",
|
||||
"user_bankcard": "/user/bankcard",
|
||||
"user_list": "/user/list",
|
||||
"user_transfer": "/user/transfer",
|
||||
"withdraw": "/withdraw",
|
||||
"withdraw_fiat": "/withdraw/fiat"
|
||||
};
|
||||
|
||||
16
src/typings/elegant-router.d.ts
vendored
16
src/typings/elegant-router.d.ts
vendored
@@ -25,6 +25,14 @@ declare module "@elegant-router/types" {
|
||||
"home": "/home";
|
||||
"iframe-page": "/iframe-page/:url";
|
||||
"login": "/login/:module(pwd-login|code-login|register|reset-pwd|bind-wechat)?";
|
||||
"rwa": "/rwa";
|
||||
"rwa_product": "/rwa/product";
|
||||
"rwa_producttype": "/rwa/producttype";
|
||||
"user": "/user";
|
||||
"user_bank": "/user/bank";
|
||||
"user_bankcard": "/user/bankcard";
|
||||
"user_list": "/user/list";
|
||||
"user_transfer": "/user/transfer";
|
||||
"withdraw": "/withdraw";
|
||||
"withdraw_fiat": "/withdraw/fiat";
|
||||
};
|
||||
@@ -65,6 +73,8 @@ declare module "@elegant-router/types" {
|
||||
| "home"
|
||||
| "iframe-page"
|
||||
| "login"
|
||||
| "rwa"
|
||||
| "user"
|
||||
| "withdraw"
|
||||
>;
|
||||
|
||||
@@ -89,6 +99,12 @@ declare module "@elegant-router/types" {
|
||||
| "login"
|
||||
| "deposit_fiat"
|
||||
| "home"
|
||||
| "rwa_product"
|
||||
| "rwa_producttype"
|
||||
| "user_bank"
|
||||
| "user_bankcard"
|
||||
| "user_list"
|
||||
| "user_transfer"
|
||||
| "withdraw_fiat"
|
||||
>;
|
||||
|
||||
|
||||
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