Commit fd881a76 authored by wuhao's avatar wuhao 🎯

asder

parent 4b5ff344
...@@ -1539,7 +1539,8 @@ function TableSelect({ item, value, onChange, params = {} }) { ...@@ -1539,7 +1539,8 @@ function TableSelect({ item, value, onChange, params = {} }) {
} }
/> />
); );
const Todo = (
const Todo = () => (
<EditTable <EditTable
actionRef={actionRef} actionRef={actionRef}
defaultValue={value} //调用接口合并初始值 defaultValue={value} //调用接口合并初始值
...@@ -1590,7 +1591,7 @@ function TableSelect({ item, value, onChange, params = {} }) { ...@@ -1590,7 +1591,7 @@ function TableSelect({ item, value, onChange, params = {} }) {
/> />
); );
const Done = ( const Done = () => (
<EditTable <EditTable
value={value} value={value}
rowKey={rowKey} rowKey={rowKey}
...@@ -1641,6 +1642,7 @@ function TableSelect({ item, value, onChange, params = {} }) { ...@@ -1641,6 +1642,7 @@ function TableSelect({ item, value, onChange, params = {} }) {
return ( return (
<div className="selecttable"> <div className="selecttable">
<Tabs <Tabs
destroyInactiveTabPane={true}
tabBarExtraContent={ tabBarExtraContent={
<div className="center"> <div className="center">
<Dropdown overlay={menu(value ?? [])}> <Dropdown overlay={menu(value ?? [])}>
...@@ -1663,10 +1665,12 @@ function TableSelect({ item, value, onChange, params = {} }) { ...@@ -1663,10 +1665,12 @@ function TableSelect({ item, value, onChange, params = {} }) {
} }
onChange={setactivetab} onChange={setactivetab}
items={[ items={[
{ label: '数据选择', key: 1, children: activetab == 1 && Todo }, { label: '数据选择', key: 1 },
{ label: `选择结果${value?.length ?? 0}`, key: 2, children: activetab == 2 && Done }, { label: `选择结果${value?.length ?? 0}`, key: 2 },
]} ]}
/> />
{activetab == 1 && <Todo />}
{activetab == 2 && <Done />}
</div> </div>
); );
} }
...@@ -1684,6 +1688,9 @@ function LinkSelectList({ item, colProps, formRef, name, curindex }) { ...@@ -1684,6 +1688,9 @@ function LinkSelectList({ item, colProps, formRef, name, curindex }) {
let reversekey = !curlinkparams[key] ? key : curlinkparams[key]; let reversekey = !curlinkparams[key] ? key : curlinkparams[key];
result[reversekey] = params[key]; result[reversekey] = params[key];
} }
console.log('====================================');
console.log(result);
console.log('====================================');
return ( return (
<Form.Item name={curkey} label={item.title} {...item.formItemProps}> <Form.Item name={curkey} label={item.title} {...item.formItemProps}>
<TableSelect item={item} params={result} /> <TableSelect item={item} params={result} />
......
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