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
6571e2d7
Commit
6571e2d7
authored
Dec 06, 2023
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '图片'
parent
056d356c
Pipeline
#82827
failed with stages
Changes
18
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
178 additions
and
188 deletions
+178
-188
.env
.env
+4
-3
警告.png
src/assets/images/common/警告.png
+0
-0
index.jsx
src/components/PersonnelSelector/index.jsx
+1
-1
TableView.jsx
...ages/bsmanager/base/tablemanager/components/TableView.jsx
+1
-0
maintenance.jsx
...s/bsmanager/patrolMaintenance/maintenance/maintenance.jsx
+6
-6
InitDataBase.jsx
src/pages/database/InitDataBase/InitDataBase.jsx
+0
-0
InitDataBase.less
src/pages/database/InitDataBase/InitDataBase.less
+9
-10
DatabaseConfig.jsx
src/pages/database/databaseConfig/DatabaseConfig.jsx
+6
-91
AddModal.jsx
src/pages/database/databaseConfig/mysqltable/AddModal.jsx
+11
-3
AddModal.jsx
src/pages/database/databaseConfig/oracle/AddModal.jsx
+11
-3
AddModal.jsx
src/pages/database/databaseConfig/sqlServer/AddModal.jsx
+11
-3
index.jsx
src/pages/homePage/index.jsx
+1
-0
EditModal.jsx
...nter/messageManage/projectManage/components/EditModal.jsx
+0
-1
index.jsx
src/pages/platformCenter/scheduledTasks/index.jsx
+38
-0
index.less
src/pages/productCenter/webConfig/index.less
+13
-14
TreeSelect.jsx
src/pages/productCenter/webConfig/menuconfig/TreeSelect.jsx
+1
-1
UserManage.jsx
src/pages/userCenter/userManage/UserManage.jsx
+63
-51
api.js
src/services/userManage/api.js
+2
-1
No files found.
.env
View file @
6571e2d7
# PUBLIC_PATH = reactOMS, 默认转发 /cityinterface
PROXY=/PandaGIS:http://192.168.1
0.167:8072;/PandaWorkFlow:http://192.168.10.167:8072;/PandaCore:http://192.168.10.167:8072;/Cityinterface:http://192.168.10.167:8072;/PandaOMS:http://192.168.10.167:8072;/Publish:http://192.168.10.167:8072;/Web4:http://192.168.10.167:8072;/CityTemp:http://192.168.10.167:8072
PROXY=/PandaGIS:http://192.168.1
2.178:8083;/PandaView:http://192.168.12.178:8083;/PandaMonitor:http://192.168.12.178:8083;/PandaWorkFlow:http://192.168.12.178:8083;/PandaCore:http://192.168.12.178:8083;/Cityinterface:http://192.168.12.178:8083;/PandaOMS:http://192.168.12.178:8083;/Publish:http://192.168.12.178:8083;/Web4:http://192.168.12.178:8083;/CityTemp:http://192.168.12.178:8083
# PROXY=/Cityinterface:http://192.168.12.121:8082;/PandaOMS:http://192.168.12.121:8082;/Web4:http://192.168.12.121:8082;/CityTemp:http://192.168.12.121:8082
# 可设置第二个代理,test为转发前缀,后面为代理转发的地址
# PROXY2 = test : http://localhost:8006/
# 本地应用启动的host域名
HOST = 192.168.12.
154
HOST = 192.168.12.
78
# 本地应用启动的端口
PORT = 3001
PORT = 3002
src/assets/images/common/警告.png
0 → 100644
View file @
6571e2d7
This diff was suppressed by a .gitattributes entry.
src/components/PersonnelSelector/index.jsx
View file @
6571e2d7
...
...
@@ -88,7 +88,7 @@ const SelectUser = props => {
// console.log(checkValueList);
let
listCheck
=
[];
console
.
log
(
checkValueList
);
debugger
debugger
;
checkValueList
&&
checkValueList
.
map
(
item
=>
{
let
data
=
item
.
userId
||
item
.
value
;
...
...
src/pages/bsmanager/base/tablemanager/components/TableView.jsx
View file @
6571e2d7
...
...
@@ -89,6 +89,7 @@ const EditableCell = ({
},
[
dataSource
]);
useEffect
(()
=>
{
console
.
log
(
inputRef
.
current
);
if
(
editing
&&
inputRef
.
current
)
{
inputRef
.
current
.
focus
();
}
...
...
src/pages/bsmanager/patrolMaintenance/maintenance/maintenance.jsx
View file @
6571e2d7
...
...
@@ -853,12 +853,12 @@ const maintenance = () => {
<
div
style=
{
{
height
:
'50px'
,
backgroundColor
:
'white'
}
}
>
<
div
className=
{
styles
.
tabs
}
>
<
div
className=
{
activeName
===
'
template
'
?
styles
.
active
:
''
}
className=
{
activeName
===
'
project
'
?
styles
.
active
:
''
}
onClick=
{
()
=>
{
setActiveName
(
'
template
'
);
setActiveName
(
'
project
'
);
}
}
>
维保模板
方案制定
</
div
>
<
div
className=
{
activeName
===
'configuration'
?
styles
.
active
:
''
}
...
...
@@ -867,12 +867,12 @@ const maintenance = () => {
设备库配置
</
div
>
<
div
className=
{
activeName
===
'
project
'
?
styles
.
active
:
''
}
className=
{
activeName
===
'
template
'
?
styles
.
active
:
''
}
onClick=
{
()
=>
{
setActiveName
(
'
project
'
);
setActiveName
(
'
template
'
);
}
}
>
方案制定
维保模板
</
div
>
</
div
>
<
span
...
...
src/pages/database/InitDataBase/InitDataBase.jsx
View file @
6571e2d7
This diff is collapsed.
Click to expand it.
src/pages/database/InitDataBase/InitDataBase.less
View file @
6571e2d7
...
...
@@ -2,8 +2,6 @@
font-size: 16px;
}
.tCenter {
text-align: center;
...
...
@@ -22,24 +20,26 @@
height: 70px;
}
.InitDataBaseContainer {
width: 100%;
height: 100%;
.ant-card-body {
padding-bottom: 0px !important;
}
.mgTop20 {
margin-top: 20px;
.cardTop {
height: 350px;
width: 100%;
}
.cardBottom {
height: calc(100% - 350px);
}
// .recordBox {
// height: calc(100% - 20px);
// }
}
.cardContainer {
...
...
@@ -113,4 +113,4 @@
.view:hover {
cursor: not-allowed;
}
}
\ No newline at end of file
}
src/pages/database/databaseConfig/DatabaseConfig.jsx
View file @
6571e2d7
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Card
,
Tabs
,
Form
,
Input
,
Button
,
notification
}
from
'antd'
;
import
{
CheckOutlined
,
CloseOutlined
}
from
'@ant-design/icons'
;
import
{
SaveMainServer
,
GetMainServer
,
DeleteMainServer
}
from
'@/services/database/api'
;
import
React
,
{
useEffect
}
from
'react'
;
import
{
Card
,
notification
}
from
'antd'
;
import
PageContainer
from
'@/components/BasePageContainer'
;
import
SQLServerTable
from
'./sqlServer/SQLServerTable'
;
import
DmTable
from
'./dm/DmTable'
;
import
OracleTable
from
'./oracle/OracleTable'
;
import
MongDBTable
from
'./mongDB/MongDBTable'
;
import
MySQLTable
from
'./mysqltable/MySQLTable'
;
import
MasterTable
from
'./master/MasterTable'
;
const
{
TabPane
}
=
Tabs
;
const
dataArr
=
[
{
title
:
'SQLServer数据库连接'
,
key
:
'0'
,
component
:
<
SQLServerTable
/>,
},
{
title
:
'Oracle数据库连接'
,
key
:
'1'
,
component
:
<
OracleTable
/>,
},
{
title
:
'MongoDB数据库连接'
,
key
:
'2'
,
component
:
<
MongDBTable
/>,
},
{
title
:
'MySQL数据库连接'
,
key
:
'3'
,
component
:
<
MySQLTable
/>,
},
];
const
Hr
=
()
=>
<
hr
style=
{
{
width
:
'calc( 100% - 40px)'
}
}
/>;
const
DatabaseConnectConfig
=
props
=>
{
const
[
form
]
=
Form
.
useForm
();
const
[
flag
,
setFlag
]
=
useState
(
false
);
const
[
active
,
setActive
]
=
useState
(
'0'
);
const
[
isLink
,
setIsLink
]
=
useState
(
false
);
//主站配置是否连接
useEffect
(()
=>
{
getData
();
},
[]);
const
handleChange
=
e
=>
{
setActive
(
e
);
};
const
getData
=
()
=>
{
GetMainServer
().
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
form
.
setFieldsValue
({
url
:
res
.
data
});
// if (res.data) {
// setIsLink(true);
// form.setFieldsValue({ url: res.data });
// } else {
// setIsLink(false);
// form.setFieldsValue({ url: window.location.origin });
// }
}
});
};
const
deleteConfig
=
()
=>
{
DeleteMainServer
().
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
notification
.
success
({
message
:
'提示'
,
duration
:
3
,
description
:
'删除成功'
});
getData
();
}
else
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
res
.
msg
});
}
});
};
// 提交主站配置
const
onFinish
=
values
=>
{
console
.
log
(
'Success:'
,
values
);
SaveMainServer
(
values
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
notification
.
success
({
message
:
'提示'
,
duration
:
3
,
description
:
'保存成功'
,
});
getData
();
}
else
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
res
.
msg
,
});
}
});
};
return
(
<
PageContainer
>
<
div
style=
{
{
width
:
'100%'
,
height
:
'100%'
,
overflowY
:
'scroll'
}
}
>
<
Card
>
{
/* <Tabs activeKey={active} onChange={e => handleChange(e)}>
{dataArr.map(item => (
<TabPane tab={item.title} key={item.key}>
{active === item.key && item.component}
</TabPane>
))}
</Tabs> */
}
<
div
style=
{
{
marginBottom
:
'15px'
}
}
>
<
SQLServerTable
/>
</
div
>
<
div
style=
{
{
marginBottom
:
'15px'
}
}
>
<
DmTable
/>
</
div
>
<
div
style=
{
{
marginBottom
:
'15px'
}
}
>
<
OracleTable
/>
</
div
>
...
...
src/pages/database/databaseConfig/mysqltable/AddModal.jsx
View file @
6571e2d7
...
...
@@ -42,11 +42,15 @@ const AddModal = props => {
if
(
validate
)
{
setLoading
(
true
);
let
obj
=
form
.
getFieldsValue
();
let
pwd
=
Decrypt
(
obj
.
password
)
===
''
||
Decrypt
(
obj
.
password
).
indexOf
(
'
\
u0004'
)
!==
-
1
?
Encrypt
(
obj
.
password
)
:
obj
.
password
;
if
(
type
===
'add'
)
{
AddConnString
({
type
:
'mysql'
,
...
obj
,
password
:
Encrypt
(
obj
.
password
)
,
password
:
pwd
,
})
.
then
(
res
=>
{
setLoading
(
false
);
...
...
@@ -78,11 +82,15 @@ const AddModal = props => {
};
const
handleEdit
=
()
=>
{
let
obj
=
form
.
getFieldsValue
();
let
pwd
=
Decrypt
(
obj
.
password
)
===
''
||
Decrypt
(
obj
.
password
).
indexOf
(
'
\
u0004'
)
!==
-
1
?
Encrypt
(
obj
.
password
)
:
obj
.
password
;
EditConnString
({
type
:
'mysql'
,
...
obj
,
oldName
:
formObj
.
name
,
password
:
Encrypt
(
obj
.
password
)
,
password
:
pwd
,
})
.
then
(
res
=>
{
setLoading
(
false
);
...
...
@@ -112,7 +120,7 @@ const AddModal = props => {
form
.
setFieldsValue
({
port
:
3306
});
break
;
case
'edit'
:
form
.
setFieldsValue
({
...
formObj
,
password
:
Decrypt
(
formObj
.
password
)
});
form
.
setFieldsValue
({
...
formObj
,
password
:
formObj
.
password
});
if
(
!
formObj
.
port
)
{
form
.
setFieldsValue
({
port
:
3306
});
}
...
...
src/pages/database/databaseConfig/oracle/AddModal.jsx
View file @
6571e2d7
...
...
@@ -42,11 +42,15 @@ const AddModal = props => {
if
(
validate
)
{
setLoading
(
true
);
let
obj
=
form
.
getFieldsValue
();
let
pwd
=
Decrypt
(
obj
.
password
)
===
''
||
Decrypt
(
obj
.
password
).
indexOf
(
'
\
u0004'
)
!==
-
1
?
Encrypt
(
obj
.
password
)
:
obj
.
password
;
if
(
type
===
'add'
)
{
AddConnString
({
...
obj
,
type
:
'oracle'
,
password
:
Encrypt
(
obj
.
password
)
,
password
:
pwd
,
})
.
then
(
res
=>
{
setLoading
(
false
);
...
...
@@ -78,11 +82,15 @@ const AddModal = props => {
};
const
handleEdit
=
()
=>
{
let
obj
=
form
.
getFieldsValue
();
let
pwd
=
Decrypt
(
obj
.
password
)
===
''
||
Decrypt
(
obj
.
password
).
indexOf
(
'
\
u0004'
)
!==
-
1
?
Encrypt
(
obj
.
password
)
:
obj
.
password
;
EditConnString
({
type
:
'oracle'
,
...
obj
,
oldName
:
formObj
.
name
,
password
:
Encrypt
(
obj
.
password
)
,
password
:
pwd
,
})
.
then
(
res
=>
{
setLoading
(
false
);
...
...
@@ -111,7 +119,7 @@ const AddModal = props => {
form
.
resetFields
();
break
;
case
'edit'
:
form
.
setFieldsValue
({
...
formObj
,
password
:
Decrypt
(
formObj
.
password
)
});
form
.
setFieldsValue
({
...
formObj
,
password
:
formObj
.
password
});
break
;
default
:
break
;
...
...
src/pages/database/databaseConfig/sqlServer/AddModal.jsx
View file @
6571e2d7
...
...
@@ -42,11 +42,15 @@ const AddModal = props => {
if
(
validate
)
{
setLoading
(
true
);
let
obj
=
form
.
getFieldsValue
();
let
pwd
=
Decrypt
(
obj
.
password
)
===
''
||
Decrypt
(
obj
.
password
).
indexOf
(
'
\
u0004'
)
!==
-
1
?
Encrypt
(
obj
.
password
)
:
obj
.
password
;
if
(
type
===
'add'
)
{
AddConnString
({
...
obj
,
type
:
'sqlserver'
,
password
:
Encrypt
(
obj
.
password
)
,
password
:
pwd
,
})
.
then
(
res
=>
{
setLoading
(
false
);
...
...
@@ -78,11 +82,15 @@ const AddModal = props => {
};
const
handleEdit
=
()
=>
{
let
obj
=
form
.
getFieldsValue
();
let
pwd
=
Decrypt
(
obj
.
password
)
===
''
||
Decrypt
(
obj
.
password
).
indexOf
(
'
\
u0004'
)
!==
-
1
?
Encrypt
(
obj
.
password
)
:
obj
.
password
;
EditConnString
({
...
obj
,
oldName
:
formObj
.
name
,
type
:
'sqlserver'
,
password
:
Encrypt
(
obj
.
password
)
,
password
:
pwd
,
})
.
then
(
res
=>
{
setLoading
(
false
);
...
...
@@ -111,7 +119,7 @@ const AddModal = props => {
form
.
resetFields
();
break
;
case
'edit'
:
form
.
setFieldsValue
({
...
formObj
,
password
:
Decrypt
(
formObj
.
password
)
});
form
.
setFieldsValue
({
...
formObj
,
password
:
formObj
.
password
});
break
;
default
:
break
;
...
...
src/pages/homePage/index.jsx
View file @
6571e2d7
...
...
@@ -275,6 +275,7 @@ const HomePage = () => {
dbName
:
str
.
dbName
,
userName
:
str
.
userName
,
password
:
str
.
password
,
providerType
:
str
.
providerType
,
})
.
then
(
res
=>
{
setLoadingDatabase
(
false
);
...
...
src/pages/platformCenter/messageManage/projectManage/components/EditModal.jsx
View file @
6571e2d7
...
...
@@ -333,7 +333,6 @@ const EditModal = props => {
<
Item
label=
"功能路径"
name=
"web_path"
>
<
Input
placeholder=
"请输入功能路径"
/>
</
Item
>
</
div
>
</
div
>
)
}
...
...
src/pages/platformCenter/scheduledTasks/index.jsx
View file @
6571e2d7
...
...
@@ -35,6 +35,7 @@ import {
import
AddModal
from
'./components/AddModal'
;
import
LookModal
from
'./components/LookModal'
;
import
PushTest
from
'./components/PushTest/PushTest'
;
import
logWorker
from
'./components/logWorker'
;
const
{
Option
}
=
Select
;
let
timer
=
null
;
...
...
@@ -54,6 +55,7 @@ const ScheduledTasks = () => {
const
listRef
=
useRef
();
const
[
logList
,
setLogList
]
=
useState
([]);
const
keepLength
=
useRef
(
0
);
const
[
loadingLog
,
setLoadingLog
]
=
useState
(
false
);
const
columns
=
[
{
...
...
@@ -183,14 +185,50 @@ const ScheduledTasks = () => {
getTableList
();
setColumnsData
(
columns
);
getIISAgentLog
();
updateInfo
();
return
()
=>
{
clearInterval
(
timer
);
timer
=
null
;
};
},
[]);
const
updateInfo
=
()
=>
{
let
worker
=
new
Worker
(
'logWorker'
);
debugger
;
worker
.
onmessage
=
m
=>
{
debugger
;
console
.
log
(
m
);
};
debugger
;
worker
.
postMessage
(
'123'
);
};
// updateInfo(payload={}){
// debugger
// this._updateInfo(payload);
// let worker = new Worker(worker, {name: 'myWorker'});
// const {pressions} = payload;
// worker.onmessage = (event) =>{
// debugger
// const { routeMap={}, codeMap = {}} = event.data;
// console.log(routeMap, "routeMap", event.data);
// this.updateRouteMap(routeMap);
// this.updateCodeMap(codeMap);
// worker.terminate();
// }
// if(pressions&&pressions.length>0){
// debugger
// worker.postMessage(pressions);
// }
// }
const
getIISAgentLog
=
()
=>
{
if
(
loadingLog
)
{
return
;
}
setLoadingLog
(
true
);
GetIISAgentLog
().
then
(
res
=>
{
setLoadingLog
(
false
);
if
(
res
.
code
===
0
)
{
let
arr
=
[];
let
list
=
res
.
data
...
...
src/pages/productCenter/webConfig/index.less
View file @
6571e2d7
...
...
@@ -20,7 +20,7 @@
}
}
.ant-tabs-content-holder
>
.ant-tabs-content.ant-tabs-content-top {
.ant-tabs-content-holder
>
.ant-tabs-content.ant-tabs-content-top {
position: absolute;
width: 100%;
// height: calc(100% - 40px);
...
...
@@ -39,28 +39,28 @@
}
}
.webConfigContainer
>
.ant-tabs-card .ant-tabs-content {
.webConfigContainer
>
.ant-tabs-card .ant-tabs-content {
height: 100%;
margin-top: -16px;
}
.webConfigContainer
>.ant-tabs-card .ant-tabs-content>
.ant-tabs-tabpane {
.webConfigContainer
> .ant-tabs-card .ant-tabs-content >
.ant-tabs-tabpane {
background: #fff;
padding: 16px;
}
.webConfigContainer
>.ant-tabs-card>
.ant-tabs-nav::before {
.webConfigContainer
> .ant-tabs-card >
.ant-tabs-nav::before {
display: none;
}
.webConfigContainer
>
.ant-tabs-card .ant-tabs-tab,
[data-theme='compact'] .webConfigContainer
>
.ant-tabs-card .ant-tabs-tab {
.webConfigContainer
>
.ant-tabs-card .ant-tabs-tab,
[data-theme='compact'] .webConfigContainer
>
.ant-tabs-card .ant-tabs-tab {
border-color: transparent;
background: transparent;
}
.webConfigContainer
>
.ant-tabs-card .ant-tabs-tab-active,
[data-theme='compact'] .webConfigContainer
>
.ant-tabs-card .ant-tabs-tab-active {
.webConfigContainer
>
.ant-tabs-card .ant-tabs-tab-active,
[data-theme='compact'] .webConfigContainer
>
.ant-tabs-card .ant-tabs-tab-active {
border-color: #fff;
background: #fff;
}
...
...
@@ -71,12 +71,12 @@
padding: 24px;
}
[data-theme='compact'] .webConfigContainer
>
.ant-tabs-card .ant-tabs-content {
[data-theme='compact'] .webConfigContainer
>
.ant-tabs-card .ant-tabs-content {
height: 120px;
margin-top: -8px;
}
[data-theme='dark'] .webConfigContainer
>
.ant-tabs-card .ant-tabs-tab {
[data-theme='dark'] .webConfigContainer
>
.ant-tabs-card .ant-tabs-tab {
border-color: transparent;
background: transparent;
}
...
...
@@ -85,11 +85,11 @@
background: #000;
}
[data-theme='dark'] .webConfigContainer
>.ant-tabs-card .ant-tabs-content>
.ant-tabs-tabpane {
[data-theme='dark'] .webConfigContainer
> .ant-tabs-card .ant-tabs-content >
.ant-tabs-tabpane {
background: #141414;
}
[data-theme='dark'] .webConfigContainer
>
.ant-tabs-card .ant-tabs-tab-active {
[data-theme='dark'] .webConfigContainer
>
.ant-tabs-card .ant-tabs-tab-active {
border-color: #141414;
background: #141414;
}
\ No newline at end of file
}
src/pages/productCenter/webConfig/menuconfig/TreeSelect.jsx
View file @
6571e2d7
...
...
@@ -116,6 +116,7 @@ const TreeSelect = (props, ref) => {
}
let
keys
=
new
Set
([]);
let
list
=
lodash
.
cloneDeep
(
menuWebList
).
filter
(
item
=>
{
console
.
log
(
item
);
keys
.
add
(
item
.
model
);
keys
.
add
(
item
.
moduleName
+
item
.
model
);
return
item
.
shortName
.
includes
(
val
)
||
item
.
path
?.
includes
(
val
)
||
val
?.
includes
(
item
.
path
);
...
...
@@ -125,7 +126,6 @@ const TreeSelect = (props, ref) => {
let
tree
=
arrayToTree
(
list
,
'model'
,
'moduleName'
);
console
.
log
(
menuWebList
);
console
.
log
(
tree
);
debugger
;
setTreeList
(
tree
);
};
const
changeValue
=
e
=>
{
...
...
src/pages/userCenter/userManage/UserManage.jsx
View file @
6571e2d7
...
...
@@ -539,7 +539,6 @@ const UserManage = () => {
useEffect
(()
=>
{
setExpendKey
(
menuID
);
console
.
log
(
expendKey
);
},
[
menuID
]);
// 获取用户机构树
useEffect
(()
=>
{
...
...
@@ -643,8 +642,6 @@ const UserManage = () => {
const
rowSelection
=
{
selectedRowKeys
,
onChange
:
(
RowKeys
,
Rows
)
=>
{
console
.
log
(
RowKeys
);
console
.
log
(
Rows
);
setSelectedRowKeys
(
RowKeys
);
getCheckList
(
RowKeys
);
setUserIDs
(
RowKeys
.
toString
());
// 数组转字符串,逗号连接
...
...
@@ -1037,8 +1034,6 @@ const UserManage = () => {
// 删除机构
const
deleteOrg
=
()
=>
{
setDeleteOrgVisible
(
true
);
console
.
log
(
orgID
);
console
.
log
(
keep1
);
if
(
orgID
.
id
==
keep1
)
{
setTreeState
(
true
);
}
else
{
...
...
@@ -1082,7 +1077,6 @@ const UserManage = () => {
const
relateRole
=
record
=>
{
// getEmptyRoleList(record.userId);
setMult
(
'No'
);
console
.
log
(
record
);
getRoleList
(
record
);
setRoleVisible
(
true
);
setCurrentUser
(
record
);
...
...
@@ -1110,12 +1104,10 @@ const UserManage = () => {
};
// 冻结用户
const
freezeUser
=
record
=>
{
console
.
log
(
currentUser
);
// setFreezeUserVisible(true);
setCurrentUser
(
record
);
setSelectColor
(
record
);
let
state
=
''
;
console
.
log
(
record
);
if
(
record
.
state
===
'0'
||
record
.
state
===
null
)
{
state
=
'1'
;
}
else
{
...
...
@@ -1145,7 +1137,6 @@ const UserManage = () => {
};
// 删除用户
const
deleteUser
=
record
=>
{
console
.
log
(
record
.
userName
);
setCurrentUser
(
record
.
userName
);
setSelectColor
(
record
);
DeleteUserNew
({
...
...
@@ -1222,30 +1213,73 @@ const UserManage = () => {
}
setTableLoading
(
true
);
let
data
=
searchWord
!=
''
?
{
key
:
searchWord
}
:
''
;
GetUserByKeyNew
(
data
)
// GetUserByKeyNew(data)
// .then(res => {
// setSearchFlag(1);
// setTableLoading(false);
// if (res.code === 0) {
// setTotalSearch(res.data.length);
// setSelectedRowKeys([]); // 重置选中用户数
// setCurrentOrgOperate(true); // 禁止当前机构操作
// setMultiOperate(true); // 禁用批量操作
// setOrgTitle('全部机构搜索结果'); // 设置表头
// setCurrentSelectOrg('-1'); // 清空选中机构
// setShowSearchStyle(true);
// setTableData(res.data);
// setTableLength(res.data.length);
// } else {
// notification.error({
// message: '提示',
// duration: 3,
// description: res.msg,
// });
// }
// })
// .catch(err => {
// message.error(err);
// });
getOneOUUserListNew
(
0
,
pageSize
,
1
,
searchWord
)
.
then
(
res
=>
{
setSearchFlag
(
1
);
setTableLoading
(
false
);
if
(
res
.
code
===
0
)
{
setTotal
Search
(
res
.
data
.
length
);
setTotal
(
res
.
data
.
count
);
setSelectedRowKeys
([]);
// 重置选中用户数
setCurrentOrgOperate
(
true
);
// 禁止当前机构操作
setMultiOperate
(
true
);
// 禁用批量操作
setOrgTitle
(
'全部机构搜索结果'
);
// 设置表头
setCurrentSelectOrg
(
'-1'
);
// 清空选中机构
console
.
log
(
res
.
data
);
setShowSearchStyle
(
true
);
setTableData
(
res
.
data
);
setTableLength
(
res
.
data
.
length
);
// 返回用户表数据结构处理,扁平化
let
temp
=
res
.
data
.
data
;
// 设置过滤字段
let
arr
=
temp
.
map
(
item
=>
item
.
groupName
);
arr
=
arr
.
filter
((
value
,
index
)
=>
arr
.
indexOf
(
value
)
===
index
);
setOrgFilters
(
arr
.
map
(
item
=>
({
text
:
item
,
value
:
item
})));
setTableLength
(
temp
.
length
);
let
datalist
=
[];
const
table
=
temp
.
map
((
item
,
index
)
=>
{
if
(
item
.
loginName
==
'panda'
||
item
.
loginName
==
'admin'
)
{
datalist
.
push
(
item
.
userId
);
}
item
.
key
=
index
;
return
item
;
});
setKeepDataList
(
datalist
);
setTableData
(
table
);
}
else
{
setTableLoading
(
false
);
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
message
:
'获取失败'
,
description
:
res
.
msg
,
});
}
})
.
catch
(
err
=>
{
setTableLoading
(
false
);
message
.
error
(
err
);
});
};
...
...
@@ -1256,16 +1290,12 @@ const UserManage = () => {
setLoading
(
true
);
GetUserRelationListNew
({
userId
:
e
.
userId
})
.
then
(
res
=>
{
console
.
log
(
111
);
if
(
res
.
code
===
0
)
{
const
{
roleList
,
stationList
}
=
res
.
data
;
console
.
log
(
roleList
);
setRolelist
(
roleList
);
setStationlist
(
stationList
);
setLoading
(
false
);
}
else
{
console
.
log
(
res
);
setLoading
(
false
);
}
})
...
...
@@ -1280,14 +1310,12 @@ const UserManage = () => {
setLoading
(
true
);
GetUserRelationListNew
({
userId
:
0
})
.
then
(
res
=>
{
console
.
log
(
222
);
if
(
res
.
code
===
0
)
{
const
{
roleList
,
stationList
}
=
res
.
data
;
setRolelist
(
roleList
);
setStationlist
(
stationList
);
setLoading
(
false
);
}
else
{
console
.
log
(
res
.
msg
);
setLoading
(
false
);
}
})
...
...
@@ -1299,7 +1327,6 @@ const UserManage = () => {
};
const
getCheckList
=
e
=>
{
console
.
log
(
e
);
let
aa
=
[];
let
bb
=
[];
loadAllUserRole
(
e
).
then
(
res
=>
{
...
...
@@ -1316,8 +1343,6 @@ const UserManage = () => {
bb
.
push
(
item1
);
});
}
console
.
log
(
aa
);
console
.
log
(
bb
);
setMultiRoleList
(
aa
);
setMultiStationList
(
bb
);
}
...
...
@@ -1346,7 +1371,6 @@ const UserManage = () => {
// .catch(err => {
// message.error(err);
// });
console
.
log
(
currentUser
);
JumpToAnotherOUNew
({
userId
:
currentUser
.
userId
,
oldOUID
:
currentUser
.
groupId
,
...
...
@@ -1488,12 +1512,10 @@ const UserManage = () => {
keepDataList
.
length
>
0
&&
keepDataList
.
map
(
i
=>
{
let
aa
=
userIDs
.
split
(
','
).
indexOf
(
i
);
console
.
log
(
aa
);
if
(
aa
!==
-
1
)
{
data
.
push
(
aa
);
}
});
console
.
log
(
data
);
if
(
data
.
length
>
0
)
{
notification
.
error
({
message
:
'操作失败'
,
...
...
@@ -1557,10 +1579,6 @@ const UserManage = () => {
// 更改机构范围
const
submitExtent
=
(
extent
,
areaName
,
flags
)
=>
{
setTreeLoading
(
true
);
console
.
log
(
extent
);
console
.
log
(
areaName
);
console
.
log
(
flags
);
console
.
log
(
currentSelectOrg1
);
if
(
flags
===
0
)
{
setTreeLoading
(
false
);
notification
.
warn
({
...
...
@@ -1599,15 +1617,12 @@ const UserManage = () => {
};
// 树的拖拽
const
handleDrop
=
infos
=>
{
console
.
log
(
infos
);
const
dropKey
=
infos
.
node
.
key
;
const
dragKey
=
infos
.
dragNode
.
key
;
const
dropPos
=
infos
.
node
.
pos
.
split
(
'-'
);
const
dropPosition
=
infos
.
dropPosition
-
Number
(
dropPos
[
dropPos
.
length
-
1
]);
const
datas
=
JSON
.
parse
(
JSON
.
stringify
(
treeData
));
console
.
log
(
dropKey
,
'dropKey'
);
console
.
log
(
dragKey
,
'dragKey'
);
// 找到拖拽的元素
let
dragObj
;
let
dropObj
;
...
...
@@ -1624,7 +1639,6 @@ const UserManage = () => {
});
// 将节点插入到正确的位置
if
(
!
infos
.
dropToGap
)
{
console
.
log
(
'33333333333'
);
dropObj
.
children
=
dropObj
.
children
||
[];
// 在哪里插入,示例添加到头部,可以是随意位置
dropObj
.
children
.
unshift
(
dragObj
);
...
...
@@ -1898,21 +1912,19 @@ const UserManage = () => {
marginRight
:
'5px'
,
}
}
>
{
searchFlag
===
0
&&
(
<
Pagination
total=
{
total
}
showTotal=
{
(
totals
,
range
)
=>
`第${range[0]}-${range[1]} 条/共 ${totals} 条`
}
defaultPageSize=
{
pageSize
}
defaultCurrent=
{
1
}
showSizeChanger
pageSizeOptions=
{
[
10
,
20
,
50
,
100
]
}
current=
{
currentPage
}
onChange=
{
paginationChange
}
style=
{
{
marginBottom
:
'10px'
}
}
size=
"small"
showQuickJumper
/>
)
}
<
Pagination
total=
{
total
}
showTotal=
{
(
totals
,
range
)
=>
`第${range[0]}-${range[1]} 条/共 ${totals} 条`
}
defaultPageSize=
{
pageSize
}
defaultCurrent=
{
1
}
showSizeChanger
pageSizeOptions=
{
[
10
,
20
,
50
,
100
]
}
current=
{
currentPage
}
onChange=
{
paginationChange
}
style=
{
{
marginBottom
:
'10px'
}
}
size=
"small"
showQuickJumper
/>
</
div
>
</
div
>
...
...
src/services/userManage/api.js
View file @
6571e2d7
...
...
@@ -15,11 +15,12 @@ export const getUserTree = (selectOU, node) =>
// OUID,
// });
export
const
getOneOUUserListNew
=
(
OUID
,
size
,
index
)
=>
export
const
getOneOUUserListNew
=
(
OUID
,
size
,
index
,
keywords
)
=>
get
(
`
${
PUBLISH_SERVICE
}
/UserCenter/GroupUserList`
,
{
groupId
:
OUID
,
pageSize
:
size
,
pageIndex
:
index
,
key
:
keywords
,
});
/**
...
...
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