Commit 898fd031 by 李伟康

0804需求

1 parent 4f1c43b2
...@@ -77,4 +77,35 @@ export default { ...@@ -77,4 +77,35 @@ export default {
returnAll: true 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 \ No newline at end of file
...@@ -46,60 +46,58 @@ export default { ...@@ -46,60 +46,58 @@ export default {
searchForm: { searchForm: {
merchantName: '', merchantName: '',
merchantId: '', merchantId: '',
name: '' staffName: ''
}, },
searchFormData: [ searchFormData: [
{ {
label: '商户名', label: '商户名',
name: 'merchantName', name: 'merchantName',
type: 'input', type: 'input',
maxlength: 20 maxlength: 100
}, },
{ {
label: '商户号', label: '商户号',
name: 'merchantId', name: 'merchantId',
type: 'input', type: 'input',
maxlength: 20 maxlength: 8
}, },
{ {
label: '用户企微名', label: '用户企微名',
name: 'name', name: 'staffName',
type: 'input', type: 'input',
maxlength: 20 maxlength: 100
}, },
], ],
getListApi: this.$apis.chatLibrary.getChatLibraryList, getListApi: this.$apis.chatLibrary.getAILibraryList,
tableParams: { tableParams: {
listName: 'data', listName: 'data',
tableOption: true, tableOption: true,
tableColumns: [ tableColumns: [
{ {
label: '商户', label: '商户',
prop: 'scriptGroup', prop: 'merchantName',
}, },
{ {
label: '用户企微名', label: '用户企微名',
prop: 'scriptContent', prop: 'staffName',
width: 200 width: 200
}, },
{ {
label: '提问次数', label: '提问次数',
prop: 'state', prop: 'questionCount',
addHtml: 'state',
width: 100 width: 100
}, },
{ {
label: '有效提问', label: '有效提问',
prop: 'state', prop: 'questionEffectiveCount',
addHtml: 'state',
width: 100 width: 100
}, },
{ {
label: '最后提问时间', label: '最后提问时间',
prop: 'updatedTime', prop: 'lastQuestionTime',
width: 210, width: 210,
formatter: cellVal => { 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 { ...@@ -113,7 +111,7 @@ export default {
type: 'text', type: 'text',
}, },
listeners: { listeners: {
click: row => this.jumpDetail(row.id) click: row => this.jumpDetail(row.staffUuid)
} }
} }
], ],
......
...@@ -5,11 +5,11 @@ ...@@ -5,11 +5,11 @@
<div class="user-box flex"> <div class="user-box flex">
<div class="item flex"> <div class="item flex">
<div class="label">用户微信名:</div> <div class="label">用户微信名:</div>
冲冲冲 {{staffDetail.staffName}}
</div> </div>
<div class="item flex"> <div class="item flex">
<div class="label">登录商户:</div> <div class="label">登录商户:</div>
佛山市顺德区世界汽车贸易有限公司44202977 {{ staffDetail.merchantName }}{{ staffDetail.merchantId }}
</div> </div>
</div> </div>
<div class="title flex">提问记录</div> <div class="title flex">提问记录</div>
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<div class="date-box flex"> <div class="date-box flex">
<div class="label">日期搜索:</div> <div class="label">日期搜索:</div>
<el-date-picker <el-date-picker
v-model="searchForm.date" v-model="searchDate"
type="daterange" type="daterange"
unlink-panels unlink-panels
range-separator="至" range-separator="至"
...@@ -38,16 +38,16 @@ ...@@ -38,16 +38,16 @@
> >
<div <div
slot-scope="scope" slot-scope="scope"
slot="scriptContent" slot="content"
> >
<el-tooltip <el-tooltip
placement="bottom" placement="bottom"
:content="scope.scope.scriptContent" :content="scope.scope.content"
effect="light" effect="light"
> >
<div class="tooltip-content flex"> <div class="tooltip-content flex">
<div :class="['icon flex',true?'question':'answering']">{{ true?'问':'答'}}</div> <div :class="['icon flex',scope.scope.contentType == 0?'question':'answering']">{{ scope.scope.contentType == 0?'问':'答'}}</div>
<div class="text"> {{ scope.scope.scriptContent }}</div> <div class="text"> {{ scope.scope.content }}</div>
</div> </div>
</el-tooltip> </el-tooltip>
</div> </div>
...@@ -73,22 +73,26 @@ export default { ...@@ -73,22 +73,26 @@ export default {
url, url,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' }, pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
searchForm: { searchForm: {
date: '' beginDate: '',
endDate: '',
staffUuid: this.$route.query.id
}, },
getListApi: this.$apis.chatLibrary.getChatLibraryList, searchDate: '',
getListApi: this.$apis.chatLibrary.getStaffChatRecordPage,
tableParams: { tableParams: {
listName: 'data', listName: 'data',
tableColumns: [ tableColumns: [
{ {
label: '更新时间', label: '更新时间',
width: 210, width: 210,
formatter: cellVal => { prop:'chatTime'
return dayjs(cellVal.updatedTime).format('YYYY-MM-DD HH:mm') // formatter: cellVal => {
} // return dayjs(cellVal.chatTime).format('YYYY-MM-DD HH:mm')
// }
}, },
{ {
label: '用户问题及AI答复', label: '用户问题及AI答复',
addHtml: 'scriptContent', addHtml: 'content',
}, },
] ]
}, },
...@@ -96,14 +100,29 @@ export default { ...@@ -96,14 +100,29 @@ export default {
disabledDate (date) { disabledDate (date) {
return date > new Date() return date > new Date()
} }
},
staffDetail: {
staffName: '',
merchantName: '',
merchantId: ''
} }
} }
}, },
mounted () { mounted () {
this.getStaffChatRecordDetail()
}, },
methods: { methods: {
changeDate (e) { 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() 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!