object_types is disabled when editing point

pull/107/head
Caozhenhui 2021-12-30 17:00:33 +08:00
parent 19597adc41
commit afd29bf8bc
2 changed files with 3 additions and 3 deletions

View File

@ -186,13 +186,13 @@ app.controller('ModalAddPointCtrl', function($scope, $uibModalInstance) {
$scope.$watch("point.object_type",function () {
$scope.point.is_virtual = false;
})
});
});
app.controller('ModalEditPointCtrl', function($scope, $uibModalInstance, params) {
$scope.operation = "SETTING.EDIT_POINT";
$scope.point = params.point;
$scope.is_edit = true;
$scope.ok = function() {
$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="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="ANALOG_VALUE">ANALOG VALUE</option>
<option value="DIGITAL_VALUE">DIGITAL VALUE</option>