refactor: 更新四个指标卡组件的左侧栏图标,从png资源换成svg资源

main
wu.jian2 1 year ago
parent 04cc30ea35
commit bbb948b6e1

Binary file not shown.

@ -40,14 +40,15 @@
'margin-bottom':customize.lineDistance +'px' 'margin-bottom':customize.lineDistance +'px'
}" }"
> >
{{ optionData}} {{ optionData }}
<span <span
:style="{ :style="{
'margin-left':'10px', 'margin-left':'10px',
'font-size': customize.unitSize + 'px', 'font-size': customize.unitSize + 'px',
color:customize.unitColor, color:customize.unitColor,
}"> }"
{{unit}} >
{{ unit }}
</span> </span>
</span> </span>
<span <span
@ -82,7 +83,7 @@ export default {
}, },
data () { data () {
return { return {
imgUrl:require('data-room-ui/assets/images/cardImg/cardicon.png'), imgUrl: require('data-room-ui/assets/images/cardImg/cardicon.png'),
customClass: {} customClass: {}
} }
}, },
@ -96,7 +97,7 @@ export default {
gradientColor1 () { gradientColor1 () {
return this.config.customize.gradientColor1 || this.config.customize.gradientColor0 || 'transparent' return this.config.customize.gradientColor1 || this.config.customize.gradientColor0 || 'transparent'
}, },
unit(){ unit () {
return this.config?.customize.unit || '' return this.config?.customize.unit || ''
}, },
option () { option () {
@ -107,12 +108,12 @@ export default {
}, },
customize () { customize () {
return this.config?.customize return this.config?.customize
}, }
}, },
methods: { methods: {
dataFormatting (config, data) { dataFormatting (config, data) {
let dataList = '' let dataList = ''
if(data.success){ if (data.success) {
if (data.data instanceof Array) { if (data.data instanceof Array) {
dataList = config.dataSource.dimensionField dataList = config.dataSource.dimensionField
? data.data[0][config.dataSource.dimensionField] ? data.data[0][config.dataSource.dimensionField]
@ -120,8 +121,8 @@ export default {
} else { } else {
dataList = data.data[config.dataSource.dimensionField] dataList = data.data[config.dataSource.dimensionField]
} }
}else{ } else {
dataList=80 dataList = 80
} }
config.option = { config.option = {
...config.option, ...config.option,

@ -49,14 +49,15 @@
}" }"
class="content-right-second" class="content-right-second"
> >
{{ optionData}} {{ optionData }}
<span <span
:style="{ :style="{
'margin-left':'10px', 'margin-left':'10px',
'font-size': customize.unitSize + 'px', 'font-size': customize.unitSize + 'px',
color:customize.unitColor, color:customize.unitColor,
}"> }"
{{unit}} >
{{ unit }}
</span> </span>
</span> </span>
</div> </div>
@ -80,7 +81,7 @@ export default {
}, },
data () { data () {
return { return {
imgUrl:require('data-room-ui/assets/images/cardImg/cardicon.png'), imgUrl: require('data-room-ui/assets/images/cardImg/cardicon.png'),
customClass: {} customClass: {}
} }
}, },
@ -94,7 +95,7 @@ export default {
gradientColor1 () { gradientColor1 () {
return this.config.customize.gradientColor1 || this.config.customize.gradientColor0 || 'transparent' return this.config.customize.gradientColor1 || this.config.customize.gradientColor0 || 'transparent'
}, },
unit(){ unit () {
return this.config?.customize.unit || '' return this.config?.customize.unit || ''
}, },
option () { option () {
@ -105,12 +106,12 @@ export default {
}, },
customize () { customize () {
return this.config?.customize return this.config?.customize
}, }
}, },
methods: { methods: {
dataFormatting (config, data) { dataFormatting (config, data) {
let dataList = '' let dataList = ''
if(data.success){ if (data.success) {
if (data.data instanceof Array) { if (data.data instanceof Array) {
dataList = config.dataSource.dimensionField dataList = config.dataSource.dimensionField
? data.data[0][config.dataSource.dimensionField] ? data.data[0][config.dataSource.dimensionField]
@ -118,8 +119,8 @@ export default {
} else { } else {
dataList = data.data[config.dataSource.dimensionField] dataList = data.data[config.dataSource.dimensionField]
} }
}else{ } else {
dataList=80 dataList = 80
} }
config.option = { config.option = {
...config.option, ...config.option,

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 32 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 29 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 36 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

@ -303,8 +303,8 @@ export default function getComponentConfig (type) {
return { return {
name: '指标卡一', name: '指标卡一',
title: '指标卡一', title: '指标卡一',
icon: null, icon: Icon.getNameList()[30],
img: require('data-room-ui/assets/images/cardImg/card.png'), // img: require('data-room-ui/assets/images/cardImg/card.png'),
className: 'com.gccloud.dataroom.core.module.chart.components.ScreenIndicatorCardChart', className: 'com.gccloud.dataroom.core.module.chart.components.ScreenIndicatorCardChart',
w: 300, w: 300,
h: 114, h: 114,
@ -316,8 +316,8 @@ export default function getComponentConfig (type) {
return { return {
name: '指标卡二', name: '指标卡二',
title: '指标卡二', title: '指标卡二',
icon: null, icon: Icon.getNameList()[31],
img: require('data-room-ui/assets/images/cardImg/card2.png'), // img: require('data-room-ui/assets/images/cardImg/card2.png'),
className: 'com.gccloud.dataroom.core.module.chart.components.ScreenIndicatorCardChart', className: 'com.gccloud.dataroom.core.module.chart.components.ScreenIndicatorCardChart',
w: 300, w: 300,
h: 114, h: 114,
@ -329,8 +329,8 @@ export default function getComponentConfig (type) {
return { return {
name: '指标卡三', name: '指标卡三',
title: '指标卡三', title: '指标卡三',
icon: null, icon: Icon.getNameList()[32],
img: require('data-room-ui/assets/images/cardImg/indicard.png'), // img: require('data-room-ui/assets/images/cardImg/indicard.png'),
className: 'com.gccloud.dataroom.core.module.chart.components.ScreenIndexCardChart', className: 'com.gccloud.dataroom.core.module.chart.components.ScreenIndexCardChart',
w: 300, w: 300,
h: 114, h: 114,
@ -342,8 +342,8 @@ export default function getComponentConfig (type) {
return { return {
name: '指标卡四', name: '指标卡四',
title: '指标卡四', title: '指标卡四',
icon: null, icon: Icon.getNameList()[33],
img: require('data-room-ui/assets/images/cardImg/indcard2.png'), // img: require('data-room-ui/assets/images/cardImg/indcard2.png'),
className: 'com.gccloud.dataroom.core.module.chart.components.ScreenIndexCardChart', className: 'com.gccloud.dataroom.core.module.chart.components.ScreenIndexCardChart',
w: 300, w: 300,
h: 114, h: 114,

Loading…
Cancel
Save