Commit 63417d27 by 姜鹏凯

update

1 parent 865ed4ac
<template>
<div class="search">
<div class="item">
<el-button-group>
<el-button size="mini" @click="setType(1)" :type="active === 1 ? 'primary': ''">近一周</el-button>
<el-button size="mini" @click="setType(2)" :type="active === 2 ? 'primary': ''">近一月</el-button>
<el-button size="mini" @click="setType(3)" :type="active === 3 ? 'primary': ''">自定义</el-button>
</el-button-group>
</div>
<div class="item" v-if="active === 3">
<el-date-picker style="width: 250px;" size="mini" v-model="value" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
</el-date-picker>
</div>
<div class="item" v-if="showScene">
<el-select size="mini" v-model="value2" placeholder="请选择场景">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</div>
<div class="item" v-if="showMember">
<el-select size="mini" v-model="value2" placeholder="请选择客服">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</div>
<div class="item" v-if="showMember">
<el-select size="mini" v-model="value2" placeholder="请选择接待员工">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</div>
</div>
</template>
<script>
export default {
name: 'search-title',
props: {
showScene:{
type: Boolean,
default: false
},
showMember: {
type: Boolean,
default:false
}
},
data () {
return {
active: 1,
value: [],
options: [{ value: 10, label: '1123' }],
value2: ''
}
},
methods: {
setType (type) {
this.active = type
}
}
}
</script>
<style lang="scss" scoped>
.search {
display: flex;
align-items: center;
.item {
margin-right: 20px;
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<el-table v-loading="loading" :data="list" style="margin-top:20px;width: 100%"> <el-table v-loading="loading" :data="list" style="margin-top:20px;width: 100%">
<el-table-column label="客服" align="center" prop="" min-width="120"> <el-table-column label="客服" align="center" prop="" min-width="120">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<show-customer-service :url='row.url' :name='row.test'></show-customer-service> <show-customer-service :url='row.url' :name='row.test' showicon></show-customer-service>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="接待方式" align="center" min-width="100" prop="name" show-overflow-tooltip /> <el-table-column label="接待方式" align="center" min-width="100" prop="name" show-overflow-tooltip />
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<el-table-column label="场景分类" align="center" min-width="100" prop="name" show-overflow-tooltip /> <el-table-column label="场景分类" align="center" min-width="100" prop="name" show-overflow-tooltip />
<el-table-column label="所属客服" align="center" min-width="160" prop="list"> <el-table-column label="所属客服" align="center" min-width="160" prop="list">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<show-customer-service :url='row.url' :name='row.test'></show-customer-service> <show-customer-service :url='row.url' :name='row.test' showicon></show-customer-service>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="访问客户数" align="center" min-width="140" prop=""></el-table-column> <el-table-column label="访问客户数" align="center" min-width="140" prop=""></el-table-column>
......
...@@ -3,48 +3,144 @@ ...@@ -3,48 +3,144 @@
<div class="total-list"> <div class="total-list">
<CardGroupIndex :data="cardData"></CardGroupIndex> <CardGroupIndex :data="cardData"></CardGroupIndex>
</div> </div>
<div class="g-card g-pad20" style="margin-top: 0;">
<div class="title">
数据概览
</div>
<div class="data-content">
<el-tabs v-model="activeName">
<el-tab-pane label="客户总数" name="first">
</el-tab-pane>
<el-tab-pane label="实时数据" name="second">
</el-tab-pane>
</el-tabs>
<div class="chart-content">
<search-title :showScene='true'></search-title>
<chart-line style="height: 300px;" :legend="legend" :xData="xdata" :series="series"></chart-line>
</div>
</div>
</div>
<div class="g-card g-pad20" style="margin-top: 20px;">
<div class="title">
访问场景top5
</div>
<div class="data-content" style="margin-top: 20px;">
<div class="chart-content">
<search-title></search-title>
<div class="column">
<div class="column-item">
<chart-bar style="height: 300px;" :legend="barLegend1"></chart-bar>
</div>
<div class="column-item">
<chart-bar style="height: 300px;" :legend="barLegend2"></chart-bar>
</div>
</div>
</div>
</div>
</div>
<div class="g-card g-pad20" style="margin-top: 20px;">
<div class="title">
数据报表
</div>
<div class="data-content" style="margin-top: 20px;">
<div class="search-content">
<search-title :showScene='true'></search-title>
<el-button type="primary" size="mini">导出Excel</el-button>
</div>
<div class="table-content">
<el-table v-loading="loading" :data="tableList" @selection-change="handleSelectionChange" style="width: 100%">
<el-table-column label="日期" align="center" min-width="100" prop="" show-overflow-tooltip />
<el-table-column label="访问客户总数" align="center" min-width="100" prop="" show-overflow-tooltip />
<el-table-column label="咨询客户总数" align="center" prop="" min-width="100" show-overflow-tooltip></el-table-column>
<el-table-column label="接待客户总数" align="center" prop="" min-width="100" show-overflow-tooltip></el-table-column>
<el-table-column label="今日新增访问客户" align="center" prop="" min-width="100" show-overflow-tooltip></el-table-column>
<el-table-column label="今日新增咨询客户" align="center" prop="" min-width="100" show-overflow-tooltip></el-table-column>
<el-table-column label="今日新增接待客户" align="center" prop="" min-width="100" show-overflow-tooltip></el-table-column>
</el-table>
<!-- <div class="bottom"> -->
<pagination :total="total" :page.sync="query.pageNum" :limit.sync="query.pageSize" @pagination="getList()" />
<!-- </div> -->
</div>
</div>
</div>
</div> </div>
</template> </template>
<script> <script>
import ChartBar from '@/components/ChartBar.vue'
import ChartLine from '@/components/ChartLine.vue'
import SearchTitle from '../components/SearchTitle.vue'
import CardGroupIndex from '@/components/CardGroupIndex.vue' import CardGroupIndex from '@/components/CardGroupIndex.vue'
export default { export default {
name: 'scene-statistics', name: 'scene-statistics-scene',
components: { components: {
CardGroupIndex CardGroupIndex,
SearchTitle,
ChartLine,
ChartBar
}, },
data () { data () {
return { return {
barLegend1: ['访问客户总数'],
barLegend2: ['咨询客户总数'],
legend: ['访问客户总数', '咨询客户总数', '接待客户总数'],
xdata: [12, 13, 14],
series: [[34, 35, 26], [22, 23, 33], [77, 57, 55]],
activeName: 'first',
cardData: [ cardData: [
{ {
title: '访问客户总数', title: '访问客户总数',
tips: '进入咨询页面的客户总数(包含重复);', tips: '进入咨询页面的客户总数(包含重复)',
value: 1234, value: 1234,
noArrow: true noArrow: true
}, },
{ {
title: '咨询客户总数', title: '咨询客户总数',
tips: '企业员工在单聊中发送的消息的数量', tips: '发送咨询消息的客户总数(包含重复)',
value: 12345, value: 12345,
}, },
{ {
title: '接待客户总数', title: '接待客户总数',
tips: '一个自然日内,客户首先发消息的会话中,成员回复了的会话的占比。若数据展示为“-”代表没有给成员发送消息的客户,该项无法计算', tips: '人工客服接待的客户总数(包含重复)',
value: 1222453,
},
{
title: '今日新增访问客户',
tips: '今日进入咨询页面的客户数(包含重复)',
value: 1222453, value: 1222453,
title1: '较前日', title1: '较前日',
value1: 344 value1: 344
}, },
{ {
title: '平均首次回复时长(分)', title: '今日新增咨询客户',
tips: '一个自然日内,客户首先发消息至成员回复之间的时长,为首次回复时长。所有的首次回复总时长/已回复单聊总数,即为平均首次回复时长。若数据展示为“-”代表没有给成员发送消息的客户,该项无法计算', tips: '今日发送咨询消息的客户数(包含重复)',
value: 1222453,
title1: '较前日',
value1: 344
},
{
title: '今日新增接待客户',
tips: '今日人工客服接待的客户数(包含重复)',
value: 1222453, value: 1222453,
title1: '较前日', title1: '较前日',
value1: 344 value1: 344
} }
], ],
total: 0,
query: {
pageSize: 10,
pageNum: 1
},
tableList: [],
loading: false
} }
}, },
methods: { methods: {
handleSelectionChange () {
},
getList () {
}
}, },
created () { created () {
...@@ -58,4 +154,31 @@ ...@@ -58,4 +154,31 @@
background-color: #fff; background-color: #fff;
} }
} }
.title {
font-size: 16px;
color: #333;
font-weight: 500;
}
.data-content {
margin-top: 10px;
.chart-content {
margin-top: 10px;
.my_button {
float: right;
}
.column {
display: flex;
.column-item {
flex: 1;
}
}
}
.search-content {
display: flex;
justify-content: space-between;
}
.table-content {
margin-top: 10px;
}
}
</style> </style>
\ No newline at end of file \ No newline at end of file
<template> <template>
<div> <div>
2222222222222 <div class="total-list">
<CardGroupIndex :data="cardData"></CardGroupIndex>
</div>
<div class="g-card g-pad20" style="margin-top: 0;">
<div class="title">
数据概览
</div>
<div class="data-content">
<el-tabs v-model="activeName">
<el-tab-pane label="客户总数" name="first">
</el-tab-pane>
<el-tab-pane label="实时数据" name="second">
</el-tab-pane>
</el-tabs>
<div class="chart-content">
<search-title :showMember="true"></search-title>
<chart-line style="height: 300px;" :legend="legend" :xData="xdata" :series="series"></chart-line>
</div>
</div>
</div>
<div class="g-card g-pad20" style="margin-top: 20px;">
<div class="title">
访问场景top5
</div>
<div class="data-content" style="margin-top: 20px;">
<div class="chart-content">
<search-title></search-title>
<div class="column">
<div class="column-item">
<chart-bar style="height: 300px;" :legend="barLegend1"></chart-bar>
</div>
<div class="column-item">
<chart-bar style="height: 300px;" :legend="barLegend2"></chart-bar>
</div>
</div>
</div>
</div>
</div>
<div class="g-card g-pad20" style="margin-top: 20px;">
<div class="title">
数据报表
</div>
<div class="data-content" style="margin-top: 20px;">
<div class="search-content">
<search-title :showMember="true"></search-title>
<el-button type="primary" size="mini">导出Excel</el-button>
</div>
<div class="table-content">
<el-table v-loading="loading" :data="tableList" @selection-change="handleSelectionChange" style="width: 100%">
<el-table-column label="日期" align="center" min-width="100" prop="" show-overflow-tooltip />
<el-table-column label="咨询客户总数" align="center" min-width="100" prop="" show-overflow-tooltip />
<el-table-column label="接待客户总数" align="center" prop="" min-width="100" show-overflow-tooltip></el-table-column>
<el-table-column label="回复客户总数" align="center" prop="" min-width="100" show-overflow-tooltip></el-table-column>
<el-table-column label="回复客户占比" align="center" prop="" min-width="100" show-overflow-tooltip></el-table-column>
<el-table-column label="平均咨询响应时长" align="center" prop="" min-width="100" show-overflow-tooltip></el-table-column>
<el-table-column label="平均咨询时长" align="center" prop="" min-width="100" show-overflow-tooltip></el-table-column>
</el-table>
<!-- <div class="bottom"> -->
<pagination :total="total" :page.sync="query.pageNum" :limit.sync="query.pageSize" @pagination="getList()" />
<!-- </div> -->
</div>
</div>
</div>
</div> </div>
</template> </template>
<script> <script>
import ChartBar from '@/components/ChartBar.vue'
import ChartLine from '@/components/ChartLine.vue'
import SearchTitle from '../components/SearchTitle.vue'
import CardGroupIndex from '@/components/CardGroupIndex.vue'
export default { export default {
name: 'search-statistics', name: 'scene-statistics-search',
components: {
CardGroupIndex,
SearchTitle,
ChartLine,
ChartBar
},
data () { data () {
return {} return {
barLegend1: ['回复客户总数'],
barLegend2: ['平均咨询响应时长(s)'],
legend: ['咨询客户总数', '接待客户总数', '回复客户总数'],
xdata: [12, 13, 14],
series: [[34, 35, 26], [22, 23, 33], [77, 57, 55]],
activeName: 'first',
cardData: [
{
title: '咨询客户总数',
tips: '发送咨询消息的客户总数(包含重复)',
value: 1234,
noArrow: true
},
{
title: '接待客户总数',
tips: '人工客服接待的客户总数(包含重复)',
value: 12345,
},
{
title: '回复客户总数',
tips: '人工客服回复的客户总数(包含重复)',
value: 1222453,
},
{
title: '回复客户占比',
tips: '回复客户总数/咨询客户总数',
value: "90%",
},
{
title: '平均咨询响应时长',
tips: '客户首条咨询消息与客服首条回复的平均时间间隔',
value: "46s",
},
{
title: '平均咨询时长',
tips: '咨询开始时间与咨询结束时间的平均时间间隔',
value: '1m54s',
}
],
total: 0,
query: {
pageSize: 10,
pageNum: 1
},
tableList: [],
loading: false
}
}, },
methods: { methods: {
handleSelectionChange () {
}, },
getList () {
}
},
created () { created () {
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.total-list {
.item {
padding: 10px;
background-color: #fff;
}
}
.title {
font-size: 16px;
color: #333;
font-weight: 500;
}
.data-content {
margin-top: 10px;
.chart-content {
margin-top: 10px;
.my_button {
float: right;
}
.column {
display: flex;
.column-item {
flex: 1;
}
}
}
.search-content {
display: flex;
justify-content: space-between;
}
.table-content {
margin-top: 10px;
}
}
</style> </style>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!