|
@@ -93,7 +93,7 @@
|
|
>
|
|
>
|
|
</i>
|
|
</i>
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
- <el-tooltip content="<" effect="dark">
|
|
|
|
|
|
+ <el-tooltip content="Undo" effect="dark">
|
|
<i
|
|
<i
|
|
@click="onUndo"
|
|
@click="onUndo"
|
|
style="
|
|
style="
|
|
@@ -106,7 +106,7 @@
|
|
>
|
|
>
|
|
</i>
|
|
</i>
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
- <el-tooltip content=">" effect="dark">
|
|
|
|
|
|
+ <el-tooltip content="Redo" effect="dark">
|
|
<i
|
|
<i
|
|
@click="onRedo"
|
|
@click="onRedo"
|
|
style="
|
|
style="
|
|
@@ -233,6 +233,7 @@
|
|
ref="newConNodeConfig"
|
|
ref="newConNodeConfig"
|
|
@primaryclick="primaryConNodeConfig(arguments)"
|
|
@primaryclick="primaryConNodeConfig(arguments)"
|
|
></ConNodeConfig>
|
|
></ConNodeConfig>
|
|
|
|
+ <CSVSelectNodeConfig v-show="csvselectNodeConVisible" ref="csvselectNodeConfig" @primaryCSVselectNodeclick="primaryCSVselectNodeconfig(arguments)"></CSVSelectNodeConfig>
|
|
<!-- <a-layout-sider
|
|
<!-- <a-layout-sider
|
|
breakpoint="lg"
|
|
breakpoint="lg"
|
|
theme="light"
|
|
theme="light"
|
|
@@ -300,6 +301,7 @@ import NodeParaTemp from "./design-para-temp.vue";
|
|
import InputNodeConfig from "./design-inputnode-config1.vue";
|
|
import InputNodeConfig from "./design-inputnode-config1.vue";
|
|
import OutputNodeConfig from "./design-outputnode-config.vue";
|
|
import OutputNodeConfig from "./design-outputnode-config.vue";
|
|
import Workflowlog from "./design-workflowlog.vue";
|
|
import Workflowlog from "./design-workflowlog.vue";
|
|
|
|
+import CSVSelectNodeConfig from "./design-csvselect-config.vue";
|
|
import "@/ant-design-vue";
|
|
import "@/ant-design-vue";
|
|
import { Message } from "element-ui";
|
|
import { Message } from "element-ui";
|
|
import { MessageBox } from "element-ui";
|
|
import { MessageBox } from "element-ui";
|
|
@@ -315,6 +317,7 @@ export default {
|
|
paraTempVisible: false, //20211111 算法节点输入输出参数代码模板
|
|
paraTempVisible: false, //20211111 算法节点输入输出参数代码模板
|
|
inputNodeConVisible: false, //输入节点配置
|
|
inputNodeConVisible: false, //输入节点配置
|
|
outputNodeConVisible: false, //输出节点配置
|
|
outputNodeConVisible: false, //输出节点配置
|
|
|
|
+ csvselectNodeConVisible: false, //csv文件转换节点配置
|
|
//右侧参数设置组件栏
|
|
//右侧参数设置组件栏
|
|
formLayout: "horizontal",
|
|
formLayout: "horizontal",
|
|
form: this.$form.createForm(this, { name: "coordinated" }),
|
|
form: this.$form.createForm(this, { name: "coordinated" }),
|
|
@@ -377,6 +380,11 @@ export default {
|
|
key: "dataOutputnode",
|
|
key: "dataOutputnode",
|
|
scopedSlots: { icon: "custom" },
|
|
scopedSlots: { icon: "custom" },
|
|
},
|
|
},
|
|
|
|
+ {
|
|
|
|
+ title: "CSV文件转换节点",
|
|
|
|
+ key: "CSVSelectnode",
|
|
|
|
+ scopedSlots: { icon: "custom" },
|
|
|
|
+ },
|
|
],
|
|
],
|
|
},
|
|
},
|
|
{
|
|
{
|
|
@@ -438,6 +446,7 @@ export default {
|
|
InputNodeConfig: InputNodeConfig,
|
|
InputNodeConfig: InputNodeConfig,
|
|
OutputNodeConfig: OutputNodeConfig,
|
|
OutputNodeConfig: OutputNodeConfig,
|
|
Workflowlog: Workflowlog,
|
|
Workflowlog: Workflowlog,
|
|
|
|
+ CSVSelectNodeConfig: CSVSelectNodeConfig,
|
|
// X6Splitbox: X6Splitbox,
|
|
// X6Splitbox: X6Splitbox,
|
|
// SplitBox: splitbox,
|
|
// SplitBox: splitbox,
|
|
},
|
|
},
|
|
@@ -987,6 +996,132 @@ export default {
|
|
sourcealgocell: null,
|
|
sourcealgocell: null,
|
|
},
|
|
},
|
|
});
|
|
});
|
|
|
|
+ //定义输出节点
|
|
|
|
+ Graph.registerNode("template-csvselect", {
|
|
|
|
+ inherit: "rect",
|
|
|
|
+ width: 90,
|
|
|
|
+ height: 80,
|
|
|
|
+ attrs: {
|
|
|
|
+ body: {
|
|
|
|
+ strokeWidth: 1,
|
|
|
|
+ stroke: "#d3e3ee",
|
|
|
|
+ fill: "#e2c3a0",
|
|
|
|
+ rx: 8,
|
|
|
|
+ ry: 8,
|
|
|
|
+ },
|
|
|
|
+ //设置内部添加图片
|
|
|
|
+ image: {
|
|
|
|
+ width: 36,
|
|
|
|
+ height: 36,
|
|
|
|
+ refX: 30,
|
|
|
|
+ refY: 16,
|
|
|
|
+ "xlink:href":
|
|
|
|
+ "https://gw.alipayobjects.com/zos/bmw-prod/c55d7ae1-8d20-4585-bd8f-ca23653a4489.svg",
|
|
|
|
+ },
|
|
|
|
+ label: {
|
|
|
|
+ refX: 0.5,
|
|
|
|
+ refY: 0.85,
|
|
|
|
+ fill: "#333",
|
|
|
|
+ fontSize: 11,
|
|
|
|
+ // fontWeight: "bold",
|
|
|
|
+ fontVariant: "small-caps",
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ ports: {
|
|
|
|
+ groups: {
|
|
|
|
+ // 输入链接桩群组定义
|
|
|
|
+ in: {
|
|
|
|
+ position: "left",
|
|
|
|
+ attrs: {
|
|
|
|
+ circle: {
|
|
|
|
+ r: 2.5,
|
|
|
|
+ magnet: true,
|
|
|
|
+ stroke: "black",
|
|
|
|
+ strokeWidth: 1,
|
|
|
|
+ fill: "#fff",
|
|
|
|
+ style: {
|
|
|
|
+ visibility: true, //默认隐藏,不显示。定位到节点, 才展示
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ // 输出链接桩群组定义
|
|
|
|
+ out: {
|
|
|
|
+ position: "right",
|
|
|
|
+ attrs: {
|
|
|
|
+ circle: {
|
|
|
|
+ r: 2.5,
|
|
|
|
+ magnet: true,
|
|
|
|
+ stroke: "black",
|
|
|
|
+ // stroke: "#fff",
|
|
|
|
+ strokeWidth: 1,
|
|
|
|
+ fill: "#fff",
|
|
|
|
+ // style: {
|
|
|
|
+ // visibility: "hidden", //默认隐藏,不显示。定位到节点, 才展示
|
|
|
|
+ // },
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ items: [
|
|
|
|
+ {
|
|
|
|
+ id: "inport1",
|
|
|
|
+ group: "in",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ id: "inport2",
|
|
|
|
+ group: "in",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ id: "outport1",
|
|
|
|
+ group: "out",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ id: "outport2",
|
|
|
|
+ group: "out",
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ markup: [
|
|
|
|
+ {
|
|
|
|
+ tagName: "rect",
|
|
|
|
+ selector: "body",
|
|
|
|
+ attrs: {
|
|
|
|
+ fill: "#fff",
|
|
|
|
+ stroke: "#000",
|
|
|
|
+ strokeWidth: 2,
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ tagName: "image",
|
|
|
|
+ selector: "image",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ tagName: "text",
|
|
|
|
+ selector: "label",
|
|
|
|
+ attrs: {
|
|
|
|
+ fill: "#333",
|
|
|
|
+ textAnchor: "middle",
|
|
|
|
+ textVerticalAnchor: "middle",
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ data: {
|
|
|
|
+ nodeName: "",
|
|
|
|
+ algonodeId: null,
|
|
|
|
+
|
|
|
|
+ st_dataListvalue: [], //静态数据集选中 文件对应value
|
|
|
|
+ dy_dataListvalue: [], //动态数据集选中 文件对应value
|
|
|
|
+ fileList: [], //外部上传 文件
|
|
|
|
+ inputnodefilemap: [], //引用输入节点的 文件列表,包含文件名和url
|
|
|
|
+ inputnodefilevalue: [], //用户选择的输入节点的文件,存储文件url,后端调用 ---与算法节点的不同,存储文件名,桶名称,url
|
|
|
|
+ allfilemap: [{}], //选中的文件对应的名称及url
|
|
|
|
+ isMakenewfile: false,
|
|
|
|
+ },
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+
|
|
// 初始化画布
|
|
// 初始化画布
|
|
const graph = new Graph({
|
|
const graph = new Graph({
|
|
grid: true,
|
|
grid: true,
|
|
@@ -998,8 +1133,9 @@ export default {
|
|
panning: {
|
|
panning: {
|
|
enabled: true,
|
|
enabled: true,
|
|
},
|
|
},
|
|
|
|
+ //调节节点大小
|
|
resizing: {
|
|
resizing: {
|
|
- enabled: true,
|
|
|
|
|
|
+ enabled: false,
|
|
},
|
|
},
|
|
// model: {},
|
|
// model: {},
|
|
history: true, //uodo和redo
|
|
history: true, //uodo和redo
|
|
@@ -1287,6 +1423,7 @@ export default {
|
|
this.conNodeConfigVisi = true;
|
|
this.conNodeConfigVisi = true;
|
|
this.experimentVisi = false;
|
|
this.experimentVisi = false;
|
|
this.nodeConfigVisi = false;
|
|
this.nodeConfigVisi = false;
|
|
|
|
+ this.csvselectNodeConVisible = false;
|
|
this.$refs.newConNodeConfig.init(
|
|
this.$refs.newConNodeConfig.init(
|
|
cell.getData().sourcedatalist,
|
|
cell.getData().sourcedatalist,
|
|
cell.getData().sourceartilist,
|
|
cell.getData().sourceartilist,
|
|
@@ -1306,6 +1443,7 @@ export default {
|
|
this.nodeConfigVisi = true;
|
|
this.nodeConfigVisi = true;
|
|
this.conNodeConfigVisi = false;
|
|
this.conNodeConfigVisi = false;
|
|
this.experimentVisi = false;
|
|
this.experimentVisi = false;
|
|
|
|
+ this.csvselectNodeConVisible = false;
|
|
this.$refs.newNodeConfig.init1(
|
|
this.$refs.newNodeConfig.init1(
|
|
cell.getData(),
|
|
cell.getData(),
|
|
cell,
|
|
cell,
|
|
@@ -1360,6 +1498,24 @@ export default {
|
|
);
|
|
);
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
+ }else if (cell.shape == "template-csvselect") {
|
|
|
|
+ // console.log(cell.getData());
|
|
|
|
+ // console.log(this.workflowName);
|
|
|
|
+ // console.log(cell.id);
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ this.csvselectNodeConVisible = true;
|
|
|
|
+ this.nodeConfigVisi = false;
|
|
|
|
+ this.conNodeConfigVisi = false;
|
|
|
|
+ this.experimentVisi = false;
|
|
|
|
+ this.$refs.csvselectNodeConfig.init1(
|
|
|
|
+ cell.getData(),cell
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+ // if (this.$refs.newNodeConfig) {
|
|
|
|
+ // // console.log("出现了");
|
|
|
|
+ // this.$refs.newNodeConfig.init1(cell.getData(), cell);
|
|
|
|
+ // }
|
|
|
|
+ });
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
|
|
@@ -1372,7 +1528,7 @@ export default {
|
|
this.conNodeConfigVisi = false;
|
|
this.conNodeConfigVisi = false;
|
|
this.experimentVisi = true;
|
|
this.experimentVisi = true;
|
|
this.nodeConfigVisi = false;
|
|
this.nodeConfigVisi = false;
|
|
-
|
|
|
|
|
|
+ this.csvselectNodeConVisible = false;
|
|
this.$refs.experConfig.init();
|
|
this.$refs.experConfig.init();
|
|
// this.visible = true;
|
|
// this.visible = true;
|
|
// this.$refs.experConfig.init();
|
|
// this.$refs.experConfig.init();
|
|
@@ -1405,10 +1561,10 @@ export default {
|
|
// 对新创建的边进行插入数据库等持久化操作
|
|
// 对新创建的边进行插入数据库等持久化操作
|
|
console.log("新建边:" + edge.id);
|
|
console.log("新建边:" + edge.id);
|
|
const source = edge.getSourceCell();
|
|
const source = edge.getSourceCell();
|
|
- console.log(edge);
|
|
|
|
- console.log(edge.getSourceCell());
|
|
|
|
- console.log(edge.getTargetCell());
|
|
|
|
- console.log(currentCell);
|
|
|
|
|
|
+ // console.log(edge);
|
|
|
|
+ // console.log(edge.getSourceCell());
|
|
|
|
+ // console.log(edge.getTargetCell());
|
|
|
|
+ // console.log(currentCell);
|
|
//添加任意一条边后,都需要获取源节点的输出参数列表,并将其写入到目标节点中
|
|
//添加任意一条边后,都需要获取源节点的输出参数列表,并将其写入到目标节点中
|
|
//源节点为 rect,目标节点为rect
|
|
//源节点为 rect,目标节点为rect
|
|
if (
|
|
if (
|
|
@@ -1623,6 +1779,56 @@ export default {
|
|
);
|
|
);
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ //如果源节点为输入节点,目的节点为CSV转换节点
|
|
|
|
+ if (
|
|
|
|
+ source.shape == "template-input" &&
|
|
|
|
+ currentCell.shape == "template-csvselect"
|
|
|
|
+ ) {
|
|
|
|
+ console.log("源节点为 template-input,目标节点为template-csvselect");
|
|
|
|
+ console.log(edge.shape);
|
|
|
|
+ //仅为传递到 节点参数设置栏便于展示
|
|
|
|
+ //20210819 是否可以根据 nodeConfigVisi 来选择是否刷新
|
|
|
|
+ console.log(source);
|
|
|
|
+ console.log(source.allfilemap);
|
|
|
|
+ // currentCell.setData({inputnodefilemap:source.getData().allfilemap});
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ // this.nodeConfigVisi = true;
|
|
|
|
+ // this.conNodeConfigVisi = false;
|
|
|
|
+ // this.experimentVisi = false;
|
|
|
|
+ this.$refs.csvselectNodeConfig.changeinputnodemap(
|
|
|
|
+ currentCell.getData(),
|
|
|
|
+ currentCell,
|
|
|
|
+ source.getData().allfilemap
|
|
|
|
+
|
|
|
|
+ );
|
|
|
|
+ //待更改0722
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //如果源节点为输入节点,目的节点为 算法节点
|
|
|
|
+ if (
|
|
|
|
+ source.shape == "template-csvselect" &&
|
|
|
|
+ currentCell.shape == "template-node"
|
|
|
|
+ ) {
|
|
|
|
+ console.log("源节点为 template-csvselect,目标节点为template-node");
|
|
|
|
+ console.log(edge.shape);
|
|
|
|
+ //仅为传递到 节点参数设置栏便于展示
|
|
|
|
+ //20210819 是否可以根据 nodeConfigVisi 来选择是否刷新
|
|
|
|
+ console.log(source);
|
|
|
|
+ console.log(source.allfilemap);
|
|
|
|
+ // currentCell.setData({inputnodefilemap:source.getData().allfilemap});
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ // this.nodeConfigVisi = true;
|
|
|
|
+ // this.conNodeConfigVisi = false;
|
|
|
|
+ // this.experimentVisi = false;
|
|
|
|
+ this.$refs.newNodeConfig.changeinputnodemap(
|
|
|
|
+ currentCell.getData(),
|
|
|
|
+ currentCell,
|
|
|
|
+ source.getData().allfilemap
|
|
|
|
+ );
|
|
|
|
+ });
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
);
|
|
);
|
|
@@ -3058,7 +3264,7 @@ export default {
|
|
image: {
|
|
image: {
|
|
"xlink:href":
|
|
"xlink:href":
|
|
"https://gw.alipayobjects.com/zos/bmw-prod/687b6cb9-4b97-42a6-96d0-34b3099133ac.svg",
|
|
"https://gw.alipayobjects.com/zos/bmw-prod/687b6cb9-4b97-42a6-96d0-34b3099133ac.svg",
|
|
- // "xlink:href": "https://gw.alipayobjects.com/os/s/prod/antv/assets/image/logo-with-text-73b8a.svg",
|
|
|
|
|
|
+ // "xlink:href": "https://gw.alipayobjects.com/os/s/prod/antv/assets/image/logogetworkflowlog-with-text-73b8a.svg",
|
|
//可放图标
|
|
//可放图标
|
|
},
|
|
},
|
|
},
|
|
},
|
|
@@ -3225,6 +3431,40 @@ export default {
|
|
sourcealgocell: null, //输出节点的前一个节点的结果
|
|
sourcealgocell: null, //输出节点的前一个节点的结果
|
|
},
|
|
},
|
|
});
|
|
});
|
|
|
|
+ //创建CSV文件转换节点
|
|
|
|
+ const CSVConversionnode = this.graph.createNode({
|
|
|
|
+ // width: 170,
|
|
|
|
+ // height: 30,
|
|
|
|
+ shape: "template-csvselect",
|
|
|
|
+ // label: "consume_artifact",
|
|
|
|
+
|
|
|
|
+ attrs: {
|
|
|
|
+ label: {
|
|
|
|
+ text: "CSVConversionnode",
|
|
|
|
+ },
|
|
|
|
+ body: {
|
|
|
|
+ // stroke: "#2CB9FF",
|
|
|
|
+ // fill: "#2CB9FF",
|
|
|
|
+ fill: "#e2c3a0",
|
|
|
|
+ },
|
|
|
|
+ // body: {
|
|
|
|
+ // stroke: "#DA2625",
|
|
|
|
+ // fill: "#DA2625",
|
|
|
|
+ // },
|
|
|
|
+ image: {
|
|
|
|
+ "xlink:href":
|
|
|
|
+ "https://gw.alipayobjects.com/zos/bmw-prod/687b6cb9-4b97-42a6-96d0-34b3099133ac.svg",
|
|
|
|
+ // "xlink:href": "https://gw.alipayobjects.com/os/s/prod/antv/assets/image/logo-with-text-73b8a.svg",
|
|
|
|
+ //可放图标
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ data: {
|
|
|
|
+ nodeName: "CSVConversionnode",
|
|
|
|
+ templateName: "CSVConversionnode",
|
|
|
|
+ inputnodefilemap: [], //引用输入节点的 文件列表,包含文件名和url
|
|
|
|
+ inputnodefilevalue: [], //用户选择的输入节点的文件,存储文件url,后端调用
|
|
|
|
+ },
|
|
|
|
+ });
|
|
//20211012 zhang
|
|
//20211012 zhang
|
|
console.log("nodedata");
|
|
console.log("nodedata");
|
|
// console.log(this.nodedata)
|
|
// console.log(this.nodedata)
|
|
@@ -3241,6 +3481,7 @@ export default {
|
|
//数据输入 和 结果输出节点
|
|
//数据输入 和 结果输出节点
|
|
this.nodedata.push(dataInputnode);
|
|
this.nodedata.push(dataInputnode);
|
|
this.nodedata.push(dataOutputnode);
|
|
this.nodedata.push(dataOutputnode);
|
|
|
|
+ this.nodedata.push(CSVConversionnode);
|
|
console.log(this.nodedata);
|
|
console.log(this.nodedata);
|
|
|
|
|
|
//设置布局左右可拖动
|
|
//设置布局左右可拖动
|
|
@@ -5723,6 +5964,11 @@ export default {
|
|
key: "dataOutputnode",
|
|
key: "dataOutputnode",
|
|
scopedSlots: { icon: "custom" },
|
|
scopedSlots: { icon: "custom" },
|
|
},
|
|
},
|
|
|
|
+ {
|
|
|
|
+ title: "CSV文件转换节点",
|
|
|
|
+ key: "CSVConversionnode",
|
|
|
|
+ scopedSlots: { icon: "custom" },
|
|
|
|
+ },
|
|
],
|
|
],
|
|
},
|
|
},
|
|
{
|
|
{
|
|
@@ -6169,9 +6415,9 @@ export default {
|
|
primarydata.argumentsartifacts[i].paraname
|
|
primarydata.argumentsartifacts[i].paraname
|
|
)
|
|
)
|
|
) {
|
|
) {
|
|
- console.log(
|
|
|
|
- jsonfileurl[primarydata.argumentsartifacts[i].paraname]
|
|
|
|
- );
|
|
|
|
|
|
+ // console.log(
|
|
|
|
+ // jsonfileurl[primarydata.argumentsartifacts[i].paraname]
|
|
|
|
+ // );
|
|
primarydata.argumentsartifacts[i].fileurls.push(
|
|
primarydata.argumentsartifacts[i].fileurls.push(
|
|
jsonfileurl[primarydata.argumentsartifacts[i].paraname]
|
|
jsonfileurl[primarydata.argumentsartifacts[i].paraname]
|
|
);
|
|
);
|
|
@@ -6209,17 +6455,17 @@ export default {
|
|
.getCellById(args[1].id)
|
|
.getCellById(args[1].id)
|
|
.setData({ argumentsartifacts: primarydata.argumentsartifacts }); //对应input 保存相应输入的值
|
|
.setData({ argumentsartifacts: primarydata.argumentsartifacts }); //对应input 保存相应输入的值
|
|
|
|
|
|
- console.log("当前节点值");
|
|
|
|
- console.log(this.graph.getCellById(args[1].id).getData());
|
|
|
|
- console.log(
|
|
|
|
- this.graph.getCellById(args[1].id).getData().argumentsartifacts
|
|
|
|
- );
|
|
|
|
|
|
+ // console.log("当前节点值");
|
|
|
|
+ // console.log(this.graph.getCellById(args[1].id).getData());
|
|
|
|
+ // console.log(
|
|
|
|
+ // this.graph.getCellById(args[1].id).getData().argumentsartifacts
|
|
|
|
+ // );
|
|
this.graph
|
|
this.graph
|
|
.getCellById(args[1].id)
|
|
.getCellById(args[1].id)
|
|
.setData({ nodeName: primarydata.nodeName }); //对应input 保存相应输入的值
|
|
.setData({ nodeName: primarydata.nodeName }); //对应input 保存相应输入的值
|
|
- console.log("cell:" + args[1].id);
|
|
|
|
- console.log("对应id的node:" + this.graph.getCellById(args[1]).toString());
|
|
|
|
- console.log(this.graph.getCellById(args[1].id));
|
|
|
|
|
|
+ // console.log("cell:" + args[1].id);
|
|
|
|
+ // console.log("对应id的node:" + this.graph.getCellById(args[1]).toString());
|
|
|
|
+ // console.log(this.graph.getCellById(args[1].id));
|
|
|
|
|
|
//20211119
|
|
//20211119
|
|
this.graph
|
|
this.graph
|
|
@@ -6285,7 +6531,15 @@ export default {
|
|
// }
|
|
// }
|
|
// });
|
|
// });
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+ primaryCSVselectNodeconfig(args){
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ var primarydata = args[1].getData();
|
|
|
|
+ this.graph.getCellById(args[1].id).setData(primarydata);
|
|
|
|
+ // console.log("转换节点新数据")
|
|
|
|
+ // console.log(args[1].getData())
|
|
|
|
+ // console.log(this.graph.getCellById(args[1].id).getData())
|
|
|
|
+ },
|
|
//20210812 左侧树形组件
|
|
//20210812 左侧树形组件
|
|
handleDragStart(node, ev) {
|
|
handleDragStart(node, ev) {
|
|
console.log("drag start", node);
|
|
console.log("drag start", node);
|
|
@@ -6321,7 +6575,7 @@ export default {
|
|
},
|
|
},
|
|
//20210813 dnd
|
|
//20210813 dnd
|
|
startDrag(e) {
|
|
startDrag(e) {
|
|
- console.log("拖拽前");
|
|
|
|
|
|
+ // console.log("拖拽前");
|
|
// const target = this.currentTarget
|
|
// const target = this.currentTarget
|
|
const target = e.currentTarget;
|
|
const target = e.currentTarget;
|
|
const type = target.getAttribute("data-type");
|
|
const type = target.getAttribute("data-type");
|
|
@@ -6339,7 +6593,7 @@ export default {
|
|
},
|
|
},
|
|
},
|
|
},
|
|
});
|
|
});
|
|
- console.log("拖拽");
|
|
|
|
|
|
+ // console.log("拖拽");
|
|
|
|
|
|
this.dnd.start(node, e);
|
|
this.dnd.start(node, e);
|
|
//删除.nativeEvent 前会出错
|
|
//删除.nativeEvent 前会出错
|
|
@@ -6448,7 +6702,7 @@ export default {
|
|
//先将所有的节点创建成功后保存在this.nodedata中,点击对应节点后 匹配正确后将节点加入到画布中
|
|
//先将所有的节点创建成功后保存在this.nodedata中,点击对应节点后 匹配正确后将节点加入到画布中
|
|
// console.log(this.nodedata[0].attrs.label.text)
|
|
// console.log(this.nodedata[0].attrs.label.text)
|
|
// this.graph.addNode(this.nodedata[0])
|
|
// this.graph.addNode(this.nodedata[0])
|
|
- console.log(this.nodedata);
|
|
|
|
|
|
+ // console.log(this.nodedata);
|
|
var nodenamenum = Math.floor(Math.random() * 1000); //1000以内随机整数
|
|
var nodenamenum = Math.floor(Math.random() * 1000); //1000以内随机整数
|
|
for (var i = 0; i < this.nodedata.length; i++) {
|
|
for (var i = 0; i < this.nodedata.length; i++) {
|
|
//遍历数组
|
|
//遍历数组
|
|
@@ -6567,16 +6821,18 @@ export default {
|
|
|
|
|
|
//保存输入节点内容
|
|
//保存输入节点内容
|
|
primaryInputnodeConfig(args) {
|
|
primaryInputnodeConfig(args) {
|
|
- console.log("保存输入节点");
|
|
|
|
- console.log(args[0].id);
|
|
|
|
|
|
+ // console.log("保存输入节点");
|
|
|
|
+ // console.log(args[0].id);
|
|
|
|
+
|
|
// // this.$emit("refreshDataList",this.cell,this.st_dataListvalue,this.dy_dataListvalue,this.fileList,this.allfilemap);//各个参数
|
|
// // this.$emit("refreshDataList",this.cell,this.st_dataListvalue,this.dy_dataListvalue,this.fileList,this.allfilemap);//各个参数
|
|
// this.graph.getCellById(args[0].id).setData({ st_dataListvalue: args[1] });
|
|
// this.graph.getCellById(args[0].id).setData({ st_dataListvalue: args[1] });
|
|
// this.graph.getCellById(args[0].id).setData({ dy_dataListvalue: args[2] });
|
|
// this.graph.getCellById(args[0].id).setData({ dy_dataListvalue: args[2] });
|
|
// this.graph.getCellById(args[0].id).setData({ fileList: args[3] });
|
|
// this.graph.getCellById(args[0].id).setData({ fileList: args[3] });
|
|
// this.graph.getCellById(args[0].id).setData({ allfilemap: args[4] });
|
|
// this.graph.getCellById(args[0].id).setData({ allfilemap: args[4] });
|
|
-
|
|
|
|
// this.$emit("refreshinputnode",this.cell,celldata);
|
|
// this.$emit("refreshinputnode",this.cell,celldata);
|
|
- console.log(args[1].allfilemap);
|
|
|
|
|
|
+
|
|
|
|
+ // console.log(args[1].allfilemap);
|
|
|
|
+
|
|
// this.graph.getCellById(args[0].id).setData(args[1]);
|
|
// this.graph.getCellById(args[0].id).setData(args[1]);
|
|
//以该方式 福赋值字符串型可以,数组类型不可以
|
|
//以该方式 福赋值字符串型可以,数组类型不可以
|
|
// this.graph.getCellById(args[0].id).setData({allfilemap: this.graph.getCellById(args[0].id).getData().allfilemap.concat(args[1].allfilemap)})
|
|
// this.graph.getCellById(args[0].id).setData({allfilemap: this.graph.getCellById(args[0].id).getData().allfilemap.concat(args[1].allfilemap)})
|