-
- {{ message }},{{ $t('chart.chart_show_error') }}
-
- {{ $t('chart.chart_error_tips') }}
+
+
+
+
+ {{ message }},{{ $t('chart.chart_show_error') }}
+
+ {{ $t('chart.chart_error_tips') }}
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
@@ -90,6 +92,7 @@ import EditBarView from '@/components/canvas/components/Editor/EditBarView'
import { customAttrTrans, customStyleTrans, recursionTransObj } from '@/components/canvas/utils/style'
import ChartComponentS2 from '@/views/chart/components/ChartComponentS2'
import PluginCom from '@/views/system/plugin/PluginCom'
+import { hexColorToRGBA } from '@/views/chart/chart/util'
export default {
name: 'UserView',
components: { PluginCom, ChartComponentS2, EditBarView, ChartComponent, TableNormal, LabelNormal, DrillPath, ChartComponentG2 },
@@ -166,6 +169,31 @@ export default {
},
computed: {
+ // 视图
+ componentBackGround() {
+ const customStyle = JSON.parse(this.chart.customStyle)
+ let style = {
+ height: '100%',
+ width: '100%',
+ backgroundSize: '100% 100% !important',
+ borderRadius: '0px'
+ }
+ if (customStyle && customStyle.background) {
+ style.borderRadius = customStyle.background.borderRadius + 'px!important'
+ if (customStyle.background.backgroundType === 'outImage' && typeof (customStyle.background.outImage) === 'string') {
+ style = {
+ background: `url(${customStyle.background.outImage}) no-repeat`,
+ ...style
+ }
+ } else if (!customStyle.background.backgroundType || customStyle.background.backgroundType === 'color') {
+ style = {
+ background: hexColorToRGBA(customStyle.background.color, customStyle.background.alpha),
+ ...style
+ }
+ }
+ }
+ return style
+ },
scaleCoefficient() {
if (this.terminal === 'pc' && !this.mobileLayoutStatus) {
return 1.1
diff --git a/frontend/src/views/chart/chart/chart.js b/frontend/src/views/chart/chart/chart.js
index df770bd6e8..179f42bcc7 100644
--- a/frontend/src/views/chart/chart/chart.js
+++ b/frontend/src/views/chart/chart/chart.js
@@ -1,3 +1,8 @@
+import {ApplicationContext} from "@/utils/ApplicationContext";
+import {BASE_MOBILE_STYLE, HYPERLINKS} from "@/components/canvas/custom-component/component-list";
+import store from "@/store";
+import {deepCopy, resetID} from "@/components/canvas/utils/utils";
+
export const DEFAULT_COLOR_CASE = {
value: 'default',
colors: ['#5470c6', '#91cc75', '#fac858', '#ee6666', '#73c0de', '#3ba272', '#fc8452', '#9a60b4', '#ea7ccc'],
@@ -192,7 +197,10 @@ export const DEFAULT_YAXIS_EXT_STYLE = {
}
}
export const DEFAULT_BACKGROUND_COLOR = {
+ backgroundType: 'color',
color: '#ffffff',
+ outImage: null,
+ innerImage: null,
alpha: 100,
borderRadius: 5
}
diff --git a/frontend/src/views/chart/chart/common/common.js b/frontend/src/views/chart/chart/common/common.js
index 3945d4f4bf..34445d128d 100644
--- a/frontend/src/views/chart/chart/common/common.js
+++ b/frontend/src/views/chart/chart/common/common.js
@@ -174,7 +174,7 @@ export function componentStyle(chart_option, chart) {
chart_option.radar.splitArea = customStyle.split.splitArea
}
if (customStyle.background) {
- chart_option.backgroundColor = hexColorToRGBA(customStyle.background.color, customStyle.background.alpha)
+ // chart_option.backgroundColor = hexColorToRGBA(customStyle.background.color, customStyle.background.alpha)
}
}
}
diff --git a/frontend/src/views/chart/chart/common/common_antv.js b/frontend/src/views/chart/chart/common/common_antv.js
index 4175a70bf1..b67db98842 100644
--- a/frontend/src/views/chart/chart/common/common_antv.js
+++ b/frontend/src/views/chart/chart/common/common_antv.js
@@ -40,7 +40,7 @@ export function getTheme(chart) {
customStyle = JSON.parse(chart.customStyle)
// bg
if (customStyle.background) {
- bgColor = hexColorToRGBA(customStyle.background.color, customStyle.background.alpha)
+ // bgColor = hexColorToRGBA(customStyle.background.color, customStyle.background.alpha)
}
// legend
if (customStyle.legend) {
diff --git a/frontend/src/views/chart/components/ChartComponent.vue b/frontend/src/views/chart/components/ChartComponent.vue
index 3082ccf498..aaadf57ee5 100644
--- a/frontend/src/views/chart/components/ChartComponent.vue
+++ b/frontend/src/views/chart/components/ChartComponent.vue
@@ -7,7 +7,7 @@
:style="trackBarStyleTime"
@trackClick="trackClick"
/>
-
+
diff --git a/frontend/src/views/chart/components/ChartComponentG2.vue b/frontend/src/views/chart/components/ChartComponentG2.vue
index 66c9437c86..ce766e8f2a 100644
--- a/frontend/src/views/chart/components/ChartComponentG2.vue
+++ b/frontend/src/views/chart/components/ChartComponentG2.vue
@@ -87,7 +87,7 @@ export default {
},
bg_class() {
return {
- borderRadius: this.borderRadius
+ // borderRadius: this.borderRadius
}
}
},
diff --git a/frontend/src/views/chart/components/ChartComponentS2.vue b/frontend/src/views/chart/components/ChartComponentS2.vue
index e4b4b3b1fd..318997f0f1 100644
--- a/frontend/src/views/chart/components/ChartComponentS2.vue
+++ b/frontend/src/views/chart/components/ChartComponentS2.vue
@@ -1,10 +1,10 @@
-
+
{{ chart.title }}
-
+
@@ -109,7 +109,6 @@ export default {
},
bg_class() {
return {
- borderRadius: this.borderRadius
}
}
},
@@ -259,12 +258,7 @@ export default {
}
},
setBackGroundBorder() {
- if (this.chart.customStyle) {
- const customStyle = JSON.parse(this.chart.customStyle)
- if (customStyle.background) {
- this.borderRadius = (customStyle.background.borderRadius || 0) + 'px'
- }
- }
+
},
chartResize() {
this.initData()
@@ -325,12 +319,6 @@ export default {
this.$refs.title.style.fontSize = customStyle.text.fontSize + 'px'
}
}
- if (customStyle.background) {
- this.title_class.background = hexColorToRGBA(customStyle.background.color, customStyle.background.alpha)
- this.borderRadius = (customStyle.background.borderRadius || 0) + 'px'
-
- this.container_bg_class.background = hexColorToRGBA(customStyle.background.color, customStyle.background.alpha)
- }
}
},
diff --git a/frontend/src/views/chart/components/component-style/BackgroundColorSelector.vue b/frontend/src/views/chart/components/component-style/BackgroundColorSelector.vue
index d51a1ed91c..3d985280ff 100644
--- a/frontend/src/views/chart/components/component-style/BackgroundColorSelector.vue
+++ b/frontend/src/views/chart/components/component-style/BackgroundColorSelector.vue
@@ -1,24 +1,74 @@
-
-
-
-
-
-
-
-
-
+
+
+ {{ $t('chart.color') }}
+
+
+
+
+
+
+
+ {{ $t('panel.photo') }}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t('chart.border_radius') }}
+
+
-
-
+
+
+
+
+ {{ $t('chart.not_alpha') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/views/chart/components/normal/LabelNormal.vue b/frontend/src/views/chart/components/normal/LabelNormal.vue
index 616692f810..a9e5e42994 100644
--- a/frontend/src/views/chart/components/normal/LabelNormal.vue
+++ b/frontend/src/views/chart/components/normal/LabelNormal.vue
@@ -161,7 +161,7 @@ export default {
this.title_class.fontWeight = customStyle.text.isBolder ? 'bold' : 'normal'
}
if (customStyle.background) {
- this.bg_class.background = hexColorToRGBA(customStyle.background.color, customStyle.background.alpha)
+ // this.bg_class.background = hexColorToRGBA(customStyle.background.color, customStyle.background.alpha)
}
}
},
diff --git a/frontend/src/views/chart/components/table/TableNormal.vue b/frontend/src/views/chart/components/table/TableNormal.vue
index c9afef2d35..1735e2e801 100644
--- a/frontend/src/views/chart/components/table/TableNormal.vue
+++ b/frontend/src/views/chart/components/table/TableNormal.vue
@@ -1,5 +1,5 @@
-
+
{{ chart.title }}
@@ -88,7 +86,6 @@
animation="300"
:move="onMove"
class="drag-list"
- :disabled="!hasDataPermission('manage',param.privileges)"
@add="moveToQuota"
>
@@ -157,7 +154,6 @@
@@ -182,7 +178,6 @@
slot="reference"
size="mini"
style="padding: 6px;"
- :disabled="!hasDataPermission('manage',param.privileges)"
>
{{ $t('chart.change_chart_type') }}
@@ -202,7 +197,6 @@
@@ -212,7 +206,6 @@
v-model="view.resultCount"
class="result-count"
size="mini"
- :disabled="!hasDataPermission('manage',param.privileges)"
@change="calcData"
/>
@@ -237,7 +230,6 @@
:no-children-text="$t('commons.treeselect.no_children_text')"
:no-options-text="$t('commons.treeselect.no_options_text')"
:no-results-text="$t('commons.treeselect.no_results_text')"
- :disabled="!hasDataPermission('manage',param.privileges)"
@input="calcData"
@deselect="calcData"
/>
@@ -256,7 +248,6 @@
-->
@@ -825,8 +808,8 @@
-
-
+
+
-1) {
+ this.$store.commit('recordSnapshot')
bus.$emit('PanelSwitchComponent', { name: 'PanelEdit' })
}
this.$success(this.$t('commons.save_success'))