diff --git a/src/permission/permission.ts b/src/permission/permission.ts index 7c12722..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 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 @@
+