Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
company_app
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
毛细亚
company_app
Commits
b6ea9b5b
提交
b6ea9b5b
authored
8月 14, 2025
作者:
毛细亚
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化summaryList.vue代码格式及性能
上级
75b4e03e
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
140 行增加
和
144 行删除
+140
-144
summaryList.vue
src/views/components/aiChat/summaryList.vue
+140
-144
没有找到文件。
src/views/components/aiChat/summaryList.vue
浏览文件 @
b6ea9b5b
<
template
>
<div
class=
"summaryListContainer "
>
<div
v-scroll:50=
"requestDataList"
v-loading=
"loading"
class=
"messageDetailsScroll"
>
<div
v-if=
"messageList.length > 0"
>
<div
v-for=
"(item, index) in messageList"
:key=
"index"
class=
"messageListItem"
>
<div
class=
"itemTop"
>
{{
item
.
date
}}
</div>
<div
class=
"itemCenter"
>
{{
item
.
summary
}}
</div>
</div>
<div
class=
"summaryListContainer "
>
<div
v-scroll:50=
"requestDataList"
v-loading=
"loading"
class=
"messageDetailsScroll"
>
<div
v-if=
"messageList.length > 0"
>
<div
v-for=
"(item, index) in messageList"
:key=
"index"
class=
"messageListItem"
>
<div
class=
"itemTop"
>
{{
item
.
date
}}
</div>
<div
class=
"
no-content-main"
v-if=
"!loading && messageList.length == 0
"
>
<noContent
/>
<div
class=
"
itemCenter
"
>
{{
item
.
summary
}}
</div>
</div>
</div>
<div
class=
"no-content-main"
v-if=
"!loading && messageList.length == 0"
>
<noContent
/>
</div>
</div>
</
template
>
<
script
>
import
{
mapMutations
,
mapState
}
from
'vuex'
import
{
corp_follow_up_summary_index
}
from
'@/api/works'
import
{
throttle
}
from
'@/utils'
</div>
</
template
>
<
script
>
import
{
mapMutations
,
mapState
}
from
'vuex'
import
{
corp_follow_up_summary_index
}
from
'@/api/works'
import
{
throttle
}
from
'@/utils'
import
noContent
from
'@/components/noContent.vue'
export
default
{
components
:
{
noContent
},
props
:
{
chatUserDetails
:
{
typeof
:
Object
,
default
:
()
=>
{
}
}
},
data
()
{
return
{
loading
:
false
,
isloadMore
:
true
,
messageList
:
[],
pageInfo
:
{
page
:
0
,
page_size
:
20
,
total
:
0
}
}
},
computed
:
{
...
mapState
(
'game'
,
[
'accountSelect'
]),
...
mapState
(
'user'
,
[
'external_userid'
]),
},
mounted
()
{
this
.
pageInfo
=
{
export
default
{
components
:
{
noContent
},
props
:
{
chatUserDetails
:
{
typeof
:
Object
,
default
:
()
=>
{
}
}
},
data
()
{
return
{
loading
:
false
,
isloadMore
:
true
,
messageList
:
[],
pageInfo
:
{
page
:
0
,
page_size
:
20
,
total
:
0
}
this
.
isloadMore
=
true
this
.
messageList
=
[]
this
.
loading
=
true
this
.
requestDataList
()
},
methods
:
{
requestDataList
:
throttle
(
function
()
{
if
(
this
.
accountSelect
)
{
if
(
!
this
.
isloadMore
)
{
console
.
log
(
'没有更多数据了'
)
return
false
}
this
.
loading
=
true
this
.
pageInfo
.
page
+=
1
const
data
=
{
external_userid
:
this
.
external_userid
,
...
this
.
pageInfo
}
corp_follow_up_summary_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
}
)
}
else
{
this
.
isloadMore
=
false
this
.
loading
=
false
}
},
500
)
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.summaryListContainer
{
width
:
100%
;
height
:
100%
;
background
:
#fff
;
position
:
relative
;
overflow
:
hidden
;
.messageDetailsScroll{
width
:
100%
;
height
:
100%
;
overflow
:
auto
;
overflow-x
:
hidden
;
padding-bottom
:
50px
;
}
.messageListItem
{
width
:
100%
;
height
:
auto
;
margin-bottom
:
10px
;
.itemTop
{
font-family
:
PingFang
SC
,
PingFang
SC
;
font-weight
:
400
;
font-size
:
14px
;
color
:
#86909C
;
line-height
:
20px
;
text-align
:
left
;
font-style
:
normal
;
text-transform
:
none
;
margin-bottom
:
5px
;
},
computed
:
{
...
mapState
(
'game'
,
[
'accountSelect'
]),
...
mapState
(
'user'
,
[
'external_userid'
]),
},
mounted
()
{
this
.
pageInfo
=
{
page
:
0
,
page_size
:
20
,
total
:
0
}
this
.
isloadMore
=
true
this
.
messageList
=
[]
this
.
loading
=
true
this
.
requestDataList
()
},
methods
:
{
requestDataList
:
throttle
(
function
()
{
if
(
this
.
accountSelect
)
{
if
(
!
this
.
isloadMore
)
{
console
.
log
(
'没有更多数据了'
)
return
false
}
this
.
loading
=
true
this
.
pageInfo
.
page
+=
1
const
data
=
{
external_userid
:
this
.
external_userid
,
...
this
.
pageInfo
}
corp_follow_up_summary_index
(
data
).
then
(
(
res
)
=>
{
this
.
loading
=
false
if
(
res
.
data
.
data
&&
res
.
data
.
data
.
length
<
20
)
{
this
.
isloadMore
=
false
}
.itemCenter
{
width
:
100%
;
background
:
#F9FAFF
;
border-radius
:
4px
4px
4px
4px
;
padding
:
10px
;
font-family
:
PingFang
SC
,
PingFang
SC
;
font-weight
:
400
;
font-size
:
16px
;
color
:
#4E5969
;
text-align
:
left
;
font-style
:
normal
;
text-transform
:
none
;
//
换行
white-space
:
pre-wrap
;
word-break
:
break-all
this
.
messageList
=
this
.
messageList
.
concat
(
res
.
data
.
data
)
if
(
res
.
data
.
page_info
)
{
this
.
pageInfo
=
res
.
data
.
page_info
}
},
(
err
)
=>
{
this
.
loading
=
false
}
.no-content-main
{
width
:
320px
;
margin
:
0
auto
;
}
)
}
else
{
this
.
isloadMore
=
false
this
.
loading
=
false
}
},
500
)
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.summaryListContainer
{
width
:
100%
;
height
:
100%
;
background
:
#fff
;
position
:
relative
;
overflow
:
hidden
;
.messageDetailsScroll
{
width
:
100%
;
height
:
100%
;
overflow
:
auto
;
overflow-x
:
hidden
;
padding-bottom
:
50px
;
}
.messageListItem
{
width
:
100%
;
height
:
auto
;
margin-bottom
:
10px
;
.itemTop
{
font-family
:
PingFang
SC
,
PingFang
SC
;
font-weight
:
400
;
font-size
:
14px
;
color
:
#86909C
;
line-height
:
20px
;
text-align
:
left
;
font-style
:
normal
;
text-transform
:
none
;
margin-bottom
:
5px
;
}
.itemCenter
{
width
:
100%
;
background
:
#F9FAFF
;
border-radius
:
4px
4px
4px
4px
;
padding
:
10px
;
font-family
:
PingFang
SC
,
PingFang
SC
;
font-weight
:
400
;
font-size
:
16px
;
color
:
#4E5969
;
text-align
:
left
;
font-style
:
normal
;
text-transform
:
none
;
//
换行
white-space
:
pre-wrap
;
word-break
:
break-all
}
</
style
>
\ No newline at end of file
}
.no-content-main
{
width
:
320px
;
margin
:
0
auto
;
}
}
</
style
>
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论