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
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
444 additions
and
143 deletions
+444
-143
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
+0
-0
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
+0
-0
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
This diff is collapsed.
Click to expand it.
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
This diff is collapsed.
Click to expand it.
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