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
73be3a92
Commit
73be3a92
authored
Sep 25, 2019
by
WuFeiyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
版本1.3 修复了waveparams显示bug
parent
904e5ad2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
64 additions
and
7 deletions
+64
-7
src/components/WaveView/WaveView.vue
src/components/WaveView/WaveView.vue
+46
-4
src/components/WaveView/setBasicParams.vue
src/components/WaveView/setBasicParams.vue
+18
-3
No files found.
src/components/WaveView/WaveView.vue
View file @
73be3a92
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<div
ref=
"wave"
>
<div
ref=
"wave"
>
</div>
</div>
<setBasicParams
ref=
"setBasicParams"
@
getPathId=
"getPathId"
@
updateConfig=
"updateConfig"
:wave=
"wave"
:setConfig=
'config'
@
pathPoke=
"pathPoke"
></setBasicParams>
<setBasicParams
ref=
"setBasicParams"
@
getPathId=
"getPathId"
@
updateConfig=
"updateConfig"
:wave=
"wave"
:setConfig=
'config'
@
pathPoke=
"pathPoke"
@
pathPokeTime=
"pathPokeTime"
></setBasicParams>
<Navigation
ref=
"FamilyLink"
:url=
"config.data.url.path"
style=
"margin-top:30px"
></Navigation>
<Navigation
ref=
"FamilyLink"
:url=
"config.data.url.path"
style=
"margin-top:30px"
></Navigation>
</div>
</div>
</
template
>
</
template
>
...
@@ -98,7 +98,6 @@ export default class waveView extends Widget {
...
@@ -98,7 +98,6 @@ export default class waveView extends Widget {
samplePoke
(
sample
:
any
)
samplePoke
(
sample
:
any
)
{
{
var
samplePath
=
sample
.
CFET2CORE_SAMPLE_PATH
;
var
samplePath
=
sample
.
CFET2CORE_SAMPLE_PATH
;
console
.
log
(
samplePath
);
var
pokedPath
:
string
;
var
pokedPath
:
string
;
pokedPath
=
samplePath
;
pokedPath
=
samplePath
;
var
count
:
number
=
0
;
var
count
:
number
=
0
;
...
@@ -125,7 +124,35 @@ export default class waveView extends Widget {
...
@@ -125,7 +124,35 @@ export default class waveView extends Widget {
}
}
this
.
config
.
data
.
url
.
path
=
pokedPath
;
this
.
config
.
data
.
url
.
path
=
pokedPath
;
}
}
samplePokeTime
(
sample
:
any
)
{
var
samplePath
=
sample
.
CFET2CORE_SAMPLE_PATH
;
var
pokedPath
:
string
;
pokedPath
=
samplePath
;
var
count
:
number
=
0
;
var
temp
=
sample
.
Actions
.
get
.
Parameters
;
temp
=
JSON
.
parse
(
JSON
.
stringify
(
temp
));
console
.
log
(
temp
);
temp
=
this
.
strMapObjChange
.
objToStrMap
(
temp
);
console
.
log
(
temp
);
var
Parameters
:
Map
<
string
,
string
>
;
Parameters
=
temp
;
Parameters
.
forEach
((
value
,
key
)
=>
{
count
++
;
if
(
count
==
1
)
{
pokedPath
=
pokedPath
+
"
?
"
;
}
pokedPath
=
pokedPath
+
key
+
"
=$
"
+
key
+
"
$&
"
;
});
if
(
count
!=
0
)
{
pokedPath
=
pokedPath
.
substring
(
0
,
pokedPath
.
length
-
1
);
}
this
.
config
.
data
.
url
.
timePath
=
pokedPath
;
}
async
pathPoke
()
async
pathPoke
()
{
{
(
this
.
$refs
.
setBasicParams
as
setBasicParams
).
updateConfig
();
(
this
.
$refs
.
setBasicParams
as
setBasicParams
).
updateConfig
();
...
@@ -136,9 +163,24 @@ export default class waveView extends Widget {
...
@@ -136,9 +163,24 @@ export default class waveView extends Widget {
await
axios
.
get
(
this
.
config
.
data
.
url
.
path
).
then
(
response
=>
{
await
axios
.
get
(
this
.
config
.
data
.
url
.
path
).
then
(
response
=>
{
this
.
samplePoke
(
response
.
data
);
this
.
samplePoke
(
response
.
data
);
});
});
if
(
this
.
config
.
data
.
url
.
path
!=
''
&&
this
.
config
.
data
.
url
.
timePath
!=
''
){
(
this
.
$refs
.
setBasicParams
as
setBasicParams
).
getPathIdParams
();
(
this
.
$refs
.
setBasicParams
as
setBasicParams
).
getPathIdParams
();
}
}
}
async
pathPokeTime
()
{
(
this
.
$refs
.
setBasicParams
as
setBasicParams
).
updateConfig
();
var
f
=
this
.
config
.
data
.
url
.
timePath
;
var
pokepath
=
"
a
"
;
pokepath
=
f
;
console
.
log
(
this
.
config
.
data
.
url
.
timePath
);
await
axios
.
get
(
this
.
config
.
data
.
url
.
timePath
).
then
(
response
=>
{
this
.
samplePokeTime
(
response
.
data
);
});
if
(
this
.
config
.
data
.
url
.
path
!=
''
&&
this
.
config
.
data
.
url
.
timePath
!=
''
){
(
this
.
$refs
.
setBasicParams
as
setBasicParams
).
getPathIdParams
();
}
}
}
}
</
script
>
</
script
>
...
...
src/components/WaveView/setBasicParams.vue
View file @
73be3a92
...
@@ -3,12 +3,13 @@
...
@@ -3,12 +3,13 @@
<div
v-show=
"isShowCog"
style=
"width:100%"
>
<div
v-show=
"isShowCog"
style=
"width:100%"
>
<b-input-group
size=
"lg"
prepend=
"Channel Path"
>
<b-input-group
size=
"lg"
prepend=
"Channel Path"
>
<b-input
v-model=
"config.data.url.path"
></b-input>
<b-input
v-model=
"config.data.url.path"
></b-input>
<b-button
variant=
"info"
@
click=
"pathPoke"
>
poke
</b-button>
</b-input-group><br>
</b-input-group><br>
<b-input-group
size=
"lg"
prepend=
"Channel TimePath"
>
<b-input-group
size=
"lg"
prepend=
"Channel TimePath"
>
<b-input
v-model=
"config.data.url.timePath"
></b-input>
<b-input
v-model=
"config.data.url.timePath"
></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=
"pathPoke"
>
poke
</b-button>
<b-button
variant=
"info"
@
click=
"pathPoke
Time
"
>
poke
</b-button>
</b-input-group-addon>
</b-input-group-addon>
</b-input-group>
</b-input-group>
</div>
</div>
...
@@ -65,8 +66,6 @@ export default class setBasicParams extends Vue {
...
@@ -65,8 +66,6 @@ export default class setBasicParams extends Vue {
created
()
{
created
()
{
this
.
config
.
data
.
userInputData
=
this
.
userInputData
;
this
.
config
.
data
.
userInputData
=
this
.
userInputData
;
// this.getConfig = this.config;
// this.updateConfig();
}
}
refresh
(){
refresh
(){
var
Args
:
UpdatePayload
=
{
var
Args
:
UpdatePayload
=
{
...
@@ -79,6 +78,9 @@ export default class setBasicParams extends Vue {
...
@@ -79,6 +78,9 @@ export default class setBasicParams extends Vue {
pathPoke
(){
pathPoke
(){
this
.
$emit
(
"
pathPoke
"
);
this
.
$emit
(
"
pathPoke
"
);
}
}
pathPokeTime
(){
this
.
$emit
(
"
pathPokeTime
"
);
}
setConfig
(
config
:
WidgetConfig
)
{
setConfig
(
config
:
WidgetConfig
)
{
(
this
.
$refs
.
WidgetParams
as
WidgetParams
).
setVariableList
(
(
this
.
$refs
.
WidgetParams
as
WidgetParams
).
setVariableList
(
this
.
pathProcessor
.
extractVarFromPath
(
config
.
data
.
url
.
path
)
this
.
pathProcessor
.
extractVarFromPath
(
config
.
data
.
url
.
path
)
...
@@ -109,6 +111,19 @@ export default class setBasicParams extends Vue {
...
@@ -109,6 +111,19 @@ export default class setBasicParams extends Vue {
this
.
isShowLoad
=
true
;
this
.
isShowLoad
=
true
;
this
.
isShowCog
=
false
;
this
.
isShowCog
=
false
;
}
}
getPathIdParamsTime
()
{
if
(
this
.
tempUrl
!=
this
.
config
.
data
.
url
.
timePath
)
{
this
.
config
.
data
.
userInputData
.
clear
();
this
.
tempUrl
=
this
.
config
.
data
.
url
.
timePath
;
}
this
.
updateConfig
();
var
url
=
this
.
config
.
data
.
url
.
timePath
;
(
this
.
$refs
.
WidgetParams
as
WidgetParams
).
setVariableList
(
this
.
pathProcessor
.
extractVarFromPath
(
url
)
);
this
.
isShowLoad
=
true
;
this
.
isShowCog
=
false
;
}
showPathIdConfig
()
{
showPathIdConfig
()
{
if
(
this
.
isShowCog
||
this
.
isShowLoad
){
if
(
this
.
isShowCog
||
this
.
isShowLoad
){
this
.
isShowCog
=
!
this
.
isShowCog
;
this
.
isShowCog
=
!
this
.
isShowCog
;
...
...
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