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
b2288f17
Commit
b2288f17
authored
Sep 01, 2023
by
左玲玲
😬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1111
parent
355184c3
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
43 deletions
+36
-43
FormItems.jsx
src/components/InitForm/FormItems.jsx
+3
-3
index.jsx
src/components/InitForm/index.jsx
+29
-37
columns.js
src/pages/setting/users/columns.js
+1
-0
columns.js
src/pages/system/field/columns.js
+1
-2
index.jsx
src/pages/system/field/index.jsx
+2
-1
No files found.
src/components/InitForm/FormItems.jsx
View file @
b2288f17
...
...
@@ -585,7 +585,7 @@ function LinkSelect({ item, colProps, formRef, name, curindex }) {
formRef?.current?.setFieldsValue({ [curkey]: ifclean });
}
return item.showAll
&& res?.data?.dataList?.length > 0 ? [{ label: '全部', key: 'all' }, ...res?.data?.dataList
] : [];
return item.showAll
? [{ label: '全部', value: 'all' }, ...(res?.data?.dataList ?? [])
] : [];
}}
showSearch
/>
...
...
@@ -604,13 +604,13 @@ function NolinkSelect({ item, colProps }) {
if (Array.isArray(curoption)) {
options = {
options: item.showAll
&& curoption?.length > 0 ? [{ label: '全部', key
: 'all' }] : [...curoption],
options: item.showAll
? [{ label: '全部', value
: 'all' }] : [...curoption],
};
} else if (curoption) {
options = {
request: async (params) => {
let list = await doFetch({ url: curoption?.path, params: curoption?.params });
return item.showAll
&& list?.data?.dataList?.length > 0 ? [{ label: '全部', key: 'all' }, ...list?.data?.dataList
] : [];
return item.showAll
? [{ label: '全部', value: 'all' }, ...(list?.data?.dataList ?? [])
] : [];
},
};
}
...
...
src/components/InitForm/index.jsx
View file @
b2288f17
...
...
@@ -33,14 +33,14 @@ let FormRender = memo(({ fields = [], colProps, proformRef }) => {
item
.
formItemProps
=
item
.
formItemProps
??
{
rules
:
[]
};
if
(
item
.
valueType
==
'split'
)
{
return
(
<
div
className=
{
styles
.
title
}
style=
{
{
borderWidth
:
index
==
0
?
0
:
1
}
}
>
<
div
key=
{
index
}
className=
{
styles
.
title
}
style=
{
{
borderWidth
:
index
==
0
?
0
:
1
}
}
>
{
item
.
title
}
</
div
>
);
}
if
(
item
?.
valueType
==
'nosubmit'
)
{
return
(
<
Col
{
...
(
item
.
colProps
??
{
span
:
12
})}
style=
{
{
marginBottom
:
24
}
}
>
<
Col
key=
{
index
}
{
...
(
item
.
colProps
??
{
span
:
12
})}
style=
{
{
marginBottom
:
24
}
}
>
<
label
style=
{
{
marginBottom
:
8
,
display
:
'block'
}
}
>
{
item
?.
title
}
</
label
>
<
Input
disabled
value=
{
item
?.
initialValue
}
/>
</
Col
>
...
...
@@ -49,7 +49,7 @@ let FormRender = memo(({ fields = [], colProps, proformRef }) => {
if
(
hideInForm
&&
Object
.
keys
(
hideInForm
))
{
return
(
<
ProFormDependency
name=
{
Object
.
keys
(
hideInForm
)
}
>
<
ProFormDependency
key=
{
index
}
name=
{
Object
.
keys
(
hideInForm
)
}
>
{
(
params
)
=>
{
let
ifs
=
true
;
let
res
=
Object
.
keys
(
hideInForm
).
map
((
its
)
=>
{
...
...
@@ -64,31 +64,23 @@ let FormRender = memo(({ fields = [], colProps, proformRef }) => {
if
(
ifs
)
{
return
;
}
else
{
return
(
<>
{
createElement
(
FormItems
[
key
],
{
return
createElement
(
FormItems
[
key
],
{
item
:
item
,
colProps
:
colProps
,
key
:
item
.
dataIndex
,
formRef
:
proformRef
,
})
}
</>
);
});
}
}
}
</
ProFormDependency
>
);
}
else
{
return
(
<>
{
createElement
(
FormItems
[
key
],
{
return
createElement
(
FormItems
[
key
],
{
item
:
item
,
colProps
:
colProps
,
key
:
item
.
dataIndex
,
formRef
:
proformRef
,
})
}
</>
);
});
}
})
}
</>
...
...
src/pages/setting/users/columns.js
View file @
b2288f17
...
...
@@ -236,6 +236,7 @@ function getcolumns(setDrawer, ifs, formRef) {
searchKey
:
'factoryNames'
,
searchValueType
:
'input'
,
options
:
{
path
:
'/auth/sysFactory/getAllFactorySelection'
,
params
:
{}
},
showAll
:
true
},
{
title
:
'负责车间'
,
...
...
src/pages/system/field/columns.js
View file @
b2288f17
...
...
@@ -137,8 +137,7 @@ function getcolumns(ifs) {
},
fieldProps
:
{
placeholder
:
'请输入排序号,默认为0'
,
min
:
0
,
defaultValue
:
0
,
min
:
0
},
search
:
false
,
precision
:
0
,
...
...
src/pages/system/field/index.jsx
View file @
b2288f17
...
...
@@ -209,6 +209,7 @@ function Field(props) {
fieldChar
:
'1'
,
formName
:
drawer
?.
formName
,
formId
:
drawer
?.
formId
,
sort
:
0
},
title
:
'新增'
,
val
:
'add'
,
...
...
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