Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
W
WidgetUI
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
WuFeiyang
WidgetUI
Commits
3b63f695
Commit
3b63f695
authored
Jan 16, 2020
by
WuFeiyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
20200116
parent
edbde80b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
60 deletions
+63
-60
src/components/Status/Status.vue
src/components/Status/Status.vue
+1
-1
src/components/WaveView/setBasicParams.vue
src/components/WaveView/setBasicParams.vue
+62
-59
No files found.
src/components/Status/Status.vue
View file @
3b63f695
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
<div
<div
style=
"width:100%;overflow:auto;border-style: solid; border-width: 1px;"
style=
"width:100%;overflow:auto;border-style: solid; border-width: 1px;"
>
>
<p
style=
"float:left;margin:0px"
class=
"
valu
eFont"
>
{{
StatusValue
}}
</p>
<p
style=
"float:left;margin:0px"
class=
"
larg
eFont"
>
{{
StatusValue
}}
</p>
</div>
</div>
</b-col>
</b-col>
</b-row>
</b-row>
...
...
src/components/WaveView/setBasicParams.vue
View file @
3b63f695
...
@@ -80,6 +80,7 @@ export default class setBasicParams extends Vue {
...
@@ -80,6 +80,7 @@ export default class setBasicParams extends Vue {
xmin
:
any
;
xmin
:
any
;
xmax
:
any
;
xmax
:
any
;
nowDotNum
:
any
;
nowDotNum
:
any
;
GetAllDot
:
boolean
=
false
;
created
()
{
created
()
{
this
.
config
.
data
.
userInputData
=
this
.
userInputData
;
this
.
config
.
data
.
userInputData
=
this
.
userInputData
;
...
@@ -520,10 +521,10 @@ export default class setBasicParams extends Vue {
...
@@ -520,10 +521,10 @@ export default class setBasicParams extends Vue {
if
(
if
(
nowZoom_xmin
<
zoom_xmin
||
nowZoom_xmin
<
zoom_xmin
||
nowZoom_xmax
>
zoom_xmax
||
nowZoom_xmax
>
zoom_xmax
||
((
x_range
/
nowRange
)
*
this
.
nowDotNum
<
expectedDotNum
)
((
(
x_range
/
nowRange
)
*
this
.
nowDotNum
<
expectedDotNum
)
&&
(
this
.
GetAllDot
==
false
)
)
)
{
)
{
this
.
GetAllDot
=
false
;
expansionStartTime
=
Number
(
nowZoom_xmin
)
-
expansionMultiple
*
x_range
>=
this
.
xmin
?
Number
(
nowZoom_xmin
)
-
expansionMultiple
*
x_range
:
this
.
xmin
;
expansionStartTime
=
Number
(
nowZoom_xmin
)
-
expansionMultiple
*
x_range
>=
this
.
xmin
?
Number
(
nowZoom_xmin
)
-
expansionMultiple
*
x_range
:
this
.
xmin
;
expansionEndTime
=
Number
(
nowZoom_xmax
)
+
expansionMultiple
*
x_range
<=
this
.
xmax
?
Number
(
nowZoom_xmax
)
+
expansionMultiple
*
x_range
:
this
.
xmax
;
expansionEndTime
=
Number
(
nowZoom_xmax
)
+
expansionMultiple
*
x_range
<=
this
.
xmax
?
Number
(
nowZoom_xmax
)
+
expansionMultiple
*
x_range
:
this
.
xmax
;
console
.
log
(
expansionStartTime
);
console
.
log
(
expansionStartTime
);
...
@@ -550,49 +551,6 @@ export default class setBasicParams extends Vue {
...
@@ -550,49 +551,6 @@ export default class setBasicParams extends Vue {
getInputData
.
set
(
"
endTime
"
,
expansionEndTime
);
getInputData
.
set
(
"
endTime
"
,
expansionEndTime
);
getInputData
.
set
(
"
count
"
,
expansionDotNum
);
getInputData
.
set
(
"
count
"
,
expansionDotNum
);
var
url
=
pathProcessor
.
FillPathWithVar
(
getInputData
,
config
.
data
.
url
.
path
);
getData
(
url
);
//当点不够时取全部点并重新获取y轴
if
(
temp
.
data
==
null
)
{
getInputData
.
set
(
"
count
"
,
"
0
"
);
url
=
pathProcessor
.
FillPathWithVar
(
getInputData
,
config
.
data
.
url
.
path
);
getData
(
url
);
}
var
timeUrl
=
pathProcessor
.
FillPathWithVar
(
getInputData
,
config
.
data
.
url
.
timePath
);
console
.
log
(
url
);
console
.
log
(
timeUrl
);
getDataTimeAxis
(
timeUrl
);
getConfig
.
data
.
position
.
x1
=
zoom_xmin
;
getConfig
.
data
.
position
.
x2
=
zoom_xmax
;
getConfig
.
data
.
position
.
y1
=
zoom_ymin
;
getConfig
.
data
.
position
.
y2
=
zoom_ymax
;
updateConfig
();
var
data_update
=
[
{
x
:
temp
.
dataTimeAxis
,
y
:
temp
.
data
}
];
console
.
log
(
"
data_update
"
);
console
.
log
(
data_update
);
var
myplot
=
this
.
wave
;
var
myplot
=
this
.
wave
;
var
yRange
=
myplot
.
layout
.
yaxis
.
range
;
var
yRange
=
myplot
.
layout
.
yaxis
.
range
;
...
@@ -621,24 +579,25 @@ export default class setBasicParams extends Vue {
...
@@ -621,24 +579,25 @@ export default class setBasicParams extends Vue {
};
};
}
}
createChannelChart
(
this
.
myPlot
,
data_update
,
layout_update
);
getConfig
.
data
.
position
.
x1
=
zoom_xmin
;
this
.
zoom
();
getConfig
.
data
.
position
.
x2
=
zoom_xmax
;
getConfig
.
data
.
position
.
y1
=
zoom_ymin
;
getConfig
.
data
.
position
.
y2
=
zoom_ymax
;
updateConfig
();
this
.
showPlot
(
getInputData
,
layout_update
,
this
.
myPlot
);
}
}
}
}
});
});
this
.
myPlot
.
on
(
"
plotly_doubleclick
"
,
()
=>
{
// this.myPlot.on("plotly_doubleclick", ()=> {
nowRange
=
temp
.
dataTimeAxis
[
this
.
nowDotNum
-
1
];
// console.log("plotly_doubleclick");
createChannelChart
(
this
.
myPlot
,
this
.
data_initial
);
// createChannelChart(this.myPlot, this.data_initial);
this
.
zoom
();
// this.zoom();
});
// });
this
.
myPlot
.
on
(
"
plotly_click
"
,
(
data
:
any
)
=>
{
this
.
myPlot
.
on
(
"
plotly_click
"
,
(
data
:
any
)
=>
{
//当前区域的范围
//当前区域的范围
console
.
log
(
"
plotly_click
"
)
console
.
log
(
"
plotly_click
"
)
;
console
.
log
(
data
.
points
[
0
].
xaxis
.
range
);
console
.
log
(
data
.
points
[
0
].
xaxis
.
range
);
console
.
log
(
data
.
points
[
0
].
yaxis
.
range
);
console
.
log
(
data
.
points
[
0
].
yaxis
.
range
);
console
.
log
(
data
);
console
.
log
(
data
);
...
@@ -662,6 +621,50 @@ export default class setBasicParams extends Vue {
...
@@ -662,6 +621,50 @@ export default class setBasicParams extends Vue {
});
});
}
}
async
showPlot
(
getInputData
:
any
,
layout_update
:
any
,
myPlot
:
any
)
{
var
url
=
this
.
pathProcessor
.
FillPathWithVar
(
getInputData
,
this
.
config
.
data
.
url
.
path
);
await
this
.
getData
(
url
);
console
.
log
(
"
重加载getData
"
);
console
.
log
(
this
.
temp
.
data
);
//当点不够时取全部点并重新获取y轴
if
(
this
.
temp
.
data
==
null
)
{
getInputData
.
set
(
"
count
"
,
"
0
"
);
this
.
GetAllDot
=
true
;
url
=
this
.
pathProcessor
.
FillPathWithVar
(
getInputData
,
this
.
config
.
data
.
url
.
path
);
await
this
.
getData
(
url
);
}
var
timeUrl
=
this
.
pathProcessor
.
FillPathWithVar
(
getInputData
,
this
.
config
.
data
.
url
.
timePath
);
console
.
log
(
url
);
console
.
log
(
timeUrl
);
await
this
.
getDataTimeAxis
(
timeUrl
);
console
.
log
(
"
重加载getDataTimeAxis
"
);
console
.
log
(
this
.
temp
.
dataTimeAxis
);
var
data_update
=
[
{
x
:
this
.
temp
.
dataTimeAxis
,
y
:
this
.
temp
.
data
}
];
console
.
log
(
"
data_update
"
);
console
.
log
(
data_update
);
this
.
createChannelChart
(
myPlot
,
data_update
,
layout_update
);
this
.
zoom
();
}
addAnnotations
(
annotations
:
any
)
addAnnotations
(
annotations
:
any
)
{
{
...
...
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