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
6dfe1177
Commit
6dfe1177
authored
Jul 06, 2023
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '维保模板新增配置验证优化'
parent
cebc9c2c
Pipeline
#75493
failed with stages
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
8 deletions
+15
-8
index.jsx
src/components/RuleConfig/index.jsx
+12
-7
AddModal.jsx
...ages/bsmanager/patrolMaintenance/maintenance/AddModal.jsx
+3
-1
No files found.
src/components/RuleConfig/index.jsx
View file @
6dfe1177
...
...
@@ -47,13 +47,18 @@ const RuleConfig = props => {
},
[
visible
]);
// 保存线配置
const
onSave
=
()
=>
{
RuleValidation
({
ruleContent
:
rule
,
flowId
:
flowID
}).
then
(
res
=>
{
if
(
res
.
data
)
{
onSubumit
(
rule
);
}
else
{
message
.
error
(
'请检查规则是否正确'
);
}
});
if
(
rule
)
{
RuleValidation
({
ruleContent
:
rule
,
flowId
:
flowID
}).
then
(
res
=>
{
if
(
res
.
data
)
{
onSubumit
(
rule
);
}
else
{
message
.
error
(
'请检查规则是否正确'
);
}
});
}
else
{
onSubumit
(
''
);
handleCancel
();
}
};
// 处理树数据
const
mapTree
=
(
val
,
index
)
=>
({
...
...
src/pages/bsmanager/patrolMaintenance/maintenance/AddModal.jsx
View file @
6dfe1177
...
...
@@ -1113,7 +1113,9 @@ const AddModal = props => {
validator
:
(
rule
,
value
)
=>
{
let
filterValue
=
formAdd
.
getFieldsValue
().
parmars
;
let
num
=
filterValue
.
findIndex
(
i
=>
i
.
fromField
===
value
);
if
(
num
!==
undefined
&&
num
!==
fieldKey
)
{
let
index
=
rule
.
field
.
split
(
'.'
)[
1
];
// debugger
if
(
num
!==
undefined
&&
num
!==
Number
(
index
))
{
return
Promise
.
reject
(
'字段重复'
);
}
return
Promise
.
resolve
();
...
...
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