|
@@ -0,0 +1,443 @@
|
|
1
|
+<template>
|
|
2
|
+ <div v-loading="loading">
|
|
3
|
+ <!-- ADQ账号授权 -->
|
|
4
|
+ <div class="tableInfo">
|
|
5
|
+ <div class="flex">
|
|
6
|
+ <div>
|
|
7
|
+ <div class="flex">
|
|
8
|
+ <div class="totalCustom">已授权<span>{{total}}</span>个ADQ账号</div>
|
|
9
|
+ </div>
|
|
10
|
+ <div class="selectCustom" style="margin-left:0;margin-top:6px">已择{{multipleArr.length}}个ADQ账号
|
|
11
|
+ <el-button type="primary" plain size="mini" @click="clearSelect">清空选中</el-button>
|
|
12
|
+ </div>
|
|
13
|
+ </div>
|
|
14
|
+ <div class="c-FF604D f14 lMar28">重要提示:ADQ账号完成后请及时编辑渠道编号、数据源ID与企微主体</div>
|
|
15
|
+ </div>
|
|
16
|
+ <div class="flex">
|
|
17
|
+ <el-popover placement="bottom" width="600" trigger="click">
|
|
18
|
+ <div class="gzh_why_box">
|
|
19
|
+ <div class="self-hint" style="border:none">
|
|
20
|
+ <!-- <i class="el-icon-message-solid"></i> -->
|
|
21
|
+ <div>
|
|
22
|
+ <p class="fbolder f15" style="margin-bottom:8px">为什么要进行ADQ账号授权?</p>
|
|
23
|
+ <p>授权成功的账号,企微数据看板才可以提供数据回传和广告数据日报数据,为了获得更好的数据服务,请完成账号授权!</p>
|
|
24
|
+ </div>
|
|
25
|
+ </div>
|
|
26
|
+ </div>
|
|
27
|
+ <div class="why" slot="reference">为什么要授权ADQ账号?</div>
|
|
28
|
+ </el-popover>
|
|
29
|
+ <el-button type="primary" size="small" @click="gzhCode">ADQ账号授权</el-button>
|
|
30
|
+ <el-button type="primary" size="small" @click="pl_reportRuleEvent">批量广告回传设置</el-button>
|
|
31
|
+ </div>
|
|
32
|
+ </div>
|
|
33
|
+ <!-- ADQ账号列表 -->
|
|
34
|
+ <el-table ref="multipleTable" :height="height" :data="gzhData" tooltip-effect="dark" style="width: 100%" @selection-change="handleSelectionChange">
|
|
35
|
+ <el-table-column type="selection" :selectable="checkSelectable" width="55" align="center"></el-table-column>
|
|
36
|
+ <!-- <el-table-column prop="account_name" min-width="160" label="公众号" show-overflow-tooltip align="center" fixed="left"></el-table-column> -->
|
|
37
|
+ <!-- <el-table-column prop="channel" min-width="140" label="渠道编号" show-overflow-tooltip align="center"></el-table-column> -->
|
|
38
|
+ <el-table-column prop="account_id" min-width="160" label="ADQ投放账号ID" show-overflow-tooltip align="center"></el-table-column>
|
|
39
|
+ <el-table-column prop="user_action_set_id" min-width="160" label="数据源ID" show-overflow-tooltip align="center"></el-table-column>
|
|
40
|
+ <el-table-column prop="create_time" min-width="180" label="授权时间" show-overflow-tooltip align="center"></el-table-column>
|
|
41
|
+ <el-table-column prop="corp_name" min-width="160" label="关联企微" show-overflow-tooltip align="center"></el-table-column>
|
|
42
|
+ <el-table-column prop="drama_count" min-width="120" label="关联剧集数量" show-overflow-tooltip align="center"></el-table-column>
|
|
43
|
+ <el-table-column label="投手" min-width="120" align="center">
|
|
44
|
+ <template slot-scope="scope">
|
|
45
|
+ <div class="c-00B38A pointer table_button" @click="lookTs(scope.row)">查看投手</div>
|
|
46
|
+ </template>
|
|
47
|
+ </el-table-column>
|
|
48
|
+ <el-table-column prop="rule_name" min-width="200" label="下单回传方式" show-overflow-tooltip align="center"></el-table-column>
|
|
49
|
+ <el-table-column label="是否全量回传" min-width="120" show-overflow-tooltip align="center">
|
|
50
|
+ <template slot-scope="scope">
|
|
51
|
+ <div>{{scope.row.purchase_enable==1?'是':'否'}}</div>
|
|
52
|
+ </template>
|
|
53
|
+ </el-table-column>
|
|
54
|
+ <el-table-column label="漏单回传" min-width="120" align="center">
|
|
55
|
+ <template slot-scope="scope">
|
|
56
|
+ <div v-if="scope.row.miss_enable">已开启(<span class="c-00B38A">{{scope.row.miss_setvale}}单</span>)</div>
|
|
57
|
+ <div v-else>未开启</div>
|
|
58
|
+ </template>
|
|
59
|
+ </el-table-column>
|
|
60
|
+ <el-table-column label="是否启用" show-overflow-tooltip align="center">
|
|
61
|
+ <template slot-scope="scope">
|
|
62
|
+ <div>{{scope.row.report_enable==1?'是':'否'}}</div>
|
|
63
|
+ </template>
|
|
64
|
+ </el-table-column>
|
|
65
|
+ <el-table-column label="操作" min-width="220" align="center" fixed="right">
|
|
66
|
+ <template slot-scope="scope">
|
|
67
|
+ <div class="flex-align-jus-center">
|
|
68
|
+ <div class="c-00B38A pointer table_button" @click="bindGzhTs(scope.row)">绑定投手</div>
|
|
69
|
+ <div class="button_line"></div>
|
|
70
|
+ <div class="c-00B38A pointer table_button" @click="editEvent(scope.row,'reportRule')">广告回传</div>
|
|
71
|
+ <div class="button_line"></div>
|
|
72
|
+ <div class="c-00B38A pointer table_button" @click="editEvent(scope.row,'edit')">编辑</div>
|
|
73
|
+ </div>
|
|
74
|
+ </template>
|
|
75
|
+ </el-table-column>
|
|
76
|
+ </el-table>
|
|
77
|
+ <div class="pagination" v-show="total>0">
|
|
78
|
+ <el-pagination background :current-page="page" @current-change="handleCurrentChange" layout="prev, pager, next" :page-count='Number(pages)'>
|
|
79
|
+ </el-pagination>
|
|
80
|
+ </div>
|
|
81
|
+ <!-- 绑定投手 -->
|
|
82
|
+ <el-dialog title="绑定投手" :visible.sync="bindTsFlag" :append-to-body="true" width="400px">
|
|
83
|
+ <addPitcher :gzhData='tsData' v-if="bindTsFlag" @returnAddPitcher="returnAddPitcher"></addPitcher>
|
|
84
|
+ </el-dialog>
|
|
85
|
+ <!-- 投手列表 -->
|
|
86
|
+ <el-drawer size="60%" :title="tsData&&tsData.account_name?'公众号 - '+tsData.account_name:''" :visible.sync="tsFalg" :before-close="drawerClose">
|
|
87
|
+ <pitcherList :gzhData='tsData' v-if="tsFalg"></pitcherList>
|
|
88
|
+ </el-drawer>
|
|
89
|
+ <!-- 广告回传 -->
|
|
90
|
+ <el-dialog :title="editData&&editData.wechat_account_id?`${editData.account_name} - 广告回传设置`:'批量广告回传设置'" :visible.sync="reportRuleFlag" :append-to-body="true" width="400px">
|
|
91
|
+ <reportRule :app_ids='app_ids' :editData='editData' v-if="reportRuleFlag" @returnReportRule="returnAddPitcher"></reportRule>
|
|
92
|
+ </el-dialog>
|
|
93
|
+ <!-- ADQ账号绑定数据源及企微 -->
|
|
94
|
+ <el-dialog :title="`${editData.account_name} - 编辑`" :visible.sync="accountReportConfFlag" :append-to-body="true" width="400px">
|
|
95
|
+ <accountReportConf :editData='editData' v-if="accountReportConfFlag" @returnReportRule="returnAddPitcher"></accountReportConf>
|
|
96
|
+ </el-dialog>
|
|
97
|
+
|
|
98
|
+ </div>
|
|
99
|
+</template>
|
|
100
|
+<script>
|
|
101
|
+import pitcherList from './pitcherList.vue'
|
|
102
|
+import addPitcher from './addPitcher.vue'
|
|
103
|
+import reportRule from './reportRule.vue'
|
|
104
|
+import accountReportConf from './accountReportConf.vue'
|
|
105
|
+export default {
|
|
106
|
+ components: { pitcherList, addPitcher, reportRule, accountReportConf },
|
|
107
|
+ data () {
|
|
108
|
+ return {
|
|
109
|
+ loading: false,
|
|
110
|
+ page: 1,
|
|
111
|
+ pages: 0,
|
|
112
|
+ total: 0,
|
|
113
|
+ page_size: 40,
|
|
114
|
+ input_keyword: '',
|
|
115
|
+ gzhData: [],
|
|
116
|
+ bindTsFlag: false,
|
|
117
|
+ tsFalg: false,
|
|
118
|
+ tsData: {},
|
|
119
|
+ multipleSelection: {},
|
|
120
|
+ multipleArr: [],
|
|
121
|
+ reportRuleFlag: false,
|
|
122
|
+ app_ids: [],
|
|
123
|
+ editData: {},
|
|
124
|
+ accountReportConfFlag: false,
|
|
125
|
+ heigth: ''
|
|
126
|
+ }
|
|
127
|
+ },
|
|
128
|
+ created () {
|
|
129
|
+ this.height = document.documentElement.clientHeight - 220 > 400 ? document.documentElement.clientHeight - 220 : 400
|
|
130
|
+ this.search_change()
|
|
131
|
+ },
|
|
132
|
+ mounted () {
|
|
133
|
+ window.onresize = () => {
|
|
134
|
+ this.css_reset()
|
|
135
|
+ }
|
|
136
|
+ },
|
|
137
|
+ methods: {
|
|
138
|
+ clearSelect () {
|
|
139
|
+ this.multipleArr = [];
|
|
140
|
+ this.multipleSelection = {}
|
|
141
|
+ this.$refs.multipleTable.clearSelection()
|
|
142
|
+ },
|
|
143
|
+ checkSelectable (row, index) {//列表可选择的
|
|
144
|
+ return true
|
|
145
|
+ },
|
|
146
|
+ handleSelectionChange (row) {//点击选择变化
|
|
147
|
+ this.multipleSelection[this.page] = row && row.length != 0 ? row : [];
|
|
148
|
+ let multipleArr = [];
|
|
149
|
+ for (let i in this.multipleSelection) {
|
|
150
|
+ multipleArr = multipleArr.concat(...this.multipleSelection[i])
|
|
151
|
+ }
|
|
152
|
+ this.multipleArr = multipleArr
|
|
153
|
+ },
|
|
154
|
+ drawerClose () {
|
|
155
|
+ this.tsFalg = false
|
|
156
|
+ this.gzh_init(this.page)
|
|
157
|
+ },
|
|
158
|
+ returnAddPitcher (val) {//添加投手回调
|
|
159
|
+ if (val == 'update') {
|
|
160
|
+ this.gzh_init(this.page)
|
|
161
|
+ if (this.reportRuleFlag) {//广告回传
|
|
162
|
+ this.clearSelect()
|
|
163
|
+ }
|
|
164
|
+ }
|
|
165
|
+ this.bindTsFlag = false
|
|
166
|
+ this.reportRuleFlag = false
|
|
167
|
+ this.accountReportConfFlag = false
|
|
168
|
+ },
|
|
169
|
+ lookTs (data) {
|
|
170
|
+ this.tsData = data;
|
|
171
|
+ this.tsFalg = true
|
|
172
|
+ },
|
|
173
|
+ bindGzhTs (data) {
|
|
174
|
+ this.tsData = data;
|
|
175
|
+ this.bindTsFlag = true
|
|
176
|
+ },
|
|
177
|
+ editEvent (data, type) {
|
|
178
|
+ this.editData = data;
|
|
179
|
+ if (type == 'reportRule') {
|
|
180
|
+ this.app_ids = [data.wechat_account_id]
|
|
181
|
+ this.reportRuleFlag = true
|
|
182
|
+ this.clearSelect()
|
|
183
|
+ }
|
|
184
|
+ if (type == 'edit') {
|
|
185
|
+ this.accountReportConfFlag = true
|
|
186
|
+ }
|
|
187
|
+ },
|
|
188
|
+ pl_reportRuleEvent () {//批量广告回传
|
|
189
|
+ if (!this.multipleArr || this.multipleArr.length == 0) {
|
|
190
|
+ this.$message({
|
|
191
|
+ message: '请选择ADQ账号!',
|
|
192
|
+ type: 'warning'
|
|
193
|
+ })
|
|
194
|
+ return
|
|
195
|
+ }
|
|
196
|
+ this.app_ids = this.multipleArr.map((v) => {
|
|
197
|
+ return v.wechat_account_id
|
|
198
|
+ })
|
|
199
|
+ this.editData = {}
|
|
200
|
+ this.reportRuleFlag = true
|
|
201
|
+ },
|
|
202
|
+ search_change () {
|
|
203
|
+ this.gzh_init(1)
|
|
204
|
+ },
|
|
205
|
+ changeType (type) {
|
|
206
|
+ this.type = type
|
|
207
|
+ this.search_change()
|
|
208
|
+ },
|
|
209
|
+ gzhCode () {
|
|
210
|
+ this.$loading(this.$loadingConfig);
|
|
211
|
+ this.$axios.get(this.URL.BASEURL + this.URL.wxad_getAuthUrl, {}).then((res) => {
|
|
212
|
+ console.log(res);
|
|
213
|
+ var res = res.data;
|
|
214
|
+ let a = document.createElement('a');
|
|
215
|
+ a.setAttribute('href', res);
|
|
216
|
+ a.setAttribute('target', '_blank');
|
|
217
|
+ a.setAttribute('id', 'gzh_startTelMedicine');
|
|
218
|
+ document.body.appendChild(a);
|
|
219
|
+ a.click();
|
|
220
|
+ document.body.removeChild(document.getElementById('gzh_startTelMedicine'));
|
|
221
|
+ this.$loading(this.$loadingConfig).close();
|
|
222
|
+
|
|
223
|
+ }).catch(() => {
|
|
224
|
+ this.$loading(this.$loadingConfig).close();
|
|
225
|
+ })
|
|
226
|
+ },
|
|
227
|
+ css_reset () {//公司名,多行样式
|
|
228
|
+ Array.prototype.slice.call(document.getElementsByClassName('corpItemCon')).forEach((ele, index) => {
|
|
229
|
+ if (ele.getElementsByClassName('corpName')[0].offsetHeight > 26) {
|
|
230
|
+ ele.classList.add('corpItemConMoreFont')
|
|
231
|
+ }
|
|
232
|
+ });
|
|
233
|
+ },
|
|
234
|
+ resetCorp (item) {//同步企业信息
|
|
235
|
+ this.$loading(this.$loadingConfig);
|
|
236
|
+ this.$axios.get(this.URL.BASEURL + this.URL.getCorCustomerList, {
|
|
237
|
+ params: {
|
|
238
|
+ corpid: item.corpid
|
|
239
|
+ }
|
|
240
|
+ }).then((res) => {
|
|
241
|
+ var res = res.data;
|
|
242
|
+ this.$loading(this.$loadingConfig).close();
|
|
243
|
+ if (res && res.errno == 0) {
|
|
244
|
+ this.$message({
|
|
245
|
+ message: '同步企业信息成功!',
|
|
246
|
+ type: 'warning'
|
|
247
|
+ })
|
|
248
|
+ } else {
|
|
249
|
+ this.$message({
|
|
250
|
+ message: res.err,
|
|
251
|
+ type: 'warning'
|
|
252
|
+ })
|
|
253
|
+ }
|
|
254
|
+ }).catch(() => {
|
|
255
|
+ this.$loading(this.$loadingConfig).close();
|
|
256
|
+ })
|
|
257
|
+ },
|
|
258
|
+ handleCurrentChange (val) {
|
|
259
|
+ this.gzh_init(val)
|
|
260
|
+ },
|
|
261
|
+ gzh_init (page) {
|
|
262
|
+ this.page = page ? page : this.page;
|
|
263
|
+ this.loading = true
|
|
264
|
+ this.$axios.get(this.URL.BASEURL + this.URL.adqAccount_list, {
|
|
265
|
+ params: {
|
|
266
|
+ is_select: 0, // 是否为下拉选择框 1是 0否
|
|
267
|
+ page: this.page,
|
|
268
|
+ page_size: this.page_size
|
|
269
|
+ }
|
|
270
|
+ }).then((res) => {
|
|
271
|
+ var res = res.data
|
|
272
|
+ this.loading = false
|
|
273
|
+ if (res && res.errno == 0) {
|
|
274
|
+ this.gzhData = res.rst.data;
|
|
275
|
+ this.total = res.rst.pageInfo.total;
|
|
276
|
+ this.pages = res.rst.pageInfo.pages;
|
|
277
|
+
|
|
278
|
+ // 回显选择
|
|
279
|
+ let page_multiple_data = [];
|
|
280
|
+ let multiple_id = this.multipleSelection[this.page] ? this.multipleSelection[this.page].map((v) => {
|
|
281
|
+ return v.wechat_account_id
|
|
282
|
+ }) : []
|
|
283
|
+ this.gzhData.forEach((item) => {
|
|
284
|
+ if (multiple_id.indexOf(item.wechat_account_id) != -1) {
|
|
285
|
+ page_multiple_data.push(item)
|
|
286
|
+ }
|
|
287
|
+ })
|
|
288
|
+ this.$nextTick(() => {
|
|
289
|
+ page_multiple_data.forEach((row) => {
|
|
290
|
+ this.$refs.multipleTable.toggleRowSelection(row, true);
|
|
291
|
+ })
|
|
292
|
+ })
|
|
293
|
+ } else if (res.errno != 4002) {
|
|
294
|
+ this.$message({
|
|
295
|
+ message: res.err,
|
|
296
|
+ type: "warning"
|
|
297
|
+ })
|
|
298
|
+ }
|
|
299
|
+ }).catch((err) => {
|
|
300
|
+ this.loading = false
|
|
301
|
+ });
|
|
302
|
+ },
|
|
303
|
+ }
|
|
304
|
+}
|
|
305
|
+</script>
|
|
306
|
+<style lang="scss" scoped>
|
|
307
|
+@import "@/style/list.scss";
|
|
308
|
+
|
|
309
|
+.corpListBox {
|
|
310
|
+ background: #fff;
|
|
311
|
+ display: flex;
|
|
312
|
+ flex-wrap: wrap;
|
|
313
|
+ padding: 8px;
|
|
314
|
+ .corpItem {
|
|
315
|
+ width: 23.3%;
|
|
316
|
+ height: 132px;
|
|
317
|
+ background: linear-gradient(147deg, #dbecfc 0%, #a6bfee 100%);
|
|
318
|
+ margin: 8px;
|
|
319
|
+ color: #383e47;
|
|
320
|
+ font-size: 15px;
|
|
321
|
+ line-height: 21px;
|
|
322
|
+ position: relative;
|
|
323
|
+ border-radius: 4px;
|
|
324
|
+ padding: 0 27px;
|
|
325
|
+ padding-left: 32px;
|
|
326
|
+ overflow: hidden;
|
|
327
|
+ .corpItemCon {
|
|
328
|
+ position: relative;
|
|
329
|
+ }
|
|
330
|
+ .corpMask {
|
|
331
|
+ width: 100%;
|
|
332
|
+ height: 100%;
|
|
333
|
+ background: #121111;
|
|
334
|
+ opacity: 0.19;
|
|
335
|
+ position: absolute;
|
|
336
|
+ top: 0;
|
|
337
|
+ left: 0;
|
|
338
|
+ z-index: 7;
|
|
339
|
+ }
|
|
340
|
+ .corpMask_jy {
|
|
341
|
+ opacity: 0.46;
|
|
342
|
+ }
|
|
343
|
+ .status {
|
|
344
|
+ color: #ffffff;
|
|
345
|
+ font-size: 12px;
|
|
346
|
+ line-height: 20px;
|
|
347
|
+ background: #00b38a;
|
|
348
|
+ text-align: center;
|
|
349
|
+ position: absolute;
|
|
350
|
+ top: 10px;
|
|
351
|
+ left: -24px;
|
|
352
|
+ width: 90px;
|
|
353
|
+ transform: rotate(-45deg);
|
|
354
|
+ }
|
|
355
|
+ .qx_status {
|
|
356
|
+ background: #9fa3a2;
|
|
357
|
+ }
|
|
358
|
+ .jy_status {
|
|
359
|
+ background: #f12912;
|
|
360
|
+ }
|
|
361
|
+ .refresh_button {
|
|
362
|
+ width: 64px;
|
|
363
|
+ height: 30px;
|
|
364
|
+ background: linear-gradient(139deg, #7daae5 0%, #4c78bd 100%);
|
|
365
|
+ border-radius: 15px;
|
|
366
|
+ color: #ffffff;
|
|
367
|
+ font-size: 15px;
|
|
368
|
+ border: none;
|
|
369
|
+ margin-top: 10px;
|
|
370
|
+ }
|
|
371
|
+ .corpName {
|
|
372
|
+ color: #44546b;
|
|
373
|
+ font-size: 21px;
|
|
374
|
+ line-height: 26px;
|
|
375
|
+ margin-top: 22px;
|
|
376
|
+ font-weight: bold;
|
|
377
|
+ }
|
|
378
|
+ .created_at {
|
|
379
|
+ color: #383e47;
|
|
380
|
+ font-size: 15px;
|
|
381
|
+ line-height: 21px;
|
|
382
|
+ margin-top: 3px;
|
|
383
|
+ }
|
|
384
|
+ .bgImg {
|
|
385
|
+ width: 112px;
|
|
386
|
+ position: absolute;
|
|
387
|
+ right: 0;
|
|
388
|
+ top: 10px;
|
|
389
|
+ }
|
|
390
|
+ }
|
|
391
|
+}
|
|
392
|
+.noHave {
|
|
393
|
+ margin: auto;
|
|
394
|
+ text-align: center;
|
|
395
|
+ padding-top: 10px;
|
|
396
|
+ padding-bottom: 100px;
|
|
397
|
+ img {
|
|
398
|
+ width: 300px;
|
|
399
|
+ margin: auto;
|
|
400
|
+ }
|
|
401
|
+ div {
|
|
402
|
+ font-size: 14px;
|
|
403
|
+ color: #666;
|
|
404
|
+ margin-top: 15px;
|
|
405
|
+ span {
|
|
406
|
+ color: #00b38a;
|
|
407
|
+ cursor: pointer;
|
|
408
|
+ font-weight: bold;
|
|
409
|
+ margin-left: 2px;
|
|
410
|
+ }
|
|
411
|
+ }
|
|
412
|
+}
|
|
413
|
+
|
|
414
|
+.corpListBox .corpItemConMoreFont {
|
|
415
|
+ .corpName {
|
|
416
|
+ font-size: 18px;
|
|
417
|
+ line-height: 22px;
|
|
418
|
+ }
|
|
419
|
+ .created_at {
|
|
420
|
+ font-size: 13px;
|
|
421
|
+ line-height: 18px;
|
|
422
|
+ }
|
|
423
|
+ .refresh_button {
|
|
424
|
+ height: 26px;
|
|
425
|
+ margin-top: 6px;
|
|
426
|
+ font-size: 14px;
|
|
427
|
+ }
|
|
428
|
+}
|
|
429
|
+.why {
|
|
430
|
+ font-size: 14px;
|
|
431
|
+ color: #00b38a;
|
|
432
|
+ cursor: pointer;
|
|
433
|
+ margin-right: 10px;
|
|
434
|
+}
|
|
435
|
+.button_line {
|
|
436
|
+ width: 1px;
|
|
437
|
+ height: 13px;
|
|
438
|
+ background: #ccc;
|
|
439
|
+ margin: 0 10px;
|
|
440
|
+}
|
|
441
|
+@media screen and (max-width: 1200px) {
|
|
442
|
+}
|
|
443
|
+</style>
|