Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ems3.3
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wuhao
ems3.3
Commits
fd881a76
Commit
fd881a76
authored
Feb 03, 2023
by
wuhao
🎯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asder
parent
4b5ff344
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
FormItems.jsx
src/components/InitForm/FormItems.jsx
+11
-4
No files found.
src/components/InitForm/FormItems.jsx
View file @
fd881a76
...
...
@@ -1539,7 +1539,8 @@ function TableSelect({ item, value, onChange, params = {} }) {
}
/>
);
const Todo = (
const Todo = () => (
<EditTable
actionRef={actionRef}
defaultValue={value} //调用接口合并初始值
...
...
@@ -1590,7 +1591,7 @@ function TableSelect({ item, value, onChange, params = {} }) {
/>
);
const Done = (
const Done = (
) => (
<EditTable
value={value}
rowKey={rowKey}
...
...
@@ -1641,6 +1642,7 @@ function TableSelect({ item, value, onChange, params = {} }) {
return (
<div className="selecttable">
<Tabs
destroyInactiveTabPane={true}
tabBarExtraContent={
<div className="center">
<Dropdown overlay={menu(value ?? [])}>
...
...
@@ -1663,10 +1665,12 @@ function TableSelect({ item, value, onChange, params = {} }) {
}
onChange={setactivetab}
items={[
{ label: '数据选择', key: 1
, children: activetab == 1 && Todo
},
{ label: `
选择结果
$
{
value
?.
length
??
0
}
项
`, key: 2
, children: activetab == 2 && Done
},
{ label: '数据选择', key: 1 },
{ label: `
选择结果
$
{
value
?.
length
??
0
}
项
`, key: 2 },
]}
/>
{activetab == 1 && <Todo />}
{activetab == 2 && <Done />}
</div>
);
}
...
...
@@ -1684,6 +1688,9 @@ function LinkSelectList({ item, colProps, formRef, name, curindex }) {
let reversekey = !curlinkparams[key] ? key : curlinkparams[key];
result[reversekey] = params[key];
}
console.log('====================================');
console.log(result);
console.log('====================================');
return (
<Form.Item name={curkey} label={item.title} {...item.formItemProps}>
<TableSelect item={item} params={result} />
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment