Commit 2c0886ca by 莫晓莉

组件回显

parent 9d38d726
......@@ -816,27 +816,27 @@
:doubleClickCell="doubleClickCell"
:getXmlVal="getXmlVal"
@fathertrans="fathertrans"
:saveOutputDialog="saveOutputDialog"></outDialog>
:saveOutputDialog="saveOutputDialog" :tableOutForm="outPutFormData"></outDialog>
<insertOrUpdate
ref="insertOrdate"
:InsertOrUpdateVisible.sync="InsertOrUpdateVisible"
:saveOutputDialog="saveOutputDialog" :doubleClickCell="doubleClickCell" :getXmlVal="getXmlVal"></insertOrUpdate>
:saveOutputDialog="saveOutputDialog" :doubleClickCell="doubleClickCell" :getXmlVal="getXmlVal" :insertOrUpdateForm="outPutFormData"></insertOrUpdate>
<excelOutPutDialog
ref="excelOut"
:excelOutPutVisible.sync="excelOutPutVisible"
:saveOutputDialog="saveOutputDialog" :doubleClickCell="doubleClickCell"></excelOutPutDialog>
:saveOutputDialog="saveOutputDialog" :doubleClickCell="doubleClickCell" :excelForm="outPutFormData"></excelOutPutDialog>
<updateDialog
ref="update"
:updateVisible.sync="updateVisible"
:saveOutputDialog="saveOutputDialog" :doubleClickCell="doubleClickCell"></updateDialog>
<synDialog ref="syn" :synVisible.sync="synVisible" :saveOutputDialog="saveOutputDialog" :doubleClickCell="doubleClickCell"></synDialog>
<delDialog ref="del" :deleteVisible.sync="deleteVisible" :saveOutputDialog="saveOutputDialog" :doubleClickCell="doubleClickCell"></delDialog>
<sqlDialog ref="sql" :sqlVisible.sync="sqlVisible" :saveOutputDialog="saveOutputDialog" :doubleClickCell="doubleClickCell"></sqlDialog>
:saveOutputDialog="saveOutputDialog" :doubleClickCell="doubleClickCell" :updateForm="outPutFormData"></updateDialog>
<synDialog ref="syn" :synVisible.sync="synVisible" :saveOutputDialog="saveOutputDialog" :doubleClickCell="doubleClickCell" :synForm="outPutFormData"></synDialog>
<delDialog ref="del" :deleteVisible.sync="deleteVisible" :saveOutputDialog="saveOutputDialog" :doubleClickCell="doubleClickCell" :deleteForm="outPutFormData"></delDialog>
<sqlDialog ref="sql" :sqlVisible.sync="sqlVisible" :saveOutputDialog="saveOutputDialog" :doubleClickCell="doubleClickCell" :sqlForm="outPutFormData"></sqlDialog>
<textFileDialog
ref="textFile"
:fileVisible.sync="fileVisible"
:saveOutputDialog="saveOutputDialog"></textFileDialog>
<microDialog ref="mic" :microVisible.sync="microVisible" :saveOutputDialog="saveOutputDialog"></microDialog>
:saveOutputDialog="saveOutputDialog" :textFileForm="outPutFormData"></textFileDialog>
<microDialog ref="mic" :microVisible.sync="microVisible" :saveOutputDialog="saveOutputDialog" :tableOutForm="outPutFormData"></microDialog>
<!-- 输出弹窗end================== -->
<trans-graph :transGraphVisible.sync="transGraphVisible" :getXmlVal="getXmlVal"></trans-graph>
......@@ -909,6 +909,7 @@ export default {
data() {
return {
outPutFormData:{},//输出弹窗组件的表单值
doubleClickCell:{},
transGraphVisible:false,//执行转换弹窗
monitorCanvas: "", //监听画布
......@@ -1445,34 +1446,54 @@ export default {
} else if (cell.ids == "step17" || cell.value.attributes.ctype.value == "TableOutput" ) {
//表输出
this.tableOutPutVisible = !this.tableOutPutVisible;
// let q = {};
// let obj = cell.value.attributes;
// for (let vel in obj) {
// let key = obj[vel];
// q[key.name] = key.value;
// }
this.outPutFormData = this.showDataFunc();
return;
} else if (cell.ids == "step16") {
//更新
this.updateVisible = !this.updateVisible;
this.outPutFormData = this.showDataFunc();
return;
} else if (cell.ids == "step15") {
//文本文件输出
this.fileVisible = !this.fileVisible;
this.outPutFormData = this.showDataFunc();
return;
} else if (cell.ids == "step14") {
//数据同步
this.synVisible = !this.synVisible;
this.outPutFormData = this.showDataFunc();
return;
} else if (cell.ids == "step13") {
//插入、更新
this.InsertOrUpdateVisible = !this.InsertOrUpdateVisible;
this.outPutFormData = this.showDataFunc();
return;
} else if (cell.ids == "step12") {
//删除
this.deleteVisible = !this.deleteVisible;
this.outPutFormData = this.showDataFunc();
return;
} else if (cell.ids == "step11") {
//SQL文件输出
this.sqlVisible = !this.sqlVisible;
this.outPutFormData = this.showDataFunc();
return;
}else if (cell.ids == "step10") {
//mico-Excel输出
this.microVisible = !this.microVisible;
// this.outPutFormData = this.showDataFunc();
return;
} else if (cell.ids == "step9") {
//Excel输出
this.excelOutPutVisible = !this.excelOutPutVisible;
this.outPutFormData = this.showDataFunc();
return;
}
});
......@@ -1485,6 +1506,18 @@ export default {
});
},
// 回显数据封装的方法
showDataFunc(){
let q = {};
let obj = cell.value.attributes;
for (let vel in obj) {
let key = obj[vel];
q[key.name] = key.value;
}
return q;
},
addCell(toolItem, x, y) {
const { width, height } = toolItem;
// const parent = this.graph.getDefaultParent();
......
......@@ -402,59 +402,59 @@ export default ({
return{
fileDialogVisible:false,//选择文件夹弹窗
formName:'',
excelForm:{
file_name: "D:\course",//文件名
create_parent_folder: "Y",//创建父目录
do_not_open_new_file_init: "N",//启动时不创建文件
file_extention: "xls",//扩展名
file_add_stepnr: "Y",//文件名里包含步骤数
file_add_date: "Y", //文件名里包含日期
file_add_time: "Y",//文件名里包含时间
SpecifyFormat: "Y",//指定日期时间格式
date_time_format: "",//时间日期格式
add_to_result_filenames: "Y",//结果中添加文件名
// excelForm:{
// file_name: "D:\course",//文件名
// create_parent_folder: "Y",//创建父目录
// do_not_open_new_file_init: "N",//启动时不创建文件
// file_extention: "xls",//扩展名
// file_add_stepnr: "Y",//文件名里包含步骤数
// file_add_date: "Y", //文件名里包含日期
// file_add_time: "Y",//文件名里包含时间
// SpecifyFormat: "Y",//指定日期时间格式
// date_time_format: "",//时间日期格式
// add_to_result_filenames: "Y",//结果中添加文件名
append: "N",//追加
header: "Y",//头部
footer: "Y",//尾部
encoding: "",//编码
file_split: "0",//分拆...每一行
sheetname: "Sheet1",//Sheet名称
protect_sheet: "Y",//保护Sheet
password: undefined,//密码
autosizecolums: "Y",//自动调整列大小
nullisblank: false,//保留NULL值
usetempfiles: "Y",//使用临时文件
tempdirectory: "",//临时文件目录
// append: "N",//追加
// header: "Y",//头部
// footer: "Y",//尾部
// encoding: "",//编码
// file_split: "0",//分拆...每一行
// sheetname: "Sheet1",//Sheet名称
// protect_sheet: "Y",//保护Sheet
// password: undefined,//密码
// autosizecolums: "Y",//自动调整列大小
// nullisblank: false,//保留NULL值
// usetempfiles: "Y",//使用临时文件
// tempdirectory: "",//临时文件目录
template_enabled: true,//使用模板
template_filename: "Y",//临时文件目录
template_append: true,//追加Excel模板
// template_enabled: true,//使用模板
// template_filename: "Y",//临时文件目录
// template_append: true,//追加Excel模板
header_font_name: "0",//表头字体
header_font_size: "10",//表头字体大小
header_font_bold: "Y",//表头字体加粗
header_font_italic: "Y",//表头字体倾斜
header_font_underline: "0",//表头字体下划线
header_font_orientation: "0",//表头字体方向
header_font_color: "1",//表头字体颜色
header_background_color: "0",//表头背景颜色
header_row_height: "255",//表头高度
header_alignment: "0",//表头对齐方式
header_image: undefined,//添加图片
// header_font_name: "0",//表头字体
// header_font_size: "10",//表头字体大小
// header_font_bold: "Y",//表头字体加粗
// header_font_italic: "Y",//表头字体倾斜
// header_font_underline: "0",//表头字体下划线
// header_font_orientation: "0",//表头字体方向
// header_font_color: "1",//表头字体颜色
// header_background_color: "0",//表头背景颜色
// header_row_height: "255",//表头高度
// header_alignment: "0",//表头对齐方式
// header_image: undefined,//添加图片
row_font_name: "0",//数据字体
row_font_size: "10",//数据字体大小
row_font_color: "1",//数据字体颜色
row_background_color: "0",//数据背景颜色
fields: "[]",
label: "Excel输出",
},
// row_font_name: "0",//数据字体
// row_font_size: "10",//数据字体大小
// row_font_color: "1",//数据字体颜色
// row_background_color: "0",//数据背景颜色
// fields: "[]",
// label: "Excel输出",
// },
stepName:{
name:"Excel输出"
},
......@@ -501,8 +501,21 @@ export default ({
}
},
watch:{
deleteForm:{
deep:true,
handler:function(n,o){
console.log("回显的表单数据===",n);
var ny=JSON.parse(n.fields);
this.tableData=ny;
}
}
},
props:{
excelForm:Object,
title:{
type:String,
default:''
......
......@@ -64,17 +64,15 @@ export default ({
// updateFields: "[]",
// },
deleteForm:{
commit: "100",
connection: "",
key:"[]",
label:"删除",
schema: "",
table: "",
// searchFields: "[]",
// updateFields: "[]",
// deleteForm:{
// commit: "100",
// connection: "",
// key:"[]",
// label:"删除",
// schema: "",
// table: "",
},
// },
// 表头数据
tableHead:[
{
......@@ -113,7 +111,18 @@ export default ({
}
},
props:["title","nodePath","deleteVisible","doubleClickCell","saveOutputDialog"],
watch:{
deleteForm:{
deep:true,
handler:function(n,o){
console.log("回显的表单数据===",n);
var ny=JSON.parse(n.key);
this.tableData=ny;
}
}
},
props:["title","nodePath","deleteVisible","doubleClickCell","saveOutputDialog","deleteForm"],
// props:{
// title:{
// type:String,
......
......@@ -14,14 +14,14 @@
</el-form-item>
</el-form>
<el-form :model="insertOrUdateForm" label-width="200px">
<el-form :model="insertOrUpdateForm" label-width="200px">
<el-tabs v-model="activeName" type="border-card">
<el-tab-pane label="基本配置" name="content">
<database-choose ref="databaseChoose" :form="insertOrUdateForm"></database-choose>
<database-choose ref="databaseChoose" :form="insertOrUpdateForm"></database-choose>
<el-form-item label="提交记录数量:">
<el-row :gutter="10">
<el-col :span="23">
<el-input v-model="insertOrUdateForm.commit"></el-input>
<el-input v-model="insertOrUpdateForm.commit"></el-input>
</el-col>
</el-row>
</el-form-item>
......@@ -30,7 +30,7 @@
<el-form-item label="不执行任何更新:">
<el-row :gutter="10">
<el-col :span="23">
<el-checkbox v-model="insertOrUdateForm.update_bypassed" true-label='Y' false-label="N"></el-checkbox>
<el-checkbox v-model="insertOrUpdateForm.update_bypassed" true-label='Y' false-label="N"></el-checkbox>
</el-col>
</el-row>
</el-form-item>
......@@ -161,15 +161,15 @@ export default ({
editDiaUpdate:false,//更新字段
fieldFormUpdate:{},//更新弹窗
stepName:{name:'删除'},
insertOrUdateForm:{
commit: "100",
connection: "",
schema: "test",
table: "",
searchFields: "[]",
updateFields: "[]",
update_bypassed: "N"
},
// insertOrUpdateForm:{
// commit: "100",
// connection: "",
// schema: "test",
// table: "",
// searchFields: "[]",
// updateFields: "[]",
// update_bypassed: "N"
// },
activeName:'content',
// 查询字段--start------------
fieldsList:[],//字段获取
......@@ -257,8 +257,20 @@ export default ({
}
},
watch:{
insertOrUpdateForm:{
deep:true,
handler:function(n,o){
console.log("回显的表单数据===",n);
var ny=JSON.parse(n.searchFields);
var na=JSON.parse(n.updateFields);
this.tableData=ny;
this.tableDataUpdate=na;
}
}
},
props:["InsertOrUpdateVisible","doubleClickCell","getXmlVal","saveOutputDialog"],
props:["insertOrUpdateForm","InsertOrUpdateVisible","doubleClickCell","getXmlVal","saveOutputDialog"],
// props:{
// InsertOrUpdateVisible:{
......
......@@ -176,30 +176,30 @@ export default ({
formatTimeList:[],
myCodeList:[],
stepName:{name:'SQL文件输出'},
sqlForm:{
connection: "",//连接名称
schema: "",
table: "",
// sqlForm:{
// connection: "",//连接名称
// schema: "",
// table: "",
create: "N",//增加 创建表 语句
truncate: "N",//增加 清空表 语句
// create: "N",//增加 创建表 语句
// truncate: "N",//增加 清空表 语句
startnewline: "N",//每个语句另起一行
name: "",//文件名
create_parent_folder: "N",//创建父目录
DoNotOpenNewFileInit: "N",//启动时不创建文件
extention: "",//扩展名
split: "N",//文件名中包括步骤号
add_date: "N",//文件名里包含日期
add_time: "N",//文件名里包含时间
append: "N",//追加方式
splitevery: "0",//分拆...每一行
addtoresult: "N",//将文件加入到结果文件中
// startnewline: "N",//每个语句另起一行
// name: "",//文件名
// create_parent_folder: "N",//创建父目录
// DoNotOpenNewFileInit: "N",//启动时不创建文件
// extention: "",//扩展名
// split: "N",//文件名中包括步骤号
// add_date: "N",//文件名里包含日期
// add_time: "N",//文件名里包含时间
// append: "N",//追加方式
// splitevery: "0",//分拆...每一行
// addtoresult: "N",//将文件加入到结果文件中
dateformat: "",//日期格式
encoding: "",//编码
},
// dateformat: "",//日期格式
// encoding: "",//编码
// },
activeName:'content',
// 表头数据
// tableHead:[
......@@ -268,7 +268,7 @@ export default ({
}
},
props:["title","sqlVisible","saveOutputDialog","doubleClickCell"],
props:["sqlForm","title","sqlVisible","saveOutputDialog","doubleClickCell"],
// props:{
// title:{
......
......@@ -212,25 +212,25 @@ export default ({
fieldUpdate:false,//更新弹窗
editDiaUpdate:false,//更新字段
fieldFormUpdate:{},//更新弹窗
synForm:{
connection: "",
schema: "",
table: "lookup table",
commit: "100",
use_batch: "N",//批量更新
tablename_in_field: "N",//表名在字段里定义
tablename_field: "",//表名字段
// synForm:{
// connection: "",
// schema: "",
// table: "lookup table",
// commit: "100",
// use_batch: "N",//批量更新
// tablename_in_field: "N",//表名在字段里定义
// tablename_field: "",//表名字段
operation_order_field: "",//操作字段名
order_insert: "",//当值相等时插入
order_delete: "",//当值相等时删除
order_update: "",//当值相等时更新
perform_lookup: "N",//执行查询
// operation_order_field: "",//操作字段名
// order_insert: "",//当值相等时插入
// order_delete: "",//当值相等时删除
// order_update: "",//当值相等时更新
// perform_lookup: "N",//执行查询
searchFields: "[]",
updateFields: "[]",
// searchFields: "[]",
// updateFields: "[]",
},
// },
activeName:'content',
// 查询字段--start------------
fieldsList:[],//字段获取
......@@ -376,8 +376,21 @@ export default ({
}
},
watch:{
synForm:{
deep:true,
handler:function(n,o){
console.log("回显的表单数据===",n);
var ny=JSON.parse(n.searchFields);
var na=JSON.parse(n.updateFields);
this.tableData=ny;
this.tableDataUpdate=na;
}
}
},
props:{
synForm:Object,
title:{
type:String,
default:''
......
......@@ -147,7 +147,8 @@
</template>
</el-table> -->
<table-list ref="tableDia" :tableHead="tableHead" :tableData="tableData" :field.sync="editDia" :fieldClick="fieldClick"></table-list>
<!-- <table-list ref="tableDia" :tableHead="tableHead" :tableData="tableData" :field.sync="editDia" :fieldClick="fieldClick"></table-list> -->
<!-- 编辑弹窗开始=========== -->
<el-dialog
title="编辑"
......@@ -231,26 +232,26 @@ export default ({
editDia:false,//编辑表字段
fieldForm:{},//编辑弹窗
radioTreaty:'0',
tableOutForm:{
commit: "1000",
connection: "mysql---test",
fields: "[]",
ignore_errors: "N",
partitioning_daily: "N",
partitioning_enabled: "N",
partitioning_field: "",
partitioning_monthly: "Y",
return_field: undefined,
return_keys: "N",
schema: "test",
specify_fields: "N",
table: "r_database",
tablename_field: "",
tablename_in_field: "N",
tablename_in_table: "Y",
truncate: "N",
use_batch: "Y",
},
// tableOutForm:{
// commit: "1000",
// connection: "mysql---test",
// fields: "[]",
// ignore_errors: "N",
// partitioning_daily: "N",
// partitioning_enabled: "N",
// partitioning_field: "",
// partitioning_monthly: "Y",
// return_field: undefined,
// return_keys: "N",
// schema: "test",
// specify_fields: "N",
// table: "r_database",
// tablename_field: "",
// tablename_in_field: "N",
// tablename_in_table: "Y",
// truncate: "N",
// use_batch: "Y",
// },
stepName:{},
activeName:'content',
fieldsList:[],//字段获取
......@@ -277,7 +278,8 @@ export default ({
},
],
// 表格数据
tableData: [{
tableData: [
{
stream_name: '3',
column_name: '鞠婧祎',
},
......@@ -288,7 +290,8 @@ export default ({
{
stream_name: '18',
column_name: '关晓彤',
}],
}
],
// 表头数据
// tableHead2:[
......@@ -315,37 +318,23 @@ export default ({
}
},
props:["title","nodePath","tableOutPutVisible","explorer","graph","doubleClickCell","getXmlVal","saveOutputDialog"],
// props:{
// title:{
// type:String,
// default:''
// },
// nodePath:{
// type:String,
// default:''
// },
// tableOutPutVisible:{
// type: Boolean,
// default:false
// },
// explorer:Function,
// graph:Object,
// doubleClickCell:Object,
// getXmlVal:String,
// saveOutputDialog:Function
// },
props:["tableOutForm","title","nodePath","tableOutPutVisible","explorer","graph","doubleClickCell","getXmlVal","saveOutputDialog"],
mounted(){
},
created(){
// this.dialogOpen();
},
watch:{
tableOutForm(n,o){
console.log('表单值变化',n,o)
tableOutForm:{
deep:true,
handler:function(n,o){
console.log("回显的表单数据===",n);
var ny=JSON.parse(n.fields);
this.tableData=ny;
}
}
},
methods:{
......
......@@ -399,41 +399,41 @@ export default ({
formatLineList:[],//获取格式
compressList:[],//获取压缩
myCodeList:[],//获取编码
textFileForm:{
file_name: "file",//文件名称
is_command: "N",//结果输送至命令行或脚本
servlet_output: "N",//输出传递到Servlet
create_parent_folder: "Y",//创建父目录
do_not_open_new_file_init: "N",//启动时不创建文件
fileNameInField: "N",//从字段中获取文件名
fileNameField: "",//文件名字段
extention: "txt",//扩展名
split: "N",//文件名里包含步骤数
haspartno: "N",//文件名里包含数据分区号
add_date: "N",//文件名里包含日期
add_time: "N",//文件名里包含时间
SpecifyFormat: "N",//指定日期时间格式
date_time_format: "",//时间日期格式
add_to_result_filenames: "Y",//结果中添加文件名
// textFileForm:{
// file_name: "file",//文件名称
// is_command: "N",//结果输送至命令行或脚本
// servlet_output: "N",//输出传递到Servlet
// create_parent_folder: "Y",//创建父目录
// do_not_open_new_file_init: "N",//启动时不创建文件
// fileNameInField: "N",//从字段中获取文件名
// fileNameField: "",//文件名字段
// extention: "txt",//扩展名
// split: "N",//文件名里包含步骤数
// haspartno: "N",//文件名里包含数据分区号
// add_date: "N",//文件名里包含日期
// add_time: "N",//文件名里包含时间
// SpecifyFormat: "N",//指定日期时间格式
// date_time_format: "",//时间日期格式
// add_to_result_filenames: "Y",//结果中添加文件名
append: "N",//追加方式
separator: ";",//分割符
enclosure: "",//封闭符
enclosure_forced: "N",//强制在字段周围加封闭符
enclosure_fix_disabled: "N",//禁用封闭符修复
header: "Y",//头部
footer: "N",//尾部
format: "DOS",//格式
compression: "None",//压缩
encoding: "",//编码
pad: "N",//字段右填充或裁剪
fast_dump: "N",//快速存储数据(无格式)
splitevery: "0",//分拆...每一行
endedLine: undefined,//添加文件结束行
// append: "N",//追加方式
// separator: ";",//分割符
// enclosure: "",//封闭符
// enclosure_forced: "N",//强制在字段周围加封闭符
// enclosure_fix_disabled: "N",//禁用封闭符修复
// header: "Y",//头部
// footer: "N",//尾部
// format: "DOS",//格式
// compression: "None",//压缩
// encoding: "",//编码
// pad: "N",//字段右填充或裁剪
// fast_dump: "N",//快速存储数据(无格式)
// splitevery: "0",//分拆...每一行
// endedLine: undefined,//添加文件结束行
fields: "[]",//字段
// fields: "[]",//字段
},
// },
activeName:'content',
// 表头数据
tableHead:[
......@@ -508,8 +508,19 @@ export default ({
}
},
watch:{
textFileForm:{
deep:true,
handler:function(n,o){
console.log("回显的表单数据===",n);
var ny=JSON.parse(n.fields);
this.tableData=ny;
}
}
},
props:{
textFileForm:Object,
title:{
type:String,
default:''
......
......@@ -181,19 +181,19 @@ export default ({
fieldUpdate:false,//更新弹窗
editDiaUpdate:false,//更新字段
fieldFormUpdate:{},//更新弹窗
updateForm:{
connection: "",
schema: "test",
table: "",
commit: "100",
use_batch:'Y',// 批量更新
skip_lookup:'Y',//跳过查询
error_ignored:'Y',//忽略查询错误
searchFields: "[]", //查询字段
updateFields: "[]",//更新字段
ignore_flag_field:"[]",//标志字段
// updateForm:{
// connection: "",
// schema: "test",
// table: "",
// commit: "100",
// use_batch:'Y',// 批量更新
// skip_lookup:'Y',//跳过查询
// error_ignored:'Y',//忽略查询错误
// searchFields: "[]", //查询字段
// updateFields: "[]",//更新字段
// ignore_flag_field:"[]",//标志字段
},
// },
activeName:'content',
// 查询字段--start------------
fieldsList:[],//字段获取
......@@ -274,8 +274,20 @@ export default ({
}
},
watch:{
synForm:{
deep:true,
handler:function(n,o){
console.log("回显的表单数据===",n);
var ny=JSON.parse(n.searchFields);
var na=JSON.parse(n.updateFields);
this.tableData=ny;
this.tableDataUpdate=na;
}
}
},
props:{
updateForm:Object,
title:{
type:String,
default:''
......
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