Browse Source

feat: 花生平台 - ADQ账号授权

zhengxy 2 years ago
parent
commit
bb7e3f3884

+ 2 - 0
project/src/assets/config/interface_api.js

@@ -356,6 +356,8 @@ var api = {
356 356
   smartPushV2_massSendCustList: "/api/PeriodMassMsg/massSendCustList", // 企微助手 - 智能推送V2 - 推送记录 - 详情&客户详情列表
357 357
   smartPushV2_massSendCustListExport: "/api/PeriodMassMsg/massSendCustListExport", // 企微助手 - 智能推送V2 - 推送记录 - 详情&客户详情导出
358 358
 
359
+  dataBoardHS_adqAccountList: "/api/provisionalStat/adqAccountList", // 花生平台 - adq账号授权列表
360
+
359 361
 };
360 362
 
361 363
 export { api };

+ 91 - 0
project/src/components/dataBoard/adqAccountHS/list.vue

@@ -0,0 +1,91 @@
1
+<template>
2
+  <div v-loading="loading">
3
+    <div class="screenBox">
4
+      <div class="totalCustom">已授权<span>{{total}}</span>个ADQ账号</div>
5
+      <selfInput label_name="ADQ账号" labelWidth @inputChange="onInputKeyword" />
6
+    </div>
7
+    <el-table :height="height" :data="list" tooltip-effect="dark" style="width: 100%">
8
+      <el-table-column prop="account_id" min-width="200" label="ADQ投放账号ID" show-overflow-tooltip align="center" />
9
+      <el-table-column prop="create_time" min-width="200" label="授权时间" show-overflow-tooltip align="center" />
10
+      <el-table-column prop="bind_account_list" min-width="200" label="公众号" show-overflow-tooltip align="center">
11
+        <template slot-scope="{ row }">
12
+          <span>{{ row.bind_account_list || '-' }}</span>
13
+        </template>
14
+      </el-table-column>
15
+    </el-table>
16
+    <div class="pagination" v-show="total>0">
17
+      <el-pagination background :current-page="page" @current-change="handleCurrentChange" layout="prev, pager, next" :page-count='Number(pages)' />
18
+    </div>
19
+  </div>
20
+</template>
21
+<script>
22
+import selfInput from '@/components/assembly/screen/input.vue'
23
+
24
+export default {
25
+  components: { selfInput, },
26
+  data () {
27
+    return {
28
+      heigth: '',
29
+      loading: false,
30
+      page: 1,
31
+      pages: 0,
32
+      total: 0,
33
+      page_size: 40,
34
+      keyword: '',
35
+      list: [],
36
+    }
37
+  },
38
+  created () {
39
+    this.height = document.documentElement.clientHeight - 220 > 400 ? document.documentElement.clientHeight - 220 : 400
40
+    this.handleGetList()
41
+  },
42
+  methods: {
43
+    handleCurrentChange(val) {
44
+      this.page = val
45
+      this.handleGetList(val)
46
+    },
47
+    async handleGetList() {
48
+      try {
49
+        this.loading = true
50
+        const url = `${this.URL.BASEURL}${this.URL.dataBoardHS_adqAccountList}`
51
+        const params = {
52
+          is_select: 0, // 是否为下拉选择框 1是 0否
53
+          page: this.page,
54
+          page_size: this.page_size,
55
+          keyword: this.keyword,
56
+        }
57
+        const { data: res } =  await this.$axios.get(url, { params })
58
+        if (res && res.errno == 0) {
59
+          this.list = res.rst.data;
60
+          this.total = res.rst.pageInfo.total;
61
+          this.pages = res.rst.pageInfo.pages;
62
+        } else if (res.errno != 4002) {
63
+          this.$message.warning(res.err)
64
+        }
65
+      } catch (error) {
66
+        console.log('error => ', error)
67
+      } finally {
68
+        this.loading = false
69
+      }
70
+    },
71
+    // 监听搜索账号
72
+    onInputKeyword(val) {
73
+      this.keyword = val || ''
74
+      this.page = 1
75
+      this.handleGetList()
76
+    },
77
+  }
78
+}
79
+</script>
80
+<style lang="scss" scoped>
81
+@import "@/style/list.scss";
82
+.screenBox {
83
+  display: flex;
84
+  align-items: center;
85
+  flex-wrap: wrap;
86
+  margin-bottom: 10px;
87
+  .totalCustom {
88
+    margin-top: -4px;
89
+  }
90
+}
91
+</style>

+ 12 - 0
project/src/router/allRouter.js

@@ -44,6 +44,7 @@ const dramaManage = () => import(/* webpackChunkName: 'dramaManage' */ '@/compon
44 44
 const charge = () => import(/* webpackChunkName: 'charge' */ '@/components/orderManage/charge.vue')
45 45
 const wxAccountList = () => import(/* webpackChunkName: 'wxAccountList' */ '@/components/dataBoard/wxAccount/list.vue')
46 46
 const adqAccountList = () => import(/* webpackChunkName: 'adqAccountList' */ '@/components/dataBoard/adqAccount/list.vue')
47
+const adqAccountListHS = () => import(/* webpackChunkName: 'adqAccountListHS' */ '@/components/dataBoard/adqAccountHS/list.vue')
47 48
 const thePublicTrend = () => import(/* webpackChunkName: 'thePublicTrend' */ '@/components/dataBoard/thePublicTrend.vue')
48 49
 const playletFansActTrend = () => import(/* webpackChunkName: 'playletFansActTrend' */ '@/components/dataBoard/playletFansActTrend.vue')
49 50
 const batchAddFriend = () => import(/* webpackChunkName: 'batchAddFriend' */ '@/components/marketingGuest/batchAddFriend/index.vue')
@@ -732,6 +733,17 @@ export var allRouter = [
732 733
         }
733 734
       },
734 735
       {
736
+        path: 'adqAccountListHS',
737
+        name: 'adqAccountListHS',
738
+        component: adqAccountListHS,
739
+        meta: {
740
+          keepAlive: false,
741
+          isLogin: true,
742
+          title: '花生ADQ账号授权',
743
+          isData: true
744
+        }
745
+      },
746
+      {
735 747
         path: 'customerAnalysis',
736 748
         name: 'customerAnalysis',
737 749
         component: customerAnalysis,