Commit 8cb4884e by 王志慧

fixed

1 parent dba082a3
...@@ -39,9 +39,8 @@ ...@@ -39,9 +39,8 @@
<template v-if="scope.scope.storeList && scope.scope.storeList.length > 1"> <template v-if="scope.scope.storeList && scope.scope.storeList.length > 1">
<span>{{ scope.scope.storeList.slice(0, 1).join('') }}</span> <span>{{ scope.scope.storeList.slice(0, 1).join('') }}</span>
<el-popover placement="top" width="fit-content" trigger="hover"> <el-popover placement="top" width="fit-content" trigger="hover">
<div :class="{ 'scrollHeight': scope.scope.storeList.length >= 10 }"> <div :class="{ scrollHeight: scope.scope.storeList.length >= 10 }">
<div v-for="(item, index) in scope.scope.storeList" :key="index" > {{ item }}</div> <div v-for="(item, index) in scope.scope.storeList" :key="index">{{ item }}</div>
</div> </div>
<span class="more-info" slot="reference">...({{ scope.scope.storeList.length }})</span> <span class="more-info" slot="reference">...({{ scope.scope.storeList.length }})</span>
</el-popover> </el-popover>
...@@ -53,7 +52,7 @@ ...@@ -53,7 +52,7 @@
</div> </div>
<div slot="seconds" slot-scope="scope"> <div slot="seconds" slot-scope="scope">
<template v-if="scope.scope.seconds"> <template v-if="scope.scope.seconds">
{{ (scope.scope.seconds / 60).toFixed(1) }} {{ toMinutesAndSeconds(scope.scope.seconds) }}
</template> </template>
<template v-else>--</template> <template v-else>--</template>
</div> </div>
...@@ -76,13 +75,13 @@ ...@@ -76,13 +75,13 @@
<template v-if="scope.scope.abnormalProportion"> <template v-if="scope.scope.abnormalProportion">
{{ scope.scope.abnormalProportion + '%' }} {{ scope.scope.abnormalProportion + '%' }}
</template> </template>
<template v-else>统计中</template> <template v-else>--</template>
</div> </div>
<div slot="scoreHtml" slot-scope="scope"> <div slot="scoreHtml" slot-scope="scope">
<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 class="table-btns" slot="auth-button" slot-scope="scope"> <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)" :disabled="!scope.scope.score && scope.scope.score != 0">接待明细</el-button>
...@@ -110,13 +109,16 @@ export default { ...@@ -110,13 +109,16 @@ export default {
text: '录音时长', text: '录音时长',
value: 'totalRecordingDuration', value: 'totalRecordingDuration',
formatter: data => { formatter: data => {
let strHtml = this.toMinutesAndSeconds(data.totalRecordingDuration).h return `<span style="font-weight:700;font-size:20px;">${data.totalRecordingDuration ? this.toMinutesAndSeconds(data.totalRecordingDuration) : '--'}</span>`
? `<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
} }
// 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', icon: 'facility',
...@@ -244,7 +246,7 @@ export default { ...@@ -244,7 +246,7 @@ export default {
width: '140px' width: '140px'
}, },
{ {
label: '录音时长/分钟', label: '录音时长',
prop: 'seconds', prop: 'seconds',
addHtml: 'seconds', addHtml: 'seconds',
width: '150px' width: '150px'
...@@ -397,12 +399,32 @@ export default { ...@@ -397,12 +399,32 @@ export default {
} }
}) })
}, },
toMinutesAndSeconds(time) { // toMinutesAndSeconds(time) {
const h = Math.floor(time / 3600) // const h = Math.floor(time / 3600)
const m = parseInt((time % 3600) / 60) // const m = parseInt((time % 3600) / 60)
return { // return {
h, // h,
m // 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) { setTableFinishFun(data) {
......
...@@ -49,7 +49,7 @@ export default { ...@@ -49,7 +49,7 @@ export default {
props: { props: {
detailObj: { detailObj: {
type: Object, type: Object,
default: ()=>{} default: () => {}
} }
}, },
data() { data() {
...@@ -59,8 +59,7 @@ export default { ...@@ -59,8 +59,7 @@ export default {
{ {
text: '话术评分', text: '话术评分',
formatter: data => { formatter: data => {
console.log(data,11111111111) return `<span style="font-weight:700;font-size:20px;">${data.score ? data.score : '0'}</span>分`
return `<span style="font-weight:700;font-size:26px;">${data.score ? data.score : '0'}</span>分`
} }
}, },
{ {
...@@ -78,9 +77,17 @@ export default { ...@@ -78,9 +77,17 @@ export default {
{ {
text: '对话时长', text: '对话时长',
formatter: data => { 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: { searchForm: {
...@@ -161,14 +168,35 @@ export default { ...@@ -161,14 +168,35 @@ export default {
this.getPointCategory() this.getPointCategory()
}, },
methods: { methods: {
toMinutesAndSeconds(hourse) { toMinutesAndSeconds(seconds) {
const h = Math.floor(hourse / 60) seconds = Math.floor(seconds / 1000)
const m = parseInt(hourse % 60) let formattedTime = ''
return { if (seconds < 60) return seconds + '秒'
h, else if (seconds > 3600) {
m 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() { getPointCategory() {
this.classifyMap = new Map() this.classifyMap = new Map()
this.$apis.quality.getPointCategory().then(res => { this.$apis.quality.getPointCategory().then(res => {
...@@ -218,7 +246,7 @@ export default { ...@@ -218,7 +246,7 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
margin-bottom:20px; margin-bottom: 20px;
.s-item { .s-item {
flex: 1; flex: 1;
// min-width: 248px; // min-width: 248px;
...@@ -258,7 +286,7 @@ export default { ...@@ -258,7 +286,7 @@ export default {
line-height: 24px; line-height: 24px;
box-sizing: border-box; box-sizing: border-box;
font-size: 14px; font-size: 14px;
margin:0 auto; margin: 0 auto;
} }
.gre { .gre {
color: #2cca74; color: #2cca74;
......
...@@ -36,19 +36,15 @@ ...@@ -36,19 +36,15 @@
</div> </div>
</div> </div>
<div class="content"> <div class="content">
<GLCombiForm ref="showSearch" class="show-search" labelWidth="110px" :formObj="searchForm" <GLCombiForm ref="showSearch" class="show-search" labelWidth="110px" :formObj="searchForm" :form-data="showFormData" @handleOk="handleSearch" @handleRest="handleReset">
:form-data="showFormData" @handleOk="handleSearch" @handleRest="handleReset">
<template slot="score"> <template slot="score">
<el-input-range start-placeholder="请输入" end-placeholder="请输入" <el-input-range start-placeholder="请输入" end-placeholder="请输入" :displayValue="searchForm.qualityTestScore"></el-input-range>
:displayValue="searchForm.qualityTestScore"></el-input-range>
</template> </template>
</GLCombiForm> </GLCombiForm>
<GLTable ref="recepDetail" :get-list-api="getListApi" :hasNum="false" :search-form="searchFormSearch" <GLTable ref="recepDetail" :get-list-api="getListApi" :hasNum="false" :search-form="searchFormSearch" :table-params="tableParams" :before-search-fn="beforeSearchFn" @setTableFinishFun="setTableFinishFun" :pageConf="pageConf">
:table-params="tableParams" :before-search-fn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"
:pageConf="pageConf">
<div slot="durationHtml" slot-scope="scope"> <div slot="durationHtml" slot-scope="scope">
<template v-if="scope.scope.duration"> <template v-if="scope.scope.duration">
{{ (parseInt(scope.scope.duration) / 60000).toFixed(1) }} {{ toMinutesAndSeconds(scope.scope.duration) }}
</template> </template>
<template v-else>--</template> <template v-else>--</template>
</div> </div>
...@@ -58,13 +54,15 @@ ...@@ -58,13 +54,15 @@
</template> </template>
<template v-else>--</template> <template v-else>--</template>
</div> </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"> <template slot="auth-button" slot-scope="scope">
<el-button type="text" @click="qualitDetail(scope.scope)">质检详情</el-button> <el-button type="text" @click="qualitDetail(scope.scope)">质检详情</el-button>
</template> </template>
</GLTable> </GLTable>
</div> </div>
<quality-detail :isQualityVisible="isQualityVisible" v-if="isQualityVisible" :detailObj="detailObj" <quality-detail :isQualityVisible="isQualityVisible" v-if="isQualityVisible" :detailObj="detailObj" @closeDialog="closeDialog"></quality-detail>
@closeDialog="closeDialog"></quality-detail>
</div> </div>
</template> </template>
<script> <script>
...@@ -126,13 +124,14 @@ export default { ...@@ -126,13 +124,14 @@ export default {
prop: 'endTime' prop: 'endTime'
}, },
{ {
label: '录音时长/分钟', label: '录音时长',
prop: 'duration', prop: 'duration',
addHtml: 'durationHtml' addHtml: 'durationHtml'
}, },
{ {
label: '预计营销结果', label: '预计营销结果',
prop: 'estimatedResult' prop: 'estimatedResult',
addHtml: 'estimatedResult'
}, },
{ {
label: '话术质检评分/分', label: '话术质检评分/分',
...@@ -168,6 +167,27 @@ export default { ...@@ -168,6 +167,27 @@ export default {
this.getOptionsList() this.getOptionsList()
}, },
methods: { 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() { handleSearch() {
this.$refs.recepDetail.refreshTable(true, true) this.$refs.recepDetail.refreshTable(true, true)
}, },
...@@ -297,5 +317,27 @@ export default { ...@@ -297,5 +317,27 @@ export default {
width: 100%; width: 100%;
height: auto; 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> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!