Commit e66a89fa authored by 赵茹林's avatar 赵茹林

update

parent 611ad860
......@@ -299,6 +299,9 @@
border-radius: 3px;
text-decoration: underline;
transition: color 240ms, background-color 240ms;
& + .cell-link {
margin-left: 0;
}
&:hover {
background-color: #cce4ff;
color: #007fff;
......@@ -340,4 +343,32 @@
margin-right: 8px !important;
}
}
.custom-table {
margin-top: 20px;
width: 100%;
border: solid 1px #EBEEF5;
border-spacing: 0;
border-collapse: collapse;
thead {
color: #909399;
font-weight: 500;
th {
padding: 12px 10px;
border: 1px solid #EBEEF5;
}
}
tbody {
tr {
transition: background-color 240ms;
&:hover {
background-color: #F5F7FA;
}
td {
padding: 12px 10px;
border: 1px solid #EBEEF5;
}
}
}
}
</style>
......@@ -244,28 +244,6 @@
padding: 10px;
box-sizing: border-box;
.custom-table {
margin-top: 20px;
width: 100%;
border: solid 1px #EBEEF5;
border-spacing: 0;
border-collapse: collapse;
thead {
color: #909399;
font-weight: 500;
th {
padding: 12px 10px;
border: 1px solid #EBEEF5;
}
}
tbody {
td {
padding: 12px 10px;
border: 1px solid #EBEEF5;
}
}
}
.subcompany-list {
width: 100%;
.from-item {
......
This diff is collapsed.
<template>
<el-dialog :title="title" append-to-body :visible.sync="show" top="5vh" width="1200px">
<div v-loading="loading">
<table class="custom-table el-table" style="margin-bottom: 20px;">
<thead>
<tr>
<th v-for="th in table.th">{{ th.replace(/:00/g, "") }}</th>
</tr>
</thead>
<tbody>
<tr v-if="table.td1.length != 0">
<td v-for="(td, index) in table.td1">
<span class="cell" :class="index>0 ? 'cell-link' : ''" @click="dialogToggle()">{{ td }}</span>
</td>
</tr>
<tr v-if="table.td2.length != 0">
<td v-for="(td, index) in table.td2">
<span class="cell" :class="index>0 ? 'cell-link' : ''" @click="dialogToggle()">{{ td }}</span>
</td>
</tr>
<tr v-if="table.td3.length != 0">
<td v-for="(td, index) in table.td3">
<span class="cell" :class="index>0 ? 'cell-link' : ''" @click="dialogToggle()">{{ td }}</span>
</td>
</tr>
<tr v-if="table.td4.length != 0">
<td v-for="(td, index) in table.td4">
<span class="cell" :class="index>0 ? 'cell-link' : ''" @click="dialogToggle()">{{ td }}</span>
</td>
</tr>
</tbody>
</table>
<!--回访 开始-->
<el-table :data="list" border size="small">
<!--<el-table-column label="序号" prop="staff_name"></el-table-column>-->
<el-table-column label="老师" prop="teacher_name"></el-table-column>
<el-table-column label="UID" prop="user_id"></el-table-column>
<el-table-column label="客户微信昵称">
<template slot-scope="scope">{{scope.row.nick || '-'}}</template>
</el-table-column>
<el-table-column label="聊天条数">
<template slot-scope="scope">{{scope.row.chat_count}}</template>
</el-table-column>
<el-table-column label="电话号码">
<template slot-scope="scope">{{scope.row.mobile || '-'}}</template>
</el-table-column>
<el-table-column label="呼出时间" width="92px">
<template slot-scope="scope">{{scope.row.phone_start_time || '-'}}</template>
</el-table-column>
<el-table-column label="通话时间">
<template slot-scope="scope">{{scope.row.phone_duration + 's' || '-'}}</template>
</el-table-column>
<el-table-column label="意向度">
<template slot-scope="scope">{{scope.row.intention || '-'}}</template>
</el-table-column>
<el-table-column label="下次回访时间">
<template slot-scope="scope">{{scope.row.next_visit_at || '-'}}</template>
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<span class="cell-link">聊天记录</span>
<span class="cell-link">录音</span>
</template>
</el-table-column>
</el-table>
<!--回访 结束-->
<page :current-page="nowPage" :total="total" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/>
</div>
</el-dialog>
</template>
<script>
import {getHourSingleApi, getHourTimeApi} from "@service/api";
import page from '@framework/page'
export default {
name: "HourDialog",
components: {page},
props: {
dialogObj: {
type: Object,
required: true,
default: () => {
}
}
},
data() {
return {
show: false,
loading: true,
table: {
th: [],
td1: [],
td2: [],
td3: [],
td4: [],
},
list: [],
title: '',
total: 0,
nowPage: 1,
limit: 10,
dialogObj2: {
}
}
},
mounted() {
this.initDialog()
},
methods: {
initDialog() {
// console.log(this.dialogObj)
if (this.dialogObj) {
this.show = this.dialogObj.show;
this.getData();
}
},
dialogToggle(row, type) {
this.dialogObj2 = {
alias: row.alias, // 老师微信号
squad: (String(row.squad).indexOf(',') > -1 && row.isTotal) ? '' : `${row.squad}`,
show: true,
isTotal: row.isTotal,
type: type,
user_id: row.user_id,
teacher_id: row.teacher_id,
start_at: this.search.start_at,
staff_name: row.staff_name.indexOf(',') > -1 ? row.staff_name.split(',').join(',') : row.staff_name
}
},
getData() {
let json = {
wechat_number: this.dialogObj.alias,
start_at: this.dialogObj.start_at,
page: this.nowPage,
limit: this.limit,
// type:
}
getHourSingleApi(json).then(res => {
console.log(111, res)
if (res && res.list && res.list.page_data) {
this.list = res.list.page_data;
this.total = res.list.total
} else {
this.list = [];
this.total = 0
}
if (res && res.time && res.time.length) {
res.time.unshift(' ');
res.time.push('合计');
this.table.th = res.time;
} else {
this.table.th = []
}
if (res && res.count && res.count.valid_chat_count) {
res.count.valid_chat_count.unshift('微信有效沟通');
this.table.td1 = res.count.valid_chat_count
} else {
this.table.td1 = []
}
if (res && res.count && res.count.chat_count10) {
res.count.chat_count10.unshift('沟通>10');
this.table.td2 = res.count.chat_count10
} else {
this.table.td2 = []
}
if (res && res.count && res.count.valid_phone_count) {
res.count.valid_phone_count.unshift('有效通次');
this.table.td3 = res.count.valid_phone_count
} else {
this.table.td3 = []
}
if (res && res.count && res.count.three_min_count) {
res.count.three_min_count.unshift('>3分钟');
this.table.td4 = res.count.three_min_count
} else {
this.table.td4 = []
}
this.loading = false
})
/*getHourTimeApi(json).then(res => {
console.log(222,res)
})*/
},
getVisited() { // 已回访
let json = {
teacher_id: this.dialogObj.teacher_id,
// teacher_id: '82',
start_at: this.dialogObj.start_at,
page: this.nowPage,
limit: this.limit
}
getVisitedApi(json).then(res => {
this.list = res;
this.total = res.total || 0; // todo 后台没给分页
this.loading = false;
})
},
getValidchat() { // 有效沟通
let json = {
alias: this.dialogObj.alias,
teacher_id: this.dialogObj.teacher_id,
start_at: this.dialogObj.start_at,
page: this.nowPage,
limit: this.limit
}
getValidchatApi(json.alias, json).then(res => {
if (Object.keys(res).length && res.chat_friend_list) {
this.list = res.chat_friend_list.page_data;
this.total = res.chat_friend_list.total;
} else {
this.list = [];
this.total = 0;
}
this.loading = false;
})
},
onPageChange(val) {
this.nowPage = val
this.getData()
},
onSizeChange(val) {
this.limit = val;
this.nowPage = 1;
this.getData()
},
},
watch: {
dialogObj: {
handler: function () {
this.loading = true;
this.initDialog()
},
deep: true
},
show(value) {
this.nowPage = 1; // 重置
this.$emit("changeShow", value);
}
}
}
</script>
......@@ -305,7 +305,8 @@
let json = {
team: this.search.team,
page: this.nowPage,
limit: this.limit
limit: this.limit,
start_at: this.search.start_at
}
getTeamApi(json).then(res => {
if (Object.keys(res).length && res.team_list && res.team_list.page_data) {
......
......@@ -1485,3 +1485,15 @@ export const getClassOpenedApi = function (json) {
export const getAchievementApi = function (json) {
return Vue.prototype.$fetch(`${_baseUrl}api/admin/teacher/teamachievement`, json)
};
// 小时动态 - 分组数据
export const getHourTeamApi = function (json) {
return Vue.prototype.$fetch(`${_baseUrl}api/admin/teacher/teamhoursinfo`, json)
};
// 小时动态 - 组员统计
export const getHourSingleApi = function (json) {
return Vue.prototype.$fetch(`${_baseUrl}api/admin/teacher/singleteamhoursinfo`, json)
};
// 小时动态 - 分段数据
export const getHourTimeApi = function (json) {
return Vue.prototype.$fetch(`${_baseUrl}api/admin/teacher/timeslotrecordlist`, json)
};
......@@ -216,7 +216,7 @@ export default [
component: e => require(['@/components/team'], e),
}
},
/*{
{
value: '小时动态',
routerName: 'hour',
path: '/hour',
......@@ -226,7 +226,7 @@ export default [
name: 'hour',
component: e => require(['@/components/team/hour'], e),
}
},*/
},
]
}, {
name: '',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment