Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
9890d02e
提交
9890d02e
authored
7月 26, 2021
作者:
fit2cloud-chenyw
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 增加过滤组件下拉列表
上级
e74463a4
隐藏空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
401 行增加
和
8 行删除
+401
-8
index.vue
frontend/src/components/DeDrag/index.vue
+1
-1
DeOutWidget.vue
frontend/src/components/dataease/DeOutWidget.vue
+6
-1
DeSelectGrid.vue
frontend/src/components/widget/DeWidget/DeSelectGrid.vue
+199
-0
NumberRangeServiceImpl.js
...c/components/widget/serviceImpl/NumberRangeServiceImpl.js
+2
-2
NumberSelectGridServiceImpl.js
...ponents/widget/serviceImpl/NumberSelectGridServiceImpl.js
+81
-0
NumberSelectServiceImpl.js
.../components/widget/serviceImpl/NumberSelectServiceImpl.js
+2
-2
TextSelectGridServiceImpl.js
...omponents/widget/serviceImpl/TextSelectGridServiceImpl.js
+81
-0
en.js
frontend/src/lang/en.js
+8
-0
tw.js
frontend/src/lang/tw.js
+8
-0
zh.js
frontend/src/lang/zh.js
+8
-0
index.vue
frontend/src/views/panel/filter/index.vue
+4
-1
dataset.vue
frontend/src/views/system/task/dataset.vue
+1
-1
没有找到文件。
frontend/src/components/DeDrag/index.vue
浏览文件 @
9890d02e
...
@@ -1448,7 +1448,7 @@ export default {
...
@@ -1448,7 +1448,7 @@ export default {
},
},
// 记录当前样式
// 记录当前样式
recordCurStyle
()
{
recordCurStyle
()
{
debugger
//
debugger
const
style
=
{
const
style
=
{
...
this
.
defaultStyle
...
this
.
defaultStyle
}
}
...
...
frontend/src/components/dataease/DeOutWidget.vue
浏览文件 @
9890d02e
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
<div
ref=
"deContentContainer"
class=
"condition-content"
:class=
"element.options.attrs.title ? '' : 'condition-content-default'"
>
<div
ref=
"deContentContainer"
class=
"condition-content"
:class=
"element.options.attrs.title ? '' : 'condition-content-default'"
>
<div
class=
"condition-content-container"
>
<div
class=
"condition-content-container"
>
<div
class=
"first-element"
>
<div
class=
"first-element"
>
<div
class=
"first-element-contaner"
>
<div
:class=
"element.component === 'de-select-grid' ? 'first-element-grid-contaner': ''"
class=
"first-element-contaner"
>
<component
<component
:is=
"element.component"
:is=
"element.component"
v-if=
"element.type==='custom'"
v-if=
"element.type==='custom'"
...
@@ -151,6 +151,8 @@ export default {
...
@@ -151,6 +151,8 @@ export default {
}
}
.first-element-contaner
{
.first-element-contaner
{
width
:
calc
(
100%
-
10px
);
width
:
calc
(
100%
-
10px
);
background
:
#fff
;
border
:
1px
solid
#d7dae2
;
position
:absolute
;
position
:absolute
;
bottom
:
5px
;
bottom
:
5px
;
margin
:
0
4px
;
margin
:
0
4px
;
...
@@ -158,6 +160,9 @@ export default {
...
@@ -158,6 +160,9 @@ export default {
width
:
100%
;
width
:
100%
;
}
}
}
}
.first-element-grid-contaner
{
top
:
5px
;
}
.condition-main-line
{
.condition-main-line
{
height
:
40px
!
important
;
height
:
40px
!
important
;
}
}
...
...
frontend/src/components/widget/DeWidget/DeSelectGrid.vue
0 → 100644
浏览文件 @
9890d02e
<
template
>
<div
v-if=
"options!== null && options.attrs!==null"
class=
"de-select-grid-class"
>
<div
class=
"de-select-grid-search"
>
<el-input
v-model=
"keyWord"
:placeholder=
"$t('deinputsearch.placeholder')"
size=
"mini"
prefix-icon=
"el-icon-search"
clearable
/>
</div>
<div>
<el-tree
v-if=
"options!== null && options.attrs!==null"
ref=
"deSelectGrid"
:data=
"options.attrs.datas"
:props=
"defaultProp"
:indent=
"0"
:filter-node-method=
"filterNode"
class=
"de-filter-tree"
default-expand-all
>
<span
slot-scope=
"
{ node, data }" class="custom-tree-node-list father">
<span
style=
"display: flex;flex: 1;width: 0;"
>
<el-radio
v-if=
"!options.attrs.multiple"
v-model=
"options.value"
:label=
"data.id"
@
change=
"changeRadioBox"
><span>
{{
node
.
label
}}
</span></el-radio>
<el-checkbox
v-if=
"options.attrs.multiple"
v-model=
"data.checked"
:label=
"data.id"
@
change=
"changeCheckBox(data)"
><span>
{{
node
.
label
}}
</span></el-checkbox>
</span>
<span
v-if=
"!options.attrs.multiple && options.value && options.value === data.id"
class=
"child"
>
<span
style=
"margin-left: 12px;"
@
click
.
stop
>
<span
class=
"el-dropdown-link"
>
<el-button
icon=
"el-icon-circle-close"
type=
"text"
size=
"small"
@
click=
"cancelRadio(data)"
/>
</span>
</span>
</span>
</span>
</el-tree>
</div>
</div>
</
template
>
<
script
>
export
default
{
props
:
{
element
:
{
type
:
Object
,
default
:
null
},
inDraw
:
{
type
:
Boolean
,
default
:
true
},
inScreen
:
{
type
:
Boolean
,
required
:
false
,
default
:
true
}
},
data
()
{
return
{
options
:
null
,
// value: null,
checked
:
null
,
defaultProp
:
{
id
:
'id'
,
label
:
'text'
,
children
:
'children'
},
keyWord
:
null
}
},
computed
:
{
operator
()
{
return
this
.
options
.
attrs
.
multiple
?
'in'
:
'eq'
}
},
watch
:
{
'options.attrs.multiple'
:
function
(
value
)
{
const
datas
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
options
.
attrs
.
datas
))
this
.
options
.
attrs
.
datas
=
[]
this
.
options
.
attrs
.
datas
=
datas
const
sourceValue
=
this
.
options
.
value
const
sourceValid
=
!!
sourceValue
&&
Object
.
keys
(
sourceValue
).
length
>
0
if
(
value
)
{
!
sourceValid
&&
(
this
.
options
.
value
=
[])
sourceValid
&&
!
Array
.
isArray
(
sourceValue
)
&&
(
this
.
options
.
value
=
sourceValue
.
split
(
','
))
!
this
.
inDraw
&&
(
this
.
options
.
value
=
[])
this
.
setMutiBox
()
}
else
{
!
sourceValid
&&
(
this
.
options
.
value
=
null
)
sourceValid
&&
Array
.
isArray
(
sourceValue
)
&&
(
this
.
options
.
value
=
sourceValue
[
0
])
!
this
.
inDraw
&&
(
this
.
options
.
value
=
null
)
}
},
keyWord
(
val
)
{
this
.
$refs
.
deSelectGrid
.
filter
(
val
)
}
},
created
()
{
this
.
options
=
this
.
element
.
options
this
.
setMutiBox
()
this
.
setRadioBox
()
// this.setCondition()
},
mounted
()
{
// this.$nextTick(() => {
// this.options && this.options.value && this.changeValue(this.options.value)
// })
this
.
options
&&
this
.
options
.
value
&&
Object
.
keys
(
this
.
options
.
value
).
length
>
0
&&
this
.
initValue
(
this
.
options
.
value
)
},
methods
:
{
initValue
(
value
)
{
// this.options.value = [value]
this
.
setCondition
()
},
setMutiBox
()
{
if
(
this
.
options
&&
this
.
options
.
attrs
.
multiple
)
{
this
.
options
.
attrs
.
datas
.
forEach
(
data
=>
{
data
.
checked
=
(
this
.
options
.
value
&&
this
.
options
.
value
.
includes
(
data
.
id
))
})
}
},
setRadioBox
()
{
if
(
this
.
options
&&
!
this
.
options
.
attrs
.
multiple
)
{
if
(
Array
.
isArray
(
this
.
options
.
value
)
&&
this
.
options
.
value
.
length
>
0
)
{
// this.value = this.options.value.length[0]
}
}
},
setCondition
()
{
const
param
=
{
component
:
this
.
element
,
value
:
Array
.
isArray
(
this
.
options
.
value
)
?
this
.
options
.
value
:
[
this
.
options
.
value
],
operator
:
this
.
operator
}
this
.
inDraw
&&
this
.
$store
.
commit
(
'addViewFilter'
,
param
)
},
changeCheckBox
(
data
)
{
const
values
=
Array
.
isArray
(
this
.
options
.
value
)
?
this
.
options
.
value
:
this
.
options
.
value
?
[
this
.
options
.
value
]
:
[]
const
index
=
values
.
indexOf
(
data
.
id
)
if
(
index
<
0
&&
data
.
checked
)
{
values
.
push
(
data
.
id
)
}
if
(
index
>=
0
&&
!
data
.
checked
)
{
values
.
splice
(
index
,
1
)
}
this
.
options
.
value
=
values
this
.
setCondition
()
},
changeRadioBox
(
value
)
{
// this.options.value = []
// if (this.value) this.options.value = [this.value]
this
.
setCondition
()
},
cancelRadio
(
data
)
{
this
.
options
.
value
=
null
this
.
changeRadioBox
()
},
filterNode
(
value
,
data
)
{
if
(
!
value
)
return
true
return
data
[
this
.
defaultProp
.
label
].
indexOf
(
value
)
!==
-
1
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.custom-tree-node-list
{
flex
:
1
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
font-size
:
14px
;
padding
:
0
8px
;
}
.father
.child
{
display
:
none
;
}
.father
:hover
.child
{
display
:
inline
;
}
.de-filter-tree
{
>>>
span
.is-leaf
{
width
:
5px
!
important
;
padding
:
6px
0
!
important
;
}
}
.de-select-grid-search
{
>>>
input
{
border-radius
:
0px
;
}
}
</
style
>
frontend/src/components/widget/serviceImpl/NumberRangeServiceImpl.js
浏览文件 @
9890d02e
...
@@ -3,7 +3,7 @@ import { WidgetService } from '../service/WidgetService'
...
@@ -3,7 +3,7 @@ import { WidgetService } from '../service/WidgetService'
const
leftPanel
=
{
const
leftPanel
=
{
icon
:
'iconfont icon-zuoce-qujian'
,
icon
:
'iconfont icon-zuoce-qujian'
,
label
:
'denumberrange.label'
,
label
:
'denumberrange.label'
,
defaultClass
:
't
ext
-filter'
defaultClass
:
't
ree
-filter'
}
}
const
dialogPanel
=
{
const
dialogPanel
=
{
...
@@ -15,7 +15,7 @@ const dialogPanel = {
...
@@ -15,7 +15,7 @@ const dialogPanel = {
},
},
value
:
''
value
:
''
},
},
defaultClass
:
't
ext
-filter'
,
defaultClass
:
't
ree
-filter'
,
component
:
'de-number-range'
component
:
'de-number-range'
}
}
const
drawPanel
=
{
const
drawPanel
=
{
...
...
frontend/src/components/widget/serviceImpl/NumberSelectGridServiceImpl.js
0 → 100644
浏览文件 @
9890d02e
import
{
WidgetService
}
from
'../service/WidgetService'
const
leftPanel
=
{
icon
:
'iconfont icon-xialakuang'
,
label
:
'denumbergridselect.label'
,
defaultClass
:
'tree-filter'
}
const
dialogPanel
=
{
options
:
{
attrs
:
{
multiple
:
false
,
placeholder
:
'denumbergridselect.placeholder'
,
viewIds
:
[],
datas
:
[],
key
:
'id'
,
label
:
'text'
,
value
:
'id'
},
value
:
''
},
defaultClass
:
'tree-filter'
,
component
:
'de-select-grid'
}
const
drawPanel
=
{
type
:
'custom'
,
style
:
{
width
:
300
,
height
:
300
,
fontSize
:
14
,
fontWeight
:
500
,
lineHeight
:
''
,
letterSpacing
:
0
,
textAlign
:
''
,
color
:
''
},
component
:
'de-select-grid'
}
class
NumberSelectGridServiceImpl
extends
WidgetService
{
constructor
(
options
=
{})
{
Object
.
assign
(
options
,
{
name
:
'numberSelectGridWidget'
})
super
(
options
)
this
.
filterDialog
=
true
this
.
showSwitch
=
true
}
initLeftPanel
()
{
const
value
=
JSON
.
parse
(
JSON
.
stringify
(
leftPanel
))
return
value
}
initFilterDialog
()
{
const
value
=
JSON
.
parse
(
JSON
.
stringify
(
dialogPanel
))
return
value
}
initDrawPanel
()
{
const
value
=
JSON
.
parse
(
JSON
.
stringify
(
drawPanel
))
return
value
}
filterFieldMethod
(
fields
)
{
return
fields
.
filter
(
field
=>
{
return
field
[
'deType'
]
===
2
})
}
optionDatas
(
datas
)
{
if
(
!
datas
)
return
null
return
datas
.
filter
(
item
=>
!!
item
).
map
(
item
=>
{
return
{
id
:
item
,
text
:
item
}
})
}
}
const
numberSelectGridServiceImpl
=
new
NumberSelectGridServiceImpl
()
export
default
numberSelectGridServiceImpl
frontend/src/components/widget/serviceImpl/NumberSelectServiceImpl.js
浏览文件 @
9890d02e
...
@@ -4,7 +4,7 @@ import { WidgetService } from '../service/WidgetService'
...
@@ -4,7 +4,7 @@ import { WidgetService } from '../service/WidgetService'
const
leftPanel
=
{
const
leftPanel
=
{
icon
:
'iconfont icon-xialakuang'
,
icon
:
'iconfont icon-xialakuang'
,
label
:
'denumberselect.label'
,
label
:
'denumberselect.label'
,
defaultClass
:
't
ext
-filter'
defaultClass
:
't
ree
-filter'
}
}
const
dialogPanel
=
{
const
dialogPanel
=
{
...
@@ -19,7 +19,7 @@ const dialogPanel = {
...
@@ -19,7 +19,7 @@ const dialogPanel = {
},
},
value
:
''
value
:
''
},
},
defaultClass
:
't
ext
-filter'
,
defaultClass
:
't
ree
-filter'
,
component
:
'de-select'
component
:
'de-select'
}
}
const
drawPanel
=
{
const
drawPanel
=
{
...
...
frontend/src/components/widget/serviceImpl/TextSelectGridServiceImpl.js
0 → 100644
浏览文件 @
9890d02e
import
{
WidgetService
}
from
'../service/WidgetService'
const
leftPanel
=
{
icon
:
'iconfont icon-xialakuang'
,
label
:
'detextgridselect.label'
,
defaultClass
:
'text-filter'
}
const
dialogPanel
=
{
options
:
{
attrs
:
{
multiple
:
false
,
placeholder
:
'detextgridselect.placeholder'
,
viewIds
:
[],
datas
:
[],
key
:
'id'
,
label
:
'text'
,
value
:
'id'
},
value
:
''
},
defaultClass
:
'text-filter'
,
component
:
'de-select-grid'
}
const
drawPanel
=
{
type
:
'custom'
,
style
:
{
width
:
300
,
height
:
300
,
fontSize
:
14
,
fontWeight
:
500
,
lineHeight
:
''
,
letterSpacing
:
0
,
textAlign
:
''
,
color
:
''
},
component
:
'de-select-grid'
}
class
TextSelectGridServiceImpl
extends
WidgetService
{
constructor
(
options
=
{})
{
Object
.
assign
(
options
,
{
name
:
'textSelectGridWidget'
})
super
(
options
)
this
.
filterDialog
=
true
this
.
showSwitch
=
true
}
initLeftPanel
()
{
const
value
=
JSON
.
parse
(
JSON
.
stringify
(
leftPanel
))
return
value
}
initFilterDialog
()
{
const
value
=
JSON
.
parse
(
JSON
.
stringify
(
dialogPanel
))
return
value
}
initDrawPanel
()
{
const
value
=
JSON
.
parse
(
JSON
.
stringify
(
drawPanel
))
return
value
}
filterFieldMethod
(
fields
)
{
return
fields
.
filter
(
field
=>
{
return
field
[
'deType'
]
===
0
})
}
optionDatas
(
datas
)
{
if
(
!
datas
)
return
null
return
datas
.
filter
(
item
=>
!!
item
).
map
(
item
=>
{
return
{
id
:
item
,
text
:
item
}
})
}
}
const
textSelectGridServiceImpl
=
new
TextSelectGridServiceImpl
()
export
default
textSelectGridServiceImpl
frontend/src/lang/en.js
浏览文件 @
9890d02e
...
@@ -1313,6 +1313,14 @@ export default {
...
@@ -1313,6 +1313,14 @@ export default {
label
:
'Text selector'
,
label
:
'Text selector'
,
placeholder
:
'Please select'
placeholder
:
'Please select'
},
},
detextgridselect
:
{
label
:
'Text list'
,
placeholder
:
'Please select'
},
denumbergridselect
:
{
label
:
'Number list'
,
placeholder
:
'Please select'
},
dedaterange
:
{
dedaterange
:
{
label
:
'Date range'
,
label
:
'Date range'
,
to_placeholder
:
'End date'
,
to_placeholder
:
'End date'
,
...
...
frontend/src/lang/tw.js
浏览文件 @
9890d02e
...
@@ -1313,6 +1313,14 @@ export default {
...
@@ -1313,6 +1313,14 @@ export default {
label
:
'文本下拉'
,
label
:
'文本下拉'
,
placeholder
:
'請選擇'
placeholder
:
'請選擇'
},
},
detextgridselect
:
{
label
:
'文本列表'
,
placeholder
:
'請選擇'
},
denumbergridselect
:
{
label
:
'數字列表'
,
placeholder
:
'請選擇'
},
dedaterange
:
{
dedaterange
:
{
label
:
'日期範圍'
,
label
:
'日期範圍'
,
to_placeholder
:
'結束日期'
,
to_placeholder
:
'結束日期'
,
...
...
frontend/src/lang/zh.js
浏览文件 @
9890d02e
...
@@ -1315,6 +1315,14 @@ export default {
...
@@ -1315,6 +1315,14 @@ export default {
label
:
'文本下拉'
,
label
:
'文本下拉'
,
placeholder
:
'请选择'
placeholder
:
'请选择'
},
},
detextgridselect
:
{
label
:
'文本列表'
,
placeholder
:
'请选择'
},
denumbergridselect
:
{
label
:
'数字列表'
,
placeholder
:
'请选择'
},
dedaterange
:
{
dedaterange
:
{
label
:
'日期范围'
,
label
:
'日期范围'
,
to_placeholder
:
'结束日期'
,
to_placeholder
:
'结束日期'
,
...
...
frontend/src/views/panel/filter/index.vue
浏览文件 @
9890d02e
...
@@ -51,10 +51,12 @@ export default {
...
@@ -51,10 +51,12 @@ export default {
],
],
'文本过滤组件'
:
[
'文本过滤组件'
:
[
'textSelectWidget'
,
'textSelectWidget'
,
'textSelectGridWidget'
,
'textInputWidget'
'textInputWidget'
],
],
'数字过滤组件'
:
[
'数字过滤组件'
:
[
'numberSelectWidget'
,
'numberSelectWidget'
,
'numberSelectGridWidget'
,
'numberRangeWidget'
'numberRangeWidget'
]
]
// '按钮': [
// '按钮': [
...
@@ -202,7 +204,8 @@ export default {
...
@@ -202,7 +204,8 @@ export default {
.tree-filter
:hover
{
.tree-filter
:hover
{
background-color
:
#37b4aa
;
background-color
:
#37b4aa
;
.filter-widget-icon
{
.filter-widget-icon
{
color
:
#37b4aa
;
background-color
:
#37b4aa
;
color
:
#fff
;
}
}
.filter-widget-text
{
.filter-widget-text
{
color
:
#fff
;
color
:
#fff
;
...
...
frontend/src/views/system/task/dataset.vue
浏览文件 @
9890d02e
<
template
>
<
template
>
<layout-content
v-loading=
"$store.getters.loadingMap[$store.getters.currentPath]"
>
<layout-content
v-loading=
"$store.getters.loadingMap[$store.getters.currentPath]"
>
<el-row
style=
"height: 100%;
overflow-y: hidden;
width: 100%;"
>
<el-row
style=
"height: 100%;width: 100%;"
>
<el-tabs
v-model=
"tabActive"
@
tab-click=
"changeTab"
>
<el-tabs
v-model=
"tabActive"
@
tab-click=
"changeTab"
>
<el-tab-pane
:label=
"$t('dataset.task.list')"
name=
"DatasetTaskList"
>
<el-tab-pane
:label=
"$t('dataset.task.list')"
name=
"DatasetTaskList"
>
<dataset-task-list
v-if=
"tabActive=='DatasetTaskList'"
:param=
"task"
@
jumpTaskRecord=
"jumpTaskRecord"
/>
<dataset-task-list
v-if=
"tabActive=='DatasetTaskList'"
:param=
"task"
@
jumpTaskRecord=
"jumpTaskRecord"
/>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论