mirror of
https://github.com/dataease/dataease.git
synced 2026-05-14 21:12:33 +08:00
feat(仪表板数据大屏): 仪表板和数据大屏可以互相做跳转,传参 #13334
This commit is contained in:
@@ -35,6 +35,7 @@ import io.dataease.datasource.provider.ExcelUtils;
|
||||
import io.dataease.exception.DEException;
|
||||
import io.dataease.extensions.datasource.vo.DatasourceConfiguration;
|
||||
import io.dataease.extensions.view.dto.ChartViewDTO;
|
||||
import io.dataease.i18n.Translator;
|
||||
import io.dataease.license.config.XpackInteract;
|
||||
import io.dataease.license.manage.CoreLicManage;
|
||||
import io.dataease.log.DeLog;
|
||||
@@ -509,7 +510,41 @@ public class DataVisualizationServer implements DataVisualizationApi {
|
||||
|
||||
@Override
|
||||
public List<BusiNodeVO> tree(BusiNodeRequest request) {
|
||||
return coreVisualizationManage.tree(request);
|
||||
String busiFlag = request.getBusiFlag();
|
||||
if(busiFlag.equals("dashboard-dataV")){
|
||||
BusiNodeRequest requestDv = new BusiNodeRequest();
|
||||
BeanUtils.copyBean(requestDv,request);
|
||||
requestDv.setBusiFlag("dashboard");
|
||||
List<BusiNodeVO> dashboardResult = coreVisualizationManage.tree(requestDv);
|
||||
requestDv.setBusiFlag("dataV");
|
||||
List<BusiNodeVO> dataVResult = coreVisualizationManage.tree(requestDv);
|
||||
List<BusiNodeVO> result = new ArrayList<>();
|
||||
if(!CollectionUtils.isEmpty(dashboardResult)){
|
||||
BusiNodeVO dashboardResultParent = new BusiNodeVO();
|
||||
dashboardResultParent.setName(Translator.get("i18n_menu.panel"));
|
||||
dashboardResultParent.setId(-101L);
|
||||
if(dashboardResult.get(0).getId() == 0){
|
||||
dashboardResultParent.setChildren(dashboardResult.get(0).getChildren());
|
||||
}else{
|
||||
dashboardResultParent.setChildren(dashboardResult);
|
||||
}
|
||||
result.add(dashboardResultParent);
|
||||
}
|
||||
if(!CollectionUtils.isEmpty(dataVResult)){
|
||||
BusiNodeVO dataVResultParent = new BusiNodeVO();
|
||||
dataVResultParent.setName(Translator.get("i18n_menu.screen"));
|
||||
dataVResultParent.setId(-102L);
|
||||
if(dataVResult.get(0).getId() == 0){
|
||||
dataVResultParent.setChildren(dataVResult.get(0).getChildren());
|
||||
}else{
|
||||
dataVResultParent.setChildren(dataVResult);
|
||||
}
|
||||
result.add(dataVResultParent);
|
||||
}
|
||||
return result;
|
||||
}else{
|
||||
return coreVisualizationManage.tree(request);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -143,7 +143,13 @@
|
||||
<div class="m-row">
|
||||
<div style="flex: 1">
|
||||
<el-form-item>
|
||||
<template #label> {{ curSource }} </template>
|
||||
<template #label>
|
||||
{{
|
||||
dvInfo.type === 'dashboard'
|
||||
? t('visualization.cur_dashboard')
|
||||
: t('visualization.cur_screen')
|
||||
}}
|
||||
</template>
|
||||
<el-select style="width: 100%" v-model="dvInfo.name" disabled>
|
||||
<el-option
|
||||
:key="dvInfo.name"
|
||||
@@ -640,15 +646,9 @@ const resourceType = computed(() =>
|
||||
dvInfo.value.type === 'dashboard' ? t('work_branch.dashboard') : t('work_branch.big_data_screen')
|
||||
)
|
||||
|
||||
const selectSourceTips =
|
||||
dvInfo.type === 'dashboard'
|
||||
? t('visualization.select_target_dashboard_tips')
|
||||
: t('visualization.select_target_screen_tips')
|
||||
const selectSourceTips = t('visualization.select_target_resource')
|
||||
|
||||
const targetSource =
|
||||
dvInfo.value.type === 'dashboard'
|
||||
? t('visualization.target_dashboard')
|
||||
: t('visualization.target_screen')
|
||||
const targetSource = t('visualization.target_dashboard_dataV')
|
||||
|
||||
const curSource =
|
||||
dvInfo.value.type === 'dashboard'
|
||||
@@ -760,7 +760,7 @@ const init = viewItem => {
|
||||
} else {
|
||||
checkJumpStr = checkAllAxisStr
|
||||
}
|
||||
const request = { busiFlag: dvInfo.value.type } as BusiTreeRequest
|
||||
const request = { busiFlag: 'dashboard-dataV' } as BusiTreeRequest
|
||||
// 获取可关联的仪表板
|
||||
queryTreeApi(request).then(rsp => {
|
||||
if (rsp && rsp[0]?.id === '0') {
|
||||
|
||||
@@ -2717,6 +2717,8 @@ Scatter chart (bubble) chart: {a} (series name), {b} (data name), {c} (value arr
|
||||
column_name: 'Field name'
|
||||
},
|
||||
visualization: {
|
||||
select_target_resource: 'Please select the target resource',
|
||||
target_dashboard_dataV: 'Target Dashboard\\Screen',
|
||||
effective_during_link: 'Public link active',
|
||||
condition_style_set: 'Condition Style Settings',
|
||||
cell_merge_tips:
|
||||
|
||||
@@ -2651,6 +2651,8 @@ export default {
|
||||
column_name: '欄位名稱'
|
||||
},
|
||||
visualization: {
|
||||
select_target_resource: '請選擇目標資源',
|
||||
target_dashboard_dataV: '目標儀表板\\數據大屏',
|
||||
condition_style_set: '條件樣式設定',
|
||||
cell_merge_tips: '合併單元格後,行列凍結、自動換行將失效。',
|
||||
image: '圖片',
|
||||
|
||||
@@ -2653,6 +2653,8 @@ export default {
|
||||
column_name: '字段名称'
|
||||
},
|
||||
visualization: {
|
||||
select_target_resource: '请选择目标资源',
|
||||
target_dashboard_dataV: '目标仪表板\\数据大屏',
|
||||
effective_during_link: '公共链接生效',
|
||||
condition_style_set: '条件样式设置',
|
||||
cell_merge_tips: '合并单元格后,行列冻结、自动换行会失效。',
|
||||
|
||||
Reference in New Issue
Block a user