diff --git a/projects/WebApp/wwwroot/js/iot.js b/projects/WebApp/wwwroot/js/iot.js index 1bcc977a..f426d294 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'] ? ' ' + data['unit']:''; + return data['value'] + ' ' + data['unit']; } return null; } @@ -92,4 +92,9 @@ Vue.component('iot-camera', function (resolve, reject) { axios.get("/pages/iot/device/camera.html").then(function (response) { resolve(parseModel(response)); }); +}); +Vue.component('iot-serial-port', function (resolve, reject) { + axios.get("/pages/iot/device/serial-port.html").then(function (response) { + resolve(parseModel(response)); + }); }); \ No newline at end of file diff --git a/projects/WebApp/wwwroot/pages/iot/device.html b/projects/WebApp/wwwroot/pages/iot/device.html index 823bfa25..b626c31b 100644 --- a/projects/WebApp/wwwroot/pages/iot/device.html +++ b/projects/WebApp/wwwroot/pages/iot/device.html @@ -17,6 +17,7 @@ + \ No newline at end of file diff --git a/projects/WebApp/wwwroot/pages/iot/device/color-light.html b/projects/WebApp/wwwroot/pages/iot/device/color-light.html index aca9885c..f7dc5057 100644 --- a/projects/WebApp/wwwroot/pages/iot/device/color-light.html +++ b/projects/WebApp/wwwroot/pages/iot/device/color-light.html @@ -8,13 +8,13 @@
-
+
- - - + + +
diff --git a/projects/WebApp/wwwroot/pages/iot/device/ir.html b/projects/WebApp/wwwroot/pages/iot/device/ir.html index 80464433..be964e8e 100644 --- a/projects/WebApp/wwwroot/pages/iot/device/ir.html +++ b/projects/WebApp/wwwroot/pages/iot/device/ir.html @@ -353,13 +353,30 @@
-
- - - - - - +
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+ 学习 + 测试 + 移除 +
diff --git a/projects/WebApp/wwwroot/pages/iot/device/serial-port.html b/projects/WebApp/wwwroot/pages/iot/device/serial-port.html new file mode 100644 index 00000000..2ae05a1a --- /dev/null +++ b/projects/WebApp/wwwroot/pages/iot/device/serial-port.html @@ -0,0 +1,245 @@ + + \ No newline at end of file diff --git a/projects/WebApp/wwwroot/pages/iot/node.html b/projects/WebApp/wwwroot/pages/iot/node.html index 9e336d66..300cedfd 100644 --- a/projects/WebApp/wwwroot/pages/iot/node.html +++ b/projects/WebApp/wwwroot/pages/iot/node.html @@ -68,6 +68,12 @@ + +
+
+ +
+