Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivManage
Project
Project
Details
Activity
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
ReactWeb5
CivManage
Commits
6f5566a6
Commit
6f5566a6
authored
Jan 13, 2022
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '修改表字段修改字段模态样式'
parent
f7708f53
Pipeline
#42625
skipped with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
79 deletions
+25
-79
fieldEditor.jsx
...s/bsmanager/base/tablemanager/filedConfig/fieldEditor.jsx
+25
-79
No files found.
src/pages/bsmanager/base/tablemanager/filedConfig/fieldEditor.jsx
View file @
6f5566a6
...
...
@@ -26,14 +26,7 @@ import VerifyModal from './VerifyModal';
import
{
PlusSquareOutlined
}
from
'@ant-design/icons'
;
import
{
shape
}
from
'prop-types'
;
const
AddModal
=
props
=>
{
const
{
callBackSubmit
=
()
=>
{},
isType
,
itemData
,
isVisible
,
formObj1
,
onCancel
,
}
=
props
;
const
{
callBackSubmit
=
()
=>
{},
isType
,
itemData
,
isVisible
,
formObj1
,
onCancel
}
=
props
;
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
fieldName
,
setFieldName
]
=
useState
([]);
// 弹窗
const
[
eventList
,
setEventList
]
=
useState
([]);
// 事件
...
...
@@ -141,9 +134,7 @@ const AddModal = props => {
data
[
0
].
Config
=
`
${
obj
.
code
}
.
${
obj
.
prefix
?
obj
.
prefix
:
''
}
`
;
break
;
case
'坐标控件'
:
pramData
.
coordinates
?
(
data
[
0
].
Config
=
'当前坐标'
)
:
(
data
[
0
].
Config
=
''
);
pramData
.
coordinates
?
(
data
[
0
].
Config
=
'当前坐标'
)
:
(
data
[
0
].
Config
=
''
);
break
;
case
'图片'
:
case
'可预览图片'
:
...
...
@@ -200,18 +191,12 @@ const AddModal = props => {
must
=
false
;
switch
(
res
[
0
].
data
.
root
.
Shape
)
{
case
'坐标控件'
:
res
[
0
].
data
.
root
.
Config
===
'当前坐标'
?
(
coordinates
=
true
)
:
(
coordinates
=
false
);
res
[
0
].
data
.
root
.
Config
===
'当前坐标'
?
(
coordinates
=
true
)
:
(
coordinates
=
false
);
break
;
case
'图片'
:
case
'可预览图片'
:
res
[
0
].
data
.
root
.
Preset
===
'拍照相册'
?
(
picture
=
true
)
:
(
picture
=
false
);
res
[
0
].
data
.
root
.
ValidationRule
===
'required'
?
(
must
=
true
)
:
(
must
=
false
);
res
[
0
].
data
.
root
.
Preset
===
'拍照相册'
?
(
picture
=
true
)
:
(
picture
=
false
);
res
[
0
].
data
.
root
.
ValidationRule
===
'required'
?
(
must
=
true
)
:
(
must
=
false
);
break
;
case
'编码'
:
let
code
=
res
[
0
].
data
.
root
.
Config
.
split
(
'.'
);
...
...
@@ -446,22 +431,15 @@ const AddModal = props => {
>
{
isVisible
&&
(
<
Form
form=
{
form
}
{
...
layout
}
>
<
Item
label=
"字段名"
name=
"Name"
rules=
{
[{
required
:
true
,
message
:
'请输入表名'
}]
}
>
<
Input
placeholder=
"请输入别名"
disabled
/>
<
Item
label=
"字段名"
name=
"Name"
rules=
{
[{
required
:
true
,
message
:
'请输入表名'
}]
}
>
<
Input
placeholder=
"请输入别名"
disabled
style=
{
{
width
:
'93%'
}
}
/>
</
Item
>
<
Item
label=
"别名"
name=
"Alias"
>
<
Input
placeholder=
"请输入别名"
allowClear
/>
<
Input
placeholder=
"请输入别名"
allowClear
style=
{
{
width
:
'93%'
}
}
/>
</
Item
>
<
Item
name=
"ReadOnly"
label=
"属性"
>
<
div
>
<
Checkbox
checked=
{
pramData
.
ReadOnly
}
onChange=
{
e
=>
onChangeReady
(
e
,
'ReadOnly'
)
}
>
<
Checkbox
checked=
{
pramData
.
ReadOnly
}
onChange=
{
e
=>
onChangeReady
(
e
,
'ReadOnly'
)
}
>
只读
</
Checkbox
>
<
Checkbox
...
...
@@ -486,11 +464,7 @@ const AddModal = props => {
<
Item
label=
"形态"
>
<
div
className=
{
styles
.
listEvent
}
>
<
Select
style=
{
{
width
:
'42%'
}
}
value=
{
Shape
}
onChange=
{
handleCharacteristics
}
>
<
Select
style=
{
{
width
:
'42%'
}
}
value=
{
Shape
}
onChange=
{
handleCharacteristics
}
>
{
characteristics
.
length
?
characteristics
.
map
((
item
,
index
)
=>
{
return
(
...
...
@@ -514,7 +488,7 @@ const AddModal = props => {
<
div
className=
{
styles
.
unit
}
>
宽:
<
Input
style=
{
{
width
:
'
4
rem'
}
}
style=
{
{
width
:
'
3.8
rem'
}
}
placeholder=
""
allowClear
value=
{
pramData
.
RowSpan
}
...
...
@@ -529,24 +503,14 @@ const AddModal = props => {
return
(
<>
<
Item
label=
"前缀"
name=
"prefix"
>
<
Input
style=
{
{
width
:
'95%'
}
}
placeholder=
""
allowClear
/>
<
Input
style=
{
{
width
:
'93%'
}
}
placeholder=
""
allowClear
/>
</
Item
>
<
Item
label=
"编码方式"
name=
"code"
>
<
Radio
.
Group
>
<
Radio
value=
"年份编码"
style=
{
{
marginRight
:
'0.5rem'
}
}
>
<
Radio
value=
"年份编码"
style=
{
{
marginRight
:
'0.5rem'
}
}
>
XJ-2019-000001(前缀-年份-六位编码)
</
Radio
>
<
Radio
value=
"年月编码"
style=
{
{
marginRight
:
'0.5rem'
}
}
>
<
Radio
value=
"年月编码"
style=
{
{
marginRight
:
'0.5rem'
}
}
>
XJ-201909-000001(前缀-年份月份-六位编码)
</
Radio
>
<
Radio
value=
"一般编码"
defaultChecked
>
...
...
@@ -564,7 +528,7 @@ const AddModal = props => {
<>
{
' '
}
<
Item
label=
"可选值"
name=
"Config"
>
<
TextArea
allowClear
/>
<
TextArea
allowClear
style=
{
{
width
:
'93%'
}
}
/>
</
Item
>
<
Item
colon=
{
false
}
label=
" "
>
{
' '
}
...
...
@@ -572,28 +536,13 @@ const AddModal = props => {
<
span
style=
{
{
marginRight
:
'0.4rem'
}
}
>
以英文逗号为分隔符填写,或其他分隔符粘贴:
</
span
>
<
Select
onChange=
{
handleSeparator
}
style=
{
{
width
:
'30%'
}
}
>
<
Select
.
Option
value=
"0"
>
以,分隔(英文逗号)
</
Select
.
Option
>
<
Select
.
Option
value=
"1"
>
以/分隔(正斜杠)
</
Select
.
Option
>
<
Select
.
Option
value=
"2"
>
以\\分隔(反斜杠)
</
Select
.
Option
>
<
Select
.
Option
value=
"3"
>
以、分隔(中文顿号)
</
Select
.
Option
>
<
Select
.
Option
value=
"4"
>
以;分隔(英文分号)
</
Select
.
Option
>
<
Select
.
Option
value=
"5"
>
以;分隔(中文分号)
</
Select
.
Option
>
<
Select
onChange=
{
handleSeparator
}
style=
{
{
width
:
'30.8%'
}
}
>
<
Select
.
Option
value=
"0"
>
以,分隔(英文逗号)
</
Select
.
Option
>
<
Select
.
Option
value=
"1"
>
以/分隔(正斜杠)
</
Select
.
Option
>
<
Select
.
Option
value=
"2"
>
以\\分隔(反斜杠)
</
Select
.
Option
>
<
Select
.
Option
value=
"3"
>
以、分隔(中文顿号)
</
Select
.
Option
>
<
Select
.
Option
value=
"4"
>
以;分隔(英文分号)
</
Select
.
Option
>
<
Select
.
Option
value=
"5"
>
以;分隔(中文分号)
</
Select
.
Option
>
<
Select
.
Option
value=
"6"
>
(是)/否
</
Select
.
Option
>
<
Select
.
Option
value=
"7"
>
是/(否)
</
Select
.
Option
>
<
Select
.
Option
value=
"8"
>
(否)/是
</
Select
.
Option
>
...
...
@@ -613,10 +562,7 @@ const AddModal = props => {
>
允许从相册选取
</
Checkbox
>
<
Checkbox
checked=
{
pramData
.
must
}
onChange=
{
e
=>
onChangeReady
(
e
,
'must'
)
}
>
<
Checkbox
checked=
{
pramData
.
must
}
onChange=
{
e
=>
onChangeReady
(
e
,
'must'
)
}
>
必填字段
</
Checkbox
>
</
div
>
...
...
@@ -663,7 +609,7 @@ const AddModal = props => {
default
:
return
(
<
Item
label=
"配置"
name=
"Config"
>
<
TextArea
allowClear
/>
<
TextArea
allowClear
style=
{
{
width
:
'93%'
}
}
/>
</
Item
>
);
}
...
...
@@ -674,7 +620,7 @@ const AddModal = props => {
<
Item
label=
"预设值"
>
<
div
className=
{
styles
.
listEvent
}
>
<
Input
style=
{
{
width
:
'4
0
%'
,
height
:
'1.8rem'
}
}
style=
{
{
width
:
'4
2
%'
,
height
:
'1.8rem'
}
}
value=
{
pramData
.
Preset
}
onChange=
{
e
=>
handleInput
(
e
,
'Preset'
)
}
placeholder=
""
...
...
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