Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xform
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
田翔
xform
Commits
ed692f05
Commit
ed692f05
authored
May 11, 2023
by
田翔
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 不允许清空编码
parent
4e4bf0c7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
13 deletions
+26
-13
settings.js
src/core/FormDesigner/config/settings.js
+1
-9
index.js
src/core/FormDesigner/index.js
+25
-4
No files found.
src/core/FormDesigner/config/settings.js
View file @
ed692f05
...
@@ -605,6 +605,7 @@ const textWidgets = [
...
@@ -605,6 +605,7 @@ const textWidgets = [
title
:
'编码'
,
title
:
'编码'
,
type
:
'string'
,
type
:
'string'
,
widget
:
'Coding'
,
widget
:
'Coding'
,
disabled
:
true
,
},
},
setting
:
{
setting
:
{
widget
:
{
widget
:
{
...
@@ -657,15 +658,6 @@ const textWidgets = [
...
@@ -657,15 +658,6 @@ const textWidgets = [
disabled
:
disabled
,
disabled
:
disabled
,
dependencies
:
[
'tableTypeParent'
,
'IsSystemField'
],
dependencies
:
[
'tableTypeParent'
,
'IsSystemField'
],
},
},
disabled
:
{
title
:
'只读'
,
type
:
'boolean'
,
widget
:
'checkbox'
,
default
:
true
,
width
:
'30%'
,
disabled
:
disabled
,
dependencies
:
[
'tableTypeParent'
,
'IsSystemField'
],
},
prefixion
:
{
prefixion
:
{
title
:
'前缀'
,
title
:
'前缀'
,
type
:
'string'
,
type
:
'string'
,
...
...
src/core/FormDesigner/index.js
View file @
ed692f05
...
@@ -134,12 +134,33 @@ const FormDesigner = (props, ref) => {
...
@@ -134,12 +134,33 @@ const FormDesigner = (props, ref) => {
},
},
onOk
:
()
=>
{
onOk
:
()
=>
{
const
schema
=
designerRef
.
current
.
getValue
()
const
schema
=
designerRef
.
current
.
getValue
()
let
newschema
=
{}
const
{
tableName
,
properties
:
parent
}
=
schema
for
(
let
key
in
schema
)
{
let
parentObj
=
{}
if
(
key
!==
'properties'
)
{
if
(
tableName
?.
includes
(
'设备_台账'
))
{
newschema
[
key
]
=
schema
[
key
]
for
(
let
v
in
parent
)
{
if
(
isObject
(
parent
))
{
let
child
=
parent
[
v
].
properties
if
(
isObject
(
child
))
{
for
(
let
s
in
child
)
{
if
(
s
===
'编码'
)
{
parentObj
=
{
[
v
]:
{
...
parent
[
v
],
properties
:
{
[
s
]:
child
[
s
]
}
},
}
}
}
}
}
}
}
}
}
let
newschema
=
{
...
schema
,
properties
:
parentObj
}
designerRef
.
current
.
setValue
(
newschema
)
designerRef
.
current
.
setValue
(
newschema
)
}
}
})
})
...
...
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