表单查询完善
parent
fc245231f3
commit
52c8aa536c
|
|
@ -224,6 +224,11 @@
|
||||||
}
|
}
|
||||||
itemColumnChild.colProps.span = itemColumn.span;
|
itemColumnChild.colProps.span = itemColumn.span;
|
||||||
arr.push(itemColumnChild);
|
arr.push(itemColumnChild);
|
||||||
|
// arr.push({
|
||||||
|
// parentValue: index,
|
||||||
|
// ...itemColumnChild,
|
||||||
|
// show: index == 0 ? true : false,
|
||||||
|
// });
|
||||||
val.children.push(itemColumnChild);
|
val.children.push(itemColumnChild);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
@ -235,6 +240,11 @@
|
||||||
}
|
}
|
||||||
if (opt.ptype !== 'gridlayout') {
|
if (opt.ptype !== 'gridlayout') {
|
||||||
arr.push(opt);
|
arr.push(opt);
|
||||||
|
// arr.push({
|
||||||
|
// parentValue: index,
|
||||||
|
// ...opt,
|
||||||
|
// show: index == 0 ? true : false,
|
||||||
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
formColumns.value = arr;
|
formColumns.value = arr;
|
||||||
|
|
@ -388,7 +398,7 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
function tabsChange(e) {
|
async function tabsChange(e) {
|
||||||
const columns: FormSchema[] = [];
|
const columns: FormSchema[] = [];
|
||||||
tabsColumns.value.forEach((item) => {
|
tabsColumns.value.forEach((item) => {
|
||||||
item.children.forEach((val) => {
|
item.children.forEach((val) => {
|
||||||
|
|
@ -398,13 +408,18 @@
|
||||||
tabsColumns.value[e].children.forEach((item) => {
|
tabsColumns.value[e].children.forEach((item) => {
|
||||||
item.itemProps.hidden = false;
|
item.itemProps.hidden = false;
|
||||||
});
|
});
|
||||||
|
// formColumns.value.forEach((element) => {
|
||||||
|
// element.show = false;
|
||||||
|
// if (element.parentValue == e) {
|
||||||
|
// element.show = true;
|
||||||
|
// }
|
||||||
|
// });
|
||||||
tabsColumns.value.forEach((item) => {
|
tabsColumns.value.forEach((item) => {
|
||||||
item.children.forEach((val) => {
|
item.children.forEach((val) => {
|
||||||
columns.push(val);
|
columns.push(val);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
const obj = getFieldsValue();
|
const obj = await validate();
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
updateSchema(columns);
|
updateSchema(columns);
|
||||||
resetFields();
|
resetFields();
|
||||||
|
|
|
||||||
|
|
@ -616,12 +616,24 @@
|
||||||
}
|
}
|
||||||
if (columnObj.table.querys) {
|
if (columnObj.table.querys) {
|
||||||
columnObj.table.querys.forEach((item) => {
|
columnObj.table.querys.forEach((item) => {
|
||||||
searchFormSchema.push({
|
if (item.options) {
|
||||||
field: item.key,
|
searchFormSchema.push({
|
||||||
component: item.type || 'Input',
|
field: item.key,
|
||||||
label: item.label,
|
component: item.type || 'Input',
|
||||||
colProps: { span: 6 },
|
label: item.label,
|
||||||
});
|
colProps: { span: 6 },
|
||||||
|
componentProps: {
|
||||||
|
options: item.options,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
searchFormSchema.push({
|
||||||
|
field: item.key,
|
||||||
|
component: item.type || 'Input',
|
||||||
|
label: item.label,
|
||||||
|
colProps: { span: 6 },
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
callColumns.forEach((item) => {
|
callColumns.forEach((item) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue