Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-dml
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-dml
Commits
c1abf287
提交
c1abf287
authored
5月 15, 2024
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: 用户画像增加查看
上级
03793dd3
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
168 行增加
和
3 行删除
+168
-3
base.ts
src/api/base.ts
+10
-0
ViewGroup.vue
src/components/ViewGroup.vue
+63
-0
ViewLabel.vue
src/components/ViewLabel.vue
+63
-0
types.ts
src/modules/user/types.ts
+3
-0
Image.vue
src/modules/user/views/Image.vue
+29
-3
没有找到文件。
src/api/base.ts
浏览文件 @
c1abf287
...
@@ -120,3 +120,13 @@ export function searchEventAttrs(params?: {
...
@@ -120,3 +120,13 @@ export function searchEventAttrs(params?: {
export
function
getUserList
()
{
export
function
getUserList
()
{
return
httpRequest
.
get
(
'/api/lab/v1/experiment/analyse/users'
)
return
httpRequest
.
get
(
'/api/lab/v1/experiment/analyse/users'
)
}
}
// 获取群组成员
export
function
getGroupMembers
(
params
:
{
group_id
:
string
;
name
?:
string
;
id
?:
string
})
{
return
httpRequest
.
get
(
'/api/lab/v1/experiment/group/bda-members'
,
{
params
})
}
// 获取标签成员
export
function
getLabelMembers
(
params
:
{
tag_id
:
string
})
{
return
httpRequest
.
get
(
'/api/lab/v1/experiment/tag/bda-statistics-users'
,
{
params
})
}
src/components/ViewGroup.vue
0 → 100644
浏览文件 @
c1abf287
<
script
setup
>
import
AppList
from
'@/components/base/AppList.vue'
import
{
getNameByValue
}
from
'@/utils/dictionary'
import
{
useMapStore
}
from
'@/stores/map'
import
{
getGroupMembers
}
from
'@/api/base'
const
statusList
=
useMapStore
().
getMapValuesByKey
(
'system_status'
)
const
genderList
=
useMapStore
().
getMapValuesByKey
(
'system_gender'
)
const
connectionTypeList
=
useMapStore
().
getMapValuesByKey
(
'experiment_connection_type'
)
const
props
=
defineProps
([
'data'
])
// 列表配置
const
listOptions
=
computed
(()
=>
{
return
{
remote
:
{
httpRequest
:
getGroupMembers
,
params
:
{
group_id
:
props
.
data
.
id
}
},
columns
:
[
{
label
:
'序号'
,
type
:
'index'
,
width
:
60
},
{
label
:
'用户ID'
,
prop
:
'id'
},
{
label
:
'姓名'
,
prop
:
'name'
},
{
label
:
'性别'
,
prop
:
'gender'
,
computed
({
row
})
{
return
getNameByValue
(
row
.
gender
,
genderList
)
}
},
{
label
:
'手机号码'
,
prop
:
'mobile'
},
{
label
:
'来源连接'
,
prop
:
'experiment_connection_id'
,
computed
({
row
})
{
return
getNameByValue
(
row
.
connection
.
type
.
toString
(),
connectionTypeList
)
}
},
{
label
:
'状态'
,
prop
:
'status'
,
computed
({
row
})
{
return
getNameByValue
(
row
.
status
,
statusList
)
}
},
{
label
:
'更新人'
,
prop
:
'updated_operator.real_name'
},
{
label
:
'更新时间'
,
prop
:
'updated_time'
},
{
label
:
'操作'
,
slots
:
'table-x'
}
]
}
})
</
script
>
<
template
>
<el-dialog
title=
"标签用户"
width=
"1000px"
>
<AppList
v-bind=
"listOptions"
ref=
"appList"
>
<template
#
table-x=
"
{ row }">
<el-button
type=
"primary"
plain
>
<router-link
target=
"_blank"
:to=
"
{ path: '/user/image', query: { user_id: row.id, experiment_id: row.experiment_id } }">查看
</router-link>
</el-button>
</
template
>
</AppList>
</el-dialog>
</template>
src/components/ViewLabel.vue
0 → 100644
浏览文件 @
c1abf287
<
script
setup
>
import
AppList
from
'@/components/base/AppList.vue'
import
{
getNameByValue
}
from
'@/utils/dictionary'
import
{
useMapStore
}
from
'@/stores/map'
import
{
getLabelMembers
}
from
'@/api/base'
const
statusList
=
useMapStore
().
getMapValuesByKey
(
'system_status'
)
const
genderList
=
useMapStore
().
getMapValuesByKey
(
'system_gender'
)
const
connectionTypeList
=
useMapStore
().
getMapValuesByKey
(
'experiment_connection_type'
)
const
props
=
defineProps
([
'data'
])
// 列表配置
const
listOptions
=
computed
(()
=>
{
return
{
remote
:
{
httpRequest
:
getLabelMembers
,
params
:
{
tag_id
:
props
.
data
.
id
}
},
columns
:
[
{
label
:
'序号'
,
type
:
'index'
,
width
:
60
},
{
label
:
'用户ID'
,
prop
:
'id'
},
{
label
:
'姓名'
,
prop
:
'name'
},
{
label
:
'性别'
,
prop
:
'gender'
,
computed
({
row
})
{
return
getNameByValue
(
row
.
gender
,
genderList
)
}
},
{
label
:
'手机号码'
,
prop
:
'mobile'
},
{
label
:
'来源连接'
,
prop
:
'experiment_connection_id'
,
computed
({
row
})
{
return
getNameByValue
(
row
.
connection
.
type
.
toString
(),
connectionTypeList
)
}
},
{
label
:
'状态'
,
prop
:
'status'
,
computed
({
row
})
{
return
getNameByValue
(
row
.
status
,
statusList
)
}
},
{
label
:
'更新人'
,
prop
:
'updated_operator.real_name'
},
{
label
:
'更新时间'
,
prop
:
'updated_time'
},
{
label
:
'操作'
,
slots
:
'table-x'
}
]
}
})
</
script
>
<
template
>
<el-dialog
title=
"群组用户"
width=
"1000px"
>
<AppList
v-bind=
"listOptions"
ref=
"appList"
>
<template
#
table-x=
"
{ row }">
<el-button
type=
"primary"
plain
>
<router-link
target=
"_blank"
:to=
"
{ path: '/user/image', query: { user_id: row.id, experiment_id: row.experiment_id } }">查看
</router-link>
</el-button>
</
template
>
</AppList>
</el-dialog>
</template>
src/modules/user/types.ts
浏览文件 @
c1abf287
...
@@ -62,6 +62,9 @@ export interface ImageProp {
...
@@ -62,6 +62,9 @@ export interface ImageProp {
history_tags
:
string
[]
history_tags
:
string
[]
static_groups
:
string
[]
static_groups
:
string
[]
dynamic_groups
:
string
[]
dynamic_groups
:
string
[]
dynamic_group_list
:
any
[]
static_group_list
:
any
[]
tag_list
:
any
[]
events
:
{
events
:
{
list
:
{
list
:
{
updated_time
:
string
updated_time
:
string
...
...
src/modules/user/views/Image.vue
浏览文件 @
c1abf287
...
@@ -5,6 +5,8 @@ import type { MemberFieldsProp, ImageProp, ConnectionsProp } from '../types'
...
@@ -5,6 +5,8 @@ import type { MemberFieldsProp, ImageProp, ConnectionsProp } from '../types'
import
Icon
from
'@/components/ConnectionIcon.vue'
import
Icon
from
'@/components/ConnectionIcon.vue'
const
ViewEvent
=
defineAsyncComponent
(()
=>
import
(
'@/components/ViewEvent.vue'
))
const
ViewEvent
=
defineAsyncComponent
(()
=>
import
(
'@/components/ViewEvent.vue'
))
const
ViewLabel
=
defineAsyncComponent
(()
=>
import
(
'@/components/ViewLabel.vue'
))
const
ViewGroup
=
defineAsyncComponent
(()
=>
import
(
'@/components/ViewGroup.vue'
))
const
route
=
useRoute
()
const
route
=
useRoute
()
...
@@ -42,12 +44,28 @@ const getDate = function (date: string) {
...
@@ -42,12 +44,28 @@ const getDate = function (date: string) {
return
parseInt
(
date
.
slice
(
date
.
indexOf
(
' '
),
date
.
indexOf
(
' '
)
+
3
))
>
12
?
'下午'
:
'上午'
return
parseInt
(
date
.
slice
(
date
.
indexOf
(
' '
),
date
.
indexOf
(
' '
)
+
3
))
>
12
?
'下午'
:
'上午'
}
}
// 查看事件
const
viewEventVisible
=
ref
(
false
)
const
viewEventVisible
=
ref
(
false
)
const
currentViewEvent
=
ref
()
const
currentViewEvent
=
ref
()
function
handleViewEvent
(
item
:
any
)
{
function
handleViewEvent
(
item
:
any
)
{
viewEventVisible
.
value
=
true
viewEventVisible
.
value
=
true
currentViewEvent
.
value
=
item
currentViewEvent
.
value
=
item
}
}
// 查看标签
const
viewLabelVisible
=
ref
(
false
)
const
currentViewLabel
=
ref
()
function
handleViewLabel
(
item
:
any
)
{
viewLabelVisible
.
value
=
true
currentViewLabel
.
value
=
item
}
// 查看群组
const
viewGroupVisible
=
ref
(
false
)
const
currentViewGroup
=
ref
()
function
handleViewGroup
(
item
:
any
)
{
viewGroupVisible
.
value
=
true
currentViewGroup
.
value
=
item
}
// 获取链接
// 获取链接
const
connectionList
=
ref
<
ConnectionsProp
[]
>
([])
const
connectionList
=
ref
<
ConnectionsProp
[]
>
([])
...
@@ -130,7 +148,7 @@ watch(currentConnection, () => {
...
@@ -130,7 +148,7 @@ watch(currentConnection, () => {
<el-tabs
class=
"demo-tabs"
>
<el-tabs
class=
"demo-tabs"
>
<el-tab-pane
label=
"当前标签"
>
<el-tab-pane
label=
"当前标签"
>
<div
class=
"scroll"
v-if=
"data?.tags && data.tags.length"
>
<div
class=
"scroll"
v-if=
"data?.tags && data.tags.length"
>
<el-tag
class=
"ml-2"
type=
"success"
v-for=
"(item, index) in data.tag
s"
:key=
"index"
>
{{ item
}}
</el-tag>
<el-tag
class=
"ml-2"
type=
"success"
v-for=
"(item, index) in data.tag
_list"
:key=
"index"
@
click=
"handleViewLabel(item)"
>
{{ item.name
}}
</el-tag>
</div>
</div>
<el-empty
description=
"暂无数据"
:image-size=
"80"
v-else
/>
<el-empty
description=
"暂无数据"
:image-size=
"80"
v-else
/>
</el-tab-pane>
</el-tab-pane>
...
@@ -148,7 +166,9 @@ watch(currentConnection, () => {
...
@@ -148,7 +166,9 @@ watch(currentConnection, () => {
<el-tabs
class=
"demo-tabs"
>
<el-tabs
class=
"demo-tabs"
>
<el-tab-pane
label=
"静态群组"
>
<el-tab-pane
label=
"静态群组"
>
<div
class=
"scroll"
v-if=
"data?.static_groups && data.static_groups.length"
>
<div
class=
"scroll"
v-if=
"data?.static_groups && data.static_groups.length"
>
<el-tag
class=
"ml-2"
type=
"success"
v-for=
"(item, index) in data.static_groups"
:key=
"index"
>
{{ item }}
</el-tag>
<el-tag
class=
"ml-2"
type=
"success"
v-for=
"(item, index) in data.static_group_list"
:key=
"index"
@
click=
"handleViewGroup(item)"
>
{{
item.name
}}
</el-tag>
</div>
</div>
<el-empty
description=
"暂无数据"
:image-size=
"80"
v-else
/>
<el-empty
description=
"暂无数据"
:image-size=
"80"
v-else
/>
</el-tab-pane>
</el-tab-pane>
...
@@ -156,7 +176,9 @@ watch(currentConnection, () => {
...
@@ -156,7 +176,9 @@ watch(currentConnection, () => {
<el-tabs
class=
"demo-tabs"
>
<el-tabs
class=
"demo-tabs"
>
<el-tab-pane
label=
"动态群组"
>
<el-tab-pane
label=
"动态群组"
>
<div
class=
"scroll"
v-if=
"data?.dynamic_groups && data.dynamic_groups.length"
>
<div
class=
"scroll"
v-if=
"data?.dynamic_groups && data.dynamic_groups.length"
>
<el-tag
class=
"ml-2"
type=
"success"
v-for=
"(item, index) in data.dynamic_groups"
:key=
"index"
>
{{ item }}
</el-tag>
<el-tag
class=
"ml-2"
type=
"success"
v-for=
"(item, index) in data.dynamic_group_list"
:key=
"index"
@
click=
"handleViewGroup(item)"
>
{{
item.name
}}
</el-tag>
</div>
</div>
<el-empty
description=
"暂无数据"
:image-size=
"80"
v-else
/>
<el-empty
description=
"暂无数据"
:image-size=
"80"
v-else
/>
</el-tab-pane>
</el-tab-pane>
...
@@ -191,6 +213,10 @@ watch(currentConnection, () => {
...
@@ -191,6 +213,10 @@ watch(currentConnection, () => {
</div>
</div>
<!-- 事件详情 -->
<!-- 事件详情 -->
<ViewEvent
v-model=
"viewEventVisible"
:event=
"currentViewEvent"
:user=
"data"
v-if=
"viewEventVisible && currentViewEvent"
></ViewEvent>
<ViewEvent
v-model=
"viewEventVisible"
:event=
"currentViewEvent"
:user=
"data"
v-if=
"viewEventVisible && currentViewEvent"
></ViewEvent>
<!-- 查看标签 -->
<ViewLabel
v-model=
"viewLabelVisible"
:data=
"currentViewLabel"
v-if=
"viewLabelVisible && currentViewLabel"
></ViewLabel>
<!-- 查看群组 -->
<ViewGroup
v-model=
"viewGroupVisible"
:data=
"currentViewGroup"
v-if=
"viewGroupVisible && currentViewGroup"
></ViewGroup>
</template>
</template>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
.info-box
{
.info-box
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论