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
3da7408a
Commit
3da7408a
authored
Jun 08, 2020
by
thh
Browse files
Options
Browse Files
Download
Plain Diff
update
parents
e9f7a39c
67405196
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
507 additions
and
307 deletions
+507
-307
workspace.xml
.idea/workspace.xml
+0
-0
footer-work-s.png
public/img/footer-work-s.png
+0
-0
footer-work.png
public/img/footer-work.png
+0
-0
report.20200606.164659.17716.0.001.json
report.20200606.164659.17716.0.001.json
+0
-0
index.jsx
src/components/AddressList/index.jsx
+20
-0
index.less
src/components/AddressList/index.less
+13
-0
index.jsx
src/components/BlankTabs/index.jsx
+0
-0
index.less
src/components/BlankTabs/index.less
+0
-0
index.jsx
src/components/LogCard/index.jsx
+1
-1
index.less
src/components/LogCard/index.less
+4
-1
index.jsx
src/components/NoticeTab/index.jsx
+1
-1
index.less
src/components/NoticeTab/index.less
+0
-0
index.jsx
src/components/StepCard/index.jsx
+1
-1
index.jsx
src/components/Steps/index.jsx
+0
-18
index.less
src/components/Steps/index.less
+0
-5
index.jsx
src/components/TopSearch/index.jsx
+21
-24
CardItem.jsx
src/components/WorkCard/CardItem.jsx
+37
-46
index.jsx
src/components/WorkCard/index.jsx
+33
-34
CommonLayout.jsx
src/layout/CommonLayout.jsx
+55
-12
Footer.jsx
src/layout/Footer.jsx
+1
-2
index.less
src/layout/index.less
+9
-1
Backlog.jsx
src/pages/Backlog/Backlog.jsx
+28
-32
Communicate.jsx
src/pages/Communicate/Communicate.jsx
+79
-0
index.less
src/pages/Communicate/index.less
+66
-0
Process.jsx
src/pages/EventProcessing/Process.jsx
+106
-103
SubmitDetail.jsx
src/pages/EventProcessing/SubmitDetail.jsx
+6
-0
index.jsx
src/pages/Login/index.jsx
+1
-0
Notice.jsx
src/pages/Notice/Notice.jsx
+20
-25
router.js
src/router.js
+5
-1
No files found.
.idea/workspace.xml
View file @
3da7408a
This diff is collapsed.
Click to expand it.
public/img/footer-work-s.png
View replaced file @
e9f7a39c
View file @
3da7408a
2.45 KB
|
W:
|
H:
754 Bytes
|
W:
|
H:
2-up
Swipe
Onion skin
public/img/footer-work.png
View replaced file @
e9f7a39c
View file @
3da7408a
1.59 KB
|
W:
|
H:
751 Bytes
|
W:
|
H:
2-up
Swipe
Onion skin
report.20200606.164659.17716.0.001.json
deleted
100644 → 0
View file @
e9f7a39c
This diff is collapsed.
Click to expand it.
src/components/AddressList/index.jsx
0 → 100644
View file @
3da7408a
import
React
from
'react'
;
import
'./index.less'
const
data
=
[{},
{},
{},
{}]
const
Index
=
()
=>
{
return
(
<
div
className=
"address-box"
>
{
data
.
map
((
item
,
index
)
=>
(
<
div
className=
"address-item"
>
cccc
<
img
src=
"/img/rarrow.png"
alt=
""
className=
'icon18'
/>
</
div
>
))
}
</
div
>
);
};
export
default
Index
;
src/components/AddressList/index.less
0 → 100644
View file @
3da7408a
.address-item{
display: flex;
justify-content: space-between;
padding: 15px;
margin-bottom: 1px;
background: #ffffff;
}
.address-box > .address-item:first-child{
border-radius: 6px 6px 0 0;
}
.address-box > .address-item:last-child{
border-radius: 0 0 6px 6px;
}
src/components/
Top
Tabs/index.jsx
→
src/components/
Blank
Tabs/index.jsx
View file @
3da7408a
File moved
src/components/
Top
Tabs/index.less
→
src/components/
Blank
Tabs/index.less
View file @
3da7408a
File moved
src/components/
Todo
Card/index.jsx
→
src/components/
Log
Card/index.jsx
View file @
3da7408a
...
...
@@ -3,7 +3,7 @@ import './index.less'
const
Index
=
(
props
)
=>
{
return
(
<
div
className=
"todo-card"
onClick=
{
props
.
onC
L
ick
}
>
<
div
className=
"todo-card"
onClick=
{
props
.
onC
l
ick
}
>
<
div
className=
"todo-title pos-aline"
>
<
div
className=
"pos-aline"
>
<
div
className=
"todo-tag pos-aline"
>
...
...
src/components/
Todo
Card/index.less
→
src/components/
Log
Card/index.less
View file @
3da7408a
@import '../../variable.less';
.todo-card{
}
...
...
@@ -13,7 +15,7 @@
height: 18px;
font-size: 9px;
padding: 0 5px;
background:
#2087ED
;
background:
@primary
;
color: #ffffff;
border-radius:3px;
}
...
...
@@ -39,6 +41,7 @@
.todo-footer{
display: flex;
justify-content: space-between;
align-items: center;
padding: 15px 15px;
background:rgba(255,255,255,1);
border-radius: 0 0 6px 6px;
...
...
src/components/
TopNotice
/index.jsx
→
src/components/
NoticeTab
/index.jsx
View file @
3da7408a
...
...
@@ -7,7 +7,7 @@ const tabs = [
{
title
:
'未读'
,
sub
:
'2'
},
]
const
Index
=
()
=>
{
const
Index
=
(
props
)
=>
{
return
(
<
div
className=
"pos-line"
>
<
div
className=
"search-notice-box"
>
...
...
src/components/
TopNotice
/index.less
→
src/components/
NoticeTab
/index.less
View file @
3da7408a
File moved
src/components/StepCard/index.jsx
View file @
3da7408a
...
...
@@ -2,7 +2,7 @@ import React from 'react';
import
'./index.less'
const
data
=
[{},
{},
{},
{
s
:
'1'
},
{
s
:
'111'
,
result
:
'11111'
}]
const
Index
=
()
=>
{
const
Index
=
(
props
)
=>
{
return
(
<
div
className=
"auto-step"
>
<
ul
className=
"auto-step-card"
>
...
...
src/components/Steps/index.jsx
deleted
100644 → 0
View file @
e9f7a39c
import
React
from
'react'
;
import
{
Steps
,
Icon
}
from
'antd-mobile'
const
Step
=
Steps
.
Step
;
// const data = [{}, {current: true}, {}]
const
Index
=
(
props
)
=>
{
return
(
<
Steps
direction=
{
props
.
direction
}
current=
{
3
}
>
<
Step
icon=
{
<
Icon
type=
"check-circle"
size=
"xxs"
/>
}
/>
<
Step
icon=
{
<
Icon
type=
"check-circle"
size=
"xxs"
/>
}
/>
<
Step
status=
"error"
icon=
{
<
Icon
type=
"check-circle"
size=
"xxs"
/>
}
/>
{
/*<Step icon={<div style={{width: 17, height: 17, borderRadius: '50%', background: 'gray'}}/>}/>*/
}
</
Steps
>
);
};
export
default
Index
;
src/components/Steps/index.less
deleted
100644 → 0
View file @
e9f7a39c
.step_success{
width: 16.7px;
height: 16.7px;
border-radius: 50%;
}
src/components/TopSearch/index.jsx
View file @
3da7408a
import
React
,
{
Component
}
from
'react'
;
import
React
,
{
useState
}
from
'react'
;
import
{
Icon
}
from
'antd-mobile'
import
'./index.less'
class
Index
extends
Component
{
state
=
{
status
:
false
};
topSearch
=
()
=>
{
const
Index
=
(
props
)
=>
{
const
[
status
,
setStatus
]
=
useState
(
false
);
const
topSearch
=
()
=>
{
const
input
=
document
.
getElementsByClassName
(
"top-single-search"
);
this
.
props
.
onSearch
(
input
[
0
].
value
);
let
inputValue
=
input
[
0
].
value
this
.
setState
({
status
:
(
inputValue
!=
null
&&
inputValue
!=
undefined
&&
inputValue
!=
''
)}
)
props
.
onSearch
(
input
[
0
].
value
);
let
inputValue
=
input
[
0
].
value
;
setStatus
(
inputValue
!=
null
&&
inputValue
!=
undefined
&&
inputValue
!=
''
)
};
clear
=
()
=>
{
this
.
setState
({
status
:
false
}
)
c
onst
c
lear
=
()
=>
{
setStatus
(
false
)
const
input
=
document
.
getElementsByClassName
(
"top-single-search"
);
input
[
0
].
value
=
null
;
input
[
0
].
focus
();
}
render
()
{
const
{
status
}
=
this
.
state
return
(
<
div
className=
"search-box"
>
<
Icon
type=
"search"
size=
"xs"
className=
"search-svg"
/>
<
input
onChange=
{
this
.
topSearch
}
className=
"top-single-search"
placeholder=
"请输入关键字搜索"
/>
{
status
&&
(
<
Icon
type=
"cross-circle-o"
color=
"rgba(35, 35, 35, 0.3)"
size=
"xxs"
className=
"clear-svg"
onClick=
{
this
.
clear
}
/>
)
}
return
(
<
div
className=
"search-box"
>
<
Icon
type=
"search"
size=
"xs"
className=
"search-svg"
/>
<
input
onChange=
{
topSearch
}
className=
"top-single-search"
placeholder=
"请输入关键字搜索"
/>
{
status
&&
(
<
Icon
type=
"cross-circle-o"
color=
"rgba(35, 35, 35, 0.3)"
size=
"xxs"
className=
"clear-svg"
onClick=
{
clear
}
/>
)
}
</
div
>
);
}
}
</
div
>
);
};
export
default
Index
;
src/components/WorkCard/CardItem.jsx
View file @
3da7408a
import
React
,
{
Componen
t
}
from
'react'
;
import
React
,
{
useState
,
useEffec
t
}
from
'react'
;
import
'./index.less'
class
CardItem
extends
Component
{
state
=
{
addStatus
:
false
}
componentWillReceiveProps
(
nextProps
,
nextContext
)
{
if
(
this
.
props
.
addStatus
!==
nextProps
.
addStatus
)
{
this
.
setState
({
addStatus
:
nextProps
.
addStatus
});
}
};
contentCLick
=
()
=>
{
const
{
data
,
addCommon
}
=
this
.
props
;
const
{
addStatus
}
=
this
.
state
!
addStatus
&&
!
data
.
iconAdd
&&
console
.
log
(
data
.
text
);
const
CardItem
=
(
props
)
=>
{
const
{
data
,
addStatus
,
type
,
addCommon
,
iconAction
}
=
props
;
const
[
status
,
setStatus
]
=
useState
(
false
);
useEffect
(()
=>
{
setStatus
(
addStatus
)
},
[
addStatus
])
const
contentCLick
=
()
=>
{
!
status
&&
!
data
.
iconAdd
&&
console
.
log
(
data
.
text
);
data
.
iconAdd
&&
addCommon
()
};
iconClick
=
()
=>
{
const
{
iconAction
}
=
this
.
props
;
const
iconClick
=
()
=>
{
iconAction
()
}
render
()
{
const
{
data
,
type
}
=
this
.
props
;
const
{
addStatus
}
=
this
.
state
return
(
<
div
className=
"card-content"
onClick=
{
this
.
contentCLick
}
>
{
data
.
text
&&
(
<
div
className=
"card-content-box"
>
<
div
className=
"card-content-img"
>
{
addStatus
&&
!
data
.
iconAdd
&&
(
<
img
src=
{
type
===
'edit'
?
'/img/common-d.png'
:
'/img/common-a.png'
}
className=
"card-content-img-icon"
alt=
""
onClick=
{
this
.
iconClick
}
/>
)
}
};
return
(
<
div
className=
"card-content"
onClick=
{
contentCLick
}
>
{
data
.
text
&&
(
<
div
className=
"card-content-box"
>
<
div
className=
"card-content-img"
>
{
status
&&
!
data
.
iconAdd
&&
(
<
img
src=
{
type
===
'edit'
?
'/img/common-d.png'
:
'/img/common-a.png'
}
className=
"card-content-img-icon"
alt=
""
onClick=
{
iconClick
}
/>
)
}
<
img
src=
{
data
.
icon
}
className=
"card-content-img-svg"
alt=
""
/>
</
div
>
<
div
className=
"card-content-title"
>
{
data
.
text
}
</
div
>
<
img
src=
{
data
.
icon
}
className=
"card-content-img-svg"
alt=
""
/>
</
div
>
<
div
className=
"card-content-title"
>
{
data
.
text
}
</
div
>
)
}
</
div
>
);
}
}
</
div
>
)
}
</
div
>
);
}
;
export
default
CardItem
;
src/components/WorkCard/index.jsx
View file @
3da7408a
import
React
,
{
Component
}
from
'react'
;
import
React
from
'react'
;
import
'./index.less'
import
CardItem
from
'./CardItem'
class
Index
extends
Component
{
render
()
{
const
{
title
,
type
,
addStatus
,
addCommon
,
data
,
iconAction
}
=
this
.
props
;
const
emptyIcon
=
type
===
'edit'
?
{
text
:
addStatus
?
'完成添加'
:
'添加常用'
,
icon
:
addStatus
?
'/img/finish-work.png'
:
'/img/add-work.png'
,
iconAdd
:
true
}
:
{};
const
empty
=
data
.
length
%
3
;
empty
===
0
&&
data
.
push
(
emptyIcon
,
{},
{});
empty
===
1
&&
data
.
push
(
emptyIcon
,
{});
empty
===
2
&&
data
.
push
(
emptyIcon
);
return
(
<
div
>
<
div
className=
"work-card-title"
>
{
title
}
</
div
>
<
div
className=
"work-card-body"
>
{
data
.
map
((
item
,
index
)
=>
(
<
CardItem
type=
{
type
}
key=
{
index
}
data=
{
item
}
addStatus=
{
addStatus
}
addCommon=
{
addCommon
}
iconAction=
{
iconAction
}
/>
))
}
</
div
>
const
Index
=
(
props
)
=>
{
const
{
title
,
type
,
addStatus
,
addCommon
,
data
,
iconAction
}
=
props
;
const
emptyIcon
=
type
===
'edit'
?
{
text
:
addStatus
?
'完成添加'
:
'添加常用'
,
icon
:
addStatus
?
'/img/finish-work.png'
:
'/img/add-work.png'
,
iconAdd
:
true
}
:
{};
const
empty
=
data
.
length
%
3
;
empty
===
0
&&
data
.
push
(
emptyIcon
,
{},
{});
empty
===
1
&&
data
.
push
(
emptyIcon
,
{});
empty
===
2
&&
data
.
push
(
emptyIcon
);
return
(
<
div
>
<
div
className=
"work-card-title"
>
{
title
}
</
div
>
<
div
className=
"work-card-body"
>
{
data
.
map
((
item
,
index
)
=>
(
<
CardItem
type=
{
type
}
key=
{
index
}
data=
{
item
}
addStatus=
{
addStatus
}
addCommon=
{
addCommon
}
iconAction=
{
iconAction
}
/>
))
}
</
div
>
);
}
}
</
div
>
);
}
;
export
default
Index
;
src/layout/CommonLayout.jsx
View file @
3da7408a
import
React
,
{
}
from
'react'
;
import
React
,
{
Component
}
from
'react'
;
import
Footer
from
'./Footer'
import
{
withRouter
}
from
'react-router-dom'
import
'./index.less'
const
CommonLayout
=
(
props
)
=>
{
return
(
<
div
>
<
div
className=
"common-layout-content"
>
<
div
>
{
props
.
children
}
</
div
>
class
CommonLayout
extends
Component
{
constructor
(){
super
();
this
.
resize
=
this
.
resize
.
bind
(
this
)
}
resize
=
(
defaultH
)
=>
{
const
scrollHeight
=
document
.
body
.
scrollHeight
;
const
footer
=
document
.
getElementById
(
"footer"
);
const
content
=
document
.
getElementById
(
"common-content"
)
if
(
footer
)
{
if
(
defaultH
>
scrollHeight
)
{
footer
.
classList
.
remove
(
'footer'
);
footer
.
classList
.
add
(
'footer-static'
)
}
else
{
footer
.
classList
.
add
(
'footer'
)
footer
.
classList
.
remove
(
'footer-static'
);
}
}
if
(
content
)
{
if
(
defaultH
>
scrollHeight
)
{
content
.
classList
.
remove
(
'common-layout-content'
);
content
.
classList
.
add
(
'common-layout-content-static'
);
}
else
{
content
.
classList
.
add
(
'common-layout-content'
);
content
.
classList
.
remove
(
'common-layout-content-static'
);
}
}
// alert(`defaultH: ${defaultH} clientHeight: ${scrollHeight}`);
}
componentWillMount
()
{
const
defaultH
=
document
.
body
.
scrollHeight
;
window
.
addEventListener
(
'resize'
,
()
=>
this
.
resize
(
defaultH
))
}
componentWillUnmount
()
{
window
.
addEventListener
(
'resize'
,
this
.
resize
)
}
render
()
{
return
(
<
div
>
<
div
id=
"common-content"
className=
"common-layout-content"
>
<
div
>
{
this
.
props
.
children
}
</
div
>
</
div
>
<
Footer
{
...
this
.
props
}
/>
</
div
>
<
Footer
{
...
props
}
/>
</
div
>
);
};
);
}
}
export
default
withRouter
(
CommonLayout
)
;
src/layout/Footer.jsx
View file @
3da7408a
...
...
@@ -25,13 +25,12 @@ class Footer extends Component {
];
return
(
<
div
className=
"footer"
>
<
div
id=
"footer"
className=
"footer"
>
<
TabBar
unselectedTintColor=
"#949494"
tintColor=
"#2E67EA"
barTintColor=
"white"
>
{
tabItem
.
map
(
item
=>
(
<
TabBar
.
Item
key=
{
item
.
key
}
...
...
src/layout/index.less
View file @
3da7408a
...
...
@@ -4,6 +4,11 @@
overflow: auto;
padding-bottom: 10px
}
.common-layout-content-static{
position: fixed;
top: 0;left: 0;right: 0;bottom: 10px;
overflow: auto;
}
.footer-tab-icon{
width: 18px;
...
...
@@ -15,7 +20,10 @@
background: rgba(35,35,35, 0.5);
}
.footer{
width: 100%;
position: fixed;
width: 100%;
bottom: 0;
}
.footer-static{
display: none;
}
src/pages/Backlog/Backlog.jsx
View file @
3da7408a
import
React
,
{
Component
}
from
'react'
;
import
React
,
{
useState
}
from
'react'
;
import
{
WhiteSpace
,
WingBlank
,
ActivityIndicator
}
from
'antd-mobile'
import
TodoCard
from
'../../components/
Todo
Card'
import
TodoCard
from
'../../components/
Log
Card'
import
TopSearch
from
'../../components/TopSearch'
const
Backlog
=
(
props
)
=>
{
class
Index
extends
Component
{
state
=
{
loading
:
false
}
checkLog
=
()
=>
{
this
.
props
.
history
.
push
(
`/blank/example/1`
)
const
[
loading
,
setLoading
]
=
useState
(
false
)
const
checkLog
=
()
=>
{
props
.
history
.
push
(
`/blank/info/example/1`
)
}
render
()
{
const
{
loading
}
=
this
.
state
return
(
<
WingBlank
>
<
ActivityIndicator
toast
text=
"加载中..."
animating=
{
loading
}
/>
<
WhiteSpace
/>
<
TopSearch
onSearch=
{
val
=>
console
.
log
(
val
)
}
/>
{
[{},{},{},{},{},{}].
map
((
item
,
index
)
=>
(
<
div
key=
{
index
}
>
<
WhiteSpace
/>
<
TodoCard
data=
{
item
}
onCLick=
{
this
.
checkLog
}
/>
</
div
>
return
(
<
WingBlank
>
<
ActivityIndicator
toast
text=
"加载中..."
animating=
{
loading
}
/>
<
WhiteSpace
/>
<
TopSearch
onSearch=
{
val
=>
console
.
log
(
val
)
}
/>
{
[{},{},{},{},{},{}].
map
((
item
,
index
)
=>
(
<
div
key=
{
index
}
>
<
WhiteSpace
/>
<
TodoCard
data=
{
item
}
onClick=
{
checkLog
}
/>
</
div
>
))
}
))
}
</
WingBlank
>
);
}
}
</
WingBlank
>
);
};
export
default
Index
;
export
default
Backlog
;
src/pages/Communicate/Communicate.jsx
0 → 100644
View file @
3da7408a
import
React
,
{
Component
}
from
'react'
;
import
'./index.less'
class
Communicate
extends
Component
{
render
()
{
return
(
<
div
>
<
div
className=
'breadBox'
>
<
span
className=
'currentLink'
>
科技创新委员会
</
span
><
span
className=
'symbol'
>
>
</
span
><
span
>
组织架构
</
span
><
span
className=
'symbol'
>
>
</
span
><
span
>
办公厅
</
span
>
</
div
>
<
div
className=
'adMainBox'
>
<
ul
className=
'adListBox'
>
<
li
>
<
div
className=
'itemBox'
>
<
h4
className=
'titleBar'
>
市委办公厅审核员
</
h4
>
<
div
className=
'adContent'
>
<
div
className=
'peopleList'
>
<
p
className=
'subItem'
>
<
span
className=
'cicrleHead mr-5'
>
<
img
src=
'/img/head.png'
className=
'imgRes'
/>
</
span
>
王磊
</
p
>
<
p
className=
'subItem'
>
<
img
className=
'smallIco mr-5'
src=
'/img/tel.png'
/>
13488876526
</
p
>
</
div
>
<
div
className=
'peopleList'
>
<
p
className=
'subItem'
>
<
span
className=
'cicrleHead mr-5 centerFont'
>
王
</
span
>
王磊
</
p
>
<
p
className=
'subItem'
>
<
img
className=
'smallIco mr-5'
src=
'/img/tel.png'
/>
13488876526
</
p
>
</
div
>
</
div
>
</
div
>
</
li
>
<
li
>
<
div
className=
'itemBox'
>
<
h4
className=
'titleBar'
>
市委办公厅审核员
</
h4
>
<
div
className=
'adContent'
>
<
div
className=
'peopleList'
>
<
p
className=
'subItem'
>
<
span
className=
'cicrleHead mr-5'
>
<
img
src=
'/img/head.png'
className=
'imgRes'
/>
</
span
>
王磊
</
p
>
<
p
className=
'subItem'
>
<
img
className=
'smallIco mr-5'
src=
'/img/tel.png'
/>
13488876526
</
p
>
</
div
>
<
div
className=
'peopleList'
>
<
p
className=
'subItem'
>
<
span
className=
'cicrleHead mr-5 centerFont'
>
王
</
span
>
王磊
</
p
>
<
p
className=
'subItem'
>
<
img
className=
'smallIco mr-5'
src=
'/img/tel.png'
/>
13488876526
</
p
>
</
div
>
</
div
>
</
div
>
</
li
>
</
ul
>
</
div
>
</
div
>
);
}
}
export
default
Communicate
;
src/pages/Communicate/index.less
0 → 100644
View file @
3da7408a
@import '../../variable.less';
.breadBox{
padding:15px 20px;
font-size: 14px;
background-color: #fff;
line-height: 1.5;
}
.currentLink{
color:@primary;
}
.adMainBox{
padding:10px 18px;
}
.adListBox{
padding:15px;
background-color: #fff;
border:0px solid rgba(0, 0, 0, 0.1);
border-radius:5px;
}
.adListBox{
li{
margin-bottom:10px ;
border-bottom: 1px solid @grayLight;
&:last-child{
padding-top: 0;
border-bottom: none;
}
}
.titleBar{
font-size: 16px;
padding-top: 0;
}
.adContent{
padding:15px 0;
}
}
.peopleList{
display: flex;
justify-content: space-between;
line-height: 1.5;
align-items:center;
padding:10px 0;
}
.peopleList .subItem{
flex:1;
font-size: 14px;
}
.peopleList > p:last-child{
text-align: right;
}
.partList{
li{
&:extend(.peopleList);
border-bottom: 1px solid @grayLight;
margin-bottom: 0;
line-height: 1.5;
padding:15px 5px !important;
}
p:nth-child(1){
font-size: 14px;
}
.icon18{
margin-bottom: -4px;
}
}
src/pages/EventProcessing/Process.jsx
View file @
3da7408a
import
React
,
{
Componen
t
}
from
'react'
;
import
React
,
{
useState
,
useEffec
t
}
from
'react'
;
import
{
WingBlank
,
WhiteSpace
,
ActionSheet
,
ActivityIndicator
}
from
'antd-mobile'
import
'./index.less'
import
TopTabs
from
'../../components/
Top
Tabs'
import
TopTabs
from
'../../components/
Blank
Tabs'
import
Basic
from
'./Basic'
import
Adjunct
from
'./Adjunct'
import
Flow
from
'./Flow'
;
import
Option
from
'./Option'
;
//Ipone antd-mobile ActionSheet
const
isIPhone
=
new
RegExp
(
'
\\
biPhone
\\
b|
\\
biPod
\\
b'
,
'i'
).
test
(
window
.
navigator
.
userAgent
);
let
wrapProps
;
if
(
isIPhone
)
{
wrapProps
=
{
onTouchStart
:
e
=>
e
.
preventDefault
(),
const
Pro
=
(
props
)
=>
{
const
[
loading
,
setLoading
]
=
useState
(
false
);
//提交按钮状态
const
[
disabled
,
setDisabled
]
=
useState
(
true
)
//提交按钮文字
const
[
footButton
,
setFootButton
]
=
useState
(
'确认发送'
);
//聚焦
const
optionBlur
=
()
=>
{
setFootButton
(
'确认发送'
);
setFootStatus
(
true
)
};
}
useEffect
(()
=>
{
const
option
=
document
.
getElementsByClassName
(
"option-text"
)[
0
]
option
.
addEventListener
(
'focus'
,
optionBlur
,
true
);
return
()
=>
option
.
removeEventListener
(
'focus'
,
optionBlur
,
true
);
},
[]);
class
Process
extends
Component
{
constructor
()
{
super
();
this
.
optionBlur
=
this
.
optionBlur
.
bind
(
this
)
this
.
handleScroll
=
this
.
handleScroll
.
bind
(
this
)
this
.
state
=
{
current
:
'basic'
,
disabled
:
true
,
footStatus
:
false
,
footButton
:
'处理'
,
loading
:
false
}
const
optionChange
=
val
=>
{
setDisabled
(
!
(
val
!=
null
&&
val
!=
undefined
&&
val
!=
''
))
};
componentDidMount
()
{
document
.
getElementsByClassName
(
"option-text"
)[
0
].
addEventListener
(
'focus'
,
this
.
optionBlur
,
true
)
window
.
addEventListener
(
'scroll'
,
this
.
handleScroll
,
true
);
}
optionBlur
=
()
=>
{
this
.
setState
({
footButton
:
'确认发送'
,
footStatus
:
true
})
}
componentWillUnmount
()
{
document
.
getElementsByClassName
(
"option-text"
)[
0
].
removeEventListener
(
'focus'
,
this
.
optionBlur
,
true
)
window
.
removeEventListener
(
'scroll'
,
this
.
handleScroll
,
true
);
}
handleScroll
()
{
const
adjunct
=
document
.
getElementById
(
"event-adjunct"
).
offsetTop
;
const
flow
=
document
.
getElementById
(
"event-flow"
).
offsetTop
;
const
option
=
document
.
getElementById
(
"event-option"
).
offsetTop
;
const
event
=
document
.
getElementById
(
'event'
);
const
top
=
event
.
scrollTop
;
const
scrollHeight
=
event
.
scrollHeight
;
const
clientHeight
=
event
.
clientHeight
if
(
top
>=
0
&&
top
<
adjunct
)
{
this
.
setState
({
current
:
'basic'
})
}
else
if
(
top
>=
adjunct
&&
top
<
flow
)
{
this
.
setState
({
current
:
'adjunct'
})
}
else
if
(
top
>=
flow
&&
top
<
option
)
{
this
.
setState
({
current
:
'flow'
})
}
else
if
(
top
>=
option
)
{
this
.
setState
({
current
:
'option'
})
}
if
(
top
+
clientHeight
===
scrollHeight
)
{
this
.
setState
({
current
:
'option'
})
}
const
[
current
,
setCurrent
]
=
useState
(
'basic'
);
const
[
footStatus
,
setFootStatus
]
=
useState
(
false
);
//点击输入框, 聚焦移动
const
textClick
=
()
=>
{
const
top
=
document
.
getElementById
(
`event-option`
).
offsetTop
;
document
.
getElementById
(
"event"
).
scrollTo
(
0
,
top
)
document
.
getElementsByClassName
(
"option-text"
)[
0
].
focus
();
optionBlur
()
};
tabClick
=
(
name
)
=>
{
this
.
setState
({
current
:
name
})
//tab切换
const
tabClick
=
(
name
)
=>
{
setCurrent
(
name
)
name
===
'option'
&&
document
.
getElementsByClassName
(
"option-text"
)[
0
].
focus
();
name
===
'option'
&&
this
.
optionBlur
()
name
===
'option'
&&
optionBlur
()
const
top
=
document
.
getElementById
(
`event-
${
name
}
`
).
offsetTop
;
document
.
getElementById
(
"event"
).
scrollTo
(
0
,
top
);
};
textClick
=
()
=>
{
const
top
=
document
.
getElementById
(
`event-option`
).
offsetTop
;
document
.
getElementById
(
"event"
).
scrollTo
(
0
,
top
)
document
.
getElementsByClassName
(
"option-text"
)[
0
].
focus
();
this
.
optionBlur
()
}
showActionSheet
=
()
=>
{
//antd-mobile 提交选项
const
isIPhone
=
new
RegExp
(
'
\\
biPhone
\\
b|
\\
biPod
\\
b'
,
'i'
).
test
(
window
.
navigator
.
userAgent
);
let
wrapProps
;
if
(
isIPhone
)
{
wrapProps
=
{
onTouchStart
:
e
=>
e
.
preventDefault
(),
};
}
const
showActionSheet
=
()
=>
{
const
BUTTONS
=
[
'送部门领导审核'
,
'送办公室分管主任审批'
,
'办结'
,
'取消'
];
ActionSheet
.
showActionSheetWithOptions
({
options
:
BUTTONS
,
...
...
@@ -85,52 +68,72 @@ class Process extends Component {
wrapProps
,
},
(
buttonIndex
)
=>
{
props
.
history
.
push
(
`/blank/submit/1`
)
// console.log(buttonIndex)
});
};
optionChange
=
val
=>
{
this
.
setState
({
disabled
:
!
(
val
!=
null
&&
val
!=
undefined
&&
val
!=
''
)})
}
render
()
{
const
{
footButton
,
disabled
,
footStatus
,
current
,
loading
}
=
this
.
state
return
(
<
div
>
<
ActivityIndicator
toast
text=
"加载中..."
animating=
{
loading
}
/>
<
TopTabs
page=
{
current
}
onClick=
{
this
.
tabClick
}
/>
<
div
id=
"event"
>
<
WingBlank
>
<
div
id=
"event-basic"
/>
<
WhiteSpace
/>
<
Basic
/>
<
div
id=
"event-adjunct"
/>
<
WhiteSpace
/>
<
Adjunct
/>
<
div
id=
"event-flow"
/>
<
WhiteSpace
/>
<
Flow
/>
<
div
id=
"event-option"
/>
<
WhiteSpace
/>
<
Option
onChange=
{
this
.
optionChange
}
/>
</
WingBlank
>
</
div
>
<
div
className=
"event-footer"
>
<
div
className=
{
`event-footer-button ${(footStatus && disabled) ? 'button-disabled' : '' }`
}
onClick=
{
footStatus
&&
!
disabled
?
this
.
showActionSheet
:
this
.
textClick
}
>
{
!
footStatus
&&
(
<
img
alt=
""
src=
"/img/process-edit.png"
className=
"process-edit"
/>
)
}
{
footButton
}
</
div
>
const
handleScroll
=
()
=>
{
const
adjunct
=
document
.
getElementById
(
"event-adjunct"
).
offsetTop
;
const
flow
=
document
.
getElementById
(
"event-flow"
).
offsetTop
;
const
option
=
document
.
getElementById
(
"event-option"
).
offsetTop
;
const
event
=
document
.
getElementById
(
'event'
);
const
top
=
event
.
scrollTop
;
const
scrollHeight
=
event
.
scrollHeight
;
const
clientHeight
=
event
.
clientHeight
if
(
top
>=
0
&&
top
<
adjunct
)
{
setCurrent
(
'basic'
)
}
else
if
(
top
>=
adjunct
&&
top
<
flow
)
{
setCurrent
(
'adjunct'
)
}
else
if
(
top
>=
flow
&&
top
<
option
)
{
setCurrent
(
'flow'
)
}
else
if
(
top
>=
option
)
{
setCurrent
(
'option'
)
}
if
(
top
+
clientHeight
===
scrollHeight
)
{
setCurrent
(
'option'
)
}
};
useEffect
(()
=>
{
window
.
addEventListener
(
'scroll'
,
handleScroll
,
true
);
return
()
=>
window
.
removeEventListener
(
'scroll'
,
handleScroll
,
true
);
},
[])
return
(
<
div
>
<
ActivityIndicator
toast
text=
"加载中..."
animating=
{
loading
}
/>
<
TopTabs
page=
{
current
}
onClick=
{
tabClick
}
/>
<
div
id=
"event"
>
<
WingBlank
>
<
div
id=
"event-basic"
/>
<
WhiteSpace
/>
<
Basic
/>
<
div
id=
"event-adjunct"
/>
<
WhiteSpace
/>
<
Adjunct
/>
<
div
id=
"event-flow"
/>
<
WhiteSpace
/>
<
Flow
/>
<
div
id=
"event-option"
/>
<
WhiteSpace
/>
<
Option
onChange=
{
optionChange
}
/>
</
WingBlank
>
</
div
>
<
div
className=
"event-footer"
>
<
div
className=
{
`event-footer-button ${(footStatus && disabled) ? 'button-disabled' : '' }`
}
onClick=
{
footStatus
&&
!
disabled
?
showActionSheet
:
textClick
}
>
{
!
footStatus
&&
(
<
img
alt=
""
src=
"/img/process-edit.png"
className=
"process-edit"
/>
)
}
{
footButton
}
</
div
>
</
div
>
);
}
}
export
default
Process
;
</
div
>
);
};
export
default
Pro
;
src/pages/EventProcessing/SubmitDetail.jsx
View file @
3da7408a
import
React
,
{
Component
}
from
'react'
;
import
AddressList
from
'../../components/AddressList'
import
{
WingBlank
,
WhiteSpace
}
from
"antd-mobile"
;
class
SubmitDetail
extends
Component
{
render
()
{
return
(
<
div
>
<
WhiteSpace
/>
<
WingBlank
>
<
AddressList
/>
</
WingBlank
>
</
div
>
);
...
...
src/pages/Login/index.jsx
View file @
3da7408a
...
...
@@ -24,6 +24,7 @@ const Login = (props) => {
url
:
'/dgbg/mobileLogin.view?userName=2012012099&password=1&clientFlag=123456'
,
method
:
'post'
});
return
(
<
div
>
...
...
src/pages/Notice/Notice.jsx
View file @
3da7408a
import
React
,
{
Component
}
from
'react'
;
import
React
,
{
useState
}
from
'react'
;
import
{
ActivityIndicator
,
WhiteSpace
,
WingBlank
}
from
'antd-mobile'
import
TodoCard
from
'../../components/
Todo
Card'
import
TopNotice
from
'../../components/
TopNotice
'
import
TodoCard
from
'../../components/
Log
Card'
import
TopNotice
from
'../../components/
NoticeTab
'
class
Notice
extends
Component
{
state
=
{
loading
:
false
};
render
()
{
const
{
loading
}
=
this
.
state
;
return
(
<
WingBlank
>
<
ActivityIndicator
toast
text=
"加载中..."
animating=
{
loading
}
/>
<
WhiteSpace
/>
<
TopNotice
/>
<
WhiteSpace
/>
<
TodoCard
/>
</
WingBlank
>
);
}
}
const
Notice
=
(
props
)
=>
{
const
[
loading
,
setLoading
]
=
useState
(
false
)
return
(
<
WingBlank
>
<
ActivityIndicator
toast
text=
"加载中..."
animating=
{
loading
}
/>
<
WhiteSpace
/>
<
TopNotice
/>
<
WhiteSpace
/>
<
TodoCard
/>
</
WingBlank
>
);
};
export
default
Notice
;
src/router.js
View file @
3da7408a
...
...
@@ -6,8 +6,10 @@ import CommonLayout from './layout/CommonLayout';
import
Backlog
from
'./pages/Backlog/Backlog'
import
Work
from
'./pages/Work/Work'
import
Notice
from
'./pages/Notice/Notice'
import
Communicate
from
'./pages/Communicate/Communicate'
;
import
AddressList
from
'./pages/AddressList/AddressList'
;
import
Process
from
'./pages/EventProcessing/Process'
import
SubmitDetail
from
'./pages/EventProcessing/SubmitDetail'
import
Login
from
'./pages/Login'
...
...
@@ -25,13 +27,15 @@ const ReactRouter = () => {
<
CommonLayout
>
<
Route
path
=
"/bord/backlog"
component
=
{
Backlog
}
/
>
<
Route
path
=
"/bord/work"
component
=
{
Work
}
/
>
<
Route
path
=
"/bord/communicate"
component
=
{
Communicate
}
/
>
<
Route
path
=
"/bord/addressList"
component
=
{
AddressList
}
/
>
<
Route
path
=
"/bord/notice"
component
=
{
Notice
}
/
>
<
/CommonLayout
>
}
/
>
<
Route
path
=
"/blank"
component
=
{()
=>
<
BlankLayout
>
<
Route
path
=
"/blank/:name/:id"
component
=
{
Process
}
/
>
<
Route
path
=
"/blank/submit/:id"
component
=
{
SubmitDetail
}
/
>
<
Route
path
=
"/blank/info/:name/:id"
component
=
{
Process
}
/
>
<
/BlankLayout
>
}
/
>
<
Route
component
=
{
NoFound
}
/
>
...
...
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