浏览代码

优化分页

zhengjinyi 1 年之前
父节点
当前提交
31e3e0cc4f

+ 1 - 1
src/views/user/consult/detail.vue

@@ -272,7 +272,7 @@
     <!-- 页码 -->
     <pagination
       :total="total"
-      :page-sizes="[20]"
+      :page-sizes="[10, 20, 30, 100]"
       :page-size="20"
       :page.sync="listQuery.pageNum"
       :limit.sync="listQuery.pageSize"

+ 1 - 1
src/views/user/consult/genre-list.vue

@@ -67,7 +67,7 @@
     <!-- 页码 -->
     <pagination
       :total="total"
-      :page-sizes="[20]"
+      :page-sizes="[10, 20, 30, 100]"
       :page-size="20"
       :page.sync="listQuery.pageNum"
       :limit.sync="listQuery.pageSize"

+ 5 - 1
src/views/user/consult/list.vue

@@ -327,7 +327,7 @@
     <!-- 页码 -->
     <pagination
       :total="total"
-      :page-sizes="[20]"
+      :page-sizes="[10, 20, 30, 100]"
       :page-size="20"
       :page.sync="listQuery.pageNum"
       :limit.sync="listQuery.pageSize"
@@ -404,6 +404,7 @@ export default {
       listQuery: {
         remarks: '', // 标签词
         consult: '', // 咨询类别
+        clubId: '', // 机构Id
         clubName: '', // 机构名称
         newDeal: '', // 新分配机构状态 0 全部 1 是  2否
         isRegister: '', // 是否注册 0 全部 1 未注册 2已注册
@@ -431,6 +432,9 @@ export default {
   methods: {
     initDate() {
       // 初始化获取当前年月
+      if (this.$route.query.clubId) {
+        this.listQuery.clubId = this.$route.query.clubId
+      }
       if (this.$route.query.clubName) {
         this.listQuery.clubName = this.$route.query.clubName
       }

+ 1 - 1
src/views/user/consult/report-list.vue

@@ -117,7 +117,7 @@
     <!-- 页码 -->
     <pagination
       :total="total"
-      :page-sizes="[20]"
+      :page-sizes="[10, 20, 30, 100]"
       :page-size="20"
       :page.sync="listQuery.pageNum"
       :limit.sync="listQuery.pageSize"

+ 1 - 1
src/views/user/consult/unreg-detail.vue

@@ -243,7 +243,7 @@
     <!-- 页码 -->
     <pagination
       :total="total"
-      :page-sizes="[20]"
+      :page-sizes="[10, 20, 30, 100]"
       :page-size="20"
       :page.sync="listQuery.pageNum"
       :limit.sync="listQuery.pageSize"

+ 1 - 1
src/views/user/consult/unreg-list.vue

@@ -72,7 +72,7 @@
     <!-- 页码 -->
     <pagination
       :total="total"
-      :page-sizes="[20]"
+      :page-sizes="[10, 20, 30, 100]"
       :page-size="20"
       :page.sync="listQuery.pageNum"
       :limit.sync="listQuery.pageSize"

+ 37 - 10
src/views/user/record/detail-list.vue

@@ -1,13 +1,20 @@
 <template>
   <div class="app-container">
+    <div v-if="summarize.length > 0" class="tags-sms">
+      <span class="tags-sms-span">意向标签:</span>
+      <el-tag v-for="(sum, sumIndex) in summarize" :key="sumIndex" effect="dark" style="font-size: 15px; margin: 0 2px">
+        {{ sum.value }}
+      </el-tag>
+    </div>
     <!-- 顶部操作区域 -->
-    <div class="filter-container">
+    <div class="filter-container" style="margin-top: 10px">
       <!-- 关键词列表 -->
       <el-table v-loading="isLoading" :data="list" border>
         <el-table-column prop="pagePath" label="页面路径" align="center" width="300">
           <template slot-scope="{ row }">
-            <a v-if="row.accessClient === '0'" style="color: #2fa4e7" target="_blank" :href="row.pagePath">
-              {{ row.pagePath }}</a>
+            <a v-if="row.accessClient === '0'" style="color: #2fa4e7" target="_blank" :href="row.pagePath">{{
+              row.pagePath
+            }}</a>
             <span v-else> {{ row.pagePath }} </span>
           </template>
         </el-table-column>
@@ -30,7 +37,7 @@
           <template v-if="row.productId" slot-scope="{ row }">
             <el-popover placement="top-start" title="" width="180" trigger="hover">
               <img :src="row.productImage" alt="" style="width: 150px; height: 150px" />
-              <img slot="reference" :src="row.productImage" alt="" style="width: 30px; height: 30px" />
+              <img slot="reference" :src="row.productImage" alt="" style="width: 80px; height: 80px" />
             </el-popover>
           </template>
           <template v-else>
@@ -60,8 +67,8 @@
       <!-- 页码 -->
       <pagination
         :total="total"
-        :page-sizes="[20]"
-        :page-size="20"
+        :page-sizes="[10, 20, 30, 100]"
+        :page-size="100"
         :page.sync="listQuery.pageNum"
         :limit.sync="listQuery.pageSize"
         @pagination="fetchBehaviorList"
@@ -94,12 +101,13 @@ export default {
   data() {
     return {
       isLoading: true,
+      summarize: [],
       listQuery: {
         ip: '',
         accessDate: '',
         userId: 0,
         pageNum: 1,
-        pageSize: 20
+        pageSize: 100
       },
       list: [],
       total: 0
@@ -122,8 +130,10 @@ export default {
       try {
         this.isLoading = true
         const res = await fetchBehaviorList(this.listQuery)
-        this.list = res.data.results
-        this.total = res.data.totalRecord
+        const data = res.data
+        this.summarize = data.label
+        this.list = data.page.results
+        this.total = data.page.totalRecord
         this.isLoading = false
       } catch (error) {
         console.log(error)
@@ -137,4 +147,21 @@ export default {
 }
 </script>
 
-<style></style>
+<style>
+.tags-sms {
+  width: 100%;
+  height: auto;
+  font-size: 14px;
+  color: #666666;
+  line-height: 40px;
+  border-radius: 4px;
+  box-sizing: border-box;
+  padding: 5px;
+  border: 1px solid #e1e1e1;
+}
+.tags-sms .tags-sms-span {
+  font-size: 18px;
+  font-weight: bold;
+  color: #333333;
+}
+</style>

+ 4 - 1
src/views/user/record/list.vue

@@ -205,7 +205,7 @@
       <!-- 页码 -->
       <pagination
         :total="total"
-        :page-sizes="[100]"
+        :page-sizes="[10, 20, 30, 100]"
         :page-size="100"
         :page.sync="listQuery.pageNum"
         :limit.sync="listQuery.pageSize"
@@ -224,6 +224,7 @@ import pickerOptions from '@/utils/time-picker.js'
 const defaultListQuery = {
   todayType: 0, // 0 今日数据 1 以往数据
   ip: '', // 访问人ID
+  clubId: '', // 机构Id
   corporateName: '', // 公司名称
   companyType: '', // 公司类型
   accessClient: '', // 访问客户端
@@ -300,12 +301,14 @@ export default {
     if (this.$route.query.type === 'second') {
       this.activeName = 'second'
       this.tabsCurrent = this.listQuery.todayType = 1
+      this.listQuery.clubId = this.$route.query.clubId
       this.listQuery.corporateName = this.$route.query.corporateName
       this.time.push(this.$route.query.startTime)
       this.time.push(this.$route.query.endTime)
     } else {
       this.activeName = 'first'
       this.tabsCurrent = this.listQuery.todayType = 0
+      this.listQuery.clubId = this.$route.query.clubId
       this.listQuery.corporateName = this.$route.query.corporateName
     }
     this.getHeigth()