From d7704bd63199d52ff53ccc550b7cf2865c50266e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9E=97=E5=BF=97=E5=86=9B?= <543024265@qq.com>
Date: Tue, 8 Jul 2025 20:05:26 +0800
Subject: [PATCH] =?UTF-8?q?feat(property-marketing):=20=E9=87=8D=E6=9E=84?=
=?UTF-8?q?=E6=9C=88=E5=BA=A6=E6=95=B0=E6=8D=AE=E5=B1=95=E7=A4=BA=E7=BB=84?=
=?UTF-8?q?=E4=BB=B6=E5=B9=B6=E4=BC=98=E5=8C=96AI=E5=88=86=E6=9E=90?=
=?UTF-8?q?=E4=BA=A4=E4=BA=92=E6=B5=81=E7=A8=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/month-data/index.vue | 63 ++++++++++++-------
.../components/table-data/listSearchForm.vue | 17 ++---
.../table-data/placementGuideList.vue | 18 ++----
.../investment-guidelines/index.vue | 60 +++++++++++++-----
4 files changed, 100 insertions(+), 58 deletions(-)
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 87135fb..b99e439 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
@@ -11,20 +11,11 @@
-
- {{ item.text }}
-
+
+
+ {{ line.text }}
+
-
-
-
-
-
-
-
-
-
-
@@ -34,20 +25,48 @@
import { IconQuestionCircle } from '@arco-design/web-vue/es/icon';
import { defineProps } from 'vue';
-const colorMap = {
- purple: 'purple',
- orange: 'orange',
-};
const props = defineProps({
overview: {
- type: Array,
- default: () => [],
+ type: Object,
+ default: () => ({
+ text: '',
+ parts: [],
+ }),
},
});
-
-const getColor = (highlight?: string) => {
- return highlight ? colorMap[highlight] : undefined;
+const classMap = {
+ purple: 'month-text-blue',
+ black: 'month-text-black',
+ orange: 'orange',
+ red: 'month-text-red',
};
+
+const formattedText = computed(() => {
+ console.log(props.overview, 'props.overview');
+ const { text, parts } = props.overview;
+ if (!text || !parts) return [];
+
+ // 替换占位符
+ let resultText = text;
+ parts.forEach((part) => {
+ const key = Object.keys(part)[0];
+ resultText = resultText.replace(`{${key}}`, part[key]);
+ });
+
+ // 按分号拆分并保留颜色信息
+ return resultText.split(';').map((line) => {
+ const matchedPart = parts.find((part) => line.includes(part[Object.keys(part)[0]]));
+ return {
+ text: line.trim(),
+ highlight: matchedPart?.highlight || 'black',
+ };
+ });
+});
+
+const getCss = (highlight?: string) => {
+ return highlight ? classMap[highlight] : undefined;
+};
+
console.log(props.overview, 'overvie333');