Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
C
CFET_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
0
Merge Requests
0
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
XieXiaohan
CFET_WidgetUI
Commits
2684739d
Commit
2684739d
authored
Dec 13, 2020
by
XieXiaohan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
v2
parent
2ab139cb
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
92 additions
and
24 deletions
+92
-24
src/Windows/WindowsApp.vue
src/Windows/WindowsApp.vue
+4
-4
src/components/Config/BoolConfig.vue
src/components/Config/BoolConfig.vue
+35
-13
src/components/Config/Config.vue
src/components/Config/Config.vue
+9
-2
src/components/Method/Method.vue
src/components/Method/Method.vue
+8
-1
src/components/Navigation/Navigation.vue
src/components/Navigation/Navigation.vue
+8
-1
src/components/State/BoolState.vue
src/components/State/BoolState.vue
+8
-1
src/components/State/State.vue
src/components/State/State.vue
+13
-1
src/components/Status/LabelStatus.vue
src/components/Status/LabelStatus.vue
+3
-0
vue.config.js
vue.config.js
+4
-1
No files found.
src/Windows/WindowsApp.vue
View file @
2684739d
...
@@ -172,7 +172,7 @@ export default class WindowsApp extends Vue {
...
@@ -172,7 +172,7 @@ export default class WindowsApp extends Vue {
created
()
{
created
()
{
/*
var localURL = window.location.hash;
var
localURL
=
window
.
location
.
hash
;
if
(
localURL
.
indexOf
(
"
?
"
)
!=
-
1
)
{
if
(
localURL
.
indexOf
(
"
?
"
)
!=
-
1
)
{
//var url = localURL.substr(1); //for test
//var url = localURL.substr(1); //for test
var
url
=
localURL
.
substr
(
3
);
//for build
var
url
=
localURL
.
substr
(
3
);
//for build
...
@@ -185,16 +185,16 @@ export default class WindowsApp extends Vue {
...
@@ -185,16 +185,16 @@ export default class WindowsApp extends Vue {
var
data
=
JSON
.
parse
(
httpData
);
var
data
=
JSON
.
parse
(
httpData
);
console
.
log
(
data
);
console
.
log
(
data
);
this
.
EditData
=
data
;
this
.
EditData
=
data
;
}
*/
}
var
localURL
=
location
.
search
;
/*
var localURL = location.search;
if (localURL.indexOf("?") != -1) {
if (localURL.indexOf("?") != -1) {
var url = localURL.substr(1);
var url = localURL.substr(1);
var httpData = unescape(url);
var httpData = unescape(url);
//var jsondata = decodeURI(url);
//var jsondata = decodeURI(url);
var data = JSON.parse(httpData);
var data = JSON.parse(httpData);
this.EditData = data;
this.EditData = data;
}
}
*/
}
}
...
...
src/components/Config/BoolConfig.vue
View file @
2684739d
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
</div>
</div>
<div
class=
"columns"
style=
"padding: 5px;"
>
<div
class=
"columns"
style=
"padding: 5px;
display: flex; justify-content: center;
"
>
<toggle-button
v-model=
"switchValue"
<toggle-button
v-model=
"switchValue"
:sync=
"true"
:sync=
"true"
...
@@ -22,9 +22,8 @@
...
@@ -22,9 +22,8 @@
</div>
</div>
<div
class=
"colmumns"
>
<div>
<WidgetParams
<WidgetParams
class=
"column"
style=
"padding-top: 0px;padding-bottom: 5px;"
style=
"padding-top: 0px;padding-bottom: 5px;"
ref=
"WidgetGetParams"
ref=
"WidgetGetParams"
action=
"get"
action=
"get"
...
@@ -32,9 +31,8 @@
...
@@ -32,9 +31,8 @@
></WidgetParams>
></WidgetParams>
</div>
</div>
<div
class=
"colmumns"
>
<div>
<WidgetParams
<WidgetParams
class=
"column"
ref=
"WidgetSetParams"
ref=
"WidgetSetParams"
action=
"set"
action=
"set"
@
updataVariables=
"viewSetLoad"
@
updataVariables=
"viewSetLoad"
...
@@ -97,7 +95,6 @@
...
@@ -97,7 +95,6 @@
isShowGetPath
:
boolean
=
false
;
isShowGetPath
:
boolean
=
false
;
isShowSetPath
:
boolean
=
false
;
isShowSetPath
:
boolean
=
false
;
isOpen
:
boolean
=
true
;
isOpen
:
boolean
=
true
;
fontSize
:
number
=
25
;
activeColor
:
string
=
''
;
activeColor
:
string
=
''
;
EditPathPoke
:
string
=
''
;
EditPathPoke
:
string
=
''
;
isSetPoke
:
boolean
=
false
;
isSetPoke
:
boolean
=
false
;
...
@@ -108,7 +105,7 @@
...
@@ -108,7 +105,7 @@
switchValue
:
boolean
=
false
;
switchValue
:
boolean
=
false
;
checkActiveSample
:
boolean
=
true
;
checkActiveSample
:
boolean
=
true
;
EditPathPoke
:
string
=
""
;
//
EditPathPoke : string = "";
config
:
WidgetConfig
=
{
config
:
WidgetConfig
=
{
...
@@ -128,7 +125,6 @@
...
@@ -128,7 +125,6 @@
index
:
this
.
refIndex
,
index
:
this
.
refIndex
,
},
},
props
:{
props
:{
fontSize
:
this
.
fontSize
,
title
:
''
,
title
:
''
,
titleSize
:
''
,
titleSize
:
''
,
},
},
...
@@ -201,10 +197,17 @@
...
@@ -201,10 +197,17 @@
openWindows
(){
openWindows
(){
/*var fragment = window.location.origin;
var JsonData = JSON.stringify(this.EditData);
var url =fragment+"/WindowsAppIndex.html/?";
window.open(url+JsonData, "WidgetWindow",'height=100, width=100, top=10, left=10, toolbar=no');*/
var
fragment
=
window
.
location
.
origin
;
var
fragment
=
window
.
location
.
origin
;
var
JsonData
=
JSON
.
stringify
(
this
.
EditData
);
var
JsonData
=
JSON
.
stringify
(
this
.
EditData
);
var
httpData
=
encodeURIComponent
(
JsonData
);
var
url
=
fragment
+
"
/WindowsAppIndex.html/?
"
;
var
url
=
fragment
+
"
/WindowsAppIndex.html/?
"
;
window
.
open
(
url
+
JsonData
,
"
WidgetWindow
"
,
'
height=100, width=100, top=10, left=10, toolbar=no
'
);
window
.
open
(
url
+
httpData
,
"
WidgetWindow
"
,
'
height=100, width=100, top=10, left=10, toolbar=no
'
);
}
}
del
(){
del
(){
...
@@ -212,10 +215,14 @@
...
@@ -212,10 +215,14 @@
}
}
updateSwitchValue
(){
updateSwitchValue
(){
if
(
this
.
getConfigValue
==
true
||
this
.
getConfigValue
==
false
){
console
.
log
(
"
switch
"
);
console
.
log
(
this
.
getConfigValue
);
if
(
this
.
getConfigValue
==
true
||
this
.
getConfigValue
==
false
||
this
.
getConfigValue
==
0
||
this
.
getConfigValue
==
1
){
this
.
checkActiveSample
=
false
;
this
.
checkActiveSample
=
false
;
this
.
switchValue
=
Boolean
(
this
.
getConfigValue
);
this
.
switchValue
=
Boolean
(
this
.
getConfigValue
);
console
.
log
(
"
this
"
);
console
.
log
(
this
.
switchValue
);
}
}
}
}
...
@@ -358,6 +365,7 @@
...
@@ -358,6 +365,7 @@
pathPoke
()
{
pathPoke
()
{
this
.
config
.
data
.
url
=
this
.
EditData
.
edit
.
url
;
this
.
config
.
data
.
url
=
this
.
EditData
.
edit
.
url
;
this
.
EditPathPoke
=
this
.
EditData
.
edit
.
url
;
this
.
EditPathPoke
=
this
.
EditData
.
edit
.
url
;
//this.EditData.params.PokedPath = this.EditPathPoke;
var
pokepath
=
this
.
config
.
data
.
url
;
var
pokepath
=
this
.
config
.
data
.
url
;
//axios.defaults.timeout = 1000;
//axios.defaults.timeout = 1000;
axios
.
get
(
pokepath
).
then
(
response
=>
{
axios
.
get
(
pokepath
).
then
(
response
=>
{
...
@@ -464,15 +472,29 @@
...
@@ -464,15 +472,29 @@
}
}
async
viewSetLoad
(
Args
:
UpdatePayload
,
checkParent
:
boolean
)
{
async
viewSetLoad
(
Args
:
UpdatePayload
,
checkParent
:
boolean
)
{
console
.
log
(
"
arm
"
);
console
.
log
(
"
arm
"
);
console
.
log
(
"
arm
"
);
if
(
checkParent
==
false
){
if
(
checkParent
==
false
){
// this.config.data.userInputData = Args.variables;
// this.config.data.userInputData = Args.variables;
if
(
Object
.
prototype
.
toString
.
call
(
Args
.
variables
)
==
'
[object Undefined]
'
){
if
(
Object
.
prototype
.
toString
.
call
(
Args
.
variables
)
==
'
[object Undefined]
'
){
this
.
userSetInputData
.
set
(
this
.
setLabel
,
this
.
switchValue
);
if
(
Object
.
prototype
.
toString
.
call
(
this
.
getConfigValue
)
==
'
[object Number]
'
){
var
switchTempValue
=
Number
(
this
.
switchValue
);
this
.
userSetInputData
.
set
(
this
.
setLabel
,
switchTempValue
);
}
else
{
this
.
userSetInputData
.
set
(
this
.
setLabel
,
this
.
switchValue
);
}
}
else
{
}
else
{
this
.
userSetInputData
=
Args
.
variables
;
if
(
Object
.
prototype
.
toString
.
call
(
this
.
getConfigValue
)
==
'
[object Number]
'
){
this
.
userSetInputData
.
set
(
this
.
setLabel
,
this
.
switchValue
);
var
switchTempValue
=
Number
(
this
.
switchValue
);
this
.
userSetInputData
=
Args
.
variables
;
this
.
userSetInputData
.
set
(
this
.
setLabel
,
switchTempValue
);
}
else
{
this
.
userSetInputData
=
Args
.
variables
;
this
.
userSetInputData
.
set
(
this
.
setLabel
,
this
.
switchValue
);
}
}
}
this
.
setPathwithVar
=
this
.
pathProcessor
.
FillPathWithVar
(
this
.
userSetInputData
,
this
.
config
.
data
.
set
.
url
);
this
.
setPathwithVar
=
this
.
pathProcessor
.
FillPathWithVar
(
this
.
userSetInputData
,
this
.
config
.
data
.
set
.
url
);
...
...
src/components/Config/Config.vue
View file @
2684739d
...
@@ -201,11 +201,18 @@ export default class Config extends Widget {
...
@@ -201,11 +201,18 @@ export default class Config extends Widget {
openWindows
(){
openWindows
(){
var
fragment
=
window
.
location
.
origin
;
/*
var fragment = window.location.origin;
console.log(fragment);
console.log(fragment);
var JsonData = JSON.stringify(this.EditData);
var JsonData = JSON.stringify(this.EditData);
var url =fragment+"/WindowsAppIndex.html/?";
var url =fragment+"/WindowsAppIndex.html/?";
window
.
open
(
url
+
JsonData
,
"
WidgetWindow
"
,
'
height=500, width=500, top=50, left=50, toolbar=no
'
);
window.open(url+JsonData, "WidgetWindow",'height=500, width=500, top=50, left=50, toolbar=no');*/
var
fragment
=
window
.
location
.
origin
;
var
JsonData
=
JSON
.
stringify
(
this
.
EditData
);
var
httpData
=
encodeURIComponent
(
JsonData
);
var
url
=
fragment
+
"
/WindowsAppIndex.html/?
"
;
window
.
open
(
url
+
httpData
,
"
WidgetWindow
"
,
'
height=100, width=100, top=10, left=10, toolbar=no
'
);
}
}
del
(){
del
(){
...
...
src/components/Method/Method.vue
View file @
2684739d
...
@@ -143,10 +143,17 @@ export default class Method extends Widget {
...
@@ -143,10 +143,17 @@ export default class Method extends Widget {
}
}
openWindows
(){
openWindows
(){
/*var fragment = window.location.origin;
var JsonData = JSON.stringify(this.EditData);
var url =fragment+"/WindowsAppIndex.html/?";
window.open(url+JsonData, "WidgetWindow",'height=100, width=100, top=10, left=10, toolbar=no');*/
var
fragment
=
window
.
location
.
origin
;
var
fragment
=
window
.
location
.
origin
;
var
JsonData
=
JSON
.
stringify
(
this
.
EditData
);
var
JsonData
=
JSON
.
stringify
(
this
.
EditData
);
var
httpData
=
encodeURIComponent
(
JsonData
);
var
url
=
fragment
+
"
/WindowsAppIndex.html/?
"
;
var
url
=
fragment
+
"
/WindowsAppIndex.html/?
"
;
window
.
open
(
url
+
JsonData
,
"
WidgetWindow
"
,
'
height=100, width=100, top=10, left=10, toolbar=no
'
);
window
.
open
(
url
+
httpData
,
"
WidgetWindow
"
,
'
height=100, width=100, top=10, left=10, toolbar=no
'
);
}
}
updateUI
()
{
updateUI
()
{
...
...
src/components/Navigation/Navigation.vue
View file @
2684739d
...
@@ -164,10 +164,17 @@
...
@@ -164,10 +164,17 @@
openWindows
(){
openWindows
(){
//windows.open -> another single page application
//windows.open -> another single page application
/*var fragment = window.location.origin;
var JsonData = JSON.stringify(this.EditData);
var url =fragment+"/WindowsAppIndex.html/?";
window.open(url+JsonData, "WidgetWindow",'height=100, width=100, top=10, left=10, toolbar=no');*/
var
fragment
=
window
.
location
.
origin
;
var
fragment
=
window
.
location
.
origin
;
var
JsonData
=
JSON
.
stringify
(
this
.
EditData
);
var
JsonData
=
JSON
.
stringify
(
this
.
EditData
);
var
httpData
=
encodeURIComponent
(
JsonData
);
var
url
=
fragment
+
"
/WindowsAppIndex.html/?
"
;
var
url
=
fragment
+
"
/WindowsAppIndex.html/?
"
;
window
.
open
(
url
+
JsonData
,
"
WidgetWindow
"
,
'
height=100, width=100, top=10, left=10, toolbar=no
'
);
window
.
open
(
url
+
httpData
,
"
WidgetWindow
"
,
'
height=100, width=100, top=10, left=10, toolbar=no
'
);
}
}
...
...
src/components/State/BoolState.vue
View file @
2684739d
...
@@ -165,10 +165,17 @@
...
@@ -165,10 +165,17 @@
openWindows
(){
openWindows
(){
/* var fragment = window.location.origin;
var JsonData = JSON.stringify(this.EditData);
var url =fragment+"/WindowsAppIndex.html/?";
window.open(url+JsonData, "WidgetWindow",'height=100, width=100, top=10, left=10, toolbar=no');*/
var
fragment
=
window
.
location
.
origin
;
var
fragment
=
window
.
location
.
origin
;
var
JsonData
=
JSON
.
stringify
(
this
.
EditData
);
var
JsonData
=
JSON
.
stringify
(
this
.
EditData
);
var
httpData
=
encodeURIComponent
(
JsonData
);
var
url
=
fragment
+
"
/WindowsAppIndex.html/?
"
;
var
url
=
fragment
+
"
/WindowsAppIndex.html/?
"
;
window
.
open
(
url
+
JsonData
,
"
WidgetWindow
"
,
'
height=100, width=100, top=10, left=10, toolbar=no
'
);
window
.
open
(
url
+
httpData
,
"
WidgetWindow
"
,
'
height=100, width=100, top=10, left=10, toolbar=no
'
);
}
}
...
...
src/components/State/State.vue
View file @
2684739d
...
@@ -163,10 +163,18 @@ export default class State extends Widget {
...
@@ -163,10 +163,18 @@ export default class State extends Widget {
openWindows
(){
openWindows
(){
var
fragment
=
window
.
location
.
origin
;
var
fragment
=
window
.
location
.
origin
;
var
JsonData
=
JSON
.
stringify
(
this
.
EditData
);
var
JsonData
=
JSON
.
stringify
(
this
.
EditData
);
var
httpData
=
encodeURIComponent
(
JsonData
);
var
url
=
fragment
+
"
/WindowsAppIndex.html/?
"
;
window
.
open
(
url
+
httpData
,
"
WidgetWindow
"
,
'
height=100, width=100, top=10, left=10, toolbar=no
'
);
/*var fragment = window.location.origin;
var JsonData = JSON.stringify(this.EditData);
var url =fragment+"/WindowsAppIndex.html/?";
var url =fragment+"/WindowsAppIndex.html/?";
window
.
open
(
url
+
JsonData
,
"
WidgetWindow
"
,
'
height=100, width=100, top=10, left=10, toolbar=no
'
);
window.open(url+JsonData, "WidgetWindow",'height=100, width=100, top=10, left=10, toolbar=no');
*/
}
}
...
@@ -320,11 +328,15 @@ export default class State extends Widget {
...
@@ -320,11 +328,15 @@ export default class State extends Widget {
}
}
colourViewLoad
(){
colourViewLoad
(){
console
.
log
(
this
.
StatusValue
);
var
stateFile
=
JSON
.
parse
(
this
.
EditData
.
props
.
StateFile
);
var
stateFile
=
JSON
.
parse
(
this
.
EditData
.
props
.
StateFile
);
var
stateIndicator
=
JSON
.
parse
(
this
.
EditData
.
props
.
StateIndicator
);
var
stateIndicator
=
JSON
.
parse
(
this
.
EditData
.
props
.
StateIndicator
);
console
.
log
(
stateIndicator
);
this
.
stateKey
=
stateIndicator
[
this
.
StatusValue
];
this
.
stateKey
=
stateIndicator
[
this
.
StatusValue
];
console
.
log
(
this
.
stateKey
);
this
.
activeColor
=
stateFile
[
this
.
stateKey
];
this
.
activeColor
=
stateFile
[
this
.
stateKey
];
console
.
log
(
this
.
activeColor
);
if
(
this
.
activeColor
==
undefined
){
if
(
this
.
activeColor
==
undefined
){
this
.
activeColor
=
'
#bbb
'
;
this
.
activeColor
=
'
#bbb
'
;
}
}
...
...
src/components/Status/LabelStatus.vue
View file @
2684739d
...
@@ -318,6 +318,9 @@
...
@@ -318,6 +318,9 @@
console
.
log
(
this
.
EditData
);
console
.
log
(
this
.
EditData
);
this
.
config
.
data
.
url
=
this
.
EditData
.
edit
.
url
;
this
.
config
.
data
.
url
=
this
.
EditData
.
edit
.
url
;
this
.
EditPathPoke
=
this
.
EditData
.
edit
.
url
;
this
.
EditPathPoke
=
this
.
EditData
.
edit
.
url
;
console
.
log
(
"
isj
"
);
console
.
log
(
this
.
EditPathPoke
);
console
.
log
(
this
.
EditData
.
params
);
const
urlRegExp
=
/
(?
<=
\/)\w
*
(?=\/)
/g
;
const
urlRegExp
=
/
(?
<=
\/)\w
*
(?=\/)
/g
;
const
result
=
this
.
config
.
data
.
url
.
match
(
urlRegExp
);
const
result
=
this
.
config
.
data
.
url
.
match
(
urlRegExp
);
...
...
vue.config.js
View file @
2684739d
...
@@ -16,10 +16,13 @@ module.exports = {
...
@@ -16,10 +16,13 @@ module.exports = {
devServer
:
{
devServer
:
{
proxy
:
{
proxy
:
{
"
/
"
:
{
"
/
"
:
{
target
:
"
http://192.168.0.3:800
1
"
,
target
:
"
http://192.168.0.3:800
2
"
,
secure
:
false
,
secure
:
false
,
changeOrigin
:
true
changeOrigin
:
true
}
}
}
}
}
}
};
};
//{"Idle":"Idle","Pre1":"prepare1","Pre2":"prepare2","Pre3":"prepare3","Pre4":"prepare4","Ready":"Ready","Error":"Error","Fire":"Fire"}
//{"Idle":"yellow","prepare1":"#ff8020","prepare2":"#ffa020","prepare3":"#ffc020","prepare4":"#ffff20","Ready":"green","error":"red","Fire":"blue" }
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