Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
9280b298
Unverified
提交
9280b298
authored
1月 14, 2022
作者:
fit2cloud-chenyw
提交者:
GitHub
1月 14, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1643 from dataease/pr@dev@fix_panel_filter
fix: 过滤组件默认值不能覆盖编辑的预览值
上级
f99652f8
87000457
隐藏空白字符变更
内嵌
并排
正在显示
19 个修改的文件
包含
117 行增加
和
17 行删除
+117
-17
utils.js
frontend/src/components/canvas/utils/utils.js
+3
-0
DeDate.vue
frontend/src/components/widget/DeWidget/DeDate.vue
+18
-0
DeInputSearch.vue
frontend/src/components/widget/DeWidget/DeInputSearch.vue
+15
-0
DeNumberRange.vue
frontend/src/components/widget/DeWidget/DeNumberRange.vue
+19
-0
DeSelect.vue
frontend/src/components/widget/DeWidget/DeSelect.vue
+18
-6
DeSelectGrid.vue
frontend/src/components/widget/DeWidget/DeSelectGrid.vue
+20
-0
NumberRangeServiceImpl.js
...c/components/widget/serviceImpl/NumberRangeServiceImpl.js
+2
-1
NumberSelectGridServiceImpl.js
...ponents/widget/serviceImpl/NumberSelectGridServiceImpl.js
+2
-1
NumberSelectServiceImpl.js
.../components/widget/serviceImpl/NumberSelectServiceImpl.js
+2
-1
TextInputServiceImpl.js
...src/components/widget/serviceImpl/TextInputServiceImpl.js
+2
-1
TextSelectGridServiceImpl.js
...omponents/widget/serviceImpl/TextSelectGridServiceImpl.js
+2
-1
TextSelectServiceImpl.js
...rc/components/widget/serviceImpl/TextSelectServiceImpl.js
+2
-1
TimeDateRangeServiceImpl.js
...components/widget/serviceImpl/TimeDateRangeServiceImpl.js
+2
-1
TimeDateServiceImpl.js
.../src/components/widget/serviceImpl/TimeDateServiceImpl.js
+2
-1
TimeMonthServiceImpl.js
...src/components/widget/serviceImpl/TimeMonthServiceImpl.js
+2
-1
TimeYearServiceImpl.js
.../src/components/widget/serviceImpl/TimeYearServiceImpl.js
+2
-1
index.vue
frontend/src/views/panel/edit/index.vue
+2
-1
DeDateDefault.vue
...end/src/views/panel/filter/defaultValue/DeDateDefault.vue
+1
-0
DeDateRangeDefault.vue
...rc/views/panel/filter/defaultValue/DeDateRangeDefault.vue
+1
-0
没有找到文件。
frontend/src/components/canvas/utils/utils.js
浏览文件 @
9280b298
...
...
@@ -74,6 +74,9 @@ export function panelInit(componentDatas) {
}
}
}
if
(
item
.
type
===
'custom'
)
{
item
.
options
.
manualModify
=
false
}
if
(
item
.
filters
&&
item
.
filters
.
length
>
0
)
{
item
.
filters
=
[]
}
...
...
frontend/src/components/widget/DeWidget/DeDate.vue
浏览文件 @
9280b298
...
...
@@ -64,6 +64,9 @@ export default {
viewIds
()
{
if
(
!
this
.
element
||
!
this
.
element
.
options
||
!
this
.
element
.
options
.
attrs
.
viewIds
)
return
''
return
this
.
element
.
options
.
attrs
.
viewIds
.
toString
()
},
manualModify
()
{
return
!!
this
.
element
.
options
.
manualModify
}
},
watch
:
{
...
...
@@ -111,6 +114,18 @@ export default {
this
.
$refs
.
dateRef
.
hidePicker
()
}
})
bus
.
$on
(
'reset-default-value'
,
id
=>
{
if
(
this
.
inDraw
&&
this
.
manualModify
&&
this
.
element
.
id
===
id
)
{
if
(
!
this
.
element
.
options
.
attrs
.
default
.
isDynamic
)
{
this
.
values
=
this
.
fillValueDerfault
()
this
.
dateChange
(
this
.
values
)
return
}
const
widget
=
ApplicationContext
.
getService
(
this
.
element
.
serviceName
)
this
.
values
=
widget
.
dynamicDateFormNow
(
this
.
element
)
this
.
dateChange
(
this
.
values
)
}
})
},
methods
:
{
onBlur
()
{
...
...
@@ -138,6 +153,9 @@ export default {
}
else
{
this
.
element
.
options
.
value
=
Array
.
isArray
(
value
)
?
value
.
join
()
:
value
.
toString
()
}
this
.
element
.
options
.
manualModify
=
false
}
else
{
this
.
element
.
options
.
manualModify
=
true
}
this
.
setCondition
()
this
.
styleChange
()
...
...
frontend/src/components/widget/DeWidget/DeInputSearch.vue
浏览文件 @
9280b298
...
...
@@ -17,6 +17,7 @@
</
template
>
<
script
>
import
bus
from
'@/utils/bus'
export
default
{
props
:
{
...
...
@@ -45,6 +46,9 @@ export default {
viewIds
()
{
if
(
!
this
.
element
||
!
this
.
element
.
options
||
!
this
.
element
.
options
.
attrs
.
viewIds
)
return
''
return
this
.
element
.
options
.
attrs
.
viewIds
.
toString
()
},
manualModify
()
{
return
!!
this
.
element
.
options
.
manualModify
}
},
watch
:
{
...
...
@@ -64,6 +68,14 @@ export default {
this
.
search
()
}
},
mounted
()
{
bus
.
$on
(
'reset-default-value'
,
id
=>
{
if
(
this
.
inDraw
&&
this
.
manualModify
&&
this
.
element
.
id
===
id
)
{
this
.
value
=
this
.
fillValueDerfault
()
this
.
search
()
}
})
},
methods
:
{
search
()
{
if
(
!
this
.
inDraw
)
{
...
...
@@ -85,6 +97,9 @@ export default {
valueChange
(
val
)
{
if
(
!
this
.
inDraw
)
{
this
.
element
.
options
.
value
=
val
this
.
element
.
options
.
manualModify
=
false
}
else
{
this
.
element
.
options
.
manualModify
=
true
}
},
fillValueDerfault
()
{
...
...
frontend/src/components/widget/DeWidget/DeNumberRange.vue
浏览文件 @
9280b298
...
...
@@ -17,6 +17,7 @@
<
script
>
const
MIN_NUMBER
=
-
2147483648
const
MAX_NUMBER
=
2147483647
import
bus
from
'@/utils/bus'
export
default
{
props
:
{
...
...
@@ -64,6 +65,9 @@ export default {
viewIds
()
{
if
(
!
this
.
element
||
!
this
.
element
.
options
||
!
this
.
element
.
options
.
attrs
.
viewIds
)
return
''
return
this
.
element
.
options
.
attrs
.
viewIds
.
toString
()
},
manualModify
()
{
return
!!
this
.
element
.
options
.
manualModify
}
},
watch
:
{
...
...
@@ -99,6 +103,18 @@ export default {
this
.
search
()
}
},
mounted
()
{
bus
.
$on
(
'reset-default-value'
,
id
=>
{
if
(
this
.
inDraw
&&
this
.
manualModify
&&
this
.
element
.
id
===
id
)
{
const
values
=
this
.
element
.
options
.
value
this
.
form
.
min
=
values
[
0
]
if
(
values
.
length
>
1
)
{
this
.
form
.
max
=
values
[
1
]
}
this
.
search
()
}
})
},
methods
:
{
searchWithKey
(
index
)
{
this
.
timeMachine
=
setTimeout
(()
=>
{
...
...
@@ -211,6 +227,9 @@ export default {
if
(
!
this
.
inDraw
)
{
const
values
=
[
this
.
form
.
min
,
this
.
form
.
max
]
this
.
element
.
options
.
value
=
values
this
.
element
.
options
.
manualModify
=
false
}
else
{
this
.
element
.
options
.
manualModify
=
true
}
}
}
...
...
frontend/src/components/widget/DeWidget/DeSelect.vue
浏览文件 @
9280b298
...
...
@@ -28,9 +28,9 @@
</
template
>
<
script
>
import
{
multFieldValues
,
linkMultFieldValues
}
from
'@/api/dataset/dataset'
import
{
multFieldValues
,
linkMultFieldValues
}
from
'@/api/dataset/dataset'
import
bus
from
'@/utils/bus'
import
{
getLinkToken
,
getToken
}
from
"@/utils/auth"
;
import
{
getLinkToken
,
getToken
}
from
'@/utils/auth'
export
default
{
props
:
{
...
...
@@ -70,6 +70,9 @@ export default {
viewIds
()
{
if
(
!
this
.
element
||
!
this
.
element
.
options
||
!
this
.
element
.
options
.
attrs
.
viewIds
)
return
''
return
this
.
element
.
options
.
attrs
.
viewIds
.
toString
()
},
manualModify
()
{
return
!!
this
.
element
.
options
.
manualModify
}
},
...
...
@@ -87,7 +90,7 @@ export default {
if
(
typeof
value
===
'undefined'
||
value
===
old
)
return
this
.
datas
=
[]
let
method
=
multFieldValues
let
method
=
multFieldValues
const
token
=
this
.
$store
.
getters
.
token
||
getToken
()
const
linkToken
=
this
.
$store
.
getters
.
linkToken
||
getLinkToken
()
if
(
!
token
&&
linkToken
)
{
...
...
@@ -95,7 +98,7 @@ export default {
}
this
.
element
.
options
.
attrs
.
fieldId
&&
this
.
element
.
options
.
attrs
.
fieldId
.
length
>
0
&&
method
({
fieldIds
:
this
.
element
.
options
.
attrs
.
fieldId
.
split
(
','
)
}).
then
(
res
=>
{
method
({
fieldIds
:
this
.
element
.
options
.
attrs
.
fieldId
.
split
(
','
)
}).
then
(
res
=>
{
this
.
datas
=
this
.
optionDatas
(
res
.
data
)
})
||
(
this
.
element
.
options
.
value
=
''
)
},
...
...
@@ -122,6 +125,12 @@ export default {
this
.
$refs
.
deSelect
.
blur
()
}
})
bus
.
$on
(
'reset-default-value'
,
id
=>
{
if
(
this
.
inDraw
&&
this
.
manualModify
&&
this
.
element
.
id
===
id
)
{
this
.
value
=
this
.
fillValueDerfault
()
this
.
changeValue
(
this
.
value
)
}
})
},
methods
:
{
...
...
@@ -132,13 +141,13 @@ export default {
this
.
value
=
this
.
fillValueDerfault
()
this
.
datas
=
[]
if
(
this
.
element
.
options
.
attrs
.
fieldId
)
{
let
method
=
multFieldValues
let
method
=
multFieldValues
const
token
=
this
.
$store
.
getters
.
token
||
getToken
()
const
linkToken
=
this
.
$store
.
getters
.
linkToken
||
getLinkToken
()
if
(
!
token
&&
linkToken
)
{
method
=
linkMultFieldValues
}
method
({
fieldIds
:
this
.
element
.
options
.
attrs
.
fieldId
.
split
(
','
)
}).
then
(
res
=>
{
method
({
fieldIds
:
this
.
element
.
options
.
attrs
.
fieldId
.
split
(
','
)
}).
then
(
res
=>
{
this
.
datas
=
this
.
optionDatas
(
res
.
data
)
})
}
...
...
@@ -154,6 +163,9 @@ export default {
}
else
{
this
.
element
.
options
.
value
=
Array
.
isArray
(
value
)
?
value
.
join
()
:
value
}
this
.
element
.
options
.
manualModify
=
false
}
else
{
this
.
element
.
options
.
manualModify
=
true
}
this
.
setCondition
()
this
.
styleChange
()
...
...
frontend/src/components/widget/DeWidget/DeSelectGrid.vue
浏览文件 @
9280b298
...
...
@@ -38,6 +38,7 @@
<
script
>
import
{
multFieldValues
,
linkMultFieldValues
}
from
'@/api/dataset/dataset'
import
{
getLinkToken
,
getToken
}
from
'@/utils/auth'
import
bus
from
'@/utils/bus'
export
default
{
props
:
{
...
...
@@ -89,6 +90,9 @@ export default {
viewIds
()
{
if
(
!
this
.
element
||
!
this
.
element
.
options
||
!
this
.
element
.
options
.
attrs
.
viewIds
)
return
''
return
this
.
element
.
options
.
attrs
.
viewIds
.
toString
()
},
manualModify
()
{
return
!!
this
.
element
.
options
.
manualModify
}
},
watch
:
{
...
...
@@ -137,6 +141,19 @@ export default {
created
()
{
this
.
initLoad
()
},
mounted
()
{
bus
.
$on
(
'reset-default-value'
,
id
=>
{
if
(
this
.
inDraw
&&
this
.
manualModify
&&
this
.
element
.
id
===
id
)
{
this
.
value
=
this
.
fillValueDerfault
()
this
.
changeValue
(
this
.
value
)
if
(
this
.
element
.
options
.
attrs
.
multiple
)
{
this
.
checkAll
=
this
.
value
.
length
===
this
.
datas
.
length
this
.
isIndeterminate
=
this
.
value
.
length
>
0
&&
this
.
value
.
length
<
this
.
datas
.
length
}
}
})
},
methods
:
{
initLoad
()
{
...
...
@@ -168,6 +185,9 @@ export default {
}
else
{
this
.
element
.
options
.
value
=
Array
.
isArray
(
value
)
?
value
.
join
()
:
value
}
this
.
element
.
options
.
manualModify
=
false
}
else
{
this
.
element
.
options
.
manualModify
=
true
}
this
.
setCondition
()
this
.
styleChange
()
...
...
frontend/src/components/widget/serviceImpl/NumberRangeServiceImpl.js
浏览文件 @
9280b298
...
...
@@ -15,7 +15,8 @@ const dialogPanel = {
fieldId
:
''
,
dragItems
:
[]
},
value
:
''
value
:
''
,
manualModify
:
false
},
defaultClass
:
'tree-filter'
,
component
:
'de-number-range'
...
...
frontend/src/components/widget/serviceImpl/NumberSelectGridServiceImpl.js
浏览文件 @
9280b298
...
...
@@ -20,7 +20,8 @@ const dialogPanel = {
fieldId
:
''
,
dragItems
:
[]
},
value
:
''
value
:
''
,
manualModify
:
false
},
defaultClass
:
'tree-filter'
,
component
:
'de-select-grid'
...
...
frontend/src/components/widget/serviceImpl/NumberSelectServiceImpl.js
浏览文件 @
9280b298
...
...
@@ -20,7 +20,8 @@ const dialogPanel = {
fieldId
:
''
,
dragItems
:
[]
},
value
:
''
value
:
''
,
manualModify
:
false
},
defaultClass
:
'tree-filter'
,
component
:
'de-select'
...
...
frontend/src/components/widget/serviceImpl/TextInputServiceImpl.js
浏览文件 @
9280b298
...
...
@@ -15,7 +15,8 @@ const dialogPanel = {
dragItems
:
[]
},
value
:
''
value
:
''
,
manualModify
:
false
},
defaultClass
:
'text-filter'
,
component
:
'de-input-search'
...
...
frontend/src/components/widget/serviceImpl/TextSelectGridServiceImpl.js
浏览文件 @
9280b298
...
...
@@ -20,7 +20,8 @@ const dialogPanel = {
fieldId
:
''
,
dragItems
:
[]
},
value
:
''
value
:
''
,
manualModify
:
false
},
defaultClass
:
'text-filter'
,
component
:
'de-select-grid'
...
...
frontend/src/components/widget/serviceImpl/TextSelectServiceImpl.js
浏览文件 @
9280b298
...
...
@@ -20,7 +20,8 @@ const dialogPanel = {
fieldId
:
''
,
dragItems
:
[]
},
value
:
''
value
:
''
,
manualModify
:
false
},
defaultClass
:
'text-filter'
,
component
:
'de-select'
...
...
frontend/src/components/widget/serviceImpl/TimeDateRangeServiceImpl.js
浏览文件 @
9280b298
...
...
@@ -29,7 +29,8 @@ const dialogPanel = {
eDynamicSuffix
:
'after'
}
},
value
:
''
value
:
''
,
manualModify
:
false
},
defaultClass
:
'time-filter'
,
component
:
'de-date'
...
...
frontend/src/components/widget/serviceImpl/TimeDateServiceImpl.js
浏览文件 @
9280b298
...
...
@@ -40,7 +40,8 @@ const dialogPanel = {
}
}
},
value
:
''
value
:
''
,
manualModify
:
false
},
defaultClass
:
'time-filter'
,
component
:
'de-date'
...
...
frontend/src/components/widget/serviceImpl/TimeMonthServiceImpl.js
浏览文件 @
9280b298
...
...
@@ -35,7 +35,8 @@ const dialogPanel = {
}
}
},
value
:
''
value
:
''
,
manualModify
:
false
},
defaultClass
:
'time-filter'
,
component
:
'de-date'
...
...
frontend/src/components/widget/serviceImpl/TimeYearServiceImpl.js
浏览文件 @
9280b298
...
...
@@ -34,7 +34,8 @@ const dialogPanel = {
}
}
},
value
:
''
value
:
''
,
manualModify
:
false
},
defaultClass
:
'time-filter'
,
component
:
'de-date'
...
...
frontend/src/views/panel/edit/index.vue
浏览文件 @
9280b298
...
...
@@ -688,7 +688,7 @@ export default {
},
cancelFilter
()
{
this
.
closeFilter
()
if
(
this
.
filterFromDrag
)
{
if
(
this
.
filterFromDrag
)
{
bus
.
$emit
(
'onRemoveLastItem'
)
}
},
...
...
@@ -697,6 +697,7 @@ export default {
this
.
$store
.
commit
(
'setComponentWithId'
,
this
.
currentFilterCom
)
this
.
$store
.
commit
(
'recordSnapshot'
,
'sureFilter'
)
this
.
$store
.
commit
(
'setCurComponent'
,
{
component
:
this
.
currentFilterCom
,
index
:
this
.
curComponentIndex
})
bus
.
$emit
(
'reset-default-value'
,
this
.
currentFilterCom
.
id
)
this
.
closeFilter
()
},
reFreshComponent
(
component
)
{
...
...
frontend/src/views/panel/filter/defaultValue/DeDateDefault.vue
浏览文件 @
9280b298
...
...
@@ -169,6 +169,7 @@ export default {
const
widget
=
ApplicationContext
.
getService
(
this
.
element
.
serviceName
)
const
time
=
widget
.
dynamicDateFormNow
(
this
.
element
)
this
.
dval
=
time
this
.
element
.
options
.
manualModify
=
false
}
}
}
...
...
frontend/src/views/panel/filter/defaultValue/DeDateRangeDefault.vue
浏览文件 @
9280b298
...
...
@@ -213,6 +213,7 @@ export default {
const
time
=
widget
.
dynamicDateFormNow
(
this
.
element
)
this
.
dval
=
time
bus
.
$emit
(
'valid-values-change'
,
(
!
time
||
time
.
length
===
0
||
time
[
1
]
>
time
[
0
]))
this
.
element
.
options
.
manualModify
=
false
}
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论