merge: 代码冲突

This commit is contained in:
fit2cloud-chenyw 2024-06-17 17:42:30 +08:00
commit a8e1241e7f
30 changed files with 273 additions and 98 deletions

View File

@ -541,11 +541,18 @@ public class ChartDataManage {
ChartExtFilterDTO tmpFilter = new ChartExtFilterDTO();
DatasetTableFieldDTO datasetTableField = datasetTableFieldManage.selectById(tmpField.getId());
tmpFilter.setDatasetTableField(datasetTableField);
tmpFilter.setOperator("in");
tmpFilter.setDateStyle(fieldMap.get(tmpField.getId()).getDateStyle());
tmpFilter.setDatePattern(fieldMap.get(tmpField.getId()).getDatePattern());
tmpFilter.setFieldId(String.valueOf(tmpField.getId()));
tmpFilter.setValue(Collections.singletonList(dimValMap.get(tmpField.getId())));
if (datasetTableField.getDeType() == 1) {
tmpFilter.setOperator("between");
// 把value类似过滤组件处理获得start time和end time
Map<String, Long> stringLongMap = Utils.parseDateTimeValue(dimValMap.get(tmpField.getId()));
tmpFilter.setValue(Arrays.asList(String.valueOf(stringLongMap.get("startTime")), String.valueOf(stringLongMap.get("endTime"))));
} else {
tmpFilter.setOperator("in");
tmpFilter.setValue(Collections.singletonList(dimValMap.get(tmpField.getId())));
}
extFilterList.add(tmpFilter);
drillFilters.add(tmpFilter);
}
@ -614,11 +621,14 @@ public class ChartDataManage {
if (Arrays.asList(ChartConstants.M_Y).contains(compareCalc.getType())) {
if (StringUtils.equalsIgnoreCase(compareCalc.getField() + "", filterDTO.getFieldId())) {
// -1 year
Calendar calendar = Calendar.getInstance();
calendar.setTime(new Date(Long.parseLong(filterDTO.getValue().getFirst())));
calendar.add(Calendar.YEAR, -1);
filterDTO.getValue().set(0, String.valueOf(calendar.getTime().getTime()));
isYOY = true;
try {
Calendar calendar = Calendar.getInstance();
calendar.setTime(new Date(Long.parseLong(filterDTO.getValue().getFirst())));
calendar.add(Calendar.YEAR, -1);
filterDTO.getValue().set(0, String.valueOf(calendar.getTime().getTime()));
isYOY = true;
} catch (Exception e) {
}
}
}
}
@ -1594,7 +1604,7 @@ public class ChartDataManage {
private List<ChartViewFieldDTO> getAllChartFields(ChartViewDTO view) {
// get all fields
Map<String, List<ChartViewFieldDTO>> stringListMap = chartViewManege.listByDQ(view.getTableId(), view.getId());
Map<String, List<ChartViewFieldDTO>> stringListMap = chartViewManege.listByDQ(view.getTableId(), view.getId(), view);
List<ChartViewFieldDTO> dimensionList = stringListMap.get("dimensionList");
List<ChartViewFieldDTO> quotaList = stringListMap.get("quotaList");
List<ChartViewFieldDTO> allFields = new ArrayList<>();

View File

@ -118,7 +118,7 @@ public class ChartViewManege {
return chartDataManage.calcData(details);
}
public Map<String, List<ChartViewFieldDTO>> listByDQ(Long id, Long chartId) {
public Map<String, List<ChartViewFieldDTO>> listByDQ(Long id, Long chartId, ChartViewDTO chartViewDTO) {
QueryWrapper<CoreDatasetTableField> wrapper = new QueryWrapper<>();
wrapper.eq("dataset_group_id", id);
wrapper.eq("checked", true);
@ -133,6 +133,9 @@ public class ChartViewManege {
// filter column disable field
Map<String, ColumnPermissionItem> desensitizationList = new HashMap<>();
List<DatasetTableFieldDTO> datasetTableFieldDTOS = permissionManage.filterColumnPermissions(collect, desensitizationList, id, null);
if (!chartViewDTO.getType().equalsIgnoreCase("table-info")) {
datasetTableFieldDTOS = datasetTableFieldDTOS.stream().filter(datasetTableFieldDTO -> !desensitizationList.keySet().contains(datasetTableFieldDTO.getDataeaseName())).collect(Collectors.toList());
}
datasetTableFieldDTOS.add(createCountField(id));
List<ChartViewFieldDTO> list = transFieldDTO(datasetTableFieldDTOS);

View File

@ -34,8 +34,8 @@ public class ChartViewServer implements ChartViewApi {
}
@Override
public Map<String, List<ChartViewFieldDTO>> listByDQ(Long id, Long chartId) {
return chartViewManege.listByDQ(id, chartId);
public Map<String, List<ChartViewFieldDTO>> listByDQ(Long id, Long chartId, ChartViewDTO dto) {
return chartViewManege.listByDQ(id, chartId, dto);
}
@Override

View File

@ -45,6 +45,7 @@
"nprogress": "^0.2.0",
"pinia": "^2.0.32",
"qs": "^6.11.0",
"screenfull": "^6.0.2",
"snowflake-id": "^1.1.0",
"tinymce": "^5.8.2",
"vant": "^4.8.3",

View File

@ -26,8 +26,8 @@ export interface ComponentInfo {
datasetId: string
}
export const getFieldByDQ = async (id, chartId): Promise<IResponse> => {
return request.post({ url: `/chart/listByDQ/${id}/${chartId}`, data: {} }).then(res => {
export const getFieldByDQ = async (id, chartId, data): Promise<IResponse> => {
return request.post({ url: `/chart/listByDQ/${id}/${chartId}`, data: data }).then(res => {
return res?.data
})
}

View File

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1718353836926" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4416" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M862.1 69H161.9C110.7 69 69 110.7 69 161.9v700.2c0 51.2 41.7 92.9 92.9 92.9h700.2c51.2 0 92.9-41.7 92.9-92.9V161.9c0-51.2-41.7-92.9-92.9-92.9z m16.6 92.9v716.7H161.9c-12.5 0-16.5-4-16.5-16.5V161.9c0-12.5 4-16.5 16.5-16.5h700.2c12.6-0.1 16.6 3.9 16.6 16.5z" p-id="4417"></path><path d="M370.3 222.4H268.7c-25.4 0-46 20.6-46 46V370c0 19.8 16.1 35.8 35.8 35.8 19.7 0 35.8-16.1 35.8-35.8v-75.9h75.9c19.8 0 35.8-16.1 35.8-35.8 0.1-19.8-16-35.9-35.7-35.9zM370.3 730.4h-75.9v-75.9c0-19.8-16.1-35.8-35.8-35.8-19.8 0-35.8 16.1-35.8 35.8V756c0 25.4 20.6 46 46 46h101.6c19.8 0 35.8-16.1 35.8-35.8-0.1-19.8-16.2-35.8-35.9-35.8zM766.5 618.6c-19.8 0-35.8 16.1-35.8 35.8v75.9h-75.9c-19.8 0-35.8 16.1-35.8 35.8 0 19.8 16.1 35.8 35.8 35.8h101.6c25.4 0 46-20.6 46-46V654.4c-0.1-19.7-16.2-35.8-35.9-35.8zM756.3 222.4H654.7c-19.8 0-35.8 16.1-35.8 35.8 0 19.8 16.1 35.8 35.8 35.8h75.9v76c0 19.8 16.1 35.8 35.8 35.8 19.7 0 35.8-16.1 35.8-35.8V268.4c0.1-25.3-20.5-46-45.9-46z" p-id="4418"></path></svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -28,6 +28,7 @@ import OuterParamsSet from '@/components/visualization/OuterParamsSet.vue'
import { XpackComponent } from '@/components/plugin'
import DbMoreComGroup from '@/custom-component/component-group/DbMoreComGroup.vue'
import { useCache } from '@/hooks/web/useCache'
import DeFullscreen from '@/components/visualization/common/DeFullscreen.vue'
const { t } = useI18n()
const dvMainStore = dvMainStoreWithOut()
const snapshotStore = snapshotStoreWithOut()
@ -521,12 +522,7 @@ const initOpenHandler = newWindow => {
</el-button>
<template #dropdown>
<el-dropdown-menu class="drop-style">
<el-dropdown-item @click="previewInner()">
<el-icon style="margin-right: 8px; font-size: 16px">
<Icon name="dv-preview-inner" />
</el-icon>
当前预览
</el-dropdown-item>
<de-fullscreen :show-position="'edit'"></de-fullscreen>
<el-dropdown-item @click="previewOuter()">
<el-icon style="margin-right: 8px; font-size: 16px">
<Icon name="dv-preview-outer" />

View File

@ -52,7 +52,8 @@ const handleCommand = (command: string | number | object) => {
}
const callBack = param => {
if (props.node.leaf && props.node?.weight >= 7) {
menus.value.splice(2, 0, param)
menus.value[0]['divided'] = true
menus.value.splice(0, 0, param)
}
}
const emit = defineEmits(['handleCommand'])

View File

@ -54,7 +54,14 @@
class="enlarge-outer"
v-if="dialogShow"
>
<div class="enlarge-inner" ref="viewContainer" :style="customExport">
<div
class="enlarge-inner"
:class="{
'enlarge-inner-with-header': optType === 'details' && sourceViewType.includes('chart-mix')
}"
ref="viewContainer"
:style="customExport"
>
<component-wrapper
v-if="optType === 'enlarge'"
class="enlarge-wrapper"
@ -74,18 +81,20 @@
<el-tab-pane :label="t('chart.drag_block_value_axis_left')" name="left"></el-tab-pane>
<el-tab-pane :label="t('chart.drag_block_value_axis_right')" name="right"></el-tab-pane>
</el-tabs>
<chart-component-s2
v-if="activeName === 'left'"
:view="viewInfo"
show-position="viewDialog"
ref="chartComponentDetails"
/>
<chart-component-s2
v-else-if="activeName === 'right'"
:view="viewInfo"
show-position="viewDialog"
ref="chartComponentDetails2"
/>
<div style="flex: 1">
<chart-component-s2
v-if="activeName === 'left'"
:view="viewInfo"
show-position="viewDialog"
ref="chartComponentDetails"
/>
<chart-component-s2
v-else-if="activeName === 'right'"
:view="viewInfo"
show-position="viewDialog"
ref="chartComponentDetails2"
/>
</div>
</template>
</div>
</div>
@ -360,12 +369,18 @@ defineExpose({
width: 100%;
height: 100%;
}
.enlarge-inner-with-header {
display: flex;
flex-direction: column;
}
.enlarge-wrapper {
width: 100%;
height: 100%;
}
}
.tab-header {
margin-top: -10px;
margin-bottom: 10px;
--ed-tabs-header-height: 34px;
--custom-tab-color: #646a73;

View File

@ -0,0 +1,69 @@
<script lang="ts" setup>
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
const dvMainStore = dvMainStoreWithOut()
import screenfull from 'screenfull'
import { onBeforeUnmount, onMounted, toRefs } from 'vue'
const props = defineProps({
themes: {
type: String,
default: 'light'
},
componentType: {
type: String,
default: 'button'
},
showPosition: {
required: false,
type: String,
default: 'preview'
}
})
const { themes, componentType } = toRefs(props)
const fullscreenChange = () => {
if (screenfull.isEnabled) {
dvMainStore.setFullscreenFlag(screenfull.isFullscreen)
}
}
const toggleFullscreen = () => {
if (screenfull.isEnabled) {
const bodyNode = document.querySelector('body')
screenfull.toggle(bodyNode)
}
}
const editToggleFullscreen = () => {
dvMainStore.setEditMode('preview')
toggleFullscreen()
}
onMounted(() => {
if (screenfull.isEnabled) {
screenfull.on('change', fullscreenChange)
}
})
onBeforeUnmount(() => {
screenfull.off('change', fullscreenChange)
})
</script>
<template>
<el-button v-if="showPosition === 'preview'" secondary @click="toggleFullscreen">
<template #icon>
<icon name="icon_pc_fullscreen"></icon>
</template>
全屏</el-button
>
<el-dropdown-item v-else @click="editToggleFullscreen()">
<el-icon style="margin-right: 8px; font-size: 16px">
<icon name="icon_pc_fullscreen"></icon>
</el-icon>
全屏预览
</el-dropdown-item>
</template>
<style lang="less" scoped></style>

View File

@ -656,11 +656,27 @@ const cancelValueSource = () => {
}
const confirmValueSource = () => {
if (valueSource.value.some(ele => !ele.trim())) {
if (
valueSource.value.some(ele => {
if (typeof ele === 'string') {
return !ele.trim()
}
return false
})
) {
ElMessage.error('手工输入-选项值不能为空')
return
}
curComponent.value.valueSource = cloneDeep(valueSource.value.filter(ele => ele.trim()))
console.log(cloneDeep(valueSource.value), 'valueSource')
curComponent.value.valueSource = cloneDeep(
valueSource.value.filter(ele => {
if (typeof ele === 'string') {
return ele.trim()
}
return true
})
)
handleValueSourceChange()
cancelValueSource()
}

View File

@ -104,7 +104,7 @@ export default {
no_failed_file: '暂无失败文件',
no_file: '暂无文件',
no_task: '暂无任务',
download_all: '下载全部',
download_all: '全部下载',
download: '下载'
},
driver: {

View File

@ -22,7 +22,7 @@ const { start, done } = useNProgress()
const { loadStart, loadDone } = usePageLoading()
const whiteList = ['/login', '/de-link', '/chart-view'] // 不重定向白名单
const whiteList = ['/login', '/de-link', '/chart-view', '/notSupport'] // 不重定向白名单
const embeddedWindowWhiteList = ['/dvCanvas', '/dashboard', '/preview', '/dataset-embedded-form']
const embeddedRouteWhiteList = ['/dataset-embedded', '/dataset-form', '/dataset-embedded-form']
router.beforeEach(async (to, from, next) => {
@ -34,13 +34,13 @@ router.beforeEach(async (to, from, next) => {
await appStore.setAppModel()
isDesktop = appStore.getDesktop
}
if (isMobile()) {
if (isMobile() && to.path !== '/notSupport') {
done()
loadDone()
if (to.name === 'link') {
window.location.href = window.origin + '/mobile.html#' + to.path
} else if (to.path === '/dvCanvas') {
window.location.href = window.origin + '/mobile.html#' + to.path
next('/notSupport')
} else if (
wsCache.get('user.token') ||
isDesktop ||

View File

@ -39,7 +39,7 @@ router.beforeEach(async (to, _, next) => {
next()
}
} else {
if (whiteList.includes(to.path) || to.path.includes('/de-link')) {
if (whiteList.includes(to.path) || to.name === 'link') {
next()
} else {
next('/login') // 否则全部重定向到登录页

View File

@ -20,6 +20,13 @@ export const routes: AppRouteRecordRaw[] = [
}
]
},
{
path: '/notSupport',
name: 'notSupport',
hidden: true,
meta: {},
component: () => import('@/views/mobile/panel/NotSupport.vue')
},
{
path: '/login',
name: 'login',

View File

@ -115,10 +115,10 @@ export const copyStore = defineStore('copy', {
newComponent.canvasId = 'canvas-main'
}
dvMainStore.addCopyComponent(newComponent, idMap, copyDataTemp.copyCanvasViewInfo)
if (dvMainStore.multiplexingStyleAdapt && copyDataTemp.copyFrom === 'multiplexing') {
adaptCurThemeCommonStyle(newComponent)
}
if (dvInfo.value.type === 'dashboard') {
if (dvMainStore.multiplexingStyleAdapt && copyDataTemp.copyFrom === 'multiplexing') {
adaptCurThemeCommonStyle(newComponent)
}
eventBus.emit('addDashboardItem-' + newComponent.canvasId, newComponent)
}
if (i === dataArray.length - 1) {

View File

@ -23,6 +23,7 @@ import { get, set } from 'lodash-es'
export const dvMainStore = defineStore('dataVisualization', {
state: () => {
return {
fullscreenFlag: false, // 全屏启用标识
staticResourcePath: '/static-resource/',
canvasCollapse: {
defaultSide: false,
@ -446,6 +447,9 @@ export const dvMainStore = defineStore('dataVisualization', {
this.curLinkageView = this.curComponent
this.targetLinkageInfo = targetLinkageInfo
},
setFullscreenFlag(val) {
this.fullscreenFlag = val
},
removeViewFilter(componentId) {
this.componentData = this.componentData.map(item => {
const newItem = item

View File

@ -495,3 +495,16 @@ strong {
top: calc(50% - 22px) !important;
left: calc(50% - 40px) !important;
}
// 解决screenfull全屏时 部分嵌入到body中的组件如 下来框 消息通知框等)被覆盖问题
// 这里使用的方案为直接将body全屏 区间组件覆盖整个body
.de-screen-full{
position:fixed !important;
z-index:200;
top: 0;
left: 0;
right: 0;
bottom: 0;
width: 100%;
height: 100% !important;
}

View File

@ -214,7 +214,7 @@ watch(
{ deep: true }
)
const watchDs = () => {
getFields(props.view.tableId, props.view.id)
getFields(props.view.tableId, props.view.id, props.view.type)
const nodeId = view.value['tableId']
if (!!nodeId) {
cacheId = nodeId as unknown as string
@ -224,10 +224,10 @@ const watchDs = () => {
curDatasetWeight.value = node.data.weight
}
}
const getFields = (id, chartId) => {
const getFields = (id, chartId, type) => {
if (id && chartId) {
fieldLoading.value = true
getFieldByDQ(id, chartId)
getFieldByDQ(id, chartId, { type: type })
.then(res => {
state.dimension = (res.dimensionList as unknown as Field[]) || []
state.quota = (res.quotaList as unknown as Field[]) || []
@ -1298,7 +1298,7 @@ const confirmEditCalc = () => {
const obj = cloneDeep(calcEdit.value.fieldForm)
setFieldDefaultValue(obj)
saveField(obj).then(() => {
getFields(view.value.tableId, view.value.id)
getFields(view.value.tableId, view.value.id, view.value.type)
closeEditCalc()
})
}
@ -1314,7 +1314,7 @@ const chartFieldEdit = param => {
state.currEditField.name = getFieldName(state.dimension.concat(state.quota), param.item.name)
saveField(state.currEditField).then(() => {
getFields(view.value.tableId, view.value.id)
getFields(view.value.tableId, view.value.id, view.value.type)
})
break
case 'edit':
@ -1322,7 +1322,7 @@ const chartFieldEdit = param => {
break
case 'delete':
deleteField(param.item?.id).then(() => {
getFields(view.value.tableId, view.value.id)
getFields(view.value.tableId, view.value.id, view.value.type)
})
break
}
@ -1538,7 +1538,7 @@ const copyChartFieldItem = id => {
fieldLoading.value = true
copyChartField(id, view.value.id)
.then(() => {
getFields(view.value.tableId, view.value.id)
getFields(view.value.tableId, view.value.id, view.value.type)
})
.catch(() => {
fieldLoading.value = false
@ -1549,7 +1549,7 @@ const deleteChartFieldItem = id => {
fieldLoading.value = true
deleteChartField(id)
.then(() => {
getFields(view.value.tableId, view.value.id)
getFields(view.value.tableId, view.value.id, view.value.type)
})
.catch(() => {
fieldLoading.value = false
@ -2570,7 +2570,7 @@ const deleteChartFieldItem = id => {
<el-icon
class="field-search-icon-btn"
:class="{ dark: themes === 'dark' }"
@click="getFields(view.tableId, view.id)"
@click="getFields(view.tableId, view.id, view.type)"
>
<Icon
name="icon_refresh_outlined"

View File

@ -416,15 +416,36 @@ const trackMenu = computed(() => {
if (!['multiplexing', 'viewDialog'].includes(showPosition.value)) {
let linkageCount = 0
let jumpCount = 0
chartData.value?.fields?.forEach(item => {
const sourceInfo = view.value.id + '#' + item.id
if (nowPanelTrackInfo.value[sourceInfo]) {
linkageCount++
}
if (nowPanelJumpInfo.value[sourceInfo]) {
jumpCount++
}
})
if (curView?.type?.includes('chart-mix')) {
chartData.value?.left?.fields?.forEach(item => {
const sourceInfo = view.value.id + '#' + item.id
if (nowPanelTrackInfo.value[sourceInfo]) {
linkageCount++
}
if (nowPanelJumpInfo.value[sourceInfo]) {
jumpCount++
}
})
chartData.value?.right?.fields?.forEach(item => {
const sourceInfo = view.value.id + '#' + item.id
if (nowPanelTrackInfo.value[sourceInfo]) {
linkageCount++
}
if (nowPanelJumpInfo.value[sourceInfo]) {
jumpCount++
}
})
} else {
chartData.value?.fields?.forEach(item => {
const sourceInfo = view.value.id + '#' + item.id
if (nowPanelTrackInfo.value[sourceInfo]) {
linkageCount++
}
if (nowPanelJumpInfo.value[sourceInfo]) {
jumpCount++
}
})
}
jumpCount &&
view.value?.jumpActive &&
(!mobileInPc.value || inMobile.value) &&

View File

@ -469,8 +469,8 @@ const tabStyle = computed(() => [
const tablePageClass = computed(() => {
return (
['#ffffff', '#A6A6A6FF'].includes(
canvasStyleData.value.component.seniorStyleSetting?.pagerColor
['#ffffff', '#ffffffff', '#a6a6a6ff'].includes(
canvasStyleData.value.component.seniorStyleSetting?.pagerColor.toLowerCase()
) && 'table-page-info_dark'
)
})

View File

@ -133,6 +133,11 @@ const resourceTypeList = computed(() => {
const menuList = computed(() => {
const list = [
{
label: '复制',
command: 'copy',
svgName: 'dv-copy-dark'
},
{
label: '移动到',
command: 'move',
@ -148,23 +153,13 @@ const menuList = computed(() => {
command: 'delete',
svgName: 'dv-delete',
divided: true
},
{
label: '编辑',
command: 'edit',
svgName: 'dv-edit'
},
{
label: '复制',
command: 'copy',
svgName: 'dv-copy-dark'
}
]
return list
})
const dvId = embeddedStore.dvId || router.currentRoute.value.query.dvId
if (dvId) {
if (dvId && showPosition.value === 'preview') {
selectedNodeKey.value = dvId
returnMounted.value = true
}

View File

@ -12,7 +12,8 @@ import { useRequestStoreWithOut } from '@/store/modules/request'
import { usePermissionStoreWithOut } from '@/store/modules/permission'
import { useMoveLine } from '@/hooks/web/useMoveLine'
import { Icon } from '@/components/icon-custom'
import { download2AppTemplate, downloadCanvas, downloadCanvas2 } from '@/utils/imgUtils'
import { download2AppTemplate, downloadCanvas2 } from '@/utils/imgUtils'
import { storeToRefs } from 'pinia'
const dvMainStore = dvMainStoreWithOut()
const previewCanvasContainer = ref(null)
@ -31,6 +32,8 @@ const state = reactive({
curPreviewGap: 0
})
const { fullscreenFlag } = storeToRefs(dvMainStore)
const { width, node } = useMoveLine('DASHBOARD')
const props = defineProps({
@ -209,7 +212,12 @@ defineExpose({
@download="downloadH2"
@downloadAsAppTemplate="downloadAsAppTemplate"
/>
<div ref="previewCanvasContainer" class="content">
<div
ref="previewCanvasContainer"
class="content"
id="de-preview-content"
:class="{ 'de-screen-full': fullscreenFlag }"
>
<de-preview
ref="dashboardPreview"
v-if="state.canvasStylePreview && dataInitState"

View File

@ -2,6 +2,7 @@
import { computed, nextTick, onBeforeMount, reactive, ref, toRefs, watch } from 'vue'
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
import { getCanvasStyle } from '@/utils/style'
import EmptyBackground from '../../components/empty-background/src/EmptyBackground.vue'
const dvMainStore = dvMainStoreWithOut()
const viewShow = ref(true)
@ -95,7 +96,7 @@ watch(
const init = () => {
dvMainStore.initCurMultiplexingComponents()
curMultiplexTargetComponentsInfo.value = []
componentData.value.forEach(item => {
componentData.value?.forEach(item => {
curMultiplexTargetComponentsInfo.value.push({
id: item.id,
label: item.label,
@ -138,7 +139,7 @@ onBeforeMount(() => {
class="custom-tree"
menu
ref="multiplexInfoTree"
:empty-text="'暂无可用图表'"
:empty-text="'暂无可用组件'"
:filter-node-method="filterNodeMethod"
:data="curMultiplexTargetComponentsInfo"
node-key="targetViewId"
@ -184,6 +185,7 @@ onBeforeMount(() => {
:dv-info="dvInfo"
:canvas-view-info="canvasViewInfo"
/>
<empty-background v-else description="当前未选择组件" img-type="select" />
</div>
</div>
</el-col>

View File

@ -8,6 +8,7 @@ import { storeApi, storeStatusApi } from '@/api/visualization/dataVisualization'
import { ref, watch, computed } from 'vue'
import ShareVisualHead from '@/views/share/share/ShareVisualHead.vue'
import { XpackComponent } from '@/components/plugin'
import DeFullscreen from '@/components/visualization/common/DeFullscreen.vue'
const dvMainStore = dvMainStoreWithOut()
const appStore = useAppStoreWithOut()
const { dvInfo } = storeToRefs(dvMainStore)
@ -102,6 +103,7 @@ const initOpenHandler = newWindow => {
</el-popover>
</div>
<div class="canvas-opt-button">
<de-fullscreen v-if="!isDataEaseBi"></de-fullscreen>
<el-button secondary v-if="!isDataEaseBi" @click="preview()">
<template #icon>
<icon name="icon_pc_outlined"></icon>

View File

@ -17,7 +17,7 @@ import { download2AppTemplate, downloadCanvas2 } from '@/utils/imgUtils'
import MultiplexPreviewShow from '@/views/data-visualization/MultiplexPreviewShow.vue'
const dvMainStore = dvMainStoreWithOut()
const { dvInfo } = storeToRefs(dvMainStore)
const { dvInfo, fullscreenFlag } = storeToRefs(dvMainStore)
const previewCanvasContainer = ref(null)
const dvPreview = ref(null)
const slideShow = ref(true)
@ -26,7 +26,6 @@ const permissionStore = usePermissionStoreWithOut()
const dataInitState = ref(true)
const downloadStatus = ref(false)
const { width, node } = useMoveLine('DASHBOARD')
const props = defineProps({
showPosition: {
required: false,
@ -80,11 +79,13 @@ const loadCanvasData = (dvId, weight?) => {
state.canvasViewInfoPreview = canvasViewInfoPreview
state.dvInfo = dvInfo
state.curPreviewGap = curPreviewGap
dvMainStore.updateCurDvInfo(dvInfo)
dataInitState.value = true
nextTick(() => {
dvPreview.value?.restore()
})
if (props.showPosition === 'preview') {
dvMainStore.updateCurDvInfo(dvInfo)
nextTick(() => {
dvPreview.value?.restore()
})
}
}
)
}
@ -151,7 +152,9 @@ defineExpose({
})
onBeforeMount(() => {
dvMainStore.canvasDataInit()
if (props.showPosition === 'preview') {
dvMainStore.canvasDataInit()
}
})
</script>
@ -213,7 +216,11 @@ onBeforeMount(() => {
></multiplex-preview-show>
</div>
<div v-if="showPosition === 'preview'" ref="previewCanvasContainer" class="content">
<div class="content-outer">
<div
id="de-preview-content"
:class="{ 'de-screen-full': fullscreenFlag }"
class="content-outer"
>
<div class="content-inner">
<de-preview
ref="dvPreview"

View File

@ -378,6 +378,7 @@ defineExpose({
<el-table
ref="multipleTable"
:data="tableData"
height="100%"
style="width: 100%"
@selection-change="handleSelectionChange"
>
@ -385,8 +386,8 @@ defineExpose({
<el-table-column prop="fileName" :label="$t('driver.file_name')" width="332">
<template #default="scope">
<div class="name-excel">
<el-icon>
<Icon name="file-excel_colorful"></Icon>
<el-icon style="font-size: 24px">
<Icon name="icon_file-excel_colorful"></Icon>
</el-icon>
<div class="name-content">
<div class="fileName">{{ scope.row.fileName }}</div>
@ -421,18 +422,18 @@ defineExpose({
<span>{{ timestampFormatDate(scope.row.exportTime) }}</span>
</template>
</el-table-column>
<el-table-column fixed="right" prop="operate" width="150" :label="$t('commons.operating')">
<el-table-column fixed="right" prop="operate" width="90" :label="$t('commons.operating')">
<template #default="scope">
<el-button
v-if="scope.row.exportStatus === 'SUCCESS'"
text
@click="downloadClick(scope.row)"
>
<div class="download-export">
<template #icon>
<el-icon>
<Icon name="dv-preview-download"></Icon>
</el-icon>
</div>
</template>
</el-button>
<el-tooltip effect="dark" content="重新导出" placement="top">
<el-button v-if="scope.row.exportStatus === 'FAILED'" text @click="retry(scope.row)">
@ -468,6 +469,9 @@ defineExpose({
<style lang="less">
.de-export-excel {
.ed-drawer__body {
padding-bottom: 24px;
}
.ed-drawer__header {
border-bottom: none;
}
@ -478,12 +482,9 @@ defineExpose({
}
}
.download-export {
font-size: 16px;
}
.table-container {
margin-top: 16px;
height: calc(100vh - 190px);
.ed-table .cell {
padding-left: 12px;

View File

@ -26,7 +26,7 @@ const sysParamsIlns = sysParamsEnum.map(_ => {
return { value: `\${sysParams.${_}}`, label: `auth.sysParams_type.${toLine(_)}` }
})
const fieldEnums = ['text', 'time', 'value', 'value', , 'location']
const fieldEnums = ['text', 'time', 'value', 'value', 'value', 'location']
export {
textOptions,

View File

@ -1273,7 +1273,9 @@ const getMenuList = (val: boolean) => {
<div v-for="api in nodeInfo.apiConfiguration" :key="api.id" class="api-card">
<el-row>
<el-col :span="19">
<span class="name ellipsis">{{ api.name }}</span>
<span class="name">
<span class="ellipsis" :title="api.name">{{ api.name }}</span>
</span>
<span v-if="api.status === 'Error'" class="de-tag error-color">{{
t('datasource.invalid')
}}</span>
@ -1693,6 +1695,7 @@ const getMenuList = (val: boolean) => {
font-weight: 500;
margin-right: 8px;
max-width: 80%;
display: inline-flex;
}
.req-title,
.req-value {

View File

@ -26,7 +26,7 @@ public interface ChartViewApi {
@Operation(summary = "获取图表字段")
@PostMapping("listByDQ/{id}/{chartId}")
Map<String, List<ChartViewFieldDTO>> listByDQ(@PathVariable Long id, @PathVariable Long chartId);
Map<String, List<ChartViewFieldDTO>> listByDQ(@PathVariable Long id, @PathVariable Long chartId, @RequestBody ChartViewDTO dto);
@Operation(summary = "保存图表")
@PostMapping("save")