Commit 8cb4884e by 王志慧

fixed

1 parent dba082a3
......@@ -39,9 +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 :class="{ 'scrollHeight': scope.scope.storeList.length >= 10 }">
<div v-for="(item, index) in scope.scope.storeList" :key="index" > {{ item }}</div>
<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>
......@@ -53,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>
......@@ -76,13 +75,13 @@
<template v-if="scope.scope.abnormalProportion">
{{ scope.scope.abnormalProportion + '%' }}
</template>
<template v-else>统计中</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>
......@@ -110,13 +109,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:20px;">${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',
......@@ -244,7 +246,7 @@ export default {
width: '140px'
},
{
label: '录音时长/分钟',
label: '录音时长',
prop: 'seconds',
addHtml: 'seconds',
width: '150px'
......@@ -397,12 +399,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) {
......
......@@ -49,7 +49,7 @@ export default {
props: {
detailObj: {
type: Object,
default: ()=>{}
default: () => {}
}
},
data() {
......@@ -59,8 +59,7 @@ 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>分`
}
},
{
......@@ -78,9 +77,17 @@ 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;">${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: {
......@@ -161,14 +168,35 @@ export default {
this.getPointCategory()
},
methods: {
toMinutesAndSeconds(hourse) {
const h = Math.floor(hourse / 60)
const m = parseInt(hourse % 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
}
},
// 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 => {
......@@ -218,7 +246,7 @@ export default {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom:20px;
margin-bottom: 20px;
.s-item {
flex: 1;
// min-width: 248px;
......@@ -258,7 +286,7 @@ export default {
line-height: 24px;
box-sizing: border-box;
font-size: 14px;
margin:0 auto;
margin: 0 auto;
}
.gre {
color: #2cca74;
......
......@@ -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)
},
......@@ -297,5 +317,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!