webtopoAPI Reference¶
Integrate the Webtopo SCADA/HMI editor by implementing a webtopoAPI object and passing it to <Webtopo :webtopoAPI="webAPI"> or <preview :webtopoAPI="webAPI">.
GitHub: bighhhh/webtopo-vue3-community
Note: User-facing terminology uses tags and screens. API method names and fields such as
getPoints,points, andgetPointListare legacy identifiers — they still refer to tags and screen data.
API Methods¶
Implement these methods in your project:
webtopoAPI: {
// Query historical data for history charts (method name is legacy)
getCaptcha: ({ mps, startTime, endTime }) => {},
// Query all tags in your system (for binding); API name: getPoints
getPoints: ({ page, limit }) => {},
// Query telemetry/signal attributes by tag (meter)
getAttrs: ({ mpId, consId, readAndWriteVar }) => {},
// Save screen data (database or file system); `points` field holds tag list
saveOrUpdate: ({ cells, points, graph }) => {},
// Get screen JSON by ID (used by preview component)
getJSONById: (id) => {},
// Get all uploaded images/elements
getImages: () => {},
// Upload image or element file
uploadFile: (file) => {},
// Get screen list (for internal link / target screen config)
listNotPage: ({ consId, notSearchId }) => {},
// Batch get tag names (refreshed on each editor open)
getMpAndMstypeNames: (mpAttrs) => {},
// Send control data to backend
setData: (id, mpId, attrId, value) => {}
}
API Summary¶
| API | Purpose |
|---|---|
getCaptcha |
Query historical data for history charts |
getPoints |
Paginated query of all tags |
getAttrs |
Query telemetry/signal attributes by tag |
saveOrUpdate |
Save or update screen JSON (points = tag list) |
getJSONById |
Get screen JSON by ID |
getImages |
List uploaded images/elements |
uploadFile |
Upload image or element |
listNotPage |
Get screen list (no pagination) |
getMpAndMstypeNames |
Batch get tag names |
setData |
Send control data to backend |