style: 基础组件根据修改意见调整默认样式

main
wu.jian2 1 year ago
parent 4dc11051eb
commit cc20fcce46

@ -29,10 +29,10 @@ const customConfig = {
skewY: 0
},
customize: {
fontSize: 28,
fontWeight: 700,
fontFamily: '', // 字体类型
color: 'rgb(155 159 172)'
fontSize: 14,
fontWeight: 300,
fontFamily: 'ds-digitalbold', // 字体类型
color: '#ffffff'
}
}

@ -28,7 +28,7 @@ const customConfig = {
skewY: 0
},
customize: {
htmlStr: '<h1 style="color:#ffffff;font-size: 30px">我是自定义html内容</h1>' // html的内容
htmlStr: '<h1 style="color:#6b74e4;font-size: 20px;font-style: italic;">我是自定义html内容</h1>' // html的内容
}
}

@ -33,11 +33,11 @@ const customConfig = {
// 自定义属性
customize: {
// 选择框背景颜色
bgColor: '#35393F',
bgColor: '',
// 选择框文字颜色
fontColor: '#FFFFFF',
// 选择框字大小
fontSize: 20,
// 选择框大小
fontSize: 14,
// 显示类型 year/month/date/ datetime/datetimerange/daterange
type: 'datetimerange',
// 时间格式化类型:时间戳timestamp自定义custom

@ -12,7 +12,7 @@
:model="config.customize"
label-position="left"
class="setting-body bs-el-form"
label-width="90px"
label-width="100px"
>
<SettingTitle>标题</SettingTitle>
<div class="lc-field-body">
@ -27,16 +27,18 @@
<div class="lc-field-body">
<PosWhSetting :config="config" />
</div>
<SettingTitle v-if="config.border"></SettingTitle>
<SettingTitle v-if="config.border">
边框
</SettingTitle>
<div class="lc-field-body">
<BorderSetting
v-if="config.border"
label-width="100px"
:config="config.border"
:bigTitle='config.title'
:big-title="config.title"
/>
</div>
<SettingTitle>旋转</SettingTitle>
<SettingTitle>旋转</SettingTitle>
<div class="lc-field-body">
<RotateSetting
:config="config"
@ -165,7 +167,7 @@ import ColorPicker from 'data-room-ui/ColorPicker/index.vue'
import BorderSetting from 'data-room-ui/BigScreenDesign/RightSetting/BorderSetting.vue'
import PosWhSetting from 'data-room-ui/BigScreenDesign/RightSetting/PosWhSetting.vue'
import RotateSetting from 'data-room-ui/BigScreenDesign/RightSetting/RotateSetting.vue'
import {predefineColors} from "data-room-ui/js/utils/colorList";
import { predefineColors } from 'data-room-ui/js/utils/colorList'
export default {
name: 'BarSetting',
components: {

@ -60,7 +60,7 @@ const customConfig = {
mapName: false,
// 文字颜色
mapNameColor: '#fff',
// 字大小
// 大小
mapNameSize: 12,
// 文字权重
mapNameWeight: 500,

@ -19,7 +19,7 @@ const customConfig = {
type: 'iframeChart',
root: {
version: '2023071001',
url: 'https://www.runoob.com/',
url: 'http://gcpaas.gccloud.com',
// 绕x轴旋转角度
rotateX: 0,
// 绕y轴旋转角度

@ -27,13 +27,13 @@
<div class="lc-field-body">
<PosWhSetting :config="config" />
</div>
<SettingTitle>旋转</SettingTitle>
<SettingTitle>旋转</SettingTitle>
<div class="lc-field-body">
<RotateSetting
:config="config"
/>
</div>
<!-- <SettingTitle v-if="config.border"></SettingTitle>
<!-- <SettingTitle v-if="config.border"></SettingTitle>
<div class="lc-field-body">
<BorderSetting
v-if="config.border"
@ -44,39 +44,54 @@
</div> -->
<SettingTitle>基础</SettingTitle>
<div class="lc-field-body">
<el-form-item label-width="100px" label="渐变背景色一">
<el-form-item
label-width="100px"
label="渐变背景色一"
>
<ColorPicker
v-model="config.customize.gradientColor0"
:predefine="predefineThemeColors"
/>
</el-form-item>
<el-form-item label-width="100px" label="渐变背景色二">
<el-form-item
label-width="100px"
label="渐变背景色二"
>
<ColorPicker
v-model="config.customize.gradientColor1"
:predefine="predefineThemeColors"
/>
</el-form-item>
<el-form-item label-width="100px" label="渐变色方向">
<el-select
v-model="config.customize.gradientDirection"
popper-class="bs-el-select"
class="bs-el-select"
>
<el-option
v-for="iconPosition in options"
:key="iconPosition.value"
:label="iconPosition.label"
:value="iconPosition.value"
/>
</el-select>
</el-form-item>
<el-form-item label-width="100px" label="边框颜色">
<el-form-item
label-width="100px"
label="渐变色方向"
>
<el-select
v-model="config.customize.gradientDirection"
popper-class="bs-el-select"
class="bs-el-select"
>
<el-option
v-for="iconPosition in options"
:key="iconPosition.value"
:label="iconPosition.label"
:value="iconPosition.value"
/>
</el-select>
</el-form-item>
<el-form-item
label-width="100px"
label="边框颜色"
>
<ColorPicker
v-model="config.customize.borderColor"
:predefine="predefineThemeColors"
/>
</el-form-item>
<el-form-item label-width="100px" label="边框粗细">
<el-form-item
label-width="100px"
label="边框粗细"
>
<el-input-number
v-model="config.customize.borderWidth"
:precision="0"
@ -84,7 +99,10 @@
label="请输入粗细"
/>
</el-form-item>
<el-form-item label-width="100px" label="边框圆角">
<el-form-item
label-width="100px"
label="边框圆角"
>
<el-input-number
v-model="config.customize.borderRadius"
:precision="0"
@ -100,8 +118,7 @@
v-model="config.customize.src"
clearable
placeholder="请输入链接"
>
</el-input>
/>
</el-form-item>
<el-form-item
label="单位"
@ -111,10 +128,12 @@
v-model="config.customize.unit"
clearable
placeholder="请输入单位"
>
</el-input>
/>
</el-form-item>
<el-form-item label-width="100px" label="单位字体大小">
<el-form-item
label-width="100px"
label="单位字体大小"
>
<el-input-number
v-model="config.customize.unitSize"
:precision="0"
@ -122,13 +141,19 @@
label="请输入单位字体大小"
/>
</el-form-item>
<el-form-item label-width="100px" label="单位字体颜色">
<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
v-model="config.customize.distance"
:precision="0"
@ -136,7 +161,10 @@
label="请输入左右间距"
/>
</el-form-item>
<el-form-item label-width="100px" label="上下间距">
<el-form-item
label-width="100px"
label="上下间距"
>
<el-input-number
v-model="config.customize.lineDistance"
:precision="0"
@ -144,7 +172,10 @@
label="请输入上下间距"
/>
</el-form-item>
<el-form-item label-width="100px" label="图标大小">
<el-form-item
label-width="100px"
label="图标大小"
>
<el-input-number
v-model="config.customize.imgSize"
:precision="0"
@ -152,15 +183,18 @@
label="请输入图标大小"
/>
</el-form-item>
<el-form-item label-width="100px" label="首行文字大小">
<el-form-item
label-width="100px"
label="第一行字体大小"
>
<el-input-number
v-model="config.customize.firstSize"
:precision="0"
class="bs-el-input-number"
label="请输入首行文字大小"
label="请输入第一行字体大小"
/>
</el-form-item>
<el-form-item
<el-form-item
label="数据文字类型"
label-width="100px"
>
@ -177,19 +211,25 @@
/>
</el-select>
</el-form-item>
<el-form-item label-width="100px" label="首行字体颜色">
<el-form-item
label-width="100px"
label="第一行字体颜色"
>
<ColorPicker
v-model="config.customize.firstColor"
:predefine="predefineThemeColors"
/>
</el-form-item>
<el-form-item label-width="100px" label="首行字体粗细">
<el-form-item
label-width="100px"
label="第一行字体粗细"
>
<el-input-number
v-model="config.customize.firstWeight"
:precision="0"
:step="100"
class="bs-el-input-number"
label="请输入行字体粗细"
label="请输入第一行字体粗细"
/>
</el-form-item>
<el-form-item
@ -202,21 +242,30 @@
placeholder="请输入第二行文字内容"
/>
</el-form-item>
<el-form-item label-width="100px" label="第二行文字大小">
<el-form-item
label-width="100px"
label="第二行字体大小"
>
<el-input-number
v-model="config.customize.secondSize"
:precision="0"
class="bs-el-input-number"
label="请输入行字体粗细"
label="请输入第一行字体粗细"
/>
</el-form-item>
<el-form-item label-width="100px" label="第二行字体颜色">
<el-form-item
label-width="100px"
label="第二行字体颜色"
>
<ColorPicker
v-model="config.customize.secondColor"
:predefine="predefineThemeColors"
/>
</el-form-item>
<el-form-item label-width="100px" label="第二行字体粗细">
<el-form-item
label-width="100px"
label="第二行字体粗细"
>
<el-input-number
v-model="config.customize.secondWeight"
:precision="0"
@ -235,7 +284,7 @@ import SettingTitle from 'data-room-ui/SettingTitle/index.vue'
import ColorPicker from 'data-room-ui/ColorPicker/index.vue'
import BorderSetting from 'data-room-ui/BigScreenDesign/RightSetting/BorderSetting.vue'
import RotateSetting from 'data-room-ui/BigScreenDesign/RightSetting/RotateSetting.vue'
import {predefineColors} from "data-room-ui/js/utils/colorList";
import { predefineColors } from 'data-room-ui/js/utils/colorList'
import PosWhSetting from 'data-room-ui/BigScreenDesign/RightSetting/PosWhSetting.vue'
import fontList from 'data-room-ui/js/utils/fontList'
export default {
@ -250,42 +299,42 @@ export default {
data () {
return {
options: [
{
label: '从左到右',
value: 'to right'
},
{
label: '从右到左',
value: 'to left'
},
{
label: '从上到下',
value: 'to bottom'
},
{
label: '从下到上',
value: 'to top'
},
{
label: '从左上到右下',
value: 'to bottom right'
},
{
label: '从右上到左下',
value: 'to bottom left'
},
{
label: '从左下到右上',
value: 'to top right'
},
{
label: '从右下到左上',
value: 'to top left'
}
],
{
label: '从左到右',
value: 'to right'
},
{
label: '从右到左',
value: 'to left'
},
{
label: '从上到下',
value: 'to bottom'
},
{
label: '从下到上',
value: 'to top'
},
{
label: '从左上到右下',
value: 'to bottom right'
},
{
label: '从右上到左下',
value: 'to bottom left'
},
{
label: '从左下到右上',
value: 'to top right'
},
{
label: '从右下到左上',
value: 'to top left'
}
],
//
predefineThemeColors: predefineColors,
fontFamilyList: fontList,
fontFamilyList: fontList
}
},
computed: {

@ -52,24 +52,24 @@ const customConfig = {
src: '',
borderRadius: 0,
borderWidth: 0,
fontFamily:'',
fontFamily: 'ds-digitalbold',
lineDistance: 6,
borderColor: '',
gradientDirection:'to right',
gradientColor0: 'rgba(0, 122, 255, 0.07)',
gradientColor1:'rgba(0, 122, 255, 0.07)',
gradientDirection: 'to right',
gradientColor0: '#4391f4',
gradientColor1: '#67d3fc',
distance: 30,
imgSize: 80,
firstSize: 64,
firstColor: '#007aff',
imgSize: 60,
firstSize: 36,
firstColor: '#ffffff',
firstWeight: 500,
secondSize: 21,
secondSize: 18,
secondColor: '#ffffff',
secondWeight: 500,
secondLine: '装机处理及时率',
secondLine: '已上线数',
unit: '',
unitSize: 32,
unitColor:'#fff'
unitColor: '#fff'
}
}
export const dataConfig = {

@ -36,7 +36,7 @@
:bigTitle='config.title'
/>
</div> -->
<SettingTitle>旋转</SettingTitle>
<SettingTitle>旋转</SettingTitle>
<div class="lc-field-body">
<RotateSetting
:config="config"
@ -44,39 +44,54 @@
</div>
<SettingTitle>基础</SettingTitle>
<div class="lc-field-body">
<el-form-item label-width="100px" label="渐变背景色一">
<el-form-item
label-width="100px"
label="渐变背景色一"
>
<ColorPicker
v-model="config.customize.gradientColor0"
:predefine="predefineThemeColors"
/>
</el-form-item>
<el-form-item label-width="100px" label="渐变背景色二">
<el-form-item
label-width="100px"
label="渐变背景色二"
>
<ColorPicker
v-model="config.customize.gradientColor1"
:predefine="predefineThemeColors"
/>
</el-form-item>
<el-form-item label-width="100px" label="渐变色方向">
<el-select
v-model="config.customize.gradientDirection"
popper-class="bs-el-select"
class="bs-el-select"
>
<el-option
v-for="iconPosition in options"
:key="iconPosition.value"
:label="iconPosition.label"
:value="iconPosition.value"
/>
</el-select>
</el-form-item>
<el-form-item label-width="100px" label="边框颜色">
<el-form-item
label-width="100px"
label="渐变色方向"
>
<el-select
v-model="config.customize.gradientDirection"
popper-class="bs-el-select"
class="bs-el-select"
>
<el-option
v-for="iconPosition in options"
:key="iconPosition.value"
:label="iconPosition.label"
:value="iconPosition.value"
/>
</el-select>
</el-form-item>
<el-form-item
label-width="100px"
label="边框颜色"
>
<ColorPicker
v-model="config.customize.borderColor"
:predefine="predefineThemeColors"
/>
</el-form-item>
<el-form-item label-width="100px" label="边框粗细">
<el-form-item
label-width="100px"
label="边框粗细"
>
<el-input-number
v-model="config.customize.borderWidth"
:precision="0"
@ -84,7 +99,10 @@
label="请输入粗细"
/>
</el-form-item>
<el-form-item label-width="100px" label="边框圆角">
<el-form-item
label-width="100px"
label="边框圆角"
>
<el-input-number
v-model="config.customize.borderRadius"
:precision="0"
@ -100,10 +118,9 @@
v-model="config.customize.src"
clearable
placeholder="请输入链接"
>
</el-input>
/>
</el-form-item>
<el-form-item
<el-form-item
label="单位"
label-width="100px"
>
@ -111,10 +128,12 @@
v-model="config.customize.unit"
clearable
placeholder="请输入单位"
>
</el-input>
/>
</el-form-item>
<el-form-item label-width="100px" label="单位字体大小">
<el-form-item
label-width="100px"
label="单位字体大小"
>
<el-input-number
v-model="config.customize.unitSize"
:precision="0"
@ -122,13 +141,19 @@
label="请输入单位字体大小"
/>
</el-form-item>
<el-form-item label-width="100px" label="单位字体颜色">
<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
v-model="config.customize.distance"
:precision="0"
@ -136,7 +161,10 @@
label="请输入左右间距"
/>
</el-form-item>
<el-form-item label-width="100px" label="上下间距">
<el-form-item
label-width="100px"
label="上下间距"
>
<el-input-number
v-model="config.customize.lineDistance"
:precision="0"
@ -144,7 +172,10 @@
label="请输入上下间距"
/>
</el-form-item>
<el-form-item label-width="100px" label="图标大小">
<el-form-item
label-width="100px"
label="图标大小"
>
<el-input-number
v-model="config.customize.imgSize"
:precision="0"
@ -152,45 +183,57 @@
label="请输入图标大小"
/>
</el-form-item>
<el-form-item label-width="100px" label="首行文字大小">
<el-form-item
label-width="100px"
label="第一行字体大小"
>
<el-input-number
v-model="config.customize.firstSize"
:precision="0"
class="bs-el-input-number"
label="请输入首行文字大小"
label="请输入第一行字体大小"
/>
</el-form-item>
<el-form-item label-width="100px" label="首行字体颜色">
<el-form-item
label-width="100px"
label="第一行字体颜色"
>
<ColorPicker
v-model="config.customize.firstColor"
:predefine="predefineThemeColors"
/>
</el-form-item>
<el-form-item label-width="100px" label="首行字体粗细">
<el-form-item
label-width="100px"
label="第一行字体粗细"
>
<el-input-number
v-model="config.customize.firstWeight"
:precision="0"
:step="100"
class="bs-el-input-number"
label="请输入行字体粗细"
label="请输入第一行字体粗细"
/>
</el-form-item>
<el-form-item
label="第行文字内容"
label="第行文字内容"
label-width="100px"
>
<el-input
v-model="config.customize.secondLine"
clearable
placeholder="请输入第行文字内容"
placeholder="请输入第行文字内容"
/>
</el-form-item>
<el-form-item label-width="100px" label="第二行文字大小">
<el-form-item
label-width="100px"
label="第二行字体大小"
>
<el-input-number
v-model="config.customize.secondSize"
:precision="0"
class="bs-el-input-number"
label="请输入第二行字大小"
label="请输入第二行大小"
/>
</el-form-item>
<el-form-item
@ -210,13 +253,19 @@
/>
</el-select>
</el-form-item>
<el-form-item label-width="100px" label="第二行字体颜色">
<el-form-item
label-width="100px"
label="第二行字体颜色"
>
<ColorPicker
v-model="config.customize.secondColor"
:predefine="predefineThemeColors"
/>
</el-form-item>
<el-form-item label-width="100px" label="第二行字体粗细">
<el-form-item
label-width="100px"
label="第二行字体粗细"
>
<el-input-number
v-model="config.customize.secondWeight"
:precision="0"
@ -232,7 +281,7 @@
</template>
<script>
import SettingTitle from 'data-room-ui/SettingTitle/index.vue'
import {predefineColors} from "data-room-ui/js/utils/colorList";
import { predefineColors } from 'data-room-ui/js/utils/colorList'
import ColorPicker from 'data-room-ui/ColorPicker/index.vue'
import BorderSetting from 'data-room-ui/BigScreenDesign/RightSetting/BorderSetting.vue'
import PosWhSetting from 'data-room-ui/BigScreenDesign/RightSetting/PosWhSetting.vue'
@ -250,42 +299,42 @@ export default {
data () {
return {
options: [
{
label: '从左到右',
value: 'to right'
},
{
label: '从右到左',
value: 'to left'
},
{
label: '从上到下',
value: 'to bottom'
},
{
label: '从下到上',
value: 'to top'
},
{
label: '从左上到右下',
value: 'to bottom right'
},
{
label: '从右上到左下',
value: 'to bottom left'
},
{
label: '从左下到右上',
value: 'to top right'
},
{
label: '从右下到左上',
value: 'to top left'
}
],
{
label: '从左到右',
value: 'to right'
},
{
label: '从右到左',
value: 'to left'
},
{
label: '从上到下',
value: 'to bottom'
},
{
label: '从下到上',
value: 'to top'
},
{
label: '从左上到右下',
value: 'to bottom right'
},
{
label: '从右上到左下',
value: 'to bottom left'
},
{
label: '从左下到右上',
value: 'to top right'
},
{
label: '从右下到左上',
value: 'to top left'
}
],
//
predefineThemeColors: predefineColors,
fontFamilyList: fontList,
fontFamilyList: fontList
}
},
computed: {

@ -54,22 +54,22 @@ const customConfig = {
borderWidth: 0,
lineDistance: 6,
borderColor: '',
fontFamily:'',
gradientDirection:'to right',
gradientColor0: 'rgba(0, 122, 255, 0.07)',
gradientColor1:'rgba(0, 122, 255, 0.07)',
fontFamily: 'ds-digitalbold',
gradientDirection: 'to right',
gradientColor0: '#4391f4',
gradientColor1: '#36c49f',
distance: 30,
imgSize: 80,
firstSize: 21,
imgSize: 60,
firstSize: 18,
firstColor: '#ffffff',
firstWeight: 500,
secondSize: 64,
secondColor: '#007aff',
secondSize: 36,
secondColor: '#ffffff',
secondWeight: 500,
secondLine: '装机处理及时率',
secondLine: '历史工单量',
unit: '',
unitSize: 32,
unitColor:'#fff'
unitColor: '#fff'
}
}
export const dataConfig = {

@ -6,8 +6,8 @@
<div
:style="{
'background-image': `linear-gradient(${customize.gradientDirection}, ${
gradientColor0 ? gradientColor0 : gradientColor1
} , ${gradientColor1 ? gradientColor1 : gradientColor0})`,
gradientColor0 ? gradientColor0 : gradientColor1
} , ${gradientColor1 ? gradientColor1 : gradientColor0})`,
'border-radius':customize.borderRadius + 'px',
border:`${customize.borderWidth}px solid ${customize.borderColor}`,
}"
@ -20,23 +20,24 @@
}"
>
<span
:style="{
'font-family': config.customize.fontFamily,
'font-size': customize.firstSize + 'px',
color:customize.firstColor,
'font-weight':customize.firstWeight,
'margin-bottom':customize.lineDistance +'px'
}"
:style="{
'font-family': config.customize.fontFamily,
'font-size': customize.firstSize + 'px',
color:customize.firstColor,
'font-weight':customize.firstWeight,
'margin-bottom':customize.lineDistance +'px'
}"
>{{ optionData }}</span>
<span
:style="{
'margin-left':'10px',
:style="{
'margin-left':'10px',
'font-size': customize.unitSize + 'px',
'line-height':customize.unitSize + 'px',
color:customize.unitColor,
'margin-bottom':customize.lineDistance +'px'
}">
{{unit}}
}"
>
{{ unit }}
</span>
</div>
<div
@ -83,9 +84,9 @@ export default {
return this.config.customize.gradientColor0 || this.config.customize.gradientColor1 || 'transparent'
},
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 || ''
},
option () {
@ -96,7 +97,7 @@ export default {
},
customize () {
return this.config?.customize
},
}
// tableData () {
// let dataList = ''
// if (this.optionData instanceof Array && this.optionData.length > 0) {
@ -112,7 +113,7 @@ export default {
methods: {
dataFormatting (config, data) {
let dataList = ''
if(data.success){
if (data.success) {
if (data.data instanceof Array) {
dataList = config.dataSource.dimensionField
? data.data[0][config.dataSource.dimensionField]
@ -120,8 +121,8 @@ export default {
} else {
dataList = data.data[config.dataSource.dimensionField]
}
}else{
dataList=80
} else {
dataList = 80
}
config.option = {
...config.option,
@ -129,7 +130,7 @@ export default {
}
return config
}
}
}
}
</script>

@ -27,13 +27,13 @@
<div class="lc-field-body">
<PosWhSetting :config="config" />
</div>
<SettingTitle>旋转</SettingTitle>
<SettingTitle>旋转</SettingTitle>
<div class="lc-field-body">
<RotateSetting
:config="config"
/>
</div>
<!-- <SettingTitle v-if="config.border"></SettingTitle>
<!-- <SettingTitle v-if="config.border"></SettingTitle>
<div class="lc-field-body">
<BorderSetting
v-if="config.border"
@ -44,39 +44,54 @@
</div> -->
<SettingTitle>基础</SettingTitle>
<div class="lc-field-body">
<el-form-item label-width="100px" label="渐变背景色一">
<el-form-item
label-width="100px"
label="渐变背景色一"
>
<ColorPicker
v-model="config.customize.gradientColor0"
:predefine="predefineThemeColors"
/>
</el-form-item>
<el-form-item label-width="100px" label="渐变背景色二">
<el-form-item
label-width="100px"
label="渐变背景色二"
>
<ColorPicker
v-model="config.customize.gradientColor1"
:predefine="predefineThemeColors"
/>
</el-form-item>
<el-form-item label-width="100px" label="渐变色方向">
<el-select
v-model="config.customize.gradientDirection"
popper-class="bs-el-select"
class="bs-el-select"
>
<el-option
v-for="iconPosition in options"
:key="iconPosition.value"
:label="iconPosition.label"
:value="iconPosition.value"
/>
</el-select>
</el-form-item>
<el-form-item label-width="100px" label="边框颜色">
<el-form-item
label-width="100px"
label="渐变色方向"
>
<el-select
v-model="config.customize.gradientDirection"
popper-class="bs-el-select"
class="bs-el-select"
>
<el-option
v-for="iconPosition in options"
:key="iconPosition.value"
:label="iconPosition.label"
:value="iconPosition.value"
/>
</el-select>
</el-form-item>
<el-form-item
label-width="100px"
label="边框颜色"
>
<ColorPicker
v-model="config.customize.borderColor"
:predefine="predefineThemeColors"
/>
</el-form-item>
<el-form-item label-width="100px" label="边框粗细">
<el-form-item
label-width="100px"
label="边框粗细"
>
<el-input-number
v-model="config.customize.borderWidth"
:precision="0"
@ -84,7 +99,10 @@
label="请输入粗细"
/>
</el-form-item>
<el-form-item label-width="100px" label="边框圆角">
<el-form-item
label-width="100px"
label="边框圆角"
>
<el-input-number
v-model="config.customize.borderRadius"
:precision="0"
@ -100,10 +118,12 @@
v-model="config.customize.unit"
clearable
placeholder="请输入单位"
>
</el-input>
/>
</el-form-item>
<el-form-item label-width="100px" label="单位字体大小">
<el-form-item
label-width="100px"
label="单位字体大小"
>
<el-input-number
v-model="config.customize.unitSize"
:precision="0"
@ -111,13 +131,19 @@
label="请输入单位字体大小"
/>
</el-form-item>
<el-form-item label-width="100px" label="单位字体颜色">
<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
v-model="config.customize.lineDistance"
:precision="0"
@ -125,12 +151,15 @@
label="请输入上下间距"
/>
</el-form-item>
<el-form-item label-width="100px" label="首行文字大小">
<el-form-item
label-width="100px"
label="第一行字体大小"
>
<el-input-number
v-model="config.customize.firstSize"
:precision="0"
class="bs-el-input-number"
label="请输入首行文字大小"
label="请输入第一行字体大小"
/>
</el-form-item>
<el-form-item
@ -150,19 +179,25 @@
/>
</el-select>
</el-form-item>
<el-form-item label-width="100px" label="首行字体颜色">
<el-form-item
label-width="100px"
label="第一行字体颜色"
>
<ColorPicker
v-model="config.customize.firstColor"
:predefine="predefineThemeColors"
/>
</el-form-item>
<el-form-item label-width="100px" label="首行字体粗细">
<el-form-item
label-width="100px"
label="第一行字体粗细"
>
<el-input-number
v-model="config.customize.firstWeight"
:precision="0"
:step="100"
class="bs-el-input-number"
label="请输入行字体粗细"
label="请输入第一行字体粗细"
/>
</el-form-item>
<el-form-item
@ -175,21 +210,30 @@
placeholder="请输入第二行文字内容"
/>
</el-form-item>
<el-form-item label-width="100px" label="第二行文字大小">
<el-form-item
label-width="100px"
label="第二行字体大小"
>
<el-input-number
v-model="config.customize.secondSize"
:precision="0"
class="bs-el-input-number"
label="请输入第二行字大小"
label="请输入第二行大小"
/>
</el-form-item>
<el-form-item label-width="100px" label="第二行字体颜色">
<el-form-item
label-width="100px"
label="第二行字体颜色"
>
<ColorPicker
v-model="config.customize.secondColor"
:predefine="predefineThemeColors"
/>
</el-form-item>
<el-form-item label-width="100px" label="第二行字体粗细">
<el-form-item
label-width="100px"
label="第二行字体粗细"
>
<el-input-number
v-model="config.customize.secondWeight"
:precision="0"
@ -206,7 +250,7 @@
<script>
import SettingTitle from 'data-room-ui/SettingTitle/index.vue'
import ColorPicker from 'data-room-ui/ColorPicker/index.vue'
import {predefineColors} from "data-room-ui/js/utils/colorList";
import { predefineColors } from 'data-room-ui/js/utils/colorList'
import BorderSetting from 'data-room-ui/BigScreenDesign/RightSetting/BorderSetting.vue'
import PosWhSetting from 'data-room-ui/BigScreenDesign/RightSetting/PosWhSetting.vue'
import RotateSetting from 'data-room-ui/BigScreenDesign/RightSetting/RotateSetting.vue'
@ -223,42 +267,42 @@ export default {
data () {
return {
options: [
{
label: '从左到右',
value: 'to right'
},
{
label: '从右到左',
value: 'to left'
},
{
label: '从上到下',
value: 'to bottom'
},
{
label: '从下到上',
value: 'to top'
},
{
label: '从左上到右下',
value: 'to bottom right'
},
{
label: '从右上到左下',
value: 'to bottom left'
},
{
label: '从左下到右上',
value: 'to top right'
},
{
label: '从右下到左上',
value: 'to top left'
}
],
{
label: '从左到右',
value: 'to right'
},
{
label: '从右到左',
value: 'to left'
},
{
label: '从上到下',
value: 'to bottom'
},
{
label: '从下到上',
value: 'to top'
},
{
label: '从左上到右下',
value: 'to bottom right'
},
{
label: '从右上到左下',
value: 'to bottom left'
},
{
label: '从左下到右上',
value: 'to top right'
},
{
label: '从右下到左上',
value: 'to top left'
}
],
//
predefineThemeColors: predefineColors,
fontFamilyList: fontList,
fontFamilyList: fontList
}
},
computed: {

@ -53,20 +53,20 @@ const customConfig = {
borderWidth: 0,
lineDistance: 25,
borderColor: '',
fontFamily:'',
gradientDirection:'to right',
gradientColor0: 'rgba(0, 122, 255, 1)',
gradientColor1:'rgba(0, 122, 255, 1)',
firstSize: 50,
fontFamily: 'ds-digitalbold',
gradientDirection: 'to right',
gradientColor0: '#6b74e4',
gradientColor1: '#4391f4',
firstSize: 36,
firstColor: '#ffffff',
firstWeight: 500,
secondSize: 32,
secondSize: 18,
secondColor: '#ffffff',
secondWeight: 500,
secondLine: '装机处理及时率',
secondLine: '总省份数',
unit: '',
unitSize: 32,
unitColor:'#fff'
unitColor: '#fff'
}
}
export const dataConfig = {

@ -6,8 +6,8 @@
<div
:style="{
'background-image': `linear-gradient(${customize.gradientDirection}, ${
gradientColor0 ? gradientColor0 : gradientColor1
} , ${gradientColor1 ? gradientColor1 : gradientColor0})`,
gradientColor0 ? gradientColor0 : gradientColor1
} , ${gradientColor1 ? gradientColor1 : gradientColor0})`,
'border-radius':customize.borderRadius + 'px',
border:`${customize.borderWidth}px solid ${customize.borderColor}`,
}"
@ -23,7 +23,7 @@
'margin-bottom':customize.lineDistance +'px'
}"
>
{{ customize.secondLine }}
{{ customize.secondLine }}
</div>
<div
:style="{
@ -31,23 +31,25 @@
}"
class="content-right-second"
>
<span
:style="{
'font-family': config.customize.fontFamily,
'font-size': customize.secondSize + 'px',
color:customize.secondColor,
'font-weight':customize.secondWeight,
}">
{{ optionData }}
</span>
<span
:style="{
'margin-left':'10px',
:style="{
'font-family': config.customize.fontFamily,
'font-size': customize.secondSize + 'px',
color:customize.secondColor,
'font-weight':customize.secondWeight,
}"
>
{{ optionData }}
</span>
<span
:style="{
'margin-left':'10px',
'font-size': customize.unitSize + 'px',
'line-height':customize.unitSize + 'px',
color:customize.unitColor,
}">
{{unit}}
}"
>
{{ unit }}
</span>
</div>
</div>
@ -83,9 +85,9 @@ export default {
return this.config.customize.gradientColor0 || this.config.customize.gradientColor1 || 'transparent'
},
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 || ''
},
option () {
@ -96,7 +98,7 @@ export default {
},
customize () {
return this.config?.customize
},
}
// tableData () {
// let dataList = ''
// if (this.optionData instanceof Array && this.optionData.length > 0) {
@ -112,7 +114,7 @@ export default {
methods: {
dataFormatting (config, data) {
let dataList = ''
if(data.success){
if (data.success) {
if (data.data instanceof Array) {
dataList = config.dataSource.dimensionField
? data.data[0][config.dataSource.dimensionField]
@ -120,8 +122,8 @@ export default {
} else {
dataList = data.data[config.dataSource.dimensionField]
}
}else{
dataList=0
} else {
dataList = 0
}
config.option = {
...config.option,
@ -129,7 +131,7 @@ export default {
}
return config
}
}
}
}
</script>

@ -125,27 +125,27 @@
label="请输入上下间距"
/>
</el-form-item>
<el-form-item label-width="100px" label="首行文字大小">
<el-form-item label-width="100px" label="第一行字体大小">
<el-input-number
v-model="config.customize.firstSize"
:precision="0"
class="bs-el-input-number"
label="请输入首行文字大小"
label="请输入第一行字体大小"
/>
</el-form-item>
<el-form-item label-width="100px" label="行字体颜色">
<el-form-item label-width="100px" label="第一行字体颜色">
<ColorPicker
v-model="config.customize.firstColor"
:predefine="predefineThemeColors"
/>
</el-form-item>
<el-form-item label-width="100px" label="行字体粗细">
<el-form-item label-width="100px" label="第一行字体粗细">
<el-input-number
v-model="config.customize.firstWeight"
:precision="0"
:step="100"
class="bs-el-input-number"
label="请输入行字体粗细"
label="请输入第一行字体粗细"
/>
</el-form-item>
<el-form-item
@ -158,12 +158,12 @@
placeholder="请输入第二行文字内容"
/>
</el-form-item>
<el-form-item label-width="100px" label="第二行字大小">
<el-form-item label-width="100px" label="第二行大小">
<el-input-number
v-model="config.customize.secondSize"
:precision="0"
class="bs-el-input-number"
label="请输入第二行字大小"
label="请输入第二行大小"
/>
</el-form-item>
<el-form-item

@ -50,23 +50,23 @@ const customConfig = {
},
customize: {
borderRadius: 0,
fontFamily:'',
fontFamily: 'ds-digitalbold',
borderWidth: 0,
lineDistance: 25,
borderColor: '',
gradientDirection:'to right',
gradientDirection: 'to right',
gradientColor0: 'rgba(0, 122, 255, 1)',
gradientColor1:'rgba(0, 122, 255, 1)',
firstSize: 32,
gradientColor1: 'rgba(0, 122, 255, 1)',
firstSize: 36,
firstColor: '#ffffff',
firstWeight: 500,
secondSize: 50,
secondSize: 18,
secondColor: '#ffffff',
secondWeight: 500,
secondLine: '装机处理及时率',
secondLine: '项目总数',
unit: '',
unitSize: 32,
unitColor:'#fff'
unitColor: '#fff'
}
}
export const dataConfig = {

@ -35,17 +35,17 @@ const customConfig = {
titleStyle: {
// 标题大小
fontSize: 18,
fontSize: 14,
// 标题颜色
color: '#fff',
color: '#ffffff',
// 标题间距
marginRight: 10
},
inputStyle: {
// 输入值字体大小
fontSize: 20,
fontSize: 14,
// 输入值字体颜色
color: '#fff',
color: '#ffffff',
// 输入值左间距
paddingLeft: 10
},
@ -65,7 +65,7 @@ const customConfig = {
// 边框样式
borderStyle: {
// 边框颜色
borderColor: '#dcdfe6',
borderColor: '#ffffff',
// 边框宽度
borderWidth: 1,
// 边框样式
@ -75,7 +75,7 @@ const customConfig = {
},
backgroundStyle: {
// 背景颜色
backgroundColor: '#151a26'
backgroundColor: ''
}
}
}

@ -31,21 +31,23 @@
<div class="bs-setting-wrap">
<PosWhSetting :config="config" />
</div>
<SettingTitle v-if="config.border"></SettingTitle>
<div class="lc-field-body">
<BorderSetting
v-if="config.border"
label-width="100px"
:config="config.border"
:bigTitle='config.title'
/>
</div>
<SettingTitle>旋转</SettingTitle>
<div class="lc-field-body">
<RotateSetting
:config="config"
/>
</div>
<SettingTitle v-if="config.border">
边框
</SettingTitle>
<div class="lc-field-body">
<BorderSetting
v-if="config.border"
label-width="100px"
:config="config.border"
:big-title="config.title"
/>
</div>
<SettingTitle>旋转</SettingTitle>
<div class="lc-field-body">
<RotateSetting
:config="config"
/>
</div>
<SettingTitle>基础</SettingTitle>
<div class="bs-setting-wrap">
<el-form-item
@ -69,7 +71,7 @@
class="bs-el-select"
>
<el-option
v-for="type in openTypeList"
v-for="(type) in openTypeList"
:key="type.label"
:label="type.label"
:value="type.value"

@ -46,9 +46,9 @@ const customConfig = {
title: '超链接占位符',
fontSize: 20,
fontWeight: 700,
color: 'left,#ffffff,#ffffff',
url: '', // 链接地址
openType: '', // 打开方式
color: 'left,#007aff,#ffffff',
url: 'http://gcpaas.gccloud.com', // 链接地址
openType: '_blank', // 打开方式
dialogW: 1000, // 弹窗宽度
dialogH: 500// 弹窗高度
}

@ -60,7 +60,7 @@ const customConfig = {
mapName: true,
// 文字颜色
mapNameColor: '#fff',
// 字大小
// 大小
mapNameSize: 12,
// 文字权重
mapNameWeight: 500,

@ -43,8 +43,8 @@ const customConfig = {
skewY: 0
},
customize: {
title: '跑马灯占位符',
fontSize: 40,
title: 'DataRoom由GCPAAS开源社区开源',
fontSize: 14,
fontWeight: 700,
icon: {
name: '',

@ -51,12 +51,12 @@
<SettingTitle>基础</SettingTitle>
<div class="lc-field-body">
<el-form-item
label="字大小"
label="大小"
label-width="100px"
>
<el-input
v-model="config.customize.fontSize"
placeholder="请输入字大小"
placeholder="请输入大小"
clearable
>
<template slot="append">
@ -87,7 +87,7 @@
/>
</el-form-item>
<el-form-item
label="字类型"
label="类型"
label-width="100px"
>
<el-select

@ -55,9 +55,9 @@ const customConfig = {
},
customize: {
title: '1234',
fontSize: 20,
fontSize: 40,
fontWeight: 700,
fontFamily: '', // 字体类型
fontFamily: 'ds-digitalbold', // 字体类型
color: 'left,#ffffff,#ffffff',
// thousands: false, // 千分位分隔
align: 'center', // 文字对齐方式

@ -41,9 +41,9 @@ const customConfig = {
customize: {
placeholder: '请选择',
// 输入框背景颜色
backgroundColor: '#35393F',
backgroundColor: '',
// 输入框字体大小
fontSize: 20,
fontSize: 14,
// 输入框字体颜色
fontColor: '#FFFFFF',
// 下拉框背景颜色

@ -23,18 +23,54 @@
:row-style="rowStyle"
@row-click="rowClick"
>
<!-- :label="getLabel(col)" -->
<el-table-column
v-for="(col,index) in columnData"
v-for="(col, index) in columnData"
:key="index"
show-overflow-tooltip
:prop="col.alias"
:label="getLabel(col)"
align="center"
/>
:render-header="renderHeader"
>
<!-- 自定义头部 -->
<!-- <template
slot="header"
>
<div class="default-class header-cell">
<Header :render="col.render" />
</div>
</template> -->
<template slot-scope="scope">
<div
:style="conditionalStyle(cellStyleList[scope.$index][Object.keys(columnData).findIndex(item => item === scope.column.property)])"
class="default-class cell"
>
<span
v-if="!conditionalComponent(cellStyleList[scope.$index][Object.keys(columnData).findIndex(item => item === scope.column.property)])"
>
{{ conditionalData(scope.row[col.alias], cellStyleList[scope.$index][Object.keys(columnData).findIndex(item => item === scope.column.property)]) }}
</span>
<div
v-if="conditionalComponent(cellStyleList[scope.$index][Object.keys(columnData).findIndex(item => item === scope.column.property)])"
style="width: 100%;display: flex;justify-content: center;align-items: center;"
>
<CellComponent
:setting-data="cellStyleList[scope.$index][Object.keys(columnData).findIndex(item => item === scope.column.property)]"
:value="conditionalData(scope.row[col.alias], cellStyleList[scope.$index][Object.keys(columnData).findIndex(item => item === scope.column.property)])"
/>
</div>
<!-- <component :is="" /> -->
<!-- <div v-if="cellStyleList[scope.$index][Object.keys(columnData).findIndex(item => item === scope.column.property)].style.action.component.type">
123
</div> -->
</div>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
import CellComponent from './renderCellComponent.js'
import { EventBus } from 'data-room-ui/js/utils/eventBus'
import commonMixins from 'data-room-ui/js/mixins/commonMixins'
import paramsMixins from 'data-room-ui/js/mixins/paramsMixins'
@ -54,8 +90,13 @@ export default {
default: () => ({})
}
},
components: {
CellComponent
},
template: '',
data () {
return {
conditionList: [],
updateKey: 0,
headerCellStyleObj: {
backgroundColor: 'transparent'
@ -65,7 +106,214 @@ export default {
},
columnData: {},
//
isInit: true
isInit: true,
cellStyleList: []
//
// conditionList: [
// {
// exp: 'row === 1',
// column: '0',
// propertyList: [
// {
// type: 'style',
// style: 'background-color',
// value: 'red',
// scope: 'row'
// },
// {
// type: 'style',
// style: 'font-size',
// value: '30',
// unit: 'px',
// scope: 'column'
// },
// {
// type: 'component',
// // component: {
// // type: 'el-button',
// // props: {
// // type: 'primary',
// // size: 'mini'
// // },
// // style: {
// // width: '100%'
// // }
// // },
// scope: 'row'
// },
// {
// type: 'style',
// style: 'font-size',
// value: '60',
// unit: 'px',
// // component: {
// // type: 'el-button',
// // props: {
// // type: 'primary',
// // size: 'mini'
// // },
// // style: {
// // width: '100%'
// // }
// // },
// scope: 'cell'
// },
// {
// type: 'newValue',
// exp: '"" + cellValue',
// scope: 'row'
// }
// ]
// }
// // {
// // exp: "row === 2 && column === 'keyWord'",
// // scope: 'row',
// // action:
// // {updateTableProperty
// // exp: '',
// // component: {
// // type: ''
// // },
// // style: {
// // 'background-color': 'yellow',
// // 'font-size': '20px'
// // }
// // }
// // },
// // {
// // exp: " column === 'userNum'",
// // scope: 'column',
// // action:
// // {
// // exp: 'Number(cellValue)',
// // component: {
// // type: 'el-progress',
// // props: {
// // status: 'exception',
// // 'stroke-width': 50,
// // 'text-inside': true
// // },
// // style: {
// // width: '100%'
// // }
// // },
// // style: {
// // 'background-color': '',
// // 'font-size': '25px'
// // }
// // }
// // },
// // {
// // exp: " column === 'searchNum'",
// // scope: 'column',
// // action:
// // {
// // exp: '',
// // component: {
// // type: 'el-input',
// // props: {
// // placeholder: '',
// // disabled: true
// // },
// // style: {
// // width: '300px'
// // }
// // },
// // style: {
// // 'background-color': 'pink'
// // }
// // }
// // },
// // {
// // exp: 'column === "ranking" && cellValue === 1',
// // scope: 'cell',
// // action: {
// // exp: '',
// // component: {
// // type: '',
// // props: {},
// // style: {}
// // },
// // style: {
// // // 使
// // 'background-color': 'red',
// // 'border-radius': '50%',
// // 'font-size': '30px',
// // width: '80px',
// // height: '80px',
// // display: 'flex',
// // 'justify-content': 'center',
// // 'align-items': 'center'
// // }
// // }
// // },
// // {
// // exp: 'column === "ranking" && cellValue === 2',
// // scope: 'cell',
// // action: {
// // exp: '',
// // component: {
// // type: '',
// // props: {},
// // style: {}
// // },
// // style: {
// // // 使
// // 'background-color': 'blue',
// // 'border-radius': '50%',
// // 'font-size': '30px',
// // width: '80px',
// // height: '80px',
// // display: 'flex',
// // 'justify-content': 'center',
// // 'align-items': 'center'
// // }
// // }
// // },
// // {
// // exp: 'column === "ranking" && cellValue === 3',
// // scope: 'cell',
// // action: {
// // exp: '',
// // component: {
// // type: '',
// // props: {},
// // style: {}
// // },
// // style: {
// // // 使
// // 'background-color': 'white !important',
// // 'border-radius': '50%',
// // 'font-size': '30px',
// // width: '80px',
// // height: '80px',
// // display: 'flex',
// // 'justify-content': 'center',
// // 'align-items': 'center'
// // }
// // }
// // },
// // {
// // exp: 'column === "ranking" && cellValue === 4',
// // scope: 'cell',
// // action: {
// // exp: 'cellValue = ""',
// // component: {
// // type: '',
// // props: {},
// // style: {}
// // },
// // style: {
// // 'background-image': 'url(https://images.dog.ceo/breeds/samoyed/n02111889_10206.jpg)',
// // // 50px
// // width: '80px',
// // height: '80px',
// // //
// // 'background-size': 'cover'
// // }
// // }
// // }
// ]
}
},
computed: {
@ -100,7 +348,6 @@ export default {
},
watch: {
activeItemConfig (val) {
console.dir(val)
}
},
created () { },
@ -118,11 +365,341 @@ export default {
this.updateKey = new Date().getTime()
}
})
EventBus.$on('updateTableProperty', list => {
this.getTablePropertyData(list).then(data => {
this.conditionList = data
this.updateTableProperty(this.config.option.tableData)
})
})
this.getTablePropertyData().then(data => {
this.conditionList = data
if (data) {
if (this.config.option.tableData && this.config.option.tableData.length > 0) {
this.updateTableProperty(this.config.option.tableData)
}
}
})
},
beforeDestroy () {
EventBus.$off('dragSelectChange')
EventBus.$off('updateTableProperty')
},
methods: {
getTablePropertyData (conditionListParam) {
return new Promise(resolve => {
const list = []
const conditionList = conditionListParam || cloneDeep(this.config.customize.condition.columnConditionList)
conditionList.forEach((condition) => {
// condition.exp = ''
// condition.expList.forEach(exp => {
// condition.exp += ` ${exp.relation ? exp.relation : ''} ${exp.value}`
// })
condition.propertyList.forEach((item) => {
if (item.property === 'background-image' && item.enable) {
if (item.value.findIndex(item => item === 'url') === -1) {
item.value = `url(${item.value})`
}
}
// if (item.type === 'component') {
// console.log(item.cellComponent.type)
// }
})
// console.log(condition)
list.push(condition)
resolve(list)
})
})
},
updateTableProperty (tableData) {
const cellSettingList = []
for (let i = 0; i < tableData.length; i++) {
cellSettingList.push([])
for (let j = 0; j < Object.keys(this.columnData).length; j++) {
cellSettingList[i].push({ style: {}, cellIndex: { rowNum: i, columnNum: j }, cellComponent: { type: '' }, exp: '' })
}
}
const rowNum = null
const columnNum = null
const cellRow = null
const cellColumn = null
const rowList = []
//
const cellExpList = []
//
const cellStyleList = []
//
const cellComponentList = []
tableData.forEach((tableItem, index) => {
Object.values(tableItem).forEach((data, dataIndex) => {
this.conditionList.forEach((condition) => {
const cellValue = data
const column = Object.keys(this.columnData)[dataIndex]
const row = index
if (condition.exp.trim() !== '') {
// condition.exp
eval(`if(${condition.exp}){
if (condition.propertyList.length > 0) {
condition.propertyList.forEach((property) => {
if (property.scope === 'row' && property.enable) {
rowNum = index.toString()
if (property.type === 'style') {
cellStyleList.push({
rowNum: index.toString(),
style: {
[property.property]: property.value + property.unit
}
})
} else if (property.type === 'exp') {
cellExpList.push({
rowNum: index.toString(),
exp: property.exp
})
} else if (property.type === 'component') {
cellComponentList.push({
rowNum: index.toString(),
component: property.cellComponent
})
}
} else if (property.scope === 'column' && property.enable && condition.column.toString() === dataIndex.toString()) {
columnNum = dataIndex.toString()
if (property.type === 'style') {
cellStyleList.push({
columnNum: dataIndex.toString(),
style: {
[property.property]: property.value + property.unit
}
})
} else if (property.type === 'exp') {
cellExpList.push({
columnNum: dataIndex.toString(),
exp: property.exp
})
} else if (property.type === 'component') {
cellComponentList.push({
columnNum: dataIndex.toString(),
component: property.cellComponent
})
}
} else if (property.scope === 'cell' && property.enable) {
cellRow = index.toString()
cellColumn = dataIndex.toString()
}
})
}
}`)
//
// rowList.push(cellSettingList[row][dataIndex])
cellStyleList.forEach((cellStyle) => {
if (cellStyle.rowNum === rowNum) {
cellSettingList[Number(cellStyle.rowNum)][dataIndex].style = {
...cellSettingList[Number(cellStyle.rowNum)][dataIndex].style,
...cellStyle.style
}
} else if (cellStyle.columnNum && cellStyle.columnNum === condition.column.toString()) {
if (cellSettingList[row][Number(cellStyle.columnNum)]) {
cellSettingList[row][Number(cellStyle.columnNum)].style = {
...(cellSettingList[row][Number(cellStyle.columnNum)].style || {}),
...cellStyle.style
}
}
}
})
cellExpList.forEach((cellExp) => {
if (cellExp.rowNum === rowNum) {
cellSettingList[Number(cellExp.rowNum)][dataIndex].exp = cellExp.exp
} else if (cellExp.columnNum && cellExp.columnNum === condition.column.toString()) {
cellSettingList[row][Number(cellExp.columnNum)].exp = cellExp.exp
}
})
cellComponentList.forEach((cellComponent) => {
if (cellComponent.rowNum === rowNum) {
cellSettingList[Number(cellComponent.rowNum)][dataIndex].cellComponent = {
...cellSettingList[Number(cellComponent.rowNum)][dataIndex].cellComponent,
...cellComponent.component
}
} else if (cellComponent.columnNum && cellComponent.columnNum === condition.column.toString()) {
cellSettingList[row][Number(cellComponent.columnNum)].cellComponent = {
...cellSettingList[row][Number(cellComponent.columnNum)].cellComponent,
...cellComponent.component
}
}
})
// cellExpList.forEach((cellExp) => {
// })
// cellComponentList.forEach((cellComponent) => {
// console.log(111, cellComponent)
// if (cellComponent.rowNum === row.toString() && cellComponent.columnNum === dataIndex.toString()) {
// cellSettingList[row][dataIndex].cellComponent = cellComponent.component
// }
// })
// condition.propertyList.forEach((property) => {
// if (property.scope === 'row') {
// // console.log(property.property)
// // if (rowNum && property.enable) {
// // cellSettingList[Number(rowNum)].forEach((rowItem) => {
// // if (property.type === 'style') {
// // rowItem.style[property.property] = property.value + property.unit
// // } else if (property.type === 'component') {
// // rowItem.cellComponent = property.cellComponent
// // } else if (property.type === 'exp') {
// // rowItem.cellData.exp = property.exp
// // }
// // })
// // }
// // rowNum = null
// } else if (property.scope === 'column') {
// if (columnNum && property.enable) {
// if (property.type === 'style') {
// cellSettingList[row][Number(condition.column)].style[property.property] = property.value + property.unit
// } else if (property.type === 'component') {
// cellSettingList[row][Number(condition.column)].cellComponent = property.cellComponent
// } else if (property.type === 'exp') {
// cellSettingList[row][Number(condition.column)].exp = property.exp
// }
// if (cellSettingList[row][Number(condition.column)].cellIndex.columnNum !== Number(columnNum)) {
// columnNum = null
// }
// }
// } else if (property.scope === 'cell') {
// if (cellRow && cellColumn && property.enable) {
// if (property.type === 'style') {
// cellSettingList[Number(cellRow)][Number(cellColumn)].style[property.property] = property.value + property.unit
// } else if (property.type === 'component') {
// cellSettingList[Number(cellRow)][Number(cellColumn)].cellComponent = property.cellComponent
// } else if (property.type === 'exp') {
// cellSettingList[Number(cellRow)][Number(cellColumn)].exp = property.exp
// }
// }
// if (cellSettingList[Number(cellRow)][Number(cellColumn)].cellIndex.rowNum !== Number(cellRow) || cellSettingList[Number(cellRow)][Number(cellColumn)].cellIndex.columnNum !== Number(cellColumn)) {
// cellRow = null
// cellColumn = null
// }
// }
// })
// if (script.scope === 'row') {
// //
// if (rowNum) {
// cellSettingList[rowNum].forEach((rowItem) => {
// rowItem.style = script.action.style
// })
// }
// } else if (script.scope === 'column') {
// //
// if (columnNum) {
// if (script.action.style && !cellStyleList.find(item => item.columnNum === columnNum)) {
// cellStyleList.push({
// columnNum: columnNum,
// style: script.action.style
// })
// script.action.style = {}
// }
// if (cellStyleList.length > 0) {
// if (cellStyleList.find(item => item.columnNum === cellSettingList[row][dataIndex].cellIndex.columnNum)) {
// cellSettingList[row][dataIndex].style = cellStyleList.find(item => item.columnNum === cellSettingList[row][dataIndex].cellIndex.columnNum).style
// }
// }
// if (script.action.exp && !cellExpList.find(item => item.columnNum === columnNum)) {
// cellExpList.push({
// columnNum: columnNum,
// exp: script.action.exp
// })
// script.action.exp = ''
// }
// if (cellExpList.length > 0) {
// if (cellExpList.find(item => item.columnNum === cellSettingList[row][dataIndex].cellIndex.columnNum)) {
// cellSettingList[row][dataIndex].cellData.exp = cellExpList.find(item => item.columnNum === cellSettingList[row][dataIndex].cellIndex.columnNum).exp
// }
// }
// if (script.action.component && !cellComponentList.find(item => item.columnNum === columnNum)) {
// cellComponentList.push({
// columnNum: columnNum,
// component: script.action.component
// })
// script.action.component = {}
// }
// if (cellComponentList.length > 0) {
// if (cellComponentList.find(item => item.columnNum === cellSettingList[row][dataIndex].cellIndex.columnNum)) {
// cellSettingList[row][dataIndex].component = cellComponentList.find(item => item.columnNum === cellSettingList[row][dataIndex].cellIndex.columnNum).component
// }
// }
// }
// } else if (script.scope === 'cell') {
// if (cellRow && cellColumn) {
// cellSettingList[Number(cellRow)][Number(cellColumn)].style = script.action.style
// cellSettingList[Number(cellRow)][Number(cellColumn)].cellData.exp = script.action.exp
// cellSettingList[Number(cellRow)][Number(cellColumn)].component = script.action.component
// }
// }
}
})
rowList.length = 0
})
})
// console.log('cellSettingList', cellSettingList)
this.cellStyleList = cellSettingList
},
//
conditionalStyle (data) {
const styleString = Object.keys(data?.style).map((key) => `${this.camelToDash(key)}: ${data.style[key]}`).join('; ')
return styleString
},
camelToDash (str) {
if (typeof str === 'undefined') {
return ''
}
return str.replace(/([A-Z])/g, '-$1').toLowerCase()
},
//
conditionalData (a, b) {
const cellValue = a
let newValue = null
if (b.exp) {
newValue = eval(b.exp)
}
return newValue || cellValue
},
//
conditionalComponent (b) {
let isComponent
if (b.cellComponent.type) {
isComponent = true
} else {
isComponent = false
}
return isComponent
},
renderHeader (h, { column, $index }) {
const headerBackgroundColor = {
light: '#ffffff',
dark: 'transparent'
}
const initColor = this.customTheme === 'light' ? '#000000' : '#ffffff'
const style = {
backgroundColor: this.config.customize.headerBackgroundColor || headerBackgroundColor[this.customTheme],
color: this.config.customize.headerFontColor || initColor,
fontSize: this.config.customize.headerFontSize + 'px' || '14px'
}
console.log(11, style)
return h('div', {
style: style
},
[
h('span', column.label)
])
},
// customizeCellStyles (initialIndex, cellData, column, label, scope) {
// // eslint-disable-next-line no-unused-vars
// const cellValue = cellData[label]
// const styleData = ''
// // eslint-disable-next-line no-unused-vars
// const row = initialIndex + 1
// const scopeRow = null
// this.conditionScript.forEach((data) => {
// eval(`if(${data.exp}){if(data.scope === 'row'){ scopeRow = initialIndex }}`)
// })
// return styleData
// },
cellStyle ({ row, column, rowIndex, columnIndex }) {
const bodyBackgroundColor = {
light: '#ffffff',
@ -193,6 +770,7 @@ export default {
config.option.columnData = columnData
}
this.columnData = cloneDeep(config.option.columnData)
this.updateTableProperty(config.option.tableData)
this.updateKey = new Date().getTime()
return config
},
@ -262,13 +840,11 @@ export default {
// height: 100%;
background-color: transparent;
}
::v-deep .el-table tr {
background-color: transparent;
}
// ::v-deep .el-table th.gutter {
// border-bottom: 2px solid var(--bs-el-color-primary) !important;
// }
::v-deep .el-table__body {
height: 100%;
}
@ -353,4 +929,30 @@ export default {
background-color: #90939980;
}
}
.default-class {
height: 100%;
display: flex;
overflow: hidden;
justify-content: center;
align-items: center;
}
::v-deep .el-table__body {
width: 100% !important;
}
::v-deep .cell {
padding: 0;
width: 100%;
height: 100%;
}
::v-deep .el-table th.el-table__cell>.cell {
padding: 0 !important;
}
::v-deep .el-table__cell {
padding: 0px !important;
}
</style>

@ -19,13 +19,15 @@
/>
</el-form-item>
</div>
<SettingTitle v-if="config.border"></SettingTitle>
<SettingTitle v-if="config.border">
边框
</SettingTitle>
<div class="lc-field-body">
<BorderSetting
v-if="config.border"
label-width="120px"
:config="config.border"
:bigTitle='config.title'
:big-title="config.title"
/>
</div>
<SettingTitle>位置</SettingTitle>
@ -36,11 +38,11 @@
/>
</div>
<SettingTitle>旋转</SettingTitle>
<div class="lc-field-body">
<RotateSetting
:config="config"
/>
</div>
<div class="lc-field-body">
<RotateSetting
:config="config"
/>
</div>
<SettingTitle>基础</SettingTitle>
<div class="lc-field-body">
<el-form-item label="表头颜色">
@ -115,7 +117,7 @@ import ColorPicker from 'data-room-ui/ColorPicker/index.vue'
import { chartSettingMixins } from 'data-room-ui/js/mixins/chartSettingMixins'
import PosWhSetting from 'data-room-ui/BigScreenDesign/RightSetting/PosWhSetting.vue'
import RotateSetting from 'data-room-ui/BigScreenDesign/RightSetting/RotateSetting.vue'
import {predefineColors} from "data-room-ui/js/utils/colorList";
import { predefineColors } from 'data-room-ui/js/utils/colorList'
export default {
components: {
ColorPicker,

@ -67,7 +67,13 @@ const customConfig = {
// 表格奇数行背景颜色
oddRowBackgroundColor: '',
// 表格偶数行背景颜色‘
evenRowBackgroundColor: ''
evenRowBackgroundColor: '',
condition: {
// 表头配置
headerConditionList: [],
// 表格列配置
columnConditionList: []
}
// 表格是否需要边框
// border: false,
}

@ -51,12 +51,12 @@
<SettingTitle>基础</SettingTitle>
<div class="lc-field-body">
<el-form-item
label="字大小"
label="大小"
label-width="100px"
>
<el-input
v-model="config.customize.fontSize"
placeholder="请输入字大小"
placeholder="请输入大小"
clearable
>
<template slot="append">

@ -28,10 +28,10 @@ const customConfig = {
skewY: 0
},
customize: {
fontSize: 28,
fontWeight: 700,
fontFamily: '', // 字体类型
color: 'rgb(155 159 172)'
fontSize: 14,
fontWeight: 300,
fontFamily: 'ds-digitalbold', // 字体类型
color: '#ffffff'
}
}

@ -34,11 +34,11 @@ const customConfig = {
customize: {
value: '',
// 选择框背景颜色
backgroundColor: '#35393F',
backgroundColor: '',
// 选择框文字颜色
fontColor: '#FFFFFF',
// 选择框字大小
fontSize: 20,
// 选择框大小
fontSize: 14,
// 下拉框背景颜色
dropDownBackgroundColor: '#35393F',
// 下拉框字体颜色

@ -18,7 +18,7 @@
</template>
<script>
import {predefineColors} from 'data-room-ui/js/utils/colorList'
import { predefineColors } from 'data-room-ui/js/utils/colorList'
export default {
name: 'ColorPicker',
props: {

@ -1,5 +1,5 @@
//颜色选择器的预设颜色
export const predefineColors =[
// 颜色选择器的预设颜色
export const predefineColors = [
'#6b74e4',
'#4391f4',
'#38bbe5',

@ -299,58 +299,58 @@ export default function getComponentConfig (type) {
y: 0,
type
}
case 'indicatorCard':
return {
name: '指标卡一',
title: '指标卡一',
icon: null,
img: require('data-room-ui/assets/images/cardImg/card.png'),
className: 'com.gccloud.dataroom.core.module.chart.components.ScreenIndicatorCardChart',
w: 400,
h: 170,
x: 0,
y: 0,
type
case 'indicatorCard':
return {
name: '指标卡一',
title: '指标卡一',
icon: null,
img: require('data-room-ui/assets/images/cardImg/card.png'),
className: 'com.gccloud.dataroom.core.module.chart.components.ScreenIndicatorCardChart',
w: 300,
h: 114,
x: 0,
y: 0,
type
}
case 'indicatorCard2':
return {
name: '指标卡二',
title: '指标卡二',
icon: null,
img: require('data-room-ui/assets/images/cardImg/card2.png'),
className: 'com.gccloud.dataroom.core.module.chart.components.ScreenIndicatorCardChart',
w: 400,
h: 170,
x: 0,
y: 0,
type
case 'indicatorCard2':
return {
name: '指标卡二',
title: '指标卡二',
icon: null,
img: require('data-room-ui/assets/images/cardImg/card2.png'),
className: 'com.gccloud.dataroom.core.module.chart.components.ScreenIndicatorCardChart',
w: 300,
h: 114,
x: 0,
y: 0,
type
}
case 'indexCard':
return {
name: '指标卡三',
title: '指标卡三',
icon: null,
img: require('data-room-ui/assets/images/cardImg/indicard.png'),
className: 'com.gccloud.dataroom.core.module.chart.components.ScreenIndexCardChart',
w: 400,
h: 170,
x: 0,
y: 0,
type
case 'indexCard':
return {
name: '指标卡三',
title: '指标卡三',
icon: null,
img: require('data-room-ui/assets/images/cardImg/indicard.png'),
className: 'com.gccloud.dataroom.core.module.chart.components.ScreenIndexCardChart',
w: 300,
h: 114,
x: 0,
y: 0,
type
}
case 'indexCard2':
return {
name: '指标卡四',
title: '指标卡四',
icon: null,
img: require('data-room-ui/assets/images/cardImg/indcard2.png'),
className: 'com.gccloud.dataroom.core.module.chart.components.ScreenIndexCardChart',
w: 300,
h: 114,
x: 0,
y: 0,
type
}
case 'indexCard2':
return {
name: '指标卡四',
title: '指标卡四',
icon: null,
img: require('data-room-ui/assets/images/cardImg/indcard2.png'),
className: 'com.gccloud.dataroom.core.module.chart.components.ScreenIndexCardChart',
w: 400,
h: 170,
x: 0,
y: 0,
type
}
default:
return {}
}

Loading…
Cancel
Save