Commit 759d2395 by chenxianqi

update

parent ee4ea046
......@@ -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"` // 发送人账号
......
......@@ -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)
}
......
......@@ -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)
})
......
......@@ -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", {
......
......@@ -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">
......
......@@ -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">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment