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
56f498de
Commit
56f498de
authored
Jun 10, 2020
by
熊成伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug
parent
1caac495
Pipeline
#15265
failed with stages
in 31 seconds
Changes
6
Pipelines
1
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
46 additions
and
31 deletions
+46
-31
workspace.xml
.idea/workspace.xml
+0
-0
index.jsx
src/components/BlankTabs/index.jsx
+1
-1
index.less
src/components/BlankTabs/index.less
+5
-1
Process.jsx
src/pages/EventProcessing/Process.jsx
+32
-26
index.less
src/pages/EventProcessing/index.less
+5
-0
Notice.jsx
src/pages/Notice/Notice.jsx
+3
-3
No files found.
.idea/workspace.xml
View file @
56f498de
This diff is collapsed.
Click to expand it.
src/components/BlankTabs/index.jsx
View file @
56f498de
...
...
@@ -11,7 +11,7 @@ const tabs = [
const
Index
=
(
props
)
=>
{
return
(
<
div
>
<
div
className=
"blank-tab-card"
>
<
Tabs
page=
{
props
.
page
}
tabs=
{
tabs
}
...
...
src/components/BlankTabs/index.less
View file @
56f498de
.blank-tab-card{
position: fixed;
width: 100%;
top: 0;
}
.am-tabs-default-bar-tab-active{
color: #0185FB;
}
...
...
src/pages/EventProcessing/Process.jsx
View file @
56f498de
...
...
@@ -13,6 +13,12 @@ const Process = (props) => {
const
[
templateId
,
setTemplateId
]
=
useState
();
const
[
tableId
,
setTableId
]
=
useState
();
const
[
nodeId
,
setNodeId
]
=
useState
();
//回到顶部
useEffect
(()
=>
{
window
.
scrollTo
(
0
,
0
)
},
[]);
useEffect
(()
=>
{
const
{
id
}
=
props
.
match
.
params
axiosRequest
({
...
...
@@ -66,7 +72,7 @@ const Process = (props) => {
setAdjunctData
(
res
)
});
};
// const [button, setButton] = useState({}
)
const
[
button
,
setButton
]
=
useState
([]
)
const
getButton
=
uuid
=>
{
axiosRequest
({
method
:
'post'
,
...
...
@@ -74,7 +80,7 @@ const Process = (props) => {
body
:
{
curNodeId
:
nodeId
}
}).
then
(
res
=>
{
console
.
log
(
res
)
// setAdjunctData
(res)
setButton
(
res
)
});
};
useEffect
(()
=>
{
...
...
@@ -124,7 +130,8 @@ const Process = (props) => {
name
===
'option'
&&
document
.
getElementsByClassName
(
"option-text"
)[
0
].
focus
();
name
===
'option'
&&
optionBlur
()
const
top
=
document
.
getElementById
(
`event-
${
name
}
`
).
offsetTop
;
document
.
getElementById
(
"event"
).
scrollTo
(
0
,
top
);
console
.
log
(
top
)
window
.
scrollTo
(
0
,
top
);
};
...
...
@@ -137,6 +144,8 @@ const Process = (props) => {
};
}
const
showActionSheet
=
()
=>
{
// const but = button.map(item => (`${item.showname}`));
// console.log(but)
const
BUTTONS
=
[
'送部门领导审核'
,
'送办公室分管主任审批'
,
'办结'
,
'取消'
];
ActionSheet
.
showActionSheetWithOptions
({
options
:
BUTTONS
,
...
...
@@ -155,35 +164,32 @@ const Process = (props) => {
}
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'
)
}
//
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
);
},
[]);
//回到顶部
useEffect
(()
=>
{
window
.
scrollTo
(
0
,
0
)
},
[]);
return
(
<
Document
title=
"待办详情"
>
<
div
>
...
...
src/pages/EventProcessing/index.less
View file @
56f498de
@import '../../variable.less';
#event{
//position: fixed;
//top: 44px;
//left: 0;right: 0; bottom: 50px;
//overflow: auto;
margin-top: 48px;
margin-bottom: 50px;
padding-bottom: 340px;
}
...
...
src/pages/Notice/Notice.jsx
View file @
56f498de
...
...
@@ -66,8 +66,8 @@ const Notice = (props) => {
return
()
=>
window
.
removeEventListener
(
'touchmove'
,
handleScroll
,
true
);
},
[
data
]);
const
checkLog
=
()
=>
{
props
.
history
.
push
(
`/blank/info/
example/1
`
)
const
checkLog
=
(
OPERATEID
,
UUID
)
=>
{
props
.
history
.
push
(
`/blank/info/
${
OPERATEID
}
/
${
UUID
}
`
)
};
//回到顶部
...
...
@@ -115,7 +115,7 @@ const Notice = (props) => {
data
.
length
>
0
?
data
.
map
((
item
,
index
)
=>
(
<
div
key=
{
index
}
>
<
WhiteSpace
/>
<
TodoCard
data=
{
item
}
onClick=
{
checkLog
}
/>
<
TodoCard
data=
{
item
}
onClick=
{
()
=>
checkLog
(
item
.
OPERATEID
,
item
.
UUID
)
}
/>
</
div
>
))
:
<
Empty
/>
...
...
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