Browse Source

feat: 企微数据 - adq授权 - 列表页面

zhengxy 2 years ago
parent
commit
649baa0346

BIN
.DS_Store


+ 111 - 0
project/src/components/dataBoard/adqAccount/accountReportConf.vue

@@ -0,0 +1,111 @@
1
+<template>
2
+  <div v-loading="loading" style="margin-top:-10px">
3
+    <div class="dialogCon">
4
+      <div class="itemBox">
5
+        <div class="name"><em>*</em>数据源ID:</div>
6
+        <el-input placeholder="请输入数据源ID" style="width:250px" v-model.trim="user_action_set_id" size="small" clearable>
7
+        </el-input>
8
+      </div>
9
+      <div class="itemBox">
10
+        <div class="name"><em>*</em>关联企微:</div>
11
+        <self-channel title="" width="250px" type='corpIdList' :afferent_value='corpid' @channelDefine="(val)=>{corpid = val;}"></self-channel>
12
+      </div>
13
+      <div class="itemBox">
14
+        <div class="name">渠道编号:</div>
15
+        <el-input placeholder="请输入渠道编号" style="width:250px" v-model.trim="channel" size="small" clearable></el-input>
16
+      </div>
17
+    </div>
18
+    <div slot="footer" class="dialog-footer">
19
+      <el-button size="mini" @click="$emit('returnReportRule')">取 消</el-button>
20
+      <el-button size="mini" type="primary" @click="submitEvent">确 定</el-button>
21
+    </div>
22
+  </div>
23
+</template>
24
+<script>
25
+import selfChannel from '@/components/assembly/screen/channel.vue'
26
+export default {
27
+  props: ['editData'],
28
+  components: {
29
+    selfChannel,
30
+  },
31
+  data () {
32
+    return {
33
+      corpid: '',
34
+      user_id: '',
35
+      time: [],
36
+      loading: false,
37
+      user_action_set_id: '',
38
+      channel: ''
39
+    }
40
+  },
41
+  created () {
42
+    if (this.editData && this.editData.wechat_account_id) {
43
+      this.corpid = this.editData.corp_id ? this.editData.corp_id : '';
44
+      this.user_action_set_id = this.editData.user_action_set_id ? this.editData.user_action_set_id : '';
45
+      this.channel = this.editData.channel ? this.editData.channel : '';
46
+    }
47
+  },
48
+  methods: {
49
+    submitEvent () {
50
+      if (this.user_action_set_id == '') {
51
+        this.$message({
52
+          message: '请输入数据源ID',
53
+          type: "warning"
54
+        })
55
+        return
56
+      }
57
+      if (this.corpid == '') {
58
+        this.$message({
59
+          message: '请选择关联企微',
60
+          type: "warning"
61
+        })
62
+        return
63
+      }
64
+      this.loading = true
65
+      let axios_api = this.URL.pitcher_setAccountReportConf
66
+      let params = {
67
+        user_action_set_id: this.user_action_set_id,
68
+        corpid: this.corpid,
69
+        app_id: this.editData.wechat_account_id,
70
+        channel: this.channel
71
+      }
72
+      this.$axios.post(this.URL.BASEURL + axios_api, params).then((res) => {
73
+        var res = res.data
74
+        this.loading = false
75
+        if (res && res.errno == 0) {
76
+          this.$emit('returnReportRule', 'update')
77
+        } else if (res.errno != 4002) {
78
+          this.$message({
79
+            message: res.err,
80
+            type: "warning"
81
+          })
82
+        }
83
+      }).catch((err) => {
84
+        this.loading = false
85
+      });
86
+    }
87
+  }
88
+}
89
+</script>
90
+<style lang="scss" scoped>
91
+.dialogCon {
92
+  .itemBox {
93
+    display: flex;
94
+    align-items: center;
95
+    margin-bottom: 10px;
96
+    .name {
97
+      width: 90px;
98
+      flex-wrap: nowrap;
99
+      text-align: right;
100
+      padding-right: 10px;
101
+      em {
102
+        color: red;
103
+      }
104
+    }
105
+  }
106
+}
107
+.dialog-footer {
108
+  text-align: center;
109
+  margin-top: 30px;
110
+}
111
+</style>

+ 136 - 0
project/src/components/dataBoard/adqAccount/addPitcher.vue

@@ -0,0 +1,136 @@
1
+<template>
2
+  <div v-loading="loading">
3
+    <div class="dialogCon">
4
+      <div class="itemBox">
5
+        <div class="name"><em>*</em>短剧:</div>
6
+        <self-channel title="" width="250px" type='dramaList' :afferent_value='drama_id' @channelDefine="(val)=>{drama_id = val;}"></self-channel>
7
+      </div>
8
+      <div class="itemBox">
9
+        <div class="name"><em>*</em>选择投手:</div>
10
+        <self-channel title="" width="250px" type='pitcher' :afferent_value='user_id' :afferent_params="{user_id:''}" @channelDefine="(val)=>{user_id = val;}"></self-channel>
11
+      </div>
12
+      <div class="itemBox">
13
+        <div class="name"><em>*</em>起止时间:</div>
14
+        <date-picker title="" width="250px" @changeTime="changeTime" :pickerOptions='{}' :afferent_time='time'></date-picker>
15
+      </div>
16
+      <div class="itemBox" style="margin-top:15px" v-if="editPitcher">
17
+        <div class="name"><em>*</em>是否启用:</div>
18
+        <el-switch v-model="enable" active-color="#43B083" inactive-color="#ccc"></el-switch>
19
+      </div>
20
+    </div>
21
+    <div slot="footer" class="dialog-footer">
22
+      <el-button size="mini" @click="$emit('returnAddPitcher')">取 消</el-button>
23
+      <el-button size="mini" type="primary" @click="submitEvent">确 定</el-button>
24
+    </div>
25
+  </div>
26
+</template>
27
+<script>
28
+import selfChannel from '@/components/assembly/screen/channel.vue'
29
+import datePicker from '@/components/assembly/screen/datePicker.vue'
30
+export default {
31
+  props: ['gzhData', 'editPitcher'],
32
+  components: {
33
+    selfChannel,
34
+    datePicker
35
+  },
36
+  data () {
37
+    return {
38
+      drama_id: '',
39
+      user_id: '',
40
+      time: [],
41
+      loading: false,
42
+      enable: true
43
+    }
44
+  },
45
+  created () {
46
+    if (this.editPitcher) {
47
+      this.drama_id = this.editPitcher.drama_id ? this.editPitcher.drama_id : '';
48
+      this.user_id = this.editPitcher.user_id ? this.editPitcher.user_id : '';
49
+      this.time = this.editPitcher.start_date && this.editPitcher.end_date ? [this.editPitcher.start_date, this.editPitcher.end_date] : [];
50
+      this.enable = this.editPitcher.enable == 1 ? true : false
51
+    }
52
+  },
53
+  methods: {
54
+    changeTime (time) {//筛选时间变化
55
+      if (!time || time && time.length == 0) {
56
+        this.time = []
57
+      } else {
58
+        this.time = time;
59
+      }
60
+    },
61
+    submitEvent () {
62
+      if (this.drama_id == '') {
63
+        this.$message({
64
+          message: '请选择短剧',
65
+          type: "warning"
66
+        })
67
+        return
68
+      }
69
+      if (this.user_id == '') {
70
+        this.$message({
71
+          message: '请选择投手',
72
+          type: "warning"
73
+        })
74
+        return
75
+      }
76
+      if (!this.time || this.time == '' || this.time.length == 0) {
77
+        this.$message({
78
+          message: '请选择起止时间',
79
+          type: "warning"
80
+        })
81
+        return
82
+      }
83
+      this.loading = true
84
+
85
+      let axios_api = this.URL.pitcher_bind
86
+      let params = {
87
+        drama_id: this.drama_id,
88
+        user_id: this.user_id,
89
+        start_date: this.time[0],
90
+        end_date: this.time[1]
91
+      }
92
+      if (this.editPitcher && this.editPitcher.drama_id) {
93
+        axios_api = this.URL.pitcher_relaEdit
94
+        params.rela_id = this.editPitcher.id
95
+        params.enable = this.enable ? 1 : 0
96
+      } else {
97
+        params.app_id = this.gzhData.wechat_account_id
98
+      }
99
+      this.$axios.post(this.URL.BASEURL + axios_api, params).then((res) => {
100
+        var res = res.data
101
+        this.loading = false
102
+        if (res && res.errno == 0) {
103
+          this.$emit('returnAddPitcher', 'update')
104
+        } else if (res.errno != 4002) {
105
+          this.$message({
106
+            message: res.err,
107
+            type: "warning"
108
+          })
109
+        }
110
+      }).catch((err) => {
111
+        this.loading = false
112
+      });
113
+    }
114
+  }
115
+}
116
+</script>
117
+<style lang="scss" scoped>
118
+.dialogCon {
119
+  .itemBox {
120
+    display: flex;
121
+    align-items: center;
122
+    margin-bottom: 10px;
123
+    .name {
124
+      width: 90px;
125
+      flex-wrap: nowrap;
126
+      em {
127
+        color: red;
128
+      }
129
+    }
130
+  }
131
+}
132
+.dialog-footer {
133
+  text-align: center;
134
+  margin-top: 30px;
135
+}
136
+</style>

+ 443 - 0
project/src/components/dataBoard/adqAccount/list.vue

@@ -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>

+ 132 - 0
project/src/components/dataBoard/adqAccount/pitcherList.vue

@@ -0,0 +1,132 @@
1
+<template>
2
+  <div v-loading="loading" class="container">
3
+    <el-table ref="multipleTable" :data="infoList" tooltip-effect="dark" style="width: 100%" :header-cell-style="headerColor">
4
+      <el-table-column prop="drama_name" label="短剧" show-overflow-tooltip align="center"></el-table-column>
5
+      <el-table-column prop="user_name" min-width="160" label="推手" show-overflow-tooltip align="center"></el-table-column>
6
+      <el-table-column min-width="200" label="日期" align="center">
7
+        <template slot-scope="scope">
8
+          <div>{{scope.row.start_date + ' - ' + scope.row.end_date}}</div>
9
+        </template>
10
+      </el-table-column>
11
+      <el-table-column label="状态" align="center">
12
+        <template slot-scope="scope">
13
+          <span v-if="scope.row.enable==1" class="c-448AFF">启用</span>
14
+          <span v-else class="c-F03F5C">禁用</span>
15
+        </template>
16
+      </el-table-column>
17
+      <el-table-column label="操作" min-width="160" align="center">
18
+        <template slot-scope="scope">
19
+          <el-button type="primary" size="mini" @click="editEvent(scope.row)">编辑</el-button>
20
+          <el-button type="danger" size="mini" v-if="scope.row.enable==1" @click="enableEvent(scope.row,0)">禁用</el-button>
21
+          <el-button type="primary" size="mini" v-else @click="enableEvent(scope.row,1)">启用</el-button>
22
+        </template>
23
+      </el-table-column>
24
+    </el-table>
25
+    <div class="pagination" v-show="total>0">
26
+      <el-pagination background :current-page="page" @current-change="handleCurrentChange" layout="prev, pager, next" :page-count='Number(pages)'>
27
+      </el-pagination>
28
+    </div>
29
+    <!-- 编辑投手 -->
30
+    <el-dialog class="dialogCon_permission" title="编辑投手" :visible.sync="editTsFlag" :append-to-body="true" width="400px">
31
+      <addPitcher :gzhData='gzhData' :editPitcher='editPitcher' v-if="editTsFlag" @returnAddPitcher="returnAddPitcher"></addPitcher>
32
+    </el-dialog>
33
+  </div>
34
+</template>
35
+<script>
36
+import addPitcher from './addPitcher.vue'
37
+export default {
38
+  props: ['gzhData'],
39
+  components: { addPitcher },
40
+  data () {
41
+    return {
42
+      infoList: [],
43
+      loading: false,
44
+      page: 1,
45
+      pages: 0,
46
+      total: 0,
47
+      page_size: 40,
48
+      editTsFlag: false,
49
+      editPitcher: {}
50
+    }
51
+  },
52
+  created () {
53
+    this.init(1)
54
+  },
55
+  methods: {
56
+    enableEvent (data, type) {//启用/禁用
57
+      this.loading = true
58
+      let params = {
59
+        drama_id: data.drama_id,
60
+        user_id: data.user_id,
61
+        start_date: data.start_date,
62
+        end_date: data.end_date,
63
+        rela_id: data.id,
64
+        enable: type
65
+      }
66
+      this.$axios.post(this.URL.BASEURL + this.URL.pitcher_relaEdit, params).then((res) => {
67
+        var res = res.data
68
+        this.loading = false
69
+        if (res && res.errno == 0) {
70
+          this.init(this.page)
71
+        } else if (res.errno != 4002) {
72
+          this.$message({
73
+            message: res.err,
74
+            type: "warning"
75
+          })
76
+        }
77
+      }).catch((err) => {
78
+        this.loading = false
79
+      });
80
+    },
81
+    editEvent (data) {
82
+      this.editPitcher = data;
83
+      this.editTsFlag = true
84
+    },
85
+    returnAddPitcher (val) {//编辑投手回调
86
+      this.editTsFlag = false
87
+      if (val == 'update') {
88
+        this.init(this.page)
89
+      }
90
+    },
91
+    init (page) {
92
+      this.page = page ? page : this.page;
93
+      this.loading = true
94
+      this.$axios.get(this.URL.BASEURL + this.URL.pitcher_index, {
95
+        params: {
96
+          app_id: this.gzhData.wechat_account_id,
97
+        }
98
+      }).then((res) => {
99
+        var res = res.data
100
+        this.loading = false
101
+        if (res && res.errno == 0) {
102
+          this.infoList = res.rst.data;
103
+          this.total = res.rst.pageInfo.total;
104
+          this.pages = res.rst.pageInfo.pages;
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
+    headerColor (rowIndex) {
119
+      if (rowIndex === 0) {
120
+        return { background: "#ebeef5", };
121
+      } else {
122
+        return { background: "#ebeef5", };
123
+      }
124
+    },
125
+  }
126
+}
127
+</script>
128
+<style lang="scss" scoped>
129
+.container {
130
+  padding: 0 10px;
131
+}
132
+</style>

+ 136 - 0
project/src/components/dataBoard/adqAccount/reportRule.vue

@@ -0,0 +1,136 @@
1
+<template>
2
+  <div v-loading="loading" style="margin-top:-10px">
3
+    <div class="dialogCon">
4
+      <div class="itemBox">
5
+        <div class="name"><em>*</em>回传方式:</div>
6
+        <self-channel title="" width="250px" type='wx_reportRule' :afferent_value='report_type' @channelDefine="(val)=>{report_type = val;}"></self-channel>
7
+      </div>
8
+      <div class="itemBox" style="margin-top:15px">
9
+        <div class="name"><em>*</em>是否启用:</div>
10
+        <el-switch v-model="enable" active-color="#43B083" inactive-color="#ccc"></el-switch>
11
+      </div>
12
+      <div class="itemBox" style="margin-top:15px">
13
+        <div class="name"><em>*</em>是否全量回传:</div>
14
+        <el-switch v-model="purchase_enable" active-color="#43B083" inactive-color="#ccc"></el-switch>
15
+      </div>
16
+      <div class="itemBox" style="margin-top:15px;align-items: baseline;">
17
+        <div class="name"><em>*</em>漏单回传
18
+          <el-tooltip placement="top">
19
+            <div slot="content">按照下单顺序,传3个单漏一个单<br />被漏单的用户进入回传黑名单,以后不参与任何形式的回传,并且在漏单回传的计数规则中不计数</div>
20
+            <i class="el-icon-question"></i>
21
+          </el-tooltip>:
22
+        </div>
23
+        <div>
24
+          <el-switch v-model="miss_enable" active-color="#43B083" inactive-color="#ccc"></el-switch>
25
+          <div class="flex-align-center f13" v-if="miss_enable">每<el-input class="miss_input" v-model="miss_setvale" style="width:60px;margin:8px 4px;" size="mini" type="number" placeholder="单数"></el-input>单 漏1单</div>
26
+        </div>
27
+      </div>
28
+    </div>
29
+    <div slot="footer" class="dialog-footer">
30
+      <el-button size="mini" @click="$emit('returnReportRule')">取 消</el-button>
31
+      <el-button size="mini" type="primary" @click="submitEvent">确 定</el-button>
32
+    </div>
33
+  </div>
34
+</template>
35
+<script>
36
+import selfChannel from '@/components/assembly/screen/channel.vue'
37
+export default {
38
+  props: ['app_ids', 'editData'],
39
+  components: {
40
+    selfChannel,
41
+  },
42
+  data () {
43
+    return {
44
+      report_type: '',
45
+      user_id: '',
46
+      time: [],
47
+      loading: false,
48
+      enable: true,
49
+      purchase_enable: true,
50
+      miss_enable: false,
51
+      miss_setvale: 3
52
+    }
53
+  },
54
+  created () {
55
+    if (this.editData && this.editData.wechat_account_id) {
56
+      this.report_type = this.editData.report_type ? this.editData.report_type : '';
57
+      this.purchase_enable = this.editData.purchase_enable == 1 ? true : false
58
+      this.miss_enable = this.editData.miss_enable == 1 ? true : false
59
+      this.miss_setvale = this.editData.miss_setvale
60
+      this.enable = this.editData.report_enable == 1 ? true : false
61
+    }
62
+  },
63
+  methods: {
64
+    submitEvent () {
65
+      if (this.report_type == '') {
66
+        this.$message({
67
+          message: '请选择回传方式',
68
+          type: "warning"
69
+        })
70
+        return
71
+      }
72
+      if (this.miss_enable && (!this.miss_setvale || this.miss_setvale == '')) {
73
+        this.$message({
74
+          message: '请输入漏单回传单数!',
75
+          type: "warning"
76
+        })
77
+        return
78
+      }
79
+      this.loading = true
80
+      let axios_api = this.URL.pitcher_setReportRule
81
+      let params = {
82
+        report_type: this.report_type,
83
+        app_ids: this.app_ids,
84
+        enable: this.enable ? 1 : 0,
85
+        purchase_enable: this.purchase_enable ? 1 : 0,
86
+        miss_enable: this.miss_enable ? 1 : 0,
87
+        miss_setvale: this.miss_setvale
88
+      }
89
+      this.$axios.post(this.URL.BASEURL + axios_api, params).then((res) => {
90
+        var res = res.data
91
+        this.loading = false
92
+        if (res && res.errno == 0) {
93
+          this.$emit('returnReportRule', 'update')
94
+        } else if (res.errno != 4002) {
95
+          this.$message({
96
+            message: res.err,
97
+            type: "warning"
98
+          })
99
+        }
100
+      }).catch((err) => {
101
+        this.loading = false
102
+      });
103
+    }
104
+  }
105
+}
106
+</script>
107
+<style lang="scss" scoped>
108
+.dialogCon {
109
+  .itemBox {
110
+    display: flex;
111
+    align-items: center;
112
+    margin-bottom: 10px;
113
+    .name {
114
+      width: 110px;
115
+      flex-wrap: nowrap;
116
+      text-align: right;
117
+      padding-right: 10px;
118
+      em {
119
+        color: red;
120
+      }
121
+    }
122
+  }
123
+}
124
+.dialog-footer {
125
+  text-align: center;
126
+  margin-top: 30px;
127
+}
128
+</style>
129
+<style lang="scss">
130
+.miss_input {
131
+  .el-input__inner {
132
+    padding: 0;
133
+    padding-left: 10px;
134
+  }
135
+}
136
+</style>

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

@@ -36,6 +36,7 @@ const regRangeReport = () => import(/* webpackChunkName: 'regRangeReport' */ '@/
36 36
 const dramaManage = () => import(/* webpackChunkName: 'dramaManage' */ '@/components/dataBoard/dramaManage.vue')
37 37
 const charge = () => import(/* webpackChunkName: 'charge' */ '@/components/orderManage/charge.vue')
38 38
 const wxAccountList = () => import(/* webpackChunkName: 'wxAccountList' */ '@/components/dataBoard/wxAccount/list.vue')
39
+const adqAccountList = () => import(/* webpackChunkName: 'adqAccountList' */ '@/components/dataBoard/adqAccount/list.vue')
39 40
 const thePublicTrend = () => import(/* webpackChunkName: 'thePublicTrend' */ '@/components/dataBoard/thePublicTrend.vue')
40 41
 const playletFansActTrend = () => import(/* webpackChunkName: 'playletFansActTrend' */ '@/components/dataBoard/playletFansActTrend.vue')
41 42
 const batchAddFriend = () => import(/* webpackChunkName: 'batchAddFriend' */ '@/components/marketingGuest/batchAddFriend/index.vue')
@@ -533,6 +534,17 @@ export var allRouter = [
533 534
           isData: true
534 535
         }
535 536
       },
537
+      {
538
+        path: 'adqAccountList',
539
+        name: 'adqAccountList',
540
+        component: adqAccountList,
541
+        meta: {
542
+          keepAlive: false,
543
+          isLogin: true,
544
+          title: 'ADQ账号授权',
545
+          isData: true
546
+        }
547
+      },
536 548
     ]
537 549
   }
538 550
 ]