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