|
|
@ -273,12 +273,17 @@ const props = defineProps({ |
|
|
|
required: false, |
|
|
|
default: false |
|
|
|
}, |
|
|
|
// TableForm 的第几列按钮 |
|
|
|
// TableForm 的第几列按钮 (后续用 fieldTableColumn替换 ,indexTableColumn容易出问题) |
|
|
|
indexTableColumn :{ |
|
|
|
type: Number, |
|
|
|
required: false, |
|
|
|
default: 0 |
|
|
|
}, |
|
|
|
fieldTableColumn:{ |
|
|
|
type: String, |
|
|
|
required: false, |
|
|
|
default: '' |
|
|
|
}, |
|
|
|
//表单中展示的数据,需要用searchTable中字段计算 |
|
|
|
/***[{ |
|
|
|
formField:form中对应的field, |
|
|
@ -385,11 +390,21 @@ const opensearchTable = ( |
|
|
|
} else { |
|
|
|
// 扩展 转换为筛选条件进行查询 |
|
|
|
if (searchCondition[i].isSearch) { |
|
|
|
if (searchCondition[i].isFormModel) { |
|
|
|
//用formModel中的值 |
|
|
|
filters.push({ |
|
|
|
action: searchCondition[i].action, |
|
|
|
column: searchCondition[i].key, |
|
|
|
value: formRef.value.formModel[searchCondition[i].value] |
|
|
|
}) |
|
|
|
}else{ |
|
|
|
filters.push({ |
|
|
|
action: searchCondition[i].action, |
|
|
|
column: searchCondition[i].key, |
|
|
|
value: searchCondition[i].value |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
_searchCondition[searchCondition[i].key] = searchCondition[i].value |
|
|
|
} |
|
|
@ -496,7 +511,13 @@ const handleAddTable = () => { |
|
|
|
tableAllSchemas.value.tableFormColumns.forEach(item => { |
|
|
|
tableFormKeys[item.field] = item.default ? item.default : '' |
|
|
|
}) |
|
|
|
if(props.fieldTableColumn!=''){ |
|
|
|
console.log('handleAddTable',tableAllSchemas.value.tableFormColumns.find(item=>item.field==props.fieldTableColumn)) |
|
|
|
inpuFocus(tableAllSchemas.value.tableFormColumns.find(item=>item.field==props.fieldTableColumn),tableFormKeys,0) |
|
|
|
}else{ |
|
|
|
inpuFocus(tableAllSchemas.value.tableFormColumns[props.indexTableColumn],tableFormKeys,0) |
|
|
|
|
|
|
|
} |
|
|
|
}else{ |
|
|
|
emit('handleAddTable') |
|
|
|
} |
|
|
|