Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
易企天创
zentaoatf
提交
14d844fd
Z
zentaoatf
项目概览
易企天创
/
zentaoatf
大约 1 年 前同步成功
通知
11
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
3
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Z
zentaoatf
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
3
Issue
3
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
14d844fd
编写于
6月 16, 2022
作者:
Z
zhaoke
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
* Update filer style.
上级
b35a44c3
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
43 addition
and
15 deletion
+43
-15
ui/src/components/Button.vue
ui/src/components/Button.vue
+14
-2
ui/src/views/script/WorkDirPanel.vue
ui/src/views/script/WorkDirPanel.vue
+29
-13
未找到文件。
ui/src/components/Button.vue
浏览文件 @
14d844fd
...
...
@@ -9,7 +9,7 @@
<slot>
<span
class=
"btn-label"
:class=
"labelClass"
v-if=
"label"
>
{{
label
}}
</span>
</slot>
<Icon
v-if=
"suffixIcon"
class=
"btn-suffix-icon"
:class=
"suffixIconClass ?? (isOnlyIcon ? '' : 'muted')"
:icon=
"suffixIcon"
:color=
"suffixIconColor"
:size=
"suffixIconSize"
/>
<Icon
v-if=
"suffixIcon"
class=
"btn-suffix-icon"
:class=
"suffixIconClass ?? (isOnlyIcon ? '' : 'muted')"
:icon=
"suffixIcon"
:color=
"suffixIconColor"
:size=
"suffixIconSize"
@
click.stop=
"_handleSuffixClick"
/>
</button>
</
template
>
...
...
@@ -42,7 +42,10 @@ const slots = useSlots();
const
isOnlyIcon
=
computed
(()
=>
(
!
props
.
label
&&
!
slots
.
default
&&
props
.
icon
&&
!
props
.
suffixIcon
));
const
emit
=
defineEmits
<
{(
type
:
'
click
'
,
event
:
{
originalEvent
:
Event
,
key
:
string
|
number
|
symbol
|
null
})
:
void
}
>
();
const
emit
=
defineEmits
<
{
(
type
:
'
click
'
,
event
:
{
originalEvent
:
Event
,
key
:
string
|
number
|
symbol
|
null
})
:
void
,
(
type
:
'
suffixClick
'
,
event
:
{
originalEvent
:
Event
,
key
:
string
|
number
|
symbol
|
null
})
:
void
,
}
>
();
const
attrs
=
useAttrs
();
function
_handleClick
(
originalEvent
)
{
...
...
@@ -53,6 +56,15 @@ function _handleClick(originalEvent) {
const
event
=
{
originalEvent
,
key
:
attrs
[
'
data-key
'
]
as
(
string
|
number
|
symbol
|
null
)};
emit
(
'
click
'
,
event
);
}
function
_handleSuffixClick
(
originalEvent
)
{
if
(
props
.
disabled
)
{
return
;
}
const
event
=
{
originalEvent
,
key
:
attrs
[
'
data-key
'
]
as
(
string
|
number
|
symbol
|
null
)};
emit
(
'
suffixClick
'
,
event
);
}
</
script
>
<
style
scoped
>
...
...
ui/src/views/script/WorkDirPanel.vue
浏览文件 @
14d844fd
...
...
@@ -33,7 +33,15 @@
triggerEvent=
"click"
>
</FilterModal>
<Button
id=
"filterBtn"
:label=
"filerLabel"
v-show=
"currSite.id != 1 && filerType != ''"
class=
"rounded pure"
icon=
"filter"
ref=
"filterBtnRef"
/>
<Button
id=
"filterBtn"
:label=
"filerLabel"
v-show=
"currSite.id != 1"
:class=
"filerLabel == '' ? 'rounded pure' : 'btn state rounded border primary-pale'"
icon=
"filter"
ref=
"filterBtnRef"
:suffixIcon=
"filerLabel == '' ? '' : 'close'"
@
suffixClick=
"clearFiler"
/>
<Button
class=
"rounded pure"
:hint=
"t('create_workspace')"
@
click=
"showModal=!showModal"
icon=
"folder-add"
/>
<Button
class=
"rounded pure"
:hint=
"t('batch_select')"
icon=
"select-all-on"
@
click=
"_handleBatchSelectBtnClick"
:active=
"workDirRef?.isCheckable"
/>
<Button
@
click=
"_handleToggleAllBtnClick"
class=
"rounded pure"
:hint=
"workDirRef?.isAllCollapsed ? t('collapse') : t('expand_all')"
:icon=
"workDirRef?.isAllCollapsed ? 'add-square-multiple' : 'subtract-square-multiple'"
iconSize=
"1.4em"
/>
...
...
@@ -82,10 +90,10 @@ const currProduct = computed<any>(() => store.state.Zentao.currProduct);
let
displayBy
=
ref
(
'
workspace
'
)
let
isExpand
=
ref
(
false
);
const
filerType
=
ref
(
''
)
const
filerType
=
ref
(
'
workspace
'
)
const
filerValue
=
ref
(
''
)
const
oldFilerType
=
ref
(
''
)
const
oldFilerValue
=
ref
(
''
)
const
oldFilerValue
=
ref
(
''
as
any
)
const
filerLabel
=
ref
(
''
);
const
displayTypes
=
ref
([
...
...
@@ -165,8 +173,9 @@ const getFilerValueLabel = () => {
const
loadFilterItems
=
async
(
useCache
=
true
)
=>
{
const
data
=
await
getScriptFilters
(
displayBy
.
value
,
currSite
.
value
.
id
,
currProduct
.
value
.
id
,
useCache
?
''
:
filerType
.
value
)
if
(
useCache
){
filerType
.
value
=
!
data
.
val
?
''
:
data
.
by
filerValue
.
value
=
data
.
val
oldFilerType
.
value
=
filerType
.
value
=
!
data
.
val
?
''
:
data
.
by
if
(
filerType
.
value
==
''
)
filerType
.
value
=
'
workspace
'
oldFilerValue
.
value
=
filerValue
.
value
=
data
.
val
}
if
(
!
currProduct
.
value
.
id
&&
(
filerType
.
value
!==
'
workspace
'
||
oldFilerType
.
value
!=
'
workspace
'
))
{
...
...
@@ -178,7 +187,7 @@ const loadFilterItems = async (useCache = true) => {
const
result
=
await
listFilterItems
(
filerType
.
value
)
if
(
filerType
.
value
===
'
workspace
'
){
result
.
data
=
result
.
data
==
undefined
?[
{
label
:
t
(
'
all
'
),
value
:
-
1
}]
:
[{
label
:
t
(
'
all
'
),
value
:
-
1
},
...
result
.
data
]
;
result
.
data
=
result
.
data
==
undefined
?[
]
:
result
.
data
;
}
filerItems
.
value
=
result
.
data
...
...
@@ -193,11 +202,7 @@ const loadFilterItems = async (useCache = true) => {
if
(
!
found
)
filerValue
.
value
=
''
}
if
(
oldFilerValue
.
value
==
''
){
oldFilerType
.
value
=
filerType
.
value
;
oldFilerValue
.
value
=
filerValue
.
value
;
}
if
(
oldFilerType
.
value
==
filerType
.
value
&&
te
(
'
by_
'
+
oldFilerType
.
value
)){
if
(
oldFilerType
.
value
==
filerType
.
value
&&
filerType
.
value
!=
''
&&
te
(
'
by_
'
+
oldFilerType
.
value
)){
filerLabel
.
value
=
t
(
'
by_
'
+
oldFilerType
.
value
)
+
'
:
'
+
getFilerValueLabel
();
}
}
...
...
@@ -226,7 +231,7 @@ const onFilterTypeChanged = async (item) => {
filerItems
.
value
=
[];
if
(
filerType
.
value
==
''
){
oldFilerType
.
value
=
''
;
oldFilerValue
.
value
=
-
1
;
oldFilerValue
.
value
=
''
;
await
setScriptFilters
(
displayBy
.
value
,
currSite
.
value
.
id
,
currProduct
.
value
.
id
,
filerType
.
value
,
filerValue
.
value
)
await
loadScripts
()
}
else
{
...
...
@@ -246,7 +251,7 @@ const onFilterValueChanged = async (item, key) => {
const
loadScripts
=
async
()
=>
{
console
.
log
(
`filerType:
${
filerType
.
value
}
, filerValue:
${
filerValue
.
value
}
`
)
const
params
=
{
displayBy
:
displayBy
.
value
,
filerType
:
filerType
.
value
,
filerValue
:
filerValue
.
value
==
-
1
?
0
:
filerValue
.
value
}
as
any
const
params
=
{
displayBy
:
displayBy
.
value
,
filerType
:
filerType
.
value
,
filerValue
:
filerValue
.
value
}
as
any
store
.
dispatch
(
'
Script/listScript
'
,
params
)
}
...
...
@@ -268,6 +273,17 @@ const createWorkSpace = (formData) => {
})
};
const
clearFiler
=
async
()
=>
{
console
.
log
(
'
clear filer
'
);
filerType
.
value
=
''
;
filerValue
.
value
=
''
;
oldFilerType
.
value
=
''
;
oldFilerValue
.
value
=
''
;
filerLabel
.
value
=
''
;
await
setScriptFilters
(
displayBy
.
value
,
currSite
.
value
.
id
,
currProduct
.
value
.
id
,
filerType
.
value
,
filerValue
.
value
)
await
loadScripts
()
}
function
_handleBatchSelectBtnClick
()
{
if
(
workDirRef
.
value
)
{
workDirRef
.
value
.
toggleCheckable
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录