forked from github/dataease
Merge pull request #4145 from dataease/pr@dev@feat_view-refresh
feat(视图): 视图可以单独设置刷新频率
This commit is contained in:
commit
4cb5752f03
@ -8,14 +8,11 @@
|
|||||||
<result column="privileges" property="privileges"/>
|
<result column="privileges" property="privileges"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<select id ="findByPanelId" resultMap="BaseResultMapDTO">
|
<select id="findByPanelId" resultMap="BaseResultMapDTO">
|
||||||
SELECT
|
SELECT chart_view.*
|
||||||
chart_view.*
|
FROM chart_view
|
||||||
FROM
|
LEFT JOIN panel_view ON chart_view.id = panel_view.chart_view_id
|
||||||
chart_view
|
WHERE panel_view.panel_id = #{panelId}
|
||||||
LEFT JOIN panel_view ON chart_view.id = panel_view.chart_view_id
|
|
||||||
WHERE
|
|
||||||
panel_view.panel_id = #{panelId}
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="searchOneWithPrivileges" resultMap="BaseResultMapDTO">
|
<select id="searchOneWithPrivileges" resultMap="BaseResultMapDTO">
|
||||||
@ -25,198 +22,210 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="searchOne" resultMap="BaseResultMapDTO">
|
<select id="searchOne" resultMap="BaseResultMapDTO">
|
||||||
select
|
select chart_view.*
|
||||||
chart_view.*
|
from chart_view
|
||||||
from chart_view where id = #{id}
|
where id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="copyToCache">
|
<insert id="copyToCache">
|
||||||
INSERT INTO chart_view_cache (
|
INSERT INTO chart_view_cache (id,
|
||||||
id,
|
`name`,
|
||||||
`name`,
|
title,
|
||||||
title,
|
scene_id,
|
||||||
scene_id,
|
table_id,
|
||||||
table_id,
|
`type`,
|
||||||
`type`,
|
render,
|
||||||
render,
|
result_count,
|
||||||
result_count,
|
result_mode,
|
||||||
result_mode,
|
create_by,
|
||||||
create_by,
|
create_time,
|
||||||
create_time,
|
update_time,
|
||||||
update_time,
|
style_priority,
|
||||||
style_priority,
|
chart_type,
|
||||||
chart_type,
|
is_plugin,
|
||||||
is_plugin,
|
x_axis,
|
||||||
x_axis,
|
x_axis_ext,
|
||||||
x_axis_ext,
|
y_axis,
|
||||||
y_axis,
|
y_axis_ext,
|
||||||
y_axis_ext,
|
ext_stack,
|
||||||
ext_stack,
|
ext_bubble,
|
||||||
ext_bubble,
|
custom_attr,
|
||||||
custom_attr,
|
custom_style,
|
||||||
custom_style,
|
custom_filter,
|
||||||
custom_filter,
|
drill_fields,
|
||||||
drill_fields,
|
senior,
|
||||||
senior,
|
SNAPSHOT,
|
||||||
SNAPSHOT,
|
data_from,
|
||||||
data_from
|
refresh_view_enable,
|
||||||
) SELECT
|
refresh_unit,
|
||||||
id,
|
refresh_time)
|
||||||
`name`,
|
SELECT id,
|
||||||
title,
|
`name`,
|
||||||
scene_id,
|
title,
|
||||||
table_id,
|
scene_id,
|
||||||
`type`,
|
table_id,
|
||||||
render,
|
`type`,
|
||||||
result_count,
|
render,
|
||||||
result_mode,
|
result_count,
|
||||||
create_by,
|
result_mode,
|
||||||
create_time,
|
create_by,
|
||||||
update_time,
|
create_time,
|
||||||
style_priority,
|
update_time,
|
||||||
chart_type,
|
style_priority,
|
||||||
is_plugin,
|
chart_type,
|
||||||
x_axis,
|
is_plugin,
|
||||||
x_axis_ext,
|
x_axis,
|
||||||
y_axis,
|
x_axis_ext,
|
||||||
y_axis_ext,
|
y_axis,
|
||||||
ext_stack,
|
y_axis_ext,
|
||||||
ext_bubble,
|
ext_stack,
|
||||||
custom_attr,
|
ext_bubble,
|
||||||
custom_style,
|
custom_attr,
|
||||||
custom_filter,
|
custom_style,
|
||||||
drill_fields,
|
custom_filter,
|
||||||
senior,
|
drill_fields,
|
||||||
SNAPSHOT,
|
senior,
|
||||||
data_from from chart_view
|
SNAPSHOT,
|
||||||
WHERE
|
data_from,
|
||||||
chart_view.id = #{id}
|
refresh_view_enable,
|
||||||
|
refresh_unit,
|
||||||
|
refresh_time
|
||||||
|
from chart_view
|
||||||
|
WHERE chart_view.id = #{id}
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<insert id="copyCache">
|
<insert id="copyCache">
|
||||||
INSERT INTO chart_view_cache (
|
INSERT INTO chart_view_cache (id,
|
||||||
id,
|
`name`,
|
||||||
`name`,
|
title,
|
||||||
title,
|
scene_id,
|
||||||
scene_id,
|
table_id,
|
||||||
table_id,
|
`type`,
|
||||||
`type`,
|
render,
|
||||||
render,
|
result_count,
|
||||||
result_count,
|
result_mode,
|
||||||
result_mode,
|
create_by,
|
||||||
create_by,
|
create_time,
|
||||||
create_time,
|
update_time,
|
||||||
update_time,
|
style_priority,
|
||||||
style_priority,
|
chart_type,
|
||||||
chart_type,
|
is_plugin,
|
||||||
is_plugin,
|
x_axis,
|
||||||
x_axis,
|
x_axis_ext,
|
||||||
x_axis_ext,
|
y_axis,
|
||||||
y_axis,
|
y_axis_ext,
|
||||||
y_axis_ext,
|
ext_stack,
|
||||||
ext_stack,
|
ext_bubble,
|
||||||
ext_bubble,
|
custom_attr,
|
||||||
custom_attr,
|
custom_style,
|
||||||
custom_style,
|
custom_filter,
|
||||||
custom_filter,
|
drill_fields,
|
||||||
drill_fields,
|
senior,
|
||||||
senior,
|
SNAPSHOT,
|
||||||
SNAPSHOT,
|
data_from,
|
||||||
data_from
|
refresh_view_enable,
|
||||||
) SELECT
|
refresh_unit,
|
||||||
#{newViewId} as id,
|
refresh_time)
|
||||||
`name`,
|
SELECT #{newViewId} as id,
|
||||||
title,
|
`name`,
|
||||||
scene_id,
|
title,
|
||||||
table_id,
|
scene_id,
|
||||||
`type`,
|
table_id,
|
||||||
render,
|
`type`,
|
||||||
result_count,
|
render,
|
||||||
result_mode,
|
result_count,
|
||||||
create_by,
|
result_mode,
|
||||||
create_time,
|
create_by,
|
||||||
update_time,
|
create_time,
|
||||||
style_priority,
|
update_time,
|
||||||
chart_type,
|
style_priority,
|
||||||
is_plugin,
|
chart_type,
|
||||||
x_axis,
|
is_plugin,
|
||||||
x_axis_ext,
|
x_axis,
|
||||||
y_axis,
|
x_axis_ext,
|
||||||
y_axis_ext,
|
y_axis,
|
||||||
ext_stack,
|
y_axis_ext,
|
||||||
ext_bubble,
|
ext_stack,
|
||||||
custom_attr,
|
ext_bubble,
|
||||||
custom_style,
|
custom_attr,
|
||||||
custom_filter,
|
custom_style,
|
||||||
drill_fields,
|
custom_filter,
|
||||||
senior,
|
drill_fields,
|
||||||
SNAPSHOT,
|
senior,
|
||||||
data_from from chart_view_cache
|
SNAPSHOT,
|
||||||
WHERE
|
data_from,
|
||||||
chart_view_cache.id = #{sourceViewId}
|
refresh_view_enable,
|
||||||
|
refresh_unit,
|
||||||
|
refresh_time
|
||||||
|
from chart_view_cache
|
||||||
|
WHERE chart_view_cache.id = #{sourceViewId}
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<insert id="initPanelChartViewCache">
|
<insert id="initPanelChartViewCache">
|
||||||
INSERT INTO chart_view_cache (
|
INSERT INTO chart_view_cache (id,
|
||||||
id,
|
`name`,
|
||||||
`name`,
|
title,
|
||||||
title,
|
scene_id,
|
||||||
scene_id,
|
table_id,
|
||||||
table_id,
|
`type`,
|
||||||
`type`,
|
render,
|
||||||
render,
|
result_count,
|
||||||
result_count,
|
result_mode,
|
||||||
result_mode,
|
create_by,
|
||||||
create_by,
|
create_time,
|
||||||
create_time,
|
update_time,
|
||||||
update_time,
|
style_priority,
|
||||||
style_priority,
|
chart_type,
|
||||||
chart_type,
|
is_plugin,
|
||||||
is_plugin,
|
x_axis,
|
||||||
x_axis,
|
x_axis_ext,
|
||||||
x_axis_ext,
|
y_axis,
|
||||||
y_axis,
|
y_axis_ext,
|
||||||
y_axis_ext,
|
ext_stack,
|
||||||
ext_stack,
|
ext_bubble,
|
||||||
ext_bubble,
|
custom_attr,
|
||||||
custom_attr,
|
custom_style,
|
||||||
custom_style,
|
custom_filter,
|
||||||
custom_filter,
|
drill_fields,
|
||||||
drill_fields,
|
senior,
|
||||||
senior,
|
SNAPSHOT,
|
||||||
SNAPSHOT,
|
data_from,
|
||||||
data_from
|
refresh_view_enable,
|
||||||
) SELECT
|
refresh_unit,
|
||||||
id,
|
refresh_time)
|
||||||
`name`,
|
SELECT id,
|
||||||
title,
|
`name`,
|
||||||
scene_id,
|
title,
|
||||||
table_id,
|
scene_id,
|
||||||
`type`,
|
table_id,
|
||||||
render,
|
`type`,
|
||||||
result_count,
|
render,
|
||||||
result_mode,
|
result_count,
|
||||||
create_by,
|
result_mode,
|
||||||
create_time,
|
create_by,
|
||||||
update_time,
|
create_time,
|
||||||
style_priority,
|
update_time,
|
||||||
chart_type,
|
style_priority,
|
||||||
is_plugin,
|
chart_type,
|
||||||
x_axis,
|
is_plugin,
|
||||||
x_axis_ext,
|
x_axis,
|
||||||
y_axis,
|
x_axis_ext,
|
||||||
y_axis_ext,
|
y_axis,
|
||||||
ext_stack,
|
y_axis_ext,
|
||||||
ext_bubble,
|
ext_stack,
|
||||||
custom_attr,
|
ext_bubble,
|
||||||
custom_style,
|
custom_attr,
|
||||||
custom_filter,
|
custom_style,
|
||||||
drill_fields,
|
custom_filter,
|
||||||
senior,
|
drill_fields,
|
||||||
SNAPSHOT,
|
senior,
|
||||||
data_from from chart_view
|
SNAPSHOT,
|
||||||
WHERE
|
data_from,
|
||||||
chart_view.scene_id = #{panelId}
|
refresh_view_enable,
|
||||||
|
refresh_unit,
|
||||||
|
refresh_time
|
||||||
|
from chart_view
|
||||||
|
WHERE chart_view.scene_id = #{panelId}
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<select id="search" resultMap="BaseResultMapDTO">
|
<select id="search" resultMap="BaseResultMapDTO">
|
||||||
@ -299,11 +308,11 @@
|
|||||||
`senior`,
|
`senior`,
|
||||||
`data_from`)
|
`data_from`)
|
||||||
SELECT #{newChartId},
|
SELECT #{newChartId},
|
||||||
GET_CHART_VIEW_COPY_NAME(#{oldChartId},#{panelId}) as `name`,
|
GET_CHART_VIEW_COPY_NAME(#{oldChartId}, #{panelId}) as `name`,
|
||||||
#{panelId},
|
#{panelId},
|
||||||
`table_id`,
|
`table_id`,
|
||||||
`type`,
|
`type`,
|
||||||
GET_CHART_VIEW_COPY_NAME(#{oldChartId},#{panelId}) as `title`,
|
GET_CHART_VIEW_COPY_NAME(#{oldChartId}, #{panelId}) as `title`,
|
||||||
`x_axis`,
|
`x_axis`,
|
||||||
`x_axis_ext`,
|
`x_axis_ext`,
|
||||||
`y_axis`,
|
`y_axis`,
|
||||||
@ -312,8 +321,8 @@
|
|||||||
`custom_filter`,
|
`custom_filter`,
|
||||||
`drill_fields`,
|
`drill_fields`,
|
||||||
`create_by`,
|
`create_by`,
|
||||||
unix_timestamp()*1000 as `create_time`,
|
unix_timestamp() * 1000 as `create_time`,
|
||||||
unix_timestamp()*1000 as `update_time`,
|
unix_timestamp() * 1000 as `update_time`,
|
||||||
`snapshot`,
|
`snapshot`,
|
||||||
`style_priority`,
|
`style_priority`,
|
||||||
`ext_stack`,
|
`ext_stack`,
|
||||||
@ -405,13 +414,11 @@
|
|||||||
SNAPSHOT,
|
SNAPSHOT,
|
||||||
senior,
|
senior,
|
||||||
data_from
|
data_from
|
||||||
FROM (
|
FROM (SELECT panel_id,
|
||||||
SELECT panel_id,
|
copy_from_view,
|
||||||
copy_from_view,
|
chart_view_id
|
||||||
chart_view_id
|
FROM panel_view
|
||||||
FROM panel_view
|
WHERE copy_id = #{copyId}) pv_copy
|
||||||
WHERE copy_id = #{copyId}
|
|
||||||
) pv_copy
|
|
||||||
INNER JOIN chart_view ON chart_view.id = pv_copy.copy_from_view
|
INNER JOIN chart_view ON chart_view.id = pv_copy.copy_from_view
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
@ -459,16 +466,11 @@
|
|||||||
|
|
||||||
|
|
||||||
<select id="searchViewsWithPanelId" resultMap="BaseResultMapDTO">
|
<select id="searchViewsWithPanelId" resultMap="BaseResultMapDTO">
|
||||||
SELECT * FROM chart_view
|
SELECT *
|
||||||
WHERE
|
FROM chart_view
|
||||||
id IN (
|
WHERE id IN (SELECT chart_view_id
|
||||||
SELECT
|
FROM panel_view
|
||||||
chart_view_id
|
WHERE panel_id = #{panelId})
|
||||||
FROM
|
|
||||||
panel_view
|
|
||||||
WHERE
|
|
||||||
panel_id = #{panelId}
|
|
||||||
)
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<delete id="deleteCacheWithPanel">
|
<delete id="deleteCacheWithPanel">
|
||||||
@ -480,10 +482,12 @@
|
|||||||
#{viewId}
|
#{viewId}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
</delete>
|
</delete>
|
||||||
<delete id="deleteViewCache">
|
<delete id="deleteViewCache">
|
||||||
delete from chart_view_cache where id = #{viewId}
|
delete
|
||||||
</delete>
|
from chart_view_cache
|
||||||
|
where id = #{viewId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
<update id="copyCacheToView">
|
<update id="copyCacheToView">
|
||||||
UPDATE chart_view cv,
|
UPDATE chart_view cv,
|
||||||
@ -514,7 +518,10 @@
|
|||||||
cv.drill_fields = cve.drill_fields,
|
cv.drill_fields = cve.drill_fields,
|
||||||
cv.senior = cve.senior,
|
cv.senior = cve.senior,
|
||||||
cv.SNAPSHOT = cve.SNAPSHOT,
|
cv.SNAPSHOT = cve.SNAPSHOT,
|
||||||
cv.data_from = cve.data_from
|
cv.data_from = cve.data_from,
|
||||||
|
cv.refresh_view_enable = cve.refresh_view_enable,
|
||||||
|
cv.refresh_unit = cve.refresh_unit,
|
||||||
|
cv.refresh_time = cve.refresh_time
|
||||||
where cve.id = cv.id and cv.id in
|
where cve.id = cv.id and cv.id in
|
||||||
<foreach collection="viewIds" item="viewId" open='(' separator=',' close=')'>
|
<foreach collection="viewIds" item="viewId" open='(' separator=',' close=')'>
|
||||||
#{viewId}
|
#{viewId}
|
||||||
@ -523,69 +530,75 @@
|
|||||||
|
|
||||||
<update id="updateToCache">
|
<update id="updateToCache">
|
||||||
UPDATE chart_view_cache cv,
|
UPDATE chart_view_cache cv,
|
||||||
chart_view cve
|
chart_view cve
|
||||||
SET cv.`name` = cve.`name`,
|
SET cv.`name` = cve.`name`,
|
||||||
cv.title = cve.title,
|
cv.title = cve.title,
|
||||||
cv.scene_id = cve.scene_id,
|
cv.scene_id = cve.scene_id,
|
||||||
cv.table_id = cve.table_id,
|
cv.table_id = cve.table_id,
|
||||||
cv.`type` = cve.`type`,
|
cv.`type` = cve.`type`,
|
||||||
cv.render = cve.render,
|
cv.render = cve.render,
|
||||||
cv.result_count = cve.result_count,
|
cv.result_count = cve.result_count,
|
||||||
cv.result_mode = cve.result_mode,
|
cv.result_mode = cve.result_mode,
|
||||||
cv.create_by = cve.create_by,
|
cv.create_by = cve.create_by,
|
||||||
cv.create_time = cve.create_time,
|
cv.create_time = cve.create_time,
|
||||||
cv.update_time = cve.update_time,
|
cv.update_time = cve.update_time,
|
||||||
cv.style_priority = cve.style_priority,
|
cv.style_priority = cve.style_priority,
|
||||||
cv.chart_type = cve.chart_type,
|
cv.chart_type = cve.chart_type,
|
||||||
cv.is_plugin = cve.is_plugin,
|
cv.is_plugin = cve.is_plugin,
|
||||||
cv.x_axis = cve.x_axis,
|
cv.x_axis = cve.x_axis,
|
||||||
cv.x_axis_ext = cve.x_axis_ext,
|
cv.x_axis_ext = cve.x_axis_ext,
|
||||||
cv.y_axis = cve.y_axis,
|
cv.y_axis = cve.y_axis,
|
||||||
cv.y_axis_ext = cve.y_axis_ext,
|
cv.y_axis_ext = cve.y_axis_ext,
|
||||||
cv.ext_stack = cve.ext_stack,
|
cv.ext_stack = cve.ext_stack,
|
||||||
cv.ext_bubble = cve.ext_bubble,
|
cv.ext_bubble = cve.ext_bubble,
|
||||||
cv.custom_attr = cve.custom_attr,
|
cv.custom_attr = cve.custom_attr,
|
||||||
cv.custom_style = cve.custom_style,
|
cv.custom_style = cve.custom_style,
|
||||||
cv.custom_filter = cve.custom_filter,
|
cv.custom_filter = cve.custom_filter,
|
||||||
cv.drill_fields = cve.drill_fields,
|
cv.drill_fields = cve.drill_fields,
|
||||||
cv.senior = cve.senior,
|
cv.senior = cve.senior,
|
||||||
cv.SNAPSHOT = cve.SNAPSHOT,
|
cv.SNAPSHOT = cve.SNAPSHOT,
|
||||||
cv.data_from = cve.data_from
|
cv.data_from = cve.data_from,
|
||||||
where cve.id = cv.id and cv.id =#{viewId}
|
cv.refresh_view_enable = cve.refresh_view_enable,
|
||||||
|
cv.refresh_unit = cve.refresh_unit,
|
||||||
|
cv.refresh_time = cve.refresh_time
|
||||||
|
where cve.id = cv.id and cv.id =#{viewId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
|
||||||
<update id="updateToViewFromCache">
|
<update id="updateToViewFromCache">
|
||||||
UPDATE chart_view_cache cve,
|
UPDATE chart_view_cache cve,
|
||||||
chart_view cv
|
chart_view cv
|
||||||
SET cv.`name` = cve.`name`,
|
SET cv.`name` = cve.`name`,
|
||||||
cv.title = cve.title,
|
cv.title = cve.title,
|
||||||
cv.scene_id = cve.scene_id,
|
cv.scene_id = cve.scene_id,
|
||||||
cv.table_id = cve.table_id,
|
cv.table_id = cve.table_id,
|
||||||
cv.`type` = cve.`type`,
|
cv.`type` = cve.`type`,
|
||||||
cv.render = cve.render,
|
cv.render = cve.render,
|
||||||
cv.result_count = cve.result_count,
|
cv.result_count = cve.result_count,
|
||||||
cv.result_mode = cve.result_mode,
|
cv.result_mode = cve.result_mode,
|
||||||
cv.create_by = cve.create_by,
|
cv.create_by = cve.create_by,
|
||||||
cv.create_time = cve.create_time,
|
cv.create_time = cve.create_time,
|
||||||
cv.update_time = cve.update_time,
|
cv.update_time = cve.update_time,
|
||||||
cv.style_priority = cve.style_priority,
|
cv.style_priority = cve.style_priority,
|
||||||
cv.chart_type = cve.chart_type,
|
cv.chart_type = cve.chart_type,
|
||||||
cv.is_plugin = cve.is_plugin,
|
cv.is_plugin = cve.is_plugin,
|
||||||
cv.x_axis = cve.x_axis,
|
cv.x_axis = cve.x_axis,
|
||||||
cv.x_axis_ext = cve.x_axis_ext,
|
cv.x_axis_ext = cve.x_axis_ext,
|
||||||
cv.y_axis = cve.y_axis,
|
cv.y_axis = cve.y_axis,
|
||||||
cv.y_axis_ext = cve.y_axis_ext,
|
cv.y_axis_ext = cve.y_axis_ext,
|
||||||
cv.ext_stack = cve.ext_stack,
|
cv.ext_stack = cve.ext_stack,
|
||||||
cv.ext_bubble = cve.ext_bubble,
|
cv.ext_bubble = cve.ext_bubble,
|
||||||
cv.custom_attr = cve.custom_attr,
|
cv.custom_attr = cve.custom_attr,
|
||||||
cv.custom_style = cve.custom_style,
|
cv.custom_style = cve.custom_style,
|
||||||
cv.custom_filter = cve.custom_filter,
|
cv.custom_filter = cve.custom_filter,
|
||||||
cv.drill_fields = cve.drill_fields,
|
cv.drill_fields = cve.drill_fields,
|
||||||
cv.senior = cve.senior,
|
cv.senior = cve.senior,
|
||||||
cv.SNAPSHOT = cve.SNAPSHOT,
|
cv.SNAPSHOT = cve.SNAPSHOT,
|
||||||
cv.data_from = cve.data_from
|
cv.data_from = cve.data_from,
|
||||||
where cve.id = cv.id and cv.id =#{viewId}
|
cv.refresh_view_enable = cve.refresh_view_enable,
|
||||||
|
cv.refresh_unit = cve.refresh_unit,
|
||||||
|
cv.refresh_time = cve.refresh_time
|
||||||
|
where cve.id = cv.id and cv.id =#{viewId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<delete id="deleteNoUseView">
|
<delete id="deleteNoUseView">
|
||||||
@ -600,55 +613,49 @@
|
|||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<select id="chartOptions" resultType="io.dataease.dto.chart.ViewOption">
|
<select id="chartOptions" resultType="io.dataease.dto.chart.ViewOption">
|
||||||
select id, title as name from chart_view where scene_id = #{panelId}
|
select id, title as name
|
||||||
|
from chart_view
|
||||||
|
where scene_id = #{panelId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id='chartFiledCopyWithPanel'>
|
<insert id='chartFiledCopyWithPanel'>
|
||||||
INSERT INTO chart_view_field (
|
INSERT INTO chart_view_field (id,
|
||||||
id,
|
table_id,
|
||||||
table_id,
|
chart_id,
|
||||||
chart_id,
|
origin_name,
|
||||||
origin_name,
|
`name`,
|
||||||
`name`,
|
dataease_name,
|
||||||
dataease_name,
|
group_type,
|
||||||
group_type,
|
`type`,
|
||||||
`type`,
|
`size`,
|
||||||
`size`,
|
de_type,
|
||||||
de_type,
|
de_type_format,
|
||||||
de_type_format,
|
de_extract_type,
|
||||||
de_extract_type,
|
ext_field,
|
||||||
ext_field,
|
`checked`,
|
||||||
`checked`,
|
column_index,
|
||||||
column_index,
|
last_sync_time)
|
||||||
last_sync_time
|
SELECT uuid() AS id,
|
||||||
) SELECT
|
chart_view_field.table_id,
|
||||||
uuid() AS id,
|
chart_view_field.pv_copy.chart_view_id AS chart_id,
|
||||||
chart_view_field.table_id,
|
chart_view_field.origin_name,
|
||||||
chart_view_field.pv_copy.chart_view_id AS chart_id,
|
chart_view_field.`name`,
|
||||||
chart_view_field.origin_name,
|
chart_view_field.dataease_name,
|
||||||
chart_view_field.`name`,
|
chart_view_field.group_type,
|
||||||
chart_view_field.dataease_name,
|
chart_view_field.`type`,
|
||||||
chart_view_field.group_type,
|
chart_view_field.`size`,
|
||||||
chart_view_field.`type`,
|
chart_view_field.de_type,
|
||||||
chart_view_field.`size`,
|
chart_view_field.de_type_format,
|
||||||
chart_view_field.de_type,
|
chart_view_field.de_extract_type,
|
||||||
chart_view_field.de_type_format,
|
chart_view_field.ext_field,
|
||||||
chart_view_field.de_extract_type,
|
chart_view_field.`checked`,
|
||||||
chart_view_field.ext_field,
|
chart_view_field.column_index,
|
||||||
chart_view_field.`checked`,
|
chart_view_field.last_sync_time
|
||||||
chart_view_field.column_index,
|
FROM (SELECT panel_id,
|
||||||
chart_view_field.last_sync_time
|
copy_from_view,
|
||||||
FROM
|
chart_view_id
|
||||||
(
|
FROM panel_view
|
||||||
SELECT
|
WHERE copy_id = #{copyId}) pv_copy
|
||||||
panel_id,
|
INNER JOIN chart_view_field ON chart_view_field.chart_id = pv_copy.copy_from_view
|
||||||
copy_from_view,
|
|
||||||
chart_view_id
|
|
||||||
FROM
|
|
||||||
panel_view
|
|
||||||
WHERE
|
|
||||||
copy_id = #{copyId}
|
|
||||||
) pv_copy
|
|
||||||
INNER JOIN chart_view_field ON chart_view_field.chart_id = pv_copy.copy_from_view
|
|
||||||
</insert>
|
</insert>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
@ -10,8 +10,25 @@ ALTER TABLE `sys_task`
|
|||||||
ADD COLUMN `status` tinyint(1) NULL DEFAULT 1 COMMENT '运行状态' AFTER `create_time`;
|
ADD COLUMN `status` tinyint(1) NULL DEFAULT 1 COMMENT '运行状态' AFTER `create_time`;
|
||||||
|
|
||||||
|
|
||||||
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`) VALUES (1100, 1, 0, 1, '血缘关系', 'sys-relationship', 'system/relationship/index', 1002, 'sys-relationship', 'relationship', 0, 0, 0, 'relationship:read');
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`,
|
||||||
|
`path`, `i_frame`, `cache`, `hidden`, `permission`)
|
||||||
|
VALUES (1100, 1, 0, 1, '血缘关系', 'sys-relationship', 'system/relationship/index', 1002, 'sys-relationship',
|
||||||
|
'relationship', 0, 0, 0, 'relationship:read');
|
||||||
|
|
||||||
UPDATE `sys_menu` SET `menu_sort` = 1003 WHERE (`menu_id` = 101);
|
UPDATE `sys_menu`
|
||||||
|
SET `menu_sort` = 1003
|
||||||
|
WHERE (`menu_id` = 101);
|
||||||
|
|
||||||
UPDATE `my_plugin` SET `version` = '1.18.0' where `plugin_id` > 0;
|
UPDATE `my_plugin`
|
||||||
|
SET `version` = '1.18.0'
|
||||||
|
where `plugin_id` > 0;
|
||||||
|
|
||||||
|
ALTER TABLE `chart_view`
|
||||||
|
ADD COLUMN `refresh_view_enable` tinyint(1) NULL DEFAULT 0 COMMENT '是否开启刷新' AFTER `view_fields`,
|
||||||
|
ADD COLUMN `refresh_unit` varchar(255) NULL DEFAULT 'minute' COMMENT '刷新时间单位' AFTER `refresh_view_enable`,
|
||||||
|
ADD COLUMN `refresh_time` int(13) NULL DEFAULT 5 COMMENT '刷新时间' AFTER `refresh_unit`;
|
||||||
|
|
||||||
|
ALTER TABLE `chart_view_cache`
|
||||||
|
ADD COLUMN `refresh_view_enable` tinyint(1) NULL DEFAULT 0 COMMENT '是否开启刷新' AFTER `view_fields`,
|
||||||
|
ADD COLUMN `refresh_unit` varchar(255) NULL DEFAULT 'minute' COMMENT '刷新时间单位' AFTER `refresh_view_enable`,
|
||||||
|
ADD COLUMN `refresh_time` int(13) NULL DEFAULT 5 COMMENT '刷新时间' AFTER `refresh_unit`;
|
||||||
|
@ -137,7 +137,7 @@
|
|||||||
:target="curComponent.hyperlinks.openMode "
|
:target="curComponent.hyperlinks.openMode "
|
||||||
:href="curComponent.hyperlinks.content "
|
:href="curComponent.hyperlinks.content "
|
||||||
>
|
>
|
||||||
<i class="icon iconfont icon-com-jump" />
|
<i class="icon iconfont icon-com-jump"/>
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
@ -496,19 +496,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 清除相同sourceViewId 的 联动条件
|
// 清除相同sourceViewId 的 联动条件
|
||||||
clearLinkage() {
|
clearLinkage() {
|
||||||
this.componentData.forEach(item => {
|
this.$store.commit('clearViewLinkage', this.element.propValue.viewId)
|
||||||
if (item.linkageFilters && item.linkageFilters.length > 0) {
|
|
||||||
const newList = item.linkageFilters.filter(linkage => linkage.sourceViewId !== this.element.propValue.viewId)
|
|
||||||
item.linkageFilters.splice(0, item.linkageFilters.length)
|
|
||||||
// 重新push 可保证数组指针不变 可以watch到
|
|
||||||
if (newList.length > 0) {
|
|
||||||
newList.forEach(newLinkage => {
|
|
||||||
item.linkageFilters.push(newLinkage)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
bus.$emit('clear_panel_linkage', { viewId: this.element.propValue.viewId })
|
|
||||||
},
|
},
|
||||||
goFile() {
|
goFile() {
|
||||||
this.$refs.files.click()
|
this.$refs.files.click()
|
||||||
|
@ -305,6 +305,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
innerRefreshTimer: null,
|
||||||
mobileChartDetailsVisible: false,
|
mobileChartDetailsVisible: false,
|
||||||
chartDetailsVisible: false,
|
chartDetailsVisible: false,
|
||||||
showChartInfo: {},
|
showChartInfo: {},
|
||||||
@ -393,7 +394,7 @@ export default {
|
|||||||
return this.httpRequest.status && this.chart.type && this.chart.type === 'label'
|
return this.httpRequest.status && this.chart.type && this.chart.type === 'label'
|
||||||
},
|
},
|
||||||
loadingFlag() {
|
loadingFlag() {
|
||||||
return (this.canvasStyleData.refreshViewLoading || this.searchCount === 0) && this.requestStatus === 'waiting'
|
return (this.canvasStyleData.refreshViewLoading || (!this.innerRefreshTimer && this.searchCount === 0)) && this.requestStatus === 'waiting'
|
||||||
},
|
},
|
||||||
panelInfo() {
|
panelInfo() {
|
||||||
return this.$store.state.panel.panelInfo
|
return this.$store.state.panel.panelInfo
|
||||||
@ -520,7 +521,8 @@ export default {
|
|||||||
},
|
},
|
||||||
// 监听外部计时器变化
|
// 监听外部计时器变化
|
||||||
searchCount: function(val1) {
|
searchCount: function(val1) {
|
||||||
if (val1 > 0 && this.requestStatus !== 'waiting') {
|
// 内部计时器启动 忽略外部计时器
|
||||||
|
if (val1 > 0 && this.requestStatus !== 'waiting' && !this.innerRefreshTimer) {
|
||||||
this.getData(this.element.propValue.viewId)
|
this.getData(this.element.propValue.viewId)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -547,6 +549,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
|
this.innerRefreshTimer && clearInterval(this.innerRefreshTimer)
|
||||||
bus.$off('plugin-chart-click', this.pluginChartClick)
|
bus.$off('plugin-chart-click', this.pluginChartClick)
|
||||||
bus.$off('plugin-jump-click', this.pluginJumpClick)
|
bus.$off('plugin-jump-click', this.pluginJumpClick)
|
||||||
bus.$off('plugin-add-view-track-filter', this.pluginAddViewTrackFilter)
|
bus.$off('plugin-add-view-track-filter', this.pluginAddViewTrackFilter)
|
||||||
@ -566,6 +569,20 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
//编辑状态下 不启动刷新
|
||||||
|
buildInnerRefreshTimer(refreshViewEnable = false, refreshUnit = 'minute', refreshTime = 5) {
|
||||||
|
if (this.editMode === 'preview' && !this.innerRefreshTimer && refreshViewEnable) {
|
||||||
|
this.innerRefreshTimer && clearInterval(this.innerRefreshTimer)
|
||||||
|
const timerRefreshTime = refreshUnit === 'second' ? refreshTime * 1000 : refreshTime * 60000
|
||||||
|
this.innerRefreshTimer = setInterval(() => {
|
||||||
|
this.clearViewLinkage()
|
||||||
|
this.getData(this.element.propValue.viewId)
|
||||||
|
}, timerRefreshTime)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
clearViewLinkage() {
|
||||||
|
this.$store.commit('clearViewLinkage', this.element.propValue.viewId)
|
||||||
|
},
|
||||||
responseResetButton() {
|
responseResetButton() {
|
||||||
if (!this.cfilters?.length) {
|
if (!this.cfilters?.length) {
|
||||||
this.getData(this.element.propValue.viewId, false)
|
this.getData(this.element.propValue.viewId, false)
|
||||||
@ -741,6 +758,7 @@ export default {
|
|||||||
if (response.success) {
|
if (response.success) {
|
||||||
this.chart = response.data
|
this.chart = response.data
|
||||||
this.view = response.data
|
this.view = response.data
|
||||||
|
this.buildInnerRefreshTimer(this.chart.refreshViewEnable, this.chart.refreshUnit, this.chart.refreshTime)
|
||||||
this.$emit('fill-chart-2-parent', this.chart)
|
this.$emit('fill-chart-2-parent', this.chart)
|
||||||
this.getDataOnly(response.data, dataBroadcast)
|
this.getDataOnly(response.data, dataBroadcast)
|
||||||
this.chart['position'] = this.inTab ? 'tab' : 'panel'
|
this.chart['position'] = this.inTab ? 'tab' : 'panel'
|
||||||
|
@ -931,6 +931,7 @@ export default {
|
|||||||
password_input_error: 'Original password input error'
|
password_input_error: 'Original password input error'
|
||||||
},
|
},
|
||||||
chart: {
|
chart: {
|
||||||
|
chart_refresh_tips: 'View refresh setting takes precedence over panel refresh setting',
|
||||||
'1-trend': 'trend',
|
'1-trend': 'trend',
|
||||||
'2-state': 'State',
|
'2-state': 'State',
|
||||||
'3-rank': 'Rank',
|
'3-rank': 'Rank',
|
||||||
|
@ -930,6 +930,7 @@ export default {
|
|||||||
password_input_error: '原始密碼輸入錯誤'
|
password_input_error: '原始密碼輸入錯誤'
|
||||||
},
|
},
|
||||||
chart: {
|
chart: {
|
||||||
|
chart_refresh_tips: '視圖刷新設置優先於儀表板刷新設置',
|
||||||
'1-trend': '趨勢',
|
'1-trend': '趨勢',
|
||||||
'2-state': '狀態',
|
'2-state': '狀態',
|
||||||
'3-rank': '排名',
|
'3-rank': '排名',
|
||||||
|
@ -929,6 +929,7 @@ export default {
|
|||||||
password_input_error: '原始密码输入错误'
|
password_input_error: '原始密码输入错误'
|
||||||
},
|
},
|
||||||
chart: {
|
chart: {
|
||||||
|
chart_refresh_tips: '视图刷新设置优先于仪表板刷新设置',
|
||||||
'1-trend': '趋势',
|
'1-trend': '趋势',
|
||||||
'2-state': '状态',
|
'2-state': '状态',
|
||||||
'3-rank': '排名',
|
'3-rank': '排名',
|
||||||
|
@ -824,6 +824,23 @@ const data = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
// 清除相同sourceViewId 的 联动条件
|
||||||
|
clearViewLinkage(state, viewId) {
|
||||||
|
state.componentData.forEach(item => {
|
||||||
|
if (item.linkageFilters && item.linkageFilters.length > 0) {
|
||||||
|
const newList = item.linkageFilters.filter(linkage => linkage.sourceViewId !== viewId)
|
||||||
|
item.linkageFilters.splice(0, item.linkageFilters.length)
|
||||||
|
// 重新push 可保证数组指针不变 可以watch到
|
||||||
|
if (newList.length > 0) {
|
||||||
|
newList.forEach(newLinkage => {
|
||||||
|
item.linkageFilters.push(newLinkage)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
bus.$emit('clear_panel_linkage', { viewId: viewId })
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
modules: {
|
modules: {
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
@click="add('group')"
|
@click="add('group')"
|
||||||
/>
|
/>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-divider />
|
<el-divider/>
|
||||||
<el-row style="margin-bottom: 10px">
|
<el-row style="margin-bottom: 10px">
|
||||||
<el-col :span="16">
|
<el-col :span="16">
|
||||||
<el-input
|
<el-input
|
||||||
@ -31,7 +31,7 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
type="primary"
|
type="primary"
|
||||||
>
|
>
|
||||||
{{ searchMap[searchType] }}<i class="el-icon-arrow-down el-icon--right" />
|
{{ searchMap[searchType] }}<i class="el-icon-arrow-down el-icon--right"/>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item @click.native="searchTypeClick('all')">{{ $t('commons.all') }}</el-dropdown-item>
|
<el-dropdown-item @click.native="searchTypeClick('all')">{{ $t('commons.all') }}</el-dropdown-item>
|
||||||
@ -63,7 +63,7 @@
|
|||||||
>
|
>
|
||||||
<span style="display: flex;flex: 1;width: 0;">
|
<span style="display: flex;flex: 1;width: 0;">
|
||||||
<span>
|
<span>
|
||||||
<i class="el-icon-folder" />
|
<i class="el-icon-folder"/>
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
style="margin-left: 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"
|
style="margin-left: 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"
|
||||||
@ -152,7 +152,7 @@
|
|||||||
class="custom-tree-node-list father"
|
class="custom-tree-node-list father"
|
||||||
>
|
>
|
||||||
<span style="display: flex;flex: 1;width: 0;">
|
<span style="display: flex;flex: 1;width: 0;">
|
||||||
<span><svg-icon :icon-class="data.modelInnerType" /></span>
|
<span><svg-icon :icon-class="data.modelInnerType"/></span>
|
||||||
<span
|
<span
|
||||||
style="margin-left: 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"
|
style="margin-left: 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"
|
||||||
:title="data.name"
|
:title="data.name"
|
||||||
@ -225,7 +225,7 @@
|
|||||||
:label="$t('commons.name')"
|
:label="$t('commons.name')"
|
||||||
prop="name"
|
prop="name"
|
||||||
>
|
>
|
||||||
<el-input v-model="groupForm.name" />
|
<el-input v-model="groupForm.name"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div
|
<div
|
||||||
@ -235,12 +235,14 @@
|
|||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="close()"
|
@click="close()"
|
||||||
>{{ $t('chart.cancel') }}</el-button>
|
>{{ $t('chart.cancel') }}
|
||||||
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="saveGroup(groupForm)"
|
@click="saveGroup(groupForm)"
|
||||||
>{{ $t('chart.confirm') }}</el-button>
|
>{{ $t('chart.confirm') }}
|
||||||
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -264,7 +266,7 @@
|
|||||||
:label="$t('commons.name')"
|
:label="$t('commons.name')"
|
||||||
prop="name"
|
prop="name"
|
||||||
>
|
>
|
||||||
<el-input v-model="tableForm.name" />
|
<el-input v-model="tableForm.name"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div
|
<div
|
||||||
@ -274,12 +276,14 @@
|
|||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="closeTable()"
|
@click="closeTable()"
|
||||||
>{{ $t('chart.cancel') }}</el-button>
|
>{{ $t('chart.cancel') }}
|
||||||
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="saveTable(tableForm)"
|
@click="saveTable(tableForm)"
|
||||||
>{{ $t('chart.confirm') }}</el-button>
|
>{{ $t('chart.confirm') }}
|
||||||
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
@ -318,8 +322,8 @@
|
|||||||
:active="createActive"
|
:active="createActive"
|
||||||
align-center
|
align-center
|
||||||
>
|
>
|
||||||
<el-step :title="$t('chart.select_dataset')" />
|
<el-step :title="$t('chart.select_dataset')"/>
|
||||||
<el-step :title="$t('chart.select_chart_type')" />
|
<el-step :title="$t('chart.select_chart_type')"/>
|
||||||
</el-steps>
|
</el-steps>
|
||||||
|
|
||||||
<table-selector
|
<table-selector
|
||||||
@ -385,14 +389,16 @@
|
|||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="closeCreateChart"
|
@click="closeCreateChart"
|
||||||
>{{ $t('chart.cancel') }}</el-button>
|
>{{ $t('chart.cancel') }}
|
||||||
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="createActive === 2"
|
v-if="createActive === 2"
|
||||||
type="primary"
|
type="primary"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="createPreview"
|
@click="createPreview"
|
||||||
>{{ $t('chart.preview')
|
>{{
|
||||||
}}
|
$t('chart.preview')
|
||||||
|
}}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="createActive === 1"
|
v-if="createActive === 1"
|
||||||
@ -433,14 +439,16 @@
|
|||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="closeMoveGroup()"
|
@click="closeMoveGroup()"
|
||||||
>{{ $t('dataset.cancel') }}</el-button>
|
>{{ $t('dataset.cancel') }}
|
||||||
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
:disabled="groupMoveConfirmDisabled"
|
:disabled="groupMoveConfirmDisabled"
|
||||||
type="primary"
|
type="primary"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="saveMoveGroup(tGroup)"
|
@click="saveMoveGroup(tGroup)"
|
||||||
>{{
|
>{{
|
||||||
$t('dataset.confirm') }}
|
$t('dataset.confirm')
|
||||||
|
}}
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@ -465,14 +473,16 @@
|
|||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="closeMoveDs()"
|
@click="closeMoveDs()"
|
||||||
>{{ $t('dataset.cancel') }}</el-button>
|
>{{ $t('dataset.cancel') }}
|
||||||
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
:disabled="dsMoveConfirmDisabled"
|
:disabled="dsMoveConfirmDisabled"
|
||||||
type="primary"
|
type="primary"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="saveMoveDs(tDs)"
|
@click="saveMoveDs(tDs)"
|
||||||
>{{
|
>{{
|
||||||
$t('dataset.confirm') }}
|
$t('dataset.confirm')
|
||||||
|
}}
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@ -480,27 +490,26 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { post, chartGroupTree } from '@/api/chart/chart'
|
import { chartGroupTree, pluginTypes, post } from '@/api/chart/chart'
|
||||||
import { queryAuthModel } from '@/api/authModel/authModel'
|
import { queryAuthModel } from '@/api/authModel/authModel'
|
||||||
import TableSelector from '../view/TableSelector'
|
import TableSelector from '../view/TableSelector'
|
||||||
import GroupMoveSelector from '../components/treeSelector/GroupMoveSelector'
|
import GroupMoveSelector from '../components/treeSelector/GroupMoveSelector'
|
||||||
import ChartMoveSelector from '../components/treeSelector/ChartMoveSelector'
|
import ChartMoveSelector from '../components/treeSelector/ChartMoveSelector'
|
||||||
import ChartType from '@/views/chart/view/ChartType'
|
import ChartType from '@/views/chart/view/ChartType'
|
||||||
import { pluginTypes } from '@/api/chart/chart'
|
|
||||||
import {
|
import {
|
||||||
DEFAULT_COLOR_CASE,
|
DEFAULT_COLOR_CASE,
|
||||||
|
DEFAULT_FUNCTION_CFG,
|
||||||
DEFAULT_LABEL,
|
DEFAULT_LABEL,
|
||||||
DEFAULT_LEGEND_STYLE,
|
DEFAULT_LEGEND_STYLE,
|
||||||
DEFAULT_SIZE,
|
DEFAULT_SIZE,
|
||||||
|
DEFAULT_SPLIT,
|
||||||
|
DEFAULT_THRESHOLD,
|
||||||
DEFAULT_TITLE_STYLE,
|
DEFAULT_TITLE_STYLE,
|
||||||
DEFAULT_TOOLTIP,
|
DEFAULT_TOOLTIP,
|
||||||
|
DEFAULT_TOTAL,
|
||||||
DEFAULT_XAXIS_STYLE,
|
DEFAULT_XAXIS_STYLE,
|
||||||
DEFAULT_YAXIS_STYLE,
|
|
||||||
DEFAULT_YAXIS_EXT_STYLE,
|
DEFAULT_YAXIS_EXT_STYLE,
|
||||||
DEFAULT_SPLIT,
|
DEFAULT_YAXIS_STYLE
|
||||||
DEFAULT_FUNCTION_CFG,
|
|
||||||
DEFAULT_THRESHOLD,
|
|
||||||
DEFAULT_TOTAL
|
|
||||||
} from '../chart/chart'
|
} from '../chart/chart'
|
||||||
import { checkViewTitle } from '@/components/canvas/utils/utils'
|
import { checkViewTitle } from '@/components/canvas/utils/utils'
|
||||||
import { adaptCurTheme } from '@/components/canvas/utils/style'
|
import { adaptCurTheme } from '@/components/canvas/utils/style'
|
||||||
@ -977,6 +986,9 @@ export default {
|
|||||||
view.render = this.view.render
|
view.render = this.view.render
|
||||||
view.resultMode = 'custom'
|
view.resultMode = 'custom'
|
||||||
view.resultCount = 1000
|
view.resultCount = 1000
|
||||||
|
view.refreshViewEnable = false
|
||||||
|
view.refreshUnit = 'minute'
|
||||||
|
view.refreshTime = 5
|
||||||
const customAttr = {
|
const customAttr = {
|
||||||
color: DEFAULT_COLOR_CASE,
|
color: DEFAULT_COLOR_CASE,
|
||||||
tableColor: DEFAULT_COLOR_CASE,
|
tableColor: DEFAULT_COLOR_CASE,
|
||||||
@ -1226,135 +1238,135 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.el-divider--horizontal {
|
.el-divider--horizontal {
|
||||||
margin: 12px 0
|
margin: 12px 0
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-input {
|
.search-input {
|
||||||
padding: 12px 0;
|
padding: 12px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-tree-container {
|
.custom-tree-container {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-tree-node {
|
.custom-tree-node {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
padding-right: 8px;
|
padding-right: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-tree-node-list {
|
.custom-tree-node-list {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
padding: 0 8px;
|
padding: 0 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tree-list ::v-deep .el-tree-node__expand-icon.is-leaf {
|
.tree-list ::v-deep .el-tree-node__expand-icon.is-leaf {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-position {
|
.custom-position {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
flex-flow: row nowrap;
|
flex-flow: row nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-item {
|
.form-item {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title-css {
|
.title-css {
|
||||||
height: 26px;
|
height: 26px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title-text {
|
.title-text {
|
||||||
line-height: 26px;
|
line-height: 26px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dialog-css ::v-deep .el-dialog__header {
|
.dialog-css ::v-deep .el-dialog__header {
|
||||||
padding: 20px 20px 0;
|
padding: 20px 20px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dialog-css ::v-deep .el-dialog__body {
|
.dialog-css ::v-deep .el-dialog__body {
|
||||||
padding: 10px 20px 20px;
|
padding: 10px 20px 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-item ::v-deep .el-form-item__label {
|
.form-item ::v-deep .el-form-item__label {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.scene-title {
|
.scene-title {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
.scene-title-name {
|
.scene-title-name {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|
||||||
.father .child {
|
.father .child {
|
||||||
/*display: none;*/
|
/*display: none;*/
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.father:hover .child {
|
.father:hover .child {
|
||||||
/*display: inline;*/
|
/*display: inline;*/
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tree-style {
|
.tree-style {
|
||||||
padding: 10px 15px;
|
padding: 10px 15px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ .vue-treeselect__control {
|
/deep/ .vue-treeselect__control {
|
||||||
height: 28px;
|
height: 28px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ .vue-treeselect__single-value {
|
/deep/ .vue-treeselect__single-value {
|
||||||
color: #606266;
|
color: #606266;
|
||||||
line-height: 28px !important;
|
line-height: 28px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.render-select ::v-deep .el-input__suffix {
|
.render-select ::v-deep .el-input__suffix {
|
||||||
width: 20px;
|
width: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.render-select ::v-deep .el-input__inner {
|
.render-select ::v-deep .el-input__inner {
|
||||||
padding-right: 10px;
|
padding-right: 10px;
|
||||||
padding-left: 6px;
|
padding-left: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dialog-css ::v-deep .el-step__title {
|
.dialog-css ::v-deep .el-step__title {
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chart-icon {
|
.chart-icon {
|
||||||
width: 200px;
|
width: 200px;
|
||||||
height: 200px;
|
height: 200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chart-box {
|
.chart-box {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
-moz-box-sizing: border-box;
|
-moz-box-sizing: border-box;
|
||||||
-webkit-box-sizing: border-box;
|
-webkit-box-sizing: border-box;
|
||||||
width: 50%;
|
width: 50%;
|
||||||
float: left;
|
float: left;
|
||||||
height: 380px;
|
height: 380px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -192,7 +192,7 @@
|
|||||||
@command="chartFieldEdit"
|
@command="chartFieldEdit"
|
||||||
>
|
>
|
||||||
<span class="el-dropdown-link">
|
<span class="el-dropdown-link">
|
||||||
<i class="el-icon-s-tools" />
|
<i class="el-icon-s-tools"/>
|
||||||
</span>
|
</span>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
@ -267,7 +267,7 @@
|
|||||||
@command="chartFieldEdit"
|
@command="chartFieldEdit"
|
||||||
>
|
>
|
||||||
<span class="el-dropdown-link">
|
<span class="el-dropdown-link">
|
||||||
<i class="el-icon-s-tools" />
|
<i class="el-icon-s-tools"/>
|
||||||
</span>
|
</span>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
@ -362,7 +362,7 @@
|
|||||||
style="padding: 6px;"
|
style="padding: 6px;"
|
||||||
>
|
>
|
||||||
{{ $t('chart.change_chart_type') }}
|
{{ $t('chart.change_chart_type') }}
|
||||||
<i class="el-icon-caret-bottom" />
|
<i class="el-icon-caret-bottom"/>
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
</span>
|
</span>
|
||||||
@ -406,6 +406,68 @@
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<el-row class="padding-lr">
|
||||||
|
<!-- <span-->
|
||||||
|
<!-- style="color: #909399; font-size: 8px;width: 80px;text-align: right;"-->
|
||||||
|
<!-- >-->
|
||||||
|
<!-- Tips:{{ $t('chart.rich_text_view_result_tips') }}-->
|
||||||
|
<!-- </span>-->
|
||||||
|
<span
|
||||||
|
style="width: 80px;text-align: right;"
|
||||||
|
>
|
||||||
|
{{ $t('panel.refresh_frequency') }}
|
||||||
|
</span>
|
||||||
|
<el-tooltip
|
||||||
|
class="item"
|
||||||
|
effect="dark"
|
||||||
|
placement="bottom"
|
||||||
|
>
|
||||||
|
<div slot="content">
|
||||||
|
{{ $t('chart.chart_refresh_tips') }}
|
||||||
|
</div>
|
||||||
|
<i
|
||||||
|
class="el-icon-info"
|
||||||
|
style="cursor: pointer;color: #606266;font-size: 12px"
|
||||||
|
/>
|
||||||
|
</el-tooltip>
|
||||||
|
<span class="padding-lr">
|
||||||
|
<el-checkbox
|
||||||
|
v-model="view.refreshViewEnable"
|
||||||
|
class="el-input-refresh-loading"
|
||||||
|
@change="refreshAttrChange"
|
||||||
|
></el-checkbox>
|
||||||
|
{{ $t('panel.enable_refresh_view') }}
|
||||||
|
</span>
|
||||||
|
<el-row>
|
||||||
|
<el-input
|
||||||
|
v-model="view.refreshTime"
|
||||||
|
class="el-input-refresh-time"
|
||||||
|
type="number"
|
||||||
|
size="mini"
|
||||||
|
controls-position="right"
|
||||||
|
:min="1"
|
||||||
|
:max="3600"
|
||||||
|
:disabled="!view.refreshViewEnable"
|
||||||
|
@change="refreshAttrChange"
|
||||||
|
/>
|
||||||
|
<el-select
|
||||||
|
v-model="view.refreshUnit"
|
||||||
|
class="el-input-refresh-unit margin-left8"
|
||||||
|
size="mini"
|
||||||
|
:disabled="!view.refreshViewEnable"
|
||||||
|
@change="refreshAttrChange"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
:label="$t('panel.minute')"
|
||||||
|
:value="'minute'"
|
||||||
|
/>
|
||||||
|
<el-option
|
||||||
|
:label="$t('panel.second')"
|
||||||
|
:value="'second'"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-row>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
<plugin-com
|
<plugin-com
|
||||||
v-if="view.isPlugin"
|
v-if="view.isPlugin"
|
||||||
@ -490,8 +552,8 @@
|
|||||||
>
|
>
|
||||||
<span class="data-area-label">
|
<span class="data-area-label">
|
||||||
<span v-if="view.type && view.type.includes('table')">{{
|
<span v-if="view.type && view.type.includes('table')">{{
|
||||||
$t('chart.drag_block_table_data_column')
|
$t('chart.drag_block_table_data_column')
|
||||||
}}</span>
|
}}</span>
|
||||||
<span
|
<span
|
||||||
v-else-if="view.type && (view.type.includes('bar') || view.type.includes('line') || view.type.includes('scatter') || view.type === 'chart-mix' || view.type === 'waterfall' || view.type === 'area')"
|
v-else-if="view.type && (view.type.includes('bar') || view.type.includes('line') || view.type.includes('scatter') || view.type === 'chart-mix' || view.type === 'waterfall' || view.type === 'area')"
|
||||||
>{{ $t('chart.drag_block_type_axis') }}</span>
|
>{{ $t('chart.drag_block_type_axis') }}</span>
|
||||||
@ -499,18 +561,18 @@
|
|||||||
v-else-if="view.type && view.type.includes('pie')"
|
v-else-if="view.type && view.type.includes('pie')"
|
||||||
>{{ $t('chart.drag_block_pie_label') }}</span>
|
>{{ $t('chart.drag_block_pie_label') }}</span>
|
||||||
<span v-else-if="view.type && view.type.includes('funnel')">{{
|
<span v-else-if="view.type && view.type.includes('funnel')">{{
|
||||||
$t('chart.drag_block_funnel_split')
|
$t('chart.drag_block_funnel_split')
|
||||||
}}</span>
|
}}</span>
|
||||||
<span v-else-if="view.type && view.type.includes('radar')">{{
|
<span v-else-if="view.type && view.type.includes('radar')">{{
|
||||||
$t('chart.drag_block_radar_label')
|
$t('chart.drag_block_radar_label')
|
||||||
}}</span>
|
}}</span>
|
||||||
<span v-else-if="view.type && view.type === 'map'">{{ $t('chart.area') }}</span>
|
<span v-else-if="view.type && view.type === 'map'">{{ $t('chart.area') }}</span>
|
||||||
<span v-else-if="view.type && view.type.includes('treemap')">{{
|
<span v-else-if="view.type && view.type.includes('treemap')">{{
|
||||||
$t('chart.drag_block_treemap_label')
|
$t('chart.drag_block_treemap_label')
|
||||||
}}</span>
|
}}</span>
|
||||||
<span v-else-if="view.type && view.type === 'word-cloud'">{{
|
<span v-else-if="view.type && view.type === 'word-cloud'">{{
|
||||||
$t('chart.drag_block_word_cloud_label')
|
$t('chart.drag_block_word_cloud_label')
|
||||||
}}</span>
|
}}</span>
|
||||||
<span v-else-if="view.type && view.type === 'label'">{{ $t('chart.drag_block_label') }}</span>
|
<span v-else-if="view.type && view.type === 'label'">{{ $t('chart.drag_block_label') }}</span>
|
||||||
<span v-show="view.type !== 'richTextView'"> / </span>
|
<span v-show="view.type !== 'richTextView'"> / </span>
|
||||||
<span v-if="view.type && view.type !== 'table-info'">{{ $t('chart.dimension') }}</span>
|
<span v-if="view.type && view.type !== 'table-info'">{{ $t('chart.dimension') }}</span>
|
||||||
@ -633,8 +695,8 @@
|
|||||||
>
|
>
|
||||||
<span class="data-area-label">
|
<span class="data-area-label">
|
||||||
<span v-if="view.type && view.type.includes('table')">{{
|
<span v-if="view.type && view.type.includes('table')">{{
|
||||||
$t('chart.drag_block_table_data_column')
|
$t('chart.drag_block_table_data_column')
|
||||||
}}</span>
|
}}</span>
|
||||||
<span
|
<span
|
||||||
v-else-if="view.type && (view.type.includes('bar') || view.type.includes('line') || view.type.includes('scatter') || view.type === 'waterfall' || view.type === 'area')"
|
v-else-if="view.type && (view.type.includes('bar') || view.type.includes('line') || view.type.includes('scatter') || view.type === 'waterfall' || view.type === 'area')"
|
||||||
>{{ $t('chart.drag_block_value_axis') }}</span>
|
>{{ $t('chart.drag_block_value_axis') }}</span>
|
||||||
@ -642,30 +704,30 @@
|
|||||||
v-else-if="view.type && view.type.includes('pie')"
|
v-else-if="view.type && view.type.includes('pie')"
|
||||||
>{{ $t('chart.drag_block_pie_angel') }}</span>
|
>{{ $t('chart.drag_block_pie_angel') }}</span>
|
||||||
<span v-else-if="view.type && view.type.includes('funnel')">{{
|
<span v-else-if="view.type && view.type.includes('funnel')">{{
|
||||||
$t('chart.drag_block_funnel_width')
|
$t('chart.drag_block_funnel_width')
|
||||||
}}</span>
|
}}</span>
|
||||||
<span v-else-if="view.type && view.type.includes('radar')">{{
|
<span v-else-if="view.type && view.type.includes('radar')">{{
|
||||||
$t('chart.drag_block_radar_length')
|
$t('chart.drag_block_radar_length')
|
||||||
}}</span>
|
}}</span>
|
||||||
<span v-else-if="view.type && view.type.includes('gauge')">{{
|
<span v-else-if="view.type && view.type.includes('gauge')">{{
|
||||||
$t('chart.drag_block_gauge_angel')
|
$t('chart.drag_block_gauge_angel')
|
||||||
}}</span>
|
}}</span>
|
||||||
<span
|
<span
|
||||||
v-else-if="view.type && view.type.includes('text')"
|
v-else-if="view.type && view.type.includes('text')"
|
||||||
>{{ $t('chart.drag_block_label_value') }}</span>
|
>{{ $t('chart.drag_block_label_value') }}</span>
|
||||||
<span v-else-if="view.type && view.type === 'map'">{{ $t('chart.chart_data') }}</span>
|
<span v-else-if="view.type && view.type === 'map'">{{ $t('chart.chart_data') }}</span>
|
||||||
<span v-else-if="view.type && view.type.includes('tree')">{{
|
<span v-else-if="view.type && view.type.includes('tree')">{{
|
||||||
$t('chart.drag_block_treemap_size')
|
$t('chart.drag_block_treemap_size')
|
||||||
}}</span>
|
}}</span>
|
||||||
<span v-else-if="view.type && view.type === 'chart-mix'">{{
|
<span v-else-if="view.type && view.type === 'chart-mix'">{{
|
||||||
$t('chart.drag_block_value_axis_main')
|
$t('chart.drag_block_value_axis_main')
|
||||||
}}</span>
|
}}</span>
|
||||||
<span
|
<span
|
||||||
v-else-if="view.type && view.type === 'liquid'"
|
v-else-if="view.type && view.type === 'liquid'"
|
||||||
>{{ $t('chart.drag_block_progress') }}</span>
|
>{{ $t('chart.drag_block_progress') }}</span>
|
||||||
<span v-else-if="view.type && view.type === 'word-cloud'">{{
|
<span v-else-if="view.type && view.type === 'word-cloud'">{{
|
||||||
$t('chart.drag_block_word_cloud_size')
|
$t('chart.drag_block_word_cloud_size')
|
||||||
}}</span>
|
}}</span>
|
||||||
<span v-show="view.type !== 'richTextView'"> / </span>
|
<span v-show="view.type !== 'richTextView'"> / </span>
|
||||||
<span>{{ $t('chart.quota') }}</span>
|
<span>{{ $t('chart.quota') }}</span>
|
||||||
<i
|
<i
|
||||||
@ -1137,7 +1199,7 @@
|
|||||||
:title="$t('panel.position_adjust_component')"
|
:title="$t('panel.position_adjust_component')"
|
||||||
:name="'positionAdjust'"
|
:name="'positionAdjust'"
|
||||||
>
|
>
|
||||||
<position-adjust />
|
<position-adjust/>
|
||||||
</el-collapse-item>
|
</el-collapse-item>
|
||||||
</el-collapse>
|
</el-collapse>
|
||||||
</div>
|
</div>
|
||||||
@ -1293,7 +1355,7 @@
|
|||||||
width="800px"
|
width="800px"
|
||||||
class="dialog-css"
|
class="dialog-css"
|
||||||
>
|
>
|
||||||
<quota-filter-editor :item="quotaItem" />
|
<quota-filter-editor :item="quotaItem"/>
|
||||||
<div
|
<div
|
||||||
slot="footer"
|
slot="footer"
|
||||||
class="dialog-footer"
|
class="dialog-footer"
|
||||||
@ -1320,7 +1382,7 @@
|
|||||||
width="800px"
|
width="800px"
|
||||||
class="dialog-css"
|
class="dialog-css"
|
||||||
>
|
>
|
||||||
<dimension-filter-editor :item="dimensionItem" />
|
<dimension-filter-editor :item="dimensionItem"/>
|
||||||
<div
|
<div
|
||||||
slot="footer"
|
slot="footer"
|
||||||
class="dialog-footer"
|
class="dialog-footer"
|
||||||
@ -1622,8 +1684,8 @@ import {
|
|||||||
pluginTypes,
|
pluginTypes,
|
||||||
post,
|
post,
|
||||||
resetViewCacheCallBack,
|
resetViewCacheCallBack,
|
||||||
viewEditSave,
|
tableField,
|
||||||
tableField
|
viewEditSave
|
||||||
} from '@/api/chart/chart'
|
} from '@/api/chart/chart'
|
||||||
import DimensionItem from '../components/dragItem/DimensionItem'
|
import DimensionItem from '../components/dragItem/DimensionItem'
|
||||||
import QuotaItem from '../components/dragItem/QuotaItem'
|
import QuotaItem from '../components/dragItem/QuotaItem'
|
||||||
@ -1683,6 +1745,7 @@ import CalcChartFieldEdit from '@/views/chart/view/CalcChartFieldEdit'
|
|||||||
import { equalsAny } from '@/utils/StringUtils'
|
import { equalsAny } from '@/utils/StringUtils'
|
||||||
import PositionAdjust from '@/views/chart/view/PositionAdjust'
|
import PositionAdjust from '@/views/chart/view/PositionAdjust'
|
||||||
import MarkMapDataEditor from '@/views/chart/components/map/MarkMapDataEditor'
|
import MarkMapDataEditor from '@/views/chart/components/map/MarkMapDataEditor'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ChartEdit',
|
name: 'ChartEdit',
|
||||||
components: {
|
components: {
|
||||||
@ -1759,6 +1822,9 @@ export default {
|
|||||||
show: true,
|
show: true,
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
title: '',
|
title: '',
|
||||||
|
refreshViewEnable: false,
|
||||||
|
refreshUnit: 'minute',
|
||||||
|
refreshTime: 5,
|
||||||
customAttr: {
|
customAttr: {
|
||||||
color: DEFAULT_COLOR_CASE,
|
color: DEFAULT_COLOR_CASE,
|
||||||
size: DEFAULT_SIZE,
|
size: DEFAULT_SIZE,
|
||||||
@ -2291,6 +2357,12 @@ export default {
|
|||||||
delete view.data
|
delete view.data
|
||||||
return view
|
return view
|
||||||
},
|
},
|
||||||
|
refreshAttrChange(switchType = false, switchRender = false) {
|
||||||
|
this.changeEditStatus(true)
|
||||||
|
const view = this.buildParam(true, 'chart', false, switchType, switchRender)
|
||||||
|
if (!view) return
|
||||||
|
viewEditSave(this.panelInfo.id, view)
|
||||||
|
},
|
||||||
calcData(getData, trigger, needRefreshGroup = false, switchType = false, switchRender = false) {
|
calcData(getData, trigger, needRefreshGroup = false, switchType = false, switchRender = false) {
|
||||||
this.changeEditStatus(true)
|
this.changeEditStatus(true)
|
||||||
const view = this.buildParam(true, 'chart', false, switchType, switchRender)
|
const view = this.buildParam(true, 'chart', false, switchType, switchRender)
|
||||||
@ -3834,4 +3906,19 @@ span {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.el-input-refresh-time {
|
||||||
|
width: calc(50% - 4px) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-input-refresh-unit {
|
||||||
|
margin-left: 8px;
|
||||||
|
width: calc(50% - 4px) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-input-refresh-loading {
|
||||||
|
margin-left: 4px;
|
||||||
|
font-size: 12px !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -49,7 +49,6 @@
|
|||||||
<el-checkbox
|
<el-checkbox
|
||||||
v-model="overallSettingForm.refreshViewLoading"
|
v-model="overallSettingForm.refreshViewLoading"
|
||||||
class="el-input-refresh-loading"
|
class="el-input-refresh-loading"
|
||||||
:disabled="!overallSettingForm.refreshViewEnable"
|
|
||||||
@change="themeChange"
|
@change="themeChange"
|
||||||
>{{ $t('panel.enable_view_loading') }}</el-checkbox>
|
>{{ $t('panel.enable_view_loading') }}</el-checkbox>
|
||||||
</span>
|
</span>
|
||||||
|
Loading…
Reference in New Issue
Block a user