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
d822ce8e
Commit
d822ce8e
authored
Jun 06, 2020
by
熊成伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug
parent
73212b01
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
90 additions
and
75 deletions
+90
-75
workspace.xml
.idea/workspace.xml
+51
-48
index.jsx
src/components/TopTabs/index.jsx
+6
-5
Process.jsx
src/pages/EventProcessing/Process.jsx
+33
-22
No files found.
.idea/workspace.xml
View file @
d822ce8e
...
...
@@ -2,19 +2,8 @@
<project
version=
"4"
>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"a6d092de-b4f8-454d-99f5-4dac3ce112e5"
name=
"Default Changelist"
comment=
""
>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/components/List/index.less"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/components/List/index.less"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/components/StepCard/index.jsx"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/components/StepCard/index.jsx"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/components/StepCard/index.less"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/components/StepCard/index.less"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/components/TodoCard/index.jsx"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/components/TodoCard/index.jsx"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/components/TodoCard/index.less"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/components/TodoCard/index.less"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/components/TopSearch/index.jsx"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/components/TopSearch/index.jsx"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/components/TopSearch/index.less"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/components/TopSearch/index.less"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/pages/Backlog/Backlog.jsx"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/pages/Backlog/Backlog.jsx"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/pages/EventProcessing/Option.jsx"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/pages/EventProcessing/Option.jsx"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/components/TopTabs/index.jsx"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/components/TopTabs/index.jsx"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/pages/EventProcessing/Process.jsx"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/pages/EventProcessing/Process.jsx"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/pages/EventProcessing/index.less"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/pages/EventProcessing/index.less"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/pages/Work/Work.jsx"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/pages/Work/Work.jsx"
afterDir=
"false"
/>
</list>
<ignored
path=
"$PROJECT_DIR$/.tmp/"
/>
<ignored
path=
"$PROJECT_DIR$/temp/"
/>
...
...
@@ -54,8 +43,8 @@
<file
pinned=
"false"
current-in-tab=
"true"
>
<entry
file=
"file://$PROJECT_DIR$/src/pages/EventProcessing/Process.jsx"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
275
"
>
<caret
line=
"
103"
column=
"83"
selection-start-line=
"103"
selection-start-column=
"71"
selection-end-line=
"103"
selection-end-column=
"83
"
/>
<state
relative-caret-position=
"
370
"
>
<caret
line=
"
62"
column=
"9"
selection-start-line=
"62"
selection-start-column=
"9"
selection-end-line=
"62"
selection-end-column=
"9
"
/>
<folding>
<element
signature=
"e#0#39#0"
expanded=
"true"
/>
</folding>
...
...
@@ -63,6 +52,27 @@
</provider>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/src/components/TopTabs/index.jsx"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"400"
>
<caret
line=
"16"
column=
"27"
lean-forward=
"true"
selection-start-line=
"16"
selection-start-column=
"27"
selection-end-line=
"16"
selection-end-column=
"27"
/>
<folding>
<element
signature=
"e#0#26#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/src/pages/EventProcessing/index.less"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"495"
>
<caret
line=
"94"
column=
"20"
selection-start-line=
"94"
selection-start-column=
"20"
selection-end-line=
"94"
selection-end-column=
"20"
/>
</state>
</provider>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/src/components/TopSearch/index.jsx"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
...
...
@@ -96,9 +106,6 @@
</component>
<component
name=
"FindInProjectRecents"
>
<findStrings>
<find>
px
</find>
<find>
fileLoaderMatcher
</find>
<find>
props
</find>
<find>
iconAdd
</find>
<find>
addClick
</find>
<find>
top-single-search
</find>
...
...
@@ -120,12 +127,15 @@
<find>
step-content-wrapper
</find>
<find>
option-icon
</find>
<find>
pos
</find>
<find>
footButton
</find>
<find>
option
</find>
<find>
option-fast
</find>
<find>
<
TopSearch
</find>
<find>
option-text
</find>
<find>
process-edit
</find>
<find>
option-text
</find>
<find>
footStatus
</find>
<find>
footButton
</find>
<find>
console
</find>
<find>
textClick
</find>
</findStrings>
<replaceStrings>
<replace>
this.props
</replace>
...
...
@@ -155,7 +165,6 @@
<option
value=
"$PROJECT_DIR$/src/layout/BlankLayout.jsx"
/>
<option
value=
"$PROJECT_DIR$/src/components/List/index.jsx"
/>
<option
value=
"$PROJECT_DIR$/src/Pages/EventProcessing/Adjunct.jsx"
/>
<option
value=
"$PROJECT_DIR$/src/components/TopTabs/index.jsx"
/>
<option
value=
"$PROJECT_DIR$/src/Pages/EventProcessing/Option.jsx"
/>
<option
value=
"$PROJECT_DIR$/src/Pages/EventProcessing/Flow.jsx"
/>
<option
value=
"$PROJECT_DIR$/src/Pages/Backlog/Backlog.jsx"
/>
...
...
@@ -181,10 +190,11 @@
<option
value=
"$PROJECT_DIR$/src/components/TodoCard/index.less"
/>
<option
value=
"$PROJECT_DIR$/src/components/TodoCard/index.jsx"
/>
<option
value=
"$PROJECT_DIR$/src/pages/EventProcessing/Option.jsx"
/>
<option
value=
"$PROJECT_DIR$/src/pages/EventProcessing/index.less"
/>
<option
value=
"$PROJECT_DIR$/src/pages/Backlog/Backlog.jsx"
/>
<option
value=
"$PROJECT_DIR$/src/components/TopSearch/index.less"
/>
<option
value=
"$PROJECT_DIR$/src/components/TopSearch/index.jsx"
/>
<option
value=
"$PROJECT_DIR$/src/pages/EventProcessing/index.less"
/>
<option
value=
"$PROJECT_DIR$/src/components/TopTabs/index.jsx"
/>
<option
value=
"$PROJECT_DIR$/src/pages/EventProcessing/Process.jsx"
/>
</list>
</option>
...
...
@@ -232,13 +242,6 @@
<item
name=
"src"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"components"
type=
"462c0819:PsiDirectoryNode"
/>
</path>
<path>
<item
name=
"create-react-app"
type=
"b2602c69:ProjectViewProjectNode"
/>
<item
name=
"create-react-app"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"src"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"components"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"TopSearch"
type=
"462c0819:PsiDirectoryNode"
/>
</path>
<path>
<item
name=
"create-react-app"
type=
"b2602c69:ProjectViewProjectNode"
/>
<item
name=
"create-react-app"
type=
"462c0819:PsiDirectoryNode"
/>
...
...
@@ -324,7 +327,7 @@
<servers
/>
</component>
<component
name=
"TimeTrackingManager"
>
<option
name=
"totallyTimeSpent"
value=
"
88921
000"
/>
<option
name=
"totallyTimeSpent"
value=
"
91598
000"
/>
</component>
<component
name=
"ToolWindowManager"
>
<frame
x=
"-8"
y=
"-8"
width=
"1382"
height=
"784"
extended-state=
"6"
/>
...
...
@@ -643,16 +646,6 @@
<entry
file=
"file://$PROJECT_DIR$/public/img/process-edit.png"
>
<provider
selected=
"true"
editor-type-id=
"images"
/>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/components/TopTabs/index.jsx"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"325"
>
<caret
line=
"15"
column=
"27"
lean-forward=
"true"
selection-start-line=
"15"
selection-start-column=
"27"
selection-end-line=
"15"
selection-end-column=
"27"
/>
<folding>
<element
signature=
"e#0#26#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/pages/Backlog/Backlog.jsx"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"550"
>
...
...
@@ -663,13 +656,6 @@
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/pages/EventProcessing/index.less"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"445"
>
<caret
line=
"26"
column=
"37"
selection-start-line=
"26"
selection-start-column=
"37"
selection-end-line=
"26"
selection-end-column=
"37"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/pages/EventProcessing/Option.jsx"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"125"
>
...
...
@@ -697,10 +683,27 @@
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/pages/EventProcessing/index.less"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"495"
>
<caret
line=
"94"
column=
"20"
selection-start-line=
"94"
selection-start-column=
"20"
selection-end-line=
"94"
selection-end-column=
"20"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/components/TopTabs/index.jsx"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"400"
>
<caret
line=
"16"
column=
"27"
lean-forward=
"true"
selection-start-line=
"16"
selection-start-column=
"27"
selection-end-line=
"16"
selection-end-column=
"27"
/>
<folding>
<element
signature=
"e#0#26#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/pages/EventProcessing/Process.jsx"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
275
"
>
<caret
line=
"
103"
column=
"83"
selection-start-line=
"103"
selection-start-column=
"71"
selection-end-line=
"103"
selection-end-column=
"83
"
/>
<state
relative-caret-position=
"
370
"
>
<caret
line=
"
62"
column=
"9"
selection-start-line=
"62"
selection-start-column=
"9"
selection-end-line=
"62"
selection-end-column=
"9
"
/>
<folding>
<element
signature=
"e#0#39#0"
expanded=
"true"
/>
</folding>
...
...
src/components/TopTabs/index.jsx
View file @
d822ce8e
...
...
@@ -3,19 +3,20 @@ import {Tabs} from 'antd-mobile'
import
'./index.less'
const
tabs
=
[
{
title
:
'基本信息'
,
sub
:
'basic'
},
{
title
:
'详情附件'
,
sub
:
'adjunct'
},
{
title
:
'流程信息'
,
sub
:
'flow'
},
{
title
:
'流转意见'
,
sub
:
'option'
},
{
title
:
'基本信息'
,
key
:
'basic'
},
{
title
:
'详情附件'
,
key
:
'adjunct'
},
{
title
:
'流程信息'
,
key
:
'flow'
},
{
title
:
'流转意见'
,
key
:
'option'
},
]
const
Index
=
(
props
)
=>
{
return
(
<
div
>
<
Tabs
page=
{
props
.
page
}
tabs=
{
tabs
}
initialPage=
{
"basic"
}
onChange=
{
(
tab
,
index
)
=>
props
.
onClick
(
tab
.
sub
)
}
onChange=
{
(
tab
,
index
)
=>
props
.
onClick
(
tab
.
key
,
index
)
}
/>
</
div
>
);
...
...
src/pages/EventProcessing/Process.jsx
View file @
d822ce8e
...
...
@@ -20,17 +20,17 @@ class Process extends Component {
constructor
()
{
super
();
this
.
optionBlur
=
this
.
optionBlur
.
bind
(
this
)
//
this.handleScroll = this.handleScroll.bind(this)
this
.
handleScroll
=
this
.
handleScroll
.
bind
(
this
)
this
.
state
=
{
current
:
'basic'
,
disabled
:
true
,
footStatus
:
false
,
footButton
:
'处理'
}
};
componentDidMount
()
{
// console.log(document.getElementsByClassName("option-text")[0])
document
.
getElementsByClassName
(
"option-text"
)[
0
].
addEventListener
(
'focus'
,
this
.
optionBlur
,
true
)
//
window.addEventListener('scroll', this.handleScroll, true);
window
.
addEventListener
(
'scroll'
,
this
.
handleScroll
,
true
);
}
optionBlur
=
()
=>
{
this
.
setState
({
footButton
:
'确认发送'
,
footStatus
:
true
})
...
...
@@ -38,25 +38,36 @@ class Process extends Component {
componentWillUnmount
()
{
document
.
getElementsByClassName
(
"option-text"
)[
0
].
removeEventListener
(
'focus'
,
this
.
optionBlur
,
true
)
//
window.removeEventListener('scroll', this.handleScroll, true);
window
.
removeEventListener
(
'scroll'
,
this
.
handleScroll
,
true
);
}
// handleScroll() {
// const basic = document.getElementById("event-basic").offsetTop;
// const adjunct = document.getElementById("event-adjunct").offsetTop;
// const flow = document.getElementById("event-flow").offsetTop;
// const option = document.getElementById("event-option").offsetTop;
// const top = document.documentElement.scrollTop;
//
// console.log(top)
//
// // console.log(basic, adjunct, flow, option);
// };
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
-
9
)
{
this
.
setState
({
current
:
'basic'
})
}
else
if
(
top
>=
adjunct
&&
top
<
flow
-
9
)
{
this
.
setState
({
current
:
'adjunct'
})
}
else
if
(
top
>=
flow
&&
top
<
option
-
9
)
{
this
.
setState
({
current
:
'flow'
})
}
else
if
(
top
>=
option
)
{
this
.
setState
({
current
:
'option'
})
}
if
(
top
+
clientHeight
==
scrollHeight
)
{
this
.
setState
({
current
:
'option'
})
}
};
tabClick
=
(
name
)
=>
{
// console.log(document.getElementsByClassName("option-text")
)
this
.
setState
({
current
:
name
}
)
name
===
'option'
&&
document
.
getElementsByClassName
(
"option-text"
)[
0
].
focus
();
name
===
'option'
&&
this
.
optionBlur
()
const
top
=
document
.
getElementById
(
`event-
${
name
}
`
).
offsetTop
;
document
.
getElementById
(
"event"
).
scrollTo
(
0
,
top
-
9
)
document
.
getElementById
(
"event"
).
scrollTo
(
0
,
top
-
9
)
;
};
textClick
=
()
=>
{
const
top
=
document
.
getElementById
(
`event-option`
).
offsetTop
;
...
...
@@ -74,7 +85,7 @@ class Process extends Component {
wrapProps
,
},
(
buttonIndex
)
=>
{
console
.
log
(
buttonIndex
)
//
console.log(buttonIndex)
});
};
optionChange
=
val
=>
{
...
...
@@ -82,11 +93,11 @@ class Process extends Component {
}
render
()
{
console
.
log
(
this
.
props
.
match
.
params
);
const
{
footButton
,
disabled
,
footStatus
}
=
this
.
state
console
.
log
(
this
.
state
.
current
);
const
{
footButton
,
disabled
,
footStatus
,
current
}
=
this
.
state
return
(
<
div
>
<
TopTabs
onClick=
{
this
.
tabClick
}
/>
<
TopTabs
page=
{
current
}
onClick=
{
this
.
tabClick
}
/>
<
div
id=
"event"
>
<
WingBlank
>
<
WhiteSpace
/>
...
...
@@ -104,7 +115,7 @@ class Process extends Component {
{
!
footStatus
&&
(
<
img
alt=
""
src=
"/img/process-edit.png"
className=
"process-edit"
/>
)
}
{
this
.
state
.
footButton
}
{
footButton
}
</
div
>
</
div
>
...
...
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