Commit f8490a41 by 莫晓莉

解决冲突

parents f54fd41c c4277ba7
...@@ -49,10 +49,10 @@ ...@@ -49,10 +49,10 @@
type="text" type="text"
icon="el-icon-refresh" icon="el-icon-refresh"
size="large" size="large"
@click="doTrans"></el-button> @click="doTrans"
></el-button>
</el-tooltip> </el-tooltip>
<el-divider direction="vertical"></el-divider> <el-divider direction="vertical"></el-divider>
<el-tooltip <el-tooltip
class="item" class="item"
...@@ -812,7 +812,11 @@ ...@@ -812,7 +812,11 @@
<outDialog <outDialog
ref="tableOutPut" ref="tableOutPut"
:tableOutPutVisible.sync="tableOutPutVisible" :tableOutPutVisible.sync="tableOutPutVisible"
:saveOutputDialog="saveOutputDialog" :graph.sync="graph" :doubleClickCell="doubleClickCell"  :getXmlVal="getXmlVal" @fathertrans="fathertrans" ></outDialog> :graph.sync="graph"
:doubleClickCell="doubleClickCell"
:getXmlVal="getXmlVal"
@fathertrans="fathertrans"
></outDialog>
<insertOrUpdate <insertOrUpdate
ref="insertOrdate" ref="insertOrdate"
:InsertOrUpdateVisible.sync="InsertOrUpdateVisible" :InsertOrUpdateVisible.sync="InsertOrUpdateVisible"
...@@ -835,12 +839,7 @@ ...@@ -835,12 +839,7 @@
<microDialog ref="mic" :microVisible.sync="microVisible" :saveOutputDialog="saveOutputDialog"></microDialog> <microDialog ref="mic" :microVisible.sync="microVisible" :saveOutputDialog="saveOutputDialog"></microDialog>
<!-- 输出弹窗end================== --> <!-- 输出弹窗end================== -->
<!-- 转换弹窗开始 -->
<trans-graph
ref="transGraph"
:transGraphVisible.sync="transGraphVisible" :transGraphVisible.sync="transGraphVisible"
:getXmlVal.sync="getXmlVal"></trans-graph>
<!-- 转换弹窗结束 -->
</div> </div>
</template> </template>
...@@ -881,9 +880,6 @@ import microDialog from "../../../output-dialog/micro-excel"; ...@@ -881,9 +880,6 @@ import microDialog from "../../../output-dialog/micro-excel";
// 输出弹窗end******************************************** // 输出弹窗end********************************************
import mxgraph from "@/utils/mxgraph"; import mxgraph from "@/utils/mxgraph";
const { const {
mxGraph, mxGraph,
...@@ -897,7 +893,6 @@ const { ...@@ -897,7 +893,6 @@ const {
mxCodec, mxCodec,
mxGraphModel, mxGraphModel,
mxGeometry, mxGeometry,
mxCell
} = mxgraph; } = mxgraph;
...@@ -914,8 +909,6 @@ export default { ...@@ -914,8 +909,6 @@ export default {
data() { data() {
return { return {
transGraphVisible:false,//转换弹窗
doubleClickCell:{},//双击的cell
monitorCanvas: "", //监听画布 monitorCanvas: "", //监听画布
getXmlVal: "", //获取上一个xml getXmlVal: "", //获取上一个xml
keyHandler: null, keyHandler: null,
...@@ -923,7 +916,7 @@ export default { ...@@ -923,7 +916,7 @@ export default {
graphXml: "", graphXml: "",
xmlDocuments: "", //获取解码的xml xmlDocuments: "", //获取解码的xml
boxInformation: "", //弹框信息 boxInformation: "", //弹框信息
nodeData:{},//节点数据 toolItemData:{},//新增节点时的值
// mxl================================= // mxl=================================
InsertOrUpdateVisible: false, InsertOrUpdateVisible: false,
...@@ -1079,27 +1072,16 @@ export default { ...@@ -1079,27 +1072,16 @@ export default {
this.graph.getModel().beginUpdate(); this.graph.getModel().beginUpdate();
try { try {
var doc = mxUtils.parseXml(decodeURIComponent(this.blankCanvas)); var doc = mxUtils.parseXml(decodeURIComponent(this.blankCanvas));
console.log(doc,77777777777777);
var codec = new mxCodec(doc); var codec = new mxCodec(doc);
codec.decode(doc.documentElement, this.graph.getModel()); codec.decode(doc.documentElement, this.graph.getModel());
console.log(codec.decode(doc.documentElement),222222222222222222);
} finally { } finally {
this.graph.getModel().endUpdate(); this.graph.getModel().endUpdate();
} }
}, },
excelLnputDetermine() { excelLnputDetermine() {
this.excelLnput = !this.excelLnput; 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 // 子组件发射回来的弹窗变量变为true
fathertrans(res) { fathertrans(res) {
...@@ -1246,55 +1228,48 @@ export default { ...@@ -1246,55 +1228,48 @@ export default {
this.graph.setDisconnectOnMove(false); this.graph.setDisconnectOnMove(false);
this.graph.convertValueToString = (cell) => { this.graph.convertValueToString = (cell) => {
// console.log(cell.value.attributes,99999999999999);
// if (cell.title) {
// cell.title = cell.value.attributes.label.value;
// }else{
// console.log(cell.value.attributes,99999999999999); // }
console.log('获取cell--',cell);
// cell.title = cell.value.attributes.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;
// const styleObj = {
// title: cell.title,
// fillColor: "transparent",
// strokeColor: "#000000",
// strokeWidth: "1",
// shape: mxConstants.SHAPE_LABEL,
// align: mxConstants.ALIGN_CENTER,
// verticalAlign: mxConstants.ALIGN_BOTTOM,
// imageAlign: mxConstants.ALIGN_CENTER,
// imageVerticalAlign: mxConstants.ALIGN_TOP,
// };
// const style = Object.keys(styleObj)
// .map((attr) => `${attr}=${styleObj[attr]}`)
// .join(";");
// var doc = mxUtils.parseXml(this.blankCanvas); // cell.ctype = cell.value.attributes.ctype.value;
// cell = this.graph.insertVertex(
// this.graph.getDefaultParent(),
// null,
// doc.documentElement,
// x,
// y,
// width,
// height,
// style
// );
cell.title = cell.value.attributes.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;
// const styleObj = {
// title: cell.title,
// fillColor: "transparent",
// strokeColor: "#000000",
// strokeWidth: "1",
// shape: mxConstants.SHAPE_LABEL,
// align: mxConstants.ALIGN_CENTER,
// verticalAlign: mxConstants.ALIGN_BOTTOM,
// imageAlign: mxConstants.ALIGN_CENTER,
// imageVerticalAlign: mxConstants.ALIGN_TOP,
// };
// const style = Object.keys(styleObj)
// .map((attr) => `${attr}=${styleObj[attr]}`)
// .join(";");
// var doc = mxUtils.parseXml(this.blankCanvas);
// cell = this.graph.insertVertex(
// this.graph.getDefaultParent(),
// null,
// doc.documentElement,
// x,
// y,
// width,
// height,
// style
// );
// console.log(this.R.prop("title", cell),132132); // console.log(this.R.prop("title", cell),132132);
return this.R.prop("title", cell); return this.R.prop("title", cell);
...@@ -1310,10 +1285,9 @@ console.log('获取cell--',cell); ...@@ -1310,10 +1285,9 @@ console.log('获取cell--',cell);
const cell = this.R.pathOr([], ["properties", "cell"], evt); const cell = this.R.pathOr([], ["properties", "cell"], evt);
console.info(cell); // 在控制台输出双击的cell console.info(cell); // 在控制台输出双击的cell
this.nodeData = cell;
this.nodeData = cell
// this.setXml(); // this.setXml();
this.doubleClickCell=cell; this.doubleClickCell = cell;
// 获取接口数据 // 获取接口数据
...@@ -1349,42 +1323,84 @@ console.log('获取cell--',cell); ...@@ -1349,42 +1323,84 @@ console.log('获取cell--',cell);
pamerFields.append("valueType", "all"); pamerFields.append("valueType", "all");
inputOutputFields().then((res) => {}); inputOutputFields().then((res) => {});
if (cell.ids == "step1" || cell.ctype == "ExcelInput") {
if (cell.ids == "step1" || cell.value.attributes.ctype.value == "ExcelInput") {
this.excelLnput = !this.excelLnput; this.excelLnput = !this.excelLnput;
// console.log(cell.value.attributes,1111111);
// this.form = cell.value.attributes["name"].value
console.log(cell.value.attributes);
console.log(cell.value.attributes.uriNameFieldName.value);
let obj = cell.value.attributes
for(let vel in obj){
let key = obj[vel]
this.form = {
[key.name] : `${key.value}`
}
console.log(this.form,4564676354676);
let q = {};
let obj = cell.value.attributes;
for (let vel in obj) {
let key = obj[vel];
q[key.name] = key.value;
} }
this.form = q
return; return;
} else if (cell.ids == "step7" || cell.ctype == "TableInput") {
} else if (cell.ids == "step7" || cell.value.attributes.ctype.value == "TableInput") {
this.TableInputDialog = !this.TableInputDialog; this.TableInputDialog = !this.TableInputDialog;
let q = {};
let obj = cell.value.attributes;
for (let vel in obj) {
let key = obj[vel];
q[key.name] = key.value;
}
this.form = q
return; return;
} else if (cell.ids == "step6" || cell.ctype == "SystemInfo") {
} else if (cell.ids == "step6" || cell.value.attributes.ctype.value == "SystemInfo") {
this.SystemInfoDialog = !this.SystemInfoDialog; this.SystemInfoDialog = !this.SystemInfoDialog;
let q = {};
let obj = cell.value.attributes;
for (let vel in obj) {
let key = obj[vel];
q[key.name] = key.value;
}
this.form = q
return; return;
} else if (cell.ids == "step5" || cell.ctype == "DataGrid") {
} else if (cell.ids == "step5" || cell.value.attributes.ctype.value == "DataGrid") {
this.ConstantDialog = !this.ConstantDialog; this.ConstantDialog = !this.ConstantDialog;
let q = {};
let obj = cell.value.attributes;
for (let vel in obj) {
let key = obj[vel];
q[key.name] = key.value;
}
this.form = q
return; return;
} else if (cell.ids == "step4" || cell.ctype == "RandomValue") {
} else if (cell.ids == "step4" || cell.value.attributes.ctype.value == "RandomValue") {
this.RandomValueDialog = !this.RandomValueDialog; this.RandomValueDialog = !this.RandomValueDialog;
let q = {};
let obj = cell.value.attributes;
for (let vel in obj) {
let key = obj[vel];
q[key.name] = key.value;
}
this.form = q
return; return;
} else if (cell.ids == "step3" || cell.ctype == "RowGenerator") {
} else if (cell.ids == "step3" || cell.value.attributes.ctype.value == "RowGenerator") {
this.RowGeneratorDialog = !this.RowGeneratorDialog; this.RowGeneratorDialog = !this.RowGeneratorDialog;
let q = {};
let obj = cell.value.attributes;
for (let vel in obj) {
let key = obj[vel];
q[key.name] = key.value;
}
this.form = q
return; return;
} else if (cell.ids == "step2" || cell.ctype == "TextFileInput") {
} else if (cell.ids == "step2" || cell.value.attributes.ctype.value == "TextFileInput") {
this.TextFileInputDialog = !this.TextFileInputDialog; this.TextFileInputDialog = !this.TextFileInputDialog;
let q = {};
let obj = cell.value.attributes;
for (let vel in obj) {
let key = obj[vel];
q[key.name] = key.value;
}
this.form = q
return; return;
} else if (cell.ids == "step17") { } else if (cell.ids == "step17") {
//表输出 //表输出
...@@ -1448,6 +1464,7 @@ console.log('获取cell--',cell); ...@@ -1448,6 +1464,7 @@ console.log('获取cell--',cell);
const style = Object.keys(styleObj) const style = Object.keys(styleObj)
.map((attr) => `${attr}=${styleObj[attr]}`) .map((attr) => `${attr}=${styleObj[attr]}`)
.join(";"); .join(";");
this.toolItemData = toolItem
try { try {
let pameStep = new FormData(); // 创建form对象 let pameStep = new FormData(); // 创建form对象
pameStep.append("graphXml", this.getXmlVal); pameStep.append("graphXml", this.getXmlVal);
...@@ -1752,11 +1769,10 @@ console.log('获取cell--',cell); ...@@ -1752,11 +1769,10 @@ console.log('获取cell--',cell);
}, },
// 执行转换 // 执行转换
doTrans(){ doTrans() {
this.transGraphVisible=!this.transGraphVisible; this.transGraphVisible = !this.transGraphVisible;
}, },
// //重绘流程图 // //重绘流程图
clearFlow() { clearFlow() {
// let that = this; // let that = this;
......
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