Commit 06acc328 by 李伟康

commit 提交

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