|
@@ -150,6 +150,9 @@ export default {
|
|
|
dtName: '',
|
|
|
// 下拉框动态数据
|
|
|
dynamicData: {},
|
|
|
+ row: null,
|
|
|
+ myContion:null,
|
|
|
+ preRow:{}
|
|
|
};
|
|
|
},
|
|
|
|
|
@@ -197,6 +200,7 @@ export default {
|
|
|
// 请求数据
|
|
|
async gettableListHandler(tableKey, paramsContion = [], defaultVal ={}){
|
|
|
const res = await dragTableInfo({queryMap: {tableKey : tableKey }})
|
|
|
+ console.log(123456);
|
|
|
this.getTableHandle(res, paramsContion = [],defaultVal = {})
|
|
|
},
|
|
|
async getTableHandle(res){
|
|
@@ -235,9 +239,14 @@ export default {
|
|
|
if(this.newsort == 0){
|
|
|
this.getDataHandler()
|
|
|
// this.queryParams.queryMap.sqlkey = this.templateInfo.template.sqlKey;
|
|
|
+ }else{
|
|
|
+
|
|
|
+ if(this.myContion){
|
|
|
+ this.getDataHandler(this.myContion,this.preRow)
|
|
|
+ }
|
|
|
}
|
|
|
let k;
|
|
|
-
|
|
|
+
|
|
|
// console.log('conditions', this.tableCondition);
|
|
|
this.contion = this.templateInfo.template.dtTableName + '.' + this.templateInfo.template.primaryKey
|
|
|
// this.tableCondition.forEach((item, i) => {
|
|
@@ -258,7 +267,9 @@ export default {
|
|
|
// 获取表数据
|
|
|
async getDataHandler(contion, list){
|
|
|
// console.log(contion);
|
|
|
- // console.log(list);
|
|
|
+ this.myContion=contion;
|
|
|
+ this.preRow=list;
|
|
|
+ console.log(list);
|
|
|
if(contion){
|
|
|
let key = contion.split('.')
|
|
|
this.queryParams.queryMap['#{' + contion] = "'" + list[key[1]] + "'";
|
|
@@ -304,6 +315,7 @@ export default {
|
|
|
},
|
|
|
// 调用父组件方法更新表格数据
|
|
|
handleCurrentChange(row,event,column,val) {
|
|
|
+ this.row = row
|
|
|
// console.log(row);
|
|
|
this.$emit(
|
|
|
"updateData",
|
|
@@ -334,6 +346,9 @@ export default {
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
+ getNextCardData(){
|
|
|
+ this.handleCurrentChange(this.row)
|
|
|
+ },
|
|
|
// 使用提交数据类型的按钮获取数据
|
|
|
tempSubBtn(getData) {
|
|
|
getData()
|
|
@@ -388,10 +403,13 @@ export default {
|
|
|
this.$modal.msgError("添加失败");
|
|
|
}
|
|
|
}
|
|
|
- this.tableList = []
|
|
|
- this.gettableListHandler(this.tableKey)
|
|
|
+ // this.tableList = []
|
|
|
+ this.$emit('getChildData', this.index)
|
|
|
+ // this.getDataHandler(this.contion, this.row)
|
|
|
+ // this.gettableListHandler(this.tableKey)
|
|
|
this.defaultValue = {};
|
|
|
this.open = false;
|
|
|
+
|
|
|
})
|
|
|
.catch((res) => {
|
|
|
console.log(res)
|