Ver Código Fonte

投手数据对接口

liuxiaona 2 anos atrás
pai
commit
5b49b4d8bc

+ 11 - 12
.idea/workspace.xml

@@ -2,17 +2,14 @@
2 2
 <project version="4">
3 3
   <component name="ChangeListManager">
4 4
     <list default="true" id="326b77ef-a0bc-4d8a-bd1c-34c4541ee400" name="Changes" comment="">
5
-      <change afterPath="$PROJECT_DIR$/project/src/components/assembly/conTwo.vue" afterDir="false" />
6
-      <change afterPath="$PROJECT_DIR$/project/src/components/customOperate/createFriendsCircle.vue" afterDir="false" />
7
-      <change afterPath="$PROJECT_DIR$/project/src/components/customOperate/friendsCircle/fcList.vue" afterDir="false" />
8
-      <change afterPath="$PROJECT_DIR$/project/src/components/customOperate/friendsCircle/index.vue" afterDir="false" />
5
+      <change afterPath="$PROJECT_DIR$/project/src/components/assembly/screen/customerServiceFC.vue" afterDir="false" />
6
+      <change afterPath="$PROJECT_DIR$/project/src/components/dataBoard/throwPerson/index.vue" afterDir="false" />
9 7
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
10
-      <change beforePath="$PROJECT_DIR$/project/src/components/Index/index.vue" beforeDir="false" afterPath="$PROJECT_DIR$/project/src/components/Index/index.vue" afterDir="false" />
11
-      <change beforePath="$PROJECT_DIR$/project/src/components/assembly/screen/channel.vue" beforeDir="false" afterPath="$PROJECT_DIR$/project/src/components/assembly/screen/channel.vue" afterDir="false" />
8
+      <change beforePath="$PROJECT_DIR$/project/src/assets/config/interface_api.js" beforeDir="false" afterPath="$PROJECT_DIR$/project/src/assets/config/interface_api.js" afterDir="false" />
9
+      <change beforePath="$PROJECT_DIR$/project/src/components/assembly/screen/customerService.vue" beforeDir="false" afterPath="$PROJECT_DIR$/project/src/components/assembly/screen/customerService.vue" afterDir="false" />
10
+      <change beforePath="$PROJECT_DIR$/project/src/components/customOperate/createFriendsCircle.vue" beforeDir="false" afterPath="$PROJECT_DIR$/project/src/components/customOperate/createFriendsCircle.vue" afterDir="false" />
12 11
       <change beforePath="$PROJECT_DIR$/project/src/components/dataBoard/thePublic.vue" beforeDir="false" afterPath="$PROJECT_DIR$/project/src/components/dataBoard/thePublic.vue" afterDir="false" />
13
-      <change beforePath="$PROJECT_DIR$/project/src/components/dataBoard/throwPerson.vue" beforeDir="false" afterPath="$PROJECT_DIR$/project/src/components/dataBoard/throwPerson.vue" afterDir="false" />
14
-      <change beforePath="$PROJECT_DIR$/project/src/components/manage/memberManage.vue" beforeDir="false" afterPath="$PROJECT_DIR$/project/src/components/manage/memberManage.vue" afterDir="false" />
15
-      <change beforePath="$PROJECT_DIR$/project/src/components/orderManage/charge.vue" beforeDir="false" afterPath="$PROJECT_DIR$/project/src/components/orderManage/charge.vue" afterDir="false" />
12
+      <change beforePath="$PROJECT_DIR$/project/src/components/dataBoard/throwPerson.vue" beforeDir="false" />
16 13
       <change beforePath="$PROJECT_DIR$/project/src/router/allRouter.js" beforeDir="false" afterPath="$PROJECT_DIR$/project/src/router/allRouter.js" afterDir="false" />
17 14
     </list>
18 15
     <option name="SHOW_DIALOG" value="false" />
@@ -81,15 +78,16 @@
81 78
     <property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
82 79
     <property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
83 80
     <property name="WebServerToolWindowFactoryState" value="false" />
84
-    <property name="last_opened_file_path" value="$PROJECT_DIR$/project/src/components/customOperate/friendsCircle" />
81
+    <property name="last_opened_file_path" value="$PROJECT_DIR$/project/src/components/assembly/screen" />
85 82
     <property name="nodejs_package_manager_path" value="npm" />
86 83
     <property name="ts.external.directory.path" value="C:\Program Files (x86)\webstorm\WebStorm 2021.2.1\plugins\JavaScriptLanguage\jsLanguageServicesImpl\external" />
87 84
     <property name="vue.rearranger.settings.migration" value="true" />
88 85
   </component>
89 86
   <component name="RecentsManager">
90 87
     <key name="CopyFile.RECENT_KEYS">
91
-      <recent name="C:\projectCode\playlet\project\src\components\customOperate\friendsCircle" />
88
+      <recent name="C:\projectCode\playlet\project\src\components\assembly\screen" />
92 89
       <recent name="C:\projectCode\playlet\project\src\components\dataBoard" />
90
+      <recent name="C:\projectCode\playlet\project\src\components\customOperate\friendsCircle" />
93 91
       <recent name="C:\projectCode\playlet\project\src\components\detials" />
94 92
     </key>
95 93
   </component>
@@ -129,6 +127,7 @@
129 127
       <workItem from="1652406821567" duration="19587000" />
130 128
       <workItem from="1652617577799" duration="43000" />
131 129
       <workItem from="1652617650540" duration="272000" />
130
+      <workItem from="1653271650799" duration="18349000" />
132 131
     </task>
133 132
     <servers />
134 133
   </component>
@@ -158,7 +157,7 @@
158 157
     </layout>
159 158
   </component>
160 159
   <component name="TypeScriptGeneratedFilesManager">
161
-    <option name="version" value="1" />
160
+    <option name="version" value="3" />
162 161
   </component>
163 162
   <component name="Vcs.Log.Tabs.Properties">
164 163
     <option name="TAB_STATES">

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

@@ -114,7 +114,9 @@ var api = {
114 114
   officialTrendTotal: "/api/stat/officialTrendTotal",
115 115
   officialTrendList: "/api/stat/officialTrendList",
116 116
   activeFansData: "/api/statistics/activeFansData",
117
-  statistics_playletDataTrend: "/api/statistics/playletDataTrend"
117
+  statistics_playletDataTrend: "/api/statistics/playletDataTrend",
118
+  pitcherData: "/api/stat/pitcherData",
119
+
118 120
 };
119 121
 
120 122
 export { api };

+ 11 - 4
project/src/components/assembly/screen/customerService.vue

@@ -2,8 +2,14 @@
2 2
   <div class="common-screen-item">
3 3
     <label class="common-screen-label" v-if="title&&title!=''">{{title}}</label>
4 4
     <el-popover placement="bottom" trigger="click" v-model="visible" :disabled="disabled">
5
-      <div :style="width?'width:'+width:''" :class="['common-screen-self-box','common-input-select',final_result&&final_result.length!=0&&clearable&&!disabled?'common-input-select-hover':'',disabled?'pointer-drop':'']" slot="reference">
6
-        <div :class="['common-screen-self-con',!final_result||final_result.length==0?'common-screen-self-placeholder':'']">
5
+      <div :style="width?'width:'+width:''"
6
+           :class="['common-screen-self-box',
7
+           'common-input-select',
8
+           final_result&&final_result.length!=0&&clearable&&!disabled?'common-input-select-hover':'',
9
+           disabled?'pointer-drop':'']"
10
+           slot="reference">
11
+        <div :class="['common-screen-self-con',
12
+        !final_result||final_result.length==0?'common-screen-self-placeholder':'']">
7 13
           <div class="common-screen-self-con-div">
8 14
             <span v-if="!final_result||final_result.length==0">请选择</span>
9 15
             <template v-else>
@@ -33,7 +39,8 @@
33 39
                     </div>
34 40
                     <div :class="['checkbox',item.is_select?'checkbox_active':'']"><i class="el-icon-check"></i></div>
35 41
                   </div>
36
-                  <div class="memberItem" :style="item.is_open?'display:none':''" v-for="(item1,user_index) in item.user_list" :key="item1.user_id" @click="selectUserEvent('user',index,user_index)">
42
+                  <div class="memberItem" :style="item.is_open?'display:none':''"
43
+                       v-for="(item1,user_index) in item.user_list" :key="item1.user_id" @click="selectUserEvent('user',index,user_index)">
37 44
                     <div class="flex" style="flex:1">
38 45
                       <img class="memberImg" :src="item1.avatar" alt="">
39 46
                       <div class="memberInfo">
@@ -466,4 +473,4 @@ export default {
466 473
   text-align: right;
467 474
   padding: 20px 0 10px;
468 475
 }
469
-</style>
476
+</style>

+ 137 - 0
project/src/components/assembly/screen/customerServiceFC.vue

@@ -0,0 +1,137 @@
1
+<template>
2
+  <div class="conBox">
3
+    <el-popover trigger="click">
4
+      <div class="popCon">
5
+        <div class="con_left">
6
+          <el-input placeholder="请搜索" size="mini" v-model="searchWord">
7
+            <template slot="append"><i class="el-icon-search pointer"></i></template>
8
+          </el-input>
9
+          <div class="userTotal">全部成员: ({{userTotal}})</div>
10
+
11
+          <div class="userTree">
12
+            <div class="parentBox" v-for="item in userList" :key="item.department_id">
13
+              <div class="departInfo">
14
+                <i class="el-icon-caret-bottom"></i>
15
+                <div>
16
+                  <i class="el-icon-s-cooperation"></i>
17
+                  <span>{{item.department_name}}</span>
18
+                </div>
19
+                <span class="check">
20
+                  <i v-if="false" class="el-icon-check"></i>
21
+                </span>
22
+              </div>
23
+
24
+              <div class="userInfo" v-for="user in item.user_list" :key="user.user_id">
25
+                <img :src="user.avatar" alt="" style="width: 40px;margin-right: 10px">
26
+                <div>
27
+                  <div>{{user.name}}</div>
28
+                  <div>
29
+                    <span v-for="depart in user.department_list">{{depart}}</span>
30
+                  </div>
31
+                </div>
32
+                <span class="check">
33
+                  <i v-if="false" class="el-icon-check"></i>
34
+                </span>
35
+
36
+              </div>
37
+            </div>
38
+          </div>
39
+        </div>
40
+        <div class="con_right"></div>
41
+      </div>
42
+
43
+      <div slot="reference">
44
+        <el-input placeholder="请选择" size="mini" v-model="showSelectUsers_val">
45
+          <template slot="append"><i class="el-icon-arrow-down pointer"></i></template>
46
+        </el-input>
47
+      </div>
48
+    </el-popover>
49
+  </div>
50
+</template>
51
+<script>
52
+export default {
53
+  props: {
54
+
55
+  },
56
+  watch: {
57
+
58
+  },
59
+  data () {
60
+    return {
61
+      loading:false,
62
+      userList:[],
63
+      userTotal:'',
64
+      showSelectUsers_val:'',
65
+      searchWord:''
66
+    }
67
+  },
68
+  created () {
69
+    this.init()
70
+
71
+  },
72
+  methods: {
73
+    init () {
74
+      this.loading = true
75
+      this.$axios.get(this.URL.BASEURL + this.URL.userList, {
76
+        params: {
77
+          // user_name: this.input_keyword
78
+        }
79
+      }).then((res) => {
80
+        var res = res.data
81
+        this.loading = false
82
+        if (res && res.errno == 0) {
83
+          this.userList = res.rst.list;
84
+          this.userTotal = res.rst.count
85
+        } else if (res.errno != 4002) {
86
+          this.$message({
87
+            message: res.err,
88
+            type: "warning"
89
+          })
90
+        }
91
+      }).catch((err) => {
92
+        this.loading = false
93
+      });
94
+    },
95
+  }
96
+}
97
+</script>
98
+<style lang="scss" scoped>
99
+.popCon{
100
+  width: 100%;
101
+  //padding: 30px 22px;
102
+  font-size: 14px;
103
+  .con_left{
104
+    border-right:1px solid #C3CBD6;
105
+    height: 100%;
106
+    padding-right: 10px;
107
+    .userTotal{
108
+      color: #666666;
109
+      margin: 17px 0 10px;
110
+      font-size: 14px;
111
+    }
112
+    .userTree{
113
+      .parentBox{
114
+        margin-top: 15px;
115
+        .departInfo{
116
+          display: flex;
117
+          align-items: center;
118
+        }
119
+        .userInfo{
120
+          margin-top: 10px;
121
+          display: flex;
122
+          align-items: center;
123
+          margin-left: 20px;
124
+        }
125
+      }
126
+      .check{
127
+        display: inline-block;
128
+        width: 14px;
129
+        height: 14px;
130
+        border-radius: 50%;
131
+        border: 1px solid #666;
132
+        margin-left: auto;
133
+      }
134
+    }
135
+  }
136
+}
137
+</style>

+ 20 - 69
project/src/components/customOperate/createFriendsCircle.vue

@@ -26,13 +26,17 @@
26 26
 
27 27
       <h3 class="bigTitle">编辑朋友圈</h3>
28 28
       <div class="regulations">
29
+        <label><em>*</em>朋友圈主题</label>
30
+        <el-input placeholder="例:活动推送/拉新等" style="width:300px" v-model.trim="themeName" clearable size="small"></el-input>
31
+      </div>
32
+      <div class="regulations">
29 33
         <label><em>*</em>发表成员:</label>
30 34
         <div>
31 35
           <div style="display:flex">
32 36
             <el-radio :disabled="!editFlag" v-model="is_for_all" :label="1">全部员工</el-radio>
33 37
             <el-radio :disabled="!editFlag" v-model="is_for_all" :label="0">部分员工</el-radio>
34 38
           </div>
35
-          <self-customerservice :disabled="!editFlag" v-if="is_for_all==0" title='' width="300px" :afferent_users='user_id_list' @customerDefine="(val)=>{user_id_list=val;}"></self-customerservice>
39
+          <self-customerservice-f-c :disabled="!editFlag" v-if="is_for_all==0" title='' width="300px" :afferent_users='user_id_list' @customerDefine="(val)=>{user_id_list=val;}" style="margin-top: 10px"></self-customerservice-f-c>
36 40
         </div>
37 41
       </div>
38 42
       <div class="regulations">
@@ -42,29 +46,8 @@
42 46
             <el-radio v-model="customer_filter" :disabled="!editFlag" :label="0" @change="changeEvent">全部客户</el-radio>
43 47
             <el-radio v-model="customer_filter" :disabled="!editFlag" :label="1" @change="changeEvent">筛选客户</el-radio>
44 48
           </div>
45
-          <div class="screeningCustomers" v-if="customer_filter==1">
46
-            <div class="screeningItem">
47
-              <label>性别:</label>
48
-              <el-radio v-model="gender" :disabled="!editFlag" :label="3" @change="changeEvent">全部性别</el-radio>
49
-              <el-radio v-model="gender" :disabled="!editFlag" :label="1" @change="changeEvent">仅男性粉丝</el-radio>
50
-              <el-radio v-model="gender" :disabled="!editFlag" :label="2" @change="changeEvent">仅女性粉丝</el-radio>
51
-              <el-radio v-model="gender" :disabled="!editFlag" :label="0" @change="changeEvent">未知性别</el-radio>
52
-            </div>
53
-            <div class="screeningItem">
54
-              <label>添加时间:</label>
55
-              <date-picker title="" width="355px" :disabled="!editFlag" :timeFlag="true" :afferent_time='afferent_time' :reset='resetFlag' @changeTime="changeTime" style="margin:0"></date-picker>
56
-            </div>
57
-            <div class="screeningItem">
58
-              <label>标签:</label>
59
-              <enterprise-tag title="" width="355px" :disabled="!editFlag" :afferent_obj='afferent_tag_obj' :reset='resetFlag' @tagDefine="tagDefine" style="margin:0"></enterprise-tag>
60
-            </div>
61
-            <div class="screeningItem" style="align-items: flex-start;">
62
-              <label>排除客户:</label>
63
-              <div style="flex:1">
64
-                <enterprise-tag title="" width="355px" :disabled="!editFlag" :afferent_obj='afferent_exclude_tag_obj' :excludeFlag="true" :reset='resetFlag' @tagDefine="exclude_tagDefine" style="margin:0"></enterprise-tag>
65
-                <p class="screening-hint">可根据标签选择客户,群发时将不会发送给该标签内的客户。若选择了排除的客户,需要较长时间创建本条群发消息哦~</p>
66
-              </div>
67
-            </div>
49
+          <div class="" v-if="customer_filter==1">
50
+            <enterprise-tag title="" width="300px" :disabled="!editFlag" :afferent_obj='afferent_tag_obj' :reset='resetFlag' @tagDefine="tagDefine" style="margin:0;margin-top: 10px"></enterprise-tag>
68 51
           </div>
69 52
           <div class="customer_all">将群发消息给{{customer_filter==0?'全部客户的':customer_filter==1?'筛选客户的':''}}
70 53
             <span @click="massMsg_customerMatchCount" v-if="isLookCount" class="pointer"><i class="el-icon-loading" v-if="customerMatchCountLoading"></i> {{!customerMatchCountLoading?'查看':''}}</span>
@@ -131,7 +114,7 @@
131 114
   </div>
132 115
 </template>
133 116
 <script>
134
-import selfCustomerservice from '@/components/assembly/screen/customerService.vue'
117
+import selfCustomerserviceFC from '@/components/assembly/screen/customerServiceFC.vue'
135 118
 import editCon from '@/components/assembly/editCon.vue'
136 119
 import welcomEdit from '@/components/assembly/welcom_edit.vue'
137 120
 import enterpriseTag from '@/components/assembly/screen/enterpriseTag.vue'
@@ -139,7 +122,7 @@ import datePicker from '@/components/assembly/screen/datePicker.vue'
139 122
 import conTwo from '@/components/assembly/conTwo.vue'
140 123
 export default {
141 124
   name:'createFriendsCircle',
142
-  components: { selfCustomerservice, editCon, welcomEdit, enterpriseTag, datePicker, conTwo },
125
+  components: { selfCustomerserviceFC, editCon, welcomEdit, enterpriseTag, datePicker, conTwo },
143 126
   data () {
144 127
     return {
145 128
       loading: false,
@@ -173,16 +156,12 @@ export default {
173 156
       customerMatchCountLoading: false,
174 157
       isLookCount: true,//是否查看群发的客户数
175 158
       msg_count: '',
176
-      afferent_exclude_tag_obj: {
177
-        tag_id_list: [],
178
-        tag: 1
179
-      },
159
+
180 160
       afferent_tag_obj: {
181 161
         tag_id_list: [],
182 162
         tag: 1
183 163
       },
184 164
       resetFlag: false,
185
-      afferent_time: [],
186 165
       send_type:1,
187 166
       processFlag: false,
188 167
       send_time: {
@@ -216,7 +195,8 @@ export default {
216 195
         }]
217 196
       },
218 197
       content1:'',
219
-      con_type:0
198
+      con_type:0,
199
+      themeName:''
220 200
     }
221 201
   },
222 202
   created () {
@@ -230,14 +210,6 @@ export default {
230 210
     changeEvent () {
231 211
       this.isLookCount = true
232 212
     },
233
-    changeTime (time) {//筛选时间变化
234
-      this.isLookCount = true
235
-      if (!time || time && time.length == 0) {
236
-        this.afferent_time = [];
237
-      } else {
238
-        this.afferent_time = time;
239
-      }
240
-    },
241 213
     tagDefine (data) {//标签选择回调
242 214
       this.isLookCount = true
243 215
       if (data.tag == 1 || data.tag == 2) {
@@ -259,27 +231,6 @@ export default {
259 231
         }
260 232
       }
261 233
     },
262
-    exclude_tagDefine (data) {//排除标签回掉
263
-      this.isLookCount = true
264
-      if (data.tag == 1 || data.tag == 2) {
265
-        if (data.tag_id_list && data.tag_id_list.length != 0) {
266
-          this.exclude_tag_info = {
267
-            tag_id_list: data.tag_id_list,
268
-            tag_type: data.tag
269
-          }
270
-        } else {
271
-          this.exclude_tag_info = {
272
-            tag_id_list: [],
273
-            tag_type: 0
274
-          }
275
-        }
276
-      } else {
277
-        this.exclude_tag_info = {
278
-          tag_id_list: [],
279
-          tag_type: data.tag
280
-        }
281
-      }
282
-    },
283 234
     massMsg_customerMatchCount () {//群发规则匹配客户数查询
284 235
       if (this.customerMatchCountLoading) return;
285 236
       this.customerMatchCountLoading = true;
@@ -287,14 +238,14 @@ export default {
287 238
         senders: this.is_for_all == 0 ? this.user_id_list.join(',') : '',
288 239
         customer_filter: this.customer_filter
289 240
       }
290
-      if (this.customer_filter == 1) {//筛选客户
291
-        params.gender = this.gender;
292
-        params.add_time_start = this.afferent_time && this.afferent_time.length > 1 ? this.afferent_time[0] : '';
293
-        params.add_time_end = this.afferent_time && this.afferent_time.length > 1 ? this.afferent_time[1] : '';
294
-        params.tag_screen_type = this.tag_info && this.tag_info.tag_type ? this.tag_info.tag_type : 0;
295
-        params.tag_list = this.tag_info && this.tag_info.tag_id_list ? this.tag_info.tag_id_list.join(',') : '';
296
-        params.exclude_tag_list = this.exclude_tag_info && this.exclude_tag_info.tag_id_list ? this.exclude_tag_info.tag_id_list.join(',') : '';
297
-      }
241
+      // if (this.customer_filter == 1) {//筛选客户
242
+      //   params.gender = this.gender;
243
+      //   params.add_time_start = this.afferent_time && this.afferent_time.length > 1 ? this.afferent_time[0] : '';
244
+      //   params.add_time_end = this.afferent_time && this.afferent_time.length > 1 ? this.afferent_time[1] : '';
245
+      //   params.tag_screen_type = this.tag_info && this.tag_info.tag_type ? this.tag_info.tag_type : 0;
246
+      //   params.tag_list = this.tag_info && this.tag_info.tag_id_list ? this.tag_info.tag_id_list.join(',') : '';
247
+      //   params.exclude_tag_list = this.exclude_tag_info && this.exclude_tag_info.tag_id_list ? this.exclude_tag_info.tag_id_list.join(',') : '';
248
+      // }
298 249
       this.$axios.get(this.URL.BASEURL + this.URL.massMsg_customerMatchCount, {
299 250
         params
300 251
       }).then((res) => {

+ 4 - 2
project/src/components/dataBoard/thePublic.vue

@@ -80,9 +80,11 @@
80 80
       </div>
81 81
     </div>
82 82
     <ux-grid ref="plxTable" :border="false" @row-click="()=>{return}" :header-cell-style="()=>{return { backgroundColor: '#FFFFFF !important', border: 'none!important' }}" :height="height" show-footer-overflow="tooltip" show-overflow="tooltip" size="mini">
83
-      <ux-table-column v-for="item in desCol" :key="item.prop" :resizable="true" :field="item.prop" :title="item.label" :min-width="item.min_width?item.min_width:120" :fixed="item.fixed?item.fixed:''" align="center">
83
+      <ux-table-column v-for="item in desCol" :key="item.prop" :resizable="true" :field="item.prop" :title="item.label"
84
+                       :min-width="item.min_width?item.min_width:120" :fixed="item.fixed?item.fixed:''" align="center">
84 85
         <template #header>
85
-          <div :class="['flex-align-jus-center',item.sort?'pointer':'',sort_field==item.prop?'sortFieldStyle':'']"
86
+          <div
87
+            :class="['flex-align-jus-center',item.sort?'pointer':'',sort_field==item.prop?'sortFieldStyle':'']"
86 88
                @click="item.sort?sortFieldEvent(item.prop):''">
87 89
             {{item.label}}
88 90
             <i class="el-icon-caret-bottom" v-if="item.sort"></i>

+ 35 - 0
project/src/components/dataBoard/throwPerson/index.vue

@@ -0,0 +1,35 @@
1
+<template>
2
+  <div>
3
+    <div class="topTagBox flex">
4
+      <div class="left flex-align-center">
5
+        <div :class="['tagItem',tagType==2?'tagItem_active':'']" @click="changeType(2);">投手投放数据</div>
6
+        <div :class="['tagItem',tagType==1?'tagItem_active':'']" @click="changeType(1);">投手数据</div>
7
+      </div>
8
+    </div>
9
+    <throwPersonPuton v-if="tagType==2"></throwPersonPuton>
10
+    <throwPersonSon v-if="tagType==1"></throwPersonSon>
11
+  </div>
12
+</template>
13
+
14
+<script>
15
+import throwPersonSon from './throwPersonSon.vue'
16
+import throwPersonPuton from './throwPersonPuton.vue'
17
+export default {
18
+  components: { throwPersonSon, throwPersonPuton },
19
+  name: "index",
20
+  data () {
21
+    return {
22
+      tagType:2,
23
+    }
24
+  },
25
+  methods:{
26
+    changeType(type){
27
+      this.tagType = type
28
+    },
29
+  }
30
+}
31
+</script>
32
+
33
+<style scoped>
34
+
35
+</style>

+ 25 - 74
project/src/components/dataBoard/throwPerson.vue

@@ -1,12 +1,6 @@
1 1
 <template>
2
-  <div>
3
-    <div class="topTagBox flex">
4
-      <div class="left flex-align-center">
5
-        <div :class="['tagItem',tagType==2?'tagItem_active':'']" @click="changeType(2);">投手投放数据</div>
6
-        <div :class="['tagItem',tagType==1?'tagItem_active':'']" @click="changeType(1);">投手数据</div>
7
-      </div>
8
-    </div>
9
-    <div class="screenBox flex" v-loading="gl_loading">
2
+  <div v-loading="loading">
3
+    <div class="screenBox flex">
10 4
       <div class="flex">
11 5
         <date-picker title="自定义" :quickFlag='true' :afferent_time="default_time" :clearFlag='false' @changeTime="changeTime"></date-picker>
12 6
         <self-channel title="投手" type='pitcher' :labelWidth="true" :afferent_params="{corp_id:''}" @channelDefine="(val)=>{user_id = val;stat_throwPersonData();init(1)}"></self-channel>
@@ -51,47 +45,24 @@
51 45
         <div class="dataItem-data">{{dataInfo&&(dataInfo.recall_rate||dataInfo.recall_rate==0)?dataInfo.recall_rate+'%':'-'}}</div>
52 46
       </div>
53 47
     </div>
54
-    <div v-if="tagType==2" v-loading="loading">
55
-      <ux-grid class="uxGridBox" ref="plxTable" :border="false" @row-click="()=>{return}" :header-cell-style="headerColor" :height="height" show-footer-overflow="tooltip" show-overflow="tooltip" size="mini">
56
-        <ux-table-column v-for="item in desCol" :key="item.prop" :resizable="true" :field="item.prop" :title="item.label" :min-width="item.min_width?item.min_width:120" :fixed="item.fixed?item.fixed:''" align="center">
57
-          <template #header>
58
-            <div class="flex-align-jus-center" >
59
-              {{item.label}}
60
-              <el-tooltip v-if="item.notes" :content="item.notes" placement="top">
61
-                <div><i class="el-icon-question"></i></div>
62
-              </el-tooltip>
63
-            </div>
64
-          </template>
65
-          <template v-slot="{ row }">
66
-            <span>{{row[item.prop]||row[item.prop]==0?$formatNum(row[item.prop]):'-' }}</span>
67
-          </template>
68
-        </ux-table-column>
69
-      </ux-grid>
70
-      <div class="pagination" v-show="total>0">
71
-        <el-pagination background :current-page="page" @current-change="handleCurrentChange" layout="prev, pager, next" :page-count='Number(pages)'>
72
-        </el-pagination>
73
-      </div>
74
-    </div>
75
-    <div v-if="tagType==1" v-loading="loading">
76
-      <ux-grid class="uxGridBox" ref="plxTable" :border="false" @row-click="()=>{return}" :header-cell-style="headerColor" :height="height" show-footer-overflow="tooltip" show-overflow="tooltip" size="mini">
77
-        <ux-table-column v-for="item in desCol" :key="item.prop" :resizable="true" :field="item.prop" :title="item.label" :min-width="item.min_width?item.min_width:120" :fixed="item.fixed?item.fixed:''" align="center">
78
-          <template #header>
79
-            <div class="flex-align-jus-center" >
80
-              {{item.label}}
81
-              <el-tooltip v-if="item.notes" :content="item.notes" placement="top">
82
-                <div><i class="el-icon-question"></i></div>
83
-              </el-tooltip>
84
-            </div>
85
-          </template>
86
-          <template v-slot="{ row }">
87
-            <span>{{row[item.prop]||row[item.prop]==0?$formatNum(row[item.prop]):'-' }}</span>
88
-          </template>
89
-        </ux-table-column>
90
-      </ux-grid>
91
-      <div class="pagination" v-show="total>0">
92
-        <el-pagination background :current-page="page" @current-change="handleCurrentChange" layout="prev, pager, next" :page-count='Number(pages)'>
93
-        </el-pagination>
94
-      </div>
48
+    <ux-grid class="uxGridBox" ref="plxTable" :border="false" @row-click="()=>{return}" :header-cell-style="headerColor" :height="height" show-footer-overflow="tooltip" show-overflow="tooltip" size="mini">
49
+      <ux-table-column v-for="item in desCol" :key="item.prop" :resizable="true" :field="item.prop" :title="item.label" :min-width="item.min_width?item.min_width:120" :fixed="item.fixed?item.fixed:''" align="center">
50
+        <template #header>
51
+          <div class="flex-align-jus-center" >
52
+            {{item.label}}
53
+            <el-tooltip v-if="item.notes" :content="item.notes" placement="top">
54
+              <div><i class="el-icon-question"></i></div>
55
+            </el-tooltip>
56
+          </div>
57
+        </template>
58
+        <template v-slot="{ row }">
59
+          <span>{{row[item.prop]||row[item.prop]==0?$formatNum(row[item.prop]):'-' }}</span>
60
+        </template>
61
+      </ux-table-column>
62
+    </ux-grid>
63
+    <div class="pagination" v-show="total>0">
64
+      <el-pagination background :current-page="page" @current-change="handleCurrentChange" layout="prev, pager, next" :page-count='Number(pages)'>
65
+      </el-pagination>
95 66
     </div>
96 67
   </div>
97 68
 </template>
@@ -114,10 +85,7 @@ export default {
114 85
       user_id: '',
115 86
       drama_id: '',
116 87
       gl_loading: false,
117
-      desCol: [],
118
-      height: '',
119
-      tagType:2,
120
-      tagType2:[
88
+      desCol: [
121 89
         { prop: "playletTitle", label: "剧集", min_width: 160, fixed: 'left' },
122 90
         { prop: "account_name", label: "公众号", min_width: 160 },
123 91
         { prop: "user_name", label: "投手", min_width: 160 },
@@ -129,34 +97,17 @@ export default {
129 97
         { prop: "profile", label: "总毛利额", notes: '总毛利额=累计充值-累计消耗' },
130 98
         { prop: "recall_rate", label: "回本率%", notes: '回本率=累计充值/累计消耗' },
131 99
       ],
132
-      tagType1:[
133
-        { prop: "user_name", label: "投手", min_width: 160, fixed: 'left'  },
134
-        { prop: "playletTitle", label: "投放天数", min_width: 160, sort: true},
135
-        { prop: "account_name", label: "投放公众号数", min_width: 160, sort: true },
136
-        { prop: "cost", label: "累计消耗",sort: true },
137
-        { prop: "pay_money", label: "累计充值",sort: true },
138
-        { prop: "first_day_roi", label: "首日ROI", notes: '首日ROI=当日新用户充值之和/累计消耗',sort: true },
139
-        { prop: "profile", label: "总毛利额", notes: '总毛利额=累计充值-累计消耗',sort: true },
140
-        { prop: "recall_rate", label: "回本率%", notes: '回本率=累计充值/累计消耗',sort: true },
141
-      ]
100
+      height: '',
101
+      tagType:2,
142 102
     }
143 103
   },
144 104
   created () {
145
-    this.desCol = this.tagType2
146
-    this.height = document.documentElement.clientHeight - 280 > 400 ? document.documentElement.clientHeight - 280 : 400
105
+    this.height = document.documentElement.clientHeight - 340 > 400 ? document.documentElement.clientHeight - 340 : 400
147 106
     this.time = this.default_time
148 107
     this.stat_throwPersonData()
149 108
     this.init(1)
150 109
   },
151 110
   methods: {
152
-    changeType(type){
153
-      this.tagType = type
154
-      // this.desCol = []
155
-      // this.desCol = type == 2 ?this.tagType2 :this.tagType1
156
-      // this.init(1)
157
-      // console.log(this.desCol);
158
-      // this.$forceUpdate()
159
-    },
160 111
     headerColor ({ row, column, rowIndex, columnIndex }) {
161 112
       return { backgroundColor: '#FFFFFF !important', border: 'none!important' }
162 113
     },
@@ -260,7 +211,7 @@ export default {
260 211
           sheetName: ''// 表一的sheet名字
261 212
         }
262 213
       ]
263
-      this.$exportOrder({ excelDatas, name: `投手数据(导出时间:${this.$getDay(0)})` })
214
+      this.$exportOrder({ excelDatas, name: `投手投放数据(导出时间:${this.$getDay(0)})` })
264 215
     }
265 216
   }
266 217
 }

+ 237 - 0
project/src/components/dataBoard/throwPerson/throwPersonSon.vue

@@ -0,0 +1,237 @@
1
+<template>
2
+  <div v-loading="loading">
3
+    <div class="screenBox flex" v-loading="gl_loading">
4
+      <div class="flex">
5
+        <date-picker title="自定义" :quickFlag='true' :afferent_time="default_time" :clearFlag='false' @changeTime="changeTime"></date-picker>
6
+        <self-channel title="投手" type='pitcher' :labelWidth="true" :afferent_params="{corp_id:''}" @channelDefine="(val)=>{user_id = val;init(1)}"></self-channel>
7
+      </div>
8
+      <el-button type="primary" size="mini" @click="init(1,'export')">导出Excel</el-button>
9
+    </div>
10
+    <div class="dataInfoBox">
11
+      <div class="dataInfoItem">
12
+        <div class="dataItemTitle">
13
+          <img src="@/assets/img/icon/累计消耗@2x.png" style="height:14px" class="titleIcon" alt="">
14
+          <span>累计消耗</span>
15
+        </div>
16
+        <div class="dataItem-data">{{dataInfo&&(dataInfo.sum_paid||dataInfo.sum_paid==0)?$formatNum(dataInfo.sum_paid):'-'}}</div>
17
+      </div>
18
+      <div class="dataInfoItem">
19
+        <div class="dataItemTitle">
20
+          <img src="@/assets/img/icon/累计充值@2x.png" style="height:18px" class="titleIcon" alt="">
21
+          <span>累计充值</span>
22
+        </div>
23
+        <div class="dataItem-data">{{dataInfo&&(dataInfo.sum_charge||dataInfo.sum_charge==0)?$formatNum(dataInfo.sum_charge):'-'}}</div>
24
+      </div>
25
+      <div class="dataInfoItem">
26
+        <div class="dataItemTitle">
27
+          <img src="@/assets/img/icon/roi@2x.png" class="titleIcon" alt="">
28
+          <span>首日ROI</span>
29
+        </div>
30
+        <div class="dataItem-data">{{dataInfo&&(dataInfo.sum_roi||dataInfo.sum_roi==0)?dataInfo.sum_roi:'-'}}</div>
31
+      </div>
32
+      <div class="dataInfoItem">
33
+        <div class="dataItemTitle">
34
+          <img src="@/assets/img/icon/总毛利润额@2x.png" style="height:14px" class="titleIcon" alt="">
35
+          <span>总毛利润额</span>
36
+        </div>
37
+        <div class="dataItem-data">{{dataInfo&&(dataInfo.sum_profit||dataInfo.sum_profit==0)?$formatNum(dataInfo.sum_profit):'-'}}</div>
38
+      </div>
39
+      <div class="dataInfoItem">
40
+        <div class="dataItemTitle">
41
+          <img src="@/assets/img/icon/回本率@2x.png" class="titleIcon" alt="">
42
+          <span>回本率</span>
43
+        </div>
44
+        <div class="dataItem-data">{{dataInfo&&(dataInfo.sum_recover_rate||dataInfo.sum_recover_rate==0)?dataInfo.sum_recover_rate+'%':'-'}}</div>
45
+      </div>
46
+    </div>
47
+    <ux-grid class="uxGridBox" ref="plxTable" :border="false" @row-click="()=>{return}" :header-cell-style="headerColor" :height="height" show-footer-overflow="tooltip" show-overflow="tooltip" size="mini">
48
+      <ux-table-column v-for="item in desCol" :key="item.prop"
49
+                       :resizable="true" :field="item.prop" :title="item.label"
50
+                       :min-width="item.min_width?item.min_width:120"
51
+                       :fixed="item.fixed?item.fixed:''" align="center">
52
+        <template #header>
53
+          <div
54
+            :class="['flex-align-jus-center',item.sort?'pointer':'',sort_field==item.prop?'sortFieldStyle':'']"
55
+            @click="item.sort?sortFieldEvent(item.prop):''">
56
+            {{item.label}}
57
+            <i class="el-icon-caret-bottom" v-if="item.sort"></i>
58
+            <el-tooltip v-if="item.notes" :content="item.notes" placement="top">
59
+              <div><i class="el-icon-question"></i></div>
60
+            </el-tooltip>
61
+          </div>
62
+        </template>
63
+        <template v-slot="{ row }">
64
+          <span :class="sort_field==item.prop?'sortFieldStyle':''">{{row[item.prop]||row[item.prop]==0?$formatNum(row[item.prop]):'-' }}</span>
65
+        </template>
66
+      </ux-table-column>
67
+    </ux-grid>
68
+    <div class="pagination" v-show="total>0">
69
+      <el-pagination background :current-page="page" @current-change="handleCurrentChange" layout="prev, pager, next" :page-count='Number(pages)'>
70
+      </el-pagination>
71
+    </div>
72
+  </div>
73
+</template>
74
+<script>
75
+import datePicker from '@/components/assembly/screen/datePicker.vue'
76
+import selfChannel from '@/components/assembly/screen/channel.vue'
77
+export default {
78
+  components: { datePicker, selfChannel },
79
+  data () {
80
+    return {
81
+      loading: false,
82
+      page: 1,
83
+      pages: 0,
84
+      total: 0,
85
+      page_size: 20,
86
+      sort_field: 'roi',
87
+      dataInfo: {},
88
+      default_time: [this.$getDay(-30, false), this.$getDay(0, false)],
89
+      time: [],
90
+      user_id: '',
91
+      drama_id: '',
92
+      gl_loading: false,
93
+      desCol: [
94
+        { prop: "user_name", label: "投手", min_width: 160, fixed: 'left'  },
95
+        { prop: "date_num", label: "投放天数", min_width: 160, sort: true},
96
+        { prop: "app_num", label: "投放公众号数", min_width: 160, sort: true },
97
+        { prop: "day_paid", label: "累计消耗",sort: true },
98
+        { prop: "charge_total", label: "累计充值",sort: true },
99
+        { prop: "roi", label: "首日ROI", notes: '首日ROI=当日新用户充值之和/累计消耗',sort: true },
100
+        { prop: "profit", label: "总毛利额", notes: '总毛利额=累计充值-累计消耗',sort: true },
101
+        { prop: "recover_rate", label: "回本率%", notes: '回本率=累计充值/累计消耗',sort: true },
102
+      ],
103
+      height: '',
104
+    }
105
+  },
106
+  created () {
107
+    this.height = document.documentElement.clientHeight - 340 > 400 ? document.documentElement.clientHeight - 340 : 400
108
+    this.time = this.default_time
109
+    this.init(1)
110
+  },
111
+  methods: {
112
+    headerColor ({ row, column, rowIndex, columnIndex }) {
113
+      return { backgroundColor: '#FFFFFF !important', border: 'none!important' }
114
+    },
115
+    changeTime (time) {//筛选时间变化
116
+      if (!time || time && time.length == 0) {
117
+        this.time = []
118
+      } else {
119
+        this.time = time
120
+      }
121
+      this.init(1)
122
+    },
123
+    init (page, type) {
124
+      if (type != 'export') {
125
+        this.page = page ? page : this.page;
126
+      } else {
127
+        if (this.total == 0) {
128
+          this.$message({
129
+            message: '暂无数据可导出',
130
+            type: "warning"
131
+          })
132
+          return
133
+        }
134
+      }
135
+      this.loading = true
136
+      this.$axios.get(this.URL.BASEURL + this.URL.pitcherData, {
137
+        params: {
138
+          user_id: this.user_id,
139
+          st_date: this.time[0],
140
+          en_date: this.time[1],
141
+          sort_field: this.sort_field,
142
+          page: type == 'export' ? 1 : this.page,
143
+          page_size: type == 'export' ? this.$store.state.exportNumber : this.page_size,
144
+        }
145
+      }).then((res) => {
146
+        var res = res.data
147
+        this.loading = false
148
+        if (res && res.errno == 0) {
149
+          if (type == 'export') {
150
+            this.exportEvent(res.rst.data.list)
151
+          } else {
152
+            this.datas = res.rst.data.list // 知道为啥datas不在 data()方法里面定义吗?嘻嘻
153
+            this.$refs.plxTable.reloadData(this.datas)
154
+            this.dataInfo = res.rst.data.summary
155
+            this.total = res.rst.pageInfo.total;
156
+            this.pages = res.rst.pageInfo.pages;
157
+          }
158
+        } else if (res.errno != 4002) {
159
+          this.$message({
160
+            message: res.err,
161
+            type: "warning"
162
+          })
163
+        }
164
+      }).catch((err) => {
165
+        this.loading = false
166
+      });
167
+    },
168
+    handleCurrentChange (val) {
169
+      this.init(val)
170
+    },
171
+    sortFieldEvent (type) {
172
+      this.sort_field = type;
173
+      this.init(1)
174
+    },
175
+    exportEvent (data) {
176
+      let list = data;
177
+      let tHeader = this.desCol.map((v) => {
178
+        return v.label;
179
+      })
180
+      let filterVal = this.desCol.map((v) => {
181
+        return v.prop
182
+      })
183
+      let excelDatas = [
184
+        {
185
+          tHeader: tHeader, // sheet表一头部
186
+          filterVal: filterVal, // 表一的数据字段
187
+          tableDatas: list, // 表一的整体json数据
188
+          sheetName: ''// 表一的sheet名字
189
+        }
190
+      ]
191
+      this.$exportOrder({ excelDatas, name: `投手数据(导出时间:${this.$getDay(0)})` })
192
+    }
193
+  }
194
+}
195
+</script>
196
+<style lang="scss" scoped>
197
+.screenBox {
198
+  background: #fff;
199
+  padding: 5px 20px;
200
+}
201
+.dataInfoBox {
202
+  display: flex;
203
+  margin-top: 10px;
204
+  flex-wrap: wrap;
205
+  .dataInfoItem {
206
+    background: #ffffff;
207
+    border-radius: 8px;
208
+    margin-right: 10px;
209
+    margin-bottom: 10px;
210
+    padding: 0 19px;
211
+    height: 70px;
212
+    display: flex;
213
+    flex-direction: column;
214
+    justify-content: center;
215
+    align-items: center;
216
+    .dataItemTitle {
217
+      display: flex;
218
+      align-items: center;
219
+      color: #6f6f6f;
220
+      font-size: 13px;
221
+      line-height: 17px;
222
+      font-weight: bold;
223
+      .titleIcon {
224
+        height: 16px;
225
+        margin-right: 4px;
226
+      }
227
+    }
228
+    .dataItem-data {
229
+      color: #000000;
230
+      font-size: 19px;
231
+      line-height: 28px;
232
+      font-weight: bold;
233
+      margin-top: 2px;
234
+    }
235
+  }
236
+}
237
+</style>

+ 1 - 1
project/src/router/allRouter.js

@@ -26,7 +26,7 @@ const thePublic = () => import(/* webpackChunkName: 'thePublic' */ '@/components
26 26
 const playletData = () => import(/* webpackChunkName: 'playletData' */ '@/components/dataBoard/playletData.vue')
27 27
 const operateDayRetrieve = () => import(/* webpackChunkName: 'operateDayRetrieve' */ '@/components/dataBoard/operateDayRetrieve.vue')
28 28
 const populariz = () => import(/* webpackChunkName: 'populariz' */ '@/components/dataBoard/populariz.vue')
29
-const throwPerson = () => import(/* webpackChunkName: 'throwPerson' */ '@/components/dataBoard/throwPerson.vue')
29
+const throwPerson = () => import(/* webpackChunkName: 'throwPerson' */ '@/components/dataBoard/throwPerson/index.vue')
30 30
 const regRangeReport = () => import(/* webpackChunkName: 'regRangeReport' */ '@/components/dataBoard/regRangeReport.vue')
31 31
 const dramaManage = () => import(/* webpackChunkName: 'dramaManage' */ '@/components/dataBoard/dramaManage.vue')
32 32
 const charge = () => import(/* webpackChunkName: 'charge' */ '@/components/orderManage/charge.vue')