feat:新增指标卡组件

main
liu.tao3 1 year ago
parent 8304f8558e
commit 0a9bb25da6

@ -36,7 +36,17 @@
'font-weight':customize.firstWeight, 'font-weight':customize.firstWeight,
'margin-bottom':customize.lineDistance +'px' 'margin-bottom':customize.lineDistance +'px'
}" }"
>{{ optionData}}</span> >
{{ optionData}}
<span
:style="{
'margin-left':'10px',
'font-size': customize.unitSize + 'px',
color:customize.unitColor,
}">
{{unit}}
</span>
</span>
<span <span
:style="{ :style="{
'font-size': customize.secondSize + 'px', 'font-size': customize.secondSize + 'px',
@ -76,6 +86,9 @@ export default {
mounted () { mounted () {
}, },
computed: { computed: {
unit(){
return this.config?.customize.unit || ''
},
option () { option () {
return this.config?.option return this.config?.option
}, },

@ -77,6 +77,31 @@
> >
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item
label="单位"
label-width="100px"
>
<el-input
v-model="config.customize.unit"
clearable
placeholder="请输入单位"
>
</el-input>
</el-form-item>
<el-form-item label-width="100px" label="单位字体大小">
<el-input-number
v-model="config.customize.unitSize"
:precision="0"
class="bs-el-input-number"
label="请输入单位字体大小"
/>
</el-form-item>
<el-form-item label-width="100px" label="单位字体颜色">
<ColorPicker
v-model="config.customize.unitColor"
:predefine="predefineThemeColors"
/>
</el-form-item>
<el-form-item label-width="100px" label="左右间距"> <el-form-item label-width="100px" label="左右间距">
<el-input-number <el-input-number
v-model="config.customize.distance" v-model="config.customize.distance"

@ -42,18 +42,21 @@ const customConfig = {
src: 'http://60.174.249.206:11080/upload/webDesign/uiSucai/dir/icon/icon_top6.png', src: 'http://60.174.249.206:11080/upload/webDesign/uiSucai/dir/icon/icon_top6.png',
borderRadius: 0, borderRadius: 0,
borderWidth: 0, borderWidth: 0,
lineDistance: 25, lineDistance: 6,
borderColor: '', borderColor: '',
bgColor: '', bgColor: 'rgba(0, 122, 255, 0.07)',
distance: 30, distance: 30,
imgSize: 110, imgSize: 80,
firstSize: 50, firstSize: 64,
firstColor: '#ffffff', firstColor: '#007aff',
firstWeight: 500, firstWeight: 500,
secondSize: 50, secondSize: 21,
secondColor: '#ffffff', secondColor: '#ffffff',
secondWeight: 500, secondWeight: 500,
secondLine: '装机处理及时率' secondLine: '装机处理及时率',
unit: '',
unitSize: 32,
unitColor:'#fff'
} }
} }
export const dataConfig = { export const dataConfig = {

@ -47,6 +47,14 @@
class="content-right-second" class="content-right-second"
> >
{{ optionData}} {{ optionData}}
<span
:style="{
'margin-left':'10px',
'font-size': customize.unitSize + 'px',
color:customize.unitColor,
}">
{{unit}}
</span>
</span> </span>
</div> </div>
</div> </div>
@ -76,6 +84,9 @@ export default {
mounted () { mounted () {
}, },
computed: { computed: {
unit(){
return this.config?.customize.unit || ''
},
option () { option () {
return this.config?.option return this.config?.option
}, },

@ -76,6 +76,31 @@
placeholder="请输入链接" placeholder="请输入链接"
> >
</el-input> </el-input>
</el-form-item>
<el-form-item
label="单位"
label-width="100px"
>
<el-input
v-model="config.customize.unit"
clearable
placeholder="请输入单位"
>
</el-input>
</el-form-item>
<el-form-item label-width="100px" label="单位字体大小">
<el-input-number
v-model="config.customize.unitSize"
:precision="0"
class="bs-el-input-number"
label="请输入单位字体大小"
/>
</el-form-item>
<el-form-item label-width="100px" label="单位字体颜色">
<ColorPicker
v-model="config.customize.unitColor"
:predefine="predefineThemeColors"
/>
</el-form-item> </el-form-item>
<el-form-item label-width="100px" label="左右间距"> <el-form-item label-width="100px" label="左右间距">
<el-input-number <el-input-number

@ -42,18 +42,21 @@ const customConfig = {
src: 'http://60.174.249.206:11080/upload/webDesign/uiSucai/dir/icon/icon_top6.png', src: 'http://60.174.249.206:11080/upload/webDesign/uiSucai/dir/icon/icon_top6.png',
borderRadius: 0, borderRadius: 0,
borderWidth: 0, borderWidth: 0,
lineDistance: 25, lineDistance: 6,
borderColor: '', borderColor: '',
bgColor: '', bgColor: 'rgba(0, 122, 255, 0.07)',
distance: 30, distance: 30,
imgSize: 110, imgSize: 80,
firstSize: 50, firstSize: 21,
firstColor: '#ffffff', firstColor: '#ffffff',
firstWeight: 500, firstWeight: 500,
secondSize: 50, secondSize: 64,
secondColor: '#ffffff', secondColor: '#007aff',
secondWeight: 500, secondWeight: 500,
secondLine: '装机处理及时率' secondLine: '装机处理及时率',
unit: '',
unitSize: 32,
unitColor:'#fff'
} }
} }
export const dataConfig = { export const dataConfig = {

@ -13,15 +13,28 @@
> >
<div <div
class="content-right-first" class="content-right-first"
:style="{
'height': customize.firstSize + 'px',
}"
>
<span
:style="{ :style="{
'font-size': customize.firstSize + 'px', 'font-size': customize.firstSize + 'px',
'height':customize.firstSize + 'px',
color:customize.firstColor, color:customize.firstColor,
'font-weight':customize.firstWeight, 'font-weight':customize.firstWeight,
'margin-bottom':customize.lineDistance +'px' 'margin-bottom':customize.lineDistance +'px'
}" }"
> >{{ optionData }}</span>
{{ optionData }} <span
:style="{
'margin-left':'10px',
'font-size': customize.unitSize + 'px',
'line-height':customize.unitSize + 'px',
color:customize.unitColor,
'margin-bottom':customize.lineDistance +'px'
}">
{{unit}}
</span>
</div> </div>
<div <div
:style="{ :style="{
@ -63,6 +76,9 @@ export default {
// this.chartInit() // this.chartInit()
}, },
computed: { computed: {
unit(){
return this.config?.customize.unit || ''
},
option () { option () {
return this.config?.option return this.config?.option
}, },
@ -117,9 +133,11 @@ export default {
text-align: center; text-align: center;
justify-content: center; justify-content: center;
.content-right-first{ .content-right-first{
width: 100%; display: flex;
text-align: center; justify-content: center;
padding-bottom: 5px; align-items: center;
// width: 100%;
// text-align: center;
} }
.content-right-second{ .content-right-second{
width: 100%; width: 100%;

@ -66,6 +66,31 @@
label="请输入圆角值" label="请输入圆角值"
/> />
</el-form-item> </el-form-item>
<el-form-item
label="单位"
label-width="100px"
>
<el-input
v-model="config.customize.unit"
clearable
placeholder="请输入单位"
>
</el-input>
</el-form-item>
<el-form-item label-width="100px" label="单位字体大小">
<el-input-number
v-model="config.customize.unitSize"
:precision="0"
class="bs-el-input-number"
label="请输入单位字体大小"
/>
</el-form-item>
<el-form-item label-width="100px" label="单位字体颜色">
<ColorPicker
v-model="config.customize.unitColor"
:predefine="predefineThemeColors"
/>
</el-form-item>
<el-form-item label-width="100px" label="上下间距"> <el-form-item label-width="100px" label="上下间距">
<el-input-number <el-input-number
v-model="config.customize.lineDistance" v-model="config.customize.lineDistance"

@ -43,14 +43,17 @@ const customConfig = {
borderWidth: 0, borderWidth: 0,
lineDistance: 25, lineDistance: 25,
borderColor: '', borderColor: '',
bgColor: '', bgColor: 'rgba(0, 122, 255, 1)',
firstSize: 50, firstSize: 50,
firstColor: '#ffffff', firstColor: '#ffffff',
firstWeight: 500, firstWeight: 500,
secondSize: 50, secondSize: 32,
secondColor: '#ffffff', secondColor: '#ffffff',
secondWeight: 500, secondWeight: 500,
secondLine: '装机处理及时率' secondLine: '装机处理及时率',
unit: '',
unitSize: 32,
unitColor:'#fff'
} }
} }
export const dataConfig = { export const dataConfig = {

@ -25,14 +25,27 @@
</div> </div>
<div <div
:style="{ :style="{
'font-size': customize.secondSize + 'px', 'height': customize.secondSize + 'px',
'height':customize.secondSize + 'px',
color:customize.secondColor,
'font-weight':customize.secondWeight,
}" }"
class="content-right-second" class="content-right-second"
> >
<span
:style="{
'font-size': customize.secondSize + 'px',
color:customize.secondColor,
'font-weight':customize.secondWeight,
}">
{{ optionData }} {{ optionData }}
</span>
<span
:style="{
'margin-left':'10px',
'font-size': customize.unitSize + 'px',
'line-height':customize.unitSize + 'px',
color:customize.unitColor,
}">
{{unit}}
</span>
</div> </div>
</div> </div>
</div> </div>
@ -63,6 +76,9 @@ export default {
// this.chartInit() // this.chartInit()
}, },
computed: { computed: {
unit(){
return this.config?.customize.unit || ''
},
option () { option () {
return this.config?.option return this.config?.option
}, },
@ -122,8 +138,9 @@ export default {
padding-bottom: 5px; padding-bottom: 5px;
} }
.content-right-second{ .content-right-second{
width: 100%; display: flex;
text-align: center; justify-content: center;
align-items: center;
} }
} }
</style> </style>

@ -66,6 +66,31 @@
label="请输入圆角值" label="请输入圆角值"
/> />
</el-form-item> </el-form-item>
<el-form-item
label="单位"
label-width="100px"
>
<el-input
v-model="config.customize.unit"
clearable
placeholder="请输入单位"
>
</el-input>
</el-form-item>
<el-form-item label-width="100px" label="单位字体大小">
<el-input-number
v-model="config.customize.unitSize"
:precision="0"
class="bs-el-input-number"
label="请输入单位字体大小"
/>
</el-form-item>
<el-form-item label-width="100px" label="单位字体颜色">
<ColorPicker
v-model="config.customize.unitColor"
:predefine="predefineThemeColors"
/>
</el-form-item>
<el-form-item label-width="100px" label="上下间距"> <el-form-item label-width="100px" label="上下间距">
<el-input-number <el-input-number
v-model="config.customize.lineDistance" v-model="config.customize.lineDistance"

@ -43,14 +43,17 @@ const customConfig = {
borderWidth: 0, borderWidth: 0,
lineDistance: 25, lineDistance: 25,
borderColor: '', borderColor: '',
bgColor: '', bgColor: 'rgba(0, 122, 255, 1)',
firstSize: 50, firstSize: 32,
firstColor: '#ffffff', firstColor: '#ffffff',
firstWeight: 500, firstWeight: 500,
secondSize: 50, secondSize: 50,
secondColor: '#ffffff', secondColor: '#ffffff',
secondWeight: 500, secondWeight: 500,
secondLine: '装机处理及时率' secondLine: '装机处理及时率',
unit: '',
unitSize: 32,
unitColor:'#fff'
} }
} }
export const dataConfig = { export const dataConfig = {

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

@ -289,10 +289,11 @@ export default function getComponentConfig (type) {
return { return {
name: '指标卡', name: '指标卡',
title: '指标卡', title: '指标卡',
icon: Icon.getNameList()[26], icon: null,
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: 500, w: 400,
h: 250, h: 170,
x: 0, x: 0,
y: 0, y: 0,
type type
@ -302,10 +303,11 @@ export default function getComponentConfig (type) {
return { return {
name: '指标卡一', name: '指标卡一',
title: '指标卡一', title: '指标卡一',
icon: Icon.getNameList()[27], icon: null,
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: 600, w: 400,
h: 250, h: 200,
x: 0, x: 0,
y: 0, y: 0,
type type
@ -314,10 +316,11 @@ export default function getComponentConfig (type) {
return { return {
name: '指标卡二', name: '指标卡二',
title: '指标卡二', title: '指标卡二',
icon: Icon.getNameList()[27], icon: null,
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: 600, w: 400,
h: 250, h: 170,
x: 0, x: 0,
y: 0, y: 0,
type type
@ -326,10 +329,11 @@ export default function getComponentConfig (type) {
return { return {
name: '指标卡三', name: '指标卡三',
title: '指标卡三', title: '指标卡三',
icon: Icon.getNameList()[27], icon: null,
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: 600, w: 400,
h: 250, h: 200,
x: 0, x: 0,
y: 0, y: 0,
type type

Loading…
Cancel
Save