Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
frontend
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
Schedules
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
h5-communicate
frontend
Commits
d5afe82b
Commit
d5afe82b
authored
Jun 15, 2020
by
熊成伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug
parent
7936efea
Pipeline
#15383
passed with stages
in 57 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
145 additions
and
2 deletions
+145
-2
ChildAddress.jsx
src/components/AddressList/ChildAddress.jsx
+23
-0
ParentAddress.jsx
src/components/AddressList/ParentAddress.jsx
+21
-0
NewAddress.jsx
src/pages/Communicate/NewAddress.jsx
+45
-0
NewPage.jsx
src/pages/Communicate/NewPage.jsx
+50
-0
router.js
src/router.js
+6
-2
No files found.
src/components/AddressList/ChildAddress.jsx
0 → 100644
View file @
d5afe82b
import
React
from
'react'
;
import
'./index.less'
const
ChildAddress
=
props
=>
{
const
{
data
}
=
props
;
return
(
<
div
className=
"address-item-box"
>
{
data
&&
data
.
length
>
0
&&
data
.
map
((
item
,
index
)
=>
(
<
div
className=
"address-item"
key=
{
index
}
>
<
div
>
{
item
.
XM
||
''
}
</
div
>
<
div
className=
"address-user"
>
<
img
alt=
""
className=
'smallIco mr-5'
src=
'/img/tel.png'
/>
<
a
className=
"address-phone"
href=
{
item
.
YDDH
?
`tel:${item.YDDH}`
:
null
}
>
{
item
.
YDDH
||
'无'
}
</
a
>
</
div
>
</
div
>
))
}
</
div
>
)
};
export
default
ChildAddress
;
src/components/AddressList/ParentAddress.jsx
0 → 100644
View file @
d5afe82b
import
React
from
'react'
;
import
'./index.less'
const
ParentAddress
=
(
props
)
=>
{
const
{
data
,
onClick
}
=
props
;
console
.
log
(
data
)
return
(
<
div
className=
"address-box"
>
{
data
&&
data
.
length
>
0
&&
data
.
map
((
item
,
index
)
=>
(
<
div
key=
{
index
}
>
<
div
onClick=
{
()
=>
onClick
(
item
.
ID
,
item
.
HASUSER
)
}
className=
"address-item address-title"
>
{
item
.
NAME
||
''
}
<
img
src=
"/img/rarrow.png"
alt=
""
className=
{
`icon18 ${item.checked ? 'icon-checked' : 'icon-unchecked'}`
}
/>
</
div
>
</
div
>
))
}
</
div
>
);
};
export
default
ParentAddress
;
src/pages/Communicate/NewAddress.jsx
0 → 100644
View file @
d5afe82b
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
Document
from
'react-document-title'
import
ParentAddress
from
'../../components/AddressList/ParentAddress'
;
import
axiosRequest
from
'../../utils/request'
;
import
Skeleton
from
'../../components/Skeleton'
import
'./index.less'
import
Empty
from
'../Empty'
const
AddressBook
=
(
props
)
=>
{
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
data
,
setData
]
=
useState
([]);
useEffect
(()
=>
{
setLoading
(
true
);
axiosRequest
({
method
:
'post'
,
url
:
'/idtAppServiceV6/oApp/getChildDeptList'
,
}).
then
(
res
=>
{
setLoading
(
false
);
setData
(
res
)
});
},
[]);
const
moveParent
=
(
pId
,
HASUSER
)
=>
{
props
.
history
.
push
(
`/bord/address/
${
pId
}
/
${
HASUSER
}
`
)
}
return
(
<
Document
title=
"通讯录"
>
<
div
>
<
div
className=
'adMainBox'
>
{
loading
?
<
Skeleton
/>
:
(
data
.
length
>
0
?
(
<
ParentAddress
data=
{
data
}
onClick=
{
moveParent
}
/>
):
<
Empty
/>)
}
</
div
>
</
div
>
</
Document
>
);
};
export
default
AddressBook
;
src/pages/Communicate/NewPage.jsx
0 → 100644
View file @
d5afe82b
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
Document
from
'react-document-title'
import
ParentAddress
from
'../../components/AddressList/ParentAddress'
;
import
ChildAddress
from
'../../components/AddressList/ChildAddress'
;
import
axiosRequest
from
'../../utils/request'
;
import
Skeleton
from
'../../components/Skeleton'
import
'./index.less'
import
Empty
from
'../Empty'
const
NewPage
=
(
props
)
=>
{
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
data
,
setData
]
=
useState
([]);
const
{
pId
,
HASUSER
}
=
props
.
match
.
params
;
useEffect
(()
=>
{
setLoading
(
true
);
console
.
log
(
HASUSER
)
axiosRequest
({
method
:
'post'
,
url
:
HASUSER
===
'true'
?
`/idtAppServiceV6/oApp/getDeptUserList?deptId=
${
pId
}
`
:
`/idtAppServiceV6/oApp/getChildDeptList?pId=
${
pId
}
`
,
}).
then
(
res
=>
{
setLoading
(
false
);
setData
(
res
)
});
},
[
pId
]);
const
moveParent
=
(
pId
,
HASUSER
)
=>
{
props
.
history
.
push
(
`/bord/address/
${
pId
}
/
${
HASUSER
}
`
)
};
return
(
<
Document
title=
"通讯录"
>
<
div
>
<
div
className=
'adMainBox'
>
{
loading
?
<
Skeleton
/>
:
(
data
.
length
>
0
?
(
HASUSER
===
'true'
?
<
ChildAddress
data=
{
data
}
/>
:<
ParentAddress
data=
{
data
}
onClick=
{
moveParent
}
/>
):
<
Empty
/>)
}
</
div
>
</
div
>
</
Document
>
);
};
export
default
NewPage
;
src/router.js
View file @
d5afe82b
...
...
@@ -7,7 +7,9 @@ import Backlog from './pages/Backlog/Backlog'
import
Work
from
'./pages/Work/Work'
import
WorkDetail
from
'./pages/Work/WorkDetail'
import
Notice
from
'./pages/Notice/Notice'
import
AddressBook
from
'./pages/Communicate/AddressBook'
;
// import AddressBook from './pages/Communicate/AddressBook';
import
NewAddress
from
'./pages/Communicate/NewAddress'
;
import
NewPage
from
'./pages/Communicate/NewPage'
;
import
Process
from
'./pages/EventProcessing/Process'
import
SubmitDetail
from
'./pages/EventProcessing/SubmitDetail'
...
...
@@ -25,7 +27,9 @@ const ReactRouter = () => {
<
CommonLayout
>
<
Route
path
=
"/bord/backlog"
component
=
{
Backlog
}
/
>
<
Route
path
=
"/bord/work"
component
=
{
Work
}
/
>
<
Route
path
=
"/bord/addressList"
component
=
{
AddressBook
}
/
>
<
Route
path
=
"/bord/addressList"
component
=
{
NewAddress
}
/
>
<
Route
path
=
"/bord/address/:pId/:HASUSER"
component
=
{
NewPage
}
/
>
{
/*<Route path="/bord/addressList" component={AddressBook}/>*/
}
<
Route
path
=
"/bord/notice"
component
=
{
Notice
}
/
>
<
/CommonLayout
>
}
/
>
...
...
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