From 492a38fcb40157a7ee0a53f0002c1c1674754e4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E5=BF=97=E5=86=9B?= <543024265@qq.com> Date: Fri, 11 Jul 2025 16:04:51 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat(property-marketing):=20=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E7=A9=BA=E6=95=B0=E6=8D=AE=E5=B1=95=E7=A4=BA=E5=A4=84?= =?UTF-8?q?=E7=90=86=EF=BC=8C=E8=B0=83=E6=95=B4=E5=9B=BE=E8=A1=A8=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E5=92=8C=E6=8A=95=E8=B5=84=E6=8C=87=E5=8D=97=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E4=BA=A4=E4=BA=92=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/permission/permission.ts | 2 +- .../components/echarts-item/index.vue | 10 +++++++--- .../put-account/account-dashboard/index.vue | 4 ++++ .../put-account/account-data/index.vue | 3 ++- .../components/month-data/index.vue | 7 ++++++- .../components/placement-suggestions/index.vue | 7 ++++++- .../put-account/investment-guidelines/index.vue | 1 + 7 files changed, 27 insertions(+), 7 deletions(-) diff --git a/src/permission/permission.ts b/src/permission/permission.ts index 7c12722..8a40411 100644 --- a/src/permission/permission.ts +++ b/src/permission/permission.ts @@ -5,6 +5,6 @@ export function checkRoutePermission(routeName: string) { const allowAccessRoutes = userStore.allowAccessRoutes; if (!routeName) return false; - + return true return allowAccessRoutes.includes(routeName); } diff --git a/src/views/property-marketing/put-account/account-dashboard/components/echarts-item/index.vue b/src/views/property-marketing/put-account/account-dashboard/components/echarts-item/index.vue index b9c9eba..25f30c8 100644 --- a/src/views/property-marketing/put-account/account-dashboard/components/echarts-item/index.vue +++ b/src/views/property-marketing/put-account/account-dashboard/components/echarts-item/index.vue @@ -9,9 +9,9 @@ + - -
+
@@ -32,7 +32,11 @@ const chartEl = ref(null); const chartContainer = ref(null); let chartInstance = null; -const isChartEmpty = computed(() => isEmpty(props.chartData?.series_data)); +// 判断 series_data 是否为空或 undefined/null +const isChartEmpty = computed(() => { + const seriesData = props.chartData?.series_data; + return Array.isArray(seriesData) ? seriesData.length === 0 : !seriesData; +}); console.log(isChartEmpty, 'isChartEmpty'); // 初始化图表 diff --git a/src/views/property-marketing/put-account/account-dashboard/index.vue b/src/views/property-marketing/put-account/account-dashboard/index.vue index b395248..dee8513 100644 --- a/src/views/property-marketing/put-account/account-dashboard/index.vue +++ b/src/views/property-marketing/put-account/account-dashboard/index.vue @@ -109,6 +109,10 @@ const getAccountsTrends = async () => { onLoading.value = false; }; +const handleTabClick = (value) => { + accountType.value = value; + handleSearch(); +}; const mergeChartData = (apiResponse) => { console.log(apiResponse, 'apiResponse'); chartConfigs.value = chartConfigs.value.map((config) => { diff --git a/src/views/property-marketing/put-account/account-data/index.vue b/src/views/property-marketing/put-account/account-data/index.vue index 842a522..5d6c39a 100644 --- a/src/views/property-marketing/put-account/account-data/index.vue +++ b/src/views/property-marketing/put-account/account-data/index.vue @@ -137,7 +137,8 @@ const handleSelectionChange = (selectedRows) => { const handleTabClick = (key) => { activeTab.value = key; - init(); + getData(); + }; const handleExport = () => { diff --git a/src/views/property-marketing/put-account/investment-guidelines/components/month-data/index.vue b/src/views/property-marketing/put-account/investment-guidelines/components/month-data/index.vue index e4f1705..09a66a8 100644 --- a/src/views/property-marketing/put-account/investment-guidelines/components/month-data/index.vue +++ b/src/views/property-marketing/put-account/investment-guidelines/components/month-data/index.vue @@ -13,7 +13,8 @@ 复制 -
+ +
@@ -46,6 +47,10 @@ const classMap = { red: 'month-text-red', }; +const isEmptyData = computed(() => { + return isEmpty(props.overview); +}); + const formattedText = computed(() => { console.log(props.overview, 'props.overview'); const { text, parts } = props.overview; diff --git a/src/views/property-marketing/put-account/investment-guidelines/components/placement-suggestions/index.vue b/src/views/property-marketing/put-account/investment-guidelines/components/placement-suggestions/index.vue index 690f61e..9dabe08 100644 --- a/src/views/property-marketing/put-account/investment-guidelines/components/placement-suggestions/index.vue +++ b/src/views/property-marketing/put-account/investment-guidelines/components/placement-suggestions/index.vue @@ -9,8 +9,9 @@
+ -
+
@@ -100,6 +101,10 @@ const props = defineProps({ default: () => [], }, }); +const isEmptyData = computed(() => { + return isEmpty(props.optimization); +}); + diff --git a/src/views/property-marketing/put-account/investment-guidelines/index.vue b/src/views/property-marketing/put-account/investment-guidelines/index.vue index f130ed9..9b9eb51 100644 --- a/src/views/property-marketing/put-account/investment-guidelines/index.vue +++ b/src/views/property-marketing/put-account/investment-guidelines/index.vue @@ -46,6 +46,7 @@
+
From fc7d3210e04012761772afe0abc24581e96b18d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E5=BF=97=E5=86=9B?= <543024265@qq.com> Date: Fri, 11 Jul 2025 16:24:44 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=9D=83=E9=99=90?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C=E9=80=BB=E8=BE=91=EF=BC=8C=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E5=86=97=E4=BD=99=E8=BF=94=E5=9B=9E=E8=AF=AD=E5=8F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/permission/permission.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/permission/permission.ts b/src/permission/permission.ts index 8a40411..27ddd3d 100644 --- a/src/permission/permission.ts +++ b/src/permission/permission.ts @@ -5,6 +5,5 @@ export function checkRoutePermission(routeName: string) { const allowAccessRoutes = userStore.allowAccessRoutes; if (!routeName) return false; - return true return allowAccessRoutes.includes(routeName); }