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
48a09804
Commit
48a09804
authored
Jan 06, 2022
by
邓超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 优化外部字段展示,web配置添加动态添加参数模块,重构台账管理台账配置界面
parent
6de1043a
Pipeline
#41966
passed with stages
in 8 minutes 10 seconds
Changes
24
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
444 additions
and
277 deletions
+444
-277
index.jsx
src/components/CheckGroup/index.jsx
+3
-10
DraggableBodyRow.jsx
src/components/DragTable/DraggableBodyRow.jsx
+1
-2
context.js
src/components/Upload/context.js
+1
-5
index.tsx
src/components/Upload/index.tsx
+1
-1
ParmarModal.jsx
src/pages/mobileConfig/menuconfig/ParmarModal.jsx
+116
-0
editForm.jsx
src/pages/mobileConfig/menuconfig/editForm.jsx
+28
-3
flow.jsx
src/pages/platformCenter/bsmanager/workFlow/flow.jsx
+10
-41
flowNode.jsx
...s/platformCenter/bsmanager/workFlow/flowNode/flowNode.jsx
+28
-50
AuxiliaryView.jsx
...er/workFlow/flowNode/flowNodeComponents/AuxiliaryView.jsx
+3
-9
NodeEdit.jsx
...manager/workFlow/flowNode/flowNodeComponents/NodeEdit.jsx
+39
-25
Fieldselection.jsx
.../flowNodeComponents/nodeEditComponents/Fieldselection.jsx
+2
-5
incident.jsx
src/pages/platformCenter/bsmanager/workOrder/incident.jsx
+10
-6
BookConfig.jsx
src/pages/platformCenter/standingBook/BookConfig.jsx
+0
-0
changeAdd.jsx
src/pages/platformCenter/standingBook/changeAdd.jsx
+6
-18
editorModal.jsx
src/pages/platformCenter/standingBook/editorModal.jsx
+0
-0
standingBook.jsx
src/pages/platformCenter/standingBook/standingBook.jsx
+15
-23
siteConfigDrawer.js
src/pages/webConfig/components/siteConfigDrawer.js
+1
-10
webConfigForm.js
src/pages/webConfig/components/webConfigForm.js
+1
-6
index.js
src/pages/webConfig/index.js
+6
-22
ParmarModal.jsx
src/pages/webConfig/menuconfig/ParmarModal.jsx
+117
-0
editForm.jsx
src/pages/webConfig/menuconfig/editForm.jsx
+44
-12
webMenu.jsx
src/pages/webConfig/menuconfig/webMenu.jsx
+6
-23
utils.js
src/pages/webConfig/utils.js
+5
-4
config.js
src/routes/config.js
+1
-2
No files found.
src/components/CheckGroup/index.jsx
View file @
48a09804
...
...
@@ -6,18 +6,12 @@ import styles from './ItemCard.less';
const
tip
=
'loading...'
;
export
const
getId
=
item
=>
item
.
userID
||
item
.
roleID
||
item
.
stationID
||
item
.
id
;
export
const
getId
=
item
=>
item
.
userID
||
item
.
roleID
||
item
.
stationID
||
item
.
id
;
export
const
checkIsGroup
=
node
=>
[
'widgetGroup'
].
includes
(
node
?.
type
||
node
)
&&
node
.
children
?.
length
>
0
;
// 递归遍历节点的方法
export
const
checkChildrenByCondition
=
(
item
,
fn
,
withGroup
=
true
,
method
=
'every'
,
)
=>
{
export
const
checkChildrenByCondition
=
(
item
,
fn
,
withGroup
=
true
,
method
=
'every'
)
=>
{
if
(
!
checkIsGroup
(
item
))
{
return
fn
(
item
);
}
...
...
@@ -75,8 +69,7 @@ const ListCard = props => {
const
getAllID
=
item
=>
{
let
result
=
[];
const
haveChildren
=
Array
.
isArray
(
item
.
children
)
&&
item
.
children
.
length
>
0
;
const
haveChildren
=
Array
.
isArray
(
item
.
children
)
&&
item
.
children
.
length
>
0
;
// 统一使用 getId
result
.
push
(
getId
(
item
));
if
(
haveChildren
)
{
...
...
src/components/DragTable/DraggableBodyRow.jsx
View file @
48a09804
...
...
@@ -30,8 +30,7 @@ const DraggableBodyRow = ({
return
{
isOver
:
monitor
.
isOver
(),
canDrop
:
monitor
.
canDrop
(),
dropClassName
:
dragIndex
<
index
?
'drop-over-downward'
:
'drop-over-upward'
,
dropClassName
:
dragIndex
<
index
?
'drop-over-downward'
:
'drop-over-upward'
,
};
},
drop
:
item
=>
{
...
...
src/components/Upload/context.js
View file @
48a09804
...
...
@@ -37,11 +37,7 @@ const PictureWallProvider = props => {
useEffect
(()
=>
{
update
();
},
[]);
return
(
<
UploadContext
.
Provider
value
=
{{
imgBed
,
update
}}
>
{
children
}
<
/UploadContext.Provider
>
);
return
<
UploadContext
.
Provider
value
=
{{
imgBed
,
update
}}
>
{
children
}
<
/UploadContext.Provider>
;
};
export
{
UploadContext
as
default
,
PictureWallProvider
};
src/components/Upload/index.tsx
View file @
48a09804
...
...
@@ -442,7 +442,7 @@ class PicturesWall extends React.Component<PicturesWallType> {
onOk={this.handleModalOk}
className={styles.modal}
>
<Search onSearch={onSearch} />
{/* <Search onSearch={onSearch} /> */}
<Tabs defaultActiveKey={imgBed[0]?.moduleName} tabPosition="left" style={{ height: 520 }}>
{imgBed.map((item, i) => {
if (item.moduleName == picType || item.moduleName == '
CityTemp
') {
...
...
src/pages/mobileConfig/menuconfig/ParmarModal.jsx
0 → 100644
View file @
48a09804
import
React
,
{
useEffect
}
from
'react'
;
import
{
Modal
,
Form
,
Button
,
Input
,
Space
}
from
'antd'
;
import
{
MinusCircleOutlined
,
PlusOutlined
}
from
'@ant-design/icons'
;
const
ParmarModal
=
props
=>
{
const
{
pageUrl
,
visible
,
handleCancel
,
parmarCallBack
}
=
props
;
const
[
form
]
=
Form
.
useForm
();
useEffect
(()
=>
{
if
(
visible
)
{
// 给url通过字符串分割成表单需要的数据形式
console
.
log
(
pageUrl
,
'pageUrl'
);
let
parma
=
pageUrl
.
split
(
'?'
)[
1
]
?.
split
(
'&'
)
?.
map
(
item
=>
({
key
:
item
.
split
(
'='
)[
0
],
value
:
item
.
split
(
'='
)[
1
]
}));
form
.
setFieldsValue
({
parmars
:
parma
});
}
else
{
// 关闭弹窗清除表单数据
form
.
resetFields
();
}
},
[
visible
]);
// 保存
const
onFinish
=
()
=>
{
form
.
validateFields
().
then
(
validate
=>
{
if
(
validate
)
{
let
parma
=
form
.
getFieldValue
(
'parmars'
)
.
map
(
item
=>
`
${
item
.
key
}
=
${
item
.
value
}
`
)
.
join
(
'&'
);
console
.
log
(
parma
,
'parma'
);
parmarCallBack
(
`
${
pageUrl
.
split
(
'?'
)[
0
]}
?
${
parma
}
`
);
}
});
};
return
(
<
div
>
<
Modal
title=
"参数配置"
visible=
{
visible
}
onOk=
{
onFinish
}
onCancel=
{
handleCancel
}
maskClosable=
{
false
}
destroyOnClose
centered
>
<
div
style=
{
{
maxHeight
:
'400px'
,
overflowY
:
'scroll'
,
marginBottom
:
'10px'
}
}
>
<
Form
name=
"form"
form=
{
form
}
labelCol=
{
{
span
:
7
}
}
>
<
Form
.
List
name=
"parmars"
>
{
(
fields
,
{
add
,
remove
})
=>
(
<>
{
fields
.
map
(({
key
,
name
,
fieldKey
,
...
restField
})
=>
(
<
Space
key=
{
key
}
style=
{
{
display
:
'flex'
,
marginBottom
:
8
,
justifyContent
:
'center'
}
}
align=
"baseline"
>
<
Form
.
Item
{
...
restField
}
name=
{
[
name
,
'key'
]
}
fieldKey=
{
[
fieldKey
,
'key'
]
}
validateTrigger=
{
[
'onChange'
,
'onBlur'
]
}
rules=
{
[
{
required
:
true
,
message
:
'请填写参数名'
},
{
validator
:
()
=>
{
// 验证参数名不能重复
const
allKey
=
form
.
getFieldsValue
()
.
parmars
.
map
(
item
=>
(
item
?
item
.
key
:
''
));
const
repeatKey
=
new
Set
(
allKey
);
if
(
repeatKey
.
size
!==
allKey
.
length
)
{
return
Promise
.
reject
(
new
Error
(
'参数名重复'
));
}
return
Promise
.
resolve
();
},
},
]
}
>
<
Input
placeholder=
"请填写参数名"
/>
</
Form
.
Item
>
<
Form
.
Item
{
...
restField
}
name=
{
[
name
,
'value'
]
}
fieldKey=
{
[
fieldKey
,
'value'
]
}
rules=
{
[{
required
:
true
,
message
:
'请填写参数'
}]
}
>
<
Input
placeholder=
"请填写参数"
/>
</
Form
.
Item
>
<
MinusCircleOutlined
onClick=
{
()
=>
remove
(
name
)
}
style=
{
{
marginLeft
:
'10px'
,
fontSize
:
'20px'
}
}
/>
</
Space
>
))
}
<
Form
.
Item
>
<
Button
style=
{
{
width
:
'375px'
,
marginLeft
:
'30px'
}
}
type=
"dashed"
onClick=
{
()
=>
add
()
}
block
icon=
{
<
PlusOutlined
/>
}
>
添加参数
</
Button
>
</
Form
.
Item
>
</>
)
}
</
Form
.
List
>
</
Form
>
</
div
>
</
Modal
>
</
div
>
);
};
export
default
ParmarModal
;
src/pages/mobileConfig/menuconfig/editForm.jsx
View file @
48a09804
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Form
,
Input
,
Button
,
Row
,
Col
}
from
'antd'
;
import
{
Form
,
Input
,
Button
,
Row
,
Col
,
notification
}
from
'antd'
;
import
classnames
from
'classnames'
;
import
styles
from
'./addForm.less'
;
import
PicturesWall
from
'@/components/Upload/index'
;
import
ParmarModal
from
'./ParmarModal'
;
import
CheckList
from
'./checkBox'
;
const
{
Item
}
=
Form
;
...
...
@@ -10,6 +11,7 @@ const EditForm = props => {
const
{
submitCallback
,
nodeType
,
info
,
valueCallback
=
()
=>
{}
}
=
props
;
const
[
form
]
=
Form
.
useForm
();
const
[
otherForm
]
=
Form
.
useForm
();
const
[
showParmarModal
,
setShowParmarModal
]
=
useState
(
false
);
const
layout
=
{
layout
:
'horizontal'
,
labelCol
:
{
span
:
2
,
offset
:
0
},
...
...
@@ -57,6 +59,15 @@ const EditForm = props => {
const
onFinish
=
()
=>
{
submit
();
};
// 添加功能路劲参数
const
addParama
=
()
=>
{
console
.
log
(
otherForm
.
getFieldValue
(
'pageUrl'
));
if
(
!
otherForm
.
getFieldValue
(
'pageUrl'
))
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
'请先填写功能路径'
});
return
;
}
setShowParmarModal
(
true
);
};
return
(
<
div
className=
{
classnames
({
[
styles
.
divbox
]:
true
})
}
>
{
(
nodeType
===
1
||
nodeType
===
2
)
&&
(
...
...
@@ -190,8 +201,8 @@ const EditForm = props => {
</
Item
>
)
}
<
Item
label=
"功能路径"
name=
"pageUrl"
label=
"功能路径"
rules=
{
[
{
required
:
true
,
...
...
@@ -199,7 +210,12 @@ const EditForm = props => {
},
]
}
>
<
Input
/>
<
div
style=
{
{
display
:
'flex'
}
}
>
<
Item
name=
"pageUrl"
style=
{
{
marginBottom
:
0
,
width
:
'100%'
}
}
>
<
Input
placeholder=
"请输入功能路径"
/>
</
Item
>
<
Button
onClick=
{
addParama
}
>
添加参数
</
Button
>
</
div
>
</
Item
>
<
Item
label=
"功能参数"
name=
"funParam"
>
<
Input
/>
...
...
@@ -216,6 +232,15 @@ const EditForm = props => {
</
Item
>
</
Form
>
)
}
<
ParmarModal
pageUrl=
{
otherForm
.
getFieldValue
(
'pageUrl'
)
}
handleCancel=
{
()
=>
setShowParmarModal
(
false
)
}
visible=
{
showParmarModal
}
parmarCallBack=
{
url
=>
{
otherForm
.
setFieldsValue
({
pageUrl
:
url
});
setShowParmarModal
(
false
);
}
}
/>
</
div
>
);
};
...
...
src/pages/platformCenter/bsmanager/workFlow/flow.jsx
View file @
48a09804
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
useHistory
}
from
'react-router-dom'
;
import
{
reloadFlows
,
removeFlowExtend
}
from
'@/services/platform/flow'
;
import
{
Card
,
Space
,
Table
,
Popconfirm
,
Spin
,
Tooltip
,
notification
,
message
,
Button
,
}
from
'antd'
;
import
{
Card
,
Space
,
Table
,
Popconfirm
,
Spin
,
Tooltip
,
notification
,
message
,
Button
}
from
'antd'
;
import
{
RightOutlined
,
DoubleLeftOutlined
,
...
...
@@ -136,9 +126,7 @@ const Flow = () => {
dataIndex
:
'extendWebPage'
,
align
:
'center'
,
render
:
text
=>
(
<
span
style=
{
{
color
:
text
===
'(默认)'
?
'grey'
:
'000000D9'
}
}
>
{
text
}
</
span
>
<
span
style=
{
{
color
:
text
===
'(默认)'
?
'grey'
:
'000000D9'
}
}
>
{
text
}
</
span
>
),
},
{
...
...
@@ -146,9 +134,7 @@ const Flow = () => {
dataIndex
:
'extendMobilePage'
,
align
:
'center'
,
render
:
text
=>
(
<
span
style=
{
{
color
:
text
===
'(默认)'
?
'grey'
:
'000000D9'
}
}
>
{
text
}
</
span
>
<
span
style=
{
{
color
:
text
===
'(默认)'
?
'grey'
:
'000000D9'
}
}
>
{
text
}
</
span
>
),
},
{
...
...
@@ -156,20 +142,14 @@ const Flow = () => {
dataIndex
:
'extendPageCount'
,
align
:
'center'
,
width
:
80
,
render
:
text
=>
(
<
span
style=
{
{
color
:
text
===
'(无)'
?
'grey'
:
'000000D9'
}
}
>
{
text
}
</
span
>
),
render
:
text
=>
<
span
style=
{
{
color
:
text
===
'(无)'
?
'grey'
:
'000000D9'
}
}
>
{
text
}
</
span
>,
},
{
title
:
'流程结束后'
,
dataIndex
:
'flowEndBehavior'
,
align
:
'center'
,
render
:
text
=>
(
<
span
style=
{
{
color
:
text
===
'(不做处理)'
?
'grey'
:
'000000D9'
}
}
>
{
text
}
</
span
>
<
span
style=
{
{
color
:
text
===
'(不做处理)'
?
'grey'
:
'000000D9'
}
}
>
{
text
}
</
span
>
),
},
{
...
...
@@ -182,19 +162,13 @@ const Flow = () => {
title
:
'异常节点'
,
dataIndex
:
'errorNodes'
,
align
:
'center'
,
render
:
text
=>
(
<
span
style=
{
{
color
:
text
===
'(无)'
?
'grey'
:
'red'
}
}
>
{
text
}
</
span
>
),
render
:
text
=>
<
span
style=
{
{
color
:
text
===
'(无)'
?
'grey'
:
'red'
}
}
>
{
text
}
</
span
>,
},
{
title
:
'接口配置'
,
dataIndex
:
'interfaceConfig'
,
align
:
'center'
,
render
:
text
=>
(
<
span
style=
{
{
color
:
text
===
'(无)'
?
'grey'
:
'000000D9'
}
}
>
{
text
}
</
span
>
),
render
:
text
=>
<
span
style=
{
{
color
:
text
===
'(无)'
?
'grey'
:
'000000D9'
}
}
>
{
text
}
</
span
>,
},
{
title
:
'操作'
,
...
...
@@ -235,9 +209,7 @@ const Flow = () => {
okText=
"是"
cancelText=
"否"
>
<
DeleteOutlined
style=
{
{
fontSize
:
'16px'
,
color
:
'#e86060'
}
}
/>
<
DeleteOutlined
style=
{
{
fontSize
:
'16px'
,
color
:
'#e86060'
}
}
/>
</
Popconfirm
>
</
Tooltip
>
</
Space
>
...
...
@@ -260,9 +232,7 @@ const Flow = () => {
<
span
className=
{
styles
.
processTitle
}
>
流程列表
</
span
>
<
hr
className=
{
styles
.
splitLine
}
/>
{
/* 流程列表 */
}
<
div
style=
{
{
overflowY
:
'scroll'
,
height
:
'calc(100vh - 150px)'
}
}
>
<
div
style=
{
{
overflowY
:
'scroll'
,
height
:
'calc(100vh - 150px)'
}
}
>
{
processData
.
length
>
0
&&
processData
.
map
((
item
,
index
)
=>
(
<
div
...
...
@@ -322,8 +292,7 @@ const Flow = () => {
},
})
}
pagination=
{
{
showTotal
:
(
total
,
range
)
=>
`第${range[0]}-${range[1]} 条/共 ${total} 条`
,
showTotal
:
(
total
,
range
)
=>
`第${range[0]}-${range[1]} 条/共 ${total} 条`
,
pageSizeOptions
:
[
10
,
20
,
50
,
100
],
defaultPageSize
:
10
,
showQuickJumper
:
true
,
...
...
src/pages/platformCenter/bsmanager/workFlow/flowNode/flowNode.jsx
View file @
48a09804
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
useHistory
}
from
'react-router-dom'
;
import
{
reloadFlowNodes
,
removeFlowNodeExtend
,
}
from
'@/services/platform/flow'
;
import
{
Space
,
Table
,
Popconfirm
,
Tooltip
,
notification
,
message
,
Button
,
Spin
,
}
from
'antd'
;
import
{
RollbackOutlined
,
EditTwoTone
,
ControlOutlined
,
DeleteOutlined
,
}
from
'@ant-design/icons'
;
import
{
reloadFlowNodes
,
removeFlowNodeExtend
}
from
'@/services/platform/flow'
;
import
{
Space
,
Table
,
Popconfirm
,
Tooltip
,
notification
,
message
,
Button
,
Spin
}
from
'antd'
;
import
{
RollbackOutlined
,
EditTwoTone
,
ControlOutlined
,
DeleteOutlined
}
from
'@ant-design/icons'
;
import
PageContainer
from
'@/components/BasePageContainer'
;
import
NodeEdit
from
'./flowNodeComponents/NodeEdit'
;
import
AuxiliaryView
from
'./flowNodeComponents/AuxiliaryView'
;
...
...
@@ -135,18 +118,14 @@ const FlowNode = () => {
dataIndex
:
'extendHandover'
,
align
:
'center'
,
width
:
80
,
render
:
(
text
,
record
)
=>
(
<
span
style=
{
{
color
:
textStyleOne
(
text
,
record
)
}
}
>
{
text
}
</
span
>
),
render
:
(
text
,
record
)
=>
<
span
style=
{
{
color
:
textStyleOne
(
text
,
record
)
}
}
>
{
text
}
</
span
>,
},
{
title
:
'节点类型'
,
dataIndex
:
'extendNodeType'
,
align
:
'center'
,
width
:
80
,
render
:
(
text
,
record
)
=>
(
<
span
style=
{
{
color
:
textStyleOne
(
text
,
record
)
}
}
>
{
text
}
</
span
>
),
render
:
(
text
,
record
)
=>
<
span
style=
{
{
color
:
textStyleOne
(
text
,
record
)
}
}
>
{
text
}
</
span
>,
},
{
title
:
'工单主表'
,
...
...
@@ -168,9 +147,7 @@ const FlowNode = () => {
align
:
'center'
,
width
:
80
,
render
:
(
text
,
record
)
=>
(
<
span
style=
{
{
color
:
record
.
colorType
===
2
?
'red'
:
'#000000D9'
}
}
>
{
text
}
</
span
>
<
span
style=
{
{
color
:
record
.
colorType
===
2
?
'red'
:
'#000000D9'
}
}
>
{
text
}
</
span
>
),
},
{
...
...
@@ -179,11 +156,17 @@ const FlowNode = () => {
align
:
'center'
,
width
:
80
,
render
:
(
text
,
record
)
=>
(
<
span
style=
{
{
color
:
record
.
colorType
===
2
?
'red'
:
'#000000D9'
}
}
>
{
text
}
</
span
>
<
span
style=
{
{
color
:
record
.
colorType
===
2
?
'red'
:
'#000000D9'
}
}
>
{
text
}
</
span
>
),
},
{
title
:
'外部字段'
,
dataIndex
:
'outFields'
,
key
:
'outFields'
,
align
:
'center'
,
width
:
100
,
render
:
text
=>
<
span
style=
{
{
color
:
Number
(
text
)
>
0
?
'red'
:
''
}
}
>
{
text
}
</
span
>,
},
{
title
:
'补正'
,
...
...
@@ -191,9 +174,7 @@ const FlowNode = () => {
align
:
'center'
,
width
:
80
,
render
:
(
text
,
record
)
=>
(
<
span
style=
{
{
color
:
record
.
colorType
===
2
?
'red'
:
'#000000D9'
}
}
>
{
text
}
</
span
>
<
span
style=
{
{
color
:
record
.
colorType
===
2
?
'red'
:
'#000000D9'
}
}
>
{
text
}
</
span
>
),
},
{
...
...
@@ -202,9 +183,7 @@ const FlowNode = () => {
align
:
'center'
,
width
:
80
,
render
:
(
text
,
record
)
=>
(
<
span
style=
{
{
color
:
record
.
colorType
===
2
?
'red'
:
'#000000D9'
}
}
>
{
text
}
</
span
>
<
span
style=
{
{
color
:
record
.
colorType
===
2
?
'red'
:
'#000000D9'
}
}
>
{
text
}
</
span
>
),
},
{
...
...
@@ -213,9 +192,7 @@ const FlowNode = () => {
align
:
'center'
,
width
:
80
,
render
:
(
text
,
record
)
=>
(
<
span
style=
{
{
color
:
record
.
colorType
===
2
?
'red'
:
'#000000D9'
}
}
>
{
text
}
</
span
>
<
span
style=
{
{
color
:
record
.
colorType
===
2
?
'red'
:
'#000000D9'
}
}
>
{
text
}
</
span
>
),
},
{
...
...
@@ -224,9 +201,7 @@ const FlowNode = () => {
align
:
'center'
,
width
:
80
,
render
:
(
text
,
record
)
=>
(
<
span
style=
{
{
color
:
record
.
colorType
===
2
?
'red'
:
'#000000D9'
}
}
>
{
text
}
</
span
>
<
span
style=
{
{
color
:
record
.
colorType
===
2
?
'red'
:
'#000000D9'
}
}
>
{
text
}
</
span
>
),
},
{
...
...
@@ -235,9 +210,7 @@ const FlowNode = () => {
align
:
'center'
,
width
:
80
,
render
:
(
text
,
record
)
=>
(
<
span
style=
{
{
color
:
record
.
colorType
===
2
?
'red'
:
'#000000D9'
}
}
>
{
text
}
</
span
>
<
span
style=
{
{
color
:
record
.
colorType
===
2
?
'red'
:
'#000000D9'
}
}
>
{
text
}
</
span
>
),
},
{
...
...
@@ -278,9 +251,7 @@ const FlowNode = () => {
okText=
"是"
cancelText=
"否"
>
<
DeleteOutlined
style=
{
{
fontSize
:
'16px'
,
color
:
'#e86060'
}
}
/>
<
DeleteOutlined
style=
{
{
fontSize
:
'16px'
,
color
:
'#e86060'
}
}
/>
</
Popconfirm
>
</
Tooltip
>
</
Space
>
...
...
@@ -359,6 +330,13 @@ const FlowNode = () => {
align
:
'center'
,
width
:
80
,
},
{
title
:
'外部字段'
,
dataIndex
:
'outFields'
,
key
:
'outFields'
,
align
:
'center'
,
width
:
100
,
},
{
title
:
'补正'
,
align
:
'center'
,
...
...
src/pages/platformCenter/bsmanager/workFlow/flowNode/flowNodeComponents/AuxiliaryView.jsx
View file @
48a09804
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
reloadFlowNodeExtendPages
,
removeFlowNodeExtendPage
,
}
from
'@/services/platform/flow'
;
import
{
reloadFlowNodeExtendPages
,
removeFlowNodeExtendPage
}
from
'@/services/platform/flow'
;
import
{
Table
,
Modal
,
...
...
@@ -168,9 +165,7 @@ const AuxiliaryView = props => {
okText=
"是"
cancelText=
"否"
>
<
DeleteOutlined
style=
{
{
fontSize
:
'16px'
,
color
:
'#e86060'
}
}
/>
<
DeleteOutlined
style=
{
{
fontSize
:
'16px'
,
color
:
'#e86060'
}
}
/>
</
Popconfirm
>
</
Tooltip
>
</
Space
>
...
...
@@ -214,8 +209,7 @@ const AuxiliaryView = props => {
},
})
}
pagination=
{
{
showTotal
:
(
total
,
range
)
=>
`第${range[0]}-${range[1]} 条/共 ${total} 条`
,
showTotal
:
(
total
,
range
)
=>
`第${range[0]}-${range[1]} 条/共 ${total} 条`
,
pageSizeOptions
:
[
10
,
20
,
50
,
100
],
defaultPageSize
:
10
,
showQuickJumper
:
true
,
...
...
src/pages/platformCenter/bsmanager/workFlow/flowNode/flowNodeComponents/NodeEdit.jsx
View file @
48a09804
...
...
@@ -19,8 +19,9 @@ import {
message
,
Drawer
,
Space
,
Tooltip
,
}
from
'antd'
;
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
import
{
PlusOutlined
,
InfoCircleOutlined
}
from
'@ant-design/icons'
;
import
Fieldselection
from
'./nodeEditComponents/Fieldselection'
;
import
styles
from
'../flowNode.less'
;
const
{
Option
}
=
Select
;
...
...
@@ -37,7 +38,6 @@ const NodeEdit = props => {
const
[
filedData
,
setFiledData
]
=
useState
([]);
// 已选字段列表
const
[
form
]
=
Form
.
useForm
();
useEffect
(()
=>
{
form
.
resetFields
();
if
(
visible
)
{
// 获取表单回显
getFormData
();
...
...
@@ -47,6 +47,8 @@ const NodeEdit = props => {
getTableName
();
// 获取反馈类型
getFeedbackName
();
}
else
{
form
.
resetFields
();
}
},
[
visible
]);
// 获取表单回显
...
...
@@ -136,9 +138,7 @@ const NodeEdit = props => {
}
checkList
.
forEach
(
element
=>
{
// 当前得模块是否有当前字段
let
indeterminate
=
element
.
plainOptions
.
some
(
checkName
=>
checkName
===
item
,
);
let
indeterminate
=
element
.
plainOptions
.
some
(
checkName
=>
checkName
===
item
);
// 处理已选中的字段
if
(
indeterminate
)
{
element
.
defaultCheckedList
.
push
(
item
);
...
...
@@ -152,9 +152,7 @@ const NodeEdit = props => {
element
.
indeterminate
=
false
;
}
// 处理是否全选字段
if
(
element
.
defaultCheckedList
.
length
===
element
.
plainOptions
.
length
)
{
if
(
element
.
defaultCheckedList
.
length
===
element
.
plainOptions
.
length
)
{
element
.
checkAll
=
true
;
}
else
{
element
.
checkAll
=
false
;
...
...
@@ -233,6 +231,7 @@ const NodeEdit = props => {
title=
"流程节点配置"
width=
"500px"
onClose=
{
handleCancel
}
destroyOnClose
visible=
{
visible
}
footer=
{
<
Space
>
...
...
@@ -267,11 +266,7 @@ const NodeEdit = props => {
<
Option
value=
"办理关单"
>
办理关单
</
Option
>
</
Select
>
</
Form
.
Item
>
<
Form
.
Item
name=
"EditableLater"
valuePropName=
"checked"
style=
{
{
marginBottom
:
0
}
}
>
<
Form
.
Item
name=
"EditableLater"
valuePropName=
"checked"
style=
{
{
marginBottom
:
0
}
}
>
<
Checkbox
>
允许补正(事后修改)
</
Checkbox
>
</
Form
.
Item
>
<
div
style=
{
{
display
:
'flex'
}
}
>
...
...
@@ -309,17 +304,13 @@ const NodeEdit = props => {
<
Option
value=
"移交上报人"
>
移交上报人
</
Option
>
</
Select
>
</
Form
.
Item
>
<
Form
.
Item
label=
"平级移交"
name=
"Transferable"
initialValue=
"0"
>
<
Form
.
Item
label=
"平级移交"
name=
"Transferable"
>
<
Radio
.
Group
>
<
Radio
value=
"0"
>
否
</
Radio
>
<
Radio
value=
"1"
>
是
</
Radio
>
</
Radio
.
Group
>
</
Form
.
Item
>
<
Form
.
Item
label=
"显示事件信息"
name=
"EventsInformation"
initialValue=
"0"
>
<
Form
.
Item
label=
"显示事件信息"
name=
"EventsInformation"
>
<
Radio
.
Group
>
<
Radio
value=
"0"
>
否
</
Radio
>
<
Radio
value=
"1"
>
是
</
Radio
>
...
...
@@ -334,7 +325,20 @@ const NodeEdit = props => {
))
}
</
Select
>
</
Form
.
Item
>
<
Form
.
Item
label=
"字段编辑"
>
<
Form
.
Item
label=
{
<
div
className=
{
styles
.
formData_label
}
>
{
form
.
getFieldValue
(
'OutFields'
)
>
0
?
(
<
Tooltip
title=
{
`外部字段${form.getFieldValue('OutFields')}个`
}
>
<
InfoCircleOutlined
style=
{
{
color
:
'red'
,
padding
:
'0.2rem 0.2rem 0 0'
}
}
/>
</
Tooltip
>
)
:
(
''
)
}
<
span
>
字段编辑
</
span
>
</
div
>
}
>
<
div
className=
{
styles
.
filedListItem
}
>
<
Form
.
Item
name=
"Fields"
style=
{
{
marginBottom
:
0
,
width
:
'100%'
}
}
>
<
Input
placeholder=
"请选编辑字段"
allowClear
/>
...
...
@@ -348,12 +352,22 @@ const NodeEdit = props => {
/>
</
div
>
</
Form
.
Item
>
<
Form
.
Item
label=
"查看字段"
>
<
Form
.
Item
label=
{
<
div
className=
{
styles
.
formData_label
}
>
{
form
.
getFieldValue
(
'OutSearchFields'
)
>
0
?
(
<
Tooltip
title=
{
`外部字段${form.getFieldValue('OutSearchFields')}个`
}
>
<
InfoCircleOutlined
style=
{
{
color
:
'red'
,
padding
:
'0.2rem 0.2rem 0 0'
}
}
/>
</
Tooltip
>
)
:
(
''
)
}
<
span
>
查看字段
</
span
>
</
div
>
}
>
<
div
className=
{
styles
.
filedListItem
}
>
<
Form
.
Item
name=
"SeeFields"
style=
{
{
marginBottom
:
0
,
width
:
'100%'
}
}
>
<
Form
.
Item
name=
"SeeFields"
style=
{
{
marginBottom
:
0
,
width
:
'100%'
}
}
>
<
Input
placeholder=
"请选择查看字段(工程模型)"
allowClear
/>
</
Form
.
Item
>
<
Button
...
...
src/pages/platformCenter/bsmanager/workFlow/flowNode/flowNodeComponents/nodeEditComponents/Fieldselection.jsx
View file @
48a09804
...
...
@@ -105,8 +105,7 @@ const Fieldselection = props => {
chooseList
[
index
].
defaultCheckedList
=
list
;
chooseList
[
index
].
indeterminate
=
!!
list
.
length
&&
list
.
length
<
chooseList
[
index
].
plainOptions
.
length
;
chooseList
[
index
].
checkAll
=
list
.
length
===
chooseList
[
index
].
plainOptions
.
length
;
chooseList
[
index
].
checkAll
=
list
.
length
===
chooseList
[
index
].
plainOptions
.
length
;
return
chooseList
;
});
};
...
...
@@ -114,9 +113,7 @@ const Fieldselection = props => {
const
onCheckAllChange
=
(
e
,
index
)
=>
{
setCheckList
(
value
=>
{
const
chooseList
=
JSON
.
parse
(
JSON
.
stringify
(
value
));
chooseList
[
index
].
defaultCheckedList
=
e
.
target
.
checked
?
chooseList
[
index
].
plainOptions
:
[];
chooseList
[
index
].
defaultCheckedList
=
e
.
target
.
checked
?
chooseList
[
index
].
plainOptions
:
[];
chooseList
[
index
].
indeterminate
=
false
;
chooseList
[
index
].
checkAll
=
e
.
target
.
checked
;
return
chooseList
;
...
...
src/pages/platformCenter/bsmanager/workOrder/incident.jsx
View file @
48a09804
...
...
@@ -196,6 +196,14 @@ const incident = () => {
/>
),
},
{
title
:
'外部字段'
,
dataIndex
:
'outFields'
,
key
:
'outFields'
,
align
:
'center'
,
width
:
100
,
render
:
text
=>
<
span
style=
{
{
color
:
Number
(
text
)
>
0
?
'red'
:
''
}
}
>
{
text
}
</
span
>,
},
{
title
:
'上报方式'
,
dataIndex
:
'createMode'
,
...
...
@@ -210,10 +218,7 @@ const incident = () => {
render
:
record
=>
(
<
Space
size=
"middle"
>
<
Tooltip
title=
"编辑事件类型"
>
<
EditTwoTone
onClick=
{
()
=>
editEventType
(
record
)
}
style=
{
{
fontSize
:
'16px'
}
}
/>
<
EditTwoTone
onClick=
{
()
=>
editEventType
(
record
)
}
style=
{
{
fontSize
:
'16px'
}
}
/>
</
Tooltip
>
<
Tooltip
title=
"删除事件类型"
>
<
Popconfirm
...
...
@@ -558,8 +563,7 @@ const incident = () => {
dataSource=
{
tableData
[
pickItem
]
}
scroll=
{
{
y
:
'calc(100vh - 155px)'
,
x
:
'max-content'
}
}
pagination=
{
{
showTotal
:
(
total
,
range
)
=>
`第${range[0]}-${range[1]} 条/共 ${total} 条`
,
showTotal
:
(
total
,
range
)
=>
`第${range[0]}-${range[1]} 条/共 ${total} 条`
,
pageSizeOptions
:
[
10
,
20
,
50
,
100
],
defaultPageSize
:
20
,
showQuickJumper
:
true
,
...
...
src/pages/platformCenter/standingBook/BookConfig.jsx
0 → 100644
View file @
48a09804
This diff is collapsed.
Click to expand it.
src/pages/platformCenter/standingBook/changeAdd.jsx
View file @
48a09804
...
...
@@ -19,15 +19,7 @@ const AddModal = props => {
});
return
ref
.
current
;
};
const
{
callBackSubmit
=
()
=>
{},
isType
,
pickItem
,
visible
,
filed
,
characterValue
,
newCheckedList
,
}
=
props
;
const
{
callBackSubmit
,
pickItem
,
visible
,
filed
,
newCheckedList
}
=
props
;
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
value
,
setValue
]
=
useState
(
''
);
const
[
checkValue
,
setCheckValue
]
=
useState
([]);
...
...
@@ -47,8 +39,7 @@ const AddModal = props => {
setCheckedList
(
checkedListArr
);
const
indeterminateArr
=
[...
indeterminate
];
const
checkAllArr
=
[...
checkAll
];
indeterminateArr
[
index
]
=
!!
list
.
length
&&
list
.
length
<
filed
[
title
].
length
;
indeterminateArr
[
index
]
=
!!
list
.
length
&&
list
.
length
<
filed
[
title
].
length
;
checkAllArr
[
index
]
=
list
.
length
===
filed
[
title
].
length
;
setIndeterminate
(
indeterminateArr
);
setCheckAll
(
checkAllArr
);
...
...
@@ -132,6 +123,7 @@ const AddModal = props => {
dataIndex
:
'name'
,
width
:
150
,
key
:
'name'
,
ellipsis
:
true
,
},
];
useEffect
(()
=>
{
...
...
@@ -149,8 +141,7 @@ const AddModal = props => {
}
});
indeterminateArr
.
push
(
!!
checkArr
[
index
].
length
&&
checkArr
[
index
].
length
<
filed
[
item
].
length
,
!!
checkArr
[
index
].
length
&&
checkArr
[
index
].
length
<
filed
[
item
].
length
,
);
checkAllArr
.
push
(
checkArr
[
index
].
length
===
filed
[
item
].
length
);
});
...
...
@@ -184,7 +175,7 @@ const AddModal = props => {
};
return
(
<
Modal
title=
{
isType
===
'rule'
?
'选择验证规则'
:
'字段集选择'
}
title=
"字段集选择"
bodyStyle=
{
{
width
:
'100%'
,
minHeight
:
'100px'
}
}
style=
{
{
top
:
'10px'
}
}
width=
"750px"
...
...
@@ -201,10 +192,7 @@ const AddModal = props => {
>
{
visible
&&
(
<
div
className=
{
styles
.
listCard
}
>
<
div
className=
{
styles
.
cardItem
}
style=
{
{
borderRight
:
'1px solid #99bbe8'
}
}
>
<
div
className=
{
styles
.
cardItem
}
style=
{
{
borderRight
:
'1px solid #99bbe8'
}
}
>
<
Divider
orientation=
"left"
style=
{
{
margin
:
'0 0 10px 0'
,
backgroundColor
:
'#dfe8f6'
}
}
...
...
src/pages/platformCenter/standingBook/editorModal.jsx
deleted
100644 → 0
View file @
6de1043a
This diff is collapsed.
Click to expand it.
src/pages/platformCenter/standingBook/standingBook.jsx
View file @
48a09804
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Form
,
Card
,
Space
,
Table
,
Popconfirm
,
Spin
,
Tooltip
,
notification
,
}
from
'antd'
;
import
{
Form
,
Card
,
Space
,
Table
,
Popconfirm
,
Spin
,
Tooltip
,
notification
}
from
'antd'
;
import
{
DoubleLeftOutlined
,
...
...
@@ -20,11 +11,8 @@ import {
}
from
'@ant-design/icons'
;
import
classnames
from
'classnames'
;
import
PageContainer
from
'@/components/BasePageContainer'
;
import
{
GetCM_Ledger_LoadLedgers
,
CM_Ledger_RmoveLedger
,
}
from
'@/services/standingBook/api'
;
import
AddModal
from
'./editorModal'
;
import
{
GetCM_Ledger_LoadLedgers
,
CM_Ledger_RmoveLedger
}
from
'@/services/standingBook/api'
;
import
AddModal
from
'./BookConfig'
;
import
styles
from
'./standingBook.less'
;
const
standingBook
=
props
=>
{
const
[
allData
,
setAllData
]
=
useState
([]);
...
...
@@ -110,6 +98,14 @@ const standingBook = props => {
align
:
'center'
,
width
:
100
,
},
{
title
:
'外部字段'
,
dataIndex
:
'outFields'
,
key
:
'outFields'
,
align
:
'center'
,
width
:
100
,
render
:
text
=>
<
span
style=
{
{
color
:
Number
(
text
)
>
0
?
'red'
:
''
}
}
>
{
text
}
</
span
>,
},
{
title
:
'操作'
,
ellipsis
:
true
,
...
...
@@ -117,10 +113,7 @@ const standingBook = props => {
render
:
(
text
,
record
)
=>
(
<
Space
>
<
Tooltip
title=
"编辑此表"
>
<
EditTwoTone
onClick=
{
()
=>
editor
(
record
)
}
style=
{
{
fontSize
:
'16px'
}
}
/>
<
EditTwoTone
onClick=
{
()
=>
editor
(
record
)
}
style=
{
{
fontSize
:
'16px'
}
}
/>
</
Tooltip
>
<
Tooltip
title=
"删除此表"
>
...
...
@@ -281,8 +274,8 @@ const standingBook = props => {
onClick=
{
e
=>
setPickItem
(
item
)
}
key=
{
index
}
>
{
item
}
(
{
allData
[
item
]
?
allData
[
item
].
length
:
''
}
)
{
item
===
pickItem
?
<
RightOutlined
/>
:
''
}{
'
'
}
{
item
}
(
{
allData
[
item
]
?
allData
[
item
].
length
:
''
}
)
{
item
===
pickItem
?
<
RightOutlined
/>
:
'
'
}
</
div
>
);
})
}
...
...
@@ -331,8 +324,7 @@ const standingBook = props => {
scroll=
{
{
x
:
'max-content'
,
y
:
'calc(100vh - 150px)'
}
}
// scroll={{ x: 'max-content' }}
pagination=
{
{
showTotal
:
(
total
,
range
)
=>
`第${range[0]}-${range[1]} 条/共 ${total} 条`
,
showTotal
:
(
total
,
range
)
=>
`第${range[0]}-${range[1]} 条/共 ${total} 条`
,
pageSizeOptions
:
[
10
,
20
,
50
,
100
],
defaultPageSize
:
20
,
showQuickJumper
:
true
,
...
...
src/pages/webConfig/components/siteConfigDrawer.js
View file @
48a09804
...
...
@@ -4,16 +4,7 @@ import WebConfigForm from './webConfigForm';
import
{
postEditWebConfig
}
from
'@/services/webConfig/api'
;
export
default
props
=>
{
const
{
visible
,
onClose
,
config
,
hasIntegerate
,
isEdit
,
onOk
,
submitting
,
productList
,
}
=
props
;
const
{
visible
,
onClose
,
config
,
hasIntegerate
,
isEdit
,
onOk
,
submitting
,
productList
}
=
props
;
return
(
<
Drawer
...
...
src/pages/webConfig/components/webConfigForm.js
View file @
48a09804
import
BaseForm
from
'@/components/BaseForm'
;
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
getLoginPage
,
getMapCofigs
,
getWebThemes
,
getProductList
,
}
from
'@/services/webConfig/api'
;
import
{
getLoginPage
,
getMapCofigs
,
getWebThemes
,
getProductList
}
from
'@/services/webConfig/api'
;
import
{
Row
,
Col
}
from
'antd'
;
import
{
getDefaultGetWebconfig
,
singleStyleData
,
webMode
}
from
'../utils'
;
...
...
src/pages/webConfig/index.js
View file @
48a09804
...
...
@@ -38,8 +38,7 @@ const WebConfigPage = props => {
const
[
configFiles
,
setConfigFiles
]
=
useState
([]);
const
[
productList
,
setProductList
]
=
useState
([]);
// 产品列表
const
hasIntegerate
=
()
=>
webs
.
some
(
w
=>
w
.
id
.
startsWith
(
webMode
.
integration
));
const
hasIntegerate
=
()
=>
webs
.
some
(
w
=>
w
.
id
.
startsWith
(
webMode
.
integration
));
useEffect
(()
=>
{
let
canceled
=
{
cancel
:
false
};
...
...
@@ -141,9 +140,7 @@ const WebConfigPage = props => {
const
handleDeleteWeb
=
(
webToOperate
,
closeModal
)
=>
{
// eslint-disable-next-line prefer-destructuring
const
client
=
webToOperate
?.
id
?.
split
(
webToOperate
.
id
.
startsWith
(
webMode
.
single
)
?
webMode
.
single
:
webMode
.
integration
,
webToOperate
.
id
.
startsWith
(
webMode
.
single
)
?
webMode
.
single
:
webMode
.
integration
,
)[
1
];
if
(
client
)
{
deleteWebsite
(
client
)
...
...
@@ -191,9 +188,7 @@ const WebConfigPage = props => {
content
:
(
<
span
>
删除网站
{
' '
}
<
span
style
=
{{
fontWeight
:
800
,
color
:
'#1890ff'
}}
>
{
webToOperate
.
text
}
<
/span>{' '
}
<
span
style
=
{{
fontWeight
:
800
,
color
:
'#1890ff'
}}
>
{
webToOperate
.
text
}
<
/span>{' '
}
后将无法恢复
,
确认删除
?
<
/span
>
),
...
...
@@ -221,21 +216,12 @@ const WebConfigPage = props => {
if
(
isSite
)
{
url
=
val
;
}
else
{
url
=
localStorage
.
getItem
(
'pd2-baseUrl'
)
?
localStorage
.
getItem
(
'pd2-baseUrl'
)
+
val
:
val
;
url
=
localStorage
.
getItem
(
'pd2-baseUrl'
)
?
localStorage
.
getItem
(
'pd2-baseUrl'
)
+
val
:
val
;
}
return
url
;
};
const
handleSubmit
=
val
=>
{
let
{
bannerLogo
,
logo
,
shortcutIcon
,
baseBannerUrl
,
baseIconUrl
,
baseLogoUrl
,
}
=
val
;
let
{
bannerLogo
,
logo
,
shortcutIcon
,
baseBannerUrl
,
baseIconUrl
,
baseLogoUrl
}
=
val
;
baseBannerUrl
=
handleGeturl
(
bannerLogo
);
baseIconUrl
=
handleGeturl
(
shortcutIcon
);
baseLogoUrl
=
handleGeturl
(
logo
);
...
...
@@ -318,9 +304,7 @@ const WebConfigPage = props => {
<
EditTwoTone
/>
查看
/
编辑网站配置
<
/span
>
<
MenuConfig
menu
=
{
tabPaneItem
?.
children
.
find
(
w
=>
w
.
menuType
===
'Web4MenuRoot'
,
)}
menu
=
{
tabPaneItem
?.
children
.
find
(
w
=>
w
.
menuType
===
'Web4MenuRoot'
)}
onUpdate
=
{
handleUpdateOnMenuChange
}
configFiles
=
{
configFiles
}
updateMenuTree
=
{
updateMenuTree
}
...
...
src/pages/webConfig/menuconfig/ParmarModal.jsx
0 → 100644
View file @
48a09804
import
React
,
{
useEffect
}
from
'react'
;
import
{
Modal
,
Form
,
Button
,
Input
,
Space
}
from
'antd'
;
import
{
MinusCircleOutlined
,
PlusOutlined
}
from
'@ant-design/icons'
;
const
ParmarModal
=
props
=>
{
const
{
pageUrl
,
visible
,
handleCancel
,
parmarCallBack
}
=
props
;
const
[
form
]
=
Form
.
useForm
();
useEffect
(()
=>
{
if
(
visible
)
{
// 给url通过字符串分割成表单需要的数据形式
let
parma
=
pageUrl
.
split
(
'|'
)[
1
]
?.
split
(
'&'
)
?.
map
(
item
=>
({
key
:
item
.
split
(
'='
)[
0
],
value
:
item
.
split
(
'='
)[
1
]
}));
form
.
setFieldsValue
({
parmars
:
parma
});
}
else
{
// 关闭弹窗清除表单数据
form
.
resetFields
();
}
},
[
visible
]);
// 保存
const
onFinish
=
()
=>
{
form
.
validateFields
().
then
(
validate
=>
{
if
(
validate
)
{
console
.
log
(
validate
,
'validate'
);
let
parma
=
form
.
getFieldValue
(
'parmars'
)
.
map
(
item
=>
`
${
item
.
key
}
=
${
item
.
value
}
`
)
.
join
(
'&'
);
console
.
log
(
parma
,
'parma'
);
parmarCallBack
(
`
${
pageUrl
.
split
(
'|'
)[
0
]}
|
${
parma
}
`
);
}
});
};
return
(
<
div
>
<
Modal
title=
"参数配置"
visible=
{
visible
}
onOk=
{
onFinish
}
onCancel=
{
handleCancel
}
maskClosable=
{
false
}
destroyOnClose
centered
>
<
div
style=
{
{
maxHeight
:
'400px'
,
overflowY
:
'scroll'
,
marginBottom
:
'10px'
}
}
>
<
Form
name=
"form"
form=
{
form
}
labelCol=
{
{
span
:
7
}
}
>
<
Form
.
List
name=
"parmars"
>
{
(
fields
,
{
add
,
remove
})
=>
(
<>
{
fields
.
map
(({
key
,
name
,
fieldKey
,
...
restField
})
=>
(
<
Space
key=
{
key
}
style=
{
{
display
:
'flex'
,
marginBottom
:
8
,
justifyContent
:
'center'
}
}
align=
"baseline"
>
<
Form
.
Item
{
...
restField
}
name=
{
[
name
,
'key'
]
}
fieldKey=
{
[
fieldKey
,
'key'
]
}
validateTrigger=
{
[
'onChange'
,
'onBlur'
]
}
rules=
{
[
{
required
:
true
,
message
:
'请填写参数名'
},
{
validator
:
()
=>
{
// 验证参数名不能重复
const
allKey
=
form
.
getFieldsValue
()
.
parmars
.
map
(
item
=>
(
item
?
item
.
key
:
''
));
const
repeatKey
=
new
Set
(
allKey
);
if
(
repeatKey
.
size
!==
allKey
.
length
)
{
return
Promise
.
reject
(
new
Error
(
'参数名重复'
));
}
return
Promise
.
resolve
();
},
},
]
}
>
<
Input
placeholder=
"请填写参数名"
/>
</
Form
.
Item
>
<
Form
.
Item
{
...
restField
}
name=
{
[
name
,
'value'
]
}
fieldKey=
{
[
fieldKey
,
'value'
]
}
rules=
{
[{
required
:
true
,
message
:
'请填写参数'
}]
}
>
<
Input
placeholder=
"请填写参数"
/>
</
Form
.
Item
>
<
MinusCircleOutlined
onClick=
{
()
=>
remove
(
name
)
}
style=
{
{
marginLeft
:
'10px'
,
fontSize
:
'20px'
}
}
/>
</
Space
>
))
}
<
Form
.
Item
>
<
Button
style=
{
{
width
:
'375px'
,
marginLeft
:
'30px'
}
}
type=
"dashed"
onClick=
{
()
=>
add
()
}
block
icon=
{
<
PlusOutlined
/>
}
>
添加参数
</
Button
>
</
Form
.
Item
>
</>
)
}
</
Form
.
List
>
</
Form
>
</
div
>
</
Modal
>
</
div
>
);
};
export
default
ParmarModal
;
src/pages/webConfig/menuconfig/editForm.jsx
View file @
48a09804
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Form
,
Input
,
Button
,
Row
,
Col
,
Select
,
Radio
,
Checkbox
}
from
'antd'
;
import
{
Form
,
Input
,
Button
,
Row
,
Col
,
Select
,
Radio
,
Checkbox
,
message
,
notification
,
}
from
'antd'
;
import
{
MinusCircleOutlined
,
PlusOutlined
}
from
'@ant-design/icons'
;
import
styles
from
'./addForm.less'
;
import
PicturesWall
from
'@/components/Upload/index'
;
import
EditeConfigWrapper
from
'./editConfigFileWrapper'
;
import
CheckList
from
'./checkBox'
;
import
ParmarModal
from
'./ParmarModal'
;
const
{
Item
}
=
Form
;
const
{
Option
}
=
Select
;
...
...
@@ -18,10 +31,11 @@ const EditForm = props => {
}
=
props
;
const
[
form
]
=
Form
.
useForm
();
const
[
otherForm
]
=
Form
.
useForm
();
const
[
showParmarModal
,
setShowParmarModal
]
=
useState
(
false
);
const
layout
=
{
layout
:
'horizontal'
,
labelCol
:
{
span
:
2
},
wrapperCol
:
{
span
:
21
,
offset
:
0
},
labelCol
:
{
span
:
3
},
wrapperCol
:
{
span
:
21
},
};
// 回显表单
useEffect
(()
=>
{
...
...
@@ -47,6 +61,15 @@ const EditForm = props => {
const
onFinish
=
val
=>
{
submit
();
};
// 添加功能路劲参数
const
addParama
=
()
=>
{
console
.
log
(
form
.
getFieldValue
(
'pageUrl'
));
if
(
!
form
.
getFieldValue
(
'pageUrl'
))
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
'请先填写功能路径'
});
return
;
}
setShowParmarModal
(
true
);
};
const
radioChange
=
e
=>
{};
return
(
<
div
style=
{
{
marginTop
:
'10px'
}
}
>
...
...
@@ -97,8 +120,8 @@ const EditForm = props => {
</
Radio
.
Group
>
</
Item
>
<
Item
label=
"功能路径"
name=
"pageUrl"
label=
"功能路径"
rules=
{
[
{
required
:
true
,
...
...
@@ -106,7 +129,12 @@ const EditForm = props => {
},
]
}
>
<
Input
placeholder=
"请输入功能路径"
/>
<
div
style=
{
{
display
:
'flex'
}
}
>
<
Item
name=
"pageUrl"
style=
{
{
marginBottom
:
0
,
width
:
'100%'
}
}
>
<
Input
placeholder=
"请输入功能路径"
/>
</
Item
>
<
Button
onClick=
{
addParama
}
>
添加参数
</
Button
>
</
div
>
</
Item
>
<
Item
label=
"配置文件"
name=
"config"
>
<
EditeConfigWrapper
>
...
...
@@ -114,8 +142,7 @@ const EditForm = props => {
allowClear
showSearch
filterOption=
{
(
input
,
option
)
=>
option
.
children
.
toLowerCase
().
indexOf
(
input
.
toLowerCase
())
>=
0
option
.
children
.
toLowerCase
().
indexOf
(
input
.
toLowerCase
())
>=
0
}
>
{
configFiles
.
map
(
c
=>
(
...
...
@@ -126,11 +153,7 @@ const EditForm = props => {
</
Select
>
</
EditeConfigWrapper
>
</
Item
>
<
CheckList
info=
{
info
}
nodeType=
{
nodeType
}
valueCallback=
{
valueCallback
}
/>
<
CheckList
info=
{
info
}
nodeType=
{
nodeType
}
valueCallback=
{
valueCallback
}
/>
<
Item
wrapperCol=
{
{
offset
:
10
}
}
style=
{
{
marginTop
:
'20px'
}
}
>
<
Button
type=
"primary"
htmlType=
"submit"
>
提交
...
...
@@ -175,6 +198,15 @@ const EditForm = props => {
</
Item
>
</
Form
>
)
}
<
ParmarModal
pageUrl=
{
form
.
getFieldValue
(
'pageUrl'
)
}
handleCancel=
{
()
=>
setShowParmarModal
(
false
)
}
visible=
{
showParmarModal
}
parmarCallBack=
{
url
=>
{
form
.
setFieldsValue
({
pageUrl
:
url
});
setShowParmarModal
(
false
);
}
}
/>
</
div
>
);
};
...
...
src/pages/webConfig/menuconfig/webMenu.jsx
View file @
48a09804
...
...
@@ -29,15 +29,7 @@ import {
}
from
'@/services/webConfig/api'
;
const
MiniMenu
=
props
=>
{
const
{
menu
,
configFiles
,
subSystemValue
,
updateMenuTree
,
userMode
,
webid
,
productList
,
}
=
props
;
const
{
menu
,
configFiles
,
subSystemValue
,
updateMenuTree
,
userMode
,
webid
,
productList
}
=
props
;
const
[
flag
,
setFlag
]
=
useState
(
1
);
// 刷新标志
const
[
loading
,
setLoading
]
=
useState
(
false
);
// 加载
const
[
menuID
,
setMenuID
]
=
useState
(
''
);
// 选中的树ID
...
...
@@ -109,8 +101,7 @@ const MiniMenu = props => {
</
div
>
),
key
:
obj
.
menuID
,
icon
:
obj
.
menuType
===
'Web4MenuGroup'
?
<
FolderFilled
/>
:
<
FileOutlined
/>,
icon
:
obj
.
menuType
===
'Web4MenuGroup'
?
<
FolderFilled
/>
:
<
FileOutlined
/>,
menuType
:
obj
.
menuType
,
children
:
hasChild
?
obj
.
children
.
map
(
i
=>
mapTree
(
i
))
:
[],
};
...
...
@@ -244,9 +235,7 @@ const MiniMenu = props => {
if
(
isSite
)
{
url
=
val
;
}
else
{
url
=
localStorage
.
getItem
(
'pd2-baseUrl'
)
?
localStorage
.
getItem
(
'pd2-baseUrl'
)
+
val
:
val
;
url
=
localStorage
.
getItem
(
'pd2-baseUrl'
)
?
localStorage
.
getItem
(
'pd2-baseUrl'
)
+
val
:
val
;
}
return
url
;
};
...
...
@@ -398,9 +387,7 @@ const MiniMenu = props => {
.
filter
(
item
=>
item
.
id
===
'Web4SingleStation'
)
.
map
(
r
=>
r
.
children
.
filter
(
i
=>
i
.
id
===
webid
))
.
flat
(
2
);
let
arr2
=
arr
[
0
].
children
.
find
(
item
=>
item
.
text
===
'菜单管理'
).
children
||
[];
let
arr2
=
arr
[
0
].
children
.
find
(
item
=>
item
.
text
===
'菜单管理'
).
children
||
[];
setMenuList
(
arr2
||
[]);
}
})
...
...
@@ -413,8 +400,7 @@ const MiniMenu = props => {
const
dropKey
=
infos
.
node
.
key
;
const
dragKey
=
infos
.
dragNode
.
key
;
const
dropPos
=
infos
.
node
.
pos
.
split
(
'-'
);
const
dropPosition
=
infos
.
dropPosition
-
Number
(
dropPos
[
dropPos
.
length
-
1
]);
const
dropPosition
=
infos
.
dropPosition
-
Number
(
dropPos
[
dropPos
.
length
-
1
]);
const
data
=
[...
menuList
];
// 找到拖拽的元素
...
...
@@ -632,10 +618,7 @@ const MiniMenu = props => {
valueCallback=
{
valueCallback
}
/>
)
:
(
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
description=
"当前未选中菜单"
/>
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
description=
"当前未选中菜单"
/>
)
}
</
div
>
<
ImportOrExport
...
...
src/pages/webConfig/utils.js
View file @
48a09804
...
...
@@ -180,9 +180,11 @@ export const getDefaultGetWebconfig = ({
formType
:
ITEM_TYPE
.
SELECT
,
placeholder
:
'请选择产品类型'
,
options
:
products
.
map
(
t
=>
({
value
:
t
.
ProductName
,
value
:
t
.
PackageName
,
key
:
t
.
PackageName
,
title
:
t
.
ProductName
,
label
:
t
.
ProductName
,
children
:
t
.
ProductName
,
key
:
t
.
ID
,
})),
onDropdownVisibleChange
:
onGetProduct
,
showSearch
:
false
,
...
...
@@ -354,8 +356,7 @@ export const getDefaultGetWebconfig = ({
};
if
(
initialValues
)
{
Object
.
keys
(
config
).
forEach
(
k
=>
{
config
[
k
].
initialValue
=
typeof
initialValues
[
k
]
!==
'undefined'
?
initialValues
[
k
]
:
''
;
config
[
k
].
initialValue
=
typeof
initialValues
[
k
]
!==
'undefined'
?
initialValues
[
k
]
:
''
;
// if (k === 'alarmWays') {
// config[k].initialValue = config[k].initialValue.split(',');
// }
...
...
src/routes/config.js
View file @
48a09804
...
...
@@ -263,8 +263,7 @@ export default {
{
path
:
'/platformCenter/emq'
,
name
:
'宿主管理'
,
url
:
'/web4/?widget=product/oms/MqttConfig/MqttConfig.js|hideMap=true'
,
url
:
'/web4/?widget=product/oms/MqttConfig/MqttConfig.js|hideMap=true'
,
component
:
HostManager
,
},
...
...
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