Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
graph
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
李伟@五瓣科技
graph
Commits
4c8c3ade
Commit
4c8c3ade
authored
Nov 10, 2022
by
wenli.huang@wuban.net.cn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
current
parent
d5a8c80f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
22 deletions
+6
-22
App.js
src/App.js
+6
-22
No files found.
src/App.js
View file @
4c8c3ade
...
@@ -29,6 +29,7 @@ class App extends Component {
...
@@ -29,6 +29,7 @@ class App extends Component {
datazoomHundred
:
false
,
datazoomHundred
:
false
,
datazoom
:
false
,
datazoom
:
false
,
altitudeEnd
:
0
,
altitudeEnd
:
0
,
altitudeHundred
:
0
,
datazoomEnd
:
false
datazoomEnd
:
false
}
}
inputChangeValue
(){
inputChangeValue
(){
...
@@ -239,9 +240,6 @@ class App extends Component {
...
@@ -239,9 +240,6 @@ class App extends Component {
startBlock
=
item2
.
label
.
formatter
startBlock
=
item2
.
label
.
formatter
endBlock
=
item2
.
label
.
formatter
endBlock
=
item2
.
label
.
formatter
// that.setState({
// altitude:startBlock,
// })
min3
=
item2
.
xAxis
min3
=
item2
.
xAxis
}
}
}
else
{
}
else
{
...
@@ -257,9 +255,6 @@ class App extends Component {
...
@@ -257,9 +255,6 @@ class App extends Component {
min
=
min2
min
=
min2
if
(
item2
.
label
!==
undefined
){
if
(
item2
.
label
!==
undefined
){
startBlock
=
item2
.
label
.
formatter
startBlock
=
item2
.
label
.
formatter
// that.setState({
// altitude:startBlock
// })
min3
=
item2
.
xAxis
min3
=
item2
.
xAxis
}
}
}
}
...
@@ -312,11 +307,9 @@ class App extends Component {
...
@@ -312,11 +307,9 @@ class App extends Component {
})
})
}
}
if
(
that
.
state
.
inpttime
!=
-
100
){
if
(
that
.
state
.
inpttime
!=
-
100
){
console
.
log
(
"
不为-100
"
)
that
.
setState
({
that
.
setState
({
requestDuration
:
that
.
state
.
inputtime
requestDuration
:
that
.
state
.
inputtime
},()
=>
{
},()
=>
{
console
.
log
(
that
.
state
.
requestDuration
,
'
时间
'
)
fetch
(
`/api/graph_by_height_and_duration?height=
${
startBlock
}
&duration=
${
that
.
state
.
requestDuration
}
`
,{
fetch
(
`/api/graph_by_height_and_duration?height=
${
startBlock
}
&duration=
${
that
.
state
.
requestDuration
}
`
,{
method
:
'
GET
'
,
method
:
'
GET
'
,
headers
:{
headers
:{
...
@@ -380,11 +373,10 @@ class App extends Component {
...
@@ -380,11 +373,10 @@ class App extends Component {
if
(
params
.
end
===
100
){
if
(
params
.
end
===
100
){
myChart
.
showLoading
()
myChart
.
showLoading
()
console
.
log
(
endBlock
,
'
endBlock
'
)
console
.
log
(
that
.
state
.
requestDuration
,
'
ddd
'
)
that
.
setState
({
that
.
setState
({
requestDuration
:
100
,
requestDuration
:
100
,
duration
:
10
,
duration
:
10
,
altitudeHundred
:
endBlock
,
datazoomEnd
:
true
,
datazoomEnd
:
true
,
datazoomHundred
:
true
,
datazoomHundred
:
true
,
},()
=>
{
},()
=>
{
...
@@ -400,6 +392,8 @@ class App extends Component {
...
@@ -400,6 +392,8 @@ class App extends Component {
requestDuration
:
that
.
state
.
requestDuration
*
(
that
.
state
.
endCount
+
1
)
requestDuration
:
that
.
state
.
requestDuration
*
(
that
.
state
.
endCount
+
1
)
})
})
}
}
// console.log(that.state.altitudeEnd,'endend')
// console.log(that.state.requestDuration,'endrequestDuration')
// console.log(that.state.requestDuration,'endrequestDuration')
// console.log(endBlock,'endBlock')
// console.log(endBlock,'endBlock')
// console.log(that.state.endCount,'endCount')
// console.log(that.state.endCount,'endCount')
...
@@ -842,18 +836,8 @@ class App extends Component {
...
@@ -842,18 +836,8 @@ class App extends Component {
<
input
ref
=
"
inputtime
"
defaultValue
=
'
-100
'
onChange
=
{()
=>
this
.
inputChangeTime
()}
style
=
{{
width
:
'
20%
'
,
textAlign
:
'
center
'
}}
/
>
<
input
ref
=
"
inputtime
"
defaultValue
=
'
-100
'
onChange
=
{()
=>
this
.
inputChangeTime
()}
style
=
{{
width
:
'
20%
'
,
textAlign
:
'
center
'
}}
/
>
<
button
onClick
=
{()
=>
this
.
getInput
()}
style
=
{{
cursor
:
'
pointer
'
}}
>
点击切换
<
/button
>
<
button
onClick
=
{()
=>
this
.
getInput
()}
style
=
{{
cursor
:
'
pointer
'
}}
>
点击切换
<
/button
>
<
/div
>
<
/div
>
{
/* <div>
<
div
>
当前高度:
{
this
.
state
.
inputvalue
==
0
&&
this
.
state
.
datazoom
==
false
?
`
${
0
}
`
:
this
.
state
.
inputvalue
!=
0
&&
this
.
state
.
datazoom
==
false
?
`
${
this
.
state
.
inputvalue
}
`
:
this
.
state
.
datazoom
==
true
?
this
.
state
.
datazoomHundred
==
true
?
`
${
this
.
state
.
altitudeHundred
}
`
:
`
${
this
.
state
.
altitude
}
`
:
`
${
this
.
state
.
inputvalue
}
`
}
<
/div
>
<input ref="inputvalue" defaultValue='0' onChange={()=>this.inputChangeValue()} style={{width:'30%',textAlign:'center'}}/>
<
div
>
当前时间:
{
this
.
state
.
inputtime
==
-
100
&&
this
.
state
.
datazoomEnd
==
false
?
`
${
-
100
}
`
:
this
.
state
.
inputtime
!=
-
100
&&
this
.
state
.
datazoomEnd
==
false
?
`
${
this
.
state
.
inputtime
}
`
:
this
.
state
.
datazoomEnd
==
true
?
`
${
this
.
state
.
requestDuration
}
`
:
`
${
this
.
state
.
inputtime
}
`
}
<
/div
>
<button onClick={()=>this.getInputHeight()} style={{cursor:'pointer'}}>切换高度</button>
</div>
<div>
<input ref="inputtime" defaultValue='-100' onChange={()=>this.inputChangeTime()} style={{width:'30%',textAlign:'center'}}/>
<button onClick={()=>this.getInputTime()} style={{cursor:'pointer'}}>切换时间</button>
</div> */
}
{
/* <div>当前高度:{this.state.inputvalue}</div> */
}
<
div
>
当前高度:
{
this
.
state
.
inputvalue
==
0
&&
this
.
state
.
datazoom
==
false
?
`
${
0
}
`
:
this
.
state
.
inputvalue
!=
0
&&
this
.
state
.
datazoom
==
false
?
`
${
this
.
state
.
inputvalue
}
`
:
this
.
state
.
datazoom
==
true
?
`
${
this
.
state
.
altitude
}
`
:
`
${
this
.
state
.
inputvalue
}
`
}
<
/div
>
{
/* <div>当前时间:{this.state.inputtime == -100 ? `${-100}` : this.state.inputtime}</div> */
}
<
div
>
当前时间:
{
this
.
state
.
inputtime
==
-
100
&&
this
.
state
.
datazoomEnd
==
false
?
`
${
-
100
}
`
:
this
.
state
.
inputtime
!=
-
100
&&
this
.
state
.
datazoomEnd
==
false
?
`
${
this
.
state
.
inputtime
}
`
:
this
.
state
.
datazoomEnd
==
true
?
`
${
this
.
state
.
altitudeEnd
}
`
:
`
${
this
.
state
.
inputtime
}
`
}
<
/div
>
<
/div
>
<
/div
>
<
div
style
=
{{
position
:
'
relative
'
}}
>
<
div
style
=
{{
position
:
'
relative
'
}}
>
<
div
id
=
"
main
"
className
=
"
container
"
style
=
{{
position
:
'
relative
'
,
padding
:
'
50px
'
,
boxSizing
:
'
border-box
'
,
width
:
'
100%
'
,
height
:
900
}}
>
<
/div
>
<
div
id
=
"
main
"
className
=
"
container
"
style
=
{{
position
:
'
relative
'
,
padding
:
'
50px
'
,
boxSizing
:
'
border-box
'
,
width
:
'
100%
'
,
height
:
900
}}
>
<
/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