Commit ab6029de by 李耀琨

修复bug

parent 74cbec0a
...@@ -2,13 +2,15 @@ ENV = 'development' ...@@ -2,13 +2,15 @@ ENV = 'development'
VUE_APP_BASE_API = 'http://192.168.0.44:9888/'
VUE_APP_WS_API = 'ws://192.168.0.44:9888/'
# 接口地址 # 接口地址
# VUE_APP_BASE_API = 'http://192.168.0.200' #V1UE_APP_BASE_API = 'http://192.168.0.44'
# VUE_APP_WS_API = 'ws://192.168.0.200' #VUE_APP_WS_API = 'ws://192.168.0.44'
VUE_APP_FILE_API = '' VUE_APP_FILE_API = ''
......
...@@ -85,6 +85,8 @@ export default { ...@@ -85,6 +85,8 @@ export default {
// if (node.level > this.PopupFrom.length) return resolve([]); // if (node.level > this.PopupFrom.length) return resolve([]);
}, },
handleNodeClick(data, node) { handleNodeClick(data, node) {
console.log("点击当前节点node===", node); console.log("点击当前节点node===", node);
console.log("点击当前节点data===", data); console.log("点击当前节点data===", data);
......
...@@ -6,6 +6,12 @@ ...@@ -6,6 +6,12 @@
width="800px" width="800px"
:before-close="handleClose" :before-close="handleClose"
> --> > -->
<el-dialog
title="自定义常量数据"
:visible.sync="ConstantDialog"
width="800px"
:before-close="handleCloseFun"
>
<el-form ref="form" :model="form" label-width="120px"> <el-form ref="form" :model="form" label-width="120px">
...@@ -90,13 +96,20 @@ ...@@ -90,13 +96,20 @@
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<span slot="footer" class="dialog-footer">
<el-button @click="handleCloseFun">取 消</el-button>
<el-button type="primary" @click="ConstantDialogFun">确 定</el-button>
</span>
</el-dialog>
<el-dialog <el-dialog
title="添加元数据" title="添加元数据"
:visible.sync="metadata" :visible.sync="metadata"
width="500px" width="500px"
:before-close="handleClose" :before-close="handleClose"
:modal="false"
> >
<el-form ref="form" :model="metadataForm" label-width="160px"> <el-form ref="form" :model="metadataForm" label-width="160px">
<el-form-item label="名称:"> <el-form-item label="名称:">
...@@ -187,13 +200,7 @@ ...@@ -187,13 +200,7 @@
</el-dialog> </el-dialog>
<!-- <span slot="footer" class="dialog-footer">
<el-button @click="ConstantDialog = false">取 消</el-button>
<el-button type="primary" @click="myConfirm"
>确 定</el-button
>
</span> -->
<!-- </el-dialog> -->
</div> </div>
</template> </template>
...@@ -202,27 +209,31 @@ ...@@ -202,27 +209,31 @@
import { valueFormat, valueMeta } from "@/api/kettle/link"; import { valueFormat, valueMeta } from "@/api/kettle/link";
export default { export default {
props: ["form"], props: ["form","ConstantDialog","saveOutputDialog"],
data() { data() {
return { return {
metadataForm: { metadataForm: {},
},
metadata: false, metadata: false,
addValue: false, addValue: false,
ValueForm: {}, ValueForm: {},
activeName: "first", activeName: "first",
data: this.form.data, data:[],
fields: this.form.fields, fields:[],
fieldFormat: {}, fieldFormat: {},
fieldType: {}, fieldType: {},
dataStatus:false, dataStatus:false,
newGraph:[],
}; };
}, },
watch:{ watch:{
// from(n,o){
// console.log(n.fields,'fileds');
// this.fields=n.fields
// }
// myForm(n, o) { // myForm(n, o) {
// console.log("回显的表单数据===",n); // console.log("回显的表单数据===",n);
// if(n){ // if(n){
...@@ -233,27 +244,39 @@ export default { ...@@ -233,27 +244,39 @@ export default {
// } // }
// }, // },
}, },
// props:["ConstantDialog","saveOutputDialog","doubleClickCell","myForm"],
created() { created() {
this.valueFormatFun(); this.valueFormatFun();
this.valueMetaFun(); this.valueMetaFun();
}, },
methods: { methods: {
clickFun(graph,val){
console.log(graph,'双击获取值')
this.newGraph = graph;
console.log(val,"拿到form");
this.fields = JSON.parse(val.fields)
this.data = JSON.parse(val.data)
},
addDetermine(){ addDetermine(){
this.metadata = !this.metadata this.metadata = !this.metadata
console.log(this.metadataForm,787987987987987);
console.log(this.form,"form");
console.log(this.fields)
if (this.dataStatus) { if (this.dataStatus) {
this.fields.push(this.metadataForm) this.fields.push(this.metadataForm)
console.log(this.fields,12345)
// this.fields.push(this.metadataForm)
// //
}else{ }else{
} }
}, },
...@@ -261,7 +284,6 @@ export default { ...@@ -261,7 +284,6 @@ export default {
this.addValue = !this.addValue this.addValue = !this.addValue
if (this.dataStatus) { if (this.dataStatus) {
this.data.push(this.ValueForm); this.data.push(this.ValueForm);
//
}else{ }else{
} }
...@@ -293,6 +315,8 @@ this.addValue = !this.addValue ...@@ -293,6 +315,8 @@ this.addValue = !this.addValue
}, },
// 关闭弹框 // 关闭弹框
handleClose(done) { handleClose(done) {
this.$confirm("确认关闭?") this.$confirm("确认关闭?")
...@@ -325,22 +349,19 @@ this.addValue = !this.addValue ...@@ -325,22 +349,19 @@ this.addValue = !this.addValue
this.fieldType = res; this.fieldType = res;
}); });
}, },
handleCloseFun(){
this.$emit("update:ConstantDialog", false);
},
ConstantDialogFun() {
this.handleCloseFun()
this.form.data = JSON.stringify(this.data);
this.form.fields = JSON.stringify(this.fields);
this.saveOutputDialog(this.form)
},
// mxl=========================
// myConfirm(){
// this.myForm.fields=JSON.stringify(this.tableData);//查询字段
// this.myForm.data=JSON.stringify(this.data);//更新字段
// this.myForm.label=this.form.name;
// console.log('弹窗数据===',this.myForm);
// this.saveOutputDialog(this.myForm);
// this.handleClose();//关闭弹窗
// },
// handleClose(){
// this.$emit("update:ConstantDialog", false);
// },
// mxl=========================
}, },
}; };
</script> </script>
......
<template> <template>
<div class="customConstant"> <div class="customConstant">
<el-dialog
title="生成记录"
:visible.sync="RowGeneratorDialog"
width="800px"
:before-close="handleCloseFun"
>
<el-form ref="form" :model="form" label-width="120px"> <el-form ref="form" :model="form" label-width="120px">
<el-form-item label="步骤名称:"> <el-form-item label="步骤名称:">
<el-input v-model="form.label"></el-input> <el-input v-model="form.label"></el-input>
...@@ -78,6 +85,14 @@ ...@@ -78,6 +85,14 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-card> </el-card>
<span slot="footer" class="dialog-footer">
<el-button @click="handleCloseFun">取 消</el-button>
<el-button type="primary" @click="RowGeneratorDialogFun"
>确 定</el-button
>
</span>
</el-dialog>
<el-dialog <el-dialog
title="添加字段" title="添加字段"
...@@ -157,17 +172,19 @@ ...@@ -157,17 +172,19 @@
import { valueFormat, valueMeta } from "@/api/kettle/link"; import { valueFormat, valueMeta } from "@/api/kettle/link";
export default { export default {
props: ["custom","form"], props: ["custom","form","RowGeneratorDialog","saveOutputDialog"],
data() { data() {
return { return {
metadataForm: {}, metadataForm: {},
metadata: false, metadata: false,
activeName: "first", activeName: "first",
data: [], data: [],
fields: this.form.fields, fields: [],
fieldFormat: {}, fieldFormat: {},
fieldType: {}, fieldType: {},
dataState: false, dataState: false,
newGraph:[],
}; };
}, },
...@@ -178,6 +195,16 @@ export default { ...@@ -178,6 +195,16 @@ export default {
methods: { methods: {
clickFun(graph,val){
console.log(graph,'双击获取值')
this.newGraph = graph;
console.log(val,"拿到form");
this.fields = JSON.parse(val.fields)
},
addMetadata(){ addMetadata(){
this.metadata = !this.metadata this.metadata = !this.metadata
if (this.dataState) { if (this.dataState) {
...@@ -189,6 +216,16 @@ this.metadata = !this.metadata ...@@ -189,6 +216,16 @@ this.metadata = !this.metadata
} }
}, },
handleCloseFun(){
this.$emit("update:RowGeneratorDialog", false);
},
RowGeneratorDialogFun() {
this.handleCloseFun()
this.form.fields = JSON.stringify(this.fields);
this.saveOutputDialog(this.form)
},
addField(state, val) { addField(state, val) {
......
<template> <template>
<div class="getSystemInformation"> <div class="getSystemInformation">
<el-dialog
title="获取系统信息"
:visible.sync="SystemInfoDialog"
width="800px"
:before-close="handleCloseFun"
>
<el-form ref="form" :model="form" label-width="120px"> <el-form ref="form" :model="form" label-width="120px">
<el-form-item label="步骤名称:"> <el-form-item label="步骤名称:">
...@@ -38,6 +43,11 @@ ...@@ -38,6 +43,11 @@
</el-table> </el-table>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="handleCloseFun">取 消</el-button>
<el-button type="primary" @click="SystemInfoDialogFun">确 定</el-button>
</span>
</el-dialog>
<el-dialog <el-dialog
title="添加字段" title="添加字段"
...@@ -75,11 +85,11 @@ ...@@ -75,11 +85,11 @@
import { systemDataTypes } from "@/api/kettle/link"; import { systemDataTypes } from "@/api/kettle/link";
export default { export default {
props: ["form"], props: ["form","SystemInfoDialog","saveOutputDialog","nodeData"],
data() { data() {
return { return {
addField: false, addField: false,
fields: this.form.fields, fields: [],
type: {}, type: {},
dataStatus:false, dataStatus:false,
fiel:{}, fiel:{},
...@@ -95,6 +105,25 @@ export default { ...@@ -95,6 +105,25 @@ export default {
methods: { methods: {
clickFun(graph,val){
console.log(graph,'双击获取值')
this.newGraph = graph;
console.log(val,"拿到form");
this.fields = JSON.parse(val.fields)
},
handleCloseFun(){
this.$emit("update:SystemInfoDialog", false);
},
SystemInfoDialogFun() {
this.handleCloseFun()
this.form.fields = JSON.stringify(this.fields);
this.saveOutputDialog(this.form)
},
addFieldDetermine(){ addFieldDetermine(){
this.addField = !this.addField this.addField = !this.addField
if (this.dataStatus) { if (this.dataStatus) {
......
<template> <template>
<div class="customConstant"> <div class="customConstant">
<el-dialog
title="获取变量"
:visible.sync="getVariableDialog"
width="800px"
:before-close="handleCloseFun"
>
<el-form ref="from" :model="form" label-width="120px"> <el-form ref="from" :model="form" label-width="120px">
<el-form-item label="步骤名称:"> <el-form-item label="步骤名称:">
<el-input v-model="form.label"></el-input> <el-input v-model="form.label"></el-input>
...@@ -37,6 +44,15 @@ ...@@ -37,6 +44,15 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<span slot="footer" class="dialog-footer">
<el-button @click="handleCloseFun">取 消</el-button>
<el-button type="primary" @click="getVariableDialogFun"
>确 定</el-button
>
</span>
</el-dialog>
<el-dialog <el-dialog
title="添加字段" title="添加字段"
:visible.sync="fieldBox" :visible.sync="fieldBox"
...@@ -118,7 +134,7 @@ import { ...@@ -118,7 +134,7 @@ import {
variableType variableType
} from "@/api/kettle/link"; } from "@/api/kettle/link";
export default { export default {
props: ["connectionNode", "form", "nodeData"], //从父组件传过来的值 props: ["connectionNode", "form", "nodeData","getVariableDialog","saveOutputDialog"], //从父组件传过来的值
components: { components: {
browseFiles, browseFiles,
...@@ -127,7 +143,7 @@ export default { ...@@ -127,7 +143,7 @@ export default {
return { return {
newGraph: [], newGraph: [],
fieldBox: false, fieldBox: false,
fields: this.form.fields, fields: [],
metadataForm: {}, metadataForm: {},
fieldFormat: {}, fieldFormat: {},
fieldCompress: {}, fieldCompress: {},
...@@ -152,9 +168,20 @@ export default { ...@@ -152,9 +168,20 @@ export default {
}, },
methods: { methods: {
clickFun(graph) { clickFun(graph,val) {
console.log(graph, 1); console.log(graph, 1);
this.newGraph = graph; this.newGraph = graph;
this.fields = JSON.parse(val.fields)
},
handleCloseFun(){
this.$emit("update:getVariableDialog", false);
},
getVariableDialogFun() {
this.form.fields = JSON.stringify(this.fields);
this.saveOutputDialog(this.form)
this.handleCloseFun()
}, },
getTheField() { getTheField() {
......
<template> <template>
<div class="customConstant"> <div class="customConstant">
<el-dialog
title="合并行(比较)"
:visible.sync="mergeRecordsDialog"
width="800px"
:before-close="handleCloseFun"
>
<el-form ref="from" :model="form" label-width="120px"> <el-form ref="from" :model="form" label-width="120px">
<el-form-item label="步骤名称:"> <el-form-item label="步骤名称:">
<el-input v-model="form.label"></el-input> <el-input v-model="form.label"></el-input>
...@@ -97,6 +105,16 @@ ...@@ -97,6 +105,16 @@
</el-card> </el-card>
</el-col> </el-col>
</el-row> </el-row>
<span slot="footer" class="dialog-footer">
<el-button @click="handleCloseFun">取 消</el-button>
<el-button type="primary" @click="mergeRecordsDialogFun"
>确 定</el-button
>
</span>
</el-dialog>
<el-dialog <el-dialog
...@@ -169,7 +187,7 @@ import { ...@@ -169,7 +187,7 @@ import {
previousSteps, previousSteps,
} from "@/api/kettle/link"; } from "@/api/kettle/link";
export default { export default {
props: ["connectionNode", "form", "nodeData"], //从父组件传过来的值 props: ["connectionNode", "form", "nodeData","saveOutputDialog","mergeRecordsDialog"], //从父组件传过来的值
components: { components: {
browseFiles, browseFiles,
...@@ -179,8 +197,8 @@ export default { ...@@ -179,8 +197,8 @@ export default {
newGraph: [], newGraph: [],
fieldBox: false, fieldBox: false,
matchingFieldBox:false, matchingFieldBox:false,
values:this.form.values, values:[],
keys:this.form.keys, keys:[],
metadataForm: {}, metadataForm: {},
matchingFieldForm:{}, matchingFieldForm:{},
filterForm: {}, filterForm: {},
...@@ -206,9 +224,25 @@ export default { ...@@ -206,9 +224,25 @@ export default {
}, },
methods: { methods: {
clickFun(graph) { clickFun(graph,val) {
console.log(graph, 1); console.log(graph, 1);
this.newGraph = graph; this.newGraph = graph;
this.values = JSON.parse(val.values)
this.keys = JSON.parse(val.keys)
},
handleCloseFun(){
this.$emit("update:mergeRecordsDialog", false);
},
mergeRecordsDialogFun() {
this.handleCloseFun()
this.form.keys = JSON.stringify(this.keys);
this.form.values = JSON.stringify(this.values);
this.saveOutputDialog(this.form)
}, },
route(flowData) { route(flowData) {
......
<template> <template>
<div class="randomNumber"> <div class="randomNumber">
<el-dialog
title="生成随机数"
:visible.sync="RandomValueDialog"
width="800px"
:before-close="handleCloseFun"
>
<el-form ref="from" :model="form" label-width="120px"> <el-form ref="from" :model="form" label-width="120px">
<el-form-item label="步骤名称:"> <el-form-item label="步骤名称:">
<el-input v-model="form.label"></el-input> <el-input v-model="form.label"></el-input>
...@@ -41,7 +46,13 @@ ...@@ -41,7 +46,13 @@
</el-table> </el-table>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="handleCloseFun">取 消</el-button>
<el-button type="primary" @click="RandomValueDialogFun"
>确 定</el-button
>
</span>
</el-dialog>
<el-dialog <el-dialog
...@@ -80,10 +91,10 @@ ...@@ -80,10 +91,10 @@
import { randomValueFunc } from "@/api/kettle/link"; import { randomValueFunc } from "@/api/kettle/link";
export default { export default {
props: ["form"], props: ["form","saveOutputDialog","RandomValueDialog"],
data() { data() {
return { return {
fields: this.form.fields, fields: [],
fiel:{}, fiel:{},
random:{}, random:{},
dataState:false, dataState:false,
...@@ -97,6 +108,26 @@ export default { ...@@ -97,6 +108,26 @@ export default {
methods: { methods: {
clickFun(graph,val){
console.log(graph,'双击获取值')
this.newGraph = graph;
console.log(val,"拿到form");
this.fields = JSON.parse(val.fields)
},
handleCloseFun(){
this.$emit("update:RandomValueDialog", false);
},
RandomValueDialogFun() {
this.handleCloseFun()
this.form.fields = JSON.stringify(this.fields);
this.saveOutputDialog(this.form)
},
addSheet(state,val) { addSheet(state,val) {
this.addField = !this.addField; this.addField = !this.addField;
this.dataState = state this.dataState = state
......
<template> <template>
<div class="customConstant"> <div class="customConstant">
<el-dialog
title="选择/改名值"
:visible.sync="selectFieldDialog"
width="800px"
:before-close="handleCloseFun"
>
<el-form ref="from" :model="form" label-width="120px"> <el-form ref="from" :model="form" label-width="120px">
<el-form-item label="步骤名称:"> <el-form-item label="步骤名称:">
<el-input v-model="form.label"></el-input> <el-input v-model="form.label"></el-input>
...@@ -112,6 +118,15 @@ ...@@ -112,6 +118,15 @@
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<span slot="footer" class="dialog-footer">
<el-button @click="handleCloseFun">取 消</el-button>
<el-button type="primary" @click="selectFieldDialogFun"
>确 定</el-button
>
</span>
</el-dialog>
<el-dialog <el-dialog
title="选择和修改" title="选择和修改"
...@@ -333,7 +348,7 @@ import { ...@@ -333,7 +348,7 @@ import {
inputOutputFields, inputOutputFields,
} from "@/api/kettle/link"; } from "@/api/kettle/link";
export default { export default {
props: ["connectionNode", "form", "nodeData"], //从父组件传过来的值 props: ["connectionNode", "form", "nodeData","saveOutputDialog","selectFieldDialog"], //从父组件传过来的值
components: { components: {
browseFiles, browseFiles,
...@@ -346,12 +361,10 @@ export default { ...@@ -346,12 +361,10 @@ export default {
metadataBox: false, metadataBox: false,
selectModifyBox:false, selectModifyBox:false,
removeFieldBox:false, removeFieldBox:false,
filter: this.form.filter,
inputFields: this.form.inputFields,
fields:this.form.fields, fields:[],
remove:this.form.remove, remove:[],
meta:this.form.meta, meta:[],
metadataForm:{}, metadataForm:{},
selectModifyForm:{}, selectModifyForm:{},
removeFieldForm:{}, removeFieldForm:{},
...@@ -379,9 +392,27 @@ export default { ...@@ -379,9 +392,27 @@ export default {
}, },
methods: { methods: {
clickFun(graph) { clickFun(graph,val) {
console.log(graph, 1); console.log(graph);
this.newGraph = graph; this.newGraph = graph;
this.fields= JSON.parse(val.fields)
this.remove= JSON.parse(val.remove)
this.meta= JSON.parse(val.meta)
},
handleCloseFun(){
this.$emit("update:selectFieldDialog", false);
},
selectFieldDialogFun(){
this.form.fields = JSON.stringify(this.fields);
this.form.remove = JSON.stringify(this.remove);
this.form.meta = JSON.stringify(this.meta);
this.saveOutputDialog(this.form)
this.handleCloseFun()
}, },
selectModifyGetTheField() { selectModifyGetTheField() {
...@@ -467,15 +498,6 @@ export default { ...@@ -467,15 +498,6 @@ export default {
}, },
addFilterBox() {
this.filterBox = !this.filterBox;
if (this.dataState) {
this.filter.push(this.filterForm);
this.$emit("filter", this.filter);
} else {
}
},
deleteField(index, rows) { deleteField(index, rows) {
......
<template> <template>
<div class="customConstant"> <div class="customConstant">
<el-dialog
title="设置变量"
:visible.sync="setVariableDialog"
width="800px"
:before-close="handleCloseFun"
>
<el-form ref="from" :model="form" label-width="120px"> <el-form ref="from" :model="form" label-width="120px">
<el-form-item label="步骤名称:"> <el-form-item label="步骤名称:">
<el-input v-model="form.label"></el-input> <el-input v-model="form.label"></el-input>
...@@ -37,6 +43,16 @@ ...@@ -37,6 +43,16 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<span slot="footer" class="dialog-footer">
<el-button @click="handleCloseFun">取 消</el-button>
<el-button type="primary" @click="setVariableDialogFun"
>确 定</el-button
>
</span>
</el-dialog>
<el-dialog <el-dialog
title="添加字段" title="添加字段"
:visible.sync="fieldBox" :visible.sync="fieldBox"
...@@ -118,7 +134,7 @@ import { ...@@ -118,7 +134,7 @@ import {
variableType variableType
} from "@/api/kettle/link"; } from "@/api/kettle/link";
export default { export default {
props: ["connectionNode", "form", "nodeData"], //从父组件传过来的值 props: ["connectionNode", "form", "nodeData","saveOutputDialog","setVariableDialog"], //从父组件传过来的值
components: { components: {
browseFiles, browseFiles,
...@@ -127,7 +143,7 @@ export default { ...@@ -127,7 +143,7 @@ export default {
return { return {
newGraph: [], newGraph: [],
fieldBox: false, fieldBox: false,
fields: this.form.fields, fields: [],
metadataForm: {}, metadataForm: {},
fieldFormat: {}, fieldFormat: {},
fieldCompress: {}, fieldCompress: {},
...@@ -152,9 +168,20 @@ export default { ...@@ -152,9 +168,20 @@ export default {
}, },
methods: { methods: {
clickFun(graph) { clickFun(graph,val) {
console.log(graph, 1); console.log(graph, 1);
this.newGraph = graph; this.newGraph = graph;
this.fields = JSON.parse(val.fields)
},
handleCloseFun(){
this.$emit("update:setVariableDialog", false);
},
setVariableDialogFun() {
this.form.fields = JSON.stringify(this.fields);
this.saveOutputDialog(this.form)
this.handleCloseFun()
}, },
getTheField() { getTheField() {
......
<template> <template>
<div class="customConstant"> <div class="customConstant">
<el-dialog
title="排序记录"
:visible.sync="sortRecordDialog"
width="800px"
:before-close="handleCloseFun"
>
<el-form ref="from" :model="form" label-width="120px"> <el-form ref="from" :model="form" label-width="120px">
<el-form-item label="步骤名称:"> <el-form-item label="步骤名称:">
<el-input v-model="form.label"></el-input> <el-input v-model="form.label"></el-input>
...@@ -77,6 +83,12 @@ ...@@ -77,6 +83,12 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-card> </el-card>
<span slot="footer" class="dialog-footer">
<el-button @click="handleCloseFun">取 消</el-button>
<el-button type="primary" @click="sortRecordDialogFun">确 定</el-button>
</span>
</el-dialog>
<el-dialog <el-dialog
title="添加字段" title="添加字段"
...@@ -182,7 +194,7 @@ import { ...@@ -182,7 +194,7 @@ import {
inputOutputFields, inputOutputFields,
} from "@/api/kettle/link"; } from "@/api/kettle/link";
export default { export default {
props: ["connectionNode", "form", "nodeData"], //从父组件传过来的值 props: ["connectionNode", "form", "nodeData","sortRecordDialog","saveOutputDialog"], //从父组件传过来的值
components: { components: {
browseFiles, browseFiles,
...@@ -193,7 +205,7 @@ export default { ...@@ -193,7 +205,7 @@ export default {
fileBox: false, fileBox: false,
filterBox: false, filterBox: false,
fieldBox: false, fieldBox: false,
fields: this.form.fields, fields: [],
metadataForm: {}, metadataForm: {},
filterForm: {}, filterForm: {},
fieldFormat: {}, fieldFormat: {},
...@@ -205,7 +217,7 @@ export default { ...@@ -205,7 +217,7 @@ export default {
routeState: 0, routeState: 0,
filePathSelection: false, filePathSelection: false,
localPath: {}, localPath: {},
fileSelection: this.form, fileSelection: {},
fielForm: {}, fielForm: {},
fieldsName:[], fieldsName:[],
}; };
...@@ -217,7 +229,6 @@ export default { ...@@ -217,7 +229,6 @@ export default {
this.formatMapperLineTerminatorFun(); this.formatMapperLineTerminatorFun();
this.availableCharsetsFun(); this.availableCharsetsFun();
this.compressionProviderNamesFun(); this.compressionProviderNamesFun();
console.log(this.form,79879798798);
}, },
methods: { methods: {
...@@ -225,9 +236,21 @@ export default { ...@@ -225,9 +236,21 @@ export default {
this.filePathSelection = !this.filePathSelection; this.filePathSelection = !this.filePathSelection;
}, },
clickFun(graph) { clickFun(graph,val) {
console.log(graph, 1); console.log(graph, 1);
this.newGraph = graph; this.newGraph = graph;
this.fields = JSON.parse(val.fields)
this.fileSelection = val
},
handleCloseFun(){
this.$emit("update:sortRecordDialog", false);
},
sortRecordDialogFun() {
this.handleCloseFun()
this.form.fields = JSON.stringify(this.fields);
this.saveOutputDialog(this.form)
}, },
getTheField() { getTheField() {
......
<template> <template>
<div class="customConstant"> <div class="customConstant">
<el-dialog
title="文本文件输入"
:visible.sync="TextFileInputDialog"
width="800px"
:before-close="handleCloseFun"
>
<el-form ref="from" :model="form" label-width="120px"> <el-form ref="from" :model="form" label-width="120px">
<el-form-item label="步骤名称:"> <el-form-item label="步骤名称:">
<el-input v-model="form.label"></el-input> <el-input v-model="form.label"></el-input>
...@@ -555,6 +561,17 @@ ...@@ -555,6 +561,17 @@
</el-tabs> </el-tabs>
<span slot="footer" class="dialog-footer">
<el-button @click="handleCloseFun">取 消</el-button>
<el-button type="primary" @click="TextFileInputDialogFun"
>确 定</el-button
>
</span>
</el-dialog>
<el-dialog <el-dialog
title="修改文件内容" title="修改文件内容"
:visible.sync="fileBox" :visible.sync="fileBox"
...@@ -770,7 +787,7 @@ const { ...@@ -770,7 +787,7 @@ const {
import { valueFormat, valueMeta,formatMapperLineTerminator,availableCharsets,compressionProviderNames,inputOutputFields } from "@/api/kettle/link"; import { valueFormat, valueMeta,formatMapperLineTerminator,availableCharsets,compressionProviderNames,inputOutputFields } from "@/api/kettle/link";
export default { export default {
props: ["connectionNode","form","nodeData"], //从父组件传过来的值 props: ["connectionNode","form","nodeData","TextFileInputDialog","saveOutputDialog"], //从父组件传过来的值
components: { components: {
browseFiles, browseFiles,
...@@ -781,9 +798,9 @@ export default { ...@@ -781,9 +798,9 @@ export default {
fileBox:false, fileBox:false,
filterBox: false, filterBox: false,
fieldBox: false, fieldBox: false,
fileNameStore: this.form.fileNameStore, fileNameStore:[],
filter: this.form.filter, filter: [],
inputFields: this.form.inputFields, inputFields: [],
metadataForm: {}, metadataForm: {},
filterForm: {}, filterForm: {},
fieldFormat: {}, fieldFormat: {},
...@@ -813,9 +830,31 @@ export default { ...@@ -813,9 +830,31 @@ export default {
methods: { methods: {
clickFun(graph) { clickFun(graph,val) {
console.log(graph, 1); console.log(graph, 1);
this.newGraph = graph; this.newGraph = graph;
this.fileNameStore=JSON.parse(val.fileNameStore)
this.filter=JSON.parse(val.filter)
this.inputFields=JSON.parse(val.inputFields)
},
handleCloseFun(){
this.$emit("update:TextFileInputDialog", false);
},
TextFileInputDialogFun() {
this.handleCloseFun()
this.form.filter = JSON.stringify(this.filter);
this.form.inputFields = JSON.stringify(
this.inputFields
);
this.form.fileNameStore = JSON.stringify(
this.fileNameStore
);
this.saveOutputDialog(this.form)
}, },
getTheField(){ getTheField(){
......
...@@ -719,7 +719,7 @@ ...@@ -719,7 +719,7 @@
:form="form" :form="form"
:graphXml="graphXml" :graphXml="graphXml"
:nodeData="nodeData" :nodeData="nodeData"
ref="tableInputDialog" ref="tableInput"
> >
</tableInput> </tableInput>
...@@ -731,197 +731,131 @@ ...@@ -731,197 +731,131 @@
</el-dialog> </el-dialog>
<!-- 获取系统信息--> <!-- 获取系统信息-->
<el-dialog
title="获取系统信息"
:visible.sync="SystemInfoDialog"
width="800px"
:before-close="handleClose"
>
<getSystemInformation <getSystemInformation
ref="SystemInfoDialog" ref="SystemInfo"
:disabled="true" :disabled="true"
:form="form" :form="form"
:nodeData="nodeData"
:SystemInfoDialog.sync="SystemInfoDialog"
:saveOutputDialog="saveOutputDialog"
> >
</getSystemInformation> </getSystemInformation>
<span slot="footer" class="dialog-footer">
<el-button @click="SystemInfoDialog = false">取 消</el-button>
<el-button type="primary" @click="SystemInfoDialogFun">确 定</el-button>
</span>
</el-dialog>
<!-- 自定义常量数据--> <!-- 自定义常量数据-->
<el-dialog
title="自定义常量数据" <customConstant
:visible.sync="ConstantDialog" ref="Constant"
width="800px" :disabled="true"
:before-close="handleClose" :form="form"
> :nodeData="nodeData"
<customConstant ref="ConstantDialog" :disabled="true" :form="form"> :ConstantDialog.sync="ConstantDialog"
:saveOutputDialog="saveOutputDialog"
>
</customConstant> </customConstant>
<span slot="footer" class="dialog-footer">
<el-button @click="ConstantDialog = false">取 消</el-button>
<el-button type="primary" @click="ConstantDialogFun">确 定</el-button>
</span>
</el-dialog>
<!-- 自定义常量数据弹窗 -->
<!-- <customConstant :ConstantDialog.sync="ConstantDialog" :saveOutputDialog="saveOutputDialog" :doubleClickCell="doubleClickCell" :myForm="myoutPutFormData" > </customConstant> -->
<!-- 生成随机数--> <!-- 生成随机数-->
<el-dialog <!-- <el-dialog
title="生成随机数" title="生成随机数"
:visible.sync="RandomValueDialog" :visible.sync="RandomValueDialog"
width="800px" width="800px"
:before-close="handleClose" :before-close="handleClose"
> > -->
<randomNumber ref="RandomValueDialog" :disabled="true" :form="form"> <randomNumber ref="RandomValue"
:disabled="true"
:form="form"
:RandomValueDialog.sync="RandomValueDialog"
:saveOutputDialog="saveOutputDialog">
</randomNumber> </randomNumber>
<span slot="footer" class="dialog-footer"> <!-- <span slot="footer" class="dialog-footer">
<el-button @click="RandomValueDialog = false">取 消</el-button> <el-button @click="RandomValueDialog = false">取 消</el-button>
<el-button type="primary" @click="RandomValueDialogFun" <el-button type="primary" @click="RandomValueDialogFun"
>确 定</el-button >确 定</el-button
> >
</span> </span>
</el-dialog> </el-dialog> -->
<!-- 生成记录--> <!-- 生成记录-->
<el-dialog
title="生成记录"
:visible.sync="RowGeneratorDialog"
width="800px"
:before-close="handleClose"
>
<generatingRecords <generatingRecords
ref="RowGeneratorDialog" ref="RowGenerator"
:disabed="true" :disabed="true"
:form="form" :form="form"
:nodeData="nodeData"
:RowGeneratorDialog.sync="RowGeneratorDialog"
:saveOutputDialog="saveOutputDialog"
></generatingRecords> ></generatingRecords>
<span slot="footer" class="dialog-footer">
<el-button @click="RowGeneratorDialog = false">取 消</el-button>
<el-button type="primary" @click="RowGeneratorDialogFun"
>确 定</el-button
>
</span>
</el-dialog>
<!-- 文本文件输入--> <!-- 文本文件输入-->
<el-dialog
title="文本文件输入"
:visible.sync="TextFileInputDialog"
width="800px"
:before-close="handleClose"
>
<textFileInput <textFileInput
ref="TextFileInputDialog" ref="TextFileInput"
:disabed="true" :disabed="true"
:connectionNode="connectionNode" :connectionNode="connectionNode"
:form="form" :form="form"
:nodeData="nodeData" :nodeData="nodeData"
:TextFileInputDialog.sync="TextFileInputDialog"
:saveOutputDialog="saveOutputDialog"
></textFileInput> ></textFileInput>
<span slot="footer" class="dialog-footer">
<el-button @click="TextFileInputDialog = false">取 消</el-button>
<el-button type="primary" @click="TextFileInputDialogFun"
>确 定</el-button
>
</span>
</el-dialog>
<!-- 排序记录--> <!-- 排序记录-->
<el-dialog
title="排序记录"
:visible.sync="sortRecordDialog"
width="800px"
:before-close="handleClose"
>
<sortRecord <sortRecord
ref="sortRecordDialog" ref="sortRecord"
:disabed="true" :disabed="true"
:form="form" :form="form"
:nodeData="nodeData" :nodeData="nodeData"
:sortRecordDialog.sync="sortRecordDialog"
:saveOutputDialog="saveOutputDialog"
></sortRecord> ></sortRecord>
<span slot="footer" class="dialog-footer">
<el-button @click="sortRecordDialog = false">取 消</el-button>
<el-button type="primary" @click="sortRecordDialogFun">确 定</el-button>
</span>
</el-dialog>
<!-- 设置变量--> <!-- 设置变量-->
<el-dialog
title="设置变量"
:visible.sync="setVariableDialog"
width="800px"
:before-close="handleClose"
>
<setVariable <setVariable
ref="setVariableDialog" ref="setVariable"
:disabed="true" :disabed="true"
:form="form" :form="form"
:nodeData="nodeData" :nodeData="nodeData"
:setVariableDialog.sync="setVariableDialog"
:saveOutputDialog="saveOutputDialog"
></setVariable> ></setVariable>
<span slot="footer" class="dialog-footer">
<el-button @click="setVariableDialog = false">取 消</el-button>
<el-button type="primary" @click="setVariableDialogFun"
>确 定</el-button
>
</span>
</el-dialog>
<!-- 获取变量--> <!-- 获取变量-->
<el-dialog
title="获取变量" <getVariable
:visible.sync="getVariableDialog" ref="getVariable"
width="800px"
:before-close="handleClose"
>
<setVariable
ref="getVariableDialog"
:disabed="true" :disabed="true"
:form="form" :form="form"
:nodeData="nodeData" :nodeData="nodeData"
></setVariable> :getVariableDialog.sync="getVariableDialog"
:saveOutputDialog="saveOutputDialog"
<span slot="footer" class="dialog-footer"> ></getVariable>
<el-button @click="getVariableDialog = false">取 消</el-button>
<el-button type="primary" @click="getVariableDialogFun"
>确 定</el-button
>
</span>
</el-dialog>
<!-- 合并记录--> <!-- 合并记录-->
<el-dialog
title="合并行(比较)"
:visible.sync="mergeRecordsDialog"
width="800px"
:before-close="handleClose"
>
<mergeRecords <mergeRecords
ref="mergeRecordsDialog" ref="mergeRecords"
:disabed="true" :disabed="true"
:form="form" :form="form"
:nodeData="nodeData" :nodeData="nodeData"
:mergeRecordsDialog.sync="mergeRecordsDialog"
:saveOutputDialog="saveOutputDialog"
></mergeRecords> ></mergeRecords>
<span slot="footer" class="dialog-footer">
<el-button @click="mergeRecordsDialog = false">取 消</el-button>
<el-button type="primary" @click="mergeRecordsDialogFun"
>确 定</el-button
>
</span>
</el-dialog>
<!-- 改变开始复制的数量 --> <!-- 改变开始复制的数量 -->
...@@ -944,29 +878,17 @@ ...@@ -944,29 +878,17 @@
</span> </span>
</el-dialog> </el-dialog>
<!-- 选择字段 -->
<!-- 字段选择-->
<el-dialog
title="选择/改名值"
:visible.sync="selectFieldDialog"
width="800px"
:before-close="handleClose"
>
<selectField <selectField
ref="selectFieldDialog" ref="selectField"
:disabed="true" :disabed="true"
:form="form" :form="form"
:nodeData="nodeData" :nodeData="nodeData"
:selectFieldDialog.sync="selectFieldDialog"
:saveOutputDialog="saveOutputDialog"
></selectField> ></selectField>
<span slot="footer" class="dialog-footer">
<el-button @click="selectFieldDialog = false">取 消</el-button>
<el-button type="primary" @click="selectFieldDialogFun"
>确 定</el-button
>
</span>
</el-dialog>
...@@ -1114,14 +1036,14 @@ ...@@ -1114,14 +1036,14 @@
<!-- 脚本弹窗组件end --> <!-- 脚本弹窗组件end -->
<!-- 转换弹窗组件start --> <!-- 转换弹窗组件start -->
<columnChoose <!-- <columnChoose
ref="insertOrdate" ref="insertOrdate"
:columnVisible.sync="columnVisible" :columnVisible.sync="columnVisible"
:saveOutputDialog="saveOutputDialog" :saveOutputDialog="saveOutputDialog"
:doubleClickCell="doubleClickCell" :doubleClickCell="doubleClickCell"
:getXmlVal="getXmlVal" :getXmlVal="getXmlVal"
:insertOrUpdateFormSend="outPutFormData2" :insertOrUpdateFormSend="outPutFormData2"
></columnChoose> ></columnChoose> -->
<!-- 转换弹窗组件end --> <!-- 转换弹窗组件end -->
...@@ -1232,7 +1154,6 @@ import sqlScriptDialog from "../../../script-dialog/sql-script"; ...@@ -1232,7 +1154,6 @@ import sqlScriptDialog from "../../../script-dialog/sql-script";
// 脚本弹窗组件end----------------------- // 脚本弹窗组件end-----------------------
// 转换弹窗组件start---------- // 转换弹窗组件start----------
import columnChoose from "../../../trans-dialog/column-choose";
// 转换弹窗组件end------------ // 转换弹窗组件end------------
import mxgraph from "@/utils/mxgraph"; import mxgraph from "@/utils/mxgraph";
...@@ -1438,7 +1359,6 @@ export default { ...@@ -1438,7 +1359,6 @@ export default {
// 脚本弹窗组件--- // 脚本弹窗组件---
// 转换弹窗组件start--- // 转换弹窗组件start---
columnChoose,
// 转换弹窗组件end----- // 转换弹窗组件end-----
}, },
//自定义指令 https://www.jb51.net/article/108047.htm //自定义指令 https://www.jb51.net/article/108047.htm
...@@ -1616,78 +1536,78 @@ export default { ...@@ -1616,78 +1536,78 @@ export default {
} }
}, },
ConstantDialogFun() { // ConstantDialogFun() {
this.ConstantDialog = !this.ConstantDialog; // this.ConstantDialog = !this.ConstantDialog;
console.log(this.$refs.ConstantDialog.data, "asghaksghk"); // console.log(this.$refs.ConstantDialog.data, "asghaksghk");
console.log(this.$refs.ConstantDialog.fields, "asghaksghk"); // console.log(this.$refs.ConstantDialog.fields, "asghaksghk");
this.form.data = JSON.stringify(this.$refs.ConstantDialog.data); // this.form.data = JSON.stringify(this.$refs.ConstantDialog.data);
this.form.fields = JSON.stringify(this.$refs.ConstantDialog.fields); // this.form.fields = JSON.stringify(this.$refs.ConstantDialog.fields);
for (let name in this.form) { // for (let name in this.form) {
var edit = new mxCellAttributeChange( // var edit = new mxCellAttributeChange(
this.nodeData, // this.nodeData,
name, // name,
this.form[name] // this.form[name]
); // );
this.graph.getModel().execute(edit); // this.graph.getModel().execute(edit);
} // }
}, // },
SystemInfoDialogFun() {
this.SystemInfoDialog = !this.SystemInfoDialog;
console.log(this.$refs.SystemInfoDialog.fields, 456753275328);
this.form.fields = JSON.stringify(this.$refs.SystemInfoDialog.fields);
for (let name in this.form) {
var edit = new mxCellAttributeChange(
this.nodeData,
name,
this.form[name]
);
this.graph.getModel().execute(edit);
}
},
RandomValueDialogFun() { // SystemInfoDialogFun() {
this.RandomValueDialog = !this.RandomValueDialog; // this.SystemInfoDialog = !this.SystemInfoDialog;
// console.log(this.$refs.SystemInfoDialog.fields, 456753275328);
// this.form.fields = JSON.stringify(this.$refs.SystemInfoDialog.fields);
// for (let name in this.form) {
// var edit = new mxCellAttributeChange(
// this.nodeData,
// name,
// this.form[name]
// );
// this.graph.getModel().execute(edit);
// }
// },
console.log(this.$refs.RandomValueDialog.fields, 4564654654); // RandomValueDialogFun() {
this.form.fields = JSON.stringify(this.$refs.RandomValueDialog.fields); // this.RandomValueDialog = !this.RandomValueDialog;
for (let name in this.form) {
var edit = new mxCellAttributeChange( // console.log(this.$refs.RandomValueDialog.fields, 4564654654);
this.nodeData, // this.form.fields = JSON.stringify(this.$refs.RandomValueDialog.fields);
name, // for (let name in this.form) {
this.form[name] // var edit = new mxCellAttributeChange(
); // this.nodeData,
this.graph.getModel().execute(edit); // name,
} // this.form[name]
}, // );
// this.graph.getModel().execute(edit);
// }
// },
RowGeneratorDialogFun() { // RowGeneratorDialogFun() {
this.RowGeneratorDialog = !this.RowGeneratorDialog; // this.RowGeneratorDialog = !this.RowGeneratorDialog;
console.log(this.$refs.RowGeneratorDialog.fields, 4564654654); // console.log(this.$refs.RowGeneratorDialog.fields, 4564654654);
this.form.fields = JSON.stringify(this.$refs.RowGeneratorDialog.fields); // this.form.fields = JSON.stringify(this.$refs.RowGeneratorDialog.fields);
for (let name in this.form) { // for (let name in this.form) {
var edit = new mxCellAttributeChange( // var edit = new mxCellAttributeChange(
this.nodeData, // this.nodeData,
name, // name,
this.form[name] // this.form[name]
); // );
this.graph.getModel().execute(edit); // this.graph.getModel().execute(edit);
} // }
}, // },
selectFieldDialogFun(){ // selectFieldDialogFun(){
this.selectFieldDialog = !this.selectFieldDialog // this.selectFieldDialog = !this.selectFieldDialog
this.form.fields = JSON.stringify(this.$refs.selectFieldDialog.fields); // this.form.fields = JSON.stringify(this.$refs.selectFieldDialog.fields);
this.form.remove = JSON.stringify(this.$refs.selectFieldDialog.remove); // this.form.remove = JSON.stringify(this.$refs.selectFieldDialog.remove);
this.form.meta = JSON.stringify(this.$refs.selectFieldDialog.meta); // this.form.meta = JSON.stringify(this.$refs.selectFieldDialog.meta);
for (let name in this.form) { // for (let name in this.form) {
var edit = new mxCellAttributeChange( // var edit = new mxCellAttributeChange(
this.nodeData, // this.nodeData,
name, // name,
this.form[name] // this.form[name]
); // );
this.graph.getModel().execute(edit); // this.graph.getModel().execute(edit);
} // }
}, // },
mergeRecordsDialogFun() { mergeRecordsDialogFun() {
...@@ -1704,9 +1624,12 @@ export default { ...@@ -1704,9 +1624,12 @@ export default {
} }
}, },
copyNumberFun(){ copyNumberFun(){
console.log(this.form,"数据"); console.log(this.form,"数据");
this.copyNumber = !this.copyNumber this.copyNumber = !this.copyNumber
for (let name in this.form) { for (let name in this.form) {
var edit = new mxCellAttributeChange( var edit = new mxCellAttributeChange(
this.nodeData, this.nodeData,
...@@ -1716,65 +1639,66 @@ export default { ...@@ -1716,65 +1639,66 @@ export default {
this.graph.getModel().execute(edit); this.graph.getModel().execute(edit);
} }
this.form = [] this.form = {}
console.log(this.form,"7798798798");
}, },
getVariableDialogFun() { // getVariableDialogFun() {
this.getVariableDialog = !this.getVariableDialog; // this.getVariableDialog = !this.getVariableDialog;
this.form.fields = JSON.stringify(this.$refs.getVariableDialog.fields); // this.form.fields = JSON.stringify(this.$refs.getVariableDialog.fields);
for (let name in this.form) { // for (let name in this.form) {
var edit = new mxCellAttributeChange( // var edit = new mxCellAttributeChange(
this.nodeData, // this.nodeData,
name, // name,
this.form[name] // this.form[name]
); // );
this.graph.getModel().execute(edit); // this.graph.getModel().execute(edit);
} // }
}, // },
setVariableDialogFun() { // setVariableDialogFun() {
this.setVariableDialog = !this.setVariableDialog; // this.setVariableDialog = !this.setVariableDialog;
this.form.fields = JSON.stringify(this.$refs.setVariableDialog.fields); // this.form.fields = JSON.stringify(this.$refs.setVariableDialog.fields);
for (let name in this.form) { // for (let name in this.form) {
var edit = new mxCellAttributeChange( // var edit = new mxCellAttributeChange(
this.nodeData, // this.nodeData,
name, // name,
this.form[name] // this.form[name]
); // );
this.graph.getModel().execute(edit); // this.graph.getModel().execute(edit);
} // }
}, // },
sortRecordDialogFun() { // sortRecordDialogFun() {
this.sortRecordDialog = !this.sortRecordDialog; // this.sortRecordDialog = !this.sortRecordDialog;
this.form.fields = JSON.stringify(this.$refs.sortRecordDialog.fields); // this.form.fields = JSON.stringify(this.$refs.sortRecordDialog.fields);
for (let name in this.form) { // for (let name in this.form) {
var edit = new mxCellAttributeChange( // var edit = new mxCellAttributeChange(
this.nodeData, // this.nodeData,
name, // name,
this.form[name] // this.form[name]
); // );
this.graph.getModel().execute(edit); // this.graph.getModel().execute(edit);
} // }
}, // },
TextFileInputDialogFun() { // TextFileInputDialogFun() {
this.TextFileInputDialog = !this.TextFileInputDialog; // this.TextFileInputDialog = !this.TextFileInputDialog;
this.form.filter = JSON.stringify(this.$refs.TextFileInputDialog.filter); // this.form.filter = JSON.stringify(this.$refs.TextFileInputDialog.filter);
this.form.inputFields = JSON.stringify( // this.form.inputFields = JSON.stringify(
this.$refs.TextFileInputDialog.inputFields // this.$refs.TextFileInputDialog.inputFields
); // );
this.form.fileNameStore = JSON.stringify( // this.form.fileNameStore = JSON.stringify(
this.$refs.TextFileInputDialog.fileNameStore // this.$refs.TextFileInputDialog.fileNameStore
); // );
for (let name in this.form) { // for (let name in this.form) {
var edit = new mxCellAttributeChange( // var edit = new mxCellAttributeChange(
this.nodeData, // this.nodeData,
name, // name,
this.form[name] // this.form[name]
); // );
this.graph.getModel().execute(edit); // this.graph.getModel().execute(edit);
} // }
}, // },
excelLnputDetermine() { excelLnputDetermine() {
this.excelLnput = !this.excelLnput; this.excelLnput = !this.excelLnput;
...@@ -2127,39 +2051,19 @@ export default { ...@@ -2127,39 +2051,19 @@ export default {
if ( cell.dis == "step27" || if ( cell.dis == "step27" ||
cell.value.attributes.ctype.value == "SelectValues") { cell.value.attributes.ctype.value == "SelectValues") {
this.selectFieldDialog = !this.selectFieldDialog this.selectFieldDialog = !this.selectFieldDialog
this.form = {}; this.form = this.showDataFunc()
let q = {};
let obj = cell.value.attributes;
for (let vel in obj) {
let key = obj[vel];
q[key.name] = key.value;
}
q.fields = JSON.parse(q.fields);
q.remove = JSON.parse(q.remove);
q.meta = JSON.parse(q.meta);
console.log(q, 45646546464);
this.form = q;
setTimeout(() => { setTimeout(() => {
this.$refs.selectFieldDialog.clickFun(this.graph); this.$refs.selectField.clickFun(this.graph,this.form);
}, 500); }, 500);
}else if ( }else if (
cell.dis == "step50" || cell.dis == "step50" ||
cell.value.attributes.ctype.value == "MergeRows" cell.value.attributes.ctype.value == "MergeRows"
) { ) {
this.mergeRecordsDialog = !this.mergeRecordsDialog; this.mergeRecordsDialog = !this.mergeRecordsDialog;
this.form = {}; this.form = this.showDataFunc()
let q = {};
let obj = cell.value.attributes;
for (let vel in obj) {
let key = obj[vel];
q[key.name] = key.value;
}
q.keys = JSON.parse(q.keys);
q.values = JSON.parse(q.values);
console.log(q, 45646546464);
this.form = q;
setTimeout(() => { setTimeout(() => {
this.$refs.mergeRecordsDialog.clickFun(this.graph); this.$refs.mergeRecords.clickFun(this.graph,this.form);
}, 500); }, 500);
return; return;
} else if ( } else if (
...@@ -2167,18 +2071,9 @@ export default { ...@@ -2167,18 +2071,9 @@ export default {
cell.value.attributes.ctype.value == "GetVariable" cell.value.attributes.ctype.value == "GetVariable"
) { ) {
this.getVariableDialog = !this.getVariableDialog; this.getVariableDialog = !this.getVariableDialog;
this.form = {}; this.form = this.showDataFunc()
let q = {};
let obj = cell.value.attributes;
for (let vel in obj) {
let key = obj[vel];
q[key.name] = key.value;
}
q.fields = JSON.parse(q.fields);
console.log(q, 45646546464);
this.form = q;
setTimeout(() => { setTimeout(() => {
this.$refs.setVariableDialog.clickFun(this.graph); this.$refs.getVariable.clickFun(this.graph,this.form);
}, 500); }, 500);
return; return;
} else if ( } else if (
...@@ -2186,18 +2081,9 @@ export default { ...@@ -2186,18 +2081,9 @@ export default {
cell.value.attributes.ctype.value == "SetVariable" cell.value.attributes.ctype.value == "SetVariable"
) { ) {
this.setVariableDialog = !this.setVariableDialog; this.setVariableDialog = !this.setVariableDialog;
this.form = {}; this.form = this.showDataFunc()
let q = {};
let obj = cell.value.attributes;
for (let vel in obj) {
let key = obj[vel];
q[key.name] = key.value;
}
q.fields = JSON.parse(q.fields);
console.log(q, 45646546464);
this.form = q;
setTimeout(() => { setTimeout(() => {
this.$refs.setVariableDialog.clickFun(this.graph); this.$refs.setVariable.clickFun(this.graph,this.form);
}, 500); }, 500);
return; return;
} }
...@@ -2206,18 +2092,9 @@ export default { ...@@ -2206,18 +2092,9 @@ export default {
cell.value.attributes.ctype.value == "SortRows" cell.value.attributes.ctype.value == "SortRows"
) { ) {
this.sortRecordDialog = !this.sortRecordDialog; this.sortRecordDialog = !this.sortRecordDialog;
this.form = {}; this.form = this.showDataFunc()
let q = {};
let obj = cell.value.attributes;
for (let vel in obj) {
let key = obj[vel];
q[key.name] = key.value;
}
q.fields = JSON.parse(q.fields);
console.log(q, 45646546464);
this.form = q;
setTimeout(() => { setTimeout(() => {
this.$refs.sortRecordDialog.clickFun(this.graph); this.$refs.sortRecord.clickFun(this.graph,this.form);
}, 500); }, 500);
return; return;
} else if ( } else if (
...@@ -2246,23 +2123,10 @@ export default { ...@@ -2246,23 +2123,10 @@ export default {
cell.value.attributes.ctype.value == "TableInput" cell.value.attributes.ctype.value == "TableInput"
) { ) {
this.TableInputDialog = !this.TableInputDialog; this.TableInputDialog = !this.TableInputDialog;
this.form = this.showDataFunc();
var enc = new mxCodec(mxUtils.createXmlDocument());
var node = enc.encode(this.graph.getModel());
this.graphXml = mxUtils.getPrettyXml(node);
this.form = {};
let q = {};
let obj = cell.value.attributes;
for (let vel in obj) {
let key = obj[vel];
q[key.name] = key.value;
}
this.form = q;
this.form.sql = decodeURIComponent(this.form.sql); this.form.sql = decodeURIComponent(this.form.sql);
setTimeout(() => { setTimeout(() => {
this.$refs.tableInputDialog.clickFun(this.graph); this.$refs.tableInput.clickFun(this.graph);
}, 500); }, 500);
return; return;
...@@ -2271,83 +2135,51 @@ export default { ...@@ -2271,83 +2135,51 @@ export default {
cell.value.attributes.ctype.value == "SystemInfo" cell.value.attributes.ctype.value == "SystemInfo"
) { ) {
this.SystemInfoDialog = !this.SystemInfoDialog; this.SystemInfoDialog = !this.SystemInfoDialog;
this.form = {}; this.form = this.showDataFunc();
let q = {}; setTimeout(() => {
let obj = cell.value.attributes; this.$refs.SystemInfo.clickFun(this.graph,this.form); //向子组件传递画布
for (let vel in obj) { }, 500);
let key = obj[vel];
q[key.name] = key.value;
}
q.fields = JSON.parse(q.fields);
this.form = q;
return; return;
} else if ( } else if (
(this.curFileType == "transformation" && cell.ids == "step5") || (this.curFileType == "transformation" && cell.ids == "step5") ||
cell.value.attributes.ctype.value == "DataGrid" cell.value.attributes.ctype.value == "DataGrid"
) { ) {
this.ConstantDialog = !this.ConstantDialog; this.ConstantDialog = !this.ConstantDialog;
this.form = {}; this.form = this.showDataFunc();
let q = {};
let obj = cell.value.attributes; setTimeout(() => {
for (let vel in obj) { this.$refs.Constant.clickFun(this.graph,this.form); //向子组件传递画布
let key = obj[vel]; }, 500);
q[key.name] = key.value;
}
q.data = JSON.parse(q.data);
q.fields = JSON.parse(q.fields);
this.form = q;
return; return;
} else if ( } else if (
(this.curFileType == "transformation" && cell.ids == "step4") || (this.curFileType == "transformation" && cell.ids == "step4") ||
cell.value.attributes.ctype.value == "RandomValue" cell.value.attributes.ctype.value == "RandomValue"
) { ) {
this.RandomValueDialog = !this.RandomValueDialog; this.RandomValueDialog = !this.RandomValueDialog;
this.form = {}; this.form = this.showDataFunc();
let q = {}; setTimeout(() => {
let obj = cell.value.attributes; this.$refs.RandomValue.clickFun(this.graph,this.form); //向子组件传递画布
for (let vel in obj) { }, 500);
let key = obj[vel];
q[key.name] = key.value;
}
q.fields = JSON.parse(q.fields);
this.form = q;
return; return;
} else if ( } else if (
(this.curFileType == "transformation" && cell.ids == "step3") || (this.curFileType == "transformation" && cell.ids == "step3") ||
cell.value.attributes.ctype.value == "RowGenerator" cell.value.attributes.ctype.value == "RowGenerator"
) { ) {
this.RowGeneratorDialog = !this.RowGeneratorDialog; this.RowGeneratorDialog = !this.RowGeneratorDialog;
this.form = {}; this.form = this.showDataFunc();
let q = {}; setTimeout(() => {
let obj = cell.value.attributes; this.$refs.RowGenerator.clickFun(this.graph,this.form);
for (let vel in obj) { }, 500);
let key = obj[vel];
q[key.name] = key.value;
}
q.fields = JSON.parse(q.fields);
this.form = q;
return; return;
} else if ( } else if (
(this.curFileType == "transformation" && cell.ids == "step2") || (this.curFileType == "transformation" && cell.ids == "step2") ||
cell.value.attributes.ctype.value == "TextFileInput" cell.value.attributes.ctype.value == "TextFileInput"
) { ) {
this.TextFileInputDialog = !this.TextFileInputDialog; this.TextFileInputDialog = !this.TextFileInputDialog;
this.form = {}; this.form = this.showDataFunc();
let q = {};
let obj = cell.value.attributes;
for (let vel in obj) {
let key = obj[vel];
q[key.name] = key.value;
}
console.log(q.fileNameStore, "sghywkglaslkhygslu");
q.fileNameStore = JSON.parse(q.fileNameStore);
q.inputFields = JSON.parse(q.inputFields);
q.filter = JSON.parse(q.filter);
this.form = q;
setTimeout(() => { setTimeout(() => {
this.$refs.TextFileInputDialog.clickFun(this.graph); this.$refs.TextFileInput.clickFun(this.graph,this.form);
}, 500); }, 500);
return; return;
} else if ( } else if (
...@@ -2610,7 +2442,7 @@ export default { ...@@ -2610,7 +2442,7 @@ export default {
q[key.name] = key.value; q[key.name] = key.value;
} }
return this.form = q; return q;
}, },
addCell(toolItem, x, y) { addCell(toolItem, x, y) {
......
...@@ -1209,17 +1209,22 @@ props: ["dragItem"], ...@@ -1209,17 +1209,22 @@ props: ["dragItem"],
}, },
// 新建任务 // 新建任务
createJob(){ createJob(){
if(this.curNodeIconCls =='imageFolder'){
this.estabDialogVisible=true; this.estabDialogVisible=true;
this.estabTitle='任务'; this.estabTitle='任务';
}else{
this.$message.error('请选择资源库中的一个目录');
}
}, },
// 新建目录 // 新建目录
createFile(){ createFile(){
if(this.curNodeIconCls =='imageFolder'){
this.estabDialogVisible=true; this.estabDialogVisible=true;
this.estabTitle='目录'; this.estabTitle='目录';
}else{
this.$message.error('请选择资源库中的一个目录');
}
}, },
// 删除资源库文件 // 删除资源库文件
...@@ -1252,7 +1257,6 @@ props: ["dragItem"], ...@@ -1252,7 +1257,6 @@ props: ["dragItem"],
this.curNode=node;//当前选中节点 this.curNode=node;//当前选中节点
this.nodePath=data.path;//当前选择数 this.nodePath=data.path;//当前选择数
this.curNodeIconCls=node.data.iconCls; this.curNodeIconCls=node.data.iconCls;
console.log('当前节点的文件夹路径:',this.nodePath); console.log('当前节点的文件夹路径:',this.nodePath);
if(node.data.leaf){ if(node.data.leaf){
this.curNodeText=node.data.text;//当前节点 this.curNodeText=node.data.text;//当前节点
...@@ -1266,12 +1270,12 @@ props: ["dragItem"], ...@@ -1266,12 +1270,12 @@ props: ["dragItem"],
// this.tabShowFlag=true;//核心对象显项卡显示 // this.tabShowFlag=true;//核心对象显项卡显示
//mxl判断作业和转换---------------------- //mxl判断作业和转换----------------------
if(node.data.type=="transformation"){
this.$refs.nodeMenu2.stepsFun(); this.$refs.nodeMenu2.stepsFun();
let that=this; let that=this;
setTimeout(function(){ setTimeout(function(){
that.$refs.graphContainer.initGraphClick("transformation"); that.$refs.graphContainer.initGraphClick("transformation");
},500) },500)
})
}else if(node.data.type=="job"){ }else if(node.data.type=="job"){
this.$refs.nodeMenu2.jobentrysFun(); this.$refs.nodeMenu2.jobentrysFun();
let that=this; let that=this;
...@@ -1293,16 +1297,16 @@ props: ["dragItem"], ...@@ -1293,16 +1297,16 @@ props: ["dragItem"],
})
}
// else{ // else{
// this.$message.error('请选择一个资源库!'); // this.$message.error('请选择一个资源库!');
// return; // return;
// } // }
// console.log(data,'当前节点的父节点:',node.parent.data); // console.log(data,'当前节点的父节点:',node.parent.data);
}, },
//修改资源库 //修改资源库
...@@ -1337,7 +1341,7 @@ props: ["dragItem"], ...@@ -1337,7 +1341,7 @@ props: ["dragItem"],
console.log('导出资源库===='); console.log('导出资源库====');
this.exportDialogVisible=true; this.exportDialogVisible=true;
}, },
// 导入资源库弹窗 // 导入资源库弹窗
importTreeDialog(){ importTreeDialog(){
console.log('导入资源库===='); console.log('导入资源库====');
......
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