Commit fbaf3e6e by 莫晓莉

组件保存回显

parent 2c0886ca
...@@ -816,27 +816,27 @@ ...@@ -816,27 +816,27 @@
:doubleClickCell="doubleClickCell" :doubleClickCell="doubleClickCell"
:getXmlVal="getXmlVal" :getXmlVal="getXmlVal"
@fathertrans="fathertrans" @fathertrans="fathertrans"
:saveOutputDialog="saveOutputDialog" :tableOutForm="outPutFormData"></outDialog> :saveOutputDialog="saveOutputDialog" :tableOutForm="outPutFormData1"></outDialog>
<insertOrUpdate <insertOrUpdate
ref="insertOrdate" ref="insertOrdate"
:InsertOrUpdateVisible.sync="InsertOrUpdateVisible" :InsertOrUpdateVisible.sync="InsertOrUpdateVisible"
:saveOutputDialog="saveOutputDialog" :doubleClickCell="doubleClickCell" :getXmlVal="getXmlVal" :insertOrUpdateForm="outPutFormData"></insertOrUpdate> :saveOutputDialog="saveOutputDialog" :doubleClickCell="doubleClickCell" :getXmlVal="getXmlVal" :insertOrUpdateForm="outPutFormData2"></insertOrUpdate>
<excelOutPutDialog <excelOutPutDialog
ref="excelOut" ref="excelOut"
:excelOutPutVisible.sync="excelOutPutVisible" :excelOutPutVisible.sync="excelOutPutVisible"
:saveOutputDialog="saveOutputDialog" :doubleClickCell="doubleClickCell" :excelForm="outPutFormData"></excelOutPutDialog> :saveOutputDialog="saveOutputDialog" :doubleClickCell="doubleClickCell" :excelForm="outPutFormData3"></excelOutPutDialog>
<updateDialog <updateDialog
ref="update" ref="update"
:updateVisible.sync="updateVisible" :updateVisible.sync="updateVisible"
:saveOutputDialog="saveOutputDialog" :doubleClickCell="doubleClickCell" :updateForm="outPutFormData"></updateDialog> :saveOutputDialog="saveOutputDialog" :doubleClickCell="doubleClickCell" :updateForm="outPutFormData4"></updateDialog>
<synDialog ref="syn" :synVisible.sync="synVisible" :saveOutputDialog="saveOutputDialog" :doubleClickCell="doubleClickCell" :synForm="outPutFormData"></synDialog> <synDialog ref="syn" :synVisible.sync="synVisible" :saveOutputDialog="saveOutputDialog" :doubleClickCell="doubleClickCell" :synForm="outPutFormData5"></synDialog>
<delDialog ref="del" :deleteVisible.sync="deleteVisible" :saveOutputDialog="saveOutputDialog" :doubleClickCell="doubleClickCell" :deleteForm="outPutFormData"></delDialog> <delDialog ref="del" :deleteVisible.sync="deleteVisible" :saveOutputDialog="saveOutputDialog" :doubleClickCell="doubleClickCell" :deleteForm="outPutFormData6"></delDialog>
<sqlDialog ref="sql" :sqlVisible.sync="sqlVisible" :saveOutputDialog="saveOutputDialog" :doubleClickCell="doubleClickCell" :sqlForm="outPutFormData"></sqlDialog> <sqlDialog ref="sql" :sqlVisible.sync="sqlVisible" :saveOutputDialog="saveOutputDialog" :doubleClickCell="doubleClickCell" :sqlForm="outPutFormData7"></sqlDialog>
<textFileDialog <textFileDialog
ref="textFile" ref="textFile"
:fileVisible.sync="fileVisible" :fileVisible.sync="fileVisible"
:saveOutputDialog="saveOutputDialog" :textFileForm="outPutFormData"></textFileDialog> :saveOutputDialog="saveOutputDialog" :textFileForm="outPutFormData8"></textFileDialog>
<microDialog ref="mic" :microVisible.sync="microVisible" :saveOutputDialog="saveOutputDialog" :tableOutForm="outPutFormData"></microDialog> <microDialog ref="mic" :microVisible.sync="microVisible" :saveOutputDialog="saveOutputDialog" :tableOutForm="outPutFormData9"></microDialog>
<!-- 输出弹窗end================== --> <!-- 输出弹窗end================== -->
<trans-graph :transGraphVisible.sync="transGraphVisible" :getXmlVal="getXmlVal"></trans-graph> <trans-graph :transGraphVisible.sync="transGraphVisible" :getXmlVal="getXmlVal"></trans-graph>
...@@ -909,6 +909,15 @@ export default { ...@@ -909,6 +909,15 @@ export default {
data() { data() {
return { return {
outPutFormData1:{},
outPutFormData2:{},
outPutFormData3:{},
outPutFormData4:{},
outPutFormData5:{},
outPutFormData6:{},
outPutFormData7:{},
outPutFormData8:{},
outPutFormData9:{},
outPutFormData:{},//输出弹窗组件的表单值 outPutFormData:{},//输出弹窗组件的表单值
doubleClickCell:{}, doubleClickCell:{},
transGraphVisible:false,//执行转换弹窗 transGraphVisible:false,//执行转换弹窗
...@@ -1261,9 +1270,9 @@ export default { ...@@ -1261,9 +1270,9 @@ export default {
this.graph.convertValueToString = (cell) => { this.graph.convertValueToString = (cell) => {
var label = cell.getAttribute('label'); var label = cell.getAttribute('label');
var icon = cell.getAttribute(cell.style.split("image=")) // var icon = cell.getAttribute(cell.style.split("image="))
return label,icon; return label;
// console.log(cell.value.attributes,99999999999999); // console.log(cell.value.attributes,99999999999999);
...@@ -1452,48 +1461,48 @@ export default { ...@@ -1452,48 +1461,48 @@ export default {
// let key = obj[vel]; // let key = obj[vel];
// q[key.name] = key.value; // q[key.name] = key.value;
// } // }
this.outPutFormData = this.showDataFunc(); this.outPutFormData1 = this.showDataFunc();
return; return;
} else if (cell.ids == "step16") { } else if (cell.ids == "step16" || cell.value.attributes.ctype.value == "Update" ) {
//更新 //更新
this.updateVisible = !this.updateVisible; this.updateVisible = !this.updateVisible;
this.outPutFormData = this.showDataFunc(); this.outPutFormData2 = this.showDataFunc();
return; return;
} else if (cell.ids == "step15") { } else if (cell.ids == "step15" || cell.value.attributes.ctype.value == "TextFileOutput" ) {
//文本文件输出 //文本文件输出
this.fileVisible = !this.fileVisible; this.fileVisible = !this.fileVisible;
this.outPutFormData = this.showDataFunc(); this.outPutFormData3 = this.showDataFunc();
return; return;
} else if (cell.ids == "step14") { } else if (cell.ids == "step14" || cell.value.attributes.ctype.value == "SynchronizeAfterMerge" ) {
//数据同步 //数据同步
this.synVisible = !this.synVisible; this.synVisible = !this.synVisible;
this.outPutFormData = this.showDataFunc(); this.outPutFormData4 = this.showDataFunc();
return; return;
} else if (cell.ids == "step13") { } else if (cell.ids == "step13" || cell.value.attributes.ctype.value == "InsertUpdate" ) {
//插入、更新 //插入、更新
this.InsertOrUpdateVisible = !this.InsertOrUpdateVisible; this.InsertOrUpdateVisible = !this.InsertOrUpdateVisible;
this.outPutFormData = this.showDataFunc(); this.outPutFormData5 = this.showDataFunc();
return; return;
} else if (cell.ids == "step12") { } else if (cell.ids == "step12" || cell.value.attributes.ctype.value == "Delete" ) {
//删除 //删除
this.deleteVisible = !this.deleteVisible; this.deleteVisible = !this.deleteVisible;
this.outPutFormData = this.showDataFunc(); this.outPutFormData6 = this.showDataFunc();
return; return;
} else if (cell.ids == "step11") { } else if (cell.ids == "step11" || cell.value.attributes.ctype.value == "SQLFileOutput" ) {
//SQL文件输出 //SQL文件输出
this.sqlVisible = !this.sqlVisible; this.sqlVisible = !this.sqlVisible;
this.outPutFormData = this.showDataFunc(); this.outPutFormData7 = this.showDataFunc();
return; return;
}else if (cell.ids == "step10") { }else if (cell.ids == "step10") {
//mico-Excel输出 //mico-Excel输出
this.microVisible = !this.microVisible; this.microVisible = !this.microVisible;
// this.outPutFormData = this.showDataFunc(); this.outPutFormData9 = this.showDataFunc();
return; return;
} else if (cell.ids == "step9") { } else if (cell.ids == "step9" || cell.value.attributes.ctype.value == "ExcelOutput" ) {
//Excel输出 //Excel输出
this.excelOutPutVisible = !this.excelOutPutVisible; this.excelOutPutVisible = !this.excelOutPutVisible;
this.outPutFormData = this.showDataFunc(); this.outPutFormData8 = this.showDataFunc();
return; return;
} }
}); });
...@@ -1510,7 +1519,7 @@ export default { ...@@ -1510,7 +1519,7 @@ export default {
// 回显数据封装的方法 // 回显数据封装的方法
showDataFunc(){ showDataFunc(){
let q = {}; let q = {};
let obj = cell.value.attributes; let obj = this.doubleClickCell.value.attributes;
for (let vel in obj) { for (let vel in obj) {
let key = obj[vel]; let key = obj[vel];
q[key.name] = key.value; q[key.name] = key.value;
...@@ -1832,10 +1841,10 @@ export default { ...@@ -1832,10 +1841,10 @@ export default {
save(pamers).then((res) => { save(pamers).then((res) => {
console.log(res); console.log(res);
if (res.success) { if (res.success) {
that.$message.success("保存流程成功!暂时请查先看控制台。"); this.$message.success("保存流程成功!暂时请查先看控制台。");
this.createGraph(); // this.createGraph();
} else { } else {
that.$message.error(res.errMsg); this.$message.error(res.errMsg);
} }
}); });
}, },
......
...@@ -65,7 +65,7 @@ export default { ...@@ -65,7 +65,7 @@ export default {
curNode:[], curNode:[],
chooseFlag:false,//选择模式 chooseFlag:false,//选择模式
newForm:{}, newForm:{},
chooseType:'模式' chooseType:''
} }
}, },
...@@ -147,13 +147,15 @@ export default { ...@@ -147,13 +147,15 @@ export default {
}, },
//浏览 //浏览
scanTree(type){ scanTree(type){
this.chooseType=type;
if(this.selectName){ if(this.selectName){
this.$refs.establishDia.database(this.selectName); this.$refs.establishDia.database(this.selectName);
console.log('当前选中数据库***************',this.dataBaseName); console.log('当前选中数据库***************',this.dataBaseName);
if(this.dataBaseName){ if(this.dataBaseName){
this.$refs.establishDia.scanDialogOpen(); this.$refs.establishDia.scanDialogOpen();
this.chooseFlag=true; this.chooseFlag=true;
this.chooseType=type; console.log("浏览弹窗传过去的类型=====",type);
// this.chooseType=type;
} }
}else{ }else{
this.$message.error('请选择数据库') this.$message.error('请选择数据库')
......
...@@ -812,8 +812,8 @@ export default { ...@@ -812,8 +812,8 @@ export default {
if (res.length > 0) { if (res.length > 0) {
resolve(res); resolve(res);
} else if (!res.success) { } else if (!res.success) {
// let data = []; let data = [];
let data=null; // let data=null;
resolve(data); resolve(data);
} }
} else { } else {
...@@ -846,7 +846,7 @@ export default { ...@@ -846,7 +846,7 @@ export default {
this.nodeId = ""; this.nodeId = "";
this.text = "root"; this.text = "root";
this.node = "xnode-4528"; this.node = "xnode-4528";
this.$emit("getSonValue", this.curChooseNode); // this.$emit("getSonValue", this.curChooseNode);
this.$emit("update:chooseFlag", false); this.$emit("update:chooseFlag", false);
}, },
......
...@@ -368,11 +368,48 @@ ...@@ -368,11 +368,48 @@
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="字段" name="word "> <el-tab-pane label="字段" name="word ">
<el-table style="width: 100%" border :data="tableData"> <!-- <el-table style="width: 100%" border :data="tableData">
<template v-for="(item,index) in tableHead"> <template v-for="(item,index) in tableHead">
<el-table-column :prop="item.column_name" :label="item.column_comment" :key="index" v-if="item.column_name != 'id'"></el-table-column> <el-table-column :prop="item.column_name" :label="item.column_comment" :key="index" v-if="item.column_name != 'id'"></el-table-column>
</template> </template>
</el-table> </el-table> -->
<el-card class="box-card" style="margin-top:15px;">
<div slot="header" class="clearfix">
<el-button style="padding: 3px 0" type="text" @click="fieldClick(true)">新增字段</el-button>
</div>
<table-list ref="tableDia" :tableHead="tableHead" :tableData="tableData" :field.sync="editDia" :fieldClick="fieldClick"></table-list>
<!-- 编辑弹窗开始=========== -->
<el-dialog
title="编辑"
:visible.sync="field"
width="500px"
:before-close="handleCloseEdit"
append-to-body>
<el-form ref="form1" :model="fieldForm" label-width="80px">
<el-form-item label="名称:">
<el-input v-model="fieldForm.name"></el-input>
</el-form-item>
<el-form-item label="类型:">
<!-- <el-select v-model="fieldForm.condition" style="width: 100%">
<el-option v-for="(item,index) in keyConditionList" :key="index" :label="item.text" :value="item.value"></el-option>
</el-select> -->
<el-input v-model="fieldForm.type"></el-input>
</el-form-item>
<el-form-item label="格式:">
<el-input v-model="fieldForm.format"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="field = false">取 消</el-button>
<el-button type="primary" @click="addField">确 定</el-button>
</span>
</el-dialog>
<!-- 编辑弹窗结束============ -->
</el-card>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</el-form> </el-form>
...@@ -400,6 +437,9 @@ import { ...@@ -400,6 +437,9 @@ import {
export default ({ export default ({
data(){ data(){
return{ return{
field:false,//编辑弹窗
editDia:false,//编辑表字段
fieldForm:{},//编辑弹窗
fileDialogVisible:false,//选择文件夹弹窗 fileDialogVisible:false,//选择文件夹弹窗
formName:'', formName:'',
// excelForm:{ // excelForm:{
...@@ -462,31 +502,33 @@ export default ({ ...@@ -462,31 +502,33 @@ export default ({
// 表头数据 // 表头数据
tableHead:[ tableHead:[
{ {
column_name: "column_name",column_comment:"姓名" column_name: "name",column_comment:"名称"
}, },
{ {
column_name: "column_age",column_comment:"年龄" column_name: "type",column_comment:"类型"
}, },
{ {
column_name: "column_sex",column_comment:"性别" column_name: "format",column_comment:"格式"
} }
], ],
// 表格数据 // 表格数据
tableData: [{ tableData: [
column_age: '3', {
column_name: '鞠婧祎', name: '31',
column_sex: '女' type: '鞠婧祎',
format: '女'
}, },
{ {
column_age: '25', name: '32',
column_name: '魏大勋', type: '鞠婧祎',
column_sex: '男' format: '女'
}, },
{ {
column_age: '18', name: '33',
column_name: '关晓彤', type: '鞠婧祎',
column_sex: '女' format: '女'
}], },
],
formatTimeList:[],//时间日期格式 formatTimeList:[],//时间日期格式
codeList:[],//编码 codeList:[],//编码
headFontList:[],//表头字体 headFontList:[],//表头字体
...@@ -503,16 +545,24 @@ export default ({ ...@@ -503,16 +545,24 @@ export default ({
}, },
watch:{ watch:{
deleteForm:{ // deleteForm:{
deep:true, // deep:true,
handler:function(n,o){ // handler:function(n,o){
// console.log("回显的表单数据===",n);
// var ny=JSON.parse(n.fields);
// this.tableData=ny;
// }
// }
deleteForm(n, o) {
console.log("回显的表单数据===",n); console.log("回显的表单数据===",n);
if(n){
var ny=JSON.parse(n.fields); var ny=JSON.parse(n.fields);
this.tableData=ny; this.tableData=ny;
}
} }
}, },
},
props:{ props:{
excelForm:Object, excelForm:Object,
...@@ -524,6 +574,7 @@ export default ({ ...@@ -524,6 +574,7 @@ export default ({
type: Boolean, type: Boolean,
default:false default:false
}, },
saveOutputDialog:Function,
}, },
// mounted(){ // mounted(){
...@@ -647,7 +698,33 @@ export default ({ ...@@ -647,7 +698,33 @@ 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);//更新字段
console.log('弹窗数据:',this.excelForm); console.log('弹窗数据:',this.excelForm);
this.saveOutputDialog(this.excelForm);
this.handleClose();//关闭弹窗
},
//新增或者编辑弹窗
fieldClick(state, val) {
this.field = !this.field;
this.dataState = state;
if (state) {
this.fieldForm = {};
} else {
this.fieldForm = val;
}
},
//关闭编辑的弹窗
handleCloseEdit(){
this.field = !this.field;
},
// 字段
addField() {
this.field = !this.field;
console.log('添加的字段===',this.fieldForm);
if (this.dataState) {
this.tableData.push(this.fieldForm);
}
}, },
} }
......
...@@ -31,12 +31,57 @@ ...@@ -31,12 +31,57 @@
<el-card class="box-card"> <el-card class="box-card">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span>查询值所需的关键字</span> <span>查询值所需的关键字</span>
<el-button style="padding: 3px 0;margin-left:50px;" type="text" @click="fieldClick(true)">新增字段</el-button>
</div> </div>
<el-table style="width: 100%" border :data="tableData"> <!-- <el-table style="width: 100%" border :data="tableData">
<template v-for="(item,index) in tableHead"> <template v-for="(item,index) in tableHead">
<el-table-column :prop="item.column_name" :label="item.column_comment" :key="index" v-if="item.column_name != 'id'"></el-table-column> <el-table-column :prop="item.column_name" :label="item.column_comment" :key="index" v-if="item.column_name != 'id'"></el-table-column>
</template> </template>
</el-table> </el-table> -->
<table-list ref="tableDia" :tableHead="tableHead" :tableData="tableData" :field.sync="editDia" :fieldClick="fieldClick"></table-list>
<!-- 编辑弹窗开始=========== -->
<el-dialog
title="编辑"
:visible.sync="field"
width="500px"
:before-close="handleCloseEdit"
append-to-body>
<el-form ref="form1" :model="fieldForm" label-width="80px">
<el-form-item label="表字段:">
<!-- <el-select v-model="fieldForm.field" style="width: 100%">
<el-option v-for="(item,index) in fieldsList" :key="index" :label="item.name" :value="item.name"></el-option>
</el-select> -->
<el-input v-model="fieldForm.field"></el-input>
</el-form-item>
<el-form-item label="比较符:">
<el-select v-model="fieldForm.condition" style="width: 100%">
<el-option v-for="(item,index) in keyConditionList" :key="index" :label="item.text" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="流里的字段1:">
<!-- <el-select v-model="fieldForm.name" style="width: 100%">
<el-option v-for="(item,index) in fieldsList" :key="index" :label="item.name" :value="item.name"></el-option>
</el-select> -->
<el-input v-model="fieldForm.name"></el-input>
</el-form-item>
<el-form-item label="流里的字段2:">
<!-- <el-select v-model="fieldForm.name2" style="width: 100%">
<el-option v-for="(item,index) in fieldsList" :key="index" :label="item.name" :value="item.name"></el-option>
</el-select> -->
<el-input v-model="fieldForm.name2"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="field = false">取 消</el-button>
<el-button type="primary" @click="addField">确 定</el-button>
</span>
</el-dialog>
<!-- 编辑弹窗结束============ -->
</el-card> </el-card>
</el-form> </el-form>
...@@ -53,6 +98,9 @@ ...@@ -53,6 +98,9 @@
export default ({ export default ({
data(){ data(){
return{ return{
field:false,//编辑弹窗
editDia:false,//编辑表字段
fieldForm:{},//编辑弹窗
stepName:{name:'删除'}, stepName:{name:'删除'},
activeName:'content', activeName:'content',
// deleteForm:{ // deleteForm:{
...@@ -73,51 +121,73 @@ export default ({ ...@@ -73,51 +121,73 @@ export default ({
// table: "", // table: "",
// }, // },
// 查询字段--start------------
fieldsList:[],//字段获取
keyConditionList:[{value: '=', text: '='},
{value: '<>', text: '<>'},
{value: '<', text: '<'},
{value: '<=', text: '<='},
{value: '>', text: '>'},
{value: '>=', text: '>='},
{value: 'LIKE', text: 'LIKE'},
{value: 'BETWEEN', text: 'BETWEEN'},
{value: 'IS NULL', text: 'IS NULL'},
{value: 'IS NOT NULL', text: 'IS NOT NULL'}],
// 表头数据 // 表头数据
tableHead:[ tableHead:[
{ {
column_name: "column_name",column_comment:"表字段" column_name: "field",column_comment:"表字段"
}, },
{ {
column_name: "column_age",column_comment:"比较符" column_name: "condition",column_comment:"比较符"
}, },
{ {
column_name: "column_sex",column_comment:"流里的字段1" column_name: "name",column_comment:"流里的字段1"
}, },
{ {
column_name: "column_col",column_comment:"流里的字段2" column_name: "name2",column_comment:"流里的字段2"
}, }
], ],
// 表格数据 // 表格数据
tableData: [{ tableData: [
column_age: '3', // {
column_name: '鞠婧祎', // field: '3',
column_sex: '女', // condition: '鞠婧祎',
column_col:'0' // name: '女',
}, // name2:'1',
{ // },
column_age: '25', // {
column_name: '魏大勋', // field: '31',
column_sex: '男', // condition: '鞠婧祎',
column_col:'1' // name: '女',
}, // name2:'1',
{ // },
column_age: '18', // {
column_name: '关晓彤', // field: '32',
column_sex: '女', // condition: '鞠婧祎',
column_col:'2' // name: '女',
}], // name2:'1',
// },
],
// 查询字段--end------------
} }
}, },
watch:{ watch:{
deleteForm:{ deleteForm:{
deep:true, // deep:true,
// immediate:true,
handler:function(n,o){ handler:function(n,o){
console.log("回显的表单数据===",n); console.log("回显的表单数据===",n);
if(n){
var ny=JSON.parse(n.key); var ny=JSON.parse(n.key);
this.tableData=ny; this.tableData=ny;
}
} }
} }
...@@ -152,6 +222,28 @@ export default ({ ...@@ -152,6 +222,28 @@ export default ({
this.saveOutputDialog(this.deleteForm); this.saveOutputDialog(this.deleteForm);
this.handleClose();//关闭弹窗 this.handleClose();//关闭弹窗
}, },
//新增或者编辑弹窗
fieldClick(state, val) {
this.field = !this.field;
this.dataState = state;
if (state) {
this.fieldForm = {};
} else {
this.fieldForm = val;
}
},
//关闭编辑的弹窗
handleCloseEdit(){
this.field = !this.field;
},
// 字段
addField() {
this.field = !this.field;
console.log('添加的字段===',this.fieldForm);
if (this.dataState) {
this.tableData.push(this.fieldForm);
}
},
......
...@@ -258,16 +258,29 @@ export default ({ ...@@ -258,16 +258,29 @@ export default ({
} }
}, },
watch:{ watch:{
insertOrUpdateForm:{ // insertOrUpdateForm:{
deep:true, // // deep:true,
handler:function(n,o){ // // immediate:true,
// handler:function(n,o){
// console.log("回显的表单数据===",n);
// if(n){
// var ny=JSON.parse(n.searchFields);
// var na=JSON.parse(n.updateFields);
// this.tableData=ny;
// this.tableDataUpdate=na;
// }
// }
// }
insertOrUpdateForm(n, o) {
console.log("回显的表单数据===",n); console.log("回显的表单数据===",n);
if(n){
var ny=JSON.parse(n.searchFields); var ny=JSON.parse(n.searchFields);
var na=JSON.parse(n.updateFields); var na=JSON.parse(n.updateFields);
this.tableData=ny; this.tableData=ny;
this.tableDataUpdate=na; this.tableDataUpdate=na;
} }
} },
}, },
props:["insertOrUpdateForm","InsertOrUpdateVisible","doubleClickCell","getXmlVal","saveOutputDialog"], props:["insertOrUpdateForm","InsertOrUpdateVisible","doubleClickCell","getXmlVal","saveOutputDialog"],
...@@ -287,10 +300,10 @@ export default ({ ...@@ -287,10 +300,10 @@ export default ({
}, },
confirm(){ confirm(){
this.insertOrUdateForm.searchFields=JSON.stringify(this.tableData);//查询字段 this.insertOrUpdateForm.searchFields=JSON.stringify(this.tableData);//查询字段
this.insertOrUdateForm.updateFields=JSON.stringify(this.tableDataUpdate);//更新字段 this.insertOrUpdateForm.updateFields=JSON.stringify(this.tableDataUpdate);//更新字段
console.log('弹窗数据:===',this.insertOrUdateForm); console.log('弹窗数据:===',this.insertOrUpdateForm);
this.saveOutputDialog(this.insertOrUdateForm); this.saveOutputDialog(this.insertOrUpdateForm);
this.handleClose();//关闭弹窗 this.handleClose();//关闭弹窗
......
...@@ -317,7 +317,7 @@ ...@@ -317,7 +317,7 @@
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="microVisible = false">取 消</el-button> <el-button @click="microVisible = false">取 消</el-button>
<el-button type="primary" @click="microVisible = false">确 定</el-button> <el-button type="primary" @click="confirm">确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
...@@ -420,7 +420,11 @@ export default ({ ...@@ -420,7 +420,11 @@ export default ({
}, },
confirm(){ confirm(){
this.updateForm.searchFields=JSON.stringify(this.tableData);//查询字段
this.updateForm.updateFields=JSON.stringify(this.tableDataUpdate);//更新字段
console.log('弹窗数据===',this.updateForm);
this.saveOutputDialog(this.updateForm);
this.handleClose();//关闭弹窗
}, },
//新建转换 //新建转换
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
> >
<el-form ref="synForm" :model="synForm" label-width="200px"> <el-form ref="synForm" :model="synForm" label-width="200px">
<el-form-item label="步骤名称:" label-width="120px"> <el-form-item label="步骤名称:" label-width="120px">
<el-input v-model="synForm.name" placeholder="数据同步"></el-input> <el-input v-model="synForm.name" placeholder="数据同步" value="数据同步"></el-input>
</el-form-item> </el-form-item>
<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">
...@@ -377,16 +377,30 @@ export default ({ ...@@ -377,16 +377,30 @@ export default ({
} }
}, },
watch:{ watch:{
synForm:{ // synForm:{
deep:true, // // deep:true,
handler:function(n,o){ // // immediate:true,
// handler:function(n,o){
// console.log("回显的表单数据===",n);
// if(n){
// var ny=JSON.parse(n.searchFields);
// var na=JSON.parse(n.updateFields);
// this.tableData=ny;
// this.tableDataUpdate=na;
// }
// }
// }
synForm(n, o) {
console.log("回显的表单数据===",n); console.log("回显的表单数据===",n);
if(n){
var ny=JSON.parse(n.searchFields); var ny=JSON.parse(n.searchFields);
var na=JSON.parse(n.updateFields); var na=JSON.parse(n.updateFields);
this.tableData=ny; this.tableData=ny;
this.tableDataUpdate=na; this.tableDataUpdate=na;
} }
} },
}, },
props:{ props:{
......
...@@ -328,11 +328,15 @@ export default ({ ...@@ -328,11 +328,15 @@ export default ({
watch:{ watch:{
tableOutForm:{ tableOutForm:{
deep:true, // deep: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); var ny=JSON.parse(n.fields);
this.tableData=ny; this.tableData=ny;
}
} }
} }
......
...@@ -509,16 +509,27 @@ export default ({ ...@@ -509,16 +509,27 @@ export default ({
} }
}, },
watch:{ watch:{
textFileForm:{ textFileForm(n, o) {
deep:true,
handler:function(n,o){
console.log("回显的表单数据===",n); console.log("回显的表单数据===",n);
if(n){
var ny=JSON.parse(n.fields); var ny=JSON.parse(n.fields);
this.tableData=ny; this.tableData=ny;
}
} }
}, },
// textFileForm:{
// // deep:true,
// // immediate:true,
// handler:function(n,o){
// console.log("回显的表单数据===",n);
// if(n){
// var ny=JSON.parse(n.fields);
// this.tableData=ny;
// }
// }
// }
},
props:{ props:{
textFileForm:Object, textFileForm:Object,
title:{ title:{
......
...@@ -275,16 +275,29 @@ export default ({ ...@@ -275,16 +275,29 @@ export default ({
}, },
watch:{ watch:{
synForm:{ // synForm:{
deep:true, // deep:true,
handler:function(n,o){ // immediate:true,
// handler:function(n,o){
// console.log("回显的表单数据===",n);
// if(n){
// var ny=JSON.parse(n.searchFields);
// var na=JSON.parse(n.updateFields);
// this.tableData=ny;
// this.tableDataUpdate=na;
// }
// }
// }
updateForm(n, o) {
console.log("回显的表单数据===",n); console.log("回显的表单数据===",n);
if(n){
var ny=JSON.parse(n.searchFields); var ny=JSON.parse(n.searchFields);
var na=JSON.parse(n.updateFields); var na=JSON.parse(n.updateFields);
this.tableData=ny; this.tableData=ny;
this.tableDataUpdate=na; this.tableDataUpdate=na;
} }
} },
}, },
props:{ props:{
updateForm:Object, updateForm:Object,
...@@ -314,10 +327,10 @@ export default ({ ...@@ -314,10 +327,10 @@ export default ({
}, },
confirm(){ confirm(){
this.insertOrUdateForm.searchFields=JSON.stringify(this.tableData);//查询字段 this.updateForm.searchFields=JSON.stringify(this.tableData);//查询字段
this.insertOrUdateForm.updateFields=JSON.stringify(this.tableDataUpdate);//更新字段 this.updateForm.updateFields=JSON.stringify(this.tableDataUpdate);//更新字段
console.log('弹窗数据===',this.updateForm); console.log('弹窗数据===',this.updateForm);
this.saveOutputDialog(this.insertOrUdateForm); this.saveOutputDialog(this.updateForm);
this.handleClose();//关闭弹窗 this.handleClose();//关闭弹窗
}, },
......
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