|
@@ -9,7 +9,7 @@ import { onMounted, ref, watch } from 'vue';
|
|
|
import { usePagination } from '/@/utils/usePagination';
|
|
|
import { getTopSearchTermTable } from './api';
|
|
|
import { marketplaceIdEnum } from '/@/utils/marketplaceIdEnum';
|
|
|
-import { RefreshRight, Search } from '@element-plus/icons-vue';
|
|
|
+import { RefreshRight, Search, Memo, Key, Rank, Goods, Reading, Medal, Pointer, Switch } from '@element-plus/icons-vue';
|
|
|
import { useRouter } from 'vue-router';
|
|
|
import { ElMessage } from 'element-plus';
|
|
|
import dayjs from 'dayjs';
|
|
@@ -63,6 +63,10 @@ async function fetchTableData() {
|
|
|
tableLoading.value = false;
|
|
|
}
|
|
|
|
|
|
+async function handleSelectChange() {
|
|
|
+ await fetchTableData();
|
|
|
+}
|
|
|
+
|
|
|
async function handleQueryChange() {
|
|
|
if (!validateSearchTermInput(searchTermInp.value)) {
|
|
|
ElMessage.warning({ message: '关键词只能输入数字和英文字母', plain: true });
|
|
@@ -80,11 +84,6 @@ async function handleQueryChange() {
|
|
|
await fetchTableData();
|
|
|
}
|
|
|
|
|
|
-function handleJump() {
|
|
|
- // console.log('All defined routes:', router.getRoutes());
|
|
|
- router.push({ path: '/keyword/rootWordManage' });
|
|
|
-}
|
|
|
-
|
|
|
/**
|
|
|
* 校验SearchTerm输入是否合法
|
|
|
* @param input 输入的字符串
|
|
@@ -102,6 +101,11 @@ function validateAsinInput(input: string) {
|
|
|
const regex = /^[Bb]0[A-Za-z0-9\s]+$/i;
|
|
|
return regex.test(input);
|
|
|
}
|
|
|
+
|
|
|
+function handleJump() {
|
|
|
+ // console.log('All defined routes:', router.getRoutes());
|
|
|
+ router.push({ path: '/keyword/rootWordManage' });
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
@@ -133,7 +137,7 @@ function validateAsinInput(input: string) {
|
|
|
<div class="flex gap-6 flex-wrap">
|
|
|
<div>
|
|
|
<span class="font-medium mr-0.5">市场 </span>
|
|
|
- <el-select v-model="marketplaceSelect" @change="handleQueryChange" style="width: 130px">
|
|
|
+ <el-select v-model="marketplaceSelect" @change="handleSelectChange" style="width: 130px">
|
|
|
<el-option
|
|
|
v-for="item in marketplaceOptions"
|
|
|
:disabled="item.disabled"
|
|
@@ -144,7 +148,7 @@ function validateAsinInput(input: string) {
|
|
|
</div>
|
|
|
<div>
|
|
|
<span class="font-medium mr-0.5">报告类型 </span>
|
|
|
- <el-select v-model="reportTypeSelect" @change="handleQueryChange" style="width: 100px">
|
|
|
+ <el-select v-model="reportTypeSelect" @change="handleSelectChange" style="width: 100px">
|
|
|
<el-option label="周度" value="weekly" />
|
|
|
<el-option label="月度" value="monthly" />
|
|
|
</el-select>
|