From 8324295ee6423a2c72f1b8c1e8fbb2dffc5a8087 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 24 Sep 2025 09:52:31 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E3=80=90antd=E3=80=91=E3=80=90crm?= =?UTF-8?q?=E3=80=91=E9=87=8D=E6=9E=84=20clue=20detail=20=E8=B7=AF?= =?UTF-8?q?=E7=94=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web-antd/src/router/routes/modules/crm.ts | 2 +- .../detail-data.ts => detail/data.ts} | 3 +-- .../{modules/detail.vue => detail/index.vue} | 20 ++++++++----------- .../modules/info.vue} | 4 ++-- 4 files changed, 12 insertions(+), 17 deletions(-) rename apps/web-antd/src/views/crm/clue/{modules/detail-data.ts => detail/data.ts} (96%) rename apps/web-antd/src/views/crm/clue/{modules/detail.vue => detail/index.vue} (89%) rename apps/web-antd/src/views/crm/clue/{modules/detail-info.vue => detail/modules/info.vue} (90%) diff --git a/apps/web-antd/src/router/routes/modules/crm.ts b/apps/web-antd/src/router/routes/modules/crm.ts index 0f53404a..19cdcd65 100644 --- a/apps/web-antd/src/router/routes/modules/crm.ts +++ b/apps/web-antd/src/router/routes/modules/crm.ts @@ -18,7 +18,7 @@ const routes: RouteRecordRaw[] = [ title: '线索详情', activePath: '/crm/clue', }, - component: () => import('#/views/crm/clue/modules/detail.vue'), + component: () => import('#/views/crm/clue/detail/index.vue'), }, { path: 'customer/detail/:id', diff --git a/apps/web-antd/src/views/crm/clue/modules/detail-data.ts b/apps/web-antd/src/views/crm/clue/detail/data.ts similarity index 96% rename from apps/web-antd/src/views/crm/clue/modules/detail-data.ts rename to apps/web-antd/src/views/crm/clue/detail/data.ts index efd2e90f..73e905a2 100644 --- a/apps/web-antd/src/views/crm/clue/modules/detail-data.ts +++ b/apps/web-antd/src/views/crm/clue/detail/data.ts @@ -67,8 +67,7 @@ export function useDetailBaseSchema(): DescriptionItemSchema[] { field: 'areaName', label: '地址', content: (data) => { - const areaName = - typeof data?.areaName === 'string' ? data.areaName : ''; + const areaName = data.areaName ?? ''; const detailAddress = data?.detailAddress ?? ''; return [areaName, detailAddress].filter((item) => !!item).join(' '); }, diff --git a/apps/web-antd/src/views/crm/clue/modules/detail.vue b/apps/web-antd/src/views/crm/clue/detail/index.vue similarity index 89% rename from apps/web-antd/src/views/crm/clue/modules/detail.vue rename to apps/web-antd/src/views/crm/clue/detail/index.vue index f81d9cd7..4a0aadd4 100644 --- a/apps/web-antd/src/views/crm/clue/modules/detail.vue +++ b/apps/web-antd/src/views/crm/clue/detail/index.vue @@ -7,8 +7,7 @@ import { useRoute, useRouter } from 'vue-router'; import { confirm, Page, useVbenModal } from '@vben/common-ui'; import { useTabs } from '@vben/hooks'; -// TODO @芋艿:这里要不要改成 icon 组件? -import { ArrowLeft } from '@vben/icons'; +import { IconifyIcon } from '@vben/icons'; import { Button, Card, message, Tabs } from 'ant-design-vue'; @@ -21,12 +20,10 @@ import { AsyncOperateLog } from '#/components/operate-log'; import { FollowUp } from '#/views/crm/followup'; import { PermissionList, TransferForm } from '#/views/crm/permission'; -// TODO @芋艿:待讨论,要不要独立一个 detail/index.vue -import { useDetailSchema } from './detail-data'; -import ClueForm from './form.vue'; +import ClueForm from '../modules/form.vue'; +import { useDetailSchema } from './data'; -// TODO @芋艿:待讨论 -const ClueDetailsInfo = defineAsyncComponent(() => import('./detail-info.vue')); +const ClueInfo = defineAsyncComponent(() => import('./modules/info.vue')); const loading = ref(false); @@ -70,11 +67,11 @@ async function getClueDetail() { try { clue.value = await getClue(clueId.value); // 操作日志 - const logList = await getOperateLogPage({ + const res = await getOperateLogPage({ bizType: BizTypeEnum.CRM_CLUE, bizId: clueId.value, }); - logList.value = logList.list; + logList.value = res.list; } finally { loading.value = false; } @@ -105,7 +102,6 @@ async function handleTransform(): Promise { .then(async () => { const res = await transformClue(clueId.value); if (res) { - // 提示并返回成功 message.success('转化客户成功'); resolve(true); } else { @@ -132,7 +128,7 @@ onMounted(() => {