Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-dml
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-dml
Commits
e2c242fe
提交
e2c242fe
authored
2月 13, 2023
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 可以根据更新人搜索
上级
22f299a5
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
72 行增加
和
5 行删除
+72
-5
base.ts
src/api/base.ts
+5
-0
SelectUser.vue
src/components/SelectUser.vue
+43
-0
Index.vue
src/modules/group/views/Index.vue
+12
-3
Index.vue
src/modules/label/views/Index.vue
+12
-2
没有找到文件。
src/api/base.ts
浏览文件 @
e2c242fe
...
@@ -57,3 +57,8 @@ export function getMetaEventList() {
...
@@ -57,3 +57,8 @@ export function getMetaEventList() {
export
function
getTagList
(
params
?:
{
check_role
?:
0
|
1
})
{
export
function
getTagList
(
params
?:
{
check_role
?:
0
|
1
})
{
return
httpRequest
.
get
(
'/api/lab/v1/experiment/tag/all'
,
{
params
})
return
httpRequest
.
get
(
'/api/lab/v1/experiment/tag/all'
,
{
params
})
}
}
// 搜索紫荆用户
export
function
searchUser
(
params
:
any
)
{
return
httpRequest
.
get
(
'/api/lab/v1/experiment/system/search-user'
,
{
params
})
}
src/components/SelectUser.vue
0 → 100644
浏览文件 @
e2c242fe
<
script
setup
lang=
"ts"
>
import
{
searchUser
}
from
'@/api/base'
interface
SearchUser
{
id
:
string
realname
:
string
nickname
:
string
username
:
string
mobile
:
string
email
:
string
}
let
loading
=
$ref
(
false
)
let
userList
=
$ref
<
SearchUser
[]
>
()
const
remoteMethod
=
(
q
:
string
)
=>
{
if
(
!
q
)
return
loading
=
true
searchUser
({
q
:
q
}).
then
(
res
=>
{
loading
=
false
userList
=
res
.
data
.
items
})
}
</
script
>
<
template
>
<el-select
remote
filterable
value-key=
"id"
:loading=
"loading"
:remote-method=
"remoteMethod"
style=
"width: 100%"
>
<el-option
v-for=
"item in userList"
:key=
"item.id"
:label=
"item.realname || item.nickname || item.username"
:value=
"item.id"
>
<span>
{{
item
.
realname
||
item
.
nickname
||
item
.
username
}}
</span>
<template
v-if=
"item.mobile"
>
<el-divider
direction=
"vertical"
/>
<span>
{{
item
.
mobile
}}
</span>
</
template
>
<
template
v-if=
"item.email"
>
<el-divider
direction=
"vertical"
/>
<span>
{{
item
.
email
}}
</span>
</
template
>
</el-option>
</el-select>
</template>
src/modules/group/views/Index.vue
浏览文件 @
e2c242fe
...
@@ -6,6 +6,7 @@ import { ElMessageBox, ElMessage } from 'element-plus'
...
@@ -6,6 +6,7 @@ import { ElMessageBox, ElMessage } from 'element-plus'
import
{
getNameByValue
,
groupTypeList
,
updateStatusRuleList
}
from
'@/utils/dictionary'
import
{
getNameByValue
,
groupTypeList
,
updateStatusRuleList
}
from
'@/utils/dictionary'
import
{
getGroupList
,
deleteGroup
}
from
'../api'
import
{
getGroupList
,
deleteGroup
}
from
'../api'
import
{
useMapStore
}
from
'@/stores/map'
import
{
useMapStore
}
from
'@/stores/map'
import
SelectUser
from
'@/components/SelectUser.vue'
const
FormDialog
=
defineAsyncComponent
(()
=>
import
(
'../components/FormDialog.vue'
))
const
FormDialog
=
defineAsyncComponent
(()
=>
import
(
'../components/FormDialog.vue'
))
const
ViewDialog
=
defineAsyncComponent
(()
=>
import
(
'../components/ViewDialog.vue'
))
const
ViewDialog
=
defineAsyncComponent
(()
=>
import
(
'../components/ViewDialog.vue'
))
...
@@ -14,17 +15,23 @@ const statusList = useMapStore().getMapValuesByKey('system_status')
...
@@ -14,17 +15,23 @@ const statusList = useMapStore().getMapValuesByKey('system_status')
const
appList
=
$ref
<
InstanceType
<
typeof
AppList
>
|
null
>
(
null
)
const
appList
=
$ref
<
InstanceType
<
typeof
AppList
>
|
null
>
(
null
)
// 列表配置
// 列表配置
const
listParams
=
reactive
({
name
:
''
,
id
:
''
,
status
:
''
,
updated_operator
:
''
})
const
listOptions
=
computed
(()
=>
{
const
listOptions
=
computed
(()
=>
{
return
{
return
{
remote
:
{
remote
:
{
httpRequest
:
getGroupList
,
httpRequest
:
getGroupList
,
params
:
{
name
:
''
,
id
:
''
,
status
:
''
,
updated_operator
:
''
}
params
:
listParams
,
beforeRequest
(
params
:
any
,
isReset
:
boolean
)
{
if
(
isReset
)
listParams
.
updated_operator
=
''
params
.
updated_operator
=
listParams
.
updated_operator
return
params
}
},
},
filters
:
[
filters
:
[
{
type
:
'input'
,
prop
:
'name'
,
placeholder
:
'请输入群组名称'
},
{
type
:
'input'
,
prop
:
'name'
,
placeholder
:
'请输入群组名称'
},
{
type
:
'input'
,
prop
:
'id'
,
placeholder
:
'请输入群组ID'
},
{
type
:
'input'
,
prop
:
'id'
,
placeholder
:
'请输入群组ID'
},
{
type
:
'select'
,
prop
:
'status'
,
placeholder
:
'请选择群组状态'
,
options
:
statusList
},
{
type
:
'select'
,
prop
:
'status'
,
placeholder
:
'请选择群组状态'
,
options
:
statusList
},
{
type
:
'input'
,
prop
:
'updated_operator'
,
placeholder
:
'更新人'
}
{
type
:
'input'
,
prop
:
'updated_operator'
,
placeholder
:
'更新人'
,
slots
:
'filter-user'
}
],
],
columns
:
[
columns
:
[
{
type
:
'selection'
},
{
type
:
'selection'
},
...
@@ -119,7 +126,9 @@ function handleView(row: Group) {
...
@@ -119,7 +126,9 @@ function handleView(row: Group) {
>
>
</el-space>
</el-space>
</template>
</template>
<
template
#
filter-user
>
<SelectUser
v-model=
"listParams.updated_operator"
placeholder=
"更新人"
@
change=
"handleRefresh"
></SelectUser>
</
template
>
<
template
#
table-status=
"{ row }: { row: Group }"
>
<
template
#
table-status=
"{ row }: { row: Group }"
>
<el-tag
:type=
"row.status === '1' ? 'success' : 'danger'"
>
<el-tag
:type=
"row.status === '1' ? 'success' : 'danger'"
>
{{
getNameByValue
(
row
.
status
,
statusList
)
}}
{{
getNameByValue
(
row
.
status
,
statusList
)
}}
...
...
src/modules/label/views/Index.vue
浏览文件 @
e2c242fe
...
@@ -8,6 +8,7 @@ import { getLabelList, deleteLabel } from '../api'
...
@@ -8,6 +8,7 @@ import { getLabelList, deleteLabel } from '../api'
import
{
useMapStore
}
from
'@/stores/map'
import
{
useMapStore
}
from
'@/stores/map'
import
{
getNameByValue
,
updateStatusRuleList
}
from
'@/utils/dictionary'
import
{
getNameByValue
,
updateStatusRuleList
}
from
'@/utils/dictionary'
import
{
useLabelType
}
from
'../composables/useLabelType'
import
{
useLabelType
}
from
'../composables/useLabelType'
import
SelectUser
from
'@/components/SelectUser.vue'
const
LabelFormDialog
=
defineAsyncComponent
(()
=>
import
(
'../components/LabelFormDialog.vue'
))
const
LabelFormDialog
=
defineAsyncComponent
(()
=>
import
(
'../components/LabelFormDialog.vue'
))
const
LabelViewDialog
=
defineAsyncComponent
(()
=>
import
(
'../components/LabelViewDialog.vue'
))
const
LabelViewDialog
=
defineAsyncComponent
(()
=>
import
(
'../components/LabelViewDialog.vue'
))
...
@@ -18,11 +19,17 @@ const { typeList } = useLabelType()
...
@@ -18,11 +19,17 @@ const { typeList } = useLabelType()
const
appList
=
$ref
<
InstanceType
<
typeof
AppList
>
|
null
>
(
null
)
const
appList
=
$ref
<
InstanceType
<
typeof
AppList
>
|
null
>
(
null
)
// 列表配置
// 列表配置
const
listParams
=
reactive
({
name
:
''
,
type_id
:
''
,
status
:
''
,
updated_operator
:
''
})
const
listOptions
=
computed
(()
=>
{
const
listOptions
=
computed
(()
=>
{
return
{
return
{
remote
:
{
remote
:
{
httpRequest
:
getLabelList
,
httpRequest
:
getLabelList
,
params
:
{
name
:
''
,
type_id
:
''
,
status
:
''
,
updated_operator
:
''
}
params
:
listParams
,
beforeRequest
(
params
:
any
,
isReset
:
boolean
)
{
if
(
isReset
)
listParams
.
updated_operator
=
''
params
.
updated_operator
=
listParams
.
updated_operator
return
params
}
},
},
filters
:
[
filters
:
[
{
type
:
'input'
,
prop
:
'name'
,
placeholder
:
'请输入标签名称'
},
{
type
:
'input'
,
prop
:
'name'
,
placeholder
:
'请输入标签名称'
},
...
@@ -35,7 +42,7 @@ const listOptions = computed(() => {
...
@@ -35,7 +42,7 @@ const listOptions = computed(() => {
valueKey
:
'id'
valueKey
:
'id'
},
},
{
type
:
'select'
,
prop
:
'status'
,
placeholder
:
'请选择标签状态'
,
options
:
statusList
},
{
type
:
'select'
,
prop
:
'status'
,
placeholder
:
'请选择标签状态'
,
options
:
statusList
},
{
type
:
'input'
,
prop
:
'updated_operator'
,
placeholder
:
'更新人'
}
{
type
:
'input'
,
prop
:
'updated_operator'
,
placeholder
:
'更新人'
,
slots
:
'filter-user'
}
],
],
columns
:
[
columns
:
[
{
label
:
'序号'
,
type
:
'index'
,
width
:
60
},
{
label
:
'序号'
,
type
:
'index'
,
width
:
60
},
...
@@ -107,6 +114,9 @@ function handleRule(row: Label) {
...
@@ -107,6 +114,9 @@ function handleRule(row: Label) {
<el-button
type=
"primary"
:icon=
"Plus"
@
click=
"handleAdd"
>
新建
</el-button>
<el-button
type=
"primary"
:icon=
"Plus"
@
click=
"handleAdd"
>
新建
</el-button>
</el-space>
</el-space>
</
template
>
</
template
>
<
template
#
filter-user
>
<SelectUser
v-model=
"listParams.updated_operator"
placeholder=
"更新人"
@
change=
"handleRefresh"
></SelectUser>
</
template
>
<
template
#
table-status=
"{ row }: { row: Label }"
>
<
template
#
table-status=
"{ row }: { row: Label }"
>
<el-tag
:type=
"row.status === '1' ? 'success' : 'danger'"
>
<el-tag
:type=
"row.status === '1' ? 'success' : 'danger'"
>
{{
getNameByValue
(
row
.
status
,
statusList
)
}}
{{
getNameByValue
(
row
.
status
,
statusList
)
}}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论