Commit 06acc328 by 李伟康

commit 提交

1 parent b869cb89
......@@ -13,16 +13,6 @@ const getReclistWithPage = params => {
sign: true
})
}
// 工牌统计管理
const statisticsEmployeeBadge = params => {
params.method = `${path}badge.statisticsEmployeeBadge`
return http({
url: 'rop-scrm-partner/router',
method: 'POST',
data: params,
sign: true
})
}
// 分页查询接待批次列表
const conversationPage = params => {
......@@ -119,7 +109,6 @@ const exportReclistList = (params = {}) =>{
export default {
getReclistWithPage,
statisticsEmployeeBadge,
conversationPage,
listShop4sByRef,
getPointCategory,
......
<template>
<div class="empty-box">
<div class="icon">
<img src="@/assets/empty-1.png">
</div>
<div class="text">数据分析中,请稍等…</div>
</div>
</template>
<script type='text/ecmascript-6'>
export default {
name: 'Empty',
props: {
},
data () {
return {
}
},
mounted () {
},
methods: {
}
}
</script>
<style scoped lang='scss'>
.empty-box {
display: flex;
flex-direction: column;
font-size: 12px;
color: #999999;
padding-top: 96px;
text-align: center;
width: 100%;
height: 100%;
box-sizing: border-box;
background: #f8f7ff;
border-radius: 0 4px 4px 4px;
.icon {
width: 270px;
height: 120px;
margin: 0 auto 8px;
img {
width: 100%;
height: 100%;
}
}
}
</style>
......@@ -68,52 +68,62 @@
音频链接
</div>
</div>
<div class="record-info">
<el-tabs
v-model="activeName"
>
<div class="record-info" v-loading="loading">
<el-tabs v-model="activeName">
<el-tab-pane
label="对话详情"
name="dialog"
>
<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">
<img
class="role"
src="@/assets/role-one.png"
v-if="item.role % 2 === 0"
/>
{{item.role % 2 === 0?'车主':'销售'}}
<img
class="role two"
src="@/assets/role-two.png"
v-if="item.role % 2 === 1"
/>
</div>
<div
class="dig-content"
@click="currentDialog(item)"
>
{{ item.content }}
</div>
<template v-if="!loading">
<template v-if="dialogList.length">
<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">
<img
class="role"
src="@/assets/role-one.png"
v-if="item.role % 2 === 0"
/>
{{item.role % 2 === 0?'车主':'销售'}}
<img
class="role two"
src="@/assets/role-two.png"
v-if="item.role % 2 === 1"
/>
</div>
<div
class="dig-content"
@click="currentDialog(item)"
>
{{ item.content }}
</div>
</div>
</template>
</div>
</template>
</div>
<template v-else>
<empty />
</template>
</template>
</el-tab-pane>
<el-tab-pane
label="对话摘要"
name="abstract"
>
<div
class="abstract"
v-html="formatSrt(detailObj.digest)"
>
</div>
<template v-if="detailObj.digest">
<div
class="abstract"
v-html="formatSrt(detailObj.digest)"
>
</div>
</template>
<template v-else>
<empty />
</template>
</el-tab-pane>
</el-tabs>
</div>
......@@ -121,7 +131,9 @@
</template>
<script>
import Empty from './components/Empty'
export default {
components: { Empty },
props: {
detailObj: {
type: Object,
......@@ -137,7 +149,8 @@ export default {
totalTime: '0:00',
currentTime: '0:00',
isCircle: false,
activeName: 'dialog'
activeName: 'dialog',
loading: true
}
},
mounted () {
......@@ -209,16 +222,20 @@ export default {
this.isMuted = !this.isMuted
this.myAud.muted = !this.isMuted
},
conversationDetailPage () {
this.$apis.quality
.conversationDetailPage({
batchId: this.detailObj.id,
currentPage: 1,
pageSize: 9999
})
.then(res => {
this.dialogList = res.list
})
async conversationDetailPage () {
try {
this.loading = true
const res = await this.$apis.quality
.conversationDetailPage({
batchId: this.detailObj.id,
currentPage: 1,
pageSize: 9999
})
this.dialogList = res.list
this.loading = false
} catch (error) {
this.loading = false
}
},
copyText () {
const { detailObj } = this,
......@@ -392,7 +409,7 @@ export default {
.dig-content {
width: fit-content;
max-width: 70%;
background: #EBEBFF;
background: #ebebff;
border-radius: 4px;
font-size: 14px;
color: #333333;
......
......@@ -132,7 +132,7 @@
<template v-else-if="scope.scope.abnormalProportion==0">
{{ scope.scope.abnormalProportion+ '%' }}
</template>
<template v-else>--</template>
<template v-else>统计中</template>
</div>
<div
slot="scoreHtml"
......@@ -141,7 +141,7 @@
<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"
......@@ -170,10 +170,6 @@ export default {
data () {
return {
url: url,
statistics: {
totalBadgeCount: '',
uploadBadgeCount: ''
},
tableList: [],
tableTotal: 0,
page: {
......@@ -187,7 +183,7 @@ export default {
// addHtml: 'searchdate'
type: 'datePicker',
isClear: true,
pickerOptions: 'beforeRangePickerOptions'
pickerOptions: 'beforeRangePickerOptions',
},
{
label: '质检评分',
......@@ -254,7 +250,7 @@ export default {
tableParams: {
listName: 'list',
tableOption: {
width:'100px'
width: '100px'
},
tableColumns: [
{
......@@ -412,12 +408,6 @@ export default {
created () {
this.getList()
},
watch: {
'searchForm.searchdate' (newVal) {
this.statisticsEmployeeBadge(newVal)
this.getList()
}
},
mounted () {
this.getServiceStore()
......@@ -444,22 +434,11 @@ export default {
this.getOptionsList()
})
},
statisticsEmployeeBadge (val) {
let searchdate = Util.dateFormate(val, 'YYYY-MM-DD')
this.$apis.quality
.statisticsEmployeeBadge({
searchdate,
serviceMerchantNo: this.$globalState.session.merchantId
})
.then(res => {
this.statistics = res
})
},
recepDetail (row) {
let data = {}
if (row) data = encodeURIComponent(JSON.stringify(row))
// window.open(`${window.location.origin}/quality/qualityManage/recepDetail?data=${data}`)
window.open(`${window.location.origin}/activityCenter122/qualityManage/recepDetail?data=${data}`)
window.open(`${window.location.origin}/quality/qualityManage/recepDetail?data=${data}`)
// window.open(`${window.location.origin}/activityCenter122/qualityManage/recepDetail?data=${data}`)
},
toMinutesAndSeconds (seconds) {
// seconds = Math.floor(seconds / 1000)
......@@ -491,11 +470,10 @@ export default {
this.searchFormSearch = deepClone(this.searchForm)
if (this.searchForm.searchdate.length) {
let [searchStartDate, searchEndDate] = this.searchForm.searchdate
this.searchFormSearch.searchStartDate = '2024-02-22'
// Util.dateFormate(
// searchStartDate,
// "YYYY-MM-DD"
// )
this.searchFormSearch.searchStartDate = Util.dateFormate(
searchStartDate,
"YYYY-MM-DD"
)
this.searchFormSearch.searchEndDate = Util.dateFormate(
searchEndDate,
"YYYY-MM-DD"
......
<template>
<div class="analyse">
<div class="analyse" v-loading="loading">
<GLCombiForm
ref="showSearch"
class="show-search"
......@@ -68,6 +68,7 @@
:span-method="arraySpanMethod"
:tableData="analyseList"
:border="true"
noDataText="数据分析中"
>
<div
slot="scoreHtml"
......@@ -85,7 +86,7 @@
<el-tooltip
v-if="scope.scope.suggestions"
effect="light"
placement="bottom"
placement="top"
>
<div
slot="content"
......@@ -107,7 +108,7 @@
<el-tooltip
v-if="scope.scope.hitText"
effect="light"
placement="bottom"
placement="top"
>
<div
slot="content"
......@@ -135,7 +136,7 @@
</template>
<script>
import ElInputRange from './el-input-range'
import url from '@/assets/empty.png'
import url from '@/assets/empty-2.png'
import { Util, deepClone } from '@/common/util'
export default {
components: {
......@@ -224,7 +225,8 @@ export default {
baseData: {
firstClassifyList: [],
secondClassifyList: []
}
},
loading: true
}
},
watch: {
......@@ -239,19 +241,25 @@ export default {
},
methods: {
async getList () {
await this.beforeSearchFn()
const { list } = await this.$apis.quality.conversationCheckList(this.searchFormSearch)
let titleList = Array.from(new Set([...list.map(e => e.firstClassify)])),
arr = []
titleList.map(i => {
list.map(e => {
e.suggestions = this.formatSrt(e.suggestions)
e.hitText = this.formatSrt(e.hitText)
if (i == e.firstClassify) arr.push(e)
this.loading = true
try {
await this.beforeSearchFn()
const { list } = await this.$apis.quality.conversationCheckList(this.searchFormSearch)
let titleList = Array.from(new Set([...list.map(e => e.firstClassify)])),
arr = []
titleList.map(i => {
list.map(e => {
e.suggestions = this.formatSrt(e.suggestions)
e.hitText = this.formatSrt(e.hitText)
if (i == e.firstClassify) arr.push(e)
})
})
})
this.analyseList = arr
this.merge(arr)
this.loading = false
this.analyseList = arr
this.merge(arr)
} catch (error) {
this.loading = false
}
},
formatSrt (str) {
return str?.replace(/\n/g, '<br/>') || ''
......@@ -352,7 +360,7 @@ export default {
padding: 20px;
height: 100%;
box-sizing: border-box;
/deep/.gl-search{
/deep/.gl-search {
height: auto !important;
}
/deep/.el-form-item {
......@@ -364,6 +372,18 @@ export default {
}
.glsx-table {
height: calc(100% - 97px);
/deep/.el-table__empty-block {
.el-table__empty-text {
height: 100%;
box-sizing: border-box;
padding-top: 96px;
}
.noDataImg {
width: 270px;
height: 120px;
margin-bottom: 8px;
}
}
}
.theader {
width: 100%;
......
......@@ -22,7 +22,10 @@
</template>
</div>
<div class="content" :key="currentNum">
<div
class="content"
:key="currentNum"
>
<div class="dialogue-box">
<dialogue-detail :detailObj="qualityDetailList[currentNum]" />
</div>
......@@ -110,19 +113,21 @@ export default {
'成交': '#2CCA74',
'战败': '#EB4E4E'
}[row.estimatedResult] || '#999999'
return `<span style="font-size:22px;color:${color}">${row.estimatedResult}</span>`
return `<span style="font-size:22px;color:${color}">${row.estimatedResult || '分析中'}</span>`
}
},
{
label: '话术评分',
formatter (row) {
return `<div class="num">${row.score}<span class="unit">分</span></div>`
return row.score != null
? `<div class="num">${row.score}<span class="unit">分</span></div>`
: `<span style="font-size:22px;color:#999">分析中</span>`
}
},
{
label: '接待时长',
formatter (row) {
return `<div class="num">${toMinutesAndSeconds(row.duration)}</div>`
return `<div class="num">${row.duration ? toMinutesAndSeconds(row.duration) : '-'}</div>`
}
}
],
......@@ -134,9 +139,13 @@ export default {
mounted () {
const quality_detail_object = JSON.parse(localStorage.getItem('quality_detail_object') || {})
this.currentNum = quality_detail_object.currentNum || 0
this.qualityDetailList = quality_detail_object.list || []
const { key } = this.$route.query
if (key) {
const quality_detail_object = JSON.parse(sessionStorage.getItem(key) || {})
this.currentNum = quality_detail_object.currentNum || 0
this.qualityDetailList = quality_detail_object.list || []
} else this.$router.go(-1)
},
methods: {
......@@ -147,7 +156,7 @@ export default {
if ((currentNum == 0 && num == -1) || (currentNum == max && num == 1)) throw '无更多接待记录'
this.currentNum += num
} catch (error) {
if(error) this.$message.error(error)
if (error) this.$message.error(error)
}
}
}
......@@ -222,11 +231,10 @@ export default {
.text {
margin: 0 16px;
}
.opacity{
opacity: .5;
.opacity {
opacity: 0.5;
}
}
}
</style>
\ No newline at end of file
......@@ -96,7 +96,7 @@
<el-button
type="text"
@click="qualitDetail(scope.scope)"
>质检详情</el-button>
>接待详情</el-button>
</template>
</GLTable>
</div>
......@@ -230,6 +230,9 @@ export default {
this.queryData = query
viewStorage = query
}
if (!viewStorage) return this.$router.push({
path: '/qualityManage/index'
})
let [url] = window.location.href.split('?')
window.history.replaceState('', '', `${url}?data=${encodeURIComponent(JSON.stringify(viewStorage))}`)
},
......@@ -267,13 +270,18 @@ export default {
},
qualitDetail (row) {
const list = this.$refs.recepDetail.data,
currentNum = list.findIndex(e => e.id == row.id)
localStorage.setItem('quality_detail_object', JSON.stringify({
currentNum = list.findIndex(e => e.id == row.id),
{ queryData } = this,
key = `${queryData.searchdate}_${queryData.phoneNumber}_${queryData.merchantNo}`
sessionStorage.setItem(key, JSON.stringify({
list,
currentNum
}))
this.$router.push({
path: '/qualityManage/qualityDetail'
path: '/qualityManage/qualityDetail',
query: {
key
}
})
},
beforeSearchFn () {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!