Commit f84b3786 by 莫晓莉

执行转换修改成功

parent f78ed2db
...@@ -891,6 +891,7 @@ ...@@ -891,6 +891,7 @@
<!-- 输出弹窗end================== --> <!-- 输出弹窗end================== -->
<trans-graph <trans-graph
ref="transRef"
:transGraphVisible.sync="transGraphVisible" :transGraphVisible.sync="transGraphVisible"
:getXmlVal="getXmlVal" :getXmlVal="getXmlVal"
></trans-graph> ></trans-graph>
...@@ -2068,6 +2069,8 @@ previousField(){ ...@@ -2068,6 +2069,8 @@ previousField(){
// 执行转换 // 执行转换
doTrans() { doTrans() {
this.transGraphVisible = !this.transGraphVisible; this.transGraphVisible = !this.transGraphVisible;
this.$refs.transRef.clickFun(this.graph);
}, },
// //重绘流程图 // //重绘流程图
......
...@@ -48,6 +48,20 @@ ...@@ -48,6 +48,20 @@
</template> </template>
<script> <script>
import mxgraph from "@/utils/mxgraph";
const {
mxGraph,
mxUtils,
mxEvent,
mxKeyHandler,
mxRubberband,
mxConstants,
mxStencilRegistry,
mxStencil,
mxCodec,
mxGraphModel,
mxGeometry,
} = mxgraph
import { import {
doTrans,//获取表输出 doTrans,//获取表输出
doRun,//启动 doRun,//启动
...@@ -56,6 +70,7 @@ export default ({ ...@@ -56,6 +70,7 @@ export default ({
name: "trans-graph", name: "trans-graph",
data(){ data(){
return{ return{
newGraph:{},
finished:false,//只有执行成功才显示日志 finished:false,//只有执行成功才显示日志
executionId:null,//执行转换返回id executionId:null,//执行转换返回id
mylog:'',//日志 mylog:'',//日志
...@@ -152,8 +167,8 @@ export default ({ ...@@ -152,8 +167,8 @@ export default ({
], ],
tableData: [{ tableData: [{
name: '3', name: '',
num: '鞠婧祎', num: '',
r:'', r:'',
x:'', x:'',
i:'', i:'',
...@@ -195,6 +210,10 @@ export default ({ ...@@ -195,6 +210,10 @@ export default ({
}, },
methods:{ methods:{
clickFun(graph){
console.log(graph,1)
this.newGraph = graph
},
handleClose(){ handleClose(){
this.$emit("update:transGraphVisible", false); this.$emit("update:transGraphVisible", false);
}, },
...@@ -249,8 +268,14 @@ export default ({ ...@@ -249,8 +268,14 @@ export default ({
// 启动 // 启动
doRun(){ doRun(){
// 画布xml转码
const codec = new mxCodec();
const encodedModel = codec.encode(this.newGraph.getModel());
console.log(encodedModel,46546465456);
var myXmlVal = mxUtils.getXml(encodedModel);
let pamer = new FormData(); // 创建form对象 let pamer = new FormData(); // 创建form对象
pamer.append("graphXml", this.getXmlVal); pamer.append("graphXml", myXmlVal);
var executParam={ var executParam={
"exec_local":"Y", "exec_local":"Y",
......
...@@ -7,13 +7,14 @@ ...@@ -7,13 +7,14 @@
:before-close="handleClose" :before-close="handleClose"
top="10%" top="10%"
> >
<el-form ref="stepName" :model="stepName" label-width="120px"> <!-- <el-form ref="stepName" :model="stepName" label-width="120px"> -->
<el-form ref="excelForm" :model="excelForm" label-width="200px">
<el-form-item label="步骤名称:"> <el-form-item label="步骤名称:">
<el-input v-model="stepName.name"></el-input> <el-input v-model="excelForm.label"></el-input>
</el-form-item> </el-form-item>
</el-form> <!-- </el-form> -->
<el-form ref="excelForm" :model="excelForm" label-width="200px"> <!-- <el-form ref="excelForm" :model="excelForm" label-width="200px"> -->
<el-tabs v-model="activeName" type="border-card"> <el-tabs v-model="activeName" type="border-card">
<el-tab-pane label="文件" name="content"> <el-tab-pane label="文件" name="content">
<el-form-item label="文件名:"> <el-form-item label="文件名:">
...@@ -602,6 +603,7 @@ export default ({ ...@@ -602,6 +603,7 @@ export default ({
default:false default:false
}, },
saveOutputDialog:Function, saveOutputDialog:Function,
doubleClickCell:Object
}, },
// mounted(){ // mounted(){
...@@ -621,9 +623,6 @@ export default ({ ...@@ -621,9 +623,6 @@ export default ({
clickFun(graph){ clickFun(graph){
console.log(graph,1) console.log(graph,1)
this.newGraph = graph this.newGraph = graph
// setTimeout(() => {
// this.$refs.databaseChoose.clickFun(graph,121331);
// }, 500);
}, },
handleClose(){ handleClose(){
this.$emit("update:excelOutPutVisible", false); this.$emit("update:excelOutPutVisible", false);
...@@ -730,8 +729,8 @@ export default ({ ...@@ -730,8 +729,8 @@ export default ({
confirm(){ confirm(){
console.log('步骤名称==:',this.stepName); // console.log('步骤名称==:',this.stepName);
this.excelForm.label=this.stepName.name; // this.excelForm.label=this.stepName.name;
this.excelForm.fields=JSON.stringify(this.tableData);//更新字段 this.excelForm.fields=JSON.stringify(this.tableData);//更新字段
console.log('弹窗数据:',this.excelForm); console.log('弹窗数据:',this.excelForm);
this.saveOutputDialog(this.excelForm); this.saveOutputDialog(this.excelForm);
...@@ -808,6 +807,7 @@ export default ({ ...@@ -808,6 +807,7 @@ export default ({
inputOutputFields(pamer).then(res=>{ inputOutputFields(pamer).then(res=>{
console.log('字段',res); console.log('字段',res);
// this.fieldsList2=res; // this.fieldsList2=res;
this.tableData=res;
}) })
}, },
......
...@@ -309,19 +309,27 @@ export default ({ ...@@ -309,19 +309,27 @@ export default ({
}, },
watch:{ watch:{
tableOutForm:{ // tableOutForm:{
// deep:true, // // deep:true,
// immediate:true, // // immediate:true,
handler:function(n,o){ // handler:function(n,o){
console.log("回显的表单数据===",n); // console.log("回显的表单数据===",n);
// if(n){
// var ny=JSON.parse(n.fields);
// this.tableData=ny;
// }
// }
// },
tableOutForm(n,o){
console.log("回显的表单数据===",n);
if(n){ if(n){
var ny=JSON.parse(n.fields); var ny=JSON.parse(n.fields);
this.tableData=ny; this.tableData=ny;
} }
},
}
},
graph(n,o){ graph(n,o){
console.log("表输出拿到的画布1111===",n); console.log("表输出拿到的画布1111===",n);
} }
......
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