[{"__symbolic":"module","version":4,"metadata":{"BatchImportAlarmModalComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../../../../../../shared/configure-component-base","name":"ConfigureComponentBase","line":26,"character":52},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":21,"character":1},"arguments":[{"selector":"batch-import-alarm-modal","template":"<div bsModal id=\"batchImportAlarmModal\" #batchImportAlarmModal=\"bs-modal\" allow-drag class=\"modal fade\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"batchImportAlarmModal\" aria-hidden=\"true\" [config]=\"{backdrop: 'static'}\"> <div class=\"modal-dialog design-content-batch design-batch-import-alarm\"> <div class=\"modal-content fe-modal-container\"> <div class=\"modal-header fe-modal-header\"> <h4 class=\"fe-modal-header-title\"> <span>{{lc('BatchImport')}}</span> </h4> <div class=\"fe-modal-header-close\" aria-label=\"Close\" (click)=\"close()\">×</div> </div> <div class=\"modal-body\" style=\"padding: 25px\"> <div *ngIf=\"active\"> <div> <span class=\"tips-primary\">{{lc('ImportFromDataSource')}}{{lc('AlarmTable')}}</span> <span class=\"tips-secondary\">({{lc('GenerateAlarmNameWithDataSourceAlarmName')}})</span> </div> <div class=\"variable-transverse clearfix\"> <div class=\"variable-title\"> <i class=\"star\">*</i> {{lc('DataSourceName')}}: </div> <div class=\"variable-input\"> <select name=\"dataSourceName\" class=\"data-source-name-select\" #DataSourceName=\"ngModel\" [(ngModel)]=\"dataSourceId\" maxlength=\"20\" (change)=\"getRefAlarmsAndGroup()\" required> <option [ngValue]=\"undefined\" disabled selected>{{lc('PleaseSelect')}}</option> <option *ngFor=\"let dataSourceDto of dataSourceList\" [value]=\"dataSourceDto.id\"> {{dataSourceDto.displayName | ellipsis:12}}</option> </select> <validation-messages [formCtrl]=\"DataSourceName\"></validation-messages> </div> <button type=\"button\" class=\"fe-btn fe-btn-default fe-btn-save\" (click)=\"getRefAlarmsAndGroup()\" [disabled]=\"!dataSourceId\">{{l('Refresh')}}</button> </div> <div class=\"row search-condition\"> <div class=\"input-group col-md-4 col-xs-4\"> <input class=\"form-control var-form-control\" placeholder='{{lc(\"SearchAlarmName\")}}' type=\"text\" name=\"alarmName\" [(ngModel)]=\"refAlarmName\" (change)=\"onInputChange()\"> <span class=\"fa fa-search form-control-search\"></span> </div> <div class=\"input-group col-md-3 col-xs-3\"> <select class=\"form-control fc-Form\" style=\"padding: 0 1.25rem; height: 34px;\" name=\"groupName\" [(ngModel)]=\"selectedGroupName\" (change)=\"onGroupChange()\"> <option [ngValue]=\"undefined\" selected>{{lc(\"AllGroup\")}}</option> <option *ngFor=\"let group of groupNames\" [value]=\"group.groupName\"> {{group.groupName}} </option> </select> </div> </div> </div> <div class=\"primeng-datatable-container\" [busyIf]=\"primengTableHelper.isLoading\"> <p-table #dataTable (onLazyLoad)=\"getRecordsIfNeeds($event)\" [value]=\"primengTableHelper.records\" rows=\"{{primengTableHelper.defaultRecordsCountPerPage}}\" [paginator]=\"false\" [lazy]=\"true\" dataKey=\"id\" [scrollable]=\"true\" selectionMode=\"multiple\" [(selection)]=\"selectedRefAlarms\" ScrollWidth=\"100%\" [responsive]=\"primengTableHelper.isResponsive\"> <ng-template pTemplate=\"header\"> <tr> <th class=\"checkbox\" style=\"width: 50px;\"> <p-tableHeaderCheckbox></p-tableHeaderCheckbox> </th> <th class=\"col-md-2 col-xs-2\"> {{lc('AlarmNameG')}} </th> <th class=\"col-md-2 col-xs-2\"> {{lc('AlarmMessage')}} </th> <th class=\"col-md-2 col-xs-2\"> {{lc('AlarmRule')}} </th> <th class=\"col-md-2 col-xs-2\"> {{lc('Devices')}} </th> <th class=\"col-md-2 col-xs-2\"> {{lc('DataType')}} </th> <th class=\"col-md-2 col-xs-2\"> {{lc('Address')}} </th> </tr> </ng-template> <ng-template pTemplate=\"body\" let-record> <tr [pSelectableRow]=\"record\"> <td class=\"checkbox\" style=\"width: 50px;\"> <p-tableCheckbox [value]='record'></p-tableCheckbox> </td> <td> {{record.name}} </td> <td> {{record.alarmMessage}} </td> <td> {{formatConditionType(record)}} </td> <td> {{record.devAlias}} </td> <td> {{formatDataType(record.dataType, record.bitIndexEnabled)}} </td> <td> {{record.addressDescription}} </td> </tr> </ng-template> </p-table> <div class=\"primeng-no-data\" *ngIf=\"primengTableHelper.totalRecordsCount == 0\"> {{l('NoData')}} </div> <div class=\"primeng-paging-container clearfix\"> <p-paginator [rows]=\"primengTableHelper.defaultRecordsCountPerPage\" #paginator (onPageChange)=\"getRefAlarms($event)\" [totalRecords]=\"primengTableHelper.totalRecordsCount\" [rowsPerPageOptions]=\"primengTableHelper.predefinedRecordsCountPerPage\"> </p-paginator> <span class=\"total-records-count\"> {{l('TotalRecordsCount', primengTableHelper.totalRecordsCount)}} </span> </div> <div class='selected-monitoring-point-content clearfix' *ngIf=\"selectedRefAlarms && selectedRefAlarms.length\"> <div *ngFor=\"let alarm of selectedRefAlarms\" class='selected-monitoring-point clearfix'> <span>{{alarm.name}}</span> <i class=\"fcloud-cancel\" (click)='removeSelectedRefAlarm(alarm.id)'></i> </div> </div> </div> </div> <div class=\"fe-modal-footer clearfix\"> <div class=\"button-group\"> <button type=\"submit\" class=\"fe-btn fe-btn-default fe-btn-save\" [disabled]=\"!dataSourceId || primengTableHelper.totalRecordsCount === 0 || saving\" (click)=\"importAllRefAlarms()\"> {{lc('ImportAll')}} </button> <button type=\"submit\" class=\"fe-btn fe-btn-default fe-btn-save\" [disabled]=\"!selectedRefAlarms || selectedRefAlarms.length === 0 || saving\" (click)=\"importSelectedRefAlarms()\"> {{lc('ImportSelected')}} </button> <button [disabled]=\"saving\" type=\"button\" class=\"fe-btn fe-btn-default fe-btn-cancel-one\" (click)=\"close()\"> {{l('Cancel')}} </button> </div> </div> </div> </div> </div> <rename-alarm-choose-modal #renameAlarmChooseModalComponent [configureId]=\"configureId\" (importSuccessEvent)=\"close()\"></rename-alarm-choose-modal> ","styles":[".design-content-batch { .search-condition { margin-bottom: 10px; .input-group { padding-right: 0; } input, select { border-radius: 0; color: rgba(0, 0, 0, 0.3); } } .modal-dialog { min-width: 800px; .modal-header.fe-modal-header { border-bottom: 1px solid #f4f4f4; } } .tips-primary { font-size: 14px; color: #000; opacity: .6; margin-right: 10px; } .tips-secondary { font-size: 12px; margin-top: 3px; opacity: .3; } .variable-transverse { width: 484px; margin: 1rem 0; .variable-title, .variable-input { float: left; } .variable-title { line-height: 30px; text-align: right; padding-right: 20px; .star { color: red; } } .variable-input { width: 41%; input { width: 100%; height: 30px; } select { height: 30px; } .data-source-name-select { width: 100%; } .monitor-point-name-select { width: calc(100% - 31px); } .open-monitor-btn { height: 30px; width: 30px; background-color: white; border: 1px solid #b5c2ca; cursor: pointer; float: right; margin-left: 0; span { color: #3695FF; } } button[disabled] { border: 1px solid #C4C6CF; background-color: #F2F3F7; height: 30px; } } button { height: 30px; line-height: 30px; margin-left: 5px; } } .margin-right-15 { .var-btn:not(:last-child) { margin-right: 15px; } } .var-btn { display: inline-block; text-align: center; font-size: 14px; min-width: 80px; padding: 0 10px; transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out, -webkit-box-shadow .15s ease-in-out; } .var-btn:hover { cursor: pointer; } .var-btn-default { height: 34px; line-height: 34px; } .var-btn-save { color: white; background-color: #3695FF; border: 1px solid #3695ff; } .input-group { .form-control { padding-right: 16px; } .var-form-control { height: 32px; padding: 0 2rem 0 1.25rem; } .form-control-search { position: absolute; z-index: 4; right: 10px; display: block; width: 16px; height: 16px; line-height: 32px; text-align: center; pointer-events: none; color: #aaa; } } select:required:invalid { color: gray !important; } option[disabled] { display: none !important; } option { color: black !important; } .selected-monitoring-point-content { width: 100%; padding: 10px; background: #f2f3f8; margin-top: 10px; padding-bottom: 0px; } .selected-monitoring-point { height: 32px; line-height: 32px; padding: 0 12px; position: relative; float: left; background: #E2E4E8; margin-right: 10px; margin-bottom: 10px; span { float: left; margin-right: 5px; } .fcloud-cancel { float: left; line-height: 30px; color: #A0A2AD; cursor: pointer; } .fcloud-cancel:before { color: #A0A2AD; } } .fa.fcloud-remove.btn-remove { cursor: pointer; } select option { color: rgba(0, 0, 0, 0.6); } .checkbox { width: 31px; } .primeng-datatable-container{ height: calc(100% - 50px); .ui-table-resizable{ max-height: calc(100% - 50px); overflow-x: hidden; overflow-y: auto; } } } .design-batch-import-alarm { .variable-transverse .variable-title { text-align: left; display: inline; } .modal-content { border-radius: 0; width: 800px; } .modal-body { overflow-y: hidden; } .variable-transverse { width: 484px; margin: 1rem 0; } .variable-input{ width: 41%; display: inline-block; } .fe-modal-container select { width: 90%; height: 34px; } }"]}]}],"members":{"configureId":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":27,"character":5}}]}],"modal":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":28,"character":5},"arguments":["batchImportAlarmModal",{"static":false}]}]}],"renameAlarmChooseModalComponent":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":29,"character":5},"arguments":["renameAlarmChooseModalComponent",{"static":false}]}]}],"dataTable":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":30,"character":5},"arguments":["dataTable",{"static":true}]}]}],"paginator":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":31,"character":5},"arguments":["paginator",{"static":false}]}]}],"reFreshData":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":32,"character":5}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":43,"character":26},{"__symbolic":"reference","module":"../../../../../../shared/service-proxies/service-proxies","name":"DataSourceServiceProxy","line":44,"character":49},{"__symbolic":"reference","module":"../../../../../../shared/service-proxies/service-proxies","name":"FBoxAlarmRegistrationServiceProxy","line":45,"character":60},{"__symbolic":"reference","module":"../../../../../../shared/fbox/fbox/dataType.service","name":"DataTypeService","line":46,"character":42},{"__symbolic":"reference","module":"../../../../../../shared/service-proxies/service-proxies","name":"AlarmRegistrationsServiceProxy","line":47,"character":57}]}],"ngOnInit":[{"__symbolic":"method"}],"show":[{"__symbolic":"method"}],"getDataSourceNames":[{"__symbolic":"method"}],"initialDatas":[{"__symbolic":"method"}],"close":[{"__symbolic":"method"}],"getRecordsIfNeeds":[{"__symbolic":"method"}],"getRefAlarmsAndGroup":[{"__symbolic":"method"}],"onInputChange":[{"__symbolic":"method"}],"onGroupChange":[{"__symbolic":"method"}],"getRefAlarms":[{"__symbolic":"method"}],"getAlarmGroups":[{"__symbolic":"method"}],"formatConditionType":[{"__symbolic":"method"}],"convertCondition":[{"__symbolic":"method"}],"formatDataType":[{"__symbolic":"method"}],"removeSelectedRefAlarm":[{"__symbolic":"method"}],"importAllRefAlarms":[{"__symbolic":"method"}],"importSelectedRefAlarms":[{"__symbolic":"method"}],"checkRepeatBatchImportAlarm":[{"__symbolic":"method"}],"rowSelected":[{"__symbolic":"method"}]}}}}]