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
1817acab
Commit
1817acab
authored
Oct 19, 2023
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '修改流程中心规则配置接口'
parent
6935f8a7
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
63 additions
and
25 deletions
+63
-25
index.jsx
src/components/RuleConfig/index.jsx
+9
-5
RoleManage.jsx
src/pages/userCenter/roleManage/RoleManage.jsx
+31
-8
SelectUser.less
src/pages/userCenter/roleManage/SelectUser/SelectUser.less
+9
-11
api.js
src/services/RoleManage/api.js
+9
-1
workflow.js
src/services/workflow/workflow.js
+5
-0
No files found.
src/components/RuleConfig/index.jsx
View file @
1817acab
import
React
,
{
useEffect
,
useState
,
useRef
}
from
'react'
;
import
React
,
{
useEffect
,
useState
,
useRef
}
from
'react'
;
import
{
RuleValidation
}
from
'@/services/workflow/workflow'
;
import
{
RuleValidation
,
RuleValidationPost
}
from
'@/services/workflow/workflow'
;
import
{
Modal
,
Input
,
Form
,
message
,
Dropdown
,
Menu
}
from
'antd'
;
import
{
Modal
,
Input
,
Form
,
message
,
Dropdown
,
Menu
}
from
'antd'
;
import
styles
from
'./index.less'
;
import
styles
from
'./index.less'
;
import
Tree
from
'@/components/ExpendableTree'
;
import
Tree
from
'@/components/ExpendableTree'
;
...
@@ -28,12 +28,9 @@ const RuleConfig = props => {
...
@@ -28,12 +28,9 @@ const RuleConfig = props => {
const
[
form
]
=
Form
.
useForm
();
const
[
form
]
=
Form
.
useForm
();
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
visible
)
{
if
(
visible
)
{
console
.
log
(
fieldList
,
'fieldList'
);
setExpandedKey
(
fieldList
[
0
].
TableName
);
setExpandedKey
(
fieldList
[
0
].
TableName
);
setRule
(
RuleContent
);
setRule
(
RuleContent
);
setTimeout
(()
=>
{
setTimeout
(()
=>
{
console
.
log
(
document
.
getElementById
(
'ruleText'
));
console
.
log
(
ruleText
.
current
);
document
document
.
getElementById
(
'ruleText'
)
.
getElementById
(
'ruleText'
)
.
setSelectionRange
(
RuleContent
.
length
,
RuleContent
.
length
);
// 重新定位光标
.
setSelectionRange
(
RuleContent
.
length
,
RuleContent
.
length
);
// 重新定位光标
...
@@ -48,13 +45,20 @@ const RuleConfig = props => {
...
@@ -48,13 +45,20 @@ const RuleConfig = props => {
// 保存线配置
// 保存线配置
const
onSave
=
()
=>
{
const
onSave
=
()
=>
{
if
(
rule
)
{
if
(
rule
)
{
RuleValidation
({
ruleContent
:
rule
,
flowId
:
flowID
}).
then
(
res
=>
{
RuleValidation
Post
({
ruleContent
:
rule
,
flowId
:
flowID
}).
then
(
res
=>
{
if
(
res
.
data
)
{
if
(
res
.
data
)
{
onSubumit
(
rule
);
onSubumit
(
rule
);
}
else
{
}
else
{
message
.
error
(
'请检查规则是否正确'
);
message
.
error
(
'请检查规则是否正确'
);
}
}
});
});
// RuleValidation({ ruleContent: rule, flowId: flowID }).then(res => {
// if (res.data) {
// onSubumit(rule);
// } else {
// message.error('请检查规则是否正确');
// }
// });
}
else
{
}
else
{
onSubumit
(
''
);
onSubumit
(
''
);
handleCancel
();
handleCancel
();
...
...
src/pages/userCenter/roleManage/RoleManage.jsx
View file @
1817acab
...
@@ -53,6 +53,7 @@ import userStyles from '@/pages/userCenter/userManage/UserManage.less';
...
@@ -53,6 +53,7 @@ import userStyles from '@/pages/userCenter/userManage/UserManage.less';
import
iconStyles
from
'@/assets/font/omsfont/iconfont.css'
;
import
iconStyles
from
'@/assets/font/omsfont/iconfont.css'
;
import
SelectUser
from
'./SelectUser/SelectUser'
;
import
SelectUser
from
'./SelectUser/SelectUser'
;
import
NewSelectUser
from
'./SelectUser/NewSelectUser'
;
import
NewSelectUser
from
'./SelectUser/NewSelectUser'
;
import
OpePermissions
from
'./SelectUser/OpePermissions'
;
import
{
data
}
from
'@/pages/platformCenter/messageManage/projectManage/components/Mock'
;
import
{
data
}
from
'@/pages/platformCenter/messageManage/projectManage/components/Mock'
;
const
{
Search
}
=
Input
;
const
{
Search
}
=
Input
;
...
@@ -92,31 +93,36 @@ const SiteManage = () => {
...
@@ -92,31 +93,36 @@ const SiteManage = () => {
const
[
keepTreeData
,
setKeepTreeData
]
=
useState
([]);
const
[
keepTreeData
,
setKeepTreeData
]
=
useState
([]);
const
[
searchTreeValue
,
setSearchTreeValue
]
=
useState
(
''
);
const
[
searchTreeValue
,
setSearchTreeValue
]
=
useState
(
''
);
// const [childData, setChildData] = useState({visibleValue:''})
// const [childData, setChildData] = useState({visibleValue:''})
const
[
operation
,
setOperation
]
=
useState
(
false
);
// 点击树的回调
// 点击树的回调
const
handleTreeSelect
=
(
e
,
treenode
)
=>
{
const
handleTreeSelect
=
(
e
,
treenode
)
=>
{
setSearchWord
(
''
);
setSearchWord
(
''
);
console
.
log
(
e
);
console
.
log
(
treenode
);
if
(
treenode
)
{
if
(
treenode
)
{
const
{
node
}
=
treenode
;
const
{
node
}
=
treenode
;
const
{
roleID
:
id
}
=
node
;
const
{
roleID
:
id
}
=
node
;
console
.
log
(
node
);
debugger
;
setItemObj
(
node
);
setItemObj
(
node
);
if
(
node
.
BuiltInRole
)
{
if
(
node
.
BuiltInRole
)
{
setKeyValue
(
'0'
);
setKeyValue
(
'0'
);
}
}
setUserNewVisible
(
true
);
setUserNewVisible
(
true
);
console
.
log
(
id
);
if
(
id
)
{
if
(
id
)
{
if
(
node
.
subSystemValue
===
'view'
)
{
setOperation
(
true
);
}
else
{
setOperation
(
false
);
}
setSaveTreeId
(
id
);
setSaveTreeId
(
id
);
setRoleID
(
id
);
setRoleID
(
id
);
setFlagSearch
(
1
);
setFlagSearch
(
1
);
setValueList
([...
valueList
]);
setValueList
([...
valueList
]);
console
.
log
([...
valueList
]);
console
.
log
([...
valueList
]);
}
else
{
}
else
{
if
(
node
.
visibleValue
===
'view'
)
{
setOperation
(
true
);
}
else
{
setOperation
(
false
);
}
// setRoleID(saveTreeId);
// setRoleID(saveTreeId);
setRoleID
(
''
);
setRoleID
(
''
);
setDescrip
(
'当前未选中角色'
);
setDescrip
(
'当前未选中角色'
);
...
@@ -141,7 +147,6 @@ const SiteManage = () => {
...
@@ -141,7 +147,6 @@ const SiteManage = () => {
setSpinLoading
(
false
);
setSpinLoading
(
false
);
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
const
{
roleList
}
=
res
.
data
;
const
{
roleList
}
=
res
.
data
;
console
.
log
(
roleList
);
let
list
=
[...
roleList
];
let
list
=
[...
roleList
];
list
.
map
((
i
,
j
)
=>
{
list
.
map
((
i
,
j
)
=>
{
if
(
i
.
visibleTitle
.
indexOf
(
'手持'
)
!==
-
1
&&
i
.
type
!==
'mobile'
)
{
if
(
i
.
visibleTitle
.
indexOf
(
'手持'
)
!==
-
1
&&
i
.
type
!==
'mobile'
)
{
...
@@ -149,7 +154,6 @@ const SiteManage = () => {
...
@@ -149,7 +154,6 @@ const SiteManage = () => {
list
.
push
(
i
);
list
.
push
(
i
);
}
}
});
});
console
.
log
(
list
);
setKeepTreeData
([...
list
]);
setKeepTreeData
([...
list
]);
let
arr
=
transTree
(
JSON
.
parse
(
JSON
.
stringify
(
list
)),
''
);
let
arr
=
transTree
(
JSON
.
parse
(
JSON
.
stringify
(
list
)),
''
);
setTreeData
(
arr
);
setTreeData
(
arr
);
...
@@ -1008,6 +1012,25 @@ const SiteManage = () => {
...
@@ -1008,6 +1012,25 @@ const SiteManage = () => {
)
}
)
}
</
TabPane
>
</
TabPane
>
)
}
)
}
{
operation
&&
(
<
TabPane
tab=
"操作权限"
key=
"2"
>
{
roleID
?
(
<
div
className=
{
styles
.
cardBoxRNew
}
>
<
OpePermissions
visible=
{
userNewVisible
}
itemObj=
{
itemObj
}
onCancel=
{
()
=>
setUserNewVisible
(
false
)
}
confirmModal=
{
userNewModal
}
roleID=
{
roleID
}
/>
</
div
>
)
:
(
<
div
className=
{
styles
.
cardBoxH
}
>
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
description=
{
descrip
}
/>
</
div
>
)
}
</
TabPane
>
)
}
{
/* <TabPane tab="菜单权限优化" key="2">
{
/* <TabPane tab="菜单权限优化" key="2">
{roleID ? (
{roleID ? (
...
...
src/pages/userCenter/roleManage/SelectUser/SelectUser.less
View file @
1817acab
...
@@ -2,10 +2,14 @@
...
@@ -2,10 +2,14 @@
display: flex;
display: flex;
justify-content: space-between;
justify-content: space-between;
}
}
.headerLeft {
display: flex;
justify-content: flex-end;
}
.pushTestContent {
.pushTestContent {
.ant-table-body {
.ant-table-body {
height: calc(100vh - 225px) !important;
height: calc(100vh - 225px) !important;
}
}
display: flex;
display: flex;
height: calc(100% - 43px);
height: calc(100% - 43px);
.checkScrollBox {
.checkScrollBox {
...
@@ -37,7 +41,7 @@
...
@@ -37,7 +41,7 @@
line-height: 20px;
line-height: 20px;
}
}
.topCheckbox
>
label :hover {
.topCheckbox
>
label :hover {
font-weight: 600;
font-weight: 600;
}
}
...
@@ -52,15 +56,14 @@
...
@@ -52,15 +56,14 @@
overflow: hidden;
overflow: hidden;
text-overflow: ellipsis;
text-overflow: ellipsis;
white-space: nowrap;
white-space: nowrap;
margin-top:10px;
margin-top:
10px;
.ant-checkbox + span {
.ant-checkbox + span {
display: flex;
display: flex;
}
}
}
}
.fontlabel {
.fontlabel {
display: inline-block;
display: inline-block;
width:130px;
width:
130px;
overflow: hidden;
overflow: hidden;
text-overflow: ellipsis;
text-overflow: ellipsis;
// white-space: nowrap;
// white-space: nowrap;
...
@@ -88,16 +91,11 @@
...
@@ -88,16 +91,11 @@
.tableRight {
.tableRight {
margin-left: 10px;
margin-left: 10px;
margin-top:10px;
margin-top:
10px;
.ant-spin-nested-loading {
.ant-spin-nested-loading {
.ant-table {
.ant-table {
.ant-table-container {
.ant-table-container {
}
}
}
}
}
}
...
...
src/services/RoleManage/api.js
View file @
1817acab
...
@@ -56,4 +56,12 @@ export const getMenuByRoleWithLevel = params =>
...
@@ -56,4 +56,12 @@ export const getMenuByRoleWithLevel = params =>
export
const
getWebConfigTypes
=
params
=>
export
const
getWebConfigTypes
=
params
=>
get
(
`
${
PUBLISH_SERVICE
}
/PlatformCenter/GetWebConfigTypes`
,
params
);
get
(
`
${
PUBLISH_SERVICE
}
/PlatformCenter/GetWebConfigTypes`
,
params
);
// 菜单拖拽
// 菜单拖拽
export
const
DragGroup
=
params
=>
post
(
`
${
PUBLISH_SERVICE
}
/UserCenter/DragGroup `
,
params
);
export
const
DragGroup
=
params
=>
post
(
`
${
PUBLISH_SERVICE
}
/UserCenter/DragGroup`
,
params
);
// 获取角色拥有的工程权限
export
const
getRolePermission
=
params
=>
get
(
`/PandaView/publish/RolePermission/GetRolePermission`
,
params
);
// 更新角色工程权限
export
const
updateRolePermission
=
params
=>
post
(
`/PandaView/publish/RolePermission/UpdateRolePermission`
,
params
);
src/services/workflow/workflow.js
View file @
1817acab
...
@@ -27,6 +27,11 @@ export const GetFormDataSource = param =>
...
@@ -27,6 +27,11 @@ export const GetFormDataSource = param =>
// 规则效验
// 规则效验
export
const
RuleValidation
=
param
=>
get
(
`
${
PUBLISH_SERVICE
}
/WorkFlow/RuleValidation`
,
param
);
export
const
RuleValidation
=
param
=>
get
(
`
${
PUBLISH_SERVICE
}
/WorkFlow/RuleValidation`
,
param
);
export
const
RuleValidationPost
=
data
=>
post
(
`
${
PUBLISH_SERVICE
}
/WorkFlow/RuleValidationPost`
,
data
,
{
headers
:
{
'Content-Type'
:
'application/json'
},
});
// 获取可选的子事件流程
// 获取可选的子事件流程
export
const
GetSubEventFlows
=
param
=>
get
(
`
${
PUBLISH_SERVICE
}
/WorkFlow/GetSubEventFlows`
,
param
);
export
const
GetSubEventFlows
=
param
=>
get
(
`
${
PUBLISH_SERVICE
}
/WorkFlow/GetSubEventFlows`
,
param
);
// 获取流程映射表字段信息
// 获取流程映射表字段信息
...
...
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