Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-dml
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-dml
Commits
21cb2626
提交
21cb2626
authored
2月 14, 2023
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: update
上级
d458c104
显示空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
60 行增加
和
21 行删除
+60
-21
api.ts
src/modules/group/api.ts
+5
-0
FormDialog.vue
src/modules/group/components/FormDialog.vue
+6
-2
ViewDialog.vue
src/modules/group/components/ViewDialog.vue
+18
-10
api.ts
src/modules/label/api.ts
+5
-0
LabelFormDialog.vue
src/modules/label/components/LabelFormDialog.vue
+6
-2
LabelViewDialog.vue
src/modules/label/components/LabelViewDialog.vue
+13
-7
dictionary.ts
src/utils/dictionary.ts
+7
-0
没有找到文件。
src/modules/group/api.ts
浏览文件 @
21cb2626
...
@@ -47,6 +47,11 @@ export function getGroupStatistics(params: { group_id: string }) {
...
@@ -47,6 +47,11 @@ export function getGroupStatistics(params: { group_id: string }) {
return
httpRequest
.
get
(
'/api/lab/v1/experiment/group/statistics-detail'
,
{
params
})
return
httpRequest
.
get
(
'/api/lab/v1/experiment/group/statistics-detail'
,
{
params
})
}
}
// 更新群组数据信息
export
function
updateGroupStatistics
(
data
:
{
id
:
string
})
{
return
httpRequest
.
post
(
'/api/lab/v1/experiment/group/statistics-user-group'
,
data
)
}
// 获取群组成员
// 获取群组成员
export
function
getGroupMembers
(
params
:
{
group_id
:
string
;
name
?:
string
;
id
?:
string
})
{
export
function
getGroupMembers
(
params
:
{
group_id
:
string
;
name
?:
string
;
id
?:
string
})
{
return
httpRequest
.
get
(
'/api/lab/v1/experiment/group/members'
,
{
params
})
return
httpRequest
.
get
(
'/api/lab/v1/experiment/group/members'
,
{
params
})
...
...
src/modules/group/components/FormDialog.vue
浏览文件 @
21cb2626
...
@@ -34,7 +34,7 @@ const form = reactive({
...
@@ -34,7 +34,7 @@ const form = reactive({
name
:
''
,
name
:
''
,
type
:
''
,
type
:
''
,
status
:
'1'
,
status
:
'1'
,
update_status
:
'
1
'
,
update_status
:
'
2
'
,
update_rule
:
{
type
:
1
,
info
:
1
},
update_rule
:
{
type
:
1
,
info
:
1
},
user_attr_rule
:
{
current_logic_operate
:
'and'
,
items
:
[]
},
user_attr_rule
:
{
current_logic_operate
:
'and'
,
items
:
[]
},
event_attr_rule
:
{
current_logic_operate
:
'and'
,
items
:
[]
},
event_attr_rule
:
{
current_logic_operate
:
'and'
,
items
:
[]
},
...
@@ -138,7 +138,11 @@ async function handleUpdate() {
...
@@ -138,7 +138,11 @@ async function handleUpdate() {
<template
v-if=
"data.type === '2'"
>
<template
v-if=
"data.type === '2'"
>
<el-form-item
label=
"更新频率"
prop=
"update_status"
>
<el-form-item
label=
"更新频率"
prop=
"update_status"
>
<el-radio-group
v-model=
"form.update_status"
>
<el-radio-group
v-model=
"form.update_status"
>
<el-radio
v-for=
"item in updateStatusRuleList"
:key=
"item.value"
:label=
"item.value"
>
<el-radio
v-for=
"item in updateStatusRuleList"
:key=
"item.value"
:label=
"item.value"
:disabled=
"item.value === '1'"
>
{{
item
.
label
}}
{{
item
.
label
}}
</el-radio>
</el-radio>
</el-radio-group>
</el-radio-group>
...
...
src/modules/group/components/ViewDialog.vue
浏览文件 @
21cb2626
...
@@ -3,9 +3,9 @@ import type { Group } from '../types'
...
@@ -3,9 +3,9 @@ import type { Group } from '../types'
import
{
UserFilled
,
Plus
,
Delete
}
from
'@element-plus/icons-vue'
import
{
UserFilled
,
Plus
,
Delete
}
from
'@element-plus/icons-vue'
import
{
ElMessageBox
,
ElMessage
}
from
'element-plus'
import
{
ElMessageBox
,
ElMessage
}
from
'element-plus'
import
AppList
from
'@/components/base/AppList.vue'
import
AppList
from
'@/components/base/AppList.vue'
import
{
getNameByValue
,
groupTypeList
,
updateStatusRuleList
}
from
'@/utils/dictionary'
import
{
getNameByValue
,
groupTypeList
,
updateStatusRuleList
,
updateStatusList
}
from
'@/utils/dictionary'
import
{
useMapStore
}
from
'@/stores/map'
import
{
useMapStore
}
from
'@/stores/map'
import
{
getGroupStatistics
,
getGroupMembers
,
clearGroupMembers
}
from
'../api'
import
{
getGroupStatistics
,
getGroupMembers
,
clearGroupMembers
,
updateGroupStatistics
}
from
'../api'
import
BindMembers
from
'./BindMembers.vue'
import
BindMembers
from
'./BindMembers.vue'
const
props
=
defineProps
<
{
const
props
=
defineProps
<
{
...
@@ -19,7 +19,7 @@ const emit = defineEmits<{
...
@@ -19,7 +19,7 @@ const emit = defineEmits<{
const
statusList
=
useMapStore
().
getMapValuesByKey
(
'system_status'
)
const
statusList
=
useMapStore
().
getMapValuesByKey
(
'system_status'
)
const
detail
=
reactive
({
count
:
0
,
status
:
1
,
updated_time
:
'-'
})
const
detail
=
reactive
({
count
:
0
,
status
:
'1'
,
updated_time
:
'-'
})
function
fetchInfo
()
{
function
fetchInfo
()
{
getGroupStatistics
({
group_id
:
props
.
data
.
id
}).
then
(
res
=>
{
getGroupStatistics
({
group_id
:
props
.
data
.
id
}).
then
(
res
=>
{
Object
.
assign
(
detail
,
res
.
data
.
detail
)
Object
.
assign
(
detail
,
res
.
data
.
detail
)
...
@@ -27,6 +27,14 @@ function fetchInfo() {
...
@@ -27,6 +27,14 @@ function fetchInfo() {
}
}
watchEffect
(()
=>
fetchInfo
())
watchEffect
(()
=>
fetchInfo
())
// 立即更新
function
handleUpdate
()
{
updateGroupStatistics
({
id
:
props
.
data
.
id
}).
then
(()
=>
{
ElMessage
({
type
:
'success'
,
message
:
'更新成功'
})
fetchInfo
()
})
}
// 清空群组成员
// 清空群组成员
function
handleClearMembers
()
{
function
handleClearMembers
()
{
ElMessageBox
.
confirm
(
'确定要删清空该群组成员吗?'
,
'提示'
).
then
(()
=>
{
ElMessageBox
.
confirm
(
'确定要删清空该群组成员吗?'
,
'提示'
).
then
(()
=>
{
...
@@ -36,6 +44,11 @@ function handleClearMembers() {
...
@@ -36,6 +44,11 @@ function handleClearMembers() {
})
})
})
})
}
}
// 添加群组成员
let
selectMembersVisible
=
$ref
(
false
)
function
handleAdd
()
{
selectMembersVisible
=
true
}
const
appList
=
$ref
<
InstanceType
<
typeof
AppList
>
|
null
>
(
null
)
const
appList
=
$ref
<
InstanceType
<
typeof
AppList
>
|
null
>
(
null
)
// 列表配置
// 列表配置
...
@@ -63,11 +76,6 @@ function handleRefresh() {
...
@@ -63,11 +76,6 @@ function handleRefresh() {
fetchInfo
()
fetchInfo
()
appList
?.
refetch
()
appList
?.
refetch
()
}
}
// 添加群组成员
let
selectMembersVisible
=
$ref
(
false
)
function
handleAdd
()
{
selectMembersVisible
=
true
}
</
script
>
</
script
>
<
template
>
<
template
>
...
@@ -120,8 +128,8 @@ function handleAdd() {
...
@@ -120,8 +128,8 @@ function handleAdd() {
<dl>
<dl>
<dt>
更新状态
</dt>
<dt>
更新状态
</dt>
<dd>
<dd>
<span
>
完成
</span>
<span
style=
"margin-right: 10px"
>
{{
getNameByValue
(
detail
.
status
,
updateStatusList
)
}}
</span>
<el-button
type=
"primary"
plain
size=
"small"
>
立即更新
</el-button>
<el-button
type=
"primary"
plain
@
click=
"handleUpdate"
size=
"small"
>
立即更新
</el-button>
</dd>
</dd>
</dl>
</dl>
</
template
>
</
template
>
...
...
src/modules/label/api.ts
浏览文件 @
21cb2626
...
@@ -53,6 +53,11 @@ export function getLabelStatistics(params: { id: string }) {
...
@@ -53,6 +53,11 @@ export function getLabelStatistics(params: { id: string }) {
return
httpRequest
.
get
(
'/api/lab/v1/experiment/tag/statistics'
,
{
params
})
return
httpRequest
.
get
(
'/api/lab/v1/experiment/tag/statistics'
,
{
params
})
}
}
// 更新标签数据信息
export
function
updateLabelStatistics
(
data
:
{
id
:
string
})
{
return
httpRequest
.
post
(
'/api/lab/v1/experiment/tag/statistics-user-tag'
,
data
)
}
// 获取标签规则
// 获取标签规则
export
function
getLabelRule
(
params
:
{
id
:
string
})
{
export
function
getLabelRule
(
params
:
{
id
:
string
})
{
return
httpRequest
.
get
(
'/api/lab/v1/experiment/tag/rule'
,
{
params
})
return
httpRequest
.
get
(
'/api/lab/v1/experiment/tag/rule'
,
{
params
})
...
...
src/modules/label/components/LabelFormDialog.vue
浏览文件 @
21cb2626
...
@@ -26,7 +26,7 @@ const form = reactive({
...
@@ -26,7 +26,7 @@ const form = reactive({
id
:
''
,
id
:
''
,
name
:
''
,
name
:
''
,
type_id
:
''
,
type_id
:
''
,
update_status
:
'
1
'
,
update_status
:
'
2
'
,
update_rule
:
{
type
:
1
,
info
:
1
},
update_rule
:
{
type
:
1
,
info
:
1
},
status
:
'1'
status
:
'1'
})
})
...
@@ -98,7 +98,11 @@ function handleUpdate() {
...
@@ -98,7 +98,11 @@ function handleUpdate() {
</el-form-item>
</el-form-item>
<el-form-item
label=
"更新频率"
prop=
"update_status"
>
<el-form-item
label=
"更新频率"
prop=
"update_status"
>
<el-radio-group
v-model=
"form.update_status"
>
<el-radio-group
v-model=
"form.update_status"
>
<el-radio
v-for=
"item in updateStatusRuleList"
:key=
"item.value"
:label=
"item.value"
>
<el-radio
v-for=
"item in updateStatusRuleList"
:key=
"item.value"
:label=
"item.value"
:disabled=
"item.value === '1'"
>
{{
item
.
label
}}
{{
item
.
label
}}
</el-radio>
</el-radio>
</el-radio-group>
</el-radio-group>
...
...
src/modules/label/components/LabelViewDialog.vue
浏览文件 @
21cb2626
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
import
type
{
Label
}
from
'../types'
import
type
{
Label
}
from
'../types'
import
{
UserFilled
}
from
'@element-plus/icons-vue'
import
{
UserFilled
}
from
'@element-plus/icons-vue'
import
{
useMapStore
}
from
'@/stores/map'
import
{
useMapStore
}
from
'@/stores/map'
import
{
getNameByValue
,
updateStatusRuleList
}
from
'@/utils/dictionary'
import
{
getNameByValue
,
updateStatusRuleList
,
updateStatusList
}
from
'@/utils/dictionary'
import
{
getLabelStatistics
}
from
'../api'
import
{
getLabelStatistics
,
updateLabelStatistics
}
from
'../api'
//
import { ElMessage } from 'element-plus'
import
{
ElMessage
}
from
'element-plus'
const
props
=
defineProps
<
{
const
props
=
defineProps
<
{
data
:
Label
data
:
Label
...
@@ -12,14 +12,20 @@ const props = defineProps<{
...
@@ -12,14 +12,20 @@ const props = defineProps<{
const
statusList
=
useMapStore
().
getMapValuesByKey
(
'system_status'
)
const
statusList
=
useMapStore
().
getMapValuesByKey
(
'system_status'
)
const
detail
=
reactive
({
count
:
0
,
status
:
1
,
updated_time
:
'-'
})
const
detail
=
reactive
({
count
:
0
,
status
:
'1'
,
updated_time
:
'-'
})
function
fetchInfo
()
{
function
fetchInfo
()
{
getLabelStatistics
({
id
:
props
.
data
.
id
}).
then
(
res
=>
{
getLabelStatistics
({
id
:
props
.
data
.
id
}).
then
(
res
=>
{
console
.
log
(
res
)
Object
.
assign
(
detail
,
res
.
data
.
detail
)
Object
.
assign
(
detail
,
res
.
data
.
detail
)
})
})
}
}
watchEffect
(()
=>
fetchInfo
())
watchEffect
(()
=>
fetchInfo
())
function
handleUpdate
()
{
updateLabelStatistics
({
id
:
props
.
data
.
id
}).
then
(()
=>
{
ElMessage
({
type
:
'success'
,
message
:
'更新成功'
})
fetchInfo
()
})
}
</
script
>
</
script
>
<
template
>
<
template
>
...
@@ -62,8 +68,8 @@ watchEffect(() => fetchInfo())
...
@@ -62,8 +68,8 @@ watchEffect(() => fetchInfo())
<dl>
<dl>
<dt>
更新状态
</dt>
<dt>
更新状态
</dt>
<dd>
<dd>
<span
>
完成
</span>
<span
style=
"margin-right: 10px"
>
{{
getNameByValue
(
detail
.
status
,
updateStatusList
)
}}
</span>
<el-button
type=
"primary"
plain
size=
"small"
>
立即更新
</el-button>
<el-button
type=
"primary"
plain
@
click=
"handleUpdate"
size=
"small"
>
立即更新
</el-button>
</dd>
</dd>
</dl>
</dl>
</div>
</div>
...
...
src/utils/dictionary.ts
浏览文件 @
21cb2626
...
@@ -25,6 +25,13 @@ export const updateStatusRuleList = [
...
@@ -25,6 +25,13 @@ export const updateStatusRuleList = [
{
label
:
'手动更新'
,
value
:
'2'
}
{
label
:
'手动更新'
,
value
:
'2'
}
]
]
// 更新状态
export
const
updateStatusList
=
[
{
label
:
'未开始'
,
value
:
'1'
},
{
label
:
'进行中'
,
value
:
'2'
},
{
label
:
'完成'
,
value
:
'3'
}
]
export
const
dateUnitList
=
[
export
const
dateUnitList
=
[
{
label
:
'天'
,
value
:
1
},
{
label
:
'天'
,
value
:
1
},
{
label
:
'周'
,
value
:
2
},
{
label
:
'周'
,
value
:
2
},
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论