forked from github/dataease
fix: 背景图片空url 问题
This commit is contained in:
parent
aec257ef32
commit
0959535093
@ -17,7 +17,6 @@ CREATE TABLE `panel_design` (
|
|||||||
`update_person` varchar(255) DEFAULT NULL COMMENT '修改人',
|
`update_person` varchar(255) DEFAULT NULL COMMENT '修改人',
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='仪表盘和组件的关联关系 组件分为普通视图和系统组件';
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='仪表盘和组件的关联关系 组件分为普通视图和系统组件';
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Table structure for panel_group
|
-- Table structure for panel_group
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
@ -66,21 +65,32 @@ SET FOREIGN_KEY_CHECKS = 1;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
DROP function IF EXISTS GET_PANEL_CHILDREN_CHILDREN;
|
DROP function IF EXISTS GET_PANEL_GROUP_WITH_CHILDREN;
|
||||||
DELIMITER $$
|
DELIMITER $$
|
||||||
CREATE FUNCTION `GET_PANEL_CHILDREN_CHILDREN`(parentId varchar(8000)) RETURNS varchar(8000) CHARSET utf8
|
CREATE FUNCTION `GET_PANEL_GROUP_WITH_CHILDREN`(parentId varchar(8000)) RETURNS varchar(8000) CHARSET utf8
|
||||||
READS SQL DATA
|
READS SQL DATA
|
||||||
BEGIN
|
BEGIN
|
||||||
DECLARE oTemp VARCHAR(8000);
|
|
||||||
DECLARE oTempChild VARCHAR(8000);
|
DECLARE oTemp VARCHAR(8000);
|
||||||
SET oTemp = '';
|
|
||||||
SET oTempChild = CAST(parentId AS CHAR);
|
DECLARE oTempChild VARCHAR(8000);
|
||||||
WHILE oTempChild IS NOT NULL
|
|
||||||
DO
|
SET oTemp = '';
|
||||||
SET oTemp = CONCAT(oTemp,',',oTempChild);
|
|
||||||
SELECT GROUP_CONCAT(id) INTO oTempChild FROM panel_group WHERE FIND_IN_SET(pid,oTempChild) > 0;
|
SET oTempChild = CAST(parentId AS CHAR);
|
||||||
END WHILE;
|
|
||||||
RETURN oTemp;
|
WHILE oTempChild IS NOT NULL
|
||||||
|
|
||||||
|
DO
|
||||||
|
|
||||||
|
SET oTemp = CONCAT(oTemp,',',oTempChild);
|
||||||
|
|
||||||
|
SELECT GROUP_CONCAT(id) INTO oTempChild FROM panel_group WHERE FIND_IN_SET(pid,oTempChild) > 0;
|
||||||
|
|
||||||
|
END WHILE;
|
||||||
|
|
||||||
|
RETURN oTemp;
|
||||||
|
|
||||||
END $$
|
END $$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
||||||
@ -183,3 +193,18 @@ CREATE TABLE `panel_template` (
|
|||||||
`dynamic_data` longtext COMMENT '预存数据',
|
`dynamic_data` longtext COMMENT '预存数据',
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `panel_subject`;
|
||||||
|
CREATE TABLE `panel_subject` (
|
||||||
|
`id` varchar(50) NOT NULL,
|
||||||
|
`name` varchar(255) DEFAULT NULL COMMENT '主题名称',
|
||||||
|
`type` varchar(255) DEFAULT NULL COMMENT '主题类型 system 系统主题,self 自定义主题',
|
||||||
|
`details` longtext COMMENT '主题内容',
|
||||||
|
`create_time` bigint(13) DEFAULT NULL COMMENT '创建时间',
|
||||||
|
`create_by` varchar(255) DEFAULT NULL COMMENT '创建人',
|
||||||
|
`update_time` bigint(13) DEFAULT NULL COMMENT '更新时间',
|
||||||
|
`update_by` varchar(255) DEFAULT NULL COMMENT '更新人',
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
<!-- <link rel="icon" href="<%= BASE_URL %>favicon.ico">-->
|
||||||
<title><%= webpackConfig.name %></title>
|
<title><%= webpackConfig.name %></title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
@ -54,7 +54,7 @@ export default {
|
|||||||
customStyle() {
|
customStyle() {
|
||||||
let style = {}
|
let style = {}
|
||||||
if (this.canvasStyleData.openCommonStyle) {
|
if (this.canvasStyleData.openCommonStyle) {
|
||||||
if (this.canvasStyleData.panel.backgroundType === 'image') {
|
if (this.canvasStyleData.panel.backgroundType === 'image' && this.canvasStyleData.panel.imageUrl) {
|
||||||
style = {
|
style = {
|
||||||
width: '100%',
|
width: '100%',
|
||||||
height: '100%',
|
height: '100%',
|
||||||
|
@ -57,7 +57,7 @@ export default {
|
|||||||
customStyle() {
|
customStyle() {
|
||||||
let style = {}
|
let style = {}
|
||||||
if (this.canvasStyleData.openCommonStyle) {
|
if (this.canvasStyleData.openCommonStyle) {
|
||||||
if (this.canvasStyleData.panel.backgroundType === 'image') {
|
if (this.canvasStyleData.panel.backgroundType === 'image'&&this.canvasStyleData.panel.imageUrl) {
|
||||||
style = {
|
style = {
|
||||||
width: '100%',
|
width: '100%',
|
||||||
height: '100%',
|
height: '100%',
|
||||||
|
@ -109,7 +109,7 @@ export default {
|
|||||||
height: this.changeStyleWithScale(this.canvasStyleData.height) + 'px'
|
height: this.changeStyleWithScale(this.canvasStyleData.height) + 'px'
|
||||||
}
|
}
|
||||||
if (this.canvasStyleData.openCommonStyle) {
|
if (this.canvasStyleData.openCommonStyle) {
|
||||||
if (this.canvasStyleData.panel.backgroundType === 'image') {
|
if (this.canvasStyleData.panel.backgroundType === 'image'&&this.canvasStyleData.panel.imageUrl) {
|
||||||
style = {
|
style = {
|
||||||
width: this.changeStyleWithScale(this.canvasStyleData.width) + 'px',
|
width: this.changeStyleWithScale(this.canvasStyleData.width) + 'px',
|
||||||
height: this.changeStyleWithScale(this.canvasStyleData.height) + 'px',
|
height: this.changeStyleWithScale(this.canvasStyleData.height) + 'px',
|
||||||
|
@ -80,7 +80,7 @@ export default {
|
|||||||
background: 'background: 0% 0% / cover rgb(255, 255, 255)'
|
background: 'background: 0% 0% / cover rgb(255, 255, 255)'
|
||||||
}
|
}
|
||||||
if (this.subjectItemDetails) {
|
if (this.subjectItemDetails) {
|
||||||
if (this.subjectItemDetails.panel.backgroundType === 'image') {
|
if (this.subjectItemDetails.panel.backgroundType === 'image'&&this.subjectItemDetails.panel.imageUrl) {
|
||||||
style = {
|
style = {
|
||||||
width: '100%',
|
width: '100%',
|
||||||
height: '100%',
|
height: '100%',
|
||||||
|
@ -80,7 +80,7 @@ export default {
|
|||||||
background: '0% 0% / cover rgb(239, 241, 244)'
|
background: '0% 0% / cover rgb(239, 241, 244)'
|
||||||
}
|
}
|
||||||
if (this.subjectItemDetails) {
|
if (this.subjectItemDetails) {
|
||||||
if (this.subjectItemDetails.panel.backgroundType === 'image') {
|
if (this.subjectItemDetails.panel.backgroundType === 'image'&&this.subjectItemDetails.panel.imageUrl) {
|
||||||
style = {
|
style = {
|
||||||
width: '100%',
|
width: '100%',
|
||||||
height: '100%',
|
height: '100%',
|
||||||
|
@ -468,7 +468,6 @@ export default {
|
|||||||
const temp = JSON.parse(response.data.panelStyle)
|
const temp = JSON.parse(response.data.panelStyle)
|
||||||
this.$store.commit('setCanvasStyle', temp)
|
this.$store.commit('setCanvasStyle', temp)
|
||||||
this.$store.dispatch('panel/setPanelInfo', data)
|
this.$store.dispatch('panel/setPanelInfo', data)
|
||||||
this.currGroup = data
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if (node.expanded) {
|
if (node.expanded) {
|
||||||
|
Loading…
Reference in New Issue
Block a user