Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-dml
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-dml
Commits
9eb6dcc7
提交
9eb6dcc7
authored
10月 31, 2023
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: update
上级
0adba430
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
39 行增加
和
34 行删除
+39
-34
LabelType.vue
src/modules/label/components/LabelType.vue
+20
-17
Index.vue
src/modules/label/views/Index.vue
+19
-17
没有找到文件。
src/modules/label/components/LabelType.vue
浏览文件 @
9eb6dcc7
...
@@ -5,6 +5,12 @@ import { ElMessageBox, ElMessage } from 'element-plus'
...
@@ -5,6 +5,12 @@ import { ElMessageBox, ElMessage } from 'element-plus'
import
{
deleteLabelType
}
from
'../api'
import
{
deleteLabelType
}
from
'../api'
import
{
useLabelType
}
from
'../composables/useLabelType'
import
{
useLabelType
}
from
'../composables/useLabelType'
defineProps
<
{
activeId
:
string
}
>
()
defineEmits
<
{
(
e
:
'select'
,
id
:
string
):
void
}
>
()
const
LabelTypeFormDialog
=
defineAsyncComponent
(()
=>
import
(
'../components/LabelTypeFormDialog.vue'
))
const
LabelTypeFormDialog
=
defineAsyncComponent
(()
=>
import
(
'../components/LabelTypeFormDialog.vue'
))
const
{
labelCount
,
typeList
,
fetchTypeList
}
=
useLabelType
()
const
{
labelCount
,
typeList
,
fetchTypeList
}
=
useLabelType
()
...
@@ -34,15 +40,13 @@ function handleRemove(row: LabelType) {
...
@@ -34,15 +40,13 @@ function handleRemove(row: LabelType) {
</
script
>
</
script
>
<
template
>
<
template
>
<el-button
type=
"primary"
style=
"width: 100%"
@
click=
"handleAdd"
v-permission=
"'experiment_tag_type_create'"
<el-button
type=
"primary"
style=
"width: 100%"
@
click=
"handleAdd"
v-permission=
"'experiment_tag_type_create'"
>
添加标签类型
</el-button>
>
添加标签类型
</el-button
<div
class=
"label-type-total"
@
click=
"$emit('select', '')"
>
>
<div
class=
"label-type-total"
>
<h4>
全部标签
</h4>
<h4>
全部标签
</h4>
<p>
{{
labelCount
}}
</p>
<p>
{{
labelCount
}}
</p>
</div>
</div>
<ul>
<ul>
<li
class=
"label-type-item"
v-for=
"item in typeList"
:key=
"item.id
"
>
<li
class=
"label-type-item"
:class=
"
{ 'is-active': item.id === activeId }" v-for="item in typeList" :key="item.id" @click="$emit('select', item.id)
">
<svg
<svg
xmlns=
"http://www.w3.org/2000/svg"
xmlns=
"http://www.w3.org/2000/svg"
:fill=
"item.url"
:fill=
"item.url"
...
@@ -56,21 +60,13 @@ function handleRemove(row: LabelType) {
...
@@ -56,21 +60,13 @@ function handleRemove(row: LabelType) {
</svg>
</svg>
<p>
{{
item
.
name
}}
</p>
<p>
{{
item
.
name
}}
</p>
<div
class=
"label-type-actions"
>
<div
class=
"label-type-actions"
>
<el-icon
class=
"label-type-item__edit"
@
click=
"handleUpdate(item)"
v-permission=
"'experiment_tag_type_update'"
<el-icon
class=
"label-type-item__edit"
@
click
.
stop=
"handleUpdate(item)"
v-permission=
"'experiment_tag_type_update'"
><Edit
/></el-icon>
><Edit
<el-icon
class=
"label-type-item__remove"
@
click
.
stop=
"handleRemove(item)"
v-permission=
"'experiment_tag_type_delete'"
><Delete
/></el-icon>
/></el-icon>
<el-icon
class=
"label-type-item__remove"
@
click=
"handleRemove(item)"
v-permission=
"'experiment_tag_type_delete'"
><Delete
/></el-icon>
</div>
</div>
</li>
</li>
</ul>
</ul>
<LabelTypeFormDialog
<LabelTypeFormDialog
v-model=
"formVisible"
:data=
"currentRow"
@
update=
"fetchTypeList"
v-if=
"formVisible"
></LabelTypeFormDialog>
v-model=
"formVisible"
:data=
"currentRow"
@
update=
"fetchTypeList"
v-if=
"formVisible"
></LabelTypeFormDialog>
</
template
>
</
template
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
...
@@ -80,6 +76,7 @@ function handleRemove(row: LabelType) {
...
@@ -80,6 +76,7 @@ function handleRemove(row: LabelType) {
align-items
:
center
;
align-items
:
center
;
justify-content
:
space-between
;
justify-content
:
space-between
;
font-size
:
12px
;
font-size
:
12px
;
cursor
:
pointer
;
}
}
.label-type-item
{
.label-type-item
{
display
:
flex
;
display
:
flex
;
...
@@ -91,9 +88,15 @@ function handleRemove(row: LabelType) {
...
@@ -91,9 +88,15 @@ function handleRemove(row: LabelType) {
p
{
p
{
padding
:
0
10px
;
padding
:
0
10px
;
flex
:
1
;
flex
:
1
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
cursor
:
pointer
;
}
}
&
.is-active
,
&
:hover
{
&
:hover
{
background
:
#efefef
;
color
:
var
(
--
main-color
);
background
:
#f8e8ec
;
.label-type-actions
{
.label-type-actions
{
display
:
flex
;
display
:
flex
;
}
}
...
...
src/modules/label/views/Index.vue
浏览文件 @
9eb6dcc7
...
@@ -26,8 +26,13 @@ const listOptions = computed(() => {
...
@@ -26,8 +26,13 @@ const listOptions = computed(() => {
httpRequest
:
getLabelList
,
httpRequest
:
getLabelList
,
params
:
listParams
,
params
:
listParams
,
beforeRequest
(
params
:
any
,
isReset
:
boolean
)
{
beforeRequest
(
params
:
any
,
isReset
:
boolean
)
{
if
(
isReset
)
listParams
.
updated_operator
=
''
if
(
isReset
)
{
params
.
updated_operator
=
listParams
.
updated_operator
listParams
.
updated_operator
=
''
listParams
.
type_id
=
''
}
else
{
params
.
updated_operator
=
listParams
.
updated_operator
params
.
type_id
=
listParams
.
type_id
}
return
params
return
params
}
}
},
},
...
@@ -109,17 +114,20 @@ function handleRule(row: Label) {
...
@@ -109,17 +114,20 @@ function handleRule(row: Label) {
currentRow
=
row
currentRow
=
row
ruleVisible
=
true
ruleVisible
=
true
}
}
function
handleSelect
(
id
:
string
)
{
listParams
.
type_id
=
id
appList
?.
refetch
()
}
</
script
>
</
script
>
<
template
>
<
template
>
<AppCard>
<AppCard>
<div
class=
"label-wrap"
>
<div
class=
"label-wrap"
>
<div
class=
"label-left"
><LabelType></LabelType></div>
<div
class=
"label-left"
><LabelType
:active-id=
"listParams.type_id"
@
select=
"handleSelect"
></LabelType></div>
<AppList
v-bind=
"listOptions"
ref=
"appList"
class=
"label-right"
>
<AppList
v-bind=
"listOptions"
ref=
"appList"
class=
"label-right"
>
<template
#
header-buttons
>
<template
#
header-buttons
>
<el-button
type=
"primary"
:icon=
"Plus"
@
click=
"handleAdd"
v-permission=
"'experiment_tag_create'"
<el-button
type=
"primary"
:icon=
"Plus"
@
click=
"handleAdd"
v-permission=
"'experiment_tag_create'"
>
新建
</el-button>
>
新建
</el-button
>
</
template
>
</
template
>
<
template
#
filter-user
>
<
template
#
filter-user
>
<SelectUser
v-model=
"listParams.updated_operator"
placeholder=
"更新人"
@
change=
"handleRefresh"
></SelectUser>
<SelectUser
v-model=
"listParams.updated_operator"
placeholder=
"更新人"
@
change=
"handleRefresh"
></SelectUser>
...
@@ -128,22 +136,14 @@ function handleRule(row: Label) {
...
@@ -128,22 +136,14 @@ function handleRule(row: Label) {
<
template
#
table-x=
"{ row }"
>
<
template
#
table-x=
"{ row }"
>
<el-button
type=
"primary"
plain
@
click=
"handleRule(row)"
>
规则
</el-button>
<el-button
type=
"primary"
plain
@
click=
"handleRule(row)"
>
规则
</el-button>
<el-button
type=
"primary"
plain
@
click=
"handleView(row)"
>
查看
</el-button>
<el-button
type=
"primary"
plain
@
click=
"handleView(row)"
>
查看
</el-button>
<el-button
type=
"primary"
plain
@
click=
"handleUpdate(row)"
v-permission=
"'experiment_tag_update'"
<el-button
type=
"primary"
plain
@
click=
"handleUpdate(row)"
v-permission=
"'experiment_tag_update'"
>
编辑
</el-button>
>
编辑
</el-button
<el-button
type=
"primary"
plain
@
click=
"handleRemove(row)"
v-permission=
"'experiment_tag_delete'"
>
删除
</el-button>
>
<el-button
type=
"primary"
plain
@
click=
"handleRemove(row)"
v-permission=
"'experiment_tag_delete'"
>
删除
</el-button
>
</
template
>
</
template
>
</AppList>
</AppList>
</div>
</div>
</AppCard>
</AppCard>
<!-- 新建/修改标签 -->
<!-- 新建/修改标签 -->
<LabelFormDialog
<LabelFormDialog
v-model=
"formVisible"
:data=
"currentRow"
@
update=
"handleRefresh"
v-if=
"formVisible"
></LabelFormDialog>
v-model=
"formVisible"
:data=
"currentRow"
@
update=
"handleRefresh"
v-if=
"formVisible"
></LabelFormDialog>
<!-- 查看标签 -->
<!-- 查看标签 -->
<LabelViewDialog
v-model=
"viewVisible"
:data=
"currentRow"
v-if=
"viewVisible && currentRow"
></LabelViewDialog>
<LabelViewDialog
v-model=
"viewVisible"
:data=
"currentRow"
v-if=
"viewVisible && currentRow"
></LabelViewDialog>
<!-- 规则 -->
<!-- 规则 -->
...
@@ -160,6 +160,8 @@ function handleRule(row: Label) {
...
@@ -160,6 +160,8 @@ function handleRule(row: Label) {
margin-right
:
20px
;
margin-right
:
20px
;
flex
:
0
0
200px
;
flex
:
0
0
200px
;
border-right
:
1px
solid
rgb
(
187
,
187
,
187
);
border-right
:
1px
solid
rgb
(
187
,
187
,
187
);
overflow-x
:
hidden
;
overflow-y
:
auto
;
}
}
.label-right
{
.label-right
{
flex
:
1
;
flex
:
1
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论