Commit 57792bda by 前端

修复质检详情bug

1 parent b4554d91
...@@ -30,8 +30,23 @@ ...@@ -30,8 +30,23 @@
</el-radio-group> </el-radio-group>
</div> </div>
<GLTable ref="analyseTable" :get-list-api="getListApi" :search-form="searchFormSearch" :table-params="tableParams" :before-search-fn="beforeSearchFn" :pageConf="pageConf" :hasPage="false" :noDataImg="url"> <GLTable ref="analyseTable" :get-list-api="getListApi" :search-form="searchFormSearch" :table-params="tableParams" :before-search-fn="beforeSearchFn" :pageConf="pageConf" :hasPage="false" :noDataImg="url">
<template slot="suggestions" slot-scope="scope"> <div slot="scoreHtml" slot-scope="scope">
<div v-html="formatSrt(scope.scope.suggestions)"></div> <template v-if="scope.scope.score || scope.scope.score === 0">
{{ scope.scope.score }}
</template>
<template v-else>--</template>
</div>
<template slot="suggestions" slot-scope="scope">
<div v-if="scope.scope.suggestions" v-html="formatSrt(scope.scope.suggestions)"></div>
<div v-else>--</div>
<!-- <div v-html="formatSrt(scope.scope.suggestions)"></div> -->
</template>
<template slot="hitText" slot-scope="scope">
<div v-if="!scope.scope.score">--</div>
<template v-else>
<div v-if="scope.scope.hitText" v-html="formatSrt(scope.scope.hitText)"></div>
<div v-else>--</div>
</template>
</template> </template>
<template slot="hitResult" slot-scope="scope"> <template slot="hitResult" slot-scope="scope">
<div :class="['tag', scope.scope.hitResult == 1 ? 'gre' : 'red']"> <div :class="['tag', scope.scope.hitResult == 1 ? 'gre' : 'red']">
...@@ -81,7 +96,7 @@ export default { ...@@ -81,7 +96,7 @@ export default {
{ {
text: '对话时长', text: '对话时长',
formatter: data => { formatter: data => {
return `<span style="font-weight:700;font-size:20px;">${data.duration?this.toMinutesAndSeconds(data.duration):'--'}</span>` return `<span style="font-weight:700;font-size:20px;">${data.duration ? this.toMinutesAndSeconds(data.duration) : '--'}</span>`
} }
// formatter: data => { // formatter: data => {
...@@ -138,7 +153,8 @@ export default { ...@@ -138,7 +153,8 @@ export default {
{ {
label: '质检得分', label: '质检得分',
prop: 'score', prop: 'score',
width: '100px' width: '100px',
addHtml: 'scoreHtml'
}, },
{ {
label: '是否命中', label: '是否命中',
...@@ -148,12 +164,13 @@ export default { ...@@ -148,12 +164,13 @@ export default {
}, },
{ {
label: '命中文本', label: '命中文本',
prop: 'hitText' prop: 'hitText',
addHtml: 'hitText'
}, },
{ {
label: '话术建议', label: '话术建议',
prop: 'suggestions', prop: 'suggestions',
addHtml:'suggestions' addHtml: 'suggestions'
} }
] ]
}, },
...@@ -174,7 +191,7 @@ export default { ...@@ -174,7 +191,7 @@ export default {
}, },
methods: { methods: {
formatSrt(str) { formatSrt(str) {
return str.replace(/\n/g, "<br/>") return str.replace(/\n/g, '<br/>')
}, },
toMinutesAndSeconds(seconds) { toMinutesAndSeconds(seconds) {
seconds = Math.floor(seconds / 1000) seconds = Math.floor(seconds / 1000)
...@@ -284,8 +301,8 @@ export default { ...@@ -284,8 +301,8 @@ export default {
} }
} }
} }
.show-search{ .show-search {
margin-bottom:-68px; margin-bottom: -68px;
} }
.theader { .theader {
width: 100%; width: 100%;
...@@ -320,14 +337,13 @@ export default { ...@@ -320,14 +337,13 @@ export default {
} }
</style> </style>
<style> <style>
.redStr { .redStr {
color: #eb4e4e; color: #eb4e4e;
} }
.greenStr { .greenStr {
color: #2cca74; color: #2cca74;
} }
.grayStr{ .grayStr {
color: #999999; color: #999999;
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!