Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
7411ba40
提交
7411ba40
authored
7月 20, 2021
作者:
junjie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 视图过滤重新设计,支持单维度指标展示
上级
e803a2cb
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
265 行增加
和
151 行删除
+265
-151
ChartCustomFilterItemDTO.java
.../java/io/dataease/dto/chart/ChartCustomFilterItemDTO.java
+18
-0
ChartFieldCustomFilterDTO.java
...java/io/dataease/dto/chart/ChartFieldCustomFilterDTO.java
+18
-0
ChartViewService.java
...main/java/io/dataease/service/chart/ChartViewService.java
+23
-16
en.js
frontend/src/lang/en.js
+1
-1
tw.js
frontend/src/lang/tw.js
+1
-1
zh.js
frontend/src/lang/zh.js
+1
-1
DimensionItem.vue
...nd/src/views/chart/components/drag-item/DimensionItem.vue
+3
-3
FilterItem.vue
frontend/src/views/chart/components/drag-item/FilterItem.vue
+54
-48
ResultFilterEditor.vue
.../src/views/chart/components/filter/ResultFilterEditor.vue
+146
-81
ChartEdit.vue
frontend/src/views/chart/view/ChartEdit.vue
+0
-0
没有找到文件。
backend/src/main/java/io/dataease/dto/chart/ChartCustomFilterItemDTO.java
0 → 100644
浏览文件 @
7411ba40
package
io
.
dataease
.
dto
.
chart
;
import
lombok.Getter
;
import
lombok.Setter
;
import
java.io.Serializable
;
/**
* @Author gin
* @Date 2021/7/20 11:34 上午
*/
@Getter
@Setter
public
class
ChartCustomFilterItemDTO
implements
Serializable
{
private
String
fieldId
;
private
String
term
;
private
String
value
;
}
backend/src/main/java/io/dataease/dto/chart/ChartFieldCustomFilterDTO.java
0 → 100644
浏览文件 @
7411ba40
package
io
.
dataease
.
dto
.
chart
;
import
io.dataease.base.domain.DatasetTableField
;
import
lombok.Getter
;
import
lombok.Setter
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* @Author gin
* @Date 2021/7/20 11:43 上午
*/
@Getter
@Setter
public
class
ChartFieldCustomFilterDTO
implements
Serializable
{
private
List
<
ChartCustomFilterItemDTO
>
filter
;
}
backend/src/main/java/io/dataease/service/chart/ChartViewService.java
浏览文件 @
7411ba40
...
@@ -134,24 +134,31 @@ public class ChartViewService {
...
@@ -134,24 +134,31 @@ public class ChartViewService {
}.
getType
());
}.
getType
());
List
<
ChartViewFieldDTO
>
yAxis
=
new
Gson
().
fromJson
(
view
.
getYAxis
(),
new
TypeToken
<
List
<
ChartViewFieldDTO
>>()
{
List
<
ChartViewFieldDTO
>
yAxis
=
new
Gson
().
fromJson
(
view
.
getYAxis
(),
new
TypeToken
<
List
<
ChartViewFieldDTO
>>()
{
}.
getType
());
}.
getType
());
List
<
Chart
CustomFilterDTO
>
customFilter
=
new
Gson
().
fromJson
(
view
.
getCustomFilter
(),
new
TypeToken
<
List
<
Chart
CustomFilterDTO
>>()
{
List
<
Chart
FieldCustomFilterDTO
>
fieldCustomFilter
=
new
Gson
().
fromJson
(
view
.
getCustomFilter
(),
new
TypeToken
<
List
<
ChartField
CustomFilterDTO
>>()
{
}.
getType
());
}.
getType
());
customFilter
.
forEach
(
ele
->
ele
.
setField
(
dataSetTableFieldsService
.
get
(
ele
.
getFieldId
())));
List
<
ChartCustomFilterDTO
>
customFilter
=
fieldCustomFilter
.
stream
().
map
(
ele
->
{
ChartCustomFilterDTO
dto
=
new
ChartCustomFilterDTO
();
ele
.
getFilter
().
forEach
(
f
->
{
BeanUtils
.
copyBean
(
dto
,
f
);
dto
.
setField
(
dataSetTableFieldsService
.
get
(
f
.
getFieldId
()));
});
return
dto
;
}).
collect
(
Collectors
.
toList
());
if
(
StringUtils
.
equalsIgnoreCase
(
"text"
,
view
.
getType
())
||
StringUtils
.
equalsIgnoreCase
(
"gauge"
,
view
.
getType
()))
{
//
if (StringUtils.equalsIgnoreCase("text", view.getType()) || StringUtils.equalsIgnoreCase("gauge", view.getType())) {
xAxis
=
new
ArrayList
<>();
//
xAxis = new ArrayList<>();
if
(
CollectionUtils
.
isEmpty
(
yAxis
))
{
//
if (CollectionUtils.isEmpty(yAxis)) {
ChartViewDTO
dto
=
new
ChartViewDTO
();
//
ChartViewDTO dto = new ChartViewDTO();
BeanUtils
.
copyBean
(
dto
,
view
);
//
BeanUtils.copyBean(dto, view);
return
dto
;
//
return dto;
}
//
}
}
else
{
//
} else {
if
(
CollectionUtils
.
isEmpty
(
xAxis
)
||
CollectionUtils
.
isEmpty
(
yAxis
))
{
//
if (CollectionUtils.isEmpty(xAxis) || CollectionUtils.isEmpty(yAxis)) {
ChartViewDTO
dto
=
new
ChartViewDTO
();
//
ChartViewDTO dto = new ChartViewDTO();
BeanUtils
.
copyBean
(
dto
,
view
);
//
BeanUtils.copyBean(dto, view);
return
dto
;
//
return dto;
}
//
}
}
//
}
// 过滤来自仪表板的条件
// 过滤来自仪表板的条件
List
<
ChartExtFilterRequest
>
extFilterList
=
new
ArrayList
<>();
List
<
ChartExtFilterRequest
>
extFilterList
=
new
ArrayList
<>();
...
...
frontend/src/lang/en.js
浏览文件 @
7411ba40
...
@@ -598,7 +598,7 @@ export default {
...
@@ -598,7 +598,7 @@ export default {
chart_type
:
'Chart Type'
,
chart_type
:
'Chart Type'
,
shape_attr
:
'Attribute'
,
shape_attr
:
'Attribute'
,
module_style
:
'Style'
,
module_style
:
'Style'
,
result_filter
:
'
Results Filter
'
,
result_filter
:
'
Filters
'
,
x_axis
:
'Horizontal axis'
,
x_axis
:
'Horizontal axis'
,
y_axis
:
'Longitudinal axis'
,
y_axis
:
'Longitudinal axis'
,
chart
:
'Chart'
,
chart
:
'Chart'
,
...
...
frontend/src/lang/tw.js
浏览文件 @
7411ba40
...
@@ -598,7 +598,7 @@ export default {
...
@@ -598,7 +598,7 @@ export default {
chart_type
:
'圖表類型'
,
chart_type
:
'圖表類型'
,
shape_attr
:
'圖形屬性'
,
shape_attr
:
'圖形屬性'
,
module_style
:
'組件樣式'
,
module_style
:
'組件樣式'
,
result_filter
:
'
結果
過濾器'
,
result_filter
:
'過濾器'
,
x_axis
:
'橫軸'
,
x_axis
:
'橫軸'
,
y_axis
:
'縱軸'
,
y_axis
:
'縱軸'
,
chart
:
'視圖'
,
chart
:
'視圖'
,
...
...
frontend/src/lang/zh.js
浏览文件 @
7411ba40
...
@@ -598,7 +598,7 @@ export default {
...
@@ -598,7 +598,7 @@ export default {
chart_type
:
'图表类型'
,
chart_type
:
'图表类型'
,
shape_attr
:
'图形属性'
,
shape_attr
:
'图形属性'
,
module_style
:
'组件样式'
,
module_style
:
'组件样式'
,
result_filter
:
'
结果
过滤器'
,
result_filter
:
'过滤器'
,
x_axis
:
'横轴'
,
x_axis
:
'横轴'
,
y_axis
:
'纵轴'
,
y_axis
:
'纵轴'
,
chart
:
'视图'
,
chart
:
'视图'
,
...
...
frontend/src/views/chart/components/drag-item/DimensionItem.vue
浏览文件 @
7411ba40
...
@@ -39,9 +39,9 @@
...
@@ -39,9 +39,9 @@
</el-dropdown-menu>
</el-dropdown-menu>
</el-dropdown>
</el-dropdown>
</el-dropdown-item>
</el-dropdown-item>
<
el-dropdown-item
icon=
"el-icon-files"
:command=
"beforeClickItem('filter')"
>
<
!--
<el-dropdown-item
icon=
"el-icon-files"
:command=
"beforeClickItem('filter')"
>
--
>
<span>
{{
$t
(
'chart.filter'
)
}}
...
</span
>
<!--
<span>
{{
$t
(
'chart.filter'
)
}}
...
</span>
--
>
<
/el-dropdown-item
>
<
!--
</el-dropdown-item>
--
>
<el-dropdown-item
v-show=
"item.deType === 1"
divided
>
<el-dropdown-item
v-show=
"item.deType === 1"
divided
>
<el-dropdown
placement=
"right-start"
size=
"mini"
style=
"width: 100%"
@
command=
"dateStyle"
>
<el-dropdown
placement=
"right-start"
size=
"mini"
style=
"width: 100%"
@
command=
"dateStyle"
>
...
...
frontend/src/views/chart/components/drag-item/FilterItem.vue
浏览文件 @
7411ba40
<
template
>
<
template
>
<div>
<span>
<el-dropdown
trigger=
"click"
size=
"mini"
@
command=
"clickItem"
>
<el-tag
v-if=
"!hasDataPermission('manage',param.privileges)"
size=
"small"
class=
"item-axis"
>
<span
style=
"float: left"
>
<svg-icon
v-if=
"item.deType === 0"
icon-class=
"field_text"
class=
"field-icon-text"
/>
<svg-icon
v-if=
"item.deType === 1"
icon-class=
"field_time"
class=
"field-icon-time"
/>
<svg-icon
v-if=
"item.deType === 2 || item.deType === 3"
icon-class=
"field_value"
class=
"field-icon-value"
/>
<svg-icon
v-if=
"item.deType === 5"
icon-class=
"field_location"
class=
"field-icon-location"
/>
</span>
<span
class=
"item-span-style"
:title=
"item.name"
>
{{
item
.
name
}}
</span>
</el-tag>
<el-dropdown
v-else
trigger=
"click"
size=
"mini"
@
command=
"clickItem"
>
<span
class=
"el-dropdown-link"
>
<span
class=
"el-dropdown-link"
>
<el-tag
size=
"small"
class=
"item-axis"
>
<el-tag
size=
"small"
class=
"item-axis"
>
{{
item
.
name
}}
<i
class=
"el-icon-arrow-down el-icon--right"
/>
<span
style=
"float: left"
>
<svg-icon
v-if=
"item.deType === 0"
icon-class=
"field_text"
class=
"field-icon-text"
/>
<svg-icon
v-if=
"item.deType === 1"
icon-class=
"field_time"
class=
"field-icon-time"
/>
<svg-icon
v-if=
"item.deType === 2 || item.deType === 3"
icon-class=
"field_value"
class=
"field-icon-value"
/>
<svg-icon
v-if=
"item.deType === 5"
icon-class=
"field_location"
class=
"field-icon-location"
/>
</span>
<span
class=
"item-span-style"
:title=
"item.name"
>
{{
item
.
name
}}
</span>
<i
class=
"el-icon-arrow-down el-icon--right"
style=
"position: absolute;top: 6px;right: 10px;"
/>
</el-tag>
</el-tag>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
icon=
"el-icon-
edit-outline"
:command=
"beforeClickItem('rename
')"
>
<el-dropdown-item
icon=
"el-icon-
files"
:command=
"beforeClickItem('filter
')"
>
<span>
{{
$t
(
'chart.
show_name_set'
)
}}
</span>
<span>
{{
$t
(
'chart.
filter'
)
}}
...
</span>
</el-dropdown-item>
</el-dropdown-item>
<el-dropdown-item
icon=
"el-icon-delete"
divided
:command=
"beforeClickItem('remove')"
>
<el-dropdown-item
icon=
"el-icon-delete"
divided
:command=
"beforeClickItem('remove')"
>
<span>
{{
$t
(
'chart.delete'
)
}}
</span>
<span>
{{
$t
(
'chart.delete'
)
}}
</span>
...
@@ -15,25 +31,17 @@
...
@@ -15,25 +31,17 @@
</el-dropdown-menu>
</el-dropdown-menu>
</span>
</span>
</el-dropdown>
</el-dropdown>
</span>
<el-dialog
:title=
"$t('chart.show_name_set')"
:visible=
"renameItem"
:show-close=
"false"
width=
"30%"
>
<el-form
ref=
"itemForm"
:model=
"itemForm"
:rules=
"itemFormRules"
>
<el-form-item
:label=
"$t('commons.name')"
prop=
"name"
>
<el-input
v-model=
"itemForm.name"
size=
"mini"
/>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"mini"
@
click=
"closeRename()"
>
{{
$t
(
'chart.cancel'
)
}}
</el-button>
<el-button
type=
"primary"
size=
"mini"
@
click=
"saveRename(itemForm)"
>
{{
$t
(
'chart.confirm'
)
}}
</el-button>
</div>
</el-dialog>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
name
:
'FilterItem'
,
name
:
'FilterItem'
,
props
:
{
props
:
{
param
:
{
type
:
Object
,
required
:
true
},
item
:
{
item
:
{
type
:
Object
,
type
:
Object
,
required
:
true
required
:
true
...
@@ -45,15 +53,6 @@ export default {
...
@@ -45,15 +53,6 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
renameItem
:
false
,
itemForm
:
{
name
:
''
},
itemFormRules
:
{
name
:
[
{
required
:
true
,
message
:
this
.
$t
(
'commons.input_content'
),
trigger
:
'change'
}
]
}
}
}
},
},
mounted
()
{
mounted
()
{
...
@@ -64,12 +63,12 @@ export default {
...
@@ -64,12 +63,12 @@ export default {
return
return
}
}
switch
(
param
.
type
)
{
switch
(
param
.
type
)
{
case
'rename'
:
this
.
showRename
()
break
case
'remove'
:
case
'remove'
:
this
.
removeItem
()
this
.
removeItem
()
break
break
case
'filter'
:
this
.
editFilter
()
break
default
:
default
:
break
break
}
}
...
@@ -79,23 +78,9 @@ export default {
...
@@ -79,23 +78,9 @@ export default {
type
:
type
type
:
type
}
}
},
},
showRename
()
{
editFilter
()
{
this
.
itemForm
.
name
=
this
.
item
.
name
this
.
item
.
index
=
this
.
index
this
.
renameItem
=
true
this
.
$emit
(
'editItemFilter'
,
this
.
item
)
},
closeRename
()
{
this
.
renameItem
=
false
this
.
resetRename
()
},
saveRename
(
param
)
{
this
.
item
.
name
=
param
.
name
this
.
$emit
(
'onFilterItemChange'
,
this
.
item
)
this
.
closeRename
()
},
resetRename
()
{
this
.
itemForm
=
{
name
:
''
}
},
},
removeItem
()
{
removeItem
()
{
this
.
item
.
index
=
this
.
index
this
.
item
.
index
=
this
.
index
...
@@ -112,10 +97,11 @@ export default {
...
@@ -112,10 +97,11 @@ export default {
text-align
:
left
;
text-align
:
left
;
height
:
24px
;
height
:
24px
;
line-height
:
22px
;
line-height
:
22px
;
display
:
inline-block
;
display
:
flex
;
border-radius
:
4px
;
border-radius
:
4px
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
white-space
:
nowrap
;
white-space
:
nowrap
;
width
:
159px
;
}
}
.item-axis
:hover
{
.item-axis
:hover
{
...
@@ -126,4 +112,24 @@ export default {
...
@@ -126,4 +112,24 @@ export default {
span
{
span
{
font-size
:
12px
;
font-size
:
12px
;
}
}
.summary-span
{
margin-left
:
4px
;
color
:
#878d9f
;
;
}
.inner-dropdown-menu
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
width
:
100%
}
.item-span-style
{
display
:
inline-block
;
width
:
100px
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
}
</
style
>
</
style
>
frontend/src/views/chart/components/filter/ResultFilterEditor.vue
浏览文件 @
7411ba40
...
@@ -2,26 +2,11 @@
...
@@ -2,26 +2,11 @@
<el-col>
<el-col>
<el-button
icon=
"el-icon-plus"
circle
size=
"mini"
style=
"margin-bottom: 10px;"
@
click=
"addFilter"
/>
<el-button
icon=
"el-icon-plus"
circle
size=
"mini"
style=
"margin-bottom: 10px;"
@
click=
"addFilter"
/>
<div
style=
"max-height: 50vh;overflow-y: auto;"
>
<div
style=
"max-height: 50vh;overflow-y: auto;"
>
<el-row
v-for=
"(f,index) in chart.customFilter"
:key=
"index"
class=
"filter-item"
>
<el-row
v-for=
"(f,index) in item.filter"
:key=
"index"
class=
"filter-item"
>
<el-col
:span=
"6"
>
<el-col
:span=
"4"
>
<el-select
v-model=
"f.fieldId"
size=
"mini"
filterable
>
<span>
{{
item
.
name
}}
</span>
<el-option
v-for=
"item in fields"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
>
<span
style=
"float: left"
>
<svg-icon
v-if=
"item.deType === 0"
icon-class=
"field_text"
class=
"field-icon-text"
/>
<svg-icon
v-if=
"item.deType === 1"
icon-class=
"field_time"
class=
"field-icon-time"
/>
<svg-icon
v-if=
"item.deType === 2 || item.deType === 3"
icon-class=
"field_value"
class=
"field-icon-value"
/>
<svg-icon
v-if=
"item.deType === 5"
icon-class=
"field_location"
class=
"field-icon-location"
/>
</span>
<span
style=
"float: left; color: #8492a6; font-size: 12px"
>
{{
item
.
name
}}
</span>
</el-option>
</el-select>
</el-col>
</el-col>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
8
"
>
<el-select
v-model=
"f.term"
size=
"mini"
>
<el-select
v-model=
"f.term"
size=
"mini"
>
<el-option-group
<el-option-group
v-for=
"(group,idx) in options"
v-for=
"(group,idx) in options"
...
@@ -49,7 +34,7 @@
...
@@ -49,7 +34,7 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
fieldList
}
from
'../../../../api/dataset/dataset'
//
import { fieldList } from '../../../../api/dataset/dataset'
export
default
{
export
default
{
name
:
'ResultFilterEditor'
,
name
:
'ResultFilterEditor'
,
...
@@ -57,78 +42,162 @@ export default {
...
@@ -57,78 +42,162 @@ export default {
chart
:
{
chart
:
{
type
:
Object
,
type
:
Object
,
required
:
true
required
:
true
},
item
:
{
type
:
Object
,
required
:
true
}
}
},
},
data
()
{
data
()
{
return
{
return
{
options
:
[{
textOptions
:
[
label
:
''
,
{
options
:
[{
label
:
''
,
value
:
'eq'
,
options
:
[{
label
:
this
.
$t
(
'chart.filter_eq'
)
value
:
'eq'
,
},
{
label
:
this
.
$t
(
'chart.filter_eq'
)
value
:
'not_eq'
,
},
{
label
:
this
.
$t
(
'chart.filter_not_eq'
)
value
:
'not_eq'
,
}]
label
:
this
.
$t
(
'chart.filter_not_eq'
)
},
}]
{
},
label
:
''
,
{
options
:
[{
label
:
''
,
value
:
'like'
,
options
:
[{
label
:
this
.
$t
(
'chart.filter_like'
)
value
:
'like'
,
},
{
label
:
this
.
$t
(
'chart.filter_like'
)
value
:
'not like'
,
},
{
label
:
this
.
$t
(
'chart.filter_not_like'
)
value
:
'not like'
,
}]
label
:
this
.
$t
(
'chart.filter_not_like'
)
},
}]
{
},
label
:
''
,
{
options
:
[{
label
:
''
,
value
:
'lt'
,
options
:
[{
label
:
this
.
$t
(
'chart.filter_lt'
)
value
:
'null'
,
},
{
label
:
this
.
$t
(
'chart.filter_null'
)
value
:
'gt'
,
},
{
label
:
this
.
$t
(
'chart.filter_gt'
)
value
:
'not_null'
,
}]
label
:
this
.
$t
(
'chart.filter_not_null'
)
},
}]
{
}
label
:
''
,
],
options
:
[{
dateOptions
:
[
value
:
'le'
,
{
label
:
this
.
$t
(
'chart.filter_le'
)
label
:
''
,
},
{
options
:
[{
value
:
'ge'
,
value
:
'eq'
,
label
:
this
.
$t
(
'chart.filter_ge'
)
label
:
this
.
$t
(
'chart.filter_eq'
)
}]
},
{
},
value
:
'not_eq'
,
{
label
:
this
.
$t
(
'chart.filter_not_eq'
)
label
:
''
,
}]
options
:
[{
},
value
:
'null'
,
{
label
:
this
.
$t
(
'chart.filter_null'
)
label
:
''
,
},
{
options
:
[{
value
:
'not_null'
,
value
:
'lt'
,
label
:
this
.
$t
(
'chart.filter_not_null'
)
label
:
this
.
$t
(
'chart.filter_lt'
)
}]
},
{
}],
value
:
'gt'
,
fields
:
[]
label
:
this
.
$t
(
'chart.filter_gt'
)
}]
},
{
label
:
''
,
options
:
[{
value
:
'le'
,
label
:
this
.
$t
(
'chart.filter_le'
)
},
{
value
:
'ge'
,
label
:
this
.
$t
(
'chart.filter_ge'
)
}]
},
{
label
:
''
,
options
:
[{
value
:
'null'
,
label
:
this
.
$t
(
'chart.filter_null'
)
},
{
value
:
'not_null'
,
label
:
this
.
$t
(
'chart.filter_not_null'
)
}]
}
],
valueOptions
:
[
{
label
:
''
,
options
:
[{
value
:
'eq'
,
label
:
this
.
$t
(
'chart.filter_eq'
)
},
{
value
:
'not_eq'
,
label
:
this
.
$t
(
'chart.filter_not_eq'
)
}]
},
{
label
:
''
,
options
:
[{
value
:
'lt'
,
label
:
this
.
$t
(
'chart.filter_lt'
)
},
{
value
:
'gt'
,
label
:
this
.
$t
(
'chart.filter_gt'
)
}]
},
{
label
:
''
,
options
:
[{
value
:
'le'
,
label
:
this
.
$t
(
'chart.filter_le'
)
},
{
value
:
'ge'
,
label
:
this
.
$t
(
'chart.filter_ge'
)
}]
},
{
label
:
''
,
options
:
[{
value
:
'null'
,
label
:
this
.
$t
(
'chart.filter_null'
)
},
{
value
:
'not_null'
,
label
:
this
.
$t
(
'chart.filter_not_null'
)
}]
}
],
options
:
[]
}
},
watch
:
{
'item'
:
function
()
{
this
.
initOptions
()
}
}
},
},
mounted
()
{
mounted
()
{
fieldList
(
this
.
chart
.
tableId
).
then
(
response
=>
{
this
.
initOptions
()
this
.
fields
=
response
.
data
})
},
},
methods
:
{
methods
:
{
initOptions
()
{
if
(
this
.
item
)
{
if
(
this
.
item
.
deType
===
0
||
this
.
item
.
deType
===
5
)
{
this
.
options
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
textOptions
))
}
else
if
(
this
.
item
.
deType
===
1
)
{
this
.
options
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
dateOptions
))
}
else
{
this
.
options
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
valueOptions
))
}
}
},
addFilter
()
{
addFilter
()
{
this
.
chart
.
customF
ilter
.
push
({
this
.
item
.
f
ilter
.
push
({
fieldId
:
''
,
fieldId
:
this
.
item
.
id
,
term
:
'eq'
,
term
:
'eq'
,
value
:
''
value
:
''
})
})
},
},
removeFilter
(
index
)
{
removeFilter
(
index
)
{
this
.
chart
.
customF
ilter
.
splice
(
index
,
1
)
this
.
item
.
f
ilter
.
splice
(
index
,
1
)
}
}
}
}
}
}
...
@@ -157,8 +226,4 @@ export default {
...
@@ -157,8 +226,4 @@ export default {
display
:
inline-block
;
display
:
inline-block
;
width
:
80px
!important
;
width
:
80px
!important
;
}
}
.el-select-dropdown__item
{
padding
:
0
20px
;
font-size
:
12px
;
}
</
style
>
</
style
>
frontend/src/views/chart/view/ChartEdit.vue
浏览文件 @
7411ba40
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论