|
@@ -4,6 +4,7 @@
|
|
* @Description: Targeting-SearchTerm 跳转页面
|
|
* @Description: Targeting-SearchTerm 跳转页面
|
|
* @Author: Cheney
|
|
* @Author: Cheney
|
|
*/
|
|
*/
|
|
|
|
+
|
|
import { useRoute } from 'vue-router';
|
|
import { useRoute } from 'vue-router';
|
|
import { targetingColumns, searchTermColumns } from './useColumns';
|
|
import { targetingColumns, searchTermColumns } from './useColumns';
|
|
import { reactive, ref, onBeforeMount } from 'vue';
|
|
import { reactive, ref, onBeforeMount } from 'vue';
|
|
@@ -17,7 +18,9 @@ const { dateRange } = storeToRefs(publicData);
|
|
const route = useRoute();
|
|
const route = useRoute();
|
|
const { searchRoot } = route.query;
|
|
const { searchRoot } = route.query;
|
|
const date = ref([dateRange.value[0], dateRange.value[1]]);
|
|
const date = ref([dateRange.value[0], dateRange.value[1]]);
|
|
-const searchType = ref('AUTO');
|
|
|
|
|
|
+const searchType = ref('BROAD');
|
|
|
|
+const targetingSearchRoot = ref('');
|
|
|
|
+const searchTermSearchRoot = ref('');
|
|
|
|
|
|
const TargetingLoading = ref(false);
|
|
const TargetingLoading = ref(false);
|
|
const searchTermLoading = ref(false);
|
|
const searchTermLoading = ref(false);
|
|
@@ -102,7 +105,7 @@ async function fetchTargetingData() {
|
|
date_end: date.value[1],
|
|
date_end: date.value[1],
|
|
page: targetingPage.currentPage,
|
|
page: targetingPage.currentPage,
|
|
limit: targetingPage.pageSize,
|
|
limit: targetingPage.pageSize,
|
|
- search_root: searchRoot,
|
|
|
|
|
|
+ search_root: targetingSearchRoot.value ? targetingSearchRoot.value : searchRoot,
|
|
search_type: searchType.value, // BROAD, PHRASE, EXACT, AUTO
|
|
search_type: searchType.value, // BROAD, PHRASE, EXACT, AUTO
|
|
term_type: 'TARGETING', // TARGETING, SEARCHTERM
|
|
term_type: 'TARGETING', // TARGETING, SEARCHTERM
|
|
};
|
|
};
|
|
@@ -125,7 +128,7 @@ async function fetchSearchTermData() {
|
|
date_end: date.value[1],
|
|
date_end: date.value[1],
|
|
page: targetingPage.currentPage,
|
|
page: targetingPage.currentPage,
|
|
limit: targetingPage.pageSize,
|
|
limit: targetingPage.pageSize,
|
|
- search_root: searchRoot,
|
|
|
|
|
|
+ search_root: searchTermSearchRoot.value ? searchTermSearchRoot.value : searchRoot,
|
|
search_type: searchType.value,
|
|
search_type: searchType.value,
|
|
term_type: 'SEARCHTERM',
|
|
term_type: 'SEARCHTERM',
|
|
};
|
|
};
|
|
@@ -142,6 +145,16 @@ async function fetchSearchTermData() {
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<template>
|
|
<template>
|
|
|
|
+ <div class="mx-3">
|
|
|
|
+ <el-divider>
|
|
|
|
+ <div class="font-bold text-xl">
|
|
|
|
+ <!--<el-icon style="top: 3px">-->
|
|
|
|
+ <!-- <DataAnalysis />-->
|
|
|
|
+ <!--</el-icon>-->
|
|
|
|
+ {{ searchRoot }}
|
|
|
|
+ </div>
|
|
|
|
+ </el-divider>
|
|
|
|
+ </div>
|
|
<div class="py-2 px-2.5">
|
|
<div class="py-2 px-2.5">
|
|
<el-card shadow="hover" style="border: none" body-class="flex justify-between">
|
|
<el-card shadow="hover" style="border: none" body-class="flex justify-between">
|
|
<div class="flex flex-wrap gap-7">
|
|
<div class="flex flex-wrap gap-7">
|
|
@@ -173,6 +186,7 @@ async function fetchSearchTermData() {
|
|
<vxe-grid v-bind="targetingOptions">
|
|
<vxe-grid v-bind="targetingOptions">
|
|
<template #toolbar_buttons>
|
|
<template #toolbar_buttons>
|
|
<span class="font-medium text-xl" style="color: #000000"> Targeting-关联关键词 </span>
|
|
<span class="font-medium text-xl" style="color: #000000"> Targeting-关联关键词 </span>
|
|
|
|
+ <el-input v-model="targetingSearchRoot" placeholder="请输入关键词回车搜索" @change="fetchTargetingData" class="ml-5" style="width: 200px;"></el-input>
|
|
</template>
|
|
</template>
|
|
<template v-for="col in targetingColumns" #[`${col.field}_default`]="{ row }">
|
|
<template v-for="col in targetingColumns" #[`${col.field}_default`]="{ row }">
|
|
<div v-if="col.field === 'targeting'">
|
|
<div v-if="col.field === 'targeting'">
|
|
@@ -183,14 +197,10 @@ async function fetchSearchTermData() {
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
</div>
|
|
</div>
|
|
<div v-else-if="col.field === 'ctr_1d'">
|
|
<div v-else-if="col.field === 'ctr_1d'">
|
|
- <span class="font-medium">
|
|
|
|
- {{ row.ctr_1d }}%
|
|
|
|
- </span>
|
|
|
|
|
|
+ <span class="font-medium"> {{ row.ctr_1d }}% </span>
|
|
</div>
|
|
</div>
|
|
<div v-else-if="col.field === 'cr_1d'">
|
|
<div v-else-if="col.field === 'cr_1d'">
|
|
- <span class="font-medium">
|
|
|
|
- {{ row.cr_1d }}%
|
|
|
|
- </span>
|
|
|
|
|
|
+ <span class="font-medium"> {{ row.cr_1d }}% </span>
|
|
</div>
|
|
</div>
|
|
<div v-else class="font-medium">
|
|
<div v-else class="font-medium">
|
|
{{ row[col.field] ? row[col.field] : '--' }}
|
|
{{ row[col.field] ? row[col.field] : '--' }}
|
|
@@ -213,6 +223,7 @@ async function fetchSearchTermData() {
|
|
<vxe-grid v-bind="searchTermOptions">
|
|
<vxe-grid v-bind="searchTermOptions">
|
|
<template #toolbar_buttons>
|
|
<template #toolbar_buttons>
|
|
<span class="font-medium text-xl" style="color: #000000"> SearchTerm-相关搜索结果 </span>
|
|
<span class="font-medium text-xl" style="color: #000000"> SearchTerm-相关搜索结果 </span>
|
|
|
|
+ <el-input v-model="searchTermSearchRoot" placeholder="请输入搜索词回车搜索" @change="fetchTargetingData" class="ml-5" style="width: 200px;"></el-input>
|
|
</template>
|
|
</template>
|
|
<template v-for="col in searchTermColumns" #[`${col.field}_default`]="{ row }">
|
|
<template v-for="col in searchTermColumns" #[`${col.field}_default`]="{ row }">
|
|
<div v-if="col.field === 'searchTerm'">
|
|
<div v-if="col.field === 'searchTerm'">
|
|
@@ -223,14 +234,10 @@ async function fetchSearchTermData() {
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
</div>
|
|
</div>
|
|
<div v-else-if="col.field === 'ctr_1d'">
|
|
<div v-else-if="col.field === 'ctr_1d'">
|
|
- <span class="font-medium">
|
|
|
|
- {{ row.ctr_1d }}%
|
|
|
|
- </span>
|
|
|
|
|
|
+ <span class="font-medium"> {{ row.ctr_1d }}% </span>
|
|
</div>
|
|
</div>
|
|
<div v-else-if="col.field === 'cr_1d'">
|
|
<div v-else-if="col.field === 'cr_1d'">
|
|
- <span class="font-medium">
|
|
|
|
- {{ row.cr_1d }}%
|
|
|
|
- </span>
|
|
|
|
|
|
+ <span class="font-medium"> {{ row.cr_1d }}% </span>
|
|
</div>
|
|
</div>
|
|
<div v-else class="font-medium">
|
|
<div v-else class="font-medium">
|
|
{{ row[col.field] ? row[col.field] : '--' }}
|
|
{{ row[col.field] ? row[col.field] : '--' }}
|
|
@@ -251,4 +258,9 @@ async function fetchSearchTermData() {
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
-<style scoped></style>
|
|
|
|
|
|
+<style scoped>
|
|
|
|
+/* 修改 el-divider 的背景颜色 */
|
|
|
|
+:deep(.el-divider__text.is-center.el-divider__text) {
|
|
|
|
+ background-color: #f8f8f8;
|
|
|
|
+}
|
|
|
|
+</style>
|