Symbol 引用
diff --git a/frontend/src/styles/deicon/iconfont.css b/frontend/src/styles/deicon/iconfont.css
index 45af36e21b..b69087d95e 100644
--- a/frontend/src/styles/deicon/iconfont.css
+++ b/frontend/src/styles/deicon/iconfont.css
@@ -1,8 +1,8 @@
@font-face {
font-family: "iconfont"; /* Project id 2459092 */
- src: url('iconfont.woff2?t=1639622225820') format('woff2'),
- url('iconfont.woff?t=1639622225820') format('woff'),
- url('iconfont.ttf?t=1639622225820') format('truetype');
+ src: url('iconfont.woff2?t=1642061879222') format('woff2'),
+ url('iconfont.woff?t=1642061879222') format('woff'),
+ url('iconfont.ttf?t=1642061879222') format('truetype');
}
.iconfont {
@@ -13,6 +13,22 @@
-moz-osx-font-smoothing: grayscale;
}
+.icon-genghuan:before {
+ content: "\e606";
+}
+
+.icon-fasongyoujian:before {
+ content: "\e605";
+}
+
+.icon-github:before {
+ content: "\e6f8";
+}
+
+.icon-dianhua:before {
+ content: "\e681";
+}
+
.icon-guanbi:before {
content: "\e60d";
}
diff --git a/frontend/src/styles/deicon/iconfont.js b/frontend/src/styles/deicon/iconfont.js
index 1e6df8ac58..59a1f1e499 100644
--- a/frontend/src/styles/deicon/iconfont.js
+++ b/frontend/src/styles/deicon/iconfont.js
@@ -1 +1 @@
-!function(c){var h,l,a,v,t,i='
',z=(z=document.getElementsByTagName("script"))[z.length-1].getAttribute("data-injectcss"),o=function(c,h){h.parentNode.insertBefore(c,h)};if(z&&!c.__iconfont__svg__cssinject__){c.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(c){console&&console.log(c)}}function m(){t||(t=!0,a())}function s(){try{v.documentElement.doScroll("left")}catch(c){return void setTimeout(s,50)}m()}h=function(){var c,h;(h=document.createElement("div")).innerHTML=i,i=null,(c=h.getElementsByTagName("svg")[0])&&(c.setAttribute("aria-hidden","true"),c.style.position="absolute",c.style.width=0,c.style.height=0,c.style.overflow="hidden",h=c,(c=document.body).firstChild?o(h,c.firstChild):c.appendChild(h))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(h,0):(l=function(){document.removeEventListener("DOMContentLoaded",l,!1),h()},document.addEventListener("DOMContentLoaded",l,!1)):document.attachEvent&&(a=h,v=c.document,t=!1,s(),v.onreadystatechange=function(){"complete"==v.readyState&&(v.onreadystatechange=null,m())})}(window);
+!function(c){var l,h,a,v,t,i='
',z=(z=document.getElementsByTagName("script"))[z.length-1].getAttribute("data-injectcss"),o=function(c,l){l.parentNode.insertBefore(c,l)};if(z&&!c.__iconfont__svg__cssinject__){c.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(c){console&&console.log(c)}}function m(){t||(t=!0,a())}function s(){try{v.documentElement.doScroll("left")}catch(c){return void setTimeout(s,50)}m()}l=function(){var c,l;(l=document.createElement("div")).innerHTML=i,i=null,(c=l.getElementsByTagName("svg")[0])&&(c.setAttribute("aria-hidden","true"),c.style.position="absolute",c.style.width=0,c.style.height=0,c.style.overflow="hidden",l=c,(c=document.body).firstChild?o(l,c.firstChild):c.appendChild(l))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(l,0):(h=function(){document.removeEventListener("DOMContentLoaded",h,!1),l()},document.addEventListener("DOMContentLoaded",h,!1)):document.attachEvent&&(a=l,v=c.document,t=!1,s(),v.onreadystatechange=function(){"complete"==v.readyState&&(v.onreadystatechange=null,m())})}(window);
\ No newline at end of file
diff --git a/frontend/src/styles/deicon/iconfont.json b/frontend/src/styles/deicon/iconfont.json
index 9ca1419ce4..cbc3a0fa7e 100644
--- a/frontend/src/styles/deicon/iconfont.json
+++ b/frontend/src/styles/deicon/iconfont.json
@@ -5,6 +5,34 @@
"css_prefix_text": "icon-",
"description": "",
"glyphs": [
+ {
+ "icon_id": "12851123",
+ "name": "更换",
+ "font_class": "genghuan",
+ "unicode": "e606",
+ "unicode_decimal": 58886
+ },
+ {
+ "icon_id": "1286",
+ "name": "发送邮件",
+ "font_class": "fasongyoujian",
+ "unicode": "e605",
+ "unicode_decimal": 58885
+ },
+ {
+ "icon_id": "7239484",
+ "name": "github",
+ "font_class": "github",
+ "unicode": "e6f8",
+ "unicode_decimal": 59128
+ },
+ {
+ "icon_id": "11810462",
+ "name": "电话",
+ "font_class": "dianhua",
+ "unicode": "e681",
+ "unicode_decimal": 59009
+ },
{
"icon_id": "1367318",
"name": "关闭",
diff --git a/frontend/src/styles/deicon/iconfont.ttf b/frontend/src/styles/deicon/iconfont.ttf
index c19298b658..870d7f0a3e 100644
Binary files a/frontend/src/styles/deicon/iconfont.ttf and b/frontend/src/styles/deicon/iconfont.ttf differ
diff --git a/frontend/src/styles/deicon/iconfont.woff b/frontend/src/styles/deicon/iconfont.woff
index f079466170..b86bf5e347 100644
Binary files a/frontend/src/styles/deicon/iconfont.woff and b/frontend/src/styles/deicon/iconfont.woff differ
diff --git a/frontend/src/styles/deicon/iconfont.woff2 b/frontend/src/styles/deicon/iconfont.woff2
index 69569792ff..fa730c9626 100644
Binary files a/frontend/src/styles/deicon/iconfont.woff2 and b/frontend/src/styles/deicon/iconfont.woff2 differ
diff --git a/frontend/src/styles/index.scss b/frontend/src/styles/index.scss
index e0da947fbb..93ff912679 100644
--- a/frontend/src/styles/index.scss
+++ b/frontend/src/styles/index.scss
@@ -534,14 +534,7 @@ div:focus {
color: var(--Main) !important;
}
-/* .blackTheme .el-dialog {
- background: var(--ContentBG) !important;
- color: var(--TextPrimary) !important;
-}
- */
-.blackTheme .el-dialog__title {
- color: #ffffff !important;
-}
+
.blackTheme .title-text {
color: var(--TextPrimary) !important;
@@ -663,9 +656,7 @@ div:focus {
background: #38393a !important;
}
-.blackTheme .el-message-box__content {
- color: #F2F6FC;
-}
+
.blackTheme .el-message-box__btns {
.el-button--default:not(.el-button--primary) {
diff --git a/frontend/src/views/chart/chart/chart.js b/frontend/src/views/chart/chart/chart.js
index 2db3f6c550..e0f36d1f81 100644
--- a/frontend/src/views/chart/chart/chart.js
+++ b/frontend/src/views/chart/chart/chart.js
@@ -13,11 +13,11 @@ export const DEFAULT_SIZE = {
barDefault: true,
barWidth: 40,
barGap: 0.4,
- lineWidth: 1,
+ lineWidth: 2,
lineType: 'solid',
lineSymbol: 'circle',
lineSymbolSize: 4,
- lineSmooth: false,
+ lineSmooth: true,
lineArea: false,
pieInnerRadius: 0,
pieOuterRadius: 80,
diff --git a/frontend/src/views/chart/chart/liquid/liquid.js b/frontend/src/views/chart/chart/liquid/liquid.js
index d317e06232..2d61bc2066 100644
--- a/frontend/src/views/chart/chart/liquid/liquid.js
+++ b/frontend/src/views/chart/chart/liquid/liquid.js
@@ -5,7 +5,7 @@ import { DEFAULT_SIZE } from '@/views/chart/chart/chart'
export function baseLiquid(plot, container, chart) {
let value = 0
const colors = []
- let max, radius, outlineBorder, outlineDistance, waveLength, waveCount, bgColor, shape, labelContent, title
+ let max, radius, bgColor, shape, labelContent, title
if (chart.data) {
if (chart.data.series.length > 0) {
value = chart.data.series[0].data[0]
@@ -26,10 +26,6 @@ export function baseLiquid(plot, container, chart) {
const size = JSON.parse(JSON.stringify(customAttr.size))
max = size.liquidMax ? size.liquidMax : DEFAULT_SIZE.liquidMax
radius = parseFloat((size.liquidSize ? size.liquidSize : DEFAULT_SIZE.liquidSize) / 100)
- outlineBorder = parseInt(size.liquidOutlineBorder ? size.liquidOutlineBorder : DEFAULT_SIZE.liquidOutlineBorder)
- outlineDistance = parseInt((size.liquidOutlineDistance || size.liquidOutlineDistance === 0) ? size.liquidOutlineDistance : DEFAULT_SIZE.liquidOutlineDistance)
- waveLength = parseInt(size.liquidWaveLength ? size.liquidWaveLength : DEFAULT_SIZE.liquidWaveLength)
- waveCount = parseInt(size.liquidWaveCount ? size.liquidWaveCount : DEFAULT_SIZE.liquidWaveCount)
shape = size.liquidShape ? size.liquidShape : DEFAULT_SIZE.liquidShape
}
// label
@@ -86,14 +82,6 @@ export function baseLiquid(plot, container, chart) {
percent: (parseFloat(value) / parseFloat(max)),
radius: radius,
shape: shape,
- outline: {
- border: outlineBorder,
- distance: outlineDistance
- },
- wave: {
- length: waveLength,
- count: waveCount
- },
statistic: {
// title: title,
content: labelContent
diff --git a/frontend/src/views/chart/chart/map/map.js b/frontend/src/views/chart/chart/map/map.js
index eba14b830c..aee4192f28 100644
--- a/frontend/src/views/chart/chart/map/map.js
+++ b/frontend/src/views/chart/chart/map/map.js
@@ -26,7 +26,7 @@ export function baseMapOption(chart_option, chart) {
// 处理data
if (chart.data) {
chart_option.title.text = chart.title
- if (chart.data.series.length > 0) {
+ if (chart.data.series && chart.data.series.length > 0) {
chart_option.series[0].name = chart.data.series[0].name
// label
if (customAttr.label) {
diff --git a/frontend/src/views/chart/components/ChartComponent.vue b/frontend/src/views/chart/components/ChartComponent.vue
index c966e46054..3082ccf498 100644
--- a/frontend/src/views/chart/components/ChartComponent.vue
+++ b/frontend/src/views/chart/components/ChartComponent.vue
@@ -74,7 +74,7 @@ import {
import {
baseMixOption
} from '@/views/chart/chart/mix/mix'
- // import eventBus from '@/components/canvas/utils/eventBus'
+// import eventBus from '@/components/canvas/utils/eventBus'
import {
uuid
} from 'vue-uuid'
@@ -130,7 +130,8 @@ export default {
pointParam: null,
dynamicAreaCode: null,
- borderRadius: '0px'
+ borderRadius: '0px',
+ mapCenter: null
}
},
@@ -276,6 +277,11 @@ export default {
const base_json = JSON.parse(JSON.stringify(BASE_MAP))
const chart_option = baseMapOption(base_json, chart)
this.myEcharts(chart_option)
+ const opt = this.myChart.getOption()
+ if (opt && opt.series) {
+ const center = opt.series[0].center
+ this.mapCenter = center
+ }
},
myEcharts(option) {
// 指定图表的配置项和数据
@@ -356,6 +362,7 @@ export default {
resetZoom() {
const options = JSON.parse(JSON.stringify(this.myChart.getOption()))
options.series[0].zoom = 1
+ options.series[0].center = this.mapCenter
this.myChart.setOption(options)
}
}
diff --git a/frontend/src/views/chart/components/normal/LabelNormal.vue b/frontend/src/views/chart/components/normal/LabelNormal.vue
index 27f728943c..616692f810 100644
--- a/frontend/src/views/chart/components/normal/LabelNormal.vue
+++ b/frontend/src/views/chart/components/normal/LabelNormal.vue
@@ -6,7 +6,7 @@
id="label-content"
:style="content_class"
>
-
+
{{ item.data[0] }}
diff --git a/frontend/src/views/chart/components/shape-attr/LabelSelector.vue b/frontend/src/views/chart/components/shape-attr/LabelSelector.vue
index e94542193d..3a5acfe09f 100644
--- a/frontend/src/views/chart/components/shape-attr/LabelSelector.vue
+++ b/frontend/src/views/chart/components/shape-attr/LabelSelector.vue
@@ -17,7 +17,7 @@
-
+
@@ -84,27 +84,35 @@ export default {
labelForm: JSON.parse(JSON.stringify(DEFAULT_LABEL)),
fontSize: [],
isSetting: false,
- labelPosition: [
+ labelPosition: [],
+ labelPositionPie: [
{ name: this.$t('chart.inside'), value: 'inside' },
- { name: this.$t('chart.outside'), value: 'outside' },
- { name: this.$t('chart.center'), value: 'center' },
- { name: this.$t('chart.text_pos_top'), value: 'top' },
- { name: this.$t('chart.text_pos_bottom'), value: 'bottom' },
+ { name: this.$t('chart.outside'), value: 'outside' }
+ ],
+ labelPositionH: [
{ name: this.$t('chart.text_pos_left'), value: 'left' },
+ { name: this.$t('chart.center'), value: 'inside' },
{ name: this.$t('chart.text_pos_right'), value: 'right' }
],
+ labelPositionV: [
+ { name: this.$t('chart.text_pos_top'), value: 'top' },
+ { name: this.$t('chart.center'), value: 'inside' },
+ { name: this.$t('chart.text_pos_bottom'), value: 'bottom' }
+ ],
predefineColors: COLOR_PANEL
}
},
watch: {
'chart': {
handler: function() {
+ this.initOptions()
this.initData()
}
}
},
mounted() {
this.init()
+ this.initOptions()
this.initData()
},
methods: {
@@ -140,6 +148,18 @@ export default {
this.isSetting = false
}
this.$emit('onLabelChange', this.labelForm)
+ },
+ initOptions() {
+ const type = this.chart.type
+ if (type) {
+ if (type.includes('horizontal') || type === 'funnel') {
+ this.labelPosition = this.labelPositionH
+ } else if (type.includes('pie')) {
+ this.labelPosition = this.labelPositionPie
+ } else {
+ this.labelPosition = this.labelPositionV
+ }
+ }
}
}
}
diff --git a/frontend/src/views/chart/components/shape-attr/LabelSelectorAntV.vue b/frontend/src/views/chart/components/shape-attr/LabelSelectorAntV.vue
index 52c90ecdf3..50142634b7 100644
--- a/frontend/src/views/chart/components/shape-attr/LabelSelectorAntV.vue
+++ b/frontend/src/views/chart/components/shape-attr/LabelSelectorAntV.vue
@@ -17,7 +17,7 @@
-
+
@@ -62,29 +62,35 @@ export default {
labelForm: JSON.parse(JSON.stringify(DEFAULT_LABEL)),
fontSize: [],
isSetting: false,
- labelPosition: [
- { name: this.$t('chart.inside'), value: 'middle' },
- { name: this.$t('chart.outside'), value: 'outside' },
- { name: this.$t('chart.center'), value: 'center' },
- { name: this.$t('chart.text_pos_top'), value: 'top' },
- { name: this.$t('chart.text_pos_bottom'), value: 'bottom' },
+ labelPosition: [],
+ labelPositionPie: [
+ { name: this.$t('chart.inside'), value: 'inner' },
+ { name: this.$t('chart.outside'), value: 'outer' }
+ ],
+ labelPositionH: [
{ name: this.$t('chart.text_pos_left'), value: 'left' },
+ { name: this.$t('chart.center'), value: 'middle' },
{ name: this.$t('chart.text_pos_right'), value: 'right' }
],
+ labelPositionV: [
+ { name: this.$t('chart.text_pos_top'), value: 'top' },
+ { name: this.$t('chart.center'), value: 'middle' },
+ { name: this.$t('chart.text_pos_bottom'), value: 'bottom' }
+ ],
predefineColors: COLOR_PANEL
}
},
watch: {
'chart': {
handler: function() {
- this.initLabelPosition()
+ this.initOptions()
this.initData()
}
}
},
mounted() {
this.init()
- this.initLabelPosition()
+ this.initOptions()
this.initData()
},
methods: {
@@ -121,22 +127,16 @@ export default {
}
this.$emit('onLabelChange', this.labelForm)
},
- initLabelPosition() {
- if (this.chart && this.chart.type && this.chart.type.includes('pie')) {
- this.labelPosition = [
- { name: this.$t('chart.inside'), value: 'inner' },
- { name: this.$t('chart.outside'), value: 'outer' }
- ]
- } else {
- this.labelPosition = [
- { name: this.$t('chart.inside'), value: 'middle' },
- { name: this.$t('chart.outside'), value: 'outside' },
- { name: this.$t('chart.center'), value: 'center' },
- { name: this.$t('chart.text_pos_top'), value: 'top' },
- { name: this.$t('chart.text_pos_bottom'), value: 'bottom' },
- { name: this.$t('chart.text_pos_left'), value: 'left' },
- { name: this.$t('chart.text_pos_right'), value: 'right' }
- ]
+ initOptions() {
+ const type = this.chart.type
+ if (type) {
+ if (type.includes('horizontal') || type === 'funnel') {
+ this.labelPosition = this.labelPositionH
+ } else if (type.includes('pie')) {
+ this.labelPosition = this.labelPositionPie
+ } else {
+ this.labelPosition = this.labelPositionV
+ }
}
}
}
diff --git a/frontend/src/views/chart/components/shape-attr/SizeSelector.vue b/frontend/src/views/chart/components/shape-attr/SizeSelector.vue
index 362b8d15ab..892ea3bd90 100644
--- a/frontend/src/views/chart/components/shape-attr/SizeSelector.vue
+++ b/frontend/src/views/chart/components/shape-attr/SizeSelector.vue
@@ -128,9 +128,6 @@
-
- {{ $t('chart.show') }}
-
diff --git a/frontend/src/views/chart/components/shape-attr/SizeSelectorAntV.vue b/frontend/src/views/chart/components/shape-attr/SizeSelectorAntV.vue
index bedb4a527d..ad36ad6972 100644
--- a/frontend/src/views/chart/components/shape-attr/SizeSelectorAntV.vue
+++ b/frontend/src/views/chart/components/shape-attr/SizeSelectorAntV.vue
@@ -125,9 +125,6 @@
-
- {{ $t('chart.show') }}
-
@@ -244,18 +241,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/frontend/src/views/chart/group/Group.vue b/frontend/src/views/chart/group/Group.vue
index e7df267002..ce6df9f42e 100644
--- a/frontend/src/views/chart/group/Group.vue
+++ b/frontend/src/views/chart/group/Group.vue
@@ -196,9 +196,9 @@
:options="chartGroupTreeAvailable"
:normalizer="normalizer"
:placeholder="$t('chart.select_group')"
- :noChildrenText="$t('commons.treeselect.no_children_text')"
- :noOptionsText="$t('commons.treeselect.no_options_text')"
- :noResultsText="$t('commons.treeselect.no_results_text')"
+ :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')"
/>
@@ -558,7 +558,7 @@ export default {
showClose: true
})
this.treeNode()
- this.$store.dispatch('chart/setTable', null)
+ this.$store.dispatch('chart/setTable', new Date().getTime())
})
} else {
// this.$message({
@@ -773,6 +773,7 @@ export default {
view.customFilter = JSON.stringify([])
view.drillFields = JSON.stringify([])
view.extBubble = JSON.stringify([])
+ this.setChartDefaultOptions(view)
const _this = this
post('/chart/view/save', view).then(response => {
this.closeCreateChart()
@@ -788,6 +789,33 @@ export default {
})
},
+ setChartDefaultOptions(view) {
+ const type = view.type
+ const attr = JSON.parse(view.customAttr)
+ if (type.includes('pie')) {
+ if (view.render === 'echarts') {
+ attr.label.position = 'inside'
+ } else {
+ attr.label.position = 'inner'
+ }
+ } else if (type.includes('line')) {
+ attr.label.position = 'top'
+ } else if (type.includes('treemap')) {
+ if (view.render === 'echarts') {
+ attr.label.position = 'inside'
+ } else {
+ attr.label.position = 'middle'
+ }
+ } else {
+ if (view.render === 'echarts') {
+ attr.label.position = 'inside'
+ } else {
+ attr.label.position = 'middle'
+ }
+ }
+ view.customAttr = JSON.stringify(attr)
+ },
+
getTable(table) {
this.table = JSON.parse(JSON.stringify(table))
},
diff --git a/frontend/src/views/chart/view/ChartEdit.vue b/frontend/src/views/chart/view/ChartEdit.vue
index e1e89fb7a5..9e06993987 100644
--- a/frontend/src/views/chart/view/ChartEdit.vue
+++ b/frontend/src/views/chart/view/ChartEdit.vue
@@ -1,6 +1,7 @@