diff --git a/projects/IoTCenter/wwwroot/images/device.png b/projects/IoTCenter/wwwroot/images/device.png new file mode 100644 index 00000000..e7dbf0f9 Binary files /dev/null and b/projects/IoTCenter/wwwroot/images/device.png differ diff --git a/projects/IoTCenter/wwwroot/images/light.png b/projects/IoTCenter/wwwroot/images/light.png index 6bdb5379..f7767dc9 100644 Binary files a/projects/IoTCenter/wwwroot/images/light.png and b/projects/IoTCenter/wwwroot/images/light.png differ diff --git a/projects/IoTCenter/wwwroot/images/node.png b/projects/IoTCenter/wwwroot/images/node.png new file mode 100644 index 00000000..5305b9ff Binary files /dev/null and b/projects/IoTCenter/wwwroot/images/node.png differ diff --git a/projects/WebApp/wwwroot/css/app.css b/projects/WebApp/wwwroot/css/app.css index b2572f08..5e74fcbf 100644 --- a/projects/WebApp/wwwroot/css/app.css +++ b/projects/WebApp/wwwroot/css/app.css @@ -767,16 +767,21 @@ img { .ir table,.ir .table { border-collapse: separate; - margin: 15px auto; - padding: 15px; + margin: 5px auto; + padding: 5px; border: 2px solid #ddd; border-radius: 15px; } .ir table td { - padding: 5px; + padding: 2px; text-align: center; } .ir .table button{ - margin:5px; - } \ No newline at end of file + margin:2px; + } +.weui-grid__icon { + width: 48px; + height: 48px; + margin: 0 auto; +} \ No newline at end of file diff --git a/projects/WebApp/wwwroot/js/iot.js b/projects/WebApp/wwwroot/js/iot.js index e9eb896e..72608416 100644 --- a/projects/WebApp/wwwroot/js/iot.js +++ b/projects/WebApp/wwwroot/js/iot.js @@ -22,7 +22,7 @@ function getDeviceDataUnit(device, name) { function getDeviceData(device, name) { var data = Enumerable.from(device.data).where(o => o.name === name).firstOrDefault(); if (data) { - return data['value'] + data['unit']; + return data['value'] + data['unit'] ? ' ' + data['unit']:''; } return null; } diff --git a/projects/WebApp/wwwroot/pages/home.html b/projects/WebApp/wwwroot/pages/home.html index 959c5f49..cbd187b6 100644 --- a/projects/WebApp/wwwroot/pages/home.html +++ b/projects/WebApp/wwwroot/pages/home.html @@ -4,22 +4,20 @@
设备
-智慧教室
-设备
+智慧教室
+
@@ -70,10 +69,10 @@
+
{{device.displayName}}
-
+
-
![]() ![]()
diff --git a/projects/WebApp/wwwroot/pages/iot/device/person.html b/projects/WebApp/wwwroot/pages/iot/device/person.html
index f191bd8b..22895abc 100644
--- a/projects/WebApp/wwwroot/pages/iot/device/person.html
+++ b/projects/WebApp/wwwroot/pages/iot/device/person.html
@@ -1,14 +1,14 @@
-
+
{{device.displayName}}
-
+
-
![]() ![]()
diff --git a/projects/WebApp/wwwroot/pages/iot/device/smoke.html b/projects/WebApp/wwwroot/pages/iot/device/smoke.html
index f191bd8b..8f36252c 100644
--- a/projects/WebApp/wwwroot/pages/iot/device/smoke.html
+++ b/projects/WebApp/wwwroot/pages/iot/device/smoke.html
@@ -1,12 +1,12 @@
-
+
{{device.displayName}}
-
+ ![]() 环境
-
-
-
+
- {{device.displayName}}
-
-
-
-
-
-
-
-
-
- ![]()
-
-
-
- 光照度:
-
- {{getDeviceDataAttr(device.number,'光照度','description')}}
-
-
- {{getDeviceDataAttr(device.number,'光照度','description')}}
-
- {{getDeviceDataAttr(device.number,'光照度','value')}}{{ getDeviceDataAttr(device.number,'光照度','unit')}}
-
-
-
+
-
-
-
+
- {{device.displayName}}
-
-
-
-
-
-
-
-
-
- ![]()
-
-
-
- 温度:
-
- {{getDeviceDataAttr(device.number,'温度','description')}}
-
-
- {{getDeviceDataAttr(device.number,'温度','description')}}
-
- {{getDeviceDataAttr(device.number,'温度','value')}}{{ getDeviceDataAttr(device.number,'温度','unit')}}
-
-
-
-
- 湿度:
-
- {{getDeviceDataAttr(device.number,'湿度','description')}}
-
-
- {{getDeviceDataAttr(device.number,'湿度','description')}}
-
- {{getDeviceDataAttr(device.number,'湿度','value')}}{{ getDeviceDataAttr(device.number,'湿度','unit')}}
-
-
-
+
-
-
-
+
- {{device.displayName}}
-
-
-
-
-
-
-
-
-
- ![]()
-
-
-
- 状态:
-
- {{getDeviceDataAttr(device.number,'状态','value')}}
-
-
- {{getDeviceDataAttr(device.number,'状态','value')}}
-
-
-
-
+
-
-
diff --git a/projects/WebApp/wwwroot/pages/iot/nodes.html b/projects/WebApp/wwwroot/pages/iot/nodes.html
index 7a0f467e..026eb221 100644
--- a/projects/WebApp/wwwroot/pages/iot/nodes.html
+++ b/projects/WebApp/wwwroot/pages/iot/nodes.html
@@ -4,14 +4,12 @@
-
+
- {{device.displayName}}
-
-
-
-
-
-
-
-
-
- ![]()
-
-
-
- 状态:
-
- {{getDeviceDataAttr(device.number,'状态','value')}}
-
-
- {{getDeviceDataAttr(device.number,'状态','value')}}
-
-
-
-
+
-
\ No newline at end of file
diff --git a/projects/WebApp/wwwroot/pages/iot/product.html b/projects/WebApp/wwwroot/pages/iot/product.html
index 902e4649..7aa9decc 100644
--- a/projects/WebApp/wwwroot/pages/iot/product.html
+++ b/projects/WebApp/wwwroot/pages/iot/product.html
@@ -4,16 +4,12 @@
-
+
-
- {{node.name}}({{node.count}}) -
+
+
+ {{node.name}}({{node.count}}) +
-
\ No newline at end of file
diff --git a/projects/WebApp/wwwroot/pages/iot/products.html b/projects/WebApp/wwwroot/pages/iot/products.html
index d4710d13..3b2b2ba6 100644
--- a/projects/WebApp/wwwroot/pages/iot/products.html
+++ b/projects/WebApp/wwwroot/pages/iot/products.html
@@ -4,14 +4,12 @@
-
-
+
-
- {{device.displayName}} -
+
+
+ {{device.displayName}} +
-
\ No newline at end of file
-
+
-
- {{product.name}}({{product.count}}) -
+
+
+ {{product.name}}({{product.count}}) + |