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
e3a32324
Commit
e3a32324
authored
Aug 05, 2021
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数据字典添加二级条目前端验证
parent
80345082
Pipeline
#32587
skipped with stages
Changes
9
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
625 additions
and
16 deletions
+625
-16
WebDic.js
src/pages/dataCenter/dictionary1/WebDic.js
+55
-6
flow.jsx
src/pages/platformCenter/bsmanager/workOrder/flow.jsx
+14
-0
flow.less
src/pages/platformCenter/bsmanager/workOrder/flow.less
+0
-0
incident.jsx
src/pages/platformCenter/bsmanager/workOrder/incident.jsx
+274
-0
incident.less
src/pages/platformCenter/bsmanager/workOrder/incident.less
+119
-0
index.js
src/pages/platformCenter/videoManager/index.js
+114
-0
index.less
src/pages/platformCenter/videoManager/index.less
+19
-0
UserManage.js
src/pages/userCenter/userManage/UserManage.js
+1
-0
config.js
src/routes/config.js
+29
-10
No files found.
src/pages/dataCenter/dictionary1/WebDic.js
View file @
e3a32324
...
...
@@ -618,6 +618,8 @@ const WebDic = () => {
const
submitInput
=
()
=>
{
setInPutVisible
(
true
);
}
return
(
<
div
className
=
{
styles
.
WebDic
}
>
<
Spin
spinning
=
{
loading
}
tip
=
"loading..."
>
...
...
@@ -757,7 +759,33 @@ const WebDic = () => {
<
Form
.
Item
name
=
'nodeName1'
label
=
"名称"
rules
=
{[{
required
:
true
,
message
:
'不能为空'
}]}
rules
=
{[
{
required
:
true
,
message
:
'不能为空'
},
{
validator
:
(
rule
,
value
,
callback
)
=>
{
const
nodeName
=
addForm
.
getFieldsValue
().
nodeName1
;
//第一项的nodeName
const
nodeName1
=
addForm
.
getFieldsValue
();
let
result
=
nodeName1
.
users
;
let
arr
=
[];
result
.
map
(
item
=>
{
if
(
item
===
undefined
)
{
}
else
{
let
a
=
item
.
nodeName
if
(
a
!==
''
){
arr
.
push
(
a
)
}
}
})
arr
.
unshift
(
nodeName
)
console
.
log
(
arr
)
if
(
new
Set
(
arr
).
size
!==
arr
.
length
)
{
callback
(
'用户名重复'
)
}
}
}
]}
>
<
Input
placeholder
=
"请输入名称"
/>
<
/Form.Item
>
...
...
@@ -784,11 +812,32 @@ const WebDic = () => {
[
{
required
:
true
,
message
:
'不能为空'
},
{
validator
:
(
rule
,
value
,
callback
)
=>
{
const
getNodeName
=
addForm
.
getFieldsValue
().
nodeName1
;
if
(
value
===
getNodeName
)
{
callback
(
'用户名重复'
);
}
validator
:
(
rule
,
value
,
callback
)
=>
{
const
nodeName
=
addForm
.
getFieldsValue
().
nodeName1
;
//第一项的nodeName
const
nodeName1
=
addForm
.
getFieldsValue
();
let
result
=
nodeName1
.
users
;
let
arr
=
[];
result
.
map
(
item
=>
{
if
(
item
===
undefined
)
{
}
else
{
let
a
=
item
.
nodeName
if
(
a
!==
''
){
arr
.
push
(
a
)
}
}
})
if
(
nodeName
!==
undefined
){
arr
.
unshift
(
nodeName
)
}
console
.
log
(
arr
)
if
(
new
Set
(
arr
).
size
!==
arr
.
length
)
{
arr
=
[...
new
Set
(
arr
)]
console
.
log
(
arr
)
callback
(
'用户名重复'
)
}
}
}
]
...
...
src/pages/platformCenter/bsmanager/workOrder/flow.jsx
0 → 100644
View file @
e3a32324
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
styles
from
'./incident.less'
;
const
flow
=
()
=>
{
return
(
<
div
className=
{
styles
.
flowContainer
}
>
</
div
>
)
};
export
default
flow
;
\ No newline at end of file
src/pages/platformCenter/bsmanager/workOrder/flow.less
0 → 100644
View file @
e3a32324
src/pages/platformCenter/bsmanager/workOrder/incident.jsx
0 → 100644
View file @
e3a32324
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
styles
from
'./incident.less'
;
import
{
Form
,
Card
,
Space
,
Table
,
Popconfirm
,
Spin
,
Tooltip
,
notification
,
Tree
,
Button
,
}
from
'antd'
;
import
{
DoubleLeftOutlined
,
DoubleRightOutlined
,
PlusSquareFilled
,
RightOutlined
,
EditTwoTone
,
DeleteOutlined
,
OrderedListOutlined
,
ApartmentOutlined
,
DesktopOutlined
}
from
'@ant-design/icons'
;
import
classnames
from
'classnames'
;
const
incident
=
()
=>
{
const
[
treeLoading
,
setTreeLoading
]
=
useState
(
false
);
const
[
tableLoading
,
setTableLoading
]
=
useState
(
false
);
const
[
treeVisible
,
setTreeVisible
]
=
useState
(
true
);
// 左边列表是否可见
const
[
treeData
,
setTreeData
]
=
useState
([]);
// 事件表数据
const
[
tableData
,
setTableData
]
=
useState
([]);
// 事件表
// const setRowClassName = record =>
// record.userID === selectColor.userID ? styles.clickRowStyle : '';
const
columns
=
[
{
title
:
'事件名称'
,
},
{
title
:
'事件主表'
}
,
{
title
:
'编码'
}
,
{
title
:
'摘要字段'
}
,
{
title
:
'权限'
}
,
{
title
:
'流程'
}
,
{
title
:
'上报'
}
,
{
title
:
'上报字段'
}
,
{
title
:
'显示字段'
}
,
{
title
:
'编辑'
,
render
:
record
=>
{
if
(
!
record
)
{
return
'-'
;
}
return
record
;
},
}
,
{
title
:
'编辑字段'
}
,
{
title
:
'上报方式'
}
,
{
title
:
'置顶条件'
,
render
:
record
=>
{
if
(
!
record
)
{
return
'-'
;
}
return
record
;
},
}
,
{
title
:
'接口配置'
,
render
:
record
=>
{
if
(
!
record
)
{
return
'-'
;
}
return
record
;
},
}
,
{
title
:
'操作'
,
aligin
:
'center'
,
render
:
record
=>
{
<
Space
size
=
"middle"
>
<
Tooltip
title=
"编辑用户"
>
<
EditTwoTone
onClick=
{
()
=>
editEventType
(
record
)
}
style=
{
{
fontSize
:
'16px'
}
}
/>
</
Tooltip
>
<
Tooltip
title=
"删除"
>
<
Popconfirm
placement=
"bottomRight"
title=
{
<
p
>
即将删除事件类型
{
' '
}
<
span
className=
{
styles
.
redText
}
>
{
voca
.
stripTags
(
record
.
loginName
)
}
</
span
>
,是否确认删除?
</
p
>
}
okText=
"确认"
cancelText=
"取消"
onConfirm=
{
()
=>
deleteEventType
(
record
)
}
>
<
DeleteOutlined
style=
{
{
fontSize
:
'16px'
,
color
:
'#e86060'
}
}
/>
</
Popconfirm
>
</
Tooltip
>
<
/
Space
>
}
}
]
//添加事件
const addIncident = () =
>
{
}
//修改事件类型
const editEventType = () =
>
{
}
//删除事件类型
const deleteEventType = () =
>
{
}
const onSelect = () =
>
{
}
const sort = () =
>
{
}
const process = () =
>
{
}
const auxiliaryView = () =
>
{
}
return (
<
div
className=
{
styles
.
incidentContainer
}
>
<
div
className=
{
styles
.
contentContainers
}
>
{
/*左侧事件树 */
}
<
Spin
spinning=
{
treeLoading
}
tip=
"loading..."
>
<
Card
className=
{
classnames
({
[
styles
.
orgContainer
]:
true
,
[
styles
.
orgContainerHide
]:
!
treeVisible
,
})
}
>
<
div
>
<
span
style=
{
{
fontSize
:
'15px '
,
fontWeight
:
'bold'
,
marginLeft
:
'15px'
}
}
>
事件列表
</
span
>
<
Tooltip
title=
"添加事件类型"
>
<
PlusSquareFilled
onClick=
{
()
=>
addIncident
()
}
style=
{
{
color
:
'#1890FF'
,
fontSize
:
'25px'
,
verticalAlign
:
'middle'
,
marginLeft
:
'60%'
}
}
/>
</
Tooltip
>
<
hr
style=
{
{
width
:
'95%'
,
color
:
'#eeecec'
,
marginLeft
:
'15px'
}
}
/>
<
Tree
onSelect=
{
onSelect
}
height=
{
treeData
.
length
&&
treeData
.
length
>
30
?
treeData
.
length
*
15
+
30
:
1000
}
/>
</
div
>
<
div
className=
{
styles
.
switcher
}
>
{
treeVisible
&&
(
<
Tooltip
title=
"隐藏机构列表"
>
<
DoubleLeftOutlined
onClick=
{
()
=>
setTreeVisible
(
false
)
}
/>
</
Tooltip
>
)
}
{
!
treeVisible
&&
(
<
Tooltip
title=
"显示机构列表"
>
<
DoubleRightOutlined
onClick=
{
()
=>
setTreeVisible
(
true
)
}
/>
</
Tooltip
>
)
}
</
div
>
</
Card
>
</
Spin
>
{
/*右侧 */
}
<
div
className=
{
classnames
({
[
styles
.
userContainer
]:
true
,
[
styles
.
userContainerHide
]:
!
treeVisible
,
})
}
>
<
div
style=
{
{
height
:
'50px'
}
}
>
<
span
style=
{
{
float
:
'right'
,
marginRight
:
'10px'
}
}
>
<
Button
icon=
{
<
OrderedListOutlined
className=
{
styles
.
icon
}
/>
}
onClick=
{
sort
}
style=
{
{
marginLeft
:
'30px'
,
verticalAlign
:
'middle'
,
marginTop
:
'10px'
}
}
>
调序
</
Button
>
<
Button
icon=
{
<
ApartmentOutlined
className=
{
styles
.
icon
}
/>
}
onClick=
{
process
}
style=
{
{
marginLeft
:
'30px'
,
verticalAlign
:
'middle'
,
marginTop
:
'10px'
}
}
>
受理流程
</
Button
>
<
Button
icon=
{
<
DesktopOutlined
className=
{
styles
.
icon
}
/>
}
onClick=
{
auxiliaryView
}
style=
{
{
marginLeft
:
'30px'
,
verticalAlign
:
'middle'
,
marginTop
:
'10px'
}
}
>
辅助视图
</
Button
>
</
span
>
</
div
>
<
Table
// rowClassName={setRowClassName}
size=
"small"
// rowKey={}
bordered
columns=
{
columns
}
dataSource=
{
tableData
}
loading=
{
tableLoading
}
scroll=
{
{
x
:
'max-content'
,
y
:
'calc(100vh - 210px)'
}
}
pagination=
{
{
showTotal
:
(
total
,
range
)
=>
`第${range[0]}-${range[1]} 条/共 ${total} 条`
,
pageSizeOptions
:
[
10
,
20
,
50
,
100
],
defaultPageSize
:
20
,
showQuickJumper
:
true
,
showSizeChanger
:
true
,
}
}
/>
</
div
>
</
div
>
</
div
>
)
};
export default incident;
\ No newline at end of file
src/pages/platformCenter/bsmanager/workOrder/incident.less
0 → 100644
View file @
e3a32324
.incidentContainer{
.contentContainers{
display: flex;
width: 100%;
position: relative;
.ant-table.ant-table-bordered > .ant-table-container {
min-width: calc(100vw - 582px);
height: calc(100vh - 120px);
overflow-x: hidden;
border: none;
}
.orgContainer{
height: calc(100vh - 74px);
width: 280px;
left: 0;
top: 0;
overflow-x: hidden;
margin-right: 10px;
position: relative;
transition-property:width,left;
transition-duration: 0.5s;
white-space: nowrap;
.ant-tree{
padding-top: 6px;
.ant-tree-switcher{
line-height: 1;
margin-right: 0px !important;
color:#1890FF;
.ant-tree-switcher-line-icon{
margin-left: 5px;
}
}
}
.switcher{
display: block;
position: absolute;
font-size: 18px;
color: #1890FF!important;
top: 50%;
right: 2px;
transform: translate(0%,-50%);
z-index: 1;
}
}
.orgContainerHide{
// transform: translateX(-230px);
left: 0px;
top: 0;
width: 26px;
}
.ant-popover-message-title {
padding-left: 20px;
}
.userContainer{
height: calc(100vh - 74px) !important;
z-index: 999;
min-width: 800px;
background: white;
width: 100%;
position: relative;
transition: width 0.5s;
.title{
margin: 16px 0 10px 16px;
display: inline-block;
width: 270px;
cursor: pointer;
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
}
.ant-table-pagination{
padding-right: 12px;
background: white;
margin: 1px 0;
padding: 8px;
padding-right: 20px;
}
.ant-btn{
margin: 0px 10px;
.ant-btn-primary{
background: #50aefc;
}
}
.ant-input-search-button{
margin-left: 0px !important;
}
.ant-table-thead tr th{
font-weight: 600;
color:rgba(0,0,0,0.85);
background-color:#F6F9FE;
}
.ant-table-cell{
text-align:center;
overflow: hidden;
// text-overflow:ellipsis;
white-space: nowrap;
}
.ant-table-body{
height:calc(100vh - 210px);
border-right: white;
overflow: auto !important;
}
.clickRowStyle{
background: #cfe7fd;
}
.ant-pagination{
z-index: 999;
border-top: 1px solid #f0eded;
}
}
}
.icon{
margin-top: -5px !important;
vertical-align: text-bottom;
}
}
\ No newline at end of file
src/pages/platformCenter/videoManager/index.js
0 → 100644
View file @
e3a32324
/*
* @Description:
* @Author: leizhe
* @Date: 2021-08-03 11:38:03
* @LastEditTime: 2021-08-04 10:29:01
* @LastEditors: leizhe
*/
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
styles
from
'./index.less'
;
import
{
Row
,
Col
,
Select
,
Spin
,
Table
,
Input
,
Button
}
from
'antd'
;
import
{
SyncOutlined
,
PlusOutlined
,
ArrowUpOutlined
}
from
'@ant-design/icons'
;
const
videoManager
=
()
=>
{
const
[
configurationType
,
setConfigurationType
]
=
useState
(
'1'
)
const
[
loading
,
setLoading
]
=
useState
(
false
);
// 加载
const
[
data
,
setData
]
=
useState
([]);
// 源数据
const
[
searchWord
,
setSearchWord
]
=
useState
(
''
);
// 关键字
const
{
Search
}
=
Input
;
const
columns
=
[
{
},
{
}
]
const
selectChange
=
value
=>
{
setConfigurationType
(
value
)
}
// 获取搜索框的值
const
handleSearch
=
e
=>
{
setSearchWord
(
e
.
target
.
value
);
};
//搜索
const
submitSearchUser
=
()
=>
{
}
//重置
const
handleReset
=
()
=>
{
}
//升级
const
upgrade
=
()
=>
{
}
//新增
const
addVideo
=
()
=>
{
}
return
(
<
div
className
=
{
styles
.
videoManagerContainer
}
>
<
Row
className
=
{
styles
.
head
}
>
<
Col
span
=
{
24
}
>
<
span
>
配置类型:
<
/span
>
<
Select
defaultValue
=
"莹石云"
value
=
{
configurationType
}
onChange
=
{
selectChange
}
className
=
{
styles
.
sel
}
>
<
Option
value
=
"1"
>
莹石云
<
/Option
>
<
Option
value
=
"2"
>
海康
<
/Option
>
<
Option
value
=
"3"
>
海康
1.2
<
/Option
>
<
Option
value
=
"4"
>
海康
NVR
<
/Option
>
<
Option
value
=
"5"
>
大华
<
/Option
>
<
/Select
>
<
span
style
=
{{
marginLeft
:
'50px'
}}
>
快速搜索:
<
/span
>
<
Search
style
=
{{
width
:
260
}}
placeholder
=
"请输入名称,登录名,设备编码查询"
onSearch
=
{
submitSearchUser
}
onChange
=
{
e
=>
handleSearch
(
e
)}
enterButton
value
=
{
searchWord
}
/
>
<
Button
icon
=
{
<
SyncOutlined
className
=
{
styles
.
icon
}
/>} onClick={handleReset} style={{ marginLeft: '30px', verticalAlign: 'middle', marginTop: '-3px' }}
>
重置
<
/Button
>
<
Button
icon
=
{
<
ArrowUpOutlined
className
=
{
styles
.
icon
}
/>} onClick={upgrade} style={{ marginLeft: '30px', verticalAlign: 'middle', marginTop: '-3px' }}
>
一键升级
<
/Button
>
<
Button
icon
=
{
<
PlusOutlined
className
=
{
styles
.
icon
}
/>} onClick={addVideo} style={{ marginLeft: '30px', verticalAlign: 'middle', marginTop: '-3px' }}
>
新增
<
/Button
>
<
/Col
>
<
/Row
>
<
Spin
spinning
=
{
loading
}
tip
=
"loading"
>
<
div
className
=
{
styles
.
table
}
>
<
Table
size
=
"small"
bordered
columns
=
{
columns
}
dataSource
=
{
data
}
scroll
=
{{
x
:
'max-content'
,
y
:
'calc(100vh - 230px)'
}}
pagination
=
{{
showTotal
:
(
total
,
range
)
=>
`第
${
range
[
0
]}
-
${
range
[
1
]}
条/共
${
total
}
条`
,
pageSizeOptions
:
[
10
,
20
,
50
,
100
],
defaultPageSize
:
20
,
showQuickJumper
:
true
,
showSizeChanger
:
true
,
}}
/
>
<
/div
>
<
/Spin
>
<
/div
>
)
};
export
default
videoManager
;
\ No newline at end of file
src/pages/platformCenter/videoManager/index.less
0 → 100644
View file @
e3a32324
.videoManagerContainer{
.head{
padding: 10px;
background: white;
margin-bottom: 2px;
min-width: 1030px;
}
.ant-card-body {
padding: 0px 24px 24px 17px;
}
.sel{
width: 200px;
}
.icon{
margin-top: -5px !important;
vertical-align: text-bottom;
}
}
\ No newline at end of file
src/pages/userCenter/userManage/UserManage.js
View file @
e3a32324
...
...
@@ -1177,6 +1177,7 @@ const UserManage = () => {
};
const
addChange
=
e
=>
{
console
.
log
(
e
)
e
.
domEvent
.
stopPropagation
()
}
/** ***操作按钮**** */
...
...
src/routes/config.js
View file @
e3a32324
...
...
@@ -38,8 +38,9 @@ import { USER_MODE } from '@/utils/constants';
import
BaseFrameContainer
from
'@/components/BaseFrameContainer'
;
import
JumpContainer
from
'@/components/JumpContainer'
;
import
HostManager
from
'@/pages/platformCenter/hostmanager'
;
import
MessageManager
from
'@/pages/platformCenter/messageManage'
import
SchemeDetail
from
'@/pages/platformCenter/schemeDetail/schemeDetail'
import
MessageManager
from
'@/pages/platformCenter/messageManage'
;
import
VideoManager
from
'@/pages/platformCenter/videoManager'
;
import
SchemeDetail
from
'@/pages/platformCenter/schemeDetail/schemeDetail'
;
import
SchemeConfig
from
'@/pages/platformCenter/schemeConfig/schemeConfig'
;
import
DimensionsConfig
from
'@/pages/platformCenter/dimensionsConfig/dimensionsConfig'
;
...
...
@@ -49,6 +50,8 @@ import AuthControl from '@/pages/authcontrol';
import
TableManager
from
'@/pages/platformCenter/bsmanager/tablemanager'
import
StandingBook
from
'@/pages/platformCenter/standingBook/standingBook'
import
FiledConfig
from
'@/pages/platformCenter/filedConfig/filedConfig'
import
Incident
from
'@/pages/platformCenter/bsmanager/workOrder/incident'
;
import
Flow
from
'@/pages/platformCenter/bsmanager/workOrder/flow'
;
// import ColConen from '@/components/Colophon/colContent';
const
iconStyle
=
{
verticalAlign
:
'0.125em'
};
...
...
@@ -280,6 +283,17 @@ export default {
name
:
'台账管理'
,
component
:
StandingBook
,
},
{
path
:
'/platformCenter/bsmanger/incident'
,
name
:
'事件'
,
component
:
Incident
,
},
{
path
:
'/platformCenter/bsmanger/flow'
,
name
:
'流程'
,
component
:
Flow
,
},
// {
// path: '/platformCenter/bsmanger/standbookmanager',
// name: '台账配置',
...
...
@@ -287,6 +301,11 @@ export default {
// }
],
},
{
path
:
'/platformCenter/video'
,
name
:
'视频平台'
,
component
:
VideoManager
,
}
],
},
{
...
...
@@ -327,14 +346,14 @@ export default {
path
:
'/dataCenter/dictionary1'
,
name
:
'数据字典'
,
component
:
Dictionary1
,
}
,
{
path
:
'/dataCenter/video'
,
name
:
'视频管理'
,
url
:
'/web4/?widget=product/oms/VideoConfig/VideoConfig|hideMap=true&videoType=萤石云'
,
component
:
BaseFrameContainer
,
},
}
//
{
//
path: '/dataCenter/video',
//
name: '视频管理',
//
url:
//
'/web4/?widget=product/oms/VideoConfig/VideoConfig|hideMap=true&videoType=萤石云',
//
component: BaseFrameContainer,
//
},
],
},
{
...
...
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