Commit f84b3786 by 莫晓莉

执行转换修改成功

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