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
378d7cf1
Commit
378d7cf1
authored
Dec 22, 2022
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '事件增加是否内置配置'
parent
e4c07525
Pipeline
#65750
passed with stages
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
27 deletions
+56
-27
AddModal.jsx
src/pages/bsmanager/workOrder/incident/AddModal.jsx
+50
-21
incident.jsx
src/pages/bsmanager/workOrder/incident/incident.jsx
+6
-6
No files found.
src/pages/bsmanager/workOrder/incident/AddModal.jsx
View file @
378d7cf1
...
...
@@ -37,6 +37,7 @@ import {
Tooltip
,
Upload
,
Image
,
Switch
,
}
from
'antd'
;
import
{
GetCM_Event_LoadEventTypeTable
,
...
...
@@ -493,7 +494,7 @@ const AddModal = props => {
const
[
im
,
setIm
]
=
useState
();
const
[
previewModal
,
setPreviewModal
]
=
useState
(
false
);
const
[
show
,
setShow
]
=
useState
(
'hidden'
);
const
[
visibleChecked
,
setVisibleChecked
]
=
useState
(
false
);
const
onSubmit
=
()
=>
{
form
.
validateFields
().
then
(
validate
=>
{
if
(
validate
)
{
...
...
@@ -519,24 +520,29 @@ const AddModal = props => {
obj
.
Editable
=
editable
;
}
if
(
ReportFromWeb
===
true
&&
ReportFromMobile
===
true
)
{
obj
.
Reportable
=
'均可'
;
//
obj.Reportable = '均可';
obj
.
ReportFromMobile
=
'手持'
;
obj
.
ReportFromWeb
=
'前端'
;
}
else
if
(
ReportFromWeb
===
true
)
{
obj
.
Reportable
=
'前端'
;
//
obj.Reportable = '前端';
obj
.
ReportFromMobile
=
''
;
obj
.
ReportFromWeb
=
'前端'
;
}
else
if
(
ReportFromMobile
===
true
)
{
obj
.
Reportable
=
'手持'
;
//
obj.Reportable = '手持';
obj
.
ReportFromMobile
=
'手持'
;
obj
.
ReportFromWeb
=
''
;
}
else
{
obj
.
Reportable
=
'否'
;
//
obj.Reportable = '否';
obj
.
ReportFromMobile
=
''
;
obj
.
ReportFromWeb
=
''
;
}
if
(
visibleChecked
===
false
){
obj
.
Reportable
=
true
;
}
else
{
obj
.
Reportable
=
false
;
}
if
((
obj
.
Roles
==
''
||
obj
.
Roles
==
undefined
)
&&
obj
.
CreateMode
===
'0'
)
{
console
.
log
(
obj
.
CreateMode
)
console
.
log
(
obj
.
CreateMode
)
;
notification
.
warning
({
message
:
'提示'
,
description
:
'事件权限必填'
,
...
...
@@ -624,7 +630,9 @@ const AddModal = props => {
form
.
setFieldsValue
({
ImageExpression
:
'assets/images/caseCenter/events/通用问题1.png'
,
});
setImageUrl
(
`
${
window
.
location
.
origin
}
/civweb4/assets/images/caseCenter/events/通用问题1.png`
);
setImageUrl
(
`
${
window
.
location
.
origin
}
/civweb4/assets/images/caseCenter/events/通用问题1.png`
,
);
setIm
(
'assets/images/caseCenter/events/通用问题1.png'
);
}
else
if
(
type
===
'edit'
)
{
setChee
();
...
...
@@ -634,6 +642,11 @@ const AddModal = props => {
setEditable
(
res
.
data
.
root
.
Editable
);
setReportFromMobile
(
res
.
data
.
root
.
ReportFromMobile
);
setReportFromWeb
(
res
.
data
.
root
.
ReportFromWeb
);
if
(
res
.
data
.
root
.
Reportable
===
false
){
setVisibleChecked
(
true
);
}
else
{
setVisibleChecked
(
false
);
}
setType1
(
res
.
data
.
root
.
BusinessType
);
setOrder
(
res
.
data
.
root
.
Order
);
form
.
setFieldsValue
({
...
res
.
data
.
root
});
...
...
@@ -644,7 +657,9 @@ const AddModal = props => {
form
.
setFieldsValue
({
ImageExpression
:
'assets/images/caseCenter/events/通用问题1.png'
,
});
setImageUrl
(
`
${
window
.
location
.
origin
}
/civweb4/assets/images/caseCenter/events/通用问题1.png`
);
setImageUrl
(
`
${
window
.
location
.
origin
}
/civweb4/assets/images/caseCenter/events/通用问题1.png`
,
);
setIm
(
'assets/images/caseCenter/events/通用问题1.png'
);
}
LoadEventFields
({
...
...
@@ -1004,18 +1019,18 @@ const AddModal = props => {
arr
.
push
(
item
.
fieldName
);
});
}
if
(
aa
.
length
>
0
)
{
if
(
aa
.
length
>
0
)
{
tempObj
.
内置字段
=
[...
aa
];
}
let
list
=
{}
Object
.
keys
(
tempObj
).
forEach
(
i
=>
{
console
.
log
(
i
)
if
(
tempObj
[
i
].
length
>
0
)
{
console
.
log
(
tempObj
[
i
])
list
[
i
]
=
[...
tempObj
[
i
]]
}
})
console
.
log
(
list
)
let
list
=
{};
Object
.
keys
(
tempObj
).
forEach
(
i
=>
{
console
.
log
(
i
);
if
(
tempObj
[
i
].
length
>
0
)
{
console
.
log
(
tempObj
[
i
]);
list
[
i
]
=
[...
tempObj
[
i
]];
}
})
;
console
.
log
(
list
)
;
return
list
;
};
...
...
@@ -1344,6 +1359,10 @@ const AddModal = props => {
setShow
(
'hidden'
);
};
const
change
=
e
=>
{
setVisibleChecked
(
e
);
};
return
(
<
Drawer
title=
{
type
===
'add'
?
'添加事件类型'
:
'编辑事件类型'
}
...
...
@@ -1534,6 +1553,16 @@ const AddModal = props => {
{
/* </Item> */
}
</
Col
>
<
Col
span=
{
24
}
>
<
Item
name=
"Reportable"
label=
"是否内置"
labelCol=
{
{
span
:
5
}
}
>
<
Switch
checkedChildren=
"是"
unCheckedChildren=
"否"
checked=
{
visibleChecked
}
onChange=
{
change
}
/>
</
Item
>
</
Col
>
{
/* <Col span={5}>
<Item />
</Col>
...
...
@@ -1557,10 +1586,10 @@ const AddModal = props => {
</
Tooltip
>
<
span
>
上报方式
</
span
>
</
div
>
}
name=
"CreateMode"
}
name=
"CreateMode"
labelCol=
{
{
span
:
5
}
}
>
>
<
Radio
.
Group
onChange=
{
onChange2
}
value=
{
value
}
defaultValue=
{
chee
}
>
<
Radio
value=
{
1
}
>
立即发起(工单模型)
</
Radio
>
<
Radio
value=
{
0
}
>
仅上报(事件模型)
</
Radio
>
...
...
src/pages/bsmanager/workOrder/incident/incident.jsx
View file @
378d7cf1
...
...
@@ -146,12 +146,12 @@ const incident = () => {
// </Tooltip>
// ),
// },
{
title
:
'上报'
,
dataIndex
:
'reportable'
,
key
:
'reportable'
,
width
:
50
,
},
//
{
//
title: '上报',
//
dataIndex: 'reportable',
//
key: 'reportable',
//
width: 50,
//
},
// {
// title: '上报字段',
// dataIndex: 'reportFields',
...
...
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