Commit bed674fd by 王志慧

fixed

1 parent 695d069a
......@@ -6,19 +6,19 @@ const path2 = "dj.api.smartcarlife."
// 质检管理
export function getReclistWithPage(data) {
data.method = `${path}badge.employeeBadgeReclistWithPage`
return request(data)
return request(data, "post")
}
// 分页查询接待批次列表
export function conversationPage(data) {
data.method = `${path2}inspection.conversation.batch.page`
return request(data)
return request(data, "post")
}
// 质检点管理-分页列表
export function conversationPointPage(data) {
data.method = `${path2}inspection.conversation.point.page`
return request(data)
return request(data, "post")
}
// 工牌管理
export function employeeBadgelistWithPage(data) {
......@@ -38,21 +38,20 @@ export function statisticsEmployeeBadge(data) {
return request(data, "post")
}
// 删除产品
export function deleteGoods(data) {
data.method = `${path2}goodsinfo.delete`
// 质检详情-质检分析
export function conversationCheckList(data) {
data.method = `${path2}inspection.conversation.check.detail`
return request(data, "post")
}
// 导出产品
export function exportGoodsList(data) {
data.method = `${path}goodsinfo.export`
// 质检详情-分页查询对话列表
export function conversationDetailPage(data) {
data.method = `${path2}inspection.conversation.detail.page`
return request(data, "post")
}
// 获取场景下类目
export function getProductTypeBySceneId(data) {
data.method = `${path}goodsCategoryConfiguration.queryGoodsCategoryBySceneId`
//获取一级二级分类
export function getPointCategory(data={}) {
data.method = `${path2}inspection.conversation.point.category`
return request(data, "post")
}
......
<template>
<div class="dialogue">
<div class="record">
<audio id="audio1" controls>
<source src="/i/audio/song.mp3" type="audio/mpeg" />
<source src="/i/audio/song.ogg" type="audio/ogg" />
<audio id="audio1">
<source :src="detailObj.fileUrl" type="audio/mpeg" />
<source :src="detailObj.fileUrl" type="audio/ogg" />
您的浏览器不支持 audio 标签。
</audio>
<div class="play">
<div class="play" v-if="isPlay" @click="handleAudio">
<img src="@/assets/play.png" />
</div>
<div id="progress-bar">
<div id="progress"></div>
<div class="play" v-else @click="handleAudio">
<img src="@/assets/pause.png" />
</div>
<div class="times">{{ currentTime }}/{{ totalTime }}</div>
<div
id="progressBar"
@mousemove="isCircle = true"
@mouseout="isCircle = false"
>
<div id="progress">
<div
class="circle"
@mousemove="isCircle = true"
draggable="true"
v-if="isCircle"
></div>
</div>
</div>
<div class="trumpet" @click="handleAudio">
<img src="@/assets/trumpet.png" />
</div>
</div>
<div class="record-info">
<div class="dialog">
<div class="dialog-detail">
<div class="name">顾客</div>
<div class="dig-content">
加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势。
<template v-for="item in dialogList">
<div class="dialog-detail" :key="item.id">
<div class="name">{{ item.role }}</div>
<div class="dig-content">
{{ item.content }}
</div>
</div>
</div>
<div class="dialog-detail">
<div class="name">销售 @张可</div>
<div class="dig-content">
加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势。
</div>
</div>
</template>
</div>
<div class="abstract">
<div class="title">
<img class="robot" src="@/assets/robot.png" />AI对话摘要
</div>
<div class="abText">
在提车环节中,我们的驻点人员与问界车主进行了基于精品加装的沟通。我们了解到车主对车辆的外观和内饰有较高的要求,希望能够进行个性化的改装。
我们的驻点人员积极回应了车主的需求,并向其推荐了一系列精品加装方案。我们向车主详细介绍了各种加装方案的特点和优势,并提供了相关的图片和样品供其参考。
在沟通过程中,我们的驻点人员充分听取了车主的意见和建议,并根据其喜好和需求进行了方案的调整和优化。我们还向车主展示了其他车主的改装案例,以增加其对改装效果的信心。
最终,我们的驻点人员与车主达成了一致意见,并成功签订了改装合同。我们对车主的选择表示了感谢,并承诺将提供优质的服务和专业的技术支持,以确保改装工作的顺利进行和最终的成功。
{{ detailObj.digest }}
</div>
</div>
</div>
......@@ -44,17 +55,107 @@
</template>
<script>
export default {}
import { conversationDetailPage, getPointCategory } from "@api/resident"
export default {
props: {
detailObj: {
type: Object,
default: {}
}
},
data() {
return {
myAud: "",
isPlay: true,
dialogList: [],
totalTime: "0:00",
currentTime: "0:00",
isCircle: false
}
},
mounted() {
this.myAud = document.getElementById("audio1")
this.handleprogress()
this.conversationDetailPage()
},
methods: {
toMinutesAndSeconds(seconds) {
const minutes = Math.floor(seconds / 60)
const remainingSeconds = parseInt(seconds % 60)
return `${minutes}:${remainingSeconds}`
},
handleprogress() {
const progress = document.getElementById("progress")
const progressBar=document.getElementById("progressBar")
this.myAud.addEventListener("canplay", () => {
if (this.myAud.duration > 0) {
this.totalTime = this.toMinutesAndSeconds(this.myAud.duration)
}
})
this.myAud.addEventListener("timeupdate", () => {
if (this.myAud.duration > 0) {
this.currentTime = this.toMinutesAndSeconds(this.myAud.currentTime)
const progressDur = (this.myAud.currentTime / this.myAud.duration) * 100
progress.style.width = `${progressDur}%`
}
})
this.myAud.addEventListener("ended", () => {
this.isPlay = !this.isPlay
})
progress.addEventListener(
"click",
(e) => {
let x = e.offsetX / 370
let currentWidth = x * this.myAud.duration
this.myAud.currentTime = currentWidth
},
false
)
progressBar.addEventListener(
"click",
(e) => {
let x = e.offsetX / 370
let currentWidth = x * this.myAud.duration
this.myAud.currentTime = currentWidth
},
false
)
},
handleAudio() {
this.isPlay = !this.isPlay
if (!this.isPlay) {
this.myAud.play()
} else {
this.myAud.pause()
}
},
conversationDetailPage() {
conversationDetailPage({
batchId: this.detailObj.id,
currentPage: 1,
pageSize: 9999
}).then((res) => {
console.log(res)
this.dialogList = res.list
})
}
}
}
</script>
<style scoped lang="scss">
.dialogue {
margin: auto;
.record {
position: relative;
width: 600px;
margin: 20px auto;
height: 56px;
background: #f7f9fa;
border-radius: 32px;
display: flex;
align-items: center;
audio {
width: 600px;
height: 56px;
......@@ -65,25 +166,36 @@ export default {}
.play {
width: 24px;
height: 24px;
position: absolute;
top: 18px;
left: 18px;
margin: 0 20px 0 24px;
img {
width: 100%;
}
}
#progress-bar {
position: absolute;
top: 26px;
.trumpet {
width: 16px;
height: 16px;
margin-left: 24px;
img {
width: 100%;
}
}
.times {
font-size: 14px;
color: #666666;
min-width: 80px;
text-align: center;
margin-right: 19px;
}
#progressBar {
// position: absolute;
height: 6px;
width: 377px;
left: 134px;
width: 370px;
background-color: #e7e7e7; /* 进度条背景颜色 */
border-radius: 6px;
}
#progress {
width: 10%; /* 初始进度为0 */
width: 0; /* 初始进度为0 */
height: 6px;
background-image: linear-gradient(
90deg,
......@@ -94,16 +206,14 @@ export default {}
border-radius: 6px;
position: relative;
}
#progress::after {
content: ".";
display: block;
.circle {
width: 16px;
height: 16px;
background: #5850ff;
border: 4.5px solid #ffffff;
border-radius: 50%;
position: absolute;
right: 0;
right: -14px;
top: -4px;
box-sizing: border-box;
}
......@@ -178,7 +288,7 @@ export default {}
}
}
.abText {
margin-top:14px;
margin-top: 14px;
width: 294px;
height: 472px;
padding: 12px;
......
......@@ -83,19 +83,8 @@ export default {
}
},
handleClickIcon(event) {
if (this.readonly || this.pickerDisabled) return
if (this.showClose) {
this.valueOnOpen = this.value
event.stopPropagation()
this.emitInput(null)
this.emitChange(null)
this.showClose = false
if (this.picker && typeof this.picker.handleClear === "function") {
this.picker.handleClear()
}
} else {
this.pickerVisible = !this.pickerVisible
}
this.userInput[0]=null
this.userInput[1]=null
},
valueIsEmpty() {
const val = this.userInput
......
......@@ -9,6 +9,37 @@
:search-form="searchForm"
:form-data="showFormData"
>
<div slot="firstClassify">
<el-select
v-model="searchForm.firstClassify"
clearable
placeholder="请选择"
@change="changeClassify"
>
<el-option
v-for="item in baseData.firstClassifyList"
:key="item"
:label="item"
:value="item"
>
</el-option>
</el-select>
</div>
<div slot="secondClassify">
<el-select
v-model="searchForm.secondClassify"
clearable
placeholder="请选择"
>
<el-option
v-for="item in baseData.secondClassifyList"
:key="item"
:label="item"
:value="item"
>
</el-option>
</el-select>
</div>
</d2-search>
<div class="up-btns">
<el-button @click="handleSearch" size="small" type="primary">
......@@ -41,15 +72,13 @@
<script>
import { Util, deepClone } from "@/common/util"
import {
conversationPointPage
} from "@api/resident"
import { conversationPointPage, getPointCategory } from "@api/resident"
export default {
name: "inspectionPoint",
data() {
return {
searchForm: {
firstClassify: "",
firstClassify: "",
secondClassify: "",
content: ""
},
......@@ -57,27 +86,19 @@ export default {
showFormData: [
{
label: "话术内容",
name: "firstClassify",
name: "content",
type: "input",
isClear: true
},
{
label: "一级分类",
name: "secondClassify",
type: "select",
optionList: [],
optionId: "confId",
optionLabel: "confLabel",
optionsName: "classifyList"
name: "firstClassify",
addHtml: "firstClassify"
},
{
label: "二级分类",
name: "content",
type: "select",
optionList: [],
optionId: "confId",
optionLabel: "confLabel",
optionsName: "classifyList"
name: "secondClassify",
addHtml: "secondClassify"
}
],
getListApi: conversationPointPage,
......@@ -88,7 +109,8 @@ export default {
tableColumns: [
{
label: "话术内容",
prop: "content"
prop: "content",
width: "550px"
},
{
label: "一级分类",
......@@ -100,7 +122,7 @@ export default {
},
{
label: "二级分类",
prop: "firstClassify"
prop: "secondClassify"
},
{
label: "二级权重",
......@@ -118,25 +140,31 @@ export default {
]
},
baseData: {
classifyList: []
firstClassifyList: [],
secondClassifyList: []
}
}
},
mounted() {
// 获取全部类目
conversationPointPage({
pageSize: 9999,
currentPage: 1,
firstClassify: "",
secondClassify: "",
content: ""
}).then((res) => {
// this.baseData.classifyList = res
this.getOptionsList()
})
this.getPointCategory()
},
methods: {
getPointCategory() {
this.classifyMap = new Map()
getPointCategory().then((res) => {
this.baseData.firstClassifyList = Object.keys(res)
for (let item in res) {
this.classifyMap.set(item, res[item])
}
})
},
changeClassify() {
this.searchForm.secondClassify = ""
this.baseData.secondClassifyList = this.classifyMap.get(
this.searchForm.firstClassify
)
},
beforeSearchFn() {
return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm)
......@@ -175,6 +203,7 @@ export default {
secondClassify: "",
content: ""
}
this.baseData.secondClassifyList = []
this.$refs.pointTable.refreshTable()
}
}
......
......@@ -3,7 +3,10 @@
<div class="statistics">
<div class="s-item" v-for="(item, index) in sList" :key="index">
<div class="title">{{ item.text }}</div>
<div class="content">{{ item.value }}</div>
<div
class="content"
v-html="item.formatter && item.formatter(detailObj)"
></div>
</div>
</div>
<d2-search
......@@ -12,12 +15,44 @@
:search-form="searchForm"
:form-data="showFormData"
>
<div slot="score">
<div slot="firstClassify">
<el-select
v-model="searchForm.firstClassify"
clearable
placeholder="请选择"
@change="changeClassify"
>
<el-option
v-for="item in baseData.firstClassifyList"
:key="item"
:label="item"
:value="item"
>
</el-option>
</el-select>
</div>
<div slot="secondClassify">
<el-select
v-model="searchForm.secondClassify"
clearable
placeholder="请选择"
>
<el-option
v-for="item in baseData.secondClassifyList"
:key="item"
:label="item"
:value="item"
>
</el-option>
</el-select>
</div>
<template slot="score">
<el-input-range
start-placeholder="请输入"
end-placeholder="请输入"
:displayValue="searchForm.qualityTestScore"
></el-input-range>
</div>
</template>
</d2-search>
<div class="up-btns">
<el-button @click="handleSearch" size="small" type="primary">
......@@ -27,75 +62,107 @@
</div>
<div class="theader">
<div class="title">话术列表</div>
<el-radio-group v-model="select">
<el-radio-button label="全部"></el-radio-button>
<el-radio-button label="命中"></el-radio-button>
<el-radio-button label="未命中"></el-radio-button>
<el-radio-group v-model="searchForm.hitResult">
<el-radio-button label="">全部</el-radio-button>
<el-radio-button label="1">命中</el-radio-button>
<el-radio-button label="2">未命中</el-radio-button>
</el-radio-group>
</div>
<d2-table
ref="recordTable"
ref="analyseTable"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn"
:selectable-fn="selectableFn"
>
<template slot="hitResult" slot-scope="scope">
<div :class="['tag', scope.scope.hitResult == 1 ? 'gre' : 'red']">
{{ scope.scope.hitResult == 1 ? "是" : "否" }}
</div>
</template>
</d2-table>
</div>
</template>
<script>
import ElInputRange from "./el-input-range"
import { waitinputorderPage } from "@api/order"
import { Util, deepClone } from "@/common/util"
import { conversationCheckList, getPointCategory } from "@api/resident"
export default {
components: {
ElInputRange
},
props: {
detailObj: {
type: Object,
default: {}
}
},
data() {
return {
sList: [
{
text: "话术评分",
value: "80分"
formatter: (data) => {
return `<span style="font-weight:700;font-size:26px;">${
data.averageQualityTestScore ? data.score : "0"
}</span>分`
}
},
{
text: "预计营销结果",
value: "成交"
formatter: (data) => {
return `<span style="font-weight:700;font-size:26px;">${
data.estimatedResult ? data.estimatedResult : "--"
}</span>`
}
},
{
text: "开始录音时间",
value: "12:30"
formatter: (data) => {
return `<span style="font-weight:700;font-size:20px;">${
data.startTime ? data.startTime : "--"
}</span>`
}
},
{
text: "对话时长",
value: "1小时21分钟"
formatter: (data) => {
return `<span style="font-weight:700;font-size:26px;">${
this.toMinutesAndSeconds(data.duration).h
}</span>小时
<span style="font-weight:700;font-size:26px;">${
this.toMinutesAndSeconds(data.duration).m
}</span>分钟
`
}
}
],
searchForm: {},
searchForm: {
firstClassify: "",
secondClassify: "",
qualityTestScore: []
// hitResult: ""
},
searchFormSearch: {},
showFormData: [
{
label: "一级分类",
name: "orderDate",
type: "datePicker",
isClear: true,
pickerOptions: "rangePickerOptions"
name: "firstClassify",
addHtml: "firstClassify"
},
{
label: "二级分类",
name: "merchantName",
type: "input",
maxlength: 20,
isClear: true,
keyFn: this.keyDowmGetList
name: "secondClassify",
addHtml: "secondClassify"
},
{
label: "质检评分",
name: "yqMerchantId",
name: "qualityTestScore",
addHtml: "score"
}
],
select: "全部",
getListApi: waitinputorderPage,
getListApi: conversationCheckList,
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: "list",
......@@ -103,35 +170,102 @@ export default {
tableColumns: [
{
label: "一级分类",
prop: "tradeNo",
width: "160px"
prop: "firstClassify",
width: "120px"
},
{
label: "二级分类",
prop: "outTradeNo",
width: "250px"
prop: "secondClassify",
width: "140px"
},
{
label: "质检得分",
prop: "totalFee"
prop: "score",
width: "100px"
},
{
label: "是否命中",
prop: "accountDate",
width: "150px"
prop: "hitResult",
width: "100px",
addHtml: "hitResult"
},
{
label: "命中文本",
prop: "payType",
width: "100px"
prop: "hitText"
},
{
label: "话术建议",
prop: "posTrmNo"
prop: "suggestions"
}
]
},
baseData: {
firstClassifyList: [],
secondClassifyList: []
}
}
},
watch: {
"searchForm.hitResult"() {
this.$refs.analyseTable.refreshTable(true, true)
}
},
mounted() {
this.getPointCategory()
},
methods: {
toMinutesAndSeconds(hourse) {
const h = Math.floor(hourse / 60)
const m = parseInt(hourse % 60)
return {
h,
m
}
},
getPointCategory() {
this.classifyMap = new Map()
getPointCategory().then((res) => {
console.log(res)
this.baseData.firstClassifyList = Object.keys(res)
for (let item in res) {
this.classifyMap.set(item, res[item])
}
})
},
changeClassify() {
this.searchForm.secondClassify = ""
this.baseData.secondClassifyList = this.classifyMap.get(
this.searchForm.firstClassify
)
},
beforeSearchFn() {
return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm)
this.searchFormSearch.batchId = this.detailObj.id
if (this.searchFormSearch.qualityTestScore) {
this.searchFormSearch.qualityTestScoreBegin =
this.searchFormSearch.qualityTestScore[0]
this.searchFormSearch.qualityTestScoreEnd =
this.searchFormSearch.qualityTestScore[1]
}
delete this.searchFormSearch.qualityTestScore
resolve()
})
},
handleSearch() {
this.$refs.analyseTable.refreshTable(true, true)
},
handleReset() {
this.searchForm = {
firstClassify: "",
secondClassify: "",
qualityTestScore: [],
hitResult: ""
}
this.baseData.secondClassifyList = []
this.$refs.analyseTable.refreshTable()
}
}
}
</script>
......@@ -156,8 +290,6 @@ export default {
margin-bottom: 8px;
}
.content {
font-weight: 700;
font-size: 26px;
color: #333333;
}
}
......@@ -167,12 +299,29 @@ export default {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom:12px;
margin-bottom: 12px;
.title {
font-size: 16px;
color: #333333;
font-weight: 600;
}
}
.tag {
width: 30px;
height: 24px;
border-radius: 2px;
padding: 0 8px;
line-height: 24px;
box-sizing: border-box;
font-size: 14px;
}
.gre {
color: #2cca74;
background: #e9f9f1;
}
.red {
color: #eb4e4e;
background: #fdeded;
}
}
</style>
\ No newline at end of file
......@@ -143,8 +143,8 @@ export default {
text: "录音时长",
value: "totalRecordingDuration",
formatter: (data) => {
return `<span style="font-weight:700;font-size:26px;">${data.uploadBadgeCount}</span>小时
<span style="font-weight:700;font-size:26px;">${data.uploadBadgeCount}</span>分钟
return `<span style="font-weight:700;font-size:26px;">${this.toMinutesAndSeconds(data.uploadBadgeCount).h}</span>小时
<span style="font-weight:700;font-size:26px;">${this.toMinutesAndSeconds(data.uploadBadgeCount).m}</span>分钟
`
}
},
......@@ -322,6 +322,14 @@ export default {
}
})
},
toMinutesAndSeconds(hourse) {
const h = Math.floor(hourse / 60)
const m = parseInt(hourse % 60)
return {
h,
m
}
},
beforeSearchFn() {
return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm)
......
......@@ -10,12 +10,13 @@
<div>
<el-tabs v-model="activeName" @tab-click="handleReset">
<el-tab-pane label="质检分析" name="analyse">
<quality-analyse v-if="activeName == 'analyse'" ref="analyseList" />
<quality-analyse v-if="activeName == 'analyse'" v-bind="$attrs" ref="analyseList" />
</el-tab-pane>
<el-tab-pane label="对话详情" name="dialogue">
<dialogue-detail
v-if="activeName == 'dialogue'"
ref="dialogueDetail"
v-bind="$attrs"
/>
</el-tab-pane>
</el-tabs>
......@@ -28,7 +29,7 @@ import { Util, deepClone } from "@/common/util"
import { mapActions, mapState } from "vuex"
import { shopmallOrderList, relatedActivityOrder } from "@api/order"
import QualityAnalyse from "./qualityAnalyse"
import DialogueDetail from './dialogueDetail'
import DialogueDetail from "./dialogueDetail"
export default {
name: "RelatActivityOrderDialog",
components: {
......@@ -37,7 +38,7 @@ export default {
},
data() {
return {
activeName: "dialogue",
activeName: "analyse",
userInfo: this.$store.state.d2admin.user.info,
countObj: {},
searchForm: {
......@@ -187,19 +188,19 @@ export default {
isQualityVisible: {
type: Boolean,
default: false
},
orderId: {
type: [String, Number],
default: ""
}
},
computed: {},
mounted() {},
mounted() {
console.log(111,this.$attrs)
},
methods: {
handleReset() {},
handleClose() {}
handleClose() {
this.$emit("closeDialog", false)
}
}
}
</script>
......
......@@ -61,7 +61,7 @@
</template>
</d2-table>
</div>
<quality-detail :isQualityVisible="isQualityVisible"></quality-detail>
<quality-detail :isQualityVisible="isQualityVisible" v-if="isQualityVisible" :detailObj="detailObj" @closeDialog="closeDialog"></quality-detail>
</div>
</template>
<script>
......@@ -79,6 +79,7 @@ export default {
qualityTestScore: [],
estimatedResultId: ""
},
detailObj:{},
searchFormSearch: {},
getListApi: conversationPage,
showFormData: [
......@@ -120,7 +121,7 @@ export default {
},
{
label: "录音时长/分钟",
prop: "seconds"
prop: "duration"
},
{
label: "预计营销结果",
......@@ -169,7 +170,12 @@ export default {
}
this.$refs.recepDetail.refreshTable()
},
qualitDetail() {
closeDialog(){
this.isQualityVisible = false
},
qualitDetail(row) {
this.detailObj=row
this.isQualityVisible = true
},
beforeSearchFn() {
......@@ -183,7 +189,7 @@ export default {
this.searchFormSearch.qualityTestScoreEnd =
this.searchFormSearch.qualityTestScore[1]
}
if (this.searchFormSearch.recepTime) {
if (this.searchFormSearch.recepTime.length>0) {
this.searchFormSearch.startTime = Util.dateFormate(
this.searchFormSearch.recepTime[0],
"YYYY-MM-DD HH:mm:ss"
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!