修改分析设计图片
@ -35,7 +35,8 @@
|
|||||||
"vue": "^3.2.40",
|
"vue": "^3.2.40",
|
||||||
"vue-i18n": "^9.1.9",
|
"vue-i18n": "^9.1.9",
|
||||||
"vue-router": "^4.1.6",
|
"vue-router": "^4.1.6",
|
||||||
"vuedraggable": "^2.24.3"
|
"vuedraggable": "^2.24.3",
|
||||||
|
"xlsx": "^0.18.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@commitlint/cli": "^16.2.3",
|
"@commitlint/cli": "^16.2.3",
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 78 KiB |
BIN
business-css/frontend/src/assets/x6/111.png
Normal file
|
After Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 46 KiB |
BIN
business-css/frontend/src/assets/x6/222.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 68 KiB |
BIN
business-css/frontend/src/assets/x6/333.png
Normal file
|
After Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 63 KiB |
BIN
business-css/frontend/src/assets/x6/444.png
Normal file
|
After Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 21 KiB |
BIN
business-css/frontend/src/assets/x6/555.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 2.4 KiB |
BIN
business-css/frontend/src/assets/x6/61.png
Normal file
|
After Width: | Height: | Size: 6.4 KiB |
BIN
business-css/frontend/src/assets/x6/62.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
BIN
business-css/frontend/src/assets/x6/63.png
Normal file
|
After Width: | Height: | Size: 6.4 KiB |
BIN
business-css/frontend/src/assets/x6/64.png
Normal file
|
After Width: | Height: | Size: 7.1 KiB |
BIN
business-css/frontend/src/assets/x6/65.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 48 KiB |
BIN
business-css/frontend/src/assets/x6/666.png
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 37 KiB |
BIN
business-css/frontend/src/assets/x6/777.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
business-css/frontend/src/assets/x6/96.png
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
business-css/frontend/src/assets/x6/97.png
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
181
business-css/frontend/src/components/antvx6/connectingwire.vue
Normal file
@ -0,0 +1,181 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
export default {
|
||||||
|
name: "连接线",
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { onMounted, ref, nextTick } from "vue";
|
||||||
|
import { ElForm, ElMessage, ElMessageBox, selectEmits } from "element-plus";
|
||||||
|
const emit = defineEmits(['closeConnectingwireModel']);
|
||||||
|
const props = defineProps({
|
||||||
|
connectingwireInfo: {
|
||||||
|
required: false,
|
||||||
|
type: Object,
|
||||||
|
default: {}
|
||||||
|
},
|
||||||
|
})
|
||||||
|
const connectingwireInfo:any = ref(props.connectingwireInfo);
|
||||||
|
const connectingwireList:any = ref([
|
||||||
|
{
|
||||||
|
label: "实线",
|
||||||
|
strokeDasharray: "0",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "短虚线",
|
||||||
|
strokeDasharray: "5 5",
|
||||||
|
},{
|
||||||
|
label: "中等虚线",
|
||||||
|
strokeDasharray: "8 4",
|
||||||
|
},{
|
||||||
|
label: "长虚线",
|
||||||
|
strokeDasharray: "10 5",
|
||||||
|
},{
|
||||||
|
label: "超长虚线",
|
||||||
|
strokeDasharray: "15 5",
|
||||||
|
},{
|
||||||
|
label: "经典点线",
|
||||||
|
strokeDasharray: "2 2",
|
||||||
|
},{
|
||||||
|
label: "稀疏点线",
|
||||||
|
strokeDasharray: "1 5",
|
||||||
|
},{
|
||||||
|
label: "密集点线",
|
||||||
|
strokeDasharray: "1 2",
|
||||||
|
},{
|
||||||
|
label: "标准点划线",
|
||||||
|
strokeDasharray: "10 3 2 3",
|
||||||
|
},{
|
||||||
|
label: "长点划线",
|
||||||
|
strokeDasharray: "15 5 3 5",
|
||||||
|
},{
|
||||||
|
label: "双点划线",
|
||||||
|
strokeDasharray: "10 3 2 3 2 3",
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
label: "间隔长虚线",
|
||||||
|
strokeDasharray: "15 8",
|
||||||
|
},{
|
||||||
|
label: "细密虚线",
|
||||||
|
strokeDasharray: "3 2",
|
||||||
|
},{
|
||||||
|
label: "方块图案",
|
||||||
|
strokeDasharray: "8 4 1 4",
|
||||||
|
},{
|
||||||
|
label: "交替长短线",
|
||||||
|
strokeDasharray: "10 3 5 3",
|
||||||
|
},{
|
||||||
|
label: "渐进虚线",
|
||||||
|
strokeDasharray: "2 2 4 2 6 2",
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
|
function connectingwireClick(row: any) {
|
||||||
|
connectingwireInfo.value.label = row.label
|
||||||
|
connectingwireInfo.value.strokeDasharray = row.strokeDasharray
|
||||||
|
}
|
||||||
|
function handleClose() {
|
||||||
|
emit("closeConnectingwireModel",false);
|
||||||
|
}
|
||||||
|
function confirmClick() {
|
||||||
|
emit("closeConnectingwireModel", connectingwireInfo.value);
|
||||||
|
}
|
||||||
|
const customizeInfo:any = ref({
|
||||||
|
label: "自定义",
|
||||||
|
strokeDasharray: ""
|
||||||
|
})
|
||||||
|
function connectingwireInput(e:any) {
|
||||||
|
connectingwireInfo.value.strokeDasharray = e
|
||||||
|
}
|
||||||
|
onMounted(() => {
|
||||||
|
if(connectingwireInfo.value.label === '自定义'){
|
||||||
|
customizeInfo.value.strokeDasharray = connectingwireInfo.value.strokeDasharray
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="connectingwire-box">
|
||||||
|
<div>箭头</div>
|
||||||
|
<el-radio-group v-model="connectingwireInfo.arrow">
|
||||||
|
<el-radio label="0">无箭头</el-radio>
|
||||||
|
<el-radio label="1">单箭头</el-radio>
|
||||||
|
<el-radio label="2">双箭头</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
<div style="margin-top: 20px;margin-bottom: 10px;">线宽</div>
|
||||||
|
<el-radio-group v-model="connectingwireInfo.strokeWidth">
|
||||||
|
<el-radio :label="1">1px</el-radio>
|
||||||
|
<el-radio :label="2">2px</el-radio>
|
||||||
|
<el-radio :label="3">3px</el-radio>
|
||||||
|
<el-radio :label="4">4px</el-radio>
|
||||||
|
<el-radio :label="5">5px</el-radio>
|
||||||
|
<el-radio :label="6">6px</el-radio>
|
||||||
|
<el-radio :label="7">7px</el-radio>
|
||||||
|
<el-radio :label="8">8px</el-radio>
|
||||||
|
<el-radio :label="9">9px</el-radio>
|
||||||
|
<el-radio :label="10">10px</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
<div style="margin-top: 20px;margin-bottom: 10px;">线形</div>
|
||||||
|
<div class="connectingwire-ul">
|
||||||
|
<div class="connectingwire-li" v-for="item in connectingwireList" :class="{'active': connectingwireInfo.label === item.label}"
|
||||||
|
:key="item.value" @click="connectingwireClick(item)">
|
||||||
|
<div>{{item.label}}</div>
|
||||||
|
</div>
|
||||||
|
<div style="display: flex;align-items: center">
|
||||||
|
<div class="connectingwire-li" :class="{'active': connectingwireInfo.label === '自定义'}" @click="connectingwireClick(customizeInfo)">
|
||||||
|
<div>{{ customizeInfo.label }}</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<el-input v-model="customizeInfo.strokeDasharray" @click.stop="connectingwireClick(customizeInfo)" @input="connectingwireInput" :disabled="connectingwireInfo.label !== '自定义'"
|
||||||
|
placeholder="请输入自定义虚线样式" style="width: 180px;"></el-input>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<span class="dialog-footer"
|
||||||
|
style="display: flex;display: -webkit-flex; justify-content: flex-end;-webkit-justify-content: flex-end;">
|
||||||
|
<el-button @click="handleClose">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="confirmClick">确 定</el-button>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.connectingwire-ul{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
.connectingwire-li{
|
||||||
|
width: 80px;
|
||||||
|
height: 80px;
|
||||||
|
line-height: 80px;
|
||||||
|
text-align: center;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
margin: 5px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.connectingwire-customize{
|
||||||
|
width: 200px;
|
||||||
|
height: 80px;
|
||||||
|
text-align: center;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
margin: 5px;
|
||||||
|
cursor: pointer;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.connectingwire-li:hover ,.connectingwire-customize:hover{
|
||||||
|
border-color: #0398fc;
|
||||||
|
}
|
||||||
|
.connectingwire-li.active,.connectingwire-customize.active{
|
||||||
|
background: #0398fc;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -46,7 +46,7 @@ import EditdeviceModel from './editdevice.vue';
|
|||||||
import MaterialModels from './materialmodel.vue';
|
import MaterialModels from './materialmodel.vue';
|
||||||
import ChangesettingsModels from './changesettings.vue';
|
import ChangesettingsModels from './changesettings.vue';
|
||||||
|
|
||||||
|
import ConnectingwireModel from './connectingwire.vue';
|
||||||
const emit = defineEmits([ 'closeAntvx6']);
|
const emit = defineEmits([ 'closeAntvx6']);
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
projectInfo: {
|
projectInfo: {
|
||||||
@ -203,6 +203,7 @@ onMounted(() => {
|
|||||||
rowHeight: 100,
|
rowHeight: 100,
|
||||||
},
|
},
|
||||||
getDragNode: (sourceNode:any) => {
|
getDragNode: (sourceNode:any) => {
|
||||||
|
console.log('1111')
|
||||||
let node:any = sourceNode
|
let node:any = sourceNode
|
||||||
if (node.data && node.data.lineStyle) {
|
if (node.data && node.data.lineStyle) {
|
||||||
// 应用管线样式到连接线
|
// 应用管线样式到连接线
|
||||||
@ -225,13 +226,13 @@ onMounted(() => {
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
graph.removeNode(node)
|
graph.removeNode(node)
|
||||||
}, 100)
|
}, 100)
|
||||||
return
|
return null
|
||||||
}
|
}
|
||||||
return sourceNode.clone({ deep: true })
|
return sourceNode.clone({ deep: true })
|
||||||
},
|
},
|
||||||
getDropNode: (draggingNode) => {
|
// getDropNode: (draggingNode) => {
|
||||||
return draggingNode.clone({ deep: true })
|
// return draggingNode.clone({ deep: true })
|
||||||
},
|
// },
|
||||||
})
|
})
|
||||||
|
|
||||||
graph.on('node:contextmenu', ({ e, node }) => {
|
graph.on('node:contextmenu', ({ e, node }) => {
|
||||||
@ -454,7 +455,6 @@ onMounted(() => {
|
|||||||
|
|
||||||
// undo redo
|
// undo redo
|
||||||
graph.bindKey(['meta+z', 'ctrl+z'], () => {
|
graph.bindKey(['meta+z', 'ctrl+z'], () => {
|
||||||
debugger
|
|
||||||
if (graph.canUndo()) {
|
if (graph.canUndo()) {
|
||||||
graph.undo()
|
graph.undo()
|
||||||
}
|
}
|
||||||
@ -475,7 +475,6 @@ onMounted(() => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
graph.bindKey('delete', () => {
|
graph.bindKey('delete', () => {
|
||||||
debugger
|
|
||||||
const cells = graph.getSelectedCells()
|
const cells = graph.getSelectedCells()
|
||||||
if (cells.length) {
|
if (cells.length) {
|
||||||
graph.removeCells(cells)
|
graph.removeCells(cells)
|
||||||
@ -985,13 +984,81 @@ function removeClick(){
|
|||||||
}, 500);
|
}, 500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function bigClick(){
|
function bigClick(){ // 放大画布
|
||||||
graph.zoom(0.1)
|
graph.zoom(0.1)
|
||||||
}
|
}
|
||||||
function smallClick(){
|
function smallClick(){ // 缩小画布
|
||||||
graph.zoom(-0.1)
|
graph.zoom(-0.1)
|
||||||
}
|
}
|
||||||
|
function ConnectingwireClick(){ // 打开连接线弹窗
|
||||||
|
isConnectingwire.value = true;
|
||||||
|
}
|
||||||
|
function dialogConnectingwire(){ // 关闭连接线弹窗
|
||||||
|
isConnectingwire.value = false;
|
||||||
|
}
|
||||||
|
const connectingwireInfo:any = ref({
|
||||||
|
label: "实线",
|
||||||
|
strokeDasharray: "0",
|
||||||
|
arrow: "1",
|
||||||
|
strokeWidth: 1,
|
||||||
|
})
|
||||||
|
function closeConnectingwireModel(e:any){ // 关闭连接线弹窗
|
||||||
|
if(e != false){
|
||||||
|
let lineStyle:any = {
|
||||||
|
strokeDasharray: 0,
|
||||||
|
targetMarker: {},
|
||||||
|
sourceMarker: {}
|
||||||
|
}
|
||||||
|
if(e.arrow == 0){
|
||||||
|
lineStyle = {
|
||||||
|
sourceMarker: null,
|
||||||
|
strokeDasharray: e.strokeDasharray,
|
||||||
|
targetMarker: null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(e.arrow == 1){
|
||||||
|
lineStyle = {
|
||||||
|
sourceMarker: null,
|
||||||
|
strokeDasharray:e.strokeDasharray,
|
||||||
|
targetMarker: {
|
||||||
|
height: 8,
|
||||||
|
name: "block",
|
||||||
|
width: 12
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(e.arrow == 2){
|
||||||
|
lineStyle = {
|
||||||
|
sourceMarker: {
|
||||||
|
height: 8,
|
||||||
|
name: "block",
|
||||||
|
width: 12
|
||||||
|
},
|
||||||
|
strokeDasharray:e.strokeDasharray,
|
||||||
|
targetMarker: {
|
||||||
|
height: 8,
|
||||||
|
name: "block",
|
||||||
|
width: 12
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
graph.options.connecting.createEdge = () => {
|
||||||
|
return new Shape.Edge({
|
||||||
|
attrs: {
|
||||||
|
line: {
|
||||||
|
stroke: '#A2B1C3',
|
||||||
|
strokeWidth: e.strokeWidth,
|
||||||
|
strokeDasharray: lineStyle.strokeDasharray,
|
||||||
|
targetMarker: lineStyle.targetMarker,
|
||||||
|
sourceMarker: lineStyle.sourceMarker
|
||||||
|
}
|
||||||
|
},
|
||||||
|
zIndex: 0
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
isConnectingwire.value = false;
|
||||||
|
}
|
||||||
const nodeId = ref("")
|
const nodeId = ref("")
|
||||||
|
|
||||||
|
|
||||||
@ -1082,6 +1149,9 @@ function closeMaterialModel(e:any){ // 关闭物料信息弹窗
|
|||||||
isMaterialModel.value = false;
|
isMaterialModel.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const isConnectingwire = ref(false) // 是否连接线
|
||||||
|
// const connectingwireData:any = ref([]) // 是否连接线数据
|
||||||
|
|
||||||
const isChangesettings = ref(false)
|
const isChangesettings = ref(false)
|
||||||
const changesettingsData:any = ref([]) // 是否变动设置
|
const changesettingsData:any = ref([]) // 是否变动设置
|
||||||
function dialogChangesettings(){ // 关闭变动设置弹窗
|
function dialogChangesettings(){ // 关闭变动设置弹窗
|
||||||
@ -1178,7 +1248,6 @@ const styleInfo:any = ref({
|
|||||||
|
|
||||||
function inputChange (e:any){
|
function inputChange (e:any){
|
||||||
let node:any = graph.getCellById(nodeId.value)
|
let node:any = graph.getCellById(nodeId.value)
|
||||||
debugger
|
|
||||||
node.attr('label/text', e)
|
node.attr('label/text', e)
|
||||||
}
|
}
|
||||||
function lineChange(e:any){
|
function lineChange(e:any){
|
||||||
@ -1354,6 +1423,13 @@ function saveDesign() { // 保存设计
|
|||||||
<img v-else src="@/assets/x6/hide.png">
|
<img v-else src="@/assets/x6/hide.png">
|
||||||
<div class="operation-icon-text">显示</div>
|
<div class="operation-icon-text">显示</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="operation-icon-box" @click="ConnectingwireClick">
|
||||||
|
<img v-if="isDisplay" src="@/assets/x6/display.png">
|
||||||
|
<img v-else src="@/assets/x6/hide.png">
|
||||||
|
<div class="operation-icon-text">连接线</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="operation-icon-box" @click="saveDesign">
|
<div class="operation-icon-box" @click="saveDesign">
|
||||||
<img src="@/assets/x6/save.png">
|
<img src="@/assets/x6/save.png">
|
||||||
<div class="operation-icon-text">保存</div>
|
<div class="operation-icon-text">保存</div>
|
||||||
@ -1451,6 +1527,18 @@ function saveDesign() { // 保存设计
|
|||||||
:materialInfo="materialInfo" :deviceInfo="deviceInfo" ref="ChangesettingsModel" @closeChangesettingsModel="closeChangesettingsModel"/>
|
:materialInfo="materialInfo" :deviceInfo="deviceInfo" ref="ChangesettingsModel" @closeChangesettingsModel="closeChangesettingsModel"/>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
|
||||||
|
<el-dialog v-model="isConnectingwire" :close-on-click-modal="false" :modal="false" draggable :before-close="dialogConnectingwire" title="连接线" append-to-body width="1014px">
|
||||||
|
<div style="height: calc(100vh - 200px); overflow: auto;">
|
||||||
|
<ConnectingwireModel v-if="isConnectingwire == true" :connectingwireInfo="connectingwireInfo"
|
||||||
|
@closeConnectingwireModel="closeConnectingwireModel"/>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||