From bb0e1c7e94edc4070c55b90bab6bea6fd296f59e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E5=BF=97=E5=86=9B?= <543024265@qq.com> Date: Thu, 17 Jul 2025 10:00:00 +0800 Subject: [PATCH 1/2] =?UTF-8?q?refactor(property-marketing):=20=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E6=8A=95=E8=B5=84=E6=8C=87=E5=8D=97=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修改搜索事件处理逻辑,提取公共代码到 handleSearch 方法 - 在搜索后添加 AI 结果获取逻辑 - 优化页面加载和搜索后的数据处理流程 --- .../investment-guidelines/index.vue | 27 +++++++++++++------ 1 file changed, 19 insertions(+), 8 deletions(-) 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 9b9eb51..1bb9d3b 100644 --- a/src/views/property-marketing/put-account/investment-guidelines/index.vue +++ b/src/views/property-marketing/put-account/investment-guidelines/index.vue @@ -19,7 +19,7 @@ class="ignore-export" @onReset="handleReset" v-model:query="query" - @onSearch="onSearch" + @onSearch="handleSearch" :disabled="loading" > @@ -29,6 +29,7 @@ @onSearch="onSearch" @updateQuery="handleUpdateQuery" /> +
+ - - +
@@ -132,12 +136,9 @@ const onSearch = async () => { let result; if (tabData.value === 'placement_guide') { result = await getPlacementGuide(query); + console.log(1); + placementGuideList.value = result?.data?.data || []; - if (placementGuideList.value.length > 0 && isGetAi.value) { - loading.value = true; - syncGetAiResult(); - startTask(); - } } else { result = await getPlacementGuideHistory(query); guideHistoryList.value = result?.data?.data || []; @@ -145,6 +146,16 @@ const onSearch = async () => { listData.total = result.data.total; isGetAi.value = true; }; + +const handleSearch = async () => { + await onSearch(); + if (placementGuideList.value.length > 0 && isGetAi.value) { + loading.value = true; + syncGetAiResult(); + startTask(); + } +}; + const aiResult = reactive({ optimization: [], // 投放建议优化 action_guide: [], // 新投放建议生成 From 2d55501b230c94f294685e404c476782c89b10a5 Mon Sep 17 00:00:00 2001 From: rd <1344903914@qq.com> Date: Thu, 14 Aug 2025 15:24:18 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20=E6=89=B9=E9=87=8F=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E6=96=87=E4=BB=B6=EF=BC=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../list/components/upload-manuscript-modal/index.vue | 5 +++-- .../manuscript-writer/upload/index.vue | 2 +- .../list/components/upload-manuscript-modal/index.vue | 5 +++-- .../creative-generation-workshop/manuscript/upload/index.vue | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/views/creative-generation-workshop/manuscript-writer/list/components/upload-manuscript-modal/index.vue b/src/views/creative-generation-workshop/manuscript-writer/list/components/upload-manuscript-modal/index.vue index 1a14f55..af091b3 100644 --- a/src/views/creative-generation-workshop/manuscript-writer/list/components/upload-manuscript-modal/index.vue +++ b/src/views/creative-generation-workshop/manuscript-writer/list/components/upload-manuscript-modal/index.vue @@ -136,7 +136,7 @@ export default { }); if (code === 200) { taskStatus.value = TASK_STATUS.SUCCESS; - works.value = data ? [data] : []; + data && works.value.push(data); } }; @@ -189,8 +189,9 @@ export default { {{ diff --git a/src/views/creative-generation-workshop/manuscript-writer/upload/index.vue b/src/views/creative-generation-workshop/manuscript-writer/upload/index.vue index ec9e755..0eb6ae1 100644 --- a/src/views/creative-generation-workshop/manuscript-writer/upload/index.vue +++ b/src/views/creative-generation-workshop/manuscript-writer/upload/index.vue @@ -277,7 +277,7 @@ export default { onClick={(e) => onDelete(e, item, index)} /> diff --git a/src/views/creative-generation-workshop/manuscript/list/components/upload-manuscript-modal/index.vue b/src/views/creative-generation-workshop/manuscript/list/components/upload-manuscript-modal/index.vue index 23f9ba7..bd86962 100644 --- a/src/views/creative-generation-workshop/manuscript/list/components/upload-manuscript-modal/index.vue +++ b/src/views/creative-generation-workshop/manuscript/list/components/upload-manuscript-modal/index.vue @@ -158,7 +158,7 @@ export default { }); if (code === 200) { taskStatus.value = TASK_STATUS.SUCCESS; - works.value = data ? [data] : []; + data && works.value.push(data); } }; @@ -220,8 +220,9 @@ export default { {{ diff --git a/src/views/creative-generation-workshop/manuscript/upload/index.vue b/src/views/creative-generation-workshop/manuscript/upload/index.vue index cdab32b..762b0e6 100644 --- a/src/views/creative-generation-workshop/manuscript/upload/index.vue +++ b/src/views/creative-generation-workshop/manuscript/upload/index.vue @@ -278,7 +278,7 @@ export default { onClick={(e) => onDelete(e, item, index)} />