|
@@ -55,6 +55,8 @@ import {
|
|
|
computed,
|
|
|
nextTick,
|
|
|
getCurrentInstance,
|
|
|
+ onDeactivated,
|
|
|
+ onActivated
|
|
|
} from 'vue'
|
|
|
import byForm from '@/components/byForm/index'
|
|
|
import { Graph, Shape } from '@antv/x6'
|
|
@@ -134,7 +136,6 @@ const formConfig = computed(() => {
|
|
|
required: true,
|
|
|
itemWidth: 30,
|
|
|
fn: (e) => {
|
|
|
- console.log(e)
|
|
|
gethandleObjectList(e)
|
|
|
},
|
|
|
//1用户 2部门负责人 3部门总监 4岗位 5角色
|
|
@@ -243,7 +244,6 @@ const submitForm = () => {
|
|
|
byform.value.handleSubmit((valid) => {
|
|
|
|
|
|
flowDefinitionNodeObj.value[formData.data.id] = formData.data
|
|
|
- console.log(flowDefinitionNodeObj.value)
|
|
|
dialogVisible.value = false
|
|
|
formData.data.cell.setData({
|
|
|
title: formData.data.nodeName,
|
|
@@ -269,12 +269,10 @@ const submitAll = () => {
|
|
|
}
|
|
|
submitFormData.titleTemplate = proxy.title
|
|
|
const nodeList = graph.toJSON().cells
|
|
|
- console.log(nodeList)
|
|
|
+ submitFormData.nodeObject = JSON.stringify(nodeList)
|
|
|
const isStart = false
|
|
|
for (let i = 0; i < nodeList.length; i++) {
|
|
|
const element = nodeList[i]
|
|
|
- console.log(element)
|
|
|
- console.log(flowDefinitionNodeObj)
|
|
|
//是办理节点
|
|
|
if (element.shape != "start-btn" && element.shape != 'edge' && element.shape != 'end-btn' ) {
|
|
|
|
|
@@ -322,7 +320,6 @@ const submitAll = () => {
|
|
|
}
|
|
|
}
|
|
|
addVersion()
|
|
|
- console.log(flowDefinitionNodeObj.value)
|
|
|
}
|
|
|
|
|
|
//选取一个随机不重复的正整数id
|
|
@@ -339,7 +336,6 @@ const addVersion = () => {
|
|
|
const idObg = {}
|
|
|
for (let i = 0; i < submitFormData.flowDefinitionNodeList.length; i++) {
|
|
|
const element = submitFormData.flowDefinitionNodeList[i]
|
|
|
- console.log(element)
|
|
|
if (element.parentId == null && element.nodeName == '结束') {
|
|
|
ElMessage({
|
|
|
message: '有结束节点未连线,请配置',
|
|
@@ -370,15 +366,12 @@ const addVersion = () => {
|
|
|
element.nodeButtonSet = element.nodeButtonSet.join(',')
|
|
|
}
|
|
|
}
|
|
|
- console.log(submitFormData)
|
|
|
|
|
|
proxy.post('/flowDefinition/addVersion', submitFormData).then((res) => {
|
|
|
- console.log(res)
|
|
|
ElMessage({
|
|
|
message: '保存成功',
|
|
|
type: 'success',
|
|
|
})
|
|
|
- console.log(router)
|
|
|
useTagsViewStore().delView(router.currentRoute.value);
|
|
|
history.go(-1)
|
|
|
|
|
@@ -470,7 +463,6 @@ const recursive = (data) => {
|
|
|
}
|
|
|
|
|
|
const pushRoom = (port: any) => {
|
|
|
- console.log(port)
|
|
|
if (port.node.shape == 'end-btn') {
|
|
|
flowDefinitionNodeObj.value[port.node.id] = {
|
|
|
nodeName: '结束',
|
|
@@ -633,7 +625,6 @@ const antvInit = () => {
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning",
|
|
|
}).then(() => {
|
|
|
- console.log(cell)
|
|
|
graph.removeNode(cell.id)
|
|
|
// delete flowDefinitionNodeObj.value[id]
|
|
|
});
|
|
@@ -837,20 +828,26 @@ const antvInit = () => {
|
|
|
|
|
|
}
|
|
|
const getFlowInfo = (()=>{
|
|
|
- proxy.post('/flowDefinition/getDetails', {id:submitFormData.flowInfoId}).then((res) => {
|
|
|
- console.log(res)
|
|
|
+ proxy.post('/flowDefinition/getDetails', {id:submitFormData.id}).then((res) => {
|
|
|
|
|
|
})
|
|
|
})
|
|
|
const router = useRouter()
|
|
|
+onActivated(() => {
|
|
|
+})
|
|
|
+onDeactivated(() => {
|
|
|
|
|
|
+ //清空minimap子元素
|
|
|
+ window.document.getElementById('minimap').innerHTML = ''
|
|
|
+})
|
|
|
onMounted(() => {
|
|
|
antvInit()
|
|
|
//获取url router参数
|
|
|
- submitFormData.flowInfoId = router.currentRoute.value.query.id
|
|
|
+ submitFormData.flowInfoId = router.currentRoute.value.query.flowInfoId
|
|
|
+ submitFormData.id = router.currentRoute.value.query.id
|
|
|
submitFormData.tenantId = router.currentRoute.value.query.tenantId
|
|
|
if(submitFormData.flowInfoId) {
|
|
|
- //getFlowInfo()
|
|
|
+ getFlowInfo()
|
|
|
}
|
|
|
})
|
|
|
</script>
|