Commit 898fd031 by 李伟康

0804需求

1 parent 4f1c43b2
......@@ -77,4 +77,35 @@ export default {
returnAll: true
})
},
/**
* AI话术库-分页列表
*/
getAILibraryList(params = {}){
params.method = 'marketing.api.scriptlibrary.ai.page'
return http({
url: 'rop-scrm-marketing/router',
data: params
})
},
/**
* AI话术库-查询聊天记录详情
*/
getStaffChatRecordDetail(params = {}){
params.method = 'marketing.api.scriptlibrary.ai.info'
return http({
url: 'rop-scrm-marketing/router',
data: params
})
},
/**
* AI话术库-分页查询聊天记录
*/
getStaffChatRecordPage(params = {}){
params.method = 'marketing.api.scriptlibrary.ai.recordPage'
return http({
url: 'rop-scrm-marketing/router',
data: params
})
},
}
\ No newline at end of file
......@@ -46,60 +46,58 @@ export default {
searchForm: {
merchantName: '',
merchantId: '',
name: ''
staffName: ''
},
searchFormData: [
{
label: '商户名',
name: 'merchantName',
type: 'input',
maxlength: 20
maxlength: 100
},
{
label: '商户号',
name: 'merchantId',
type: 'input',
maxlength: 20
maxlength: 8
},
{
label: '用户企微名',
name: 'name',
name: 'staffName',
type: 'input',
maxlength: 20
maxlength: 100
},
],
getListApi: this.$apis.chatLibrary.getChatLibraryList,
getListApi: this.$apis.chatLibrary.getAILibraryList,
tableParams: {
listName: 'data',
tableOption: true,
tableColumns: [
{
label: '商户',
prop: 'scriptGroup',
prop: 'merchantName',
},
{
label: '用户企微名',
prop: 'scriptContent',
prop: 'staffName',
width: 200
},
{
label: '提问次数',
prop: 'state',
addHtml: 'state',
prop: 'questionCount',
width: 100
},
{
label: '有效提问',
prop: 'state',
addHtml: 'state',
prop: 'questionEffectiveCount',
width: 100
},
{
label: '最后提问时间',
prop: 'updatedTime',
prop: 'lastQuestionTime',
width: 210,
formatter: cellVal => {
return dayjs(cellVal.updatedTime).format('YYYY-MM-DD HH:mm:ss')
return cellVal.lastQuestionTime ? dayjs(cellVal.lastQuestionTime).format('YYYY-MM-DD HH:mm:ss') : '--'
}
}
]
......@@ -113,7 +111,7 @@ export default {
type: 'text',
},
listeners: {
click: row => this.jumpDetail(row.id)
click: row => this.jumpDetail(row.staffUuid)
}
}
],
......
......@@ -5,11 +5,11 @@
<div class="user-box flex">
<div class="item flex">
<div class="label">用户微信名:</div>
冲冲冲
{{staffDetail.staffName}}
</div>
<div class="item flex">
<div class="label">登录商户:</div>
佛山市顺德区世界汽车贸易有限公司44202977
{{ staffDetail.merchantName }}{{ staffDetail.merchantId }}
</div>
</div>
<div class="title flex">提问记录</div>
......@@ -17,7 +17,7 @@
<div class="date-box flex">
<div class="label">日期搜索:</div>
<el-date-picker
v-model="searchForm.date"
v-model="searchDate"
type="daterange"
unlink-panels
range-separator="至"
......@@ -38,16 +38,16 @@
>
<div
slot-scope="scope"
slot="scriptContent"
slot="content"
>
<el-tooltip
placement="bottom"
:content="scope.scope.scriptContent"
:content="scope.scope.content"
effect="light"
>
<div class="tooltip-content flex">
<div :class="['icon flex',true?'question':'answering']">{{ true?'问':'答'}}</div>
<div class="text"> {{ scope.scope.scriptContent }}</div>
<div :class="['icon flex',scope.scope.contentType == 0?'question':'answering']">{{ scope.scope.contentType == 0?'问':'答'}}</div>
<div class="text"> {{ scope.scope.content }}</div>
</div>
</el-tooltip>
</div>
......@@ -73,22 +73,26 @@ export default {
url,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
searchForm: {
date: ''
beginDate: '',
endDate: '',
staffUuid: this.$route.query.id
},
getListApi: this.$apis.chatLibrary.getChatLibraryList,
searchDate: '',
getListApi: this.$apis.chatLibrary.getStaffChatRecordPage,
tableParams: {
listName: 'data',
tableColumns: [
{
label: '更新时间',
width: 210,
formatter: cellVal => {
return dayjs(cellVal.updatedTime).format('YYYY-MM-DD HH:mm')
}
prop:'chatTime'
// formatter: cellVal => {
// return dayjs(cellVal.chatTime).format('YYYY-MM-DD HH:mm')
// }
},
{
label: '用户问题及AI答复',
addHtml: 'scriptContent',
addHtml: 'content',
},
]
},
......@@ -96,14 +100,29 @@ export default {
disabledDate (date) {
return date > new Date()
}
},
staffDetail: {
staffName: '',
merchantName: '',
merchantId: ''
}
}
},
mounted () {
this.getStaffChatRecordDetail()
},
methods: {
changeDate (e) {
let [beginDate, endDate] = e
this.searchForm.beginDate = dayjs(beginDate).format('YYYY-MM-DD')
this.searchForm.endDate = dayjs(endDate).format('YYYY-MM-DD')
this.$refs.listRef.refreshTable()
},
async getStaffChatRecordDetail () {
const res = await this.$apis.chatLibrary.getStaffChatRecordDetail({
staffUuid: this.$route.query.id
})
this.staffDetail = res || {}
}
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!