提交 53736237 作者: 毛细亚

新增跟进记录任务

上级 fafcdc25
......@@ -308,3 +308,11 @@ export function getRoleSendingCodeList(data) {
data,
});
}
// 跟进任务记录
export function corp_follow_up_task_index(data) {
return request({
url: returnApi('/corp_follow_up_task/index'),
method: 'post',
data
})
}
......@@ -8,6 +8,9 @@
<el-tab-pane label="AI 跟进记录" name="aiFollow">
<summaryList v-if="activeName === 'aiFollow'" />
</el-tab-pane>
<el-tab-pane label="跟进任务记录" name="aiFollowTask">
<followTask v-if="activeName === 'aiFollowTask'" />
</el-tab-pane>
</el-tabs>
</div>
</div>
......@@ -16,12 +19,14 @@
<script>
import aiArgenChat from './aiArgenChat.vue'
import summaryList from './summaryList.vue'
import followTask from './followTask.vue'
import { mapActions } from 'vuex'
export default {
name: 'quickSendGame',
components: {
aiArgenChat,
summaryList,
followTask,
},
data() {
return {
......
<template>
<div class="follow-task">
<!-- 消息列表 -->
<div v-infinite-scroll="requestDataList" v-loading="loading"
:infinite-scroll-disabled="!isloadMore" class="follow-task__scroll">
<div v-if="messageList.length > 0" class="follow-task__list">
<div v-for="(item, index) in messageList" :key="index" class="follow-task__item">
<div class="follow-task__date">{{ item.order_start_date }}</div>
<div class="follow-task__content">
<div v-if="item.summary" class="follow-task__detail">
<div class="follow-task__detail-text" v-html="item.summary"></div>
</div>
<div v-else class="follow-task__no-detail">
<span>暂无详情</span>
</div>
</div>
</div>
</div>
<noContent v-else-if="!loading && messageList.length == 0" />
</div>
</div>
</template>
<script>
import { mapState } from 'vuex'
import { corp_follow_up_task_index } from '@/api/works'
import { throttle } from '@/utils'
import noContent from '@/components/noContent.vue'
export default {
name: 'FollowTask',
props: {
chatUserDetails: {
typeof: Object,
default: () => { }
}
},
data() {
return {
loading: false,
isloadMore: true,
messageList: [],
pageInfo: {
page: 0,
page_size: 20
}
}
},
components: {
noContent
},
computed: {
...mapState('game', ['accountSelect', 'bindGameUserList']),
...mapState('user', ['corp_id']),
},
watch: {
accountSelect(newVal) {
if (newVal && newVal !== '' ) {
this.pageInfo = {
page: 0,
page_size: 20
}
this.isloadMore = true
this.messageList = []
this.requestDataList()
}
}
},
mounted() {
this.pageInfo = {
page: 0,
page_size: 20
}
this.isloadMore = true
this.messageList = []
this.loading = true
this.requestDataList()
},
methods: {
requestDataList: throttle(function () {
if (!this.isloadMore) {
return false
}
this.loading = true
this.pageInfo.page += 1
const bindGameUser = this.bindGameUserList.find(item => item.member_id == this.accountSelect)
const data = {
username: bindGameUser.username || '',
corp_id: this.corp_id,
status: 1,
...this.pageInfo
}
corp_follow_up_task_index(data).then(
(res) => {
this.loading = false
if (res.data.data && res.data.data.length < 20) {
this.isloadMore = false
}
this.messageList = this.messageList.concat(res.data.data)
if (res.data.page_info) {
this.pageInfo = res.data.page_info
}
},
(err) => {
this.loading = false
}
)
}, 500)
}
}
</script>
<style lang="scss" scoped>
.follow-task {
width: 100%;
height: 100%;
background: #fff;
&__scroll {
width: 100%;
height: 100%;
overflow: auto;
overflow-x: hidden;
padding: 16px;
}
&__empty {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
color: #999;
font-size: 14px;
.svg-icon {
font-size: 300px;
margin-bottom: 16px;
}
}
&__list {
display: flex;
flex-direction: column;
gap: 12px;
}
&__item {
display: flex;
flex-direction: column;
gap: 6px;
}
&__date {
font-size: 12px;
color: #c9cdd4;
font-weight: 400;
font-family: 'PingFang SC', sans-serif;
line-height: 1.6666666666666667em;
}
&__content {
background: #f7f8fa;
border-radius: 2px 6px 6px 6px;
padding: 8px 12px;
}
&__detail {
display: flex;
gap: 10px;
}
&__detail-text {
font-size: 14px;
color: #323335;
line-height: 1.5714285714285714em;
font-weight: 400;
font-family: 'PingFang SC', sans-serif;
word-break: break-word;
}
&__no-detail {
display: flex;
align-items: center;
justify-content: center;
padding: 20px;
color: #999;
font-size: 14px;
}
}
</style>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论