Commit 23bdee92 by 莫晓莉

解决冲突

parents c2d434b0 7b0efbf0
......@@ -254,6 +254,17 @@ export function formatMapperLineTerminator(data){
//获取压缩格式类型
export function compressionProviderNames(data){
return request({
url: 'etlweb/system/compressionProviderNames',
data,
method: 'post'
})
}
//保存
export function save(data){
......
......@@ -34,7 +34,7 @@
</el-select> -->
</el-col>
<el-col class="line" :span="2">
<el-button size="mini" >编辑</el-button></el-col
<el-button size="mini" @click="dialogVisibleFourth = true">编辑</el-button></el-col
>
<el-col class="line" :span="2">
<el-button size="mini" @click="dialogVisibleFourth = true">新建</el-button></el-col
......@@ -43,7 +43,7 @@
<el-button size="mini">向导</el-button></el-col
>
<el-col class="line" :span="5">
<el-button size="mini" @click="SQLPopup()"
<el-button size="mini" @click="scanTree('')"
>获取SQL查询语句</el-button
></el-col
>
......@@ -83,7 +83,7 @@
</el-form-item>
</el-form>
<!--
<el-dialog
title="数据库浏览"
:visible.sync="browsing"
......@@ -101,11 +101,13 @@
<el-button @click="browsing = false">取 消</el-button>
<el-button type="primary" @click="browsing = false">确 定</el-button>
</span>
</el-dialog>
</el-dialog> -->
<estab-dialog ref="establishDia" :dialogVisibleFourth.sync='dialogVisibleFourth' @getSonValue="getSonValue" :listNames="listNames" :scanDialogVisible.sync='scanDialogVisible'  :form="newForm" :chooseType="chooseType" :chooseFlag.sync="chooseFlag"></estab-dialog>
<estab-dialog ref="establishDia" :dialogVisibleFourth.sync='dialogVisibleFourth' @getSonValue="getSonValue" :listNames="listNames"></estab-dialog>
</div>
</template>
......@@ -124,7 +126,8 @@ export default {
return {
browsing: false,
dialogVisibleFourth:false,
scanDialogVisible:false,
newForm:{},
form: {
wLazyConversion: false,
wVariables: false,
......@@ -138,23 +141,88 @@ export default {
children: "children",
label: "text",
},
dataBaseName:"",
curNode:{},
chooseType:"",
chooseFlag:false,
};
},
created() {
this.listDatabasesFun();
},
 // 监听编号好后获取选择的数据库的树形里列表
  watch: {
    dataBaseName:{
       handler (newValue, oldValue) {
        console.log('obj changed');
        if(newValue){
          this.$refs.establishDia.scanDialogOpen();
          this.chooseFlag=true;
        }
      },
      deep: true
    },
    // form(newValue, oldValue){
    //   this.form=newValue;
    // }
  },
methods: {
 //获取新建弹窗返回来的值
    getSonValue(res){
      if(typeof(res)=='string'){
        this.dataBaseName = res
         console.log('接收子组件的值1111111----',this.dataBaseName);
      }else if(typeof(res)=='object'){
        console.log('接收子组件的值55555----',res);
        this.curNode=res;
         // DOM 更新后
        // this.$nextTick(() => {
        //   this.form.text=this.curNode.data.text;
        //   // this.$refs.goal.values=this.curNode.data.text;
        //   // this.$refs.goal.refreshData(this.from)
        // })
//         this.$set(this.newForm,'text',this.curNode.data.text)
//         this.$forceUpdate()
        // this.form.text=this.curNode.data.text;
        console.log('chuanhuo=====', this.newForm);
      }else if(typeof(res)=='boolean'){
         this.dialogVisibleFourth=res;
         console.log('接收子组件的值2222222----',this.dialogVisibleFourth);
      }    
    },
   //浏览
scanTree(type){
      if(this.form.connection){       
        this.$refs.establishDia.database(this.form.connection);
        console.log('当前选中数据库***************',this.form.connection);
        if(this.form.connection){
          this.$refs.establishDia.scanDialogOpen();
          this.chooseFlag=true;
          this.chooseType=type;
        }         
      }else{
        this.$message.error('请选择数据库')
      }
      
    },
//获取新建弹窗返回来的值
getSonValue(res){
this.dialogVisibleFourth=res;
this.linkCheckedIdx=this.initlinkTypeIdx;//关闭弹窗后初始化选择oracle数据
this.methodHoverIdx=0;//关闭弹窗后初始化选择oracle数据对应第一条
this.methodCheckedIdx=0;//关闭弹窗后初始化选择oracle数据对应第一条
// this.addFlag=true;//增减变量改为编辑变量
},
// getSonValue(res){
// this.dialogVisibleFourth=res;
// this.linkCheckedIdx=this.initlinkTypeIdx;//关闭弹窗后初始化选择oracle数据
// this.methodHoverIdx=0;//关闭弹窗后初始化选择oracle数据对应第一条
// this.methodCheckedIdx=0;//关闭弹窗后初始化选择oracle数据对应第一条
// // this.addFlag=true;//增减变量改为编辑变量
// },
 //获取新建弹窗返回来的值
//查询已经建立的所有数据库列表
listNames(){
......@@ -223,28 +291,28 @@ let pam = new FormData(); // 创建form对象
},
loadNode(node, resolve) {
if (node.level === 0) {
return resolve([{ name: 'region' }]);
}
if (node.level > this.PopupFrom.length) return resolve([]);
// loadNode(node, resolve) {
// if (node.level === 0) {
// return resolve([{ name: 'region' }]);
// }
// if (node.level > this.PopupFrom.length) return resolve([]);
setTimeout(() => {
// setTimeout(() => {
const data = [{
// const data = [{
name: 'leaf',
leaf: true
}, {
name: 'zone'
}];
// name: 'leaf',
// leaf: true
// }, {
// name: 'zone'
// }];
resolve(data);
}, 500);
},
// resolve(data);
// }, 500);
// },
handleNodeClick(data) {
// handleNodeClick(data) {
// console.log(data);
// let pam = new FormData(); // 创建form对象
// pam.append("databaseInfo", JSON.stringify(this.library));
......@@ -256,7 +324,7 @@ let pam = new FormData(); // 创建form对象
// })
},
// },
......
......@@ -114,8 +114,8 @@
<el-form ref="form" :model="form" label-width="200px">
<el-form-item label="文件类型:">
<el-select v-model="form.fileType" style="width: 100%">
<el-option label="区域一" value="shanghai"></el-option>
<el-option label="区域二" value="beijing"></el-option>
<el-option label="CSV" value="CSV"></el-option>
<el-option label="Fixed" value="Fixed"></el-option>
</el-select>
</el-form-item>
......@@ -217,7 +217,7 @@
<el-select v-model="form.fileCompression" style="width: 100%">
<el-option
v-for="item in fieldFormat"
v-for="item in fieldCompress"
:key="item.index"
:label="item.name"
:value="item.name"
......@@ -685,7 +685,7 @@
<script>
import { valueFormat, valueMeta,formatMapperLineTerminator,availableCharsets } from "@/api/kettle/link";
import { valueFormat, valueMeta,formatMapperLineTerminator,availableCharsets,compressionProviderNames } from "@/api/kettle/link";
export default {
props: [""],
data() {
......@@ -713,6 +713,7 @@ export default {
metadataForm: {},
filterForm: {},
fieldFormat: {},
fieldCompress:{},
fieldType: {},
dataState: false,
fileType:[],
......@@ -727,9 +728,17 @@ export default {
this.valueMetaFun();
this.formatMapperLineTerminatorFun();
this.availableCharsetsFun();
this.compressionProviderNamesFun();
},
methods: {
compressionProviderNamesFun(){
compressionProviderNames().then(res=>{
this.fieldCompress = res
})
},
// 关闭弹框
handleClose(done) {
this.$confirm("确认关闭?")
......
......@@ -253,7 +253,8 @@
top="15%"
append-to-body
:close-on-click-modal="false"
:before-close="handleCloseTest">
:before-close="handleCloseTest"
>
<div class="table-container table-container-repos" style="height: 42vh">
{{ linkInfo }}
</div>
......@@ -273,7 +274,8 @@
top="7%"
append-to-body
:close-on-click-modal="false"
:before-close="handleCloseFeature">
:before-close="handleCloseFeature"
>
<el-table height="500" border :data="tableData" style="width: 100%">
<el-table-column
v-for="(col, index) in cols"
......@@ -300,7 +302,8 @@
append-to-body
:close-on-click-modal="false"
:before-close="handleCloseScan"
v-if="scanFlag">
v-if="scanFlag"
>
<!-- 文件夹存放区域start-->
<el-tree
:data="scanfileTreeList"
......
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