Merge pull request 'feature/v1.3_营销资产中台' (#23) from feature/v1.3_营销资产中台 into main
Reviewed-on: ai-team/lingji-work-fe#23
This commit is contained in:
@ -19,7 +19,7 @@
|
|||||||
class="ignore-export"
|
class="ignore-export"
|
||||||
@onReset="handleReset"
|
@onReset="handleReset"
|
||||||
v-model:query="query"
|
v-model:query="query"
|
||||||
@onSearch="onSearch"
|
@onSearch="handleSearch"
|
||||||
:disabled="loading"
|
:disabled="loading"
|
||||||
></listSearchForm>
|
></listSearchForm>
|
||||||
|
|
||||||
@ -29,6 +29,7 @@
|
|||||||
@onSearch="onSearch"
|
@onSearch="onSearch"
|
||||||
@updateQuery="handleUpdateQuery"
|
@updateQuery="handleUpdateQuery"
|
||||||
/>
|
/>
|
||||||
|
<a-spin v-if="loading" tip="AI分析中" />
|
||||||
|
|
||||||
<div v-if="listData.total > 0" class="pagination-box flex justify-end ignore-export">
|
<div v-if="listData.total > 0" class="pagination-box flex justify-end ignore-export">
|
||||||
<a-pagination
|
<a-pagination
|
||||||
@ -44,10 +45,13 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 投放建议-->
|
<!-- 投放建议-->
|
||||||
<MonthData v-if="tabData == 'placement_guide'" :overview="aiResult.overview"></MonthData>
|
<MonthData v-if="tabData == 'placement_guide'" :overview="aiResult.overview"></MonthData>
|
||||||
|
<PlacementSuggestions
|
||||||
<PlacementSuggestions v-if="tabData == 'placement_guide'" :optimization="aiResult.optimization"></PlacementSuggestions>
|
v-if="tabData == 'placement_guide'"
|
||||||
|
:optimization="aiResult.optimization"
|
||||||
|
></PlacementSuggestions>
|
||||||
|
|
||||||
<div v-if="tabData == 'placement_guide'" class="ignore-export">
|
<div v-if="tabData == 'placement_guide'" class="ignore-export">
|
||||||
<a-space class="down-btn">
|
<a-space class="down-btn">
|
||||||
@ -132,12 +136,9 @@ const onSearch = async () => {
|
|||||||
let result;
|
let result;
|
||||||
if (tabData.value === 'placement_guide') {
|
if (tabData.value === 'placement_guide') {
|
||||||
result = await getPlacementGuide(query);
|
result = await getPlacementGuide(query);
|
||||||
|
console.log(1);
|
||||||
|
|
||||||
placementGuideList.value = result?.data?.data || [];
|
placementGuideList.value = result?.data?.data || [];
|
||||||
if (placementGuideList.value.length > 0 && isGetAi.value) {
|
|
||||||
loading.value = true;
|
|
||||||
syncGetAiResult();
|
|
||||||
startTask();
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
result = await getPlacementGuideHistory(query);
|
result = await getPlacementGuideHistory(query);
|
||||||
guideHistoryList.value = result?.data?.data || [];
|
guideHistoryList.value = result?.data?.data || [];
|
||||||
@ -145,6 +146,16 @@ const onSearch = async () => {
|
|||||||
listData.total = result.data.total;
|
listData.total = result.data.total;
|
||||||
isGetAi.value = true;
|
isGetAi.value = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleSearch = async () => {
|
||||||
|
await onSearch();
|
||||||
|
if (placementGuideList.value.length > 0 && isGetAi.value) {
|
||||||
|
loading.value = true;
|
||||||
|
syncGetAiResult();
|
||||||
|
startTask();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const aiResult = reactive({
|
const aiResult = reactive({
|
||||||
optimization: [], // 投放建议优化
|
optimization: [], // 投放建议优化
|
||||||
action_guide: [], // 新投放建议生成
|
action_guide: [], // 新投放建议生成
|
||||||
|
|||||||
Reference in New Issue
Block a user