Merge branch 'dev-v2' into pr@dev-v2@perf_embedded_interactive

This commit is contained in:
fit2cloud-chenyw 2024-04-03 16:41:13 +08:00
commit 66cc69280e
23 changed files with 53 additions and 15 deletions

View File

@ -14,6 +14,7 @@ public interface XpackShareExtMapper {
select
s.id as share_id,
v.id as resource_id,
v.mobile_layout as ext_flag,
v.type,
s.creator,
s.time,

View File

@ -28,4 +28,6 @@ public class XpackSharePO implements Serializable {
private Long exp;
private Integer extFlag;
}

View File

@ -139,7 +139,7 @@ public class XpackShareManage {
return pos.stream().map(po ->
new XpackShareGridVO(
po.getShareId(), po.getResourceId(), po.getName(), po.getCreator().toString(),
po.getTime(), po.getExp(), 9)).toList();
po.getTime(), po.getExp(), 9,po.getExtFlag())).toList();
}
private XpackShareManage proxy() {

View File

@ -18,7 +18,8 @@ public interface CoreStoreExtMapper {
v.create_by as creator,
v.update_by as editor,
v.update_time as edit_time,
v.name
v.name,
v.mobile_layout as ext_flag
from core_store s
left join data_visualization_info v on s.resource_id = v.id
${ew.customSqlSegment}

View File

@ -24,4 +24,6 @@ public class StorePO implements Serializable {
private String name;
private Integer extFlag;
}

View File

@ -35,4 +35,6 @@ public class VisualizationResourcePO implements Serializable {
private Boolean favorite;
private int weight;
private Integer extFlag;
}

View File

@ -176,7 +176,7 @@ public class CoreVisualizationManage {
new VisualizationResourceVO(
po.getId(), po.getResourceId(), po.getName(),
po.getType(), String.valueOf(po.getCreator()), String.valueOf(po.getLastEditor()), po.getLastEditTime(),
po.getFavorite(), 9)).toList();
po.getFavorite(), 9,po.getExtFlag())).toList();
}
public IPage<VisualizationResourcePO> queryVisualizationPage(int goPage, int pageSize, VisualizationWorkbranchQueryRequest request) {

View File

@ -89,7 +89,7 @@ public class VisualizationStoreManage {
new VisualizationStoreVO(
po.getStoreId(), po.getResourceId(), po.getName(),
po.getType(), String.valueOf(po.getCreator()), ObjectUtils.isEmpty(po.getEditor()) ? null : String.valueOf(po.getEditor()),
po.getEditTime(), 9)).toList();
po.getEditTime(), 9,po.getExtFlag())).toList();
}
public IPage<StorePO> queryStorePage(int goPage, int pageSize, VisualizationWorkbranchQueryRequest request) {

View File

@ -36,5 +36,5 @@ CREATE TABLE `visualization_outer_params_target_view_info` (
ALTER TABLE `data_visualization_info`
MODIFY COLUMN `mobile_layout` tinyint NULL DEFAULT 0 COMMENT '移动端布局0-关闭 1-开启';
update data_visualization_info set mobile_layout = 0;
INSERT INTO `core_sys_setting` (`id`, `pkey`, `pval`, `type`, `sort`) VALUES (3, 'ai.baseUrl', 'https://maxkb.fit2cloud.com/ui/chat/2ddd8b594ce09dbb', 'text', 0);

View File

@ -37,5 +37,5 @@ CREATE TABLE `visualization_outer_params_target_view_info` (
ALTER TABLE `data_visualization_info`
MODIFY COLUMN `mobile_layout` tinyint NULL DEFAULT 0 COMMENT '移动端布局0-关闭 1-开启';
update data_visualization_info set mobile_layout = 0;
INSERT INTO `core_sys_setting` (`id`, `pkey`, `pval`, `type`, `sort`) VALUES (3, 'ai.baseUrl', 'https://maxkb.fit2cloud.com/ui/chat/2ddd8b594ce09dbb', 'text', 0);

View File

@ -143,6 +143,7 @@
`canvas_style_data`,
`component_data`,
`mobile_layout`,
`mobile_layout` as ext_flag,
`status`,
`self_watermark_status`,
`sort`,
@ -165,6 +166,7 @@
SELECT dvResource.id,
dvResource.resource_id,
dvResource.name,
dvResource.ext_flag,
dvResource.type,
dvResource.creator,
core_opt_recent.uid AS last_editor,
@ -180,6 +182,7 @@
FROM (SELECT core_dataset_group.id,
core_dataset_group.id AS resource_id,
core_dataset_group.NAME,
0 as ext_flag,
'dataset' AS type,
core_dataset_group.create_by AS creator
FROM core_dataset_group
@ -188,6 +191,7 @@
SELECT core_datasource.id,
core_datasource.id AS resource_id,
core_datasource.NAME,
0 as ext_flag,
'datasource' AS type,
core_datasource.create_by AS creator
FROM core_datasource
@ -197,6 +201,7 @@
data_visualization_info.id,
data_visualization_info.id AS resource_id,
data_visualization_info.NAME,
data_visualization_info.`mobile_layout` as ext_flag,
(
CASE
data_visualization_info.type

View File

@ -220,6 +220,7 @@ const setTypeChange = () => {
}
const cancelClick = () => {
visiblePopover.value = false
dialogVisible.value = false
}
@ -510,6 +511,7 @@ const handleBeforeClose = () => {
const confirmClick = () => {
if (validate()) return
inputCom.value?.mult?.handleClickOutside?.()
visiblePopover.value = false
dialogVisible.value = false
conditions.value.forEach(ele => {
curComponent.value = ele

View File

@ -237,7 +237,6 @@ onMounted(() => {
/>
</el-form-item>
<el-form-item
:label="t('chart.table_show_index')"
class="form-item"
:class="'form-item-' + themes"
v-if="showProperty('tableHeaderSort')"

View File

@ -1,4 +1,4 @@
import { S2Event, S2Options, TableColCell, TableDataCell, TableSheet } from '@antv/s2'
import { S2Event, S2Options, TableColCell, TableDataCell, TableSheet, ViewMeta } from '@antv/s2'
import { formatterItem, valueFormatter } from '../../../formatter'
import { parseJson } from '../../../util'
import { S2ChartView, S2DrawOptions } from '../../types/impl/s2'
@ -143,13 +143,13 @@ export class TableInfo extends S2ChartView<TableSheet> {
// click
newChart.on(S2Event.DATA_CELL_CLICK, ev => {
const cell = newChart.getCell(ev.target)
const meta = cell.getMeta()
const meta = cell.getMeta() as ViewMeta
const nameIdMap = fields.reduce((pre, next) => {
pre[next['dataeaseName']] = next['id']
return pre
}, {})
const rowData = chart.data.tableRow[meta.rowIndex] as any
const rowData = newChart.dataSet.getRowData(meta)
const dimensionList = []
for (const key in rowData) {
if (nameIdMap[key]) {

View File

@ -1,5 +1,5 @@
import { S2ChartView, S2DrawOptions } from '@/views/chart/components/js/panel/types/impl/s2'
import { S2Event, S2Options, TableSheet, TableColCell } from '@antv/s2'
import { S2Event, S2Options, TableSheet, TableColCell, ViewMeta } from '@antv/s2'
import { parseJson } from '@/views/chart/components/js/util'
import { formatterItem, valueFormatter } from '@/views/chart/components/js/formatter'
import { copyContent, getCurrentField } from '@/views/chart/components/js/panel/common/common_table'
@ -139,13 +139,13 @@ export class TableNormal extends S2ChartView<TableSheet> {
// click
newChart.on(S2Event.DATA_CELL_CLICK, ev => {
const cell = newChart.getCell(ev.target)
const meta = cell.getMeta()
const meta = cell.getMeta() as ViewMeta
const nameIdMap = fields.reduce((pre, next) => {
pre[next['dataeaseName']] = next['id']
return pre
}, {})
const rowData = chart.data.tableRow[meta.rowIndex] as any
const rowData = newChart.dataSet.getRowData(meta)
const dimensionList = []
for (const key in rowData) {
if (nameIdMap[key]) {

View File

@ -316,6 +316,9 @@ const onDrillFilters = param => {
const windowsJump = (url, jumpType) => {
try {
window.open(url, jumpType)
if (jumpType === '_self') {
location.reload()
}
} catch (e) {
ElMessage.error(t('visualization.url_check_error') + ':' + url)
}

View File

@ -164,7 +164,12 @@ watch(
<el-table-column key="name" width="280" prop="name" :label="t('common.name')">
<template v-slot:default="scope">
<div class="name-content">
<el-icon class="main-color"> <Icon name="icon_dashboard_outlined" /> </el-icon>
<el-icon style="margin-right: 12px; font-size: 18px" v-if="scope.row.extFlag">
<Icon name="dv-dashboard-spine-mobile"></Icon>
</el-icon>
<el-icon class="main-color" v-else>
<Icon name="icon_dashboard_outlined" />
</el-icon>
<el-tooltip placement="top">
<template #content>{{ scope.row.name }}</template>
<span class="ellipsis" style="max-width: 250px">{{ scope.row.name }}</span>

View File

@ -36,7 +36,9 @@ const state = reactive({
const busiDataMap = computed(() => interactiveStore.getData)
const iconMap = {
panel: 'icon_dashboard_outlined',
panelMobile: 'dv-dashboard-spine-mobile',
dashboard: 'icon_dashboard_outlined',
dashboardMobile: 'dv-dashboard-spine-mobile',
screen: 'icon_operation-analysis_outlined',
dataV: 'icon_operation-analysis_outlined',
dataset: 'icon_app_outlined',
@ -281,7 +283,10 @@ const getEmptyDesc = (): string => {
<el-table-column key="name" width="280" prop="name" :label="t('common.name')">
<template v-slot:default="scope">
<div class="name-content" :class="{ 'jump-active': jumpActiveCheck(scope.row) }">
<el-icon :class="`main-color color-${scope.row.type}`">
<el-icon v-if="scope.row.extFlag" style="margin-right: 12px; font-size: 18px">
<Icon :name="iconMap[scope.row.type + 'Mobile']" />
</el-icon>
<el-icon v-else :class="`main-color color-${scope.row.type}`">
<Icon :name="iconMap[scope.row.type]" />
</el-icon>
<el-tooltip placement="top">

View File

@ -65,6 +65,10 @@ public class DataVisualizationVO implements Serializable {
* 移动端布局
*/
private Boolean mobileLayout;
/**
* 移动端布局
*/
private Integer extFlag;
/**
* 状态 0-未发布 1-已发布

View File

@ -35,4 +35,6 @@ public class VisualizationResourceVO implements Serializable {
private Boolean favorite;
private int weight;
private Integer extFlag;
}

View File

@ -33,4 +33,6 @@ public class VisualizationStoreVO implements Serializable {
private Long lastEditTime;
private int weight;
private Integer extFlag;
}

View File

@ -36,4 +36,6 @@ public class XpackShareGridVO implements Serializable {
@Schema(description = "权重")
private Integer weight;
private Integer extFlag;
}

View File

@ -21,4 +21,5 @@ public class Target {
private String incrementSync;
private String incrementField;
private String datasourceVersion;
private double faultToleranceRate;
}