Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-dml
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-dml
Commits
00b05546
提交
00b05546
authored
11月 20, 2023
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 新增标签用户
上级
b04f45d2
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
54 行增加
和
2 行删除
+54
-2
api.ts
src/modules/label/api.ts
+5
-0
LabelViewDialog.vue
src/modules/label/components/LabelViewDialog.vue
+49
-2
没有找到文件。
src/modules/label/api.ts
浏览文件 @
00b05546
...
...
@@ -60,3 +60,8 @@ export function getLabelRule(params: { id: string }) {
export
function
updateLabelRule
(
data
:
{
id
:
string
;
rules
:
string
})
{
return
httpRequest
.
post
(
'/api/lab/v1/experiment/tag/bda-save-rules'
,
data
)
}
// 获取标签成员
export
function
getLabelMembers
(
params
:
{
tag_id
:
string
})
{
return
httpRequest
.
get
(
'/api/lab/v1/experiment/tag/bda-statistics-users'
,
{
params
})
}
src/modules/label/components/LabelViewDialog.vue
浏览文件 @
00b05546
...
...
@@ -3,14 +3,17 @@ import type { Label } from '../types'
import
{
UserFilled
}
from
'@element-plus/icons-vue'
import
{
useMapStore
}
from
'@/stores/map'
import
{
getNameByValue
,
updateStatusRuleList
,
updateStatusList
,
labelList
}
from
'@/utils/dictionary'
import
{
getLabelStatistics
,
updateLabelStatistics
}
from
'../api'
import
{
getLabelStatistics
,
updateLabelStatistics
,
getLabelMembers
}
from
'../api'
import
{
ElMessage
}
from
'element-plus'
import
AppList
from
'@/components/base/AppList.vue'
const
props
=
defineProps
<
{
data
:
Label
}
>
()
const
statusList
=
useMapStore
().
getMapValuesByKey
(
'system_status'
)
const
genderList
=
useMapStore
().
getMapValuesByKey
(
'system_gender'
)
const
connectionTypeList
=
useMapStore
().
getMapValuesByKey
(
'experiment_connection_type'
)
const
detail
=
reactive
({
count
:
0
,
status
:
'1'
,
updated_time
:
'-'
})
function
fetchInfo
()
{
...
...
@@ -26,10 +29,50 @@ function handleUpdate() {
fetchInfo
()
})
}
const
appList
=
ref
<
InstanceType
<
typeof
AppList
>
|
null
>
(
null
)
// 列表配置
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
}:
{
row
:
any
})
{
return
getNameByValue
(
row
.
gender
,
genderList
)
}
},
{
label
:
'手机号码'
,
prop
:
'mobile'
},
{
label
:
'来源连接'
,
prop
:
'experiment_connection_id'
,
computed
({
row
}:
{
row
:
any
})
{
return
getNameByValue
(
row
.
connection
.
type
.
toString
(),
connectionTypeList
)
}
},
{
label
:
'状态'
,
prop
:
'status'
,
computed
({
row
}:
{
row
:
any
})
{
return
getNameByValue
(
row
.
status
,
statusList
)
}
},
{
label
:
'更新人'
,
prop
:
'updated_operator.real_name'
},
{
label
:
'更新时间'
,
prop
:
'updated_time'
}
]
}
})
</
script
>
<
template
>
<el-dialog
title=
"查看标签信息"
width=
"
6
00px"
>
<el-dialog
title=
"查看标签信息"
width=
"
8
00px"
>
<el-form
label-suffix=
":"
label-width=
"82px"
>
<el-row>
<el-col
:span=
"12"
>
...
...
@@ -74,6 +117,10 @@ function handleUpdate() {
</dl>
</div>
</el-card>
<el-card
style=
"margin-top: 20px"
>
<template
#
header
>
标签用户
</
template
>
<AppList
v-bind=
"listOptions"
ref=
"appList"
></AppList>
</el-card>
<
template
#
footer
>
<el-row
justify=
"center"
>
<el-button
plain
auto-insert-space
@
click=
"$emit('update:modelValue', false)"
>
关闭
</el-button>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论