Commit d327393f by 李耀琨

完成字符串替换,替换Null值,分组,发送邮件

parent e9433fa1
ENV = 'development'
#VUE_APP_BASE_API = 'http://147.1.3.180:9888/'
#VUE_APP_WS_API = 'ws://147.1.3.180:9888/'
#VUE_APP_BASE_API = 'http://192.168.0.24:9888'
#VUE_APP_WS_API = 'ws://192.168.0.24:9888'
#VUE_APP_FILE_API = 'http://192.168.0.24:9888'
# 接口地址
#VUE_APP_BASE_API = 'http://192.168.0.33:9889'
#VUE_APP_WS_API = 'ws://192.168.0.33:9889'
#VUE_APP_FILE_API = 'http://192.168.0.33:9889'
VUE_APP_BASE_API = 'http://192.168.0.71:9888'
VUE_APP_WS_API = 'ws://192.168.0.71:9888'
VUE_APP_FILE_API = 'http://192.168.0.71:9888'
# 是否启用 babel-plugin-dynamic-import-node插件
VUE_CLI_BABEL_TRANSPILE_MODULES = true
......@@ -64,6 +64,7 @@
"scss": "^0.2.4",
"scss-loader": "0.0.1",
"sortablejs": "1.8.4",
"uuid": "^8.3.2",
"vue": "2.6.10",
"vue-count-to": "1.0.13",
"vue-cropper": "0.4.9",
......
......@@ -584,7 +584,7 @@ aside {
// $svgUrl:'http://147.1.3.180:9888/ETLWEB-SERVER/etlweb';
// $svgUrl:'http://192.168.0.24:9888/ETLWEB-SERVER/etlweb';
$svgUrl:'http://192.168.0.71:9888/ETLWEB-SERVER/etlweb';
// $svgUrl:'http://192.168.0.33:9889/ETLWEB-SERVER/etlweb';
// $svgUrl:'http://192.168.0.44:9882/ETLWEB-SERVER/etlweb';
// .schema { background-image: url($svgUrl/ui/images/schema.svg?scale=16) !important;}
......
......@@ -81,6 +81,7 @@ const baseUrl = process.env.VUE_APP_BASE_API === '/' ? '' : process.env.VUE_APP_
// Vue.prototype.etlWeb = "http://147.1.3.180:9888/ETLWEB-SERVER/etlweb/"
// Vue.prototype.etlWeb = "http://192.168.0.24:9888/ETLWEB-SERVER/etlweb/"
Vue.prototype.etlWeb = "http://192.168.0.71:9888/ETLWEB-SERVER/etlweb/"
// Vue.prototype.etlWeb = "http://192.168.0.33:9889/ETLWEB-SERVER/etlweb/"
new Vue({
......
......@@ -458,6 +458,21 @@
</template>
<script>
import mxgraph from "@/utils/mxgraph";
const {
mxGraph,
mxUtils,
mxEvent,
mxKeyHandler,
mxRubberband,
mxConstants,
mxStencilRegistry,
mxStencil,
mxCodec,
mxGraphModel,
mxGeometry,
} = mxgraph;
import main from "../../../mykettle/main";
export default {
components: {
......
......@@ -206,6 +206,20 @@
</template>
<script>
import mxgraph from "@/utils/mxgraph";
const {
mxGraph,
mxUtils,
mxEvent,
mxKeyHandler,
mxRubberband,
mxConstants,
mxStencilRegistry,
mxStencil,
mxCodec,
mxGraphModel,
mxGeometry,
} = mxgraph;
import { valueFormat, valueMeta } from "@/api/kettle/link";
export default {
......
......@@ -169,6 +169,20 @@
</template>
<script>
import mxgraph from "@/utils/mxgraph";
const {
mxGraph,
mxUtils,
mxEvent,
mxKeyHandler,
mxRubberband,
mxConstants,
mxStencilRegistry,
mxStencil,
mxCodec,
mxGraphModel,
mxGeometry,
} = mxgraph;
import { valueFormat, valueMeta } from "@/api/kettle/link";
export default {
......
......@@ -82,6 +82,20 @@
</template>
<script>
import mxgraph from "@/utils/mxgraph";
const {
mxGraph,
mxUtils,
mxEvent,
mxKeyHandler,
mxRubberband,
mxConstants,
mxStencilRegistry,
mxStencil,
mxCodec,
mxGraphModel,
mxGeometry,
} = mxgraph;
import { systemDataTypes } from "@/api/kettle/link";
export default {
......
......@@ -69,7 +69,7 @@
</el-form>
结构分组的字段:
<br />
<el-button type="text" @click="selectModify(true)">添加字段</el-button>
<el-button type="text" @click="structure(true)">添加字段</el-button>
<el-button type="text" @click="getTheGroup">获取字段</el-button>
<el-table :data="groupFile" border style="width: 100%">
<el-table-column prop="name" label="分组字段"> </el-table-column>
......@@ -77,7 +77,7 @@
<el-table-column label="操作">
<template slot-scope="scope">
<el-button
@click="selectModify(false, scope.row)"
@click="structure(false, scope.row)"
type="text"
size="small"
>编辑</el-button
......@@ -96,7 +96,7 @@
<br />
聚合:
<br />
<el-button type="text" @click="selectModify(true)">添加字段</el-button>
<el-button type="text" @click="polymerization(true)">添加字段</el-button>
<el-button type="text" @click="getTheField">获取字段</el-button>
<el-table :data="fields" border style="width: 100%">
<el-table-column prop="aggregate" label="分组字段"> </el-table-column>
......@@ -106,7 +106,7 @@
<el-table-column label="操作">
<template slot-scope="scope">
<el-button
@click="selectModify(false, scope.row)"
@click="polymerization(false, scope.row)"
type="text"
size="small"
>编辑</el-button
......@@ -127,8 +127,8 @@
</span>
</el-dialog>
<!-- <el-dialog
title="添加字段"
<el-dialog
title="添加结构分组的字段"
:visible.sync="addField"
width="500px"
:before-close="handleClose"
......@@ -138,29 +138,76 @@
<el-form-item label="名称:">
<el-input v-model="fiel.name"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="addField = false">取 消</el-button>
<el-button type="primary" @click="addFieldDetermine">确 定</el-button>
</span>
</el-dialog>
<el-dialog
title="添加聚合"
:visible.sync="gather"
width="500px"
:before-close="handleClose"
:modal="false"
>
<el-form ref="form" :model="fiel" label-width="160px">
<el-form-item label="分组字段:">
<el-input v-model="gatherLite.aggregate"></el-input>
</el-form-item>
<el-form-item label="subject:">
<el-select v-model="gatherLite.subject" placeholder="请选择">
<el-option
v-for="(item,index) in fields"
:key="index"
:label="item.aggregate"
:value="item.aggregate"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="类型:">
<el-select v-model="fiel.type" style="width: 100%" clearable>
<el-select v-model="gatherLite.type" placeholder="请选择">
<el-option
v-for="item in type"
:key="item.code"
:label="item.descrp"
:value="item.code"
/>
v-for="item in fields"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="addField = false">取 消</el-button>
<el-button type="primary" @click="addFieldDetermine">确 定</el-button>
<el-button @click="gather = false">取 消</el-button>
<el-button type="primary" @click="gatherDetermine">确 定</el-button>
</span>
</el-dialog> -->
</el-dialog>
</div>
</template>
<script>
import { systemDataTypes, inputOutputFields } from "@/api/kettle/link";
import mxgraph from "@/utils/mxgraph";
const {
mxGraph,
mxUtils,
mxEvent,
mxKeyHandler,
mxRubberband,
mxConstants,
mxStencilRegistry,
mxStencil,
mxCodec,
mxGraphModel,
mxGeometry,
} = mxgraph;
export default {
props: ["form", "groupingDialog", "saveOutputDialog", "nodeData"],
data() {
......@@ -171,6 +218,8 @@ export default {
type: {},
dataStatus: false,
fiel: {},
gatherLite: {},
gather: false,
};
},
......@@ -179,6 +228,30 @@ export default {
},
methods: {
gatherDetermine(){},
structure(state, val) {
// this.addField = !this.addField
this.dataStatus = state;
if (state) {
this.fiel = {};
} else {
this.fiel = val;
}
this.addField = !this.addField;
},
polymerization(state, val) {
this.dataStatus = state;
if (state) {
this.gatherLite = {};
} else {
this.gatherLite = val;
this.systemDataTypesFun()
}
this.gather = !this.gather;
},
getTheGroup() {
var enc = new mxCodec(mxUtils.createXmlDocument());
var node = enc.encode(this.newGraph.getModel());
......@@ -191,16 +264,13 @@ export default {
pamerFields.append("graphXml", this.graphXml);
pamerFields.append("before", true);
inputOutputFields(pamerFields).then((res) => {
// this.parameters = res;
res.forEach((item, index) => {
console.log(item, index);
this.groupFile.push({
variable: item.name,
});
});
this.groupFile = res;
console.log(res);
});
},
deleteField(index, rows) {
rows.splice(index, 1);
},
getTheField() {
console.log(this.nodeData);
......@@ -219,10 +289,16 @@ export default {
pamerFields.append("query", "");
inputOutputFields(pamerFields).then((res) => {
console.log(res, "yuiyuiyui");
for (let i of res) {
i.field_name = i.name;
}
this.fields = res;
this.fields = []
res.forEach((item) => {
this.fields.push({
aggregate: item.name,
subject: item.name,
type: item.type,
});
console.log(this.fields);
});
// this.fields.field_name = res.name
});
},
......@@ -231,7 +307,8 @@ export default {
console.log(graph, "双击获取值");
this.newGraph = graph;
console.log(val, "拿到form");
// this.fields = JSON.parse(val.fields)
this.fields = JSON.parse(val.fields)
this.groupFile = JSON.parse(val.groupFile)
},
handleCloseFun() {
......@@ -265,18 +342,9 @@ export default {
rows.splice(index, 1);
},
addSheet(state, val) {
this.addField = !this.addField;
this.dataStatus = state;
if (state) {
this.fiel = {};
} else {
this.fiel = val;
}
},
systemDataTypesFun() {
systemDataTypes().then((res) => {
console.log(res);
this.type = res;
});
},
......
......@@ -305,6 +305,21 @@
</template>
<script>
import mxgraph from "@/utils/mxgraph";
const {
mxGraph,
mxUtils,
mxEvent,
mxKeyHandler,
mxRubberband,
mxConstants,
mxStencilRegistry,
mxStencil,
mxCodec,
mxGraphModel,
mxGeometry,
} = mxgraph;
import main from "../../../mykettle/main";
import browseFiles from "../appBulletFrame/browseFiles";
import { datetimeformat, getLinkList,exp,test } from "@/api/kettle/link";
......
......@@ -195,6 +195,21 @@
</template>
<script>
import mxgraph from "@/utils/mxgraph";
const {
mxGraph,
mxUtils,
mxEvent,
mxKeyHandler,
mxRubberband,
mxConstants,
mxStencilRegistry,
mxStencil,
mxCodec,
mxGraphModel,
mxGeometry,
} = mxgraph;
export default {
props: ["jobSettingsDialog"],
data() {
......
......@@ -104,6 +104,21 @@
</template>
<script>
import mxgraph from "@/utils/mxgraph";
const {
mxGraph,
mxUtils,
mxEvent,
mxKeyHandler,
mxRubberband,
mxConstants,
mxStencilRegistry,
mxStencil,
mxCodec,
mxGraphModel,
mxGeometry,
} = mxgraph;
import { valueMeta } from "@/api/kettle/link";
export default {
props: ["form", "mappingInputDialog", "saveOutputDialog", "nodeData"],
......
......@@ -25,6 +25,21 @@
</template>
<script>
import mxgraph from "@/utils/mxgraph";
const {
mxGraph,
mxUtils,
mxEvent,
mxKeyHandler,
mxRubberband,
mxConstants,
mxStencilRegistry,
mxStencil,
mxCodec,
mxGraphModel,
mxGeometry,
} = mxgraph;
import { systemDataTypes } from "@/api/kettle/link";
export default {
props: ["form", "mappingOutputDialog", "saveOutputDialog", "nodeData"],
......
......@@ -54,6 +54,21 @@
</template>
<script>
import mxgraph from "@/utils/mxgraph";
const {
mxGraph,
mxUtils,
mxEvent,
mxKeyHandler,
mxRubberband,
mxConstants,
mxStencilRegistry,
mxStencil,
mxCodec,
mxGraphModel,
mxGeometry,
} = mxgraph;
import { systemDataTypes } from "@/api/kettle/link";
export default {
props: ["form", "nullOperationDialog", "saveOutputDialog", "nodeData"],
......
<template>
<div class="randomNumber">
<el-dialog
<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-input v-model="form.label"></el-input>
</el-form-item>
</el-form>
<el-form ref="form" :model="form" label-width="0px">
<el-button type="text" @click="addSheet(true)" style="margin: 10px"
>添加字段</el-button
>
<el-form-item>
<el-table :data="fields" style="width: 100%">
<el-table-column label="字段">
<el-table-column
type="index"
width="50">
</el-table-column>
<el-table-column prop="name" label="名称"> </el-table-column>
<el-table-column prop="type" label="类型"> </el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button
@click="addSheet(false,scope.row)"
type="text"
size="small"
>编辑</el-button
>
<el-button
type="text"
size="small"
@click="deleteRow(scope.$index, fields)"
>删除</el-button
>
</template>
<el-form ref="form" :model="form" label-width="0px">
<el-button type="text" @click="addSheet(true)" style="margin: 10px"
>添加字段</el-button
>
<el-form-item>
<el-table :data="fields" style="width: 100%">
<el-table-column label="字段">
<el-table-column type="index" width="50"> </el-table-column>
<el-table-column prop="name" label="名称"> </el-table-column>
<el-table-column prop="type" label="类型"> </el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button
@click="addSheet(false, scope.row)"
type="text"
size="small"
>编辑</el-button
>
<el-button
type="text"
size="small"
@click="deleteRow(scope.$index, fields)"
>删除</el-button
>
</template>
</el-table-column>
</el-table-column>
</el-table-column>
</el-table>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
</el-table>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="handleCloseFun">取 消</el-button>
<el-button type="primary" @click="RandomValueDialogFun"
>确 定</el-button
......@@ -54,7 +51,6 @@
</span>
</el-dialog>
<el-dialog
title="添加字段"
:visible.sync="addField"
......@@ -88,17 +84,32 @@
</template>
<script>
import mxgraph from "@/utils/mxgraph";
const {
mxGraph,
mxUtils,
mxEvent,
mxKeyHandler,
mxRubberband,
mxConstants,
mxStencilRegistry,
mxStencil,
mxCodec,
mxGraphModel,
mxGeometry,
} = mxgraph;
import { randomValueFunc } from "@/api/kettle/link";
export default {
props: ["form","saveOutputDialog","RandomValueDialog"],
props: ["form", "saveOutputDialog", "RandomValueDialog"],
data() {
return {
fields: [],
fiel:{},
random:{},
dataState:false,
addField:false,
fiel: {},
random: {},
dataState: false,
addField: false,
};
},
......@@ -107,54 +118,46 @@ export default {
},
methods: {
clickFun(graph, val) {
console.log(graph, "双击获取值");
this.newGraph = graph;
console.log(val, "拿到form");
this.fields = JSON.parse(val.fields);
},
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);
},
handleCloseFun() {
this.$emit("update:RandomValueDialog", false);
},
RandomValueDialogFun() {
this.handleCloseFun()
this.handleCloseFun();
this.form.fields = JSON.stringify(this.fields);
this.saveOutputDialog(this.form)
this.saveOutputDialog(this.form);
},
addSheet(state,val) {
addSheet(state, val) {
this.addField = !this.addField;
this.dataState = state
this.dataState = state;
if (state) {
this.fiel = {};
}else{
} else {
this.fiel = val;
}
},
addFieldState(){
this.addField = !this.addField
addFieldState() {
this.addField = !this.addField;
if (this.dataState) {
this.fields.push(this.fiel)
this.fields.push(this.fiel);
}
},
randomValueFuncFun() {
randomValueFunc().then((res) => {
this.random = res;
});
},
deleteRow(index, rows) {
rows.splice(index, 1);
},
......@@ -167,8 +170,6 @@ export default {
})
.catch((_) => {});
},
},
};
</script>
......
......@@ -137,6 +137,21 @@
</template>
<script>
import mxgraph from "@/utils/mxgraph";
const {
mxGraph,
mxUtils,
mxEvent,
mxKeyHandler,
mxRubberband,
mxConstants,
mxStencilRegistry,
mxStencil,
mxCodec,
mxGraphModel,
mxGeometry,
} = mxgraph;
import { systemDataTypes } from "@/api/kettle/link";
export default {
props: ["form", "streamQueryDialog", "saveOutputDialog"],
......
......@@ -90,7 +90,7 @@ export default {
// prefix:`http://147.1.3.180:9888/ETLWEB-SERVER/etlweb/`,
// prefix:`http://192.168.0.24:9888/ETLWEB-SERVER/etlweb/`,
prefix:`http://192.168.0.71:9888/ETLWEB-SERVER/etlweb/`,
// prefix:`http://192.168.0.33:9889/ETLWEB-SERVER/etlweb/`,
// 测试数据开始=====
jobTreeList: [
{
......
......@@ -742,6 +742,20 @@
>
</getSystemInformation>
<!-- 字符串替换-->
<stringSubstitution
ref="stringSubstitution"
:disabled="true"
:form="form"
:nodeData="nodeData"
:stringSubstitutionDialog.sync="stringSubstitutionDialog"
:saveOutputDialog="saveOutputDialog"
>
</stringSubstitution>
<!-- 自定义常量数据-->
<customConstant
......@@ -984,13 +998,16 @@
:form="form"
:streamQueryDialog.sync="streamQueryDialog"
:doubleClickCell="doubleClickCell"
:saveOutputDialog="saveOutputDialog"
></streamQuery>
<!-- 替换NULL值 -->
<replaceNull
ref="replaceNull"
:form="form"
:nodeData="nodeData"
:replaceNullDialog.sync="replaceNullDialog"
:doubleClickCell="doubleClickCell">
:doubleClickCell="doubleClickCell"
:saveOutputDialog="saveOutputDialog">
</replaceNull>
<!-- 发送邮件 -->
......@@ -999,6 +1016,7 @@
:form="form"
:sendMailDialog.sync="sendMailDialog"
:doubleClickCell="doubleClickCell"
:saveOutputDialog="saveOutputDialog"
></sendMail>
<!-- 文件浏览器-->
......@@ -1267,7 +1285,7 @@ import mappingInput from "../appBulletFrame/mappingInput"; //映射输入
import mappingOutput from "../appBulletFrame/mappingOutput"; //映射输出
import xmlFileInput from "../appBulletFrame/xmlFileInput"; //xml文件输入
import nullOperation from "../appBulletFrame/nullOperation"; //空操作
import stringSubstitution from "../appBulletFrame/stringSubstitution"; //字符串替换
import conversionSettings from "../appBulletFrame/conversionSettings"; //转换设置
import jobSettings from "../appBulletFrame/jobSettings"; //作业设置
......@@ -1409,6 +1427,7 @@ export default {
xmlFileInputDialog: false, //xml文件输入
importXmlFileDialog: false, //导出资源库到XML文件
groupingDialog: false, //分组
stringSubstitutionDialog:false,//字符串替换
streamQueryDialog: false, //流查询
replaceNullDialog:false, //替换Null值
sendMailDialog: false, //发送邮件
......@@ -1506,6 +1525,7 @@ export default {
successDialog,
homeworkDialog,
//
stringSubstitution,//字符串替换
sortRecord, //排序记录
setVariable, //设置变量
getVariable, //获取变量
......@@ -2215,7 +2235,14 @@ export default {
valueFormat(pamer2).then((res) => {
this.fieldFormat = res;
});
if ((this.curFileType == "transformation" && cell.dis == "step84") ||
if ((this.curFileType == "transformation" && cell.dis == "step63") ||
cell.value.attributes.ctype.value == "ReplaceString") {
this.stringSubstitutionDialog = !this.stringSubstitutionDialog
this.form = this.showDataFunc();
setTimeout(() => {
this.$refs.stringSubstitution.clickFun(this.graph,this.form);
}, 500);
}else if ((this.curFileType == "transformation" && cell.dis == "step84") ||
cell.value.attributes.ctype.value == "IfNull") {
this.replaceNullDialog = !this.replaceNullDialog
this.form = this.showDataFunc();
......
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