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
6de1043a
Commit
6de1043a
authored
Jan 04, 2022
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
事件外部字段显示
parent
b7d995e0
Pipeline
#41848
skipped with stages
Changes
5
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
902 additions
and
396 deletions
+902
-396
AddModal.jsx
src/pages/platformCenter/bsmanager/maintenance/AddModal.jsx
+320
-191
ChangeAdd.jsx
src/pages/platformCenter/bsmanager/maintenance/ChangeAdd.jsx
+158
-81
AddModal.jsx
src/pages/platformCenter/bsmanager/workOrder/AddModal.jsx
+413
-120
changeAdd.jsx
src/pages/platformCenter/bsmanager/workOrder/changeAdd.jsx
+0
-4
changeEdit.jsx
src/pages/platformCenter/bsmanager/workOrder/changeEdit.jsx
+11
-0
No files found.
src/pages/platformCenter/bsmanager/maintenance/AddModal.jsx
View file @
6de1043a
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Drawer
,
Form
,
Input
,
notification
,
Row
,
Col
,
Select
,
Button
,
Dropdown
,
Menu
,
Space
}
from
'antd'
;
import
styles
from
'./maintenance.less'
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Drawer
,
Form
,
Input
,
notification
,
Row
,
Col
,
Select
,
Button
,
Dropdown
,
Menu
,
Space
,
}
from
'antd'
;
import
styles
from
'./maintenance.less'
;
import
ModalDrag
from
'./ModalDrag'
;
import
{
CM_XWBPlan_AccountTable
,
CM_XWBPlan_feedbackTable
,
CM_XWBPlan_DataEditORAdd
,
CM_XWBPlan_DataList
}
from
'@/services/maintenance/api'
import
{
CM_Event_LoadDepartmentAndRoles
}
from
'@/services/standingBook/api'
import
{
PlusOutlined
,
DownOutlined
,
StepForwardFilled
}
from
'@ant-design/icons'
import
ChangeAdd
from
'./ChangeAdd'
import
{
CM_XWBPlan_AccountTable
,
CM_XWBPlan_feedbackTable
,
CM_XWBPlan_DataEditORAdd
,
CM_XWBPlan_DataList
,
}
from
'@/services/maintenance/api'
;
import
{
CM_Event_LoadDepartmentAndRoles
}
from
'@/services/standingBook/api'
;
import
{
PlusOutlined
,
DownOutlined
,
StepForwardFilled
,
}
from
'@ant-design/icons'
;
import
ChangeAdd
from
'./ChangeAdd'
;
const
{
Option
}
=
Select
;
const
AddModal
=
props
=>
{
const
[
inputValue
,
setInputValue
]
=
useState
({
feedbackName
:
''
,
doRole
:
''
});
const
{
callBackSubmit
=
()
=>
{
},
visible
,
type
,
formObj
}
=
props
;
const
[
inputValue
,
setInputValue
]
=
useState
({
feedbackName
:
''
,
doRole
:
''
,
});
const
{
callBackSubmit
=
()
=>
{},
visible
,
type
,
formObj
}
=
props
;
const
[
Type1
,
setType1
]
=
useState
(
''
)
const
[
Type2
,
setType2
]
=
useState
(
''
)
const
[
selectValue
,
setSelectValue
]
=
useState
(
''
)
const
[
selectValue1
,
setSelectValue1
]
=
useState
(
''
)
const
[
treeData
,
setTreeData
]
=
useState
([])
const
[
isVisible
,
setIsVisible
]
=
useState
(
false
)
const
[
Type1
,
setType1
]
=
useState
(
''
);
const
[
Type2
,
setType2
]
=
useState
(
''
);
const
[
selectValue
,
setSelectValue
]
=
useState
(
''
);
const
[
selectValue1
,
setSelectValue1
]
=
useState
(
''
);
const
[
treeData
,
setTreeData
]
=
useState
([]);
const
[
isVisible
,
setIsVisible
]
=
useState
(
false
);
const
[
filed
,
setFiled
]
=
useState
({});
// 传给子组件列表数据
const
[
filed1
,
setFiled1
]
=
useState
({});
// 传给子组件列表数据
const
[
types
,
setTypes
]
=
useState
(
''
);
// 弹窗类型
const
[
pickItem
,
setPickItem
]
=
useState
(
''
)
//复选框数据填入项
const
[
checkedList1
,
setCheckedList1
]
=
useState
([])
//最新选择数据
const
[
characterValue
,
setCharacterValue
]
=
useState
(
''
)
//打开弹框之前数据
const
[
ff
,
setFf
]
=
useState
([])
const
[
pickItem
,
setPickItem
]
=
useState
(
''
);
//复选框数据填入项
const
[
checkedList1
,
setCheckedList1
]
=
useState
([]);
//最新选择数据
const
[
characterValue
,
setCharacterValue
]
=
useState
(
''
);
//打开弹框之前数据
const
[
ff
,
setFf
]
=
useState
([]);
const
[
form
]
=
Form
.
useForm
();
const
{
Item
}
=
Form
;
const
{
TextArea
}
=
Input
;
useEffect
(()
=>
{
getRole
()
getRole
();
if
(
type
===
'add'
)
{
setType1
(
''
)
setType2
(
''
)
setInputValue
({
feedbackName
:
''
,
doRole
:
''
})
setFiled1
({})
setType1
(
''
);
setType2
(
''
);
setInputValue
({
feedbackName
:
''
,
doRole
:
''
});
setFiled1
({});
form
.
resetFields
();
}
else
if
(
type
===
'edit'
)
{
CM_XWBPlan_DataList
({
id
:
formObj
.
id
}).
then
(
res
=>
{
let
data
=
res
.
data
[
0
]
data
&&
form
.
setFieldsValue
({
...
data
});
setInputValue
({
...
data
})
console
.
log
(
data
.
businessTypee
)
setType1
(
data
.
businessType
)
setType2
(
data
.
accountName
)
})
CM_XWBPlan_DataList
({
id
:
formObj
.
id
}).
then
(
res
=>
{
let
data
=
res
.
data
[
0
];
data
&&
form
.
setFieldsValue
({
...
data
});
setInputValue
({
...
data
});
console
.
log
(
data
.
businessTypee
);
setType1
(
data
.
businessType
);
setType2
(
data
.
accountName
);
});
}
},
[
visible
])
},
[
visible
]);
useEffect
(()
=>
{
getRole
()
getList
()
getFeedbackTable
()
},
[])
getRole
();
getList
();
getFeedbackTable
();
},
[]);
const
getList
=
()
=>
{
CM_XWBPlan_AccountTable
().
then
(
res
=>
{
if
(
res
.
msg
==
'Ok'
)
{
let
arr
=
[]
let
arr
=
[];
res
.
data
.
map
((
item
,
index
)
=>
{
arr
.
push
(
item
.
accountName
)
})
setTreeData
(
arr
)
}
})
arr
.
push
(
item
.
accountName
);
});
setTreeData
(
arr
);
}
});
};
const
onSubmit
=
()
=>
{
form
.
validateFields
().
then
(
validate
=>
{
if
(
validate
)
{
let
obj
=
form
.
getFieldsValue
();
obj
.
feedbackName
=
inputValue
.
feedbackName
obj
.
doRole
=
inputValue
.
doRole
console
.
log
(
obj
.
doRole
)
console
.
log
(
obj
)
obj
.
feedbackName
=
inputValue
.
feedbackName
;
obj
.
doRole
=
inputValue
.
doRole
;
console
.
log
(
obj
.
doRole
);
console
.
log
(
obj
);
if
(
type
==
'add'
)
{
CM_XWBPlan_DataEditORAdd
(
obj
).
then
(
res
=>
{
if
(
res
.
msg
==
''
)
{
...
...
@@ -86,19 +109,19 @@ const AddModal = props => {
duration
:
3
,
description
:
'添加成功'
,
});
}
else
{
}
else
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
res
.
msg
,
});
}
})
});
}
if
(
type
==
'edit'
)
{
CM_XWBPlan_DataEditORAdd
({
...
obj
,
id
:
formObj
.
id
id
:
formObj
.
id
,
}).
then
(
res
=>
{
if
(
res
.
msg
==
''
)
{
form
.
resetFields
();
...
...
@@ -108,152 +131,148 @@ const AddModal = props => {
duration
:
3
,
description
:
'添加成功'
,
});
}
else
{
}
else
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
res
.
msg
,
});
}
})
}
});
}
})
}
});
};
const
inputType1
=
e
=>
{
setType1
(
e
.
target
.
value
)
form
.
setFieldsValue
({
businessType
:
e
.
target
.
value
})
}
setType1
(
e
.
target
.
value
);
form
.
setFieldsValue
({
businessType
:
e
.
target
.
value
});
};
const
inputType2
=
e
=>
{
setType2
(
e
.
target
.
value
)
form
.
setFieldsValue
({
accountName
:
e
.
target
.
value
})
}
setType2
(
e
.
target
.
value
);
form
.
setFieldsValue
({
accountName
:
e
.
target
.
value
});
};
const
changeText
=
(
e
,
type
)
=>
{
let
inputText
=
{
...
inputValue
}
inputText
[
type
]
=
e
.
target
.
value
setInputValue
(
inputText
)
}
const
pickFiled
=
(
fileds
)
=>
{
setTypes
(
'add'
)
setCharacterValue
(
inputValue
[
fileds
])
setCheckedList1
(
inputValue
[
fileds
].
split
(
','
))
setPickItem
(
fileds
)
setIsVisible
(
true
)
}
const
pickFiled1
=
(
fileds
)
=>
{
setTypes
(
'app'
)
setCharacterValue
(
inputValue
[
fileds
])
setCheckedList1
(
inputValue
[
fileds
].
split
(
','
))
console
.
log
(
inputValue
[
fileds
])
console
.
log
(
inputValue
[
fileds
].
split
(
','
))
setPickItem
(
fileds
)
setIsVisible
(
true
)
}
let
inputText
=
{
...
inputValue
};
inputText
[
type
]
=
e
.
target
.
value
;
setInputValue
(
inputText
);
};
const
pickFiled
=
fileds
=>
{
setTypes
(
'add'
);
setCharacterValue
(
inputValue
[
fileds
]);
setCheckedList1
(
inputValue
[
fileds
].
split
(
','
));
setPickItem
(
fileds
);
setIsVisible
(
true
);
};
const
pickFiled1
=
fileds
=>
{
setTypes
(
'app'
);
setCharacterValue
(
inputValue
[
fileds
]);
setCheckedList1
(
inputValue
[
fileds
].
split
(
','
));
console
.
log
(
inputValue
[
fileds
]);
console
.
log
(
inputValue
[
fileds
].
split
(
','
));
setPickItem
(
fileds
);
setIsVisible
(
true
);
};
const
getRole
=
()
=>
{
CM_Event_LoadDepartmentAndRoles
().
then
(
res
=>
{
if
(
res
.
msg
===
'Ok'
)
{
setFiled1
(
formateArrDataA1
(
res
.
data
,
'groupType'
))
console
.
log
(
filed1
)
console
.
log
(
filed1
[
'角色'
])
setFf
(
filed1
[
'角色'
])
console
.
log
(
ff
)
console
.
log
(
res
.
data
)
}
})
setFiled1
(
formateArrDataA1
(
res
.
data
,
'groupType'
));
console
.
log
(
filed1
);
console
.
log
(
filed1
[
'角色'
]);
setFf
(
filed1
[
'角色'
]);
console
.
log
(
ff
);
console
.
log
(
res
.
data
);
}
});
};
const
getFeedbackTable
=
()
=>
{
CM_XWBPlan_feedbackTable
().
then
(
res
=>
{
if
(
res
.
msg
==
'Ok'
)
{
let
arr
=
[]
if
(
res
.
msg
=
==
'Ok'
)
{
let
arr
=
[];
res
.
data
.
map
((
item
,
index
)
=>
{
arr
.
push
(
item
.
accountName
)
})
setFiled
(
arr
)
}
})
arr
.
push
(
item
.
accountName
);
});
setFiled
(
arr
);
}
});
};
const
formateArrDataA1
=
(
initialArr
,
name
)
=>
{
let
aa
=
[]
let
a1
=
[]
let
a2
let
a3
=
[]
initialArr
.
map
(
i
=>
{
let
aa
=
[];
let
a1
=
[];
let
a2
;
let
a3
=
[];
initialArr
.
data
.
map
(
i
=>
{
// console.log(i.groupType)
a2
=
i
.
groupType
a2
=
i
.
groupType
;
// console.log(a2)
// console.log(i.root)
a1
=
i
.
root
a1
=
i
.
root
;
a1
.
map
(
j
=>
{
j
.
group
=
a2
j
.
group
=
a2
;
// console.log(j)
})
aa
.
push
(
i
.
root
)
})
});
aa
.
push
(
i
.
root
);
});
// console.log(aa)
aa
.
map
(
p
=>
{
// console.log(p)
p
.
map
(
o
=>
{
// console.log(o)
a3
.
push
(
o
)
})
})
console
.
log
(
a3
)
a3
.
push
(
o
);
});
});
console
.
log
(
a3
);
// 判定传参是否符合规则
if
(
!
(
a3
instanceof
Array
))
{
return
'请传入正确格式的数组'
return
'请传入正确格式的数组'
;
}
if
(
!
name
)
{
return
'请传入对象属性'
return
'请传入对象属性'
;
}
//先获取一下这个数组中有多少个"name"
let
nameArr
=
[]
let
nameArr
=
[];
a3
.
map
(
i
=>
{
if
(
nameArr
.
indexOf
(
i
.
group
)
===
-
1
)
{
nameArr
.
push
(
i
.
group
)
nameArr
.
push
(
i
.
group
);
}
})
console
.
log
(
nameArr
)
});
console
.
log
(
nameArr
);
//新建一个包含多个list的结果对象
let
tempObj
=
{}
let
tempObj
=
{};
// 根据不同的"name"生成多个数组
for
(
let
k
in
nameArr
)
{
for
(
let
j
in
a3
)
{
if
(
a3
[
j
].
group
==
nameArr
[
k
])
{
// 每次外循环时新建一个对应"name"的数组, 内循环时当前数组不变
tempObj
[
nameArr
[
k
]]
=
tempObj
[
nameArr
[
k
]]
||
[]
tempObj
[
nameArr
[
k
]].
push
(
a3
[
j
])
tempObj
[
nameArr
[
k
]]
=
tempObj
[
nameArr
[
k
]]
||
[];
tempObj
[
nameArr
[
k
]].
push
(
a3
[
j
]);
}
}
}
console
.
log
(
tempObj
);
for
(
let
key
in
tempObj
)
{
let
arr
=
[]
let
arr
=
[];
tempObj
[
key
].
map
(
item
=>
{
tempObj
[
key
]
=
arr
;
arr
.
push
(
item
.
Name
)
})
}
return
tempObj
arr
.
push
(
item
.
Name
);
});
}
return
tempObj
;
};
const
changTable
=
value
=>
{
setSelectValue
(
value
)
}
setSelectValue
(
value
);
};
const
changTable1
=
value
=>
{
setSelectValue1
(
value
)
}
setSelectValue1
(
value
);
};
const
onOK
=
prop
=>
{
console
.
log
(
prop
.
isType
)
setIsVisible
(
false
)
let
inputText
=
{
...
inputValue
}
inputText
[
prop
.
pickItem
]
=
prop
.
str
setCheckedList1
(
prop
.
checkedList
)
setInputValue
(
inputText
)
}
console
.
log
(
prop
.
isType
);
setIsVisible
(
false
);
let
inputText
=
{
...
inputValue
};
inputText
[
prop
.
pickItem
]
=
prop
.
str
;
setCheckedList1
(
prop
.
checkedList
);
setInputValue
(
inputText
);
};
// const title = <ModalDrag title="巡维保计划配置" />
return
(
<
Drawer
...
...
@@ -264,13 +283,13 @@ const AddModal = props => {
{
...
props
}
footer=
{
<
Space
>
<
Button
onClick=
{
onSubmit
}
type=
"primary"
>
<
Button
onClick=
{
onSubmit
}
type=
"primary"
>
确定
</
Button
>
</
Space
>
}
>
<
Form
form=
{
form
}
labelCol=
{
{
span
:
7
}
}
style=
{
{
overflowY
:
'scroll'
}
}
>
<
Form
form=
{
form
}
labelCol=
{
{
span
:
7
}
}
style=
{
{
overflowY
:
'scroll'
}
}
>
<
Row
>
<
Col
span=
{
23
}
>
<
Item
...
...
@@ -288,7 +307,17 @@ const AddModal = props => {
</
Item
>
</
Col
>
<
Col
span=
{
23
}
>
<
span
style=
{
{
position
:
'absolute'
,
left
:
'1%'
,
top
:
'9%'
,
color
:
'red'
,
fontSize
:
'16px'
}
}
>
*
</
span
>
<
span
style=
{
{
position
:
'absolute'
,
left
:
'1%'
,
top
:
'9%'
,
color
:
'red'
,
fontSize
:
'16px'
,
}
}
>
*
</
span
>
<
Item
label=
"业务类型"
name=
"businessType"
...
...
@@ -297,31 +326,59 @@ const AddModal = props => {
{
validator
:
(
rule
,
value
)
=>
{
if
(
form
.
getFieldsValue
().
businessType
==
''
)
{
return
Promise
.
reject
(
'业务类型必填'
)
return
Promise
.
reject
(
'业务类型必填'
);
}
return
Promise
.
resolve
();
}
}
},
},
]
}
>
<
div
>
<
Input
className=
"ue-editable-select-input"
onChange=
{
inputType1
}
value=
{
Type1
}
placeholder=
"选择或手动输入业务类型"
>
</
Input
>
/>
<
Dropdown
placement=
'bottomRight'
placement=
"bottomRight"
style=
{
{
width
:
'430px'
}
}
overlay=
{
<
Menu
>
<
Menu
.
Item
key=
"巡检"
onClick=
{
()
=>
{
setType1
(
"巡检"
);
form
.
setFieldsValue
({
businessType
:
"巡检"
})
}
}
style=
{
{
width
:
'430px'
,
marginLeft
:
'-8px'
}
}
>
巡检
</
Menu
.
Item
>
<
Menu
.
Item
key=
"保养"
onClick=
{
()
=>
{
setType1
(
"保养"
);
form
.
setFieldsValue
({
businessType
:
"保养"
})
}
}
style=
{
{
width
:
'430px'
,
marginLeft
:
'-8px'
}
}
>
保养
</
Menu
.
Item
>
</
Menu
>
}
>
<
div
className=
{
styles
.
linkDrowp
}
onClick=
{
e
=>
e
.
preventDefault
()
}
>
<
DownOutlined
style=
{
{
fontSize
:
'12px'
,
color
:
'rgba(0, 0, 0, 0.25)'
,
marginLeft
:
'5px'
}
}
/>
overlay=
{
<
Menu
>
<
Menu
.
Item
key=
"巡检"
onClick=
{
()
=>
{
setType1
(
'巡检'
);
form
.
setFieldsValue
({
businessType
:
'巡检'
});
}
}
style=
{
{
width
:
'430px'
,
marginLeft
:
'-8px'
}
}
>
巡检
</
Menu
.
Item
>
<
Menu
.
Item
key=
"保养"
onClick=
{
()
=>
{
setType1
(
'保养'
);
form
.
setFieldsValue
({
businessType
:
'保养'
});
}
}
style=
{
{
width
:
'430px'
,
marginLeft
:
'-8px'
}
}
>
保养
</
Menu
.
Item
>
</
Menu
>
}
>
<
div
className=
{
styles
.
linkDrowp
}
onClick=
{
e
=>
e
.
preventDefault
()
}
>
<
DownOutlined
style=
{
{
fontSize
:
'12px'
,
color
:
'rgba(0, 0, 0, 0.25)'
,
marginLeft
:
'5px'
,
}
}
/>
</
div
>
</
Dropdown
>
</
div
>
...
...
@@ -340,7 +397,6 @@ const AddModal = props => {
]
}
>
<
Select
placeholder=
"选择计划执行周期"
onChange=
{
changTable
}
value=
{
selectValue
}
...
...
@@ -355,7 +411,17 @@ const AddModal = props => {
</
Item
>
</
Col
>
<
Col
span=
{
23
}
>
<
span
style=
{
{
position
:
'absolute'
,
left
:
'1%'
,
top
:
'9%'
,
color
:
'red'
,
fontSize
:
'16px'
}
}
>
*
</
span
>
<
span
style=
{
{
position
:
'absolute'
,
left
:
'1%'
,
top
:
'9%'
,
color
:
'red'
,
fontSize
:
'16px'
,
}
}
>
*
</
span
>
<
Item
label=
"台账名称"
name=
"accountName"
...
...
@@ -364,37 +430,72 @@ const AddModal = props => {
{
validator
:
(
rule
,
value
)
=>
{
if
(
form
.
getFieldsValue
().
accountName
==
''
)
{
return
Promise
.
reject
(
'台账名称必选'
)
return
Promise
.
reject
(
'台账名称必选'
);
}
return
Promise
.
resolve
();
}
}
},
},
]
}
>
<
div
>
<
Input
className=
"ue-editable-select-input"
onChange=
{
inputType2
}
value=
{
Type2
}
placeholder=
"选择此计划关联的设备台账名称,如果没有请先配置台账管理台账名称为设备"
>
</
Input
>
/>
<
Dropdown
placement=
'bottomRight'
placement=
"bottomRight"
style=
{
{
width
:
'430px'
}
}
overlay=
{
<
Menu
>
{
treeData
.
length
?
treeData
.
map
((
item
,
index
)
=>
{
return
<
Menu
.
Item
onClick=
{
()
=>
{
setType2
(
item
);
form
.
setFieldsValue
({
accountName
:
item
})
}
}
style=
{
{
width
:
'430px'
,
marginLeft
:
'-8px'
}
}
key=
{
index
}
>
{
item
}
</
Menu
.
Item
>
})
:
''
}
</
Menu
>
}
>
<
div
className=
{
styles
.
linkDrowp
}
onClick=
{
e
=>
e
.
preventDefault
()
}
>
<
DownOutlined
style=
{
{
fontSize
:
'12px'
,
color
:
'rgba(0, 0, 0, 0.25)'
,
marginLeft
:
'5px'
}
}
/>
overlay=
{
<
Menu
>
{
treeData
.
length
?
treeData
.
map
((
item
,
index
)
=>
{
return
(
<
Menu
.
Item
onClick=
{
()
=>
{
setType2
(
item
);
form
.
setFieldsValue
({
accountName
:
item
});
}
}
style=
{
{
width
:
'430px'
,
marginLeft
:
'-8px'
}
}
key=
{
index
}
>
{
item
}
</
Menu
.
Item
>
);
})
:
''
}
</
Menu
>
}
>
<
div
className=
{
styles
.
linkDrowp
}
onClick=
{
e
=>
e
.
preventDefault
()
}
>
<
DownOutlined
style=
{
{
fontSize
:
'12px'
,
color
:
'rgba(0, 0, 0, 0.25)'
,
marginLeft
:
'5px'
,
}
}
/>
</
div
>
</
Dropdown
>
</
div
>
</
Item
>
</
Col
>
<
Col
span=
{
23
}
>
<
span
style=
{
{
position
:
'absolute'
,
left
:
'1%'
,
top
:
'9%'
,
color
:
'red'
,
fontSize
:
'16px'
}
}
>
*
</
span
>
<
span
style=
{
{
position
:
'absolute'
,
left
:
'1%'
,
top
:
'9%'
,
color
:
'red'
,
fontSize
:
'16px'
,
}
}
>
*
</
span
>
<
Item
label=
"反馈名称"
name=
"feedbackName"
...
...
@@ -402,23 +503,43 @@ const AddModal = props => {
rules=
{
[
{
validator
:
(
rule
,
value
)
=>
{
if
(
inputValue
.
feedbackName
==
""
)
{
return
Promise
.
reject
(
'反馈名称必填'
)
if
(
inputValue
.
feedbackName
==
''
)
{
return
Promise
.
reject
(
'反馈名称必填'
);
}
return
Promise
.
resolve
();
}
}
},
},
]
}
>
<
div
className=
{
styles
.
filed_listItem
}
>
<
Input
style=
{
{
width
:
'83%'
}
}
placeholder=
"请选择反馈名称"
onChange=
{
(
e
)
=>
changeText
(
e
,
'feedbackName'
)
}
value=
{
inputValue
.
feedbackName
}
allowClear
/>
<
Button
type=
"dashed"
onClick=
{
()
=>
pickFiled
(
'feedbackName'
)
}
icon=
{
<
PlusOutlined
style=
{
{
marginTop
:
'5px'
}
}
/>
}
style=
{
{
marginLeft
:
'0.5rem'
,
width
:
'4rem'
}
}
/>
<
div
className=
{
styles
.
filed_listItem
}
>
<
Input
style=
{
{
width
:
'83%'
}
}
placeholder=
"请选择反馈名称"
onChange=
{
e
=>
changeText
(
e
,
'feedbackName'
)
}
value=
{
inputValue
.
feedbackName
}
allowClear
/>
<
Button
type=
"dashed"
onClick=
{
()
=>
pickFiled
(
'feedbackName'
)
}
icon=
{
<
PlusOutlined
style=
{
{
marginTop
:
'5px'
}
}
/>
}
style=
{
{
marginLeft
:
'0.5rem'
,
width
:
'4rem'
}
}
/>
</
div
>
</
Item
>
</
Col
>
<
Col
span=
{
23
}
>
<
span
style=
{
{
position
:
'absolute'
,
left
:
'1%'
,
top
:
'9%'
,
color
:
'red'
,
fontSize
:
'16px'
}
}
>
*
</
span
>
<
span
style=
{
{
position
:
'absolute'
,
left
:
'1%'
,
top
:
'9%'
,
color
:
'red'
,
fontSize
:
'16px'
,
}
}
>
*
</
span
>
<
Item
label=
"执行角色"
name=
"doRole"
...
...
@@ -426,17 +547,28 @@ const AddModal = props => {
rules=
{
[
{
validator
:
(
rule
,
value
)
=>
{
if
(
inputValue
.
doRole
==
""
)
{
return
Promise
.
reject
(
'执行角色必填'
)
if
(
inputValue
.
doRole
==
''
)
{
return
Promise
.
reject
(
'执行角色必填'
);
}
return
Promise
.
resolve
();
}
},
},
]
}
>
<
div
className=
{
styles
.
filed_listItem
}
>
<
Input
style=
{
{
width
:
'83%'
}
}
placeholder=
"请选择执行角色"
onChange=
{
(
e
)
=>
changeText
(
e
,
'doRole'
)
}
value=
{
inputValue
.
doRole
}
allowClear
/>
<
Button
type=
"dashed"
onClick=
{
()
=>
pickFiled1
(
'doRole'
)
}
icon=
{
<
PlusOutlined
style=
{
{
marginTop
:
'5px'
}
}
/>
}
style=
{
{
marginLeft
:
'0.5rem'
,
width
:
'4rem'
}
}
/>
<
div
className=
{
styles
.
filed_listItem
}
>
<
Input
style=
{
{
width
:
'83%'
}
}
placeholder=
"请选择执行角色"
onChange=
{
e
=>
changeText
(
e
,
'doRole'
)
}
value=
{
inputValue
.
doRole
}
allowClear
/>
<
Button
type=
"dashed"
onClick=
{
()
=>
pickFiled1
(
'doRole'
)
}
icon=
{
<
PlusOutlined
style=
{
{
marginTop
:
'5px'
}
}
/>
}
style=
{
{
marginLeft
:
'0.5rem'
,
width
:
'4rem'
}
}
/>
</
div
>
</
Item
>
</
Col
>
...
...
@@ -482,7 +614,6 @@ const AddModal = props => {
]
}
>
<
Select
placeholder=
"是否送审"
onChange=
{
changTable1
}
value=
{
selectValue1
}
...
...
@@ -497,7 +628,6 @@ const AddModal = props => {
label=
"台账过滤条件"
name=
"filterCondition"
labelCol=
{
{
span
:
4
}
}
>
<
TextArea
placeholder=
"设备对应的Scada台账名称,可多选"
/>
</
Item
>
...
...
@@ -517,6 +647,6 @@ const AddModal = props => {
characterValue=
{
characterValue
}
/>
</
Drawer
>
)
);
};
export
default
AddModal
\ No newline at end of file
export
default
AddModal
;
src/pages/platformCenter/bsmanager/maintenance/ChangeAdd.jsx
View file @
6de1043a
import
React
,
{
useState
,
useEffect
,
PureComponent
}
from
'react'
;
import
{
Modal
,
Divider
,
Checkbox
,
Space
,
Button
}
from
'antd'
;
import
styles
from
'./maintenance.less'
import
styles
from
'./maintenance.less'
;
const
CheckboxGroup
=
Checkbox
.
Group
;
const
ChangeAdd
=
props
=>
{
const
{
callBackSubmit
=
()
=>
{
},
isType
,
visible
,
newCheckedList
,
filed1
,
filed
,
pickItem
,
characterValue
,
ff
}
=
props
;
const
[
checkedList
,
setCheckedList
]
=
useState
([]);
//选中的复选框内容
const
[
indeterminate
,
setIndeterminate
]
=
useState
(
true
);
//全选样式控制
const
[
checkAll
,
setCheckAll
]
=
useState
(
false
);
//全选
const
[
selectData
,
setSelectData
]
=
useState
([])
//选中复选框的值集合
let
objArr
=
[]
const
{
callBackSubmit
=
()
=>
{},
isType
,
visible
,
newCheckedList
,
filed1
,
filed
,
pickItem
,
characterValue
,
ff
,
}
=
props
;
const
[
checkedList
,
setCheckedList
]
=
useState
([]);
// 选中的复选框内容
const
[
indeterminate
,
setIndeterminate
]
=
useState
(
true
);
// 全选样式控制
const
[
checkAll
,
setCheckAll
]
=
useState
(
false
);
// 全选
const
[
selectData
,
setSelectData
]
=
useState
([]);
// 选中复选框的值集合
let
objArr
=
[];
const
onChangeList
=
(
list
)
=>
{
let
arr
=
[]
const
onChangeList
=
list
=>
{
let
arr
=
[];
list
.
map
((
item
,
index
)
=>
{
arr
.
push
(
item
)
})
console
.
log
(
list
)
console
.
log
(
arr
)
setCheckedList
(
arr
)
setIndeterminate
(
!!
list
.
length
&&
list
.
length
<
filed
.
length
)
setCheckAll
(
list
.
length
===
filed
.
length
)
arr
.
push
(
item
);
});
console
.
log
(
list
);
console
.
log
(
arr
);
setCheckedList
(
arr
);
setIndeterminate
(
!!
list
.
length
&&
list
.
length
<
filed
.
length
);
setCheckAll
(
list
.
length
===
filed
.
length
);
};
const
onChangeList1
=
(
list
)
=>
{
let
arr
=
[]
const
onChangeList1
=
list
=>
{
let
arr
=
[];
list
.
map
((
item
,
index
)
=>
{
arr
.
push
(
item
)
})
console
.
log
(
list
)
console
.
log
(
arr
)
setCheckedList
(
arr
)
setIndeterminate
(
!!
list
.
length
&&
list
.
length
<
ff
.
length
)
setCheckAll
(
list
.
length
===
ff
.
length
)
arr
.
push
(
item
);
});
console
.
log
(
list
);
console
.
log
(
arr
);
setCheckedList
(
arr
);
setIndeterminate
(
!!
list
.
length
&&
list
.
length
<
ff
.
length
);
setCheckAll
(
list
.
length
===
ff
.
length
);
};
const
onSubmit
=
()
=>
{
isType
===
'rule'
?
callBackSubmit
(
`
${
value
===
'无'
||
value
===
''
?
''
:
value
+
','
}${
checkValue
.
join
(
','
)}
`
)
:
callBackSubmit
({
checkedList
,
str
:
selectData
.
join
(
","
),
pickItem
,
stt
:
selectData
,
filed22
:
filed1
,
isType
:
isType
});
}
isType
===
'rule'
?
callBackSubmit
(
`
${
value
===
'无'
||
value
===
''
?
''
:
`
${
value
}
,`
}${
checkValue
.
join
(
','
)}
`
,
)
:
callBackSubmit
({
checkedList
,
str
:
selectData
.
join
(
','
),
pickItem
,
stt
:
selectData
,
filed22
:
filed1
,
isType
,
});
};
const
onCheckAllChange
=
e
=>
{
setCheckedList
(
e
.
target
.
checked
?
filed
:
[])
setIndeterminate
(
false
)
setCheckAll
(
e
.
target
.
checked
)
setCheckedList
(
e
.
target
.
checked
?
filed
:
[]);
setIndeterminate
(
false
);
setCheckAll
(
e
.
target
.
checked
);
};
const
onCheckAllChange1
=
e
=>
{
setCheckedList
(
e
.
target
.
checked
?
ff
:
[])
setIndeterminate
(
false
)
setCheckAll
(
e
.
target
.
checked
)
}
setCheckedList
(
e
.
target
.
checked
?
ff
:
[]);
setIndeterminate
(
false
);
setCheckAll
(
e
.
target
.
checked
);
};
useEffect
(()
=>
{
selectAll
()
selectAll
();
},
[
checkedList
]);
const
selectAll
=
()
=>
{
objArr
=
[]
objArr
=
[];
checkedList
.
map
(
item
=>
{
objArr
=
objArr
.
concat
(
item
)
})
console
.
log
(
checkedList
)
setSelectData
(
objArr
)
}
objArr
=
objArr
.
concat
(
item
);
});
console
.
log
(
checkedList
);
setSelectData
(
objArr
);
};
useEffect
(()
=>
{
console
.
log
(
indeterminate
)
console
.
log
(
indeterminate
);
if
(
isType
!=
''
&&
isType
===
'add'
)
{
let
checkArr
=
[]
let
checkArr
=
[];
console
.
log
(
newCheckedList
);
newCheckedList
.
map
(
checkItem
=>
{
if
(
filed
.
includes
(
checkItem
))
{
checkArr
.
push
(
checkItem
)
checkArr
.
push
(
checkItem
);
}
})
setCheckedList
(
checkArr
)
setIndeterminate
(
!!
newCheckedList
.
length
&&
newCheckedList
.
length
<
filed
.
length
)
setCheckAll
(
newCheckedList
.
length
===
filed
.
length
)
let
newArr
=
characterValue
.
length
?
characterValue
.
split
(
","
)
:
[]
setSelectData
(
newArr
)
});
setCheckedList
(
checkArr
);
setIndeterminate
(
!!
newCheckedList
.
length
&&
newCheckedList
.
length
<
filed
.
length
,
);
setCheckAll
(
newCheckedList
.
length
===
filed
.
length
);
let
newArr
=
characterValue
.
length
?
characterValue
.
split
(
','
)
:
[];
setSelectData
(
newArr
);
}
else
if
(
isType
===
'app'
)
{
let
checkArr
=
[]
let
checkArr
=
[];
console
.
log
(
newCheckedList
);
newCheckedList
.
map
(
checkItem
=>
{
if
(
ff
.
includes
(
checkItem
))
{
checkArr
.
push
(
checkItem
)
checkArr
.
push
(
checkItem
);
}
})
setCheckedList
(
checkArr
)
setIndeterminate
(
!!
newCheckedList
.
length
&&
newCheckedList
.
length
<
ff
.
length
)
setCheckAll
(
newCheckedList
.
length
===
ff
.
length
)
let
newArr
=
characterValue
.
length
?
characterValue
.
split
(
","
)
:
[]
setSelectData
(
newArr
)
});
setCheckedList
(
checkArr
);
setIndeterminate
(
!!
newCheckedList
.
length
&&
newCheckedList
.
length
<
ff
.
length
,
);
setCheckAll
(
newCheckedList
.
length
===
ff
.
length
);
let
newArr
=
characterValue
.
length
?
characterValue
.
split
(
','
)
:
[];
setSelectData
(
newArr
);
}
},
[
visible
]);
if
(
isType
!=
'app'
)
{
return
(
<
div
className=
{
styles
.
ChangeAddContainer
}
>
...
...
@@ -100,42 +125,73 @@ const ChangeAdd = props => {
title=
"反馈名称"
bodyStyle=
{
{
width
:
'100%'
,
minHeight
:
'100px'
}
}
style=
{
{
top
:
'10px'
}
}
width=
"45
0px"
width=
"40
0px"
destroyOnClose
centered=
{
true
}
centered
cancelText=
"取消"
okText=
"确认"
{
...
props
}
onOk=
{
()
=>
onSubmit
()
}
forceRender=
{
true
}
forceRender
getContainer=
{
false
}
>
{
visible
&&
(
<
div
className=
{
styles
.
listCard
}
>
<
div
className=
{
styles
.
cardItem
}
>
{
JSON
.
stringify
(
filed
)
==
"{}"
?
{
JSON
.
stringify
(
filed
)
==
'{}'
?
(
<>
<
div
className=
{
styles
.
cardContent
}
>
<
span
style=
{
{
color
:
'red'
,
fontSize
:
'1rem'
,
marginLeft
:
'25px'
}
}
>
暂无数据请先配置台账管理台账名称为反馈
</
span
>
<
span
style=
{
{
color
:
'red'
,
fontSize
:
'1rem'
,
marginLeft
:
'25px'
,
}
}
>
暂无数据请先配置台账管理台账名称为反馈
</
span
>
</
div
>
</>
:
)
:
(
<>
<
div
className=
{
styles
.
cardContent
}
>
<
div
className=
{
styles
.
cardItemData
}
>
<
Divider
orientation=
"left"
style=
{
{
margin
:
'0 0 5px 0'
,
color
:
'#15428b'
,
borderTopColor
:
'#99bbe8'
}
}
>
全选
<
Checkbox
style=
{
{
marginLeft
:
'10px'
}
}
indeterminate=
{
indeterminate
}
onChange=
{
onCheckAllChange
}
checkvalue=
{
filed
}
checked=
{
checkAll
}
>
</
Checkbox
></
Divider
>
<
CheckboxGroup
options=
{
filed
}
value=
{
checkedList
}
onChange=
{
(
e
)
=>
onChangeList
(
e
)
}
/></
div
>
<
Divider
orientation=
"left"
style=
{
{
margin
:
'0 0 5px 0'
,
color
:
'#15428b'
,
borderTopColor
:
'#99bbe8'
,
}
}
>
全选
<
Checkbox
style=
{
{
marginLeft
:
'10px'
}
}
indeterminate=
{
indeterminate
}
onChange=
{
onCheckAllChange
}
checkvalue=
{
filed
}
checked=
{
checkAll
}
>
{
' '
}
</
Checkbox
>
</
Divider
>
<
CheckboxGroup
options=
{
filed
}
value=
{
checkedList
}
onChange=
{
e
=>
onChangeList
(
e
)
}
/>
</
div
>
</
div
>
</>
}
)
}
</
div
>
</
div
>
)
}
)
}
</
Modal
>
</
div
>
);
}
else
if
(
isType
===
'app'
)
{
}
if
(
isType
===
'app'
)
{
return
(
<
Modal
title=
"角色"
...
...
@@ -143,29 +199,51 @@ const ChangeAdd = props => {
style=
{
{
top
:
'10px'
}
}
width=
"450px"
destroyOnClose
centered=
{
true
}
centered
cancelText=
"取消"
okText=
"确认"
{
...
props
}
onOk=
{
()
=>
onSubmit
()
}
forceRender=
{
true
}
forceRender
getContainer=
{
false
}
>
{
visible
&&
(
<
div
className=
{
styles
.
listCard
}
>
<
div
className=
{
styles
.
cardItem
}
>
<
div
className=
{
styles
.
cardContent
}
>
<
div
className=
{
styles
.
cardItemData
}
>
<
Divider
orientation=
"left"
style=
{
{
margin
:
'0 0 5px 0'
,
color
:
'#15428b'
,
borderTopColor
:
'#99bbe8'
}
}
>
全选
<
Checkbox
style=
{
{
marginLeft
:
'10px'
}
}
indeterminate=
{
indeterminate
}
onChange=
{
onCheckAllChange1
}
checkvalue=
{
ff
}
checked=
{
checkAll
}
>
</
Checkbox
></
Divider
>
<
CheckboxGroup
options=
{
ff
}
value=
{
checkedList
}
onChange=
{
(
e
)
=>
onChangeList1
(
e
)
}
/></
div
>
<
div
className=
{
styles
.
cardItemData
}
>
<
Divider
orientation=
"left"
style=
{
{
margin
:
'0 0 5px 0'
,
color
:
'#15428b'
,
borderTopColor
:
'#99bbe8'
,
}
}
>
全选
<
Checkbox
style=
{
{
marginLeft
:
'10px'
}
}
indeterminate=
{
indeterminate
}
onChange=
{
onCheckAllChange1
}
checkvalue=
{
ff
}
checked=
{
checkAll
}
>
{
' '
}
</
Checkbox
>
</
Divider
>
<
CheckboxGroup
options=
{
ff
}
value=
{
checkedList
}
onChange=
{
e
=>
onChangeList1
(
e
)
}
/>
</
div
>
</
div
>
</
div
>
)
}
</
div
>
)
}
</
Modal
>
);
}
};
export
default
ChangeAdd
\ No newline at end of file
export
default
ChangeAdd
;
src/pages/platformCenter/bsmanager/workOrder/AddModal.jsx
View file @
6de1043a
...
...
@@ -35,6 +35,7 @@ import {
Dropdown
,
Menu
,
Button
,
Tooltip
,
}
from
'antd'
;
import
{
GetCM_Event_LoadEventTypeTable
,
...
...
@@ -49,7 +50,11 @@ import ChangeAdd from './changeAdd';
import
ChangeEdit
from
'./changeEdit'
;
import
ChangeImage
from
'./ChangeImage'
;
import
ModalDrag
from
'../maintenance/ModalDrag'
;
import
{
PlusOutlined
,
DownOutlined
}
from
'@ant-design/icons'
;
import
{
PlusOutlined
,
DownOutlined
,
InfoCircleOutlined
,
}
from
'@ant-design/icons'
;
import
{
set
}
from
'immutable'
;
import
{
getRoleGroup
}
from
'@/services/userCenter/roleManage/api'
;
...
...
@@ -497,6 +502,18 @@ const AddModal = props => {
const
[
isVisible1
,
setIsVisible1
]
=
useState
(
false
);
// 弹窗
const
[
characterValue
,
setCharacterValue
]
=
useState
(
''
);
const
[
form
]
=
Form
.
useForm
();
const
[
summaryIsShow
,
setSummaryIsShow
]
=
useState
(
'none'
);
// 摘要字段外部字段是否显示
const
[
reportIsShow
,
setReportIsShow
]
=
useState
(
'none'
);
// 上报字段外部字段是否显示
const
[
displayIsShow
,
setDisplayIsShow
]
=
useState
(
'none'
);
// 显示字段外部字段是否显示
const
[
editableIsShow
,
setEditableIsShow
]
=
useState
(
'none'
);
// 编辑字段外部字段是否显示
const
[
transitIsShow
,
setTransitIsShow
]
=
useState
(
'none'
);
// 转单字段外部字段是否显示
const
[
relatedEventIsShow
,
setRelatedEventIsShow
]
=
useState
(
'none'
);
// 关联字段外部字段是否显示
const
[
summaryValue
,
setSummaryValue
]
=
useState
();
// 保存摘要字段外部字段
const
[
reportValue
,
setReportValue
]
=
useState
();
// 保存上报字段外部字段
const
[
displayValue
,
setDisplayValue
]
=
useState
();
// 保存显示字段外部字段
const
[
editableValue
,
setEditableValue
]
=
useState
();
// 保存编辑字段外部字段
const
[
transitValue
,
setTransitValue
]
=
useState
();
// 保存转单字段外部字段
const
[
relatedEventValue
,
setRelatedEventValue
]
=
useState
();
// 保存关联字段外部字段
const
{
Item
}
=
Form
;
const
onSubmit
=
()
=>
{
...
...
@@ -505,23 +522,17 @@ const AddModal = props => {
setLoading
(
true
);
let
obj
=
form
.
getFieldsValue
();
obj
.
Code
=
obj
.
Code
.
toString
();
console
.
log
(
obj
);
console
.
log
(
obj
.
Reportable
);
console
.
log
(
obj
.
ReportFromWeb
);
console
.
log
(
obj
.
ReportFromMobile
);
if
(
obj
.
BusinessType
===
undefined
)
{
obj
.
BusinessType
=
rember1
;
}
if
(
obj
.
TableName
===
undefined
)
{
console
.
log
(
selectValue
);
obj
.
TableName
=
selectValue
;
}
if
(
obj
.
CreateMode
===
undefined
)
{
console
.
log
(
1111
);
obj
.
CreateMode
=
0
;
}
// eslint-disable-next-line no-constant-condition
if
(
obj
.
CreateMode
===
0
||
1
)
{
console
.
log
(
2222
);
obj
.
CreateMode
=
obj
.
CreateMode
.
toString
();
}
if
(
editable
!=
true
)
{
...
...
@@ -563,11 +574,6 @@ const AddModal = props => {
inputValue
.
ReportFromMobile
=
''
;
inputValue
.
ReportFromWeb
=
''
;
}
console
.
log
(
obj
.
BusinessType
);
console
.
log
(
ReportFromWeb
);
console
.
log
(
ReportFromMobile
);
console
.
log
(
obj
);
console
.
log
(
inputValue
);
let
data
=
{
...
obj
,
...
inputValue
,
Order
:
maxLength
};
if
(
inputValue
.
Roles
==
''
&&
inputValue
.
Reportable
!=
'否'
)
{
notification
.
warning
({
...
...
@@ -658,13 +664,10 @@ const AddModal = props => {
};
useEffect
(()
=>
{
console
.
log
(
rember1
);
console
.
log
(
selectData
);
getRole
();
if
(
type
===
'add'
)
{
setType1
(
rember1
);
form
.
setFieldsValue
({
BusinessType
:
rember1
});
console
.
log
(
Type1
);
setReportFromWeb
(
true
);
setCheckedList3
(
true
);
setChee
(
0
);
...
...
@@ -690,16 +693,62 @@ const AddModal = props => {
}
else
if
(
type
===
'edit'
)
{
getEventData1
();
GetCM_Event_QueryEventType
({
eventTypeId
:
formObj
.
ID
}).
then
(
res
=>
{
res
.
data
.
root
&&
form
.
setFieldsValue
({
...
res
.
data
.
root
});
if
(
res
.
data
.
root
)
{
console
.
log
(
res
.
data
.
root
);
console
.
log
(
res
.
data
.
root
.
Editable
);
form
.
setFieldsValue
({
...
res
.
data
.
root
}
);
setEditable
(
res
.
data
.
root
.
Editable
);
setReportFromMobile
(
res
.
data
.
root
.
ReportFromMobile
);
setReportFromWeb
(
res
.
data
.
root
.
ReportFromWeb
);
setSummaryValue
(
res
.
data
.
root
.
outSummaryFields
);
if
(
res
.
data
.
root
.
outSummaryFields
!=
0
)
{
setSummaryIsShow
(
'inline'
);
}
else
{
setSummaryIsShow
(
'none'
);
}
setReportValue
(
res
.
data
.
root
.
outReportFields
);
if
(
res
.
data
.
root
.
outReportFields
!=
0
)
{
setReportIsShow
(
'inline'
);
}
else
{
setReportIsShow
(
'none'
);
}
setDisplayValue
(
res
.
data
.
root
.
outDisplayFields
);
if
(
res
.
data
.
root
.
outDisplayFields
!=
0
)
{
setDisplayIsShow
(
'inline'
);
}
else
{
setDisplayIsShow
(
'none'
);
}
setEditableValue
(
res
.
data
.
root
.
outEditableFields
);
if
(
res
.
data
.
root
.
outEditableFields
!=
0
)
{
setEditableIsShow
(
'inline'
);
}
else
{
setEditableIsShow
(
'none'
);
}
setTransitValue
(
res
.
data
.
root
.
outTransitFields
);
if
(
res
.
data
.
root
.
outTransitFields
!=
0
)
{
setTransitIsShow
(
'inline'
);
}
else
{
setTransitIsShow
(
'none'
);
}
setRelatedEventValue
(
res
.
data
.
root
.
outRelatedEventFields
);
if
(
res
.
data
.
root
.
outRelatedEventFields
!=
0
)
{
setRelatedEventIsShow
(
'inline'
);
}
else
{
setRelatedEventIsShow
(
'none'
);
}
setInputValue
({
...
res
.
data
.
root
});
setOrder
(
res
.
data
.
root
.
Order
);
setType1
(
res
.
data
.
root
.
BusinessType
);
changTable
(
res
.
data
.
root
.
TableName
);
LoadEventFields
({
eventTableName
:
res
.
data
.
root
.
TableName
,
distinctFields
:
''
,
}).
then
(
res
=>
{
if
(
res
.
data
.
root
)
{
setNu
(
res
.
data
.
root
);
setFiled
(
formateArrDataA
(
res
.
data
.
root
,
'group'
));
console
.
log
(
res
.
data
.
root
);
}
});
}
});
}
setFlag
(
0
);
...
...
@@ -710,7 +759,6 @@ const AddModal = props => {
if
(
res
.
msg
===
'Ok'
)
{
setNu1
(
res
.
data
);
setFiled1
(
formateArrDataA1
(
res
.
data
,
'groupType'
));
console
.
log
(
res
.
data
);
}
});
};
...
...
@@ -718,13 +766,11 @@ const AddModal = props => {
const
getEventData
=
()
=>
{
GetCM_Event_LoadEventTypeTable
().
then
(
res
=>
{
if
(
res
.
msg
===
'Ok'
)
{
console
.
log
(
res
.
data
);
setStandingTable
(
res
.
data
);
let
arr
=
[];
res
.
data
.
map
((
item
,
index
)
=>
{
arr
.
push
(
item
.
text
);
});
console
.
log
(
arr
);
// setSelectValue(arr[0])
// changTable(arr[0])
}
...
...
@@ -735,7 +781,6 @@ const AddModal = props => {
setType1
(
''
);
GetCM_Event_LoadEventTypeTable
().
then
(
res
=>
{
if
(
res
.
msg
===
'Ok'
)
{
console
.
log
(
res
.
data
);
setStandingTable
(
res
.
data
);
}
});
...
...
@@ -747,12 +792,186 @@ const AddModal = props => {
if
(
res
.
data
.
root
)
{
setNu
(
res
.
data
.
root
);
setFiled
(
formateArrDataA
(
res
.
data
.
root
,
'group'
));
console
.
log
(
filed
);
console
.
log
(
res
.
data
.
root
);
ExternalSummaryField
(
res
.
data
.
root
);
ExternalReportField
(
res
.
data
.
root
);
ExternalDisplayField
(
res
.
data
.
root
);
ExternalEditableField
(
res
.
data
.
root
);
ExternalTransitField
(
res
.
data
.
root
);
ExternalRelatedEventField
(
res
.
data
.
root
);
}
});
};
// 摘要字段外部字段
const
ExternalSummaryField
=
e
=>
{
let
pp
=
formateArrDataA
(
e
,
'group'
);
let
ab
=
inputValue
.
SummaryFields
.
split
(
','
);
let
arr
=
Object
.
keys
(
pp
);
let
b
=
[];
let
a
=
[];
arr
.
map
((
item
,
index
)
=>
{
pp
[
item
].
map
((
i
,
j
)
=>
{
b
.
push
(
i
);
});
});
ab
.
map
((
item
,
index
)
=>
{
if
(
b
.
includes
(
item
)
==
false
)
{
if
(
item
==
''
)
{
a
=
[];
}
else
{
a
.
push
(
item
);
}
}
});
setSummaryValue
(
a
.
length
);
if
(
a
.
length
!=
0
)
{
setSummaryIsShow
(
'inline'
);
}
else
{
setSummaryIsShow
(
'none'
);
}
};
// 上报字段外部字段
const
ExternalReportField
=
e
=>
{
let
pp
=
formateArrDataA
(
e
,
'group'
);
let
ab
=
inputValue
.
ReportFields
.
split
(
','
);
let
arr
=
Object
.
keys
(
pp
);
let
b
=
[];
let
a
=
[];
arr
.
map
((
item
,
index
)
=>
{
pp
[
item
].
map
((
i
,
j
)
=>
{
b
.
push
(
i
);
});
});
ab
.
map
((
item
,
index
)
=>
{
if
(
b
.
includes
(
item
)
==
false
)
{
if
(
item
==
''
)
{
a
=
[];
}
else
{
a
.
push
(
item
);
}
}
});
setReportValue
(
a
.
length
);
if
(
a
.
length
!=
0
)
{
setReportIsShow
(
'inline'
);
}
else
{
setReportIsShow
(
'none'
);
}
};
// 显示字段外部字段
const
ExternalDisplayField
=
e
=>
{
let
pp
=
formateArrDataA
(
e
,
'group'
);
let
ab
=
inputValue
.
DisplayFields
.
split
(
','
);
let
arr
=
Object
.
keys
(
pp
);
let
b
=
[];
let
a
=
[];
arr
.
map
((
item
,
index
)
=>
{
pp
[
item
].
map
((
i
,
j
)
=>
{
b
.
push
(
i
);
});
});
ab
.
map
((
item
,
index
)
=>
{
if
(
b
.
includes
(
item
)
==
false
)
{
if
(
item
==
''
)
{
a
=
[];
}
else
{
a
.
push
(
item
);
}
}
});
setDisplayValue
(
a
.
length
);
if
(
a
.
length
!=
0
)
{
setDisplayIsShow
(
'inline'
);
}
else
{
setDisplayIsShow
(
'none'
);
}
};
// 编辑字段外部字段
const
ExternalEditableField
=
e
=>
{
let
pp
=
formateArrDataA
(
e
,
'group'
);
let
ab
=
inputValue
.
EditableFields
.
split
(
','
);
let
arr
=
Object
.
keys
(
pp
);
let
b
=
[];
let
a
=
[];
arr
.
map
((
item
,
index
)
=>
{
pp
[
item
].
map
((
i
,
j
)
=>
{
b
.
push
(
i
);
});
});
ab
.
map
((
item
,
index
)
=>
{
if
(
b
.
includes
(
item
)
==
false
)
{
if
(
item
==
''
)
{
a
=
[];
}
else
{
a
.
push
(
item
);
}
}
});
setEditableValue
(
a
.
length
);
if
(
a
.
length
!=
0
)
{
setEditableIsShow
(
'inline'
);
}
else
{
setEditableIsShow
(
'none'
);
}
};
// 转单字段外部字段
const
ExternalTransitField
=
e
=>
{
let
pp
=
formateArrDataA
(
e
,
'group'
);
let
ab
=
inputValue
.
TransitFields
.
split
(
','
);
let
arr
=
Object
.
keys
(
pp
);
let
b
=
[];
let
a
=
[];
arr
.
map
((
item
,
index
)
=>
{
pp
[
item
].
map
((
i
,
j
)
=>
{
b
.
push
(
i
);
});
});
ab
.
map
((
item
,
index
)
=>
{
if
(
b
.
includes
(
item
)
==
false
)
{
if
(
item
==
''
)
{
a
=
[];
}
else
{
a
.
push
(
item
);
}
}
});
setTransitValue
(
a
.
length
);
if
(
a
.
length
!=
0
)
{
setTransitIsShow
(
'inline'
);
}
else
{
setTransitIsShow
(
'none'
);
}
};
// 关联字段外部字段
const
ExternalRelatedEventField
=
e
=>
{
let
pp
=
formateArrDataA
(
e
,
'group'
);
let
ab
=
inputValue
.
RelatedEventFields
.
split
(
','
);
let
arr
=
Object
.
keys
(
pp
);
let
b
=
[];
let
a
=
[];
arr
.
map
((
item
,
index
)
=>
{
pp
[
item
].
map
((
i
,
j
)
=>
{
b
.
push
(
i
);
});
});
ab
.
map
((
item
,
index
)
=>
{
if
(
b
.
includes
(
item
)
==
false
)
{
if
(
item
==
''
)
{
a
=
[];
}
else
{
a
.
push
(
item
);
}
}
});
setRelatedEventValue
(
a
.
length
);
if
(
a
.
length
!=
0
)
{
setRelatedEventIsShow
(
'inline'
);
}
else
{
setRelatedEventIsShow
(
'none'
);
}
};
const
formateArrDataA
=
(
initialArr
,
name
)
=>
{
// 判定传参是否符合规则
if
(
!
(
initialArr
instanceof
Array
))
{
...
...
@@ -871,29 +1090,21 @@ const AddModal = props => {
};
const
onChange1
=
e
=>
{
console
.
log
(
e
.
target
.
checked
);
setEditable
(
e
.
target
.
checked
);
setCheckedList2
(
e
.
target
.
checked
);
//true
};
const
onChange2
=
e
=>
{
console
.
log
(
e
.
target
.
value
);
setValue
(
e
.
target
.
value
);
};
const
onChange3
=
e
=>
{
console
.
log
(
e
.
target
.
checked
);
setReportFromWeb
(
e
.
target
.
checked
);
setCheckedList3
(
e
.
target
.
checked
);
//true
};
const
onChange4
=
e
=>
{
console
.
log
(
e
.
target
.
checked
);
setReportFromMobile
(
e
.
target
.
checked
);
setCheckedList4
(
e
.
target
.
checked
);
//true
};
const
onOK
=
prop
=>
{
console
.
log
(
prop
.
isType
);
console
.
log
(
prop
.
stt
);
console
.
log
(
prop
.
filed22
);
console
.
log
(
prop
.
title
);
setIsVisible
(
false
);
let
inputText
=
{
...
inputValue
};
inputText
[
prop
.
pickItem
]
=
prop
.
str
;
...
...
@@ -948,22 +1159,70 @@ const AddModal = props => {
// }
};
const
onOK1
=
prop
=>
{
console
.
log
(
prop
.
isType
);
console
.
log
(
prop
.
stt
);
console
.
log
(
prop
.
title
);
setIsVisibleEdit
(
false
);
let
inputText
=
{
...
inputValue
};
inputText
[
prop
.
pickItem
]
=
prop
.
str
;
setCheckedList1
(
prop
.
stt
);
setInputValue
(
inputText
);
// 外部字段提示
if
(
prop
.
pickItem
==
'SummaryFields'
)
{
setSummaryValue
(
prop
.
valueArr
.
length
);
if
(
prop
.
valueArr
.
length
!=
0
)
{
setSummaryIsShow
(
'inline'
);
}
else
{
setSummaryIsShow
(
'none'
);
}
}
if
(
prop
.
pickItem
==
'ReportFields'
)
{
setReportValue
(
prop
.
valueArr
.
length
);
if
(
prop
.
valueArr
.
length
!=
0
)
{
setReportIsShow
(
'inline'
);
}
else
{
setReportIsShow
(
'none'
);
}
}
if
(
prop
.
pickItem
==
'DisplayFields'
)
{
setDisplayValue
(
prop
.
valueArr
.
length
);
if
(
prop
.
valueArr
.
length
!=
0
)
{
setDisplayIsShow
(
'inline'
);
}
else
{
setDisplayIsShow
(
'none'
);
}
}
if
(
prop
.
pickItem
==
'EditableFields'
)
{
setEditableValue
(
prop
.
valueArr
.
length
);
if
(
prop
.
valueArr
.
length
!=
0
)
{
setEditableIsShow
(
'inline'
);
}
else
{
setEditableIsShow
(
'none'
);
}
}
if
(
prop
.
pickItem
==
'TransitFields'
)
{
setTransitValue
(
prop
.
valueArr
.
length
);
if
(
prop
.
valueArr
.
length
!=
0
)
{
setTransitIsShow
(
'inline'
);
}
else
{
setTransitIsShow
(
'none'
);
}
}
if
(
prop
.
pickItem
==
'RelatedEventFields'
)
{
setRelatedEventValue
(
prop
.
valueArr
.
length
);
if
(
prop
.
valueArr
.
length
!=
0
)
{
setRelatedEventIsShow
(
'inline'
);
}
else
{
setRelatedEventIsShow
(
'none'
);
}
}
};
const
oKK
=
prop
=>
{
setIsVisible1
(
false
);
};
const
pickFiled
=
fileds
=>
{
if
(
form
.
getFieldsValue
().
TableName
)
{
setFlag
(
flag
+
1
);
}
let
pp
=
formateArrDataA
(
nu
,
'group'
);
let
ab
=
inputValue
[
fileds
].
split
(
','
);
console
.
log
(
pp
);
let
arr
=
Object
.
keys
(
pp
);
let
b
=
[];
let
a
=
[];
...
...
@@ -972,7 +1231,6 @@ const AddModal = props => {
b
.
push
(
i
);
});
});
console
.
log
(
ab
);
ab
.
map
((
item
,
index
)
=>
{
if
(
b
.
includes
(
item
)
==
false
)
{
if
(
item
==
''
)
{
...
...
@@ -984,10 +1242,8 @@ const AddModal = props => {
});
if
(
a
.
length
>
0
)
{
pp
.
外部字段
=
a
;
console
.
log
(
pp
);
arr
.
push
(
'外部字段'
);
}
console
.
log
(
a
);
console
.
log
(
pp
);
setFiled
(
pp
);
setTypes
(
'add'
);
...
...
@@ -999,7 +1255,6 @@ const AddModal = props => {
const
pickFiled1
=
fileds
=>
{
let
pp
=
formateArrDataA1
(
nu1
,
'group'
);
let
ab
=
inputValue
[
fileds
].
split
(
','
);
console
.
log
(
pp
);
let
arr
=
Object
.
keys
(
pp
);
let
b
=
[];
let
a
=
[];
...
...
@@ -1008,7 +1263,6 @@ const AddModal = props => {
b
.
push
(
i
);
});
});
console
.
log
(
ab
);
ab
.
map
((
item
,
index
)
=>
{
if
(
b
.
includes
(
item
)
==
false
)
{
if
(
item
==
''
)
{
...
...
@@ -1023,8 +1277,6 @@ const AddModal = props => {
// console.log(pp);
// arr.push('外部字段');
// }
console
.
log
(
a
);
console
.
log
(
pp
);
setFiled1
(
pp
);
setTypes
(
'app'
);
setCharacterValue
(
inputValue
[
fileds
]);
...
...
@@ -1133,9 +1385,10 @@ const AddModal = props => {
>
<
Form
form=
{
form
}
labelCol=
{
{
span
:
7
}
}
style=
{
{
overflowY
:
'scroll'
}
}
>
<
Row
>
<
Col
span=
{
1
3
}
>
<
Col
span=
{
1
4
}
>
<
Item
label=
"事件名称"
labelCol=
{
{
span
:
7
}
}
name=
"Name"
rules=
{
[
{
...
...
@@ -1162,30 +1415,11 @@ const AddModal = props => {
<
Input
value=
{
prefixName
}
placeholder=
"请输入编码前缀"
/>
</
Item
>
</
Col
>
<
Col
span=
{
23
}
>
{
/* <Item
label="业务类型"
name="BusinessType"
labelCol={{ span: 4 }}
rules={[
{
required: true,
message: '请选择业务类型',
},
]}
>
<Select
style={{ width: '580px' }}
placeholder="选择业务类型"
showSearch
>
{treeData ? treeData.map((item, index) => { return <Option key={index} value={item}>{item}</Option> }) : ''}
</Select>
</Item> */
}
<
Col
span=
{
24
}
>
<
span
style=
{
{
position
:
'absolute'
,
left
:
'
1
%'
,
left
:
'
2
%'
,
top
:
'9%'
,
color
:
'red'
,
fontSize
:
'16px'
,
...
...
@@ -1254,7 +1488,7 @@ const AddModal = props => {
</
div
>
</
Item
>
</
Col
>
<
Col
span=
{
2
3
}
>
<
Col
span=
{
2
4
}
>
<
Item
label=
"事件主表"
name=
"TableName"
...
...
@@ -1293,25 +1527,6 @@ const AddModal = props => {
<
Item
/>
</
Col
>
<
Col
span=
{
4
}
>
{
/* <Item
name="Reportable"
>
<Checkbox indeterminate={indeterminate} onChange={onCheckAllChange} checked={checkAll}>
客户端上报和配单(需配置事件权限、受理流程)
</Checkbox>
<CheckboxGroup value={checkedList} onChange={onChange}/>
<CheckboxGroup value={checkedList} onChange={onChange}>
<Checkbox value={'前端'}>前端</Checkbox>
<Checkbox value={'手持'}>手持</Checkbox>
</CheckboxGroup>
</Item>
*/
}
{
/* <Item
name="Reportable"
> */
}
{
/* <Checkbox indeterminate={indeterminate} onChange={onCheckAllChange} checked={checkAll}>
客户端上报和配单(需配置事件权限、受理流程)
</Checkbox> */
}
<
Item
name=
"ReportFromWeb"
>
<
Checkbox
onChange=
{
onChange3
}
checked=
{
ReportFromWeb
}
>
前端
...
...
@@ -1353,20 +1568,32 @@ const AddModal = props => {
</
Radio
.
Group
>
</
Item
>
</
Col
>
<
Col
span=
{
23
}
>
<
Col
span=
{
24
}
>
<
Item
label=
{
<
div
>
<
Tooltip
title=
{
`存在${summaryValue}个外部字段`
}
>
<
InfoCircleOutlined
style=
{
{
color
:
'red'
,
marginLeft
:
'-6px'
,
display
:
summaryIsShow
,
}
}
/>
</
Tooltip
>
<
span
style=
{
{
position
:
'absolute'
,
left
:
'1%'
,
top
:
'5%'
,
lineHeight
:
'12px'
,
verticalAlign
:
'middle'
,
color
:
'red'
,
fontSize
:
'16px'
,
}
}
>
*
</
span
>
<
Item
label=
"摘要字段"
<
span
>
摘要字段
</
span
>
</
div
>
}
name=
"SummaryFields"
labelCol=
{
{
span
:
4
}
}
rules=
{
[
...
...
@@ -1397,20 +1624,32 @@ const AddModal = props => {
</
div
>
</
Item
>
</
Col
>
<
Col
span=
{
23
}
>
<
Col
span=
{
24
}
>
<
Item
label=
{
<
div
>
<
Tooltip
title=
{
`存在${reportValue}个外部字段`
}
>
<
InfoCircleOutlined
style=
{
{
color
:
'red'
,
marginLeft
:
'-6px'
,
display
:
reportIsShow
,
}
}
/>
</
Tooltip
>
<
span
style=
{
{
position
:
'absolute'
,
left
:
'1%'
,
top
:
'5%'
,
lineHeight
:
'12px'
,
verticalAlign
:
'middle'
,
color
:
'red'
,
fontSize
:
'16px'
,
}
}
>
*
</
span
>
<
Item
label=
"上报字段"
<
span
>
上报字段
</
span
>
</
div
>
}
name=
"ReportFields"
labelCol=
{
{
span
:
4
}
}
rules=
{
[
...
...
@@ -1441,20 +1680,32 @@ const AddModal = props => {
</
div
>
</
Item
>
</
Col
>
<
Col
span=
{
23
}
>
<
Col
span=
{
24
}
>
<
Item
label=
{
<
div
>
<
Tooltip
title=
{
`存在${displayValue}个外部字段`
}
>
<
InfoCircleOutlined
style=
{
{
color
:
'red'
,
marginLeft
:
'-6px'
,
display
:
displayIsShow
,
}
}
/>
</
Tooltip
>
<
span
style=
{
{
position
:
'absolute'
,
left
:
'1%'
,
top
:
'5%'
,
lineHeight
:
'12px'
,
verticalAlign
:
'middle'
,
color
:
'red'
,
fontSize
:
'16px'
,
}
}
>
*
</
span
>
<
Item
label=
"显示字段"
<
span
>
显示字段
</
span
>
</
div
>
}
name=
"DisplayFields"
labelCol=
{
{
span
:
4
}
}
rules=
{
[
...
...
@@ -1485,20 +1736,32 @@ const AddModal = props => {
</
div
>
</
Item
>
</
Col
>
<
Col
span=
{
23
}
>
<
Col
span=
{
24
}
>
<
Item
label=
{
<
div
>
<
Tooltip
title=
{
`存在${editableValue}个外部字段`
}
>
<
InfoCircleOutlined
style=
{
{
color
:
'red'
,
marginLeft
:
'-6px'
,
display
:
editableIsShow
,
}
}
/>
</
Tooltip
>
<
span
style=
{
{
position
:
'absolute'
,
left
:
'1%'
,
top
:
'5%'
,
lineHeight
:
'12px'
,
verticalAlign
:
'middle'
,
color
:
'red'
,
fontSize
:
'16px'
,
}
}
>
*
</
span
>
<
Item
label=
"编辑字段"
<
span
>
编辑字段
</
span
>
</
div
>
}
name=
"EditableFields"
labelCol=
{
{
span
:
4
}
}
rules=
{
[
...
...
@@ -1529,8 +1792,25 @@ const AddModal = props => {
</
div
>
</
Item
>
</
Col
>
<
Col
span=
{
23
}
>
<
Item
label=
"转单字段"
name=
"TransitFields"
labelCol=
{
{
span
:
4
}
}
>
<
Col
span=
{
24
}
>
<
Item
label=
{
<
div
>
<
Tooltip
title=
{
`存在${transitValue}个外部字段`
}
>
<
InfoCircleOutlined
style=
{
{
color
:
'red'
,
marginRight
:
'2px'
,
display
:
transitIsShow
,
}
}
/>
</
Tooltip
>
<
span
>
转单字段
</
span
>
</
div
>
}
name=
"TransitFields"
labelCol=
{
{
span
:
4
}
}
>
<
div
className=
{
styles
.
filed_listItem
}
>
<
Input
style=
{
{
width
:
'83%'
}
}
...
...
@@ -1548,7 +1828,7 @@ const AddModal = props => {
</
div
>
</
Item
>
</
Col
>
<
Col
span=
{
2
3
}
>
<
Col
span=
{
2
4
}
>
<
Item
label=
"事件权限"
name=
"Roles"
labelCol=
{
{
span
:
4
}
}
>
<
div
className=
{
styles
.
filed_listItem
}
>
<
Input
...
...
@@ -1567,29 +1847,42 @@ const AddModal = props => {
</
div
>
</
Item
>
</
Col
>
<
Col
span=
{
2
3
}
>
<
Col
span=
{
2
4
}
>
<
Item
label=
"置顶条件"
name=
"TopWhere"
labelCol=
{
{
span
:
4
}
}
>
<
Input
placeholder=
"请输入置顶条件"
allowClear
/>
</
Item
>
</
Col
>
<
Col
span=
{
2
3
}
>
<
Col
span=
{
2
4
}
>
<
Item
label=
"上报视图"
name=
"ReportPage"
labelCol=
{
{
span
:
4
}
}
>
<
Input
placeholder=
"请输入上报视图"
allowClear
/>
</
Item
>
</
Col
>
<
Col
span=
{
2
3
}
>
<
Col
span=
{
2
4
}
>
<
Item
label=
"处理视图"
name=
"DealPage"
labelCol=
{
{
span
:
4
}
}
>
<
Input
placeholder=
"请输入处理视图"
allowClear
/>
</
Item
>
</
Col
>
<
Col
span=
{
2
3
}
>
<
Col
span=
{
2
4
}
>
<
Item
label=
"关联事件"
name=
"RelatedEvents"
labelCol=
{
{
span
:
4
}
}
>
<
Input
placeholder=
"请输入关联事件"
allowClear
/>
</
Item
>
</
Col
>
<
Col
span=
{
2
3
}
>
<
Col
span=
{
2
4
}
>
<
Item
label=
"关联字段"
label=
{
<
div
>
<
Tooltip
title=
{
`存在${relatedEventValue}个外部字段`
}
>
<
InfoCircleOutlined
style=
{
{
color
:
'red'
,
marginRight
:
'2px'
,
display
:
relatedEventIsShow
,
}
}
/>
</
Tooltip
>
<
span
>
关联字段
</
span
>
</
div
>
}
name=
"RelatedEventFields"
labelCol=
{
{
span
:
4
}
}
>
...
...
@@ -1610,7 +1903,7 @@ const AddModal = props => {
</
div
>
</
Item
>
</
Col
>
<
Col
span=
{
2
3
}
>
<
Col
span=
{
2
4
}
>
<
Item
label=
"接口配置"
name=
"InterfaceConfig"
...
...
@@ -1619,7 +1912,7 @@ const AddModal = props => {
<
Input
placeholder=
"请输入接口配置"
/>
</
Item
>
</
Col
>
<
Col
span=
{
2
3
}
>
<
Col
span=
{
2
4
}
>
<
Item
label=
"图片表达"
name=
"ImageExpression"
...
...
src/pages/platformCenter/bsmanager/workOrder/changeAdd.jsx
View file @
6de1043a
...
...
@@ -251,7 +251,6 @@ const ChangeAdd = props => {
},
[
filed1
]);
const
formateArrDataA1
=
(
initialArr
,
name
)
=>
{
console
.
log
(
initialArr
);
let
aa
=
[];
let
a1
=
[];
let
a2
;
...
...
@@ -269,7 +268,6 @@ const ChangeAdd = props => {
a3
.
push
(
o
);
});
});
console
.
log
(
a3
);
// 判定传参是否符合规则
if
(
!
(
a3
instanceof
Array
))
{
...
...
@@ -285,7 +283,6 @@ const ChangeAdd = props => {
nameArr
.
push
(
i
.
group
);
}
});
console
.
log
(
nameArr
);
// 新建一个包含多个list的结果对象
let
tempObj
=
{};
// 根据不同的"name"生成多个数组
...
...
@@ -298,7 +295,6 @@ const ChangeAdd = props => {
}
}
}
console
.
log
(
tempObj
);
for
(
let
key
in
tempObj
)
{
let
arr
=
[];
tempObj
[
key
].
map
(
item
=>
{
...
...
src/pages/platformCenter/bsmanager/workOrder/changeEdit.jsx
View file @
6de1043a
...
...
@@ -104,7 +104,18 @@ const EditModal = props => {
}
});
let
newArr
=
selectData
.
map
(
item
=>
item
.
name
);
console
.
log
(
newArr
);
console
.
log
(
filed
.
外部字段
);
let
valueArr
=
[];
if
(
filed
.
外部字段
)
{
newArr
.
forEach
(
item
=>
{
if
(
filed
.
外部字段
.
indexOf
(
item
)
!=
-
1
)
{
valueArr
.
push
(
item
);
}
});
}
callBackSubmit
({
valueArr
,
checkedList
,
str
:
aRR
.
join
(
','
),
pickItem
,
...
...
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