Browse Source

updated:商城画像分析

xiebaomin 1 year ago
parent
commit
83bdd36b05

+ 1 - 1
src/views/library/keyword/list.vue

@@ -39,7 +39,7 @@
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="序号" :index="indexMethod" type="index" sortable="custom" align="center" width="80" />
       <el-table-column label="序号" :index="indexMethod" type="index" sortable="custom" align="center" width="80" />
       <el-table-column prop="keyword" label="关键词" align="center" />
       <el-table-column prop="keyword" label="关键词" align="center" />
-      <el-table-column prop="frequency" label="搜索次数" width="120" align="center" sortable
+      <el-table-column prop="pv" label="搜索次数" width="120" align="center" sortable
                        :sort-orders="['ascending', 'descending']"
                        :sort-orders="['ascending', 'descending']"
       />
       />
       <el-table-column label="最近搜索时间" align="center">
       <el-table-column label="最近搜索时间" align="center">

+ 24 - 6
src/views/mall-portrait/components/select-time.vue

@@ -26,11 +26,10 @@ import loopEchart from '../mixins/index'
 
 
 export default {
 export default {
   mixins: [loopEchart],
   mixins: [loopEchart],
-  data() {
-    return {
-      time: [],
-      activeId: 1,
-      timeList: [
+  props: {
+    timeList: {
+      type: Array,
+      default: () => [
         {
         {
           id: 1,
           id: 1,
           content: '昨天'
           content: '昨天'
@@ -52,6 +51,16 @@ export default {
           content: '全部'
           content: '全部'
         }
         }
       ]
       ]
+    },
+    activeLinkId: {
+      type: Number,
+      default: 1
+    }
+  },
+  data() {
+    return {
+      time: [],
+      activeId: 1
     }
     }
   },
   },
   watch: {
   watch: {
@@ -64,7 +73,8 @@ export default {
           4: () => this.getYears(1),
           4: () => this.getYears(1),
           0: () => {
           0: () => {
             this.time = []
             this.time = []
-          }
+          },
+          5: () => this.getWeeks(1)
         }
         }
         this.time = e !== 0 ? [obj[e](), this.getDay()] : ['', '']
         this.time = e !== 0 ? [obj[e](), this.getDay()] : ['', '']
       },
       },
@@ -75,6 +85,14 @@ export default {
         this.$emit('handleSelectTime', e)
         this.$emit('handleSelectTime', e)
       },
       },
       immediate: true
       immediate: true
+    },
+    activeLinkId: {
+      handler(val) {
+        if (val) {
+          this.activeId = val
+        }
+      },
+      immediate: true
     }
     }
   },
   },
   methods: {
   methods: {

+ 17 - 1
src/views/mall-portrait/index.vue

@@ -27,7 +27,7 @@
         </pie-dub-echarts>
         </pie-dub-echarts>
       </div>
       </div>
     </div>
     </div>
-    <select-time @handleSelectTime="handleSelectTime($event, 2)" />
+    <select-time :time-list="timeList" :active-link-id="5" @handleSelectTime="handleSelectTime($event, 2)" />
     <div class="ins_trends">
     <div class="ins_trends">
       <line-echarts :option-data="dataValue.addClubCount.data" />
       <line-echarts :option-data="dataValue.addClubCount.data" />
       <line-echarts :echarts-name="'机构订单趋势'" :option-data="dataValue.clubOrder.data" />
       <line-echarts :echarts-name="'机构订单趋势'" :option-data="dataValue.clubOrder.data" />
@@ -133,6 +133,22 @@ export default {
         // 热搜词
         // 热搜词
         keywords: []
         keywords: []
       },
       },
+      timeList: [{
+        id: 5,
+        content: '近一周'
+      },
+      {
+        id: 2,
+        content: '近1月'
+      },
+      {
+        id: 3,
+        content: '近6月'
+      },
+      {
+        id: 4,
+        content: '近1年'
+      }],
       params: {
       params: {
         startCreateTime: '',
         startCreateTime: '',
         endCreateTime: ''
         endCreateTime: ''

+ 3 - 0
src/views/mall-portrait/mixins/index.js

@@ -115,6 +115,9 @@ export default {
     },
     },
     getYears(num) {
     getYears(num) {
       return moment().subtract(num, 'years').format('YYYY-MM-DD')
       return moment().subtract(num, 'years').format('YYYY-MM-DD')
+    },
+    getWeeks(num) {
+      return moment().subtract(num, 'weeks').format('YYYY-MM-DD')
     }
     }
   }
   }
 }
 }

+ 18 - 7
src/views/user/customer/advertis-list.vue

@@ -28,6 +28,8 @@
           range-separator="至"
           range-separator="至"
           start-placeholder="开始日期"
           start-placeholder="开始日期"
           end-placeholder="结束日期"
           end-placeholder="结束日期"
+          format="yyyy-MM-dd"
+          value-format="yyyy-MM-dd"
         />
         />
       </div>
       </div>
       <div class="filter-control">
       <div class="filter-control">
@@ -140,7 +142,9 @@ const defaultListQuery = {
   shopName: '', // 供应商名称
   shopName: '', // 供应商名称
   status: '', // 上下架状态 0 已上架 1 已下架
   status: '', // 上下架状态 0 已上架 1 已下架
   pageNum: 1,
   pageNum: 1,
-  pageSize: 20
+  pageSize: 20,
+  startPvCreateTime: '',
+  endPvCreateTime: ''
 }
 }
 export default {
 export default {
   name: 'AdvertisList',
   name: 'AdvertisList',
@@ -157,7 +161,14 @@ export default {
     }
     }
   },
   },
   computed: {},
   computed: {},
-  watch: {},
+  watch: {
+    timesValue: {
+      handler() {
+        this.getList()
+      },
+      immediate: true
+    }
+  },
   created() {
   created() {
     this.getList()
     this.getList()
   },
   },
@@ -167,12 +178,12 @@ export default {
     getList() {
     getList() {
       this.listQuery.pageNum = 1
       this.listQuery.pageNum = 1
       this.list = []
       this.list = []
-      if (this.time && this.time.length > 0) {
-        this.listQuery.startTime = this.time[0]
-        this.listQuery.endTime = this.time[1]
+      if (this.timesValue && this.timesValue.length > 0) {
+        this.listQuery.startPvCreateTime = this.timesValue[0]
+        this.listQuery.endPvCreateTime = this.timesValue[1]
       } else {
       } else {
-        this.listQuery.startTime = ''
-        this.listQuery.endTime = ''
+        this.listQuery.startPvCreateTime = ''
+        this.listQuery.endPvCreateTime = ''
       }
       }
       this.getShopAdvertisingImage()
       this.getShopAdvertisingImage()
     },
     },