feat: 添加认购记录组件并在产品页面中集成对话框
This commit is contained in:
17
src/views/product/components/records.vue
Normal file
17
src/views/product/components/records.vue
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<script lang="ts" setup>
|
||||||
|
import SubscriptionPage from '@/views/subscription/index.vue';
|
||||||
|
|
||||||
|
defineOptions({
|
||||||
|
name: 'SubscriptionDialog'
|
||||||
|
});
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
productId?: string;
|
||||||
|
}>();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<SubscriptionPage :product-id="productId" :scroll-x="1200" :show-header-operation="false" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style lang="css" scoped></style>
|
||||||
@@ -6,6 +6,7 @@ import { client, safeClient } from '@/service/api';
|
|||||||
import type { TableBaseColumns, TableFetchData, TableInst } from '@/components/table';
|
import type { TableBaseColumns, TableFetchData, TableInst } from '@/components/table';
|
||||||
import Add from './components/add.vue';
|
import Add from './components/add.vue';
|
||||||
import Edit from './components/edit.vue';
|
import Edit from './components/edit.vue';
|
||||||
|
import Records from './components/records.vue';
|
||||||
|
|
||||||
const message = useMessage();
|
const message = useMessage();
|
||||||
const dialog = useDialog();
|
const dialog = useDialog();
|
||||||
@@ -97,9 +98,9 @@ const columns: TableBaseColumns = [
|
|||||||
{
|
{
|
||||||
key: 'operations',
|
key: 'operations',
|
||||||
title: '操作',
|
title: '操作',
|
||||||
width: 200,
|
width: 240,
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
operations: row => [
|
operations: (row: any) => [
|
||||||
{
|
{
|
||||||
contentText: '编辑',
|
contentText: '编辑',
|
||||||
size: 'small',
|
size: 'small',
|
||||||
@@ -127,6 +128,18 @@ const columns: TableBaseColumns = [
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
contentText: '认购记录',
|
||||||
|
size: 'small',
|
||||||
|
onClick() {
|
||||||
|
dialog.create({
|
||||||
|
title: '认购记录',
|
||||||
|
showIcon: false,
|
||||||
|
style: { width: '1000px' },
|
||||||
|
content: () => h(Records, { productId: row.id })
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
17
src/views/user/components/subscription.vue
Normal file
17
src/views/user/components/subscription.vue
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<script lang="ts" setup>
|
||||||
|
import SubscriptionPage from '@/views/subscription/index.vue';
|
||||||
|
|
||||||
|
defineOptions({
|
||||||
|
name: 'SubscriptionDialog'
|
||||||
|
});
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
userId?: string;
|
||||||
|
}>();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<SubscriptionPage :user-id="userId" :scroll-x="1200" :show-header-operation="false" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style lang="css" scoped></style>
|
||||||
@@ -13,6 +13,7 @@ import Team from './components/team.vue';
|
|||||||
import Kyc from './components/kyc.vue';
|
import Kyc from './components/kyc.vue';
|
||||||
import Ledger from './components/ledger.vue';
|
import Ledger from './components/ledger.vue';
|
||||||
import Deposit from './components/deposit.vue';
|
import Deposit from './components/deposit.vue';
|
||||||
|
import Subscription from './components/subscription.vue';
|
||||||
|
|
||||||
const dialog = useDialog();
|
const dialog = useDialog();
|
||||||
const message = useMessage();
|
const message = useMessage();
|
||||||
@@ -108,6 +109,18 @@ const columns: TableBaseColumns = [
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
contentText: '认购记录',
|
||||||
|
size: 'small',
|
||||||
|
onClick: () => {
|
||||||
|
dialog.create({
|
||||||
|
title: '认购记录',
|
||||||
|
showIcon: false,
|
||||||
|
style: { width: '1000px' },
|
||||||
|
content: () => h(Subscription, { userId: row.id })
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
contentText: '提现订单',
|
contentText: '提现订单',
|
||||||
size: 'small',
|
size: 'small',
|
||||||
|
|||||||
Reference in New Issue
Block a user