Commit f5997cea908b649d638720dbd3bd8b01084b4b6e

Authored by ww
1 parent 88686586

wip: 开发右侧数据绑定面板

Too many changes to show.

To preserve performance only 3 of 6 files are displayed.

  1 +<component name="ProjectDictionaryState">
  2 + <dictionary name="WWN">
  3 + <words>
  4 + <w>layui</w>
  5 + </words>
  6 + </dictionary>
  7 +</component>
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<project version="4">
  3 + <component name="VcsDirectoryMappings">
  4 + <mapping directory="$PROJECT_DIR$" vcs="Git" />
  5 + </component>
  6 +</project>
1 class ConfigurationNodeApi { 1 class ConfigurationNodeApi {
2 - /**  
3 - * @description 获取组态信息  
4 - * @param {'CONFIGURE' | 'CONTENT' | 'NODE'} levelType - 组态资源类型  
5 - * @param {string} levelId - 组态资源ID  
6 - */  
7 - static getConfigurationInfo = async (levelType, levelId) => {  
8 - return await defHttp.get(`/yt/configuration/node/${levelType}/${levelId}`)  
9 - }  
10 -  
11 - /**  
12 - * @description 编辑数据交互  
13 - */  
14 - static updateConfigurationNodeEvent() {  
15 -  
16 - }  
17 -  
18 - /**  
19 - * @description 获取组织节点树  
20 - * @returns  
21 - */  
22 - static getOrgTree = async () => {  
23 - return await defHttp.get('/yt/organization/me/list')  
24 - } 2 + /**
  3 + * @description 获取组态信息
  4 + * @param {'CONFIGURE' | 'CONTENT' | 'NODE'} levelType - 组态资源类型
  5 + * @param {string} levelId - 组态资源ID
  6 + */
  7 + static getConfigurationInfo(levelType, levelId) {
  8 + return defHttp.get(`/yt/configuration/node/${levelType}/${levelId}`)
  9 + }
  10 +
  11 + /**
  12 + * @description 获取组织节点树
  13 + * @returns
  14 + */
  15 + static getOrgTree() {
  16 + return defHttp.get('/yt/organization/me/list')
  17 + }
  18 +
  19 + /**
  20 + * @description 通过设备ID 获取 设备属性
  21 + * @param tbDeviceId
  22 + * @returns {Promise<*>}
  23 + */
  24 + static getDeviceAttr(tbDeviceId) {
  25 + return defHttp.get(`/plugins/telemetry/DEVICE/${tbDeviceId}/keys/timeseries`)
  26 + }
  27 +
  28 + /**
  29 + * @description 获取组织下的设备
  30 + * @param {'DIRECT_CONNECTION' | 'GATEWAY' | 'SENDOR'} deviceType - 'DIRECT_CONNECTION' 直连设备 'GATEWAY' 网关设备 'SENDOR' 传感器
  31 + * @param {string} orgId - 组织ID
  32 + * @returns {Promise<*>}
  33 + */
  34 + static getDeviceUnderTheOrg(deviceType, orgId) {
  35 + return defHttp.get(`/yt/device/list/${deviceType}?organizationId=${orgId}`)
  36 + }
  37 +
  38 + /**
  39 + * @description 查询设备的子设备
  40 + * @param deviceId 设备ID
  41 + * @returns {Promise<*>}
  42 + */
  43 + static getDeviceChildDevice(deviceId) {
  44 + return defHttp.get(`/yt/device/relation?page=1&pageSize=10&fromId=${deviceId}`)
  45 + }
  46 +
  47 + /**
  48 + * @description 查询所有主设备列表
  49 + * @param orgId
  50 + * @returns {Promise<*>}
  51 + */
  52 + static getMasterDevice(orgId) {
  53 + return defHttp.get(`/yt/device/list/master/${orgId}`)
  54 + }
  55 +
  56 + /**
  57 + * @description 查询所有从设备
  58 + * @param orgId
  59 + * @param masterDeviceId
  60 + * @returns {Promise<*>}
  61 + */
  62 + static getSlaveDevice(orgId, masterDeviceId) {
  63 + return defHttp.get(`/yt/device/list/slave/${orgId}?masterId=${masterDeviceId}`)
  64 + }
  65 +
  66 + /**
  67 + * @description 编辑数据交互
  68 + */
  69 + static updateNodeEvent(data) {
  70 + return defHttp.post('/yt/configuration/node/event', data)
  71 + }
  72 +
  73 + /**
  74 + * @description 编辑动画效果
  75 + * @param {*} data
  76 + * @returns
  77 + */
  78 + static updateNodeAct(data) {
  79 + return defHttp.post('/yt/configuration/node/act', data)
  80 + }
25 } 81 }