Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
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
fe15f2f2
Commit
fe15f2f2
authored
Oct 21, 2020
by
XieXiaohan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add CustomView
parent
1d742ca8
Changes
18
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
2190 additions
and
618 deletions
+2190
-618
package-lock.json
package-lock.json
+450
-1
package.json
package.json
+5
-0
src/App.vue
src/App.vue
+95
-63
src/Windows/WindowsApp.vue
src/Windows/WindowsApp.vue
+78
-46
src/Windows/main.ts
src/Windows/main.ts
+2
-0
src/Windows/models/PathProcessor.ts
src/Windows/models/PathProcessor.ts
+2
-0
src/components/Config/BoolConfig.vue
src/components/Config/BoolConfig.vue
+507
-0
src/components/Config/Config.vue
src/components/Config/Config.vue
+152
-151
src/components/Method/Method.vue
src/components/Method/Method.vue
+137
-187
src/components/Navigation/Navigation.vue
src/components/Navigation/Navigation.vue
+200
-0
src/components/State/BoolState.vue
src/components/State/BoolState.vue
+360
-0
src/components/State/State.vue
src/components/State/State.vue
+69
-72
src/components/Status/Status.vue
src/components/Status/Status.vue
+113
-90
src/models/WidgetRef.ts
src/models/WidgetRef.ts
+1
-1
src/models/widget.ts
src/models/widget.ts
+1
-1
tsconfig.json
tsconfig.json
+14
-2
tsconfig2.json
tsconfig2.json
+3
-3
vue.config.js
vue.config.js
+1
-1
No files found.
package-lock.json
View file @
fe15f2f2
...
@@ -14,6 +14,263 @@
...
@@ -14,6 +14,263 @@
"turntable-camera-controller"
:
"^3.0.0"
"turntable-camera-controller"
:
"^3.0.0"
}
}
},
},
"@antv/adjust"
:
{
"version"
:
"0.2.2"
,
"resolved"
:
"https://registry.npmjs.org/@antv/adjust/-/adjust-0.2.2.tgz"
,
"integrity"
:
"sha512-b5cABT0WWgKU8pfhW2ssID4FBXDBnHPuxU/HAV3nOMq1lso2BI2/r1hHnrVMZId5Dntb7YrVTOsokiD9DFZ2+w=="
,
"requires"
:
{
"@antv/util"
:
"~2.0.0"
,
"tslib"
:
"^1.10.0"
}
},
"@antv/attr"
:
{
"version"
:
"0.3.2"
,
"resolved"
:
"https://registry.npmjs.org/@antv/attr/-/attr-0.3.2.tgz"
,
"integrity"
:
"sha512-31PfcVKeQdPBmr/QD+IC0NB/FbdtVKOXBCNMepFc5/dEs7jphmgG1V4tfAJmcXIHubCTHOjpscTrDIvoKSGvMQ=="
,
"requires"
:
{
"@antv/color-util"
:
"^2.0.1"
,
"@antv/util"
:
"~2.0.0"
,
"tslib"
:
"^1.10.0"
}
},
"@antv/color-util"
:
{
"version"
:
"2.0.5"
,
"resolved"
:
"https://registry.npmjs.org/@antv/color-util/-/color-util-2.0.5.tgz"
,
"integrity"
:
"sha512-eQktA9YDnWCj03rfjpg0ajvCfRkHXzBzsZa9z94pY6Jb7e3XtPUp7vDpB8KhaKm9GjPtGzQDneh+gnqkEK8mtQ=="
,
"requires"
:
{
"@antv/util"
:
"^2.0.9"
,
"tslib"
:
"^1.10.0"
}
},
"@antv/component"
:
{
"version"
:
"0.7.4"
,
"resolved"
:
"https://registry.npmjs.org/@antv/component/-/component-0.7.4.tgz"
,
"integrity"
:
"sha512-8uSa4BKrS2zjBEurtQkI0Z1mTkGxKohLKSBsUvkFZrYpZ1Zp1ypPObzSzx6mZp3sE3iiG0EGj589MDrD1mCiUA=="
,
"requires"
:
{
"@antv/dom-util"
:
"~2.0.1"
,
"@antv/g-base"
:
"~0.5.0"
,
"@antv/matrix-util"
:
"^3.1.0-beta.1"
,
"@antv/path-util"
:
"~2.0.7"
,
"@antv/scale"
:
"~0.3.1"
,
"@antv/util"
:
"~2.0.0"
,
"fecha"
:
"~4.2.0"
,
"tslib"
:
"^1.10.0"
}
},
"@antv/coord"
:
{
"version"
:
"0.3.0"
,
"resolved"
:
"https://registry.npmjs.org/@antv/coord/-/coord-0.3.0.tgz"
,
"integrity"
:
"sha512-lm5Ct+r62mFVqhziKoDFN3PQjnkNBMOoOG+kBsPq3M3GqlQt5Jc7euOHMFcYSZM9HJmsKkGcih6EWDVVliMEZg=="
,
"requires"
:
{
"@antv/matrix-util"
:
"^3.1.0-beta.2"
,
"@antv/util"
:
"~2.0.3"
,
"tslib"
:
"^1.10.0"
}
},
"@antv/data-set"
:
{
"version"
:
"0.11.7"
,
"resolved"
:
"https://registry.npmjs.org/@antv/data-set/-/data-set-0.11.7.tgz"
,
"integrity"
:
"sha512-TP62M4ZGda/6dhz+XvmsghMSpkrmRLsLiRFfPfYQVM9+QZAzvGisVayj9x0xMSBBwDwjKE69LeDTFFMQJlTnog=="
,
"requires"
:
{
"@antv/hierarchy"
:
"^0.6.0"
,
"@antv/util"
:
"^2.0.0"
,
"d3-composite-projections"
:
"^1.2.0"
,
"d3-dsv"
:
"^1.0.5"
,
"d3-geo"
:
"~1.6.4"
,
"d3-geo-projection"
:
"~2.1.2"
,
"d3-hexjson"
:
"^1.0.1"
,
"d3-hierarchy"
:
"^1.1.5"
,
"d3-sankey"
:
"^0.9.1"
,
"d3-voronoi"
:
"^1.1.2"
,
"dagre"
:
"^0.8.2"
,
"point-at-length"
:
"^1.0.2"
,
"regression"
:
"^2.0.0"
,
"simple-statistics"
:
"^6.1.0"
,
"topojson-client"
:
"^3.0.0"
,
"wolfy87-eventemitter"
:
"^5.1.0"
},
"dependencies"
:
{
"topojson-client"
:
{
"version"
:
"3.1.0"
,
"resolved"
:
"https://registry.npmjs.org/topojson-client/-/topojson-client-3.1.0.tgz"
,
"integrity"
:
"sha512-605uxS6bcYxGXw9qi62XyrV6Q3xwbndjachmNxu8HWTtVPxZfEJN9fd/SZS1Q54Sn2y0TMyMxFj/cJINqGHrKw=="
,
"requires"
:
{
"commander"
:
"2"
}
}
}
},
"@antv/dom-util"
:
{
"version"
:
"2.0.2"
,
"resolved"
:
"https://registry.npmjs.org/@antv/dom-util/-/dom-util-2.0.2.tgz"
,
"integrity"
:
"sha512-i/rh385casRd6OA4rbpbA2jyiwY/w7PtkA+74mH43PiBzOcLpDg1jEWR9dMO0tIqUzHQWWqKNNjmXVubl4GS6g=="
,
"requires"
:
{
"tslib"
:
"^1.10.0"
}
},
"@antv/event-emitter"
:
{
"version"
:
"0.1.2"
,
"resolved"
:
"https://registry.npmjs.org/@antv/event-emitter/-/event-emitter-0.1.2.tgz"
,
"integrity"
:
"sha512-6C6NJOdoNVptCr5y9BVOhKkCgW7LFs/SpcRyAExUeSjAm0zJqcqNkSIRGsXYhj4PJI+CZICHzGwwiSnIsE68Ug=="
},
"@antv/g-base"
:
{
"version"
:
"0.5.1"
,
"resolved"
:
"https://registry.npmjs.org/@antv/g-base/-/g-base-0.5.1.tgz"
,
"integrity"
:
"sha512-gbv+uz/SvzM4/p3PLjAiEZUp6kdzKkCbVWTCdBXB1cvNMttlEzWEB8MOFbEkcIAy7TtjQJJRv8ThI/ngFzU+fg=="
,
"requires"
:
{
"@antv/event-emitter"
:
"^0.1.1"
,
"@antv/g-math"
:
"^0.1.5"
,
"@antv/matrix-util"
:
"^3.1.0-beta.1"
,
"@antv/path-util"
:
"~2.0.5"
,
"@antv/util"
:
"~2.0.0"
,
"@types/d3-timer"
:
"^1.0.9"
,
"d3-ease"
:
"^1.0.5"
,
"d3-interpolate"
:
"^1.3.2"
,
"d3-timer"
:
"^1.0.9"
,
"detect-browser"
:
"^5.1.0"
}
},
"@antv/g-canvas"
:
{
"version"
:
"0.5.1"
,
"resolved"
:
"https://registry.npmjs.org/@antv/g-canvas/-/g-canvas-0.5.1.tgz"
,
"integrity"
:
"sha512-m132AyMrILm0wYTbXSlmDaz8M7OoEIvSZuW59apDS+F3jHAxsJrBvKXJjJJ26CItdIbTmeLLMcfoGIj9IzXvDw=="
,
"requires"
:
{
"@antv/g-base"
:
"^0.5.1"
,
"@antv/g-math"
:
"^0.1.5"
,
"@antv/matrix-util"
:
"^3.1.0-beta.1"
,
"@antv/path-util"
:
"~2.0.5"
,
"@antv/util"
:
"~2.0.0"
,
"gl-matrix"
:
"^3.0.0"
}
},
"@antv/g-math"
:
{
"version"
:
"0.1.5"
,
"resolved"
:
"https://registry.npmjs.org/@antv/g-math/-/g-math-0.1.5.tgz"
,
"integrity"
:
"sha512-29B3p33jzUPIyx1xYfNCexbp7jvahD6bD8FKKyWqfYZHQbvrFfV8ZNUu66RJLfDrl0KaKT6C5whfKs/WrVaflQ=="
,
"requires"
:
{
"@antv/util"
:
"~2.0.0"
,
"gl-matrix"
:
"^3.0.0"
}
},
"@antv/g-svg"
:
{
"version"
:
"0.5.1"
,
"resolved"
:
"https://registry.npmjs.org/@antv/g-svg/-/g-svg-0.5.1.tgz"
,
"integrity"
:
"sha512-UALLDneKlpOaAZXMIRsUjDrmuceXGR0shXwj4gv+UzIgYe/4hNxTll+1RsA+R+tYmQKAhsilhzsm3eMmPzwbtA=="
,
"requires"
:
{
"@antv/g-base"
:
"^0.5.1"
,
"@antv/g-math"
:
"^0.1.5"
,
"@antv/util"
:
"~2.0.0"
,
"detect-browser"
:
"^5.0.0"
}
},
"@antv/g2"
:
{
"version"
:
"4.1.0-beta.10"
,
"resolved"
:
"https://registry.npmjs.org/@antv/g2/-/g2-4.1.0-beta.10.tgz"
,
"integrity"
:
"sha512-baa9ysFNj/Wms81UVrpE4ETKGQnJ6yxly5tKn43D952Y1XAZRlE5hXuN5+NUBu1vvskOx5ifiqZqRf46Mp+Apg=="
,
"requires"
:
{
"@antv/adjust"
:
"^0.2.1"
,
"@antv/attr"
:
"^0.3.1"
,
"@antv/color-util"
:
"^2.0.2"
,
"@antv/component"
:
"^0.7.0"
,
"@antv/coord"
:
"^0.3.0"
,
"@antv/dom-util"
:
"^2.0.2"
,
"@antv/event-emitter"
:
"~0.1.0"
,
"@antv/g-base"
:
"^0.5.0"
,
"@antv/g-canvas"
:
"^0.5.0"
,
"@antv/g-svg"
:
"^0.5.0"
,
"@antv/matrix-util"
:
"^3.1.0-beta.1"
,
"@antv/path-util"
:
"^2.0.3"
,
"@antv/scale"
:
"^0.3.1"
,
"@antv/util"
:
"~2.0.5"
,
"tslib"
:
"^2.0.0"
},
"dependencies"
:
{
"tslib"
:
{
"version"
:
"2.0.1"
,
"resolved"
:
"https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz"
,
"integrity"
:
"sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ=="
}
}
},
"@antv/g2plot"
:
{
"version"
:
"2.0.1"
,
"resolved"
:
"https://registry.npmjs.org/@antv/g2plot/-/g2plot-2.0.1.tgz"
,
"integrity"
:
"sha512-RAaIFz3dlY+vN3GxhazWnT1EhMIoNws2HN7+6REvyU56ovi2JLY585bqJCUkK1T99hc7P7BqsXlo9lzFCu4Y5Q=="
,
"requires"
:
{
"@antv/data-set"
:
"^0.11.5"
,
"@antv/event-emitter"
:
"^0.1.2"
,
"@antv/g2"
:
"^4.1.0-beta.10"
,
"dayjs"
:
"^1.8.36"
,
"size-sensor"
:
"^1.0.1"
,
"tslib"
:
"^1.13.0"
},
"dependencies"
:
{
"tslib"
:
{
"version"
:
"1.13.0"
,
"resolved"
:
"https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz"
,
"integrity"
:
"sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q=="
}
}
},
"@antv/hierarchy"
:
{
"version"
:
"0.6.6"
,
"resolved"
:
"https://registry.npmjs.org/@antv/hierarchy/-/hierarchy-0.6.6.tgz"
,
"integrity"
:
"sha512-ivb9j5aJOogjjU9k7WZXWznevMyqgBbP/Xq2rfXsQFLk4ArABt2ewU6a6jndPOiycGDxppZ8kaYjli70i4HluA=="
,
"requires"
:
{
"@antv/util"
:
"^2.0.7"
}
},
"@antv/matrix-util"
:
{
"version"
:
"3.1.0-beta.2"
,
"resolved"
:
"https://registry.npmjs.org/@antv/matrix-util/-/matrix-util-3.1.0-beta.2.tgz"
,
"integrity"
:
"sha512-Efwp0ZHxVDK/8RUa/RRWN7HKFHJmjn7Oq5HaNBbCmsxd7JTla3Zsoq1AZrjWMDlq0lplo77urclwI+XIW8NEHw=="
,
"requires"
:
{
"@antv/util"
:
"^2.0.9"
,
"gl-matrix"
:
"^3.3.0"
,
"tslib"
:
"^1.10.0"
},
"dependencies"
:
{
"gl-matrix"
:
{
"version"
:
"3.3.0"
,
"resolved"
:
"https://registry.npmjs.org/gl-matrix/-/gl-matrix-3.3.0.tgz"
,
"integrity"
:
"sha512-COb7LDz+SXaHtl/h4LeaFcNdJdAQSDeVqjiIihSXNrkWObZLhDI4hIkZC11Aeqp7bcE72clzB0BnDXr2SmslRA=="
}
}
},
"@antv/path-util"
:
{
"version"
:
"2.0.8"
,
"resolved"
:
"https://registry.npmjs.org/@antv/path-util/-/path-util-2.0.8.tgz"
,
"integrity"
:
"sha512-g5gt12MY1oEzh/j5XfLNRCfJU7E+Us+2yM5Hqc0y8xeWhb5l013XG5BPV37KmOf6WAys9KNxklNniHCZ6SqCKw=="
,
"requires"
:
{
"@antv/util"
:
"^2.0.9"
,
"tslib"
:
"^1.10.0"
}
},
"@antv/scale"
:
{
"version"
:
"0.3.3"
,
"resolved"
:
"https://registry.npmjs.org/@antv/scale/-/scale-0.3.3.tgz"
,
"integrity"
:
"sha512-D6fuS4IlqkpJ9Cm963sumroOxhqZL6S6bsFQPRMxypaqebXW2pWcmbzF5Hw1jKucl1M4nZ0nGCB3cE2SdLxrcA=="
,
"requires"
:
{
"@antv/util"
:
"~2.0.3"
,
"fecha"
:
"~4.2.0"
,
"tslib"
:
"^2.0.0"
},
"dependencies"
:
{
"tslib"
:
{
"version"
:
"2.0.1"
,
"resolved"
:
"https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz"
,
"integrity"
:
"sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ=="
}
}
},
"@antv/util"
:
{
"version"
:
"2.0.9"
,
"resolved"
:
"https://registry.npmjs.org/@antv/util/-/util-2.0.9.tgz"
,
"integrity"
:
"sha512-JblWzne7msAPDdxkUhEk8zAz0Wd6igKwqymGbvIeyOydGrhBhGjA3nEayFj4IlG+XixCvGFKsCB4yuFS4glRIA=="
,
"requires"
:
{
"tslib"
:
"^1.10.0"
}
},
"@babel/code-frame"
:
{
"@babel/code-frame"
:
{
"version"
:
"7.8.3"
,
"version"
:
"7.8.3"
,
"resolved"
:
"https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz"
,
"resolved"
:
"https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz"
,
...
@@ -1241,12 +1498,51 @@
...
@@ -1241,12 +1498,51 @@
"resolved"
:
"https://registry.npmjs.org/@types/d3/-/d3-3.5.43.tgz"
,
"resolved"
:
"https://registry.npmjs.org/@types/d3/-/d3-3.5.43.tgz"
,
"integrity"
:
"sha512-t9ZmXOcpVxywRw86YtIC54g7M9puRh8hFedRvVfHKf5YyOP6pSxA0TvpXpfseXSCInoW4P7bggTrSDiUOs4g5w=="
"integrity"
:
"sha512-t9ZmXOcpVxywRw86YtIC54g7M9puRh8hFedRvVfHKf5YyOP6pSxA0TvpXpfseXSCInoW4P7bggTrSDiUOs4g5w=="
},
},
"@types/d3-geo"
:
{
"version"
:
"1.12.0"
,
"resolved"
:
"https://registry.npmjs.org/@types/d3-geo/-/d3-geo-1.12.0.tgz"
,
"integrity"
:
"sha512-x0x3kckNms8ftJicAcDNPj2xOHFw9hGzkrMcWD1pHM/vPvXZo6g9nh9AVUeQRu59Mpuhlf1EcdNH08KWPQ9mWw=="
,
"requires"
:
{
"@types/geojson"
:
"*"
}
},
"@types/d3-path"
:
{
"version"
:
"1.0.9"
,
"resolved"
:
"https://registry.npmjs.org/@types/d3-path/-/d3-path-1.0.9.tgz"
,
"integrity"
:
"sha512-NaIeSIBiFgSC6IGUBjZWcscUJEq7vpVu7KthHN8eieTV9d9MqkSOZLH4chq1PmcKy06PNe3axLeKmRIyxJ+PZQ=="
},
"@types/d3-sankey"
:
{
"version"
:
"0.11.0"
,
"resolved"
:
"https://registry.npmjs.org/@types/d3-sankey/-/d3-sankey-0.11.0.tgz"
,
"integrity"
:
"sha512-qRSxb23bebIudr4+ewdkG6T+vlvBdzWMjB4X915LD4bplq8FxrGTakCZ0OolSZKJjym8WrnIeHRVuoPOw+Nq+g=="
,
"requires"
:
{
"@types/d3-shape"
:
"*"
}
},
"@types/d3-shape"
:
{
"version"
:
"1.3.3"
,
"resolved"
:
"https://registry.npmjs.org/@types/d3-shape/-/d3-shape-1.3.3.tgz"
,
"integrity"
:
"sha512-kuIftW9veM/8iNY1SvrZOfyJ2+6fFlPhVH7ShKrO3lXCSpe97xor6q89w23Jwir5Gn3xHHR1qS2jF35DstE2Dg=="
,
"requires"
:
{
"@types/d3-path"
:
"^1"
}
},
"@types/d3-timer"
:
{
"version"
:
"1.0.10"
,
"resolved"
:
"https://registry.npmjs.org/@types/d3-timer/-/d3-timer-1.0.10.tgz"
,
"integrity"
:
"sha512-ZnAbquVqy+4ZjdW0cY6URp+qF/AzTVNda2jYyOzpR2cPT35FTXl78s15Bomph9+ckOiI1TtkljnWkwbIGAb6rg=="
},
"@types/events"
:
{
"@types/events"
:
{
"version"
:
"3.0.0"
,
"version"
:
"3.0.0"
,
"resolved"
:
"https://registry.npmjs.org/@types/events/-/events-3.0.0.tgz"
,
"resolved"
:
"https://registry.npmjs.org/@types/events/-/events-3.0.0.tgz"
,
"integrity"
:
"sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g=="
,
"integrity"
:
"sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g=="
,
"dev"
:
true
"dev"
:
true
},
},
"@types/geojson"
:
{
"version"
:
"7946.0.7"
,
"resolved"
:
"https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.7.tgz"
,
"integrity"
:
"sha512-wE2v81i4C4Ol09RtsWFAqg3BUitWbHSpSlIo+bNdsCJijO9sjme+zm+73ZMCa/qMC8UEERxzGbvmr1cffo2SiQ=="
},
"@types/glob"
:
{
"@types/glob"
:
{
"version"
:
"7.1.1"
,
"version"
:
"7.1.1"
,
"resolved"
:
"https://registry.npmjs.org/@types/glob/-/glob-7.1.1.tgz"
,
"resolved"
:
"https://registry.npmjs.org/@types/glob/-/glob-7.1.1.tgz"
,
...
@@ -4475,11 +4771,45 @@
...
@@ -4475,11 +4771,45 @@
"resolved"
:
"https://registry.npmjs.org/d3-color/-/d3-color-1.4.0.tgz"
,
"resolved"
:
"https://registry.npmjs.org/d3-color/-/d3-color-1.4.0.tgz"
,
"integrity"
:
"sha512-TzNPeJy2+iEepfiL92LAAB7fvnp/dV2YwANPVHdDWmYMm23qIJBYww3qT8I8C1wXrmrg4UWs7BKc2tKIgyjzHg=="
"integrity"
:
"sha512-TzNPeJy2+iEepfiL92LAAB7fvnp/dV2YwANPVHdDWmYMm23qIJBYww3qT8I8C1wXrmrg4UWs7BKc2tKIgyjzHg=="
},
},
"d3-composite-projections"
:
{
"version"
:
"1.3.2"
,
"resolved"
:
"https://registry.npmjs.org/d3-composite-projections/-/d3-composite-projections-1.3.2.tgz"
,
"integrity"
:
"sha512-dao+Dd/EEYBX+FqNYwe/4putAsMXWewSgDj5sETRFsj1z4X/CVI6ctmZhqvpa/MVYCFHoWV9Issu+20OU5VmbA=="
,
"requires"
:
{
"d3-geo"
:
"^1.11.9"
,
"d3-path"
:
"^1.0.9"
},
"dependencies"
:
{
"d3-geo"
:
{
"version"
:
"1.12.1"
,
"resolved"
:
"https://registry.npmjs.org/d3-geo/-/d3-geo-1.12.1.tgz"
,
"integrity"
:
"sha512-XG4d1c/UJSEX9NfU02KwBL6BYPj8YKHxgBEw5om2ZnTRSbIcego6dhHwcxuSR3clxh0EpE38os1DVPOmnYtTPg=="
,
"requires"
:
{
"d3-array"
:
"1"
}
}
}
},
"d3-dispatch"
:
{
"d3-dispatch"
:
{
"version"
:
"1.0.6"
,
"version"
:
"1.0.6"
,
"resolved"
:
"https://registry.npmjs.org/d3-dispatch/-/d3-dispatch-1.0.6.tgz"
,
"resolved"
:
"https://registry.npmjs.org/d3-dispatch/-/d3-dispatch-1.0.6.tgz"
,
"integrity"
:
"sha512-fVjoElzjhCEy+Hbn8KygnmMS7Or0a9sI2UzGwoB7cCtvI1XpVN9GpoYlnb3xt2YV66oXYb1fLJ8GMvP4hdU1RA=="
"integrity"
:
"sha512-fVjoElzjhCEy+Hbn8KygnmMS7Or0a9sI2UzGwoB7cCtvI1XpVN9GpoYlnb3xt2YV66oXYb1fLJ8GMvP4hdU1RA=="
},
},
"d3-dsv"
:
{
"version"
:
"1.2.0"
,
"resolved"
:
"https://registry.npmjs.org/d3-dsv/-/d3-dsv-1.2.0.tgz"
,
"integrity"
:
"sha512-9yVlqvZcSOMhCYzniHE7EVUws7Fa1zgw+/EAV2BxJoG3ME19V6BQFBwI855XQDsxyOuG7NibqRMTtiF/Qup46g=="
,
"requires"
:
{
"commander"
:
"2"
,
"iconv-lite"
:
"0.4"
,
"rw"
:
"1"
}
},
"d3-ease"
:
{
"version"
:
"1.0.7"
,
"resolved"
:
"https://registry.npmjs.org/d3-ease/-/d3-ease-1.0.7.tgz"
,
"integrity"
:
"sha512-lx14ZPYkhNx0s/2HX5sLFUI3mbasHjSSpwO/KaaNACweVwxUruKyWVcb293wMv1RqTPZyZ8kSZ2NogUZNcLOFQ=="
},
"d3-force"
:
{
"d3-force"
:
{
"version"
:
"1.2.1"
,
"version"
:
"1.2.1"
,
"resolved"
:
"https://registry.npmjs.org/d3-force/-/d3-force-1.2.1.tgz"
,
"resolved"
:
"https://registry.npmjs.org/d3-force/-/d3-force-1.2.1.tgz"
,
...
@@ -4491,6 +4821,32 @@
...
@@ -4491,6 +4821,32 @@
"d3-timer"
:
"1"
"d3-timer"
:
"1"
}
}
},
},
"d3-geo"
:
{
"version"
:
"1.6.4"
,
"resolved"
:
"https://registry.npmjs.org/d3-geo/-/d3-geo-1.6.4.tgz"
,
"integrity"
:
"sha1-8g4eRhyxhF9ai+Vatvh2VCp+MZk="
,
"requires"
:
{
"d3-array"
:
"1"
}
},
"d3-geo-projection"
:
{
"version"
:
"2.1.2"
,
"resolved"
:
"https://registry.npmjs.org/d3-geo-projection/-/d3-geo-projection-2.1.2.tgz"
,
"integrity"
:
"sha1-ffjh6dBG1jHGUJ9+UxNX1K3CSqM="
,
"requires"
:
{
"commander"
:
"2"
,
"d3-array"
:
"1"
,
"d3-geo"
:
"^1.1.0"
}
},
"d3-hexjson"
:
{
"version"
:
"1.1.0"
,
"resolved"
:
"https://registry.npmjs.org/d3-hexjson/-/d3-hexjson-1.1.0.tgz"
,
"integrity"
:
"sha512-fHXGMnA1iYBg0Kw5jqSm9kZDRyw4Mq74AzJzUM/FiCDy9a47xM5qj2+ofTaZbeku9tHsRtoujolHiqmD3s3EHA=="
,
"requires"
:
{
"d3-array"
:
"1"
}
},
"d3-hierarchy"
:
{
"d3-hierarchy"
:
{
"version"
:
"1.1.9"
,
"version"
:
"1.1.9"
,
"resolved"
:
"https://registry.npmjs.org/d3-hierarchy/-/d3-hierarchy-1.1.9.tgz"
,
"resolved"
:
"https://registry.npmjs.org/d3-hierarchy/-/d3-hierarchy-1.1.9.tgz"
,
...
@@ -4514,6 +4870,16 @@
...
@@ -4514,6 +4870,16 @@
"resolved"
:
"https://registry.npmjs.org/d3-quadtree/-/d3-quadtree-1.0.7.tgz"
,
"resolved"
:
"https://registry.npmjs.org/d3-quadtree/-/d3-quadtree-1.0.7.tgz"
,
"integrity"
:
"sha512-RKPAeXnkC59IDGD0Wu5mANy0Q2V28L+fNe65pOCXVdVuTJS3WPKaJlFHer32Rbh9gIo9qMuJXio8ra4+YmIymA=="
"integrity"
:
"sha512-RKPAeXnkC59IDGD0Wu5mANy0Q2V28L+fNe65pOCXVdVuTJS3WPKaJlFHer32Rbh9gIo9qMuJXio8ra4+YmIymA=="
},
},
"d3-sankey"
:
{
"version"
:
"0.9.1"
,
"resolved"
:
"https://registry.npmjs.org/d3-sankey/-/d3-sankey-0.9.1.tgz"
,
"integrity"
:
"sha512-nnRkDaUMjBdeuGg+kWGdA+tjG1AVTnJ+Ykw7ff7CZHVI17Hm5sy8n0UXykVffn13aNHwK5wPOdOt1gS1ZEaF+A=="
,
"requires"
:
{
"d3-array"
:
"1"
,
"d3-collection"
:
"1"
,
"d3-shape"
:
"^1.2.0"
}
},
"d3-shape"
:
{
"d3-shape"
:
{
"version"
:
"1.3.7"
,
"version"
:
"1.3.7"
,
"resolved"
:
"https://registry.npmjs.org/d3-shape/-/d3-shape-1.3.7.tgz"
,
"resolved"
:
"https://registry.npmjs.org/d3-shape/-/d3-shape-1.3.7.tgz"
,
...
@@ -4527,6 +4893,20 @@
...
@@ -4527,6 +4893,20 @@
"resolved"
:
"https://registry.npmjs.org/d3-timer/-/d3-timer-1.0.10.tgz"
,
"resolved"
:
"https://registry.npmjs.org/d3-timer/-/d3-timer-1.0.10.tgz"
,
"integrity"
:
"sha512-B1JDm0XDaQC+uvo4DT79H0XmBskgS3l6Ve+1SBCfxgmtIb1AVrPIoqd+nPSv+loMX8szQ0sVUhGngL7D5QPiXw=="
"integrity"
:
"sha512-B1JDm0XDaQC+uvo4DT79H0XmBskgS3l6Ve+1SBCfxgmtIb1AVrPIoqd+nPSv+loMX8szQ0sVUhGngL7D5QPiXw=="
},
},
"d3-voronoi"
:
{
"version"
:
"1.1.4"
,
"resolved"
:
"https://registry.npmjs.org/d3-voronoi/-/d3-voronoi-1.1.4.tgz"
,
"integrity"
:
"sha512-dArJ32hchFsrQ8uMiTBLq256MpnZjeuBtdHpaDlYuQyjU0CVzCJl/BVW+SkszaAeH95D/8gxqAhgx0ouAWAfRg=="
},
"dagre"
:
{
"version"
:
"0.8.5"
,
"resolved"
:
"https://registry.npmjs.org/dagre/-/dagre-0.8.5.tgz"
,
"integrity"
:
"sha512-/aTqmnRta7x7MCCpExk7HQL2O4owCT2h8NT//9I1OQ9vt29Pa0BzSAkR5lwFUcQ7491yVi/3CXU9jQ5o0Mn2Sw=="
,
"requires"
:
{
"graphlib"
:
"^2.1.8"
,
"lodash"
:
"^4.17.15"
}
},
"dashdash"
:
{
"dashdash"
:
{
"version"
:
"1.14.1"
,
"version"
:
"1.14.1"
,
"resolved"
:
"https://registry.npm.taobao.org/dashdash/download/dashdash-1.14.1.tgz"
,
"resolved"
:
"https://registry.npm.taobao.org/dashdash/download/dashdash-1.14.1.tgz"
,
...
@@ -4535,6 +4915,11 @@
...
@@ -4535,6 +4915,11 @@
"assert-plus"
:
"^1.0.0"
"assert-plus"
:
"^1.0.0"
}
}
},
},
"dayjs"
:
{
"version"
:
"1.9.1"
,
"resolved"
:
"https://registry.npmjs.org/dayjs/-/dayjs-1.9.1.tgz"
,
"integrity"
:
"sha512-01NCTBg8cuMJG1OQc6PR7T66+AFYiPwgDvdJmvJBn29NGzIG+DIFxPLNjHzwz3cpFIvG+NcwIjP9hSaPVoOaDg=="
},
"de-indent"
:
{
"de-indent"
:
{
"version"
:
"1.0.2"
,
"version"
:
"1.0.2"
,
"resolved"
:
"https://registry.npm.taobao.org/de-indent/download/de-indent-1.0.2.tgz"
,
"resolved"
:
"https://registry.npm.taobao.org/de-indent/download/de-indent-1.0.2.tgz"
,
...
@@ -4842,6 +5227,11 @@
...
@@ -4842,6 +5227,11 @@
"integrity"
:
"sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA="
,
"integrity"
:
"sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA="
,
"dev"
:
true
"dev"
:
true
},
},
"detect-browser"
:
{
"version"
:
"5.1.1"
,
"resolved"
:
"https://registry.npmjs.org/detect-browser/-/detect-browser-5.1.1.tgz"
,
"integrity"
:
"sha512-5n2aWI57qC3kZaK4j2zYsG6L1LrxgLptGCNhMQgdKhVn6cSdcq43pp6xHPfTHG3TYM6myF4tIPWiZtfdVDgb9w=="
},
"detect-kerning"
:
{
"detect-kerning"
:
{
"version"
:
"2.1.2"
,
"version"
:
"2.1.2"
,
"resolved"
:
"https://registry.npmjs.org/detect-kerning/-/detect-kerning-2.1.2.tgz"
,
"resolved"
:
"https://registry.npmjs.org/detect-kerning/-/detect-kerning-2.1.2.tgz"
,
...
@@ -5732,6 +6122,11 @@
...
@@ -5732,6 +6122,11 @@
"websocket-driver"
:
">=0.5.1"
"websocket-driver"
:
">=0.5.1"
}
}
},
},
"fecha"
:
{
"version"
:
"4.2.0"
,
"resolved"
:
"https://registry.npmjs.org/fecha/-/fecha-4.2.0.tgz"
,
"integrity"
:
"sha512-aN3pcx/DSmtyoovUudctc8+6Hl4T+hI9GBBHLjA76jdZl7+b1sgh5g4k+u/GL3dTy1/pnYzKp69FpJ0OicE3Wg=="
},
"fetch-jsonp"
:
{
"fetch-jsonp"
:
{
"version"
:
"1.1.3"
,
"version"
:
"1.1.3"
,
"resolved"
:
"https://registry.npmjs.org/fetch-jsonp/-/fetch-jsonp-1.1.3.tgz"
,
"resolved"
:
"https://registry.npmjs.org/fetch-jsonp/-/fetch-jsonp-1.1.3.tgz"
,
...
@@ -7463,6 +7858,14 @@
...
@@ -7463,6 +7858,14 @@
"resolved"
:
"https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz"
,
"resolved"
:
"https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz"
,
"integrity"
:
"sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ=="
"integrity"
:
"sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ=="
},
},
"graphlib"
:
{
"version"
:
"2.1.8"
,
"resolved"
:
"https://registry.npmjs.org/graphlib/-/graphlib-2.1.8.tgz"
,
"integrity"
:
"sha512-jcLLfkpoVGmH7/InMC/1hIvOPSUh38oJtGhvrOFGzioE1DZ+0YW16RgmOJhHiuWTvGiJQ9Z1Ik43JvkRPRvE+A=="
,
"requires"
:
{
"lodash"
:
"^4.17.15"
}
},
"grid-index"
:
{
"grid-index"
:
{
"version"
:
"1.1.0"
,
"version"
:
"1.1.0"
,
"resolved"
:
"https://registry.npmjs.org/grid-index/-/grid-index-1.1.0.tgz"
,
"resolved"
:
"https://registry.npmjs.org/grid-index/-/grid-index-1.1.0.tgz"
,
...
@@ -7924,7 +8327,6 @@
...
@@ -7924,7 +8327,6 @@
"version"
:
"0.4.24"
,
"version"
:
"0.4.24"
,
"resolved"
:
"https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz"
,
"resolved"
:
"https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz"
,
"integrity"
:
"sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA=="
,
"integrity"
:
"sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA=="
,
"dev"
:
true
,
"requires"
:
{
"requires"
:
{
"safer-buffer"
:
">= 2.1.2 < 3"
"safer-buffer"
:
">= 2.1.2 < 3"
}
}
...
@@ -10604,6 +11006,23 @@
...
@@ -10604,6 +11006,23 @@
"resolved"
:
"https://registry.npmjs.org/plotly.js-dist/-/plotly.js-dist-1.52.2.tgz"
,
"resolved"
:
"https://registry.npmjs.org/plotly.js-dist/-/plotly.js-dist-1.52.2.tgz"
,
"integrity"
:
"sha512-32yU9/Fhfi9YZlQBojAajw2SZozXIgNyMn3oIGWWLvxl/BLI6DaqcqHgkw/LP373Kp+844m7FeGGZ7EgOs1N1Q=="
"integrity"
:
"sha512-32yU9/Fhfi9YZlQBojAajw2SZozXIgNyMn3oIGWWLvxl/BLI6DaqcqHgkw/LP373Kp+844m7FeGGZ7EgOs1N1Q=="
},
},
"point-at-length"
:
{
"version"
:
"1.1.0"
,
"resolved"
:
"https://registry.npmjs.org/point-at-length/-/point-at-length-1.1.0.tgz"
,
"integrity"
:
"sha1-CtcuvQmA1/WhqxIpbAVfnrazDlc="
,
"requires"
:
{
"abs-svg-path"
:
"~0.1.1"
,
"isarray"
:
"~0.0.1"
,
"parse-svg-path"
:
"~0.1.1"
},
"dependencies"
:
{
"isarray"
:
{
"version"
:
"0.0.1"
,
"resolved"
:
"https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz"
,
"integrity"
:
"sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
}
}
},
"point-cluster"
:
{
"point-cluster"
:
{
"version"
:
"3.1.8"
,
"version"
:
"3.1.8"
,
"resolved"
:
"https://registry.npmjs.org/point-cluster/-/point-cluster-3.1.8.tgz"
,
"resolved"
:
"https://registry.npmjs.org/point-cluster/-/point-cluster-3.1.8.tgz"
,
...
@@ -11847,6 +12266,11 @@
...
@@ -11847,6 +12266,11 @@
"regl-scatter2d"
:
"^3.1.2"
"regl-scatter2d"
:
"^3.1.2"
}
}
},
},
"regression"
:
{
"version"
:
"2.0.1"
,
"resolved"
:
"https://registry.npmjs.org/regression/-/regression-2.0.1.tgz"
,
"integrity"
:
"sha1-jSnD6CJKEIUMNeM36FqLL6w7DIc="
},
"relateurl"
:
{
"relateurl"
:
{
"version"
:
"0.2.7"
,
"version"
:
"0.2.7"
,
"resolved"
:
"https://registry.npm.taobao.org/relateurl/download/relateurl-0.2.7.tgz"
,
"resolved"
:
"https://registry.npm.taobao.org/relateurl/download/relateurl-0.2.7.tgz"
,
...
@@ -12729,6 +13153,11 @@
...
@@ -12729,6 +13153,11 @@
"resolved"
:
"https://registry.npm.taobao.org/signum/download/signum-0.0.0.tgz"
,
"resolved"
:
"https://registry.npm.taobao.org/signum/download/signum-0.0.0.tgz"
,
"integrity"
:
"sha1-q1UbEAM1EHCnBHg/GgnF52kfnPY="
"integrity"
:
"sha1-q1UbEAM1EHCnBHg/GgnF52kfnPY="
},
},
"simple-statistics"
:
{
"version"
:
"6.1.1"
,
"resolved"
:
"https://registry.npmjs.org/simple-statistics/-/simple-statistics-6.1.1.tgz"
,
"integrity"
:
"sha512-zGwn0DDRa9Zel4H4n2pjTFIyGoAGpnpjrGIctreCxj5XWrcx9v7Xy7270FkC967WMmcvuc8ZU7m0ZG+hGN7gAA=="
},
"simple-swizzle"
:
{
"simple-swizzle"
:
{
"version"
:
"0.2.2"
,
"version"
:
"0.2.2"
,
"resolved"
:
"https://registry.npm.taobao.org/simple-swizzle/download/simple-swizzle-0.2.2.tgz"
,
"resolved"
:
"https://registry.npm.taobao.org/simple-swizzle/download/simple-swizzle-0.2.2.tgz"
,
...
@@ -12805,6 +13234,11 @@
...
@@ -12805,6 +13234,11 @@
}
}
}
}
},
},
"size-sensor"
:
{
"version"
:
"1.0.1"
,
"resolved"
:
"https://registry.npmjs.org/size-sensor/-/size-sensor-1.0.1.tgz"
,
"integrity"
:
"sha512-QTy7MnuugCFXIedXRpUSk9gUnyNiaxIdxGfUjr8xxXOqIB3QvBUYP9+b51oCg2C4dnhaeNk/h57TxjbvoJrJUA=="
},
"slab-decomposition"
:
{
"slab-decomposition"
:
{
"version"
:
"1.0.2"
,
"version"
:
"1.0.2"
,
"resolved"
:
"https://registry.npm.taobao.org/slab-decomposition/download/slab-decomposition-1.0.2.tgz"
,
"resolved"
:
"https://registry.npm.taobao.org/slab-decomposition/download/slab-decomposition-1.0.2.tgz"
,
...
@@ -14776,6 +15210,11 @@
...
@@ -14776,6 +15210,11 @@
"integrity"
:
"sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog=="
,
"integrity"
:
"sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog=="
,
"dev"
:
true
"dev"
:
true
},
},
"vue-js-toggle-button"
:
{
"version"
:
"1.3.3"
,
"resolved"
:
"https://registry.npmjs.org/vue-js-toggle-button/-/vue-js-toggle-button-1.3.3.tgz"
,
"integrity"
:
"sha512-0b920oztgK+1SqlYF26MPiT28hAieL5aAQE7u21XEym5ryfzD4EMer4hLkgDC/1sWsCHb22GvV+t1Kb4AI6QFw=="
},
"vue-loader"
:
{
"vue-loader"
:
{
"version"
:
"15.8.3"
,
"version"
:
"15.8.3"
,
"resolved"
:
"https://registry.npmjs.org/vue-loader/-/vue-loader-15.8.3.tgz"
,
"resolved"
:
"https://registry.npmjs.org/vue-loader/-/vue-loader-15.8.3.tgz"
,
...
@@ -14862,6 +15301,11 @@
...
@@ -14862,6 +15301,11 @@
"resolved"
:
"https://registry.npmjs.org/vue-wechat-title/-/vue-wechat-title-2.0.5.tgz"
,
"resolved"
:
"https://registry.npmjs.org/vue-wechat-title/-/vue-wechat-title-2.0.5.tgz"
,
"integrity"
:
"sha512-bCfKnJpbquqNY5ygNN7nRgNHGhyinWd277ecVh0Z15Tk8nS69catrvQSJIuRxXUOxoO/4Y32c6IfNbQUA8oh0g=="
"integrity"
:
"sha512-bCfKnJpbquqNY5ygNN7nRgNHGhyinWd277ecVh0Z15Tk8nS69catrvQSJIuRxXUOxoO/4Y32c6IfNbQUA8oh0g=="
},
},
"vuejs-progress-bar"
:
{
"version"
:
"1.2.2"
,
"resolved"
:
"https://registry.npmjs.org/vuejs-progress-bar/-/vuejs-progress-bar-1.2.2.tgz"
,
"integrity"
:
"sha512-RTkbj56Hj4nykkc9BZxTxbaulov2oRAHSRuW7BlyYAkz4a9ZjhF0t7X+imEK1F5eNC94AywXlfLbIohGnGq83w=="
},
"vuex"
:
{
"vuex"
:
{
"version"
:
"3.1.2"
,
"version"
:
"3.1.2"
,
"resolved"
:
"https://registry.npmjs.org/vuex/-/vuex-3.1.2.tgz"
,
"resolved"
:
"https://registry.npmjs.org/vuex/-/vuex-3.1.2.tgz"
,
...
@@ -15327,6 +15771,11 @@
...
@@ -15327,6 +15771,11 @@
"resolved"
:
"https://registry.npm.taobao.org/window-size/download/window-size-0.1.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwindow-size%2Fdownload%2Fwindow-size-0.1.0.tgz"
,
"resolved"
:
"https://registry.npm.taobao.org/window-size/download/window-size-0.1.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwindow-size%2Fdownload%2Fwindow-size-0.1.0.tgz"
,
"integrity"
:
"sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0="
"integrity"
:
"sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0="
},
},
"wolfy87-eventemitter"
:
{
"version"
:
"5.2.9"
,
"resolved"
:
"https://registry.npmjs.org/wolfy87-eventemitter/-/wolfy87-eventemitter-5.2.9.tgz"
,
"integrity"
:
"sha512-P+6vtWyuDw+MB01X7UeF8TaHBvbCovf4HPEMF/SV7BdDc1SMTiBy13SRD71lQh4ExFTG1d/WNzDGDCyOKSMblw=="
},
"word-wrap"
:
{
"word-wrap"
:
{
"version"
:
"1.2.3"
,
"version"
:
"1.2.3"
,
"resolved"
:
"https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz"
,
"resolved"
:
"https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz"
,
...
...
package.json
View file @
fe15f2f2
...
@@ -8,7 +8,10 @@
...
@@ -8,7 +8,10 @@
"lint"
:
"vue-cli-service lint"
"lint"
:
"vue-cli-service lint"
},
},
"dependencies"
:
{
"dependencies"
:
{
"
@antv/g2plot
"
:
"
^2.0.1
"
,
"
@hscmap/vue-window
"
:
"
^2.4.2
"
,
"
@hscmap/vue-window
"
:
"
^2.4.2
"
,
"
@types/d3-geo
"
:
"
^1.12.0
"
,
"
@types/d3-sankey
"
:
"
^0.11.0
"
,
"
@types/plotly.js
"
:
"
^1.44.25
"
,
"
@types/plotly.js
"
:
"
^1.44.25
"
,
"
@types/pubsub-js
"
:
"
^1.5.18
"
,
"
@types/pubsub-js
"
:
"
^1.5.18
"
,
"
axios
"
:
"
^0.19.2
"
,
"
axios
"
:
"
^0.19.2
"
,
...
@@ -28,11 +31,13 @@
...
@@ -28,11 +31,13 @@
"
vue
"
:
"
^2.6.11
"
,
"
vue
"
:
"
^2.6.11
"
,
"
vue-class-component
"
:
"
^7.2.2
"
,
"
vue-class-component
"
:
"
^7.2.2
"
,
"
vue-grid-layout
"
:
"
^2.3.7
"
,
"
vue-grid-layout
"
:
"
^2.3.7
"
,
"
vue-js-toggle-button
"
:
"
^1.3.3
"
,
"
vue-property-decorator
"
:
"
^8.4.n0
"
,
"
vue-property-decorator
"
:
"
^8.4.n0
"
,
"
vue-simple-context-menu
"
:
"
^3.3.0
"
,
"
vue-simple-context-menu
"
:
"
^3.3.0
"
,
"
vue-svg-gauge
"
:
"
^1.2.1
"
,
"
vue-svg-gauge
"
:
"
^1.2.1
"
,
"
vue-video-player
"
:
"
^5.0.2
"
,
"
vue-video-player
"
:
"
^5.0.2
"
,
"
vue-wechat-title
"
:
"
^2.0.5
"
,
"
vue-wechat-title
"
:
"
^2.0.5
"
,
"
vuejs-progress-bar
"
:
"
^1.2.2
"
,
"
vuex
"
:
"
^3.1.2
"
,
"
vuex
"
:
"
^3.1.2
"
,
"
vuex-class
"
:
"
^0.3.2
"
"
vuex-class
"
:
"
^0.3.2
"
},
},
...
...
src/App.vue
View file @
fe15f2f2
...
@@ -77,7 +77,8 @@
...
@@ -77,7 +77,8 @@
</nav>
</nav>
<div
id=
"appLeftClick"
>
<div
id=
"appLeftClick"
style=
"min-height: 100vh;"
>
...
@@ -150,11 +151,14 @@ import { indexOf } from "typescript-collections/dist/lib/arrays";
...
@@ -150,11 +151,14 @@ import { indexOf } from "typescript-collections/dist/lib/arrays";
//when add more available widgets add ref to the widgets
//when add more available widgets add ref to the widgets
import
Status
from
"
./components/Status/Status.vue
"
;
import
Status
from
"
./components/Status/Status.vue
"
;
import
Navigation
from
"
./components/Navigation/Navigation.vue
"
;
import
WaveView
from
"
./components/WaveView/WaveView.vue
"
;
import
WaveView
from
"
./components/WaveView/WaveView.vue
"
;
import
Method
from
"
./components/Method/Method.vue
"
;
import
Method
from
"
./components/Method/Method.vue
"
;
import
Config
from
"
./components/Config/Config.vue
"
;
import
Config
from
"
./components/Config/Config.vue
"
;
import
BoolConfig
from
"
./components/Config/BoolConfig.vue
"
;
import
Thing
from
"
./components/Thing/Thing.vue
"
;
import
Thing
from
"
./components/Thing/Thing.vue
"
;
import
State
from
"
./components/State/State.vue
"
;
import
State
from
"
./components/State/State.vue
"
;
import
BoolState
from
"
./components/State/BoolState.vue
"
;
import
VarBroadcast
from
"
./components/VarBroadcast/VarBroadcast.vue
"
;
import
VarBroadcast
from
"
./components/VarBroadcast/VarBroadcast.vue
"
;
import
AutoBroadcast
from
"
./components/AutoBroadcast/AutoBroadcast.vue
"
;
import
AutoBroadcast
from
"
./components/AutoBroadcast/AutoBroadcast.vue
"
;
import
SlideShow
from
"
./components/SlideShow/SlideShow.vue
"
;
import
SlideShow
from
"
./components/SlideShow/SlideShow.vue
"
;
...
@@ -172,15 +176,18 @@ import Windows from "./components/Common/Windows.vue";
...
@@ -172,15 +176,18 @@ import Windows from "./components/Common/Windows.vue";
WaveView
,
WaveView
,
Method
,
Method
,
Config
,
Config
,
BoolConfig
,
Thing
,
Thing
,
GridLayout
,
GridLayout
,
GridItem
,
GridItem
,
State
,
State
,
BoolState
,
VarBroadcast
,
VarBroadcast
,
AutoBroadcast
,
AutoBroadcast
,
SlideShow
,
SlideShow
,
CardReader
,
CardReader
,
Windows
,
Windows
,
Navigation
,
}
}
})
})
...
@@ -206,14 +213,17 @@ export default class App extends Vue {
...
@@ -206,14 +213,17 @@ export default class App extends Vue {
availableWidgets
=
[
availableWidgets
=
[
"
Status
"
,
"
Status
"
,
"
Config
"
,
"
Config
"
,
"
BoolConfig
"
,
"
WaveView
"
,
"
WaveView
"
,
"
Method
"
,
"
Method
"
,
"
Thing
"
,
"
Thing
"
,
"
State
"
,
"
State
"
,
"
BoolState
"
,
"
VarBroadcast
"
,
"
VarBroadcast
"
,
"
AutoBroadcast
"
,
"
AutoBroadcast
"
,
"
SlideShow
"
,
"
SlideShow
"
,
"
CardReader
"
"
CardReader
"
,
"
Navigation
"
];
];
...
@@ -310,7 +320,9 @@ export default class App extends Vue {
...
@@ -310,7 +320,9 @@ export default class App extends Vue {
};
};
var
fragment
=
window
.
location
.
hash
;
var
fragment
=
window
.
location
.
hash
;
console
.
log
(
"
costum
"
+
fragment
);
if
(
fragment
!=
"
#blank
"
&&
fragment
!=
"
#Blank
"
&&
fragment
!=
"
#
"
)
{
if
(
fragment
!=
"
#blank
"
&&
fragment
!=
"
#Blank
"
&&
fragment
!=
"
#
"
)
{
fragment
=
fragment
.
substring
(
1
,
fragment
.
length
);
fragment
=
fragment
.
substring
(
1
,
fragment
.
length
);
var
customViewURL
=
"
/customView/template
"
+
fragment
;
var
customViewURL
=
"
/customView/template
"
+
fragment
;
...
@@ -339,18 +351,34 @@ export default class App extends Vue {
...
@@ -339,18 +351,34 @@ export default class App extends Vue {
);
);
this
.
widgetList
=
widgets
.
widgetList
;
this
.
widgetList
=
widgets
.
widgetList
;
this
.
lastWidgetIndex
=
Number
(
widgets
.
currentRef
);
this
.
lastWidgetIndex
=
Number
(
widgets
.
currentRef
);
this
.
$forceUpdate
();
//this.$forceUpdate();
//替换startpath
//todo:替换startpath;判断是否存在$startpath$
/*for (var wid of this.widgetList) {
if((wid.widgetConfig[1].edit.url).search("startpath") != -1 ){
console.log("in"+(wid.widgetConfig[1].edit.url));
((this.$refs[wid.ref] as Array<Widget>)[0] as Widget).replaceStartPath( fragment as string);
}
}*/
//Defer the callback to be executed after the next DOM update cycle.
Vue
.
nextTick
(()
=>
{
Vue
.
nextTick
(()
=>
{
//
fragment = fragment.substring(1,fragment.length);
/*
fragment = fragment.substring(1,fragment.length);
//
for (var wid of this.widgetList) {
for (var wid of this.widgetList) {
//
((this.$refs[wid.ref] as Array
<
Widget
>
)[
0
]
as
Widget
).
replaceStartPath
(
fragment
as
string
);
((this.$refs[wid.ref] as Array<Widget>)[0] as Widget).replaceStartPath( fragment as string);
// }
}*/
//刷新值
//刷新值
this
.
importActiveWidgetList
();
//
this.importActiveWidgetList();
// for (var wid of this.widgetList) {
// for (var wid of this.widgetList) {
// ((this.$refs[wid.ref] as Array
<
Widget
>
)[
0
]
as
Widget
).
refresh
();
// ((this.$refs[wid.ref] as Array
<
Widget
>
)[
0
]
as
Widget
).
refresh
();
// }
// }
fragment
=
fragment
.
substring
(
1
,
fragment
.
length
);
console
.
log
(
fragment
);
this
.
importActiveWidgetList
(
fragment
);
});
});
}
}
else
{
else
{
...
@@ -360,6 +388,7 @@ export default class App extends Vue {
...
@@ -360,6 +388,7 @@ export default class App extends Vue {
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
var
dataURL
=
fragment
;
var
dataURL
=
fragment
;
this
.
dataAccess
(
dataURL
);
this
.
dataAccess
(
dataURL
);
console
.
log
(
dataURL
);
});
});
}
}
...
@@ -383,9 +412,9 @@ export default class App extends Vue {
...
@@ -383,9 +412,9 @@ export default class App extends Vue {
exportActiveWidgetList
():
AllWidgetConfig
{
exportActiveWidgetList
():
AllWidgetConfig
{
for
(
var
widget
of
this
.
widgetList
)
{
for
(
var
widget
of
this
.
widgetList
)
{
widget
.
widgetConfig
=
((
this
.
$refs
[
widget
.
ref
]
as
Array
<
console
.
log
(
"
innn
"
);
Widget
widget
.
widgetConfig
=
((
this
.
$refs
[
widget
.
ref
]
as
Array
<
Widget
>
)[
0
]
as
Widget
).
getConfig
();
>
)[
0
]
as
Widget
).
getConfig
(
);
console
.
log
(
widget
.
widgetConfig
);
}
}
var
widgetConfigList
=
new
AllWidgetConfig
();
var
widgetConfigList
=
new
AllWidgetConfig
();
widgetConfigList
.
widgetList
=
this
.
widgetList
;
widgetConfigList
.
widgetList
=
this
.
widgetList
;
...
@@ -393,10 +422,12 @@ export default class App extends Vue {
...
@@ -393,10 +422,12 @@ export default class App extends Vue {
return
widgetConfigList
;
return
widgetConfigList
;
}
}
importActiveWidgetList
()
{
importActiveWidgetList
(
fragment
:
string
)
{
console
.
log
(
this
.
widgetList
);
for
(
var
wid
of
this
.
widgetList
)
{
for
(
var
wid
of
this
.
widgetList
)
{
console
.
log
(
'
in
'
);
((
this
.
$refs
[
wid
.
ref
]
as
Array
<
Widget
>
)[
0
]
as
Widget
).
setConfig
(
((
this
.
$refs
[
wid
.
ref
]
as
Array
<
Widget
>
)[
0
]
as
Widget
).
setConfig
(
wid
.
widgetConfig
as
WidgetConfig
wid
.
widgetConfig
as
WidgetConfig
,
fragment
);
);
}
}
}
}
...
@@ -419,13 +450,14 @@ export default class App extends Vue {
...
@@ -419,13 +450,14 @@ export default class App extends Vue {
this
.
importActiveWidgetList
();
this
.
importActiveWidgetList
();
});
});
};
};
}
}
saveWidgetList
():
void
{
saveWidgetList
():
void
{
var
data
=
JSON
.
stringify
(
this
.
exportActiveWidgetList
());
var
data
=
JSON
.
stringify
(
this
.
exportActiveWidgetList
());
const
blob
=
new
Blob
([
data
]);
const
blob
=
new
Blob
([
data
]);
/*
if
(
window
.
navigator
.
msSaveOrOpenBlob
)
{
if
(
window
.
navigator
.
msSaveOrOpenBlob
)
{
// 兼容IE10
// 兼容IE10
navigator
.
msSaveBlob
(
blob
,
this
.
fileName
);
navigator
.
msSaveBlob
(
blob
,
this
.
fileName
);
...
@@ -436,7 +468,7 @@ export default class App extends Vue {
...
@@ -436,7 +468,7 @@ export default class App extends Vue {
aTag
.
href
=
URL
.
createObjectURL
(
blob
);
aTag
.
href
=
URL
.
createObjectURL
(
blob
);
aTag
.
click
();
aTag
.
click
();
URL
.
revokeObjectURL
(
aTag
.
href
);
URL
.
revokeObjectURL
(
aTag
.
href
);
}
*/
}
}
}
addWidget
(
widgetName
:
string
):
void
{
addWidget
(
widgetName
:
string
):
void
{
...
...
src/Windows/WindowsApp.vue
View file @
fe15f2f2
...
@@ -20,16 +20,58 @@
...
@@ -20,16 +20,58 @@
</tr>
</tr>
<tr
v-if=
"EditData.edit.type != 'config'"
>
<tr
v-if=
"EditData.edit.type == 'Navigation'"
>
<td><button
class=
"button has-text-primary"
style=
"margin-left: 15px;"
@
click=
"addInput"
>
Add Input
</button></td>
<td><table
class=
"table"
>
<tbody
v-for=
"(data,index) in EditData.edit.url"
>
<tr>
<input
class=
"input has-text-primary"
v-model=
"data.url"
></tr>
<tr>
<button
@
click=
"deleteRow(index)"
>
删除
</button>
</tr>
</tbody>
</table></td>
</tr>
<tr
v-if=
"EditData.edit.type != 'Navigation'"
>
<th>
url:
</th>
<th>
url:
</th>
<td>
<input
class=
"input has-text-primary"
v-model=
"EditData.edit.url"
type=
"text"
></td>
<td>
<input
class=
"input has-text-primary"
v-model=
"EditData.edit.url"
type=
"text"
></td>
<td><button
class=
"button has-text-primary"
style=
"margin-left: 15px;"
@
click=
"pathPoke"
>
POKE
</button></td>
<td><button
class=
"button has-text-primary"
style=
"margin-left: 15px;"
@
click=
"pathPoke"
>
POKE
</button></td>
</tr>
</tr>
<tr
v-for=
"(prop,key) in EditData.props"
>
<tr
v-for=
"(prop,key) in EditData.props"
v-if=
"key != 'StateIndicatorFile'"
>
<th>
{{
key
}}
</th>
<th>
{{
key
}}
</th>
<td>
<input
class=
"input has-text-primary"
v-model=
"EditData.props[key]"
type=
"text"
>
{{
prop
}}
</td>
<td><input
v-if=
"key != 'titleSize'"
class=
"input has-text-primary"
v-model=
"EditData.props[key]"
type=
"text"
>
<td
v-if=
"key == 'setPathPoke' || key == 'getPathPoke'"
><button
class=
"button has-text-primary"
style=
"margin-left: 15px;"
@
click=
"pathPoke(key)"
>
POKE
</button></td>
<div
class=
"select"
v-if=
"key == 'titleSize'"
>
<select
v-model=
"EditData.props.titleSize"
>
<option>
is-small
</option>
<option>
is-medium
</option>
<option>
is-large
</option>
</select>
</div>
</td>
<!--
<td
v-if=
"key == 'setPathPoke' || key == 'getPathPoke'"
><button
class=
"button has-text-primary"
style=
"margin-left: 15px;"
@
click=
"pathPoke(key)"
>
POKE
</button></td>
-->
</tr>
<tr
v-for=
"(prop,key) in EditData.props.StateIndicatorFile"
>
<th>
{{
key
}}
</th>
<td>
<input
class=
"input has-text-primary"
v-model=
"EditData.props.StateIndicatorFile[key]"
type=
"text"
>
</td>
</tr>
<tr
v-if=
"EditData.edit.type == 'state'"
>
<th>
ShowStateValue
</th>
<td>
<toggle-button
v-model=
"EditData.edit.isShowStateVlaue"
width=
"80"
height=
"30"
switch-color=
"
{checked: '#25EF02', unchecked: 'linear-gradient(red, yellow)'}"
:labels="{checked: 'show', unchecked: 'hide'}"/>
</td>
</tr>
</tr>
...
@@ -45,7 +87,7 @@
...
@@ -45,7 +87,7 @@
<div
class=
"field-body"
>
<div
class=
"field-body"
>
<div
class=
"field"
>
<div
class=
"field"
>
<div
class=
"control"
>
<div
class=
"control"
>
<input
class=
"input"
type=
"text"
v-model=
"tempUserInputData[label]"
>
<input
class=
"input"
type=
"text"
v-model=
"
EditData.params.
tempUserInputData[label]"
>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -65,6 +107,7 @@
...
@@ -65,6 +107,7 @@
</table>
</table>
</div>
</div>
...
@@ -128,10 +171,6 @@ export default class WindowsApp extends Vue {
...
@@ -128,10 +171,6 @@ export default class WindowsApp extends Vue {
this
.
EditData
=
data
;
this
.
EditData
=
data
;
}
}
if
(
this
.
EditData
.
props
.
StateFile
!=
null
){
this
.
EditData
.
props
.
StateFile
=
JSON
.
stringify
(
this
.
EditData
.
props
.
StateFile
);
this
.
EditData
.
props
.
StateIndicatorFile
=
JSON
.
stringify
(
this
.
EditData
.
props
.
StateIndicatorFile
);
}
}
}
mounted
(){
mounted
(){
...
@@ -144,15 +183,15 @@ export default class WindowsApp extends Vue {
...
@@ -144,15 +183,15 @@ export default class WindowsApp extends Vue {
this
.
setVariableList
(
this
.
setVariableList
(
this
.
pathProcessor
.
extractVarFromPath
(
this
.
EditData
.
params
.
PokedPath
)
this
.
pathProcessor
.
extractVarFromPath
(
this
.
EditData
.
params
.
PokedPath
)
);
);
if
(
this
.
EditData
.
edit
.
type
==
'
config
'
){
this
.
setVariableList
(
this
.
pathProcessor
.
extractVarFromPath
(
this
.
EditData
.
params
.
GetPokedPath
)
);
this
.
setVariableList
(
this
.
pathProcessor
.
extractVarFromPath
(
this
.
EditData
.
params
.
SetPokedPath
)
);
}
}
addInput
(){
this
.
EditData
.
edit
.
url
.
push
({});
}
deleteRow
(
index
)
{
this
.
EditData
.
edit
.
url
.
splice
(
index
,
1
);
}
}
/*loadTextFromStateFile(ev: any){
/*loadTextFromStateFile(ev: any){
...
@@ -188,7 +227,7 @@ export default class WindowsApp extends Vue {
...
@@ -188,7 +227,7 @@ export default class WindowsApp extends Vue {
target
:
[
"
self
"
]
target
:
[
"
self
"
]
};
};
this
.
EditData
.
params
.
Args
=
Args
;
this
.
EditData
.
params
.
Args
=
Args
;
this
.
EditData
.
params
.
tempUserInputData
=
this
.
tempUserInputData
;
//
this.EditData.params.tempUserInputData = this.tempUserInputData;
window
.
opener
.
UpdateWidget
(
this
.
EditData
);
window
.
opener
.
UpdateWidget
(
this
.
EditData
);
}
}
...
@@ -196,13 +235,8 @@ export default class WindowsApp extends Vue {
...
@@ -196,13 +235,8 @@ export default class WindowsApp extends Vue {
pathPoke
(
key
:
string
)
{
pathPoke
()
{
this
.
isShowParams
=
true
;
this
.
isShowParams
=
true
;
if
(
key
==
'
setPathPoke
'
){
this
.
EditData
.
params
.
action
=
'
set
'
;
}
else
if
(
key
==
'
getPathPoke
'
){
this
.
EditData
.
params
.
action
=
'
get
'
;
}
window
.
opener
.
UpdateWidget
(
this
.
EditData
);
window
.
opener
.
UpdateWidget
(
this
.
EditData
);
}
}
...
@@ -211,12 +245,10 @@ export default class WindowsApp extends Vue {
...
@@ -211,12 +245,10 @@ export default class WindowsApp extends Vue {
setVariableList
(
path
:
string
[])
{
setVariableList
(
path
:
string
[])
{
console
.
log
(
path
);
this
.
userInputData
.
clear
();
this
.
userInputData
.
clear
();
path
.
forEach
(
element
=>
{
path
.
forEach
(
element
=>
{
this
.
userInputData
.
set
(
element
,
''
);
this
.
userInputData
.
set
(
element
,
''
);
});
});
console
.
log
(
this
.
userInputData
);
this
.
$forceUpdate
();
this
.
$forceUpdate
();
}
}
...
@@ -225,7 +257,7 @@ export default class WindowsApp extends Vue {
...
@@ -225,7 +257,7 @@ export default class WindowsApp extends Vue {
getVariableValues
():
Map
<
string
,
string
>
{
getVariableValues
():
Map
<
string
,
string
>
{
for
(
var
key
of
this
.
userInputData
.
keys
())
{
for
(
var
key
of
this
.
userInputData
.
keys
())
{
this
.
userInputData
.
set
(
key
,
this
.
tempUserInputData
[
key
]);
this
.
userInputData
.
set
(
key
,
this
.
EditData
.
params
.
tempUserInputData
[
key
]);
}
}
return
this
.
userInputData
;
return
this
.
userInputData
;
...
...
src/Windows/main.ts
View file @
fe15f2f2
...
@@ -5,6 +5,8 @@ import 'buefy/dist/buefy.css'
...
@@ -5,6 +5,8 @@ import 'buefy/dist/buefy.css'
import
'
font-awesome/css/font-awesome.min.css
'
import
'
font-awesome/css/font-awesome.min.css
'
//import hscmap from '@hscmap/vue-window'
//import hscmap from '@hscmap/vue-window'
import
*
as
VueWindow
from
'
@hscmap/vue-window
'
import
*
as
VueWindow
from
'
@hscmap/vue-window
'
import
ToggleButton
from
'
vue-js-toggle-button
'
Vue
.
use
(
ToggleButton
)
import
router
from
'
vue-router
'
import
router
from
'
vue-router
'
...
...
src/Windows/models/PathProcessor.ts
View file @
fe15f2f2
...
@@ -5,6 +5,7 @@ export default class PathProcessor {
...
@@ -5,6 +5,7 @@ export default class PathProcessor {
let
str
=
''
;
let
str
=
''
;
//取出path中的$ $,数组
//取出path中的$ $,数组
const
result
=
path
.
match
(
urlRegExp
);
const
result
=
path
.
match
(
urlRegExp
);
console
.
log
(
result
);
if
(
result
!=
null
)
{
if
(
result
!=
null
)
{
//遍历map和数组
//遍历map和数组
variables
.
forEach
((
value
:
string
,
key
:
string
)
=>
{
variables
.
forEach
((
value
:
string
,
key
:
string
)
=>
{
...
@@ -14,6 +15,7 @@ export default class PathProcessor {
...
@@ -14,6 +15,7 @@ export default class PathProcessor {
str
=
'
\
$
'
+
label
+
'
\
$
'
;
str
=
'
\
$
'
+
label
+
'
\
$
'
;
//将$xxx$替换成参数值 path为/card0/length/0
//将$xxx$替换成参数值 path为/card0/length/0
path
=
path
.
replace
(
str
,
value
);
path
=
path
.
replace
(
str
,
value
);
console
.
log
(
path
);
}
}
});
});
});
});
...
...
src/components/Config/BoolConfig.vue
0 → 100644
View file @
fe15f2f2
<
template
>
<div
class=
"container"
>
<div
class=
"columns content "
v-bind:class=
"EditData.props.titleSize"
style=
"margin-bottom: 0px;"
>
<div
class=
"column content-table-cell-heading-color is-narrow"
style=
"margin: 0px;"
>
<h3>
{{
EditData
.
props
.
title
}}
</h3>
</div>
</div>
<div
class=
"columns"
style=
"padding: 5px;margin-top: 5px;"
>
<toggle-button
v-model=
"switchValue"
:sync=
"true"
@
change=
"viewSetLoad(EditData.params.Args,false)"
width=
"70"
height=
"34"
:disabled=
"checkActiveSample"
switch-color=
"
{checked: '#25EF02', unchecked: 'linear-gradient(red, yellow)'}"
:labels="{checked: 'open', unchecked: 'close'}"/>
</div>
<div
class=
"colmumns"
>
<WidgetParams
class=
"column"
style=
"padding-top: 0px;padding-bottom: 5px;"
ref=
"WidgetGetParams"
action=
"get"
@
updataVariables=
"viewGetLoad"
></WidgetParams>
</div>
<div
class=
"colmumns"
>
<WidgetParams
class=
"column"
ref=
"WidgetSetParams"
action=
"set"
@
updataVariables=
"viewSetLoad"
></WidgetParams>
</div>
</div>
</
template
>
<
script
lang=
"ts"
>
import
Vue
from
"
vue
"
;
import
Component
from
"
vue-class-component
"
;
import
{
WidgetRef
}
from
"
@/models/WidgetRef
"
;
import
{
Prop
,
Watch
}
from
"
vue-property-decorator
"
;
import
{
WidgetConfig
}
from
"
@/models/WidgetConfig
"
;
import
{
UpdatePayload
}
from
"
@/models/UpdatePayload
"
;
import
{
Widget
}
from
"
@/models/widget
"
;
import
{
ResourceInfo
}
from
"
@/models/Customview
"
;
import
WidgetParams
from
"
@/components/Common/WidgetParams.vue
"
;
import
axios
from
"
axios
"
;
import
Plotly
from
"
plotly.js
"
;
import
PathProcessor
from
"
@/models/PathProcessor
"
;
import
StrMapObjChange
from
"
@/models/StrMapObjChange
"
;
import
{
forEach
}
from
"
typescript-collections/dist/lib/arrays
"
;
import
{
map
}
from
"
d3
"
;
import
Navigation
from
"
@/components/Common/Navigation.vue
"
;
import
Windows
from
"
@/components/Common/Windows.vue
"
;
@
Component
({
components
:
{
WidgetParams
,
Navigation
,
Windows
,
}
})
export
default
class
BoolConfig
extends
Widget
{
@
Prop
()
index
!
:
number
;
@
Prop
()
refIndex
!
:
number
;
@
Prop
()
widgetList
:
WidgetRef
[]
=
[];
pathProcessor
=
new
PathProcessor
();
strMapObjChange
=
new
StrMapObjChange
();
timer
?:
number
;
WidgetComponentName
:
string
=
"
BoolConfig
"
;
getConfigValue
:
string
=
"
undefined
"
;
setConfigValue
:
string
=
""
;
pathId
:
string
=
""
;
userGetInputData
=
new
Map
<
string
,
string
>
();
userSetInputData
=
new
Map
<
string
,
string
>
();
getPathwithVar
:
string
=
""
;
setPathwithVar
:
string
=
""
;
isShowGetPath
:
boolean
=
false
;
isShowSetPath
:
boolean
=
false
;
isOpen
:
boolean
=
true
;
fontSize
:
number
=
25
;
activeColor
:
string
=
''
;
EditPathPoke
:
string
=
''
;
isSetPoke
:
boolean
=
false
;
isGetPoke
:
boolean
=
false
;
pokedPath
:
string
=
''
;
isShowParams
:
boolean
=
false
;
setLabel
:
string
=
''
;
switchValue
:
boolean
=
false
;
checkActiveSample
:
boolean
=
true
;
EditPathPoke
:
string
=
""
;
config
:
WidgetConfig
=
{
WidgetComponentName
:
"
BoolConfig
"
,
data
:
{
displayname
:
""
,
url
:
""
,
get
:
{
url
:
""
,
userInputData
:
""
},
set
:
{
url
:
""
,
userInputData
:
""
}
}
};
EditData
=
{
edit
:{
url
:
this
.
config
.
data
.
url
,
type
:
'
Boolconfig
'
,
index
:
this
.
refIndex
,
},
props
:{
fontSize
:
this
.
fontSize
,
title
:
''
,
titleSize
:
''
,
},
params
:{
PokedPath
:
this
.
EditPathPoke
,
action
:
'
get
'
,
Args
:
{},
tempUserInputData
:{},
setLabel
:
''
,
},
};
created
()
{
// this.config.data.userInputData = this.userInputData;
this
.
config
.
data
.
get
.
userInputData
=
this
.
strMapObjChange
.
strMapToObj
(
this
.
userGetInputData
);
this
.
config
.
data
.
set
.
userInputData
=
this
.
strMapObjChange
.
strMapToObj
(
this
.
userSetInputData
);
}
mounted
(){
this
.
timer
=
setInterval
(
this
.
getrefresh
,
1000
);
let
containerlist
=
document
.
getElementsByClassName
(
'
container
'
);
//CreateContainerId
var
self
=
this
;
let
RightClickField
=
containerlist
[
this
.
index
];
RightClickField
.
oncontextmenu
=
function
(
e
)
{
e
.
preventDefault
();
//demo区域停止原鼠标右击菜单
//this.popMenu('itemMenu',100,"100");
let
menu
=
document
.
querySelector
(
'
.menu
'
);
//获取盒子menu。
if
(
menu
)
menu
.
remove
();
//判断清除初始盒子
menu
=
document
.
createElement
(
'
div
'
);
//创建盒子。
menu
.
classList
.
add
(
'
menu
'
);
//添加类
let
menu1
=
document
.
createElement
(
'
BUTTON
'
);
//创建盒子menu1。
menu1
.
innerHTML
=
'
del
'
;
//盒子menu1添加文本XXXX
menu1
.
onclick
=
self
.
del
;
menu
.
appendChild
(
menu1
);
//menu末尾添加新的节点menu1
let
menu2
=
document
.
createElement
(
'
BUTTON
'
);
//创建盒子menu1。
menu2
.
innerHTML
=
'
edit
'
;
//盒子menu1添加文本XXXX
menu2
.
onclick
=
self
.
openWindows
;
//menu2.setAttribute("onclick", this.openWindows);
menu
.
appendChild
(
menu2
);
//menu末尾添加新的节点menu1
RightClickField
.
appendChild
(
menu
);
//body末尾添加新的节点menu
//盒子跟随鼠标光标。
//menu.style.top = $('#RightClick').offset().top;
menu
.
style
.
left
=
e
.
offsetX
+
"
px
"
;
menu
.
style
.
top
=
e
.
offsetY
+
"
px
"
;
menu
.
style
.
position
=
'
absolute
'
;
};
//全局点击时消失。
RightClickField
.
onclick
=
e
=>
{
let
menu
=
document
.
querySelector
(
'
.menu
'
)
if
(
menu
&&
!
menu
.
contains
(
e
.
target
))
menu
.
remove
()
}
}
destroyed
()
{
clearInterval
(
this
.
timer
);
}
openWindows
(){
var
JsonData
=
JSON
.
stringify
(
this
.
EditData
);
var
url
=
"
http://localhost:8080/WindowsAppIndex.html/?
"
;
window
.
open
(
url
+
JsonData
,
"
WidgetWindow
"
,
'
height=100, width=100, top=10, left=10, toolbar=no
'
);
}
del
(){
this
.
$emit
(
'
del
'
,
this
.
index
);
}
updateSwitchValue
(){
if
(
this
.
getConfigValue
==
true
||
this
.
getConfigValue
==
false
){
this
.
checkActiveSample
=
false
;
this
.
switchValue
=
Boolean
(
this
.
getConfigValue
);
}
}
updateUI
()
{
this
.
EditData
.
params
.
PokedPath
=
this
.
config
.
data
.
url
;
this
.
EditData
.
edit
.
url
=
this
.
config
.
data
.
url
;
this
.
openWindows
();
}
showPathConfig
()
{
if
(
this
.
isShowGetPath
==
this
.
isShowSetPath
)
{
this
.
isShowGetPath
=
!
this
.
isShowGetPath
;
this
.
isShowSetPath
=
!
this
.
isShowSetPath
;
}
else
{
this
.
isShowGetPath
=
true
;
this
.
isShowSetPath
=
true
;
}
}
getConfig
():
[
WidgetConfig
,
object
]
{
return
[
this
.
config
,
this
.
EditData
];
}
//app
setConfig
(
setConfigData
:
[
WidgetConfig
,
object
],
fragment
:
string
):
void
{
this
.
config
=
setConfigData
[
0
];
this
.
EditData
=
setConfigData
[
1
];
if
(
this
.
EditData
.
edit
.
url
.
search
(
"
startpath
"
)
!=
-
1
){
this
.
replaceStartPath
(
fragment
)}
var
temp
=
this
.
EditData
.
params
.
tempUserInputData
;
temp
=
JSON
.
parse
(
JSON
.
stringify
(
temp
));
temp
=
this
.
strMapObjChange
.
objToStrMap
(
temp
);
//this.EditData.params.tempUserInputData = temp;
this
.
setLabel
=
this
.
EditData
.
params
.
setLabel
;
var
Args
:
UpdatePayload
=
{
action
:
this
.
EditData
.
params
.
action
,
variables
:
temp
,
target
:
[
"
self
"
]
};
this
.
EditData
.
params
.
Args
=
Args
;
this
.
viewLoad
(
Args
);
}
samplePoke
(
sample
:
any
)
{
var
samplePath
=
sample
.
CFET2CORE_SAMPLE_PATH
;
var
setpokedPath
:
string
;
var
getpokedPath
:
string
;
//set
setpokedPath
=
samplePath
;
getpokedPath
=
samplePath
;
var
settemp
=
sample
.
Actions
.
set
.
Parameters
;
settemp
=
JSON
.
parse
(
JSON
.
stringify
(
settemp
));
settemp
=
this
.
strMapObjChange
.
objToStrMap
(
settemp
);
var
SetParameters
:
Map
<
string
,
string
>
;
SetParameters
=
settemp
;
var
temp
=
sample
.
Actions
.
get
.
Parameters
;
temp
=
JSON
.
parse
(
JSON
.
stringify
(
temp
));
temp
=
this
.
strMapObjChange
.
objToStrMap
(
temp
);
var
Parameters
:
Map
<
string
,
string
>
;
Parameters
=
temp
;
var
count
:
number
=
0
;
Parameters
.
forEach
((
value
,
key
)
=>
{
count
++
;
if
(
count
==
1
)
{
getpokedPath
=
getpokedPath
+
"
?
"
;
}
getpokedPath
=
getpokedPath
+
key
+
"
=$
"
+
key
+
"
$&
"
;
});
if
(
count
!=
0
)
{
getpokedPath
=
getpokedPath
.
substring
(
0
,
getpokedPath
.
length
-
1
);
}
this
.
config
.
data
.
get
.
url
=
getpokedPath
;
count
=
0
;
SetParameters
.
forEach
((
value
,
key
)
=>
{
count
++
;
///dummyTest/ReturnDictConfig?
if
(
count
==
1
)
{
setpokedPath
=
setpokedPath
+
"
?
"
;
this
.
pokedPath
=
setpokedPath
;
}
///dummyTest/ReturnDictConfig?key=$key$&
///dummyTest/ReturnDictConfig?key=$key$&value=$value$&
if
(
count
<
SetParameters
.
size
){
setpokedPath
=
setpokedPath
+
key
+
"
=$
"
+
key
+
"
$&
"
;
}
if
(
count
==
SetParameters
.
size
){
this
.
isShowParams
=
true
;
this
.
setLabel
=
key
;
this
.
EditData
.
params
.
setLabel
=
key
;
this
.
config
.
data
.
set
.
url
=
setpokedPath
+
key
+
"
=$
"
+
key
+
"
$
"
;
}
});
///dummyTest/ReturnDictConfig?key=$key$&value=$value$
if
(
count
!=
0
)
{
setpokedPath
=
setpokedPath
.
substring
(
0
,
setpokedPath
.
length
-
1
);
}
count
=
0
;
Parameters
.
forEach
((
value
,
key
)
=>
{
SetParameters
.
forEach
((
setValue
,
setKey
)
=>
{
count
++
;
if
(
setKey
!=
key
){
setpokedPath
=
setpokedPath
+
key
+
"
=$
"
+
key
+
"
$&
"
;
}
})
});
///dummyTest/ReturnDictConfig?key=$key$&value=$value$
if
(
count
!=
0
)
{
setpokedPath
=
setpokedPath
.
substring
(
0
,
setpokedPath
.
length
-
1
);
}
this
.
config
.
data
.
url
=
setpokedPath
;
}
pathPoke
()
{
this
.
config
.
data
.
url
=
this
.
EditData
.
edit
.
url
;
this
.
EditPathPoke
=
this
.
EditData
.
edit
.
url
;
var
pokepath
=
this
.
config
.
data
.
url
;
//axios.defaults.timeout = 1000;
axios
.
get
(
pokepath
).
then
(
response
=>
{
this
.
isGetPoke
=
true
;
this
.
samplePoke
(
response
.
data
);
this
.
updateUI
();
}).
catch
(
err
=>
{
this
.
openWindows
();
});
}
replaceStartPath
(
startPath
:
string
):
void
{
this
.
config
.
data
.
get
.
url
=
this
.
config
.
data
.
get
.
url
.
replace
(
"
$startpath$
"
,
startPath
);
this
.
config
.
data
.
set
.
url
=
this
.
config
.
data
.
set
.
url
.
replace
(
"
$startpath$
"
,
startPath
);
this
.
config
.
data
.
url
=
this
.
config
.
data
.
url
.
replace
(
"
$startpath$
"
,
startPath
);
this
.
EditData
.
edit
.
url
=
this
.
EditData
.
edit
.
url
.
replace
(
"
$startpath$
"
,
startPath
);
}
parentUpdate
(
payload
:
UpdatePayload
):
void
{
var
shouldUpdate
:
boolean
=
false
;
this
.
userGetInputData
=
this
.
strMapObjChange
.
strMapToObj
(
(
this
.
$refs
.
WidgetGetParams
as
WidgetParams
).
getVariableValues
());
var
temp
=
this
.
userGetInputData
;
temp
=
this
.
strMapObjChange
.
objToStrMap
(
temp
);
this
.
userGetInputData
=
temp
;
this
.
userGetInputData
.
forEach
((
value
,
key
)
=>
{
payload
.
variables
.
forEach
((
valueofpayload
,
keyofpayload
)
=>
{
if
(
key
==
keyofpayload
&&
((
this
.
userGetInputData
.
get
(
key
)
as
string
)
!=
(
payload
.
variables
.
get
(
keyofpayload
)
as
string
)))
{
this
.
userGetInputData
.
set
(
key
,
payload
.
variables
.
get
(
keyofpayload
)
as
string
);
shouldUpdate
=
true
;
}
});
});
this
.
userSetInputData
=
this
.
strMapObjChange
.
strMapToObj
(
(
this
.
$refs
.
WidgetSetParams
as
WidgetParams
).
getVariableValues
());
temp
=
this
.
userSetInputData
;
temp
=
this
.
strMapObjChange
.
objToStrMap
(
temp
);
this
.
userSetInputData
=
temp
;
this
.
userSetInputData
.
forEach
((
value
,
key
)
=>
{
payload
.
variables
.
forEach
((
valueofpayload
,
keyofpayload
)
=>
{
if
(
key
==
keyofpayload
&&
((
this
.
userSetInputData
.
get
(
key
)
as
string
)
!=
(
payload
.
variables
.
get
(
keyofpayload
)
as
string
)))
{
this
.
userSetInputData
.
set
(
key
,
payload
.
variables
.
get
(
keyofpayload
)
as
string
);
}
});
});
if
(
shouldUpdate
)
{
(
this
.
$refs
.
WidgetGetParams
as
WidgetParams
).
setVariableInput
(
this
.
userGetInputData
);
(
this
.
$refs
.
WidgetSetParams
as
WidgetParams
).
setVariableInput
(
this
.
userSetInputData
);
this
.
updateUI
();
}
}
async
getData
(
url
:
string
)
{
var
apiLoad
=
url
;
await
axios
.
get
(
apiLoad
,
{
headers
:
{
'
Pragma
'
:
'
no-cache
'
,
'
Cache-Control
'
:
'
no-cache
'
}
}).
then
(
response
=>
{
this
.
getConfigValue
=
response
.
data
.
CFET2CORE_SAMPLE_VAL
;
if
(
this
.
getConfigValue
==
undefined
)
{
this
.
getConfigValue
=
"
undefined
"
;
}
});
this
.
updateSwitchValue
();
}
async
setData
(
url
:
string
)
{
var
apiLoad
=
url
;
await
axios
.
post
(
apiLoad
,
{
headers
:
{
'
Pragma
'
:
'
no-cache
'
,
'
Cache-Control
'
:
'
no-cache
'
}
}).
then
(
response
=>
{
this
.
setConfigValue
=
response
.
data
.
CFET2CORE_SAMPLE_VAL
;
});
}
viewLoad
(
Args
:
UpdatePayload
){
var
checkParent
=
true
;
this
.
viewSetLoad
(
Args
,
checkParent
);
}
//called when widgetParams action clicked
async
viewGetLoad
(
Args
:
UpdatePayload
)
{
// this.config.data.userInputData = Args.variables;
this
.
userGetInputData
=
Args
.
variables
;
this
.
getPathwithVar
=
this
.
pathProcessor
.
FillPathWithVar
(
// this.config.data.userInputData,
this
.
userGetInputData
,
this
.
config
.
data
.
get
.
url
);
await
this
.
getData
(
this
.
getPathwithVar
);
}
async
viewSetLoad
(
Args
:
UpdatePayload
,
checkParent
:
boolean
)
{
if
(
checkParent
==
false
){
// this.config.data.userInputData = Args.variables;
if
(
Object
.
prototype
.
toString
.
call
(
Args
.
variables
)
==
'
[object Undefined]
'
){
this
.
userSetInputData
.
set
(
this
.
setLabel
,
this
.
switchValue
);
}
else
{
this
.
userSetInputData
=
Args
.
variables
;
this
.
userSetInputData
.
set
(
this
.
setLabel
,
this
.
switchValue
);
}
this
.
setPathwithVar
=
this
.
pathProcessor
.
FillPathWithVar
(
this
.
userSetInputData
,
this
.
config
.
data
.
set
.
url
);
await
this
.
setData
(
this
.
setPathwithVar
);
this
.
getrefresh
();
}
else
if
(
checkParent
==
true
){
this
.
getrefresh
();
}
}
getrefresh
()
{
this
.
viewGetLoad
(
this
.
EditData
.
params
.
Args
);
}
}
</
script
>
<
style
scoped
>
.waveView
{
width
:
100%
;
height
:
auto
;
}
.bluetag
{
background
:
url("../../assets/bluetag.png")
;
width
:
26px
;
height
:
26px
;
}
</
style
>
src/components/Config/Config.vue
View file @
fe15f2f2
...
@@ -2,23 +2,28 @@
...
@@ -2,23 +2,28 @@
<div
class=
"container"
>
<div
class=
"container"
>
<div
class=
"columns content "
v-bind:class=
"EditData.props.titleSize"
style=
"margin-bottom: 0px;"
>
<div
class=
"column content-table-cell-heading-color is-narrow"
style=
"margin: 0px;"
>
<div
class=
"columns"
style=
"margin-top:0px"
>
<h3>
{{
EditData
.
props
.
title
}}
</h3>
</div>
<span
style=
"float:left;"
v-show =
"!isShowPath"
class=
"largeFont"
v-if =
"config.data.displayname != ''"
>
{{
config
.
data
.
displayname
}}
</span>
<span
style=
"float:left;"
v-show =
"!isShowPath"
class=
"largeFont"
v-if =
"config.data.displayname == ''"
>
{{
config
.
data
.
get
.
url
}}
</span>
<span
style=
"float:left;"
v-show =
"!isShowPath"
class=
"largeFont"
v-if =
"config.data.displayname == ''"
>
{{
config
.
data
.
set
.
url
}}
</span>
</div>
</div>
<div
class=
"columns"
style=
"margin-top:5px;padding: 5px;"
>
<div
class=
"columns"
style=
"margin-top:5px"
>
<div
class=
"field-body"
>
<div
class=
"field"
>
<div
class=
"column is-10"
style=
"margin-left:3%;overflow:auto;border-style: solid; border-width: 1px; padding: 5px"
>
<div
class=
"control"
>
<p
style=
"float:left;margin:0px;"
>
{{
getConfigValue
}}
</p>
<input
class=
"input"
type=
"text"
v-model=
"setUserData"
>
</div>
</div>
</div>
</div>
<!--
<input
class=
"column is-8 input has-text-info"
type=
"text"
>
-->
<button
class=
"button has-text-info is-light"
style=
"margin-left: 15px;"
@
click=
"viewSetLoad(EditData.params.Args)"
>
set
</button>
<button
class=
"button has-text-info is-light"
style=
"margin-left: 15px;"
@
click=
"viewLoad(EditData.params.Args)"
>
get
</button>
</div>
<!--
<div
class=
"columns"
style=
"margin-top:5px"
>
<toggle-button
v-model=
"myDataVariable"
<toggle-button
v-model=
"myDataVariable"
width=
"100"
width=
"100"
...
@@ -26,8 +31,7 @@
...
@@ -26,8 +31,7 @@
switch-color=
"
{checked: '#25EF02', unchecked: 'linear-gradient(red, yellow)'}"
switch-color=
"
{checked: '#25EF02', unchecked: 'linear-gradient(red, yellow)'}"
:labels="{checked: 'open', unchecked: 'close'}"/>
:labels="{checked: 'open', unchecked: 'close'}"/>
</div>
</div>
-->
<div
class=
"colmumns"
>
<div
class=
"colmumns"
>
<WidgetParams
<WidgetParams
...
@@ -50,7 +54,6 @@
...
@@ -50,7 +54,6 @@
</div>
</div>
</div>
</div>
...
@@ -94,7 +97,7 @@ export default class Config extends Widget {
...
@@ -94,7 +97,7 @@ export default class Config extends Widget {
pathProcessor
=
new
PathProcessor
();
pathProcessor
=
new
PathProcessor
();
strMapObjChange
=
new
StrMapObjChange
();
strMapObjChange
=
new
StrMapObjChange
();
WidgetComponentName
:
string
=
"
Config
"
;
WidgetComponentName
:
string
=
"
Config
"
;
getConfigValue
:
string
=
""
;
getConfigValue
:
string
=
"
undefined
"
;
setConfigValue
:
string
=
""
;
setConfigValue
:
string
=
""
;
pathId
:
string
=
""
;
pathId
:
string
=
""
;
userGetInputData
=
new
Map
<
string
,
string
>
();
userGetInputData
=
new
Map
<
string
,
string
>
();
...
@@ -109,12 +112,18 @@ export default class Config extends Widget {
...
@@ -109,12 +112,18 @@ export default class Config extends Widget {
EditPathPoke
:
string
=
''
;
EditPathPoke
:
string
=
''
;
isSetPoke
:
boolean
=
false
;
isSetPoke
:
boolean
=
false
;
isGetPoke
:
boolean
=
false
;
isGetPoke
:
boolean
=
false
;
pokedPath
:
string
=
''
;
setLabel
:
string
=
''
;
setUserData
:
string
=
'
undefined
'
;
EditPathPoke
:
string
=
""
;
config
:
WidgetConfig
=
{
config
:
WidgetConfig
=
{
WidgetComponentName
:
"
Status
"
,
WidgetComponentName
:
"
Config
"
,
data
:
{
data
:
{
displayname
:
""
,
displayname
:
""
,
url
:
""
,
get
:
{
url
:
""
,
userInputData
:
""
},
get
:
{
url
:
""
,
userInputData
:
""
},
set
:
{
url
:
""
,
userInputData
:
""
}
set
:
{
url
:
""
,
userInputData
:
""
}
}
}
...
@@ -122,19 +131,21 @@ export default class Config extends Widget {
...
@@ -122,19 +131,21 @@ export default class Config extends Widget {
EditData
=
{
EditData
=
{
edit
:{
edit
:{
url
:
this
.
config
.
data
.
url
,
type
:
'
config
'
,
type
:
'
config
'
,
index
:
this
.
refIndex
,
index
:
this
.
refIndex
,
},
},
props
:{
props
:{
title
:
''
,
titleSize
:
''
,
fontSize
:
this
.
fontSize
,
fontSize
:
this
.
fontSize
,
getPathPoke
:
this
.
config
.
data
.
get
.
url
,
setPathPoke
:
this
.
config
.
data
.
set
.
url
,
},
},
params
:{
params
:{
PokedPath
:
this
.
EditPathPoke
,
PokedPath
:
this
.
EditPathPoke
,
action
:
'
get
&set
'
,
action
:
'
get
'
,
Args
:
{},
Args
:
{},
tempUserInputData
:{},
tempUserInputData
:{},
setLabel
:
''
,
},
},
};
};
...
@@ -177,10 +188,6 @@ export default class Config extends Widget {
...
@@ -177,10 +188,6 @@ export default class Config extends Widget {
menu
.
style
.
left
=
e
.
offsetX
+
"
px
"
;
menu
.
style
.
left
=
e
.
offsetX
+
"
px
"
;
menu
.
style
.
top
=
e
.
offsetY
+
"
px
"
;
menu
.
style
.
top
=
e
.
offsetY
+
"
px
"
;
menu
.
style
.
position
=
'
absolute
'
;
menu
.
style
.
position
=
'
absolute
'
;
//menu.style.top = '${e.clientY}px';
//menu.style.left = '${e.clientX}px';
console
.
log
(
menu
.
style
.
top
);
console
.
log
(
menu
);
};
};
...
@@ -192,8 +199,10 @@ export default class Config extends Widget {
...
@@ -192,8 +199,10 @@ export default class Config extends Widget {
}
}
}
}
openWindows
(){
openWindows
(){
var
JsonData
=
JSON
.
stringify
(
this
.
EditData
);
var
JsonData
=
JSON
.
stringify
(
this
.
EditData
);
var
url
=
"
http://localhost:8080/WindowsAppIndex.html/?
"
;
var
url
=
"
http://localhost:8080/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
'
);
}
}
...
@@ -203,22 +212,11 @@ export default class Config extends Widget {
...
@@ -203,22 +212,11 @@ export default class Config extends Widget {
}
}
updateUI
()
{
updateUI
()
{
this
.
updateGetUI
();
this
.
EditData
.
params
.
PokedPath
=
this
.
config
.
data
.
url
;
this
.
updateSetUI
();
this
.
EditData
.
edit
.
url
=
this
.
config
.
data
.
url
;
}
updateGetUI
()
{
console
.
log
(
'
updateGet
'
)
this
.
EditData
.
params
.
PokedPath
=
this
.
config
.
data
.
get
.
url
;
this
.
EditData
.
props
.
getPathPoke
=
this
.
config
.
data
.
get
.
url
;
this
.
openWindows
();
this
.
openWindows
();
}
}
updateSetUI
()
{
this
.
EditData
.
params
.
PokedPath
=
this
.
config
.
data
.
set
.
url
;
this
.
EditData
.
props
.
setPathPoke
=
this
.
config
.
data
.
set
.
url
;
this
.
openWindows
();
}
showPathConfig
()
{
showPathConfig
()
{
if
(
this
.
isShowGetPath
==
this
.
isShowSetPath
)
{
if
(
this
.
isShowGetPath
==
this
.
isShowSetPath
)
{
...
@@ -230,133 +228,138 @@ export default class Config extends Widget {
...
@@ -230,133 +228,138 @@ export default class Config extends Widget {
}
}
}
}
getConfig
():
WidgetConfig
{
getConfig
():
[
WidgetConfig
,
object
]
{
this
.
config
.
data
.
get
.
userInputData
=
this
.
strMapObjChange
.
strMapToObj
(
return
[
this
.
config
,
this
.
EditData
];
(
this
.
$refs
.
WidgetGetParams
as
WidgetParams
).
getVariableValues
()
);
this
.
config
.
data
.
set
.
userInputData
=
this
.
strMapObjChange
.
strMapToObj
(
(
this
.
$refs
.
WidgetSetParams
as
WidgetParams
).
getVariableValues
()
);
return
this
.
config
;
}
}
setConfig
(
widgetConfig
:
WidgetConfig
):
void
{
//app
this
.
config
=
widgetConfig
;
setConfig
(
setConfigData
:
[
WidgetConfig
,
object
],
fragment
:
string
):
void
{
this
.
updateUI
();
this
.
config
=
setConfigData
[
0
];
var
temp
=
this
.
config
.
data
.
get
.
userInputData
;
this
.
EditData
=
setConfigData
[
1
];
temp
=
JSON
.
parse
(
JSON
.
stringify
(
temp
));
temp
=
this
.
strMapObjChange
.
objToStrMap
(
temp
);
if
(
this
.
EditData
.
edit
.
url
.
search
(
"
startpath
"
)
!=
-
1
){
this
.
replaceStartPath
(
fragment
)}
this
.
userGetInputData
=
temp
;
(
this
.
$refs
.
WidgetGetParams
as
WidgetParams
).
setVariableInput
(
this
.
userGetInputData
var
temp
=
this
.
EditData
.
params
.
tempUserInputData
;
);
temp
=
this
.
config
.
data
.
set
.
userInputData
;
temp
=
JSON
.
parse
(
JSON
.
stringify
(
temp
));
temp
=
JSON
.
parse
(
JSON
.
stringify
(
temp
));
temp
=
this
.
strMapObjChange
.
objToStrMap
(
temp
);
temp
=
this
.
strMapObjChange
.
objToStrMap
(
temp
);
this
.
userSetInputData
=
temp
;
//this.EditData.params.tempUserInputData = temp;
(
this
.
$refs
.
WidgetSetParams
as
WidgetParams
).
setVariableInput
(
this
.
userSetInputData
//console.log(this.EditData.params.tempUserInputData);
);
this
.
setLabel
=
this
.
EditData
.
params
.
setLabel
;
var
Args
:
UpdatePayload
=
{
action
:
this
.
EditData
.
params
.
action
,
variables
:
temp
,
target
:
[
"
self
"
]
};
this
.
EditData
.
params
.
Args
=
Args
;
this
.
viewLoad
(
Args
);
//this.pathPoke();
}
}
samplePoke
(
sample
:
any
)
{
samplePoke
(
sample
:
any
)
{
var
samplePath
=
sample
.
CFET2CORE_SAMPLE_PATH
;
var
samplePath
=
sample
.
CFET2CORE_SAMPLE_PATH
;
var
pokedPath
:
string
;
var
setpokedPath
:
string
;
pokedPath
=
samplePath
;
var
getpokedPath
:
string
;
var
count
:
number
=
0
;
//set
setpokedPath
=
samplePath
;
getpokedPath
=
samplePath
;
var
settemp
=
sample
.
Actions
.
set
.
Parameters
;
settemp
=
JSON
.
parse
(
JSON
.
stringify
(
settemp
));
settemp
=
this
.
strMapObjChange
.
objToStrMap
(
settemp
);
var
SetParameters
:
Map
<
string
,
string
>
;
SetParameters
=
settemp
;
if
(
this
.
isSetPoke
==
false
||
this
.
isGetPoke
==
true
)
{
var
temp
=
sample
.
Actions
.
get
.
Parameters
;
var
temp
=
sample
.
Actions
.
get
.
Parameters
;
temp
=
JSON
.
parse
(
JSON
.
stringify
(
temp
));
temp
=
JSON
.
parse
(
JSON
.
stringify
(
temp
));
temp
=
this
.
strMapObjChange
.
objToStrMap
(
temp
);
temp
=
this
.
strMapObjChange
.
objToStrMap
(
temp
);
var
Parameters
:
Map
<
string
,
string
>
;
var
Parameters
:
Map
<
string
,
string
>
;
Parameters
=
temp
;
Parameters
=
temp
;
var
count
:
number
=
0
;
Parameters
.
forEach
((
value
,
key
)
=>
{
Parameters
.
forEach
((
value
,
key
)
=>
{
count
++
;
count
++
;
if
(
count
==
1
)
{
if
(
count
==
1
)
{
pokedPath
=
pokedPath
+
"
?
"
;
getpokedPath
=
get
pokedPath
+
"
?
"
;
}
}
pokedPath
=
pokedPath
+
key
+
"
=$
"
+
key
+
"
$&
"
;
getpokedPath
=
get
pokedPath
+
key
+
"
=$
"
+
key
+
"
$&
"
;
});
});
if
(
count
!=
0
)
{
if
(
count
!=
0
)
{
pokedPath
=
pokedPath
.
substring
(
0
,
pokedPath
.
length
-
1
);
getpokedPath
=
getpokedPath
.
substring
(
0
,
getpokedPath
.
length
-
1
);
}
this
.
config
.
data
.
get
.
url
=
pokedPath
;
}
}
this
.
config
.
data
.
get
.
url
=
getpokedPath
;
if
(
this
.
isGetPoke
==
false
||
this
.
isSetPoke
==
true
)
{
count
=
0
;
pokedPath
=
samplePath
;
count
=
0
;
var
settemp
=
sample
.
Actions
.
set
.
Parameters
;
settemp
=
JSON
.
parse
(
JSON
.
stringify
(
settemp
));
settemp
=
this
.
strMapObjChange
.
objToStrMap
(
settemp
);
var
SetParameters
:
Map
<
string
,
string
>
;
SetParameters
=
settemp
;
SetParameters
.
forEach
((
value
,
key
)
=>
{
SetParameters
.
forEach
((
value
,
key
)
=>
{
count
++
;
count
++
;
///dummyTest/ReturnDictConfig?
if
(
count
==
1
)
{
if
(
count
==
1
)
{
pokedPath
=
pokedPath
+
"
?
"
;
setpokedPath
=
setpokedPath
+
"
?
"
;
this
.
pokedPath
=
setpokedPath
;
}
///dummyTest/ReturnDictConfig?key=$key$&
///dummyTest/ReturnDictConfig?key=$key$&value=$value$&
if
(
count
<
SetParameters
.
size
){
setpokedPath
=
setpokedPath
+
key
+
"
=$
"
+
key
+
"
$&
"
;
}
if
(
count
==
SetParameters
.
size
){
this
.
setLabel
=
key
;
this
.
EditData
.
params
.
setLabel
=
key
;
this
.
config
.
data
.
set
.
url
=
setpokedPath
+
key
+
"
=$
"
+
key
+
"
$
"
;
}
}
pokedPath
=
pokedPath
+
key
+
"
=$
"
+
key
+
"
$&
"
;
});
});
///dummyTest/ReturnDictConfig?key=$key$&value=$value$
if
(
count
!=
0
)
{
if
(
count
!=
0
)
{
pokedPath
=
pokedPath
.
substring
(
0
,
pokedPath
.
length
-
1
);
setpokedPath
=
setpokedPath
.
substring
(
0
,
setpokedPath
.
length
-
1
);
}
this
.
config
.
data
.
set
.
url
=
pokedPath
;
}
}
this
.
isSetPoke
=
false
;
this
.
isGetPoke
=
false
;
count
=
0
;
Parameters
.
forEach
((
value
,
key
)
=>
{
SetParameters
.
forEach
((
setValue
,
setKey
)
=>
{
count
++
;
if
(
setKey
!=
key
){
setpokedPath
=
setpokedPath
+
key
+
"
=$
"
+
key
+
"
$&
"
;
}
}
getPathPoke
(
url
:
string
)
{
})
console
.
log
(
url
);
this
.
config
.
data
.
get
.
url
=
url
;
var
pokepath
=
url
;
axios
.
defaults
.
timeout
=
1000
;
axios
.
get
(
pokepath
).
then
(
response
=>
{
this
.
isGetPoke
=
true
;
this
.
samplePoke
(
response
.
data
);
this
.
updateGetUI
();
}).
catch
(
err
=>
{
console
.
log
(
'
catch
'
);
this
.
EditData
.
params
.
PokedPath
=
this
.
config
.
data
.
get
.
url
;
this
.
openWindows
();
});
});
///dummyTest/ReturnDictConfig?key=$key$&value=$value$
if
(
count
!=
0
)
{
setpokedPath
=
setpokedPath
.
substring
(
0
,
setpokedPath
.
length
-
1
);
}
this
.
config
.
data
.
url
=
setpokedPath
;
}
}
setPathPoke
(
url
:
string
)
{
this
.
config
.
data
.
set
.
url
=
url
;
pathPoke
()
{
var
pokepath
=
url
;
this
.
config
.
data
.
url
=
this
.
EditData
.
edit
.
url
;
this
.
EditPathPoke
=
this
.
EditData
.
edit
.
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
=>
{
this
.
isS
etPoke
=
true
;
this
.
isG
etPoke
=
true
;
this
.
samplePoke
(
response
.
data
);
this
.
samplePoke
(
response
.
data
);
this
.
updateSet
UI
();
this
.
update
UI
();
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
console
.
log
(
'
catch
'
);
this
.
EditData
.
params
.
PokedPath
=
this
.
config
.
data
.
set
.
url
;
this
.
openWindows
();
this
.
openWindows
();
});
});
}
}
pathPoke
()
{
if
(
this
.
EditData
.
params
.
action
==
'
get
'
){
this
.
EditPathPoke
=
this
.
EditData
.
props
.
getPathPoke
;
this
.
getPathPoke
(
this
.
EditData
.
props
.
getPathPoke
);
}
else
if
(
this
.
EditData
.
params
.
action
==
'
set
'
){
this
.
EditPathPoke
=
this
.
EditData
.
props
.
setPathPoke
;
this
.
setPathPoke
(
this
.
EditData
.
props
.
setPathPoke
);
}
}
replaceStartPath
(
startPath
:
string
):
void
{
replaceStartPath
(
startPath
:
string
):
void
{
this
.
config
.
data
.
get
.
url
.
replace
(
"
$startPath$
"
,
startPath
);
this
.
config
.
data
.
get
.
url
=
this
.
config
.
data
.
get
.
url
.
replace
(
"
$startpath$
"
,
startPath
);
this
.
config
.
data
.
set
.
url
.
replace
(
"
$startPath$
"
,
startPath
);
this
.
config
.
data
.
set
.
url
=
this
.
config
.
data
.
set
.
url
.
replace
(
"
$startpath$
"
,
startPath
);
this
.
config
.
data
.
url
=
this
.
config
.
data
.
url
.
replace
(
"
$startpath$
"
,
startPath
);
this
.
EditData
.
edit
.
url
=
this
.
EditData
.
edit
.
url
.
replace
(
"
$startpath$
"
,
startPath
);
}
}
parentUpdate
(
payload
:
UpdatePayload
):
void
{
parentUpdate
(
payload
:
UpdatePayload
):
void
{
...
@@ -401,19 +404,17 @@ export default class Config extends Widget {
...
@@ -401,19 +404,17 @@ export default class Config extends Widget {
async
getData
(
url
:
string
)
{
async
getData
(
url
:
string
)
{
var
apiLoad
=
url
;
var
apiLoad
=
url
;
console
.
log
(
url
);
await
axios
.
get
(
apiLoad
,
{
await
axios
.
get
(
apiLoad
,
{
headers
:
{
headers
:
{
'
Pragma
'
:
'
no-cache
'
,
'
Pragma
'
:
'
no-cache
'
,
'
Cache-Control
'
:
'
no-cache
'
'
Cache-Control
'
:
'
no-cache
'
}
}
}).
then
(
response
=>
{
}).
then
(
response
=>
{
this
.
getConfigValue
=
response
.
data
.
CFET2CORE_SAMPLE_VAL
;
this
.
setUserData
=
response
.
data
.
CFET2CORE_SAMPLE_VAL
;
if
(
this
.
getConfigValue
==
undefined
)
if
(
this
.
setUserData
==
undefined
)
{
{
this
.
getConfigValue
=
"
undefined
"
;
this
.
setUserData
=
"
undefined
"
;
}
}
console
.
log
(
this
.
getConfigValue
);
});
});
}
}
...
@@ -425,25 +426,25 @@ export default class Config extends Widget {
...
@@ -425,25 +426,25 @@ export default class Config extends Widget {
'
Cache-Control
'
:
'
no-cache
'
'
Cache-Control
'
:
'
no-cache
'
}
}
}).
then
(
response
=>
{
}).
then
(
response
=>
{
this
.
setConfigValue
=
response
.
data
.
CFET2CORE_SAMPLE_VAL
;
this
.
setUserData
=
response
.
data
.
CFET2CORE_SAMPLE_VAL
;
if
(
response
.
data
.
CFET2CORE_SAMPLE_ISVALID
==
true
){
alert
(
'
success
'
);
}
});
});
console
.
log
(
url
);
console
.
log
(
this
.
setConfigValue
);
}
}
viewLoad
(
Args
:
UpdatePayload
){
viewLoad
(
Args
:
UpdatePayload
){
if
(
this
.
EditData
.
params
.
action
==
'
get
'
){
this
.
viewGetLoad
(
Args
);
this
.
viewGetLoad
(
Args
);
}
else
{
this
.
viewSetLoad
(
Args
);
}
}
}
//called when widgetParams action clicked
//called when widgetParams action clicked
async
viewGetLoad
(
Args
:
UpdatePayload
)
{
async
viewGetLoad
(
Args
:
UpdatePayload
)
{
// this.config.data.userInputData = Args.variables;
// this.config.data.userInputData = Args.variables;
console
.
log
(
"
inn
"
);
this
.
userGetInputData
=
Args
.
variables
;
this
.
userGetInputData
=
Args
.
variables
;
if
(
this
.
config
.
data
.
get
.
url
==
''
){
this
.
config
.
data
.
get
.
url
=
this
.
EditData
.
edit
.
url
;
}
this
.
getPathwithVar
=
this
.
pathProcessor
.
FillPathWithVar
(
this
.
getPathwithVar
=
this
.
pathProcessor
.
FillPathWithVar
(
// this.config.data.userInputData,
// this.config.data.userInputData,
this
.
userGetInputData
,
this
.
userGetInputData
,
...
@@ -455,22 +456,22 @@ export default class Config extends Widget {
...
@@ -455,22 +456,22 @@ export default class Config extends Widget {
async
viewSetLoad
(
Args
:
UpdatePayload
)
{
async
viewSetLoad
(
Args
:
UpdatePayload
)
{
// this.config.data.userInputData = Args.variables;
// this.config.data.userInputData = Args.variables;
if
(
Object
.
prototype
.
toString
.
call
(
Args
.
variables
)
==
'
[object Undefined]
'
){
this
.
userSetInputData
.
set
(
this
.
setLabel
,
this
.
setUserData
);
}
else
{
this
.
userSetInputData
=
Args
.
variables
;
this
.
userSetInputData
=
Args
.
variables
;
this
.
setPathwithVar
=
this
.
pathProcessor
.
FillPathWithVar
(
this
.
userSetInputData
.
set
(
this
.
setLabel
,
this
.
setUserData
);
// this.config.data.userInputData,
}
this
.
userSetInputData
,
this
.
config
.
data
.
set
.
url
);
this
.
setPathwithVar
=
this
.
pathProcessor
.
FillPathWithVar
(
this
.
userSetInputData
,
this
.
config
.
data
.
set
.
url
);
await
this
.
setData
(
this
.
setPathwithVar
);
await
this
.
setData
(
this
.
setPathwithVar
);
this
.
getrefresh
();
//
this.getrefresh();
}
}
getrefresh
()
{
getrefresh
()
{
var
GetArgs
:
UpdatePayload
=
{
var
GetArgs
:
UpdatePayload
=
{
action
:
"
get
"
,
action
:
"
get
"
,
variables
:
(
this
.
$refs
variables
:
(
this
.
$refs
.
WidgetGetParams
as
WidgetParams
).
getVariableValues
(),
.
WidgetGetParams
as
WidgetParams
).
getVariableValues
(),
target
:
[
"
self
"
]
target
:
[
"
self
"
]
};
};
this
.
viewGetLoad
(
GetArgs
);
this
.
viewGetLoad
(
GetArgs
);
...
...
src/components/Method/Method.vue
View file @
fe15f2f2
<
template
>
<
template
>
<div
class=
"container"
>
<div
class=
"container"
style=
"padding-bottom: 30px;padding-right: 30px;"
>
<!--
<b-row
style=
"margin-top:10px"
>
<b-col>
<span
style=
"float:left;"
v-show =
"!isShowPath"
class=
"largeFont"
v-if =
"config.data.displayname != ''"
>
{{
config
.
data
.
displayname
}}
</span>
<span
style=
"float:left;"
v-show =
"!isShowPath"
class=
"largeFont"
v-if =
"config.data.displayname == ''"
>
{{
config
.
data
.
url
}}
</span>
<b-form-input
v-show=
"isShowPath"
v-model=
"config.data.displayname"
></b-form-input>
</b-col>
<b-col>
<b-button
style=
"float:right"
@
click=
"del"
text=
"Button"
variant=
"outline-primary"
><span
class=
"glyphicon glyphicon-remove"
></span></b-button>
</b-col>
</b-row>
<b-row
style=
"margin-top:10px"
>
<b-col>
<b-button
@
click=
"showPathConfig"
variant=
"primary"
style=
"float:right"
>
<span
class=
"glyphicon glyphicon-cog"
></span>
</b-button>
</b-col>
</b-row>
<br
/>
-->
<div
class=
"columns"
style=
"margin-top:10px"
>
<span
style=
"float:left;"
v-show =
"!isShowPath"
class=
"largeFont"
v-if =
"config.data.displayname != ''"
>
{{
config
.
data
.
displayname
}}
</span>
<span
style=
"float:left;"
v-show =
"!isShowPath"
class=
"largeFont"
v-if =
"config.data.displayname == ''"
>
{{
config
.
data
.
url
}}
</span>
<input
class=
"input colmumn is-8"
type=
"text"
v-show=
"isShowPath"
v-model=
"config.data.displayname"
>
<div
class=
"column is-offset-11-desktop"
>
<a
class=
"delete is-medium"
@
click=
"del"
></a>
</div>
<div
class=
"columns content "
v-bind:class=
"EditData.props.titleSize"
style=
"margin-bottom: 0px;"
>
<div
class=
"column content-table-cell-heading-color is-narrow"
style=
"margin: 0px;"
>
<h3>
{{
EditData
.
props
.
title
}}
</h3>
</div>
</div>
<div
class=
"columns"
>
<WidgetParams
class=
"column"
ref=
"WidgetParams"
v-show=
"isShowParams"
action=
"invoke"
@
updataVariables=
"viewLoad"
></WidgetParams>
</div>
</div>
<p
class=
"column buttons is-1"
style=
"margin-left: 3%;padding: 0px;margin-right: 10%;margin-top: 5%"
>
<button
@
click=
"openWindows"
class=
"button"
style=
"background-color: #64a6e1"
>
<span
class=
"icon is-small has-text"
style=
"margin-right: 1px;"
>
<i
class=
"fa fa-cog"
aria-hidden=
"true"
></i>
</span>
EDIT
</button>
</p>
<!--
<hsc-window-style-metal
>
<hsc-window
title=
"invoke Method"
:closeButton=
"true"
:isOpen.sync=
"isOpen"
positionHint=
"5 / 5"
>
<fieldset
style=
"padding: 20px;"
>
<div
class=
"columns"
>
<div
class=
"column is-2"
style=
"color: #206dec;font-size: 18px;font-style: oblique;font-weight: 900;padding: 0px;"
>
Method
</div>
<i
class=
"fa fa-question-circle-o"
aria-hidden=
"true"
style=
"margin-top: 5px;margin-left: 3px;"
></i>
</div>
<div
class=
"columns"
>
Enter the Thing in the input box below,
</div>
<div
class=
"columns"
>
click 'OK' to invoke method from cfet,click 'POKE' to get the parameters
</div>
<div
class=
"columns"
>
<div
class=
"field column is-7"
style=
"padding-right: 0px;"
>
<div
class=
"control"
>
<input
class=
"input is-info"
type=
"text"
v-model=
"config.data.url"
>
</div>
</div>
<div
class=
"column"
style=
"position: relative;right: 25px;"
>
<button
class=
"button is-light "
@
click=
"updateUI"
>
OK
</button>
</div>
<div
class=
"column"
style=
"position: relative;right: 50px;"
>
<button
class=
"button is-info"
@
click=
"pathPoke"
>
POKE
</button>
</div>
</div>
<div
class=
"columns"
>
<div
class=
"columns"
>
<WidgetParams
<button
class=
"column button has-text-info is-light is-10 is-offset-1"
style=
"padding: 4px;margin-top: 5px;"
@
click=
"viewInvokeLoad(EditData.params.Args)"
>
invoke
</button>
class=
"column"
ref=
"WidgetParams"
v-show=
"isShowParams"
action=
"invoke"
@
updataVariables=
"viewLoad"
></WidgetParams>
</div>
</fieldset>
<fieldset>
<hr>
<div
class=
"columns"
style=
"margin-top: 5px;margin-bottom: 5px;margin-right: 20px;"
>
<button
class=
"button column is-offset-9 is-3"
style=
"background-color: #8fb9f7;padding-top: 6px;"
>
<i
class=
"fa fa-flag"
aria-hidden=
"true"
style=
"margin-right: 4px;"
></i>
Navigation
</button>
</div>
</fieldset>
</hsc-window>
<div
class=
"columns"
style=
"margin-top:10px"
>
<p
class=
"column buttons is-offset-11-desktop"
>
<button
@
click=
"isOpen = ! isOpen"
class=
"button"
>
<span
class=
"icon is-small has-text-info"
>
<i
class=
"fa fa-cog"
aria-hidden=
"true"
></i>
</span>
</button>
</p>
</div>
</div>
</hsc-window-style-metal>
-->
<!--
<div
class=
"columns"
style=
"margin-top:10px"
>
<p
class=
"column buttons is-offset-11-desktop"
>
<button
@
click=
"showPathConfig"
class=
"button"
>
<span
class=
"icon is-small has-text-info"
>
<i
class=
"fa fa-cog"
aria-hidden=
"true"
></i>
</span>
</button>
</p>
</div>
<div
class=
"columns"
v-show=
"isShowPath"
>
<div
class=
"field column is-10"
style=
"padding-right: 0px;"
>
<div
class=
"control"
>
<input
class=
"input is-info"
type=
"text"
v-model=
"config.data.url"
>
</div>
</div>
<div
class=
"column"
style=
"padding-left: 0px; padding-right: 0px"
>
<button
class=
"button is-light "
@
click=
"updateUI"
>
OK
</button>
</div>
<div
class=
"column"
style=
"padding-left: 0px"
>
<button
class=
"button is-info"
@
click=
"pathPoke"
>
POKE
</button>
</div>
</div>
<div
class=
"columns"
>
<div
class=
"columns"
>
<WidgetParams
<WidgetParams
class=
"column"
class=
"column"
...
@@ -147,8 +21,6 @@
...
@@ -147,8 +21,6 @@
></WidgetParams>
></WidgetParams>
</div>
</div>
<Navigation
ref=
"FamilyLink"
:url=
"config.data.url"
></Navigation>
-->
</div>
</div>
</
template
>
</
template
>
...
@@ -178,6 +50,7 @@ import Navigation from "@/components/Common/Navigation.vue";
...
@@ -178,6 +50,7 @@ import Navigation from "@/components/Common/Navigation.vue";
})
})
export
default
class
Method
extends
Widget
{
export
default
class
Method
extends
Widget
{
@
Prop
()
index
!
:
number
;
@
Prop
()
index
!
:
number
;
@
Prop
()
refIndex
!
:
number
;
@
Prop
()
widgetList
:
WidgetRef
[]
=
[];
@
Prop
()
widgetList
:
WidgetRef
[]
=
[];
pathProcessor
=
new
PathProcessor
();
pathProcessor
=
new
PathProcessor
();
strMapObjChange
=
new
StrMapObjChange
();
strMapObjChange
=
new
StrMapObjChange
();
...
@@ -188,7 +61,8 @@ export default class Method extends Widget {
...
@@ -188,7 +61,8 @@ export default class Method extends Widget {
pathwithVar
:
string
=
""
;
pathwithVar
:
string
=
""
;
isShowPath
:
boolean
=
false
;
isShowPath
:
boolean
=
false
;
isShowParams
:
boolean
=
false
;
isShowParams
:
boolean
=
false
;
isOpen
:
boolean
=
true
;
fontSize
:
number
=
25
;
EditPathPoke
:
string
=
""
;
config
:
WidgetConfig
=
{
config
:
WidgetConfig
=
{
WidgetComponentName
:
"
Method
"
,
WidgetComponentName
:
"
Method
"
,
...
@@ -199,13 +73,24 @@ export default class Method extends Widget {
...
@@ -199,13 +73,24 @@ export default class Method extends Widget {
}
}
};
};
schemas
:
any
[]
=
[{
EditData
=
{
label
:
'
method
'
,
edit
:{
key
:
'
method-config
'
,
type
:
'
method
'
,
type
:
'
method
'
,
index
:
this
.
index
,
url
:
this
.
config
.
data
.
url
,
index
:
this
.
refIndex
,
},
props
:{
fontSize
:
this
.
fontSize
,
title
:
''
,
titleSize
:
''
,
},
params
:{
PokedPath
:
this
.
EditPathPoke
,
action
:
'
invoke
'
,
Args
:
{},
tempUserInputData
:{},
},
},
]
;
}
;
created
()
{
created
()
{
// this.config.data.userInputData = this.userInputData;
// this.config.data.userInputData = this.userInputData;
...
@@ -214,54 +99,95 @@ export default class Method extends Widget {
...
@@ -214,54 +99,95 @@ export default class Method extends Widget {
);
);
}
}
openWindows
(){
mounted
(){
this
.
isOpen
=
!
this
.
isOpen
;
let
containerlist
=
document
.
getElementsByClassName
(
'
container
'
);
//CreateContainerId
var
self
=
this
;
let
RightClickField
=
containerlist
[
this
.
index
];
RightClickField
.
oncontextmenu
=
function
(
e
)
{
e
.
preventDefault
();
//demo区域停止原鼠标右击菜单
//this.popMenu('itemMenu',100,"100");
let
menu
=
document
.
querySelector
(
'
.menu
'
);
//获取盒子menu。
if
(
menu
)
menu
.
remove
();
//判断清除初始盒子
menu
=
document
.
createElement
(
'
div
'
);
//创建盒子。
menu
.
classList
.
add
(
'
menu
'
);
//添加类
let
menu1
=
document
.
createElement
(
'
BUTTON
'
);
//创建盒子menu1。
menu1
.
innerHTML
=
'
del
'
;
//盒子menu1添加文本XXXX
menu1
.
onclick
=
self
.
del
;
menu
.
appendChild
(
menu1
);
//menu末尾添加新的节点menu1
let
menu2
=
document
.
createElement
(
'
BUTTON
'
);
//创建盒子menu1。
menu2
.
innerHTML
=
'
edit
'
;
//盒子menu1添加文本XXXX
menu2
.
onclick
=
self
.
openWindows
;
//menu2.setAttribute("onclick", this.openWindows);
menu
.
appendChild
(
menu2
);
//menu末尾添加新的节点menu1
RightClickField
.
appendChild
(
menu
);
//body末尾添加新的节点menu
//盒子跟随鼠标光标。
//menu.style.top = $('#RightClick').offset().top;
menu
.
style
.
left
=
e
.
offsetX
+
"
px
"
;
menu
.
style
.
top
=
e
.
offsetY
+
"
px
"
;
menu
.
style
.
position
=
'
absolute
'
;
};
this
.
$parent
.
$parent
.
$root
.
$children
[
0
].
OpenWindows
(
this
.
isOpen
);
//全局点击时消失。
this
.
$emit
(
'
schemas
'
,
this
.
schemas
);
RightClickField
.
onclick
=
e
=>
{
let
menu
=
document
.
querySelector
(
'
.menu
'
)
if
(
menu
&&
!
menu
.
contains
(
e
.
target
))
menu
.
remove
()
}
}
openWindows
(){
var
JsonData
=
JSON
.
stringify
(
this
.
EditData
);
var
url
=
"
http://localhost:8080/WindowsAppIndex.html/?
"
;
window
.
open
(
url
+
JsonData
,
"
WidgetWindow
"
,
'
height=100, width=100, top=10, left=10, toolbar=no
'
);
}
}
updateUI
(
isShowPath
:
boolean
,
isShowParams
:
boolean
,
url
:
string
)
{
updateUI
()
{
this
.
isShowPath
=
isShowPath
;
this
.
isShowPath
=
false
;
this
.
isShowParams
=
isShowParams
;
this
.
EditData
.
params
.
PokedPath
=
this
.
config
.
data
.
url
;
this
.
config
.
data
.
url
=
url
;
this
.
EditData
.
edit
.
url
=
this
.
config
.
data
.
url
;
console
.
log
(
"
111
"
);
this
.
openWindows
();
console
.
log
(
this
.
config
.
data
.
url
);
}
}
del
()
del
()
{
{
this
.
$emit
(
'
del
'
,
this
.
index
);
this
.
$emit
(
'
del
'
,
this
.
index
);
console
.
log
(
"
del
"
+
this
.
index
);
}
}
showPathConfig
()
{
showPathConfig
()
{
this
.
isShowPath
=
!
this
.
isShowPath
;
this
.
isShowPath
=
!
this
.
isShowPath
;
}
}
getConfig
():
WidgetConfig
{
getConfig
():
[
WidgetConfig
,
object
]
{
// this.config.data.userInputData =(this.$refs.WidgetParams as WidgetParams).getVariableValues();
return
[
this
.
config
,
this
.
EditData
];
this
.
config
.
data
.
userInputData
=
this
.
strMapObjChange
.
strMapToObj
(
(
this
.
$refs
.
WidgetParams
as
WidgetParams
).
getVariableValues
()
);
return
this
.
config
;
}
}
setConfig
(
widgetConfig
:
WidgetConfig
):
void
{
//app
this
.
config
=
widgetConfig
;
setConfig
(
setConfigData
:
[
WidgetConfig
,
object
],
fragment
:
string
):
void
{
//this.updateUI();
this
.
config
=
setConfigData
[
0
];
(
this
.
$refs
.
WidgetParams
as
WidgetParams
).
setVariableList
(
this
.
EditData
=
setConfigData
[
1
];
this
.
pathProcessor
.
extractVarFromPath
(
this
.
config
.
data
.
url
)
);
if
(
this
.
EditData
.
edit
.
url
.
search
(
"
startpath
"
)
!=
-
1
){
this
.
replaceStartPath
(
fragment
)}
//map不能序列化,必须要单独处理,这里的处理方法仅限map
<
string
,
string
>
类型
var
temp
=
this
.
config
.
data
.
userInputData
;
var
temp
=
this
.
EditData
.
params
.
tempUserInputData
;
temp
=
JSON
.
parse
(
JSON
.
stringify
(
temp
));
temp
=
JSON
.
parse
(
JSON
.
stringify
(
temp
));
temp
=
this
.
strMapObjChange
.
objToStrMap
(
temp
);
temp
=
this
.
strMapObjChange
.
objToStrMap
(
temp
);
this
.
userInputData
=
temp
;
//this.EditData.params.tempUserInputData = temp;
(
this
.
$refs
.
WidgetParams
as
WidgetParams
).
setVariableInput
(
this
.
userInputData
);
var
Args
:
UpdatePayload
=
{
action
:
this
.
EditData
.
params
.
action
,
variables
:
temp
,
target
:
[
"
self
"
]
};
this
.
EditData
.
params
.
Args
=
Args
;
//this.viewInvokeLoad(Args);
}
}
samplePoke
(
sample
:
any
)
{
samplePoke
(
sample
:
any
)
{
...
@@ -288,13 +214,36 @@ export default class Method extends Widget {
...
@@ -288,13 +214,36 @@ export default class Method extends Widget {
pokedPath
=
pokedPath
.
substring
(
0
,
pokedPath
.
length
-
1
);
pokedPath
=
pokedPath
.
substring
(
0
,
pokedPath
.
length
-
1
);
}
}
this
.
config
.
data
.
url
=
pokedPath
;
this
.
config
.
data
.
url
=
pokedPath
;
this
.
$parent
.
$root
.
$children
[
0
].
$children
[
0
].
$children
[
0
].
config
.
data
.
url
=
pokedPath
;
}
}
pathPoke
()
{
this
.
config
.
data
.
url
=
this
.
EditData
.
edit
.
url
;
this
.
EditPathPoke
=
this
.
EditData
.
edit
.
url
;
var
pokepath
=
this
.
EditData
.
edit
.
url
;
//todo:config文件
axios
.
get
(
pokepath
,
{
headers
:
{
'
Pragma
'
:
'
no-cache
'
,
'
Cache-Control
'
:
'
no-cache
'
}
}).
then
(
response
=>
{
this
.
samplePoke
(
response
.
data
);
this
.
updateUI
();
}).
catch
(
err
=>
{
alert
(
err
);
this
.
EditData
.
params
.
PokedPath
=
this
.
config
.
data
.
url
;
this
.
openWindows
();
});
//var url = this.config.data.url;
}
replaceStartPath
(
startPath
:
string
):
void
{
replaceStartPath
(
startPath
:
string
):
void
{
this
.
config
.
data
.
url
.
replace
(
"
$startPath$
"
,
startPath
);
this
.
config
.
data
.
url
=
this
.
config
.
data
.
url
.
replace
(
"
$startpath$
"
,
startPath
);
this
.
EditData
.
edit
.
url
=
this
.
EditData
.
edit
.
url
.
replace
(
"
$startpath$
"
,
startPath
);
}
}
parentUpdate
(
payload
:
UpdatePayload
):
void
{
parentUpdate
(
payload
:
UpdatePayload
):
void
{
...
@@ -325,12 +274,7 @@ export default class Method extends Widget {
...
@@ -325,12 +274,7 @@ export default class Method extends Widget {
}
}
refresh
()
{
refresh
()
{
var
Args
:
UpdatePayload
=
{
action
:
"
invoke
"
,
variables
:
(
this
.
$refs
.
WidgetParams
as
WidgetParams
).
getVariableValues
(),
target
:
[
"
self
"
]
};
this
.
viewLoad
(
Args
);
}
}
async
getData
(
url
:
string
)
{
async
getData
(
url
:
string
)
{
...
@@ -346,12 +290,18 @@ export default class Method extends Widget {
...
@@ -346,12 +290,18 @@ export default class Method extends Widget {
{
{
this
.
StatusValue
=
"
undefined
"
;
this
.
StatusValue
=
"
undefined
"
;
}
}
if
(
response
.
data
.
CFET2CORE_SAMPLE_ISVALID
==
false
){
alert
(
"
invoke failed
"
);
}
}).
catch
(
err
=>
{
alert
(
err
);
});
});
}
}
//called when widgetParams action clicked
//called when widgetParams action clicked
async
viewLoad
(
Args
:
UpdatePayload
)
{
async
viewInvokeLoad
(
Args
:
UpdatePayload
)
{
console
.
log
(
'
called when widgetParams action clicked
'
);
// this.config.data.userInputData = Args.variables;
// this.config.data.userInputData = Args.variables;
this
.
userInputData
=
Args
.
variables
;
this
.
userInputData
=
Args
.
variables
;
this
.
pathwithVar
=
this
.
pathProcessor
.
FillPathWithVar
(
this
.
pathwithVar
=
this
.
pathProcessor
.
FillPathWithVar
(
...
...
src/components/Navigation/Navigation.vue
0 → 100644
View file @
fe15f2f2
<
template
>
<div
class=
"container"
id=
"RightClick"
>
<div
class=
"columns"
>
<button
class=
"column button has-text-info is-light is-10 is-offset-1"
style=
"padding: 4px;margin-top: 25px;"
@
click=
"isShowParams = true"
>
Navigation
</button>
</div>
<div
v-for=
"url in EditData.edit.url"
v-if=
"isShowParams"
>
<a
v-bind:href=
"url.url"
target=
"_blank"
>
{{
url
.
url
}}
</a>
</div>
</div>
</
template
>
<
script
lang=
"ts"
>
import
Component
from
"
vue-class-component
"
;
import
{
Prop
,
Watch
}
from
"
vue-property-decorator
"
;
import
{
WidgetConfig
}
from
"
@/models/WidgetConfig
"
;
import
{
UpdatePayload
}
from
"
@/models/UpdatePayload
"
;
import
{
Widget
}
from
"
@/models/widget
"
;
import
{
ResourceInfo
}
from
"
@/models/Customview
"
;
import
{
WidgetRef
}
from
"
@/models/WidgetRef
"
;
import
PathProcessor
from
"
@/models/PathProcessor
"
;
import
StrMapObjChange
from
"
@/models/StrMapObjChange
"
;
@
Component
({
components
:
{
}
})
export
default
class
Navigation
extends
Widget
{
@
Prop
()
index
!
:
number
;
@
Prop
()
refIndex
!
:
number
;
@
Prop
()
widgetList
:
WidgetRef
[]
=
[];
pathProcessor
=
new
PathProcessor
();
strMapObjChange
=
new
StrMapObjChange
();
WidgetComponentName
:
string
=
"
Navigation
"
;
pathId
:
string
=
""
;
userInputData
=
new
Map
<
string
,
string
>
();
isShowParams
:
boolean
=
false
;
config
:
WidgetConfig
=
{
WidgetComponentName
:
"
Navigation
"
,
data
:
{
url
:
""
,
displayname
:
""
,
userInputData
:
""
}
};
EditData
=
{
edit
:{
url
:[],
type
:
'
Navigation
'
,
index
:
this
.
refIndex
,
},
props
:{
},
params
:{
action
:
'
get
'
,
Args
:
{},
tempUserInputData
:{},
},
};
created
()
{
this
.
config
.
data
.
userInputData
=
this
.
strMapObjChange
.
strMapToObj
(
this
.
userInputData
);
}
mounted
()
{
let
containerlist
=
document
.
getElementsByClassName
(
'
container
'
);
//CreateContainerId
var
self
=
this
;
let
RightClickField
=
containerlist
[
this
.
index
];
RightClickField
.
oncontextmenu
=
function
(
e
)
{
e
.
preventDefault
();
//demo区域停止原鼠标右击菜单
//this.popMenu('itemMenu',100,"100");
let
menu
=
document
.
querySelector
(
'
.menu
'
);
//获取盒子menu。
if
(
menu
)
menu
.
remove
();
//判断清除初始盒子
menu
=
document
.
createElement
(
'
div
'
);
//创建盒子。
menu
.
classList
.
add
(
'
menu
'
);
//添加类
let
menu1
=
document
.
createElement
(
'
BUTTON
'
);
//创建盒子menu1。
menu1
.
innerHTML
=
'
del
'
;
//盒子menu1添加文本XXXX
menu1
.
onclick
=
self
.
del
;
menu
.
appendChild
(
menu1
);
//menu末尾添加新的节点menu1
let
menu2
=
document
.
createElement
(
'
BUTTON
'
);
//创建盒子menu1。
menu2
.
innerHTML
=
'
edit
'
;
//盒子menu1添加文本XXXX
menu2
.
onclick
=
self
.
openWindows
;
//menu2.setAttribute("onclick", this.openWindows);
menu
.
appendChild
(
menu2
);
//menu末尾添加新的节点menu1
RightClickField
.
appendChild
(
menu
);
//body末尾添加新的节点menu
//盒子跟随鼠标光标。
//menu.style.top = $('#RightClick').offset().top;
menu
.
style
.
left
=
e
.
offsetX
+
"
px
"
;
menu
.
style
.
top
=
e
.
offsetY
+
"
px
"
;
menu
.
style
.
position
=
'
absolute
'
;
//menu.style.top = '${e.clientY}px';
//menu.style.left = '${e.clientX}px';
console
.
log
(
menu
.
style
.
top
);
console
.
log
(
menu
);
};
//全局点击时消失。
RightClickField
.
onclick
=
e
=>
{
let
menu
=
document
.
querySelector
(
'
.menu
'
)
if
(
menu
&&
!
menu
.
contains
(
e
.
target
))
menu
.
remove
()
}
}
del
(){
this
.
$emit
(
'
del
'
,
this
.
index
);
}
openWindows
(){
//windows.open -> another single page application
var
JsonData
=
JSON
.
stringify
(
this
.
EditData
);
var
url
=
"
http://localhost:8080/WindowsAppIndex.html/?
"
;
window
.
open
(
url
+
JsonData
,
"
WidgetWindow
"
,
'
height=100, width=100, top=10, left=10, toolbar=no
'
);
}
//app
updateUI
()
{
this
.
openWindows
();
}
//app
getConfig
():
[
WidgetConfig
,
object
]
{
return
[
this
.
config
,
this
.
EditData
];
}
//app
setConfig
(
setConfigData
:
[
WidgetConfig
,
object
],
fragment
:
string
):
void
{
console
.
log
(
setConfigData
);
this
.
config
=
setConfigData
[
0
];
console
.
log
(
this
.
config
);
this
.
EditData
=
setConfigData
[
1
];
}
}
</
script
>
<
style
scoped
>
.waveView
{
width
:
100%
;
height
:
auto
;
}
.hflex
{
display
:
flex
;
flex-direction
:
row-reverse
;
align-items
:
center
;
}
</
style
>
src/components/State/BoolState.vue
0 → 100644
View file @
fe15f2f2
<
template
>
<div
class=
"container"
>
<div
class=
"columns content "
v-bind:class=
"EditData.props.titleSize"
style=
"margin-bottom: 0px;"
>
<div
class=
"column content-table-cell-heading-color is-narrow"
style=
"margin: 0px;"
>
<h3>
{{
EditData
.
props
.
title
}}
</h3>
</div>
</div>
<div
class=
"columns"
style=
"margin-top: 5px;padding: 5px;"
>
<span
style=
"background-color: #bbb;border-radius: 50%;display: inline-block;"
v-bind:style=
"
{ backgroundColor: activeColor, height: EditData.props.fontSize + 'px' ,width: EditData.props.fontSize + 'px'}">
</span>
<div
v-bind:style=
"
{ fontColor: activeColor}" v-if="EditData.edit.isShowStateVlaue">
{{
stateKey
}}
</div>
</div>
<div
class=
"columns"
>
<WidgetParams
class=
"column"
ref=
"WidgetParams"
v-show=
"isShowParams"
action=
"get"
@
updataVariables=
"viewLoad"
></WidgetParams>
</div>
</div>
</
template
>
<
script
lang=
"ts"
>
import
Vue
from
"
vue
"
;
import
{
VueSvgGauge
}
from
"
vue-svg-gauge
"
;
import
Component
from
"
vue-class-component
"
;
import
{
Prop
,
Watch
}
from
"
vue-property-decorator
"
;
import
{
WidgetConfig
}
from
"
@/models/WidgetConfig
"
;
import
{
UpdatePayload
}
from
"
@/models/UpdatePayload
"
;
import
{
Widget
}
from
"
@/models/widget
"
;
import
{
ResourceInfo
}
from
"
@/models/Customview
"
;
import
{
WidgetRef
}
from
"
@/models/WidgetRef
"
;
import
WidgetParams
from
"
@/components/Common/WidgetParams.vue
"
;
import
axios
from
"
axios
"
;
import
PathProcessor
from
"
@/models/PathProcessor
"
;
import
StrMapObjChange
from
"
@/models/StrMapObjChange
"
;
import
{
forEach
}
from
"
typescript-collections/dist/lib/arrays
"
;
import
{
map
}
from
"
d3
"
;
import
Navigation
from
"
@/components/Common/Navigation.vue
"
;
@
Component
({
components
:
{
WidgetParams
,
Navigation
}
})
export
default
class
BoolState
extends
Widget
{
@
Prop
()
index
!
:
number
;
@
Prop
()
refIndex
!
:
number
;
@
Prop
()
widgetList
:
WidgetRef
[]
=
[];
pathProcessor
=
new
PathProcessor
();
strMapObjChange
=
new
StrMapObjChange
();
WidgetComponentName
:
string
=
"
BoolState
"
;
StatusValue
:
string
=
""
;
pathId
:
string
=
""
;
userInputData
=
new
Map
<
string
,
string
>
();
pathwithVar
:
string
=
""
;
timer
?:
number
;
isShowPath
:
boolean
=
false
;
isShowParams
:
boolean
=
false
;
EditPathPoke
:
string
=
""
;
fontSize
:
number
=
60
;
activeColor
:
string
=
'
#bbb
'
;
stateKey
:
string
=
''
;
StateIndicator
=
{
true
:
'
green
'
,
false
:
'
red
'
,
};
config
:
WidgetConfig
=
{
WidgetComponentName
:
"
BoolState
"
,
data
:
{
url
:
""
,
displayname
:
""
,
userInputData
:
""
}
};
EditData
=
{
edit
:{
type
:
'
Boolstate
'
,
url
:
this
.
config
.
data
.
url
,
index
:
this
.
refIndex
,
isShowStateVlaue
:
false
,
},
props
:{
fontSize
:
this
.
fontSize
,
title
:
''
,
titleSize
:
''
,
},
params
:{
PokedPath
:
this
.
EditPathPoke
,
action
:
'
get
'
,
Args
:
{},
tempUserInputData
:{},
//userInputData:this.userInputData,
},
};
created
()
{
// this.config.data.userInputData = this.userInputData;
this
.
config
.
data
.
userInputData
=
this
.
strMapObjChange
.
strMapToObj
(
this
.
userInputData
);
}
mounted
()
{
this
.
timer
=
setInterval
(
this
.
refresh
,
1000
);
let
containerlist
=
document
.
getElementsByClassName
(
'
container
'
);
//CreateContainerId
var
self
=
this
;
let
RightClickField
=
containerlist
[
this
.
index
];
RightClickField
.
oncontextmenu
=
function
(
e
)
{
e
.
preventDefault
();
//demo区域停止原鼠标右击菜单
//this.popMenu('itemMenu',100,"100");
let
menu
=
document
.
querySelector
(
'
.menu
'
);
//获取盒子menu。
if
(
menu
)
menu
.
remove
();
//判断清除初始盒子
menu
=
document
.
createElement
(
'
div
'
);
//创建盒子。
menu
.
classList
.
add
(
'
menu
'
);
//添加类
let
menu1
=
document
.
createElement
(
'
BUTTON
'
);
//创建盒子menu1。
menu1
.
innerHTML
=
'
del
'
;
//盒子menu1添加文本XXXX
menu1
.
onclick
=
self
.
del
;
menu
.
appendChild
(
menu1
);
//menu末尾添加新的节点menu1
let
menu2
=
document
.
createElement
(
'
BUTTON
'
);
//创建盒子menu1。
menu2
.
innerHTML
=
'
edit
'
;
//盒子menu1添加文本XXXX
menu2
.
onclick
=
self
.
openWindows
;
//menu2.setAttribute("onclick", this.openWindows);
menu
.
appendChild
(
menu2
);
//menu末尾添加新的节点menu1
RightClickField
.
appendChild
(
menu
);
//body末尾添加新的节点menu
//盒子跟随鼠标光标。
//menu.style.top = $('#RightClick').offset().top;
menu
.
style
.
left
=
e
.
offsetX
+
"
px
"
;
menu
.
style
.
top
=
e
.
offsetY
+
"
px
"
;
menu
.
style
.
position
=
'
absolute
'
;
};
//全局点击时消失。
RightClickField
.
onclick
=
e
=>
{
let
menu
=
document
.
querySelector
(
'
.menu
'
)
if
(
menu
&&
!
menu
.
contains
(
e
.
target
))
menu
.
remove
()
}
}
destroyed
()
{
clearInterval
(
this
.
timer
);
}
openWindows
(){
var
JsonData
=
JSON
.
stringify
(
this
.
EditData
);
var
url
=
"
http://localhost:8080/WindowsAppIndex.html/?
"
;
window
.
open
(
url
+
JsonData
,
"
WidgetWindow
"
,
'
height=100, width=100, top=10, left=10, toolbar=no
'
);
}
del
()
{
this
.
$emit
(
'
del
'
,
this
.
index
);
}
updateUI
()
{
this
.
isShowPath
=
false
;
this
.
EditData
.
params
.
PokedPath
=
this
.
config
.
data
.
url
;
this
.
EditData
.
edit
.
url
=
this
.
config
.
data
.
url
;
this
.
openWindows
();
}
showPathConfig
()
{
this
.
isShowPath
=
!
this
.
isShowPath
;
}
getConfig
():[
WidgetConfig
,
object
]
{
// this.config.data.userInputData =(this.$refs.WidgetParams as WidgetParams).getVariableValues();
return
[
this
.
config
,
this
.
EditData
];
}
setConfig
(
setConfigData
:
[
WidgetConfig
,
object
],
fragment
:
string
):
void
{
this
.
config
=
setConfigData
[
0
];
this
.
EditData
=
setConfigData
[
1
];
if
(
this
.
EditData
.
edit
.
url
.
search
(
"
startpath
"
)
!=
-
1
){
this
.
replaceStartPath
(
fragment
)}
var
temp
=
this
.
EditData
.
params
.
tempUserInputData
;
temp
=
JSON
.
parse
(
JSON
.
stringify
(
temp
));
temp
=
this
.
strMapObjChange
.
objToStrMap
(
temp
);
//this.EditData.params.tempUserInputData = temp;
var
Args
:
UpdatePayload
=
{
action
:
this
.
EditData
.
params
.
action
,
variables
:
temp
,
target
:
[
"
self
"
]
};
this
.
EditData
.
params
.
Args
=
Args
;
this
.
viewLoad
(
Args
);
}
pathPoke
()
{
this
.
config
.
data
.
url
=
this
.
EditData
.
edit
.
url
;
this
.
EditPathPoke
=
this
.
EditData
.
edit
.
url
;
var
pokepath
=
this
.
EditData
.
edit
.
url
;
//todo:config文件
axios
.
defaults
.
timeout
=
1000
;
axios
.
get
(
pokepath
,
{
headers
:
{
'
Pragma
'
:
'
no-cache
'
,
'
Cache-Control
'
:
'
no-cache
'
}
}).
then
(
response
=>
{
this
.
samplePoke
(
response
.
data
);
this
.
updateUI
();
//test
//this.colourViewLoad();
}).
catch
(
err
=>
{
//test
this
.
colourViewLoad
();
this
.
EditData
.
params
.
PokedPath
=
this
.
config
.
data
.
url
;
//this.openWindows();
});
//var url = this.config.data.url;
}
samplePoke
(
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
));
temp
=
this
.
strMapObjChange
.
objToStrMap
(
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
=
pokedPath
;
}
replaceStartPath
(
startPath
:
string
):
void
{
this
.
config
.
data
.
url
=
this
.
config
.
data
.
url
.
replace
(
"
$startpath$
"
,
startPath
);
this
.
EditData
.
edit
.
url
=
this
.
EditData
.
edit
.
url
.
replace
(
"
$startpath$
"
,
startPath
);
}
parentUpdate
(
payload
:
UpdatePayload
):
void
{
var
shouldUpdate
:
boolean
=
false
;
this
.
userInputData
=
this
.
strMapObjChange
.
strMapToObj
(
(
this
.
$refs
.
WidgetParams
as
WidgetParams
).
getVariableValues
());
var
temp
=
this
.
userInputData
;
temp
=
this
.
strMapObjChange
.
objToStrMap
(
temp
);
this
.
userInputData
=
temp
;
this
.
userInputData
.
forEach
((
value
,
key
)
=>
{
payload
.
variables
.
forEach
((
valueofpayload
,
keyofpayload
)
=>
{
if
(
key
==
keyofpayload
&&
((
this
.
userInputData
.
get
(
key
)
as
string
)
!=
(
payload
.
variables
.
get
(
keyofpayload
)
as
string
)))
{
this
.
userInputData
.
set
(
key
,
payload
.
variables
.
get
(
keyofpayload
)
as
string
);
shouldUpdate
=
true
;
}
});
});
if
(
shouldUpdate
)
{
(
this
.
$refs
.
WidgetParams
as
WidgetParams
).
setVariableInput
(
this
.
userInputData
);
//this.updateUI();
(
this
.
$refs
.
WidgetParams
as
WidgetParams
).
setVariableList
(
this
.
pathProcessor
.
extractVarFromPath
(
this
.
config
.
data
.
url
)
);
}
}
refresh
()
{
this
.
viewLoad
(
this
.
EditData
.
params
.
Args
);
}
async
getData
(
url
:
string
)
{
var
apiLoad
=
url
;
await
axios
.
get
(
apiLoad
,
{
headers
:
{
'
Pragma
'
:
'
no-cache
'
,
'
Cache-Control
'
:
'
no-cache
'
}
}).
then
(
response
=>
{
this
.
StatusValue
=
response
.
data
.
CFET2CORE_SAMPLE_VAL
;
//this.colourViewLoad();
});
}
colourViewLoad
(){
this
.
activeColor
=
this
.
StateIndicator
[
this
.
StatusValue
];
if
(
this
.
activeColor
==
undefined
){
this
.
activeColor
=
'
#bbb
'
;
}
}
//called when widgetParams action clicked
async
viewLoad
(
Args
:
UpdatePayload
)
{
// this.config.data.userInputData = Args.variables;
this
.
userInputData
=
Args
.
variables
;
this
.
pathwithVar
=
this
.
pathProcessor
.
FillPathWithVar
(
// this.config.data.userInputData,
this
.
userInputData
,
this
.
config
.
data
.
url
);
await
this
.
getData
(
this
.
pathwithVar
);
this
.
colourViewLoad
();
}
}
</
script
>
<
style
scoped
>
.waveView
{
width
:
100%
;
height
:
auto
;
}
.bluetag
{
background
:
url("../../assets/bluetag.png")
;
width
:
26px
;
height
:
26px
;
}
</
style
>
src/components/State/State.vue
View file @
fe15f2f2
<
template
>
<
template
>
<div
class=
"container"
>
<div
class=
"container"
>
<div
class=
"columns content "
v-bind:class=
"EditData.props.titleSize"
style=
"margin-bottom: 0px;"
>
<div
class=
"columns"
style=
"margin-top:10px"
>
<div
class=
"column content-table-cell-heading-color is-narrow"
style=
"margin: 0px;"
>
<h3>
{{
EditData
.
props
.
title
}}
</h3>
<span
style=
"float:left;"
v-show =
"!isShowPath"
class=
"largeFont"
v-if =
"config.data.displayname != ''"
>
{{
config
.
data
.
displayname
}}
</span>
</div>
<span
style=
"float:left;"
v-show =
"!isShowPath"
class=
"largeFont"
v-if =
"config.data.displayname == ''"
>
{{
config
.
data
.
url
}}
</span>
<input
class=
"input colmumn is-8"
type=
"text"
v-show=
"isShowPath"
v-model=
"config.data.displayname"
>
</div>
</div>
<div
class=
"columns"
style=
"
margin-top:5px
"
>
<div
class=
"columns"
style=
"
padding: 5px;margin-top: 5px;
"
>
<span
style=
"background-color: #bbb;border-radius: 50%;display: inline-block;"
<span
style=
"background-color: #bbb;border-radius: 50%;display: inline-block;"
v-bind:style=
"
{ backgroundColor: activeColor, height: fontSize + 'px' ,width: fontSize + 'px'}">
</span>
v-bind:style=
"
{ backgroundColor: activeColor, height: EditData.props.fontSize + 'px' ,width: EditData.props.fontSize + 'px'}">
</span>
<div
class=
"column is-2"
v-bind:style=
"
{ fontColor: activeColor}" v-if="EditData.edit.isShowStateVlaue">
{{
stateKey
}}
</div>
</div>
</div>
...
@@ -71,8 +70,9 @@ export default class State extends Widget {
...
@@ -71,8 +70,9 @@ export default class State extends Widget {
isShowPath
:
boolean
=
false
;
isShowPath
:
boolean
=
false
;
isShowParams
:
boolean
=
false
;
isShowParams
:
boolean
=
false
;
EditPathPoke
:
string
=
""
;
EditPathPoke
:
string
=
""
;
fontSize
:
number
=
4
0
;
fontSize
:
number
=
6
0
;
activeColor
:
string
=
'
#bbb
'
;
activeColor
:
string
=
'
#bbb
'
;
stateKey
:
string
=
''
;
config
:
WidgetConfig
=
{
config
:
WidgetConfig
=
{
WidgetComponentName
:
"
State
"
,
WidgetComponentName
:
"
State
"
,
...
@@ -84,18 +84,18 @@ export default class State extends Widget {
...
@@ -84,18 +84,18 @@ export default class State extends Widget {
};
};
EditData
=
{
EditData
=
{
props
:{
edit
:{
type
:
'
state
'
,
type
:
'
state
'
,
url
:
this
.
config
.
data
.
url
,
url
:
this
.
config
.
data
.
url
,
index
:
this
.
refIndex
,
index
:
this
.
refIndex
,
fontSize
:
this
.
fontSize
,
isShowStateVlaue
:
false
,
StateFile
:{
"
0
"
:
"
yellow
"
,
"
1
"
:
"
orange
"
,
"
2
"
:
"
green
"
,
"
255
"
:
"
red
"
},
},
StateIndicatorFile
:
null
,
props
:{
fontSize
:
this
.
fontSize
,
title
:
''
,
titleSize
:
''
,
StateFile
:
'
{"Idle":"yellow","prepare":"orange","run":"green","error":"red" }
'
,
StateIndicator
:
'
{"0":"Idle","1":"prepare","2":"run","255":"error"}
'
,
},
},
params
:{
params
:{
PokedPath
:
this
.
EditPathPoke
,
PokedPath
:
this
.
EditPathPoke
,
...
@@ -145,10 +145,6 @@ export default class State extends Widget {
...
@@ -145,10 +145,6 @@ export default class State extends Widget {
menu
.
style
.
left
=
e
.
offsetX
+
"
px
"
;
menu
.
style
.
left
=
e
.
offsetX
+
"
px
"
;
menu
.
style
.
top
=
e
.
offsetY
+
"
px
"
;
menu
.
style
.
top
=
e
.
offsetY
+
"
px
"
;
menu
.
style
.
position
=
'
absolute
'
;
menu
.
style
.
position
=
'
absolute
'
;
//menu.style.top = '${e.clientY}px';
//menu.style.left = '${e.clientX}px';
console
.
log
(
menu
.
style
.
top
);
console
.
log
(
menu
);
};
};
...
@@ -176,14 +172,13 @@ export default class State extends Widget {
...
@@ -176,14 +172,13 @@ export default class State extends Widget {
del
()
del
()
{
{
this
.
$emit
(
'
del
'
,
this
.
index
);
this
.
$emit
(
'
del
'
,
this
.
index
);
console
.
log
(
"
del
"
+
this
.
index
);
}
}
updateUI
()
{
updateUI
()
{
this
.
isShowPath
=
false
;
this
.
isShowPath
=
false
;
this
.
EditData
.
params
.
PokedPath
=
this
.
config
.
data
.
url
;
this
.
EditData
.
params
.
PokedPath
=
this
.
config
.
data
.
url
;
this
.
EditData
.
props
.
url
=
this
.
config
.
data
.
url
;
this
.
EditData
.
edit
.
url
=
this
.
config
.
data
.
url
;
this
.
openWindows
();
this
.
openWindows
();
}
}
...
@@ -191,35 +186,39 @@ export default class State extends Widget {
...
@@ -191,35 +186,39 @@ export default class State extends Widget {
this
.
isShowPath
=
!
this
.
isShowPath
;
this
.
isShowPath
=
!
this
.
isShowPath
;
}
}
getConfig
():
WidgetConfig
{
getConfig
():
[
WidgetConfig
,
object
]
{
// this.config.data.userInputData =(this.$refs.WidgetParams as WidgetParams).getVariableValues();
return
[
this
.
config
,
this
.
EditData
];
this
.
config
.
data
.
userInputData
=
this
.
strMapObjChange
.
strMapToObj
(
(
this
.
$refs
.
WidgetParams
as
WidgetParams
).
getVariableValues
()
);
return
this
.
config
;
}
}
setConfig
(
widgetConfig
:
WidgetConfi
g
):
void
{
setConfig
(
setConfigData
:
[
WidgetConfig
,
object
],
fragment
:
strin
g
):
void
{
this
.
config
=
widgetConfig
;
this
.
config
=
setConfigData
[
0
]
;
//this.updateUI()
;
this
.
EditData
=
setConfigData
[
1
]
;
(
this
.
$refs
.
WidgetParams
as
WidgetParams
).
setVariableList
(
this
.
pathProcessor
.
extractVarFromPath
(
this
.
config
.
data
.
url
)
if
(
this
.
EditData
.
edit
.
url
.
search
(
"
startpath
"
)
!=
-
1
){
this
.
replaceStartPath
(
fragment
)}
);
//map不能序列化,必须要单独处理,这里的处理方法仅限map
<
string
,
string
>
类型
var
temp
=
this
.
config
.
data
.
u
serInputData
;
var
temp
=
this
.
EditData
.
params
.
tempU
serInputData
;
temp
=
JSON
.
parse
(
JSON
.
stringify
(
temp
));
temp
=
JSON
.
parse
(
JSON
.
stringify
(
temp
));
temp
=
this
.
strMapObjChange
.
objToStrMap
(
temp
);
temp
=
this
.
strMapObjChange
.
objToStrMap
(
temp
);
this
.
userInputData
=
temp
;
//this.EditData.params.tempUserInputData = temp;
(
this
.
$refs
.
WidgetParams
as
WidgetParams
).
setVariableInput
(
this
.
userInputData
);
var
Args
:
UpdatePayload
=
{
action
:
this
.
EditData
.
params
.
action
,
variables
:
temp
,
target
:
[
"
self
"
]
};
this
.
EditData
.
params
.
Args
=
Args
;
this
.
viewLoad
(
Args
);
}
}
pathPoke
(
url
:
string
)
{
pathPoke
()
{
this
.
config
.
data
.
url
=
url
;
this
.
config
.
data
.
url
=
this
.
EditData
.
edit
.
url
;
this
.
EditPathPoke
=
url
;
this
.
EditPathPoke
=
this
.
EditData
.
edit
.
url
;
console
.
log
(
"
dddd
"
);
var
pokepath
=
this
.
EditData
.
edit
.
url
;
var
pokepath
=
url
;
//todo:config文件
//todo:config文件
axios
.
defaults
.
timeout
=
1000
;
axios
.
defaults
.
timeout
=
1000
;
axios
.
get
(
pokepath
,
{
axios
.
get
(
pokepath
,
{
...
@@ -228,13 +227,14 @@ export default class State extends Widget {
...
@@ -228,13 +227,14 @@ export default class State extends Widget {
'
Cache-Control
'
:
'
no-cache
'
'
Cache-Control
'
:
'
no-cache
'
}
}
}).
then
(
response
=>
{
}).
then
(
response
=>
{
console
.
log
(
"
update
"
);
this
.
samplePoke
(
response
.
data
);
this
.
samplePoke
(
response
.
data
);
this
.
updateUI
();
this
.
updateUI
();
//test
//this.colourViewLoad();
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
console
.
log
(
'
catch
'
);
this
.
colourViewLoad
(
);
this
.
EditData
.
params
.
PokedPath
=
this
.
config
.
data
.
url
;
this
.
EditData
.
params
.
PokedPath
=
this
.
config
.
data
.
url
;
this
.
openWindows
();
//
this.openWindows();
});
});
//var url = this.config.data.url;
//var url = this.config.data.url;
...
@@ -269,7 +269,8 @@ export default class State extends Widget {
...
@@ -269,7 +269,8 @@ export default class State extends Widget {
replaceStartPath
(
startPath
:
string
):
void
{
replaceStartPath
(
startPath
:
string
):
void
{
this
.
config
.
data
.
url
.
replace
(
"
$startPath$
"
,
startPath
);
this
.
config
.
data
.
url
=
this
.
config
.
data
.
url
.
replace
(
"
$startpath$
"
,
startPath
);
this
.
EditData
.
edit
.
url
=
this
.
EditData
.
edit
.
url
.
replace
(
"
$startpath$
"
,
startPath
);
}
}
parentUpdate
(
payload
:
UpdatePayload
):
void
{
parentUpdate
(
payload
:
UpdatePayload
):
void
{
...
@@ -312,25 +313,20 @@ export default class State extends Widget {
...
@@ -312,25 +313,20 @@ export default class State extends Widget {
}
}
}).
then
(
response
=>
{
}).
then
(
response
=>
{
this
.
StatusValue
=
response
.
data
.
CFET2CORE_SAMPLE_VAL
;
this
.
StatusValue
=
response
.
data
.
CFET2CORE_SAMPLE_VAL
;
switch
(
this
.
StatusValue
.
toString
())
{
//this.colourViewLoad();
case
"
0
"
:
{
this
.
activeColor
=
this
.
EditData
.
props
.
StateFile
[
'
0
'
];
});
break
;
}
case
"
1
"
:
{
this
.
activeColor
=
this
.
EditData
.
props
.
StateFile
[
'
1
'
];
break
;
}
case
"
2
"
:
{
this
.
activeColor
=
this
.
EditData
.
props
.
StateFile
[
'
2
'
];
break
;
}
case
"
255
"
:
{
this
.
activeColor
=
this
.
EditData
.
props
.
StateFile
[
'
255
'
];
break
;
}
}
colourViewLoad
(){
var
stateFile
=
JSON
.
parse
(
this
.
EditData
.
props
.
StateFile
);
var
stateIndicator
=
JSON
.
parse
(
this
.
EditData
.
props
.
StateIndicator
);
this
.
stateKey
=
stateIndicator
[
this
.
StatusValue
];
this
.
activeColor
=
stateFile
[
this
.
stateKey
];
if
(
this
.
activeColor
==
undefined
){
this
.
activeColor
=
'
#bbb
'
;
}
}
});
}
}
//called when widgetParams action clicked
//called when widgetParams action clicked
...
@@ -343,6 +339,7 @@ export default class State extends Widget {
...
@@ -343,6 +339,7 @@ export default class State extends Widget {
this
.
config
.
data
.
url
this
.
config
.
data
.
url
);
);
await
this
.
getData
(
this
.
pathwithVar
);
await
this
.
getData
(
this
.
pathwithVar
);
this
.
colourViewLoad
();
}
}
}
}
</
script
>
</
script
>
...
...
src/components/Status/Status.vue
View file @
fe15f2f2
...
@@ -3,19 +3,22 @@
...
@@ -3,19 +3,22 @@
<div
class=
"container"
id=
"RightClick"
>
<div
class=
"container"
id=
"RightClick"
>
<div
class=
"columns"
style=
"margin-top:5px;"
>
<div
class=
"columns content "
v-bind:class=
"EditData.props.titleSize"
style=
"margin-bottom: 0px;"
>
<!--
<progress-bar
<div
class=
"column content-table-cell-heading-color is-narrow"
style=
"margin: 0px;"
>
:options=
"BarOptions"
<h3>
{{
EditData
.
props
.
title
}}
</h3>
:value=
"value"
</div>
/>
-->
<div
class=
"column is-11 gauge"
style=
"height: 300px"
></div>
</div>
<div
class=
"columns"
style=
"margin-top:5px;margin-bottom: 0px;"
>
<div
class=
"column is-four-sixths is-offset-one-sixth gauge"
ref=
"gauge"
style=
"height: 250px;overflow:auto;"
></div>
</div>
</div>
<div
class=
"columns"
>
<div
class=
"columns"
>
<div
class=
"column is-
10 is-offset-1"
style=
"margin-left:7%;
overflow:auto;"
>
<div
class=
"column is-
four-sixths is-offset-one-sixth"
style=
"
overflow:auto;"
>
<div
style=
"float:left;margin:0px;"
v-bind:style=
"
{ color: activeColor, fontSize: fontSize + 'px' }" >
{{
StatusValue
}}
</div>
<div
v-bind:style=
"
{ color: activeColor, fontSize: fontSize + 'px' }" >
{{
StatusValue
}}
</div>
</div>
</div>
<WidgetParams
<WidgetParams
...
@@ -85,9 +88,10 @@ export default class Status extends Widget {
...
@@ -85,9 +88,10 @@ export default class Status extends Widget {
isShowPath
:
boolean
=
false
;
isShowPath
:
boolean
=
false
;
isShowParams
:
boolean
=
false
;
isShowParams
:
boolean
=
false
;
EditPathPoke
:
string
=
""
;
EditPathPoke
:
string
=
""
;
fontSize
:
number
=
2
5
;
fontSize
:
number
=
3
5
;
activeColor
:
string
=
''
;
activeColor
:
string
=
''
;
value
:
number
=
0
;
value
:
number
=
0
;
tempValue
:
number
=
0
;
gaugeTicks
:
number
[]
=
[
0
,
0.2
,
0.4
,
0.75
,
1
];
gaugeTicks
:
number
[]
=
[
0
,
0.2
,
0.4
,
0.75
,
1
];
gaugeColor
:
string
[]
=
[
'
red
'
,
'
yellow
'
,
'
green
'
];
gaugeColor
:
string
[]
=
[
'
red
'
,
'
yellow
'
,
'
green
'
];
...
@@ -109,20 +113,15 @@ export default class Status extends Widget {
...
@@ -109,20 +113,15 @@ export default class Status extends Widget {
},
},
props
:{
props
:{
fontSize
:
this
.
fontSize
,
fontSize
:
this
.
fontSize
,
StateFile
:{
title
:
''
,
"
hh
"
:
"
red
"
,
titleSize
:
''
,
"
h
"
:
"
orange
"
,
"
l
"
:
"
orange
"
,
"
ll
"
:
"
red
"
,
"
normal
"
:
"
green
"
},
StateIndicatorFile
:{
StateIndicatorFile
:{
"
hh
"
:
"
0.85
"
,
hh
:
85
,
"
h
"
:
"
0.7
"
,
h
:
70
,
"
l
"
:
"
0.2
"
,
l
:
20
,
"
ll
"
:
"
0.1
"
,
ll
:
10
,
"
max
"
:
"
1
"
,
max
:
100
,
"
min
"
:
"
0
"
,
min
:
0
,
},
},
},
},
params
:{
params
:{
...
@@ -176,8 +175,7 @@ export default class Status extends Widget {
...
@@ -176,8 +175,7 @@ export default class Status extends Widget {
menu
.
style
.
position
=
'
absolute
'
;
menu
.
style
.
position
=
'
absolute
'
;
//menu.style.top = '${e.clientY}px';
//menu.style.top = '${e.clientY}px';
//menu.style.left = '${e.clientX}px';
//menu.style.left = '${e.clientX}px';
console
.
log
(
menu
.
style
.
top
);
console
.
log
(
menu
);
};
};
...
@@ -188,19 +186,19 @@ export default class Status extends Widget {
...
@@ -188,19 +186,19 @@ export default class Status extends Widget {
menu
.
remove
()
menu
.
remove
()
}
}
let
gaugeList
=
document
.
getElementsByClassName
(
'
gauge
'
);
gauge
=
new
Gauge
(
this
.
$refs
.
gauge
,{
console
.
log
(
gaugeList
[
this
.
index
]);
percent
:
0
,
gauge
=
new
Gauge
(
gaugeList
[
this
.
index
],{
percent
:
this
.
value
,
range
:
{
range
:
{
ticks
:
this
.
gaugeTicks
,
ticks
:
[
0
,
0.2
,
0.4
,
0.75
,
0.8
,
1
],
color
:
this
.
gaugeColor
,
color
:
[
'
red
'
,
'
yellow
'
,
'
green
'
,
'
yellow
'
,
'
red
'
],
},
statistic
:
{
content
:
{
formatter
:
({
percent
})
=>
``
,
},
},
},
});
});
console
.
log
(
gauge
);
gauge
.
render
();
gauge
.
render
();
...
@@ -220,42 +218,34 @@ export default class Status extends Widget {
...
@@ -220,42 +218,34 @@ export default class Status extends Widget {
}
}
ParsingStateNum
(){
ParsingStateNum
(){
var
StatusNum
=
new
Number
(
this
.
StatusValue
);
var
StatusNum
=
parseFloat
(
this
.
StatusValue
);
this
.
value
=
Math
.
round
((
StatusNum
-
this
.
EditData
.
props
.
StateIndicatorFile
.
ll
)
/
(
this
.
EditData
.
props
.
StateIndicatorFile
.
hh
-
this
.
EditData
.
props
.
StateIndicatorFile
.
ll
));
this
.
value
=
parseFloat
((
StatusNum
-
this
.
EditData
.
props
.
StateIndicatorFile
.
min
)
/
(
this
.
EditData
.
props
.
StateIndicatorFile
.
max
-
this
.
EditData
.
props
.
StateIndicatorFile
.
min
));
this
.
gaugeTicks
[
0
]
=
parseFloat
(
this
.
EditData
.
props
.
StateIndicatorFile
.
min
);
this
.
gaugeTicks
[
0
]
=
0
;
this
.
gaugeTicks
[
1
]
=
parseFloat
(
this
.
EditData
.
props
.
StateIndicatorFile
.
ll
);
this
.
gaugeTicks
[
1
]
=
parseFloat
((
this
.
EditData
.
props
.
StateIndicatorFile
.
ll
-
this
.
EditData
.
props
.
StateIndicatorFile
.
min
)
/
(
this
.
EditData
.
props
.
StateIndicatorFile
.
max
-
this
.
EditData
.
props
.
StateIndicatorFile
.
min
));
this
.
gaugeTicks
[
2
]
=
parseFloat
(
this
.
EditData
.
props
.
StateIndicatorFile
.
l
);
this
.
gaugeTicks
[
2
]
=
parseFloat
((
this
.
EditData
.
props
.
StateIndicatorFile
.
l
-
this
.
EditData
.
props
.
StateIndicatorFile
.
min
)
/
(
this
.
EditData
.
props
.
StateIndicatorFile
.
max
-
this
.
EditData
.
props
.
StateIndicatorFile
.
min
));
this
.
gaugeTicks
[
3
]
=
parseFloat
(
this
.
EditData
.
props
.
StateIndicatorFile
.
h
);
this
.
gaugeTicks
[
3
]
=
parseFloat
((
this
.
EditData
.
props
.
StateIndicatorFile
.
h
-
this
.
EditData
.
props
.
StateIndicatorFile
.
min
)
/
(
this
.
EditData
.
props
.
StateIndicatorFile
.
max
-
this
.
EditData
.
props
.
StateIndicatorFile
.
min
));
this
.
gaugeTicks
[
4
]
=
parseFloat
(
this
.
EditData
.
props
.
StateIndicatorFile
.
hh
);
this
.
gaugeTicks
[
4
]
=
parseFloat
((
this
.
EditData
.
props
.
StateIndicatorFile
.
hh
-
this
.
EditData
.
props
.
StateIndicatorFile
.
min
)
/
(
this
.
EditData
.
props
.
StateIndicatorFile
.
max
-
this
.
EditData
.
props
.
StateIndicatorFile
.
min
));
this
.
gaugeTicks
[
5
]
=
parseFloat
(
this
.
EditData
.
props
.
StateIndicatorFile
.
max
);
this
.
gaugeTicks
[
5
]
=
1
;
this
.
gaugeColor
[
0
]
=
this
.
EditData
.
props
.
StateFile
.
ll
;
this
.
gaugeColor
[
1
]
=
this
.
EditData
.
props
.
StateFile
.
l
;
this
.
gaugeColor
[
2
]
=
this
.
EditData
.
props
.
StateFile
.
normal
;
this
.
gaugeColor
[
3
]
=
this
.
EditData
.
props
.
StateFile
.
h
;
this
.
gaugeColor
[
4
]
=
this
.
EditData
.
props
.
StateFile
.
hh
;
console
.
log
(
gauge
);
gauge
.
options
.
percent
=
this
.
value
;
gauge
.
options
.
percent
=
this
.
value
;
gauge
.
options
.
range
=
{
gauge
.
options
.
range
=
{
ticks
:
this
.
gaugeTicks
,
ticks
:
this
.
gaugeTicks
,
color
:
this
.
gaugeColor
,
color
:
[
'
red
'
,
'
yellow
'
,
'
green
'
,
'
yellow
'
,
'
red
'
]
,
};
};
gauge
.
render
();
gauge
.
render
();
if
(
this
.
StatusValue
>=
this
.
EditData
.
props
.
StateIndicatorFile
.
hh
){
if
(
this
.
StatusValue
>=
parseFloat
(
this
.
EditData
.
props
.
StateIndicatorFile
.
hh
)){
this
.
activeColor
=
this
.
EditData
.
props
.
StateFile
.
hh
;
this
.
activeColor
=
'
red
'
;
}
}
else
if
(
this
.
StatusValue
>=
parseFloat
(
this
.
EditData
.
props
.
StateIndicatorFile
.
h
)
&&
this
.
StatusValue
<
parseFloat
(
this
.
EditData
.
props
.
StateIndicatorFile
.
hh
)){
if
(
this
.
StatusValue
>=
this
.
EditData
.
props
.
StateIndicatorFile
.
h
&&
this
.
StatusValue
<
this
.
EditData
.
props
.
StateIndicatorFile
.
hh
){
this
.
activeColor
=
'
yellow
'
;
this
.
activeColor
=
this
.
EditData
.
props
.
StateFile
.
h
;
}
else
if
(
this
.
StatusValue
>=
parseFloat
(
this
.
EditData
.
props
.
StateIndicatorFile
.
l
)
&&
this
.
StatusValue
<
parseFloat
(
this
.
EditData
.
props
.
StateIndicatorFile
.
h
)){
}
this
.
activeColor
=
'
green
'
;
if
(
this
.
StatusValue
>=
this
.
EditData
.
props
.
StateIndicatorFile
.
l
&&
this
.
StatusValue
<
this
.
EditData
.
props
.
StateIndicatorFile
.
h
){
}
else
if
(
this
.
StatusValue
>=
parseFloat
(
this
.
EditData
.
props
.
StateIndicatorFile
.
ll
)
&&
this
.
StatusValue
<
parseFloat
(
this
.
EditData
.
props
.
StateIndicatorFile
.
l
)){
this
.
activeColor
=
this
.
EditData
.
props
.
StateFile
.
normal
;
this
.
activeColor
=
'
yellow
'
;
}
}
else
if
(
this
.
StatusValue
<=
parseFloat
(
this
.
EditData
.
props
.
StateIndicatorFile
.
ll
)){
if
(
this
.
StatusValue
>=
this
.
EditData
.
props
.
StateIndicatorFile
.
ll
&&
this
.
StatusValue
<
this
.
EditData
.
props
.
StateIndicatorFile
.
l
){
this
.
activeColor
=
'
red
'
;
this
.
activeColor
=
this
.
EditData
.
props
.
StateFile
.
l
;
}
else
{
}
this
.
activeColor
=
'
black
'
;
if
(
this
.
StatusValue
<=
this
.
EditData
.
props
.
StateIndicatorFile
.
ll
){
this
.
activeColor
=
this
.
EditData
.
props
.
StateFile
.
ll
;
}
}
...
@@ -272,7 +262,6 @@ export default class Status extends Widget {
...
@@ -272,7 +262,6 @@ export default class Status extends Widget {
//app
//app
updateUI
()
{
updateUI
()
{
console
.
log
(
"
dd22
"
);
this
.
isShowPath
=
false
;
this
.
isShowPath
=
false
;
this
.
EditData
.
params
.
PokedPath
=
this
.
config
.
data
.
url
;
this
.
EditData
.
params
.
PokedPath
=
this
.
config
.
data
.
url
;
this
.
EditData
.
edit
.
url
=
this
.
config
.
data
.
url
;
this
.
EditData
.
edit
.
url
=
this
.
config
.
data
.
url
;
...
@@ -282,36 +271,63 @@ export default class Status extends Widget {
...
@@ -282,36 +271,63 @@ export default class Status extends Widget {
//app
//app
getConfig
():
WidgetConfig
{
getConfig
():
[
WidgetConfig
,
object
]
{
// this.config.data.userInputData =(this.$refs.WidgetParams as WidgetParams).getVariableValues();
// this.config.data.userInputData =(this.$refs.WidgetParams as WidgetParams).getVariableValues();
this
.
config
.
data
.
userInputData
=
this
.
strMapObjChange
.
strMapToObj
(
/*
this.config.data.userInputData = this.strMapObjChange.strMapToObj(
(this.$refs.WidgetParams as WidgetParams).getVariableValues()
(this.$refs.WidgetParams as WidgetParams).getVariableValues()
);
);*/
return
this
.
config
;
return
[
this
.
config
,
this
.
EditData
];
}
}
//app
//app
setConfig
(
widgetConfig
:
WidgetConfig
):
void
{
setConfig
(
setConfigData
:
[
WidgetConfig
,
object
],
fragment
:
string
):
void
{
this
.
config
=
widgetConfig
;
this
.
config
=
setConfigData
[
0
];
this
.
EditData
=
setConfigData
[
1
];
if
(
this
.
EditData
.
edit
.
url
.
search
(
"
startpath
"
)
!=
-
1
){
this
.
replaceStartPath
(
fragment
)}
var
temp
=
this
.
EditData
.
params
.
tempUserInputData
;
temp
=
JSON
.
parse
(
JSON
.
stringify
(
temp
));
temp
=
this
.
strMapObjChange
.
objToStrMap
(
temp
);
//this.EditData.params.tempUserInputData = temp;
var
Args
:
UpdatePayload
=
{
action
:
this
.
EditData
.
params
.
action
,
variables
:
temp
,
target
:
[
"
self
"
]
};
this
.
viewLoad
(
Args
);
//this.updateUI();
//this.updateUI();
(
this
.
$refs
.
WidgetParams
as
WidgetParams
).
setVariableList
(
/*
(this.$refs.WidgetParams as WidgetParams).setVariableList(
this.pathProcessor.extractVarFromPath(this.config.data.url)
this.pathProcessor.extractVarFromPath(this.config.data.url)
);
);
*/
//map不能序列化,必须要单独处理,这里的处理方法仅限map
<
string
,
string
>
类型
//map不能序列化,必须要单独处理,这里的处理方法仅限map
<
string
,
string
>
类型
var
temp
=
this
.
config
.
data
.
userInputData
;
/* var temp = this.EditData.params.Args.variables
;
temp = JSON.parse(JSON.stringify(temp));
temp = JSON.parse(JSON.stringify(temp));
temp = this.strMapObjChange.objToStrMap(temp);
temp = this.strMapObjChange.objToStrMap(temp);
this
.
userInputData
=
temp
;
this.EditData.params.Args.variables = temp;
(
this
.
$refs
.
WidgetParams
as
WidgetParams
).
setVariableInput
(
console.log(temp);*/
/* temp = this.EditData;
temp = JSON.parse(JSON.stringify(temp));
temp = this.strMapObjChange.objToStrMap(temp);
this.EditData = temp;
console.log(temp);*/
/*(this.$refs.WidgetParams as WidgetParams).setVariableInput(
this.userInputData
this.userInputData
);
);
*/
}
}
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
;
console
.
log
(
"
dddd
"
);
var
pokepath
=
this
.
EditData
.
edit
.
url
;
var
pokepath
=
this
.
EditData
.
edit
.
url
;
//todo:config文件
//todo:config文件
axios
.
defaults
.
timeout
=
1000
;
axios
.
defaults
.
timeout
=
1000
;
...
@@ -321,22 +337,21 @@ export default class Status extends Widget {
...
@@ -321,22 +337,21 @@ export default class Status extends Widget {
'
Cache-Control
'
:
'
no-cache
'
'
Cache-Control
'
:
'
no-cache
'
}
}
}).
then
(
response
=>
{
}).
then
(
response
=>
{
console
.
log
(
"
update
"
);
this
.
samplePoke
(
response
.
data
);
this
.
samplePoke
(
response
.
data
);
this
.
updateUI
();
this
.
updateUI
();
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
console
.
log
(
'
catch
'
);
this
.
EditData
.
params
.
PokedPath
=
this
.
config
.
data
.
url
;
this
.
EditData
.
params
.
PokedPath
=
this
.
config
.
data
.
url
;
this
.
openWindows
();
this
.
openWindows
();
});
});
//var url = this.config.data.url;
//var url = this.config.data.url;
}
}
//app
//app
samplePoke
(
sample
:
any
)
{
samplePoke
(
sample
:
any
)
{
console
.
log
(
"
samplePOke
"
);
var
samplePath
=
sample
.
CFET2CORE_SAMPLE_PATH
;
var
samplePath
=
sample
.
CFET2CORE_SAMPLE_PATH
;
var
pokedPath
:
string
;
var
pokedPath
:
string
;
pokedPath
=
samplePath
;
pokedPath
=
samplePath
;
...
@@ -366,7 +381,6 @@ export default class Status extends Widget {
...
@@ -366,7 +381,6 @@ export default class Status extends Widget {
//app
//app
parentUpdate
(
payload
:
UpdatePayload
):
void
{
parentUpdate
(
payload
:
UpdatePayload
):
void
{
console
.
log
(
"
parentUpdate
"
);
var
shouldUpdate
:
boolean
=
false
var
shouldUpdate
:
boolean
=
false
this
.
userInputData
=
this
.
strMapObjChange
.
strMapToObj
(
this
.
userInputData
=
this
.
strMapObjChange
.
strMapToObj
(
(
this
.
$refs
.
WidgetParams
as
WidgetParams
).
getVariableValues
());
(
this
.
$refs
.
WidgetParams
as
WidgetParams
).
getVariableValues
());
...
@@ -395,18 +409,28 @@ export default class Status extends Widget {
...
@@ -395,18 +409,28 @@ export default class Status extends Widget {
//app
//app
refresh
()
{
refresh
()
{
//this.viewLoad(this.EditData.params.Args);
//this.viewLoad(this.EditData.params.Args);
gauge
.
options
.
percent
=
this
.
value
;
if
(
typeof
this
.
StatusValue
==
'
number
'
){
gauge
.
render
();
}
//this.getData(this.pathwithVar);
this
.
getData
(
this
.
pathwithVar
);
//this.tempValue = this.value;
}
}
replaceStartPath
(
startPath
:
string
):
void
{
replaceStartPath
(
startPath
:
string
):
void
{
this
.
config
.
data
.
url
.
replace
(
"
$startPath$
"
,
startPath
);
this
.
config
.
data
.
url
=
this
.
config
.
data
.
url
.
replace
(
"
$startpath$
"
,
startPath
);
this
.
EditData
.
edit
.
url
=
this
.
EditData
.
edit
.
url
.
replace
(
"
$startpath$
"
,
startPath
);
}
}
async
getData
(
url
:
string
)
{
async
getData
(
url
:
string
)
{
var
apiLoad
=
url
;
var
apiLoad
=
url
;
console
.
log
(
url
);
await
axios
await
axios
.
get
(
apiLoad
,
{
.
get
(
apiLoad
,
{
headers
:
{
headers
:
{
...
@@ -416,7 +440,7 @@ export default class Status extends Widget {
...
@@ -416,7 +440,7 @@ export default class Status extends Widget {
})
})
.
then
(
response
=>
{
.
then
(
response
=>
{
this
.
StatusValue
=
response
.
data
.
CFET2CORE_SAMPLE_VAL
;
this
.
StatusValue
=
response
.
data
.
CFET2CORE_SAMPLE_VAL
;
if
(
this
.
StatusValue
==
undefined
)
if
(
this
.
StatusValue
==
undefined
||
typeof
this
.
StatusValue
!=
'
number
'
)
{
{
this
.
StatusValue
=
"
undefined
"
;
this
.
StatusValue
=
"
undefined
"
;
}
}
...
@@ -428,7 +452,8 @@ export default class Status extends Widget {
...
@@ -428,7 +452,8 @@ export default class Status extends Widget {
//called when widgetParams action clicked
//called when widgetParams action clicked
async
viewLoad
(
Args
:
UpdatePayload
)
{
async
viewLoad
(
Args
:
UpdatePayload
)
{
// this.config.data.userInputData = Args.variables;
// this.config.data.userInputData = Args.variables;
this
.
userInputData
=
Args
.
variables
;
//this.userInputData = Args.variables;
this
.
userInputData
=
Args
.
variables
;
this
.
pathwithVar
=
this
.
pathProcessor
.
FillPathWithVar
(
this
.
pathwithVar
=
this
.
pathProcessor
.
FillPathWithVar
(
// this.config.data.userInputData,
// this.config.data.userInputData,
this
.
userInputData
,
this
.
userInputData
,
...
@@ -440,8 +465,6 @@ export default class Status extends Widget {
...
@@ -440,8 +465,6 @@ export default class Status extends Widget {
this
.
ParsingStateNum
();
this
.
ParsingStateNum
();
}
}
}
}
}
}
</
script
>
</
script
>
...
...
src/models/WidgetRef.ts
View file @
fe15f2f2
...
@@ -5,7 +5,7 @@ export class WidgetRef {
...
@@ -5,7 +5,7 @@ export class WidgetRef {
// the parameters of a resource should be probed by the widget itself
// the parameters of a resource should be probed by the widget itself
public
widgetComponentName
:
string
=
''
;
public
widgetComponentName
:
string
=
''
;
public
ref
:
string
=
''
;
public
ref
:
string
=
''
;
public
widgetConfig
?:
WidgetConfig
;
public
widgetConfig
?:
[
WidgetConfig
,
object
]
;
//below is for grid layout
//below is for grid layout
public
x
:
number
=
0
;
public
x
:
number
=
0
;
public
y
:
number
=
0
;
public
y
:
number
=
0
;
...
...
src/models/widget.ts
View file @
fe15f2f2
...
@@ -11,7 +11,7 @@ export interface PokePath {
...
@@ -11,7 +11,7 @@ export interface PokePath {
export
abstract
class
Widget
extends
Vue
{
export
abstract
class
Widget
extends
Vue
{
public
WidgetComponentName
?:
string
;
public
WidgetComponentName
?:
string
;
public
abstract
setConfig
(
wid
:
WidgetConfig
):
void
;
public
abstract
setConfig
(
wid
:
WidgetConfig
,
fragment
:
string
):
void
;
public
abstract
getConfig
():
WidgetConfig
;
public
abstract
getConfig
():
WidgetConfig
;
public
abstract
parentUpdate
(
payload
:
UpdatePayload
):
void
;
public
abstract
parentUpdate
(
payload
:
UpdatePayload
):
void
;
public
abstract
refresh
():
void
;
public
abstract
refresh
():
void
;
...
...
tsconfig.json
View file @
fe15f2f2
{
{
"compilerOptions"
:
{
"compilerOptions"
:
{
//
"declaration"
:
true
,
////
xjl
add
//
"resolveJsonModule"
:
true
,
//
"declarationDir"
:
"src/types"
,
"target"
:
"esnext"
,
"target"
:
"esnext"
,
//
"target"
:
"es5"
,
//
"target"
:
"es5"
,
"module"
:
"esnext"
,
"module"
:
"esnext"
,
//
"module"
:
"commonjs"
,
//
"module"
:
"commonjs"
,
...
@@ -14,9 +19,10 @@
...
@@ -14,9 +19,10 @@
"allowSyntheticDefaultImports"
:
true
,
"allowSyntheticDefaultImports"
:
true
,
"sourceMap"
:
true
,
"sourceMap"
:
true
,
"baseUrl"
:
"."
,
"baseUrl"
:
"."
,
"noEmit"
:
true
,
"typeRoots"
:
[
"./src/types"
],
"typeRoots"
:
[
"./src/types"
],
"types"
:
[
"types"
:
[
"webpack-env"
"webpack-env"
,
],
],
"paths"
:
{
"paths"
:
{
"@/*"
:
[
"@/*"
:
[
...
@@ -30,12 +36,18 @@
...
@@ -30,12 +36,18 @@
"scripthost"
"scripthost"
]
]
},
},
"include"
:
[
"include"
:
[
"src/**/*.ts"
,
"src/**/*.ts"
,
"src/**/*.tsx"
,
"src/**/*.tsx"
,
"src/**/*.vue"
,
"src/**/*.vue"
,
"tests/**/*.ts"
,
"tests/**/*.ts"
,
"tests/**/*.tsx"
,
"node_modules/vue-grid-layout/dist/vue-grid-item.d.ts"
"tests/**/*.tsx"
,
"node_modules/vue-grid-layout/dist/vue-grid-item.d.ts"
,
"/node_modules/@antv/g2plot/lib/index.d.ts"
,
"src/types/g2plot/g2plot.d.ts"
,
"src/types/g2plot/global.d.ts"
],
],
"exclude"
:
[
"exclude"
:
[
"node_modules"
"node_modules"
...
...
tsconfig2.json
View file @
fe15f2f2
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
/*
Basic
Options
*/
/*
Basic
Options
*/
//
"incremental"
:
true
,
/*
Enable
incremental
compilation
*/
//
"incremental"
:
true
,
/*
Enable
incremental
compilation
*/
//
"target"
:
"es5"
,
/*
Specify
ECMAScript
target
version:
'ES
3
'
(default)
,
'ES
5
'
,
'ES
2015
'
,
'ES
2016
'
,
'ES
2017
'
,
'ES
2018
'
,
'ES
2019
'
or
'ESNEXT'.
*/
//
"target"
:
"es5"
,
/*
Specify
ECMAScript
target
version:
'ES
3
'
(default)
,
'ES
5
'
,
'ES
2015
'
,
'ES
2016
'
,
'ES
2017
'
,
'ES
2018
'
,
'ES
2019
'
or
'ESNEXT'.
*/
//
"module"
:
"commonjs"
,
/*
Specify
module
code
generation:
'none'
,
'commonjs'
,
'amd'
,
'system'
,
'umd'
,
'es
2015
'
,
or
'ESNext'.
*/
//
"module"
:
"commonjs"
,
/*
Specify
module
code
generation:
'none'
,
'commonjs'
,
'amd'
,
'system'
,
'umd'
,
'es
2015
'
,
or
'ESNext'.
*/
//
"lib"
:
[],
/*
Specify
library
files
to
be
included
in
the
compilation.
*/
//
"lib"
:
[],
/*
Specify
library
files
to
be
included
in
the
compilation.
*/
//
"allowJs"
:
true
,
/*
Allow
javascript
files
to
be
compiled.
*/
//
"allowJs"
:
true
,
/*
Allow
javascript
files
to
be
compiled.
*/
//
"checkJs"
:
true
,
/*
Report
errors
in
.js
files.
*/
//
"checkJs"
:
true
,
/*
Report
errors
in
.js
files.
*/
...
@@ -15,8 +15,8 @@
...
@@ -15,8 +15,8 @@
//
"outDir"
:
"./js"
,
/*
Redirect
output
structure
to
the
directory.
*/
//
"outDir"
:
"./js"
,
/*
Redirect
output
structure
to
the
directory.
*/
//
"rootDir"
:
"./"
,
/*
Specify
the
root
directory
of
input
files.
Use
to
control
the
output
directory
structure
with
--outDir.
*/
//
"rootDir"
:
"./"
,
/*
Specify
the
root
directory
of
input
files.
Use
to
control
the
output
directory
structure
with
--outDir.
*/
//
"composite"
:
true
,
/*
Enable
project
compilation
*/
//
"composite"
:
true
,
/*
Enable
project
compilation
*/
//
"tsBuildInfoFile"
:
"./"
,
/*
Specify
file
to
store
incremental
compilation
information
*/
//
"tsBuildInfoFile"
:
"./"
,
/*
Specify
file
to
store
incremental
compilation
information
*/
//
"removeComments"
:
true
,
/*
Do
not
emit
comments
to
output.
*/
//
"removeComments"
:
true
,
/*
Do
not
emit
comments
to
output.
*/
//
"noEmit"
:
true
,
/*
Do
not
emit
outputs.
*/
//
"noEmit"
:
true
,
/*
Do
not
emit
outputs.
*/
//
"importHelpers"
:
true
,
/*
Import
emit
helpers
from
'tslib'.
*/
//
"importHelpers"
:
true
,
/*
Import
emit
helpers
from
'tslib'.
*/
//
"downlevelIteration"
:
true
,
/*
Provide
full
support
for
iterables
in
'for-of'
,
spread
,
and
destructuring
when
targeting
'ES
5
'
or
'ES
3
'.
*/
//
"downlevelIteration"
:
true
,
/*
Provide
full
support
for
iterables
in
'for-of'
,
spread
,
and
destructuring
when
targeting
'ES
5
'
or
'ES
3
'.
*/
...
...
vue.config.js
View file @
fe15f2f2
...
@@ -16,7 +16,7 @@ module.exports = {
...
@@ -16,7 +16,7 @@ module.exports = {
devServer
:
{
devServer
:
{
proxy
:
{
proxy
:
{
"
/
"
:
{
"
/
"
:
{
target
:
"
http://192.168.0.19
5
:8001
"
,
target
:
"
http://192.168.0.19
7
:8001
"
,
secure
:
false
,
secure
:
false
,
changeOrigin
:
true
changeOrigin
:
true
}
}
...
...
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