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
b50d73dd
Commit
b50d73dd
authored
Jan 07, 2022
by
邓超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 流程模块添加外部字段交互,修复web移动配置动态添加url bug
parent
05fd8036
Pipeline
#42075
passed with stages
in 6 minutes 46 seconds
Changes
9
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
102 additions
and
103 deletions
+102
-103
ParmarModal.jsx
src/pages/mobileConfig/menuconfig/ParmarModal.jsx
+6
-2
miniMenu.jsx
src/pages/mobileConfig/menuconfig/miniMenu.jsx
+11
-34
flowNode.jsx
...s/platformCenter/bsmanager/workFlow/flowNode/flowNode.jsx
+10
-3
NodeEdit.jsx
...manager/workFlow/flowNode/flowNodeComponents/NodeEdit.jsx
+57
-4
ChangeAddFlows.jsx
...ges/platformCenter/bsmanager/workOrder/ChangeAddFlows.jsx
+5
-24
changeAdd.jsx
src/pages/platformCenter/bsmanager/workOrder/changeAdd.jsx
+6
-30
SelectUser.jsx
src/pages/userCenter/roleManage/SelectUser/SelectUser.jsx
+0
-1
ParmarModal.jsx
src/pages/webConfig/menuconfig/ParmarModal.jsx
+6
-4
editForm.jsx
src/pages/webConfig/menuconfig/editForm.jsx
+1
-1
No files found.
src/pages/mobileConfig/menuconfig/ParmarModal.jsx
View file @
b50d73dd
...
...
@@ -25,10 +25,14 @@ const ParmarModal = props => {
if
(
validate
)
{
let
parma
=
form
.
getFieldValue
(
'parmars'
)
.
map
(
item
=>
`
${
item
.
key
}
=
${
item
.
value
}
`
)
?
.
map
(
item
=>
`
${
item
.
key
}
=
${
item
.
value
}
`
)
.
join
(
'&'
);
console
.
log
(
parma
,
'parma'
);
parmarCallBack
(
`
${
pageUrl
.
split
(
'?'
)[
0
]}
?
${
parma
}
`
);
if
(
parma
)
{
parmarCallBack
(
`
${
pageUrl
.
split
(
'?'
)[
0
]}
?
${
parma
}
`
);
}
else
{
parmarCallBack
(
`
${
pageUrl
.
split
(
'?'
)[
0
]}
`
);
}
}
});
};
...
...
src/pages/mobileConfig/menuconfig/miniMenu.jsx
View file @
b50d73dd
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
message
,
notification
,
Tooltip
,
Modal
,
Input
,
Button
,
Spin
,
Empty
,
}
from
'antd'
;
import
{
message
,
notification
,
Tooltip
,
Modal
,
Input
,
Button
,
Spin
,
Empty
}
from
'antd'
;
import
{
FileAddTwoTone
,
FolderAddTwoTone
,
...
...
@@ -142,8 +133,7 @@ const MiniMenu = props => {
),
key
:
obj
.
menuID
,
icon
:
obj
.
menuType
!==
'MiniAppMenuThree'
&&
obj
.
menuType
!==
'MiniAppMenu'
?
(
obj
.
menuType
!==
'MiniAppMenuThree'
&&
obj
.
menuType
!==
'MiniAppMenu'
?
(
<
FolderFilled
/>
)
:
(
<
FileOutlined
/>
...
...
@@ -397,8 +387,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
=
JSON
.
parse
(
JSON
.
stringify
(
treeData
));
// 找到拖拽的元素
let
dragObj
;
...
...
@@ -420,8 +409,7 @@ const MiniMenu = props => {
// console.log(dropPos, 'dropPosition');
// 拖拽到的位置不能在菜单下面
if
(
(
dropObj
.
menuType
===
'MiniAppMenuThree'
||
dropObj
.
menuType
===
'MiniAppMenu'
)
&&
(
dropObj
.
menuType
===
'MiniAppMenuThree'
||
dropObj
.
menuType
===
'MiniAppMenu'
)
&&
!
infos
.
dropToGap
)
{
return
;
...
...
@@ -433,24 +421,21 @@ const MiniMenu = props => {
// 菜单不能拖拽到跟一级菜单组下
if
(
dropObj
.
menuType
===
'MiniAppMenuGroup'
&&
(
dragObj
.
menuType
===
'MiniAppMenuThree'
||
dragObj
.
menuType
===
'MiniAppMenu'
)
(
dragObj
.
menuType
===
'MiniAppMenuThree'
||
dragObj
.
menuType
===
'MiniAppMenu'
)
)
{
return
;
}
// 一级菜单组只能在一级菜单组平级拖拽
if
(
dragObj
.
menuType
===
'MiniAppMenuGroup'
&&
(
dropObj
.
menuType
===
'MiniAppMenuGroup'
||
dropObj
.
menuType
===
'MiniAppMenuGroupTwo'
)
(
dropObj
.
menuType
===
'MiniAppMenuGroup'
||
dropObj
.
menuType
===
'MiniAppMenuGroupTwo'
)
)
{
return
;
}
// 二级菜单组只能在一级的菜单组下面
if
(
dragObj
.
menuType
===
'MiniAppMenuGroupTwo'
&&
(
dropObj
.
menuType
===
'MiniAppMenuGroupTwo'
||
dropObj
.
menuType
===
'MiniAppMenu'
)
(
dropObj
.
menuType
===
'MiniAppMenuGroupTwo'
||
dropObj
.
menuType
===
'MiniAppMenu'
)
)
{
return
;
}
...
...
@@ -463,16 +448,14 @@ const MiniMenu = props => {
// 菜单不能拖拽到跟一级菜单组下
if
(
dropObj
.
menuType
===
'MiniAppMenuGroupTwo'
&&
(
dragObj
.
menuType
===
'MiniAppMenuThree'
||
dragObj
.
menuType
===
'MiniAppMenu'
)
(
dragObj
.
menuType
===
'MiniAppMenuThree'
||
dragObj
.
menuType
===
'MiniAppMenu'
)
)
{
return
;
}
// 一级菜单组只能在一级菜单组平级拖拽
if
(
dragObj
.
menuType
===
'MiniAppMenuGroup'
&&
(
dropObj
.
menuType
===
'MiniAppMenuGroupTwo'
||
dropObj
.
menuType
===
'MiniAppMenuThree'
)
(
dropObj
.
menuType
===
'MiniAppMenuGroupTwo'
||
dropObj
.
menuType
===
'MiniAppMenuThree'
)
)
{
return
;
}
...
...
@@ -594,10 +577,7 @@ const MiniMenu = props => {
/>
</
div
>
)
:
(
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
description=
"暂无菜单"
/>
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
description=
"暂无菜单"
/>
)
}
</
div
>
<
Modal
...
...
@@ -695,10 +675,7 @@ const MiniMenu = props => {
</div> */
}
</
div
>
)
:
(
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
description=
"当前未选中菜单"
/>
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
description=
"当前未选中菜单"
/>
)
}
</
div
>
</
div
>
...
...
src/pages/platformCenter/bsmanager/workFlow/flowNode/flowNode.jsx
View file @
b50d73dd
...
...
@@ -111,13 +111,20 @@ const FlowNode = () => {
dataIndex
:
'aliasName'
,
align
:
'center'
,
width
:
80
,
render
:
text
=>
<
span
>
{
text
}
</
span
>,
ellipsis
:
{
showTitle
:
true
,
},
render
:
(
text
,
record
)
=>
(
<
Tooltip
placement=
"topLeft"
title=
{
text
}
>
<
span
style=
{
{
color
:
textStyleOne
(
text
,
record
)
}
}
>
{
text
}
</
span
>
</
Tooltip
>
),
},
{
title
:
'移交方式'
,
dataIndex
:
'extendHandover'
,
align
:
'center'
,
width
:
8
0
,
width
:
10
0
,
render
:
(
text
,
record
)
=>
<
span
style=
{
{
color
:
textStyleOne
(
text
,
record
)
}
}
>
{
text
}
</
span
>,
},
{
...
...
@@ -308,7 +315,7 @@ const FlowNode = () => {
{
title
:
'移交方式'
,
align
:
'center'
,
width
:
8
0
,
width
:
10
0
,
},
{
title
:
'节点类型'
,
...
...
src/pages/platformCenter/bsmanager/workFlow/flowNode/flowNodeComponents/NodeEdit.jsx
View file @
b50d73dd
...
...
@@ -36,6 +36,8 @@ const NodeEdit = props => {
const
[
eventTable
,
setEventTable
]
=
useState
([]);
// 表名
const
[
isDisable
,
setIsDisable
]
=
useState
();
// 允许回退是否可选择
const
[
filedData
,
setFiledData
]
=
useState
([]);
// 已选字段列表
const
[
filedList
,
setFiledList
]
=
useState
([]);
// 当前选择表的所有字段
const
[
form
]
=
Form
.
useForm
();
useEffect
(()
=>
{
if
(
visible
)
{
...
...
@@ -64,6 +66,7 @@ const NodeEdit = props => {
}
else
{
setIsDisable
(
true
);
}
changTable
(
obj
.
TableName
);
form
.
setFieldsValue
(
obj
);
}
});
...
...
@@ -183,6 +186,7 @@ const NodeEdit = props => {
let
obj
=
{};
obj
[
fieldName
]
=
Fields
;
form
.
setFieldsValue
(
obj
);
saveOutFieldsLength
(
fieldName
,
filedList
);
setShowField
(
false
);
};
// 提交表单
...
...
@@ -226,6 +230,55 @@ const NodeEdit = props => {
}
}
};
// 表切换
const
changTable
=
val
=>
{
loadEventFields
({
eventTableName
:
val
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
let
initList
=
[];
res
.
data
.
forEach
(
item
=>
{
item
.
root
.
forEach
(
ele
=>
{
initList
.
push
(
ele
.
fieldName
);
});
});
// 处理外部字段
Object
.
keys
(
form
.
getFieldsValue
()).
forEach
(
key
=>
{
saveOutFieldsLength
(
key
,
initList
);
});
setFiledList
(
initList
);
}
});
};
// 保存外部字段个数
const
saveOutFieldsLength
=
(
key
,
initList
)
=>
{
switch
(
key
)
{
case
'Fields'
:
form
.
setFieldsValue
({
OutFields
:
dealExternal
(
key
,
initList
)
});
break
;
case
'SeeFields'
:
form
.
setFieldsValue
({
OutSeeFields
:
dealExternal
(
key
,
initList
)
});
break
;
default
:
break
;
}
};
// 处理外部字段
const
dealExternal
=
(
fileds
,
list
)
=>
{
let
isExternal
;
let
externalLength
=
0
;
if
(
form
.
getFieldValue
(
fileds
))
{
form
.
getFieldValue
(
fileds
)
.
split
(
','
)
.
forEach
(
item
=>
{
isExternal
=
list
.
some
(
val
=>
val
===
item
);
if
(
!
isExternal
&&
item
!==
''
)
{
// eslint-disable-next-line no-plusplus
externalLength
++
;
}
});
}
return
externalLength
;
};
return
(
<
Drawer
title=
"流程节点配置"
...
...
@@ -317,7 +370,7 @@ const NodeEdit = props => {
</
Radio
.
Group
>
</
Form
.
Item
>
<
Form
.
Item
label=
"工单主表"
name=
"TableName"
>
<
Select
placeholder=
"请选择工单主表"
>
<
Select
placeholder=
"请选择工单主表"
onChange=
{
changTable
}
>
{
eventTable
.
map
(
item
=>
(
<
Option
value=
{
item
.
Name
}
key=
{
item
.
ID
}
>
{
item
.
Name
}
...
...
@@ -328,7 +381,7 @@ const NodeEdit = props => {
<
Form
.
Item
label=
{
<
div
className=
{
styles
.
formData_label
}
>
{
form
.
getFieldValue
(
'OutFields'
)
>
0
?
(
{
form
.
getFieldValue
(
'OutFields'
)
?
(
<
Tooltip
title=
{
`外部字段${form.getFieldValue('OutFields')}个`
}
>
<
InfoCircleOutlined
style=
{
{
color
:
'red'
,
padding
:
'0.2rem 0.2rem 0 0'
}
}
/>
</
Tooltip
>
...
...
@@ -355,8 +408,8 @@ const NodeEdit = props => {
<
Form
.
Item
label=
{
<
div
className=
{
styles
.
formData_label
}
>
{
form
.
getFieldValue
(
'OutSe
archFields'
)
>
0
?
(
<
Tooltip
title=
{
`外部字段${form.getFieldValue('OutSe
arch
Fields')}个`
}
>
{
form
.
getFieldValue
(
'OutSe
eFields'
)
?
(
<
Tooltip
title=
{
`外部字段${form.getFieldValue('OutSe
e
Fields')}个`
}
>
<
InfoCircleOutlined
style=
{
{
color
:
'red'
,
padding
:
'0.2rem 0.2rem 0 0'
}
}
/>
</
Tooltip
>
)
:
(
...
...
src/pages/platformCenter/bsmanager/workOrder/ChangeAddFlows.jsx
View file @
b50d73dd
...
...
@@ -10,13 +10,7 @@ import styles from './incident.less';
const
CheckboxGroup
=
Checkbox
.
Group
;
const
{
TabPane
}
=
Tabs
;
const
ChangeAddFlows
=
props
=>
{
const
{
callBackSubmit
=
()
=>
{},
pickItem
,
visible
,
filed11
,
newCheckedList
,
}
=
props
;
const
{
callBackSubmit
=
()
=>
{},
pickItem
,
visible
,
filed11
,
newCheckedList
}
=
props
;
const
[
value
,
setValue
]
=
useState
(
''
);
const
[
checkValue
,
setCheckValue
]
=
useState
([]);
const
[
title
,
setTitle
]
=
useState
([]);
...
...
@@ -500,11 +494,7 @@ const ChangeAddFlows = props => {
<
div
className=
{
styles
.
listCard1
}
>
<
div
className=
{
styles
.
cardItem1
}
>
<
div
className=
{
styles
.
cardContent1
}
>
<
Tabs
activeKey=
{
keyValue
}
className=
{
styles
.
tab
}
onChange=
{
handleParChange
}
>
<
Tabs
activeKey=
{
keyValue
}
className=
{
styles
.
tab
}
onChange=
{
handleParChange
}
>
<
TabPane
tab=
"角色"
key=
"0"
>
<
div
className=
{
styles
.
cardItemData1
}
>
{
emptyValue
==
0
?
(
...
...
@@ -514,10 +504,7 @@ const ChangeAddFlows = props => {
onChange=
{
onChangeListNew
}
/>
)
:
(
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
description=
"暂无数据"
/>
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
description=
"暂无数据"
/>
)
}
</
div
>
</
TabPane
>
...
...
@@ -530,10 +517,7 @@ const ChangeAddFlows = props => {
onChange=
{
onChangeListNew1
}
/>
)
:
(
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
description=
"暂无数据"
/>
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
description=
"暂无数据"
/>
)
}
</
div
>
</
TabPane
>
...
...
@@ -546,10 +530,7 @@ const ChangeAddFlows = props => {
onChange=
{
onChangeListNew2
}
/>
)
:
(
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
description=
"暂无数据"
/>
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
description=
"暂无数据"
/>
)
}
</
div
>
</
TabPane
>
...
...
src/pages/platformCenter/bsmanager/workOrder/changeAdd.jsx
View file @
b50d73dd
...
...
@@ -22,14 +22,7 @@ import styles from './incident.less';
const
CheckboxGroup
=
Checkbox
.
Group
;
const
{
TabPane
}
=
Tabs
;
const
ChangeAdd
=
props
=>
{
const
{
callBackSubmit
=
()
=>
{},
isType
,
pickItem
,
visible
,
filed11
,
newCheckedList
,
}
=
props
;
const
{
callBackSubmit
=
()
=>
{},
isType
,
pickItem
,
visible
,
filed11
,
newCheckedList
}
=
props
;
const
[
title
,
setTitle
]
=
useState
([]);
const
[
checkedList
,
setCheckedList
]
=
useState
([]);
// 选中复选框内容
const
[
searchWord
,
setSearchWord
]
=
useState
(
''
);
// 关键字
...
...
@@ -464,11 +457,7 @@ const ChangeAdd = props => {
<
div
className=
{
styles
.
listCard1
}
>
<
div
className=
{
styles
.
cardItem1
}
>
<
div
className=
{
styles
.
cardContent1
}
>
<
Tabs
activeKey=
{
keyValue
}
className=
{
styles
.
tab
}
onChange=
{
handleParChange
}
>
<
Tabs
activeKey=
{
keyValue
}
className=
{
styles
.
tab
}
onChange=
{
handleParChange
}
>
<
TabPane
tab=
"角色"
key=
"0"
>
<
div
className=
{
styles
.
cardItemData1
}
>
{
emptyValue
==
0
?
(
...
...
@@ -478,10 +467,7 @@ const ChangeAdd = props => {
onChange=
{
onChangeListNew
}
/>
)
:
(
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
description=
"暂无数据"
/>
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
description=
"暂无数据"
/>
)
}
</
div
>
</
TabPane
>
...
...
@@ -494,10 +480,7 @@ const ChangeAdd = props => {
onChange=
{
onChangeListNew1
}
/>
)
:
(
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
description=
"暂无数据"
/>
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
description=
"暂无数据"
/>
)
}
</
div
>
</
TabPane
>
...
...
@@ -510,10 +493,7 @@ const ChangeAdd = props => {
onChange=
{
onChangeListNew2
}
/>
)
:
(
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
description=
"暂无数据"
/>
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
description=
"暂无数据"
/>
)
}
</
div
>
</
TabPane
>
...
...
@@ -522,11 +502,7 @@ const ChangeAdd = props => {
</
div
>
<
div
className=
{
styles
.
cardItem11
}
>
<
div
className=
{
styles
.
cardContent1
}
>
<
Tabs
className=
{
styles
.
tab
}
activeKey=
{
keyValue
}
onChange=
{
handleParChange
}
>
<
Tabs
className=
{
styles
.
tab
}
activeKey=
{
keyValue
}
onChange=
{
handleParChange
}
>
<
TabPane
tab=
"角色"
key=
"0"
>
{
checkDataRole
.
map
((
item
,
index
)
=>
(
<
div
...
...
src/pages/userCenter/roleManage/SelectUser/SelectUser.jsx
View file @
b50d73dd
...
...
@@ -192,7 +192,6 @@ const SelectUser = props => {
// 删除角色
const
deleteRol
=
key
=>
{
const
dataSource
=
[...
checkList
];
console
.
log
(
key
,
dataSource
,
'key'
);
setCheckList
(
dataSource
.
filter
(
item
=>
item
.
value
!==
key
));
setDeleKey
(
key
);
setDelFlag
(
delFlag
+
1
);
...
...
src/pages/webConfig/menuconfig/ParmarModal.jsx
View file @
b50d73dd
...
...
@@ -22,14 +22,16 @@ const ParmarModal = props => {
const
onFinish
=
()
=>
{
form
.
validateFields
().
then
(
validate
=>
{
if
(
validate
)
{
console
.
log
(
validate
,
'validate'
);
let
parma
=
form
.
getFieldValue
(
'parmars'
)
.
map
(
item
=>
`
${
item
.
key
}
=
${
item
.
value
}
`
)
?
.
map
(
item
=>
`
${
item
.
key
}
=
${
item
.
value
}
`
)
.
join
(
'&'
);
console
.
log
(
parma
,
'parma'
);
parmarCallBack
(
`
${
pageUrl
.
split
(
'|'
)[
0
]}
|
${
parma
}
`
);
if
(
parma
)
{
parmarCallBack
(
`
${
pageUrl
.
split
(
'|'
)[
0
]}
|
${
parma
}
`
);
}
else
{
parmarCallBack
(
`
${
pageUrl
.
split
(
'|'
)[
0
]}
`
);
}
}
});
};
...
...
src/pages/webConfig/menuconfig/editForm.jsx
View file @
b50d73dd
...
...
@@ -90,7 +90,7 @@ const EditForm = props => {
<
Item
label=
"菜单别名"
name=
"shortName"
>
<
Input
placeholder=
"请输入菜单别名"
/>
</
Item
>
<
Item
label=
"产品类型
:
"
name=
"product"
>
<
Item
label=
"产品类型"
name=
"product"
>
<
Select
placeholder=
"请选择产品类型"
allowClear
>
{
productList
&&
productList
.
length
>
0
&&
...
...
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