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
4c31a407
Commit
4c31a407
authored
Apr 19, 2022
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '巡维保排序功能'
parent
7bcf7dc5
Pipeline
#48247
skipped with stages
Changes
15
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
609 additions
and
255 deletions
+609
-255
standingBook.jsx
src/pages/bsmanager/base/standingBook/standingBook.jsx
+107
-26
standingBook.less
src/pages/bsmanager/base/standingBook/standingBook.less
+1
-1
fieldEditor.jsx
...s/bsmanager/base/tablemanager/filedConfig/fieldEditor.jsx
+94
-42
AddModal.jsx
src/pages/bsmanager/maintenance/AddModal.jsx
+23
-17
SortModal.jsx
src/pages/bsmanager/maintenance/SortModal.jsx
+89
-0
maintenance.jsx
src/pages/bsmanager/maintenance/maintenance.jsx
+55
-3
maintenance.less
src/pages/bsmanager/maintenance/maintenance.less
+9
-0
DrawBoardManage.jsx
...er/baseFrameContainer/drawBoardManage/DrawBoardManage.jsx
+12
-13
DrawBoardManage.less
...r/baseFrameContainer/drawBoardManage/DrawBoardManage.less
+3
-0
ModelFileManage.jsx
...er/baseFrameContainer/modelFileManage/ModelFileManage.jsx
+3
-5
siteConfigDrawer.js
...es/productCenter/webConfig/components/siteConfigDrawer.js
+60
-1
RoleManage.jsx
src/pages/userCenter/roleManage/RoleManage.jsx
+71
-70
RoleManage.less
src/pages/userCenter/roleManage/RoleManage.less
+1
-1
SiteManage.jsx
src/pages/userCenter/siteManage/SiteManage.jsx
+75
-75
api.js
src/services/maintenance/api.js
+6
-1
No files found.
src/pages/bsmanager/base/standingBook/standingBook.jsx
View file @
4c31a407
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Form
,
Card
,
Space
,
Table
,
Popconfirm
,
Spin
,
Tooltip
,
notification
}
from
'antd'
;
import
{
Form
,
Card
,
Space
,
Table
,
Popconfirm
,
Spin
,
Tooltip
,
notification
,
Input
,
Button
,
}
from
'antd'
;
import
{
DoubleLeftOutlined
,
...
...
@@ -8,12 +19,14 @@ import {
RightOutlined
,
EditTwoTone
,
DeleteOutlined
,
SyncOutlined
,
}
from
'@ant-design/icons'
;
import
classnames
from
'classnames'
;
import
PageContainer
from
'@/components/BasePageContainer'
;
import
{
GetCM_Ledger_LoadLedgers
,
CM_Ledger_RmoveLedger
}
from
'@/services/standingBook/api'
;
import
AddModal
from
'./BookConfig'
;
import
styles
from
'./standingBook.less'
;
// import Search from 'antd/lib/transfer/search';
const
StandingBook
=
props
=>
{
const
[
allData
,
setAllData
]
=
useState
([]);
const
[
tableData
,
setTableData
]
=
useState
([]);
...
...
@@ -26,7 +39,11 @@ const StandingBook = props => {
const
[
isType
,
setIsType
]
=
useState
(
''
);
// 弹窗类型
const
[
pickItem
,
setPickItem
]
=
useState
(
''
);
const
[
hoverItemIndex
,
setHoverItemIndex
]
=
useState
(
0
);
// hover流程索引
const
[
searchWord
,
setSearchWord
]
=
useState
(
''
);
// 关键字
const
[
searchData
,
setSearchData
]
=
useState
([]);
const
[
showSearchStyle
,
setShowSearchStyle
]
=
useState
(
false
);
// 是否显示模糊查询样式
const
{
Item
}
=
Form
;
const
{
Search
}
=
Input
;
const
editor
=
record
=>
{
setFormObj
(
record
);
...
...
@@ -51,6 +68,7 @@ const StandingBook = props => {
key
:
'name'
,
align
:
'center'
,
width
:
200
,
render
:
item
=>
searchStyle
(
item
),
},
{
...
...
@@ -159,8 +177,10 @@ const StandingBook = props => {
});
console
.
log
(
arr
);
setAllData
(
arr
);
setShowSearchStyle
(
false
);
// 第一次进入展示第一页 不是第一次进入根据当前选择的来进行展示
flag
===
0
?
setPickItem
(
newArr
[
0
])
:
setPickItem
(
pickItem
);
pickItem
?
setPickItem
(
pickItem
)
:
setPickItem
(
newArr
[
0
]);
console
.
log
(
newArr
,
'newArr'
);
setTableData
(
newArr
);
}
...
...
@@ -233,6 +253,52 @@ const StandingBook = props => {
setIsVisible
(
false
);
setFlag
(
flag
+
1
);
};
const
onSearch
=
()
=>
{
console
.
log
(
searchWord
);
console
.
log
(
pickItem
);
setTreeLoading
(
true
);
GetCM_Ledger_LoadLedgers
({
accountName
:
searchWord
}).
then
(
res
=>
{
setTreeLoading
(
false
);
if
(
res
.
msg
===
'Ok'
&&
res
.
data
.
root
)
{
console
.
log
(
res
.
data
.
root
);
setMaxLength
(
res
.
data
.
root
.
length
+
1
);
let
arr
=
formateArrDataA
(
res
.
data
.
root
,
'type'
);
let
newArr
=
[];
Object
.
keys
(
arr
).
map
((
item
,
index
)
=>
{
newArr
.
push
(
item
);
});
console
.
log
(
arr
);
setShowSearchStyle
(
true
);
setAllData
(
arr
);
setSearchData
(
res
.
data
.
root
);
setPickItem
(
''
);
// 第一次进入展示第一页 不是第一次进入根据当前选择的来进行展示
// flag === 0 ? setPickItem(newArr[0]) : setPickItem(pickItem);
console
.
log
(
newArr
,
'newArr'
);
// setTableData(newArr);
}
});
};
const
handleSearch
=
e
=>
{
setSearchWord
(
e
.
target
.
value
);
};
// 模糊查询匹配的样式
const
searchStyle
=
val
=>
{
let
n
;
if
(
showSearchStyle
)
{
n
=
val
.
replace
(
new
RegExp
(
searchWord
,
'g'
),
`<span style='color:red'>
${
searchWord
}
</span>`
);
}
else
{
n
=
val
;
}
return
<
div
dangerouslySetInnerHTML=
{
{
__html
:
n
}
}
/>;
};
const
handleReset
=
()
=>
{
setFlag
(
flag
+
1
);
setSearchWord
(
''
);
};
return
(
<
PageContainer
className=
{
styles
.
userManageContainer
}
>
<
div
className=
{
styles
.
contentContainers
}
>
...
...
@@ -324,31 +390,46 @@ const StandingBook = props => {
[
styles
.
userContainerHide
]:
!
treeVisible
,
})
}
>
<
Table
size=
"small"
rowKey=
"ID"
bordered
onRow=
{
record
=>
{
return
{
onDoubleClick
:
event
=>
{
event
.
stopPropagation
();
editor
(
record
);
},
// 双击
};
}
}
columns=
{
columns
}
dataSource=
{
allData
[
pickItem
]
}
// loading={tableLoading}
scroll=
{
{
x
:
'max-content'
,
y
:
'calc(100vh - 150px)'
}
}
// scroll={{ x: 'max-content' }}
pagination=
{
{
showTotal
:
(
total
,
range
)
=>
`第${range[0]}-${range[1]} 条/共 ${total} 条`
,
pageSizeOptions
:
[
10
,
20
,
50
,
100
],
defaultPageSize
:
20
,
showQuickJumper
:
true
,
showSizeChanger
:
true
,
}
}
/>
<
div
style=
{
{
marginTop
:
'10px'
,
marginLeft
:
'10px'
}
}
>
<
Search
style=
{
{
width
:
260
}
}
placeholder=
"台账名称"
enterButton
onSearch=
{
onSearch
}
onChange=
{
e
=>
handleSearch
(
e
)
}
value=
{
searchWord
}
/>
<
Button
icon=
{
<
SyncOutlined
/>
}
onClick=
{
handleReset
}
>
重置
</
Button
>
</
div
>
<
div
style=
{
{
marginTop
:
'10px'
}
}
>
<
Table
size=
"small"
rowKey=
"ID"
bordered
onRow=
{
record
=>
{
return
{
onDoubleClick
:
event
=>
{
event
.
stopPropagation
();
editor
(
record
);
},
// 双击
};
}
}
columns=
{
columns
}
dataSource=
{
pickItem
?
allData
[
pickItem
]
:
searchData
}
// loading={tableLoading}
scroll=
{
{
x
:
'max-content'
,
y
:
'calc(100vh - 180px)'
}
}
// scroll={{ x: 'max-content' }}
pagination=
{
{
showTotal
:
(
total
,
range
)
=>
`第${range[0]}-${range[1]} 条/共 ${total} 条`
,
pageSizeOptions
:
[
10
,
20
,
50
,
100
],
defaultPageSize
:
20
,
showQuickJumper
:
true
,
showSizeChanger
:
true
,
}
}
/>
</
div
>
</
div
>
<
AddModal
visible=
{
isVisible
}
...
...
src/pages/bsmanager/base/standingBook/standingBook.less
View file @
4c31a407
...
...
@@ -95,7 +95,7 @@
position: relative;
.ant-table.ant-table-bordered > .ant-table-container {
min-width: calc(100vw - 582px);
height: calc(100vh - 120
px);
// height: calc(100vh - 175
px);
overflow-x: hidden;
border: none;
}
...
...
src/pages/bsmanager/base/tablemanager/filedConfig/fieldEditor.jsx
View file @
4c31a407
/* eslint-disable no-restricted-syntax */
/* eslint-disable indent */
/* eslint-disable prefer-destructuring */
/* eslint-disable import/order */
...
...
@@ -19,6 +20,8 @@ import {
Space
,
Button
,
Empty
,
Col
,
Row
,
}
from
'antd'
;
import
{
...
...
@@ -134,12 +137,12 @@ const AddModal = props => {
let
obj
=
form
.
getFieldsValue
();
let
data
=
[
{
Unit
:
pramData
.
Unit
||
''
,
Unit
:
obj
.
Unit
||
''
,
StoreType
:
'nvarchar(255)'
,
Group
:
pramData
.
Group
||
''
,
Shape
,
ExceptionEvent
:
pramData
.
ExceptionEvent
||
''
,
RowSpan
:
Number
(
pramData
.
RowSpan
)
||
0
,
RowSpan
:
Number
(
obj
.
RowSpan
)
||
0
,
ColSpan
:
pramData
.
ColSpan
||
0
,
ReadOnly
:
pramData
.
ReadOnly
||
false
,
EditableLater
:
pramData
.
EditableLater
||
false
,
...
...
@@ -247,6 +250,22 @@ const AddModal = props => {
break
;
}
setPramData
({
...
res
[
0
].
data
.
root
,
coordinates
,
must
,
picture
});
if
(
res
[
0
].
data
.
root
.
Shape
==
'多行文本'
||
res
[
0
].
data
.
root
.
Shape
==
'附件'
||
res
[
0
].
data
.
root
.
Shape
==
'可预览附件'
||
res
[
0
].
data
.
root
.
Shape
==
'图片'
||
res
[
0
].
data
.
root
.
Shape
==
'可预览图片'
||
res
[
0
].
data
.
root
.
Shape
==
'录音'
||
res
[
0
].
data
.
root
.
Shape
==
'视频'
)
{
form
.
setFieldsValue
({
RowSpan
:
6
});
}
else
{
if
(
pramData
.
RowSpan
)
{
form
.
setFieldsValue
({
RowSpan
:
res
[
0
].
data
.
root
.
RowSpan
});
}
form
.
setFieldsValue
({
RowSpan
:
1
});
}
console
.
log
(
pramData
);
// 清空表单数据
if
(
isVisible
==
false
)
{
...
...
@@ -385,6 +404,23 @@ const AddModal = props => {
return
tempObj
;
};
const
handleCharacteristics
=
value
=>
{
console
.
log
(
value
);
if
(
value
==
'多行文本'
||
value
==
'附件'
||
value
==
'可预览附件'
||
value
==
'图片'
||
value
==
'可预览图片'
||
value
==
'录音'
||
value
==
'视频'
)
{
form
.
setFieldsValue
({
RowSpan
:
6
});
}
else
{
if
(
pramData
.
RowSpan
)
{
form
.
setFieldsValue
({
RowSpan
:
pramData
.
RowSpan
});
}
form
.
setFieldsValue
({
RowSpan
:
1
});
}
let
data
=
{
...
pramData
};
setShape
(
value
);
data
.
must
=
false
;
...
...
@@ -610,12 +646,12 @@ const AddModal = props => {
let
obj
=
form
.
getFieldsValue
();
let
data
=
[
{
Unit
:
pramData
.
Unit
||
''
,
Unit
:
obj
.
Unit
||
''
,
StoreType
:
'nvarchar(255)'
,
Group
:
pramData
.
Group
||
''
,
Shape
,
ExceptionEvent
:
pramData
.
ExceptionEvent
||
''
,
RowSpan
:
Number
(
pramData
.
RowSpan
)
||
0
,
RowSpan
:
Number
(
obj
.
RowSpan
)
||
0
,
ColSpan
:
pramData
.
ColSpan
||
0
,
ReadOnly
:
pramData
.
ReadOnly
||
false
,
EditableLater
:
pramData
.
EditableLater
||
false
,
...
...
@@ -705,7 +741,7 @@ const AddModal = props => {
footer=
{
<
Space
>
<
Button
onClick=
{
onSubmit
}
type=
"primary"
>
全部
保存
保存
</
Button
>
</
Space
>
}
...
...
@@ -732,18 +768,19 @@ const AddModal = props => {
{
show
==
'block'
?
(
<
div
style=
{
{
width
:
'600px'
,
overflowY
:
'scroll'
,
height
:
'calc(100vh - 160px)'
}
}
>
{
isVisible
&&
(
<
Form
form=
{
form
}
{
...
layout
}
>
<
Form
form=
{
form
}
>
<
Item
label=
"字段名"
name=
"Name"
labelCol=
{
{
span
:
3
}
}
rules=
{
[{
required
:
true
,
message
:
'请输入表名'
}]
}
>
<
Input
placeholder=
"请输入别名"
disabled
style=
{
{
width
:
'93%'
}
}
/>
</
Item
>
<
Item
label=
"别名"
name=
"Alias"
>
<
Item
label=
"别名"
name=
"Alias"
labelCol=
{
{
span
:
3
}
}
>
<
Input
placeholder=
"请输入别名"
allowClear
style=
{
{
width
:
'93%'
}
}
/>
</
Item
>
<
Item
name=
"ReadOnly"
label=
"属性"
>
<
Item
name=
"ReadOnly"
label=
"属性"
labelCol=
{
{
span
:
3
}
}
>
<
div
>
<
Checkbox
checked=
{
pramData
.
ReadOnly
}
...
...
@@ -759,7 +796,7 @@ const AddModal = props => {
</
Checkbox
>
</
div
>
</
Item
>
<
Item
label=
"同步"
name=
"SyncEvent"
>
<
Item
label=
"同步"
name=
"SyncEvent"
labelCol=
{
{
span
:
3
}
}
>
<
Radio
.
Group
>
<
Radio
value=
{
0
}
style=
{
{
marginRight
:
'0.5rem'
}
}
>
不同步
...
...
@@ -770,26 +807,28 @@ const AddModal = props => {
<
Radio
value=
{
2
}
>
事件(上报时) → 工单
</
Radio
>
</
Radio
.
Group
>
</
Item
>
<
Item
label=
"形态"
>
<
div
className=
{
styles
.
listEvent
}
>
<
Select
style=
{
{
width
:
'42%'
}
}
value=
{
Shape
}
onChange=
{
handleCharacteristics
}
showSearch
>
{
characteristics
.
length
?
characteristics
.
map
((
item
,
index
)
=>
{
return
(
<
Select
.
Option
key=
{
index
}
value=
{
item
}
>
{
item
}
</
Select
.
Option
>
);
})
:
''
}
</
Select
>
<
div
className=
{
styles
.
unit
}
>
<
Row
>
{
/* <Col span={1} /> */
}
<
Col
span=
{
12
}
>
<
Item
label=
"形态"
labelCol=
{
{
span
:
6
}
}
>
<
div
className=
{
styles
.
listEvent
}
>
<
Select
style=
{
{
width
:
'95%'
}
}
value=
{
Shape
}
onChange=
{
handleCharacteristics
}
showSearch
>
{
characteristics
.
length
?
characteristics
.
map
((
item
,
index
)
=>
{
return
(
<
Select
.
Option
key=
{
index
}
value=
{
item
}
>
{
item
}
</
Select
.
Option
>
);
})
:
''
}
</
Select
>
{
/* <div className={styles.unit}>
单位:
<Input
style={{ width: '5rem' }}
...
...
@@ -809,18 +848,30 @@ const AddModal = props => {
onChange={e => handleInput(e, 'RowSpan')}
onkeyup="value=value.replace(/[^\d]/g,'')"
/>
</
div
>
</
div
>
</
Item
>
</div> */
}
</
div
>
</
Item
>
</
Col
>
<
Col
span=
{
6
}
>
<
Item
label=
"单位"
name=
"Unit"
labelCol=
{
{
span
:
7
}
}
>
<
Input
style=
{
{
width
:
'95%'
}
}
placeholder=
""
/>
</
Item
>
</
Col
>
<
Col
span=
{
5
}
>
<
Item
label=
"宽"
name=
"RowSpan"
labelCol=
{
{
span
:
7
}
}
>
<
Input
style=
{
{
width
:
'87%'
}
}
placeholder=
""
/>
</
Item
>
</
Col
>
</
Row
>
{
(()
=>
{
switch
(
Shape
)
{
case
'编码'
:
return
(
<>
<
Item
label=
"前缀"
name=
"prefix"
>
<
Item
label=
"前缀"
name=
"prefix"
labelCol=
{
{
span
:
3
}
}
>
<
Input
style=
{
{
width
:
'93%'
}
}
placeholder=
""
allowClear
/>
</
Item
>
<
Item
label=
"编码方式"
name=
"code"
>
<
Item
label=
"编码方式"
name=
"code"
labelCol=
{
{
span
:
3
}
}
>
<
Radio
.
Group
>
<
Radio
value=
"年份编码"
style=
{
{
marginRight
:
'0.5rem'
}
}
>
XJ-2019-000001(前缀-年份-六位编码)
...
...
@@ -842,10 +893,10 @@ const AddModal = props => {
return
(
<>
{
' '
}
<
Item
label=
"可选值"
name=
"Config"
>
<
Item
label=
"可选值"
name=
"Config"
labelCol=
{
{
span
:
3
}
}
>
<
TextArea
allowClear
style=
{
{
width
:
'93%'
}
}
/>
</
Item
>
<
Item
colon=
{
false
}
label=
" "
>
<
Item
colon=
{
false
}
label=
" "
labelCol=
{
{
span
:
3
}
}
>
{
' '
}
<
div
style=
{
{
display
:
'flex'
,
alignItems
:
'center'
}
}
>
<
span
style=
{
{
marginRight
:
'0.4rem'
}
}
>
...
...
@@ -869,7 +920,7 @@ const AddModal = props => {
case
'图片'
:
case
'可预览图片'
:
return
(
<
Item
name=
"ReadOnly"
label=
"选项"
>
<
Item
name=
"ReadOnly"
label=
"选项"
labelCol=
{
{
span
:
3
}
}
>
<
div
>
<
Checkbox
checked=
{
pramData
.
picture
}
...
...
@@ -893,7 +944,7 @@ const AddModal = props => {
case
'日期周'
:
case
'时分秒'
:
return
(
<
Item
label=
"选项"
name=
"Config"
>
<
Item
label=
"选项"
name=
"Config"
labelCol=
{
{
span
:
3
}
}
>
<
Radio
.
Group
style=
{
{
marginTop
:
'0.3rem'
}
}
>
<
Radio
value=
"默认为空"
...
...
@@ -912,7 +963,7 @@ const AddModal = props => {
);
case
'坐标控件'
:
return
(
<
Item
label=
"选项"
name=
"Config"
>
<
Item
label=
"选项"
name=
"Config"
labelCol=
{
{
span
:
3
}
}
>
<
div
>
<
Checkbox
value=
"当前坐标"
...
...
@@ -926,7 +977,7 @@ const AddModal = props => {
);
default
:
return
(
<
Item
label=
"配置"
name=
"Config"
>
<
Item
label=
"配置"
name=
"Config"
labelCol=
{
{
span
:
3
}
}
>
<
TextArea
allowClear
style=
{
{
width
:
'93%'
}
}
/>
</
Item
>
);
...
...
@@ -935,7 +986,7 @@ const AddModal = props => {
{
Shape
===
'图片'
||
Shape
===
'可预览图片'
?
(
''
)
:
(
<
Item
label=
"预设值"
>
<
Item
label=
"预设值"
labelCol=
{
{
span
:
3
}
}
>
<
div
className=
{
styles
.
listEvent
}
>
<
Input
style=
{
{
width
:
'42%'
,
height
:
'1.8rem'
}
}
...
...
@@ -947,10 +998,11 @@ const AddModal = props => {
<
Item
style=
{
{
marginLeft
:
'1rem'
}
}
label=
"验证"
labelCol=
{
{
span
:
4
}
}
name=
"ValidationRule"
style=
{
{
margin
:
'0 0 0 1rem'
}
}
>
<
Input
style=
{
{
width
:
'9
5
%'
}
}
placeholder=
""
allowClear
/>
<
Input
style=
{
{
width
:
'9
7
%'
}
}
placeholder=
""
allowClear
/>
</
Item
>
<
Tooltip
title=
"选择验证规则"
>
<
PlusSquareOutlined
...
...
src/pages/bsmanager/maintenance/AddModal.jsx
View file @
4c31a407
...
...
@@ -431,29 +431,35 @@ const AddModal = props => {
className=
"ue-editable-select-input"
onChange=
{
inputType2
}
value=
{
Type2
}
placeholder=
"选择此计划关联的设备台账名称
,如果没有请先配置台账管理台账名称为设备
"
placeholder=
"选择此计划关联的设备台账名称"
/>
<
Dropdown
placement=
"bottomRight"
style=
{
{
width
:
'430px'
}
}
overlay=
{
<
Menu
>
{
treeData
.
length
?
treeData
.
map
((
item
,
index
)
=>
{
return
(
<
Menu
.
Item
onClick=
{
()
=>
{
setType2
(
item
);
form
.
setFieldsValue
({
accountName
:
item
});
}
}
style=
{
{
width
:
'430px'
,
marginLeft
:
'-8px'
}
}
key=
{
index
}
>
{
item
}
</
Menu
.
Item
>
);
})
:
''
}
{
treeData
.
length
?
(
treeData
.
map
((
item
,
index
)
=>
{
return
(
<
Menu
.
Item
onClick=
{
()
=>
{
setType2
(
item
);
form
.
setFieldsValue
({
accountName
:
item
});
}
}
style=
{
{
width
:
'430px'
,
marginLeft
:
'-8px'
}
}
key=
{
index
}
>
{
item
}
</
Menu
.
Item
>
);
})
)
:
(
<
Menu
.
Item
style=
{
{
width
:
'430px'
,
marginLeft
:
'-8px'
}
}
>
<
span
style=
{
{
color
:
'red'
}
}
>
暂无数据,请先配置台账管理台账名称为设备
</
span
>
</
Menu
.
Item
>
)
}
</
Menu
>
}
>
...
...
src/pages/bsmanager/maintenance/SortModal.jsx
0 → 100644
View file @
4c31a407
/*
* @Description:
* @Author: leizhe
* @Date: 2022-01-13 10:47:32
* @LastEditTime: 2022-04-19 14:49:15
* @LastEditors: leizhe
*/
/* eslint-disable array-callback-return */
/* eslint-disable no-plusplus */
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Modal
}
from
'antd'
;
import
Sortable
from
'sortablejs'
;
import
styles
from
'./maintenance.less'
;
import
DragTable
from
'@/components/DragTable/DragTable'
;
const
SortModal
=
props
=>
{
const
{
callBackSubmit
=
()
=>
{},
title
,
visible
,
onCancel
,
sortData
}
=
props
;
const
[
orderTable
,
setOrderTable
]
=
useState
([]);
const
[
flowIDs
,
setFlowIDs
]
=
useState
([]);
const
onSumbit
=
()
=>
{
console
.
log
(
flowIDs
);
callBackSubmit
({
str
:
flowIDs
});
};
// 根据orderTable值改变flowIDs
useEffect
(()
=>
{
let
ids
=
[];
orderTable
.
map
(
item
=>
{
ids
.
push
(
item
.
id
);
});
console
.
log
(
ids
);
setFlowIDs
(
ids
);
},
[
orderTable
]);
useEffect
(()
=>
{
console
.
log
(
sortData
);
if
(
visible
)
{
setOrderTable
(
sortData
);
}
},
[
visible
]);
// 拖拽回调函数
const
dragCallBack
=
data
=>
{
console
.
log
(
data
);
if
(
data
)
{
setOrderTable
(
data
);
}
};
const
columns
=
[
{
title
:
'字段名'
,
dataIndex
:
'businessName'
,
width
:
150
,
key
:
'businessName'
,
},
];
return
(
<
Modal
title=
{
title
}
visible=
{
visible
}
onCancel=
{
onCancel
}
onOk=
{
onSumbit
}
okText=
"确认"
cancelText=
"取消"
>
<
div
className=
{
styles
.
cardContent
}
style=
{
{
width
:
'26rem'
,
marginLeft
:
'24px'
,
maxHeight
:
'400px'
,
overflow
:
'auto'
}
}
>
<
div
className=
{
styles
.
doctorTable
}
>
<
DragTable
bordered
style=
{
{
marginBottom
:
'10px'
}
}
rowKey=
{
record
=>
record
.
id
}
columns=
{
columns
}
dataSource=
{
orderTable
}
showHeader=
{
false
}
pagination=
{
false
}
size=
"small"
dragCallBack=
{
dragCallBack
}
ItemTypes=
"flowOrder"
/>
</
div
>
</
div
>
</
Modal
>
);
};
export
default
SortModal
;
src/pages/bsmanager/maintenance/maintenance.jsx
View file @
4c31a407
...
...
@@ -2,10 +2,15 @@
/* eslint-disable camelcase */
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Space
,
Table
,
Popconfirm
,
Tooltip
,
Button
,
notification
}
from
'antd'
;
import
{
CM_XWBPlan_DataList
,
CM_XWBPlan_RemovePlan
}
from
'@/services/maintenance/api'
;
import
{
EditTwoTone
,
DeleteOutlined
,
PlusOutlined
}
from
'@ant-design/icons'
;
import
{
CM_XWBPlan_DataList
,
CM_XWBPlan_RemovePlan
,
CM_XWBPlan_ChangeOrder
,
}
from
'@/services/maintenance/api'
;
import
{
EditTwoTone
,
DeleteOutlined
,
PlusOutlined
,
OrderedListOutlined
}
from
'@ant-design/icons'
;
import
styles
from
'./maintenance.less'
;
import
AddModal
from
'./AddModal'
;
import
SortModal
from
'./SortModal'
;
const
maintenance
=
()
=>
{
const
[
addVisible
,
setAddVisible
]
=
useState
(
false
);
...
...
@@ -13,6 +18,7 @@ const maintenance = () => {
const
[
formObj
,
setFormObj
]
=
useState
(
''
);
const
[
treeLoading
,
setTreeLoading
]
=
useState
(
false
);
const
[
flag
,
setFlag
]
=
useState
(
0
);
const
[
sortVisible
,
setSortVisible
]
=
useState
(
false
);
const
[
tableData
,
setTableData
]
=
useState
([]);
const
columns
=
[
...
...
@@ -295,6 +301,32 @@ const maintenance = () => {
setFlag
(
flag
+
1
);
};
const
sort
=
()
=>
{
setSortVisible
(
true
);
};
const
onOK
=
prop
=>
{
setSortVisible
(
false
);
let
aa
=
prop
.
str
.
toString
();
console
.
log
(
aa
);
CM_XWBPlan_ChangeOrder
(
aa
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
notification
.
success
({
message
:
'提示'
,
duration
:
3
,
description
:
'调整成功'
,
});
setFlag
(
flag
+
1
);
}
else
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
res
.
msg
,
});
}
});
};
return
(
<
div
className=
{
styles
.
maintenanceContainer
}
>
<
div
className=
{
styles
.
contentContainers
}
>
...
...
@@ -303,13 +335,26 @@ const maintenance = () => {
<
Button
icon=
{
<
PlusOutlined
className=
{
styles
.
icon
}
/>
}
onClick=
{
add
}
type=
"primary"
style=
{
{
marginLeft
:
'30px'
,
verticalAlign
:
'middle'
,
marginTop
:
'10px'
,
}
}
>
添加
<
span
style=
{
{
marginTop
:
'-3px'
}
}
>
新增
</
span
>
</
Button
>
<
Button
icon=
{
<
OrderedListOutlined
className=
{
styles
.
icon
}
/>
}
onClick=
{
sort
}
type=
"primary"
style=
{
{
marginLeft
:
'30px'
,
verticalAlign
:
'middle'
,
marginTop
:
'10px'
,
}
}
>
<
span
style=
{
{
marginTop
:
'-3px'
}
}
>
调序
</
span
>
</
Button
>
</
span
>
</
div
>
...
...
@@ -345,6 +390,13 @@ const maintenance = () => {
formObj=
{
formObj
}
placement=
"right"
/>
<
SortModal
title=
"调整顺序"
visible=
{
sortVisible
}
sortData=
{
tableData
}
onCancel=
{
()
=>
setSortVisible
(
false
)
}
callBackSubmit=
{
onOK
}
/>
</
div
>
</
div
>
);
...
...
src/pages/bsmanager/maintenance/maintenance.less
View file @
4c31a407
...
...
@@ -33,6 +33,15 @@
}
}
}
.cardContent {
height: 30rem;
overflow-y: scroll;
overflow-x: scroll;
width: 100%;
}
.doctorTable {
margin-bottom: 16px;
}
.linkDrowp {
position: absolute;
top: 0px;
...
...
src/pages/platformCenter/baseFrameContainer/drawBoardManage/DrawBoardManage.jsx
View file @
4c31a407
...
...
@@ -3,7 +3,7 @@
* @Description:
* @Author: leizhe
* @Date: 2022-04-06 11:38:46
* @LastEditTime: 2022-04-1
5 16:45:47
* @LastEditTime: 2022-04-1
9 17:16:39
* @LastEditors: leizhe
*/
import
React
,
{
useState
,
useEffect
}
from
'react'
;
...
...
@@ -239,7 +239,7 @@ const DrawBoardManage = () => {
{
title
:
'模型类型'
,
align
:
'center'
,
width
:
200
,
dataIndex
:
'typeName'
,
key
:
'typeName'
,
render
:
(
text
,
record
)
=>
{
...
...
@@ -259,7 +259,7 @@ const DrawBoardManage = () => {
{
title
:
'模型名称'
,
align
:
'center'
,
width
:
300
,
dataIndex
:
'name'
,
key
:
'name'
,
render
:
(
text
,
record
)
=>
{
...
...
@@ -274,7 +274,7 @@ const DrawBoardManage = () => {
{
title
:
'图像'
,
align
:
'center'
,
width
:
200
,
dataIndex
:
'modelPath'
,
key
:
'modelPath'
,
render
:
(
text
,
record
)
=>
{
...
...
@@ -316,7 +316,7 @@ const DrawBoardManage = () => {
title
:
'设计者'
,
align
:
'center'
,
dataIndex
:
'people'
,
width
:
10
0
,
width
:
8
0
,
key
:
'people'
,
render
:
(
text
,
record
)
=>
{
const
obj
=
{
...
...
@@ -330,7 +330,7 @@ const DrawBoardManage = () => {
{
title
:
'创建日期'
,
align
:
'center'
,
width
:
2
50
,
width
:
1
50
,
dataIndex
:
'createTime'
,
key
:
'createTime'
,
render
:
(
text
,
record
)
=>
{
...
...
@@ -345,7 +345,7 @@ const DrawBoardManage = () => {
{
title
:
'操作'
,
align
:
'center'
,
width
:
20
0
,
width
:
15
0
,
key
:
'action'
,
render
:
record
=>
{
let
aa
=
(
...
...
@@ -382,6 +382,7 @@ const DrawBoardManage = () => {
title
:
'添加子模型'
,
align
:
'center'
,
dataIndex
:
'stateModel'
,
width
:
100
,
key
:
'stateModel'
,
render
:
(
text
,
record
)
=>
{
const
obj
=
{
...
...
@@ -622,8 +623,7 @@ const DrawBoardManage = () => {
<
Card
style=
{
{
width
:
'100%'
,
height
:
'calc(100vh - 130px)'
}
}
>
<
div
style=
{
{
display
:
'flex'
,
justifyContent
:
'space-around'
,
width
:
'100%'
}
}
>
{
/* 左侧类型树 */
}
<
div
style=
{
{
width
:
'250px'
}
}
>
<
div
style=
{
{
minWidth
:
'250px'
}
}
>
<
Spin
spinning=
{
treeLoading
}
tip=
"loading..."
>
<
div
style=
{
{
display
:
'flex'
,
justifyContent
:
'space-between'
,
alignContent
:
'center'
}
}
...
...
@@ -707,9 +707,7 @@ const DrawBoardManage = () => {
</
div
>
{
/* 右侧表格 */
}
<
div
style=
{
{
width
:
'1400px'
,
marginLeft
:
'20px'
,
marginTop
:
'-10px'
,
overflow
:
'scroll'
}
}
>
<
div
style=
{
{
marginLeft
:
'20px'
,
marginTop
:
'-10px'
,
overflow
:
'scroll'
}
}
>
<
div
style=
{
{
height
:
'41px'
,
...
...
@@ -781,7 +779,8 @@ const DrawBoardManage = () => {
columns=
{
columns
}
dataSource=
{
tableData
}
loading=
{
tableLoading
}
scroll=
{
{
x
:
'max-content'
,
y
:
'calc(100vh - 262px)'
}
}
style=
{
{
minWidth
:
'100%'
}
}
scroll=
{
{
y
:
'calc(100vh - 262px)'
,
x
:
'800px'
}
}
onExpand=
{
onUnfold
}
onRow=
{
record
=>
({
// onDoubleClick: event =>
{
...
...
src/pages/platformCenter/baseFrameContainer/drawBoardManage/DrawBoardManage.less
View file @
4c31a407
...
...
@@ -7,6 +7,9 @@
.ant-card-body {
padding: 12px;
}
.ant-table-body {
width: 100%;
}
.listItem {
display: flex;
justify-content: space-between;
...
...
src/pages/platformCenter/baseFrameContainer/modelFileManage/ModelFileManage.jsx
View file @
4c31a407
...
...
@@ -3,7 +3,7 @@
* @Description:
* @Author: leizhe
* @Date: 2022-04-06 11:39:53
* @LastEditTime: 2022-04-1
5 15:35
:27
* @LastEditTime: 2022-04-1
9 17:24
:27
* @LastEditors: leizhe
*/
import
React
,
{
useState
,
useEffect
}
from
'react'
;
...
...
@@ -107,7 +107,6 @@ const ModelFileManage = () => {
dataIndex
:
'name'
,
align
:
'center'
,
key
:
'name'
,
width
:
400
,
render
:
item
=>
searchStyle
(
item
),
},
{
...
...
@@ -115,7 +114,6 @@ const ModelFileManage = () => {
dataIndex
:
'templet'
,
align
:
'center'
,
key
:
'templet'
,
width
:
200
,
render
:
(
text
,
record
,
index
)
=>
(
<
span
>
{
record
.
templet
?
(
...
...
@@ -166,7 +164,6 @@ const ModelFileManage = () => {
dataIndex
:
'thumbnailURL'
,
align
:
'center'
,
key
:
'thumbnailURL'
,
width
:
400
,
render
:
text
=>
(
<
Image
src=
{
window
.
location
.
origin
+
`/Publish/Web/File/Sketch/Preview/${text}`
}
...
...
@@ -177,6 +174,7 @@ const ModelFileManage = () => {
{
title
:
'操作'
,
key
:
'action'
,
width
:
200
,
align
:
'center'
,
render
:
record
=>
(
<
Space
size=
"middle"
>
...
...
@@ -480,7 +478,7 @@ const ModelFileManage = () => {
<
Pagination
style=
{
{
float
:
'right'
,
marginTop
:
'10px'
}
}
total=
{
total
}
showTotal=
{
item
=>
`共 ${item
} 条`
}
showTotal=
{
(
aa
,
range
)
=>
`第${range[0]}-${range[1]} 条/共 ${total
} 条`
}
defaultPageSize=
{
pageSize
}
defaultCurrent=
{
1
}
pageSizeOptions=
{
[
10
,
20
,
40
,
100
]
}
...
...
src/pages/productCenter/webConfig/components/siteConfigDrawer.js
View file @
4c31a407
...
...
@@ -11,20 +11,49 @@ import {
Checkbox
,
Radio
,
Tooltip
,
Divider
,
Row
,
Col
,
}
from
'antd'
;
import
{
PlusOutlined
,
InfoCircleOutlined
}
from
'@ant-design/icons'
;
import
WebConfigForm
from
'./webConfigForm'
;
import
Upload
from
'@/components/Upload'
;
import
styles
from
'./siteConfigDrawer.less'
;
const
{
Option
}
=
Select
;
const
plainOptions
=
[
'搜索'
,
'首页'
,
'常用'
,
'工单'
,
'消息'
];
const
defaultCheckedList
=
[
'搜索'
,
'首页'
,
'常用'
,
'工单'
,
'消息'
];
export
default
props
=>
{
const
{
visible
,
onClose
,
config
,
hasIntegerate
,
isEdit
,
onOk
,
submitting
,
productList
}
=
props
;
const
[
form
]
=
Form
.
useForm
();
const
[
loginPages
,
setLoginPages
]
=
useState
([]);
const
[
checkedList
,
setCheckedList
]
=
useState
([]);
const
[
indeterminate
,
setIndeterminate
]
=
useState
(
false
);
const
[
checkAll
,
setCheckAll
]
=
useState
(
true
);
const
CheckboxGroup
=
Checkbox
.
Group
;
useEffect
(()
=>
{
onGetLoginPages
();
},
[]);
console
.
log
(
isEdit
);
if
(
isEdit
)
{
if
(
config
)
{
setCheckedList
(
config
.
topMenu
.
split
(
','
));
if
(
config
.
topMenu
.
split
(
','
).
length
==
1
&&
config
.
topMenu
.
split
(
','
)[
0
]
==
''
)
{
setIndeterminate
(
false
);
}
else
{
setIndeterminate
(
!!
config
.
topMenu
.
split
(
','
).
length
&&
config
.
topMenu
.
split
(
','
).
length
<
plainOptions
.
length
,
);
}
setCheckAll
(
config
.
topMenu
.
split
(
','
).
length
===
plainOptions
.
length
);
}
}
else
{
setCheckedList
(
defaultCheckedList
);
setIndeterminate
(
false
);
setCheckAll
(
true
);
}
},
[
visible
]);
useEffect
(()
=>
{
if
(
visible
)
{
...
...
@@ -54,6 +83,11 @@ export default props => {
const
onsubmit
=
()
=>
{
form
.
validateFields
().
then
(
validate
=>
{
console
.
log
(
validate
);
console
.
log
(
checkedList
);
console
.
log
(
checkedList
.
toString
());
validate
.
topMenu
=
checkedList
.
toString
();
console
.
log
(
validate
);
if
(
validate
)
{
onOk
({
...
validate
,
...
...
@@ -63,6 +97,18 @@ export default props => {
}
});
};
const
onCheckAllChange
=
e
=>
{
setCheckedList
(
e
.
target
.
checked
?
plainOptions
:
[]);
setIndeterminate
(
false
);
setCheckAll
(
e
.
target
.
checked
);
};
const
onChange
=
list
=>
{
setCheckedList
(
list
);
setIndeterminate
(
!!
list
.
length
&&
list
.
length
<
plainOptions
.
length
);
setCheckAll
(
list
.
length
===
plainOptions
.
length
);
};
return
(
<
Drawer
title
=
{
isEdit
?
'查看/编辑网站配置'
:
'新增网站'
}
...
...
@@ -206,6 +252,19 @@ export default props => {
<
Radio
value
=
{
false
}
>
关
<
/Radio
>
<
/Radio.Group
>
<
/Form.Item
>
<
Form
.
Item
name
=
"topMenu"
label
=
"功能配置"
>
<
Checkbox
indeterminate
=
{
indeterminate
}
onChange
=
{
onCheckAllChange
}
checked
=
{
checkAll
}
style
=
{{
marginTop
:
'5px'
}}
>
全选
<
/Checkbox
>
<
br
/>
<
br
/>
<
CheckboxGroup
options
=
{
plainOptions
}
value
=
{
checkedList
}
onChange
=
{
onChange
}
/
>
<
/Form.Item
>
<
/Form
>
<
/Drawer
>
);
...
...
src/pages/userCenter/roleManage/RoleManage.jsx
View file @
4c31a407
...
...
@@ -273,19 +273,19 @@ const SiteManage = () => {
<>
<
Tooltip
title=
"编辑角色"
className=
{
styles
.
fs
}
>
<
FormOutlined
style=
{
{
fontSize
:
'16px'
,
color
:
'#1890FF'
}
}
style=
{
{
fontSize
:
'16px'
,
color
:
'#1890FF'
,
marginTop
:
'5px'
}
}
onClick=
{
e
=>
editorUser
(
e
,
i
)
}
/>
</
Tooltip
>
<
Tooltip
title=
"删除角色"
className=
{
styles
.
fs
}
>
<
DeleteOutlined
style=
{
{
fontSize
:
'16px'
,
color
:
'#1890FF'
}
}
style=
{
{
fontSize
:
'16px'
,
color
:
'#1890FF'
,
marginTop
:
'5px'
}
}
onClick=
{
e
=>
deletesUser
(
e
,
i
)
}
/>
</
Tooltip
>
<
Tooltip
title=
"关联用户"
className=
{
styles
.
fs
}
>
<
UserAddOutlined
style=
{
{
fontSize
:
'16px'
,
color
:
'#1890FF'
}
}
style=
{
{
fontSize
:
'16px'
,
color
:
'#1890FF'
,
marginTop
:
'5px'
}
}
onClick=
{
e
=>
relevancyUser
(
e
,
i
)
}
/>
</
Tooltip
>
...
...
@@ -294,7 +294,7 @@ const SiteManage = () => {
{
!
i
.
roleID
&&
(
<
Tooltip
title=
"新增角色"
className=
{
styles
.
fs
}
>
<
PlusSquareOutlined
style=
{
{
fontSize
:
'16px'
,
color
:
'#1890FF'
}
}
style=
{
{
fontSize
:
'16px'
,
color
:
'#1890FF'
,
marginTop
:
'5px'
}
}
onClick=
{
e
=>
addsUser
(
e
,
i
)
}
/>
</
Tooltip
>
...
...
@@ -302,7 +302,7 @@ const SiteManage = () => {
{
i
.
groupflag
&&
(
<
Tooltip
title=
"编辑分组"
className=
{
styles
.
fs
}
>
<
EditOutlined
style=
{
{
fontSize
:
'16px'
,
color
:
'#1890FF'
}
}
style=
{
{
fontSize
:
'16px'
,
color
:
'#1890FF'
,
marginTop
:
'5px'
}
}
onClick=
{
e
=>
editorGroup
(
e
,
i
)
}
/>
</
Tooltip
>
...
...
@@ -348,19 +348,19 @@ const SiteManage = () => {
<>
<
Tooltip
title=
"编辑角色"
className=
{
styles
.
fs
}
>
<
FormOutlined
style=
{
{
fontSize
:
'16px'
,
color
:
'#1890FF'
}
}
style=
{
{
fontSize
:
'16px'
,
color
:
'#1890FF'
,
marginTop
:
'5px'
}
}
onClick=
{
e
=>
editorUser
(
e
,
itemRole
)
}
/>
</
Tooltip
>
<
Tooltip
title=
"删除角色"
className=
{
styles
.
fs
}
>
<
DeleteOutlined
style=
{
{
fontSize
:
'16px'
,
color
:
'#1890FF'
}
}
style=
{
{
fontSize
:
'16px'
,
color
:
'#1890FF'
,
marginTop
:
'5px'
}
}
onClick=
{
e
=>
deletesUser
(
e
,
itemRole
)
}
/>
</
Tooltip
>
<
Tooltip
title=
"关联用户"
className=
{
styles
.
fs
}
>
<
UserAddOutlined
style=
{
{
fontSize
:
'16px'
,
color
:
'#1890FF'
}
}
style=
{
{
fontSize
:
'16px'
,
color
:
'#1890FF'
,
marginTop
:
'5px'
}
}
onClick=
{
e
=>
relevancyUser
(
e
,
itemRole
)
}
/>
</
Tooltip
>
...
...
@@ -369,7 +369,7 @@ const SiteManage = () => {
{
!
itemRole
.
roleID
&&
(
<
Tooltip
title=
"新增角色"
className=
{
styles
.
fs
}
>
<
PlusSquareOutlined
style=
{
{
fontSize
:
'16px'
,
color
:
'#1890FF'
}
}
style=
{
{
fontSize
:
'16px'
,
color
:
'#1890FF'
,
marginTop
:
'5px'
}
}
onClick=
{
e
=>
addsUser
(
e
,
itemRole
)
}
/>
</
Tooltip
>
...
...
@@ -377,7 +377,7 @@ const SiteManage = () => {
{
itemRole
.
groupflag
&&
(
<
Tooltip
title=
"编辑分组"
className=
{
styles
.
fs
}
>
<
EditOutlined
style=
{
{
fontSize
:
'16px'
,
color
:
'#1890FF'
}
}
style=
{
{
fontSize
:
'16px'
,
color
:
'#1890FF'
,
marginTop
:
'5px'
}
}
onClick=
{
e
=>
editorGroup
(
e
,
itemRole
)
}
/>
</
Tooltip
>
...
...
@@ -397,19 +397,19 @@ const SiteManage = () => {
<>
<
Tooltip
title=
"编辑角色"
className=
{
styles
.
fs
}
>
<
FormOutlined
style=
{
{
fontSize
:
'16px'
,
color
:
'#1890FF'
}
}
style=
{
{
fontSize
:
'16px'
,
color
:
'#1890FF'
,
marginTop
:
'5px'
}
}
onClick=
{
e
=>
editorUser
(
e
,
item
)
}
/>
</
Tooltip
>
<
Tooltip
title=
"删除角色"
className=
{
styles
.
fs
}
>
<
DeleteOutlined
style=
{
{
fontSize
:
'16px'
,
color
:
'#1890FF'
}
}
style=
{
{
fontSize
:
'16px'
,
color
:
'#1890FF'
,
marginTop
:
'5px'
}
}
onClick=
{
e
=>
deletesUser
(
e
,
item
)
}
/>
</
Tooltip
>
<
Tooltip
title=
"关联用户"
className=
{
styles
.
fs
}
>
<
UserAddOutlined
style=
{
{
fontSize
:
'16px'
,
color
:
'#1890FF'
}
}
style=
{
{
fontSize
:
'16px'
,
color
:
'#1890FF'
,
marginTop
:
'5px'
}
}
onClick=
{
e
=>
relevancyUser
(
e
,
item
)
}
/>
</
Tooltip
>
...
...
@@ -418,7 +418,7 @@ const SiteManage = () => {
{
!
item
.
roleID
&&
(
<
Tooltip
title=
"新增角色"
className=
{
styles
.
fs
}
>
<
PlusSquareOutlined
style=
{
{
fontSize
:
'16px'
,
color
:
'#1890FF'
}
}
style=
{
{
fontSize
:
'16px'
,
color
:
'#1890FF'
,
marginTop
:
'5px'
}
}
onClick=
{
e
=>
addsUser
(
e
,
item
)
}
/>
</
Tooltip
>
...
...
@@ -426,7 +426,7 @@ const SiteManage = () => {
{
item
.
groupflag
&&
(
<
Tooltip
title=
"编辑分组"
className=
{
styles
.
fs
}
>
<
EditOutlined
style=
{
{
fontSize
:
'16px'
,
color
:
'#1890FF'
}
}
style=
{
{
fontSize
:
'16px'
,
color
:
'#1890FF'
,
marginTop
:
'5px'
}
}
onClick=
{
e
=>
editorGroup
(
e
,
item
)
}
/>
</
Tooltip
>
...
...
@@ -725,16 +725,16 @@ const SiteManage = () => {
[
styles
.
content
]:
true
,
})
}
>
<
Card
className=
{
classnames
({
[
styles
.
cardBox
]:
true
,
[
styles
.
hideBox
]:
!
mulu
,
})
}
<
Spin
tip=
"loading...."
spinning=
{
spinLoading
}
// style={{ margin: '20px auto ', display: 'block' }}
>
<
Spin
tip=
"loading...."
spinning=
{
spinLoading
}
style=
{
{
margin
:
'20px auto '
,
display
:
'block'
}
}
<
Card
className=
{
classnames
({
[
styles
.
cardBox
]:
true
,
[
styles
.
hideBox
]:
!
mulu
,
})
}
>
<
div
style=
{
{
marginLeft
:
'20px'
}
}
>
<
span
...
...
@@ -763,57 +763,58 @@ const SiteManage = () => {
/>
</
div
>
)
}
</
Spin
>
<
AddModal
visible=
{
modalVisible
}
onCancel=
{
()
=>
setModalVisible
(
false
)
}
itemObj=
{
itemObj
}
confirmModal=
{
confirmModal
}
siteList=
{
siteList
}
/>
<
DelModal
visible=
{
delVisible
}
itemObj=
{
itemObj
}
onCancel=
{
()
=>
setDelVisible
(
false
)
}
confirmModal=
{
delModal
}
/>
<
EditModal
visible=
{
editVisible
}
itemObj=
{
itemObj
}
onCancel=
{
()
=>
setEditVisible
(
false
)
}
confirmModal=
{
editModal
}
/>
<
EditGroup
visible=
{
groupVisible
}
itemObj=
{
itemObj
}
onCancel=
{
()
=>
setGroupVisible
(
false
)
}
confirmModal=
{
groupModal
}
/>
{
/* <UserModal
<
AddModal
visible=
{
modalVisible
}
onCancel=
{
()
=>
setModalVisible
(
false
)
}
itemObj=
{
itemObj
}
confirmModal=
{
confirmModal
}
siteList=
{
siteList
}
/>
<
DelModal
visible=
{
delVisible
}
itemObj=
{
itemObj
}
onCancel=
{
()
=>
setDelVisible
(
false
)
}
confirmModal=
{
delModal
}
/>
<
EditModal
visible=
{
editVisible
}
itemObj=
{
itemObj
}
onCancel=
{
()
=>
setEditVisible
(
false
)
}
confirmModal=
{
editModal
}
/>
<
EditGroup
visible=
{
groupVisible
}
itemObj=
{
itemObj
}
onCancel=
{
()
=>
setGroupVisible
(
false
)
}
confirmModal=
{
groupModal
}
/>
{
/* <UserModal
visible={userVisible}
itemObj={itemObj}
onCancel={() => setUserVisible(false)}
confirmModal={userModal}
/> */
}
<
SelectUser
visible=
{
userVisible
}
itemObj=
{
itemObj
}
onCancel=
{
()
=>
setUserVisible
(
false
)
}
confirmModal=
{
userModal
}
/>
<
div
className=
{
styles
.
switcher
}
>
{
mulu
&&
(
<
Tooltip
title=
"隐藏角色栏"
className=
{
styles
.
hide
}
>
<
DoubleLeftOutlined
onClick=
{
()
=>
handleHide
()
}
style=
{
{
marginLeft
:
'-5px'
}
}
/>
</
Tooltip
>
)
}
{
!
mulu
&&
(
<
Tooltip
title=
"显示角色栏"
className=
{
styles
.
hide
}
>
<
DoubleRightOutlined
onClick=
{
()
=>
handleHide
()
}
/>
</
Tooltip
>
)
}
</
div
>
</
Card
>
<
SelectUser
visible=
{
userVisible
}
itemObj=
{
itemObj
}
onCancel=
{
()
=>
setUserVisible
(
false
)
}
confirmModal=
{
userModal
}
/>
<
div
className=
{
styles
.
switcher
}
>
{
mulu
&&
(
<
Tooltip
title=
"隐藏角色栏"
className=
{
styles
.
hide
}
>
<
DoubleLeftOutlined
onClick=
{
()
=>
handleHide
()
}
style=
{
{
marginLeft
:
'-5px'
}
}
/>
</
Tooltip
>
)
}
{
!
mulu
&&
(
<
Tooltip
title=
"显示角色栏"
className=
{
styles
.
hide
}
>
<
DoubleRightOutlined
onClick=
{
()
=>
handleHide
()
}
/>
</
Tooltip
>
)
}
</
div
>
</
Card
>
</
Spin
>
<
div
className=
{
classnames
({
[
styles
.
boxR
]:
true
,
...
...
src/pages/userCenter/roleManage/RoleManage.less
View file @
4c31a407
...
...
@@ -4,7 +4,7 @@
overflow-y: scroll;
// overflow: auto;
overflow: hidden;
width:
41
0px;
width:
32
0px;
left: 0;
top: 0;
margin-right: 10px;
...
...
src/pages/userCenter/siteManage/SiteManage.jsx
View file @
4c31a407
...
...
@@ -771,83 +771,83 @@ const SiteManageV2 = () => {
<
Button
onClick=
{
restButton
}
>
重置
</
Button
>
</
Card
>
<
div
style=
{
{
background
:
'#fff'
}
}
>
<
Card
className=
{
classnames
({
[
styles
.
boxH
]:
treeVisible
,
[
styles
.
cardBoxR
]:
true
,
})
}
>
<
div
style=
{
{
display
:
'flex'
,
flexDirection
:
'column '
,
height
:
'calc(100vh - 240px)'
,
}
}
<
Spin
spinning=
{
checkLoading
}
tip=
"loading..."
>
<
Card
className=
{
classnames
({
[
styles
.
boxH
]:
treeVisible
,
[
styles
.
cardBoxR
]:
true
,
})
}
>
{
/* <Checkbox className={styles.siteAll}>全选/反选</Checkbox> */
}
{
dataList
.
length
>
0
&&
!
visibleParams
.
loading
?
(
<>
<
p
className=
{
styles
.
siteline
}
>
已选择列表:
</
p
>
<
div
className=
{
styles
.
siteSelectList
}
style=
{
{
height
:
selectedState
?
'1200px'
:
'220px'
,
transition
:
'height 0.5s'
,
}
}
>
<
ul
className=
{
styles
.
siteSelectUl
}
>
{
selectList
.
map
((
item
,
index
)
=>
(
<
li
key=
{
`${item.userName}${item.groupId}${index}`
}
onClick=
{
()
=>
handleDel
(
index
)
}
>
{
`${item.userName}(${item.groupName})`
}
</
li
>
))
}
</
ul
>
</
div
>
<
div
style=
{
{
textAlign
:
'center'
,
margin
:
'10px 0'
}
}
>
<
Tooltip
title=
"收起"
>
<
CaretUpOutlined
style=
{
{
fontSize
:
'20px'
,
color
:
'#178BF6'
,
display
:
selectedState
?
'block'
:
'none'
,
}
}
onClick=
{
()
=>
setSelectedState
(
false
)
}
/>
</
Tooltip
>
<
Tooltip
title=
"展开"
>
<
CaretDownOutlined
style=
{
{
fontSize
:
'20px'
,
color
:
'#178BF6'
,
display
:
selectedState
?
'none'
:
'block'
,
}
}
onClick=
{
()
=>
setSelectedState
(
true
)
}
/>
</
Tooltip
>
</
div
>
<
div
className=
{
styles
.
siteBtn
}
>
<
Button
type=
"primary"
className=
{
styles
.
siteCommit
}
onClick=
{
handleCommitBtn
}
>
提交
</
Button
>
</
div
>
</>
)
:
(
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
/>
)
}
<
div
style=
{
{
overflowY
:
'scroll'
,
flexGrow
:
'1'
,
display
:
'flex'
,
flexDirection
:
'column '
,
height
:
'calc(100vh - 240px)'
,
}
}
>
<
Spin
spinning=
{
checkLoading
}
tip=
"loading..."
>
{
/* <Checkbox className={styles.siteAll}>全选/反选</Checkbox> */
}
{
dataList
.
length
>
0
&&
!
visibleParams
.
loading
?
(
<>
<
p
className=
{
styles
.
siteline
}
>
已选择列表:
</
p
>
<
div
className=
{
styles
.
siteSelectList
}
style=
{
{
height
:
selectedState
?
'1200px'
:
'220px'
,
transition
:
'height 0.5s'
,
}
}
>
<
ul
className=
{
styles
.
siteSelectUl
}
>
{
selectList
.
map
((
item
,
index
)
=>
(
<
li
key=
{
`${item.userName}${item.groupId}${index}`
}
onClick=
{
()
=>
handleDel
(
index
)
}
>
{
`${item.userName}(${item.groupName})`
}
</
li
>
))
}
</
ul
>
</
div
>
<
div
style=
{
{
textAlign
:
'center'
,
margin
:
'10px 0'
}
}
>
<
Tooltip
title=
"收起"
>
<
CaretUpOutlined
style=
{
{
fontSize
:
'20px'
,
color
:
'#178BF6'
,
display
:
selectedState
?
'block'
:
'none'
,
}
}
onClick=
{
()
=>
setSelectedState
(
false
)
}
/>
</
Tooltip
>
<
Tooltip
title=
"展开"
>
<
CaretDownOutlined
style=
{
{
fontSize
:
'20px'
,
color
:
'#178BF6'
,
display
:
selectedState
?
'none'
:
'block'
,
}
}
onClick=
{
()
=>
setSelectedState
(
true
)
}
/>
</
Tooltip
>
</
div
>
<
div
className=
{
styles
.
siteBtn
}
>
<
Button
type=
"primary"
className=
{
styles
.
siteCommit
}
onClick=
{
handleCommitBtn
}
>
提交
</
Button
>
</
div
>
</>
)
:
(
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
/>
)
}
<
div
style=
{
{
overflowY
:
'scroll'
,
flexGrow
:
'1'
,
}
}
>
{
dataList
.
map
((
item
,
index
)
=>
(
<
Panels
{
...
item
}
...
...
@@ -858,10 +858,10 @@ const SiteManageV2 = () => {
handleChangeSignel=
{
handleChangeSignel
}
/>
))
}
</
Spin
>
</
div
>
</
div
>
</
div
>
</
Card
>
</
Card
>
</
Spin
>
{
dataList
.
length
>
0
&&
!
visibleParams
.
loading
?
(
<
div
style=
{
{
textAlign
:
'right'
,
marginTop
:
'25px'
}
}
>
<
Pagination
...
...
src/services/maintenance/api.js
View file @
4c31a407
/* eslint-disable camelcase */
/*
* @Description:
* @Author: leizhe
* @Date: 2021-09-27 09:42:21
* @LastEditTime: 202
1-09-27 16:49:28
* @LastEditTime: 202
2-04-19 14:56:50
* @LastEditors: leizhe
*/
import
{
CITY_SERVICE
,
get
,
PUBLISH_SERVICE
,
post
,
postForm
}
from
'../index'
;
...
...
@@ -26,3 +27,7 @@ export const CM_XWBPlan_RemovePlan = query =>
// 巡维保计划数据编辑OR添加
export
const
CM_XWBPlan_DataEditORAdd
=
data
=>
post
(
`
${
PUBLISH_SERVICE
}
/WorkOrderCenter/CM_XWBPlan_DataEditORAdd`
,
data
);
// 巡维保计划数据编辑OR添加
export
const
CM_XWBPlan_ChangeOrder
=
planIds
=>
post
(
`
${
PUBLISH_SERVICE
}
/WorkOrderCenter/CM_XWBPlan_ChangeOrder?planIds=
${
planIds
}
`
);
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