From 8d2350f2318a0a787e77504b09daf87d9b3ceb87 Mon Sep 17 00:00:00 2001 From: Songsl <2431955898@qq.com> Date: Fri, 8 May 2026 16:28:54 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=AD=98=E6=AC=BE=E6=B8=A0=E9=81=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/common/Header.vue | 2 + src/views/capital/currency/options.ts | 6 +-- src/views/capital/fundFlow/options.ts | 1 + src/views/capital/rechangeChanl/index.vue | 13 +++--- src/views/capital/rechangeChanl/options.ts | 10 ++--- src/views/profile/business/index.vue | 16 ++++++-- src/views/profile/business/options.ts | 3 ++ src/views/trade/holidays/index.vue | 46 ++++++++++++++++++---- 8 files changed, 71 insertions(+), 26 deletions(-) diff --git a/src/components/common/Header.vue b/src/components/common/Header.vue index f4c12db..51dbba1 100644 --- a/src/components/common/Header.vue +++ b/src/components/common/Header.vue @@ -8,6 +8,7 @@ :key="btn.key || index" :type="btn.type || 'default'" :icon="btn.icon" + v-auth="btn.auth" @click="handleButtonClick(btn)" :disabled="btn.disabled" > @@ -28,6 +29,7 @@ interface HeaderButton { icon?: Component disabled?: boolean key?: string | number // 可选的唯一标识 + auth?: string // 权限 } // 定义组件属性接口 diff --git a/src/views/capital/currency/options.ts b/src/views/capital/currency/options.ts index 60f0a98..c0d47ea 100644 --- a/src/views/capital/currency/options.ts +++ b/src/views/capital/currency/options.ts @@ -2,9 +2,9 @@ * @description: 搜索配置 */ export const buttons = [ - { label: '添加', type: 'primary', key: 'add' }, - { label: '编辑', type: 'primary', key: 'edit' }, - { label: '删除', type: 'danger', key: 'delete' }, + { label: '添加', type: 'primary', key: 'add', auth: 'currency_createCurrency' }, + { label: '编辑', type: 'primary', key: 'edit', auth: 'currency_editCurrency' }, + { label: '删除', type: 'danger', key: 'delete', auth: 'currency_delCurrency' }, ] export const tableColumns = [ { prop: 'name', label: '币名' }, diff --git a/src/views/capital/fundFlow/options.ts b/src/views/capital/fundFlow/options.ts index 2e2281c..d75fc45 100644 --- a/src/views/capital/fundFlow/options.ts +++ b/src/views/capital/fundFlow/options.ts @@ -56,6 +56,7 @@ export const tableColumns = [ { prop: 'username', label: '用户名' }, //单号 { prop: 'orderNo', label: '单号' }, + { prop: 'account_id', label: '子账号' }, //操作类型 { prop: 'type', label: '操作类型' }, //资金流向 diff --git a/src/views/capital/rechangeChanl/index.vue b/src/views/capital/rechangeChanl/index.vue index 9d34e63..a47a2bd 100644 --- a/src/views/capital/rechangeChanl/index.vue +++ b/src/views/capital/rechangeChanl/index.vue @@ -43,6 +43,7 @@ import { editChannel, delChannel, } from '@/api/modules/capital/rechangeChanl.ts' +import { getCurrencyList } from '@/api/modules/capital/currency.ts' import { ElMessageBox } from 'element-plus' type ChannelType = { @@ -56,10 +57,6 @@ type ChannelType = { status: number } -const getTypeText = (type: number | string) => { - return ['', '法币', '数字货币'][type] -} - const getStatusText = (status: number | string) => { return ['', '正常', '禁用'][status] } @@ -69,7 +66,6 @@ const initData = async () => { console.log(res) tableData.value = res.map((item: ChannelType) => ({ ...item, - typeStr: getTypeText(item.type), statusStr: getStatusText(item.status), })) as ChannelType[] clearSelection() @@ -171,6 +167,13 @@ const clearSelection = () => { onMounted(() => { initData() + getCurrencyList().then((data) => { + console.log(data) + optionsMap.value.type = (data || []).map((item: any) => ({ + value: item.id, + label: item.symbol, + })) + }) })