|
@@ -7,7 +7,8 @@
|
|
|
<el-button @click="delWholeFlow" style="margin-left: auto;" type="danger" size="mini">删除</el-button>
|
|
<el-button @click="delWholeFlow" style="margin-left: auto;" type="danger" size="mini">删除</el-button>
|
|
|
<!-- <el-button style="margin-left: 1%;" type="info" size="mini" plain @click="toImage">导出为图片</el-button> -->
|
|
<!-- <el-button style="margin-left: 1%;" type="info" size="mini" plain @click="toImage">导出为图片</el-button> -->
|
|
|
<el-button style="margin-left: 1%;" type="primary" size="mini" @click="saveFlow">保存</el-button>
|
|
<el-button style="margin-left: 1%;" type="primary" size="mini" @click="saveFlow">保存</el-button>
|
|
|
- <el-button style="margin-left: 1%;" type="primary" size="mini" @click="startTest">试运行</el-button>
|
|
|
|
|
|
|
+ <!-- <el-button style="margin-left: 1%;" type="primary" size="mini" @click="startTest">试运行</el-button> -->
|
|
|
|
|
+ <el-button style="margin-left: 1%;" type="primary" size="mini" @click="showNodes">试运行</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
<div v-if="nodeDeSer" style="height: 82vh;overflow-y: auto;width: 20vw;position: absolute;float: right;z-index: 1000;right: 1%;top:6%;border: 0.1px solid #dedfe0;border-radius: 6px;background-color: white;">
|
|
<div v-if="nodeDeSer" style="height: 82vh;overflow-y: auto;width: 20vw;position: absolute;float: right;z-index: 1000;right: 1%;top:6%;border: 0.1px solid #dedfe0;border-radius: 6px;background-color: white;">
|
|
|
<div style="display: flex;margin-left: 3%;margin-top: 3%;align-items: center;justify-content: space-between;width: 95%;">
|
|
<div style="display: flex;margin-left: 3%;margin-top: 3%;align-items: center;justify-content: space-between;width: 95%;">
|
|
@@ -1100,6 +1101,9 @@ function closeDe(){
|
|
|
nodeDeSer.value = false
|
|
nodeDeSer.value = false
|
|
|
servieName.value = null
|
|
servieName.value = null
|
|
|
}
|
|
}
|
|
|
|
|
+function showNodes(){
|
|
|
|
|
+ console.log(nodes.value)
|
|
|
|
|
+}
|
|
|
function saveNode(){
|
|
function saveNode(){
|
|
|
console.log(tableDataCan.value)
|
|
console.log(tableDataCan.value)
|
|
|
var par = {
|
|
var par = {
|
|
@@ -1162,6 +1166,7 @@ function saveNode(){
|
|
|
// }
|
|
// }
|
|
|
console.log(nodes.value,parNodeid.value)
|
|
console.log(nodes.value,parNodeid.value)
|
|
|
nodes.value.forEach(item=>{
|
|
nodes.value.forEach(item=>{
|
|
|
|
|
+ console.log(111)
|
|
|
if(item.id===parNodeid.value){
|
|
if(item.id===parNodeid.value){
|
|
|
console.log(item.id)
|
|
console.log(item.id)
|
|
|
item.data.parameters = par.parameters
|
|
item.data.parameters = par.parameters
|
|
@@ -1171,7 +1176,7 @@ function saveNode(){
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
- console.log(toObject())
|
|
|
|
|
|
|
+ console.log(nodes.value)
|
|
|
}
|
|
}
|
|
|
function delWholeFlow(){
|
|
function delWholeFlow(){
|
|
|
proxy.$confirm('是否删除该模型流程?', '提示', {
|
|
proxy.$confirm('是否删除该模型流程?', '提示', {
|
|
@@ -1868,6 +1873,28 @@ onNodeClick(({event, node}) => {
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ if (Array.isArray(tableDataCan.value) && tableDataCan.value.length === 0) {
|
|
|
|
|
+ getSerDe(node.data.id).then(res=>{
|
|
|
|
|
+ parNodeAll.value.push(res.data)
|
|
|
|
|
+ serviceRqtype.value = res.data.ptService.rqtype
|
|
|
|
|
+ servieName.value = res.data.ptService.name
|
|
|
|
|
+ tableDataCan.value = res.data.list
|
|
|
|
|
+ serInfo.value = res.data.ptService
|
|
|
|
|
+ parSerList.value = JSON.parse(JSON.stringify(res.data.list))
|
|
|
|
|
+ var par1 = parseJSONWithComments(res.data.ptService.rpcontent)
|
|
|
|
|
+ var parShu = Object.keys((par1))
|
|
|
|
|
+ console.log(parShu)
|
|
|
|
|
+ parShu.forEach(item1=>{
|
|
|
|
|
+ var par = {
|
|
|
|
|
+ paramCode:item1,
|
|
|
|
|
+ paramValue:''
|
|
|
|
|
+ }
|
|
|
|
|
+ tableDataCanOut.value.push(par)
|
|
|
|
|
+ })
|
|
|
|
|
+ serviceUrl.value = res.data.ptService.url
|
|
|
|
|
+ nodeDeSer.value = true
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
if(node.data.nodeType==='tool'){
|
|
if(node.data.nodeType==='tool'){
|
|
|
console.log(node.data.value)
|
|
console.log(node.data.value)
|
|
|
if(node.data.value==='表输入组件'){
|
|
if(node.data.value==='表输入组件'){
|
|
@@ -1930,13 +1957,16 @@ async function onDrop(event) {
|
|
|
|
|
|
|
|
// 1. 同步创建节点
|
|
// 1. 同步创建节点
|
|
|
const newNode = {
|
|
const newNode = {
|
|
|
- id: nodeId,
|
|
|
|
|
|
|
+ id: nodeId.toString(),
|
|
|
type: 'special',
|
|
type: 'special',
|
|
|
position,
|
|
position,
|
|
|
data: copyObject(draggedData.value) // 先使用本地数据
|
|
data: copyObject(draggedData.value) // 先使用本地数据
|
|
|
};
|
|
};
|
|
|
addNodes(newNode);
|
|
addNodes(newNode);
|
|
|
-
|
|
|
|
|
|
|
+ nodes.value = [...nodes.value, newNode]
|
|
|
|
|
+ await nextTick() // 等待 DOM 更新
|
|
|
|
|
+ updateNodeInternals()
|
|
|
|
|
+ console.log(nodes.value)
|
|
|
// 2. 异步获取数据并更新
|
|
// 2. 异步获取数据并更新
|
|
|
|
|
|
|
|
// const res = await getSerDe(draggedData.value.id);
|
|
// const res = await getSerDe(draggedData.value.id);
|
|
@@ -1947,10 +1977,10 @@ async function onDrop(event) {
|
|
|
// };
|
|
// };
|
|
|
|
|
|
|
|
// 3. 等待节点渲染完成后再修正位置
|
|
// 3. 等待节点渲染完成后再修正位置
|
|
|
- nextTick(() => {
|
|
|
|
|
- updateNode(nodeId, { data: { ...newNode.data, ...fullData } });
|
|
|
|
|
- updateNodeInternals(nodeId); // 强制更新节点布局[1](@ref)
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ // nextTick(() => {
|
|
|
|
|
+ // updateNode(nodeId, { data: { ...newNode.data, ...fullData } });
|
|
|
|
|
+ // updateNodeInternals(nodeId);
|
|
|
|
|
+ // });
|
|
|
// console.log(toObject())
|
|
// console.log(toObject())
|
|
|
}
|
|
}
|
|
|
|
|
|