1. Dashboard显示板配置使用手册

2. 修订记录

日期 版本 说明 编写
2019-11-01 1.0 R1 1.组态图区块增加title;
2.增加显示板状态灯配置;
lizhijun

3. 显示板支持列表配置

注:

图表数据更新需配置一个from表示数据来源,不配置无法更新数据

其他的数据来源则是配置在项id中。

3.1. 配置说明

3.1.1. 卡片样式说明:

卡片支持颜色配置, "backgroundColor" 属性配置背景色, "fontColor" 属性配置字体颜色。

3.1.2. 服务作业报警故障说明:

  • 服务 url项:"service",显示项 "params" 可选 ["service_id"--编号,"service_name"--名称,"category"--类型,"description"--描述,"date"--时间,"equipment_name"--设备名称]
  • 作业 url项:"activity",显示项 "params" 可选 ["activity_id"--编号,"activity_name"--名称,"category"--类型,"description"--描述,"date"--时间,"equipment_name"--设备名称]
  • 报警 url项:"alarm",显示项 "params" 可选 ["alert_id"--编号,"alert_name"--名称,"description"--描述,"created"--时间,"equipment_name"--设备名称]
  • 故障 url项:"fault",显示项 "params" 可选 ["fault_id"--编号,"fault_name"--名称,"description"--描述,"created"--时间,"equipment_name"--设备名称]
  • 报警故障 url项:"warn",显示项 "params" 可选 ["id"--编号,"name"--名称,"type"--类别,"description"--描述,"created"--时间,"equipment_name"--设备名称]
  • 服务作业 url项:"task",显示项 "params" 可选 ["id"--编号,"name"--名称,"type"--类别,"description"--描述,"date"--时间,"equipment_name"--设备名称]

以上都记录均为默认取最新10条记录,若需显示更多记录数,可在显示项里配置 size:10 参数;

上面所有获取数据显示的仅且支持在表格中显示。

3.1.3. 统计类字段说明

  • type:年|月|周|日|小时(year|month|week|day|hour)
  • total:取多少条历史记录

多个点的,仅支持曲线

单点的,"statistics" 中增加 "id" 字段,

如上月的:"statistics":{"type":"month","total":1,"id":"TotalCumulativeActivePower2"},

注:柱状图统计,需配置 "statistics":{"type":"month"},type可为[week|month],表示上周/本周|上月/本月

3.1.4. 区间状态类说明:

卡片等文本类可配置 "flag" 的 "key" 为区间值,如: {"0.5<=$val<1.8":正常}

表盘可配置 "color" 为区间颜色段:

如:[[0.6,"#91c7ae"],[1.6,"#63869e"],[2,"#c23531"]],其中数值为一个区间的终点值,当配置有最大最小值(max,min)字段方可生效

3.1.5. 多个key合并显示说明:

id字段为要合并的key集合,split字段为分隔符

如:{ "id": ["S01","S011","S012"], "split":":" ,"value": 0, "name": "瞬时流量", "unit": "Nm³/h" },

3.1.6. 累计值配置说明:

即获取当天、当月、当年、历史的累计结果 [day|month|year|total]

若需显示累计值,则需在配置中添加 "cumulative" 字段配置: "cumulative":{"id":"cumulativeID","type":"day"}

3.1.7. 设备在线/离线标识配置说明:

在组件配置中添加 "equipmentStatus" 字段配置: "equipmentStatus":{"id":"updateStatusId","status":{"0":"离线","1":"在线"}}

配置项 "itemData" / "statusData" 中子项配置:{"id":"updateStatusId","name":"吨汽耗电","value":"离线","cache":false}

3.2. 显示板分页说明

注:

在每页显示板中可自定义行和列,不写默认为4行8列,text类型不支持。

显示板目前仅且支持image与text两种类型

具体每项组件配置详情请看显示板示例说明,此处只列举显示板分页方式

3.2.1. 分页示例

{
  "Dashboard-1":{
    "name":"Dashboard中文名称",//显示板分页名称
    "dataType":"images",//显示板类型
    "row":4,//行数
    "col":8,//列数
    "data":[  //组件数组
      { //定义一个显示板组件
        "type":"gauge",
        "attribute": "sta_gauge",//显示板中定义一个压力仪表盘,当前显示板该图表的key,在当前显示板中必须唯一。
        "name":"供气压力",
        "unit":"Mpa",
        "min":0,
        "max":2,
        "value":$Pressure,
        "step":5,
        "color":"#67c23a",
        "xys":{
          "pos":[0,2],
          "len":[2,2]
        }
      }
      ...
    ]
  },
  "Dashboard-2":{
    "name":"Dashboard中文名称",//显示板分页名称
    "dataType":"text",//显示板类型
    "data":[  //组件数组
      {
             "type":"textData",//图表的类型
             "attribute": "grid_AirSupplyPres1",//标识符,用以获取图表更新数值,自定义,唯一
             "name": "某站点用户访问来源",//label显示的图表名称
             "itemData":[ //数据项包括 标识符(id),值(value),名称(name) 单位(unit) 状态码对应表(flag)
               {"id":"zhijiefangwen","value":335, "name":"直接访问","unit":"单位","flag": {"0": "卸载", "1":"加载"}},
               {"id":"youjianyingxiao","value":310, "name":"邮件营销","unit":"单位"},
               {"id":"lianmengguanggao","value":234, "name":"联盟广告","unit":"单位"},
               {"id":"shipinguanggao","value":135, "name":"视频广告","unit":"单位"},
               {"id":"sousuoyinqing","value":1548, "name":"搜索引擎","unit":"单位"}
             ]
      }
      ...
    ]
  }
}

3.3. 示例说明

3.3.1. 组态图

{
  "type":"monitor",   //图表类型
  "name":"标题",   //图表标题,设置则显示,不设置则无
  "attribute": "sta_AirSupplyPres", //标识符,用以获取图表更新数值,自定义,唯一
  "style": { // 背景图形式设置
    "outer": {
      "width": "90%",
      "height": "94%",
      "left": "10%",
      "top": "6%"
    },
    "inner": {
      "width": "90%",
      "height": "100%",
      "background-size": "100% 100%"
    }
  },
  "background": "airCompressor.png",  //组态背景图,设备图名称,鉴于没有上传组态图附件的地方,只能以名称匹配存储好的静态图片文件
  "monitorImages": {"id":"z","defImg":"airCompressor_stop.png","flagImage":{0:"airCompressor_stop.png",1:"airCompressor_start.png"}}, //组态图列表配置,在需要根据状态切换时配置。["airCompressor.png"]
  "statusData":[
    {
      "id":"status_item_one",
      "name":"运行状态",
      "flagCode":"0",
      "flagColor":{"0": "#bacbe1", "1":"green"},  //状态码颜色对应表
      "flag": {"0": "未获取", "1":"已获取"},      //状态码对应表
    },
    {
      "id":"status_item_two",
      "name":"加载状态",
      "flagCode":"0",
      "flagColor":{"0": "#fa5555", "1":"green"},  //状态码颜色对应表
      "flag": {"0": "卸载", "1":"加载"},          //状态码对应表
    }
  ],
  "itemData":[
    {
      "id":"L1_2_3",
      "name":"主机电流A",
      "unit":"A",
      "value":0,
      "position": { //项放置的位置
          "top": "12%",
          "left": "17%",
          "position": "absolute"
      }
    },
    {
      "id":"L1_2_4",
      "type": "liquid",
      "max": 100,
      "min": 0,
            "value": 0,
      "position": {
        "top": "68%",
        "left": "0.5%",
        "position": "absolute"
      }
    },
    {
      "id":"L1_2_5",
      "type": "status",// 状态类型
      "on": 1,
            "off": 0,
      "value": 0,
      "position": {
        "top": "80%",
        "left": "0.5%",
        "position": "absolute"
      }
    },
    {
      "id":"L1_2_5",
      "type": "light", // 状态灯类型, 初始化默认灰色
      "on": 1,  // green
            "off": 0, // red 
      "value": 0,
      "position": {
        "top": "80%",
        "left": "0.5%",
        "position": "absolute"
      }
    }
  ],
  "xys":{         //图表位置信息
    "pos":[0,0],    //图表开始位置,[0,0]开始
    "len":[2,5]     //所占大小([行,列]),[1,1]开始
  },
}

组态图示例代码

{
  "type": "monitor",
  "attribute": "monitorAttribute",
  "style": {
    "outer": {
      "width": "90%",
      "height": "94%",
      "left": "10%",
      "top": "6%"
    },
    "inner": {
      "width": "90%",
      "height": "100%",
      "background-size": "100% 100%"
    }
  },
  "background": "yitizhengqi.png",
  "monitorImages": { "id": "Z", "defImg": "yitizhengqi.png", "flagImage": {  "0": "yitizhengqi.png", "1": "yitizhengqi.gif" } },
  "statusData": [
    {
      "id": "Z",
      "name": "运行状态",
      "flagCode": 0,
      "flagColor": { "0": "#bacbe1", "1": "green" },
      "flag": { "0": "停机", "1": "开机" }
    },
    {
      "id": "E09",
      "name": "1#给水泵",
      "flagCode": 0,
      "flagColor": { "0": "#bacbe1", "1": "green" },
      "flag": { "0": "停机", "1": "开机" }
    }
  ],
  "itemData": [
    {
      "id":"L1_2_4",
      "type": "liquid",
      "max": 100,
            "value": 0,
      "position": {
        "top": "68%",
        "left": "0.5%",
        "position": "absolute"
      }
    },
    {
      "id":"L1_2_5",
      "type": "status",
      "on": 1,
            "off": 0,
      "value": 0,
      "position": {
        "top": "80%",
        "left": "0.5%",
        "position": "absolute"
      }
    },
    {
      "id": "S07",
      "name": "冷凝器排烟温度",
      "unit": "℃",
      "value": 0,
      "position": {
        "top": "10%",
        "left": "95%",
        "position": "absolute"
      }
    },
    {
      "id": "S22",
      "name": "烟气含氧量",
      "unit": "℃",
      "value": 0,
      "position": {
        "top": "10%",
        "left": "45%",
        "position": "absolute"
      }
    },
    {
      "id": "S13",
      "name": "炉膛温度",
      "unit": "℃",
      "value": 0,
      "position": {
        "top": "65%",
        "left": "45%",
        "position": "absolute"
      }
    },
    {
      "id": "S05",
      "name": "锅炉水位",
      "unit": "cm",
      "value": 0,
      "position": {
        "top": "58%",
        "left": "0%",
        "position": "absolute"
      }
    },
    {
      "id": "S04",
      "name": "蒸汽压力",
      "unit": "MPa",
      "value": 0,
      "position": {
        "top": "1%",
        "left": "14%",
        "position": "absolute"
      }
    },
    {
      "id": "S24",
      "name": "加热PID输出比例",
      "unit": "%",
      "value": 0,
      "position": {
        "top": "45%",
        "left": "65%",
        "position": "absolute"
      }
    },
    {
      "id": "S06",
      "name": "本体排烟温度",
      "unit": "℃",
      "value": 0,
      "position": {
        "top": "28%",
        "left": "65%",
        "position": "absolute"
      }
    },
    {
      "id": "S12",
      "name": "节能器出水温度",
      "unit": "℃",
      "value": 0,
      "position": {
        "top": "75%",
        "left": "95%",
        "position": "absolute"
      }
    },
    {
      "id": "S08",
      "name": "冷凝器进水温度",
      "unit": "℃",
      "value": 0,
      "position": {
        "top": "23%",
        "left": "95%",
        "position": "absolute"
      }
    },
    {
      "id": "S11",
      "name": "节能器进水温度",
      "unit": "℃",
      "value": 0,
      "position": {
        "top": "62%",
        "left": "95%",
        "position": "absolute"
      }
    },
    {
      "id": "S10",
      "name": "节能器排烟温度",
      "unit": "℃",
      "value": 0,
      "position": {
        "top": "49%",
        "left": "95%",
        "position": "absolute"
      }
    },
    {
      "id": "S09",
      "name": "冷凝器出水温度",
      "unit": "℃",
      "value": 0,
      "position": {
        "top": "36%",
        "left": "95%",
        "position": "absolute"
      }
    }
  ],
  "xys": {
    "pos": [ 0, 0 ],
    "len": [ 9, 24]
  }
}
组态图示例图
Image - 组态图示例图

3.3.2. 曲线

{
  "type":"line",//图表的类型
  "attribute": "line_AirSupplyPres1", //标识符,用以获取图表更新数值,自定义,唯一
  "name": "曲线图",   //label显示的图表名称
  "statistics":{"type":"hour","total":24},  //若是统计类曲线,添加此属性,type为统计类型[year|month|week|day|hour],total为多少条记录(整数)
  "from":[马赛克id1,马赛克id2]
  "lineColor":"#67c23a",
  "legendData": ["邮件营销"],   //图例显示的名称,对应下面的series中的每一项
  "xAxis":["周一","周二","周三","周四","周五","周六","周日"], //x轴显示的刻度名称,可变
  "multiyAxis":true, //是否使用多个Y轴,默认为true
  "max":100,//最大值,最值为配置坐标系方向轴的值。需要显示标线,此值必须配置。
  "min":0,//最小值,最值为配置坐标系方向轴的值。需要显示标线,此值必须配置。
  "series":[
    {
      "name":"邮件营销",  //当前曲线类别名称
      "type":"line",     //曲线类型
      "from":"马赛克id1",
      "data" : [],      //当前曲线显示的数值,变量数值
    },
    {
      "name":"邮件营销",  //当前曲线类别名称
      "type":"line",    //曲线类型
      "from":"马赛克id2",
      "data" : [],      //当前曲线显示的数值,变量数值
    }
  ],
  "markPointData":[ //可选
    {"name" : "周五", "value" : 90, "xAxis": "周五", "yAxis": 90}
  ],
  "markLineData":[  //可选
    {"type" : "average", "name": "平均值"},
    {"type" : "min", "name": "最小值"}
  ],
  "xys":{       //图表位置信息
    "pos":[2,4],  //图表开始位置,[0,0]开始
    "len":[2,4]   //所占大小([行,列]),[1,1]开始
  },
}

曲线示例代码

{
  "type": "line",
  "attribute": "line-06",
  "name": "冷凝器进(出)水温度(℃)",
  "lineColor": ["#67c23a", "#4162ff"],
  "statistics": {"type":"day","total":7},
  "from": ["S08", "S09"],
  "legendData": ["冷凝器进水温度", "冷凝器出水温度"],
  "xAxis": ["2019-06-22 09:30:00", "2019-06-23 09:30:00", "2019-06-24 09:30:00", "2019-06-25 09:30:00", "2019-06-26 09:30:00", "2019-06-27 09:30:00", "2019-06-28 09:30:00"],
  "series": [
    {
      "name": "冷凝器进水温度",
      "type": "line",
      "from": "S08",
      "data": [75, 75, 75, 75, 75, 75, 75]
    },
    {
      "name": "冷凝器出水温度",
      "type": "line",
      "from": "S09",
      "data": [25, 25, 25, 25, 25, 25, 25]
    }
  ],
  "xys": {
    "pos": [0, 0],
    "len": [8, 16]
  }
}
曲线示例图
Image - 曲线示例图

3.3.3. 表盘

{
  "type":"gauge",       //图表类型
  "attribute": "sta_AirSupplyPres",//标识符,用以获取图表更新数值,自定义,唯一
  "name": "供气压力",   //label显示的的名称
  "from":"马赛克id"
  "unit":"Mpa",   //数值单位
  "min": 0,       //最小值
  "max": 2,       //最大值
  "value":0.35,   //当前的显示值,变量,动态显示的值
  "steps":5,      //显示的分段数
  "color": "#67c23a", //刻度标记的颜色值,可空;区间颜色:[[0.6,"#91c7ae"],[1.6,"#63869e"],[2,"#c23531"]],数值为区间终点值
  "xys":{        //图表位置信息
    "pos":[0,2],  //图表开始位置,[0,0]开始
    "len":[2,2]   //所占大小([行,列]),[1,1]开始
  },
}

表盘示例代码

{
  "type": "gauge",
  "attribute": "gauge-01",
  "name": "供气压力",
  "from": "S01",
  "unit": "Mpa",
  "min": 0,
  "max": 2,
  "value": 0.35,
  "steps": 5,
  "color": [[0.6,"#3ec13e"],[1.6,"#127aed"],[2,"#fe013a"]],
  "xys": {
    "pos": [0, 0],
    "len": [5, 5]
  }
}
表盘示例图
Image - 表盘示例图

3.3.4. 地图

{
  "type":"bdMap",   //图表的类型
  "attribute": "sta_bdMap",//标识符,用以获取图表更新数值,自定义,唯一
  "name": "设备地图分布", //label显示的图表名称
  "centerPoint":{"long":"113.933782","lat":"22.582649"},//地图初始化的中心点经纬度
  "mapPoint":[      //标注点的集合 每项包括 经纬度,信息框字段可选。
    {"long":"113.933782","lat":"22.582649","infoWin":{"title":"智物联","imgPath":"/static/image/customer/test.png","desc":"智物联坐落在中国深圳市宝安区新安,是为工业物联网提供解决方案的公司"}}
  ],
  "xys":{         //图表位置信息
    "pos":[0,4],    //图表开始位置,[0,0]开始
    "len":[2,4]     //所占大小([行,列]),[1,1]开始
  },
}

地图示例代码

{
  "type":"bdMap",
  "attribute": "sta_bdMap",
  "name": "设备地图分布",
  "centerPoint":{"long":"113.933782","lat":"22.582649"},
  "mapPoint":[
    {"long":"113.933782","lat":"22.582649","infoWin":{"title":"智物联","imgPath":"/static/image/customer/test.png","desc":"工业物联网"}},
    {"long":"113.833782","lat":"22.682649","infoWin":{"title":"智物联","imgPath":"/static/image/customer/test.png","desc":"工业物联网"}}
  ],
  "xys":{
    "pos": [0,0], 
    "len": [8,16] 
  }
}
地图示例图
Image - 地图示例图

3.3.5. 柱状图

{
  "type":"bar",   //图表的类型
  "attribute": "bar_AirSupplyPres1",  //标识符,用以获取图表更新数值,自定义,唯一
  "name": "某站点用户访问来源",       //label显示的图表名称
  "statistics":{"type":"month","total":1},//统计属性
  "from":["马赛克id1","马赛克id2"], 
  "legendData": ["直接访问","间接访问"],  //图例显示的名称,对应下面的series中的每一项
  "xAxis":["周一","周二","周三","周四","周五","周六","周日"],
  "series":[
    {         //柱形图的构成数据对象,变量
      "name":"直接访问",
      "from":"马赛克id1",
      "data":[10, 52, 200, 334, 390, 330, 220]
    },
    {
      "name":"间接访问",
      "from":"马赛克id2",
      "data":[8, 60, 150, 300, 360, 380, 290]
    }
  ],
  "xys":{       //图表位置信息
    "pos":[2,4],  //图表开始位置,[0,0]开始
    "len":[1,2]   //所占大小([行,列]),[1,1]开始
  },
}

柱状图示例代码

{
  "type": "bar",
  "attribute": "bar_AirSupplyPres1",
  "name": "上月/本月产汽量(T)",
  "statistics":{"type":"month"},
  "from": ["EQ_ProduceSteam_type", "EQ_ProduceSteam_type"],
  "legendData": ["上月产汽量", "本月产汽量"],
  "xAxis": [],
  "series": [{
          "name": "上月产汽量",
          "from": "EQ_ProduceSteam_type",
          "data": []
      },
      {
          "name": "本月产汽量",
          "from": "EQ_ProduceSteam_type",
          "data": []
      }
  ],
  "xys": {
      "pos": [0, 0],
      "len": [6, 18]
  }
}
柱状图示例图
Image - 柱状图示例图

3.3.6. 饼状图

{
  "type":"pie",     //图表的类型
  "attribute": "pie_AirSupplyPres1",//标识符,用以获取图表更新数值,自定义,唯一
  "name": "某站点用户访问来源",     //label显示的图表名称
  "statistics":{"type":"month","total":1},//统计属性
  "legendData": ["直接访问","邮件营销","联盟广告","视频广告","搜索引擎"],//图例显示的名称,对应下面的series中的每一项
  "series":[
    {
      "data": [ //饼状图的构成数据,变量
        {"value":335, "name":"直接访问"},   
        {"value":310, "name":"邮件营销"},
        {"value":234, "name":"联盟广告"},
        {"value":135, "name":"视频广告"},
        {"value":1548, "name":"搜索引擎"}
      ]
    }
  ],
  "xys":{         //图表位置信息
    "pos":[0,0],    //图表开始位置,[0,0]开始
    "len":[1,2]     //所占大小([行,列]),[1,1]开始
  },
}

饼状图示例代码

{
  "type":"pie",
  "attribute": "pie_attribute01",
  "name": "设备地区分布图",
  "cumulative": { "id": [
    "EQ_OnePumpWorkingTime_taida",
    "EQ_TwoPumpWorkingTime_taida",
    "EQ_PowerConsumption_type",
    "EQ_FuelConsumption_type",
    "EQ_FeedWater_type",
    "EQ_ProduceSteam_type",
    "EQ_BurnerStartFrequency_taida",
    "EQ_TotalBoilerStartUpTime_taida"
  ],"type": "total" },
  "from": [
    "EQ_OnePumpWorkingTime_taida",
    "EQ_TwoPumpWorkingTime_taida",
    "EQ_PowerConsumption_type",
    "EQ_FuelConsumption_type",
    "EQ_FeedWater_type",
    "EQ_ProduceSteam_type",
    "EQ_BurnerStartFrequency_taida",
    "EQ_TotalBoilerStartUpTime_taida"
  ],
  "legendData": ["华东","华南","华中","华北","东北","西北","西南","其他"],
  "series":[
    {
      "data": [
        {"from":"EQ_OnePumpWorkingTime_taida","value":0, "name":"华东"},
        {"from":"EQ_TwoPumpWorkingTime_taida","value":0, "name":"华南"},
        {"from":"EQ_PowerConsumption_type","value":0, "name":"华中"},
        {"from":"EQ_FuelConsumption_type","value":0, "name":"华北"},
        {"from":"EQ_FeedWater_type","value":0, "name":"东北"},
        {"from":"EQ_ProduceSteam_type","value":0, "name":"西北"},
        {"from":"EQ_BurnerStartFrequency_taida","value":0, "name":"西南"},
        {"from":"EQ_TotalBoilerStartUpTime_taida","value":0, "name":"其他"}
      ]
    }
  ],
  "xys":{
    "pos":[0,0],
    "len":[5,5]
  }
}
饼状图示例图
Image - 饼状图示例图

3.3.7. 卡片

{
  "type":"card",    //图表类型
  "attribute": "sta_card11",//标识符,用以获取图表更新数值,自定义,唯一
  "fontColor":"#ffffff", //卡片字体颜色 ,需要则配置,不需要则不配置
  "backgroundColor":"#5387ff",    // 卡片背景色,需要则配置,不需要则不配置
  "cumulative":{"id":"electric"}  //对应itemData中项的id。
  "itemData":{  //若是多个,则使用[{},{}],的形式
    "id":"electric",
    "name":"吨气耗燃料",
    "unit":"T",
    "value":"0",
    "flag": {"0": "卸载", "1":"加载"}, //卡片显示状态文字类时使用,状态码对应表
  },
  "xys":{       //图表位置信息
    "pos":[0,5],  //图表开始位置,[0,0]开始
    "len":[1,1]   //所占大小([行,列]),[1,1]开始
  },
},

卡片示例代码

{
  "type": "card",
  "attribute": "sta_card01",
  "itemData": [
    {
      "id": "Z",
      "name": "锅炉运行状态",
      "unit": "",
      "value": "0",
      "flag": { "0": "停机", "1": "开机" }
    }
  ],
  "xys": {
    "pos": [ 0, 0 ],
    "len": [ 2, 3 ]
  }
}
卡片示例图
Image - 卡片示例图

3.3.8. 横向式卡片

{
  "type":"cardX",     //图表类型
  "attribute": "sta_cardX", //标识符,用以获取图表更新数值,自定义,唯一
  "fontColor":"#ffffff", //卡片字体颜色 ,需要则配置,不需要则不配置
  "backgroundColor":"#5387ff", // 卡片背景色,需要则配置,不需要则不配置
  "itemData":{          //若是多个,则使用[{},{}],的形式
    "id":"electric",
    "name":"吨气耗燃料",
    "unit":"T",
    "value":"0",
    "flag": {"0": "卸载", "1":"加载"}, //卡片显示状态文字类时使用,状态码对应表
  },
  "xys":{       //图表位置信息
    "pos":[0,5],  //图表开始位置,[0,0]开始
    "len":[1,1]   //所占大小([行,列]),[1,1]开始
  },
},

横向卡片示例代码

{
  "type": "cardX",
  "attribute": "sta_cardX01",
  "itemData": [
    {
      "id": "Z",
      "name": "锅炉运行状态",
      "unit": "",
      "value": "0",
      "flag": { "0": "停机", "1": "开机" }
    }
  ],
  "xys": {
    "pos": [ 0, 0 ],
    "len": [ 2, 4 ]
  }
}
横向卡片示例图
Image - 横向卡片示例图

3.3.9. 雷达图

{
   "type":"radar",    //图表的类型
   "attribute": "radar_deviceRadarMap", //标识符,用以获取图表更新数值,自定义,唯一
   "name": "预算 vs 开销",  //label显示的图表名称
   "legendData":["预算分配", "实际开销"],//图例显示的名称,对应下面的series中的每一项
   "indicator": [   //雷达图的指示器,用来指定雷达图中的多个变量
       { "name": "销售", "max": 6500},//name:显示的指示器名称,max:显示的指示器最大值
       { "name": "管理", "max": 16000},
       { "name": "信息技术", "max": 30000},
       { "name": "客服", "max": 38000},
       { "name": "研发", "max": 52000},
       { "name": "市场", "max": 25000}
     ],
   "seriesData": [  //雷达图的数据值,用来指定雷达图中显示值
        {"value" : [2300, 10000, 28000, 15000, 50000, 19000],"name" : "预算分配"}
    ],
    "xys":{
      "pos":[ 0, 0],
      "len":[ 5, 5]
    }
}

雷达图示例代码

{
  "type":"radar", 
  "attribute": "radar_deviceRadarMap",
  "name": "设备状态映像指数",
  "legendData":["设备状态映像指数"],
  "indicator": [
    { "name": "1#发电12线压", "max": 2000},
    { "name": "1#转速", "max": 100},
    { "name": "1#发电频率", "max": 100},
    { "name": "1#市线压1-2", "max": 100},
    { "name": "1#市电频率", "max": 100},
    { "name": "1#电池电压", "max": 1000},
    { "name": "1#D+(充电电压)", "max": 1000},
    { "name": "1#油压", "max": 100},
    { "name": "1#水温", "max": 100},
    { "name": "1#燃油阀", "max": 1000}
  ],
  "seriesData": [
    {"value" : [1500, 49.97, 49.94, 80.14, 90.06, 0, 391.41, 26.1, 27, 379.95],"name" : "设备状态映像指数"}
  ],
  "xys":{
    "pos":[ 0, 0],
    "len":[ 5, 5]
  }
}
雷达图示例图
Image - 雷达图示例图

3.3.10. 表格

{
  "type":"grid",      //图表的类型
  "attribute": "grid_AirSupplyPres0", //标识符,用以获取图表更新数值,自定义,唯一
  "name": "告警信息", //label显示的图表名称
  "init":false;      //true 是否需要通过请求初始化数据
  "url":"service",  // alarm  请求接口,目的是为了区分相同图表应该请求那里的数据进行填充。
  "method":"http",  //数据更新的方式
  "params":{"param1":"val1","param2":"val2"},
  "gridTitle": ["名称","时间","操作"],//图例显示的名称,对应下面的series中的每一项
  "gridData": [   //信息列表数据项
    ["机器警告信息1","2018-05-24","xxxx"],
    [{"link":"www.baidu.com","content":"机器告警信息1"},{"link":"www.baidu.com","content":"2018-05-24"},{"link":"www.baidu.com","content":"详情"}],
  ],
  "xys":{       //图表位置信息
    "pos":[2,0],  //图表开始位置,[0,0]开始
    "len":[2,4]   //所占大小([行,列]),[1,1]开始
  },
}

表格示例代码

{
  "type": "grid",
  "attribute": "grid_warning",
  "name": "故障报警",
  "params": { "name": "", "created": "" },
  "gridTitle": ["名称", "时间"],
  "gridData": [
    ["探针水位极低报警","2019-06-28 12:00:00"],
    ["超压控制器报警","2019-06-28 13:00:00"],
    ["低水位报警","2019-06-28 14:00:00"],
    ["高水位报警","2019-06-28 15:00:00"]
  ],
  "xys": {
    "pos": [0, 0],
    "len": [4, 5]
  }
}
表格示例图
Image - 表格示例图

3.3.11. 列表

{
  "type":"textData",                  //图表的类型
  "attribute": "grid_AirSupplyPres1", //标识符,用以获取图表更新数值,自定义,唯一
  "name": "某站点用户访问来源",         //label显示的图表名称
  "itemData":[        //表格显示的数据项,包括 标识符(id),值(value),名称(name) "unit":"单位"  flag: 状态码对应表
    {"id":"zhijiefangwen","value":335, "name":"直接访问","unit":"单位","flag": {"0": "卸载", "1":"加载"}},
    {"id":"youjianyingxiao","value":310, "name":"邮件营销","unit":"单位"},
    {"id":"lianmengguanggao","value":234, "name":"联盟广告","unit":"单位"},
    {"id":"shipinguanggao","value":135, "name":"视频广告","unit":"单位"},
    {"id":"sousuoyinqing","value":1548, "name":"搜索引擎","unit":"单位"}
  ],
  "xys":{        //图表位置信息
    "pos":[0,5],   //图表开始位置,[0,0]开始
    "len":[1,3]    //所占大小([行,列]),[1,1]开始
  },
}

列表示例代码

{
  "type": "textData",
  "attribute": "OperationParams0",
  "name": "辅机参数",
  "itemData": [
    {
      "id": "E14",
      "value": "0",
      "name": "1#泵输出",
      "unit": "",
      "flag": {  "0": "停止", "1": "运行" }
    },
    {
      "id": "E09",
      "value": "0",
      "name": "1#泵运行反馈",
      "unit": "",
      "flag": { "0": "停止",  "1": "运行" }
    },
    {
      "id": "S43",
      "value": "0",
      "name": "1#泵累计工作时间",
      "unit": "H"
    },
    {
      "id": "E15",
      "value": "0",
      "name": "2#泵输出",
      "unit": "",
      "flag": { "0": "停止", "1": "运行" }
    },
    {
      "id": "E10",
      "value": "0",
      "name": "2#泵运行反馈",
      "unit": "",
      "flag": { "0": "停止", "1": "运行" }
    },
    {
      "id": "S44",
      "value": "0",
      "name": "2#泵累计工作时间",
      "unit": "H"
    },
    {
      "id": "E20",
      "value": "0",
      "name": "冷凝泵输出",
      "unit": "",
      "flag": {  "0": "停止", "1": "运行" }
    },
    {
      "id": "S23",
      "value": "0",
      "name": "变频器输出频率",
      "unit": "Hz"
    },
    {
      "id": "S76",
      "value": "0",
      "name": "给水(泵后)压力",
      "unit": "MPa"
    }
  ],
  "xys":{
    "pos":[0,0],
    "len":[3,10]
  }
}
列表示例图
Image - 列表示例图

3.3.12. 组参数列表

{
    "type": "crewCard",//图表的类型
    "attribute": "crew_card",//标识符,用以获取图表更新数值,自定义,唯一
    "name": "机组1",    //标题名称
    "statusData": {
        "id": "Z",
        "name": "机组1状态",
        "flagCode": "0",  //状态码
        "flagColor": { "0": "#bacbe1", "1": "green" },  //状态码颜色对应表
        "flag": { "0": "停止", "1": "运行" }  //状态码对应表
    },
    "itemData": [
        { "id": "S10", "value": 0, "name": "主机电流B", "unit": "A" },
        { "id": "S22", "value": 0, "name": "风机电流B", "unit": "A" },
        { "id": "S20", "value": 0, "name": "前轴承温度", "unit": "℃" },
        { "id": "S34", "value": 0, "name": "油分压差", "unit": "Mpa" },
        { "id": "S11", "value": 0, "name": "主机电流C", "unit": "A" },
        { "id": "S23", "value": 0, "name": "风机电流C", "unit": "A" },
        { "id": "S24", "value": 0, "name": "电源电压", "unit": "V" }
    ],
    "xys": {            //图表位置信息
        "pos": [1, 0],  //图表开始位置,[0,0]开始
        "len": [2, 2]   //所占大小([行,列]),[1,1]开始
    }
}

组参数列表示例代码

{
  "type": "crewCard",
  "attribute": "crew_card",
  "name": "机组1",
  "statusData": {
      "id": "Z",
      "name": "机组1状态",
      "flagCode": "0",
      "flagColor": { "0": "#bacbe1", "1": "green" },
      "flag": { "0": "停止", "1": "运行" }
  },
  "itemData": [
      { "id": "S10", "value": 0, "name": "主机电流B", "unit": "A" },
      { "id": "S22", "value": 0, "name": "风机电流B", "unit": "A" },
      { "id": "S20", "value": 0, "name": "前轴承温度", "unit": "℃" },
      { "id": "S34", "value": 0, "name": "油分压差", "unit": "Mpa" },
      { "id": "S11", "value": 0, "name": "主机电流C", "unit": "A" },
      { "id": "S23", "value": 0, "name": "风机电流C", "unit": "A" },
      { "id": "S24", "value": 0, "name": "电源电压", "unit": "V" }
  ],
  "xys": {
      "pos": [0, 0],
      "len": [5, 4]
  }
}
组参数列表示例图
Image - 组参数列表示例图

3.3.13. 视频监控

{
    "type": "video",//图表的类型
    "attribute": "video_ys7",//标识符,用以获取图表更新数值,自定义,唯一
    "name": "机组1监控",//标题名称
    "platform":"ys7",//平台 {"ys7":"萤石云"}
    "videoSrc":{ //监控视频地址
      "rtmp" : "rtmp://rtmp.open.ys7.com/openlive/1f06045ec1ea4f0fb2f5a32bea1aecec",
      "http" : "http://hls.open.ys7.com/openlive/6887896824264f2482641888fa7813a6.m3u8"
    },
    "xys": {//图表位置信息
        "pos": [1, 0],//图表开始位置,[0,0]开始
        "len": [2, 2] //所占大小([行,列]),[1,1]开始
    }
}

视频监控示例代码

{
  "type": "video",
  "attribute": "video_ys7",
  "name": "机组1监控",
  "platform":"ys7",
  "videoSrc":{
    "rtmp" : "rtmp://rtmp.open.ys7.com/openlive/1f06045ec1ea4f0fb2f5a32bea1aecec",
    "http" : "http://hls.open.ys7.com/openlive/6887896824264f2482641888fa7813a6.m3u8"
  },
  "xys": {
      "pos": [0, 0],
      "len": [4, 6]
  }
}

视频监控示例图

© Mixlinker all right reserved,powered by Gitbook文件修订时间: 2019-11-13 19:54:53

results matching ""

    No results matching ""