Commit ac711e87 by 莫晓莉

mxl---3.26输出弹窗组件

parent 65e63e56
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<el-form-item label="目的模式:" > <el-form-item label="目的模式:" >
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="20"> <el-col :span="20">
<el-input v-model="form.name"></el-input> <el-input v-model="newForm.schema"></el-input>
</el-col> </el-col>
<el-col class="line" :span="3"> <el-col class="line" :span="3">
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<el-form-item label="目标表:" prop="text"> <el-form-item label="目标表:" prop="text">
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="20"> <el-col :span="20">
<el-input ref="goal" v-model="newForm.text"></el-input> <el-input ref="goal" v-model="newForm.table"></el-input>
</el-col> </el-col>
<el-col class="line" :span="3"> <el-col class="line" :span="3">
...@@ -82,26 +82,34 @@ export default { ...@@ -82,26 +82,34 @@ export default {
getSonValue(res){ getSonValue(res){
if(typeof(res)=='string'){ if(typeof(res)=='string'){
this.dataBaseName=res this.dataBaseName=res
console.log('接收子组件的值1111111----',this.dataBaseName); console.log('接收子组件的值1111111----',this.dataBaseName);
}else if(typeof(res)=='object'){ }else if(typeof(res)=='object'){
console.log('接收子组件的值55555----',res); console.log('接收子组件的值55555----',res);
this.curNode=res; this.curNode=res;
// DOM 更新后 // this.$refs.goal.refreshData(this.from)
// this.$nextTick(() => { if(this.chooseType=='表'){
// this.form.text=this.curNode.data.text; console.log('进入表----',res);
// // this.$refs.goal.values=this.curNode.data.text; this.$set(this.newForm,'table',this.curNode.data.text);
// // this.$refs.goal.refreshData(this.from) this.$forceUpdate()
// }) }
this.$set(this.newForm,'text',this.curNode.data.text) console.log('this.curNode.data.leaf=====:',this.curNode.data.leaf);
this.$forceUpdate() if(this.chooseType=='模式'&& this.curNode.data.leaf && this.curNode.parent.data.text ==this.chooseType){
// this.form.text=this.curNode.data.text; console.log('进入模式----',res);
this.$set(this.newForm,'schema',this.curNode.data.text);
this.$forceUpdate()
}
// this.$forceUpdate()
console.log('chuanhuo=====', this.newForm); console.log('chuanhuo=====', this.newForm);
// 发射回父组件
this.$emit("update:form", this.newForm);
}else if(typeof(res)=='boolean'){ }else if(typeof(res)=='boolean'){
this.dialogVisibleFourth=res; this.dialogVisibleFourth=res;
console.log('接收子组件的值2222222----',this.dialogVisibleFourth); console.log('接收子组件的值2222222----',this.dialogVisibleFourth);
} }
}, },
//查询已经建立的所有数据库列表 //查询已经建立的所有数据库列表
listNames(){ listNames(){
listNames().then(res=>{ listNames().then(res=>{
if (res) { if (res) {
...@@ -123,6 +131,7 @@ export default { ...@@ -123,6 +131,7 @@ export default {
selectNameFunc(e){ selectNameFunc(e){
console.log('当前选中的数',e); console.log('当前选中的数',e);
console.log('当前选中的数-===',this.selectName); console.log('当前选中的数-===',this.selectName);
this.newForm.connection=this.selectName;
}, },
//点击选择获取已经创建的数据库列表 //点击选择获取已经创建的数据库列表
clickFunc(){ clickFunc(){
...@@ -138,7 +147,7 @@ export default { ...@@ -138,7 +147,7 @@ export default {
}, },
//浏览 //浏览
scanTree(type){ scanTree(type){
if(this.selectName){ if(this.selectName){
this.$refs.establishDia.database(this.selectName); this.$refs.establishDia.database(this.selectName);
console.log('当前选中数据库***************',this.dataBaseName); console.log('当前选中数据库***************',this.dataBaseName);
if(this.dataBaseName){ if(this.dataBaseName){
...@@ -165,9 +174,7 @@ export default { ...@@ -165,9 +174,7 @@ export default {
}, },
deep: true deep: true
}, },
// form(newValue, oldValue){
// this.form=newValue;
// }
}, },
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<div class="left-container mybox"> <div class="left-container mybox">
<ul class="infinite-list"> <ul class="infinite-list">
<li <li
@click="chooseType(index)" @click="chooseBaseType(index)"
:class="[index == nowTypeIndex ? 'type-checked' : '']" :class="[index == nowTypeIndex ? 'type-checked' : '']"
v-for="(item, index) in linkType" v-for="(item, index) in linkType"
:key="index" :key="index"
...@@ -474,7 +474,7 @@ export default { ...@@ -474,7 +474,7 @@ export default {
handleCloseFourth() { handleCloseFourth() {
this.$emit("getSonValue", false); //组件要传回父组件的值,关闭弹窗 this.$emit("getSonValue", false); //组件要传回父组件的值,关闭弹窗
}, },
chooseType(index) { chooseBaseType(index) {
this.nowTypeIndex = index; this.nowTypeIndex = index;
}, },
...@@ -832,7 +832,7 @@ export default { ...@@ -832,7 +832,7 @@ export default {
console.log('点击当前节点data===',data); console.log('点击当前节点data===',data);
// var arr=[{node:node}] // var arr=[{node:node}]
this.curChooseNode=node; this.curChooseNode=node;
// this.$emit("getSonValue", this.curChooseNode); //组件要传回父组件的值,关闭弹窗 this.$emit("getSonValue", this.curChooseNode); //组件要传回父组件的值,关闭弹窗
// this.nodePath=data.path;//当前选择数 // this.nodePath=data.path;//当前选择数
// this.curNodeIconCls=data.iconCls;//当前选中节点 // this.curNodeIconCls=data.iconCls;//当前选中节点
// console.log('当前节点的文件夹路径:',this.nodePath); // console.log('当前节点的文件夹路径:',this.nodePath);
......
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