@@ -27,6 +28,11 @@ const props = defineProps({
required: false,
default: 1
},
+ colors: {
+ type: Array,
+ required: false
+ },
+
isView: {
type: Boolean,
required: false
@@ -121,8 +127,10 @@ const getOption = () => {
extraCssText: 'box-shadow: 1px 0 2px 0 rgba(163,163,163,0.5)'
},
grid: {
- top: '30%',
- bottom: '10%'
+ top: props.data?.options?.gridTop + '%' || '20%',
+ left: props.data?.options?.gridLeft + '%' || '20%',
+ bottom: props.data?.options?.gridBottom + '%' || '20%',
+ right: props.data?.options?.gridRight + '%' || '20%'
},
xAxis: [
{
@@ -197,7 +205,7 @@ const getOption = () => {
}
}
},
- series: props.data.options?.yNames.map((i,k) => {
+ series: props.data.options?.yNames.map((i, k) => {
return {
type: 'line',
showSymbol: props.data?.options?.lineSymbolShow || false,
@@ -207,15 +215,15 @@ const getOption = () => {
yAxisIndex: 0,
lineStyle: {
width: 1,
- color: props.data?.options?.seriesColor || colorList.value[k % colorList.length],
+ color: props.colors[k % colorList.length],
shadowColor: 'rgba(158,135,255, 0.3)',
shadowBlur: 10,
shadowOffsetY: 20
},
itemStyle: {
normal: {
- color: colorList.value[k % colorList.value.length],
- borderColor: colorList.value[k % colorList.value.length],
+ color: props.colors[k % props.colors.length],
+ borderColor: props.colors[k % props.colors.length]
}
}
};
@@ -246,6 +254,11 @@ onMounted(() => {
});
chart && chart.setOption(getOption(), true);
});
+watch(() => [JSON.parse(JSON.stringify(props.colors))], (obj1, obj2) => {
+ if (JSON.stringify(obj1) !== JSON.stringify(obj2)) {
+ chart && chart.setOption(getOption(), true);
+ }
+}, { deep: true, immediate: true });
watch(() => [JSON.parse(JSON.stringify(props.inputData)), JSON.parse(JSON.stringify(props.data.options))], (obj1, obj2) => {
if (JSON.stringify(obj1) !== JSON.stringify(obj2)) {
chart && chart.setOption(getOption(), true);
diff --git a/src/views/boardGenerate/nodes/board/radarNode.vue b/src/views/boardGenerate/nodes/board/radarNode.vue
index c3eb6fb..27dd89c 100644
--- a/src/views/boardGenerate/nodes/board/radarNode.vue
+++ b/src/views/boardGenerate/nodes/board/radarNode.vue
@@ -60,7 +60,15 @@ const chartRef = ref();
let chart = null;
const colorList = ['#9E87FF', '#73DDFF', '#fe9a8b', '#F56948', '#9E87FF'];
const getOption = () => {
+ console.log(props.inputData?.x1);
const chartOption = {
+
+ grid: {
+ top: props.data?.options?.gridTop + '%' || '20%',
+ left: props.data?.options?.gridLeft + '%' || '20%',
+ bottom: props.data?.options?.gridBottom + '%' || '20%',
+ right: props.data?.options?.gridRight + '%' || '20%'
+ },
title: {
text: props.data.options.title || '',
textStyle: {
@@ -181,7 +189,7 @@ const getOption = () => {
let yData = [props.inputData?.y1 || []];
console.log(chartOption);
let length = Math.min(...xData.map(e => e.length), ...yData.map(e => e.length));
- let source = [['product', ...[props.data.options?.yNames?.[0] || '数量']]];
+ let source = [['product', ...[props.data.options?.yNames?.[0] || ' ']]];
Array(length).fill(0).forEach((_, i) => {
let item = [];
xData.forEach(e => {
diff --git a/src/views/boardGenerate/nodes/form/scrollTableNode.vue b/src/views/boardGenerate/nodes/form/scrollTableNode.vue
index 8743519..2582463 100644
--- a/src/views/boardGenerate/nodes/form/scrollTableNode.vue
+++ b/src/views/boardGenerate/nodes/form/scrollTableNode.vue
@@ -30,6 +30,7 @@
v-if="scrollShow"
style="overflow: hidden"
:style="{ height: `calc(100% - ${props.data.options.thHeight || '0px'})` }"
+ v-autoScroll
>
-
-
+
+
{{ setText(((props.inputData.tableData || [])[index] || {})[i.field], i.formula) }}
@@ -75,7 +76,8 @@
fit="contain"
/>
- {{ setText(((props.inputData.tableData || [])[index] || {})[i.field], i.formula) }}
+ {{ setText(((props.inputData.tableData || [])[index] || {})[i.field], i.formula) }}
diff --git a/src/views/boardGenerate/nodes/form/textNode.vue b/src/views/boardGenerate/nodes/form/textNode.vue
index 423e746..64454c4 100644
--- a/src/views/boardGenerate/nodes/form/textNode.vue
+++ b/src/views/boardGenerate/nodes/form/textNode.vue
@@ -7,7 +7,7 @@
{{ props.inputData?.text || props.data.options.text
+ :style="{whiteSpace:props.data.options.whiteSpace,color:props.data.options.color,fontSize:props.dimensions.height*props.ratioHeight+'px'}">{{ props.inputData?.text || props.data.options.text
}}
diff --git a/src/views/boardGenerate/tool.js b/src/views/boardGenerate/tool.js
index c23cd05..2bc9e32 100644
--- a/src/views/boardGenerate/tool.js
+++ b/src/views/boardGenerate/tool.js
@@ -9,6 +9,7 @@ const getId = (type) => {
const getOption = (e) => {
+ let res = {}
if (e === 'line' || e === 'multiLines') {
return {
title: '',
@@ -69,7 +70,6 @@ const getOption = (e) => {
gridLeft: 5,
gridBottom: 10,
gridRight: 10,
- boundaryGap: true,
xName: '',
xNameLocation: 'end',
xAxisLineShow: true,
@@ -118,7 +118,6 @@ const getOption = (e) => {
gridLeft: 5,
gridBottom: 10,
gridRight: 10,
- boundaryGap: true,
xName: '',
xNameLocation: 'end',
xAxisLineShow: true,
@@ -268,10 +267,6 @@ const getOption = (e) => {
title: '',
seriesColor: '#9E87FF',
yNames: [],
- gridTop: 30,
- gridLeft: 5,
- gridBottom: 10,
- gridRight: 10,
tooltip: true,
legend: true,
radarCenter: [30, 50],
@@ -317,11 +312,11 @@ const getOption = (e) => {
} else if (e === 'time') {
return { startTimeId: 'startTime', endTimeId: 'endTime', defaultTime: [], format: '' };
} else if (e === 'text') {
- return { text: '文字', align: '', color: '#fff' };
+ return { text: '文字', align: '', color: '#fff',whiteSpace:'nowrap' };
} else if (e === 'img') {
return { imgSrc: '' };
} else if (e === 'icon') {
- return { icon: '', iconSrc: '' };
+ return { icon: 'Tools', iconSrc: '' };
} else if (e === 'video') {
return { videoSrc: '' };
} else if (e === 'timeline') {