diff --git a/labs/Teacher/TeacherExt/TeacherExt.csproj b/labs/Teacher/TeacherExt/TeacherExt.csproj index 1b2520e4..5e1577d4 100644 --- a/labs/Teacher/TeacherExt/TeacherExt.csproj +++ b/labs/Teacher/TeacherExt/TeacherExt.csproj @@ -5,7 +5,7 @@ true en true - 1.0.0.0-rc.4 + 1.0.0.0-rc.6 13a75881-1072-47ca-88e9-4d78bd678d65 diff --git a/labs/Teacher/TeacherExt/wwwroot/js/site.js b/labs/Teacher/TeacherExt/wwwroot/js/site.js index 581ece02..d76aa836 100644 --- a/labs/Teacher/TeacherExt/wwwroot/js/site.js +++ b/labs/Teacher/TeacherExt/wwwroot/js/site.js @@ -171,6 +171,7 @@ function InitControls() { if ($(this).attr('data-allow-input') === 'True') { $(this).select2({ tags: true, + maximumInputLength: 20, theme: "bootstrap4", language: "zh-CN", placeholder: '请选择', diff --git a/labs/Teacher/TeacherExt/wwwroot/js/update.js b/labs/Teacher/TeacherExt/wwwroot/js/update.js index 55a50b30..b19edae7 100644 --- a/labs/Teacher/TeacherExt/wwwroot/js/update.js +++ b/labs/Teacher/TeacherExt/wwwroot/js/update.js @@ -316,14 +316,14 @@ $('#WorkingTime').change(function () { try { var now = new Date(); var values = $(this).val().split('-'); - var year = values[0]; - var month = values[1]; - var day = values[2]; + var year = parseInt(values[0]); + var month = parseInt(values[1]); + var day = parseInt(values[2]); var years = now.getFullYear() - new Date(year, month, day).getFullYear(); $('#JobAgeYearDisplay').text(years); - var months = years * 12 + (now.getMonth()-month); + var months = years * 12 + (now.getMonth() + 1 - month); $('#JobAgeMonthDisplay').text(months); return; } catch (e) { diff --git a/labs/flink/java_demo/java_demo.iml b/labs/flink/java_demo/java_demo.iml deleted file mode 100644 index 78b2cc53..00000000 --- a/labs/flink/java_demo/java_demo.iml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/projects/IoTNode/DeviceServices/FBee/DeviceId.cs b/projects/IoTNode/DeviceServices/FBee/DeviceId.cs index 6f3ca751..84c0eb17 100644 --- a/projects/IoTNode/DeviceServices/FBee/DeviceId.cs +++ b/projects/IoTNode/DeviceServices/FBee/DeviceId.cs @@ -9,9 +9,9 @@ namespace IoTNode.DeviceServices.FBee static DeviceId() { List.Add(new DeviceId { RawDeviceId = 0x0002, Name = "开关", CategoryName = "照明", CategoryNumber = "30", Icon = "switch" }); - List.Add(new DeviceId { RawDeviceId = 0x0009, Name = "插座", CategoryName = "电器", CategoryNumber = "20", Icon = "socket" }); + List.Add(new DeviceId { RawDeviceId = 0x0009, Name = "智能插座", CategoryName = "电器", CategoryNumber = "20", Icon = "socket" }); List.Add(new DeviceId { RawDeviceId = 0x000a, Name = "门锁", CategoryName = "安防", CategoryNumber = "10", Icon = "door" }); - List.Add(new DeviceId { RawDeviceId = 0x0051, Name = "智能插座", CategoryName = "电器", CategoryNumber = "20", Icon = "socket" }); + List.Add(new DeviceId { RawDeviceId = 0x0051, Name = "计量插座", CategoryName = "电器", CategoryNumber = "20", Icon = "plug" }); List.Add(new DeviceId { RawDeviceId = 0x0106, Name = "光强检测器", CategoryName = "监测", CategoryNumber = "40", Icon = "light" }); List.Add(new DeviceId { RawDeviceId = 0x0163, Name = "红外转发器", CategoryName = "电器", CategoryNumber = "20", Icon = "control" }); List.Add(new DeviceId { RawDeviceId = 0x0202, Name = "窗帘电机", CategoryName = "电器", CategoryNumber = "20", Icon = "curtain" }); diff --git a/projects/IoTNode/DeviceServices/FBee/FBeeService.cs b/projects/IoTNode/DeviceServices/FBee/FBeeService.cs index d825bf60..0295c8a4 100644 --- a/projects/IoTNode/DeviceServices/FBee/FBeeService.cs +++ b/projects/IoTNode/DeviceServices/FBee/FBeeService.cs @@ -824,11 +824,11 @@ namespace IoTNode.DeviceServices.FBee private string GetPathByDeviceName(string deviceName) { - if (deviceName == "插座") + if (deviceName == "智能插座") { return "/Socket/"; } - else if (deviceName == "智能插座") + else if (deviceName == "计量插座") { return "/Socket/"; } diff --git a/projects/IoTNode/wwwroot/images/plug.svg b/projects/IoTNode/wwwroot/images/plug.svg new file mode 100644 index 00000000..11bbd4b8 --- /dev/null +++ b/projects/IoTNode/wwwroot/images/plug.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/projects/Platform/wwwroot/components/devices/camera.html b/projects/Platform/wwwroot/components/devices/camera.html new file mode 100644 index 00000000..63d9bea2 --- /dev/null +++ b/projects/Platform/wwwroot/components/devices/camera.html @@ -0,0 +1,264 @@ + + \ No newline at end of file diff --git a/projects/Platform/wwwroot/components/devices/plug.html b/projects/Platform/wwwroot/components/devices/plug.html new file mode 100644 index 00000000..291d104a --- /dev/null +++ b/projects/Platform/wwwroot/components/devices/plug.html @@ -0,0 +1,59 @@ + + \ No newline at end of file diff --git a/projects/Platform/wwwroot/components/devices/socket.html b/projects/Platform/wwwroot/components/devices/socket.html index 5a560f43..f6bec527 100644 --- a/projects/Platform/wwwroot/components/devices/socket.html +++ b/projects/Platform/wwwroot/components/devices/socket.html @@ -16,29 +16,11 @@
- - +
+ + 状态:{{status}} + +
@@ -59,15 +41,6 @@ computed: { status: function () { return getIoTDataValue(this.device, '状态') === '1' ? '开' : '关'; - }, - isSmart: function () { - return Enumerable.from(this.device.data).any(function (o) { return o.name === "电量"; }); - }, - electricity: function () { - return parseFloat(getIoTDataValue(this.device, '电量') || 0).toFixed(2); - }, - power: function () { - return parseFloat(getIoTDataValue(this.device, '功率') || 0).toFixed(2); } } }); diff --git a/projects/Platform/wwwroot/images/plug.svg b/projects/Platform/wwwroot/images/plug.svg new file mode 100644 index 00000000..11bbd4b8 --- /dev/null +++ b/projects/Platform/wwwroot/images/plug.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/projects/Platform/wwwroot/js/main.js b/projects/Platform/wwwroot/js/main.js index 0980fb2b..6ed3ce15 100644 --- a/projects/Platform/wwwroot/js/main.js +++ b/projects/Platform/wwwroot/js/main.js @@ -26,8 +26,10 @@ addVueComponents({ 'smoke', 'switch1', 'socket', + 'plug', 'curtain', 'door', + 'camera', ] });