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
1 year ago
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
{
RuleValidation
}
from
'@/services/workflow/workflow'
;
import
{
RuleValidation
,
RuleValidationPost
}
from
'@/services/workflow/workflow'
;
import
{
Modal
,
Input
,
Form
,
message
,
Dropdown
,
Menu
}
from
'antd'
;
import
styles
from
'./index.less'
;
import
Tree
from
'@/components/ExpendableTree'
;
...
...
@@ -28,12 +28,9 @@ const RuleConfig = props => {
const
[
form
]
=
Form
.
useForm
();
useEffect
(()
=>
{
if
(
visible
)
{
console
.
log
(
fieldList
,
'fieldList'
);
setExpandedKey
(
fieldList
[
0
].
TableName
);
setRule
(
RuleContent
);
setTimeout
(()
=>
{
console
.
log
(
document
.
getElementById
(
'ruleText'
));
console
.
log
(
ruleText
.
current
);
document
.
getElementById
(
'ruleText'
)
.
setSelectionRange
(
RuleContent
.
length
,
RuleContent
.
length
);
// 重新定位光标
...
...
@@ -48,13 +45,20 @@ const RuleConfig = props => {
// 保存线配置
const
onSave
=
()
=>
{
if
(
rule
)
{
RuleValidation
({
ruleContent
:
rule
,
flowId
:
flowID
}).
then
(
res
=>
{
RuleValidation
Post
({
ruleContent
:
rule
,
flowId
:
flowID
}).
then
(
res
=>
{
if
(
res
.
data
)
{
onSubumit
(
rule
);
}
else
{
message
.
error
(
'请检查规则是否正确'
);
}
});
// RuleValidation({ ruleContent: rule, flowId: flowID }).then(res => {
// if (res.data) {
// onSubumit(rule);
// } else {
// message.error('请检查规则是否正确');
// }
// });
}
else
{
onSubumit
(
''
);
handleCancel
();
...
...
This diff is collapsed.
Click to expand it.
src/pages/userCenter/roleManage/RoleManage.jsx
View file @
1817acab
...
...
@@ -53,6 +53,7 @@ import userStyles from '@/pages/userCenter/userManage/UserManage.less';
import
iconStyles
from
'@/assets/font/omsfont/iconfont.css'
;
import
SelectUser
from
'./SelectUser/SelectUser'
;
import
NewSelectUser
from
'./SelectUser/NewSelectUser'
;
import
OpePermissions
from
'./SelectUser/OpePermissions'
;
import
{
data
}
from
'@/pages/platformCenter/messageManage/projectManage/components/Mock'
;
const
{
Search
}
=
Input
;
...
...
@@ -92,31 +93,36 @@ const SiteManage = () => {
const
[
keepTreeData
,
setKeepTreeData
]
=
useState
([]);
const
[
searchTreeValue
,
setSearchTreeValue
]
=
useState
(
''
);
// const [childData, setChildData] = useState({visibleValue:''})
const
[
operation
,
setOperation
]
=
useState
(
false
);
// 点击树的回调
const
handleTreeSelect
=
(
e
,
treenode
)
=>
{
setSearchWord
(
''
);
console
.
log
(
e
);
console
.
log
(
treenode
);
if
(
treenode
)
{
const
{
node
}
=
treenode
;
const
{
roleID
:
id
}
=
node
;
console
.
log
(
node
);
debugger
;
setItemObj
(
node
);
if
(
node
.
BuiltInRole
)
{
setKeyValue
(
'0'
);
}
setUserNewVisible
(
true
);
console
.
log
(
id
);
if
(
id
)
{
if
(
node
.
subSystemValue
===
'view'
)
{
setOperation
(
true
);
}
else
{
setOperation
(
false
);
}
setSaveTreeId
(
id
);
setRoleID
(
id
);
setFlagSearch
(
1
);
setValueList
([...
valueList
]);
console
.
log
([...
valueList
]);
}
else
{
if
(
node
.
visibleValue
===
'view'
)
{
setOperation
(
true
);
}
else
{
setOperation
(
false
);
}
// setRoleID(saveTreeId);
setRoleID
(
''
);
setDescrip
(
'当前未选中角色'
);
...
...
@@ -141,7 +147,6 @@ const SiteManage = () => {
setSpinLoading
(
false
);
if
(
res
.
code
===
0
)
{
const
{
roleList
}
=
res
.
data
;
console
.
log
(
roleList
);
let
list
=
[...
roleList
];
list
.
map
((
i
,
j
)
=>
{
if
(
i
.
visibleTitle
.
indexOf
(
'手持'
)
!==
-
1
&&
i
.
type
!==
'mobile'
)
{
...
...
@@ -149,7 +154,6 @@ const SiteManage = () => {
list
.
push
(
i
);
}
});
console
.
log
(
list
);
setKeepTreeData
([...
list
]);
let
arr
=
transTree
(
JSON
.
parse
(
JSON
.
stringify
(
list
)),
''
);
setTreeData
(
arr
);
...
...
@@ -1008,6 +1012,25 @@ const SiteManage = () => {
)
}
</
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">
{roleID ? (
...
...
This diff is collapsed.
Click to expand it.
src/pages/userCenter/roleManage/SelectUser/SelectUser.less
View file @
1817acab
...
...
@@ -2,10 +2,14 @@
display: flex;
justify-content: space-between;
}
.headerLeft {
display: flex;
justify-content: flex-end;
}
.pushTestContent {
.ant-table-body {
height: calc(100vh - 225px) !important;
}
}
display: flex;
height: calc(100% - 43px);
.checkScrollBox {
...
...
@@ -37,7 +41,7 @@
line-height: 20px;
}
.topCheckbox
>
label :hover {
.topCheckbox
>
label :hover {
font-weight: 600;
}
...
...
@@ -52,15 +56,14 @@
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-top:10px;
margin-top:
10px;
.ant-checkbox + span {
display: flex;
}
}
.fontlabel {
display: inline-block;
width:130px;
width:
130px;
overflow: hidden;
text-overflow: ellipsis;
// white-space: nowrap;
...
...
@@ -88,16 +91,11 @@
.tableRight {
margin-left: 10px;
margin-top:10px;
margin-top:
10px;
.ant-spin-nested-loading {
.ant-table {
.ant-table-container {
}
}
}
...
...
This diff is collapsed.
Click to expand it.
src/services/RoleManage/api.js
View file @
1817acab
...
...
@@ -56,4 +56,12 @@ export const getMenuByRoleWithLevel = params =>
export
const
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
);
This diff is collapsed.
Click to expand it.
src/services/workflow/workflow.js
View file @
1817acab
...
...
@@ -27,6 +27,11 @@ export const GetFormDataSource = 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
);
// 获取流程映射表字段信息
...
...
This diff is collapsed.
Click to expand it.
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