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
ca847332
Commit
ca847332
authored
5 years ago
by
WuFeiyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
还差nivigation和样式
parent
32825d74
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
125 additions
and
95 deletions
+125
-95
src/components/Common/Navigation.vue
src/components/Common/Navigation.vue
+15
-8
src/components/Common/WidgetParams.vue
src/components/Common/WidgetParams.vue
+3
-3
src/components/Config/Config.vue
src/components/Config/Config.vue
+4
-4
src/components/Method/Method.vue
src/components/Method/Method.vue
+2
-2
src/components/State/State.vue
src/components/State/State.vue
+5
-6
src/components/Status/Status.vue
src/components/Status/Status.vue
+10
-10
src/components/Thing/Thing.vue
src/components/Thing/Thing.vue
+4
-0
src/components/WaveView/WaveView.vue
src/components/WaveView/WaveView.vue
+31
-29
src/components/WaveView/setBasicParams.vue
src/components/WaveView/setBasicParams.vue
+32
-20
src/components/WaveView/showViewInfo.vue
src/components/WaveView/showViewInfo.vue
+19
-13
No files found.
src/components/Common/Navigation.vue
View file @
ca847332
<
template
id=
"setBasicParams"
>
<
template
id=
"setBasicParams"
>
<div>
<div>
<b-dropdown
id=
"dropdown-1"
text=
"Navigation"
variant=
"primary"
>
<br>
<b-dropdown-item
v-show=
"isShowParentPath"
>
<b-button
variant=
"primary"
class=
"smallFont"
@
click=
"showNavigation"
style=
"float:right"
>
Navigation
</b-button>
<br>
<div
v-show=
"isShowNavigation&&isShowParentPath"
>
<a
class=
"smallFont"
:href=
"parentPath"
style=
"float:left"
>
parentPath:
{{
parentPath
}}
</a>
<a
class=
"smallFont"
:href=
"parentPath"
style=
"float:left"
>
parentPath:
{{
parentPath
}}
</a>
</b-dropdown-item
>
</div
>
<b-dropdown-item
v-for=
"path in childrenPath"
:key=
"path
"
>
<div
v-show=
"isShowNavigation"
v-for=
"(path, index) in childrenPath"
:key=
"index
"
>
<a
class=
"smallFont"
:href=
"path"
style=
"float:left"
>
childrenPath:
{{
path
}}
</a><br>
<a
class=
"smallFont"
:href=
"path"
style=
"float:left"
>
childrenPath:
{{
path
}}
</a><br>
</b-dropdown-item>
</div>
</b-dropdown>
</div>
</div>
</
template
>
</
template
>
...
@@ -34,6 +35,7 @@ export default class Navigation extends Vue {
...
@@ -34,6 +35,7 @@ export default class Navigation extends Vue {
parentPath
!
:
string
;
parentPath
!
:
string
;
childrenPath
!
:
string
[];
childrenPath
!
:
string
[];
isShowParentPath
:
boolean
=
false
;
isShowParentPath
:
boolean
=
false
;
isShowNavigation
:
boolean
=
false
;
@
Watch
(
"
url
"
)
@
Watch
(
"
url
"
)
onUrlChanged
(){
onUrlChanged
(){
...
@@ -53,6 +55,11 @@ export default class Navigation extends Vue {
...
@@ -53,6 +55,11 @@ export default class Navigation extends Vue {
this
.
$forceUpdate
();
this
.
$forceUpdate
();
}
}
showNavigation
()
{
this
.
isShowNavigation
=
!
this
.
isShowNavigation
;
}
}
}
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
...
...
This diff is collapsed.
Click to expand it.
src/components/Common/WidgetParams.vue
View file @
ca847332
<
template
>
<
template
>
<div
style=
"width:100%"
>
<div
style=
"width:100%"
>
<div
v-for=
"(label, index) in userInputData.keys()"
:key=
"index"
>
<div
v-for=
"(label, index) in userInputData.keys()"
:key=
"index"
>
<b-input-group
style=
"margin:5px"
>
<b-input-group
s
ize=
"lg"
s
tyle=
"margin:5px"
>
<b-input-group-text
class=
"smallFont"
>
{{
label
}}
</b-input-group-text>
<b-input-group-text>
{{
label
}}
</b-input-group-text>
<b-form-input
class=
"smallFont"
v-model=
"tempUserInputData[label]"
></b-form-input>
<b-form-input
v-model=
"tempUserInputData[label]"
></b-form-input>
</b-input-group>
</b-input-group>
</div>
</div>
<div
style=
"width:100%;margin:5px"
>
<div
style=
"width:100%;margin:5px"
>
...
...
This diff is collapsed.
Click to expand it.
src/components/Config/Config.vue
View file @
ca847332
...
@@ -23,10 +23,10 @@
...
@@ -23,10 +23,10 @@
<div
v-show=
"isShowGetPath"
>
<div
v-show=
"isShowGetPath"
>
<hr
/>
<hr
/>
</div>
</div>
<b-input-group
class=
"smallFont
"
prepend=
"getPath"
v-show=
"isShowGetPath"
>
<b-input-group
size=
"lg
"
prepend=
"getPath"
v-show=
"isShowGetPath"
>
<b-form-input
v-model=
"config.data.get.url"
></b-form-input>
<b-form-input
v-model=
"config.data.get.url"
></b-form-input>
<b-input-group-append>
<b-input-group-append>
<b-button
@
click=
"updateGetUI"
size=
"sm"
text=
"Button"
variant=
"primary"
>
OK
</b-button>
<b-button
@
click=
"updateGetUI"
text=
"Button"
variant=
"primary"
>
OK
</b-button>
<b-button
variant=
"info"
@
click=
"getPathPoke"
>
poke
</b-button>
<b-button
variant=
"info"
@
click=
"getPathPoke"
>
poke
</b-button>
</b-input-group-append>
</b-input-group-append>
</b-input-group>
</b-input-group>
...
@@ -43,10 +43,10 @@
...
@@ -43,10 +43,10 @@
<div>
<div>
<hr
v-show=
"isShowSetPath"
/>
<hr
v-show=
"isShowSetPath"
/>
</div>
</div>
<b-input-group
class=
"smallFont
"
prepend=
"setPath"
v-show=
"isShowSetPath"
>
<b-input-group
size=
"lg
"
prepend=
"setPath"
v-show=
"isShowSetPath"
>
<b-form-input
v-model=
"config.data.set.url"
></b-form-input>
<b-form-input
v-model=
"config.data.set.url"
></b-form-input>
<b-input-group-append>
<b-input-group-append>
<b-button
@
click=
"updateSetUI"
size=
"sm"
text=
"Button"
variant=
"primary"
>
OK
</b-button>
<b-button
@
click=
"updateSetUI"
text=
"Button"
variant=
"primary"
>
OK
</b-button>
<b-button
variant=
"info"
@
click=
"setPathPoke"
>
poke
</b-button>
<b-button
variant=
"info"
@
click=
"setPathPoke"
>
poke
</b-button>
</b-input-group-append>
</b-input-group-append>
</b-input-group>
</b-input-group>
...
...
This diff is collapsed.
Click to expand it.
src/components/Method/Method.vue
View file @
ca847332
...
@@ -13,10 +13,10 @@
...
@@ -13,10 +13,10 @@
<span
style=
"float:left;"
class=
"largeFont"
>
{{
StatusValue
}}
</span>
<span
style=
"float:left;"
class=
"largeFont"
>
{{
StatusValue
}}
</span>
<div
v-show=
"isShowPath"
><hr
/></div>
<div
v-show=
"isShowPath"
><hr
/></div>
</div>
</div>
<b-input-group
class=
"smallFont"
prepend=
"path"
v-show=
"isShowPath"
>
<b-input-group
size=
"lg"
prepend=
"path"
v-show=
"isShowPath"
>
<b-form-input
v-model=
"config.data.url"
></b-form-input>
<b-form-input
v-model=
"config.data.url"
></b-form-input>
<b-input-group-append>
<b-input-group-append>
<b-button
@
click=
"updateUI"
size=
"sm"
text=
"Button"
variant=
"primary"
>
OK
</b-button>
<b-button
@
click=
"updateUI"
text=
"Button"
variant=
"primary"
>
OK
</b-button>
<b-button
variant=
"info"
@
click=
"pathPoke"
>
poke
</b-button>
<b-button
variant=
"info"
@
click=
"pathPoke"
>
poke
</b-button>
</b-input-group-append>
</b-input-group-append>
</b-input-group>
</b-input-group>
...
...
This diff is collapsed.
Click to expand it.
src/components/State/State.vue
View file @
ca847332
...
@@ -7,16 +7,15 @@
...
@@ -7,16 +7,15 @@
<b-col>
<b-col>
<b-button
@
click=
"showPathConfig"
variant=
"primary"
style=
"float:right"
><span
class=
"glyphicon glyphicon-cog"
></span></b-button>
<b-button
@
click=
"showPathConfig"
variant=
"primary"
style=
"float:right"
><span
class=
"glyphicon glyphicon-cog"
></span></b-button>
</b-col>
</b-col>
<div
v-show=
"isShowPath"
><
hr
/><
/div>
<div
v-show=
"isShowPath"
></div>
</b-row>
</b-row>
<div
style=
"width:100%"
>
<div
style=
"width:100%;border-style: solid; border-width: 1px;"
>
<span
style=
"float:left;"
class=
"largeFont"
>
{{
StatusValue
}}
</span>
<p
style=
"float:left;"
class=
"largeFont"
>
{{
StatusValue
}}
</p>
<div
v-show=
"isShowPath"
><hr
/></div>
</div>
</div>
<b-input-group
class=
"smallFont
"
prepend=
"path"
v-show=
"isShowPath"
>
<b-input-group
size=
"lg
"
prepend=
"path"
v-show=
"isShowPath"
>
<b-form-input
v-model=
"config.data.url"
></b-form-input>
<b-form-input
v-model=
"config.data.url"
></b-form-input>
<b-input-group-append>
<b-input-group-append>
<b-button
@
click=
"updateUI"
size=
"sm"
text=
"Button"
variant=
"primary"
>
OK
</b-button>
<b-button
@
click=
"updateUI"
text=
"Button"
variant=
"primary"
>
OK
</b-button>
<b-button
variant=
"info"
@
click=
"pathPoke"
>
poke
</b-button>
<b-button
variant=
"info"
@
click=
"pathPoke"
>
poke
</b-button>
</b-input-group-append>
</b-input-group-append>
</b-input-group>
</b-input-group>
...
...
This diff is collapsed.
Click to expand it.
src/components/Status/Status.vue
View file @
ca847332
...
@@ -13,10 +13,10 @@
...
@@ -13,10 +13,10 @@
<span
style=
"float:left;"
class=
"largeFont"
>
{{
StatusValue
}}
</span>
<span
style=
"float:left;"
class=
"largeFont"
>
{{
StatusValue
}}
</span>
<div
v-show=
"isShowPath"
><hr
/></div>
<div
v-show=
"isShowPath"
><hr
/></div>
</div>
</div>
<b-input-group
class=
"smallFont
"
prepend=
"path"
v-show=
"isShowPath"
>
<b-input-group
size=
"lg
"
prepend=
"path"
v-show=
"isShowPath"
>
<b-form-input
v-model=
"config.data.url"
></b-form-input>
<b-form-input
v-model=
"config.data.url"
></b-form-input>
<b-input-group-append>
<b-input-group-append>
<b-button
@
click=
"updateUI"
size=
"sm"
text=
"Button"
variant=
"primary"
>
OK
</b-button>
<b-button
@
click=
"updateUI"
text=
"Button"
variant=
"primary"
>
OK
</b-button>
<b-button
variant=
"info"
@
click=
"pathPoke"
>
poke
</b-button>
<b-button
variant=
"info"
@
click=
"pathPoke"
>
poke
</b-button>
</b-input-group-append>
</b-input-group-append>
</b-input-group>
</b-input-group>
...
@@ -74,15 +74,15 @@ export default class Status extends Widget {
...
@@ -74,15 +74,15 @@ export default class Status extends Widget {
this
.
config
.
data
.
userInputData
=
this
.
strMapObjChange
.
strMapToObj
(
this
.
userInputData
);
this
.
config
.
data
.
userInputData
=
this
.
strMapObjChange
.
strMapToObj
(
this
.
userInputData
);
}
}
mounted
()
//
mounted()
{
//
{
this
.
timer
=
setInterval
(
this
.
refresh
,
1000
);
//
this.timer = setInterval(this.refresh,1000);
}
//
}
destroyed
()
//
destroyed()
{
//
{
clearInterval
(
this
.
timer
);
//
clearInterval(this.timer);
}
//
}
updateUI
()
{
updateUI
()
{
this
.
isShowPath
=
false
;
this
.
isShowPath
=
false
;
...
...
This diff is collapsed.
Click to expand it.
src/components/Thing/Thing.vue
View file @
ca847332
...
@@ -39,6 +39,10 @@ export default class Thing extends Widget {
...
@@ -39,6 +39,10 @@ export default class Thing extends Widget {
this
.
config
.
data
.
url
.
replace
(
'
$startPath$
'
,
startPath
);
this
.
config
.
data
.
url
.
replace
(
'
$startPath$
'
,
startPath
);
}
}
samplePoke
(
sample
:
any
){}
pathPoke
(){}
parentUpdate
(
payload
:
UpdatePayload
):
void
{
parentUpdate
(
payload
:
UpdatePayload
):
void
{
}
}
...
...
This diff is collapsed.
Click to expand it.
src/components/WaveView/WaveView.vue
View file @
ca847332
<
template
>
<
template
>
<div
class=
"waveView"
>
<div
class=
"waveView"
>
<showViewInfo
:pathId=
"pathId
"
></showViewInfo>
<showViewInfo
ref=
"showViewInfo"
:pathId=
"pathId"
@
showPathIdConfig=
"showPathIdConfig
"
></showViewInfo>
<div
ref=
"wave"
>
<div
ref=
"wave"
>
</div>
</div>
<setBasicParams
ref=
"setBasicParams"
@
getPathId=
"getPathId"
@
updateConfig=
"updateConfig"
:wave=
"wave"
:setConfig=
'config'
></setBasicParams>
<setBasicParams
ref=
"setBasicParams"
@
getPathId=
"getPathId"
@
updateConfig=
"updateConfig"
:wave=
"wave"
:setConfig=
'config'
@
pathPoke=
"pathPoke"
></setBasicParams>
<Navigation
ref=
"FamilyLink"
:url=
"config.data.url"
></Navigation>
<Navigation
ref=
"FamilyLink"
:url=
"config.data.url"
style=
"margin-top:30px"
></Navigation>
</div>
</div>
</
template
>
</
template
>
...
@@ -71,6 +71,9 @@ export default class waveView extends Widget {
...
@@ -71,6 +71,9 @@ export default class waveView extends Widget {
}
}
parentUpdate
(
payload
:
UpdatePayload
):
void
{
parentUpdate
(
payload
:
UpdatePayload
):
void
{
}
showPathIdConfig
(){
(
this
.
$refs
.
setBasicParams
as
setBasicParams
).
showPathIdConfig
();
}
}
refresh
()
{
refresh
()
{
(
this
.
$refs
.
setBasicParams
as
setBasicParams
).
refresh
();
(
this
.
$refs
.
setBasicParams
as
setBasicParams
).
refresh
();
...
@@ -96,7 +99,9 @@ export default class waveView extends Widget {
...
@@ -96,7 +99,9 @@ export default class waveView extends Widget {
var
temp
=
sample
.
Actions
.
get
.
Parameters
;
var
temp
=
sample
.
Actions
.
get
.
Parameters
;
temp
=
JSON
.
parse
(
JSON
.
stringify
(
temp
));
temp
=
JSON
.
parse
(
JSON
.
stringify
(
temp
));
console
.
log
(
temp
);
temp
=
this
.
strMapObjChange
.
objToStrMap
(
temp
);
temp
=
this
.
strMapObjChange
.
objToStrMap
(
temp
);
console
.
log
(
temp
);
var
Parameters
:
Map
<
string
,
string
>
;
var
Parameters
:
Map
<
string
,
string
>
;
Parameters
=
temp
;
Parameters
=
temp
;
...
@@ -108,22 +113,19 @@ export default class waveView extends Widget {
...
@@ -108,22 +113,19 @@ export default class waveView extends Widget {
}
}
pokedPath
=
pokedPath
+
key
+
"
=$
"
+
key
+
"
$&
"
;
pokedPath
=
pokedPath
+
key
+
"
=$
"
+
key
+
"
$&
"
;
});
});
if
(
count
!=
0
)
if
(
count
!=
0
)
{
{
pokedPath
=
pokedPath
.
substring
(
0
,
pokedPath
.
length
-
1
);
pokedPath
=
pokedPath
.
substring
(
0
,
pokedPath
.
length
-
1
);
}
}
this
.
config
.
data
.
url
=
pokedPath
;
this
.
config
.
data
.
url
=
pokedPath
;
}
}
pathPoke
()
pathPoke
()
{
{
var
f
=
this
.
config
.
data
.
url
;
var
f
=
this
.
config
.
data
.
url
;
var
pokepath
=
"
a
"
;
var
pokepath
=
"
a
"
;
pokepath
=
f
;
pokepath
=
f
;
axios
.
get
(
pokepath
).
then
(
response
=>
{
axios
.
get
(
this
.
config
.
data
.
url
).
then
(
response
=>
{
this
.
samplePoke
(
response
.
data
);
this
.
samplePoke
(
response
.
data
);
this
.
updateUI
();
})
})
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
src/components/WaveView/setBasicParams.vue
View file @
ca847332
<
template
id=
"setBasicParams"
>
<
template
>
<div
class=
"panel-body row"
>
<div>
<div
v-show=
"isShowCog"
style=
"width:100%"
>
<div
v-show=
"isShowCog"
style=
"width:100%"
>
<b-input-group
prepend=
"Channel Path"
>
<b-input-group
size=
"lg"
prepend=
"Channel Path"
>
<b-input
v-model=
"config.data.url"
></b-input>
<b-input
v-model=
"config.data.url"
></b-input>
<b-input-group-addon>
<b-input-group-addon>
<b-button
variant=
"primary"
@
click=
"getPathIdParams"
>
OK
<span
class=
"glyphicon glyphicon-save"
></span></b-button>
<b-button
variant=
"primary"
@
click=
"getPathIdParams"
>
OK
<span
class=
"glyphicon glyphicon-save"
></span></b-button>
<
!--
<b-button
variant=
"info"
@
click=
""
>
poke
</b-button>
--
>
<
b-button
variant=
"info"
@
click=
"pathPoke"
>
poke
</b-button
>
</b-input-group-addon>
</b-input-group-addon>
</b-input-group>
</b-input-group>
</div>
</div>
<WidgetParams
ref=
"WidgetParams"
v-show=
"isShowLoad"
action=
"get"
@
updataVariables=
"viewLoad"
></WidgetParams>
<WidgetParams
ref=
"WidgetParams"
v-show=
"isShowLoad"
action=
"get"
@
updataVariables=
"viewLoad"
></WidgetParams>
<b-button
variant=
"primary"
@
click=
"showPathIdConfig"
style=
"width:100%"
>
<span
class=
"glyphicon glyphicon-cog"
></span>
</b-button>
</div>
</div>
</
template
>
</
template
>
...
@@ -24,7 +21,7 @@ import global_ from '@/components/Common/global.vue';
...
@@ -24,7 +21,7 @@ import global_ from '@/components/Common/global.vue';
import
{
WidgetConfig
}
from
"
@/models/WidgetConfig
"
;
import
{
WidgetConfig
}
from
"
@/models/WidgetConfig
"
;
import
{
UpdatePayload
}
from
"
@/models/UpdatePayload
"
;
import
{
UpdatePayload
}
from
"
@/models/UpdatePayload
"
;
import
PathProcessor
from
"
@/models/PathProcessor
"
;
import
PathProcessor
from
"
@/models/PathProcessor
"
;
import
{
forEach
}
from
"
typescript-collections/dist/lib/arrays
"
;
import
{
forEach
,
indexOf
}
from
"
typescript-collections/dist/lib/arrays
"
;
import
{
map
}
from
"
d3
"
;
import
{
map
}
from
"
d3
"
;
import
WidgetParams
from
"
@/components/Common/WidgetParams.vue
"
;
import
WidgetParams
from
"
@/components/Common/WidgetParams.vue
"
;
import
StrMapObjChange
from
"
@/models/StrMapObjChange
"
;
import
StrMapObjChange
from
"
@/models/StrMapObjChange
"
;
...
@@ -72,6 +69,9 @@ export default class setBasicParams extends Vue {
...
@@ -72,6 +69,9 @@ export default class setBasicParams extends Vue {
};
};
this
.
viewLoad
(
Args
);
this
.
viewLoad
(
Args
);
}
}
pathPoke
(){
this
.
$emit
(
"
pathPoke
"
);
}
setConfig
(
config
:
WidgetConfig
)
{
setConfig
(
config
:
WidgetConfig
)
{
(
this
.
$refs
.
WidgetParams
as
WidgetParams
).
setVariableInput
(
config
.
data
.
userInputData
);
(
this
.
$refs
.
WidgetParams
as
WidgetParams
).
setVariableInput
(
config
.
data
.
userInputData
);
this
.
config
=
config
;
this
.
config
=
config
;
...
@@ -93,7 +93,6 @@ export default class setBasicParams extends Vue {
...
@@ -93,7 +93,6 @@ export default class setBasicParams extends Vue {
}
}
this
.
updateConfig
();
this
.
updateConfig
();
var
url
=
this
.
config
.
data
.
url
;
var
url
=
this
.
config
.
data
.
url
;
this
.
pathId
=
url
.
slice
(
0
,
url
.
indexOf
(
"
/
"
));
(
this
.
$refs
.
WidgetParams
as
WidgetParams
).
setVariableList
(
(
this
.
$refs
.
WidgetParams
as
WidgetParams
).
setVariableList
(
this
.
pathProcessor
.
extractVarFromPath
(
url
)
this
.
pathProcessor
.
extractVarFromPath
(
url
)
);
);
...
@@ -118,11 +117,23 @@ export default class setBasicParams extends Vue {
...
@@ -118,11 +117,23 @@ export default class setBasicParams extends Vue {
this
.
config
.
data
.
userInputData
,
this
.
config
.
data
.
userInputData
,
this
.
config
.
data
.
url
this
.
config
.
data
.
url
);
);
console
.
log
(
this
.
config
);
var
first
=
url
.
indexOf
(
"
/
"
);
var
second
=
url
.
indexOf
(
"
/
"
,
first
+
1
);
var
third
=
url
.
indexOf
(
"
/
"
,
second
+
1
)
this
.
pathId
=
url
.
slice
(
second
+
1
,
third
);
var
thingPath
=
url
.
slice
(
0
,
url
.
indexOf
(
'
/
'
,
2
))
var
path
=
this
.
pathId
;
var
path
=
this
.
pathId
;
this
.
$emit
(
"
getPathId
"
,
path
);
var
dealPath
=
{
await
this
.
getData
(
url
);
thingPath
:
thingPath
,
await
this
.
getDataTimeAxis
(
url
);
path
:
path
}
var
dealFillPath
=
{
url
:
url
.
slice
(
url
.
indexOf
(
'
/
'
,
1
)
+
1
),
thingPath
:
thingPath
}
this
.
$emit
(
"
getPathId
"
,
dealPath
);
await
this
.
getData
(
dealFillPath
);
await
this
.
getDataTimeAxis
(
dealFillPath
);
var
myPlot
=
this
.
wave
;
var
myPlot
=
this
.
wave
;
var
data_initial
=
[
var
data_initial
=
[
{
{
...
@@ -223,18 +234,19 @@ export default class setBasicParams extends Vue {
...
@@ -223,18 +234,19 @@ export default class setBasicParams extends Vue {
displaylogo
:
false
displaylogo
:
false
};
};
//
Plotly.newPlot(myPlot, data_update, data_layout, config);
Plotly
.
newPlot
(
myPlot
,
data_update
,
data_layout
,
config
);
}
}
async
getData
(
url
:
string
)
{
async
getData
(
url
:
any
)
{
var
apiLoad
=
"
/dataserver
"
+
"
/DataByTimeFuzzy/
"
+
url
;
//改
var
apiLoad
=
url
.
thingPath
+
"
/DataByTimeFuzzy/
"
+
url
.
url
;
console
.
log
(
apiLoad
);
//改
await
axios
.
get
(
apiLoad
).
then
(
response
=>
{
await
axios
.
get
(
apiLoad
).
then
(
response
=>
{
this
.
temp
.
data
=
response
.
data
.
ObjectVal
;
this
.
temp
.
data
=
response
.
data
.
CFET2CORE_SAMPLE_VAL
;
});
});
}
}
async
getDataTimeAxis
(
url
:
string
)
{
async
getDataTimeAxis
(
url
:
any
)
{
var
apiLoad
=
"
/dataerver
"
+
"
/DataByTimeFuzzyTimeAxis/
"
+
url
;
var
apiLoad
=
url
.
thingPath
+
"
/DataByTimeFuzzyTimeAxis/
"
+
url
.
url
;
await
axios
.
get
(
apiLoad
).
then
(
response
=>
{
await
axios
.
get
(
apiLoad
).
then
(
response
=>
{
this
.
temp
.
dataTimeAxis
=
response
.
data
.
ObjectVal
;
this
.
temp
.
dataTimeAxis
=
response
.
data
.
CFET2CORE_SAMPLE_VAL
;
});
});
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
src/components/WaveView/showViewInfo.vue
View file @
ca847332
...
@@ -2,7 +2,10 @@
...
@@ -2,7 +2,10 @@
<div
class=
"largeFont"
style=
"float:left width:100%"
>
<div
class=
"largeFont"
style=
"float:left width:100%"
>
<span>
Basic Path :
{{
basePathId
}}
</span><br>
<span>
Basic Path :
{{
basePathId
}}
</span><br>
<span>
Rate:
{{
sampleId
}}
</span><br>
<span>
Rate:
{{
sampleId
}}
</span><br>
<span>
length:
{{
lengthId
}}
</span><br>
<span>
length:
{{
lengthId
}}
</span>
<b-button
variant=
"primary"
style=
"float:right"
>
<span
class=
"glyphicon glyphicon-cog"
@
click=
"showPathIdConfig"
></span>
</b-button>
<hr
/>
<hr
/>
</div>
</div>
</
template
>
</
template
>
...
@@ -18,34 +21,37 @@ export default class showViewInfo extends Vue {
...
@@ -18,34 +21,37 @@ export default class showViewInfo extends Vue {
sampleId
:
string
=
''
;
sampleId
:
string
=
''
;
lengthId
:
string
=
''
;
lengthId
:
string
=
''
;
@
Watch
(
'
pathId
'
)
@
Watch
(
'
pathId
'
)
onPathIdChanged
(
val
:
string
,
oldVal
:
string
)
{
onPathIdChanged
(
val
:
any
,
oldVal
:
any
)
{
this
.
show
(
val
);
this
.
show
(
val
);
}
}
showPathIdConfig
(){
this
.
$emit
(
"
showPathIdConfig
"
);
}
async
show
(
pathId
:
string
)
{
async
show
(
pathId
:
string
)
{
this
.
getBasePath
();
this
.
getBasePath
(
pathId
);
this
.
getSamplerate
(
pathId
);
this
.
getSamplerate
(
pathId
);
this
.
getLength
(
pathId
);
this
.
getLength
(
pathId
);
}
}
async
getBasePath
()
{
async
getBasePath
(
pathId
:
any
)
{
var
apiLoad
=
"
/dataserver
"
+
'
/basepath
'
;
var
apiLoad
=
pathId
.
thingPath
+
'
/basepath
'
;
await
axios
.
get
(
apiLoad
)
await
axios
.
get
(
apiLoad
)
.
then
((
response
)
=>
{
.
then
((
response
)
=>
{
this
.
basePathId
=
response
.
data
.
ObjectVal
;
this
.
basePathId
=
response
.
data
.
CFET2CORE_SAMPLE_VAL
;
})
})
}
}
async
getSamplerate
(
pathId
:
string
)
{
async
getSamplerate
(
pathId
:
any
)
{
var
apiLoad
=
"
/dataserver
"
+
'
/samplerate/
'
+
pathId
;
var
apiLoad
=
pathId
.
thingPath
+
'
/samplerate/
'
+
pathId
.
path
;
await
axios
.
get
(
apiLoad
)
await
axios
.
get
(
apiLoad
)
.
then
((
response
)
=>
{
.
then
((
response
)
=>
{
this
.
sampleId
=
response
.
data
.
ObjectVal
;
this
.
sampleId
=
response
.
data
.
CFET2CORE_SAMPLE_VAL
;
})
})
}
}
async
getLength
(
pathId
:
string
)
{
async
getLength
(
pathId
:
any
)
{
var
apiLoad
=
"
/dataserver
"
+
'
/length/
'
+
pathId
;
var
apiLoad
=
pathId
.
thingPath
+
'
/length/
'
+
pathId
.
path
;
console
.
log
(
apiLoad
);
await
axios
.
get
(
apiLoad
)
await
axios
.
get
(
apiLoad
)
.
then
((
response
)
=>
{
.
then
((
response
)
=>
{
this
.
lengthId
=
response
.
data
.
ObjectVal
;
this
.
lengthId
=
response
.
data
.
CFET2CORE_SAMPLE_VAL
;
})
})
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
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