修改配置数据填充

master
suixy 3 days ago
parent 2041523c79
commit 3ad157e612

@ -76,7 +76,6 @@ import { addBoardApi, delBoardApi, editBoardApi, getBoardListApi } from '@/views
const router = useRouter();
const loading = ref(false);
const selectForm = ref({
pageNum: 1,
@ -90,8 +89,7 @@ const getList = async () => {
loading.value = true;
getBoardListApi(selectForm.value)
.then((res) => {
console.log(res);
tableData.value = res.rows.filter(e=>e.pageConfigId >60011);
tableData.value = res.rows;
total.value = res.total;
})
.finally(() => {

@ -662,27 +662,32 @@
</template>
<template #node-staticData="staticDataNodeProps">
<StaticDataNode :colors="pageSettingForm.colors" v-bind="staticDataNodeProps" :inputData="getInputData(staticDataNodeProps.id)"
<StaticDataNode :colors="pageSettingForm.colors" v-bind="staticDataNodeProps"
:inputData="getInputData(staticDataNodeProps.id)"
@resize="(e) => handleResizeStop(e, staticDataNodeProps)" />
</template>
<template #node-table="tableNodeProps">
<TableNode :colors="pageSettingForm.colors" v-bind="tableNodeProps" :inputData="getInputData(tableNodeProps.id)"
<TableNode :colors="pageSettingForm.colors" v-bind="tableNodeProps"
:inputData="getInputData(tableNodeProps.id)"
@resize="(e) => handleResizeStop(e, tableNodeProps)" />
</template>
<template #node-scrollTable="scrollTableNodeProps">
<ScrollTableNode :colors="pageSettingForm.colors" v-bind="scrollTableNodeProps" :inputData="getInputData(scrollTableNodeProps.id)"
<ScrollTableNode :colors="pageSettingForm.colors" v-bind="scrollTableNodeProps"
:inputData="getInputData(scrollTableNodeProps.id)"
@resize="(e) => handleResizeStop(e, scrollTableNodeProps)" />
</template>
<template #node-background="backgroundNodeProps">
<BackgroundNode :colors="pageSettingForm.colors" v-bind="backgroundNodeProps" :inputData="getInputData(backgroundNodeProps.id)"
<BackgroundNode :colors="pageSettingForm.colors" v-bind="backgroundNodeProps"
:inputData="getInputData(backgroundNodeProps.id)"
@resize="(e) => handleResizeStop(e, backgroundNodeProps)" />
</template>
<template #node-pagination="paginationNodeProps">
<PaginationNode :colors="pageSettingForm.colors" v-bind="paginationNodeProps" :inputData="getInputData(paginationNodeProps.id)"
<PaginationNode :colors="pageSettingForm.colors" v-bind="paginationNodeProps"
:inputData="getInputData(paginationNodeProps.id)"
@resize="(e) => handleResizeStop(e, paginationNodeProps)" />
</template>
@ -733,8 +738,8 @@
</el-form-item>
<el-form-item label="颜色库" v-if="!Object.keys(nodeAttrForm).length>0">
<el-badge value="99" class="item" :offset="[-8,0]"
v-for="(i,k) in pageSettingForm.colors">
<el-color-picker style="margin-right: 8px;"
v-for="(i,k) in pageSettingForm.colors" style="margin-bottom: 12px;padding: 0">
<el-color-picker style="margin-right: 8px;padding:0"
v-model="pageSettingForm.colors[k]" show-alpha />
<template #content>
<div class="custom-content" @click="pageSettingForm.colors.splice(k, 1)">
@ -744,10 +749,10 @@
</div>
</template>
</el-badge>
<el-button :icon="Plus" @click="pageSettingForm.colors.push('#fff')" />
<el-button style="width: 32px;height: 32px; margin-bottom: 14px; " :icon="Plus"
@click="pageSettingForm.colors.push('#fff')" />
</el-form-item>
<el-form-item label="颜色库切换" v-if="!Object.keys(nodeAttrForm).length>0">
<el-select
v-model="colorType"
placeholder="请选择"
@ -1990,7 +1995,7 @@ const logEvent = async (eventname, event) => {
case 'paneClick':
nodeAttrForm.value = {};
nodeDataForm.value = {};
tabs.value = 0
tabs.value = 0;
break;
case 'click':
nodeAttrForm.value = event.node.data.options;
@ -2004,8 +2009,8 @@ const logEvent = async (eventname, event) => {
key.value += 1;
} else {
nodeAttrForm.value = {};
tabs,value = 0
nodeDataForm.value = { };
tabs, value = 0;
nodeDataForm.value = {};
}
break;
case 'contextmenu':
@ -2321,12 +2326,27 @@ const setText = (value, row, formula) => {
pointer-events: none !important;
}
:deep(.el-color-picker__icon) {
display: none;
}
.custom-content {
width: 10px;
display: flex;
align-items: center;
justify-content: center;
gap: 4px;
.el-icon {
width: 12px;
height: 12px;
}
}
:deep(.el-badge__content) {
padding: 0;
height: 14px;
width: 14px;
}
.boardGenerate {

@ -3,7 +3,6 @@
:style="{width:props.dimensions.width*props.ratioWidth+'px',height:props.dimensions.height*props.ratioHeight+'px'}">
<NodeResizer handleStyle="width:10px;height:10px;border-radius:50%" @resizeEnd="(e) => $emit('resize', e)" color="#000" v-if="!props.isView && !props.isHideHandle && props.selected"
@resize="resize" />
<div class="custom-node"
:style="{width:props.dimensions.width*props.ratioWidth+'px',height:props.dimensions.height*props.ratioHeight+'px',pointerEvents:props.isView?'auto': 'none'}">
<div style="width: 100%; height: 100%;border: 1px solid #ccc">

@ -64,12 +64,11 @@ const props = defineProps({
});
const chartRef = ref();
let chart = null;
const colorList = ref(['#9E87FF', '#73DDFF', '#fe9a8b', '#F56948', '#9E87FF']);
const sortData = (data) => {
const sortData = (data,field) => {
let obj = [];
Object.keys(data).forEach((key) => {
if (key.includes('y') && !isNaN(key.split('y')?.[1])) {
obj.push([parseFloat(key.split('y')?.[1]), data[key]]);
if (key.includes(field) && !isNaN(key.split(field)?.[1])) {
obj.push([parseFloat(key.split(field)?.[1]), data[key]]);
}
});
obj.sort((a, b) => a[0] - b[0]);
@ -78,7 +77,7 @@ const sortData = (data) => {
};
const getOption = () => {
let xData = [props.inputData?.x1 || []];
let yData = sortData(props.inputData);
let yData = sortData(props.inputData,'y');
let length = Math.min(...xData.map(e => e.length), ...yData.map(e => e.length));
let source = [['product', ...props.data.options?.yNames]];
const chartOption = {
@ -215,7 +214,7 @@ const getOption = () => {
yAxisIndex: 0,
lineStyle: {
width: 1,
color: props.colors[k % colorList.length],
color: props.colors[k % props.colors.length],
shadowColor: 'rgba(158,135,255, 0.3)',
shadowBlur: 10,
shadowOffsetY: 20

@ -62,13 +62,6 @@ 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: {

Loading…
Cancel
Save