fix: 优化多处细节

- 导出功能修复 Token 刷新机制,使用 requestClient 发送请求
- 店铺/商品单元格添加跳转图标 tdesign:jump
- 店铺概览 ROI 计算精度统一为两位小数

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
小蟑螂
2026-05-08 16:49:02 +08:00
co-authored by Claude Opus 4.7
parent 840914d695
commit 3d1f9f2a2a
9 changed files with 182 additions and 54 deletions
@@ -1,6 +1,7 @@
<script lang="ts" setup>
import type { CompanyOverviewVO } from '#/api/ecommerce/store-overview';
import { createIconifyIcon } from '@vben/icons';
import { computed } from 'vue';
import { formatFeeRatioPercent } from '#/utils/overview-fee-ratio';
@@ -12,6 +13,8 @@ import {
storeOverviewHints,
} from '#/utils/overview-table-hints';
const JumpIcon = createIconifyIcon('tdesign:jump');
defineOptions({ name: 'ShopComparisonTable' });
interface Props {
@@ -275,10 +278,11 @@ const cellRoi = (v: number | null | undefined) =>
:class="shopExportMode ? 'border-l-0' : ''"
>
<span
class="inline-block cursor-pointer rounded-full bg-blue-50 dark:bg-blue-900/30 px-3 py-1 text-sm font-bold text-blue-600 dark:text-blue-400 transition-colors hover:text-blue-300 hover:underline"
class="inline-flex cursor-pointer items-center gap-1 rounded-full bg-blue-50 dark:bg-blue-900/30 px-3 py-1 text-sm font-bold text-blue-600 dark:text-blue-400 transition-colors hover:text-blue-300 hover:underline"
@click="emit('navigate', shop.shopId)"
>
{{ shop.shopName }}
<JumpIcon class="text-xs" />
</span>
</td>
<!-- 目标 -->
@@ -1,5 +1,6 @@
<script lang="ts" setup>
import type { ShopVO } from '#/api/ecommerce/shop/types';
import { createIconifyIcon } from '@vben/icons';
import { useRouter } from 'vue-router';
import { Button } from 'ant-design-vue';
@@ -18,6 +19,8 @@ import {
import OverviewColumnHint from '#/components/overview/OverviewColumnHint.vue';
const JumpIcon = createIconifyIcon('tdesign:jump');
interface Props {
data: ShopVO.OverviewStatistics | null;
taxRate: number;
@@ -187,7 +190,10 @@ function goToProductOverview(productId: number) {
style="left: 0; position: sticky; z-index: 10;"
@click="goToProductOverview(product.productId)"
>
<span class="inline-block rounded-full bg-blue-50 dark:bg-blue-900/30 px-3 py-1 text-sm font-bold text-blue-600 dark:text-blue-400">{{ product.productName }}</span>
<span class="inline-flex items-center gap-1 rounded-full bg-blue-50 dark:bg-blue-900/30 px-3 py-1 text-sm font-bold text-blue-600 dark:text-blue-400">
{{ product.productName }}
<JumpIcon class="text-xs" />
</span>
<div
v-if="product.productCode"
class="mt-0.5 font-mono text-xs text-slate-400 dark:text-[hsl(240deg_5%_64.9%)]"