forked from github/dataease
refactor(仪表板): 仪表板预览界面增加仪表板信息弹出提示
This commit is contained in:
parent
4162131ddc
commit
b8727f9b5a
@ -134,6 +134,8 @@ public class PanelGroupService {
|
||||
|
||||
public String update(PanelGroupRequest request) {
|
||||
String panelId = request.getId();
|
||||
request.setUpdateTime(System.currentTimeMillis());
|
||||
request.setUpdateBy(AuthUtils.getUser().getUsername());
|
||||
panelViewService.syncPanelViews(request);
|
||||
if ("toDefaultPanel".equals(request.getOptType())) { // 转存为默认仪表板
|
||||
panelId = UUID.randomUUID().toString();
|
||||
@ -146,6 +148,7 @@ public class PanelGroupService {
|
||||
newDefaultPanel.setLevel(0);
|
||||
newDefaultPanel.setSource(request.getId());
|
||||
newDefaultPanel.setCreateBy(AuthUtils.getUser().getUsername());
|
||||
newDefaultPanel.setCreateTime(System.currentTimeMillis());
|
||||
checkPanelName(newDefaultPanel.getName(), newDefaultPanel.getPid(), PanelConstants.OPT_TYPE_INSERT, newDefaultPanel.getId(), newDefaultPanel.getNodeType());
|
||||
panelGroupMapper.insertSelective(newDefaultPanel);
|
||||
// 清理权限缓存
|
||||
@ -177,6 +180,8 @@ public class PanelGroupService {
|
||||
record.setName(request.getName());
|
||||
record.setId(request.getId());
|
||||
record.setPid(request.getPid());
|
||||
record.setUpdateTime(request.getUpdateTime());
|
||||
record.setUpdateBy(request.getUpdateBy());
|
||||
panelGroupMapper.updateByPrimaryKeySelective(record);
|
||||
DeLogUtils.save(SysLogConstants.OPERATE_TYPE.MODIFY, sourceType, request.getId(), panelInfo.getPid(), request.getPid(), sourceType);
|
||||
|
||||
@ -336,6 +341,7 @@ public class PanelGroupService {
|
||||
newPanel.setName(request.getName());
|
||||
newPanel.setId(newPanelId);
|
||||
newPanel.setCreateBy(AuthUtils.getUser().getUsername());
|
||||
newPanel.setCreateTime(System.currentTimeMillis());
|
||||
//TODO copy panelView
|
||||
extPanelViewMapper.copyFromPanel(newPanelId, sourcePanelId, copyId);
|
||||
//TODO 复制视图 chart_view
|
||||
|
@ -71,3 +71,7 @@ INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`,
|
||||
INSERT INTO `system_parameter` (`param_key`, `param_value`, `type`, `sort`) VALUES ('basic.templateAccessKey', 'dataease', 'text', NULL);
|
||||
INSERT INTO `system_parameter` (`param_key`, `param_value`, `type`, `sort`) VALUES ('basic.templateMarketUlr', 'https://dataease.io/templates', 'text', 4);
|
||||
|
||||
|
||||
ALTER TABLE `panel_group`
|
||||
ADD COLUMN `update_by` varchar(255) NULL COMMENT '更新人' AFTER `status`,
|
||||
ADD COLUMN `update_time` bigint(13) NULL COMMENT '更新时间' AFTER `update_by`;
|
||||
|
@ -154,7 +154,11 @@ export function initPanelData(panelId, callback) {
|
||||
name: response.data.name,
|
||||
privileges: response.data.privileges,
|
||||
sourcePanelName: response.data.sourcePanelName,
|
||||
status: response.data.status
|
||||
status: response.data.status,
|
||||
createBy: response.data.createBy,
|
||||
createTime: response.data.createTime,
|
||||
updateBy: response.data.updateBy,
|
||||
updateTime: response.data.updateTime
|
||||
})
|
||||
// 刷新联动信息
|
||||
getPanelAllLinkageInfo(panelId).then(rsp => {
|
||||
|
@ -13,7 +13,11 @@ export function proxyInitPanelData(panelId, proxy, callback) {
|
||||
name: response.data.name,
|
||||
privileges: response.data.privileges,
|
||||
proxy: proxy.userId,
|
||||
status: response.data.status
|
||||
status: response.data.status,
|
||||
createBy: response.data.createBy,
|
||||
createTime: response.data.createTime,
|
||||
updateBy: response.data.updateBy,
|
||||
updateTime: response.data.updateTime
|
||||
})
|
||||
// 刷新联动信息
|
||||
getPanelAllLinkageInfo(panelId, proxy).then(rsp => {
|
||||
|
@ -133,7 +133,11 @@ export default {
|
||||
name: response.data.name,
|
||||
privileges: response.data.privileges,
|
||||
sourcePanelName: response.data.sourcePanelName,
|
||||
status: response.data.status
|
||||
status: response.data.status,
|
||||
createBy: response.data.createBy,
|
||||
createTime: response.data.createTime,
|
||||
updateBy: response.data.updateBy,
|
||||
updateTime: response.data.updateTime
|
||||
}
|
||||
this.$store.dispatch('panel/setPanelInfo', this.panelInfo)
|
||||
panelDataPrepare(JSON.parse(response.data.panelData), JSON.parse(response.data.panelStyle), rsp => {
|
||||
|
@ -132,7 +132,7 @@ export default {
|
||||
},
|
||||
commons: {
|
||||
manage_member: 'Managing members',
|
||||
user_confirm_remove_cancel:'Are you sure you want to remove the user from the role?',
|
||||
user_confirm_remove_cancel: 'Are you sure you want to remove the user from the role?',
|
||||
confirm_remove_cancel: 'Are you sure to delete the role?',
|
||||
default_value: 'Default Value',
|
||||
params_value: 'Param Value',
|
||||
@ -623,12 +623,11 @@ export default {
|
||||
can_not_move: `Can't be removed, keep at least one administrator`,
|
||||
manage_can_not_move: 'Administrator is a preset role of the system. By default, he has all the permissions of system management and cannot be deleted',
|
||||
manage_can_not_update: 'Administrator is a preset role of the system. By default, he has all the permissions of system management and cannot be edit',
|
||||
role_name: 'Role name',
|
||||
role_description: 'Role description',
|
||||
editer_role: 'Edit role',
|
||||
add_role: 'Add role',
|
||||
role_name_exist: 'The role name already exists',
|
||||
search_by_role: 'Search by role name',
|
||||
search_by_role: 'Search by role name'
|
||||
},
|
||||
menu: {
|
||||
parent_category: 'Parent Category',
|
||||
@ -667,7 +666,6 @@ export default {
|
||||
member: 'member',
|
||||
organization: 'organization',
|
||||
add_user: 'Add user',
|
||||
search_by_name: 'Search by organization name',
|
||||
sure_move_user: 'Are you sure to remove this user from the organization?',
|
||||
move_success: 'Removed successfully',
|
||||
user: 'user',
|
||||
@ -680,9 +678,8 @@ export default {
|
||||
canot_delete: 'Cannot delete',
|
||||
remove_user_first: 'Please remove all users in the organization before deleting the organization',
|
||||
sure_delete_organization: 'Are you sure to delete this organization?',
|
||||
delete: 'delete',
|
||||
add_child_org: 'Add sub organization',
|
||||
edite_organization: 'Edit organization',
|
||||
edite_organization: 'Edit organization'
|
||||
},
|
||||
system_parameter_setting: {
|
||||
mailbox_service_settings: 'Mail Settings',
|
||||
@ -1546,6 +1543,10 @@ export default {
|
||||
sure_bt: 'Confirm'
|
||||
},
|
||||
panel: {
|
||||
create_by: '创建人',
|
||||
create_time: '创建时间',
|
||||
update_by: '最近修改人',
|
||||
update_time: '最近修改时间',
|
||||
target_url: 'Target Url',
|
||||
target_url_tips: 'You can click fields to splice URLs or parameters',
|
||||
select_world: 'Select World',
|
||||
@ -1919,8 +1920,6 @@ export default {
|
||||
column_permission: 'Column permission rule',
|
||||
enable_column: 'Enable column permissions',
|
||||
search_by_field: 'Search by field name',
|
||||
add_condition: 'Add condition',
|
||||
add_relationship: 'Add relationship',
|
||||
filter_fields: 'Filter fields',
|
||||
selct_filter_fields: 'Please select a filter field',
|
||||
enter_keywords: 'Please enter keywords',
|
||||
@ -1934,7 +1933,7 @@ export default {
|
||||
please_fill: 'Please fill in one line and add 500 at most. Duplicate options and added options will be automatically filtered when identifying and entering',
|
||||
close: 'close',
|
||||
add: 'add to',
|
||||
sure: 'determine',
|
||||
sure: 'determine'
|
||||
},
|
||||
about: {
|
||||
auth_to: 'Authorized to',
|
||||
|
@ -624,12 +624,11 @@ export default {
|
||||
can_not_move: '不可移除,至少保留一位管理員',
|
||||
manage_can_not_move: '管理員是系統預置角色,默認擁有系統管理全部權限,無法刪除',
|
||||
manage_can_not_update: '管理員是系統預置角色,默認擁有系統管理全部權限,無法編輯',
|
||||
role_name: '角色名稱',
|
||||
role_description: '角色描述',
|
||||
editer_role: '編輯角色',
|
||||
add_role: '添加角色',
|
||||
role_name_exist: '該角色名稱已存在',
|
||||
search_by_role: '通過角色名稱搜索',
|
||||
search_by_role: '通過角色名稱搜索'
|
||||
},
|
||||
menu: {
|
||||
parent_category: '上級目錄',
|
||||
@ -658,7 +657,6 @@ export default {
|
||||
create_time: '創建日期',
|
||||
create: '新建組織',
|
||||
modify: '修改組織',
|
||||
delete: '刪除組織',
|
||||
delete_confirm: '確定要刪除該組織嗎?',
|
||||
input_name: '請輸入組織名稱',
|
||||
select_organization: '請選擇組織',
|
||||
@ -668,7 +666,6 @@ export default {
|
||||
member: '成員',
|
||||
organization: '組織',
|
||||
add_user: '添加用戶',
|
||||
search_by_name: '通過組織名稱搜索',
|
||||
sure_move_user: '確定將該用戶從組織中移除嗎?',
|
||||
move_success: '移除成功',
|
||||
user: '用戶',
|
||||
@ -683,7 +680,7 @@ export default {
|
||||
sure_delete_organization: '確定刪除該組織嗎?',
|
||||
delete: '刪除',
|
||||
add_child_org: '添加子組織',
|
||||
edite_organization: '編輯組織',
|
||||
edite_organization: '編輯組織'
|
||||
},
|
||||
system_parameter_setting: {
|
||||
mailbox_service_settings: '郵件設置',
|
||||
@ -1546,6 +1543,10 @@ export default {
|
||||
sure_bt: '確定'
|
||||
},
|
||||
panel: {
|
||||
create_by: '创建人',
|
||||
create_time: '创建时间',
|
||||
update_by: '最近修改人',
|
||||
update_time: '最近修改时间',
|
||||
target_url: '目标URL',
|
||||
target_url_tips: '可以点击字段用来拼接URL或者参数',
|
||||
select_world: '点击选择字段',
|
||||
@ -1930,8 +1931,6 @@ export default {
|
||||
column_permission: '列權限規則',
|
||||
enable_column: '啟用列權限',
|
||||
search_by_field: '通過字段名稱搜索',
|
||||
add_condition: '添加條件',
|
||||
add_relationship: '添加關系',
|
||||
filter_fields: '篩選字段',
|
||||
selct_filter_fields: '請選擇篩選字段',
|
||||
enter_keywords: '請輸關鍵字',
|
||||
@ -1945,7 +1944,7 @@ export default {
|
||||
please_fill: '請一行填一個,最多添加500個,識別錄入時會自動過濾重復的選項和已經添加過的選項',
|
||||
close: '關 閉',
|
||||
add: '添 加',
|
||||
sure: '確 定',
|
||||
sure: '確 定'
|
||||
},
|
||||
about: {
|
||||
auth_to: '授權給',
|
||||
|
@ -133,7 +133,7 @@ export default {
|
||||
commons: {
|
||||
manage_member: '管理成员',
|
||||
confirm_remove_cancel: '确定删除该角色吗?',
|
||||
user_confirm_remove_cancel:'确定将该用户从角色中移除吗?',
|
||||
user_confirm_remove_cancel: '确定将该用户从角色中移除吗?',
|
||||
default_value: '默认值',
|
||||
params_value: '参数值',
|
||||
input_role_name: '请输入角色名称',
|
||||
@ -615,7 +615,6 @@ export default {
|
||||
modify: '修改角色',
|
||||
tips: '提示',
|
||||
confirm_delete: '确认删除角色 ',
|
||||
role_name: '角色名称',
|
||||
search_by_name: '按名称搜索',
|
||||
pls_input_name: '请输入名称',
|
||||
search_by_name_email: '通过姓名或邮箱搜索',
|
||||
@ -630,7 +629,7 @@ export default {
|
||||
editer_role: '编辑角色',
|
||||
add_role: '添加角色',
|
||||
role_name_exist: '该角色名称已存在',
|
||||
search_by_role: '通过角色名称搜索',
|
||||
search_by_role: '通过角色名称搜索'
|
||||
},
|
||||
menu: {
|
||||
parent_category: '上级目录',
|
||||
@ -659,7 +658,6 @@ export default {
|
||||
create_time: '创建日期',
|
||||
create: '新建组织',
|
||||
modify: '修改组织',
|
||||
delete: '删除组织',
|
||||
delete_confirm: '确定要删除该组织吗?',
|
||||
input_name: '请输入组织名称',
|
||||
select_organization: '请选择组织',
|
||||
@ -669,7 +667,6 @@ export default {
|
||||
member: '成员',
|
||||
organization: '组织',
|
||||
add_user: '添加用户',
|
||||
search_by_name: '通过组织名称搜索',
|
||||
sure_move_user: '确定将该用户从组织中移除吗?',
|
||||
move_success: '移除成功',
|
||||
user: '用户',
|
||||
@ -684,7 +681,7 @@ export default {
|
||||
sure_delete_organization: '确定删除该组织吗?',
|
||||
delete: '删除',
|
||||
add_child_org: '添加子组织',
|
||||
edite_organization: '编辑组织',
|
||||
edite_organization: '编辑组织'
|
||||
},
|
||||
system_parameter_setting: {
|
||||
mailbox_service_settings: '邮件设置',
|
||||
@ -1554,6 +1551,10 @@ export default {
|
||||
sure_bt: '确定'
|
||||
},
|
||||
panel: {
|
||||
create_by: '创建人',
|
||||
create_time: '创建时间',
|
||||
update_by: '最近修改人',
|
||||
update_time: '最近修改时间',
|
||||
target_url: '目标URL',
|
||||
target_url_tips: '可以点击字段用来拼接URL或者参数',
|
||||
select_world: '点击选择字段',
|
||||
@ -1931,8 +1932,6 @@ export default {
|
||||
row_column: '行列权限设置',
|
||||
row_permission: '行权限规则',
|
||||
enable_row: '启用行权限',
|
||||
add_condition: '添加条件',
|
||||
add_relationship: '添加关系',
|
||||
white_list: '白名单',
|
||||
white_user_not: '以上权限规则对白名单用户不生效',
|
||||
organization_or_role: '请选择组织或角色',
|
||||
@ -1954,7 +1953,7 @@ export default {
|
||||
please_fill: '请一行填一个,最多添加500个,识别录入时会自动过滤重复的选项和已经添加过的选项',
|
||||
close: '关 闭',
|
||||
add: '添 加',
|
||||
sure: '确 定',
|
||||
sure: '确 定'
|
||||
},
|
||||
about: {
|
||||
auth_to: '授权给',
|
||||
|
@ -57,7 +57,11 @@ export default {
|
||||
id: res.data.id,
|
||||
name: res.data.name,
|
||||
privileges: res.data.privileges,
|
||||
status: res.data.status
|
||||
status: res.data.status,
|
||||
createBy: res.data.createBy,
|
||||
createTime: res.data.createTime,
|
||||
updateBy: res.data.updateBy,
|
||||
updateTime: res.data.updateTime
|
||||
}
|
||||
this.$store.dispatch('panel/setPanelInfo', this.panelInfo)
|
||||
|
||||
|
@ -721,7 +721,11 @@ export default {
|
||||
name: data.name,
|
||||
privileges: data.privileges,
|
||||
sourcePanelName: data.sourcePanelName,
|
||||
status: data.status
|
||||
status: data.status,
|
||||
createBy: data.createBy,
|
||||
createTime: data.createTime,
|
||||
updateBy: data.updateBy,
|
||||
updateTime: data.updateTime
|
||||
})
|
||||
bus.$emit('PanelSwitchComponent', { name: 'PanelEdit' })
|
||||
},
|
||||
|
@ -18,9 +18,20 @@
|
||||
<div style="height: 100%;">
|
||||
<el-col :span="12" style="text-overflow:ellipsis;overflow: hidden;white-space: nowrap;font-size: 14px">
|
||||
<span>{{ panelInfo.name || '测试仪表板' }}</span>
|
||||
|
||||
<span v-if="panelInfo.isDefault" style="color: green;font-size: 12px">({{ $t('panel.default_panel_name') }}:{{ panelInfo.defaultPanelName }})</span>
|
||||
<span v-if="panelInfo.sourcePanelName" style="color: green;font-size: 12px">({{ $t('panel.source_panel_name') }}:{{ panelInfo.sourcePanelName }})</span>
|
||||
<span v-if="panelInfo.sourcePanelName" style="color: green;font-size: 12px"> ({{ $t('panel.source_panel_name') }}:{{ panelInfo.sourcePanelName }})</span>
|
||||
<el-popover
|
||||
placement="right-start"
|
||||
width="400"
|
||||
trigger="click"
|
||||
>
|
||||
<panel-detail-info></panel-detail-info>
|
||||
<i
|
||||
slot="reference"
|
||||
class="el-icon-warning icon-class"
|
||||
style="margin-left: 4px;cursor: pointer;font-size: 14px;"
|
||||
/>
|
||||
</el-popover>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
|
||||
@ -157,10 +168,11 @@ import { initPanelData, updatePanelStatus } from '@/api/panel/panel'
|
||||
import { proxyInitPanelData } from '@/api/panel/shareProxy'
|
||||
import { dataURLToBlob } from '@/components/canvas/utils/utils'
|
||||
import { findResourceAsBase64 } from '@/api/staticResource/staticResource'
|
||||
import PanelDetailInfo from "@/views/panel/list/common/PanelDetailInfo";
|
||||
|
||||
export default {
|
||||
name: 'PanelViewShow',
|
||||
components: { Preview, SaveToTemplate, PDFPreExport, ShareHead },
|
||||
components: {PanelDetailInfo, Preview, SaveToTemplate, PDFPreExport, ShareHead },
|
||||
props: {
|
||||
activeTab: {
|
||||
type: String,
|
||||
|
84
frontend/src/views/panel/list/common/PanelDetailInfo.vue
Normal file
84
frontend/src/views/panel/list/common/PanelDetailInfo.vue
Normal file
@ -0,0 +1,84 @@
|
||||
<template>
|
||||
<el-row>
|
||||
<el-col class="info-item">
|
||||
<p class="info-title">{{ $t('panel.create_by') }}</p>
|
||||
<p class="info-content">{{ panelInfo.createBy }}</p>
|
||||
</el-col>
|
||||
<el-col class="info-item">
|
||||
<p class="info-title">{{ $t('panel.create_time') }}</p>
|
||||
<p class="info-content">{{ panelInfo.createTime |timestampFormatDate }}</p>
|
||||
</el-col>
|
||||
<el-col class="info-item">
|
||||
<p class="info-title">{{ $t('panel.update_by') }}</p>
|
||||
<p class="info-content">{{ panelInfo.updateBy || 'N/A' }}</p>
|
||||
</el-col>
|
||||
<el-col class="info-item">
|
||||
<p class="info-title">{{ $t('panel.update_time') }}</p>
|
||||
<p v-if="panelInfo.updateTime" class="info-content">{{ panelInfo.updateTime | timestampFormatDate }}</p>
|
||||
<p v-if="!panelInfo.updateTime" class="info-content">N/A</p>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'PanelDetailInfo',
|
||||
props: {
|
||||
type: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
data: {
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
tabStatus: {
|
||||
type: Boolean,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tabActive: 'chart',
|
||||
detail: {
|
||||
chart: {},
|
||||
table: {},
|
||||
datasource: {}
|
||||
},
|
||||
info: {}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
panelInfo() {
|
||||
return this.$store.state.panel.panelInfo
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.info-tab>>>.el-tabs__item{
|
||||
font-weight: 400;
|
||||
font-size: 12px;
|
||||
}
|
||||
.info-item{
|
||||
margin: 6px 0;
|
||||
}
|
||||
.info-title{
|
||||
margin: 0!important;
|
||||
font-weight: 600;
|
||||
font-size: 12px;
|
||||
}
|
||||
.info-content{
|
||||
margin: 0!important;
|
||||
font-size: 12px;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user