提交 b92e7bf9 作者: 毛细亚

合并分支 'release' 到 'master'

Release

查看合并请求 !55
......@@ -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
})
}
......@@ -5,15 +5,11 @@ const copy = {
inserted: function(el, binding) {
// 创建复制图标元素
const copyIcon = document.createElement('iconpark-icon')
// const copyIcon = document.createElement('div')
// copyIcon.setAttribute('icon-class', 'copy')
copyIcon.name='icon-fuzhi'
copyIcon.style.cursor = 'pointer'
copyIcon.style.marginLeft = '8px'
copyIcon.style.fontSize = '16px'
copyIcon.title = '点击复制'
copyIcon.innerHTML='<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#a)"><mask id="b" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="14" height="14"><path d="M14 0H0v14h14z" fill="#fff"/></mask><g mask="url(#b)" stroke="#267ef0" stroke-width=".875" stroke-linecap="round" stroke-linejoin="round"><path d="M9.333 7.525v2.45c0 2.042-.816 2.858-2.858 2.858h-2.45c-2.042 0-2.858-.816-2.858-2.858v-2.45c0-2.042.816-2.858 2.858-2.858h2.45c2.042 0 2.858.816 2.858 2.858"/><path d="M12.833 4.025v2.45c0 2.042-.816 2.858-2.858 2.858h-.642V7.525c0-2.042-.816-2.858-2.858-2.858H4.667v-.642c0-2.042.816-2.858 2.858-2.858h2.45c2.042 0 2.858.816 2.858 2.858"/></g></g><defs><clipPath id="a"><path fill="#fff" d="M0 0h14v14H0z"/></clipPath></defs></svg>'
// 设置元素的position为relative,确保图标的absolute定位正确
if (getComputedStyle(el).position === 'static') {
......@@ -24,7 +20,7 @@ const copy = {
el.insertBefore(copyIcon, el.nextSibling)
// 复制功能实现
copyIcon.addEventListener('click', async function(e) {
const clickHandler = async function(e) {
// 阻止事件冒泡
e.stopPropagation()
try {
......@@ -65,7 +61,11 @@ const copy = {
console.error('复制失败:', error)
Vue.prototype.$message.error('复制失败,请手动复制')
}
})
}
copyIcon.addEventListener('click', clickHandler)
// 存储事件处理器引用,以便在unbind时正确移除
copyIcon.__clickHandler = clickHandler
// 存储图标引用,以便在组件卸载时清理
el.__copyIcon = copyIcon
......
......@@ -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.message_log_start_date} - ${item.message_log_end_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>
......@@ -192,7 +192,7 @@
type="text"
style="cursor: pointer;z-index:10;"
@click.stop="openMentorRecordDrawer(items)"
>{{ items.teach_num || '-' }}次</el-button>
>{{ items.teach_num || 0 }}次</el-button>
</div>
</div>
</div>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论