|
|
|
@ -1,9 +1,6 @@
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<div class="boardGenerate">
|
|
|
|
<div class="boardGenerate">
|
|
|
|
<div class="top">
|
|
|
|
<div class="top">
|
|
|
|
<span style="color: #fff">
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<!-- <el-button @click="nodes.forEach(e=>e.draggable =true)">11</el-button>-->
|
|
|
|
|
|
|
|
<div class="componentMenu">
|
|
|
|
<div class="componentMenu">
|
|
|
|
<el-popover
|
|
|
|
<el-popover
|
|
|
|
:width="880"
|
|
|
|
:width="880"
|
|
|
|
@ -193,7 +190,7 @@
|
|
|
|
<!-- </template>-->
|
|
|
|
<!-- </template>-->
|
|
|
|
<!-- <div class="moduleText">设备数据</div>-->
|
|
|
|
<!-- <div class="moduleText">设备数据</div>-->
|
|
|
|
<!-- </el-card>-->
|
|
|
|
<!-- </el-card>-->
|
|
|
|
<template v-for="i in customData">
|
|
|
|
<template v-for="i in customData.slice(17,customData.length)">
|
|
|
|
<el-card class="moduleCard" shadow="never" :draggable="true"
|
|
|
|
<el-card class="moduleCard" shadow="never" :draggable="true"
|
|
|
|
@dragstart="onDragStart($event, 'customData',i)"
|
|
|
|
@dragstart="onDragStart($event, 'customData',i)"
|
|
|
|
:style="{display:'inline-block',margin:'0 4px 4px 0'}"
|
|
|
|
:style="{display:'inline-block',margin:'0 4px 4px 0'}"
|
|
|
|
@ -384,6 +381,35 @@
|
|
|
|
</el-card>
|
|
|
|
</el-card>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</el-popover>
|
|
|
|
</el-popover>
|
|
|
|
|
|
|
|
<el-popover
|
|
|
|
|
|
|
|
:width="620"
|
|
|
|
|
|
|
|
trigger="click"
|
|
|
|
|
|
|
|
placement="bottom-start"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<template #reference>
|
|
|
|
|
|
|
|
<div style="margin-left: 30px;display: inline-block;vertical-align: top">
|
|
|
|
|
|
|
|
<el-icon color="#fff" style="margin-top: 15px;">
|
|
|
|
|
|
|
|
<Opportunity />
|
|
|
|
|
|
|
|
</el-icon>
|
|
|
|
|
|
|
|
<el-icon color="#eee" :size="10" style="margin-top: 20px;margin-left: 8px;;vertical-align: top">
|
|
|
|
|
|
|
|
<ArrowDown />
|
|
|
|
|
|
|
|
</el-icon>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
<el-card class="moduleCard" shadow="never" :draggable="true"
|
|
|
|
|
|
|
|
@dragstart="onDragStart($event, 'menu')" :style="{display:'inline-block',margin:'0 4px 4px 0'}"
|
|
|
|
|
|
|
|
:body-style="{padding:'4px 0'}">
|
|
|
|
|
|
|
|
<template #header>
|
|
|
|
|
|
|
|
<div style="width: 100%;height: 100%;text-align: center">
|
|
|
|
|
|
|
|
<el-icon><Menu /></el-icon>
|
|
|
|
|
|
|
|
<!-- <el-image style="width:50px;height: 50px;text-align: center" :src="textImg" fit="contain" />-->
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<div class="moduleText">菜单</div>
|
|
|
|
|
|
|
|
</el-card>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</el-popover>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="optionsMenu">
|
|
|
|
<div class="optionsMenu">
|
|
|
|
<el-icon color="#ddd" :size="20" style="margin-top: 15px;margin-left: 20px;vertical-align: top"
|
|
|
|
<el-icon color="#ddd" :size="20" style="margin-top: 15px;margin-left: 20px;vertical-align: top"
|
|
|
|
@ -393,9 +419,9 @@
|
|
|
|
<el-icon color="#ddd" :size="20" style="margin-top: 15px;margin-left: 20px;vertical-align: top" @click="save">
|
|
|
|
<el-icon color="#ddd" :size="20" style="margin-top: 15px;margin-left: 20px;vertical-align: top" @click="save">
|
|
|
|
<DocumentChecked />
|
|
|
|
<DocumentChecked />
|
|
|
|
</el-icon>
|
|
|
|
</el-icon>
|
|
|
|
<el-icon color="#ddd" :size="20" style="margin-top: 15px;margin-left: 20px;vertical-align: top" @click="clear">
|
|
|
|
<!-- <el-icon color="#ddd" :size="20" style="margin-top: 15px;margin-left: 20px;vertical-align: top" @click="clear">-->
|
|
|
|
<View />
|
|
|
|
<!-- <View />-->
|
|
|
|
</el-icon>
|
|
|
|
<!-- </el-icon>-->
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="left">
|
|
|
|
<div class="left">
|
|
|
|
@ -635,8 +661,12 @@
|
|
|
|
<PaginationNode v-bind="paginationNodeProps" :inputData="getInputData(paginationNodeProps.id)"
|
|
|
|
<PaginationNode v-bind="paginationNodeProps" :inputData="getInputData(paginationNodeProps.id)"
|
|
|
|
@resize="(e) => handleResizeStop(e, paginationNodeProps)" />
|
|
|
|
@resize="(e) => handleResizeStop(e, paginationNodeProps)" />
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</VueFlow>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<template #node-menu="menuNodeProps">
|
|
|
|
|
|
|
|
<MenuNode v-bind="menuNodeProps" :inputData="getInputData(menuNodeProps.id)"
|
|
|
|
|
|
|
|
@resize="(e) => handleResizeStop(e, menuNodeProps)" />
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</VueFlow>
|
|
|
|
</FlowRuler>
|
|
|
|
</FlowRuler>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="right">
|
|
|
|
<div class="right">
|
|
|
|
@ -675,7 +705,7 @@
|
|
|
|
</el-form>
|
|
|
|
</el-form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="tabItem" v-if="Object.keys(nodeAttrForm).length>0 && tabs === 1">
|
|
|
|
<div class="tabItem" v-if="Object.keys(nodeAttrForm).length>0 && tabs === 1">
|
|
|
|
<el-form :model="nodeAttrForm" label-width="auto" style="max-width: 600px">
|
|
|
|
<el-form :model="nodeAttrForm" label-width="auto" style="max-width: 600px" :key="key">
|
|
|
|
<el-collapse v-model="collapseActiveName" accordion expand-icon-position="left">
|
|
|
|
<el-collapse v-model="collapseActiveName" accordion expand-icon-position="left">
|
|
|
|
<el-collapse-item title="x轴设置" name="1" v-if="Object.keys(nodeAttrForm).includes('xName')">
|
|
|
|
<el-collapse-item title="x轴设置" name="1" v-if="Object.keys(nodeAttrForm).includes('xName')">
|
|
|
|
<el-form-item label="x轴名称" v-if="Object.keys(nodeAttrForm).includes('xName')">
|
|
|
|
<el-form-item label="x轴名称" v-if="Object.keys(nodeAttrForm).includes('xName')">
|
|
|
|
@ -1263,7 +1293,7 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<el-dialog v-model="pageSettingVisible" title="页面设置" width="500">
|
|
|
|
<el-dialog v-model="pageSettingVisible" title="页面设置" width="500">
|
|
|
|
<el-form :model="pageSettingForm">
|
|
|
|
<el-form :model="pageSettingForm">
|
|
|
|
<el-form-item label="页面大小" label-width="80px">
|
|
|
|
<el-form-item label="页面大小" label-width="100px">
|
|
|
|
<el-input v-model="pageSettingForm.width" style="width: calc(50% - 10px)" autocomplete="off"
|
|
|
|
<el-input v-model="pageSettingForm.width" style="width: calc(50% - 10px)" autocomplete="off"
|
|
|
|
placeholder="缺省则为不限制" />
|
|
|
|
placeholder="缺省则为不限制" />
|
|
|
|
<span style="width: 20px;text-align: center">
|
|
|
|
<span style="width: 20px;text-align: center">
|
|
|
|
@ -1272,7 +1302,10 @@
|
|
|
|
<el-input v-model="pageSettingForm.height" style="width: calc(50% - 10px)" autocomplete="off"
|
|
|
|
<el-input v-model="pageSettingForm.height" style="width: calc(50% - 10px)" autocomplete="off"
|
|
|
|
placeholder="缺省则为不限制" />
|
|
|
|
placeholder="缺省则为不限制" />
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="页面背景" label-width="80px">
|
|
|
|
<el-form-item label="页面背景色" label-width="100px">
|
|
|
|
|
|
|
|
<el-color-picker v-model="pageSettingForm.bgColor" show-alpha />
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="页面背景图" label-width="100px">
|
|
|
|
<el-upload
|
|
|
|
<el-upload
|
|
|
|
class="avatar-uploader"
|
|
|
|
class="avatar-uploader"
|
|
|
|
:action="uploadFileUrl"
|
|
|
|
:action="uploadFileUrl"
|
|
|
|
@ -1581,7 +1614,18 @@ import textImg from './images/textImg.png';
|
|
|
|
|
|
|
|
|
|
|
|
import FlowRuler from './FlowRuler.vue';
|
|
|
|
import FlowRuler from './FlowRuler.vue';
|
|
|
|
import * as icon from '@element-plus/icons-vue';
|
|
|
|
import * as icon from '@element-plus/icons-vue';
|
|
|
|
import { ArrowDown, Close, Delete, DocumentChecked, Lock, Plus, Setting, Unlock, View } from '@element-plus/icons-vue';
|
|
|
|
import {
|
|
|
|
|
|
|
|
ArrowDown,
|
|
|
|
|
|
|
|
Close,
|
|
|
|
|
|
|
|
Delete,
|
|
|
|
|
|
|
|
DocumentChecked,
|
|
|
|
|
|
|
|
Lock,
|
|
|
|
|
|
|
|
Plus,
|
|
|
|
|
|
|
|
Setting,
|
|
|
|
|
|
|
|
Unlock,
|
|
|
|
|
|
|
|
Opportunity,
|
|
|
|
|
|
|
|
Menu
|
|
|
|
|
|
|
|
} from '@element-plus/icons-vue';
|
|
|
|
import { MarkerType, useVueFlow, VueFlow } from '@vue-flow/core';
|
|
|
|
import { MarkerType, useVueFlow, VueFlow } from '@vue-flow/core';
|
|
|
|
import tool, { options } from '@/views/boardGenerate/tool.js';
|
|
|
|
import tool, { options } from '@/views/boardGenerate/tool.js';
|
|
|
|
import { v4 as uuidv4 } from 'uuid';
|
|
|
|
import { v4 as uuidv4 } from 'uuid';
|
|
|
|
@ -1614,6 +1658,8 @@ import InputNode from '@/views/boardGenerate/nodes/form/inputNode.vue';
|
|
|
|
import ButtonNode from '@/views/boardGenerate/nodes/form/buttonNode.vue';
|
|
|
|
import ButtonNode from '@/views/boardGenerate/nodes/form/buttonNode.vue';
|
|
|
|
import SelectNode from '@/views/boardGenerate/nodes/form/selectNode.vue';
|
|
|
|
import SelectNode from '@/views/boardGenerate/nodes/form/selectNode.vue';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import MenuNode from './nodes/advancedComponents/menuNode.vue'
|
|
|
|
|
|
|
|
|
|
|
|
import TimeNode from '@/views/boardGenerate/nodes/form/timeNode.vue';
|
|
|
|
import TimeNode from '@/views/boardGenerate/nodes/form/timeNode.vue';
|
|
|
|
import TableNode from '@/views/boardGenerate/nodes/form/tableNode.vue';
|
|
|
|
import TableNode from '@/views/boardGenerate/nodes/form/tableNode.vue';
|
|
|
|
import MultiBarsNode from '@/views/boardGenerate/nodes/board/multiBarsNode.vue';
|
|
|
|
import MultiBarsNode from '@/views/boardGenerate/nodes/board/multiBarsNode.vue';
|
|
|
|
@ -1632,6 +1678,7 @@ const uploadFileUrl = ref(baseUrl + '/resource/oss/upload'); // 上传文件服
|
|
|
|
const headers = ref(globalHeaders());
|
|
|
|
const headers = ref(globalHeaders());
|
|
|
|
const { onDragStart, onDrop, onDragOver } = tool();
|
|
|
|
const { onDragStart, onDrop, onDragOver } = tool();
|
|
|
|
const router = useRouter();
|
|
|
|
const router = useRouter();
|
|
|
|
|
|
|
|
const key = ref(0);
|
|
|
|
|
|
|
|
|
|
|
|
const isSnapToGrid = ref(false);
|
|
|
|
const isSnapToGrid = ref(false);
|
|
|
|
const toggleSnapToGrid = (e) => {
|
|
|
|
const toggleSnapToGrid = (e) => {
|
|
|
|
@ -1736,7 +1783,7 @@ onMounted(async () => {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
data: {}
|
|
|
|
data: {}
|
|
|
|
}];
|
|
|
|
}];
|
|
|
|
edges.value = data.designPageEdgesList.map(e => {
|
|
|
|
edges.value = data.designPageEdgesList?.map(e => {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
id: e.pageEdgesId,
|
|
|
|
id: e.pageEdgesId,
|
|
|
|
source: e.sourceNodeId,
|
|
|
|
source: e.sourceNodeId,
|
|
|
|
@ -1813,12 +1860,14 @@ const logEvent = async (eventname, event) => {
|
|
|
|
nodeAttrForm.value = event.node.data.options;
|
|
|
|
nodeAttrForm.value = event.node.data.options;
|
|
|
|
nodeDataForm.value = event.node;
|
|
|
|
nodeDataForm.value = event.node;
|
|
|
|
customDataForm.value = event.node.data.customData;
|
|
|
|
customDataForm.value = event.node.data.customData;
|
|
|
|
|
|
|
|
key.value += 1;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 'nodeDrag':
|
|
|
|
case 'nodeDrag':
|
|
|
|
if (event.nodes.length === 1) {
|
|
|
|
if (event.nodes.length === 1) {
|
|
|
|
nodeAttrForm.value = event.node.data.options;
|
|
|
|
nodeAttrForm.value = event.node.data.options;
|
|
|
|
nodeDataForm.value = event.node;
|
|
|
|
nodeDataForm.value = event.node;
|
|
|
|
customDataForm.value = event.node.data.customData;
|
|
|
|
customDataForm.value = event.node.data.customData;
|
|
|
|
|
|
|
|
key.value += 1;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
nodeAttrForm.value = {};
|
|
|
|
nodeAttrForm.value = {};
|
|
|
|
nodeDataForm.value = {};
|
|
|
|
nodeDataForm.value = {};
|
|
|
|
@ -2040,6 +2089,7 @@ const pitchOnNode = (e) => {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
nodeAttrForm.value = e.data.options;
|
|
|
|
nodeAttrForm.value = e.data.options;
|
|
|
|
|
|
|
|
key.value += 1;
|
|
|
|
nodeDataForm.value = e;
|
|
|
|
nodeDataForm.value = e;
|
|
|
|
customDataForm.value = e.data.customData;
|
|
|
|
customDataForm.value = e.data.customData;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|