Commit b2b4f04e by zhangquan

Merge branch 'SAAS-V4.37.0' of http://192.168.3.233:8090/saas_plus/dj-car-life-s…

…ystem into SAAS-V4.37.0
2 parents 2602f1e9 df200abc
/*
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-03-14 13:42:35
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-03-15 09:56:24
* @FilePath: \dj-car-life-system\src\api\permeation.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import request from "./request"
//获取所有主营品牌列表
export function brandList(data) {
data.method = "dj.api.smartcarlife.common.car.brand.list"
return request(data)
}
// 查询4s店列表
export function listShop4sByRef(data) {
data.method = "dj.api.scenemerchantref.listShop4sByRef"
return request(data)
}
//渗透率报表(分页)
export function permeabilityList(data) {
data.method = "dj.api.smarcarlife.permeability.report.page"
return request(data)
}
//渗透率报表导出
export function permeabilityExport(data) {
data.method = "dj.api.smartcarlife.permeability.report.exportAsync"
return request(data)
}
//渗透率报表填报明细列表(分页)
export function permeabilityDetail(data) {
data.method = "dj.api.smarcarlife.permeability.report.detail.page"
return request(data)
}
//渗透率报表详情导出
export function permeabilityDetailExport(data) {
data.method = "dj.api.smartcarlife.permeability.report.detail.exportAsync"
return request(data)
}
import request from "./request"
const path = "dj.api.mindworkplate."
const path2 = "dj.api.smartcarlife."
// 质检管理
export function getReclistWithPage(data) {
data.method = `${path}badge.employeeBadgeReclistWithPage`
return request(data, "post")
}
// 分页查询接待批次列表
export function conversationPage(data) {
data.method = `${path2}inspection.conversation.batch.page`
return request(data, "post")
}
// 质检点管理-分页列表
export function conversationPointPage(data) {
data.method = `${path2}inspection.conversation.point.page`
return request(data, "post")
}
// 工牌管理
export function employeeBadgelistWithPage(data) {
data.method = `${path}badge.employeeBadgelistWithPage`
return request(data, "post")
}
// 同步数据
export function syncBadge(data = {}) {
data.method = `${path}badge.syncBadge`
return request(data, "post")
}
// 工牌统计管理
export function statisticsEmployeeBadge(data) {
data.method = `${path}badge.statisticsEmployeeBadge`
return request(data, "post")
}
// 质检详情-质检分析
export function conversationCheckList(data) {
data.method = `${path2}inspection.conversation.check.detail`
return request(data, "post")
}
// 质检详情-分页查询对话列表
export function conversationDetailPage(data) {
data.method = `${path2}inspection.conversation.detail.page`
return request(data, "post")
}
//获取一级二级分类
export function getPointCategory(data={}) {
data.method = `${path2}inspection.conversation.point.category`
return request(data, "post")
}
// 获取品牌方/供应方
export function getBrandSupplyMerchant(data) {
data.method = `${path}goods.type.queryGoodsRelatedParty`
return request(data, "post")
}
// 新增供应方
export function addBrandSupplyMerchant(data) {
data.method = `${path}goods.type.addGoodsRelatedParty`
return request(data, "post")
}
// 编辑/删除供应方
export function editBrandSupplyMerchant(data) {
data.method = `${path}goods.type.editGoodsRelatedParty`
return request(data, "post")
}
// 获取素材详情
export function getProductInfo(data) {
data.method = `${path}goodsinfo.get.byId`
return request(data, "post")
}
...@@ -277,18 +277,26 @@ export default { ...@@ -277,18 +277,26 @@ export default {
}, },
mounted() { mounted() {
var params = { currentPage: 1, pageSize: 100, merchantIdName: "" } var params = { currentPage: 1, pageSize: 2000, merchantIdName: "" }
getMerchantList(params) this.getBaseData()
.then((res) => { getMerchantList(params).then((res) => {
this.getBaseData(res.list) this.getSetMerchant(res.list || [])
}) })
.catch(() => {
this.getBaseData([])
})
}, },
methods: { methods: {
getBaseData(res) { getSetMerchant(res) {
this.showFormData.forEach((item, index) => {
if (item.type === "select" && item.name === "merchantId") {
res.unshift({
merchantNo: "",
merchantName: "全部"
})
this.$set(this.showFormData[index], "optionList", res)
}
})
},
getBaseData() {
const allOpt = { const allOpt = {
id: "", id: "",
label: "全部" label: "全部"
...@@ -308,13 +316,6 @@ export default { ...@@ -308,13 +316,6 @@ export default {
this.baseData[item.optionsName] this.baseData[item.optionsName]
) )
} }
if (item.type === "select" && item.name === "merchantId") {
res.unshift({
merchantNo: "",
merchantName: "全部"
})
this.$set(this.showFormData[index], "optionList", res)
}
}) })
}, },
handleReset() { handleReset() {
......
...@@ -34,14 +34,7 @@ ...@@ -34,14 +34,7 @@
<script> <script>
import { Util, deepClone } from "@/common/util" import { Util, deepClone } from "@/common/util"
import { import { getStatisticsList, exportStatisticsList,getMerchantList } from "@api/contentManager"
CONTENT_TYPE_OPTIONS,
SCENE_OPTIONS,
CHANNEL_OPTIONS,
STATUS_OPTIONS,
STATUS_ENUM
} from "./constant"
import { getStatisticsList, exportStatisticsList } from "@api/contentManager"
export default { export default {
name: "contentManagerList", name: "contentManagerList",
data() { data() {
...@@ -62,13 +55,12 @@ export default { ...@@ -62,13 +55,12 @@ export default {
pickerOptions: "beforeRangePickerOptions" pickerOptions: "beforeRangePickerOptions"
}, },
{ {
label: "所属门店", label: "可见门店",
name: "type", name: "merchantId",
type: "select", type: "select",
optionList: [], optionList: [],
optionId: "id", optionId: "merchantNo",
optionLabel: "label", optionLabel: "merchantName"
optionsName: "contentTypeOptions"
} }
], ],
// 基本数据 // 基本数据
...@@ -110,7 +102,7 @@ export default { ...@@ -110,7 +102,7 @@ export default {
}, },
mounted() { mounted() {
var params = { currentPage: 1, pageSize: 100, merchantIdName: "" } var params = { currentPage: 1, pageSize: 2000, merchantIdName: "" }
getMerchantList(params) getMerchantList(params)
.then((res) => { .then((res) => {
this.getBaseData(res.list) this.getBaseData(res.list)
...@@ -126,21 +118,16 @@ export default { ...@@ -126,21 +118,16 @@ export default {
id: "", id: "",
label: "全部" label: "全部"
} }
this.baseData = {
contentTypeOptions: deepClone(CONTENT_TYPE_OPTIONS),
sceneOptions: deepClone(SCENE_OPTIONS),
channelOptions: deepClone(CHANNEL_OPTIONS),
statuslOptions: deepClone(STATUS_OPTIONS)
}
this.showFormData.forEach((item, index) => { this.showFormData.forEach((item, index) => {
if (item.type === "select" && this.baseData[item.optionsName]) { // if (item.type === "select" && this.baseData[item.optionsName]) {
this.baseData[item.optionsName].unshift(allOpt) // this.baseData[item.optionsName].unshift(allOpt)
this.$set( // this.$set(
this.showFormData[index], // this.showFormData[index],
"optionList", // "optionList",
this.baseData[item.optionsName] // this.baseData[item.optionsName]
) // )
} // }
if (item.type === "select" && item.name === "merchantId") { if (item.type === "select" && item.name === "merchantId") {
res.unshift({ res.unshift({
merchantNo: "", merchantNo: "",
...@@ -154,6 +141,7 @@ export default { ...@@ -154,6 +141,7 @@ export default {
for (const key in this.searchForm) { for (const key in this.searchForm) {
this.searchForm[key] = "" this.searchForm[key] = ""
} }
this.searchForm.goodsType = 0
this.realSearchForm = {} this.realSearchForm = {}
this.$refs.contentTable.refreshTable(true, true) this.$refs.contentTable.refreshTable(true, true)
}, },
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
</div> </div>
<d2-table <d2-table
ref="recordTable" ref="recordTable"
:get-list-api="getListApi"
:table-data="tableData" :table-data="tableData"
:search-form="searchFormSearch" :search-form="searchFormSearch"
:table-params="tableParams" :table-params="tableParams"
...@@ -50,32 +51,28 @@ ...@@ -50,32 +51,28 @@
<script> <script>
import { Util, deepClone } from "@/common/util" import { Util, deepClone } from "@/common/util"
import { permeabilityDetail } from "@/api/permeation.js"
import { mapActions, mapState } from "vuex" import { mapActions, mapState } from "vuex"
import { dfBalanceMonthStatListStatYear } from "@api/balanceStatistics" import dayjs from "dayjs"
import { rangePickerOptions_year_2023 } from "@/common/format"
export default { export default {
name: "DetailDialog", name: "DetailDialog",
components: {}, components: {},
data() { data() {
return { return {
userInfo: this.$store.state.d2admin.user.info, getListApi: permeabilityDetail,
pickerOption: rangePickerOptions_year_2023,
countObj: {}, countObj: {},
searchForm: { searchForm: {},
statYear: "",
merchantId: ""
},
searchFormSearch: {}, searchFormSearch: {},
searchSelectObj: {}, searchSelectObj: {},
showFormData: [ showFormData: [
{ {
label: "员工姓名", label: "员工姓名",
name: "putStatus", name: "staffName",
type: "input" type: "input"
}, },
{ {
label: "填报日期", label: "填报日期",
name: "putStatus", name: "createdDate",
type: "datePicker" type: "datePicker"
} }
], ],
...@@ -89,15 +86,15 @@ export default { ...@@ -89,15 +86,15 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: "员工名称", label: "员工名称",
prop: "statMonth" prop: "staffName"
}, },
{ {
label: "填报交付数", label: "填报交付数",
prop: "statMonth" prop: "deliveryCount"
}, },
{ {
label: "填报时间", label: "填报时间",
prop: "statMonth" prop: "createdDate"
} }
] ]
}, },
...@@ -110,46 +107,62 @@ export default { ...@@ -110,46 +107,62 @@ export default {
type: Boolean, type: Boolean,
default: false default: false
}, },
recordInfo: { merchantId: {
type: Object, type: String,
default: () => {} default: ""
} }
}, },
computed: {}, computed: {
...mapState({
dowloadList: (state) => state.d2admin.user.dowloadList
})
},
mounted() { mounted() {
const nowDate = new Date() this.searchForm.merchantId = this.merchantId
this.searchForm.statYear = nowDate.getFullYear().toString()
if (this.recordInfo) {
// this.searchForm.merchantId = this.recordInfo.merchantId
}
// this.getList()
}, },
methods: { methods: {
...mapActions({ ...mapActions("d2admin/user", ["actionSetDownloadList"]),
get: "d2admin/base/get",
close: "d2admin/page/close"
}),
beforeSearchFn() { beforeSearchFn() {
return new Promise((resolve) => { return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm) this.searchFormSearch = this.getParams()
resolve() resolve()
}) })
}, },
getParams() {
chooseYear() { this.searchFormSearch = deepClone(this.searchForm)
this.getList() if (this.searchFormSearch.createdDate) {
this.searchFormSearch.reportStartDate = dayjs(
this.searchFormSearch.createdDate[0]
).format("YYYY-MM-DD")
this.searchFormSearch.reportEndDate = dayjs(
this.searchFormSearch.createdDate[1]
).format("YYYY-MM-DD")
}
return this.searchFormSearch
}, },
handleExport() {
getList() { var params = this.getParams()
var params = deepClone(this.searchForm) params.method =
dfBalanceMonthStatListStatYear(params).then((res) => { "dj.api.smartcarlife.permeability.report.detail.exportAsync"
this.tableData = res const list = [
}) ...this.dowloadList,
{
name: "dowloadList",
exportParam: JSON.stringify(params),
status: "waiting",
timeid: new Date().getTime()
}
]
this.actionSetDownloadList({ list, type: "dowloadList" })
},
handleReset() {
this.searchForm = {
merchantId: this.merchantId
}
this.$refs.recordTable.refreshTable()
}, },
handleClose() { handleClose() {
this.$emit("dialogClose") this.$emit("dialogClose")
} }
......
<template> <template>
<div class="dialogue"> <div class="dialogue">
<div class="record"> <div class="record">
<audio id="audio1" controls> <audio id="audio1">
<source src="/i/audio/song.mp3" type="audio/mpeg" /> <source :src="detailObj.fileUrl" type="audio/mpeg" />
<source src="/i/audio/song.ogg" type="audio/ogg" /> <source :src="detailObj.fileUrl" type="audio/ogg" />
您的浏览器不支持 audio 标签。 您的浏览器不支持 audio 标签。
</audio> </audio>
<div class="play"> <div class="play" v-if="isPlay" @click="handleAudio">
<img src="@/assets/play.png" /> <img src="@/assets/play.png" />
</div> </div>
<div id="progress-bar"> <div class="play" v-else @click="handleAudio">
<div id="progress"></div> <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> </div>
<div class="record-info"> <div class="record-info">
<div class="dialog"> <div class="dialog">
<div class="dialog-detail"> <template v-for="item in dialogList">
<div class="name">顾客</div> <div class="dialog-detail" :key="item.id">
<div class="dig-content"> <div class="name">{{ item.role }}</div>
加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势。 <div class="dig-content">
{{ item.content }}
</div>
</div> </div>
</div> </template>
<div class="dialog-detail">
<div class="name">销售 @张可</div>
<div class="dig-content">
加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势。
</div>
</div>
</div> </div>
<div class="abstract"> <div class="abstract">
<div class="title"> <div class="title">
<img class="robot" src="@/assets/robot.png" />AI对话摘要 <img class="robot" src="@/assets/robot.png" />AI对话摘要
</div> </div>
<div class="abText"> <div class="abText">
在提车环节中,我们的驻点人员与问界车主进行了基于精品加装的沟通。我们了解到车主对车辆的外观和内饰有较高的要求,希望能够进行个性化的改装。 {{ detailObj.digest }}
我们的驻点人员积极回应了车主的需求,并向其推荐了一系列精品加装方案。我们向车主详细介绍了各种加装方案的特点和优势,并提供了相关的图片和样品供其参考。
在沟通过程中,我们的驻点人员充分听取了车主的意见和建议,并根据其喜好和需求进行了方案的调整和优化。我们还向车主展示了其他车主的改装案例,以增加其对改装效果的信心。
最终,我们的驻点人员与车主达成了一致意见,并成功签订了改装合同。我们对车主的选择表示了感谢,并承诺将提供优质的服务和专业的技术支持,以确保改装工作的顺利进行和最终的成功。
</div> </div>
</div> </div>
</div> </div>
...@@ -44,17 +55,107 @@ ...@@ -44,17 +55,107 @@
</template> </template>
<script> <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> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.dialogue { .dialogue {
margin: auto; margin: auto;
.record { .record {
position: relative;
width: 600px; width: 600px;
margin: 20px auto; margin: 20px auto;
height: 56px; height: 56px;
background: #f7f9fa;
border-radius: 32px;
display: flex;
align-items: center;
audio { audio {
width: 600px; width: 600px;
height: 56px; height: 56px;
...@@ -65,25 +166,36 @@ export default {} ...@@ -65,25 +166,36 @@ export default {}
.play { .play {
width: 24px; width: 24px;
height: 24px; height: 24px;
position: absolute; margin: 0 20px 0 24px;
top: 18px;
left: 18px;
img { img {
width: 100%; width: 100%;
} }
} }
#progress-bar { .trumpet {
position: absolute; width: 16px;
top: 26px; 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; height: 6px;
width: 377px; width: 370px;
left: 134px;
background-color: #e7e7e7; /* 进度条背景颜色 */ background-color: #e7e7e7; /* 进度条背景颜色 */
border-radius: 6px; border-radius: 6px;
} }
#progress { #progress {
width: 10%; /* 初始进度为0 */ width: 0; /* 初始进度为0 */
height: 6px; height: 6px;
background-image: linear-gradient( background-image: linear-gradient(
90deg, 90deg,
...@@ -94,16 +206,14 @@ export default {} ...@@ -94,16 +206,14 @@ export default {}
border-radius: 6px; border-radius: 6px;
position: relative; position: relative;
} }
#progress::after { .circle {
content: ".";
display: block;
width: 16px; width: 16px;
height: 16px; height: 16px;
background: #5850ff; background: #5850ff;
border: 4.5px solid #ffffff; border: 4.5px solid #ffffff;
border-radius: 50%; border-radius: 50%;
position: absolute; position: absolute;
right: 0; right: -14px;
top: -4px; top: -4px;
box-sizing: border-box; box-sizing: border-box;
} }
...@@ -178,6 +288,7 @@ export default {} ...@@ -178,6 +288,7 @@ export default {}
} }
} }
.abText { .abText {
margin-top: 14px;
width: 294px; width: 294px;
height: 472px; height: 472px;
padding: 12px; padding: 12px;
......
...@@ -11,28 +11,30 @@ ...@@ -11,28 +11,30 @@
]" ]"
@click="handleRangeClick" @click="handleRangeClick"
@mouseleave="showClose = false" @mouseleave="showClose = false"
@mousemove="showClose = true" @mousemove="handleMove"
ref="reference" ref="reference"
> >
<el-input <el-input
v-model="displayValue[0]" v-model="userInput[0]"
:placeholder="startPlaceholder" :placeholder="startPlaceholder"
@blur="handleBlur" @blur="handleBlur"
@input="handleStartInput"
class="el-range-input" class="el-range-input"
@keydown="handleKeydown" @keydown="handleKeydown"
></el-input> ></el-input>
<span class="el-range-separator">至</span> <span class="el-range-separator">至</span>
<el-input <el-input
v-model=" displayValue[1]" v-model="userInput[1]"
:placeholder="endPlaceholder" :placeholder="endPlaceholder"
@input="handleEndInput"
@focus="handleFocus" @focus="handleFocus"
@blur="handleBlur" @blur="handleBlur"
class="el-range-input" class="el-range-input"
@keydown="handleKeydown" @keydown="handleKeydown"
></el-input> ></el-input>
<i <i
v-show="showClose" v-show="showClose"
@click="handleClickIcon" @click="handleClickIcon"
class="el-icon-circle-close" class="el-icon-circle-close"
></i> ></i>
...@@ -45,73 +47,66 @@ export default { ...@@ -45,73 +47,66 @@ export default {
data() { data() {
return { return {
pickerVisible: false, pickerVisible: false,
showClose: false showClose: false,
userInput: this.displayValue
} }
}, },
props: { props: {
displayValue: Array,
placeholder: String, placeholder: String,
startPlaceholder: String, startPlaceholder: String,
endPlaceholder: String endPlaceholder: String
}, },
watch: { watch: {
pickerVisible(val) { displayValue(val) {
// if (this.pickerDisabled) return if (val) {
// if (val) { this.userInput = val
// } else { }
// this.hidePicker()
// this.emitChange(this.value)
// this.userInput = null
// if (this.validateEvent) {
// this.dispatch("ElFormItem", "el.form.blur")
// }
// this.$emit("blur", this)
// this.blur()
// }
} }
}, },
computed:{
displayValue(){
return []
},
},
methods: { methods: {
handleKeydown(){ handleStartInput(event) {
console.log(event)
if (this.userInput) {
this.userInput = [event, this.userInput[1]]
} else {
this.userInput = [event, null]
}
}, },
handleClickIcon(event) {
if (this.readonly || this.pickerDisabled) return handleEndInput(event) {
if (this.showClose) { if (this.userInput) {
this.valueOnOpen = this.value this.userInput = [this.userInput[0], event]
event.stopPropagation()
this.emitInput(null)
this.emitChange(null)
this.showClose = false
if (this.picker && typeof this.picker.handleClear === "function") {
this.picker.handleClear()
}
} else { } else {
this.pickerVisible = !this.pickerVisible this.userInput = [null, event]
} }
}, },
handleClickIcon(event) {
this.userInput[0]=null
this.userInput[1]=null
},
valueIsEmpty() { valueIsEmpty() {
const val = this.value const val = this.userInput
if (Array.isArray(val)) { if (Array.isArray(val)) {
for (let i = 0, len = val.length; i < len; i++) { for (let i = 0, len = val.length; i < len; i++) {
if (val[i]) { if (val[i]) {
return false return false
} }
} }
} else {
if (val) {
return false
}
} }
return true return true
}, },
handleRangeClick() { handleRangeClick() {
this.pickerVisible = true this.pickerVisible = true
}, },
handleMove() {
if (this.valueIsEmpty()) {
this.showClose = false
} else {
this.showClose = true
}
},
handleFocus() { handleFocus() {
if (!this.pickerVisible) { if (!this.pickerVisible) {
this.pickerVisible = true this.pickerVisible = true
...@@ -120,7 +115,16 @@ export default { ...@@ -120,7 +115,16 @@ export default {
}, },
handleBlur() { handleBlur() {
this.pickerVisible = false this.pickerVisible = false
console.log(this.pickerVisible) this.contrastValue()
},
contrastValue() {
let val = this.userInput
if (Array.isArray(val)) {
if (val[0] > val[1]) {
val[1] =null
console.log(val)
}
}
} }
} }
} }
...@@ -136,9 +140,9 @@ export default { ...@@ -136,9 +140,9 @@ export default {
} }
} }
} }
.el-icon-circle-close{ .el-icon-circle-close {
color:#DCDFE6; color: #dcdfe6;
margin-left:10px; margin-left: 10px;
} }
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -3,7 +3,10 @@ ...@@ -3,7 +3,10 @@
<div class="statistics"> <div class="statistics">
<div class="s-item" v-for="(item, index) in sList" :key="index"> <div class="s-item" v-for="(item, index) in sList" :key="index">
<div class="title">{{ item.text }}</div> <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>
</div> </div>
<d2-search <d2-search
...@@ -12,12 +15,44 @@ ...@@ -12,12 +15,44 @@
:search-form="searchForm" :search-form="searchForm"
:form-data="showFormData" :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 <el-input-range
start-placeholder="请输入" start-placeholder="请输入"
end-placeholder="请输入" end-placeholder="请输入"
:displayValue="searchForm.qualityTestScore"
></el-input-range> ></el-input-range>
</div> </template>
</d2-search> </d2-search>
<div class="up-btns"> <div class="up-btns">
<el-button @click="handleSearch" size="small" type="primary"> <el-button @click="handleSearch" size="small" type="primary">
...@@ -27,75 +62,107 @@ ...@@ -27,75 +62,107 @@
</div> </div>
<div class="theader"> <div class="theader">
<div class="title">话术列表</div> <div class="title">话术列表</div>
<el-radio-group v-model="select"> <el-radio-group v-model="searchForm.hitResult">
<el-radio-button label="全部"></el-radio-button> <el-radio-button label="">全部</el-radio-button>
<el-radio-button label="命中"></el-radio-button> <el-radio-button label="1">命中</el-radio-button>
<el-radio-button label="未命中"></el-radio-button> <el-radio-button label="2">未命中</el-radio-button>
</el-radio-group> </el-radio-group>
</div> </div>
<d2-table <d2-table
ref="recordTable" ref="analyseTable"
:get-list-api="getListApi" :get-list-api="getListApi"
:search-form="searchFormSearch" :search-form="searchFormSearch"
:table-params="tableParams" :table-params="tableParams"
:before-search-fn="beforeSearchFn" :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> </d2-table>
</div> </div>
</template> </template>
<script> <script>
import ElInputRange from "./el-input-range" 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 { export default {
components: { components: {
ElInputRange ElInputRange
}, },
props: {
detailObj: {
type: Object,
default: {}
}
},
data() { data() {
return { return {
sList: [ sList: [
{ {
text: "话术评分", text: "话术评分",
value: "80分" formatter: (data) => {
return `<span style="font-weight:700;font-size:26px;">${
data.averageQualityTestScore ? data.score : "0"
}</span>分`
}
}, },
{ {
text: "预计营销结果", text: "预计营销结果",
value: "成交" formatter: (data) => {
return `<span style="font-weight:700;font-size:26px;">${
data.estimatedResult ? data.estimatedResult : "--"
}</span>`
}
}, },
{ {
text: "开始录音时间", text: "开始录音时间",
value: "12:30" formatter: (data) => {
return `<span style="font-weight:700;font-size:20px;">${
data.startTime ? data.startTime : "--"
}</span>`
}
}, },
{ {
text: "对话时长", 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: [ showFormData: [
{ {
label: "一级分类", label: "一级分类",
name: "orderDate", name: "firstClassify",
type: "datePicker", addHtml: "firstClassify"
isClear: true,
pickerOptions: "rangePickerOptions"
}, },
{ {
label: "二级分类", label: "二级分类",
name: "merchantName", name: "secondClassify",
type: "input", addHtml: "secondClassify"
maxlength: 20,
isClear: true,
keyFn: this.keyDowmGetList
}, },
{ {
label: "质检评分", label: "质检评分",
name: "yqMerchantId", name: "qualityTestScore",
addHtml: "score" addHtml: "score"
} }
], ],
select: "全部", select: "全部",
getListApi: waitinputorderPage, getListApi: conversationCheckList,
tableParams: { tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000), btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: "list", listName: "list",
...@@ -103,35 +170,102 @@ export default { ...@@ -103,35 +170,102 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: "一级分类", label: "一级分类",
prop: "tradeNo", prop: "firstClassify",
width: "160px" width: "120px"
}, },
{ {
label: "二级分类", label: "二级分类",
prop: "outTradeNo", prop: "secondClassify",
width: "250px" width: "140px"
}, },
{ {
label: "质检得分", label: "质检得分",
prop: "totalFee" prop: "score",
width: "100px"
}, },
{ {
label: "是否命中", label: "是否命中",
prop: "accountDate", prop: "hitResult",
width: "150px" width: "100px",
addHtml: "hitResult"
}, },
{ {
label: "命中文本", label: "命中文本",
prop: "payType", prop: "hitText"
width: "100px"
}, },
{ {
label: "话术建议", 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> </script>
...@@ -156,8 +290,6 @@ export default { ...@@ -156,8 +290,6 @@ export default {
margin-bottom: 8px; margin-bottom: 8px;
} }
.content { .content {
font-weight: 700;
font-size: 26px;
color: #333333; color: #333333;
} }
} }
...@@ -167,12 +299,29 @@ export default { ...@@ -167,12 +299,29 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
margin-bottom:12px; margin-bottom: 12px;
.title { .title {
font-size: 16px; font-size: 16px;
color: #333333; color: #333333;
font-weight: 600; 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> </style>
\ No newline at end of file \ No newline at end of file
...@@ -10,12 +10,13 @@ ...@@ -10,12 +10,13 @@
<div> <div>
<el-tabs v-model="activeName" @tab-click="handleReset"> <el-tabs v-model="activeName" @tab-click="handleReset">
<el-tab-pane label="质检分析" name="analyse"> <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>
<el-tab-pane label="对话详情" name="dialogue"> <el-tab-pane label="对话详情" name="dialogue">
<dialogue-detail <dialogue-detail
v-if="activeName == 'dialogue'" v-if="activeName == 'dialogue'"
ref="dialogueDetail" ref="dialogueDetail"
v-bind="$attrs"
/> />
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
...@@ -28,7 +29,7 @@ import { Util, deepClone } from "@/common/util" ...@@ -28,7 +29,7 @@ import { Util, deepClone } from "@/common/util"
import { mapActions, mapState } from "vuex" import { mapActions, mapState } from "vuex"
import { shopmallOrderList, relatedActivityOrder } from "@api/order" import { shopmallOrderList, relatedActivityOrder } from "@api/order"
import QualityAnalyse from "./qualityAnalyse" import QualityAnalyse from "./qualityAnalyse"
import DialogueDetail from './dialogueDetail' import DialogueDetail from "./dialogueDetail"
export default { export default {
name: "RelatActivityOrderDialog", name: "RelatActivityOrderDialog",
components: { components: {
...@@ -37,7 +38,7 @@ export default { ...@@ -37,7 +38,7 @@ export default {
}, },
data() { data() {
return { return {
activeName: "dialogue", activeName: "analyse",
userInfo: this.$store.state.d2admin.user.info, userInfo: this.$store.state.d2admin.user.info,
countObj: {}, countObj: {},
searchForm: { searchForm: {
...@@ -187,19 +188,19 @@ export default { ...@@ -187,19 +188,19 @@ export default {
isQualityVisible: { isQualityVisible: {
type: Boolean, type: Boolean,
default: false default: false
},
orderId: {
type: [String, Number],
default: ""
} }
}, },
computed: {}, computed: {},
mounted() {}, mounted() {
console.log(111,this.$attrs)
},
methods: { methods: {
handleReset() {}, handleReset() {},
handleClose() {} handleClose() {
this.$emit("closeDialog", false)
}
} }
} }
</script> </script>
......
...@@ -5,23 +5,23 @@ ...@@ -5,23 +5,23 @@
<div class="info-wrap"> <div class="info-wrap">
<div class="info-item flex"> <div class="info-item flex">
<label>员工:</label> <label>员工:</label>
<span>陆可</span> <span>{{ queryData.employeeName }}</span>
</div> </div>
<div class="info-item flex"> <div class="info-item flex">
<label>门店:</label> <label>门店:</label>
<span>陆可</span> <span>{{ queryData.storeList&&queryData.storeList.join("、") }}</span>
</div> </div>
<div class="info-item flex"> <div class="info-item flex">
<label>服务商:</label> <label>服务商:</label>
<span>陆可</span> <span>{{ queryData.serviceList&&queryData.serviceList.join("、") }}</span>
</div> </div>
<div class="info-item flex"> <div class="info-item flex">
<label>质检日期:</label> <label>质检日期:</label>
<span>陆可</span> <span>{{ queryData.searchdate }}</span>
</div> </div>
<div class="info-item flex"> <div class="info-item flex">
<label>接待批次/批:</label> <label>接待批次/批:</label>
<span>陆可</span> <span>{{ queryData.batchNum }}</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -33,18 +33,13 @@ ...@@ -33,18 +33,13 @@
:search-form="searchForm" :search-form="searchForm"
:form-data="showFormData" :form-data="showFormData"
> >
<div slot="score"> <template slot="score">
<el-input-range <el-input-range
start-placeholder="请输入" start-placeholder="请输入"
end-placeholder="请输入" end-placeholder="请输入"
:displayValue="searchForm.qualityTestScore"
></el-input-range> ></el-input-range>
</div> </template>
<div slot="abnormal">
<el-input-range
start-placeholder="请输入"
end-placeholder="请输入"
></el-input-range>
</div>
</d2-search> </d2-search>
<div class="up-btns"> <div class="up-btns">
<el-button @click="handleSearch" size="small" type="primary"> <el-button @click="handleSearch" size="small" type="primary">
...@@ -53,7 +48,7 @@ ...@@ -53,7 +48,7 @@
<el-button size="small" @click="handleReset"> 重置 </el-button> <el-button size="small" @click="handleReset"> 重置 </el-button>
</div> </div>
<d2-table <d2-table
ref="qualityTable" ref="recepDetail"
:get-list-api="getListApi" :get-list-api="getListApi"
:search-form="searchFormSearch" :search-form="searchFormSearch"
:table-params="tableParams" :table-params="tableParams"
...@@ -66,45 +61,49 @@ ...@@ -66,45 +61,49 @@
</template> </template>
</d2-table> </d2-table>
</div> </div>
<quality-detail :isQualityVisible="isQualityVisible"></quality-detail> <quality-detail :isQualityVisible="isQualityVisible" v-if="isQualityVisible" :detailObj="detailObj" @closeDialog="closeDialog"></quality-detail>
</div> </div>
</template> </template>
<script> <script>
import { Util, deepClone } from "@/common/util" import { Util, deepClone } from "@/common/util"
import ElInputRange from "./el-input-range" import ElInputRange from "./el-input-range"
import QualityDetail from "./qualityDetail.vue" import QualityDetail from "./qualityDetail.vue"
import { import { conversationPage } from "@api/resident"
getyqMerchantList,
getMerchantGoodsStockMonthReport,
stockMonthReportCount
} from "@api/stockManage"
export default { export default {
data() { data() {
return { return {
queryData: JSON.parse(this.$route.query.data),
isQualityVisible: false, isQualityVisible: false,
searchForm: {}, searchForm: {
recepTime: [],
qualityTestScore: [],
estimatedResultId: ""
},
detailObj:{},
searchFormSearch: {}, searchFormSearch: {},
getListApi: getMerchantGoodsStockMonthReport, getListApi: conversationPage,
showFormData: [ showFormData: [
{ {
label: "接待时间", label: "接待时间",
type: "datePicker", type: "datePicker",
name: "recepTime",
// addHtml:'recepTime',
isClear: true, isClear: true,
pickerOptions: "rangePickerOptions" pickerOptions: "rangePickerOptions"
}, },
{ {
label: "质检评分", label: "质检评分",
name: "yqMerchantId", name: "qualityTestScore",
addHtml: "score" addHtml: "score"
}, },
{ {
label: "预计营销结果", label: "预计营销结果",
name: "yqMerchantId", name: "estimatedResultId",
type: "select", type: "select",
optionList: [], optionList: [],
optionId: "merchantNo", optionId: "confId",
optionLabel: "merchantName", optionLabel: "confLabel",
optionsName: "yqMerchantList" optionsName: "estimatedResultList"
} }
], ],
tableParams: { tableParams: {
...@@ -114,23 +113,39 @@ export default { ...@@ -114,23 +113,39 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: "开始接待时间", label: "开始接待时间",
prop: "upgradeGoodsName" prop: "startTime"
}, },
{ {
label: "结束接待时间", label: "结束接待时间",
prop: "productCode" prop: "endTime"
}, },
{ {
label: "录音时长/分钟", label: "录音时长/分钟",
prop: "goodsSeries" prop: "duration"
}, },
{ {
label: "预计营销结果", label: "预计营销结果",
prop: "goodsTypeName" prop: "estimatedResult"
}, },
{ {
label: "话术质检评分/分", label: "话术质检评分/分",
prop: "lastMonthRemainStock" prop: "score"
}
]
},
baseData: {
estimatedResultList: [
{
confId: "1",
confLabel: "成交"
},
{
confId: "2",
confLabel: "战败"
},
{
confId: "3",
confLabel: "未知"
} }
] ]
} }
...@@ -140,9 +155,85 @@ export default { ...@@ -140,9 +155,85 @@ export default {
ElInputRange, ElInputRange,
QualityDetail QualityDetail
}, },
mounted() {
this.getOptionsList()
},
methods: { methods: {
qualitDetail() { handleSearch() {
this.$refs.recepDetail.refreshTable(true, true)
},
handleReset() {
this.searchForm = {
recepTime: [],
qualityTestScore: [],
estimatedResultId: ""
}
this.$refs.recepDetail.refreshTable()
},
closeDialog(){
this.isQualityVisible = false
},
qualitDetail(row) {
this.detailObj=row
this.isQualityVisible = true this.isQualityVisible = true
},
beforeSearchFn() {
return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm)
this.searchFormSearch.conversationDateId = this.queryData.id
this.searchFormSearch.pageNum= this.searchFormSearch.currentPage
if (this.searchFormSearch.qualityTestScore) {
this.searchFormSearch.qualityTestScoreBegin =
this.searchFormSearch.qualityTestScore[0]
this.searchFormSearch.qualityTestScoreEnd =
this.searchFormSearch.qualityTestScore[1]
}
if (this.searchFormSearch.recepTime.length>0) {
this.searchFormSearch.startTime = Util.dateFormate(
this.searchFormSearch.recepTime[0],
"YYYY-MM-DD HH:mm:ss"
)
this.searchFormSearch.endTime =
Util.dateFormate(this.searchFormSearch.recepTime[1], "YYYY-MM-DD") +
" 23:59:59"
}
if (this.searchFormSearch.estimatedResult) {
this.searchFormSearch.estimatedResult =
this.baseData.estimatedResultList.find(
(item) => item.confId == this.searchFormSearch.estimatedResultId
).confLabel
}
delete this.searchFormSearch.qualityTestScore
delete this.searchFormSearch.recepTime
delete this.searchFormSearch.estimatedResultId
delete this.searchFormSearch.currentPage
resolve()
})
},
getOptionsList() {
this.showFormData.forEach((item, index) => {
if (item.type === "select") {
if (
this.baseData[item.optionsName].length &&
this.baseData[item.optionsName][0][
this.showFormData[index].optionLabel
] !== "全部"
) {
const temp = {}
temp[this.showFormData[index].optionId] = ""
temp[this.showFormData[index].optionLabel] = "全部"
this.baseData[item.optionsName].unshift(temp)
}
this.$set(
this.showFormData[index],
"optionList",
this.baseData[item.optionsName]
)
}
})
} }
} }
} }
...@@ -171,6 +262,8 @@ export default { ...@@ -171,6 +262,8 @@ export default {
.info-item { .info-item {
width: 50%; width: 50%;
margin-bottom: 20px; margin-bottom: 20px;
display: flex;
align-items: flex-start;
label { label {
width: 154px; width: 154px;
text-align: right; text-align: right;
...@@ -181,6 +274,14 @@ export default { ...@@ -181,6 +274,14 @@ export default {
span { span {
font-size: 14px; font-size: 14px;
color: #1d1d1d; color: #1d1d1d;
display: inline-block;
max-width: 300px;
overflow: hidden;
/* 防止文本换行 */
white-space: nowrap;
/* 使用省略号表示被截断的文本 */
text-overflow: ellipsis;
} }
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!