Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-dml
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-dml
Commits
7b6b17ff
提交
7b6b17ff
authored
5月 25, 2024
作者:
lhh
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update
上级
c819a654
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
35 行增加
和
7 行删除
+35
-7
LabelType.vue
src/modules/label/components/LabelType.vue
+35
-7
没有找到文件。
src/modules/label/components/LabelType.vue
浏览文件 @
7b6b17ff
...
@@ -4,6 +4,9 @@ import { Edit, Delete } from '@element-plus/icons-vue'
...
@@ -4,6 +4,9 @@ import { Edit, Delete } from '@element-plus/icons-vue'
import
{
ElMessageBox
,
ElMessage
}
from
'element-plus'
import
{
ElMessageBox
,
ElMessage
}
from
'element-plus'
import
{
deleteLabelType
}
from
'../api'
import
{
deleteLabelType
}
from
'../api'
import
{
useLabelType
}
from
'../composables/useLabelType'
import
{
useLabelType
}
from
'../composables/useLabelType'
import
{
useUserStore
}
from
'@/stores/user'
const
userStore
=
useUserStore
()
defineProps
<
{
activeId
:
string
}
>
()
defineProps
<
{
activeId
:
string
}
>
()
...
@@ -40,33 +43,58 @@ function handleRemove(row: LabelType) {
...
@@ -40,33 +43,58 @@ 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>
<el-button
type=
"primary"
style=
"width: 100%"
@
click=
"handleAdd"
v-if=
"!userStore.status.tag_status"
>
添加标签目录
</el-button
>
<div
class=
"label-type-total"
@
click=
"$emit('select', '')"
>
<div
class=
"label-type-total"
@
click=
"$emit('select', '')"
>
<h4>
全部标签
</h4>
<h4>
全部标签
</h4>
<p>
{{
labelCount
}}
</p>
<p>
{{
labelCount
}}
</p>
</div>
</div>
<ul>
<ul>
<li
class=
"label-type-item"
:class=
"
{ 'is-active': item.id === activeId }" v-for="item in typeList" :key="item.id" @click="$emit('select', 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"
width=
"16.67333984375"
width=
"16.67333984375"
height=
"16.669540405273438"
height=
"16.669540405273438"
viewBox=
"0 0 16.67333984375 16.669540405273438"
>
viewBox=
"0 0 16.67333984375 16.669540405273438"
>
<g>
<g>
<path
<path
d=
"M16.6733,8.79462Q16.6733,7.76343,15.9463,7.03212L15.9442,7.03002L9.20711,0.292893C9.01957,0.105357,8.76522,0,8.5,0L1,0C0.447715,0,0,0.447715,0,1L0,8.5C0,8.76541,0.10551,9.01993,0.293287,9.2075L7.02965,15.9364Q7.76207,16.6695,8.79838,16.6695Q9.83479,16.6695,10.5667,15.9367L15.9463,10.5571Q16.6733,9.82582,16.6733,8.79462ZM6.41683,5.37499C6.41683,5.95029,5.95045,6.41666,5.37516,6.41666C4.79987,6.41666,4.3335,5.95029,4.3335,5.37499C4.3335,4.7997,4.79987,4.33333,5.37516,4.33333C5.95045,4.33333,6.41683,4.7997,6.41683,5.37499Z"
/>
d=
"M16.6733,8.79462Q16.6733,7.76343,15.9463,7.03212L15.9442,7.03002L9.20711,0.292893C9.01957,0.105357,8.76522,0,8.5,0L1,0C0.447715,0,0,0.447715,0,1L0,8.5C0,8.76541,0.10551,9.01993,0.293287,9.2075L7.02965,15.9364Q7.76207,16.6695,8.79838,16.6695Q9.83479,16.6695,10.5667,15.9367L15.9463,10.5571Q16.6733,9.82582,16.6733,8.79462ZM6.41683,5.37499C6.41683,5.95029,5.95045,6.41666,5.37516,6.41666C4.79987,6.41666,4.3335,5.95029,4.3335,5.37499C4.3335,4.7997,4.79987,4.33333,5.37516,4.33333C5.95045,4.33333,6.41683,4.7997,6.41683,5.37499Z"
/>
</g>
</g>
</svg>
</svg>
<p>
{{
item
.
name
}}
</p>
<p>
{{
item
.
name
}}
</p>
<div
class=
"label-type-actions"
v-if=
"!item.is_default"
>
<div
class=
"label-type-actions"
v-if=
"!item.is_default"
>
<el-icon
class=
"label-type-item__edit"
@
click
.
stop=
"handleUpdate(item)"
v-permission=
"'experiment_tag_type_update'"
><Edit
/></el-icon>
<el-icon
<el-icon
class=
"label-type-item__remove"
@
click
.
stop=
"handleRemove(item)"
v-permission=
"'experiment_tag_type_delete'"
><Delete
/></el-icon>
class=
"label-type-item__edit"
@
click
.
stop=
"handleUpdate(item)"
v-permission=
"'experiment_tag_type_update'"
><Edit
/></el-icon>
<el-icon
class=
"label-type-item__remove"
@
click
.
stop=
"handleRemove(item)"
v-permission=
"'experiment_tag_type_delete'"
><Delete
/></el-icon>
</div>
</div>
</li>
</li>
</ul>
</ul>
<LabelTypeFormDialog
v-model=
"formVisible"
:data=
"currentRow"
@
update=
"fetchTypeList"
v-if=
"formVisible"
></LabelTypeFormDialog>
<LabelTypeFormDialog
v-model=
"formVisible"
:data=
"currentRow"
@
update=
"fetchTypeList"
v-if=
"formVisible"
></LabelTypeFormDialog>
</
template
>
</
template
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论