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
c03a321b
Commit
c03a321b
authored
Dec 03, 2021
by
邓超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改路由菜单,并修改各各菜单的路由跳转路径,测试推送页面添加分页
parent
d983cf3d
Pipeline
#39452
passed with stages
in 26 minutes 2 seconds
Changes
10
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
180 additions
and
97 deletions
+180
-97
index.jsx
src/pages/platformCenter/bsmanager/tablemanager/index.jsx
+15
-18
flow.jsx
src/pages/platformCenter/bsmanager/workFlow/flow.jsx
+1
-1
flowNode.jsx
...s/platformCenter/bsmanager/workFlow/flowNode/flowNode.jsx
+1
-1
incident.jsx
src/pages/platformCenter/bsmanager/workOrder/incident.jsx
+3
-3
incidentFlow.jsx
...pages/platformCenter/bsmanager/workOrder/incidentFlow.jsx
+1
-1
incidentView.jsx
...pages/platformCenter/bsmanager/workOrder/incidentView.jsx
+1
-1
filedConfig.jsx
src/pages/platformCenter/filedConfig/filedConfig.jsx
+1
-1
CardCheck.jsx
...ageManage/projectManage/components/PushTest/CardCheck.jsx
+49
-6
PushTest.jsx
...sageManage/projectManage/components/PushTest/PushTest.jsx
+74
-40
config.js
src/routes/config.js
+34
-25
No files found.
src/pages/platformCenter/bsmanager/tablemanager/index.jsx
View file @
c03a321b
...
...
@@ -57,7 +57,6 @@ const TableManager = props => {
const
[
showSearchStyle
,
setShowSearchStyle
]
=
useState
(
false
);
// 是否显示模糊查询样式
useEffect
(
record
=>
{
console
.
log
(
343434
)
loadTable
(
searchValue
);
getField
();
// if (props.history.location.query && selectTableName !== {}) {
...
...
@@ -138,7 +137,7 @@ const TableManager = props => {
e
.
stopPropagation
();
setFormObj
(
record
);
history
.
push
({
pathname
:
`/
platformCenter/bsmanger
/filedConfig/
${
record
.
tableName
}
`
,
pathname
:
`/
bsmanger/base
/filedConfig/
${
record
.
tableName
}
`
,
state
:
{
template
:
record
,
tableScroll
:
document
.
querySelector
(
'.ant-table-body'
).
scrollTop
,
...
...
@@ -172,7 +171,7 @@ const TableManager = props => {
};
// 加载表
const
loadTable
=
keyword
=>
{
console
.
log
(
222
)
console
.
log
(
222
)
;
setTreeLoading
(
true
);
CM_Table_LoadTable
({
_version
:
9999
,
...
...
@@ -350,18 +349,18 @@ const TableManager = props => {
];
// 模糊查询匹配的样式
const
searchStyle
=
val
=>
{
let
n
;
if
(
showSearchStyle
)
{
n
=
val
.
replace
(
new
RegExp
(
searchValue
,
'g'
),
`<span style='color:red'>
${
searchValue
}
</span>`
,
);
}
else
{
n
=
val
;
}
return
<
div
dangerouslySetInnerHTML=
{
{
__html
:
n
}
}
/>;
};
const
searchStyle
=
val
=>
{
let
n
;
if
(
showSearchStyle
)
{
n
=
val
.
replace
(
new
RegExp
(
searchValue
,
'g'
),
`<span style='color:red'>
${
searchValue
}
</span>`
,
);
}
else
{
n
=
val
;
}
return
<
div
dangerouslySetInnerHTML=
{
{
__html
:
n
}
}
/>;
};
return
(
<
Table
...
...
@@ -373,9 +372,7 @@ const TableManager = props => {
onDoubleClick
:
event
=>
{
event
.
stopPropagation
();
history
.
push
({
pathname
:
`/platformCenter/bsmanger/filedConfig/${
record.tableName
}`
,
pathname
:
`/bsmanger/base/filedConfig/${record.tableName}`
,
state
:
{
template
:
record
,
tableScroll
:
document
.
querySelector
(
'.ant-table-body'
)
...
...
src/pages/platformCenter/bsmanager/workFlow/flow.jsx
View file @
c03a321b
...
...
@@ -124,7 +124,7 @@ const Flow = () => {
// 跳转到对应的流程节点
const
toNode
=
flowName
=>
{
history
.
push
({
pathname
:
'/
platformCenter/bsmang
er/flowNode'
,
pathname
:
'/
bsmanger/workOrd
er/flowNode'
,
state
:
{
flowName
,
pickItemIndex
},
});
};
...
...
src/pages/platformCenter/bsmanager/workFlow/flowNode/flowNode.jsx
View file @
c03a321b
...
...
@@ -312,7 +312,7 @@ const FlowNode = () => {
// 返回
const
backFlow
=
()
=>
{
history
.
push
({
pathname
:
'/
platformCenter/bsmang
er/flow'
,
pathname
:
'/
bsmanger/workOrd
er/flow'
,
state
:
{
pickItemIndex
},
});
};
...
...
src/pages/platformCenter/bsmanager/workOrder/incident.jsx
View file @
c03a321b
...
...
@@ -400,7 +400,7 @@ const incident = () => {
// }
const
process1
=
record
=>
{
history
.
push
({
pathname
:
'/
platformCenter/bsmang
er/incidentFlow'
,
pathname
:
'/
bsmanger/workOrd
er/incidentFlow'
,
state
:
{
formObj
:
record
,
title1
:
record
.
name
,
rember
},
});
};
...
...
@@ -411,7 +411,7 @@ const incident = () => {
// }
const
auxiliaryView1
=
record
=>
{
history
.
push
({
pathname
:
'/
platformCenter/bsmang
er/incidentView'
,
pathname
:
'/
bsmanger/workOrd
er/incidentView'
,
state
:
{
formObj
:
record
,
title2
:
record
.
name
,
rember
},
});
};
...
...
@@ -547,7 +547,7 @@ const incident = () => {
})
}
columns=
{
columns
}
dataSource=
{
tableData
[
pickItem
]
}
scroll=
{
{
y
:
'calc(100vh - 155px)'
,
x
:
'max-content'
}
}
//
scroll={{ y: 'calc(100vh - 155px)', x: 'max-content' }}
pagination=
{
{
showTotal
:
(
total
,
range
)
=>
`第${range[0]}-${range[1]} 条/共 ${total} 条`
,
...
...
src/pages/platformCenter/bsmanager/workOrder/incidentFlow.jsx
View file @
c03a321b
...
...
@@ -107,7 +107,7 @@ const incidentFlow = props => {
const
back
=
()
=>
{
let
{
rember
}
=
props
.
location
.
state
;
history
.
push
({
pathname
:
'/
platformCenter/bsmang
er/incident'
,
pathname
:
'/
bsmanger/workOrd
er/incident'
,
state
:
{
rember
},
});
};
...
...
src/pages/platformCenter/bsmanager/workOrder/incidentView.jsx
View file @
c03a321b
...
...
@@ -209,7 +209,7 @@ const incidentView = props => {
const
back
=
()
=>
{
let
rember
=
props
.
location
.
state
.
rember
;
history
.
push
({
pathname
:
'/
platformCenter/bsmang
er/incident'
,
pathname
:
'/
bsmanger/workOrd
er/incident'
,
state
:
{
rember
},
});
};
...
...
src/pages/platformCenter/filedConfig/filedConfig.jsx
View file @
c03a321b
...
...
@@ -358,7 +358,7 @@ const AddModal = props => {
const
back
=
()
=>
{
let
{
template
,
tableScroll
}
=
props
.
location
.
state
;
history
.
push
({
pathname
:
'/
platformCenter/bsmanger
/tablemanger'
,
pathname
:
'/
bsmanger/base
/tablemanger'
,
query
:
{
template
,
tableScroll
,
...
...
src/pages/platformCenter/messageManage/projectManage/components/PushTest/CardCheck.jsx
View file @
c03a321b
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
{
Checkbox
}
from
'antd'
;
import
styles
from
'./PushTest.less'
;
const
CheckboxGroup
=
Checkbox
.
Group
;
const
CardCheck
=
props
=>
{
const
{
cardMsg
,
cardIndex
,
callback
}
=
props
;
const
[
checkedList
,
setCheckedList
]
=
useState
();
// 自定义获取改变后的值hooks
const
usePrevious
=
value
=>
{
const
ref
=
useRef
();
useEffect
(()
=>
{
ref
.
current
=
value
;
});
return
ref
.
current
;
};
const
{
cardMsg
,
cardIndex
,
callback
,
checkList
}
=
props
;
const
[
checkedList
,
setCheckedList
]
=
useState
([]);
const
[
indeterminate
,
setIndeterminate
]
=
useState
(
false
);
const
[
checkAll
,
setCheckAll
]
=
useState
(
false
);
const
[
plainOptions
,
setPlainOptions
]
=
useState
([]);
const
prevAmount
=
usePrevious
({
checkedList
});
useEffect
(()
=>
{
setPlainOptions
(
cardMsg
.
plainOptions
);
setCheckedList
(
cardMsg
.
checkedList
);
setIndeterminate
(
cardMsg
.
indeterminate
);
setCheckAll
(
cardMsg
.
checkAll
);
},
[]);
useEffect
(()
=>
{
callback
(
checkedList
,
cardIndex
);
if
(
prevAmount
)
{
let
newCheckList
=
[...
checkList
];
// 当前选中的
let
currentArr
=
checkedList
;
// 上一次选中的
let
preArr
=
prevAmount
.
checkedList
;
currentArr
=
new
Set
(
currentArr
);
preArr
=
new
Set
(
preArr
);
// 找出相同的部分
let
someArr
=
[...
new
Set
([...
currentArr
].
filter
(
x
=>
preArr
.
has
(
x
)))];
// 复选框事选中还是取消选中 add or del
let
checkType
;
if
([...
currentArr
].
length
>
[...
preArr
].
length
)
{
checkType
=
'add'
;
}
else
if
([...
currentArr
].
length
<
[...
preArr
].
length
)
{
checkType
=
'del'
;
}
if
(
checkType
===
'add'
)
{
// 添加新选中的元素
currentArr
.
forEach
(
item
=>
{
if
(
someArr
.
indexOf
(
item
)
===
-
1
)
{
newCheckList
.
push
(
item
);
}
});
}
else
if
(
checkType
===
'del'
)
{
// 删除取消勾选的元素
preArr
.
forEach
(
item
=>
{
if
(
someArr
.
indexOf
(
item
)
===
-
1
)
{
newCheckList
.
splice
(
newCheckList
.
findIndex
(
ele
=>
ele
===
item
),
1
);
}
});
}
callback
(
checkedList
,
newCheckList
);
}
},
[
checkedList
]);
const
onChange
=
list
=>
{
console
.
log
(
list
);
setCheckedList
(
list
);
setIndeterminate
(
!!
list
.
length
&&
list
.
length
<
plainOptions
.
length
);
setCheckAll
(
list
.
length
===
plainOptions
.
length
);
...
...
src/pages/platformCenter/messageManage/projectManage/components/PushTest/PushTest.jsx
View file @
c03a321b
...
...
@@ -4,38 +4,45 @@ import { GetGroupUserTree, TestPush } from '@/services/platform/messagemanage';
import
styles
from
'./PushTest.less'
;
import
CardCheck
from
'./CardCheck'
;
let
checkList
=
[];
console
.
log
(
checkList
,
'checkList'
);
const
PushTest
=
props
=>
{
const
[
form
]
=
Form
.
useForm
();
const
{
confirmModal
,
onCancel
,
visible
,
pushTestMsg
}
=
props
;
const
[
allList
,
setAllist
]
=
useState
([]);
const
[
allList
,
setAllist
]
=
useState
([]);
// 用于展示得数据
const
[
checkList
,
setCheckList
]
=
useState
([]);
// 选中得数据集合
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
total
,
setTotal
]
=
useState
();
const
[
currentPage
,
setCurrentPage
]
=
useState
(
1
);
const
[
pageSize
,
setPageSize
]
=
useState
(
10
);
useEffect
(()
=>
{
if
(
visible
)
{
getData
();
let
username
=
form
.
getFieldValue
(
'username'
);
getData
(
username
,
currentPage
,
pageSize
);
}
else
{
checkList
=
[]
;
setCheckList
([])
;
setAllist
([]);
form
.
setFieldsValue
({
username
:
''
});
}
},
[
visible
]);
const
checkCallBack
=
useCallback
((
val
,
index
)
=>
{
// 选中后得回调函数
const
checkCallBack
=
useCallback
((
val
,
newCheckList
)
=>
{
if
(
val
)
{
checkList
[
index
].
checkedList
=
val
;
setCheckList
(
newCheckList
)
;
}
});
// 监听分页
const
paginationChange
=
(
page
,
pageSizes
)
=>
{
// 分页时清空复选框
setCurrentPage
(
page
);
setPageSize
(
pageSizes
);
let
username
=
form
.
getFieldValue
(
'username'
);
getData
(
username
,
page
,
pageSizes
);
};
const
onFinish
=
()
=>
{
let
newArr
=
checkList
.
reduce
(
(
total
,
currentValue
)
=>
[...
total
,
...
currentValue
.
checkedList
],
[],
);
if
(
pushTestMsg
.
ThemeName
)
TestPush
({
theme
:
pushTestMsg
.
ThemeName
,
msgType
:
pushTestMsg
.
MsgType
,
tousers
:
newArr
,
tousers
:
checkList
,
pushPath
:
pushTestMsg
.
item
.
AgentConfig
?
pushTestMsg
.
item
.
AgentConfig
.
Url
:
''
,
...
...
@@ -48,36 +55,58 @@ const PushTest = props => {
message
.
error
(
res
.
msg
);
}
});
console
.
log
(
newArr
,
'newArr'
);
};
const
onSearch
=
()
=>
{
getData
({
key
:
form
.
getFieldsValue
().
username
});
setCheckList
([]);
let
username
=
form
.
getFieldValue
(
'username'
);
getData
(
username
,
currentPage
,
pageSize
);
};
const
getData
=
value
=>
{
let
obj
=
value
?
value
:
{};
const
getData
=
(
username
,
page
,
pageSizes
)
=>
{
setLoading
(
true
);
GetGroupUserTree
(
obj
).
then
(
res
=>
{
console
.
log
(
res
);
GetGroupUserTree
({
key
:
username
,
pageSize
:
pageSizes
,
PageIndex
:
page
,
}).
then
(
res
=>
{
setTotal
(
res
.
data
.
count
);
let
list
=
res
.
data
.
data
.
map
(
item
=>
{
let
indeterminate
=
false
;
let
checkedList
=
[];
let
checkAll
=
false
;
let
options
=
item
.
users
.
map
(
val
=>
{
checkList
.
forEach
(
ele
=>
{
if
(
val
.
userId
===
ele
)
{
checkedList
.
push
(
ele
);
}
});
return
{
label
:
val
.
userName
,
value
:
val
.
userId
,
};
});
console
.
log
(
item
.
groupName
,
'名称'
);
console
.
log
(
checkList
,
'所有选择得列表'
);
console
.
log
(
checkedList
,
'当前组件勾选'
);
let
list
=
res
.
data
.
map
(
item
=>
{
let
options
=
item
.
users
.
map
(
val
=>
({
label
:
val
.
userName
,
value
:
val
.
userId
,
}));
if
(
checkedList
.
length
===
options
.
length
&&
checkedList
.
length
>
0
)
{
checkAll
=
true
;
}
if
(
checkedList
.
length
<
options
.
length
&&
checkedList
.
length
>
0
)
{
indeterminate
=
true
;
}
return
{
groupName
:
item
.
groupName
,
groupId
:
item
.
groupId
,
indeterminate
:
false
,
checkAll
:
false
,
indeterminate
,
checkAll
,
checkedList
,
plainOptions
:
options
,
checkedList
:
[],
};
});
checkList
=
list
;
//
checkList = list;
setAllist
(
list
);
setTimeout
(()
=>
{
setLoading
(
false
);
},
0
);
setLoading
(
false
);
});
};
return
(
...
...
@@ -111,7 +140,8 @@ const PushTest = props => {
type=
"primary"
htmlType=
"submit"
onClick=
{
()
=>
{
getData
();
setCheckList
([]);
getData
(
''
,
currentPage
,
pageSize
);
form
.
setFieldsValue
({
username
:
''
});
}
}
>
...
...
@@ -126,22 +156,26 @@ const PushTest = props => {
style=
{
{
height
:
'500px'
,
overflowY
:
'scroll'
,
margin
:
'20px 0'
}
}
>
{
allList
.
map
((
item
,
index
)
=>
(
<
div
className=
{
styles
.
checkBoxContent
}
key=
{
item
.
groupId
}
style=
{
{
display
:
item
.
plainOptions
.
length
>
0
?
'block'
:
'none'
,
}
}
>
<
div
className=
{
styles
.
checkBoxContent
}
key=
{
item
.
groupId
}
>
<
CardCheck
cardMsg=
{
item
}
cardIndex=
{
index
}
callback=
{
(
val
,
i
)
=>
checkCallBack
(
val
,
i
)
}
checkList=
{
checkList
}
/>
</
div
>
))
}
</
div
>
</
Spin
>
<
Pagination
total=
{
total
}
showTotal=
{
item
=>
`共 ${item} 条`
}
defaultPageSize=
{
pageSize
}
defaultCurrent=
{
1
}
current=
{
currentPage
}
onChange=
{
paginationChange
}
style=
{
{
marginBottom
:
'10px'
}
}
/>
</
Modal
>
</>
);
...
...
src/routes/config.js
View file @
c03a321b
...
...
@@ -269,76 +269,85 @@ export default {
},
{
path
:
'/platformCenter/bsmanger'
,
path
:
'/platformCenter/video'
,
name
:
'视频平台'
,
component
:
VideoManager
,
},
],
},
{
path
:
'/bsmanger'
,
component
:
BlankLayout
,
name
:
'业务中心'
,
icon
:
<
CopyOutlined
style
=
{
iconStyle
}
/>
,
routes
:
[
{
path
:
'/bsmanger/base'
,
name
:
'基础配置'
,
component
:
BlankLayout
,
name
:
'业务平台'
,
icon
:
<
CopyOutlined
style
=
{
iconStyle
}
/>
,
routes
:
[
{
path
:
'/
platformCenter/bsmanger
/tablemanger'
,
path
:
'/
bsmanger/base
/tablemanger'
,
name
:
'表/字段'
,
component
:
TableManager
,
},
{
path
:
'/
platformCenter/bsmanger
/filedConfig/:id'
,
path
:
'/
bsmanger/base
/filedConfig/:id'
,
name
:
'字段配置'
,
component
:
FiledConfig
,
hideMenu
:
true
,
},
{
path
:
'/
platformCenter/bsmanger
/standingBook'
,
path
:
'/
bsmanger/base
/standingBook'
,
name
:
'台账管理'
,
component
:
StandingBook
,
},
],
},
{
path
:
'/bsmanger/workOrder'
,
name
:
'工单管理'
,
component
:
BlankLayout
,
routes
:
[
{
path
:
'/
platformCenter/bsmang
er/incident'
,
path
:
'/
bsmanger/workOrd
er/incident'
,
name
:
'事件'
,
component
:
Incident
,
},
{
path
:
'/
platformCenter/bsmang
er/incidentFlow'
,
path
:
'/
bsmanger/workOrd
er/incidentFlow'
,
name
:
'事件受理流程'
,
hideMenu
:
true
,
component
:
IncidentFlow
,
},
{
path
:
'/
platformCenter/bsmang
er/incidentView'
,
path
:
'/
bsmanger/workOrd
er/incidentView'
,
name
:
'事件辅助视图'
,
hideMenu
:
true
,
component
:
IncidentView
,
},
{
path
:
'/
platformCenter/bsmang
er/flow'
,
path
:
'/
bsmanger/workOrd
er/flow'
,
name
:
'流程'
,
component
:
Flow
,
},
{
path
:
'/
platformCenter/bsmang
er/flowNode'
,
path
:
'/
bsmanger/workOrd
er/flowNode'
,
name
:
'流程节点'
,
hideMenu
:
true
,
component
:
FlowNode
,
},
{
path
:
'/
platformCenter/bsmang
er/Workflow'
,
path
:
'/
bsmanger/workOrd
er/Workflow'
,
name
:
'工作流编辑'
,
component
:
Workflow
,
},
{
path
:
'/platformCenter/bsmanger/maintenance'
,
name
:
'巡维保'
,
component
:
Maintenance
,
},
// {
// path: '/platformCenter/bsmanger/standbookmanager',
// name: '台账配置',
// component: TableManager,
// }
],
},
{
path
:
'/
platformCenter/video
'
,
name
:
'
视频平台
'
,
component
:
VideoManager
,
path
:
'/
bsmanger/maintenance
'
,
name
:
'
巡维保
'
,
component
:
Maintenance
,
},
],
},
...
...
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