Commit 582d0eb8 by 李耀琨

gg

parent febcd04a
...@@ -8,58 +8,55 @@ ...@@ -8,58 +8,55 @@
> >
<el-tabs type="border-card"> <el-tabs type="border-card">
<el-tab-pane label="转换"> <el-tab-pane label="转换">
<el-form :model="conversionForm" label-width="160px"> <el-form :model="form" label-width="160px">
<el-form-item label="转换名称"> <el-form-item label="转换名称">
<el-input v-model="conversionForm.name"></el-input> <el-input v-model="form.name"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="转换文件"> <el-form-item label="转换文件">
<el-input v-model="conversionForm.fileName"></el-input> <el-input v-model="form.fileName"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="描述"> <el-form-item label="描述">
<el-input v-model="conversionForm.description"></el-input> <el-input v-model="form.description"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="扩展描述"> <el-form-item label="扩展描述">
<el-input <el-input
type="textarea" type="textarea"
v-model="conversionForm.extended_description" v-model="form.extended_description"
:rows="5" :rows="5"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="状态"> <el-form-item label="状态">
<el-select <el-select v-model="form.trans_status" style="width: 100%">
v-model="conversionForm.trans_status"
style="width: 100%"
>
<el-option label="草案" value="shanghai"></el-option> <el-option label="草案" value="shanghai"></el-option>
<el-option label="产品" value="beijing"></el-option> <el-option label="产品" value="beijing"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="版本"> <el-form-item label="版本">
<el-input v-model="conversionForm.trans_version"></el-input> <el-input v-model="form.trans_version"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="目录"> <el-form-item label="目录">
<el-input v-model="conversionForm.directory"></el-input> <el-input v-model="form.directory"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="创建者"> <el-form-item label="创建者">
<el-input v-model="conversionForm.created_user"></el-input> <el-input v-model="form.created_user"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="创建时间"> <el-form-item label="创建时间">
<el-input v-model="conversionForm.created_date"></el-input> <el-input v-model="form.created_date"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="最近修改者"> <el-form-item label="最近修改者">
<el-input v-model="conversionForm.modified_user"></el-input> <el-input v-model="form.modified_user"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="最近修改日期"> <el-form-item label="最近修改日期">
<el-input v-model="conversionForm.modified_date"></el-input> <el-input v-model="form.modified_date"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-tab-pane> </el-tab-pane>
...@@ -70,7 +67,8 @@ ...@@ -70,7 +67,8 @@
<el-table :data="fields" style="width: 100%"> <el-table :data="fields" style="width: 100%">
<el-table-column prop="name" label="命名参数"> </el-table-column> <el-table-column prop="name" label="命名参数"> </el-table-column>
<el-table-column prop="default_value" label="默认值"> </el-table-column> <el-table-column prop="default_value" label="默认值">
</el-table-column>
<el-table-column prop="description" label="描述"> </el-table-column> <el-table-column prop="description" label="描述"> </el-table-column>
...@@ -96,7 +94,19 @@ ...@@ -96,7 +94,19 @@
<div> <div>
<div class="leftDiv"> <div class="leftDiv">
<ul> <ul>
<li class="list" v-for="item in liList" :key="item.id" @click="switchJournal(item)" style="cursor:pointer" :class="{'hover': switchState == item.id,'checked': switchState == item.id}">{{ item.name }}</li> <li
class="list"
v-for="item in liList"
:key="item.id"
@click="switchJournal(item)"
style="cursor: pointer"
:class="{
hover: switchState == item.id,
checked: switchState == item.id,
}"
>
{{ item.name }}
</li>
</ul> </ul>
</div> </div>
...@@ -109,7 +119,9 @@ ...@@ -109,7 +119,9 @@
<el-input v-model="logEntry.connection"></el-input> <el-input v-model="logEntry.connection"></el-input>
</el-col> </el-col>
<el-col class="line" :span="2"> <el-col class="line" :span="2">
<el-button type="primary" @click="metadata(true)">浏览</el-button> <el-button type="primary" @click="metadata(true)"
>浏览</el-button
>
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
...@@ -119,13 +131,19 @@ ...@@ -119,13 +131,19 @@
<el-form-item label="日志表:"> <el-form-item label="日志表:">
<el-input v-model="logEntry.table"></el-input> <el-input v-model="logEntry.table"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="日志记录间隔时间(秒):" v-if="this.switchState == 1 || this.switchState == 3"> <el-form-item
label="日志记录间隔时间(秒):"
v-if="this.switchState == 1 || this.switchState == 3"
>
<el-input v-model="logEntry.size_limit_lines"></el-input> <el-input v-model="logEntry.size_limit_lines"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="日志记录过时时间(天):"> <el-form-item label="日志记录过时时间(天):">
<el-input v-model="logEntry.interval"></el-input> <el-input v-model="logEntry.interval"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="在内存中保存的日志行数限制:" v-if="this.switchState == 1"> <el-form-item
label="在内存中保存的日志行数限制:"
v-if="this.switchState == 1"
>
<el-input v-model="logEntry.timeout_days"></el-input> <el-input v-model="logEntry.timeout_days"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -133,20 +151,32 @@ ...@@ -133,20 +151,32 @@
<div class="lowerRight"> <div class="lowerRight">
<el-table <el-table
:data="tableData" :data="tableData"
height=" 250 " height="250"
border border
style="width: 100%" style="width: 100%"
:row-style="{ height: '10px' }" :row-style="{ height: '10px' }"
:cell-style="{ height: '10px' }" :cell-style="{ height: '10px' }"
> >
<el-table-column prop="enabled" label="启用"> </el-table-column> <el-table-column prop="enabled" label="启用">
<el-table-column prop="name" label="字段名称"> </el-table-column> <template slot-scope="scope">
<el-table-column prop="subject" label="步骤名称" v-if="this.switchState == 1"></el-table-column> {{ scope.row.enabled? "true" : "false" }}
<el-table-column prop="description" label="字段描述"></el-table-column> </template>
</el-table-column>
<el-table-column column prop="name" label="字段名称">
</el-table-column>
<el-table-column
prop="subject"
label="步骤名称"
v-if="this.switchState == 1"
></el-table-column>
<el-table-column
prop="description"
label="字段描述"
></el-table-column>
<el-table-column label="操作" width="60"> <el-table-column label="操作" width="60">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@click="liListClick(false, scope.row)" @click="liListClick(scope.row)"
type="text" type="text"
size="small" size="small"
>编辑</el-button >编辑</el-button
...@@ -159,21 +189,21 @@ ...@@ -159,21 +189,21 @@
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="日期"> <el-tab-pane label="日期">
<el-form :model="conversionForm" label-width="160px"> <el-form :model="form" label-width="160px">
<el-form-item label="最大日期数据库连接:"> <el-form-item label="最大日期数据库连接:">
<el-input v-model="conversionForm.table"></el-input> <el-input v-model="form.table"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="最大日期表:"> <el-form-item label="最大日期表:">
<el-input v-model="conversionForm.field"></el-input> <el-input v-model="form.field"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="最大日期字段:"> <el-form-item label="最大日期字段:">
<el-input v-model="conversionForm.offset"></el-input> <el-input v-model="form.offset"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="最大日期偏移(秒):"> <el-form-item label="最大日期偏移(秒):">
<el-input v-model="conversionForm.maxdiff"></el-input> <el-input v-model="form.maxdiff"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="最大日期区别(秒):"> <el-form-item label="最大日期区别(秒):">
<el-input v-model="conversionForm.maxdate"></el-input> <el-input v-model="form.maxdate"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-tab-pane> </el-tab-pane>
...@@ -206,60 +236,64 @@ ...@@ -206,60 +236,64 @@
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="杂项"> <el-tab-pane label="杂项">
<el-form :model="conversionForm" label-width="230px"> <el-form :model="form" label-width="230px">
<el-form-item label="记录集合里的记录数:"> <el-form-item label="记录集合里的记录数:">
<el-input v-model="conversionForm.size_rowset"></el-input> <el-input v-model="form.size_rowset"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="转换时是否在日志中记录反馈行?:"> <el-form-item label="转换时是否在日志中记录反馈行?:">
<el-checkbox <el-checkbox
v-model="conversionForm.feedback_shown" v-model="form.feedback_shown"
true-label="Y" true-label="Y"
false-label="N" false-label="N"
></el-checkbox> ></el-checkbox>
</el-form-item> </el-form-item>
<el-form-item label="每个反馈行的处理记录数:"> <el-form-item label="每个反馈行的处理记录数:">
<el-input v-model="conversionForm.feedback_size"></el-input> <el-input v-model="form.feedback_size"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="使用唯一连接:"> <el-form-item label="使用唯一连接:">
<el-checkbox <el-checkbox
v-model="conversionForm.unique_connections" v-model="form.unique_connections"
true-label="Y" true-label="Y"
false-label="N" false-label="N"
></el-checkbox> ></el-checkbox>
</el-form-item> </el-form-item>
<el-form-item label="共享对象文件:"> <el-form-item label="共享对象文件:">
<el-input v-model="conversionForm.shared_objects_file"></el-input> <el-input v-model="form.shared_objects_file"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="管理线程优先级:"> <el-form-item label="管理线程优先级:">
<el-checkbox <el-checkbox
v-model="conversionForm.using_thread_priorities" v-model="form.using_thread_priorities"
true-label="Y" true-label="Y"
false-label="N" false-label="N"
></el-checkbox> ></el-checkbox>
</el-form-item> </el-form-item>
<el-form-item label="转换引擎类型:"> <el-form-item label="转换引擎类型:">
<el-input v-model="conversionForm.trans_type"></el-input> <el-input v-model="form.trans_type"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="监控"> <el-tab-pane label="监控">
<el-form :model="conversionForm" label-width="180px"> <el-form :model="form" label-width="180px">
<el-form-item label="开启步骤性能监控?:"> <el-form-item label="开启步骤性能监控?:">
<el-checkbox <el-checkbox
v-model="conversionForm.capture_step_performance" v-model="form.capture_step_performance"
true-label="Y" true-label="Y"
false-label="N" false-label="N"
></el-checkbox> ></el-checkbox>
</el-form-item> </el-form-item>
<el-form-item label="步骤性能监测间隔(毫秒):"> <el-form-item label="步骤性能监测间隔(毫秒):">
<el-input v-model="conversionForm.step_performance_capturing_delay"></el-input> <el-input
v-model="form.step_performance_capturing_delay"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="内存中最大的快照数量:"> <el-form-item label="内存中最大的快照数量:">
<el-input v-model="conversionForm.step_performance_capturing_size_limit"></el-input> <el-input
v-model="form.step_performance_capturing_size_limit"
></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-tab-pane> </el-tab-pane>
...@@ -272,15 +306,53 @@ ...@@ -272,15 +306,53 @@
> >
</span> </span>
</el-dialog> </el-dialog>
<el-dialog
title="编辑"
:visible.sync="dialogVisible"
width="500px"
:before-close="handleCloseFun">
<el-form :model="determination" label-width="80px">
<el-form-item label="启用">
<el-select v-model="determination.enabled" >
<el-option label="true" :value="ree"></el-option>
<el-option label="false" :value="err"></el-option>
</el-select>
</el-form-item>
<el-form-item label="字段名称">
<el-input v-model="determination.name"></el-input>
</el-form-item>
<el-form-item label="步骤名称">
<el-input v-model="determination.subject"></el-input>
</el-form-item>
<el-form-item label="字段描述">
<el-input v-model="determination.description"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="dialogVisibleFun">确 定</el-button>
</span>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
props: ["conversionSettingsDialog"], props: ["conversionSettingsDialog", "doubleClickCell", "form"],
data() { data() {
return { return {
conversionForm: {},
fields: [], fields: [],
liList: [ liList: [
{ {
...@@ -305,53 +377,77 @@ export default { ...@@ -305,53 +377,77 @@ export default {
}, },
], ],
logEntry: {}, logEntry: {},
tableData: [ tableData: [],
{ switchState: 1,
date: "2016-05-03", dialogVisible:false,
name: "王小虎", determination:{},
address: "上海市普陀区金沙江路 1518 弄", err:false,
}, ree:true,
{ };
date: "2016-05-02",
name: "王小虎",
address: "上海市普陀区金沙江路 1518 弄",
},
{
date: "2016-05-04",
name: "王小虎",
address: "上海市普陀区金沙江路 1518 弄",
},
{
date: "2016-05-01",
name: "王小虎",
address: "上海市普陀区金沙江路 1518 弄",
}, },
{ created() {},
date: "2016-05-08", methods: {
name: "王小虎", clickFun(graph, val) {
address: "上海市普陀区金沙江路 1518 弄", this.newGraph = graph;
console.log(val);
}, },
{
date: "2016-05-06", handleCloseFun(){
name: "王小虎", this.dialogVisible = !this.dialogVisible
address: "上海市普陀区金沙江路 1518 弄", if (this.dialogVisible) {
}
}, },
{
date: "2016-05-07", dialogVisibleFun(){
name: "王小虎", this.dialogVisible = !this.dialogVisible
address: "上海市普陀区金沙江路 1518 弄",
}, },
], liListClick(val){
switchState:1, this.dialogVisible = !this.dialogVisible
}; console.log(val);
this.determination = val
}, },
created() {},
methods: {
switchJournal(val){ switchJournal(val) {
this.switchState = val.id this.switchState = val.id;
console.log(val); console.log(val);
if (this.switchState == 1) {
console.log(JSON.parse(this.form.transLogTable).fields);
this.tableData = JSON.parse(this.form.transLogTable).fields;
for (let i = 0; i < this.tableData.length; i++) {
this.tableData[i].description = decodeURIComponent(this.tableData[i].description)
console.log(this.tableData[i].description);
}
} else if (this.switchState == 2) {
console.log(JSON.parse(this.form.stepLogTable));
this.tableData = JSON.parse(this.form.stepLogTable).fields;
for (let i = 0; i < this.tableData.length; i++) {
this.tableData[i].description = decodeURIComponent(this.tableData[i].description)
console.log(this.tableData[i].description);
}
} else if (this.switchState == 3) {
console.log(JSON.parse(this.form.performanceLogTable));
this.tableData = JSON.parse(this.form.performanceLogTable).fields;
for (let i = 0; i < this.tableData.length; i++) {
this.tableData[i].description = decodeURIComponent(this.tableData[i].description)
console.log(this.tableData[i].description);
}
} else if (this.switchState == 4) {
console.log(JSON.parse(this.form.channelLogTable));
this.tableData = JSON.parse(this.form.channelLogTable).fields;
for (let i = 0; i < this.tableData.length; i++) {
this.tableData[i].description = decodeURIComponent(this.tableData[i].description)
console.log(this.tableData[i].description);
}
} else if (this.switchState == 5) {
console.log(JSON.parse(this.form.metricsLogTable));
this.tableData = JSON.parse(this.form.metricsLogTable).fields;
for (let i = 0; i < this.tableData.length; i++) {
this.tableData[i].description = decodeURIComponent(this.tableData[i].description)
console.log(this.tableData[i].description);
}
}
}, },
handleClose() { handleClose() {
this.$emit("update:conversionSettingsDialog", false); this.$emit("update:conversionSettingsDialog", false);
...@@ -374,15 +470,15 @@ export default { ...@@ -374,15 +470,15 @@ export default {
padding: 10px; padding: 10px;
} }
.list.hover{ .list.hover {
cursor: pointer; cursor: pointer;
background-color: #EEEEEE; background-color: #eeeeee;
} }
.list.checked{ .list.checked {
background-color:#4e9df8; background-color: #4e9df8;
color: #fff; color: #fff;
} }
.rightDiv { .rightDiv {
width: 550px; width: 550px;
height: 400px; height: 400px;
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</el-col> </el-col>
<el-col class="line" :span="2"> <el-col class="line" :span="2">
<el-button size="mini">浏览</el-button> <el-button size="mini" @click="filePathSelection = true">浏览</el-button>
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
...@@ -166,15 +166,14 @@ ...@@ -166,15 +166,14 @@
height=" 250 " height=" 250 "
border border
style="width: 100%" style="width: 100%"
:row-style="{ height: '10px' }"
:cell-style="{ height: '10px' }"
> >
<el-table-column prop="parent" label="原字段名"> <el-table-column prop="parent" label="原字段名">
</el-table-column> </el-table-column>
<el-table-column prop="child" label="要映射成的字段名"> <el-table-column prop="child" label="要映射成的字段名">
</el-table-column> </el-table-column>
<el-table-column label="操作" width="120"> <el-table-column label="操作" width="90">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@click="addInputField(false, scope.row)" @click="addInputField(false, scope.row)"
...@@ -193,12 +192,21 @@ ...@@ -193,12 +192,21 @@
</el-table> </el-table>
<el-form :model="form"> <el-form :model="form">
<el-form-item> <el-form-item>
<el-row :gutter="10">
<el-col :span="19">
<el-checkbox <el-checkbox
v-model="form.rename_on_output" v-model="form.rename_on_output"
true-label="Y" true-label="Y"
false-label="N" false-label="N"
></el-checkbox> ></el-checkbox>
输出时字段名再重新映射回原来输入时的名字? 输出时字段名再重新映射回原来输入时的名字?
</el-col>
<el-col :span="4">
<el-button>字段映射...</el-button>
</el-col>
</el-row>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
...@@ -315,7 +323,7 @@ ...@@ -315,7 +323,7 @@
<el-table-column prop="child" label="要映射成的字段名"> <el-table-column prop="child" label="要映射成的字段名">
</el-table-column> </el-table-column>
<el-table-column label="操作" width="60"> <el-table-column label="操作" width="90">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@click="addOutputField(false, scope.row)" @click="addOutputField(false, scope.row)"
...@@ -406,6 +414,29 @@ ...@@ -406,6 +414,29 @@
<el-button type="primary" @click="addoutputBoxFun">确 定</el-button> <el-button type="primary" @click="addoutputBoxFun">确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
<!-- 文件浏览器-->
<el-dialog
title="文件浏览器"
:visible.sync="filePathSelection"
width="500px"
:before-close="handleClose"
:modal="false"
>
<browseFiles :disabed="true" v-on:route="route"></browseFiles>
<span slot="footer" class="dialog-footer">
<el-button @click="filePathSelection = false">取 消</el-button>
<el-button type="primary" @click="addFilePathSelection"
>确 定</el-button
>
</span>
</el-dialog>
</div> </div>
</template> </template>
...@@ -446,6 +477,7 @@ export default { ...@@ -446,6 +477,7 @@ export default {
connectionNode: [], connectionNode: [],
tableData: [], tableData: [],
newGraph: [], newGraph: [],
filePathSelection:false,
metadataBox: false, metadataBox: false,
selectModifyBox: false, selectModifyBox: false,
inputBox: false, inputBox: false,
...@@ -472,6 +504,7 @@ export default { ...@@ -472,6 +504,7 @@ export default {
inputState: 1, inputState: 1,
mappings: {}, mappings: {},
inherit: "Y", inherit: "Y",
localPath:{},
}; };
}, },
...@@ -541,6 +574,19 @@ export default { ...@@ -541,6 +574,19 @@ export default {
} }
}, },
route(flowData){
this.localPath.fileName = flowData.name
console.log(this.localPath);
},
addFilePathSelection(){
this.filePathSelection = !this.filePathSelection
this.form.directory = this.localPath.fileName
},
inputSelection(val, index) { inputSelection(val, index) {
this.inputIndex = index; this.inputIndex = index;
console.log(val); console.log(val);
......
...@@ -742,11 +742,8 @@ ...@@ -742,11 +742,8 @@
> >
</getSystemInformation> </getSystemInformation>
<!-- 自定义常量数据--> <!-- 自定义常量数据-->
<customConstant <customConstant
ref="Constant" ref="Constant"
:disabled="true" :disabled="true"
...@@ -757,7 +754,6 @@ ...@@ -757,7 +754,6 @@
> >
</customConstant> </customConstant>
<!-- 生成随机数--> <!-- 生成随机数-->
<!-- <el-dialog <!-- <el-dialog
title="生成随机数" title="生成随机数"
...@@ -765,11 +761,13 @@ ...@@ -765,11 +761,13 @@
width="800px" width="800px"
:before-close="handleClose" :before-close="handleClose"
> --> > -->
<randomNumber ref="RandomValue" <randomNumber
ref="RandomValue"
:disabled="true" :disabled="true"
:form="form" :form="form"
:RandomValueDialog.sync="RandomValueDialog" :RandomValueDialog.sync="RandomValueDialog"
:saveOutputDialog="saveOutputDialog"> :saveOutputDialog="saveOutputDialog"
>
</randomNumber> </randomNumber>
<!-- <span slot="footer" class="dialog-footer"> <!-- <span slot="footer" class="dialog-footer">
...@@ -791,8 +789,6 @@ ...@@ -791,8 +789,6 @@
:saveOutputDialog="saveOutputDialog" :saveOutputDialog="saveOutputDialog"
></generatingRecords> ></generatingRecords>
<!-- 文本文件输入--> <!-- 文本文件输入-->
<textFileInput <textFileInput
...@@ -805,8 +801,6 @@ ...@@ -805,8 +801,6 @@
:saveOutputDialog="saveOutputDialog" :saveOutputDialog="saveOutputDialog"
></textFileInput> ></textFileInput>
<!-- 排序记录--> <!-- 排序记录-->
<sortRecord <sortRecord
...@@ -818,7 +812,6 @@ ...@@ -818,7 +812,6 @@
:saveOutputDialog="saveOutputDialog" :saveOutputDialog="saveOutputDialog"
></sortRecord> ></sortRecord>
<!-- 设置变量--> <!-- 设置变量-->
<setVariable <setVariable
...@@ -830,7 +823,6 @@ ...@@ -830,7 +823,6 @@
:saveOutputDialog="saveOutputDialog" :saveOutputDialog="saveOutputDialog"
></setVariable> ></setVariable>
<!-- 获取变量--> <!-- 获取变量-->
<getVariable <getVariable
...@@ -842,8 +834,6 @@ ...@@ -842,8 +834,6 @@
:saveOutputDialog="saveOutputDialog" :saveOutputDialog="saveOutputDialog"
></getVariable> ></getVariable>
<!-- 合并记录--> <!-- 合并记录-->
<mergeRecords <mergeRecords
...@@ -855,18 +845,14 @@ ...@@ -855,18 +845,14 @@
:saveOutputDialog="saveOutputDialog" :saveOutputDialog="saveOutputDialog"
></mergeRecords> ></mergeRecords>
<!-- 改变开始复制的数量 -->
<!-- 改变开始复制的数量 -->
<el-dialog <el-dialog
title="改变开始复制的数量" title="改变开始复制的数量"
:visible.sync="copyNumber" :visible.sync="copyNumber"
width="300px" width="300px"
:before-close="handleClose" :before-close="handleClose"
> >
<el-form ref="form" :model="form" > <el-form ref="form" :model="form">
<el-form-item label="复制的数量(1或跟多):"> <el-form-item label="复制的数量(1或跟多):">
<el-input v-model="form.copies"></el-input> <el-input v-model="form.copies"></el-input>
</el-form-item> </el-form-item>
...@@ -888,7 +874,7 @@ ...@@ -888,7 +874,7 @@
:saveOutputDialog="saveOutputDialog" :saveOutputDialog="saveOutputDialog"
></selectField> ></selectField>
<!-- 去除重复 --> <!-- 去除重复 -->
<toRepeat <toRepeat
ref="toRepeat" ref="toRepeat"
:disabed="true" :disabed="true"
...@@ -898,10 +884,8 @@ ...@@ -898,10 +884,8 @@
:saveOutputDialog="saveOutputDialog" :saveOutputDialog="saveOutputDialog"
></toRepeat> ></toRepeat>
<!-- 映射(子转换) -->
<mapping
<!-- 映射(子转换) -->
<mapping
ref="mapping" ref="mapping"
:disabed="true" :disabed="true"
:form="form" :form="form"
...@@ -909,7 +893,7 @@ ...@@ -909,7 +893,7 @@
:mappingDialog.sync="mappingDialog" :mappingDialog.sync="mappingDialog"
:saveOutputDialog="saveOutputDialog" :saveOutputDialog="saveOutputDialog"
></mapping> ></mapping>
<!-- 映射输入 --> <!-- 映射输入 -->
<mappingInput <mappingInput
ref="mappingInput" ref="mappingInput"
:disabed="true" :disabed="true"
...@@ -918,7 +902,7 @@ ...@@ -918,7 +902,7 @@
:mappingInputDialog.sync="mappingInputDialog" :mappingInputDialog.sync="mappingInputDialog"
:saveOutputDialog="saveOutputDialog" :saveOutputDialog="saveOutputDialog"
></mappingInput> ></mappingInput>
<!-- 映射输出 --> <!-- 映射输出 -->
<mappingOutput <mappingOutput
ref="mappingOutput" ref="mappingOutput"
:disabed="true" :disabed="true"
...@@ -937,7 +921,6 @@ ...@@ -937,7 +921,6 @@
:saveOutputDialog="saveOutputDialog" :saveOutputDialog="saveOutputDialog"
></nullOperation> ></nullOperation>
<!-- Get data from XML --> <!-- Get data from XML -->
<xmlFileInput <xmlFileInput
ref="xmlFileInput" ref="xmlFileInput"
...@@ -950,12 +933,14 @@ ...@@ -950,12 +933,14 @@
<!-- 转换属性设置 --> <!-- 转换属性设置 -->
<conversionSettings <conversionSettings
ref="conversionSettings" ref="conversionSettings"
:form="form"
:conversionSettingsDialog.sync="conversionSettingsDialog" :conversionSettingsDialog.sync="conversionSettingsDialog"
:doubleClickCell="doubleClickCell" :doubleClickCell="doubleClickCell"
></conversionSettings> ></conversionSettings>
<!-- 作业属性设置 --> <!-- 作业属性设置 -->
<jobSettings <jobSettings
ref="jobSettings" ref="jobSettings"
:form="form"
:jobSettingsDialog.sync="jobSettingsDialog" :jobSettingsDialog.sync="jobSettingsDialog"
:doubleClickCell="doubleClickCell" :doubleClickCell="doubleClickCell"
></jobSettings> ></jobSettings>
...@@ -974,7 +959,7 @@ ...@@ -974,7 +959,7 @@
:groupingDialog.sync="groupingDialog" :groupingDialog.sync="groupingDialog"
:doubleClickCell="doubleClickCell" :doubleClickCell="doubleClickCell"
></grouping> ></grouping>
<!-- 流查询 --> <!-- 流查询 -->
<streamQuery <streamQuery
ref="streamQuery" ref="streamQuery"
:form="form" :form="form"
...@@ -990,8 +975,6 @@ ...@@ -990,8 +975,6 @@
:doubleClickCell="doubleClickCell" :doubleClickCell="doubleClickCell"
></sendMail> ></sendMail>
<!-- 文件浏览器--> <!-- 文件浏览器-->
<el-dialog <el-dialog
title="文件浏览器" title="文件浏览器"
...@@ -1145,8 +1128,6 @@ ...@@ -1145,8 +1128,6 @@
></columnChoose> --> ></columnChoose> -->
<!-- 转换弹窗组件end --> <!-- 转换弹窗组件end -->
<!-- 执行转换开始 --> <!-- 执行转换开始 -->
<trans-graph <trans-graph
ref="transRef" ref="transRef"
...@@ -1171,11 +1152,6 @@ ...@@ -1171,11 +1152,6 @@
></job-run> ></job-run>
<!-- 执行作业结束 --> <!-- 执行作业结束 -->
<!-- 数据浏览--> <!-- 数据浏览-->
<el-dialog <el-dialog
title="数据浏览" title="数据浏览"
...@@ -1240,22 +1216,20 @@ import setVariable from "../appBulletFrame/setVariable"; //设置变量 ...@@ -1240,22 +1216,20 @@ import setVariable from "../appBulletFrame/setVariable"; //设置变量
import getVariable from "../appBulletFrame/getVariable"; //获取变量 import getVariable from "../appBulletFrame/getVariable"; //获取变量
import mergeRecords from "../appBulletFrame/mergeRecords"; //合并记录 import mergeRecords from "../appBulletFrame/mergeRecords"; //合并记录
import selectField from "../appBulletFrame/selectField"; //选择字段 import selectField from "../appBulletFrame/selectField"; //选择字段
import toRepeat from "../appBulletFrame/toRepeat" //去除重复 import toRepeat from "../appBulletFrame/toRepeat"; //去除重复
import mapping from "../appBulletFrame/mapping" //映射(子转换) import mapping from "../appBulletFrame/mapping"; //映射(子转换)
import mappingInput from "../appBulletFrame/mappingInput" //映射输入 import mappingInput from "../appBulletFrame/mappingInput"; //映射输入
import mappingOutput from "../appBulletFrame/mappingOutput" //映射输出 import mappingOutput from "../appBulletFrame/mappingOutput"; //映射输出
import xmlFileInput from "../appBulletFrame/xmlFileInput" //xml文件输入 import xmlFileInput from "../appBulletFrame/xmlFileInput"; //xml文件输入
import nullOperation from "../appBulletFrame/nullOperation" //空操作 import nullOperation from "../appBulletFrame/nullOperation"; //空操作
import conversionSettings from "../appBulletFrame/conversionSettings"; //转换设置
import jobSettings from "../appBulletFrame/jobSettings"; //作业设置
import importXmlFile from "../appBulletFrame/importXmlFile"; //导出资源库到XML文件
import conversionSettings from "../appBulletFrame/conversionSettings" //转换设置 import grouping from "../appBulletFrame/grouping"; //分组
import jobSettings from "../appBulletFrame/jobSettings" //作业设置 import streamQuery from "../appBulletFrame/streamQuery"; //流查询
import sendMail from "../appBulletFrame/sendMail"; //发送邮件
import importXmlFile from "../appBulletFrame/importXmlFile" //导出资源库到XML文件
import grouping from "../appBulletFrame/grouping"//分组
import streamQuery from "../appBulletFrame/streamQuery"//流查询
import sendMail from "../appBulletFrame/sendMail"//发送邮件
// 作业弹窗组件开始--------------------------------------- // 作业弹窗组件开始---------------------------------------
import trans from "../../../job-dialog/trans"; import trans from "../../../job-dialog/trans";
...@@ -1304,7 +1278,7 @@ export default { ...@@ -1304,7 +1278,7 @@ export default {
props: ["blankCanvas"], //从父组件传过来的值 props: ["blankCanvas"], //从父组件传过来的值
data() { data() {
return { return {
copyNumber:false,//复制数量 copyNumber: false, //复制数量
jobRunVisible: false, //作业转换弹窗 jobRunVisible: false, //作业转换弹窗
serverDialogVisible: false, //子服务器弹窗 serverDialogVisible: false, //子服务器弹窗
curFileType: "transformation", //当前点击的文件的类型,默认是转换文件--mxl curFileType: "transformation", //当前点击的文件的类型,默认是转换文件--mxl
...@@ -1330,10 +1304,10 @@ export default { ...@@ -1330,10 +1304,10 @@ export default {
outPutFormData: {}, //输出弹窗组件的表单值 outPutFormData: {}, //输出弹窗组件的表单值
// 转换33start--------- // 转换33start---------
// 转换3end------------ // 转换3end------------
outPutFormData16:{},//脚本--执行sql脚本 outPutFormData16: {}, //脚本--执行sql脚本
doubleClickCell:{}, doubleClickCell: {},
getField:[], getField: [],
transGraphVisible:false,//执行转换弹窗 transGraphVisible: false, //执行转换弹窗
monitorCanvas: "", //监听画布 monitorCanvas: "", //监听画布
getXmlVal: "", //获取上一个xml getXmlVal: "", //获取上一个xml
keyHandler: null, keyHandler: null,
...@@ -1342,7 +1316,7 @@ export default { ...@@ -1342,7 +1316,7 @@ export default {
xmlDocuments: "", //获取解码的xml xmlDocuments: "", //获取解码的xml
boxInformation: "", //弹框信息 boxInformation: "", //弹框信息
toolItemData: {}, //新增节点时的值 toolItemData: {}, //新增节点时的值
doubleClickCell:{}, //双击节点 doubleClickCell: {}, //双击节点
filter: {}, filter: {},
// mxl================================= // mxl=================================
...@@ -1370,23 +1344,23 @@ export default { ...@@ -1370,23 +1344,23 @@ export default {
setVariableDialog: false, //设置变量 setVariableDialog: false, //设置变量
getVariableDialog: false, //获取变量 getVariableDialog: false, //获取变量
mergeRecordsDialog: false, //合并记录 mergeRecordsDialog: false, //合并记录
selectFieldDialog:false,//选择字段 selectFieldDialog: false, //选择字段
conversionSettingsDialog:false,//转换设置 conversionSettingsDialog: false, //转换设置
jobSettingsDialog:false,//作业设置 jobSettingsDialog: false, //作业设置
toRepeatDialog:false,//去除重复 toRepeatDialog: false, //去除重复
mappingDialog:false,//映射(子转换) mappingDialog: false, //映射(子转换)
mappingInputDialog:false,//映射输入 mappingInputDialog: false, //映射输入
mappingOutputDialog:false,//映射输出 mappingOutputDialog: false, //映射输出
nullOperationDialog:false,//空操作 nullOperationDialog: false, //空操作
xmlFileInputDialog:false,//xml文件输入 xmlFileInputDialog: false, //xml文件输入
importXmlFileDialog:false,//导出资源库到XML文件 importXmlFileDialog: false, //导出资源库到XML文件
groupingDialog:false,//分组 groupingDialog: false, //分组
streamQueryDialog:false,//流查询 streamQueryDialog: false, //流查询
sendMailDialog:false,//发送邮件 sendMailDialog: false, //发送邮件
// 流程弹窗组件start---------- // 流程弹窗组件start----------
// 流程弹窗组件end------------ // 流程弹窗组件end------------
// 脚本组件start----- // 脚本组件start-----
scriptVisible:false, scriptVisible: false,
// 脚本组件end----- // 脚本组件end-----
// 输入模块 // 输入模块
...@@ -1479,19 +1453,19 @@ export default { ...@@ -1479,19 +1453,19 @@ export default {
setVariable, //设置变量 setVariable, //设置变量
getVariable, //获取变量 getVariable, //获取变量
mergeRecords, //合并记录 mergeRecords, //合并记录
selectField,//选择字段 selectField, //选择字段
conversionSettings,//转换设置 conversionSettings, //转换设置
jobSettings,//作业设置 jobSettings, //作业设置
toRepeat,//去除重复 toRepeat, //去除重复
mapping,//映射 (子转换) mapping, //映射 (子转换)
mappingInput,//映射输入 mappingInput, //映射输入
mappingOutput,//映射输出 mappingOutput, //映射输出
nullOperation,//空操作 nullOperation, //空操作
xmlFileInput,//xml 文件输入 xmlFileInput, //xml 文件输入
importXmlFile,//导出资源库到XML文件 importXmlFile, //导出资源库到XML文件
grouping,//分组 grouping, //分组
streamQuery,//流查询 streamQuery, //流查询
sendMail,//发送邮件 sendMail, //发送邮件
// 作业弹簧组件end---------------------- // 作业弹簧组件end----------------------
// 流程弹窗组件start--------- // 流程弹窗组件start---------
switchDialog, switchDialog,
...@@ -1752,7 +1726,6 @@ export default { ...@@ -1752,7 +1726,6 @@ export default {
// } // }
// }, // },
mergeRecordsDialogFun() { mergeRecordsDialogFun() {
this.mergeRecordsDialog = !this.mergeRecordsDialog; this.mergeRecordsDialog = !this.mergeRecordsDialog;
this.form.keys = JSON.stringify(this.$refs.mergeRecordsDialog.keys); this.form.keys = JSON.stringify(this.$refs.mergeRecordsDialog.keys);
...@@ -1767,11 +1740,9 @@ export default { ...@@ -1767,11 +1740,9 @@ export default {
} }
}, },
copyNumberFun() {
console.log(this.form, "数据");
copyNumberFun(){ this.copyNumber = !this.copyNumber;
console.log(this.form,"数据");
this.copyNumber = !this.copyNumber
for (let name in this.form) { for (let name in this.form) {
var edit = new mxCellAttributeChange( var edit = new mxCellAttributeChange(
...@@ -1782,8 +1753,8 @@ export default { ...@@ -1782,8 +1753,8 @@ export default {
this.graph.getModel().execute(edit); this.graph.getModel().execute(edit);
} }
this.form = {} this.form = {};
console.log(this.form,"7798798798"); console.log(this.form, "7798798798");
}, },
// getVariableDialogFun() { // getVariableDialogFun() {
...@@ -2068,13 +2039,11 @@ export default { ...@@ -2068,13 +2039,11 @@ export default {
this.graph.setMultigraph(false); this.graph.setMultigraph(false);
this.graph.convertValueToString = (cell) => { this.graph.convertValueToString = (cell) => {
console.log(cell,"888888888888888888888888888888888"); console.log(cell, "888888888888888888888888888888888");
var label = cell.getAttribute("label"); var label = cell.getAttribute("label");
;
if (label) { if (label) {
if (cell.isEdge() && cell.value.nodeName == "TransHop") { if (cell.isEdge() && cell.value.nodeName == "TransHop") {
return '<img src="' + label + '" width="16" height="16" />'; return '<img src="' + label + '" width="16" height="16" />';
} else if (cell.isEdge() && cell.value.nodeName == "JobHop") { } else if (cell.isEdge() && cell.value.nodeName == "JobHop") {
console.log(label, "label"); console.log(label, "label");
// var jsonArray = JSON.parse(label), label = ''; // var jsonArray = JSON.parse(label), label = '';
...@@ -2090,15 +2059,19 @@ export default { ...@@ -2090,15 +2059,19 @@ export default {
return label; return label;
} else { } else {
if (this.curFileType == "transformation") { if (this.curFileType == "transformation") {
return decodeURIComponent(label) + " " + "X" + cell.value.attributes.copies.value; return (
}else{ decodeURIComponent(label) +
return decodeURIComponent(label) " " +
"X" +
cell.value.attributes.copies.value
);
} else {
return decodeURIComponent(label);
} }
} }
} }
return label ; return label;
// console.log(cell.value.attributes,99999999999999); // console.log(cell.value.attributes,99999999999999);
// if (!cell.title && cell.value) { // if (!cell.title && cell.value) {
...@@ -2163,20 +2136,15 @@ export default { ...@@ -2163,20 +2136,15 @@ export default {
this.graph.addListener(mxEvent.DOUBLE_CLICK, (graph, evt) => { this.graph.addListener(mxEvent.DOUBLE_CLICK, (graph, evt) => {
console.log(evt); console.log(evt);
console.log("当前点击的文件类型****************", this.curFileType); console.log("当前点击的文件类型****************", this.curFileType);
// this.xmlDocuments = mxUtils.parseXml(decodeURIComponent(this.blankCanvas)); // this.xmlDocuments = mxUtils.parseXml(decodeURIComponent(this.blankCanvas));
this.graphXml = this.encode(this.graph); this.graphXml = this.encode(this.graph);
console.log(this.graphXml, 11111111111111111111111); console.log(this.graphXml, 11111111111111111111111);
// 监听双击事件 // 监听双击事件
const cell = this.R.pathOr([], ["properties", "cell"], evt); const cell = this.R.pathOr([], ["properties", "cell"], evt);
console.info(cell); // 在控制台输出双击的cell console.info(cell); // 在控制台输出双击的cell
this.nodeData = cell; this.nodeData = cell;
// this.setXml(); // this.setXml();
this.doubleClickCell = cell; this.doubleClickCell = cell;
// 获取接口数据 // 获取接口数据
availableCharsets(pamer).then((res) => { availableCharsets(pamer).then((res) => {
this.codingType = res; this.codingType = res;
...@@ -2197,98 +2165,111 @@ export default { ...@@ -2197,98 +2165,111 @@ export default {
valueFormat(pamer2).then((res) => { valueFormat(pamer2).then((res) => {
this.fieldFormat = res; this.fieldFormat = res;
}); });
if (this.curFileType == "transformation" && cell.dis == "step79" || if (
cell.value.attributes.ctype.value == "Mail") { (this.curFileType == "transformation" && cell.dis == "step79") ||
this.sendMailDialog = !this.sendMailDialog cell.value.attributes.ctype.value == "Mail"
this.form = this.showDataFunc() ) {
this.sendMailDialog = !this.sendMailDialog;
this.form = this.showDataFunc();
setTimeout(() => { setTimeout(() => {
this.$refs.sendMail.clickFun(this.graph,this.form); this.$refs.sendMail.clickFun(this.graph, this.form);
}, 500); }, 500);
} }
if (this.curFileType == "transformation" && cell.dis == "step126" || if (
cell.value.attributes.ctype.value == "StreamLookup") { (this.curFileType == "transformation" && cell.dis == "step126") ||
this.streamQueryDialog = !this.streamQueryDialog cell.value.attributes.ctype.value == "StreamLookup"
this.form = this.showDataFunc() ) {
this.streamQueryDialog = !this.streamQueryDialog;
this.form = this.showDataFunc();
setTimeout(() => { setTimeout(() => {
this.$refs.streamQuery.clickFun(this.graph,this.form); this.$refs.streamQuery.clickFun(this.graph, this.form);
}, 500); }, 500);
} }
if (this.curFileType == "transformation" && cell.dis == "step143" || if (
cell.value.attributes.ctype.value == "GroupBy") { (this.curFileType == "transformation" && cell.dis == "step143") ||
this.groupingDialog = !this.groupingDialog cell.value.attributes.ctype.value == "GroupBy"
this.form = this.showDataFunc() ) {
this.groupingDialog = !this.groupingDialog;
this.form = this.showDataFunc();
setTimeout(() => { setTimeout(() => {
this.$refs.grouping.clickFun(this.graph,this.form); this.$refs.grouping.clickFun(this.graph, this.form);
}, 500); }, 500);
}else if (this.curFileType == "transformation" && cell.dis == "step6" || } else if (
cell.value.attributes.ctype.value == "getXMLData") { (this.curFileType == "transformation" && cell.dis == "step6") ||
this.xmlFileInputDialog = !this.xmlFileInputDialog cell.value.attributes.ctype.value == "getXMLData"
this.form = this.showDataFunc() ) {
this.xmlFileInputDialog = !this.xmlFileInputDialog;
this.form = this.showDataFunc();
setTimeout(() => { setTimeout(() => {
this.$refs.xmlFileInput.clickFun(this.graph,this.form); this.$refs.xmlFileInput.clickFun(this.graph, this.form);
}, 500); }, 500);
}else if (this.curFileType == "transformation" && cell.dis == "step166" || } else if (
cell.value.attributes.ctype.value == "Mapping") { (this.curFileType == "transformation" && cell.dis == "step166") ||
this.mappingDialog = !this.mappingDialog cell.value.attributes.ctype.value == "Mapping"
this.form = this.showDataFunc() ) {
this.mappingDialog = !this.mappingDialog;
this.form = this.showDataFunc();
setTimeout(() => { setTimeout(() => {
this.$refs.mapping.clickFun(this.graph,this.form); this.$refs.mapping.clickFun(this.graph, this.form);
}, 500); }, 500);
}else if (this.curFileType == "transformation" && cell.dis == "step56" || } else if (
cell.value.attributes.ctype.value == "Unique") { (this.curFileType == "transformation" && cell.dis == "step56") ||
this.toRepeatDialog = !this.toRepeatDialog cell.value.attributes.ctype.value == "Unique"
this.form = this.showDataFunc() ) {
this.toRepeatDialog = !this.toRepeatDialog;
this.form = this.showDataFunc();
setTimeout(() => { setTimeout(() => {
this.$refs.toRepeat.clickFun(this.graph,this.form); this.$refs.toRepeat.clickFun(this.graph, this.form);
}, 500); }, 500);
} else if (
}else if (this.curFileType == "transformation" && cell.dis == "step61" || (this.curFileType == "transformation" && cell.dis == "step61") ||
cell.value.attributes.ctype.value == "SelectValues") { cell.value.attributes.ctype.value == "SelectValues"
this.selectFieldDialog = !this.selectFieldDialog ) {
this.form = this.showDataFunc() this.selectFieldDialog = !this.selectFieldDialog;
this.form = this.showDataFunc();
setTimeout(() => { setTimeout(() => {
this.$refs.selectField.clickFun(this.graph,this.form); this.$refs.selectField.clickFun(this.graph, this.form);
}, 500); }, 500);
}else if (this.curFileType == "transformation" && } else if (
cell.dis == "step130" || (this.curFileType == "transformation" && cell.dis == "step130") ||
cell.value.attributes.ctype.value == "MergeRows" cell.value.attributes.ctype.value == "MergeRows"
) { ) {
this.mergeRecordsDialog = !this.mergeRecordsDialog; this.mergeRecordsDialog = !this.mergeRecordsDialog;
this.form = this.showDataFunc() this.form = this.showDataFunc();
setTimeout(() => { setTimeout(() => {
this.$refs.mergeRecords.clickFun(this.graph,this.form); this.$refs.mergeRecords.clickFun(this.graph, this.form);
}, 500); }, 500);
return; return;
} else if (this.curFileType == "transformation" && } else if (
cell.dis == "step162" || (this.curFileType == "transformation" && cell.dis == "step162") ||
cell.value.attributes.ctype.value == "GetVariable" cell.value.attributes.ctype.value == "GetVariable"
) { ) {
this.getVariableDialog = !this.getVariableDialog; this.getVariableDialog = !this.getVariableDialog;
this.form = this.showDataFunc() this.form = this.showDataFunc();
setTimeout(() => { setTimeout(() => {
this.$refs.getVariable.clickFun(this.graph,this.form); this.$refs.getVariable.clickFun(this.graph, this.form);
}, 500); }, 500);
return; return;
} else if (this.curFileType == "transformation" && } else if (
cell.dis == "step163" || (this.curFileType == "transformation" && cell.dis == "step163") ||
cell.value.attributes.ctype.value == "SetVariable" cell.value.attributes.ctype.value == "SetVariable"
) { ) {
this.setVariableDialog = !this.setVariableDialog; this.setVariableDialog = !this.setVariableDialog;
this.form = this.showDataFunc() this.form = this.showDataFunc();
setTimeout(() => { setTimeout(() => {
this.$refs.setVariable.clickFun(this.graph,this.form); this.$refs.setVariable.clickFun(this.graph, this.form);
}, 500); }, 500);
return; return;
} }
if (this.curFileType == "transformation" && if (
cell.dis == "step66" || (this.curFileType == "transformation" && cell.dis == "step66") ||
cell.value.attributes.ctype.value == "SortRows" cell.value.attributes.ctype.value == "SortRows"
) { ) {
this.sortRecordDialog = !this.sortRecordDialog; this.sortRecordDialog = !this.sortRecordDialog;
this.form = this.showDataFunc() this.form = this.showDataFunc();
setTimeout(() => { setTimeout(() => {
this.$refs.sortRecord.clickFun(this.graph,this.form); this.$refs.sortRecord.clickFun(this.graph, this.form);
}, 500); }, 500);
return; return;
} else if ( } else if (
...@@ -2312,8 +2293,8 @@ export default { ...@@ -2312,8 +2293,8 @@ export default {
this.fields = q.fields; this.fields = q.fields;
this.file = q.file; this.file = q.file;
return; return;
} else if (this.curFileType == "transformation" && } else if (
cell.ids == "step28" || (this.curFileType == "transformation" && cell.ids == "step28") ||
cell.value.attributes.ctype.value == "TableInput" cell.value.attributes.ctype.value == "TableInput"
) { ) {
this.TableInputDialog = !this.TableInputDialog; this.TableInputDialog = !this.TableInputDialog;
...@@ -2324,14 +2305,14 @@ export default { ...@@ -2324,14 +2305,14 @@ export default {
}, 500); }, 500);
return; return;
} else if (this.curFileType == "transformation" && } else if (
cell.ids == "step25" || (this.curFileType == "transformation" && cell.ids == "step25") ||
cell.value.attributes.ctype.value == "SystemInfo" cell.value.attributes.ctype.value == "SystemInfo"
) { ) {
this.SystemInfoDialog = !this.SystemInfoDialog; this.SystemInfoDialog = !this.SystemInfoDialog;
this.form = this.showDataFunc(); this.form = this.showDataFunc();
setTimeout(() => { setTimeout(() => {
this.$refs.SystemInfo.clickFun(this.graph,this.form); //向子组件传递画布 this.$refs.SystemInfo.clickFun(this.graph, this.form); //向子组件传递画布
}, 500); }, 500);
return; return;
} else if ( } else if (
...@@ -2342,7 +2323,7 @@ export default { ...@@ -2342,7 +2323,7 @@ export default {
this.form = this.showDataFunc(); this.form = this.showDataFunc();
setTimeout(() => { setTimeout(() => {
this.$refs.Constant.clickFun(this.graph,this.form); //向子组件传递画布 this.$refs.Constant.clickFun(this.graph, this.form); //向子组件传递画布
}, 500); }, 500);
return; return;
} else if ( } else if (
...@@ -2352,7 +2333,7 @@ export default { ...@@ -2352,7 +2333,7 @@ export default {
this.RandomValueDialog = !this.RandomValueDialog; this.RandomValueDialog = !this.RandomValueDialog;
this.form = this.showDataFunc(); this.form = this.showDataFunc();
setTimeout(() => { setTimeout(() => {
this.$refs.RandomValue.clickFun(this.graph,this.form); //向子组件传递画布 this.$refs.RandomValue.clickFun(this.graph, this.form); //向子组件传递画布
}, 500); }, 500);
return; return;
} else if ( } else if (
...@@ -2362,7 +2343,7 @@ export default { ...@@ -2362,7 +2343,7 @@ export default {
this.RowGeneratorDialog = !this.RowGeneratorDialog; this.RowGeneratorDialog = !this.RowGeneratorDialog;
this.form = this.showDataFunc(); this.form = this.showDataFunc();
setTimeout(() => { setTimeout(() => {
this.$refs.RowGenerator.clickFun(this.graph,this.form); this.$refs.RowGenerator.clickFun(this.graph, this.form);
}, 500); }, 500);
return; return;
} else if ( } else if (
...@@ -2373,7 +2354,7 @@ export default { ...@@ -2373,7 +2354,7 @@ export default {
this.form = this.showDataFunc(); this.form = this.showDataFunc();
setTimeout(() => { setTimeout(() => {
this.$refs.TextFileInput.clickFun(this.graph,this.form); this.$refs.TextFileInput.clickFun(this.graph, this.form);
}, 500); }, 500);
return; return;
} else if ( } else if (
...@@ -2532,20 +2513,26 @@ export default { ...@@ -2532,20 +2513,26 @@ export default {
this.$refs.mytrans.clickFun(this.graph); //向子组件传递画布 this.$refs.mytrans.clickFun(this.graph); //向子组件传递画布
}, 500); }, 500);
return; return;
} else if((this.curFileType=="transformation" && cell.ids == "step45") || cell.value.attributes.ctype.value == "ExecSQL"){ } else if (
(this.curFileType == "transformation" && cell.ids == "step45") ||
cell.value.attributes.ctype.value == "ExecSQL"
) {
//流程--Switch / Case //流程--Switch / Case
this.scriptVisible = !this.scriptVisible; this.scriptVisible = !this.scriptVisible;
this.outPutFormData16 = this.showDataFunc(); this.outPutFormData16 = this.showDataFunc();
setTimeout(() => { setTimeout(() => {
this.$refs.script.clickFun(this.graph);//向子组件传递画布 this.$refs.script.clickFun(this.graph); //向子组件传递画布
}, 500); }, 500);
return; return;
} else if((this.curFileType=="job" && cell.ids == "step63") || cell.value.attributes.ctype.value == "EXPORT_REPOSITORY"){ } else if (
(this.curFileType == "job" && cell.ids == "step63") ||
cell.value.attributes.ctype.value == "EXPORT_REPOSITORY"
) {
//资源库 --导出资源库XML文件 //资源库 --导出资源库XML文件
this.importXmlFileDialog = !this.importXmlFileDialog; this.importXmlFileDialog = !this.importXmlFileDialog;
this.form = this.showDataFunc() this.form = this.showDataFunc();
setTimeout(() => { setTimeout(() => {
this.$refs.importXmlFile.clickFun(this.graph,this.form);//向子组件传递画布 this.$refs.importXmlFile.clickFun(this.graph, this.form); //向子组件传递画布
}, 500); }, 500);
return; return;
} }
...@@ -2555,60 +2542,65 @@ export default { ...@@ -2555,60 +2542,65 @@ export default {
// console.log(evt); // console.log(evt);
// 监听单击事件 // 监听单击事件
const cell = this.R.pathOr([], ["properties", "cell"], evt); const cell = this.R.pathOr([], ["properties", "cell"], evt);
}); });
mxEvent.disableContextMenu(document.body); mxEvent.disableContextMenu(document.body);
this.graph.popupMenuHandler.autoExpand = true; this.graph.popupMenuHandler.autoExpand = true;
this.graph.popupMenuHandler.factoryMethod = (menu, cell, evt) => { this.graph.popupMenuHandler.factoryMethod = (menu, cell, evt) => {
let root = this.graph.getDefaultParent();
console.log("root-", root);
let channelLogTable = JSON.parse(root.getAttribute("channelLogTable"));
console.log("channelLogTable-", channelLogTable);
let q = {};
let obj = root.value.attributes;
for (let vel in obj) {
let key = obj[vel];
q[key.name] = key.value;
}
if (!cell) { if (!cell) {
if (this.curFileType == "transformation") { if (this.curFileType == "transformation") {
//画布右键 //画布右键
menu.addItem("转换属性设置", null, () => { menu.addItem("转换属性设置", null, () => {
console.log(cell, "当前节点"); this.conversionSettingsDialog = !this.conversionSettingsDialog;
this.conversionSettingsDialog = !this.conversionSettingsDialog this.form = q;
setTimeout(() => {
this.$refs.conversionSettings.clickFun(this.graph,this.form); //向子组件传递画布
}, 500);
}); });
menu.addItem("映射输入规范", null, () => { menu.addItem("映射输入规范", null, () => {
console.log(cell, "当前节点"); console.log(cell, "当前节点");
this.mappingInputDialog = !this.mappingInputDialog this.mappingInputDialog = !this.mappingInputDialog;
}); });
menu.addItem("映射输出规范", null, () => { menu.addItem("映射输出规范", null, () => {
console.log(cell, "当前节点"); console.log(cell, "当前节点");
this.mappingOutputDialog = !this.mappingOutputDialog this.mappingOutputDialog = !this.mappingOutputDialog;
}); });
menu.addItem("空操作", null, () => { menu.addItem("空操作", null, () => {
console.log(cell, "当前节点"); console.log(cell, "当前节点");
this.nullOperationDialog = !this.nullOperationDialog this.nullOperationDialog = !this.nullOperationDialog;
}); });
menu.addSeparator(); menu.addSeparator();
} else { } else {
//画布右键 //画布右键
menu.addItem("作业属性设置", null, () => { menu.addItem("作业属性设置", null, () => {
console.log(cell, "当前节点"); console.log(cell, "当前节点");
this.jobSettingsDialog = !this.jobSettingsDialog this.jobSettingsDialog = !this.jobSettingsDialog;
}); });
menu.addSeparator(); menu.addSeparator();
} }
} else { } else {
//节点右键 //节点右键
menu.addItem("改变开始复制的数量", null, () => { menu.addItem("改变开始复制的数量", null, () => {
console.log(cell, "当前节点"); console.log(cell, "当前节点");
console.log(this.form,"当前数据"); console.log(this.form, "当前数据");
if (this.form.label) { if (this.form.label) {
this.copyNumber = !this.copyNumber this.copyNumber = !this.copyNumber;
}else{ } else {
this.$message.error("请先双击打开节点") this.$message.error("请先双击打开节点");
} }
}); });
menu.addSeparator(); menu.addSeparator();
} }
...@@ -2619,7 +2611,6 @@ export default { ...@@ -2619,7 +2611,6 @@ export default {
newHop(cell) { newHop(cell) {
var doc = mxUtils.createXmlDocument(); var doc = mxUtils.createXmlDocument();
var hop = doc.createElement("JobHop"); var hop = doc.createElement("JobHop");
hop.setAttribute("from", cell.source.getAttribute("label")); hop.setAttribute("from", cell.source.getAttribute("label"));
hop.setAttribute("to", cell.target.getAttribute("label")); hop.setAttribute("to", cell.target.getAttribute("label"));
hop.setAttribute("from_nr", cell.source.getAttribute("nr")); hop.setAttribute("from_nr", cell.source.getAttribute("nr"));
...@@ -2653,13 +2644,11 @@ export default { ...@@ -2653,13 +2644,11 @@ export default {
// 回显数据封装的方法 // 回显数据封装的方法
showDataFunc() { showDataFunc() {
let q = {}; let q = {};
let obj = this.doubleClickCell.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;
} }
return q; return q;
}, },
......
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