From df4c9224339e80e7a33f95c7fc35c4bacb8417b5 Mon Sep 17 00:00:00 2001 From: wanggang <76527413@qq.com> Date: Thu, 23 Jul 2020 14:39:09 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E5=91=BD=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: 125452ce5a6a27e148e4105f4dc2ab23ab16c9b3 Former-commit-id: 3d9f27749bd3ffcb63e28523d0a620502ab61d7f --- projects/WebMVC/wwwroot/js/iot.js | 2 +- .../WebMVC/wwwroot/router/admin/command/edit.html | 12 ++++++------ .../wwwroot/router/shared/edit/selectlist.html | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/projects/WebMVC/wwwroot/js/iot.js b/projects/WebMVC/wwwroot/js/iot.js index 18bf8f63..e15d809c 100644 --- a/projects/WebMVC/wwwroot/js/iot.js +++ b/projects/WebMVC/wwwroot/js/iot.js @@ -99,7 +99,7 @@ deviceInfo['串口控制器'] = 'iot-serial-port'; function updateSelect(action, id, value) { var select = $('select#' + id); if (select.length) { - select.find("option[value!=null]").remove(); + select.find("option[value!='']").remove(); if (value) { var url = config.baseUrl + '/IoTCenter/Admin/Ajax/' + action + '?parentId='+ value; $.getJSON(url, function (data) { diff --git a/projects/WebMVC/wwwroot/router/admin/command/edit.html b/projects/WebMVC/wwwroot/router/admin/command/edit.html index ca668023..aa348f0c 100644 --- a/projects/WebMVC/wwwroot/router/admin/command/edit.html +++ b/projects/WebMVC/wwwroot/router/admin/command/edit.html @@ -100,7 +100,7 @@
@@ -109,7 +109,7 @@
-
+
@@ -126,7 +126,7 @@
@@ -340,7 +340,7 @@ }, getIrType: function () { var param = Enumerable.from(this.data.model.parameters).firstOrDefault(o => o.name === 'type'); - if (param) { + if (param && param.value) { return Enumerable.from(this.getIrTypeList()).firstOrDefault(o => o.value === param.value).text; } return null; @@ -402,7 +402,7 @@ watch: { 'data.model.apiId': function (val, oldVal) { var vm = this; - if ((oldVal === null || oldVal === 'null') && val && val !== 'null' && this.data.model.nodeId && this.data.model.deviceId) { + if (oldVal === null && val && val !== 'null' && this.data.model.nodeId && this.data.model.deviceId) { Vue.set(vm.data.data, vm.data.model.apiId, $('#apiId option:selected').text()); vm.errors = []; var url = this.path + 'Api?apiId=' + val + '&deviceId=' + this.data.model.deviceId; @@ -413,7 +413,7 @@ }); } else { - if (val === 'null') { + if (val === null) { vm.data.model.parameters = []; } } diff --git a/projects/WebMVC/wwwroot/router/shared/edit/selectlist.html b/projects/WebMVC/wwwroot/router/shared/edit/selectlist.html index 79ce468f..184b6108 100644 --- a/projects/WebMVC/wwwroot/router/shared/edit/selectlist.html +++ b/projects/WebMVC/wwwroot/router/shared/edit/selectlist.html @@ -1,7 +1,7 @@