Commit aa5a59d4 by 莫晓莉

mxl

parents 3315d5dc 85d62a15
......@@ -1083,6 +1083,13 @@ export default {
this.$refs.container.style.background = 'url("./mxgraph/images/grid.gif")';
},
filters: {
interceptionDate: function (value) {
if (!value) return;
return value.split("imgage=");
},
},
methods: {
setXml() {
this.graph.getModel().beginUpdate();
......@@ -1098,6 +1105,11 @@ export default {
excelLnputDetermine() {
this.excelLnput = !this.excelLnput;
for (let name in this.form) {
var edit = new mxCellAttributeChange(this.nodeData,name,this.form[name]);
this.graph.getModel().execute(edit);
}
console.log(edit, 4564564564654);
},
// 子组件发射回来的弹窗变量变为true
fathertrans(res) {
......@@ -1236,6 +1248,7 @@ export default {
}
this.graph.setConnectable(true); // 允许连线
this.graph.setCellsEditable(false); // 不可修改
this.graph.setTooltips(true);
this.graph.setPanning(true);
......@@ -1243,21 +1256,38 @@ export default {
this.graph.setAllowDanglingEdges(false);
this.graph.setDisconnectOnMove(false);
this.graph.setMultigraph(false);
this.graph.convertValueToString = (cell) => {
var label = cell.getAttribute('label');
var icon = cell.getAttribute(cell.style.split("image="))
return label,icon;
// console.log(cell.value.attributes,99999999999999);
// if (cell.title) {
// cell.title = cell.value.attributes.label.value;
// }else{
// if (!cell.title && cell.value) {
// console.log("======11=",cell.value);
// console.log("======22=",cell);
// if(cell.value.attributes["ctype"]){
// cell.title = cell.value.attributes["ctype"]["value"];
// }
// // cell.title = cell.value.attribllutes.label.value;
// }
// cell.ctype = cell.value.attributes.ctype.value;
// let height = cell.geometry.height;
// let width = cell.geometry.width;
// let x = cell.geometry.x;
// let y = cell.geometry.y;
// let imgs = img.split("=");
// // let d = imgs[1]
// console.log(imgs);
// const styleObj = {
// title: cell.title,
......@@ -1269,26 +1299,20 @@ export default {
// verticalAlign: mxConstants.ALIGN_BOTTOM,
// imageAlign: mxConstants.ALIGN_CENTER,
// imageVerticalAlign: mxConstants.ALIGN_TOP,
// image: '192.168.0.44:9888/ETLWEB-SERVER/etlweb/ui/images/GEN.svg?scale=32',
// };
// const style = Object.keys(styleObj)
// .map((attr) => `${attr}=${styleObj[attr]}`)
// .join(";");
// var doc = mxUtils.parseXml(this.blankCanvas);
// cell.style = style
// cell = this.graph.insertVertex(
// this.graph.getDefaultParent(),
// null,
// doc.documentElement,
// x,
// y,
// width,
// height,
// style
// );
// console.log(this.R.prop("title", cell),132132);
return this.R.prop("title", cell);
// return this.R.prop("title", cell);
};
this.graph.addListener(mxEvent.DOUBLE_CLICK, (graph, evt) => {
......@@ -1426,7 +1450,7 @@ export default {
//更新
this.updateVisible = !this.updateVisible;
return;
} else if (cell.ids == "step15") {
} else if (cell.ids == "step14") {
//文本文件输出
this.fileVisible = !this.fileVisible;
return;
......@@ -1438,15 +1462,19 @@ export default {
//插入、更新
this.InsertOrUpdateVisible = !this.InsertOrUpdateVisible;
return;
<<<<<<< HEAD
} else if (cell.ids == "step12") {
=======
} else if (cell.ids == "step11") {
>>>>>>> 85d62a150cdd3fb59b3a9d06d747f1bd21d9ab57
//删除
this.deleteVisible = !this.deleteVisible;
return;
} else if (cell.ids == "step11") {
} else if (cell.ids == "step10") {
//SQL文件输出
this.sqlVisible = !this.sqlVisible;
return;
} else if (cell.ids == "step9" || cell.ctype == "TextFileInput") {
} else if (cell.ids == "step9") {
//Excel输出
this.excelOutPutVisible = !this.excelOutPutVisible;
return;
......@@ -1481,6 +1509,7 @@ export default {
.map((attr) => `${attr}=${styleObj[attr]}`)
.join(";");
this.toolItemData = toolItem
try {
let pameStep = new FormData(); // 创建form对象
pameStep.append("graphXml", this.getXmlVal);
......@@ -1501,7 +1530,9 @@ export default {
height,
style
);
console.log(res, 111111111111111111);
console.log(cell,4564564564);
console.log(toolItem, 111111111111111111);
cell.title = toolItem["title"];
cell.ids = toolItem["id"];
// cell.pluginId = toolItem["pluginId"];
......@@ -1772,10 +1803,10 @@ export default {
save(pamers).then((res) => {
console.log(res);
if (res.success) {
this.$message.success("保存流程成功!暂时请查先看控制台。");
// this.createGraph();
that.$message.success("保存流程成功!暂时请查先看控制台。");
this.createGraph();
} else {
this.$message.error(res.errMsg);
that.$message.error(res.errMsg);
}
});
},
......@@ -1870,7 +1901,6 @@ export default {
//输出组件保存************************
saveOutputDialog(params){
// var graph = getActiveGraph().getGraph();
var outPutForm=params;
console.log("子组件传回来的弹窗参数===",outPutForm);
// this.graph.getModel().beginUpdate();
......@@ -1881,6 +1911,7 @@ export default {
var edit = new mxCellAttributeChange(this.doubleClickCell, name, outPutForm[name]);
this.graph.getModel().execute(edit);
}
<<<<<<< HEAD
// } finally
// {
// this.graph.getModel().endUpdate();
......@@ -1893,6 +1924,12 @@ export default {
//         this.graph.getModel().execute(edit);
//       }
//       console.log(edit, 4564564564654);
=======
} finally
{
this.graph.getModel().endUpdate();
}
>>>>>>> 85d62a150cdd3fb59b3a9d06d747f1bd21d9ab57
}
//输出组件保存******************/
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment