Commit a6f68247 by 王志慧

攻防话术

1 parent 6f6e9901
...@@ -26,7 +26,6 @@ const conversationPage = params => { ...@@ -26,7 +26,6 @@ const conversationPage = params => {
}) })
} }
/** 获取园区店列表 - 园区店 */ /** 获取园区店列表 - 园区店 */
const listShop4sByRef = params => { const listShop4sByRef = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale` params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
...@@ -51,7 +50,7 @@ const getPointCategory = (params = {}) => { ...@@ -51,7 +50,7 @@ const getPointCategory = (params = {}) => {
}) })
} }
// // 质检详情-质检分析 // // 质检详情-质检分析
const conversationCheckList=(params)=>{ const conversationCheckList = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale` params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path2}inspection.conversation.check.detail` params.routerMethod = `${path2}inspection.conversation.check.detail`
return http({ return http({
...@@ -63,7 +62,7 @@ const conversationCheckList=(params)=>{ ...@@ -63,7 +62,7 @@ const conversationCheckList=(params)=>{
} }
// 质检详情-分页查询对话列表 // 质检详情-分页查询对话列表
const conversationDetailPage=(params)=>{ const conversationDetailPage = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale` params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path2}inspection.conversation.detail.page` params.routerMethod = `${path2}inspection.conversation.detail.page`
return http({ return http({
...@@ -85,7 +84,7 @@ const conversationDetailPage=(params)=>{ ...@@ -85,7 +84,7 @@ const conversationDetailPage=(params)=>{
// } // }
// // 同步数据 // // 同步数据
const syncBadge=(params = {}) =>{ const syncBadge = (params = {}) => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale` params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `dj.api.mindworkplate.badge.syncBadge` params.routerMethod = `dj.api.mindworkplate.badge.syncBadge`
return http({ return http({
...@@ -97,7 +96,7 @@ const syncBadge=(params = {}) =>{ ...@@ -97,7 +96,7 @@ const syncBadge=(params = {}) =>{
} }
/**导出 */ /**导出 */
const exportReclistList = (params = {}) =>{ const exportReclistList = (params = {}) => {
params.method = 'scrm.api.mindworkplate.badge.employeeBadgeReclistExport' params.method = 'scrm.api.mindworkplate.badge.employeeBadgeReclistExport'
return http({ return http({
url: 'rop-scrm-partner/router', url: 'rop-scrm-partner/router',
...@@ -106,6 +105,16 @@ const exportReclistList = (params = {}) =>{ ...@@ -106,6 +105,16 @@ const exportReclistList = (params = {}) =>{
sign: true sign: true
}) })
} }
const defenceDetail = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `dj.api.smartcarlife.inspection.defence.detail`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
export default { export default {
getReclistWithPage, getReclistWithPage,
...@@ -115,5 +124,6 @@ export default { ...@@ -115,5 +124,6 @@ export default {
conversationCheckList, conversationCheckList,
conversationDetailPage, conversationDetailPage,
syncBadge, syncBadge,
exportReclistList exportReclistList,
defenceDetail
} }
<template>
<div v-loading="loading" class="container">
<div class="attack-detail" v-if="defenceDetail">
<div class="statistics-box">
<div class="statistics-item" v-for="(item, index) in statisticsObj" :key="index">
<div class="text">{{ item.text }}</div>
<div class="value">{{ item.value(defenceDetail) }}</div>
</div>
</div>
<div class="dialog-box">
<div class="dialog-item" v-for="(item, index) in defenceDetail.detailList" :key="item.is">
<div class="dialog-head">
<img class="attack-score" src="@/assets/attack-score.png" alt="" />
<div class="text">攻防得分</div>
<div class="score">{{ item.defScore ? item.defScore : '-' }}</div>
<div class="text">对话开始时间</div>
<div class="time">{{ item.conStartTime ? item.conStartTime : '-' }}</div>
<div class="attack-index">攻防回合{{ index + 1 }}</div>
<img class="index-logo" src="@/assets/index-logo.png" alt="" />
</div>
<div class="dialog">
<div
:class="{
'dialog-detail': true
}"
:key="item.id"
>
<div class="name">
<img class="role" src="@/assets/role-one.png" />
客户
</div>
<div class="dig-content" @click="currentDialog(item)">
{{ item.question }}
</div>
</div>
<div class="dialog-detail nth-child" :key="item.id">
<div class="name">
销售
<img class="role two" src="@/assets/role-two.png" />
</div>
<div class="dig-content" @click="currentDialog(item)">
{{ item.answer }}
</div>
<div class="suggest">
<div class="improve">
<img src="@/assets/improve.png" class="improve-img" />
改进建议
</div>
<div class="improve-text" v-html="regText(item.highlight, item.suggestionsForImprovement)"></div>
<div class="line"></div>
<div class="improve">
<img src="@/assets/polish.png" class="improve-img" />
润色表达
</div>
<div class="improve-text" v-html="regText(item.highlight, item.refineTheExpression)"></div>
</div>
</div>
</div>
</div>
</div>
</div>
<template v-else>
<div class="empty-box">
<div class="icon">
<img src="@/assets/empty-2.png" />
</div>
<div class="text">
{{ detailObj.defence === 1 ? '数据分析中,请稍等' : '未发现攻防' }}
</div>
</div>
</template>
</div>
</template>
<script>
export default {
props: {
detailObj: {
type: Object,
default: () => {}
}
},
data() {
return {
statisticsObj: [
{
text: '攻防次数',
value: data => {
return data.defenceCount + '次'
}
},
{
text: '攻防平均得分',
value: data => {
return data.avgDefence + '分'
}
},
{
text: '客户类型',
value: data => {
return data.customerType ? data.customerType : '未知'
}
}
],
defenceDetail: '',
loading: true,
isFlag: false
}
},
created() {
this.getDefenceDetail()
},
methods: {
getDefenceDetail() {
let params = {
batchId: this.detailObj.id
}
this.$apis.quality.defenceDetail(params).then(res => {
console.log(res, '9999')
this.defenceDetail = res
this.loading = false
})
},
regText(highlight, value) {
highlight = highlight && JSON.parse(highlight)
let replacedText = value
if (value) {
highlight.forEach(item => {
replacedText = replacedText.replace(item, function (match) {
return '<span style="color: #FE9220;">' + match + '</span>'
})
})
}
return replacedText
}
}
}
</script>
<style scoped lang="scss">
.container {
height: 100%;
}
.attack-detail {
height: calc(100% - 55px);
overflow: hidden;
.statistics-box {
display: flex;
align-items: center;
margin-bottom: 12px;
.statistics-item {
max-width: 216px;
flex: 1;
padding: 12px 16px;
background: #f7f9fa;
color: #333333;
height: 20px;
display: flex;
justify-content: space-between;
align-items: center;
margin-right: 8px;
.value {
font-weight: 600;
}
}
}
.dialog-box {
height: calc(100% - 68px);
overflow-y: scroll;
.dialog-item {
width: 100%;
background: #f7f9fa;
margin-bottom: 12px;
.dialog-head {
padding: 12px 16px;
height: 24px;
position: relative;
line-height: 24px;
display: flex;
align-items: center;
border-bottom: 1px solid #e5e5e5;
.attack-score {
width: 24px;
height: 24px;
margin-right: 8px;
}
.text {
font-weight: 400;
font-size: 14px;
color: #666666;
}
.score {
font-weight: 500;
font-size: 15px;
color: #fe9220;
margin: 0 24px 0 6px;
}
.time {
font-weight: 400;
font-size: 14px;
color: #5850ff;
margin-left: 6px;
}
.index-logo {
width: 86px;
height: 32px;
position: absolute;
right: 0;
}
.attack-index {
font-weight: 400;
font-size: 14px;
color: #ffffff;
position: absolute;
right: 12px;
z-index: 999;
}
}
.dialog {
width: 100%;
height: 100%;
background: #f7f9fa;
border-radius: 4px;
overflow-y: scroll;
padding: 12px 8px 12px 16px;
box-sizing: border-box;
.dialog-detail {
margin-bottom: 8px;
text-align: left;
.name {
font-size: 12px;
color: #666666;
letter-spacing: 0;
line-height: 16px;
.role {
width: 32px;
height: 32px;
vertical-align: top;
margin-right: 10px;
}
.two {
margin-right: 0;
}
}
.dig-content {
width: fit-content;
max-width: 70%;
background: #e4ecf7;
border-radius: 4px;
font-size: 14px;
color: #333333;
padding: 10px 12px;
white-space: pre-wrap;
text-align: left;
margin: -14px 0 0 40px;
line-height: 20px;
}
.suggest {
width: fit-content;
max-width: 70%;
background: #fff;
border-radius: 4px;
font-size: 14px;
color: #333333;
padding: 10px 12px;
white-space: pre-wrap;
text-align: left;
line-height: 20px;
margin-top: 12px;
margin-right: 40px;
display: inline-block;
.improve {
width: 94px;
height: 28px;
background: #f2f7fc;
border-radius: 4px;
padding: 4px 8px;
display: flex;
align-items: center;
font-weight: 500;
font-size: 14px;
color: #333333;
margin-bottom: 6px;
box-sizing: border-box;
white-space: nowrap;
.improve-img {
width: 14px;
height: 14px;
margin-right: 8px;
}
}
.improve-text {
margin: 0 8px;
}
.line {
width: 100%;
height: 1px;
margin: 12px 8px;
background-color: #ebedff;
}
}
}
.nth-child {
text-align: right;
.dig-content {
display: inline-block;
background: #ffffff;
margin-right: 38px;
line-height: 22px;
}
}
}
}
}
}
.empty-box {
display: flex;
flex-direction: column;
font-size: 12px;
color: #999999;
padding-top: 184px;
text-align: center;
width: 100%;
height: 100%;
box-sizing: border-box;
border-radius: 0 4px 4px 4px;
.icon {
width: 270px;
height: 120px;
margin: 0 auto 8px;
img {
width: 100%;
height: 100%;
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -283,11 +283,11 @@ export default { ...@@ -283,11 +283,11 @@ export default {
width: '180px', width: '180px',
prop: 'serviceMerchantNo' prop: 'serviceMerchantNo'
}, },
{ // {
label: '工牌编号', // label: '工牌编号',
prop: 'badgeId', // prop: 'badgeId',
width: '200px' // width: '200px'
}, // },
{ {
label: '接待时长', label: '接待时长',
prop: 'seconds', prop: 'seconds',
......
<template> <template>
<div class="analyse" v-loading="loading"> <div class="analyse" v-loading="loading">
<GLCombiForm <el-tabs v-model="activeName">
ref="showSearch" <el-tab-pane label="质检明细" name="first"></el-tab-pane>
class="show-search" <el-tab-pane label="攻防明细" name="second"></el-tab-pane>
:formObj="searchForm" </el-tabs>
:form-data="showFormData" <template v-if="activeName === 'first'">
@handleOk="handleSearch" <div class="analyse-content">
@handleRest="handleReset" <GLCombiForm ref="showSearch" class="show-search" :formObj="searchForm" :form-data="showFormData" @handleOk="handleSearch" @handleRest="handleReset">
>
<div slot="firstClassify"> <div slot="firstClassify">
<el-select <el-select v-model="searchForm.firstClassify" clearable placeholder="请选择" @change="changeClassify">
v-model="searchForm.firstClassify" <el-option v-for="item in baseData.firstClassifyList" :key="item" :label="item" :value="item"></el-option>
clearable
placeholder="请选择"
@change="changeClassify"
>
<el-option
v-for="item in baseData.firstClassifyList"
:key="item"
:label="item"
:value="item"
></el-option>
</el-select> </el-select>
</div> </div>
<div slot="secondClassify"> <div slot="secondClassify">
<el-select <el-select v-model="searchForm.secondClassify" clearable placeholder="请选择">
v-model="searchForm.secondClassify" <el-option v-for="item in baseData.secondClassifyList" :key="item" :label="item" :value="item"></el-option>
clearable
placeholder="请选择"
>
<el-option
v-for="item in baseData.secondClassifyList"
:key="item"
:label="item"
:value="item"
></el-option>
</el-select> </el-select>
</div> </div>
<template slot="score"> <template slot="score">
<el-input-range <el-input-range start-placeholder="请输入" end-placeholder="请输入" :displayValue="searchForm.qualityTestScore"></el-input-range>
start-placeholder="请输入"
end-placeholder="请输入"
:displayValue="searchForm.qualityTestScore"
></el-input-range>
</template> </template>
</GLCombiForm> </GLCombiForm>
<div class="theader"> <div class="theader">
<div class="title">话术列表</div> <div class="title">话术列表</div>
<el-radio-group <el-radio-group v-model="searchForm.hitResult" size="small">
v-model="searchForm.hitResult"
size="small"
>
<el-radio-button label="">全部</el-radio-button> <el-radio-button label="">全部</el-radio-button>
<el-radio-button label="1">命中</el-radio-button> <el-radio-button label="1">命中</el-radio-button>
<el-radio-button label="0">未命中</el-radio-button> <el-radio-button label="0">未命中</el-radio-button>
</el-radio-group> </el-radio-group>
</div> </div>
<GLTable <GLTable ref="analyseTable" :hasNum="false" :search-form="searchFormSearch" :table-params="tableParams" :before-search-fn="beforeSearchFn" :pageConf="pageConf" :hasPage="false" :noDataImg="url" :span-method="arraySpanMethod" :tableData="analyseList" :border="true" noDataText="数据分析中">
ref="analyseTable" <div slot="scoreHtml" slot-scope="scope">
:hasNum="false"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn"
:pageConf="pageConf"
:hasPage="false"
:noDataImg="url"
:span-method="arraySpanMethod"
:tableData="analyseList"
:border="true"
noDataText="数据分析中"
>
<div
slot="scoreHtml"
slot-scope="scope"
>
<template v-if="scope.scope.score || scope.scope.score === 0"> <template v-if="scope.scope.score || scope.scope.score === 0">
{{ scope.scope.score }} {{ scope.scope.score }}
</template> </template>
<template v-else>--</template> <template v-else>--</template>
</div> </div>
<template <template slot="suggestions" slot-scope="scope">
slot="suggestions" <el-tooltip v-if="scope.scope.suggestions" effect="light" placement="top">
slot-scope="scope" <div slot="content" v-html="scope.scope.suggestions"></div>
> <div class="two-line" v-html="scope.scope.suggestions"></div>
<el-tooltip
v-if="scope.scope.suggestions"
effect="light"
placement="top"
>
<div
slot="content"
v-html="scope.scope.suggestions"
></div>
<div
class="two-line"
v-html="scope.scope.suggestions"
></div>
</el-tooltip> </el-tooltip>
<div v-else>--</div> <div v-else>--</div>
</template> </template>
<template <template slot="hitText" slot-scope="scope">
slot="hitText"
slot-scope="scope"
>
<div v-if="!scope.scope.score">--</div> <div v-if="!scope.scope.score">--</div>
<template v-else> <template v-else>
<el-tooltip <el-tooltip v-if="scope.scope.hitText" effect="light" placement="top">
v-if="scope.scope.hitText" <div slot="content" v-html="scope.scope.hitText"></div>
effect="light"
placement="top"
>
<div
slot="content"
v-html="scope.scope.hitText"
></div>
<div <div class="two-line" v-html="scope.scope.hitText"></div>
class="two-line"
v-html="scope.scope.hitText"
></div>
</el-tooltip> </el-tooltip>
<div v-else>--</div> <div v-else>--</div>
</template> </template>
</template> </template>
<template <template slot="hitResult" slot-scope="scope">
slot="hitResult"
slot-scope="scope"
>
<div :class="['tag', scope.scope.hitResult == 1 ? 'gre' : 'red']"> <div :class="['tag', scope.scope.hitResult == 1 ? 'gre' : 'red']">
{{ scope.scope.hitResult == 1 ? '是' : '否' }} {{ scope.scope.hitResult == 1 ? '是' : '否' }}
</div> </div>
</template> </template>
</GLTable> </GLTable>
</div> </div>
</template>
<template v-else>
<attack-detail :detailObj="detailObj" />
</template>
</div>
</template> </template>
<script> <script>
import ElInputRange from './el-input-range' import ElInputRange from './el-input-range'
import url from '@/assets/empty-2.png' import url from '@/assets/empty-2.png'
import { Util, deepClone } from '@/common/util' import { Util, deepClone } from '@/common/util'
import AttackDetail from './attackDetail.vue'
export default { export default {
components: { components: {
ElInputRange ElInputRange,
AttackDetail
}, },
props: { props: {
detailObj: { detailObj: {
type: Object, type: Object,
default: () => { } default: () => {}
} }
}, },
data () { data() {
return { return {
activeName: 'first',
analyseList: [], analyseList: [],
url: url, url: url,
spanArr1: [], spanArr1: [],
...@@ -230,17 +166,17 @@ export default { ...@@ -230,17 +166,17 @@ export default {
} }
}, },
watch: { watch: {
'searchForm.hitResult' () { 'searchForm.hitResult'() {
this.getList() this.getList()
} }
}, },
mounted () { mounted() {
this.$refs.analyseTable.tableHeightValues = '100%' this.$refs.analyseTable.tableHeightValues = '100%'
// this.getPointCategory() // this.getPointCategory()
this.getList() this.getList()
}, },
methods: { methods: {
async getList () { async getList() {
this.loading = true this.loading = true
try { try {
await this.beforeSearchFn() await this.beforeSearchFn()
...@@ -261,10 +197,10 @@ export default { ...@@ -261,10 +197,10 @@ export default {
this.loading = false this.loading = false
} }
}, },
formatSrt (str) { formatSrt(str) {
return str?.replace(/\n/g, '<br/>') || '' return str?.replace(/\n/g, '<br/>') || ''
}, },
getPointCategory () { getPointCategory() {
this.classifyMap = new Map() this.classifyMap = new Map()
this.$apis.quality.getPointCategory().then(res => { this.$apis.quality.getPointCategory().then(res => {
// console.log(res) // console.log(res)
...@@ -274,11 +210,11 @@ export default { ...@@ -274,11 +210,11 @@ export default {
} }
}) })
}, },
changeClassify () { changeClassify() {
this.searchForm.secondClassify = '' this.searchForm.secondClassify = ''
this.baseData.secondClassifyList = this.classifyMap.get(this.searchForm.firstClassify) this.baseData.secondClassifyList = this.classifyMap.get(this.searchForm.firstClassify)
}, },
beforeSearchFn () { beforeSearchFn() {
return new Promise(resolve => { return new Promise(resolve => {
this.searchFormSearch = deepClone(this.searchForm) this.searchFormSearch = deepClone(this.searchForm)
this.searchFormSearch.batchId = this.detailObj.id this.searchFormSearch.batchId = this.detailObj.id
...@@ -292,10 +228,10 @@ export default { ...@@ -292,10 +228,10 @@ export default {
resolve() resolve()
}) })
}, },
handleSearch () { handleSearch() {
this.getList() this.getList()
}, },
handleReset () { handleReset() {
this.searchForm = { this.searchForm = {
// firstClassify: '', // firstClassify: '',
// secondClassify: '', // secondClassify: '',
...@@ -306,12 +242,12 @@ export default { ...@@ -306,12 +242,12 @@ export default {
this.handleSearch() this.handleSearch()
}, },
// 初始化合并行数组 // 初始化合并行数组
mergeInit () { mergeInit() {
this.spanArr1 = [] // this.spanArr1 = [] //
this.spanIndex1 = 0 // this.spanIndex1 = 0 //
}, },
// 合并表格 // 合并表格
merge (data) { merge(data) {
this.mergeInit() this.mergeInit()
if (data.length > 0) { if (data.length > 0) {
for (var i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {
...@@ -332,7 +268,7 @@ export default { ...@@ -332,7 +268,7 @@ export default {
} }
}, },
// 合并单元格 // 合并单元格
arraySpanMethod ({ row, column, rowIndex, columnIndex }) { arraySpanMethod({ row, column, rowIndex, columnIndex }) {
const len = this.analyseList.length const len = this.analyseList.length
if (columnIndex === 1) { if (columnIndex === 1) {
...@@ -343,14 +279,13 @@ export default { ...@@ -343,14 +279,13 @@ export default {
rowspan: _row_1, rowspan: _row_1,
colspan: _col_1 colspan: _col_1
} }
} } else if (rowIndex === len) {
else if (rowIndex === len) {
return { return {
rowspan: 1, rowspan: 1,
colspan: 1 colspan: 1
} }
} }
}, }
} }
} }
</script> </script>
...@@ -384,7 +319,7 @@ export default { ...@@ -384,7 +319,7 @@ export default {
margin-bottom: 8px; margin-bottom: 8px;
} }
} }
/deep/.el-table tbody tr:last-child td{ /deep/.el-table tbody tr:last-child td {
border-bottom: 1px solid #ebeef5; border-bottom: 1px solid #ebeef5;
} }
} }
...@@ -418,6 +353,10 @@ export default { ...@@ -418,6 +353,10 @@ export default {
color: #eb4e4e; color: #eb4e4e;
background: #fdeded; background: #fdeded;
} }
.analyse-content{
height:calc(100% - 50px);
overflow-y: scroll;
}
} }
/deep/.two-line { /deep/.two-line {
......
...@@ -117,7 +117,7 @@ export default { ...@@ -117,7 +117,7 @@ export default {
} }
}, },
{ {
label: '话术评分', label: '质检得分',
formatter (row) { formatter (row) {
return row.score != null return row.score != null
? `<div class="num">${row.score}<span class="unit">分</span></div>` ? `<div class="num">${row.score}<span class="unit">分</span></div>`
...@@ -125,9 +125,15 @@ export default { ...@@ -125,9 +125,15 @@ export default {
} }
}, },
{ {
label: '接待时长', label: "攻防得分",
formatter (row) { formatter(row) {
return `<div class="num">${row.duration ? toMinutesAndSeconds(row.duration) : '-'}</div>` return row.defence === 0
? `<div class="num">${row.defencePoint}<span class="unit">分</span></div>`
: row.defence === 1
? `<span style="font-size:22px;color:#999">分析中</span>`
: row.defence === 2
? `<span style="font-size:22px;color:#999">未发现攻防</span>`
: `<span style="font-size:22px;color:#999">-</span>`
} }
} }
], ],
......
...@@ -5,15 +5,15 @@ ...@@ -5,15 +5,15 @@
<div class="info-wrap"> <div class="info-wrap">
<div class="info-item flex"> <div class="info-item flex">
<label>员工:</label> <label>员工:</label>
<span>{{ queryData.employeeName }} {{queryData.phoneNumber || ''}}</span> <span>{{ queryData.employeeName }} {{ queryData.phoneNumber || '' }}</span>
</div> </div>
<div class="info-item flex"> <div class="info-item flex">
<label>门店:</label> <label>门店:</label>
<span>{{queryData.merchantName || '-'}}</span> <span>{{ queryData.merchantName || '-' }}</span>
</div> </div>
<div class="info-item flex"> <div class="info-item flex">
<label>服务商:</label> <label>服务商:</label>
<span>{{queryData.serviceMerchantNo || '-'}}</span> <span>{{ queryData.serviceMerchantNo || '-' }}</span>
<!-- <template v-if="queryData.serviceList"> <!-- <template v-if="queryData.serviceList">
<el-tooltip <el-tooltip
effect="dark" effect="dark"
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<span v-else>-</span> --> <span v-else>-</span> -->
</div> </div>
<div class="info-item flex"> <div class="info-item flex">
<label>质检日期:</label> <label>接待日期:</label>
<span>{{ queryData.searchdate }}</span> <span>{{ queryData.searchdate }}</span>
</div> </div>
<div class="info-item flex"> <div class="info-item flex">
...@@ -38,78 +38,44 @@ ...@@ -38,78 +38,44 @@
<div class="content"> <div class="content">
<h2>接待列表</h2> <h2>接待列表</h2>
<div class="content-box"> <div class="content-box">
<GLCombiForm <GLCombiForm ref="showSearch" class="show-search" labelWidth="110px" :formObj="searchForm" :form-data="showFormData" @handleOk="handleSearch" @handleRest="handleReset">
ref="showSearch"
class="show-search"
labelWidth="110px"
:formObj="searchForm"
:form-data="showFormData"
@handleOk="handleSearch"
@handleRest="handleReset"
>
<template slot="score"> <template slot="score">
<el-input-range <el-input-range start-placeholder="请输入" end-placeholder="请输入" :displayValue="searchForm.qualityTestScore"></el-input-range>
start-placeholder="请输入"
end-placeholder="请输入"
:displayValue="searchForm.qualityTestScore"
></el-input-range>
</template> </template>
<template slot="recepTime"> <template slot="recepTime">
<el-time-picker <el-time-picker is-range v-model="searchForm.recepTime" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" placeholder="选择时间范围" :clearable="false"></el-time-picker>
is-range
v-model="searchForm.recepTime"
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间"
placeholder="选择时间范围"
:clearable="false"
>
</el-time-picker>
</template> </template>
</GLCombiForm> </GLCombiForm>
<GLTable <GLTable ref="recepDetail" :get-list-api="getListApi" :hasNum="false" :search-form="searchFormSearch" :table-params="tableParams" :before-search-fn="beforeSearchFn" @setTableFinishFun="setTableFinishFun" :pageConf="pageConf">
ref="recepDetail" <div slot="durationHtml" slot-scope="scope">
:get-list-api="getListApi"
:hasNum="false"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun"
:pageConf="pageConf"
>
<div
slot="durationHtml"
slot-scope="scope"
>
<template v-if="scope.scope.duration"> <template v-if="scope.scope.duration">
{{ toMinutesAndSeconds(scope.scope.duration) }} {{ toMinutesAndSeconds(scope.scope.duration) }}
</template> </template>
<template v-else>--</template> <template v-else>--</template>
</div> </div>
<div <div slot="scoreHtml" slot-scope="scope">
slot="scoreHtml"
slot-scope="scope"
>
<template v-if="scope.scope.score || scope.scope.score === 0"> <template v-if="scope.scope.score || scope.scope.score === 0">
{{ scope.scope.score }} {{ scope.scope.score }}
</template> </template>
<template v-else>分析中</template> <template v-else>分析中</template>
</div> </div>
<div <div slot="estimatedResult" slot-scope="scope" :class="['tag', scope.scope.estimatedResult == '成交' ? (scope.scope.estimatedResult == '战败' ? 'redBg' : 'greenBg') : 'grayBg']">
slot="estimatedResult"
slot-scope="scope"
:class="['tag', scope.scope.estimatedResult == '成交' ? (scope.scope.estimatedResult == '战败' ? 'redBg' : 'greenBg') : 'grayBg']"
>
{{ scope.scope.estimatedResult }} {{ scope.scope.estimatedResult }}
</div> </div>
<template <div slot="defencePoint" slot-scope="scope">
slot="auth-button" <template v-if="scope.scope.defence === 0">{{ scope.scope.defencePoint }}</template>
slot-scope="scope" <template v-else-if="scope.scope.defence === 1">分析中</template>
> <template v-else-if="scope.scope.defence === 2">未发现攻防</template>
<el-button <template v-else>-</template>
type="text" </div>
@click="qualitDetail(scope.scope)" <div slot="customerTypeName" slot-scope="scope">
>接待详情</el-button> <template v-if="scope.scope.defence === 0">{{ scope.scope.customerTypeName }}</template>
<template v-else-if="scope.scope.defence === 1">分析中</template>
<template v-else-if="scope.scope.defence === 2">未知</template>
<template v-else>-</template>
</div>
<template slot="auth-button" slot-scope="scope">
<el-button type="text" @click="qualitDetail(scope.scope)">接待详情</el-button>
</template> </template>
</GLTable> </GLTable>
</div> </div>
...@@ -121,7 +87,7 @@ import { Util, deepClone } from '@/common/util' ...@@ -121,7 +87,7 @@ import { Util, deepClone } from '@/common/util'
import ElInputRange from './el-input-range' import ElInputRange from './el-input-range'
let viewStorage = null let viewStorage = null
export default { export default {
data () { data() {
return { return {
queryData: {}, queryData: {},
searchForm: { searchForm: {
...@@ -137,7 +103,7 @@ export default { ...@@ -137,7 +103,7 @@ export default {
label: '接待时间', label: '接待时间',
type: 'datePicker', type: 'datePicker',
name: 'recepTime', name: 'recepTime',
addHtml: 'recepTime', addHtml: 'recepTime'
// isClear: true, // isClear: true,
// pickerOptions: 'beforeRangePickerOptions' // pickerOptions: 'beforeRangePickerOptions'
}, },
...@@ -166,20 +132,22 @@ export default { ...@@ -166,20 +132,22 @@ export default {
prop: 'key' prop: 'key'
}, },
{ {
label: "客户姓名", label: '客户姓名',
prop: "customerName" prop: 'customerName'
}, },
{ {
label: "车型", label: '车型',
prop: "carModel" prop: 'carModel'
}, },
{ {
label: "APP接待结果", label: 'APP接待结果',
formatter (row) { formatter(row) {
return row.receptionStatus != null ? { return row.receptionStatus != null
? {
1: '成交', 1: '成交',
0: '战败' 0: '战败'
}[row.receptionStatus] : '--' }[row.receptionStatus]
: '--'
} }
}, },
{ {
...@@ -188,11 +156,21 @@ export default { ...@@ -188,11 +156,21 @@ export default {
addHtml: 'estimatedResult' addHtml: 'estimatedResult'
}, },
{ {
label: '话术质检评分/分', label: '质检评分/分',
prop: 'score', prop: 'score',
addHtml: 'scoreHtml' addHtml: 'scoreHtml'
}, },
{ {
label: '攻防得分/分',
prop: 'defencePoint',
addHtml: 'defencePoint'
},
{
label: '客户类型识别',
prop: 'customerTypeName,',
addHtml: 'customerTypeName,'
},
{
label: '接待时长', label: '接待时长',
prop: 'duration', prop: 'duration',
addHtml: 'durationHtml' addHtml: 'durationHtml'
...@@ -204,9 +182,7 @@ export default { ...@@ -204,9 +182,7 @@ export default {
{ {
label: '结束接待时间', label: '结束接待时间',
prop: 'endTime' prop: 'endTime'
}, }
] ]
}, },
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
...@@ -232,7 +208,7 @@ export default { ...@@ -232,7 +208,7 @@ export default {
components: { components: {
ElInputRange ElInputRange
}, },
mounted () { mounted() {
this.setQuery() this.setQuery()
this.getOptionsList() this.getOptionsList()
let timer = setInterval(() => { let timer = setInterval(() => {
...@@ -245,7 +221,7 @@ export default { ...@@ -245,7 +221,7 @@ export default {
}, 1e3) }, 1e3)
}, },
methods: { methods: {
setQuery () { setQuery() {
const query = this.$route?.query?.data ? JSON.parse(this.$route.query.data) : '' const query = this.$route?.query?.data ? JSON.parse(this.$route.query.data) : ''
if (viewStorage) this.queryData = viewStorage if (viewStorage) this.queryData = viewStorage
if (query) { if (query) {
...@@ -253,13 +229,14 @@ export default { ...@@ -253,13 +229,14 @@ export default {
viewStorage = query viewStorage = query
if (!this.searchForm.recepTime.length) this.searchForm.recepTime = [new Date(`${query.searchdate} 00:00:00`), new Date(`${query.searchdate} 23:59:59`)] if (!this.searchForm.recepTime.length) this.searchForm.recepTime = [new Date(`${query.searchdate} 00:00:00`), new Date(`${query.searchdate} 23:59:59`)]
} }
if (!viewStorage) return this.$router.push({ if (!viewStorage)
return this.$router.push({
path: '/qualityManage/index' path: '/qualityManage/index'
}) })
let [url] = window.location.href.split('?') let [url] = window.location.href.split('?')
window.history.replaceState('', '', `${url}?data=${encodeURIComponent(JSON.stringify(viewStorage))}`) window.history.replaceState('', '', `${url}?data=${encodeURIComponent(JSON.stringify(viewStorage))}`)
}, },
toMinutesAndSeconds (seconds) { toMinutesAndSeconds(seconds) {
seconds = Math.floor(seconds / 1000) seconds = Math.floor(seconds / 1000)
let formattedTime = '' let formattedTime = ''
if (seconds < 60) { if (seconds < 60) {
...@@ -280,10 +257,10 @@ export default { ...@@ -280,10 +257,10 @@ export default {
return formattedTime return formattedTime
} }
}, },
handleSearch () { handleSearch() {
this.$refs.recepDetail.refreshTable(true, true) this.$refs.recepDetail.refreshTable(true, true)
}, },
handleReset () { handleReset() {
this.searchForm = { this.searchForm = {
recepTime: [], recepTime: [],
qualityTestScore: [], qualityTestScore: [],
...@@ -291,15 +268,18 @@ export default { ...@@ -291,15 +268,18 @@ export default {
} }
this.$refs.recepDetail.refreshTable() this.$refs.recepDetail.refreshTable()
}, },
qualitDetail (row) { qualitDetail(row) {
const list = this.$refs.recepDetail.data, const list = this.$refs.recepDetail.data,
currentNum = list.findIndex(e => e.id == row.id), currentNum = list.findIndex(e => e.id == row.id),
{ queryData } = this, { queryData } = this,
key = `${queryData.searchdate}_${queryData.phoneNumber}_${queryData.merchantNo}` key = `${queryData.searchdate}_${queryData.phoneNumber}_${queryData.merchantNo}`
sessionStorage.setItem(key, JSON.stringify({ sessionStorage.setItem(
key,
JSON.stringify({
list, list,
currentNum currentNum
})) })
)
this.$router.push({ this.$router.push({
path: '/qualityManage/qualityDetail', path: '/qualityManage/qualityDetail',
query: { query: {
...@@ -307,7 +287,7 @@ export default { ...@@ -307,7 +287,7 @@ export default {
} }
}) })
}, },
beforeSearchFn () { beforeSearchFn() {
return new Promise(resolve => { return new Promise(resolve => {
this.setQuery() this.setQuery()
this.searchFormSearch = deepClone(this.searchForm) this.searchFormSearch = deepClone(this.searchForm)
...@@ -334,12 +314,12 @@ export default { ...@@ -334,12 +314,12 @@ export default {
resolve() resolve()
}) })
}, },
setTableFinishFun (data) { setTableFinishFun(data) {
for (let i = 0; i < data.length; i++) { for (let i = 0; i < data.length; i++) {
data[i].key = i + 1 data[i].key = i + 1
} }
}, },
getOptionsList () { getOptionsList() {
this.showFormData.forEach((item, index) => { this.showFormData.forEach((item, index) => {
if (item.type === 'select') { if (item.type === 'select') {
if (this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this.showFormData[index].optionLabel] !== '全部') { if (this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this.showFormData[index].optionLabel] !== '全部') {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!