Commit 0bec0f94 by 王志慧

Merge branch 'SAAS+V4.37.0' into 'SAAS+V4.37.0_0326'

Saas+v4.37.0

See merge request !6
2 parents 2a516883 cba0ddbe
......@@ -101,6 +101,9 @@ html {
border-bottom-color: #e4e7ed !important;
}
.el-popover{
max-height:300px;
overflow: scroll;
overflow:hidden;
}
.scrollHeight{
max-height:200px!important;
overflow-y: scroll;
}
\ No newline at end of file
......@@ -19,15 +19,20 @@
<div class="circle" @mousemove="isCircle = true" draggable="true" v-if="isCircle"></div>
</div>
</div>
<div class="trumpet" @click="handleAudio">
<img src="@/assets/trumpet.png" />
<div class="trumpet" @click="handleMute">
<img src="@/assets/trumpet.png" v-if="isMuted" />
<img src="@/assets/mute.png" v-if="!isMuted" />
</div>
</div>
<div class="record-info">
<div class="dialog">
<template v-for="item in dialogList">
<div :class="{ 'dialog-detail': true, 'nth-child': item.role % 2 === 1 }" :key="item.id">
<div class="name">角色{{ (item.role % 2) + 1 }}</div>
<div class="name">
<img class="role" src="@/assets/role-one.png" v-if="item.role % 2 === 0" />
角色{{ (item.role % 2) + 1 }}
<img class="role" src="@/assets/role-two.png" v-if="item.role % 2 === 1" />
</div>
<div class="dig-content" @click="currentDialog(item)">
{{ item.content }}
</div>
......@@ -39,8 +44,7 @@
<img class="robot" src="@/assets/robot.png" />
AI对话摘要
</div>
<div class="abText">
{{ detailObj.digest }}
<div class="abText" v-html="formatSrt(detailObj.digest)">
</div>
</div>
</div>
......@@ -59,6 +63,7 @@ export default {
return {
myAud: '',
isPlay: true,
isMuted:true,
dialogList: [],
totalTime: '0:00',
currentTime: '0:00',
......@@ -72,6 +77,9 @@ export default {
this.conversationDetailPage()
},
methods: {
formatSrt(str) {
return str.replace(/\n/g, "<br/>")
},
currentDialog(data) {
this.myAud.currentTime = data.mergedOffset
},
......@@ -128,6 +136,11 @@ export default {
this.myAud.pause()
}
},
handleMute() {
this.isMuted = !this.isMuted
console.log(this.isMuted)
this.myAud.muted=!this.isMuted
},
conversationDetailPage() {
this.$apis.quality
.conversationDetailPage({
......@@ -148,7 +161,7 @@ export default {
margin: auto;
.record {
width: 600px;
margin: 20px auto;
margin: 5px auto 0px;
height: 56px;
background: #f7f9fa;
border-radius: 32px;
......@@ -223,6 +236,7 @@ export default {
// align-items: center;
.dialog {
width: 100%;
min-width: 588px;
height: 544px;
background: #f7f9fa;
border-radius: 4px;
......@@ -237,9 +251,14 @@ export default {
color: #666666;
letter-spacing: 0;
line-height: 16px;
.role {
width: 40px;
height: 40px;
vertical-align: top;
margin-right: 10px;
}
}
.dig-content {
margin-top: 4px;
width: 404px;
background: #ffffff;
border-radius: 4px;
......@@ -248,6 +267,9 @@ export default {
padding: 10px 12px;
white-space: pre-wrap;
text-align: left;
margin-left: 50px;
margin-top: -20px;
line-height: 20px;
}
}
.nth-child {
......@@ -255,6 +277,7 @@ export default {
.dig-content {
display: inline-block;
background: #ebebff;
margin-right: 56px;
}
}
}
......@@ -290,6 +313,7 @@ export default {
background: #ffffff;
border-radius: 4px;
overflow: scroll;
line-height: 20px;
}
}
}
......
......@@ -26,9 +26,9 @@
<el-input-range start-placeholder="请输入" end-placeholder="请输入" :displayValue="searchForm.qualityTestScore"></el-input-range>
</div>
<!-- 当日到店量 -->
<div slot="toStoreCount">
<!-- <div slot="toStoreCount">
<el-input-range start-placeholder="请输入" end-placeholder="请输入" :displayValue="searchForm.toStoreCount"></el-input-range>
</div>
</div> -->
<div slot="AbnormalProportion">
<el-input-range start-placeholder="请输入" end-placeholder="请输入" :displayValue="searchForm.AbnormalProportion"></el-input-range>
</div>
......@@ -39,8 +39,8 @@
<template v-if="scope.scope.storeList && scope.scope.storeList.length > 1">
<span>{{ scope.scope.storeList.slice(0, 1).join('') }}</span>
<el-popover placement="top" width="fit-content" trigger="hover">
<div v-for="(item, index) in scope.scope.storeList" :key="index">
{{ item }}
<div :class="{ scrollHeight: scope.scope.storeList.length >= 10 }">
<div v-for="(item, index) in scope.scope.storeList" :key="index">{{ item }}</div>
</div>
<span class="more-info" slot="reference">...({{ scope.scope.storeList.length }})</span>
</el-popover>
......@@ -52,7 +52,7 @@
</div>
<div slot="seconds" slot-scope="scope">
<template v-if="scope.scope.seconds">
{{ (scope.scope.seconds / 60).toFixed(1) }}
{{ toMinutesAndSeconds(scope.scope.seconds) }}
</template>
<template v-else>--</template>
</div>
......@@ -75,16 +75,21 @@
<template v-if="scope.scope.abnormalProportion">
{{ scope.scope.abnormalProportion + '%' }}
</template>
<template v-else>统计中</template>
<template v-else-if="scope.scope.abnormalProportion==0">
{{ scope.scope.abnormalProportion+ '%' }}
</template>
<template v-else>--</template>
</div>
<div slot="scoreHtml" slot-scope="scope">
<template v-if="scope.scope.score || scope.scope.score === 0">
{{ scope.scope.score }}
</template>
<template v-else>统计中</template>
<template v-else>--</template>
</div>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button type="text" @click="recepDetail(scope.scope)" :disabled="!scope.scope.score && scope.scope.score != 0">接待明细</el-button>
<el-button type="text" @click="recepDetail(scope.scope)" v-if="scope.scope.score || scope.scope.score == 0" >接待明细</el-button>
<span v-else class="dis-class" @click="recepDetail()">接待明细</span>
</div>
</GLTable>
</div>
......@@ -109,13 +114,16 @@ export default {
text: '录音时长',
value: 'totalRecordingDuration',
formatter: data => {
let strHtml = this.toMinutesAndSeconds(data.totalRecordingDuration).h
? `<span style="font-weight:700;font-size:26px">${this.toMinutesAndSeconds(data.totalRecordingDuration).h}</span>小时
<span style="font-weight:700;font-size:26px;">${this.toMinutesAndSeconds(data.totalRecordingDuration).m}</span>分钟
`
: ` <span style="font-weight:700;font-size:26px;">${this.toMinutesAndSeconds(data.totalRecordingDuration).m}</span>分钟`
return strHtml
return `<span style="font-weight:700;font-size:26px;">${data.totalRecordingDuration ? this.toMinutesAndSeconds(data.totalRecordingDuration) : '--'}</span>`
}
// formatter: data => {
// let strHtml = this.toMinutesAndSeconds(data.totalRecordingDuration).h
// ? `<span style="font-weight:700;font-size:26px">${this.toMinutesAndSeconds(data.totalRecordingDuration).h}</span>小时
// <span style="font-weight:700;font-size:26px;">${this.toMinutesAndSeconds(data.totalRecordingDuration).m}</span>分钟
// `
// : ` <span style="font-weight:700;font-size:26px;">${this.toMinutesAndSeconds(data.totalRecordingDuration).m}</span>分钟`
// return strHtml
// }
},
{
icon: 'facility',
......@@ -184,11 +192,11 @@ export default {
isClear: true
},
{
label: '当日到店量',
name: 'toStoreCount',
addHtml: 'toStoreCount'
},
// {
// label: '当日到店量',
// name: 'toStoreCount',
// addHtml: 'toStoreCount'
// },
{
label: '异常占比',
name: 'AbnormalProportion',
......@@ -201,7 +209,7 @@ export default {
storeMerchantNo: '',
employeeName: '',
phoneNumber: '',
toStoreCount: [],
// toStoreCount: [],
qualityTestScore: [],
AbnormalProportion: []
},
......@@ -218,12 +226,14 @@ export default {
},
{
label: '员工',
prop: 'employeeName'
prop: 'employeeName',
width:150,
line:1
},
{
label: '手机号',
prop: 'phoneNumber',
width: '120px'
width: '125px'
},
{
label: '归属门店',
......@@ -243,7 +253,7 @@ export default {
width: '140px'
},
{
label: '录音时长/分钟',
label: '录音时长',
prop: 'seconds',
addHtml: 'seconds',
width: '150px'
......@@ -381,11 +391,11 @@ export default {
})
},
recepDetail(row) {
if (!row.score && row.score != 0) {
if (!row) {
this.$confirm('质检分析中,请耐心等待', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
type: 'warning',
showCancelButton:false,
showConfirmButton:false
})
return
}
......@@ -396,12 +406,32 @@ export default {
}
})
},
toMinutesAndSeconds(time) {
const h = Math.floor(time / 3600)
const m = parseInt((time % 3600) / 60)
return {
h,
m
// toMinutesAndSeconds(time) {
// const h = Math.floor(time / 3600)
// const m = parseInt((time % 3600) / 60)
// return {
// h,
// m
// }
// },
toMinutesAndSeconds(seconds) {
// seconds = Math.floor(seconds / 1000)
let formattedTime = ''
if (seconds < 60) return seconds + '秒'
else if (seconds > 3600) {
let hours = Math.floor(seconds / 3600),
minutes = Math.floor((seconds % 3600) / 60)
if (hours > 0) formattedTime += hours + '小时'
if (minutes > 0 || hours > 0) formattedTime += minutes + '分'
return formattedTime
} else {
let hours = Math.floor(seconds / 3600),
minutes = Math.floor((seconds % 3600) / 60),
remainingSeconds = seconds % 60
if (hours > 0) formattedTime += hours + '小时'
if (minutes > 0 || hours > 0) formattedTime += minutes + '分'
if (remainingSeconds > 0) formattedTime += remainingSeconds + '秒'
return formattedTime
}
},
setTableFinishFun(data) {
......@@ -415,22 +445,21 @@ export default {
if (this.searchForm.searchdate) {
this.searchFormSearch.searchdate = Util.dateFormate(this.searchForm.searchdate, 'YYYY-MM-DD')
}
console.log(this.$global)
this.searchFormSearch.serviceMerchantNo = this.$globalState.session.merchantId
if (this.searchFormSearch.qualityTestScore) {
this.searchFormSearch.qualityTestScoreBegin = this.searchFormSearch.qualityTestScore[0]
this.searchFormSearch.qualityTestScoreEnd = this.searchFormSearch.qualityTestScore[1]
}
if (this.searchFormSearch.toStoreCount) {
this.searchFormSearch.toStoreCountBeg = this.searchFormSearch.toStoreCount[0]
this.searchFormSearch.toStoreCountEnd = this.searchFormSearch.toStoreCount[1]
}
// if (this.searchFormSearch.toStoreCount) {
// this.searchFormSearch.toStoreCountBeg = this.searchFormSearch.toStoreCount[0]
// this.searchFormSearch.toStoreCountEnd = this.searchFormSearch.toStoreCount[1]
// }
if (this.searchFormSearch.AbnormalProportion) {
this.searchFormSearch.AbnormalProportionBeg = this.searchFormSearch.AbnormalProportion[0]
this.searchFormSearch.AbnormalProportionEnd = this.searchFormSearch.AbnormalProportion[1]
}
delete this.searchFormSearch.qualityTestScore
delete this.searchFormSearch.toStoreCount
// delete this.searchFormSearch.toStoreCount
delete this.searchFormSearch.AbnormalProportion
resolve()
......@@ -463,7 +492,7 @@ export default {
storeMerchantNo: '',
employeeName: '',
phoneNumber: '',
toStoreCount: [],
// toStoreCount: [],
qualityTestScore: [],
AbnormalProportion: []
}
......@@ -477,11 +506,11 @@ export default {
<style scoped lang="scss">
.quality-control {
.header {
height: 136px;
display: flex;
align-items: center;
background: #ffffff;
padding: 16px 20px;
box-sizing: border-box;
border-bottom: 16px solid #f0f1f7;
.item {
......@@ -553,5 +582,9 @@ export default {
color: #5850ff;
cursor: pointer;
}
.dis-class{
color:#666;
cursor: pointer;
}
}
</style>
......@@ -30,6 +30,9 @@
</el-radio-group>
</div>
<GLTable ref="analyseTable" :get-list-api="getListApi" :search-form="searchFormSearch" :table-params="tableParams" :before-search-fn="beforeSearchFn" :pageConf="pageConf" :noDataImg="url">
<template slot="suggestions" slot-scope="scope">
<div v-html="formatSrt(scope.scope.suggestions)"></div>
</template>
<template slot="hitResult" slot-scope="scope">
<div :class="['tag', scope.scope.hitResult == 1 ? 'gre' : 'red']">
{{ scope.scope.hitResult == 1 ? '是' : '否' }}
......@@ -49,7 +52,7 @@ export default {
props: {
detailObj: {
type: Object,
default: ()=>{}
default: () => {}
}
},
data() {
......@@ -59,14 +62,14 @@ export default {
{
text: '话术评分',
formatter: data => {
console.log(data,11111111111)
return `<span style="font-weight:700;font-size:26px;">${data.score ? data.score : '0'}</span>分`
return `<span style="font-weight:700;font-size:20px;">${data.score ? data.score : '0'}</span>分`
}
},
{
text: '预计营销结果',
formatter: data => {
return `<span style="font-weight:700;font-size:20px;">${data.estimatedResult ? data.estimatedResult : '--'}</span>`
let classStr = data.estimatedResult == '成交' ? (data.estimatedResult == '战败' ? 'redStr' : 'greenStr') : 'grayStr'
return `<span class="${classStr}" style="font-weight:700;font-size:20px;">${data.estimatedResult ? data.estimatedResult : '--'}</span>`
}
},
{
......@@ -78,29 +81,37 @@ export default {
{
text: '对话时长',
formatter: data => {
return `<span style="font-weight:700;font-size:26px;">${data.duration}</span>
`
return `<span style="font-weight:700;font-size:20px;">${data.duration?this.toMinutesAndSeconds(data.duration):'--'}</span>`
}
// formatter: data => {
// let strHtml = this.toMinutesAndSeconds(data.duration).h
// ? `<span style="font-weight:700;font-size:20px">${this.toMinutesAndSeconds(data.duration).h}</span>小时
// <span style="font-weight:700;font-size:20px;">${this.toMinutesAndSeconds(data.duration).m}</span>分钟
// `
// : ` <span style="font-weight:700;font-size:20px;">${this.toMinutesAndSeconds(data.duration).m}</span>分钟`
// return strHtml
// }
}
],
searchForm: {
firstClassify: '',
secondClassify: '',
// firstClassify: '',
// secondClassify: '',
qualityTestScore: [],
hitResult: ''
},
searchFormSearch: {},
showFormData: [
{
label: '一级分类',
name: 'firstClassify',
addHtml: 'firstClassify'
},
{
label: '二级分类',
name: 'secondClassify',
addHtml: 'secondClassify'
},
// {
// label: '一级分类',
// name: 'firstClassify',
// addHtml: 'firstClassify'
// },
// {
// label: '二级分类',
// name: 'secondClassify',
// addHtml: 'secondClassify'
// },
{
label: '质检评分',
name: 'qualityTestScore',
......@@ -141,7 +152,8 @@ export default {
},
{
label: '话术建议',
prop: 'suggestions'
prop: 'suggestions',
addHtml:'suggestions'
}
]
},
......@@ -158,17 +170,41 @@ export default {
}
},
mounted() {
this.getPointCategory()
// this.getPointCategory()
},
methods: {
toMinutesAndSeconds(hourse) {
const h = Math.floor(hourse / 60)
const m = parseInt(hourse % 60)
return {
h,
m
formatSrt(str) {
return str.replace(/\n/g, "<br/>")
},
toMinutesAndSeconds(seconds) {
seconds = Math.floor(seconds / 1000)
let formattedTime = ''
if (seconds < 60) return seconds + '秒'
else if (seconds > 3600) {
let hours = Math.floor(seconds / 3600),
minutes = Math.floor((seconds % 3600) / 60)
if (hours > 0) formattedTime += hours + '小时'
if (minutes > 0 || hours > 0) formattedTime += minutes + '分'
return formattedTime
} else {
let hours = Math.floor(seconds / 3600),
minutes = Math.floor((seconds % 3600) / 60),
remainingSeconds = seconds % 60
if (hours > 0) formattedTime += hours + '小时'
if (minutes > 0 || hours > 0) formattedTime += minutes + '分'
if (remainingSeconds > 0) formattedTime += remainingSeconds + '秒'
return formattedTime
}
},
// toMinutesAndSeconds(time) {
// time = time / 1000
// const h = Math.floor(time / 3600)
// const m = parseInt((time % 3600) / 60)
// return {
// h,
// m
// }
// },
getPointCategory() {
this.classifyMap = new Map()
this.$apis.quality.getPointCategory().then(res => {
......@@ -201,8 +237,8 @@ export default {
},
handleReset() {
this.searchForm = {
firstClassify: '',
secondClassify: '',
// firstClassify: '',
// secondClassify: '',
qualityTestScore: [],
hitResult: ''
}
......@@ -218,11 +254,10 @@ export default {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom:20px;
margin-bottom: 20px;
.s-item {
flex: 1;
// min-width: 248px;
height: 84px;
background: #f7f9fa;
border-radius: 4px;
padding: 12px 20px;
......@@ -235,9 +270,22 @@ export default {
}
.content {
color: #333333;
line-height: 32px;
}
.greenStr {
color: #2cca74;
}
.redStr {
color: #eb4e4e;
}
.grayStr {
color: #999999;
}
}
}
.show-search{
margin-bottom:-68px;
}
.theader {
width: 100%;
display: flex;
......@@ -258,15 +306,19 @@ export default {
line-height: 24px;
box-sizing: border-box;
font-size: 14px;
margin:0 auto;
}
.gre {
color: #2cca74;
background: #e9f9f1;
}
.red {
color: #eb4e4e;
background: #fdeded;
margin: 0 auto;
}
}
</style>
<style>
.redStr {
color: #eb4e4e;
}
.greenStr {
color: #2cca74;
}
.grayStr{
color: #999999;
}
</style>
\ No newline at end of file
......@@ -50,5 +50,8 @@ export default {
}
</script>
<style scoped>
.el-tabs{
margin-top:-10px;
}
</style>
\ No newline at end of file
......@@ -36,19 +36,15 @@
</div>
</div>
<div class="content">
<GLCombiForm ref="showSearch" class="show-search" labelWidth="110px" :formObj="searchForm"
:form-data="showFormData" @handleOk="handleSearch" @handleRest="handleReset">
<GLCombiForm ref="showSearch" class="show-search" labelWidth="110px" :formObj="searchForm" :form-data="showFormData" @handleOk="handleSearch" @handleRest="handleReset">
<template slot="score">
<el-input-range start-placeholder="请输入" end-placeholder="请输入"
:displayValue="searchForm.qualityTestScore"></el-input-range>
<el-input-range start-placeholder="请输入" end-placeholder="请输入" :displayValue="searchForm.qualityTestScore"></el-input-range>
</template>
</GLCombiForm>
<GLTable ref="recepDetail" :get-list-api="getListApi" :hasNum="false" :search-form="searchFormSearch"
:table-params="tableParams" :before-search-fn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"
:pageConf="pageConf">
<GLTable ref="recepDetail" :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">
{{ (parseInt(scope.scope.duration) / 60000).toFixed(1) }}
{{ toMinutesAndSeconds(scope.scope.duration) }}
</template>
<template v-else>--</template>
</div>
......@@ -58,13 +54,15 @@
</template>
<template v-else>--</template>
</div>
<div slot="estimatedResult" slot-scope="scope" :class="['tag', scope.scope.estimatedResult == '成交' ? (scope.scope.estimatedResult == '战败' ? 'redBg' : 'greenBg') : 'grayBg']">
{{ scope.scope.estimatedResult }}
</div>
<template slot="auth-button" slot-scope="scope">
<el-button type="text" @click="qualitDetail(scope.scope)">质检详情</el-button>
</template>
</GLTable>
</div>
<quality-detail :isQualityVisible="isQualityVisible" v-if="isQualityVisible" :detailObj="detailObj"
@closeDialog="closeDialog"></quality-detail>
<quality-detail :isQualityVisible="isQualityVisible" v-if="isQualityVisible" :detailObj="detailObj" @closeDialog="closeDialog"></quality-detail>
</div>
</template>
<script>
......@@ -126,13 +124,14 @@ export default {
prop: 'endTime'
},
{
label: '录音时长/分钟',
label: '录音时长',
prop: 'duration',
addHtml: 'durationHtml'
},
{
label: '预计营销结果',
prop: 'estimatedResult'
prop: 'estimatedResult',
addHtml: 'estimatedResult'
},
{
label: '话术质检评分/分',
......@@ -168,6 +167,27 @@ export default {
this.getOptionsList()
},
methods: {
toMinutesAndSeconds(seconds) {
seconds = Math.floor(seconds / 1000)
let formattedTime = ''
if (seconds < 60) {
return seconds + '秒'
} else if (seconds > 3600) {
let hours = Math.floor(seconds / 3600),
minutes = Math.floor((seconds % 3600) / 60)
if (hours > 0) formattedTime += hours + '小时'
if (minutes > 0 || hours > 0) formattedTime += minutes + '分'
return formattedTime
} else {
let hours = Math.floor(seconds / 3600),
minutes = Math.floor((seconds % 3600) / 60),
remainingSeconds = seconds % 60
if (hours > 0) formattedTime += hours + '小时'
if (minutes > 0 || hours > 0) formattedTime += minutes + '分'
if (remainingSeconds > 0) formattedTime += remainingSeconds + '秒'
return formattedTime
}
},
handleSearch() {
this.$refs.recepDetail.refreshTable(true, true)
},
......@@ -184,6 +204,7 @@ export default {
this.isQualityVisible = false
},
qualitDetail(row) {
console.log(row)
this.detailObj = row
this.isQualityVisible = true
},
......@@ -277,7 +298,7 @@ export default {
color: #1d1d1d;
display: inline-block;
cursor: pointer;
max-width: 300px;
max-width: 500px;
overflow: hidden;
/* 防止文本换行 */
white-space: nowrap;
......@@ -288,7 +309,9 @@ export default {
}
}
}
.show-search{
margin-bottom:-52px;
}
.content {
background: #ffffff;
padding: 20px;
......@@ -297,5 +320,27 @@ export default {
width: 100%;
height: auto;
}
.tag {
padding: 0 8px;
height: 24px;
background: #e9f9f1;
border-radius: 2px;
font-size: 14px;
color: #2cca74;
line-height: 24px;
display: inline-block;
}
.greenbg {
background: #e9f9f1;
color: #2cca74;
}
.redBg {
background: #fdeded;
color: #eb4e4e;
}
.grayBg {
background: #f2f2f2;
color: #999999;
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!