Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-dml
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-dml
Commits
27c063ff
提交
27c063ff
authored
6月 26, 2024
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: update
上级
3b946eae
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
46 行增加
和
25 行删除
+46
-25
AppCard.vue
src/components/base/AppCard.vue
+7
-1
Index.vue
src/modules/home/views/Index.vue
+34
-21
Image.vue
src/modules/user/views/Image.vue
+5
-3
没有找到文件。
src/components/base/AppCard.vue
浏览文件 @
27c063ff
...
@@ -5,7 +5,6 @@ const styleHeight = computed(() => {
...
@@ -5,7 +5,6 @@ const styleHeight = computed(() => {
})
})
</
script
>
</
script
>
<
template
>
<
template
>
<div
class=
"app-card"
>
<div
class=
"app-card"
>
<div
class=
"app-card-hd"
>
<div
class=
"app-card-hd"
>
...
@@ -24,6 +23,8 @@ const styleHeight = computed(() => {
...
@@ -24,6 +23,8 @@ const styleHeight = computed(() => {
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
.app-card
{
.app-card
{
display
:
flex
;
flex-direction
:
column
;
min-height
:
v-bind
(
styleHeight
);
min-height
:
v-bind
(
styleHeight
);
background
:
#fff
;
background
:
#fff
;
box-shadow
:
0
1px
6px
0
rgb
(
228
232
235
/
20%
);
box-shadow
:
0
1px
6px
0
rgb
(
228
232
235
/
20%
);
...
@@ -49,4 +50,9 @@ const styleHeight = computed(() => {
...
@@ -49,4 +50,9 @@ const styleHeight = computed(() => {
font-size
:
14px
;
font-size
:
14px
;
}
}
}
}
.app-card-bd
{
flex
:
1
;
overflow-x
:
hidden
;
overflow-y
:
auto
;
}
</
style
>
</
style
>
src/modules/home/views/Index.vue
浏览文件 @
27c063ff
...
@@ -18,30 +18,37 @@ getExperimentData().then(res => {
...
@@ -18,30 +18,37 @@ getExperimentData().then(res => {
})
})
// 最近活跃客户
// 最近活跃客户
let
userList
=
$ref
<
{
name
:
string
;
id
:
string
;
isActive
:
boolean
;
gender
:
string
}[]
>
()
let
userList
=
$ref
<
{
name
:
string
;
id
:
string
;
isActive
:
boolean
;
gender
:
string
}[]
>
(
[]
)
getMembersList
().
then
(
res
=>
{
getMembersList
().
then
(
res
=>
{
userList
=
res
.
data
.
map
((
element
:
any
,
index
:
number
)
=>
{
userList
=
res
.
data
.
map
((
element
:
any
,
index
:
number
)
=>
{
element
.
isActive
=
index
===
0
element
.
isActive
=
index
===
0
return
element
return
element
})
})
if
(
userList
)
getEvent
(
userList
[
0
]?.
id
)
})
})
const
activeUser
=
computed
(()
=>
{
return
userList
.
find
(
item
=>
item
.
isActive
)
})
// 最近活跃客户的事件
// 最近活跃客户的事件
let
eventData
=
$ref
<
{
list
:
any
}
>
()
let
eventData
=
$ref
<
{
list
:
Array
<
any
>
;
total
:
number
}
>
({
list
:
[],
total
:
0
})
const
eventCurrentPage
=
ref
(
1
)
const
getEvent
=
function
(
id
:
string
)
{
const
getEvent
=
function
(
id
:
string
)
{
id
=
id
||
activeUser
.
value
?.
id
if
(
id
)
{
if
(
id
)
{
getEventList
({
member_id
:
id
}).
then
(
res
=>
{
getEventList
({
member_id
:
id
,
page
:
eventCurrentPage
.
value
,
'per-page'
:
10
}).
then
(
res
=>
{
eventData
=
res
.
data
eventData
=
res
.
data
})
})
}
}
}
}
watchEffect
(()
=>
{
getEvent
()
})
// 切换客户事件
// 切换客户事件
const
handleUser
=
(
item
:
any
)
=>
{
const
handleUser
=
(
item
:
any
)
=>
{
userList
?.
map
(
item
=>
(
item
.
isActive
=
false
&&
item
))
userList
?.
map
(
item
=>
(
item
.
isActive
=
false
&&
item
))
item
.
isActive
=
true
item
.
isActive
=
true
getEvent
(
item
.
id
)
eventCurrentPage
.
value
=
1
}
}
// 获取上下午
// 获取上下午
...
@@ -97,27 +104,33 @@ function handleViewEvent(item: any) {
...
@@ -97,27 +104,33 @@ function handleViewEvent(item: any) {
<AppCard
class=
"card"
title=
"最近活跃用户跟踪"
>
<AppCard
class=
"card"
title=
"最近活跃用户跟踪"
>
<div
class=
"content-user"
>
<div
class=
"content-user"
>
<div
:class=
"item.isActive ? 'content-user_item active' : 'content-user_item'"
v-for=
"item in userList"
:key=
"item.id"
@
click=
"handleUser(item)"
>
<div
:class=
"item.isActive ? 'content-user_item active' : 'content-user_item'"
v-for=
"item in userList"
:key=
"item.id"
@
click=
"handleUser(item)"
>
<img
:src=
"item.gender === '1' ? 'https://webapp-pub.ezijing.com/pages/assa/dml_boy.png' : 'https://webapp-pub.ezijing.com/pages/assa/dml_girl.png'"
/>
<img
:src=
"item.gender === '1' ? 'https://webapp-pub.ezijing.com/pages/assa/dml_boy.png' : 'https://webapp-pub.ezijing.com/pages/assa/dml_girl.png'"
/>
<div
class=
"name"
>
{{
item
.
name
}}
</div>
<div
class=
"name"
>
{{
item
.
name
}}
</div>
</div>
</div>
</div>
</div>
<el-empty
v-if=
"!eventData?.list || !eventData?.list.length"
description=
"暂无数据"
:image-size=
"80"
/>
<template
v-if=
"eventData.total"
>
<div
class=
"event-box"
v-for=
"item in eventData?.list"
:key=
"item.id"
v-else
>
<div
class=
"event-box"
v-for=
"item in eventData.list"
:key=
"item.id"
>
<div
class=
"date"
>
{{
item
.
updated_time
?.
slice
(
0
,
item
.
updated_time
.
indexOf
(
' '
))
}}
</div>
<div
class=
"date"
>
{{
item
.
updated_time
?.
slice
(
0
,
item
.
updated_time
.
indexOf
(
' '
))
}}
</div>
<div
class=
"event-content"
>
<div
class=
"event-content"
>
<div
class=
"time"
>
<div
class=
"time"
>
{{
item
.
updated_time
?.
slice
(
item
.
updated_time
.
indexOf
(
' '
),
item
.
updated_time
.
length
-
3
)
}}
{{
item
.
updated_time
?.
slice
(
item
.
updated_time
.
indexOf
(
' '
),
item
.
updated_time
.
length
-
3
)
}}
{{
getDate
(
item
.
updated_time
)
}}
{{
getDate
(
item
.
updated_time
)
}}
</div>
</div>
<!--
<Icon
:name=
"item.connection_type"
w=
"30"
h=
"30"
></Icon>
-->
<!--
<Icon
:name=
"item.connection_type"
w=
"30"
h=
"30"
></Icon>
-->
<div
class=
"event"
>
<div
class=
"event"
>
<Icon
class=
"icon"
:name=
"item.connection_type"
:multiColor=
"true"
w=
"24"
h=
"24"
></Icon>
<Icon
class=
"icon"
:name=
"item.connection_type"
:multiColor=
"true"
w=
"24"
h=
"24"
></Icon>
在
在
<span>
"
{{
item
.
connection_name
}}
"
</span>
上
<span>
"
{{
item
.
connection_name
}}
"
</span>
上
<span
style=
"cursor: pointer"
@
click=
"handleViewEvent(item)"
>
"
{{
item
.
event_name
}}
"
</span>
<span
style=
"cursor: pointer"
@
click=
"handleViewEvent(item)"
>
"
{{
item
.
event_name
}}
"
</span>
</div>
</div>
</div>
</div>
</div>
</div>
<div
style=
"display: flex; align-items: center; justify-content: center; margin-top: 20px"
>
<el-pagination
layout=
"prev, pager, next"
v-model:current-page=
"eventCurrentPage"
:total=
"eventData.total"
hide-on-single-page
/>
</div>
</
template
>
<el-empty
description=
"暂无数据"
:image-size=
"80"
v-else
/>
</AppCard>
</AppCard>
</div>
</div>
</div>
</div>
...
...
src/modules/user/views/Image.vue
浏览文件 @
27c063ff
...
@@ -185,9 +185,11 @@ watch(currentConnection, () => {
...
@@ -185,9 +185,11 @@ watch(currentConnection, () => {
</el-tabs>
</el-tabs>
</AppCard>
</AppCard>
<AppCard
class=
"card"
title=
"用户行为轨迹"
>
<AppCard
class=
"card"
title=
"用户行为轨迹"
>
<el-radio-group
v-model=
"currentConnection"
>
<div
style=
"text-align: center"
>
<el-radio-button
:value=
"item.id"
v-for=
"item in connectionList"
:key=
"item.id"
>
{{ item.type_name }}
</el-radio-button>
<el-radio-group
v-model=
"currentConnection"
>
</el-radio-group>
<el-radio-button
:value=
"item.id"
v-for=
"item in connectionList"
:key=
"item.id"
>
{{ item.type_name }}
</el-radio-button>
</el-radio-group>
</div>
<
template
v-if=
"event.list.length"
>
<
template
v-if=
"event.list.length"
>
<div
class=
"event-box"
v-for=
"(item, index) in event.list"
:key=
"index"
>
<div
class=
"event-box"
v-for=
"(item, index) in event.list"
:key=
"index"
>
<div
class=
"date"
>
{{
item
.
updated_time
?.
slice
(
0
,
item
.
updated_time
.
indexOf
(
' '
))
}}
</div>
<div
class=
"date"
>
{{
item
.
updated_time
?.
slice
(
0
,
item
.
updated_time
.
indexOf
(
' '
))
}}
</div>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论