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
565bac58
Commit
565bac58
authored
Mar 12, 2024
by
涂伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '运维维保方案配置新增动态周期'
parent
9dcf7c61
Pipeline
#85878
passed with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
66 additions
and
60 deletions
+66
-60
AddModalNew.jsx
...s/bsmanager/patrolMaintenance/maintenance/AddModalNew.jsx
+66
-60
No files found.
src/pages/bsmanager/patrolMaintenance/maintenance/AddModalNew.jsx
View file @
565bac58
...
...
@@ -41,7 +41,7 @@ import {
}
from
'@ant-design/icons'
;
import
styles
from
'./maintenance.less'
;
import
RuleConfig
from
'@/components/RuleConfig'
;
import
{
FormRender
}
from
'panda-xform'
;
//
import { FormRender } from 'panda-xform';
import
{
CM_XWBPlan_AccountTable
,
NewCM_XWBPlan_feedbackTable
,
...
...
@@ -134,10 +134,10 @@ const EditableCell = ({
<
Select
ref=
{
inputRef
}
showSearch
onPressEnter=
{
save
}
onBlur=
{
save
}
onSelect=
{
save
}
>
{
state
.
selectList
?
state
.
selectList
.
map
((
item
,
index
)
=>
(
<
Option
key=
{
index
}
value=
{
item
}
>
{
item
}
</
Option
>
))
<
Option
key=
{
index
}
value=
{
item
}
>
{
item
}
</
Option
>
))
:
''
}
</
Select
>
</
Form
.
Item
>
...
...
@@ -157,7 +157,7 @@ const EditableCell = ({
};
const
AddModal
=
props
=>
{
const
{
callBackSubmit
=
()
=>
{},
visible
,
type
,
formObj
,
keepTableData
}
=
props
;
const
{
callBackSubmit
=
()
=>
{
},
visible
,
type
,
formObj
,
keepTableData
}
=
props
;
const
{
state
,
dispatch
}
=
useContext
(
Context
);
const
[
Type1
,
setType1
]
=
useState
(
''
);
const
[
Type2
,
setType2
]
=
useState
(
''
);
...
...
@@ -443,7 +443,7 @@ const AddModal = props => {
}
else
{
form
.
setFieldsValue
({
parentId
:
''
,
inOrder
:
data
.
inOrder
===
1
?
true
:
false
});
}
form
.
setFieldsValue
({
isDynamicCycle
:
data
.
isDynamicCycle
===
1
?
true
:
false
});
setType1
(
data
.
businessType
);
setType2
(
data
.
accountName
);
});
...
...
@@ -473,7 +473,7 @@ const AddModal = props => {
getFeedbackTable
();
},
[]);
useEffect
(()
=>
{},
[
keepData
]);
useEffect
(()
=>
{
},
[
keepData
]);
const
getParentList
=
e
=>
{
let
value
=
e
?
e
:
formObj
.
accountName
;
...
...
@@ -559,6 +559,7 @@ const AddModal = props => {
EndExecLen
:
EndExecLen
,
};
obj
.
inOrder
=
obj
.
inOrder
?
1
:
0
;
obj
.
isDynamicCycle
=
obj
.
isDynamicCycle
?
1
:
0
;
if
(
!
obj
.
time
)
{
lastData
.
time
=
false
;
if
(
data
.
Unit
===
'month'
)
{
...
...
@@ -1274,10 +1275,10 @@ const AddModal = props => {
<
Select
placeholder=
"选择父业务模板"
showSearch
allowClear
>
{
parentList
?
parentList
.
map
((
item
,
index
)
=>
(
<
Option
key=
{
index
.
ID
}
value=
{
item
.
ID
}
>
{
item
.
TemplateName
}
</
Option
>
))
<
Option
key=
{
index
.
ID
}
value=
{
item
.
ID
}
>
{
item
.
TemplateName
}
</
Option
>
))
:
''
}
</
Select
>
</
Item
>
...
...
@@ -1305,10 +1306,10 @@ const AddModal = props => {
<
Select
placeholder=
"选择父业务模板"
disabled
>
{
parentList
?
parentList
.
map
((
item
,
index
)
=>
(
<
Option
key=
{
index
.
ID
}
value=
{
item
.
ID
}
>
{
item
.
TemplateName
}
</
Option
>
))
<
Option
key=
{
index
.
ID
}
value=
{
item
.
ID
}
>
{
item
.
TemplateName
}
</
Option
>
))
:
''
}
</
Select
>
</
Item
>
...
...
@@ -1361,34 +1362,34 @@ const AddModal = props => {
</
div
>
{
stateType
===
'drag'
?
dataSource
.
length
>
0
&&
(
<
Table
pagination=
{
false
}
dataSource=
{
dataSource
}
columns=
{
columns
}
rowKey=
{
record
=>
record
.
key
}
components=
{
{
body
:
{
wrapper
:
DraggableContainer
,
row
:
DraggableBodyRow
,
},
}
}
/>
)
<
Table
pagination=
{
false
}
dataSource=
{
dataSource
}
columns=
{
columns
}
rowKey=
{
record
=>
record
.
key
}
components=
{
{
body
:
{
wrapper
:
DraggableContainer
,
row
:
DraggableBodyRow
,
},
}
}
/>
)
:
dataSource
.
length
>
0
&&
(
<
Table
pagination=
{
false
}
dataSource=
{
dataSource
}
columns=
{
columns
}
rowKey=
{
record
=>
record
.
key
}
rowClassName=
{
()
=>
'editable-row'
}
components=
{
{
body
:
{
row
:
EditableRow
,
cell
:
EditableCell
,
},
}
}
/>
)
}
<
Table
pagination=
{
false
}
dataSource=
{
dataSource
}
columns=
{
columns
}
rowKey=
{
record
=>
record
.
key
}
rowClassName=
{
()
=>
'editable-row'
}
components=
{
{
body
:
{
row
:
EditableRow
,
cell
:
EditableCell
,
},
}
}
/>
)
}
</
Item
>
</
Col
>
<
Col
span=
{
12
}
>
...
...
@@ -1415,6 +1416,11 @@ const AddModal = props => {
visible=
{
visible
}
type=
{
type
}
/>
<
Col
span=
{
24
}
>
<
Item
labelCol=
{
{
span
:
5
}
}
valuePropName=
"checked"
label=
"动态周期"
name=
"isDynamicCycle"
>
<
Switch
checkedChildren=
"开启"
unCheckedChildren=
"关闭"
/>
</
Item
>
</
Col
>
<
Col
span=
{
24
}
>
<
div
className=
{
styles
.
titleIcon
}
>
<
div
className=
{
styles
.
icon
}
/>
...
...
@@ -1562,10 +1568,10 @@ const AddModal = props => {
>
{
eventData
?
eventData
.
map
((
item
,
index
)
=>
(
<
Option
key=
{
index
}
value=
{
item
}
>
{
item
}
</
Option
>
))
<
Option
key=
{
index
}
value=
{
item
}
>
{
item
}
</
Option
>
))
:
''
}
</
Select
>
</
Item
>
...
...
@@ -1581,10 +1587,10 @@ const AddModal = props => {
>
{
eventData
?
eventData
.
map
((
item
,
index
)
=>
(
<
Option
key=
{
index
}
value=
{
item
}
>
{
item
}
</
Option
>
))
<
Option
key=
{
index
}
value=
{
item
}
>
{
item
}
</
Option
>
))
:
''
}
</
Select
>
</
Item
>
...
...
@@ -1671,12 +1677,12 @@ const AddModal = props => {
>
{
keepTree
.
length
>
0
?
keepTree
.
map
((
item
,
index
)
=>
(
<>
<
Option
key=
{
item
.
name
}
value=
{
item
.
name
}
>
{
item
.
name
}
</
Option
>
</>
))
<>
<
Option
key=
{
item
.
name
}
value=
{
item
.
name
}
>
{
item
.
name
}
</
Option
>
</>
))
:
''
}
</
Select
>
</
Form
.
Item
>
...
...
@@ -1693,7 +1699,7 @@ const AddModal = props => {
block
icon=
{
<
PlusOutlined
/>
}
style=
{
{
marginLeft
:
'7px'
,
width
:
'423px'
}
}
// disabled=
{
keepData
&&
!(
keepData
.
length
>
0)}
// disabled=
{
keepData
&&
!(
keepData
.
length
>
0)}
>
添加映射
</
Button
>
...
...
@@ -1748,11 +1754,11 @@ const AddModal = props => {
footer=
{
null
}
>
<
Spin
spinning=
{
loading
}
>
{
formJson
?
(
{
/* {
formJson ? (
<FormRender schemaValues={formJson} />
) : (
<Empty image={Empty.PRESENTED_IMAGE_SIMPLE} style={{ marginTop: '300px' }} />
)
}
)}
*/
}
</
Spin
>
</
Modal
>
</
Drawer
>
...
...
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