thingsboard 自定义html

<div fxFlex fxLayout="column"

style="height: 100%;" fxLayoutAlign="center stretch" id="bgImage">

<div fxFlex fxLayout="row"

*ngFor="let dataKeyData of data"

fxLayoutAlign="space-around center">

<div *ngIf="dataKeyData.data01>0">

{{dataKeyData.data01}}</div>

<div>{{dataKeyData.dataKey.label}}123:</div>

<div>

{{(dataKeyData.data0 && dataKeyData.data00) | date : 'yyyy-MM-dd HH:mm:ss' }}

</div>

<div>

{{dataKeyData.data01}}</div>

<div >

</div>

</div>

<div fxFlex fxLayout="row">

<div id="lfl">

{{data}}

</div>

</div>

<div fxFlex fxLayout="row">

</div>

</div>

var show;

var image;

self.onInit = function() {

self.ctx.$scope.data = self.ctx.defaultSubscription

.data;

show = 'true'

var bgImage = document.getElementById('bgImage')

bgImage.style.backgroundImage = "url('http://www.njatech.net:8082/enms/app_webs/core/programs/visualboard/images/c2r2_2.png')"

ctx.innerhtml = '213'

var lfl = document.getElementById('lfl')

var arr = self.ctx.$scope.data0.data0

var num = \[\]

for(var key in arr){

console.log(key,arrkey)

num.push(arrkey)

}

console.log('ctx==789==',typeof(arr),num1)

let div = document.querySelector('#lfl')

let div1 = document.querySelector('#lfl1')

div.style.backgroundImage = "url('http://www.njatech.net:8082/enms/app_webs/core/programs/visualboard/images/c2r2_4.png')"

}

self.onDataUpdated = function() {

self.ctx.detectChanges();

var arr = self.ctx.$scope.data0.data0

var num = \[\]

for(var key in arr){

console.log(key,arrkey)

num.push(arrkey)

}

console.log('ctx==789==',typeof(arr),num1)

let div = document.querySelector('#lfl')

var bgImage = document.getElementById('bgImage')

if (num1*1>10) {

console.log('zoule111')

div.style.backgroundImage = "url('http://www.njatech.net:8082/enms/app_webs/core/programs/visualboard/images/c2r2_1.png')"

bgImage.style.backgroundImage = "url('http://www.njatech.net:8082/enms/app_webs/core/programs/visualboard/images/c2r2_2.png')"

}else{

console.log('zoule')

div.style.backgroundImage = "url('http://www.njatech.net:8082/enms/app_webs/core/programs/visualboard/images/c2r2_3.png')"

bgImage.style.backgroundImage = "url('http://www.njatech.net:8082/enms/app_webs/core/programs/visualboard/images/c2r2_4.png')"

}

}

相关推荐
ps酷教程6 小时前
Jackson 解决没有无参构造函数的反序列化问题
java
NiceCloud喜云6 小时前
Opus 4.8 的 Effort Control 怎么选:Low 到 Max 五档策略
android·java·大数据·前端·c++·python·spring
wordbaby7 小时前
React Native + RNOH:跨页面数据回传的最佳实践与避坑指南
前端·react native
丷丩7 小时前
MapLibre GL JS第22课:查看本地GeoJSON
前端·javascript·map·mapbox·maplibre gl js
_日拱一卒7 小时前
LeetCode:994腐烂的橘子
java·数据结构·算法·leetcode·深度优先
隔窗听雨眠7 小时前
Nginx网关响应慢排查手记
java·服务器·nginx
智慧物业老杨8 小时前
智慧物业合同周期管理系统:从风险预警到智能交接的全流程数智化落地方案
java·人工智能·python
Front思8 小时前
AI前端工程师需要具备能力+
前端·人工智能·ai
源码宝8 小时前
MES系统源码:Java8 + SpringBoot2.7 + MySQL8 + Redis,后端源码清爽易扩展
java·后端·源码·springboot·mes系统·源码二开·mes源码
JAVA社区8 小时前
Java高级全套教程(十)—— SpringCloudAlibaba超详细实战详解
java·开发语言·spring cloud·面试·职场和发展