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',
......
...@@ -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>`
} }
} }
], ],
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!