Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
njgzx
dataease
Commits
9cd3da04
Unverified
提交
9cd3da04
authored
5月 31, 2022
作者:
fit2cloud-chenyw
提交者:
GitHub
5月 31, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2362 from dataease/pr@dev@perf_tree_filter
perf: 优化树形过滤器
上级
edc98783
86af8c34
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
54 行增加
和
10 行删除
+54
-10
package.json
frontend/package.json
+2
-1
index.vue
frontend/src/components/ElTreeSelect/index.vue
+29
-2
DeSelectTree.vue
frontend/src/components/widget/DeWidget/DeSelectTree.vue
+2
-1
main.js
frontend/src/main.js
+2
-1
FilterHead.vue
frontend/src/views/panel/filter/filterMain/FilterHead.vue
+19
-5
没有找到文件。
frontend/package.json
浏览文件 @
9cd3da04
...
@@ -94,7 +94,8 @@
...
@@ -94,7 +94,8 @@
"script-ext-html-webpack-plugin"
:
"2.1.3"
,
"script-ext-html-webpack-plugin"
:
"2.1.3"
,
"script-loader"
:
"^0.7.2"
,
"script-loader"
:
"^0.7.2"
,
"serve-static"
:
"^1.13.2"
,
"serve-static"
:
"^1.13.2"
,
"vue-template-compiler"
:
"2.6.10"
"vue-template-compiler"
:
"2.6.10"
,
"vuetify"
:
"^2.6.6"
},
},
"engines"
:
{
"engines"
:
{
"node"
:
">=8.9"
,
"node"
:
">=8.9"
,
...
...
frontend/src/components/ElTreeSelect/index.vue
浏览文件 @
9cd3da04
...
@@ -408,6 +408,7 @@ export default {
...
@@ -408,6 +408,7 @@ export default {
// 树点击
// 树点击
_treeNodeClickFun
(
data
,
node
,
vm
)
{
_treeNodeClickFun
(
data
,
node
,
vm
)
{
const
{
multiple
}
=
this
.
selectParams
const
{
multiple
}
=
this
.
selectParams
if
(
multiple
)
return
// 多选 不允许点击节点
const
{
clickParent
}
=
this
.
treeParams
const
{
clickParent
}
=
this
.
treeParams
const
checkStrictly
=
this
.
treeParams
[
'check-strictly'
]
const
checkStrictly
=
this
.
treeParams
[
'check-strictly'
]
const
{
propsValue
,
propsChildren
,
propsDisabled
}
=
this
const
{
propsValue
,
propsChildren
,
propsDisabled
}
=
this
...
@@ -481,16 +482,42 @@ export default {
...
@@ -481,16 +482,42 @@ export default {
this
.
$emit
(
'check'
,
data
,
node
,
vm
)
this
.
$emit
(
'check'
,
data
,
node
,
vm
)
this
.
_emitFun
()
this
.
_emitFun
()
},
},
allKidIds
(
node
,
ids
)
{
ids
=
ids
||
[]
if
(
!
node
)
{
return
}
const
stack
=
[]
stack
.
push
(
node
)
let
tmpNode
while
(
stack
.
length
>
0
)
{
tmpNode
=
stack
.
pop
()
ids
.
push
(
tmpNode
.
id
)
if
(
tmpNode
.
children
&&
tmpNode
.
children
.
length
>
0
)
{
var
i
=
tmpNode
.
children
.
length
-
1
for
(
i
=
tmpNode
.
children
.
length
-
1
;
i
>=
0
;
i
--
)
{
stack
.
push
(
tmpNode
.
children
[
i
])
}
}
}
return
ids
},
// 下拉框移除tag时触发
// 下拉框移除tag时触发
_selectRemoveTag
(
tag
)
{
_selectRemoveTag
(
tag
)
{
const
{
data
,
propsValue
,
propsLabel
,
propsChildren
}
=
this
const
{
data
,
propsValue
,
propsLabel
,
propsChildren
}
=
this
const
{
multiple
}
=
this
.
selectParams
each
(
each
(
data
,
data
,
item
=>
{
item
=>
{
const
labels
=
this
.
showParent
?
this
.
cascadeLabels
(
item
)
:
item
[
propsLabel
]
const
labels
=
this
.
showParent
?
this
.
cascadeLabels
(
item
)
:
item
[
propsLabel
]
if
(
labels
===
tag
)
{
if
(
labels
===
tag
)
{
const
value
=
item
[
propsValue
]
if
(
multiple
&&
item
.
children
&&
item
.
children
.
length
)
{
this
.
ids
=
this
.
ids
.
filter
(
id
=>
id
!==
value
)
const
needCancelIds
=
this
.
allKidIds
(
item
)
||
[]
this
.
ids
=
this
.
ids
.
filter
(
id
=>
!
needCancelIds
.
includes
(
id
))
}
else
{
const
value
=
item
[
propsValue
]
this
.
ids
=
this
.
ids
.
filter
(
id
=>
id
!==
value
)
}
}
}
},
},
propsChildren
propsChildren
...
...
frontend/src/components/widget/DeWidget/DeSelectTree.vue
浏览文件 @
9cd3da04
...
@@ -129,7 +129,8 @@ export default {
...
@@ -129,7 +129,8 @@ export default {
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
deSelectTree
&&
this
.
$refs
.
deSelectTree
.
treeDataUpdateFun
(
this
.
datas
)
this
.
$refs
.
deSelectTree
&&
this
.
$refs
.
deSelectTree
.
treeDataUpdateFun
(
this
.
datas
)
})
})
})
||
(
this
.
element
.
options
.
value
=
''
)
})
this
.
element
.
options
.
value
=
''
},
},
'element.options.attrs.multiple'
:
function
(
value
,
old
)
{
'element.options.attrs.multiple'
:
function
(
value
,
old
)
{
if
(
typeof
old
===
'undefined'
||
value
===
old
)
return
if
(
typeof
old
===
'undefined'
||
value
===
old
)
return
...
...
frontend/src/main.js
浏览文件 @
9cd3da04
...
@@ -2,6 +2,7 @@ import Vue from 'vue'
...
@@ -2,6 +2,7 @@ import Vue from 'vue'
import
Cookies
from
'js-cookie'
import
Cookies
from
'js-cookie'
import
'@/styles/index.scss'
// global css
import
'@/styles/index.scss'
// global css
import
ElementUI
from
'element-ui'
import
ElementUI
from
'element-ui'
import
Vuetify
from
'vuetify'
import
Fit2CloudUI
from
'fit2cloud-ui'
import
Fit2CloudUI
from
'fit2cloud-ui'
import
i18n
from
'./lang'
// internationalization
import
i18n
from
'./lang'
// internationalization
...
@@ -51,7 +52,7 @@ Vue.use(fullscreen)
...
@@ -51,7 +52,7 @@ Vue.use(fullscreen)
import
VueFriendlyIframe
from
'vue-friendly-iframe'
import
VueFriendlyIframe
from
'vue-friendly-iframe'
Vue
.
use
(
VueFriendlyIframe
)
Vue
.
use
(
VueFriendlyIframe
)
Vue
.
use
(
Vuetify
)
// import TEditor from '@/components/Tinymce/index.vue'
// import TEditor from '@/components/Tinymce/index.vue'
// Vue.component('TEditor', TEditor)
// Vue.component('TEditor', TEditor)
...
...
frontend/src/views/panel/filter/filterMain/FilterHead.vue
浏览文件 @
9cd3da04
...
@@ -5,17 +5,18 @@
...
@@ -5,17 +5,18 @@
<div
class=
"field-content"
>
<div
class=
"field-content"
>
<div
class=
"field-content-right"
>
<div
class=
"field-content-right"
>
<el-row
style=
"display:inline-flex;height: 32px;width:
auto
;"
>
<el-row
style=
"display:inline-flex;height: 32px;width:
100%
;"
>
<draggable
<draggable
v-model=
"element.options.attrs.dragItems"
v-model=
"element.options.attrs.dragItems"
tag=
"v-layout"
group=
"dimension"
group=
"dimension"
animation=
"300"
animation=
"300"
:move=
"onMove"
:move=
"onMove"
class=
"theme-drag"
class=
"
row wrap justify-space-around
theme-drag"
style=
"width:100%;height: 100%;margin:0 10px;border-radius: 4px;overflow-x: auto;display: flex;align-items: center;"
style=
"width:100%;height: 100%;margin:0 10px;border-radius: 4px;overflow-x: auto;display: flex;align-items: center;"
@
end=
"end2"
@
end=
"end2"
>
>
<div
class=
"list-group-container"
>
<
!--
<
div
class=
"list-group-container"
>
<drag-item
<drag-item
v-for=
"(item,index) in element.options.attrs.dragItems"
v-for=
"(item,index) in element.options.attrs.dragItems"
:key=
"item.id"
:key=
"item.id"
...
@@ -23,8 +24,21 @@
...
@@ -23,8 +24,21 @@
:index=
"index"
:index=
"index"
@
closeItem=
"closeItem"
@
closeItem=
"closeItem"
/>
/>
</div>
</div>
-->
<transition-group
class=
"list-group"
:data-value=
"$t('panel.drag_here')"
/>
<v-flex
v-for=
"(item,index) in element.options.attrs.dragItems"
:key=
"item.id"
>
<drag-item
:key=
"item.id"
:item=
"item"
:index=
"index"
@
closeItem=
"closeItem"
/>
</v-flex>
<!--
<transition-group
class=
"list-group"
:data-value=
"$t('panel.drag_here')"
>
<drag-item
v-for=
"(item,index) in element.options.attrs.dragItems"
:key=
"item.id"
:item=
"item"
:index=
"index"
@
closeItem=
"closeItem"
/>
</transition-group>
-->
<span
solt=
"footer"
>
{{
$t
(
'panel.drag_here'
)
}}
</span>
</draggable>
</draggable>
</el-row>
</el-row>
</div>
</div>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论