|
@@ -75,7 +75,7 @@ import endBtn from './endBtn.vue'
|
|
import handleBtn from './handleBtn.vue'
|
|
import handleBtn from './handleBtn.vue'
|
|
import { MiniMap } from "@antv/x6-plugin-minimap";
|
|
import { MiniMap } from "@antv/x6-plugin-minimap";
|
|
import useTagsViewStore from '@/store/modules/tagsView'
|
|
import useTagsViewStore from '@/store/modules/tagsView'
|
|
-import dataJson from './data.js'
|
|
|
|
|
|
+
|
|
defineProps({
|
|
defineProps({
|
|
title: {
|
|
title: {
|
|
type: Object,
|
|
type: Object,
|
|
@@ -620,6 +620,7 @@ const antvInit = (data) => {
|
|
})
|
|
})
|
|
// #endregion
|
|
// #endregion
|
|
graph.on('cell:click', ({ e, x, y, cell, view }) => {
|
|
graph.on('cell:click', ({ e, x, y, cell, view }) => {
|
|
|
|
+ console.log(flowDefinitionNodeObj.value)
|
|
console.log(cell)
|
|
console.log(cell)
|
|
if (cell.shape === 'start-btn') return
|
|
if (cell.shape === 'start-btn') return
|
|
if(cell.shape === 'end-btn' || cell.shape === 'edge') {
|
|
if(cell.shape === 'end-btn' || cell.shape === 'edge') {
|
|
@@ -840,9 +841,15 @@ const antvInit = (data) => {
|
|
}
|
|
}
|
|
const getFlowInfo = (()=>{
|
|
const getFlowInfo = (()=>{
|
|
proxy.post('/flowDefinition/getDetails', {id:submitFormData.id}).then((res) => {
|
|
proxy.post('/flowDefinition/getDetails', {id:submitFormData.id}).then((res) => {
|
|
-
|
|
|
|
if(res.lineObject) {
|
|
if(res.lineObject) {
|
|
flowDefinitionNodeObj.value = JSON.parse(res.lineObject)
|
|
flowDefinitionNodeObj.value = JSON.parse(res.lineObject)
|
|
|
|
+ for (const key in flowDefinitionNodeObj.value) {
|
|
|
|
+ if(flowDefinitionNodeObj.value[key].nodeButtonSet) {
|
|
|
|
+ flowDefinitionNodeObj.value[key].nodeButtonSet = flowDefinitionNodeObj.value[key].nodeButtonSet.map(item=>{
|
|
|
|
+ return item*1
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
if(res.nodeObject) {
|
|
if(res.nodeObject) {
|
|
antvInit(JSON.parse(res.nodeObject))
|
|
antvInit(JSON.parse(res.nodeObject))
|
|
@@ -858,7 +865,7 @@ const getFlowInfo = (()=>{
|
|
//获取htmlNode节点下的title,修改title的内容
|
|
//获取htmlNode节点下的title,修改title的内容
|
|
htmlNode.getElementsByClassName('title')[0].innerHTML = flowDefinitionNodeObj.value[key].nodeName
|
|
htmlNode.getElementsByClassName('title')[0].innerHTML = flowDefinitionNodeObj.value[key].nodeName
|
|
}
|
|
}
|
|
- }, 100);
|
|
|
|
|
|
+ }, 1000);
|
|
}
|
|
}
|
|
dialogVisible.value = false
|
|
dialogVisible.value = false
|
|
})
|
|
})
|
|
@@ -882,7 +889,7 @@ onMounted(() => {
|
|
submitFormData.tenantId = router.currentRoute.value.query.tenantId
|
|
submitFormData.tenantId = router.currentRoute.value.query.tenantId
|
|
if(submitFormData.flowInfoId) {
|
|
if(submitFormData.flowInfoId) {
|
|
getFlowInfo()
|
|
getFlowInfo()
|
|
- //antvInit()
|
|
|
|
|
|
+ // antvInit()
|
|
// setTimeout(() => {
|
|
// setTimeout(() => {
|
|
// for (let i = 0; i < dataJson.flowDefinitionNodeList.length; i++) {
|
|
// for (let i = 0; i < dataJson.flowDefinitionNodeList.length; i++) {
|
|
// const element = dataJson.flowDefinitionNodeList[i];
|
|
// const element = dataJson.flowDefinitionNodeList[i];
|