Commit e0ec5bf7 by 李耀锟

更新

parent 90b38d65
......@@ -232,6 +232,28 @@ export function listDatabases(data){
//获取SQL查询语句
export function tableFields(data){
return request({
url: 'etlweb/trans/tableFields',
data,
method: 'post'
})
}
//文本输入格式
export function formatMapperLineTerminator(data){
return request({
url: 'etlweb/system/formatMapperLineTerminator',
data,
method: 'post'
})
}
......
......@@ -12,7 +12,7 @@
size="small"
type="primary"
style="margin: 10px"
@click="addMetadata"
@click="customClick(true)"
>添加元数据</el-button
>
<el-table :data="tableData" border style="width: 100%">
......@@ -30,7 +30,7 @@
<el-table-column label="操作" width="100px">
<template slot-scope="scope">
<el-button
@click="customClick(scope.row)"
@click="customClick(false,scope.row)"
type="text"
size="small"
>编辑</el-button
......@@ -51,7 +51,7 @@
size="small"
type="primary"
style="margin: 10px"
@click="addData"
@click="valueClick(true)"
>添加数据</el-button
>
<el-table :data="data" border style="width: 100%">
......@@ -66,7 +66,7 @@
<el-table-column label="操作" width="100px">
<template slot-scope="scope">
<el-button
@click="valueClick(scope.row)"
@click="valueClick(false,scope.row)"
type="text"
size="small"
>编辑</el-button
......@@ -151,7 +151,7 @@
<span slot="footer" class="dialog-footer">
<el-button @click="metadata = false">取 消</el-button>
<el-button type="primary" @click="metadata = false">确 定</el-button>
<el-button type="primary" @click="addDetermine">确 定</el-button>
</span>
</el-dialog>
......@@ -183,11 +183,13 @@
<script>
import { valueFormat, valueMeta } from "@/api/kettle/link";
export default {
props: [""],
// props: [""],
data() {
return {
form: {},
metadataForm: {},
metadataForm: {
},
metadata: false,
addValue: false,
ValueForm: {},
......@@ -195,29 +197,23 @@ export default {
data: [],
tableData: [
{
date: "2016-05-02",
name: "王小虎",
address: "上海市普陀区金沙江路 1518 弄",
},
{
date: "2016-05-04",
name: "456456",
address: "上海市普陀区金沙江路 1517 弄",
},
{
date: "2016-05-01",
name: "4654",
address: "上海市普陀区金沙江路 1519 弄",
},
{
date: "2016-05-03",
name: "710245",
address: "上海市普陀区金沙江路 1516 弄",
},
],
fieldFormat: {},
fieldType: {},
valueForms:{} //
dataStatus:false,
};
},
......@@ -228,23 +224,55 @@ export default {
methods: {
addDetermine(){
this.metadata = !this.metadata
if (this.dataStatus) {
this.tableData.push(this.metadataForm)
}else{
addValuePush(){
this.addValue = !this.addValue
this.data.push(this.ValueForm)
}
},
addData() {
this.addValue = !this.addValue;
addValuePush(){
this.addValue = !this.addValue
if (this.dataStatus) {
this.data.push(this.ValueForm)
}else{
}
},
valueClick(val) {
valueClick(state,val) {
this.addValue = !this.addValue
this.metadataForm = val;
this.dataStatus = state
if (state) {
this.ValueForm = {};
}else{
this.ValueForm = val;
}
},
addMetadata() {
customClick(state,val) {
this.metadata = !this.metadata;
this.metadataForm = [];
this.dataStatus = state
if (state) {
this.metadataForm = {};
}else{
this.metadataForm = val;
}
},
// 关闭弹框
......@@ -264,10 +292,7 @@ export default {
deletecustom(index, rows) {
rows.splice(index, 1);
},
customClick(val) {
this.metadata = !this.metadata;
this.metadataForm = val;
},
valueFormatFun() {
let pamer2 = new FormData(); // 创建form对象
......
<template>
<div class="customConstant">
<el-form ref="form" :model="form" label-width="120px">
<el-form-item label="步骤名称:">
<el-input v-model="form.name"></el-input>
</el-form-item>
</el-form>
<el-form-item label="步骤名称:">
<el-input v-model="form.name"></el-input>
</el-form-item>
</el-form>
<el-card class="box-card">
<el-card class="box-card">
<el-form ref="form" :model="form" label-width="250px">
<el-form-item label="限制:">
<el-input v-model="form.rowLimit"></el-input>
</el-form-item>
<el-form-item label="Never stop generating rows:">
<el-checkbox v-model="form.neverEnding"></el-checkbox>
</el-form-item>
<el-form-item label="Never stop generating rows:">
<el-checkbox v-model="form.neverEnding"></el-checkbox>
</el-form-item>
<el-form-item label="Interval in ms(delay):">
<el-input v-model="form.intervalInMs" :disabled="!form.neverEnding"></el-input>
<el-form-item label="Interval in ms(delay):">
<el-input
v-model="form.intervalInMs"
:disabled="!form.neverEnding"
></el-input>
</el-form-item>
<el-form-item label="Current row time field name:">
<el-input v-model="form.rowTimeField" :disabled="!form.neverEnding"></el-input>
<el-input
v-model="form.rowTimeField"
:disabled="!form.neverEnding"
></el-input>
</el-form-item>
<el-form-item label="Previous row time field name:">
<el-input v-model="form.lastTimeField" :disabled="!form.neverEnding"></el-input>
<el-input
v-model="form.lastTimeField"
:disabled="!form.neverEnding"
></el-input>
</el-form-item>
</el-form>
</el-card>
<br>
<el-card class="box-card">
<el-button size="small" type="primary" style="margin: 10px"
@click="addField">添加字段</el-button
>
<el-table :data="tableData" border style="width: 100%">
<el-table-column prop="name" label="名称"> </el-table-column>
<el-table-column prop="type" label="类型"> </el-table-column>
<el-table-column prop="format" label="格式"> </el-table-column>
<el-table-column prop="length" label="长度"> </el-table-column>
<el-table-column prop="precision" label="精度"> </el-table-column>
<el-table-column prop="currencyType" label="货币类型">
</el-table-column>
<el-table-column prop="decimal" label="小数"> </el-table-column>
<el-table-column prop="group" label="分组"> </el-table-column>
<el-table-column prop="value" label="值"> </el-table-column>
<el-table-column prop="nullable" label="设为空?"> </el-table-column>
<el-table-column label="操作" width="100px">
<template slot-scope="scope">
<el-button @click="customClick(scope.row)" type="text" size="small"
>编辑</el-button
>
<el-button
type="text"
size="small"
@click="deletecustom(scope.$index, tableData)"
>删除</el-button
>
</template>
</el-table-column>
</el-table>
</el-card>
</el-card>
<br />
<el-card class="box-card">
<el-button
size="small"
type="primary"
style="margin: 10px"
@click="addField(true)"
>添加字段</el-button
>
<el-table :data="tableData" border style="width: 100%">
<el-table-column prop="name" label="名称"> </el-table-column>
<el-table-column prop="type" label="类型"> </el-table-column>
<el-table-column prop="format" label="格式"> </el-table-column>
<el-table-column prop="length" label="长度"> </el-table-column>
<el-table-column prop="precision" label="精度"> </el-table-column>
<el-table-column prop="currencyType" label="货币类型">
</el-table-column>
<el-table-column prop="decimal" label="小数"> </el-table-column>
<el-table-column prop="group" label="分组"> </el-table-column>
<el-table-column prop="value" label="值"> </el-table-column>
<el-table-column prop="nullable" label="设为空?"> </el-table-column>
<el-table-column label="操作" width="100px">
<template slot-scope="scope">
<el-button
@click="addField(false, scope.row)"
type="text"
size="small"
>编辑</el-button
>
<el-button
type="text"
size="small"
@click="deletecustom(scope.$index, tableData)"
>删除</el-button
>
</template>
</el-table-column>
</el-table>
</el-card>
<el-dialog
title="添加字段"
......@@ -106,23 +113,23 @@
</el-select>
</el-form-item>
<el-form-item label="长度:">
<el-form-item label="长度:">
<el-input v-model="metadataForm.length"></el-input>
</el-form-item>
<el-form-item label="精度:">
<el-form-item label="精度:">
<el-input v-model="metadataForm.precision"></el-input>
</el-form-item>
<el-form-item label="货币类型:">
<el-form-item label="货币类型:">
<el-input v-model="metadataForm.currencyType"></el-input>
</el-form-item>
<el-form-item label="小数:">
<el-form-item label="小数:">
<el-input v-model="metadataForm.decimal"></el-input>
</el-form-item>
<el-form-item label="分组:">
<el-form-item label="分组:">
<el-input v-model="metadataForm.group"></el-input>
</el-form-item>
......@@ -130,39 +137,33 @@
<el-input v-model="metadataForm.value"></el-input>
</el-form-item>
<el-form-item label="设为空?:">
<el-select v-model="metadataForm.nullable" style="width: 100%">
<el-option label="非空" value="0"></el-option>
<el-option label="空" value="1"></el-option>
</el-select>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="metadata = false">取 消</el-button>
<el-button type="primary" @click="metadata = false">确 定</el-button>
<el-button type="primary" @click="addMetadata">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { valueFormat,valueMeta } from "@/api/kettle/link";
import { valueFormat, valueMeta } from "@/api/kettle/link";
export default {
props: ["custom"],
data() {
return {
form:{},
metadataForm:{},
metadata:false,
form: {},
metadataForm: {},
metadata: false,
activeName: "first",
data:[
],
data: [],
tableData: [
{
date: "2016-05-02",
......@@ -185,8 +186,9 @@ export default {
address: "上海市普陀区金沙江路 1516 弄",
},
],
fieldFormat:{},
fieldType:{},
fieldFormat: {},
fieldType: {},
dataState: false,
};
},
......@@ -197,13 +199,28 @@ export default {
methods: {
addMetadata(){
this.metadata = !this.metadata
if (this.dataState) {
this.tableData.push(this.metadataForm)
}else{
addField(){
this.metadata = !this.metadata;
this.metadataForm = [];
},
// 关闭弹框
}
},
addField(state, val) {
this.metadata = !this.metadata;
this.dataState = state;
if (state) {
this.metadataForm = {};
} else {
this.metadataForm = val;
}
},
// 关闭弹框
handleClose(done) {
this.$confirm("确认关闭?")
.then((_) => {
......@@ -212,30 +229,23 @@ addField(){
.catch((_) => {});
},
deletecustom(index, rows) {
deletecustom(index, rows) {
rows.splice(index, 1);
},
customClick(val) {
this.metadata = !this.metadata;
this.metadataForm = val;
},
valueFormatFun() {
let pamer2 = new FormData(); // 创建form对象
pamer2.append("valueType","all");
let pamer2 = new FormData(); // 创建form对象
pamer2.append("valueType", "all");
valueFormat(pamer2).then((res) => {
this.fieldFormat = res;
});
},
valueMetaFun(){
valueMeta().then(res=>{
this.fieldType = res
})
valueMetaFun() {
valueMeta().then((res) => {
this.fieldType = res;
});
},
},
};
</script>
......
......@@ -9,7 +9,7 @@
</el-form>
<el-form ref="form" :model="form" label-width="0px">
<el-button type="primary" @click="addSheet" style="margin: 10px"
<el-button type="primary" @click="addSheet(true)" style="margin: 10px"
>添加字段</el-button
>
<el-form-item>
......@@ -21,7 +21,7 @@
<el-table-column label="操作">
<template slot-scope="scope">
<el-button
@click="handleClick(scope.row)"
@click="addSheet(false,scope.row)"
type="text"
size="small"
>编辑</el-button
......@@ -65,7 +65,7 @@
<span slot="footer" class="dialog-footer">
<el-button @click="addField = false">取 消</el-button>
<el-button type="primary" @click="addField = false">确 定</el-button>
<el-button type="primary" @click="addFieldDetermine">确 定</el-button>
</span>
</el-dialog>
</div>
......@@ -98,6 +98,10 @@ export default {
},
],
type: {},
dataStatus:false,
};
},
......@@ -106,6 +110,16 @@ export default {
},
methods: {
addFieldDetermine(){
this.addField = !this.addField
if (this.dataStatus) {
this.tableData.push(this.form)
}else{
}
},
// 关闭弹框
handleClose(done) {
this.$confirm("确认关闭?")
......@@ -115,17 +129,20 @@ export default {
.catch((_) => {});
},
handleClick(val) {
this.addField = !this.addField;
this.form = val;
},
deleteRow(index, rows) {
rows.splice(index, 1);
},
addSheet() {
addSheet(state,val) {
this.addField = !this.addField;
this.form = {};
this.dataStatus = state
if (state) {
this.form = {};
}else{
this.form = val;
}
},
systemDataTypesFun() {
......
......@@ -8,7 +8,7 @@
</el-form>
<el-form ref="form" :model="form" label-width="0px">
<el-button type="primary" @click="addSheet" style="margin: 10px"
<el-button type="primary" @click="addSheet(true)" style="margin: 10px"
>添加字段</el-button
>
<el-form-item>
......@@ -24,7 +24,7 @@
<el-table-column label="操作">
<template slot-scope="scope">
<el-button
@click="handleClick(scope.row)"
@click="addSheet(false,scope.row)"
type="text"
size="small"
>编辑</el-button
......@@ -70,7 +70,7 @@
<span slot="footer" class="dialog-footer">
<el-button @click="addField = false">取 消</el-button>
<el-button type="primary" @click="addField = false">确 定</el-button>
<el-button type="primary" @click="addFieldState">确 定</el-button>
</span>
</el-dialog>
</div>
......@@ -102,7 +102,7 @@ export default {
},
],
random:{},
dataState:false,
addField:false,
};
},
......@@ -113,9 +113,22 @@ export default {
methods: {
addSheet() {
addSheet(state,val) {
this.addField = !this.addField;
this.form = {};
this.dataState = state
if (state) {
this.form = {};
}else{
this.form = val;
}
},
addFieldState(){
this.addField = !this.addField
if (this.dataState) {
this.tableData.push(this.form)
}
},
......@@ -125,10 +138,7 @@ export default {
});
},
handleClick(val) {
this.addField = !this.addField;
this.form = val;
},
deleteRow(index, rows) {
rows.splice(index, 1);
......
......@@ -96,10 +96,6 @@
@node-click="handleNodeClick"
></el-tree>
<span slot="footer" class="dialog-footer">
<el-button @click="browsing = false">取 消</el-button>
<el-button type="primary" @click="browsing = false">确 定</el-button>
......@@ -109,7 +105,7 @@
</template>
<script>
import { listNames, explorer, listDatabases } from "@/api/kettle/link";
import { tableFields, explorer, listDatabases } from "@/api/kettle/link";
export default {
props: ["connectionNode"], //从父组件传过来的值
......@@ -230,12 +226,11 @@ let pam = new FormData(); // 创建form对象
handleClose(done) {
this.browsing = !this.browsing;
// this.$confirm("确认关闭?")
// .then((_) => {
// done();
// })
// .catch((_) => {});
this.$confirm("确认关闭?")
.then((_) => {
done();
})
.catch((_) => {});
},
listDatabasesFun() {
......
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