xiuli.gao 3 years ago
parent
commit
ddefee7f8c

+ 65 - 0
project/src/components/assembly/screen/channel.vue

@@ -0,0 +1,65 @@
1
+<template>
2
+  <div class="common-screen-item">
3
+    <label class="common-screen-label">添加渠道</label>
4
+    <div :class="['common-screen-self-box','common-input-select',value!=''&&clearable?'common-input-select-hover':'']">
5
+      <span :class="['common-screen-self-con',value==''?'common-screen-self-placeholder':'']">{{value!=''?valueCon.label:'请选择渠道'}}</span>
6
+      <div class="common-screen-self-icon" @click="clear">
7
+        <i class="el-icon-arrow-down default-icon"></i>
8
+        <i class="el-icon-circle-close other-icon"></i>
9
+      </div>
10
+      <el-select v-model="value" class="common-screen-opacity-0" placeholder="请选择" @change="change">
11
+        <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
12
+        </el-option>
13
+      </el-select>
14
+    </div>
15
+  </div>
16
+</template>
17
+<script>
18
+export default {
19
+  props: {
20
+    clearable: {
21
+      type: Boolean,
22
+      default: true
23
+    }
24
+  },
25
+  data () {
26
+    return {
27
+      value: '',
28
+      options: [
29
+        { label: '未知来源', value: '0' },
30
+        { label: '扫描二维码', value: '1' },
31
+        { label: '搜索手机号', value: '2' },
32
+        { label: '名牌分享', value: '3' },
33
+        { label: '群聊', value: '4' },
34
+        { label: '手机通讯录', value: '5' },
35
+        { label: '微信联系人', value: '6' },
36
+        { label: '安装第三方应用时自动添加的客服人员', value: '8' },
37
+        { label: '搜索邮箱', value: '9' },
38
+        { label: '视频号添加', value: '10' },
39
+        { label: '内部成员共享', value: '201' },
40
+        { label: '管理员/负责人分配', value: '202' },
41
+      ],
42
+      valueCon: {}
43
+    }
44
+  },
45
+  methods: {
46
+    clear () {
47
+      this.value = ''
48
+      this.valueCon = {}
49
+    },
50
+    change () {
51
+      let arr = this.options.filter((v) => {
52
+        return v.value == this.value
53
+      })
54
+      arr.length > 0 ? this.valueCon = arr[0] : ''
55
+
56
+    }
57
+  }
58
+}
59
+</script>
60
+<style lang="scss" scoped>
61
+.dateInput {
62
+  padding: 0 !important;
63
+  text-align: center;
64
+}
65
+</style>

+ 1 - 1
project/src/components/assembly/screen/datePicker.vue

@@ -5,7 +5,7 @@
5 5
       <span :class="['common-screen-self-con',!time||time.length==0?'common-screen-self-placeholder':'dateInput']">{{!time||time.length==0?'开始时间 ~ 结束时间' : time[0] + ' ~ ' + time[1]}}</span>
6 6
       <div class="common-screen-self-icon" @click="clear">
7 7
         <i class="el-icon-date default-icon"></i>
8
-        <i class="el-icon-error other-icon"></i>
8
+        <i class="el-icon-circle-close other-icon"></i>
9 9
       </div>
10 10
       <el-date-picker class="common-screen-opacity-0" size="small" v-model="time" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :clearable="false" value-format="yyyy-MM-dd">
11 11
       </el-date-picker>

+ 56 - 0
project/src/components/assembly/screen/gender.vue

@@ -0,0 +1,56 @@
1
+<template>
2
+  <div class="common-screen-item">
3
+    <label class="common-screen-label">性别</label>
4
+    <div :class="['common-screen-self-box','common-input-select',value!=''&&clearable?'common-input-select-hover':'']">
5
+      <span :class="['common-screen-self-con',value==''?'common-screen-self-placeholder':'']">{{value!=''?valueCon.label:'请选择性别'}}</span>
6
+      <div class="common-screen-self-icon" @click="clear">
7
+        <i class="el-icon-arrow-down default-icon"></i>
8
+        <i class="el-icon-circle-close other-icon"></i>
9
+      </div>
10
+      <el-select v-model="value" class="common-screen-opacity-0" placeholder="请选择" @change="change">
11
+        <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
12
+        </el-option>
13
+      </el-select>
14
+    </div>
15
+  </div>
16
+</template>
17
+<script>
18
+export default {
19
+  props: {
20
+    clearable: {
21
+      type: Boolean,
22
+      default: true
23
+    }
24
+  },
25
+  data () {
26
+    return {
27
+      value: '',
28
+      options: [
29
+        { label: '男', value: '0' },
30
+        { label: '女', value: '1' },
31
+        { label: '未知', value: '2' },
32
+      ],
33
+      valueCon: {}
34
+    }
35
+  },
36
+  methods: {
37
+    clear () {
38
+      this.value = ''
39
+      this.valueCon = {}
40
+    },
41
+    change () {
42
+      let arr = this.options.filter((v) => {
43
+        return v.value == this.value
44
+      })
45
+      arr.length > 0 ? this.valueCon = arr[0] : ''
46
+
47
+    }
48
+  }
49
+}
50
+</script>
51
+<style lang="scss" scoped>
52
+.dateInput {
53
+  padding: 0 !important;
54
+  text-align: center;
55
+}
56
+</style>

+ 59 - 0
project/src/components/assembly/screen/lossBody.vue

@@ -0,0 +1,59 @@
1
+<template>
2
+  <div class="common-screen-item">
3
+    <label class="common-screen-label">流失状态
4
+      <el-tooltip class="disinblock" content="仅可统计员工授权微伴后的流失客户" placement="top">
5
+        <i class="el-icon-question"></i>
6
+      </el-tooltip>
7
+    </label>
8
+    <div :class="['common-screen-self-box','common-input-select',value!=''&&clearable?'common-input-select-hover':'']">
9
+      <span :class="['common-screen-self-con',value==''?'common-screen-self-placeholder':'']">{{value!=''?valueCon.label:'请选择流失状态'}}</span>
10
+      <div class="common-screen-self-icon" @click="clear">
11
+        <i class="el-icon-arrow-down default-icon"></i>
12
+        <i class="el-icon-circle-close other-icon"></i>
13
+      </div>
14
+      <el-select v-model="value" class="common-screen-opacity-0" placeholder="请选择" @change="change">
15
+        <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
16
+        </el-option>
17
+      </el-select>
18
+    </div>
19
+  </div>
20
+</template>
21
+<script>
22
+export default {
23
+  props: {
24
+    clearable: {
25
+      type: Boolean,
26
+      default: true
27
+    }
28
+  },
29
+  data () {
30
+    return {
31
+      value: '',
32
+      options: [
33
+        { label: '已流失', value: '1' },
34
+        { label: '未流失', value: '2' },
35
+      ],
36
+      valueCon: {}
37
+    }
38
+  },
39
+  methods: {
40
+    clear () {
41
+      this.value = ''
42
+      this.valueCon = {}
43
+    },
44
+    change () {
45
+      let arr = this.options.filter((v) => {
46
+        return v.value == this.value
47
+      })
48
+      arr.length > 0 ? this.valueCon = arr[0] : ''
49
+
50
+    }
51
+  }
52
+}
53
+</script>
54
+<style lang="scss" scoped>
55
+.dateInput {
56
+  padding: 0 !important;
57
+  text-align: center;
58
+}
59
+</style>

+ 221 - 25
project/src/components/customManage/manage.vue

@@ -9,34 +9,84 @@
9 9
       <enterprise-tag></enterprise-tag>
10 10
       <!-- 添加时间 -->
11 11
       <date-picker></date-picker>
12
-      <div class="common-screen-item">
13
-        <label class="common-screen-label">流失状态
14
-          <el-tooltip class="disinblock" effect="light" content="投放ROI=投放产生的销售额/ 投放金额" placement="top">
15
-            <i class="el-icon-question"></i>
16
-          </el-tooltip>
17
-        </label>
18
-        <div class="common-screen-self-box common-input-select">
19
-          <span class="common-screen-self-con common-screen-self-placeholder">请选择渠道</span>
20
-          <div class="common-screen-self-icon"><i class="el-icon-arrow-down"></i></div>
12
+      <!-- 添加渠道 -->
13
+      <self-channel></self-channel>
14
+      <!-- 性别 -->
15
+      <self-gender></self-gender>
16
+      <!-- 流失状态 -->
17
+      <loss-body></loss-body>
18
+      <div class="reset">重置</div>
19
+    </div>
20
+    <div class="tableInfo">
21
+      <div>
22
+        <div class="flex">
23
+          <i class="el-icon-user-solid"></i>
24
+          <div class="totalCustom">共<span>2345</span>个客户</div>
25
+          <div class="smalLine"></div>
26
+          <div class="excludeCustom">排除重复客户
27
+            <el-tooltip class="disinblock" content="该数据为去重后的客户数,若客户添加了多个员工只会统计为1个客户" placement="top">
28
+              <i class="el-icon-question"></i>
29
+            </el-tooltip>
30
+            <span>1000</span>
31
+          </div>
32
+          <div class="smalLine"></div>
33
+          <el-button type="primary" plain size="mini"><i class="el-icon-refresh-right"></i> 更新数据</el-button>
21 34
         </div>
35
+        <div class="selectCustom">已选择0个客户</div>
22 36
       </div>
23
-
24
-      <div class="common-screen-item">
25
-        <label class="common-screen-label">添加渠道</label>
26
-        <div class="common-screen-self-box common-input-select">
27
-          <span class="common-screen-self-con common-screen-self-placeholder">请选择渠道</span>
28
-          <div class="common-screen-self-icon"><i class="el-icon-arrow-down"></i></div>
29
-        </div>
30
-      </div>
31
-
32
-      <div class="common-screen-item">
33
-        <label class="common-screen-label">性别</label>
34
-        <div class="common-screen-self-box common-input-select">
35
-          <span class="common-screen-self-con common-screen-self-placeholder">请选择渠道</span>
36
-          <div class="common-screen-self-icon"><i class="el-icon-arrow-down"></i></div>
37
-        </div>
37
+      <div class="flex">
38
+        <el-button type="primary" plain size="mini">批量打标签</el-button>
39
+        <el-button type="primary" plain size="mini">导出Excel</el-button>
38 40
       </div>
39 41
     </div>
42
+    <!-- table -->
43
+    <el-table ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%" @selection-change="handleSelectionChange">
44
+      <el-table-column type="selection" width="55" align="center"></el-table-column>
45
+      <el-table-column width="200" fixed="left">
46
+        <template slot-scope="scope" slot="header">
47
+          <div class="customTitle" slot="reference">{{pageOptionValue==2?'选择当前页面客户':'选择全部客户'}}<i class="el-icon-arrow-down"></i>
48
+            <el-select v-model="pageOptionValue" class="customTitleSelect" placeholder="请选择" size="mini">
49
+              <el-option v-for="item in pageOptions" :key="item.id" :label="item.name" :value="item.id">
50
+              </el-option>
51
+            </el-select>
52
+          </div>
53
+        </template>
54
+        <template slot-scope="scope">{{ scope.row.date }}</template>
55
+      </el-table-column>
56
+      <el-table-column label="所属客服" width="160" align="center">
57
+        <template slot-scope="scope">
58
+          <div class="customerServiceTagBox">
59
+            <div class="customerServiceTag" v-for="(item,index) in 4"><i class="el-icon-headset"></i>{{ scope.row.name }}</div>
60
+          </div>
61
+        </template>
62
+      </el-table-column>
63
+      <el-table-column prop="address" width="160" label="所属部门" show-overflow-tooltip align="center"></el-table-column>
64
+      <el-table-column label="标签" width="160" align="center">
65
+        <template slot-scope="scope">
66
+          <div class="customerServiceTagBox biaoqian">
67
+            <div class="customerServiceTag" v-for="(item,index) in 4">{{ scope.row.name }}</div>
68
+          </div>
69
+        </template>
70
+      </el-table-column>
71
+      <el-table-column prop="address" width="160" label="客户状态" show-overflow-tooltip align="center"></el-table-column>
72
+      <el-table-column width="160" label="付费情况" align="center">
73
+        <template slot-scope="scope">
74
+          <div>已付费(<span class="c-00B38A">3次</span>)</div>
75
+        </template>
76
+      </el-table-column>
77
+      <el-table-column prop="address" width="160" label="添加时间" show-overflow-tooltip align="center"></el-table-column>
78
+      <el-table-column prop="address" width="160" label="上次对话时间" show-overflow-tooltip align="center"></el-table-column>
79
+      <el-table-column prop="address" width="160" label="添加渠道" show-overflow-tooltip align="center"></el-table-column>
80
+      <el-table-column width="200" label="操作" align="center" fixed="right">
81
+        <template slot-scope="scope">
82
+          <div class="flex">
83
+            <div class="c-00B38A pointer">加入黑名单</div>
84
+            <div class="c-00B38A pointer">聊天记录</div>
85
+            <div class="c-00B38A pointer">详情</div>
86
+          </div>
87
+        </template>
88
+      </el-table-column>
89
+    </el-table>
40 90
   </div>
41 91
 </template>
42 92
 <script>
@@ -44,16 +94,56 @@ import selfInput from '@/components/assembly/screen/input.vue'
44 94
 import selfCustomerservice from '@/components/assembly/screen/customerService.vue'
45 95
 import enterpriseTag from '@/components/assembly/screen/enterpriseTag.vue'
46 96
 import datePicker from '@/components/assembly/screen/datePicker.vue'
97
+import selfChannel from '@/components/assembly/screen/channel.vue'
98
+import selfGender from '@/components/assembly/screen/gender.vue'
99
+import lossBody from '@/components/assembly/screen/lossBody.vue'
47 100
 export default {
48
-  components: { selfInput, selfCustomerservice, enterpriseTag, datePicker },
101
+  components: { selfInput, selfCustomerservice, enterpriseTag, datePicker, selfChannel, selfGender, lossBody },
49 102
   data () {
50 103
     return {
104
+      pageOptions: [
105
+        { name: '全部', id: 1 },
106
+        { name: '当前页面', id: 2 },
107
+      ],
108
+      pageOptionValue: 2,
51 109
       input_keyword: '',
110
+      tableData: [{
111
+        date: '2016-05-03',
112
+        name: '王小虎',
113
+        address: '上海市普陀区金沙江路 1518 弄'
114
+      }, {
115
+        date: '2016-05-02',
116
+        name: '王小虎',
117
+        address: '上海市普陀区金沙江路 1518 弄'
118
+      }, {
119
+        date: '2016-05-04',
120
+        name: '王小虎',
121
+        address: '上海市普陀区金沙江路 1518 弄'
122
+      }, {
123
+        date: '2016-05-01',
124
+        name: '王小虎',
125
+        address: '上海市普陀区金沙江路 1518 弄'
126
+      }, {
127
+        date: '2016-05-08',
128
+        name: '王小虎',
129
+        address: '上海市普陀区金沙江路 1518 弄'
130
+      }, {
131
+        date: '2016-05-06',
132
+        name: '王小虎',
133
+        address: '上海市普陀区金沙江路 1518 弄'
134
+      }, {
135
+        date: '2016-05-07',
136
+        name: '王小虎',
137
+        address: '上海市普陀区金沙江路 1518 弄'
138
+      }],
52 139
     }
53 140
   },
54 141
   methods: {
55 142
     init () {
56 143
       console.log(this.input_keyword)
144
+    },
145
+    handleSelectionChange () {
146
+
57 147
     }
58 148
   }
59 149
 }
@@ -64,10 +154,116 @@ export default {
64 154
   padding: 10px 18px;
65 155
   display: flex;
66 156
   flex-wrap: wrap;
157
+  position: relative;
158
+  .reset {
159
+    width: 80px;
160
+    height: 30px;
161
+    background: #00b38a;
162
+    border-radius: 100px 3px 3px 3px;
163
+    border: 1px solid #d2d2d2;
164
+    color: #ffffff;
165
+    font-size: 14px;
166
+    line-height: 30px;
167
+    text-align: center;
168
+    position: absolute;
169
+    bottom: 0;
170
+    right: 0;
171
+    letter-spacing: 2px;
172
+  }
67 173
   .common-screen-item {
68 174
     width: 33%;
69 175
   }
70 176
 }
177
+.tableInfo {
178
+  width: 100%;
179
+  height: 80px;
180
+  padding: 0 16px;
181
+  background: #ffffff;
182
+  margin: 10px 0;
183
+  display: flex;
184
+  align-items: center;
185
+  justify-content: space-between;
186
+  .el-icon-user-solid {
187
+    color: #00b38a;
188
+    margin-right: 4px;
189
+  }
190
+  .totalCustom {
191
+    color: #333333;
192
+    font-size: 14px;
193
+    line-height: 20px;
194
+    span {
195
+      color: #00b38a;
196
+      font-weight: bold;
197
+      font-size: 18px;
198
+      line-height: 25px;
199
+      padding: 0 4px;
200
+    }
201
+  }
202
+  .smalLine {
203
+    width: 1px;
204
+    height: 19px;
205
+    background: #d8d8d8;
206
+    margin: 0 14px;
207
+  }
208
+  .excludeCustom {
209
+    color: #898d92;
210
+    font-size: 14px;
211
+    line-height: 20px;
212
+    span {
213
+      color: #00b38a;
214
+      font-weight: bold;
215
+      font-size: 18px;
216
+      line-height: 25px;
217
+      padding: 0 4px;
218
+    }
219
+  }
220
+  .selectCustom {
221
+    color: #c3cbd6;
222
+    font-size: 14px;
223
+    line-height: 20px;
224
+    margin-left: 20px;
225
+  }
226
+}
227
+.customTitle {
228
+  position: relative;
229
+  cursor: pointer;
230
+  color: #00b38a;
231
+  line-height: 30px;
232
+  display: inline-block;
233
+  i {
234
+    margin-left: 4px;
235
+  }
236
+  .customTitleSelect {
237
+    position: absolute;
238
+    top: 0;
239
+    left: 0;
240
+    opacity: 0;
241
+  }
242
+}
243
+.customerServiceTagBox {
244
+  display: flex;
245
+  flex-wrap: wrap;
246
+  justify-content: center;
247
+  .customerServiceTag {
248
+    height: 26px;
249
+    line-height: 26px;
250
+    background: #00b38a;
251
+    border-radius: 4px;
252
+    border: 1px solid #00b38a;
253
+    color: #ffffff;
254
+    font-size: 12px;
255
+    margin: 2px;
256
+    padding: 0 3px;
257
+  }
258
+}
259
+.biaoqian {
260
+  .customerServiceTag {
261
+    background: #f4f4f4;
262
+    color: #787878;
263
+    border: 1px solid #d2d2d2;
264
+  }
265
+}
266
+
71 267
 @media screen and (min-width: 1600px) {
72 268
   .screenBox {
73 269
     .common-screen-item {

+ 7 - 0
project/src/style/common.scss

@@ -30,6 +30,13 @@
30 30
     .common-screen-self-con{
31 31
       padding: 0 15px;
32 32
       flex: 1;
33
+      text-overflow: -o-ellipsis-lastline;
34
+      overflow: hidden;
35
+      text-overflow: ellipsis;
36
+      display: -webkit-box;
37
+      -webkit-line-clamp: 1;
38
+      line-clamp: 1;
39
+      -webkit-box-orient: vertical;
33 40
     }
34 41
     .common-screen-self-placeholder{
35 42
       color: #c0c4cb;

+ 3 - 0
project/src/style/self.scss

@@ -222,6 +222,9 @@
222 222
 .c-FFB055{
223 223
   color: #FFB055;
224 224
 }
225
+.c-00B38A{
226
+  color: #00B38A;
227
+}
225 228
 .c-58BCA6{
226 229
   color: #58BCA6;
227 230
 }