Browse Source

转发消息统计报表上线

houxiaohua 4 months ago
parent
commit
15c22e3428

+ 1 - 1
index.html

@@ -7,4 +7,4 @@
7 7
         hm.src = "https://hm.baidu.com/hm.js?d61b9e2caf4d46ccda7471b5385e2333";
8 8
         var s = document.getElementsByTagName("script")[0];
9 9
         s.parentNode.insertBefore(hm, s);
10
-      })();</script><link href=./static/css/app.6ec5006c66833378caa521820a836c59.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.726ad71a3f643210b987.js></script><script type=text/javascript src=./static/js/app.dde67482a244c10f748b.js></script></body></html>
10
+      })();</script><link href=./static/css/app.4d3525bf83a2ac66771a4c456221a693.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.1c6a0849277a281124e7.js></script><script type=text/javascript src=./static/js/app.7a74735f9361945fbc17.js></script></body></html>

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

@@ -244,6 +244,7 @@ var api = {
244 244
   chatGroupMassMsg_noticeUser: "/api/chatGroupMassMsg/noticeUser",
245 245
   chatGroupMassMsg_ruleDetail: "/api/chatGroupMassMsg/ruleDetail",
246 246
   chatGroup_groupList: "/api/chatGroup/groupList",
247
+  forward_msg_record_list: "/api/androidTool/forwardMsgRecord",
247 248
   chatGroup_uniqueMemberCount: "/api/chatGroup/uniqueMemberCount",
248 249
   chatGroup_ownerList: "/api/chatGroup/ownerList",
249 250
   chatGroupMassMsg_chatGroupReceiveDetail: "/api/chatGroupMassMsg/chatGroupReceiveDetail",

+ 198 - 0
project/src/components/forwardMsgRecord/index.vue

@@ -0,0 +1,198 @@
1
+<template>
2
+    <div v-loading="loading">
3
+      <!-- <div class="screenBox" style="align-items: center;padding-right:16px">
4
+        <div class="flex-align-center" style="flex:1;flex-wrap: wrap;">
5
+        </div>
6
+      </div> -->
7
+      <div class="tableInfo">
8
+        <div>
9
+          <div class="flex">
10
+            <div class="totalCustom">共有<span>{{ total }}</span>条记录</div>
11
+          </div>
12
+        </div>
13
+        <div class="flex">
14
+          <!-- <el-button type="primary" plain size="mini" @click="init(1, 'export')">导出Excel</el-button> -->
15
+        </div>
16
+      </div>
17
+      <!-- table -->
18
+      <el-table ref="multipleTable" :height='height' :data="tableData" tooltip-effect="dark" style="width: 100%">
19
+        <el-table-column prop="name" label="配置名称" show-overflow-tooltip align="center">
20
+          <template slot-scope="scope">
21
+            <div>{{ scope.row.device_title}}</div>
22
+          </template>
23
+        </el-table-column>
24
+        <el-table-column label="设备ID" align="center">
25
+          <template slot-scope="scope">
26
+            <div class="customerServiceTagBox">
27
+              <div class="customerServiceTag">{{ scope.row.device_id }}</div>
28
+            </div>
29
+          </template>
30
+        </el-table-column>
31
+        <el-table-column prop="user_name" label="转发人" show-overflow-tooltip align="center"></el-table-column>
32
+        <el-table-column min-width="80" label="已入群总数" show-overflow-tooltip align="center">
33
+          <template slot-scope="scope">
34
+            <div>{{ scope.row.chat_group_total }}</div>
35
+          </template>
36
+        </el-table-column>
37
+        <el-table-column prop="forward_total" label="已转发群数" show-overflow-tooltip align="center"></el-table-column>
38
+        <el-table-column prop="time_interval" label="近十次转发间隔(单位: 秒)" align="center" style="white-space: pre-wrap;overflow-wrap: break-word;"></el-table-column>
39
+        <el-table-column prop="created_at" label="转发开始时间" show-overflow-tooltip align="center"></el-table-column>
40
+        <el-table-column prop="updated_at" label="上一次执行时间" show-overflow-tooltip align="center"></el-table-column>
41
+      </el-table>
42
+      <div class="pagination" v-show="total > 0">
43
+        <el-pagination background :current-page="page" @current-change="handleCurrentChange" layout="prev, pager, next"
44
+          :page-count='Number(pages)'>
45
+        </el-pagination>
46
+      </div>
47
+    </div>
48
+  </template>
49
+  <script>
50
+  import { getCurrentCorpInfo } from '@/assets/js/common'
51
+  
52
+  export default {
53
+    data () {
54
+      return {
55
+        detialFlag: false,
56
+        loading: false,
57
+        page: 1,
58
+        pages: 0,
59
+        total: 0,
60
+        page_size: 20,
61
+        tableData: [],
62
+        resetFlag: false,//重置
63
+        height: '',
64
+        detail_chat_id: '',
65
+        user_id_list: '',
66
+        input_keyword: '',
67
+        uniqueMemberCount: '',
68
+        uniqueMemberCountLoading: false
69
+      }
70
+    },
71
+    created () {
72
+      this.height = document.documentElement.clientHeight - 260 > 400 ? document.documentElement.clientHeight - 260 : 400
73
+      this.init(1)
74
+    },
75
+    methods: {
76
+      init (page, type) {
77
+        if (type != 'export') {
78
+          this.page = page ? page : this.page;
79
+        } else {
80
+          if (this.total == 0) {
81
+            this.$message({
82
+              message: '暂无数据可导出',
83
+              type: "warning"
84
+            })
85
+            return
86
+          }
87
+        }
88
+        this.loading = true
89
+        this.$axios.get(this.URL.BASEURL + this.URL.forward_msg_record_list, {
90
+          params: {
91
+            page: type == 'export' ? 1 : this.page,
92
+            page_size: type == 'export' ? this.$store.state.exportNumber : this.page_size,
93
+          }
94
+        }).then((res) => {
95
+          var res = res.data
96
+          this.loading = false
97
+          if (res && res.errno == 0) {
98
+            if (type == 'export') {
99
+              this.exportEvent(res.rst.data)
100
+            } else {
101
+              this.tableData = res.rst.data;
102
+              this.total = res.rst.pageInfo.total;
103
+              this.pages = res.rst.pageInfo.pages;
104
+            }
105
+          } else if (res.errno != 4002) {
106
+            this.$message({
107
+              message: res.err,
108
+              type: "warning"
109
+            })
110
+          }
111
+        }).catch((err) => {
112
+          this.loading = false
113
+        });
114
+      },
115
+      handleCurrentChange (val) {
116
+        this.init(val)
117
+      },
118
+      exportEvent (data) {
119
+        let list = data;
120
+        let tHeader = ['群名称', '群主', '群人数', '群公告', '创建时间', '群状态',]
121
+        let filterVal = ['name', 'owner_name', 'member_count', 'notice', 'create_time', 'self_status']
122
+        list.forEach((item) => {
123
+          item.self_status = item.status == 1 ? '正常' : item.status == 2 ? '解散' : '';
124
+        })
125
+        let excelDatas = [
126
+          {
127
+            tHeader: tHeader, // sheet表一头部
128
+            filterVal: filterVal, // 表一的数据字段
129
+            tableDatas: list, // 表一的整体json数据
130
+            sheetName: ''// 表一的sheet名字
131
+          }
132
+        ]
133
+        this.$exportOrder({ excelDatas, name: `客户群管理(导出时间:${this.$getDay(0)})` })
134
+      },
135
+      // 监听点击"复制ID"
136
+      async onClickCopyID(row) {
137
+        try {
138
+          await this.$copyText(row.share_chatid)
139
+          this.$message.success('复制成功')
140
+        } catch (error) {
141
+          this.$message.error('复制失败,请重试')
142
+        }
143
+      },
144
+  
145
+      // 监听点击“同步企微客户群”
146
+      async onClickSyncGroup() {
147
+        try {
148
+          const { corp_name, corpid } = getCurrentCorpInfo() || {}
149
+          await this.$confirm(`确定同步${corp_name ? '【'+corp_name+'】' : '当前企微'}的客户群数据吗?`, '提示', {
150
+            confirmButtonText: '确定',
151
+            cancelButtonText: '取消',
152
+            type: 'warning'
153
+          })
154
+          this.handleSyncGroup({ corp_name, corpid })
155
+        } catch (error) {
156
+          console.log('error => ', error)
157
+        }
158
+      },
159
+      async handleSyncGroup({ corp_name, corpid }) {
160
+        try {
161
+          this.loading = true
162
+          const url = `${this.URL.BASEURL}${this.URL.tagManage_syncCorpChatGroup}`
163
+          const params = { corpid }
164
+          const { data: res = {} } = await this.$axios.get(url, { params })
165
+          if (res && res.errno == 0) {
166
+            this.$message.success({
167
+              message: '后台数据同步中,请稍候查看',
168
+              duration: 6000
169
+            })
170
+          } else if (res.errno != 4002) {
171
+            this.$message.warning(res.err)
172
+          }
173
+        } catch (error) {
174
+          console.log(error)
175
+        } finally {
176
+          this.loading = false
177
+        }
178
+      },
179
+    }
180
+  }
181
+  </script>
182
+  <style lang="scss" scoped>
183
+  @import "@/style/list.scss";
184
+  
185
+  .screenBox .common-screen-item {
186
+    width: inherit;
187
+  }
188
+  
189
+  .tableInfo {
190
+    height: 50px;
191
+  }
192
+  
193
+  .table_button {
194
+    margin: 0 4px;
195
+    min-width: 26px;
196
+  }
197
+  </style>
198
+  

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

@@ -68,6 +68,7 @@ const radarIndex = () => import(/* webpackChunkName: 'radarIndex' */ '@/componen
68 68
 const groupCodeIndex = () => import(/* webpackChunkName: 'groupCodeIndex' */ '@/components/groupCode/index.vue')
69 69
 const createGroupCode = () => import(/* webpackChunkName: 'createGroupCode' */ '@/components/groupCode/createGroupCode.vue')
70 70
 const groupCodeAnalyse = () => import(/* webpackChunkName: 'groupCodeAnalyse' */ '@/components/groupCode/groupCodeAnalyse.vue')
71
+const forwardMsgRecord = () =>  import(/* webpackChunkName: 'forwardMsgRecord' */ '@/components/forwardMsgRecord/index.vue')
71 72
 
72 73
 // 数据看板 - 账号数据趋势
73 74
 const accountTrends = () => import(/* webpackChunkName: 'accountTrends' */ '@/components/dataBoard/accountTrends.vue')
@@ -1070,6 +1071,16 @@ export var allRouter = [
1070 1071
           title: '入群欢迎语'
1071 1072
         }
1072 1073
       },
1074
+      {
1075
+        path: 'forwardMsgRecord',
1076
+        name: 'forwardMsgRecord',
1077
+        component: forwardMsgRecord,
1078
+        meta: {
1079
+          keepAlive: false,
1080
+          isLogin: true,
1081
+          title: '新建渠道群活码'
1082
+        }
1083
+      },
1073 1084
     ]
1074 1085
   }
1075 1086
 ]

File diff suppressed because it is too large
+ 1 - 1
static/css/app.6ec5006c66833378caa521820a836c59.css


File diff suppressed because it is too large
+ 1 - 0
static/js/95.0b14eb70672a9ce774ce.js


File diff suppressed because it is too large
+ 1 - 1
static/js/95.4a0a303cc96ca36462ab.js


File diff suppressed because it is too large
+ 1 - 1
static/js/96.738b3f76d0eac844348d.js


File diff suppressed because it is too large
+ 1 - 1
static/js/97.d41a174608c67c416cc0.js


File diff suppressed because it is too large
+ 4 - 4
static/js/app.dde67482a244c10f748b.js


File diff suppressed because it is too large
+ 1 - 0
static/js/manifest.1c6a0849277a281124e7.js


File diff suppressed because it is too large
+ 0 - 1
static/js/manifest.726ad71a3f643210b987.js