Commit f9528926 by 莫晓莉

插入和更新获取字段修改完成

parent 393836df
...@@ -1704,11 +1704,14 @@ previousField(){ ...@@ -1704,11 +1704,14 @@ previousField(){
//mico-Excel输出 //mico-Excel输出
this.microVisible = !this.microVisible; this.microVisible = !this.microVisible;
this.outPutFormData9 = this.showDataFunc(); this.outPutFormData9 = this.showDataFunc();
this.$refs.mic.clickFun(this.graph);//向子组件传递画布
return; return;
} else if (cell.ids == "step9" || cell.value.attributes.ctype.value == "ExcelOutput" ) { } else if (cell.ids == "step9" || cell.value.attributes.ctype.value == "ExcelOutput" ) {
//Excel输出 //Excel输出
this.excelOutPutVisible = !this.excelOutPutVisible; this.excelOutPutVisible = !this.excelOutPutVisible;
this.outPutFormData3 = this.showDataFunc(); this.outPutFormData3 = this.showDataFunc();
this.$refs.excelOut.clickFun(this.graph);//向子组件传递画布
return;
return; return;
} }
......
...@@ -252,7 +252,9 @@ export default ({ ...@@ -252,7 +252,9 @@ export default ({
clickFun(graph){ clickFun(graph){
console.log(graph,'双击获取值') console.log(graph,'双击获取值')
this.newGraph = graph; this.newGraph = graph;
setTimeout(() => {
this.$refs.databaseChoose.clickFun(this.newGraph); this.$refs.databaseChoose.clickFun(this.newGraph);
}, 500);
}, },
handleClose(){ handleClose(){
this.$emit("update:deleteVisible", false); this.$emit("update:deleteVisible", false);
......
...@@ -8,13 +8,14 @@ ...@@ -8,13 +8,14 @@
top="10%" top="10%"
> >
<div id="ExcelInputDialog"></div> <div id="ExcelInputDialog"></div>
<el-form ref="stepName" :model="stepName" label-width="120px"> <!-- <el-form ref="stepName" :model="stepName" label-width="120px"> -->
<el-form :model="insertOrUpdateForm" label-width="200px">
<el-form-item label="步骤名称:"> <el-form-item label="步骤名称:">
<el-input v-model="stepName.name"></el-input> <el-input v-model="insertOrUpdateForm.label"></el-input>
</el-form-item> </el-form-item>
</el-form> <!-- </el-form> -->
<el-form :model="insertOrUpdateForm" label-width="200px"> <!-- <el-form :model="insertOrUpdateForm" 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">
<database-choose ref="databaseChoose" :form.sync="insertOrUpdateForm" :getXmlVal="getXmlVal" :graph="newGraph"></database-choose> <database-choose ref="databaseChoose" :form.sync="insertOrUpdateForm" :getXmlVal="getXmlVal" :graph="newGraph"></database-choose>
...@@ -195,7 +196,7 @@ export default ({ ...@@ -195,7 +196,7 @@ export default ({
fieldUpdate:false,//更新弹窗 fieldUpdate:false,//更新弹窗
editDiaUpdate:false,//更新字段 editDiaUpdate:false,//更新字段
fieldFormUpdate:{},//更新弹窗 fieldFormUpdate:{},//更新弹窗
stepName:{name:'删除'}, stepName:{name:'插入/更新'},
// insertOrUpdateForm:{ // insertOrUpdateForm:{
// commit: "100", // commit: "100",
// connection: "", // connection: "",
...@@ -333,7 +334,10 @@ export default ({ ...@@ -333,7 +334,10 @@ export default ({
clickFun(graph){ clickFun(graph){
console.log(graph,'双击获取值') console.log(graph,'双击获取值')
this.newGraph = graph; this.newGraph = graph;
setTimeout(() => {
this.$refs.databaseChoose.clickFun(this.newGraph); this.$refs.databaseChoose.clickFun(this.newGraph);
}, 500);
}, },
handleClose(){ handleClose(){
this.$emit("update:InsertOrUpdateVisible", false); this.$emit("update:InsertOrUpdateVisible", false);
...@@ -406,7 +410,14 @@ export default ({ ...@@ -406,7 +410,14 @@ export default ({
console.log('获取cell888888===',this.doubleClickCell); console.log('获取cell888888===',this.doubleClickCell);
let pamer = new FormData(); // 创建form对象 let pamer = new FormData(); // 创建form对象
pamer.append("stepName", encodeURIComponent(title)); pamer.append("stepName", encodeURIComponent(title));
pamer.append("graphXml", this.getXmlVal); // pamer.append("graphXml", this.getXmlVal);
// 画布xml转码
const codec = new mxCodec();
const encodedModel = codec.encode(this.newGraph.getModel());//xml对象
console.log("获取字段的画布详情:", encodedModel);
var myXmlVal = mxUtils.getXml(encodedModel);//xml字符串
pamer.append("graphXml", myXmlVal);
// pamer.append("graphXml", this.getXmlVal);
pamer.append("before", true); pamer.append("before", true);
pamer.append("query", ''); pamer.append("query", '');
inputOutputFields(pamer).then(res=>{ inputOutputFields(pamer).then(res=>{
...@@ -443,7 +454,8 @@ export default ({ ...@@ -443,7 +454,8 @@ export default ({
}, },
tableFields(){ tableFields(){
if(this.doubleClickCell){ if(this.doubleClickCell){
var title=this.doubleClickCell.title // var title=this.doubleClickCell.title;
var title=this.doubleClickCell.value.attributes.label.value
} }
console.log('获取cell888888===',this.doubleClickCell); console.log('获取cell888888===',this.doubleClickCell);
let pamer = new FormData(); // 创建form对象 let pamer = new FormData(); // 创建form对象
...@@ -473,7 +485,8 @@ export default ({ ...@@ -473,7 +485,8 @@ export default ({
//获取表输出 //获取表输出
inputOutputFields(){ inputOutputFields(){
if(this.doubleClickCell){ if(this.doubleClickCell){
var title=this.doubleClickCell.title // var title=this.doubleClickCell.title
var title=this.doubleClickCell.value.attributes.label.value
} }
console.log('获取cell888888===',this.doubleClickCell); console.log('获取cell888888===',this.doubleClickCell);
let pamer = new FormData(); // 创建form对象 let pamer = new FormData(); // 创建form对象
......
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