Merge branch 'develop'

pull/117/head
13621160019@163.com 2021-12-30 19:13:22 +08:00
commit f443387e41
2 changed files with 6 additions and 2 deletions

View File

@ -183,12 +183,16 @@ app.controller('ModalAddPointCtrl', function($scope, $uibModalInstance) {
$scope.cancel = function() { $scope.cancel = function() {
$uibModalInstance.dismiss('cancel'); $uibModalInstance.dismiss('cancel');
}; };
$scope.$watch("point.object_type",function () {
$scope.point.is_virtual = false;
});
}); });
app.controller('ModalEditPointCtrl', function($scope, $uibModalInstance, params) { app.controller('ModalEditPointCtrl', function($scope, $uibModalInstance, params) {
$scope.operation = "SETTING.EDIT_POINT"; $scope.operation = "SETTING.EDIT_POINT";
$scope.point = params.point; $scope.point = params.point;
$scope.is_edit = true;
$scope.ok = function() { $scope.ok = function() {
$uibModalInstance.close($scope.point); $uibModalInstance.close($scope.point);
}; };

View File

@ -16,7 +16,7 @@
<div class="form-group"><label class="col-sm-4 control-label">{{'POINT.OBJECT_TYPE' | translate}}</label> <div class="form-group"><label class="col-sm-4 control-label">{{'POINT.OBJECT_TYPE' | translate}}</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select name="pointobject_type" ng-model="point.object_type" class="form-control m-b"> <select name="pointobject_type" ng-model="point.object_type" ng-disabled="is_edit" class="form-control m-b">
<option value="ENERGY_VALUE">ENERGY VALUE</option> <option value="ENERGY_VALUE">ENERGY VALUE</option>
<option value="ANALOG_VALUE">ANALOG VALUE</option> <option value="ANALOG_VALUE">ANALOG VALUE</option>
<option value="DIGITAL_VALUE">DIGITAL VALUE</option> <option value="DIGITAL_VALUE">DIGITAL VALUE</option>