فهرست منبع

添加市场ID选择器并优化下载管理按钮

- 引入市场ID映射,使用下拉选择器替代输入框,提升用户体验- 注释掉下载管理按钮的点击事件,暂时禁用该功能
- 新增marketplaceIdMap.ts文件,存储市场ID与国家对应关系
WanGxC 7 ماه پیش
والد
کامیت
87b303e31e
2فایلهای تغییر یافته به همراه102 افزوده شده و 5 حذف شده
  1. 9 5
      src/views/featureWord/queryPage/index.vue
  2. 93 0
      src/views/featureWord/queryPage/marketplaceIdMap.ts

+ 9 - 5
src/views/featureWord/queryPage/index.vue

@@ -12,6 +12,7 @@ import dayjs from 'dayjs';
 import _ from 'lodash';
 import enLocale from 'element-plus/es/locale/lang/en';
 import FeatureWordTable from './FeatureWordTable.vue';
+import { marketplaceIdMap } from '/@/views/featureWord/queryPage/marketplaceIdMap';
 
 
 const date = ref(calculateLastMonthFirstWeek());
@@ -67,9 +68,9 @@ function handleQuery() {
   throttledEmit();
 }
 
-function handleDownload() {
-
-}
+// function handleDownload() {
+//
+// }
 
 
 </script>
@@ -84,7 +85,10 @@ function handleDownload() {
         </div>
         <div>
           <span class="font-bold mr-2" style="color: #303133">市场ID:</span>
-          <el-input v-model="filter.marketIds" style="width: 180px"></el-input>
+          <el-select v-model="filter.marketIds" style="width: 180px">
+            <el-option v-for="item in marketplaceIdMap" :label="item.Country" :value="item.MarketplaceId" 
+                       :key="item.MarketplaceId"></el-option>
+          </el-select>
         </div>
         <div>
           <span class="font-bold mr-2" style="color: #303133">报告类型:</span>
@@ -120,7 +124,7 @@ function handleDownload() {
       </div>
       <div class="flex gap-3.5">
         <el-button :icon="Search" plain type="primary" @click="handleQuery">查询</el-button>
-        <el-button :icon="TopRight" plain type="primary" @click="handleDownload">下载管理</el-button>
+        <!--<el-button :icon="TopRight" plain type="primary" @click="handleDownload">下载管理</el-button>-->
       </div>
     </el-card>
     <WeightTable/>

+ 93 - 0
src/views/featureWord/queryPage/marketplaceIdMap.ts

@@ -0,0 +1,93 @@
+export const marketplaceIdMap = [
+  {
+    'Country': 'United States of America',
+    'MarketplaceId': 'ATVPDKIKX0DER',
+    'CountryCode': 'US'
+  },
+  {
+    'Country': 'Canada',
+    'MarketplaceId': 'A2EUQ1WTGCTBG2',
+    'CountryCode': 'CA'
+  },
+  {
+    'Country': 'Mexico',
+    'MarketplaceId': 'A1AM78C64UM0Y8',
+    'CountryCode': 'MX'
+  },
+  {
+    'Country': 'Brazil',
+    'MarketplaceId': 'A2Q3Y263D00KWC',
+    'CountryCode': 'BR'
+  },
+  {
+    'Country': 'Spain',
+    'MarketplaceId': 'A1RKKUPIHCS9HS',
+    'CountryCode': 'ES'
+  },
+  {
+    'Country': 'United Kingdom',
+    'MarketplaceId': 'A1F83G8C2ARO7P',
+    'CountryCode': 'GB'
+  },
+  {
+    'Country': 'Belgium',
+    'MarketplaceId': 'AMEN7PMS3EDWL',
+    'CountryCode': 'BE'
+  },
+  {
+    'Country': 'France',
+    'MarketplaceId': 'A13V1IB3VIYZZH',
+    'CountryCode': 'FR'
+  },
+  {
+    'Country': 'Netherlands',
+    'MarketplaceId': 'A1805IZSGTT6HS',
+    'CountryCode': 'NL'
+  },
+  {
+    'Country': 'Germany',
+    'MarketplaceId': 'A1PA6795UKMFR9',
+    'CountryCode': 'DE'
+  },
+  {
+    'Country': 'Italy',
+    'MarketplaceId': 'APJ6JRA9NG5V4',
+    'CountryCode': 'IT'
+  },
+  {
+    'Country': 'Sweden',
+    'MarketplaceId': 'A2NODRKZP88ZB9',
+    'CountryCode': 'SE'
+  },
+  {
+    'Country': 'Poland',
+    'MarketplaceId': 'A1C3SOZRARQ6R3',
+    'CountryCode': 'PL'
+  },
+  {
+    'Country': 'Turkey',
+    'MarketplaceId': 'A33AVAJ2PDY3EV',
+    'CountryCode': 'TR'
+  },
+  {
+    'Country': 'United Arab Emirates',
+    'MarketplaceId': 'A2VIGQ35RCS4UG',
+    'CountryCode': 'AE'
+  },
+  {
+    'Country': 'Singapore',
+    'MarketplaceId': 'A19VAU5U5O7RUS',
+    'CountryCode': 'SG'
+  },
+  {
+    'Country': 'Australia',
+    'MarketplaceId': 'A39IBJ37TRP1C6',
+    'CountryCode': 'AU'
+  },
+  {
+    'Country': 'Japan',
+    'MarketplaceId': 'A1VC38T7YXB528',
+    'CountryCode': 'JP'
+  }
+
+];