Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
kefu_server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
759d2395
authored
Mar 29, 2020
by
chenxianqi
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
update
parent
ee4ea046
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
6 deletions
models/message_base.go
services/workorder_service.go
ui/kefu_admin/src/views/record/index.vue
ui/kefu_client/src/views/kefu.vue
ui/kefu_client/src/views/workorder.vue
ui/kefu_client/src/views/workorder_detail.vue
models/message_base.go
View file @
759d2395
...
...
@@ -17,6 +17,7 @@ package models
// 13 system 系统消息
// 14 search_knowledge 检索关键词知识库消息
// 15 key 消息key
// 16 workorder 工单提醒
type
Message
struct
{
ID
int64
`orm:"auto;pk;column(id)" json:"id"`
// 消息ID
FromAccount
int64
`orm:"type(bigint);column(from_account)" json:"from_account"`
// 发送人账号
...
...
services/workorder_service.go
View file @
759d2395
...
...
@@ -68,7 +68,7 @@ func (r *WorkOrderRepository) GetWorkOrderCountsWithType(tid int64) int64 {
// GetUserWorkOrders get user WorkOrders
func
(
r
*
WorkOrderRepository
)
GetUserWorkOrders
(
uid
int64
)
([]
models
.
WorkOrder
,
error
)
{
var
workOrders
[]
models
.
WorkOrder
_
,
err
:=
r
.
q
.
Filter
(
"uid"
,
uid
)
.
Filter
(
"delete"
,
0
)
.
OrderBy
(
"-id"
)
.
OrderBy
(
"status"
)
.
OrderBy
(
"-create_at"
)
.
All
(
&
workOrders
)
_
,
err
:=
r
.
q
.
Filter
(
"uid"
,
uid
)
.
OrderBy
(
"-id"
)
.
OrderBy
(
"status"
)
.
OrderBy
(
"-create_at"
)
.
All
(
&
workOrders
)
if
err
!=
nil
{
logs
.
Warn
(
"GetUserWorkOrders get user WorkOrders------------"
,
err
)
}
...
...
ui/kefu_admin/src/views/record/index.vue
View file @
759d2395
...
...
@@ -340,7 +340,8 @@ export default {
if
(
messages
.
length
<
this
.
getMessageRecordPageSize
){
this
.
isMessageEnd
=
true
}
response
.
data
.
data
.
list
=
messages
.
concat
(
this
.
messageRecord
.
list
)
response
.
data
.
data
.
list
=
messages
.
concat
(
this
.
messageRecord
.
list
)
this
.
messageRecord
=
response
.
data
.
data
setTimeout
(()
=>
this
.
$previewRefresh
(),
1000
)
})
...
...
ui/kefu_client/src/views/kefu.vue
View file @
759d2395
...
...
@@ -134,6 +134,16 @@
</div>
</
template
>
<!-- 工单提醒-->
<
template
v-if=
"item.biz_type == 'workorder'"
>
<div
class=
"text"
>
<div
class=
"content"
>
<span
v-html=
"item.payload"
></span>
<div
style=
"color: #28a1fe"
@
click=
"$router.push('/workorder/create')"
>
发起工单
</div>
</div>
</div>
</
template
>
<!-- 撤回消息 -->
<
template
v-if=
"item.biz_type == 'cancel'"
>
<div
class=
"system"
>
...
...
@@ -631,7 +641,10 @@ export default {
},
// 接收消息
receiveP2PMsg
(
message
)
{
console
.
log
(
message
);
// 是否显示工单提醒
if
(
this
.
configs
.
open_workorder
==
0
&&
message
.
biz_type
==
"workorder"
)
return
// 是否是转接客服消息
if
(
message
.
biz_type
==
"transfer"
)
{
this
.
$store
.
commit
(
"updateState"
,
{
...
...
ui/kefu_client/src/views/workorder.vue
View file @
759d2395
...
...
@@ -12,7 +12,7 @@
<div
class=
"list"
:class=
"
{'hide-header': !isShowHeader}">
<div
class=
"no-data"
v-if=
"workorders.length
<
=
0
"
>
<img
src=
"../assets/workorder.png"
alt=
""
>
<div>
您没有发布相关过工单
~
</div>
<div>
没有相关记录
~
</div>
</div>
<ul
v-else
>
<template
v-for=
"(item,index) in workorders"
>
...
...
ui/kefu_client/src/views/workorder_detail.vue
View file @
759d2395
...
...
@@ -7,9 +7,9 @@
<mt-button
@
click=
"close()"
v-if=
"workorder.status != 3"
slot=
"right"
>
<span>
关闭工单
</span>
</mt-button>
<mt-button
@
click=
"del()"
v-else
slot=
"right"
>
<
!--
<
mt-button
@
click=
"del()"
v-else
slot=
"right"
>
<span>
删除
</span>
</mt-button>
</mt-button>
-->
</mt-header>
<div
class=
"content"
:class=
"
{'hide-header': !isShowHeader}">
<div
class=
"head"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment