Commit 327ec109 by 李耀琨

数值范围 解决分组bug 数据检验

parent f0dcfd5d
...@@ -12,6 +12,15 @@ export function types(data) { ...@@ -12,6 +12,15 @@ export function types(data) {
} }
//获取连接类型
export function typeGroup(data) {
return request({
url: 'etlweb/system/typeGroup',
data,
method: 'post'
})
}
//记录集连接 连接类型 //记录集连接 连接类型
export function typesss(data) { export function typesss(data) {
return request({ return request({
......
...@@ -135,8 +135,17 @@ ...@@ -135,8 +135,17 @@
:modal="false" :modal="false"
> >
<el-form ref="form" :model="fiel" label-width="160px"> <el-form ref="form" :model="fiel" label-width="160px">
<el-form-item label="名称:"> <el-form-item label="名称:">
<el-input v-model="fiel.name"></el-input> <el-select v-model="fiel.name" placeholder="请选择">
<el-option
v-for="(item,index) in getFiel"
:key="index"
:label="item.name"
:value="item.name"
>
</el-option>
</el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -161,10 +170,10 @@ ...@@ -161,10 +170,10 @@
<el-form-item label="subject:"> <el-form-item label="subject:">
<el-select v-model="gatherLite.subject" placeholder="请选择"> <el-select v-model="gatherLite.subject" placeholder="请选择">
<el-option <el-option
v-for="(item,index) in fields" v-for="(item,index) in getFiel"
:key="index" :key="index"
:label="item.aggregate" :label="item.name"
:value="item.aggregate" :value="item.name"
> >
</el-option> </el-option>
</el-select> </el-select>
...@@ -173,7 +182,7 @@ ...@@ -173,7 +182,7 @@
<el-form-item label="类型:"> <el-form-item label="类型:">
<el-select v-model="gatherLite.type" placeholder="请选择"> <el-select v-model="gatherLite.type" placeholder="请选择">
<el-option <el-option
v-for="item in fields" v-for="item in typeGroup"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
...@@ -192,7 +201,7 @@ ...@@ -192,7 +201,7 @@
</template> </template>
<script> <script>
import { systemDataTypes, inputOutputFields } from "@/api/kettle/link"; import { systemDataTypes, inputOutputFields,typeGroup } from "@/api/kettle/link";
import mxgraph from "@/utils/mxgraph"; import mxgraph from "@/utils/mxgraph";
const { const {
mxGraph, mxGraph,
...@@ -220,16 +229,30 @@ export default { ...@@ -220,16 +229,30 @@ export default {
fiel: {}, fiel: {},
gatherLite: {}, gatherLite: {},
gather: false, gather: false,
typeGroup:[],
getFiel:[],
}; };
}, },
created() { created() {
this.systemDataTypesFun(); this.systemDataTypesFun();
}, },
methods: { methods: {
gatherDetermine(){}, gatherDetermine(){
this.fields.push()
this.gather = !this.gather;
if (this.dataStatus) {
this.fields.push(this.gatherLite);
}
},
typeGroupFun(){
typeGroup().then(res=>{
this.typeGroup = res
})
},
structure(state, val) { structure(state, val) {
// this.addField = !this.addField // this.addField = !this.addField
this.dataStatus = state; this.dataStatus = state;
...@@ -242,6 +265,7 @@ export default { ...@@ -242,6 +265,7 @@ export default {
}, },
polymerization(state, val) { polymerization(state, val) {
this.dataStatus = state; this.dataStatus = state;
this.typeGroupFun()
if (state) { if (state) {
this.gatherLite = {}; this.gatherLite = {};
} else { } else {
...@@ -250,7 +274,22 @@ export default { ...@@ -250,7 +274,22 @@ export default {
} }
this.gather = !this.gather; this.gather = !this.gather;
}, },
inputOutputFieldsFun(){
var enc = new mxCodec(mxUtils.createXmlDocument());
var node = enc.encode(this.newGraph.getModel());
this.graphXml = mxUtils.getPrettyXml(node);
let pamerFields = new FormData(); // 创建form对象
pamerFields.append(
"stepName",
this.nodeData.value.attributes.label.value
);
pamerFields.append("graphXml", this.graphXml);
pamerFields.append("before", true);
inputOutputFields(pamerFields).then((res) => {
this.getFiel = res;
console.log(res);
});
},
getTheGroup() { getTheGroup() {
var enc = new mxCodec(mxUtils.createXmlDocument()); var enc = new mxCodec(mxUtils.createXmlDocument());
...@@ -304,8 +343,10 @@ export default { ...@@ -304,8 +343,10 @@ export default {
}, },
clickFun(graph, val) { clickFun(graph, val) {
console.log(graph, "双击获取值"); console.log(graph, "双击获取值");
this.newGraph = graph; this.newGraph = graph;
this.inputOutputFieldsFun()
console.log(val, "拿到form"); console.log(val, "拿到form");
this.fields = JSON.parse(val.fields) this.fields = JSON.parse(val.fields)
this.groupFile = JSON.parse(val.groupFile) this.groupFile = JSON.parse(val.groupFile)
...@@ -325,7 +366,7 @@ export default { ...@@ -325,7 +366,7 @@ export default {
addFieldDetermine() { addFieldDetermine() {
this.addField = !this.addField; this.addField = !this.addField;
if (this.dataStatus) { if (this.dataStatus) {
this.fields.push(this.fiel); this.groupFile.push(this.fiel);
} else { } else {
} }
}, },
......
...@@ -32,17 +32,13 @@ ...@@ -32,17 +32,13 @@
{{'范围(最小<= x<最大):'}} {{'范围(最小<= x<最大):'}}
<br> <br>
<el-button type="text" @click="addSheet(true)" style="margin: 10px" <el-button type="text" @click="addSheet(true)" style="margin: 10px"
>添加</el-button >添加</el-button>
>
<el-form-item> <el-form-item>
<el-table :data="rules" style="width: 100%"> <el-table :data="rules" style="width: 100%">
<el-table-column prop="lower_bound" label="下界"> </el-table-column> <el-table-column prop="lower_bound" label="下界"> </el-table-column>
<el-table-column prop="upper_bound" label="上界"> </el-table-column> <el-table-column prop="upper_bound" label="上界"> </el-table-column>
<el-table-column prop="value" label="值"> <el-table-column prop="value" label="值">
</el-table-column> </el-table-column>
<el-table-column label="操作"> <el-table-column label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
......
...@@ -1010,6 +1010,16 @@ ...@@ -1010,6 +1010,16 @@
:saveOutputDialog="saveOutputDialog" :saveOutputDialog="saveOutputDialog"
></addConstants> ></addConstants>
<!-- 数据校验 -->
<dataInspection
ref="dataInspection"
:form="form"
:nodeData="nodeData"
:dataInspectionDialog.sync="dataInspectionDialog"
:doubleClickCell="doubleClickCell"
:saveOutputDialog="saveOutputDialog"
></dataInspection>
<!-- 拆分字符串 --> <!-- 拆分字符串 -->
<splitFields <splitFields
ref="splitFields" ref="splitFields"
...@@ -1383,6 +1393,7 @@ import addSequence from "../appBulletFrame/addSequence"; //增加序列 ...@@ -1383,6 +1393,7 @@ import addSequence from "../appBulletFrame/addSequence"; //增加序列
import importXmlFile from "../appBulletFrame/importXmlFile"; //导出资源库到XML文件 import importXmlFile from "../appBulletFrame/importXmlFile"; //导出资源库到XML文件
import grouping from "../appBulletFrame/grouping"; //分组 import grouping from "../appBulletFrame/grouping"; //分组
import addConstants from "../appBulletFrame/addConstants"; //增加常量 import addConstants from "../appBulletFrame/addConstants"; //增加常量
import dataInspection from "../appBulletFrame/dataInspection" //数据校验
import splitFields from "../appBulletFrame/splitFields";//拆分字符串 import splitFields from "../appBulletFrame/splitFields";//拆分字符串
import numericalRange from "../appBulletFrame/numericalRange";//数值范围 import numericalRange from "../appBulletFrame/numericalRange";//数值范围
import stringOperation from "../appBulletFrame/stringOperation" //字符串操作 import stringOperation from "../appBulletFrame/stringOperation" //字符串操作
...@@ -1526,6 +1537,7 @@ export default { ...@@ -1526,6 +1537,7 @@ export default {
groupingDialog: false, //分组 groupingDialog: false, //分组
stringSubstitutionDialog: false, //字符串替换 stringSubstitutionDialog: false, //字符串替换
addConstantsDialog: false, //增加常量 addConstantsDialog: false, //增加常量
dataInspectionDialog:false,//数据校验
splitFieldsDialog:false,//拆分字符串 splitFieldsDialog:false,//拆分字符串
numericalRangeDialog:false,//数值范围 numericalRangeDialog:false,//数值范围
stringOperationDialog:false,//字符串操作 stringOperationDialog:false,//字符串操作
...@@ -1649,6 +1661,7 @@ export default { ...@@ -1649,6 +1661,7 @@ export default {
importXmlFile, //导出资源库到XML文件 importXmlFile, //导出资源库到XML文件
grouping, //分组 grouping, //分组
addConstants, //增加常量 addConstants, //增加常量
dataInspection,//数据校验
splitFields,//拆分字符串 splitFields,//拆分字符串
numericalRange,//数值范围 numericalRange,//数值范围
stringOperation,//字符串操作 stringOperation,//字符串操作
...@@ -2347,6 +2360,15 @@ export default { ...@@ -2347,6 +2360,15 @@ export default {
this.fieldFormat = res; this.fieldFormat = res;
}); });
if ( if (
(this.curFileType == "transformation" && cell.dis == "step138") ||
cell.value.attributes.ctype.value == "Validator"
) {
this.dataInspectionDialog = !this.dataInspectionDialog;
this.form = this.showDataFunc();
setTimeout(() => {
this.$refs.dataInspection.clickFun(this.graph, this.form);
}, 500);
} else if (
(this.curFileType == "transformation" && cell.dis == "step67") || (this.curFileType == "transformation" && cell.dis == "step67") ||
cell.value.attributes.ctype.value == "NumberRange" cell.value.attributes.ctype.value == "NumberRange"
) { ) {
......
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