Commit aeb3e8b8 by 胡悦

Merge branch 'SAAS+V4.46.1-1107' into 'develop'

上线合并

See merge request !371
2 parents e2118446 ed38bdba
/* /*
* @Description: AI对练相关接口 * @Description: AI对练相关接口
* @Author: huyue * @Author: huyue
* @Date: 2024-04-19 11:02:02 * @Date: 2024-04-19 11:02:02
* @LastEditors: 王志慧 wangzh@didihu.com.cn * @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-07-20 10:42:14 * @LastEditTime: 2024-10-25 15:45:25
*/ */
import request from "./request" import request from "./request"
const path = "dj.api.smartcarlife.ai.sparring." const path = "dj.api.smartcarlife.ai.sparring."
// 结束任务 // 结束任务
export function stopTask(data) { export function stopTask(data) {
data.method = `${path}stop.task` data.method = `${path}stop.task`
return request(data) return request(data)
} }
// 获取练习列表 // 获取练习列表
export function getList(data) { export function getList(data) {
data.method = `${path}task.page` data.method = `${path}task.page`
return request(data) return request(data)
} }
// 新建任务 // 新建任务
export function createTask(data) { export function createTask(data) {
data.method = `${path}task.create` data.method = `${path}task.create`
return request(data, "post") return request(data, "post")
} }
// 对练详情 // 对练详情
export function getTaskDetail(data) { export function getTaskDetail(data) {
data.method = `${path}task.staff.detail.page` data.method = `${path}task.staff.detail.page`
return request(data) return request(data)
} }
// 分页任务员工列表 // 分页任务员工列表
export function getTaskStaffList(data) { export function getTaskStaffList(data) {
data.method = `${path}task.staff.page` data.method = `${path}task.staff.page`
return request(data) return request(data)
} }
// 任务员工提醒 // 任务员工提醒
export function remindTaskStaff(data) { export function remindTaskStaff(data) {
data.method = `${path}task.staff.notify` data.method = `${path}task.staff.notify`
return request(data) return request(data)
} }
// 查询员工列表 // 查询员工列表
export function getStaffList(data) { export function getStaffList(data) {
data.method = `dj.api.smartcarlife.staff.page` data.method = `dj.api.smartcarlife.staff.page`
// data.method = 'merchants.api.open.serviceCenter.searchStaffPage' // data.method = 'merchants.api.open.serviceCenter.searchStaffPage'
return request(data) return request(data)
} }
// 获取所有的园区店 // 获取所有的园区店
export function getAllStore(data = {}) { export function getAllStore(data = {}) {
data.method = `dj.smartcarlife.api.yqMerchant.list` data.method = `dj.smartcarlife.api.yqMerchant.list`
return request(data) return request(data)
} }
// 获取质检结果 // 获取质检结果
export function getQualityResult(data) { export function getQualityResult(data) {
data.method = `dj.api.carboutique.ai.sparring.detail.check.result` data.method = `dj.api.carboutique.ai.sparring.detail.check.result`
return request(data) return request(data)
} }
// 查询对练详情 // 查询对练详情
export function getSparringDetail(data) { export function getSparringDetail(data) {
data.method = `${path}task.staff.detail.page` data.method = `${path}task.staff.detail.page`
return request(data) return request(data)
} }
// 查询对练详情列表 // 查询对练详情列表
export function staffRecordPage(data) { export function staffRecordPage(data) {
data.method = `${path}staff.record.page` data.method = `${path}staff.record.page`
return request(data) return request(data)
} }
// 查询对练详情列表
// 更新任务提示词状态 export function staffBehaviorPage(data) {
export function updateTaskPromptStatus(data) { data.method = `dj.api.carboutique.ai.sparring.staff.behavior.page`
data.method = `${path}task.updatePrompt` return request(data)
return request(data) }
} // 查询对练详情列表
export function staffBehaviorExport(data) {
//质检结果 data.method = `dj.api.smartcarlife.ai.sparring.staff.behavior.list.export`
export function getSparringCheckResult(data) { return request(data)
data.method = `dj.api.carboutique.ai.sparring.detail.check.result` }
} // 更新任务提示词状态
// 获取对练报告详情 export function updateTaskPromptStatus(data) {
export function getSparringReportDetail(data) { data.method = `${path}task.updatePrompt`
data.method = `${path}report.detail` return request(data)
return request(data) }
}
//质检结果
export function getSparringCheckResult(data) {
data.method = `dj.api.carboutique.ai.sparring.detail.check.result`
}
// 获取对练报告详情
export function getSparringReportDetail(data) {
data.method = `${path}report.detail`
return request(data)
}
<!--
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-08-29 18:04:06
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-10-22 16:54:31
* @FilePath: \dj-car-life-system\src\views\contentManager\components\AddDrawer\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template> <template>
<el-drawer <el-drawer
:title="form.id ? '编辑产品词条' : '新增产品词条'" :title="form.id ? '编辑产品词条' : '新增产品词条'"
...@@ -118,7 +110,6 @@ ...@@ -118,7 +110,6 @@
v-if="form.pictureList && form.pictureList.length" v-if="form.pictureList && form.pictureList.length"
> >
图片按照以上排序进行展示,可拖动调整排序 图片按照以上排序进行展示,可拖动调整排序
<span class="tip-btn" @click="showEffect()">查看效果</span>
</p> </p>
<p class="photo-top-tips" v-else> <p class="photo-top-tips" v-else>
推荐尺寸:1173*768,单个文件不超过10M,最多上传9张 推荐尺寸:1173*768,单个文件不超过10M,最多上传9张
......
...@@ -335,79 +335,6 @@ export default { ...@@ -335,79 +335,6 @@ export default {
}, },
{ {
label: "成交数",
name: "successfulConversions",
width: "80px",
formatter: (cell) => {
return cell.receptionStaffStaticDTO.successfulConversions
}
},
{
label: "转化率",
name: "conversionRate",
width: "80px",
formatter: (cell) => {
return cell.receptionStaffStaticDTO.conversionRate
}
},
{
label: "转化率(非企业)",
name: "nonCorporateConversionRate",
width: "120px",
formatter: (cell) => {
return cell.receptionStaffStaticDTO.nonCorporateConversionRate
}
},
{
label: "转化率(企业)",
name: "corporateConversionRate",
width: "120px",
formatter: (cell) => {
return cell.receptionStaffStaticDTO.corporateConversionRate
}
},
{
label: "安心包开口数",
name: "mentionedPackages",
width: "120px",
formatter: (cell) => {
return cell.receptionStaffStaticDTO.mentionedPackages
}
},
{
label: "安心包开口率",
name: "packageMentionRate",
width: "120px",
formatter: (cell) => {
return cell.receptionStaffStaticDTO.packageMentionRate
}
},
{
label: "安心包成交率",
name: "packageConversionRate",
width: "120px",
formatter: (cell) => {
return cell.receptionStaffStaticDTO.packageConversionRate
}
},
{
label: "安心包成交率(非企业)",
name: "nonCorporatePackageConversionRate",
width: "160px",
formatter: (cell) => {
return cell.receptionStaffStaticDTO
.nonCorporatePackageConversionRate
}
},
{
label: "安心包成交率(企业)",
name: "corporatePackageConversionRate",
width: "150px",
formatter: (cell) => {
return cell.receptionStaffStaticDTO.corporatePackageConversionRate
}
},
{
label: "接待日期", label: "接待日期",
prop: "searchdate", prop: "searchdate",
width: "120px" width: "120px"
...@@ -593,6 +520,79 @@ export default { ...@@ -593,6 +520,79 @@ export default {
label: "真实接待数量", label: "真实接待数量",
prop: "realRecCount", prop: "realRecCount",
width: "140px" width: "140px"
},
{
label: "成交数",
name: "successfulConversions",
width: "80px",
formatter: (cell) => {
return cell.receptionStaffStaticDTO.successfulConversions
}
},
{
label: "转化率",
name: "conversionRate",
width: "80px",
formatter: (cell) => {
return cell.receptionStaffStaticDTO.conversionRate
}
},
{
label: "转化率(非企业)",
name: "nonCorporateConversionRate",
width: "120px",
formatter: (cell) => {
return cell.receptionStaffStaticDTO.nonCorporateConversionRate
}
},
{
label: "转化率(企业)",
name: "corporateConversionRate",
width: "120px",
formatter: (cell) => {
return cell.receptionStaffStaticDTO.corporateConversionRate
}
},
{
label: "安心包开口数",
name: "mentionedPackages",
width: "120px",
formatter: (cell) => {
return cell.receptionStaffStaticDTO.mentionedPackages
}
},
{
label: "安心包开口率",
name: "packageMentionRate",
width: "120px",
formatter: (cell) => {
return cell.receptionStaffStaticDTO.packageMentionRate
}
},
{
label: "安心包成交率",
name: "packageConversionRate",
width: "120px",
formatter: (cell) => {
return cell.receptionStaffStaticDTO.packageConversionRate
}
},
{
label: "安心包成交率(非企业)",
name: "nonCorporatePackageConversionRate",
width: "160px",
formatter: (cell) => {
return cell.receptionStaffStaticDTO
.nonCorporatePackageConversionRate
}
},
{
label: "安心包成交率(企业)",
name: "corporatePackageConversionRate",
width: "150px",
formatter: (cell) => {
return cell.receptionStaffStaticDTO.corporatePackageConversionRate
}
} }
] ]
}, },
......
<!--
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-08-29 09:56:42
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-11-06 17:19:15
* @FilePath: \dj-car-life-system\src\views\residentManage\exercise\components\serviceAttitude.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!-- 服务态度 --> <!-- 服务态度 -->
<template> <template>
<div class="box"> <div class="box">
...@@ -7,13 +15,13 @@ ...@@ -7,13 +15,13 @@
<div class="value">{{ itemData.reportItemDescription }}</div> <div class="value">{{ itemData.reportItemDescription }}</div>
</div> </div>
<div class="line"></div> <div class="line"></div>
<div class="content-text">{{ itemData.content || '-' }}</div> <div class="content-text">{{ itemData.content || "-" }}</div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: 'serviceAttitude', name: "serviceAttitude",
props: { props: {
itemData: { itemData: {
type: Object, type: Object,
...@@ -21,16 +29,15 @@ export default { ...@@ -21,16 +29,15 @@ export default {
} }
}, },
data() { data() {
return { return {}
}
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.box{ .box {
display: flex; display: flex;
.box-item{ .box-item {
width: calc(50% - 8px); // width: calc(50% - 8px);
box-sizing: border-box; box-sizing: border-box;
height: 92px; height: 92px;
padding: 16px 20px; padding: 16px 20px;
...@@ -38,34 +45,34 @@ export default { ...@@ -38,34 +45,34 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
color: #333333; color: #333333;
background: #FBFBFB; background: #fbfbfb;
border-radius: 4px; border-radius: 4px;
&:last-child{ &:last-child {
margin: 0; margin: 0;
} }
.left{ .left {
flex-shrink: 0; flex-shrink: 0;
width: 100px; width: 100px;
.title{ .title {
font-weight: 14px; font-weight: 14px;
margin-bottom: 8px; margin-bottom: 8px;
} }
.value{ .value {
font-weight: 700; font-weight: 700;
font-size: 22px; font-size: 22px;
} }
} }
.line{ .line {
flex-shrink: 0; flex-shrink: 0;
width: 1px; width: 1px;
height: 44px; height: 44px;
background: #E5E5E5; background: #e5e5e5;
margin: 0 32px; margin: 0 32px;
} }
.content-text{ .content-text {
color: #999EA8; color: #999ea8;
font-size: 12px; font-size: 12px;
} }
} }
} }
</style>
\ No newline at end of file \ No newline at end of file
</style>
<!--
* @Description: AI对练记录
* @Author: huyue
* @Date: 2024-04-15 16:26:57
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-11-04 17:29:09
-->
<template>
<d2-container class="m-t-40">
<div class="header" slot="header" style="padding: 10px 20px">
<d2-search
ref="showSearch"
class="show-search"
label-width="110px"
:search-form="searchForm"
:form-data="showFormData"
>
<div class="up-btns">
<el-button size="small" type="primary" @click="handleSearch">
查询
</el-button>
<el-button size="small" @click="handleReset"> 重置 </el-button>
</div>
</d2-search>
</div>
<div class="d2-container-content" style="position: positive">
<d2-table-header>
<auth-button
category="Button"
style="
{
display: inline-block;
}
"
:show-btn-ids="['9120802']"
/>
</d2-table-header>
<d2-table
ref="exerciseTable"
:has-num="true"
:search-form="searchFormSearch"
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn"
>
<div slot="result" slot-scope="scope">
<div class="online-status">
<span
:class="[
scope.scope.sparringResult === 0 ? 'dot gray' : 'dot blue'
]"
></span
>{{ statusObj[scope.scope.sparringResult] }}
</div>
</div>
</d2-table>
</div>
</d2-container>
</template>
<script>
import { mapActions, mapState } from "vuex"
import { Util, deepClone } from "@/common/util"
import { staffBehaviorPage, updateTaskPromptStatus } from "@api/exercise"
export default {
name: "exerciseRecord",
data() {
return {
title: "查看结果",
isQualityVisible: false,
searchForm: {},
showFormData: [
{
label: "员工名称",
name: "staffName",
type: "input",
isclear: true
},
{
label: "手机号",
name: "staffPhone",
type: "input",
isclear: true
},
{
label: "分类",
name: "sparringType",
type: "select",
isclear: true,
optionList: [
{
value: null,
label: "全部"
},
{
value: "1",
label: "话术演练"
},
{
value: "2",
label: "攻防演练"
}
],
optionId: "value",
optionLabel: "label"
},
{
label: "练习结果",
name: "sparringResult",
type: "select",
isclear: true,
optionList: [
{
value: null,
label: "全部"
},
{
value: "0",
label: "未完成"
},
{
value: "1",
label: "已完成"
}
],
optionId: "value",
optionLabel: "label"
},
{
label: "进入页面时间",
name: "EntryTime",
type: "datePicker",
isclear: true
},
{
label: "离开页面时间",
name: "LeaveTime",
type: "datePicker",
isclear: true
}
],
statusObj: { 0: "未完成", 1: "已完成" },
activeName: "all",
// table相关
getListApi: staffBehaviorPage,
searchFormSearch: {},
tableParams: {
listName: "list",
tableOption: false,
tableColumns: [
{
label: "员工名称",
prop: "staffName"
},
{
label: "手机号",
prop: "staffPhone"
},
{
label: "分类",
prop: "sparringType",
formatter: (cellValue) => {
return cellValue.sparringType == 1 ? "话术演练" : "攻防演练"
}
},
{
label: "练习时长",
prop: "sparringDuration",
formatter: (cellValue) => {
let timeInMs = cellValue.sparringDuration
const totalSeconds = Math.floor(timeInMs / 1000)
const hours = Math.floor(totalSeconds / 3600)
const minutes = Math.floor((totalSeconds % 3600) / 60)
const seconds = totalSeconds % 60
if (hours > 0) {
return `${hours}时${minutes}分${seconds}秒`
} else {
return `${minutes}分${seconds}秒`
}
}
},
{
label: "练习结果",
prop: "sparringResult",
addHtml: "result"
},
{
label: "进入页面时间",
prop: "pageEntryTime",
formatter: (cellValue) => {
return Util.dateFormate(
cellValue.pageEntryTime,
"YYYY-MM-DD HH:mm:ss"
)
}
},
{
label: "离开页面时间",
prop: "pageLeaveTime",
formatter: (cellValue) => {
return Util.dateFormate(
cellValue.pageLeaveTime,
"YYYY-MM-DD HH:mm:ss"
)
}
}
]
}
}
},
computed: {
...mapState({
dowloadList: (state) => state.d2admin.user.dowloadList
})
},
methods: {
...mapActions({
get: "d2admin/base/get",
close: "d2admin/page/close"
}),
...mapActions("d2admin/user", ["actionSetDownloadList"]),
handleSearch() {
this.$refs.exerciseTable.refreshTable(true, true)
},
/************* ✨ Codeium Command ⭐ *************/
/**
* Called before search button is clicked.
* @returns {Promise} A promise that resolves with the modified search form.
*/
/****** e51793b8-956c-4eaf-98d6-36489bc9fc04 *******/
beforeSearchFn() {
console.log(this.searchForm)
return new Promise((resolve) => {
this.searchFormSearch = this.getParams()
resolve()
})
},
getParams() {
var params = deepClone(this.searchForm)
const { activeName } = this
// params.taskId = this.taskInfo.id
if (params.LeaveTime && params.LeaveTime.length) {
params.leaveStartTime = Util.dateFormate(
params.LeaveTime[0],
"YYYY-MM-DD HH:mm:ss"
)
params.leaveEndTime =
Util.dateFormate(params.LeaveTime[1], "YYYY-MM-DD") + " 23:59:59"
delete params.LeaveTime
}
if (params.EntryTime && params.EntryTime.length) {
params.entryStartTime = Util.dateFormate(
params.EntryTime[0],
"YYYY-MM-DD HH:mm:ss"
)
params.entryEndTime =
Util.dateFormate(params.EntryTime[1], "YYYY-MM-DD") + " 23:59:59"
delete params.EntryTime
}
return params
},
handleReset() {
console.log("handleReset")
this.searchForm = {}
// this.activeName = "all"
this.searchFormSearch = {}
this.$refs.exerciseTable.refreshTable(true, true)
},
// 导出
handleExport() {
console.log("导出", this.searchFormSearch, this.getParams())
var params = this.getParams()
params.method =
"dj.api.smartcarlife.ai.sparring.staff.behavior.list.export"
const list = [
...this.dowloadList,
{
name: "对练明细记录列",
exportParam: JSON.stringify(params),
status: "waiting",
timeid: new Date().getTime()
}
]
this.actionSetDownloadList({ list, type: "dowloadList" })
}
}
}
</script>
<style scoped lang="scss">
.m-t-40 {
margin-top: 40px;
}
.online-status {
display: flex;
justify-content: center;
align-items: center;
.dot {
display: inline-block;
width: 8px;
height: 8px;
border-radius: 50%;
margin-right: 8px;
}
.gray {
background-color: #c5c5c5;
}
.orange {
background-color: #fdb757;
}
.blue {
background-color: #2cca74;
}
}
</style>
<!-- ai对练 对练记录和任务列表 --> <!-- ai对练 对练记录和任务列表 -->
<template> <template>
<div class="in-exerciseTab-list-wrap"> <div class="in-exerciseTab-list-wrap">
<div class="header" slot="header" style="background: #e7eaec"> <div class="header" slot="header" style="background: #e7eaec">
<el-tabs v-model="activeName" @tab-click="handleClick"> <el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane <el-tab-pane
v-for="(item, index) in tabPaneList" v-for="(item, index) in tabPaneList"
:label="item.label" :label="item.label"
:name="item.name" :name="item.name"
:key="index" :key="index"
> >
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<components :is="tabName" :scene-type="activeName"></components> <components :is="tabName" :scene-type="activeName"></components>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import index from "./index.vue" import index from "./index.vue"
import exerciseRecord from "./exerciseRecord.vue" import exerciseRecord from "./exerciseRecord.vue"
export default { import exerciseDetail from "./exerciseDetail.vue"
name: "exerciseTab", export default {
components: { name: "exerciseTab",
exerciseRecord, components: {
exerciseTask: index exerciseRecord,
}, exerciseDetail,
data() { exerciseTask: index
return { },
activeName: "0", data() {
tabPaneList: [ return {
{ activeName: "0",
label: "对练记录", tabPaneList: [
name: "0" {
}, label: "对练记录",
{ name: "0"
label: "任务列表", },
name: "1" {
} label: "任务列表",
], name: "1"
// tabName: "exerciseTask" },
tabName: "exerciseRecord" {
} label: "对练明细",
}, name: "2"
mounted() { }
if (this.$route.query.tabPane) { ],
this.activeName = this.$route.query.tabPane // tabName: "exerciseTask"
this.tabName = this.$route.query.tabLabel tabName: "exerciseRecord"
} }
}, },
watch: {}, mounted() {
methods: { if (this.$route.query.tabPane) {
handleClick() { this.activeName = this.$route.query.tabPane
const arr = { this.tabName = this.$route.query.tabLabel
0: "exerciseRecord", }
1: "exerciseTask" },
} watch: {},
this.tabName = arr[+this.activeName] methods: {
this.$router.push({ handleClick() {
query: { const arr = {
...this.$route.query, 0: "exerciseRecord",
tabPane: this.activeName, 1: "exerciseTask",
tabLabel: this.tabName 2: "exerciseDetail"
} }
}) this.tabName = arr[+this.activeName]
// this.$route.query.tabPane = this.activeName this.$router.push({
// this.$route.query.tabLabel = this.tabName query: {
} ...this.$route.query,
} tabPane: this.activeName,
} tabLabel: this.tabName
</script> }
<style scoped lang="scss"> })
.in-exerciseTab-list-wrap { // this.$route.query.tabPane = this.activeName
padding: 0 24px; // this.$route.query.tabLabel = this.tabName
}
.header { }
::v-deep .el-tabs__header { }
margin: 0; </script>
padding: 0 20px; <style scoped lang="scss">
} .in-exerciseTab-list-wrap {
} padding: 0 24px;
}
</style> .header {
::v-deep .el-tabs__header {
margin: 0;
padding: 0 20px;
}
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!