dbweb-common
Version:
用`yarn add dbweb-common`安装,不要忘记修改`angular.json`里的 `architect\build\options\assets`,加上
22,253 lines • 1.03 MB
JavaScript
import { CommonModule, registerLocaleData, formatDate } from '@angular/common';
import { Component, Inject, HostBinding, ViewChild, NgModule, Injectable, ɵɵdefineInjectable, ɵɵinject, EventEmitter, Input, Output, Directive, ViewEncapsulation, ContentChildren, ViewChildren, LOCALE_ID, Injector, INJECTOR, Optional, ElementRef, NO_ERRORS_SCHEMA, ChangeDetectorRef, Renderer2, HostListener, CUSTOM_ELEMENTS_SCHEMA, Pipe } from '@angular/core';
import { clearText, clearCategory, RouteElementService, SimpleReuseStrategy, ElementsService, ProjectService, CurrentService, AuthloginService, ApiService, eleSwitchDept, CoreModule, BillControllerService, AuthService, StoreService, ApplicationInited, ElementApiService, BillFieldDataType, BillOperate, BillBackfaceService, IsDuplicatePKError, SaveStateData, CurrentApiService, fullApiPath, Element } from 'dbweb-core';
import { MatDialogRef, MAT_DIALOG_DATA, MatDialogModule, MatButtonModule, MatDialog, MatFormFieldModule as MatFormFieldModule$1, MatInputModule as MatInputModule$1, MatSnackBar, MatIconRegistry as MatIconRegistry$1, MatFormField, MatCheckbox, MatIconModule as MatIconModule$1, MatSnackBarModule, MatCheckboxModule, MatSelectModule, MatRadioModule, MatTableModule, MatSlideToggleModule, MatButtonToggleModule, MatDividerModule as MatDividerModule$1, MatTooltipModule, MatAutocompleteModule, MatSidenavModule as MatSidenavModule$1, MatChipsModule, MatMenuModule as MatMenuModule$1, MatExpansionModule as MatExpansionModule$1, MatProgressSpinnerModule, MatTreeNestedDataSource as MatTreeNestedDataSource$1, MatTreeModule as MatTreeModule$1 } from '@angular/material';
import { moveItemInArray, DragDropModule, CdkDropListGroup, CdkDropList } from '@angular/cdk/drag-drop';
import { FormControl, Validators, FormsModule, ReactiveFormsModule, FormGroup, NgControl, FormControlName } from '@angular/forms';
import { MatBadgeModule } from '@angular/material/badge';
import { MatButtonModule as MatButtonModule$1 } from '@angular/material/button';
import { MatRippleModule } from '@angular/material/core';
import { MatDialogRef as MatDialogRef$1, MatDialogModule as MatDialogModule$1, MatDialog as MatDialog$1 } from '@angular/material/dialog';
import { MatDividerModule } from '@angular/material/divider';
import { MatIconModule, MatIconRegistry } from '@angular/material/icon';
import { MatMenuModule, MatMenuTrigger } from '@angular/material/menu';
import { MatSidenavModule } from '@angular/material/sidenav';
import { MatTab, MatTabsModule } from '@angular/material/tabs';
import { MatToolbarModule } from '@angular/material/toolbar';
import { MatTreeNestedDataSource, MatTreeModule } from '@angular/material/tree';
import { BrowserModule, Title, DomSanitizer } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { NavigationEnd, Router, RouterLink, RouterModule, RoutesRecognized } from '@angular/router';
import { ClipboardModule, ClipboardService } from 'ngx-clipboard';
import { trigger, transition, style, query, group, animate, state } from '@angular/animations';
import { map, filter, tap, startWith, catchError, take, debounceTime } from 'rxjs/operators';
import { BehaviorSubject, Subscription, forkJoin, of, throwError, Subject, from } from 'rxjs';
import { NestedTreeControl } from '@angular/cdk/tree';
import { MatInputModule } from '@angular/material/input';
import { MatFormFieldModule } from '@angular/material/form-field';
import localeZh from '@angular/common/locales/zh-Hans';
import * as pinyin_ from 'pinyin';
import pinyin___default, { } from 'pinyin';
import { AceEditorModule } from 'ng2-ace-editor';
import { v1 } from 'uuid';
import ace from 'ace-builds';
import { HttpErrorResponse, HttpEventType, HttpClient } from '@angular/common/http';
import { ViewportRuler, OverlayContainer } from '@angular/cdk/overlay';
import { Ng5SliderModule } from 'ng5-slider';
import { MatCheckboxModule as MatCheckboxModule$1 } from '@angular/material/checkbox';
import { MatExpansionModule } from '@angular/material/expansion';
import { MatProgressBarModule } from '@angular/material/progress-bar';
import { MatSelectModule as MatSelectModule$1 } from '@angular/material/select';
import { MatStepperModule } from '@angular/material/stepper';
import { MatTableModule as MatTableModule$1 } from '@angular/material/table';
import { CalendarDateFormatter, CalendarView, CalendarModule, DateAdapter } from 'angular-calendar';
import { adapterFactory } from 'angular-calendar/date-adapters/date-fns';
import { MatCardModule } from '@angular/material/card';
import { MatChipsModule as MatChipsModule$1 } from '@angular/material/chips';
import { MatGridListModule } from '@angular/material/grid-list';
import { MatTooltipModule as MatTooltipModule$1 } from '@angular/material/tooltip';
import { SelectionModel } from '@angular/cdk/collections';
import { MatSortModule } from '@angular/material/sort';
import { MatRadioModule as MatRadioModule$1 } from '@angular/material/radio';
import { MatSnackBar as MatSnackBar$1, MatSnackBarModule as MatSnackBarModule$1 } from '@angular/material/snack-bar';
import { Md5 } from 'ts-md5';
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class ConfirmDialogComponent {
/**
* @param {?} dialogRef
* @param {?} data
*/
constructor(dialogRef, data) {
this.dialogRef = dialogRef;
this.data = data;
this.hostClass = true;
}
/**
* @return {?}
*/
onNoClick() {
this.dialogRef.close();
}
/**
* @return {?}
*/
ngOnInit() {
this.removeView.nativeElement.parentElement.parentElement.style = 'padding:0px';
}
}
ConfirmDialogComponent.decorators = [
{ type: Component, args: [{
selector: 'common-confirm-dialog',
template: "<div #removeView class=\"\u5220\u9664\">\r\n\t<div class=\"tit\">\r\n\t\t\t<b >{{ data }}</b>\r\n\t</div>\r\n\t<div class=\"\u529F\u80FD\u6309\u94AE\">\r\n\t\t<button class=\"false-icon\" mat-button [mat-dialog-close]=\"false\">\u53D6\u6D88</button>\r\n\t\t<button class=\"true-icon\" color=\"primary\" mat-button [mat-dialog-close]=\"true\">\u786E\u5B9A</button>\r\n\t</div>\r\n</div>\r\n",
styles: ["@charset \"UTF-8\";.\u5220\u9664{position:relative;display:flex;justify-content:space-between;flex-direction:column;width:100%;height:100%;box-sizing:border-box;padding:24px 24px 16px}.\u5220\u9664 b{font-size:20px}.tit{display:flex;align-items:center;box-sizing:border-box;width:100%;height:104px}.\u529F\u80FD\u6309\u94AE{width:100%;box-sizing:border-box;text-align:right}.\u529F\u80FD\u6309\u94AE .mat-button{width:64px;height:32px}.\u529F\u80FD\u6309\u94AE .true-icon{margin-left:8px}"]
}] }
];
/** @nocollapse */
ConfirmDialogComponent.ctorParameters = () => [
{ type: MatDialogRef },
{ type: String, decorators: [{ type: Inject, args: [MAT_DIALOG_DATA,] }] }
];
ConfirmDialogComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.confirm-dialog-theme',] }],
removeView: [{ type: ViewChild, args: ['removeView', { static: true },] }]
};
if (false) {
/** @type {?} */
ConfirmDialogComponent.prototype.hostClass;
/** @type {?} */
ConfirmDialogComponent.prototype.removeView;
/** @type {?} */
ConfirmDialogComponent.prototype.dialogRef;
/** @type {?} */
ConfirmDialogComponent.prototype.data;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class ConfirmDialogModule {
}
ConfirmDialogModule.decorators = [
{ type: NgModule, args: [{
declarations: [ConfirmDialogComponent],
imports: [CommonModule, MatDialogModule, MatButtonModule],
exports: [ConfirmDialogComponent],
entryComponents: [ConfirmDialogComponent]
},] }
];
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
const CTRL_RECORDVIEW = 'recordview';
/** @type {?} */
const CTRL_INDEX = 'index';
/** @type {?} */
const CTRL_EXPORT = 'export';
/** @type {?} */
const CTRL_LOGIN = 'login';
/** @type {?} */
const CTRL_ELEMENT = 'element';
/** @type {?} */
const CTRL_VERSION = 'version';
/** @type {?} */
const CTRL_TASK = 'task';
/** @type {?} */
const CTRL_IMPORT = 'import';
/** @type {?} */
const CTRL_USERINFO = 'userinfo';
/** @type {?} */
const CTRL_UPDATE = 'update';
/** @type {?} */
const CTRL_ROLE = 'role';
/** @type {?} */
const CTRL_USER = 'user';
/** @type {?} */
const CTRL_NOTICE = 'notice';
/** @type {?} */
const CTRL_REMOVESEL = 'removesel';
/** @type {?} */
const CTRL_DUMP_INSTITUTION = 'dumpInstitution';
/** @type {?} */
const portraitDefault = '/front/assets/userinfo/portrait_default.png';
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @param {?} e
* @return {?}
*/
function label(e) {
if (e.Label) {
return clearText(e.Label);
}
return clearText(e.Name);
}
class HomeTabfunctionService {
/**
* @param {?} eles
*/
constructor(eles) {
this.eles = eles;
}
/**
* @return {?}
*/
get category() {
return this.eles.currentElementListen.pipe(map((/**
* @param {?} v
* @return {?}
*/
v => (v ? clearCategory(v.element.Category).replace('/', '>') + '>' + label(v.element) : null))));
}
}
HomeTabfunctionService.decorators = [
{ type: Injectable, args: [{
providedIn: 'root'
},] }
];
/** @nocollapse */
HomeTabfunctionService.ctorParameters = () => [
{ type: RouteElementService }
];
/** @nocollapse */ HomeTabfunctionService.ngInjectableDef = ɵɵdefineInjectable({ factory: function HomeTabfunctionService_Factory() { return new HomeTabfunctionService(ɵɵinject(RouteElementService)); }, token: HomeTabfunctionService, providedIn: "root" });
if (false) {
/** @type {?} */
HomeTabfunctionService.prototype.eles;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class Tab {
/**
* @param {?} state
*/
constructor(state) {
for (const key of Object.keys(state)) {
this[key] = state[key];
}
this.titleObservable = new BehaviorSubject(state.title);
}
/**
* @return {?}
*/
data() {
return {
url: this.url,
key: this.key,
title: this.title
};
}
}
if (false) {
/** @type {?} */
Tab.prototype.url;
/** @type {?} */
Tab.prototype.key;
/** @type {?} */
Tab.prototype.title;
/** @type {?} */
Tab.prototype.titleObservable;
}
class TabsService {
/**
* @param {?} router
* @param {?} eles
*/
constructor(router, eles) {
this.router = router;
this.eles = eles;
this.tabs = [];
}
// 激活一个tab,如果不存在,则新增并激活
/**
* @param {?} data
* @return {?}
*/
activeTab(data) {
/** @type {?} */
const find = this.tabs.findIndex((/**
* @param {?} v
* @return {?}
*/
v => v.key === data.key));
if (find === -1) {
this.tabs.push(new Tab(data));
this._activeIndex = this.tabs.length - 1;
}
else {
this._activeIndex = find;
// 同时需要更新url和title
this.tabs[this._activeIndex].url = data.url;
this.tabs[this._activeIndex].title = data.title;
}
}
// 删除指定序号的tab,并切换激活的tab,如果只有一个tab,则不能被删除
// 返回true指示激活页已经切换
/**
* @param {?} index
* @return {?}
*/
removeTab(index) {
if (this.tabs.length === 1) {
return false;
}
/** @type {?} */
const deleteURL = this.tabs[index].url.toString();
// 如果是关闭当前页面,则会引起路由变化,所以需要在导航结束事件中删除,因为导航过程中还会进行保存
if (index === this._activeIndex) {
/** @type {?} */
const sub = this.router.events.subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
if (v instanceof NavigationEnd) {
SimpleReuseStrategy.deleteRouteSnapshot(deleteURL);
sub.unsubscribe();
}
}));
}
else {
SimpleReuseStrategy.deleteRouteSnapshot(deleteURL);
}
this.tabs.splice(index, 1);
if (this._activeIndex === index) {
this._activeIndex = Math.min(this.tabs.length - 1, index);
return true;
}
if (this._activeIndex > index) {
this._activeIndex--;
}
return false;
}
// 删除所有的页,一般是logout
/**
* @return {?}
*/
clear() {
this.tabs.splice(0);
this._activeIndex = undefined;
SimpleReuseStrategy.clearRouteSnapshot();
}
// 关闭当前页,并自动导航到新的页
/**
* @return {?}
*/
close() {
if (this.activeIndex >= 0) {
/** @type {?} */
const idx = this.activeIndex;
if (this.tabs.length === 1) {
this.router.navigateByUrl(this.eles.frontElementURL(this.eles.indexElementName)).then((/**
* @return {?}
*/
() => {
this.removeTab(idx);
}));
}
if (this.removeTab(idx)) {
this.router.navigateByUrl(this.active.url, {
state: this.active.data()
});
}
}
}
/**
* @return {?}
*/
get active() {
if (this._activeIndex >= 0) {
return this.tabs[this._activeIndex];
}
return undefined;
}
/**
* @return {?}
*/
get activeIndex() {
return this._activeIndex;
}
/**
* @param {?} val
* @return {?}
*/
set activeIndex(val) {
this._activeIndex = val;
}
}
TabsService.decorators = [
{ type: Injectable, args: [{
providedIn: 'root'
},] }
];
/** @nocollapse */
TabsService.ctorParameters = () => [
{ type: Router },
{ type: ElementsService }
];
/** @nocollapse */ TabsService.ngInjectableDef = ɵɵdefineInjectable({ factory: function TabsService_Factory() { return new TabsService(ɵɵinject(Router), ɵɵinject(ElementsService)); }, token: TabsService, providedIn: "root" });
if (false) {
/** @type {?} */
TabsService.prototype.tabs;
/** @type {?} */
TabsService.prototype._activeIndex;
/**
* @type {?}
* @private
*/
TabsService.prototype.router;
/**
* @type {?}
* @private
*/
TabsService.prototype.eles;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class HomeComponent {
/**
* @param {?} routerEle
* @param {?} eles
* @param {?} tabFun
* @param {?} tabs
*/
constructor(routerEle, eles, tabFun, tabs) {
this.routerEle = routerEle;
this.eles = eles;
this.tabFun = tabFun;
this.tabs = tabs;
this.hostClass = true;
this.subs = [];
this.copystate = false;
this.subs.push(this.routerEle.currentElementListen
.pipe(filter((/**
* @param {?} ele
* @return {?}
*/
ele => ele && ele.element && ele.element.Controller !== CTRL_LOGIN)))
.subscribe((/**
* @param {?} ele
* @return {?}
*/
ele => {
/** @type {?} */
let state = (/** @type {?} */ (ele.state));
if (!state) {
/** @type {?} */
let key = ele.url;
/** @type {?} */
const arr = key.split('/');
// 功能类的,需要去除子路由作为key,防止出现多余的tab
if (!ele.element.Bill && arr.length > 5) {
key = arr.slice(0, 5).join('/');
// 需要处理query
/** @type {?} */
const queryArr = arr[arr.length - 1].split('?');
if (queryArr.length > 1) {
key += '?' + queryArr[1];
}
}
state = {
url: ele.urlObj,
key: key,
title: ele.element.title()
};
}
this.tabs.activeTab(state);
})));
this.category = this.tabFun.category;
}
/**
* @return {?}
*/
ngOnInit() { }
/**
* @return {?}
*/
ngOnDestroy() {
this.subs.forEach((/**
* @param {?} v
* @return {?}
*/
v => v.unsubscribe()));
}
}
HomeComponent.decorators = [
{ type: Component, args: [{
selector: 'common-home',
template: "<div class=\"home-container-nav\">\r\n\t<common-home-nav></common-home-nav>\r\n</div>\r\n<div class=\"home-container-content\">\r\n\t<div class=\"tab-all\">\r\n\t\t<app-router-tab #tabNav class=\"tabNav\">\r\n\t\t\t<app-router-tab-item\r\n\t\t\t\t*ngFor=\"let tab of tabs.tabs; let index = index\"\r\n\t\t\t\t[routerLink]=\"tab.url\" class=\"tabA\"\r\n\t\t\t\tlabel=\"{{ tab.titleObservable | async }}\">\r\n\t\t\t</app-router-tab-item>\r\n\t\t</app-router-tab>\r\n\t\t<div class=\"tab-nav-right\">\r\n\t\t\t<button mat-icon-button ngxClipboard [cbContent]=\"category | async\"\r\n\t\t\t\t(mousemove)=\"copystate = true\" (mouseout)=\"copystate = false\">\r\n\t\t\t\t<mat-icon class=\"\u590D\u5236\u56FE\u6807\" [class.\u590D\u5236\u60AC\u6D6E]=\"copystate\"\r\n\t\t\t\t\taria-label=\"\u590D\u5236\u7C7B\u522B\" svgIcon=\"content_copy\"></mat-icon>\r\n\t\t\t</button>\r\n\t\t\t<button mat-stroked-button class=\"\u8BED\u8A00\">Eng</button>\r\n\t\t</div>\r\n\t\t<div class=\"\u590D\u5236\u8DEF\u5F84\" [class.\u590D\u5236\u60AC\u6D6E\u72B6\u6001]=\"!copystate\">\r\n\t\t\t<span class=\"\u7C7B\u522B\">{{ category | async }}</span>\r\n\t\t</div>\r\n\t</div>\r\n\r\n\t<div class=\"content-home\" [@routerTransition]=\"tabs.activeIndex\">\r\n\t\t<core-router-outlet #outlet=\"coreRouterOutlet\"></core-router-outlet>\r\n\t</div>\r\n</div>",
animations: [
trigger('routerTransition', [
transition(':enter, * => -1', []),
transition(':increment', [
style({ position: 'relative', overflow: 'hidden' }),
query(':enter, :leave', style({ position: 'absolute', width: '100%', height: '100%' }), {
optional: true
}),
group([
query(':enter', [
style({ transform: 'translateX(-100%)' }),
animate('0.5s ease-in-out', style({ transform: 'translateX(0%)' }))
], { optional: true }),
query(':leave', [
style({ transform: 'translateX(0%)' }),
animate('0.5s ease-in-out', style({ transform: 'translateX(100%)' }))
], { optional: true })
])
]),
transition(':decrement', [
style({ position: 'relative', overflow: 'hidden' }),
query(':enter, :leave', style({ position: 'absolute', width: '100%', height: '100%' }), {
optional: true
}),
group([
query(':enter', [
style({ transform: 'translateX(100%)' }),
animate('0.5s ease-in-out', style({ transform: 'translateX(0%)' }))
], { optional: true }),
query(':leave', [
style({ transform: 'translateX(0%)' }),
animate('0.5s ease-in-out', style({ transform: 'translateX(-100%)' }))
], { optional: true })
])
])
])
],
styles: ["@charset \"UTF-8\";:host{width:100%;height:100%;padding:0;margin:0;display:flex;align-items:stretch}.home-container-nav{flex-shrink:0;z-index:10}.home-container-content{height:100%;display:flex;flex-direction:column;width:10%;flex-grow:1;flex-shrink:1}.home-container-content .tab-all{display:flex;height:30px}.home-container-content .tab-all .tabNav{width:10%;flex-grow:1;flex-shrink:1}.home-container-content .tab-all .tab-nav-right{height:30px;line-height:30px;font-size:12px;position:relative;display:block}.home-container-content .tab-all .tab-nav-right button{width:24px;height:24px;line-height:24px}.home-container-content .tab-all .tab-nav-right button .\u590D\u5236\u56FE\u6807{width:16px;height:16px;margin-bottom:6px}.home-container-content .tab-all .tab-nav-right .\u8BED\u8A00{font-size:12px;height:24px;width:64px;margin:0 8px;padding:0;line-height:20px;text-align:center}.home-container-content .\u590D\u5236\u8DEF\u5F84{height:32px;position:absolute;right:0;top:30px;font-size:12px;color:#fff;line-height:32px;border-radius:4px;padding:0 8px;z-index:9;text-align:center;background-color:rgba(0,0,0,.6);box-shadow:0 4px 8px 0 rgba(0,0,0,.14)}.home-container-content .\u590D\u5236\u60AC\u6D6E\u72B6\u6001{display:none}.home-container-content .content-home{width:100%;height:10%;box-sizing:border-box;flex-grow:1;flex-shrink:1}"]
}] }
];
/** @nocollapse */
HomeComponent.ctorParameters = () => [
{ type: RouteElementService },
{ type: RouteElementService },
{ type: HomeTabfunctionService },
{ type: TabsService }
];
HomeComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.c-home',] }],
tabNavs: [{ type: ViewChild, args: ['tabNav', { static: true },] }]
};
if (false) {
/** @type {?} */
HomeComponent.prototype.hostClass;
/** @type {?} */
HomeComponent.prototype.subs;
/** @type {?} */
HomeComponent.prototype.tabNavs;
/** @type {?} */
HomeComponent.prototype.category;
/** @type {?} */
HomeComponent.prototype.copystate;
/**
* @type {?}
* @private
*/
HomeComponent.prototype.routerEle;
/** @type {?} */
HomeComponent.prototype.eles;
/**
* @type {?}
* @private
*/
HomeComponent.prototype.tabFun;
/** @type {?} */
HomeComponent.prototype.tabs;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @param {?} val
* @return {?}
*/
function convertBoolean(val) {
return val === 'true';
}
class MainNavService {
constructor() {
this._navMin = new BehaviorSubject(convertBoolean(localStorage.getItem('main-nav-min')));
this.navMin = this._navMin.pipe(tap((/**
* @param {?} v
* @return {?}
*/
v => {
localStorage.setItem('main-nav-min', v ? 'true' : 'false');
})));
}
/**
* @param {?} val
* @return {?}
*/
setNavMin(val) {
this._navMin.next(val);
}
/**
* @return {?}
*/
getCurrent() {
return this._navMin.getValue();
}
}
MainNavService.decorators = [
{ type: Injectable, args: [{
providedIn: 'root'
},] }
];
/** @nocollapse */ MainNavService.ngInjectableDef = ɵɵdefineInjectable({ factory: function MainNavService_Factory() { return new MainNavService(); }, token: MainNavService, providedIn: "root" });
if (false) {
/**
* @type {?}
* @private
*/
MainNavService.prototype._navMin;
/** @type {?} */
MainNavService.prototype.navMin;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class NavtreeService {
// 图标
// get data(): NavItem[] {
// console.log(this.dataChange.value);
// return this.dataChange.value;
// }
/**
* @param {?} eles
* @param {?} project
*/
constructor(eles, project) {
this.eles = eles;
this.project = project;
this.root = { children: [] };
// dataChange = new BehaviorSubject<NavItem[]>([]);
this.icons = ['security', 'dns', 'gamepad']; // 图标
// this.initialize();
this.init();
for (let i = 0; i < Math.min(this.root.children.length, this.icons.length); i++) {
this.root.children[i].iconName = this.icons[i];
}
}
/**
* @return {?}
*/
init() {
// 设置项目图标
if (this.project.categoryIcons && this.project.categoryIcons.length > 0) {
this.icons = this.project.categoryIcons;
}
// 如果已经初始化过,则跳出
if (this.root.children.length > 0) {
return;
}
this.eles.getElesAsArray().forEach((/**
* @param {?} element
* @return {?}
*/
element => {
// 后端api或者子级工作元素的,不需要加入到node列表中
if (!element.NotMenu) {
this.addElement(element, this.root, element.Category.split('/'), 0, null, element.Icon);
}
}));
// console.log(this.root.children[0].iconName);
// console.log(this.root);
}
/**
* @private
* @param {?} str
* @return {?}
*/
clearText(str) {
if (str.search(/[0-9]{2}\./) > -1) {
return str.substr(3);
}
return str;
}
// 采用插入排序方法逐条插入
/**
* @private
* @param {?} ele
* @param {?} parent
* @param {?} paths
* @param {?} level
* @param {?} parents
* @param {?} iconName
* @return {?}
*/
addElement(ele, parent, paths, level, parents, iconName) {
if (paths.length === 0) {
// 实际插入的菜单项,也需要排序
/** @type {?} */
const idx = parent.children.findIndex((/**
* @param {?} item
* @return {?}
*/
item => (ele.Label || ele.Name).localeCompare(item.fullTitle || item.name) <= 0));
/** @type {?} */
const node = {
name: ele.Name,
fullTitle: ele.Label,
title: this.clearText(ele.Label || ele.Name),
url: this.eles.frontElementURL(ele.Name, decodeURI(ele.URL)),
level: level,
parent: parents,
iconName: iconName
};
if (idx === -1) {
parent.children.push(node);
}
else {
parent.children.splice(idx, 0, node);
}
return;
}
/** @type {?} */
const findIdx = parent.children.findIndex((/**
* @param {?} item
* @return {?}
*/
item => paths[0].localeCompare(item.name) <= 0));
/** @type {?} */
let categoryNode;
if (findIdx !== -1 && parent.children[findIdx].name === paths[0]) {
categoryNode = parent.children[findIdx];
}
else {
categoryNode = {
name: paths[0],
fullTitle: paths[0],
title: this.clearText(paths[0]),
level: level,
parent: parents,
iconName: iconName,
children: []
};
// 如果找不到,则说明比里面任何一个都大,则是追加到最后一个
if (findIdx === -1) {
parent.children.push(categoryNode);
}
else {
parent.children.splice(findIdx, 0, categoryNode);
}
}
this.addElement(ele, categoryNode, paths.slice(1), level + 1, categoryNode, iconName);
}
}
NavtreeService.decorators = [
{ type: Injectable }
];
/** @nocollapse */
NavtreeService.ctorParameters = () => [
{ type: ElementsService },
{ type: ProjectService }
];
if (false) {
/** @type {?} */
NavtreeService.prototype.root;
/** @type {?} */
NavtreeService.prototype.icons;
/**
* @type {?}
* @private
*/
NavtreeService.prototype.eles;
/**
* @type {?}
* @private
*/
NavtreeService.prototype.project;
}
class NavHome {
/**
* @param {?} current
* @param {?} database
* @param {?} prj
*/
constructor(current, database, prj) {
this.current = current;
this.database = database;
this.prj = prj;
this.chatMessages = [];
this.unread = null; // 未读信息数
// 未读信息数
this.openNodeCurrent = [];
this.activeNode = [];
this.subs = [];
}
/**
* @param {?} node
* @return {?}
*/
recursionFun(node) {
if (node.level <= 0) {
return this.openNodeCurrent.push(node);
}
if (node.level >= 1) {
this.openNodeCurrent.push(node);
this.recursionFun(node.parent);
}
}
/**
* @param {?} node
* @return {?}
*/
recursionFuns(node) {
if (node.level <= 0) {
return this.activeNode.push(node);
}
if (node.level >= 1) {
this.activeNode.push(node);
this.recursionFuns(node.parent);
}
}
/**
* @param {?} node
* @return {?}
*/
gradually(node) {
if (this.activeNode.length !== 0) {
this.activeNode.splice(0, this.activeNode.length);
}
this.recursionFuns(node);
}
/**
* @param {?} node
* @return {?}
*/
openNode(node) {
/** @type {?} */
const openboolean = this.openNodeCurrent.includes(node);
if (this.openNodeCurrent.length !== 0) {
this.openNodeCurrent.splice(0, this.openNodeCurrent.length);
}
if (openboolean) {
if (node.level >= 1) {
this.recursionFun(node.parent);
}
if (node.level === 0) {
this.recursionFun(this.database.root);
}
}
else {
this.recursionFun(node);
}
}
/**
* @return {?}
*/
messages() {
/** @type {?} */
const chatData = JSON.parse(this.prj.loadData('chatdata'));
if (chatData == null) {
this.prj.saveData('chatdata', JSON.stringify(this.chatMessages));
}
this.subs.push(this.current.wsChat.observable.subscribe((/**
* @param {?} n
* @return {?}
*/
n => {
this.chatMessages.push(n);
this.prj.saveData('chatdata', JSON.stringify(this.chatMessages));
if (n != null) {
this.unread = this.unread + 1;
}
// console.log(JSON.parse(localStorage.getItem('chatdata')));
}), (/**
* @param {?} err
* @return {?}
*/
err => console.log(err)), (/**
* @return {?}
*/
() => console.log('component'))));
this.chatMessages = chatData;
}
/**
* @param {?} item
* @return {?}
*/
fromChildFunc(item) {
if (this.activeNode.length !== 0) {
this.activeNode.splice(0, this.activeNode.length);
}
this.recursionFuns(item);
if (this.openNodeCurrent.length !== 0) {
this.openNodeCurrent.splice(0, this.openNodeCurrent.length);
}
this.recursionFun(item);
}
}
NavHome.decorators = [
{ type: Injectable }
];
/** @nocollapse */
NavHome.ctorParameters = () => [
{ type: CurrentService },
{ type: NavtreeService },
{ type: ProjectService }
];
if (false) {
/** @type {?} */
NavHome.prototype.portraitURL;
/** @type {?} */
NavHome.prototype.chatMessages;
/** @type {?} */
NavHome.prototype.messageBody;
/** @type {?} */
NavHome.prototype.unread;
/** @type {?} */
NavHome.prototype.openNodeCurrent;
/** @type {?} */
NavHome.prototype.activeNode;
/** @type {?} */
NavHome.prototype.subs;
/**
* @type {?}
* @private
*/
NavHome.prototype.current;
/**
* @type {?}
* @private
*/
NavHome.prototype.database;
/**
* @type {?}
* @private
*/
NavHome.prototype.prj;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class FileFlatNode {
/**
* @param {?} expandable
* @param {?} filename
* @param {?} level
* @param {?} type
*/
constructor(expandable, filename, level, type) {
this.expandable = expandable;
this.filename = filename;
this.level = level;
this.type = type;
}
}
if (false) {
/** @type {?} */
FileFlatNode.prototype.expandable;
/** @type {?} */
FileFlatNode.prototype.filename;
/** @type {?} */
FileFlatNode.prototype.level;
/** @type {?} */
FileFlatNode.prototype.type;
}
class HomeNavComponent {
/**
* @param {?} nav
* @param {?} current
* @param {?} eles
* @param {?} database
* @param {?} auth
* @param {?} routeEle
* @param {?} prj
* @param {?} navMain
* @param {?} router
* @param {?} tabs
*/
constructor(nav, current, eles, database, auth, routeEle, prj, navMain, router, tabs) {
this.nav = nav;
this.current = current;
this.eles = eles;
this.database = database;
this.auth = auth;
this.routeEle = routeEle;
this.prj = prj;
this.navMain = navMain;
this.router = router;
this.tabs = tabs;
// 是正常导航还是简略导航
this.isMinNav = true;
// 是否打开对话框
this.isOpenDialog = false;
this.navItems = [];
this._getChildren = (/**
* @param {?} node
* @return {?}
*/
(node) => node.children);
this.isMinNav = this.navMain.getCurrent();
this.navMain.navMin.subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
this.switchNavToMin(v);
}));
this.current.change$.subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
if (v && v.HeadPortrait) {
this.nav.portraitURL = v.portraitURL;
}
else {
this.nav.portraitURL = portraitDefault;
}
}));
}
/**
* @param {?} v
* @return {?}
*/
switchNavToMin(v) {
if (v === this.isMinNav) {
return;
}
setTimeout((/**
* @return {?}
*/
() => {
this.isMinNav = v;
}), 300);
if (v) {
this.maxNavContainer.nativeElement.style.width = '80px';
this.maxNavContainer.nativeElement.style.transition = 'all 0.3s';
}
else {
this.minNavContainer.nativeElement.style.width = '240px';
this.minNavContainer.nativeElement.style.transition = 'all 0.3s';
}
}
/**
* @return {?}
*/
ngOnInit() {
this.nestedTreeControl = new NestedTreeControl(this._getChildren);
this.nestedDataSource = new MatTreeNestedDataSource();
this.nestedDataSource.data = this.database.root.children;
// this.buttonHight();
this.navItems = this.nestedDataSource.data;
this.nav.subs.push(this.routeEle.currentElementListen.subscribe((/**
* @param {?} e
* @return {?}
*/
e => {
// 偶尔会出现e未null的情况,原因未探查,等有时间再改造
if (e && e.element) {
this.currentNode = null;
this.obtainNode(e.element.Name, this.navItems);
if (this.nav.activeNode.length !== 0 && this.currentNode !== null) {
this.nav.activeNode.splice(0, this.nav.activeNode.length);
}
if (this.nav.openNodeCurrent.length !== 0 && this.currentNode !== null) {
this.nav.openNodeCurrent.splice(0, this.nav.openNodeCurrent.length);
}
if (this.currentNode !== null) {
this.nav.recursionFuns(this.currentNode);
this.nav.recursionFun(this.currentNode);
}
}
})));
this.nav.messages();
}
/**
* @return {?}
*/
ngOnDestroy() {
this.nav.subs.forEach((/**
* @param {?} v
* @return {?}
*/
v => v.unsubscribe()));
}
/**
* @return {?}
*/
logout() {
this.router
.navigateByUrl('/login' + '/' + this.prj.apiNav()[0] + '/' + this.prj.apiNav()[1] + '/login')
.then((/**
* @return {?}
*/
() => {
// 必须要在路由切换之后,因为只有切换后,才会在reuse中存在,才能clear
this.tabs.clear(); // 一定要先清除所有的tab页面,用于取消订阅curr的变化
this.auth.logoutDefault().subscribe();
}));
}
/**
* @param {?} _
* @param {?} nodeData
* @return {?}
*/
hasNestedChild(_, nodeData) {
return !!nodeData.children && nodeData.children.length > 0;
}
// 对话框显示
/**
* @return {?}
*/
openDialog() {
this.isOpenDialog = true;
// this.unread = null;
setTimeout((/**
* @return {?}
*/
() => {
this.dialogScrolls();
}), 0);
}
/**
* @return {?}
*/
closeDialog() {
this.isOpenDialog = false;
}
// 获取当前节点的node
/**
* @param {?} title
* @param {?} navItems
* @return {?}
*/
obtainNode(title, navItems) {
for (let i = 0; i <= navItems.length - 1; i++) {
if (navItems[i].name === title) {
this.currentNode = navItems[i];
}
if (navItems[i].children !== undefined && this.currentNode == null) {
this.obtainNode(title, navItems[i].children);
}
}
}
/**
* @return {?}
*/
sendMessage() {
if (this.nav.messageBody) {
this.current.wsChat.next({
Creator: this.prj.Creator(),
Project: this.prj.Name(),
From: this.current.data.UserName,
Addr: '',
Time: null,
Data: this.nav.messageBody
});
this.nav.messageBody = '';
}
setTimeout((/**
* @return {?}
*/
() => {
this.dialogScrolls();
}), 0);
}
// 输入框的回车事件
/**
* @param {?} e
* @return {?}
*/
keyDown(e) {
/** @type {?} */
const ev = window.event || e;
// 13是键盘上面固定的回车键
if (ev.keyCode === 13) {
// 你要执行的方法
this.sendMessage();
}
}
// 将聊天窗口滚动条滚至最下方
/**
* @return {?}
*/
dialogScrolls() {
if (this.dialogScroll == null) {
return;
}
this.nav.unread = null;
this.dialogScroll.nativeElement.scrollTop = this.dialogScroll.nativeElement.scrollHeight;
}
// 判断是否已阅读最新消息
/**
* @return {?}
*/
isNews() {
/** @type {?} */
const isScrolledToBottom = this.dialogScroll.nativeElement.scrollHeight - this.dialogScroll.nativeElement.clientHeight <=
this.dialogScroll.nativeElement.scrollTop + 1;
if (isScrolledToBottom) {
this.nav.unread = null;
}
}
}
HomeNavComponent.decorators = [
{ type: Component, args: [{
selector: 'common-home-nav',
template: "<div *ngIf=\"!isMinNav\" #maxNavContainer class=\"max-nav-container nav-container\">\r\n\t<div class=\"nav-top\">\r\n\t\t<div class=\"nav-title\">\r\n\t\t\t<div class=\"nav-title-logo\"><img [src]=\"prj.logoImageURL()\" /></div>\r\n\t\t\t<div class=\"nav-title-name\">\r\n\t\t\t\t<p\r\n\t\t\t\t\t[ngClass]=\"{'projectLabelMin': prj.projectLabelForShort.length>6}\">\r\n\t\t\t\t\t{{ prj.projectLabelForShort }}</p>\r\n\t\t\t\t<common-nav-selection-dept [isMinNav]=\"isMinNav\">\r\n\t\t\t\t</common-nav-selection-dept>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<div (click)=\"switchNavToMin(!isMinNav)\" class=\"nav-switch\">\r\n\t\t\t<mat-icon svgIcon=\"chevron_left\"></mat-icon>\r\n\t\t</div>\r\n\t</div>\r\n\t<mat-divider class=\"nav-divider\"></mat-divider>\r\n\t<div class=\"\u5BFC\u822A\u6811\">\r\n\t\t<div class=\"slider slider-color\"></div>\r\n\t\t<mat-tree [dataSource]=\"nestedDataSource\" [treeControl]=\"nestedTreeControl\" class=\"example-tree\">\r\n\t\t\t<mat-tree-node *matTreeNodeDef=\"let node; index as i\" matTreeNodeToggle>\r\n\t\t\t\t<li (click)=\"nav.gradually(node)\" class=\"mat-tree-node\">\r\n\t\t\t\t\t<button [class.collapsed]=\"nav.activeNode.includes(node)\" [routerLink]=\"[node.url]\" mat-button\r\n\t\t\t\t\t\tclass=\"\u5BFC\u822A\u6309\u94AE\u60AC\u6D6E\u8272\">\r\n\t\t\t\t\t\t<mat-icon *ngIf=\"node.iconName\" class=\"menu-icon\" [svgIcon]=\"node.iconName\"></mat-icon>\r\n\t\t\t\t\t\t{{ node.title }}\r\n\t\t\t\t\t</button>\r\n\t\t\t\t</li>\r\n\t\t\t</mat-tree-node>\r\n\t\t\t<mat-nested-tree-node *matTreeNodeDef=\"let node; when: hasNestedChild; let i = index\" matTreeNodePadding>\r\n\t\t\t\t<div class=\"max-menu\" [class.\u5206\u652F\u80CC\u666F]=\"nav.openNodeCurrent.includes(node)\">\r\n\t\t\t\t\t<div *ngIf=\"node.level == 0\" [ngClass]=\"{\r\n\t\t\t\t\t\t\t'slider-color': nav.activeNode.includes(node),\r\n\t\t\t\t\t\t\t'max-left-slider': nav.activeNode.includes(node)\r\n\t\t\t\t\t\t}\"></div>\r\n\t\t\t\t\t<div class=\"mat-tree-node\">\r\n\t\t\t\t\t\t<button [class.collapsed]=\"nav.activeNode.includes(node)\" mat-button matTreeNodeToggle\r\n\t\t\t\t\t\t\t[attr.aria-label]=\"'toggle ' + node.title\" (click)=\"nav.openNode(node)\" class=\"\u5BFC\u822A\u6309\u94AE\u60AC\u6D6E\u8272\">\r\n\t\t\t\t\t\t\t<mat-icon *ngIf=\"node.level == 0\" svgIcon=\"{{ node.iconName }}\">\r\n\t\t\t\t\t\t\t</mat-icon>\r\n\t\t\t\t\t\t\t{{ node.title }}\r\n\t\t\t\t\t\t\t<mat-icon *ngIf=\"node.level != 0\" class=\"mat-icon-rtl-mirror\" svgIcon=\"{{\r\n\t\t\t\t\t\t\t\t\tnav.openNodeCurrent.includes(node)\r\n\t\t\t\t\t\t\t\t\t\t? 'expand_more'\r\n\t\t\t\t\t\t\t\t\t\t: 'chevron_right'\r\n\t\t\t\t\t\t\t\t}}\">\r\n\t\t\t\t\t\t\t</mat-icon>\r\n\t\t\t\t\t\t</button>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<ul [class.example-tree-invisible]=\"\r\n\t\t\t\t\t\t\t!nav.openNodeCurrent.includes(node)\r\n\t\t\t\t\t\t\">\r\n\t\t\t\t\t\t<ng-container matTreeNodeOutlet></ng-container>\r\n\t\t\t\t\t</ul>\r\n\t\t\t\t</div>\r\n\t\t\t</mat-nested-tree-node>\r\n\t\t</mat-tree>\r\n\t</div>\r\n\t<div class=\"nav-bottom\">\r\n\t\t<mat-divider class=\"nav-divider\"></mat-divider>\r\n\t\t<a class=\"nav-bottom-photo\" [routerLink]=\"eles.frontElementURL('userinfo')\">\r\n\t\t\t<div><img [src]=\"nav.portraitURL\" /></div>\r\n\t\t\t<p class=\"\u6635\u79F0\">{{ current.data.NickName || current.data.UserName}}</p>\r\n\t\t</a>\r\n\t\t<div class=\"nav-bottom-icon\">\r\n\t\t\t<div (click)=\"openDialog()\">\r\n\t\t\t\t<mat-icon matBadge=\"{{ nav.unread }}\" matBadgeColor=\"warn\" matBadgeSize=\"medium\" svgIcon=\"mail\">\r\n\t\t\t\t</mat-icon>\r\n\t\t\t\t<p>\u6D88\u606F</p>\r\n\t\t\t</div>\r\n\t\t\t<div (click)=\"logout()\">\r\n\t\t\t\t<mat-icon svgIcon=\"forward\"></mat-icon>\r\n\t\t\t\t<p>\u9000\u51FA</p>\r\n\t\t\t</div>\r\n\t\t\t<div>\r\n\t\t\t\t<mat-icon svgIcon=\"help\"></mat-icon>\r\n\t\t\t\t<p>\u5E2E\u52A9</p>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n\t<div *ngIf=\"isOpenDialog\" class=\"\u5BF9\u8BDD\u6846\">\r\n\t\t<div class=\"\u5BF9\u8BDD\u6846\u4E0A\u90E8\">\r\n\t\t\t<mat-icon (click)=\"closeDialog()\" svgIcon=\"expand_more\"></mat-icon>\r\n\t\t</div>\r\n\t\t<div #dialogScroll class=\"\u5BF9\u8BDD\u6846\u5185\u5BB9\">\r\n\t\t\t<p class=\"\u663E\u793A\u5BF9\u8BDD\" *ngFor=\"let message of nav.chatMessages\">\r\n\t\t\t\t[<span class=\"\u540D\u5B57\">{{ message.From }}</span>]\r\n\t\t\t\t<span class=\"\u65F6\u95F4\">{{\r\n\t\t\t\t\tmessage.Time | date: \"yyyy-MM-dd HH:mm:ss\"\r\n\t\t\t\t}}</span>\r\n\t\t\t\t<span class=\"\u5185\u5BB9\">{{ message.Data }}</span>\r\n\t\t\t</p>\r\n\t\t</div>\r\n\t\t<div class=\"\u5BF9\u8BDD\u6846\u5E95\u90E8\">\r\n\t\t\t<input mat-input class=\"\u8F93\u5165\u6846\" [(ngModel)]=\"nav.messageBody\" (keydown)=\"keyDown($event)\"\r\n\t\t\t\tplaceholder=\"\u8F93\u5165\u5185\u5BB9,\u56DE\u8F66\u53D1\u9001\" />\r\n\t\t\t<mat-icon (click)=\"sendMessage()\" svgIcon=\"send\"></mat-icon>\r\n\t\t</div>\r\n\t</div>\r\n</div>\r\n<div *ngIf=\"isMinNav\" #minNavContainer class=\"min-nav-container nav-container\">\r\n\t<div class=\"min-logo\"><img [src]=\"prj.logoImageURL()\" /></div>\r\n\t<div>\r\n\t\t<common-nav-selection-dept [isMinNav]=\"isMinNav\">\r\n\t\t</common-nav-selection-dept>\r\n\t\t<mat-divider class=\"nav-divider\"></mat-divider>\r\n\t</div>\r\n\t<div class=\"\u5BFC\u822A\u6811\u5C0F\">\r\n\t\t<div class=\"min-slider slider-color\"></div>\r\n\t\t<div class=\"\u83DC\u5355\u9879\" *ngFor=\"let item of navItems; index as i\" [class.\u5F53\u524D\u83DC\u5355\u9879]=\"nav.activeNode.includes(item)\">\r\n\t\t\t<div [ngClass]=\"{\r\n\t\t\t\t\t'slider-color': nav.activeNode.includes(item),\r\n\t\t\t\t\t'left-slider': nav.activeNode.includes(item)\r\n\t\t\t\t}\"></div>\r\n\t\t\t<!-- Handle branch node buttons here -->\r\n\t\t\t<div *ngIf=\"item.children && item.children.length > 0\">\r\n\t\t\t\t<button mat-button class=\"\u5BFC\u822A\u6309\u94AE\u60AC\u6D6E\u8272\" [class.collapsed]=\"nav.activeNode.includes(item)\"\r\n\t\t\t\t\t[matMenuTriggerFor]=\"menu.childMenu\">\r\n\t\t\t\t\t<mat-icon svgIcon=\"{{ item.iconName }}\"></mat-icon>\r\n\t\t\t\t\t{{ item.title }}\r\n\t\t\t\t</button>\r\n\t\t\t\t<common-menu [class.treebranch]=\"true\" #menu [items]=\"item.children\" [activeNode]=\"nav.activeNode\"\r\n\t\t\t\t\t(fromChild)=\"nav.fromChildFunc($event)\"></common-menu>\r\n\t\t\t</div>\r\n\t\t\t<!-- Leaf node buttons here -->\r\n\t\t\t<div *ngIf=\"!item.children || item.children.length === 0\">\r\n\t\t\t\t<button mat-button class=\"\u5BFC\u822A\u6309\u94AE\u60AC\u6D6E\u8272\">\r\n\t\t\t\t\t<mat-icon svgIcon=\"{{ item.iconName }}\"></mat-icon>\r\n\t\t\t\t\t{{ item.title }}\r\n\t\t\t\t</button>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n\t<div class=\"\u5BFC\u822A\u5E95\u90E8\u5C0F\">\r\n\t\t<mat-divider class=\"nav-divider\"></mat-divider>\r\n\t\t<button (click)=\"switchNavToMin(!isMinNav)\" mat-button>\r\n\t\t\t<mat-icon svgIcon=\"chevron_right\"></mat-icon>\u5C55\u5F00\r\n\t\t</button>\r\n\t\t<a class=\"nav-bottom-photo\" [routerLink]=\"eles.frontElementURL('userinfo')\">\r\n\t\t\t<div class=\"nav-bottom-photo-img\"><img [src]=\"nav.portraitURL\" /></div>\r\n\t\t\t<p class=\"\u6635\u79F0\">{{ current.data.NickName||current.data.UserName }}</p>\r\n\t\t</a>\r\n\t</div>\r\n</div>",
providers: [NavtreeService, NavHome],
styles: ["@charset \"UTF-8\";.max-nav-container{width:240px;height:100%;margin:0;padding:0;display:flex;flex-direction:column}.nav-top{width:100%;height:72px;display:flex;align-items:center;position:relative}.nav-top .nav-title{width:216px;height:48px;padding:0 8px 0 16px;display:flex}.nav-top .nav-title-logo{width:48px;height:48px}.nav-top .nav-title-logo img{width:100%;height:100%}.nav-top .nav-title-name{flex-grow:1;vertical-align:top;margin-left:8px;letter-spacing:1px}.nav-top .nav-title-name p{font-size:18px;width:100%;font-weight:700;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nav-top .nav-title-name .projectLabelMin{font-size:14px}.nav-top .nav-switch{width:32px;height:32px;border-radius:16px 0 0 16px;background-color:rgba(255,255,255,.2);position:absolute;right:0;bottom:4px}.nav-top .nav-switch .mat-icon{margin:4px;cursor:pointer}.nav-divider{z-index:2}.nav-menu-item{font-size:14px;height:32px;line-height:32px}.nav-bottom{margin:0;width:100%;height:98px}.nav-bottom .nav-bottom-photo{margin:16px 8px 0 12px}.nav-bottom .nav-bottom-icon{float:right;width:116px;height:46px;margin:28px 19px 0 0;display:flex;flex-direction:row;justify-content:space-between}.nav-bottom .nav-bottom-icon div{height:100%;cursor:pointer}.nav-bottom .nav-bottom-icon div p{margin:0;font-size:12px;line-height:18px;opacity:.6}.nav-bottom-photo{width:80px;display:inline-block;text-align:center}.nav-bottom-photo div{width:40px;height:40px;border-radius:50%;margin:0 auto;background:url(/front/assets/home/portrait_default.png);overflow:hidden}.nav-bottom-photo div img{width:100%;height:100%}.nav-bottom-photo p{font-size:12px;margin-top:5px;text-align:center;color:#fff;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.example-tree-invisible{display:none}.\u5BFC\u822A\u6811{flex-grow:1;overflow:auto;font-size:20px}.\u5BFC\u822A\u6811 .slider{width:2px;height:48px;display:none}.\u5BFC\u822A\u6811::-webkit-scrollbar-track{background-color:rgba(255,255,255,.06)}.\u5BFC\u822A\u6811::-webkit-scrollbar-track:hover{background-color:rgba(255,255,255,.12)}.\u5BFC\u822A\u6811::-webkit-scrollbar-thumb{background-color:#5e5e5e}.\u5BFC\u822A\u6811::-webkit-scrollbar-thumb:hover{background-color:silver}.\u5BFC\u822A\u6811 .example-tree li,.\u5BFC\u822A\u6811 .example-tree ul{margin-top:0;margin-bottom:0;list-style-type:none}.\u5BFC\u822A\u6811 .example-tree ul{padding-left:20px}.\u5BFC\u822A\u6811 .max-left-slider{width:2px;height:48px;float:left}.\u5BFC\u822A\u6811 .mat-tree-node button{font-size:16px}.\u5BFC\u822A\u6811 .\u7B2C\u4E09\u7EA7\u6ED1\u5757{width:2px;height:48px;background-color:rgba(255,255,255,.6);float:left}.\u5BFC\u822A\u6811 .mat-icon-rtl-mirror{float:right;margin:8px}.\u5BF9\u8BDD\u6846{width:240px;height:328px;background-color:#121212;position:absolute;left:0;bottom:2px;z-index:2;display:flex;flex-direction:column}.\u5BF9\u8BDD\u6846 .mat-icon{float:right;cursor:pointer}.\u5BF9\u8BDD\u6846\u5E95\u90E8 .\u8F93\u5165\u6846{width:184px;height:32px;box-sizing:border-box;border-radius:16px;padding:0 15px;margin:0 8px;line-height:30px;background-color:rgba(255,255,255,.36);border:0;outline:0;color:rgba(0,0,0,.87)}.\u5BF9\u8BDD\u6846\u5E95\u90E8 .\u8F93\u5165\u6846::-webkit-input-placeholder{color:rgba(0,0,0,.38)}.\u5BF9\u8BDD\u6846\u5E95\u90E8 .mat-icon{margin:4px 8px 4px 0;color:#ff9f1c}.\u5BF9\u8BDD\u6846\u5185\u5BB9{flex-grow:1;overflow-y:auto}.\u5BF9\u8BDD\u6846\u5185\u5BB9::-webkit-scrollbar{width:4px;height:4px;border-radius:2px}.\u5BF9\u8BDD\u6846\u5185\u5BB9::-webkit-scrollbar-track{border-radius:2px;background-color:rgba(255,255,255,.12)}.\u5BF9\u8BDD\u6846\u5185\u5BB9::-webkit-scrollbar-thumb{border-radius:2px;box-shadow:inset 0 2px 6px rgba(0,0,0,.3);background-color:#919191}.\u5BF9\u8BDD\u6846\u5185\u5BB9 .\u663E\u793A\u5BF9\u8BDD{width:90%;padding:0 5%;font-size:12px;color:#7ed321}.\u5BF9\u8BDD\u6846\u5185\u5BB9 .\u663E\u793A\u5BF9\u8BDD .\u65F6\u95F4{font-size:12px;color:rgba(255,255,255,.38);float:right;vertical-align:bottom}.\u5BF9\u8BDD\u6846\u5185\u5BB9 .\u663E\u793A\u5BF9\u8BDD .\u540D\u5B57{display:inline-block;max-width:108px;font-size:12px;color:#7ed321;vertical-align:bottom;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.\u5BF9\u8BDD\u6846\u5185\u5BB9 .\u663E\u793A\u5BF9\u8BDD .\u5185\u5BB9{display:block;font-size:12px;color:#fff;flex-grow:1;letter-spacing:.75px}.min-nav-container{width:80px;height:100%;margin:0;padding:12px 0 0;box-sizing:border-box;display:flex;flex-direction:column}.min-logo{width:40px;height:40px;margin:0 auto}.min-logo img{width:100%;height:100%}.\u5BFC\u822A\u6811\u5C0F{flex-grow:1;overflow-y:auto;overflow-x:hidden}.\u5BFC\u822A\u6811\u5C0F .min-slider{width:2px;height:80px;display:none}.\u5BFC\u822A\u6811\u5C0F .left-slider{width:2px;height:80px;position:absolute;left:0;top:0;z-index:99}.\u5BFC\u822A\u6811\u5C0F .mat-button{width:78px;text-align:center;padding:10px 0 10px 2px;margin:0}.\u5BFC\u822A\u6811\u5C0F .mat-icon{margin:0 auto;text-align:center;display:block}.\u5BFC\u822A\u6811\u5C0F .\u83DC\u5355\u9879{margin:4px 0;padding:0;height:80px;position:relative}.\u5BFC\u822A\u6811\u5C0F .\u5F53\u524D\u83DC\u5355\u9879{background-color:#252525}.\u5BFC\u822A\u5E95\u90E8\u5C0F{width:80px;flex-shrink:0;text-align:center;font-size:12px}.\u5BFC\u822A\u5E95\u90E8\u5C0F p{margin:8px 0}.\u5BFC\u822A\u5E95\u90E8\u5C0F .mat-icon{display:block;text-align:center;margin:0 auto;color:#fff}.\u5BFC\u822A\u5E95\u90E8\u5C0F button{width:80px;margin:8px 0 24px;font-size:12px;color:rgba(255,255,255,.6)}.\u5BFC\u822A\u5E95\u90E8\u5C0F .nav-bottom-photo-img{width:24px;height:24px}.treebranch{width:0}.\u5BFC\u822A\u6309\u94AE\u60AC\u6D6E\u8272::ng-deep .mat-button-focus-overlay{background-color:#fff}"]
}] }
];
/** @nocollapse */
HomeNavComponent.ctorParameters = () => [
{ type: NavHome },
{ type: CurrentService },
{ type: ElementsService },
{ type: NavtreeService },
{ type: AuthloginService },
{ type: RouteElementService },
{ type: ProjectService },
{ type: MainNavService },
{ type: Router },
{ type: TabsService }
];
HomeNavComponent.propDecorators = {
dialogScroll: [{ type: ViewChild, args: ['dialogScroll', { static: false },] }],
maxNavContainer: [{ type: ViewChild, args: ['maxNavContainer', { static: false },] }],
minNavContainer: [{ type: ViewChild, args: ['minNavContainer', { static: false },] }]
};
if (false) {
/** @type {?} */
HomeNavComponent.prototype.dialogScroll;
/** @type {?} */
HomeNavComponent.prototype.maxNavContainer;
/** @type {?} */
HomeNavComponent.prototype.minNavContainer;
/** @type {?} */
HomeNavComponent.prototype.isMinNav;
/** @type {?} */
HomeNavComponent.prototype.isOpenDialog;
/** @type {?} */
HomeNavComponent.prototype.nestedTreeControl;
/** @type {?} */
HomeNavComponent.prototype.nestedDataSource;
/** @type {?} */
HomeNavComponent.prototype.treeControl;
/** @type {?} */
HomeNavComponent.prototype.treeFlattener;
/** @type {?} */
HomeNavComponent.prototype.dataSource;
/** @type {?} */
HomeNavComponent.prototype.currentNode;
/** @type {?} */
HomeNavComponent.prototype.navItems;
/** @type {?} */
HomeNavComponent.prototype.chatObservable;
/** @type {?} */
HomeNavComponent.prototype._getChildren;
/** @type {?} */
HomeNavComponent.prototype.nav;
/** @type {?} */
HomeNavComponent.prototype.current;
/** @type {?} */
HomeNavComponent.prototype.eles;
/** @type {?} */
HomeNavComponent.prototype.database;
/**
* @type {?}
* @private
*/
HomeNavComponent.prototype.auth;
/**
* @type {?}
* @private
*/
HomeNavComponent.prototype.routeEle;
/** @type {?} */
HomeNavComponent.prototype.prj;
/** @type {?} */
HomeNavComponent.prototype.navMain;
/**
* @type {?}
* @private
*/
HomeNavComponent.prototype.router;
/**
* @type {?}
* @private
*/
HomeNavComponent.prototype.tabs;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class MenuComponent {
constructor() {
this.fromChild = new EventEmitter();
}
/**
* @return {?}
*/
ngOnInit() { }
/**
* @param {?} i
* @param {?} node
* @return {?}
*/
subscripts(i, node) {
this.fromChild.emit(node);
}
/**
* @param {?} item
* @return {?}
*/
fromChildFunc(item) {
this.fromChild.emit(item);
}
}
MenuComponent.decorators = [
{ type: Component, args: [{
selector: 'common-menu',
template: "<mat-menu #childMenu=\"matMenu\" [overlapTrigger]=\"false\">\r\n\t<span *ngFor=\"let child of items; let i = index\">\r\n\t\t<!-- Handle branch node menu items -->\r\n\t\t<span *ngIf=\"child.children && child.children.length > 0\">\r\n\t\t\t<button mat-menu-item [matMenuTriggerFor]=\"menu.childMenu\"\r\n\t\t\t\t[class.collapsed]=\"activeNode.includes(child)\">\r\n\t\t\t\t<span>{{ child.title }}</span>\r\n\t\t\t</button>\r\n\t\t\t<common-menu #menu [items]=\"child.children\"\r\n\t\t\t\t[activeNode]=\"activeNode\" (fromChild)=\"fromChildFunc($event)\">\r\n\t\t\t</common-menu>\r\n\t\t</span>\r\n\t\t<!-- Handle leaf node menu items -->\r\n\t\t<span *ngIf=\"!child.children || child.children.length === 0\"\r\n\t\t\t(click)=\"subscripts(i, child)\">\r\n\t\t\t<button mat-menu-item routerLink=\"{{ child.url }}\"\r\n\t\t\t\t[class.collapsed]=\"activeNode.includes(child)\">\r\n\t\t\t\t<mat-icon *ngIf=\"child.iconName\" [svgIcon]=\"child.iconName\">\r\n\t\t\t\t</mat-icon> <span>{{ child.title }}</span>\r\n\t\t\t</button>\r\n\t\t</span>\r\n\t</span>\r\n</mat-menu>",
styles: [""]
}] }
];
/** @nocollapse */
MenuComponent.ctorParameters = () => [];
MenuComponent.propDecorators = {
items: [{ type: Input }],
activeNode: [{ type: Input }],
fromChild: [{ type: Output }],
childMenu: [{ type: ViewChild, args: ['childMenu', { static: true },] }]
};
if (false) {
/** @type {?} */
MenuComponent.prototype.items;
/** @type {?} */
MenuComponent.prototype.activeNode;
/** @type {?} */
MenuComponent.prototype.fromChild;
/** @type {?} */
MenuComponent.prototype.childMenu;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
const eleSetDept = 'setdept';
class SetDeptService {
/**
* @param {?} api
* @param {?} eles
*/
constructor(api, eles) {
this.api = api;
this.eles = eles;
}
/**
* @param {?} code
* @return {?}
*/
codeExists(code) {
return this.api.get(this.eles.get(eleSetDept).URL, 'code-exists', this.eles.get(eleSetDept).SignStr, code);
}
}
SetDeptService.decorators = [
{ type: Injectable, args: [{
providedIn: 'root'
},] }
];
/** @nocollapse */
SetDeptService.ctorParameters = () => [
{ type: ApiService },
{ type: ElementsService }
];
/** @nocollapse */ SetDeptService.ngInjectableDef = ɵɵdefineInjectable({ factory: function SetDeptService_Factory() { return new SetDeptService(ɵɵinject(ApiService), ɵɵinject(ElementsService)); }, token: SetDeptService, providedIn: "root" });
if (false) {
/**
* @type {?}
* @private
*/
SetDeptService.prototype.api;
/**
* @type {?}
* @private
*/
SetDeptService.prototype.eles;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class SetDeptComponent {
/**
* @param {?} dialogRef
* @param {?} current
* @param {?} eles
* @param {?} setDeptService
*/
constructor(dialogRef, current, eles, setDeptService) {
this.dialogRef = dialogRef;
this.current = current;
this.eles = eles;
this.setDeptService = setDeptService;
/** @type {?} */
const This = this;
this.newCode = new FormControl(this.current.data.Dept.Code, [
Validators.required,
(/**
* @param {?} control
* @return {?}
*/
(control) => {
if (!control.value.startsWith(This.current.data.UserDept.Code)) {
return { owner: true };
}
return null;
})
], (/**
* @param {?} control
* @return {?}
*/
(control) => setDeptService.codeExists(control.value).pipe(map((/**
* @param {?} v
* @return {?}
*/
v => (v ? null : { exists: true }))))));
this.newCode.markAsTouched();
}
/**
* @return {?}
*/
getErrorMessage() {
return this.newCode.hasError('required')
? '你必须录入一个代码'
: this.newCode.hasError('owner')
? `必须以 ${this.current.data.UserDept.Code} 开头`
: this.newCode.hasError('exists')
? `代码 ${this.newCode.value} 不存在`
: '';
}
/**
* @return {?}
*/
ngOnInit() { }
/**
* @return {?}
*/
clickOk() {
this.current
.switchDept(this.newCode.value, this.eles.get(eleSwitchDept).SignStr)
.subscribe((/**
* @return {?}
*/
() => this.dialogRef.close()));
}
/**
* @return {?}
*/
codeEnter() {
if (!this.newCode.invalid) {
this.clickOk();
}
}
}
SetDeptComponent.decorators = [
{ type: Component, args: [{
selector: 'common-set-dept',
template: "<h1 mat-dialog-title>\u8BBE\u7F6E\u90E8\u95E8\u4EE3\u7801</h1>\n<div mat-dialog-content>\n <mat-form-field>\n <input matInput placeholder=\"\u8BF7\u5F55\u5165\u65B0\u7684\u90E8\u95E8\u4EE3\u7801\" [formControl]=\"newCode\" required (keyup.enter)=\"codeEnter()\" />\n <mat-error *ngIf=\"newCode.invalid\">{{ getErrorMessage() }}</mat-error>\n </mat-form-field>\n</div>\n<mat-dialog-actions align=\"end\">\n <button mat-button mat-stroked-button (click)=\"clickOk()\" [disabled]=\"newCode.invalid\">\u786E\u5B9A</button>\n</mat-dialog-actions>\n",
styles: [""]
}] }
];
/** @nocollapse */
SetDeptComponent.ctorParameters = () => [
{ type: MatDialogRef$1 },
{ type: CurrentService },
{ type: ElementsService },
{ type: SetDeptService }
];
if (false) {
/** @type {?} */
SetDeptComponent.prototype.newCode;
/** @type {?} */
SetDeptComponent.prototype.dialogRef;
/** @type {?} */
SetDeptComponent.prototype.current;
/**
* @type {?}
* @private
*/
SetDeptComponent.prototype.eles;
/**
* @type {?}
* @private
*/
SetDeptComponent.prototype.setDeptService;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class NavSelectionDeptComponent {
/**
* @param {?} dialog
* @param {?} eles
* @param {?} current
*/
constructor(dialog, eles, current) {
this.dialog = dialog;
this.eles = eles;
this.current = current;
}
/**
* @return {?}
*/
ngOnInit() { }
/**
* @return {?}
*/
customDept() {
/** @type {?} */
const dialogRef = this.dialog.open(SetDeptComponent, {
width: '250px'
});
dialogRef.afterClosed().subscribe((/**
* @return {?}
*/
() => {
console.log('The dialog was closed');
}));
}
/**
* @param {?} code
* @return {?}
*/
switchDept(code) {
// 必须调用subscribe,否则不会运行
this.current.switchDept(code, this.eles.get(eleSwitchDept).SignStr).subscribe();
}
}
NavSelectionDeptComponent.decorators = [
{ type: Component, args: [{
selector: 'common-nav-selection-dept',
template: "<button\r\n\tmat-button\r\n\tclass=\"max-top-menu \u5BFC\u822A\u6309\u94AE\u60AC\u6D6E\u8272\"\r\n\t[ngClass]=\"{\r\n\t\t'max-top-menu': !isMinNav,\r\n\t\t'min-top-menu': isMinNav\r\n\t}\"\r\n\t[matMenuTriggerFor]=\"menu\"\r\n>\r\n\t<span>{{\r\n\t\t(current.change$ | async)?.UserName +\r\n\t\t\t' ' +\r\n\t\t\t(current.change$ | async)?.Dept.Code +\r\n\t\t\t'.' +\r\n\t\t\t(current.change$ | async)?.Dept.Name\r\n\t}}</span>\r\n\t<mat-icon svgIcon=\"arrow_drop_down\"></mat-icon>\r\n</button>\r\n<mat-menu class=\"nav-menu\" #menu=\"matMenu\">\r\n\t<button mat-menu-item class=\"nav-menu-item\" (click)=\"customDept()\"><span>\u6307\u5B9A\u5904\u7406\u5730</span></button>\r\n\t<mat-divider *ngIf=\"(current.change$ | async)?.ToRootDept.length > 0\"> </mat-divider>\r\n\t<button\r\n\t\tmat-menu-item\r\n\t\tclass=\"nav-menu-item\"\r\n\t\t*ngFor=\"let oneDept of (current.change$ | async)?.ToRootDept\"\r\n\t\t(click)=\"switchDept(oneDept.Code)\"\r\n\t>\r\n\t\t<span>{{ oneDept.Code }}.{{ oneDept.Name }}</span>\r\n\t</button>\r\n\t<mat-divider *ngIf=\"(current.change$ | async)?.NextLevelDept.length > 0\"> </mat-divider>\r\n\t<button\r\n\t\tmat-menu-item\r\n\t\tclass=\"nav-menu-item\"\r\n\t\t*ngFor=\"let oneDept of (current.change$ | async)?.NextLevelDept\"\r\n\t\t(click)=\"switchDept(oneDept.Code)\"\r\n\t>\r\n\t\t<span>{{ oneDept.Code }}.{{ oneDept.Name }}</span>\r\n\t</button>\r\n</mat-menu>\r\n",
styles: [".nav-menu-item{font-size:14px;height:32px;line-height:32px}.max-top-menu{margin:0;height:24px;line-height:24px;padding-left:0}.max-top-menu span{width:104px;padding:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.min-top-menu{width:80px;padding:0;text-align:center;overflow:hidden}.min-top-menu span{display:inline-block;width:60px;padding:0;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}"]
}] }
];
/** @nocollapse */
NavSelectionDeptComponent.ctorParameters = () => [
{ type: MatDialog },
{ type: ElementsService },
{ type: CurrentService }
];
NavSelectionDeptComponent.propDecorators = {
isMinNav: [{ type: Input }]
};
if (false) {
/** @type {?} */
NavSelectionDeptComponent.prototype.isMinNav;
/** @type {?} */
NavSelectionDeptComponent.prototype.dialog;
/** @type {?} */
NavSelectionDeptComponent.prototype.eles;
/** @type {?} */
NavSelectionDeptComponent.prototype.current;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
// Directive to retrieve mat-tab options from router-tab.component.html
// tslint:disable-next-line:directive-class-suffix
class RouterTab {
/**
* @param {?} tab
* @param {?} routerLink
*/
constructor(tab, routerLink) {
this.tab = tab;
this.routerLink = routerLink;
}
}
RouterTab.decorators = [
{ type: Directive, args: [{
// tslint:disable-next-line:directive-selector
selector: 'mat-tab[routerLink]'
},] }
];
/** @nocollapse */
RouterTab.ctorParameters = () => [
{ type: MatTab },
{ type: RouterLink }
];
RouterTab.propDecorators = {
routerLinkActiveOptions: [{ type: Input }]
};
if (false) {
/** @type {?} */
RouterTab.prototype.routerLinkActiveOptions;
/** @type {?} */
RouterTab.prototype.tab;
/** @type {?} */
RouterTab.prototype.routerLink;
}
// Directive to set tabs within app-router-tab
// tslint:disable-next-line:directive-selector
// tslint:disable-next-line:directive-class-suffix
class RouterTabItem {
}
RouterTabItem.decorators = [
{ type: Directive, args: [{ selector: 'app-router-tab-item' },] }
];
RouterTabItem.propDecorators = {
routerLink: [{ type: Input }],
routerLinkActiveOptions: [{ type: Input }],
actives: [{ type: Input }],
disabled: [{ type: Input, args: ['disabled',] }],
label: [{ type: Input }]
};
if (false) {
/** @type {?} */
RouterTabItem.prototype.routerLink;
/** @type {?} */
RouterTabItem.prototype.routerLinkActiveOptions;
/** @type {?} */
RouterTabItem.prototype.actives;
/** @type {?} */
RouterTabItem.prototype.disabled;
/** @type {?} */
RouterTabItem.prototype.label;
}
// RouterTab component with the same behavior than mat-tab-nav-bar
class RouterTabComponent {
/**
* @param {?} router
* @param {?} tabs
*/
constructor(router, tabs) {
this.router = router;
this.tabs = tabs;
this.subscription = new Subscription();
}
/**
* @param {?} event
* @param {?} index
* @return {?}
*/
dragStart(event, index) {
this.tabBool = index;
this.oldTab = this.tabs.active;
}
/**
* @param {?} event
* @return {?}
*/
dragEnded(event) {
this.tabBool = null;
}
/**
* @param {?} event
* @return {?}
*/
drop(event) {
// tslint:disable-next-line:radix
/** @type {?} */
const previousIndex = parseInt(event.previousContainer.id.replace('list-', ''));
// tslint:disable-next-line:radix
/** @type {?} */
const currentIndex = parseInt(event.container.id.replace('list-', ''));
if (previousIndex !== NaN &&
currentIndex !== NaN &&
previousIndex !== undefined &&
currentIndex !== undefined &&
previousIndex !== currentIndex) {
// Do stuff
// this.tabBool = null;
// END Stuff
moveItemInArray(this.tabs.tabs, previousIndex, currentIndex);
}
this.tabs.activeIndex = this.tabs.tabs.findIndex((/**
* @param {?} v
* @return {?}
*/
v => v === this.oldTab));
}
/**
* @param {?} index
* @return {?}
*/
getAllListConnections(index) {
/** @type {?} */
const connections = [];
for (let i = 0; i < this.tabs.tabs.length; i++) {
if (i !== index) {
connections.push('list-' + i);
}
}
return connections;
}
/**
* @return {?}
*/
ngAfterViewInit() {
// Remove tab click event
this.matTabGroup._handleClick = (/**
* @return {?}
*/
() => { });
// Select current tab depending on url
this.setIndex();
// Subscription to navigation change
// this.subscription.add(
// this.router.events.subscribe(e => {
// if (e instanceof NavigationEnd) {
// setTimeout(() => this.setIndex(), 0);
// }
// })
// );
}
/**
* @return {?}
*/
ngOnDestroy() {
this.subscription.unsubscribe();
}
/**
* @param {?} u
* @return {?}
*/
getURLPath(u) {
return ['/', ...u.root.children['primary'].segments.map((/**
* @param {?} v
* @return {?}
*/
v => v.path))];
}
/**
* @param {?} event
* @param {?} index
* @return {?}
*/
onTabsClick(event, index) {
if (this.tabs.activeIndex !== index) {
this.router.navigateByUrl(this.tabs.tabs[index].url, {
state: this.tabs.tabs[index].data()
});
}
}
/**
* @param {?} e
* @param {?} index
* @return {?}
*/
removeClick(e, index) {
if (this.tabs.removeTab(index)) {
this.router.navigateByUrl(this.tabs.active.url, {
state: this.tabs.active.data()
});
}
if (e && e.stopPropagation) {
// 因此它支持W3C的stopPropagation()方法
e.stopPropagation();
}
else {
// 否则,我们需要使用IE的方式来取消事件冒泡
window.event.cancelBubble = true;
}
return false;
}
// Set current selected tab depending on navigation
/**
* @private
* @return {?}
*/
setIndex() {
this.routerTabs.find((/**
* @param {?} tab
* @param {?} i
* @return {?}
*/
(tab, i) => {
if (!this.router.isActive(tab.routerLink.urlTree, tab.routerLinkActiveOptions ? tab.routerLinkActiveOptions.exact : false)) {
return false;
}
// tab.tab.isActive = true;
this.tabs.activeIndex = i;
// this.matTabGroup.selectedIndex = i;
return true;
}));
}
}
RouterTabComponent.decorators = [
{ type: Component, args: [{
// tslint:disable-next-line:component-selector
selector: 'app-router-tab',
template: "<mat-tab-group #matTabGroup class=\"hide-tab-wrapper\" [selectedIndex]=\"tabs.activeIndex\">\r\n\t<mat-tab\r\n\t\t*ngFor=\"let tab of tabs.tabs; let index = index\"\r\n\t\t[routerLink]=\"getURLPath(tab.url)\"\r\n\t\t[queryParams]=\"tab.url.queryParams\"\r\n\t>\r\n\t\t<ng-template mat-tab-label>\r\n\t\t\t<div\r\n\t\t\t\t[id]=\"'list-' + index\"\r\n\t\t\t\tclass=\"example-list router-tab-link\"\r\n\t\t\t\tcdkDropList\r\n\t\t\t\t(cdkDropListDropped)=\"drop($event)\"\r\n\t\t\t\t[cdkDropListConnectedTo]=\"getAllListConnections(index)\"\r\n\t\t\t>\r\n\t\t\t\t<a\r\n\t\t\t\t\tclass=\"example-box\"\r\n\t\t\t\t\t(click)=\"onTabsClick($event, index)\"\r\n\t\t\t\t\t(cdkDragStarted)=\"dragStart($event, index)\"\r\n\t\t\t\t\t(cdkDragEnded)=\"dragEnded($event)\"\r\n\t\t\t\t\tcdkDrag\r\n\t\t\t\t>\r\n\t\t\t\t\t<span class=\"example-custom-placeholder\" *cdkDragPlaceholder></span>\r\n\t\t\t\t\t<span [class.hide-tab]=\"index === matTabGroup.selectedIndex\" class=\"tabspan\">{{\r\n\t\t\t\t\t\ttab.titleObservable | async\r\n\t\t\t\t\t}}</span>\r\n\t\t\t\t\t<button (click)=\"removeClick($event, index)\" mat-icon-button class=\"tabButton\">\r\n\t\t\t\t\t\t<mat-icon\r\n\t\t\t\t\t\t\tsvgIcon=\"close\"\r\n\t\t\t\t\t\t\t[class.hide-tab]=\"index === matTabGroup.selectedIndex\"\r\n\t\t\t\t\t\t\tclass=\"example-tab-icon\"\r\n\t\t\t\t\t\t></mat-icon>\r\n\t\t\t\t\t</button>\r\n\t\t\t\t</a>\r\n\t\t\t\t<a *ngIf=\"tabBool === index\" class=\"example-box drag-source\" cdkDrag>\r\n\t\t\t\t\t<span class=\"example-custom-placeholder\" *cdkDragPlaceholder></span>\r\n\t\t\t\t\t<span [class.hide-tab]=\"index === matTabGroup.selectedIndex\" class=\"tabspan\">{{ tab.titleObservable | async }}</span>\r\n\t\t\t\t\t<button mat-icon-button class=\"tabButton\">\r\n\t\t\t\t\t\t<mat-icon\r\n\t\t\t\t\t\t\tsvgIcon=\"close\"\r\n\t\t\t\t\t\t\t(click)=\"removeClick($event, index)\"\r\n\t\t\t\t\t\t\tclass=\"example-tab-icon\"\r\n\t\t\t\t\t\t></mat-icon>\r\n\t\t\t\t\t</button>\r\n\t\t\t\t</a>\r\n\t\t\t</div>\r\n\t\t</ng-template>\r\n\t</mat-tab>\r\n</mat-tab-group>\r\n",
encapsulation: ViewEncapsulation.None,
styles: [".hide-tab-wrapper .mat-tab-body-wrapper{display:none!important}.mat-tab-label{height:30px!important;min-width:160px!important;line-height:30px;text-align:left;font-size:12px;display:block;opacity:1!important;padding:0!important;position:relative}.mat-tab-label .tabButton{position:absolute;right:0;top:-3px;height:30px;width:30px;line-height:30px}.mat-tab-label .tabButton .example-tab-icon{width:16px;height:16px}.router-tab-link{height:30px;min-width:160px}.example-list{background:#fff;border-radius:4px;overflow:hidden;display:block}.example-box{min-width:160px;height:30px;display:flex;flex-direction:row;align-items:center;justify-content:space-between;box-sizing:content-box}.drag-source{opacity:.5}.cdk-drag-preview{width:100%;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);opacity:.5;font-size:12px}.cdk-drag-preview .mat-button-wrapper{width:16px!important;height:16px!important}.cdk-drag-preview .mat-button-wrapper .example-tab-icon{width:16px;height:16px}.cdk-drag-placeholder{opacity:0}.tabspan{padding:0 30px 0 6px}.cdk-drag-animating{transition:transform 250ms cubic-bezier(0,0,.2,1);transition:transform 250ms cubic-bezier(0,0,.2,1),-webkit-transform 250ms cubic-bezier(0,0,.2,1)}.cdk-drop-list-dragging a{-webkit-transform:translate3d(0,0,0)!important;transform:translate3d(0,0,0)!important}.example-custom-placeholder{width:100%;height:100%;-webkit-transform:translateX(-100%);transform:translateX(-100%);transition:transform 250ms cubic-bezier(0,0,.2,1);transition:transform 250ms cubic-bezier(0,0,.2,1),-webkit-transform 250ms cubic-bezier(0,0,.2,1)}"]
}] }
];
/** @nocollapse */
RouterTabComponent.ctorParameters = () => [
{ type: Router },
{ type: TabsService }
];
RouterTabComponent.propDecorators = {
matTabGroup: [{ type: ViewChild, args: ['matTabGroup', { static: true },] }],
routerTabItems: [{ type: ContentChildren, args: [RouterTabItem,] }],
routerTabs: [{ type: ViewChildren, args: [RouterTab,] }],
active: [{ type: Input }]
};
if (false) {
/** @type {?} */
RouterTabComponent.prototype.matTabGroup;
/** @type {?} */
RouterTabComponent.prototype.routerTabItems;
/** @type {?} */
RouterTabComponent.prototype.routerTabs;
/** @type {?} */
RouterTabComponent.prototype.tabpaixu;
/** @type {?} */
RouterTabComponent.prototype.tabBool;
/** @type {?} */
RouterTabComponent.prototype.oldTab;
/** @type {?} */
RouterTabComponent.prototype.active;
/**
* @type {?}
* @private
*/
RouterTabComponent.prototype.subscription;
/**
* @type {?}
* @private
*/
RouterTabComponent.prototype.router;
/** @type {?} */
RouterTabComponent.prototype.tabs;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class SetDeptModule {
}
SetDeptModule.decorators = [
{ type: NgModule, args: [{
imports: [
CommonModule,
FormsModule,
ReactiveFormsModule,
MatDialogModule$1,
MatInputModule,
MatFormFieldModule,
MatButtonModule$1
],
declarations: [SetDeptComponent],
entryComponents: [SetDeptComponent]
},] }
];
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class HomeModule {
}
HomeModule.decorators = [
{ type: NgModule, args: [{
imports: [
CommonModule,
BrowserModule,
ClipboardModule,
RouterModule,
MatIconModule,
MatToolbarModule,
MatSidenavModule,
MatButtonModule$1,
MatMenuModule,
MatDividerModule,
MatTreeModule,
MatBadgeModule,
FormsModule,
MatTabsModule,
CoreModule,
MatRippleModule,
BrowserAnimationsModule,
DragDropModule,
MatDialogModule$1,
SetDeptModule
],
declarations: [
HomeComponent,
HomeNavComponent,
MenuComponent,
RouterTabComponent,
RouterTabItem,
RouterTab,
NavSelectionDeptComponent
],
exports: [HomeComponent, RouterTabComponent, RouterTabItem, RouterTab],
entryComponents: [HomeNavComponent]
},] }
];
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class PageNotFoundComponent {
/**
* @param {?} rele
*/
constructor(rele) {
this.rele = rele;
}
/**
* @return {?}
*/
ngOnInit() {
this.rele.currentElement.subscribe((/**
* @param {?} ele
* @return {?}
*/
ele => (this.element = ele.element)));
}
}
PageNotFoundComponent.decorators = [
{ type: Component, args: [{
selector: 'common-page-not-found',
template: "<p>{{ element?.Controller }} not found.</p>\r\n",
styles: [""]
}] }
];
/** @nocollapse */
PageNotFoundComponent.ctorParameters = () => [
{ type: RouteElementService }
];
if (false) {
/** @type {?} */
PageNotFoundComponent.prototype.element;
/**
* @type {?}
* @private
*/
PageNotFoundComponent.prototype.rele;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class PageNotFoundModule {
}
PageNotFoundModule.decorators = [
{ type: NgModule, args: [{
declarations: [PageNotFoundComponent],
imports: [CommonModule],
exports: [PageNotFoundComponent]
},] }
];
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @record
*/
function PromptDialogData() { }
if (false) {
/** @type {?} */
PromptDialogData.prototype.title;
/** @type {?} */
PromptDialogData.prototype.prompt;
/** @type {?} */
PromptDialogData.prototype.value;
}
class PromptDialogComponent {
/**
* @param {?} dialogRef
* @param {?} data
*/
constructor(dialogRef, data) {
this.dialogRef = dialogRef;
this.data = data;
this.hostClass = true;
}
/**
* @return {?}
*/
onNoClick() {
this.dialogRef.close();
}
/**
* @return {?}
*/
ngOnInit() { }
}
PromptDialogComponent.decorators = [
{ type: Component, args: [{
selector: 'common-prompt-dialog',
template: "{{data.title}}\n<mat-dialog-content>\n\t{{data.prompt}}\n\n\t<mat-form-field>\n\t\t<input matInput cdkFocusInitial [(ngModel)]=\"data.value\">\n\t</mat-form-field>\n</mat-dialog-content>\n<mat-dialog-actions>\n\t<button mat-button (click)=\"onNoClick()\">No Thanks</button>\n\t<button mat-button [mat-dialog-close]=\"data.value\"\n\t\tcdkFocusInitial>Ok</button>\n</mat-dialog-actions>",
styles: [""]
}] }
];
/** @nocollapse */
PromptDialogComponent.ctorParameters = () => [
{ type: MatDialogRef },
{ type: undefined, decorators: [{ type: Inject, args: [MAT_DIALOG_DATA,] }] }
];
PromptDialogComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.c-prompt-dialog',] }]
};
if (false) {
/** @type {?} */
PromptDialogComponent.prototype.hostClass;
/** @type {?} */
PromptDialogComponent.prototype.inputString;
/** @type {?} */
PromptDialogComponent.prototype.dialogRef;
/** @type {?} */
PromptDialogComponent.prototype.data;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class PromptDialogModule {
}
PromptDialogModule.decorators = [
{ type: NgModule, args: [{
declarations: [PromptDialogComponent],
imports: [CommonModule, MatDialogModule, MatButtonModule, MatFormFieldModule$1, MatInputModule$1, FormsModule],
entryComponents: [PromptDialogComponent]
},] }
];
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
registerLocaleData(localeZh);
class DBWebCommonModule {
/**
* @param {?} ctrl
*/
constructor(ctrl) {
/** @type {?} */
const ctrlNameList = [CTRL_ELEMENT, CTRL_TASK, CTRL_ROLE, CTRL_USER, CTRL_NOTICE];
ctrlNameList.forEach((/**
* @param {?} ctrlName
* @return {?}
*/
ctrlName => {
ctrl.register(ctrlName);
}));
}
}
DBWebCommonModule.decorators = [
{ type: NgModule, args: [{
imports: [CommonModule, CoreModule, HomeModule, PageNotFoundModule, ConfirmDialogModule, PromptDialogModule],
providers: [{ provide: LOCALE_ID, useValue: 'zh-Hans' }]
},] }
];
/** @nocollapse */
DBWebCommonModule.ctorParameters = () => [
{ type: BillControllerService }
];
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
const iconList = [
{
nameSpace: '',
list: [
'filled/action/3d_rotation.svg',
'filled/action/accessibility.svg',
'filled/action/accessible.svg',
'filled/action/account_balance.svg',
'filled/action/account_balance_wallet.svg',
'filled/action/account_box.svg',
'filled/action/account_circle.svg',
'filled/action/add_shopping_cart.svg',
'filled/action/alarm.svg',
'filled/action/alarm_add.svg',
'filled/action/alarm_off.svg',
'filled/action/alarm_on.svg',
'filled/action/all_out.svg',
'filled/action/android.svg',
'filled/action/announcement.svg',
'filled/action/aspect_ratio.svg',
'filled/action/assessment.svg',
'filled/action/assignment.svg',
'filled/action/assignment_ind.svg',
'filled/action/assignment_late.svg',
'filled/action/assignment_return.svg',
'filled/action/assignment_returned.svg',
'filled/action/assignment_turned_in.svg',
'filled/action/autorenew.svg',
'filled/action/backup.svg',
'filled/action/book.svg',
'filled/action/bookmark.svg',
'filled/action/bookmark_border.svg',
'filled/action/bug_report.svg',
'filled/action/build.svg',
'filled/action/cached.svg',
'filled/action/camera_enhance.svg',
'filled/action/card_giftcard.svg',
'filled/action/card_membership.svg',
'filled/action/card_travel.svg',
'filled/action/change_history.svg',
'filled/action/check_circle.svg',
'filled/action/chrome_reader_mode.svg',
'filled/action/class.svg',
'filled/action/code.svg',
'filled/action/compare_arrows.svg',
'filled/action/copyright.svg',
'filled/action/credit_card.svg',
'filled/action/dashboard.svg',
'filled/action/date_range.svg',
'filled/action/delete.svg',
'filled/action/delete_forever.svg',
'filled/action/delete_outline.svg',
'filled/action/description.svg',
'filled/action/dns.svg',
'filled/action/done.svg',
'filled/action/done_all.svg',
'filled/action/donut_large.svg',
'filled/action/donut_small.svg',
'filled/action/eject.svg',
'filled/action/euro_symbol.svg',
'filled/action/event.svg',
'filled/action/event_seat.svg',
'filled/action/exit_to_app.svg',
'filled/action/explore.svg',
'filled/action/extension.svg',
'filled/action/face.svg',
'filled/action/favorite.svg',
'filled/action/favorite_border.svg',
'filled/action/feedback.svg',
'filled/action/find_in_page.svg',
'filled/action/find_replace.svg',
'filled/action/fingerprint.svg',
'filled/action/flight_land.svg',
'filled/action/flight_takeoff.svg',
'filled/action/flip_to_back.svg',
'filled/action/flip_to_front.svg',
'filled/action/gavel.svg',
'filled/action/get_app.svg',
'filled/action/gif.svg',
'filled/action/grade.svg',
'filled/action/group_work.svg',
'filled/action/g_translate.svg',
'filled/action/help.svg',
'filled/action/help_outline.svg',
'filled/action/highlight_off.svg',
'filled/action/history.svg',
'filled/action/home.svg',
'filled/action/hourglass_empty.svg',
'filled/action/hourglass_full.svg',
'filled/action/http.svg',
'filled/action/https.svg',
'filled/action/important_devices.svg',
'filled/action/info.svg',
'filled/action/info_outline.svg',
'filled/action/input.svg',
'filled/action/invert_colors.svg',
'filled/action/label.svg',
'filled/action/label_outline.svg',
'filled/action/language.svg',
'filled/action/launch.svg',
'filled/action/lightbulb_outline.svg',
'filled/action/line_style.svg',
'filled/action/line_weight.svg',
'filled/action/list.svg',
'filled/action/lock.svg',
'filled/action/lock_open.svg',
'filled/action/lock_outline.svg',
'filled/action/loyalty.svg',
'filled/action/markunread_mailbox.svg',
'filled/action/motorcycle.svg',
'filled/action/note_add.svg',
'filled/action/offline_pin.svg',
'filled/action/opacity.svg',
'filled/action/open_in_browser.svg',
'filled/action/open_in_new.svg',
'filled/action/open_with.svg',
'filled/action/pageview.svg',
'filled/action/pan_tool.svg',
'filled/action/payment.svg',
'filled/action/perm_camera_m24px.svg',
'filled/action/perm_contact_calendar.svg',
'filled/action/perm_data_setting.svg',
'filled/action/perm_device_information.svg',
'filled/action/perm_identity.svg',
'filled/action/perm_media.svg',
'filled/action/perm_phone_msg.svg',
'filled/action/perm_scan_wifi.svg',
'filled/action/pets.svg',
'filled/action/picture_in_picture.svg',
'filled/action/picture_in_picture_alt.svg',
'filled/action/play_for_work.svg',
'filled/action/polymer.svg',
'filled/action/power_settings_new.svg',
'filled/action/pregnant_woman.svg',
'filled/action/print.svg',
'filled/action/query_builder.svg',
'filled/action/question_answer.svg',
'filled/action/receipt.svg',
'filled/action/record_voice_over.svg',
'filled/action/redeem.svg',
'filled/action/remove_shopping_cart.svg',
'filled/action/reorder.svg',
'filled/action/report_problem.svg',
'filled/action/restore.svg',
'filled/action/restore_page.svg',
'filled/action/room.svg',
'filled/action/rounded_corner.svg',
'filled/action/rowing.svg',
'filled/action/schedule.svg',
'filled/action/search.svg',
'filled/action/settings.svg',
'filled/action/settings_applications.svg',
'filled/action/settings_backup_restore.svg',
'filled/action/settings_bluetooth.svg',
'filled/action/settings_brightness.svg',
'filled/action/settings_cell.svg',
'filled/action/settings_ethernet.svg',
'filled/action/settings_input_antenna.svg',
'filled/action/settings_input_component.svg',
'filled/action/settings_input_composite.svg',
'filled/action/settings_input_hdmi.svg',
'filled/action/settings_input_svideo.svg',
'filled/action/settings_overscan.svg',
'filled/action/settings_phone.svg',
'filled/action/settings_power.svg',
'filled/action/settings_remote.svg',
'filled/action/settings_voice.svg',
'filled/action/shop.svg',
'filled/action/shopping_basket.svg',
'filled/action/shopping_cart.svg',
'filled/action/shop_two.svg',
'filled/action/speaker_notes.svg',
'filled/action/speaker_notes_off.svg',
'filled/action/spellcheck.svg',
'filled/action/stars.svg',
'filled/action/store.svg',
'filled/action/subject.svg',
'filled/action/supervisor_account.svg',
'filled/action/swap_horiz.svg',
'filled/action/swap_vert.svg',
'filled/action/swap_vertical_circle.svg',
'filled/action/system_update_alt.svg',
'filled/action/tab.svg',
'filled/action/tab_unselected.svg',
'filled/action/theaters.svg',
'filled/action/thumbs_up_down.svg',
'filled/action/thumb_down.svg',
'filled/action/thumb_up.svg',
'filled/action/timeline.svg',
'filled/action/toc.svg',
'filled/action/today.svg',
'filled/action/toll.svg',
'filled/action/touch_app.svg',
'filled/action/track_changes.svg',
'filled/action/translate.svg',
'filled/action/trending_down.svg',
'filled/action/trending_flat.svg',
'filled/action/trending_up.svg',
'filled/action/turned_in.svg',
'filled/action/turned_in_not.svg',
'filled/action/update.svg',
'filled/action/verified_user.svg',
'filled/action/view_agenda.svg',
'filled/action/view_array.svg',
'filled/action/view_carousel.svg',
'filled/action/view_column.svg',
'filled/action/view_day.svg',
'filled/action/view_headline.svg',
'filled/action/view_list.svg',
'filled/action/view_module.svg',
'filled/action/view_quilt.svg',
'filled/action/view_stream.svg',
'filled/action/view_week.svg',
'filled/action/visibility.svg',
'filled/action/visibility_off.svg',
'filled/action/watch_later.svg',
'filled/action/work.svg',
'filled/action/youtube_searched_for.svg',
'filled/action/zoom_in.svg',
'filled/action/zoom_out.svg',
'filled/alert/add_alert.svg',
'filled/alert/error.svg',
'filled/alert/error_outline.svg',
'filled/alert/warning.svg',
'filled/av/add_to_queue.svg',
'filled/av/airplay.svg',
'filled/av/album.svg',
'filled/av/art_track.svg',
'filled/av/av_timer.svg',
'filled/av/branding_watermark.svg',
'filled/av/call_to_action.svg',
'filled/av/closed_caption.svg',
'filled/av/equalizer.svg',
'filled/av/explicit.svg',
'filled/av/fast_forward.svg',
'filled/av/fast_rewind.svg',
'filled/av/featured_play_list.svg',
'filled/av/featured_video.svg',
'filled/av/fiber_dvr.svg',
'filled/av/fiber_manual_record.svg',
'filled/av/fiber_new.svg',
'filled/av/fiber_pin.svg',
'filled/av/fiber_smart_record.svg',
'filled/av/forward_10.svg',
'filled/av/forward_30.svg',
'filled/av/forward_5.svg',
'filled/av/games.svg',
'filled/av/hd.svg',
'filled/av/hearing.svg',
'filled/av/high_quality.svg',
'filled/av/library_add.svg',
'filled/av/library_books.svg',
'filled/av/library_mus24px.svg',
'filled/av/loop.svg',
'filled/av/m24px.svg',
'filled/av/mnone.svg',
'filled/av/moff.svg',
'filled/av/movie.svg',
'filled/av/musvideo.svg',
'filled/av/new_releases.svg',
'filled/av/note.svg',
'filled/av/not_interested.svg',
'filled/av/pause.svg',
'filled/av/pause_circle_filled.svg',
'filled/av/pause_circle_outline.svg',
'filled/av/playlist_add.svg',
'filled/av/playlist_add_check.svg',
'filled/av/playlist_play.svg',
'filled/av/play_arrow.svg',
'filled/av/play_circle_filled.svg',
'filled/av/play_circle_outline.svg',
'filled/av/queue.svg',
'filled/av/queue_mus24px.svg',
'filled/av/queue_play_next.svg',
'filled/av/radio.svg',
'filled/av/recent_actors.svg',
'filled/av/remove_from_queue.svg',
'filled/av/repeat.svg',
'filled/av/repeat_one.svg',
'filled/av/replay.svg',
'filled/av/replay_10.svg',
'filled/av/replay_30.svg',
'filled/av/replay_5.svg',
'filled/av/shuffle.svg',
'filled/av/skip_next.svg',
'filled/av/skip_previous.svg',
'filled/av/slow_motion_video.svg',
'filled/av/snooze.svg',
'filled/av/sort_by_alpha.svg',
'filled/av/stop.svg',
'filled/av/subscriptions.svg',
'filled/av/subtitles.svg',
'filled/av/surround_sound.svg',
'filled/av/videocam.svg',
'filled/av/videocam_off.svg',
'filled/av/video_call.svg',
'filled/av/video_label.svg',
'filled/av/video_library.svg',
'filled/av/volume_down.svg',
'filled/av/volume_mute.svg',
'filled/av/volume_off.svg',
'filled/av/volume_up.svg',
'filled/av/web.svg',
'filled/av/web_asset.svg',
'filled/communication/business.svg',
'filled/communication/call.svg',
'filled/communication/call_end.svg',
'filled/communication/call_made.svg',
'filled/communication/call_merge.svg',
'filled/communication/call_missed.svg',
'filled/communication/call_missed_outgoing.svg',
'filled/communication/call_received.svg',
'filled/communication/call_split.svg',
'filled/communication/chat.svg',
'filled/communication/chat_bubble.svg',
'filled/communication/chat_bubble_outline.svg',
'filled/communication/clear_all.svg',
'filled/communication/comment.svg',
'filled/communication/contacts.svg',
'filled/communication/contact_mail.svg',
'filled/communication/contact_phone.svg',
'filled/communication/dialer_sip.svg',
'filled/communication/dialpad.svg',
'filled/communication/email.svg',
'filled/communication/forum.svg',
'filled/communication/import_contacts.svg',
'filled/communication/import_export.svg',
'filled/communication/invert_colors_off.svg',
'filled/communication/live_help.svg',
'filled/communication/location_off.svg',
'filled/communication/location_on.svg',
'filled/communication/mail_outline.svg',
'filled/communication/message.svg',
'filled/communication/no_sim.svg',
'filled/communication/phone.svg',
'filled/communication/phonelink_erase.svg',
'filled/communication/phonelink_lock.svg',
'filled/communication/phonelink_ring.svg',
'filled/communication/phonelink_setup.svg',
'filled/communication/portable_wifi_off.svg',
'filled/communication/present_to_all.svg',
'filled/communication/ring_volume.svg',
'filled/communication/rss_feed.svg',
'filled/communication/screen_share.svg',
'filled/communication/speaker_phone.svg',
'filled/communication/stay_current_landscape.svg',
'filled/communication/stay_current_portrait.svg',
'filled/communication/stay_primary_landscape.svg',
'filled/communication/stay_primary_portrait.svg',
'filled/communication/stop_screen_share.svg',
'filled/communication/swap_calls.svg',
'filled/communication/textsms.svg',
'filled/communication/voicemail.svg',
'filled/communication/vpn_key.svg',
'filled/content/add.svg',
'filled/content/add_box.svg',
'filled/content/add_circle.svg',
'filled/content/add_circle_outline.svg',
'filled/content/archive.svg',
'filled/content/backspace.svg',
'filled/content/block.svg',
'filled/content/clear.svg',
'filled/content/content_copy.svg',
'filled/content/content_cut.svg',
'filled/content/content_paste.svg',
'filled/content/create.svg',
'filled/content/delete_sweep.svg',
'filled/content/drafts.svg',
'filled/content/filter_list.svg',
'filled/content/flag.svg',
'filled/content/font_download.svg',
'filled/content/forward.svg',
'filled/content/gesture.svg',
'filled/content/inbox.svg',
'filled/content/link.svg',
'filled/content/low_priority.svg',
'filled/content/mail.svg',
'filled/content/markunread.svg',
'filled/content/move_to_inbox.svg',
'filled/content/next_week.svg',
'filled/content/redo.svg',
'filled/content/remove.svg',
'filled/content/remove_circle.svg',
'filled/content/remove_circle_outline.svg',
'filled/content/reply.svg',
'filled/content/reply_all.svg',
'filled/content/report.svg',
'filled/content/save.svg',
'filled/content/save_alt.svg',
'filled/content/select_all.svg',
'filled/content/send.svg',
'filled/content/sort.svg',
'filled/content/text_format.svg',
'filled/content/unarchive.svg',
'filled/content/undo.svg',
'filled/content/weekend.svg',
'filled/device/access_alarm.svg',
'filled/device/access_alarms.svg',
'filled/device/access_time.svg',
'filled/device/add_alarm.svg',
'filled/device/airplanemode_active.svg',
'filled/device/airplanemode_inactive.svg',
'filled/device/battery_20.svg',
'filled/device/battery_30.svg',
'filled/device/battery_50.svg',
'filled/device/battery_60.svg',
'filled/device/battery_80.svg',
'filled/device/battery_90.svg',
'filled/device/battery_alert.svg',
'filled/device/battery_charging_20.svg',
'filled/device/battery_charging_30.svg',
'filled/device/battery_charging_50.svg',
'filled/device/battery_charging_60.svg',
'filled/device/battery_charging_80.svg',
'filled/device/battery_charging_90.svg',
'filled/device/battery_charging_full.svg',
'filled/device/battery_full.svg',
'filled/device/battery_std.svg',
'filled/device/battery_unknown.svg',
'filled/device/bluetooth.svg',
'filled/device/bluetooth_connected.svg',
'filled/device/bluetooth_disabled.svg',
'filled/device/bluetooth_searching.svg',
'filled/device/brightness_auto.svg',
'filled/device/brightness_high.svg',
'filled/device/brightness_low.svg',
'filled/device/brightness_medium.svg',
'filled/device/data_usage.svg',
'filled/device/developer_mode.svg',
'filled/device/devices.svg',
'filled/device/dvr.svg',
'filled/device/gps_fixed.svg',
'filled/device/gps_not_fixed.svg',
'filled/device/gps_off.svg',
'filled/device/grapheq.svg',
'filled/device/location_disabled.svg',
'filled/device/location_searching.svg',
'filled/device/network_cell.svg',
'filled/device/network_wifi.svg',
'filled/device/nfc.svg',
'filled/device/screen_lock_landscape.svg',
'filled/device/screen_lock_portrait.svg',
'filled/device/screen_lock_rotation.svg',
'filled/device/screen_rotation.svg',
'filled/device/sd_storage.svg',
'filled/device/settings_system_daydream.svg',
'filled/device/signal_cellular_0_bar.svg',
'filled/device/signal_cellular_1_bar.svg',
'filled/device/signal_cellular_2_bar.svg',
'filled/device/signal_cellular_3_bar.svg',
'filled/device/signal_cellular_4_bar.svg',
'filled/device/signal_cellular_connected_no_internet_0_bar.svg',
'filled/device/signal_cellular_connected_no_internet_1_bar.svg',
'filled/device/signal_cellular_connected_no_internet_2_bar.svg',
'filled/device/signal_cellular_connected_no_internet_3_bar.svg',
'filled/device/signal_cellular_connected_no_internet_4_bar.svg',
'filled/device/signal_cellular_no_sim.svg',
'filled/device/signal_cellular_null.svg',
'filled/device/signal_cellular_off.svg',
'filled/device/signal_wifi_0_bar.svg',
'filled/device/signal_wifi_1_bar.svg',
'filled/device/signal_wifi_1_bar_lock.svg',
'filled/device/signal_wifi_2_bar.svg',
'filled/device/signal_wifi_2_bar_lock.svg',
'filled/device/signal_wifi_3_bar.svg',
'filled/device/signal_wifi_3_bar_lock.svg',
'filled/device/signal_wifi_4_bar.svg',
'filled/device/signal_wifi_4_bar_lock.svg',
'filled/device/signal_wifi_off.svg',
'filled/device/storage.svg',
'filled/device/usb.svg',
'filled/device/wallpaper.svg',
'filled/device/widgets.svg',
'filled/device/wifi_lock.svg',
'filled/device/wifi_tethering.svg',
'filled/editor/attach_file.svg',
'filled/editor/attach_money.svg',
'filled/editor/border_all.svg',
'filled/editor/border_bottom.svg',
'filled/editor/border_clear.svg',
'filled/editor/border_color.svg',
'filled/editor/border_horizontal.svg',
'filled/editor/border_inner.svg',
'filled/editor/border_left.svg',
'filled/editor/border_outer.svg',
'filled/editor/border_right.svg',
'filled/editor/border_style.svg',
'filled/editor/border_top.svg',
'filled/editor/border_vertical.svg',
'filled/editor/bubble_chart.svg',
'filled/editor/drag_handle.svg',
'filled/editor/format_align_center.svg',
'filled/editor/format_align_justify.svg',
'filled/editor/format_align_left.svg',
'filled/editor/format_align_right.svg',
'filled/editor/format_bold.svg',
'filled/editor/format_clear.svg',
'filled/editor/format_color_fill.svg',
'filled/editor/format_color_reset.svg',
'filled/editor/format_color_text.svg',
'filled/editor/format_indent_decrease.svg',
'filled/editor/format_indent_increase.svg',
'filled/editor/format_ital24px.svg',
'filled/editor/format_line_spacing.svg',
'filled/editor/format_list_bulleted.svg',
'filled/editor/format_list_numbered.svg',
'filled/editor/format_paint.svg',
'filled/editor/format_quote.svg',
'filled/editor/format_shapes.svg',
'filled/editor/format_size.svg',
'filled/editor/format_strikethrough.svg',
'filled/editor/format_textdirection_l_to_r.svg',
'filled/editor/format_textdirection_r_to_l.svg',
'filled/editor/format_underlined.svg',
'filled/editor/functions.svg',
'filled/editor/highlight.svg',
'filled/editor/insert_chart.svg',
'filled/editor/insert_comment.svg',
'filled/editor/insert_drive_file.svg',
'filled/editor/insert_emoticon.svg',
'filled/editor/insert_invitation.svg',
'filled/editor/insert_link.svg',
'filled/editor/insert_photo.svg',
'filled/editor/linear_scale.svg',
'filled/editor/merge_type.svg',
'filled/editor/mode_comment.svg',
'filled/editor/mode_edit.svg',
'filled/editor/monetization_on.svg',
'filled/editor/money_off.svg',
'filled/editor/multiline_chart.svg',
'filled/editor/pie_chart.svg',
'filled/editor/pie_chart_outlined.svg',
'filled/editor/publish.svg',
'filled/editor/short_text.svg',
'filled/editor/show_chart.svg',
'filled/editor/space_bar.svg',
'filled/editor/strikethrough_s.svg',
'filled/editor/text_fields.svg',
'filled/editor/title.svg',
'filled/editor/vertical_align_bottom.svg',
'filled/editor/vertical_align_center.svg',
'filled/editor/vertical_align_top.svg',
'filled/editor/wrap_text.svg',
'filled/fill/attachment.svg',
'filled/fill/cloud.svg',
'filled/fill/cloud_circle.svg',
'filled/fill/cloud_done.svg',
'filled/fill/cloud_download.svg',
'filled/fill/cloud_off.svg',
'filled/fill/cloud_queue.svg',
'filled/fill/cloud_upload.svg',
'filled/fill/create_new_folder.svg',
'filled/fill/file_download.svg',
'filled/fill/file_upload.svg',
'filled/fill/folder.svg',
'filled/fill/folder_open.svg',
'filled/fill/folder_shared.svg',
'filled/hardware/cast.svg',
'filled/hardware/cast_connected.svg',
'filled/hardware/computer.svg',
'filled/hardware/desktop_mac.svg',
'filled/hardware/desktop_windows.svg',
'filled/hardware/developer_board.svg',
'filled/hardware/devices_other.svg',
'filled/hardware/device_hub.svg',
'filled/hardware/dock.svg',
'filled/hardware/gamepad.svg',
'filled/hardware/headset.svg',
'filled/hardware/headset_m24px.svg',
'filled/hardware/keyboard.svg',
'filled/hardware/keyboard_arrow_down.svg',
'filled/hardware/keyboard_arrow_left.svg',
'filled/hardware/keyboard_arrow_right.svg',
'filled/hardware/keyboard_arrow_up.svg',
'filled/hardware/keyboard_backspace.svg',
'filled/hardware/keyboard_capslock.svg',
'filled/hardware/keyboard_hide.svg',
'filled/hardware/keyboard_return.svg',
'filled/hardware/keyboard_tab.svg',
'filled/hardware/keyboard_voice.svg',
'filled/hardware/laptop.svg',
'filled/hardware/laptop_chromebook.svg',
'filled/hardware/laptop_mac.svg',
'filled/hardware/laptop_windows.svg',
'filled/hardware/memory.svg',
'filled/hardware/mouse.svg',
'filled/hardware/phonelink.svg',
'filled/hardware/phonelink_off.svg',
'filled/hardware/phone_android.svg',
'filled/hardware/phone_iphone.svg',
'filled/hardware/power_input.svg',
'filled/hardware/router.svg',
'filled/hardware/scanner.svg',
'filled/hardware/security.svg',
'filled/hardware/sim_card.svg',
'filled/hardware/smartphone.svg',
'filled/hardware/speaker.svg',
'filled/hardware/speaker_group.svg',
'filled/hardware/tablet.svg',
'filled/hardware/tablet_android.svg',
'filled/hardware/tablet_mac.svg',
'filled/hardware/toys.svg',
'filled/hardware/tv.svg',
'filled/hardware/videogame_asset.svg',
'filled/hardware/watch.svg',
'filled/image/add_a_photo.svg',
'filled/image/add_to_photos.svg',
'filled/image/adjust.svg',
'filled/image/assistant.svg',
'filled/image/assistant_photo.svg',
'filled/image/audiotrack.svg',
'filled/image/blur_circular.svg',
'filled/image/blur_linear.svg',
'filled/image/blur_off.svg',
'filled/image/blur_on.svg',
'filled/image/brightness_1.svg',
'filled/image/brightness_2.svg',
'filled/image/brightness_3.svg',
'filled/image/brightness_4.svg',
'filled/image/brightness_5.svg',
'filled/image/brightness_6.svg',
'filled/image/brightness_7.svg',
'filled/image/broken_image.svg',
'filled/image/brush.svg',
'filled/image/burst_mode.svg',
'filled/image/camera.svg',
'filled/image/camera_alt.svg',
'filled/image/camera_front.svg',
'filled/image/camera_rear.svg',
'filled/image/camera_roll.svg',
'filled/image/center_focus_strong.svg',
'filled/image/center_focus_weak.svg',
'filled/image/collections.svg',
'filled/image/collections_bookmark.svg',
'filled/image/colorize.svg',
'filled/image/color_lens.svg',
'filled/image/compare.svg',
'filled/image/control_point.svg',
'filled/image/control_point_duplicate.svg',
'filled/image/crop.svg',
'filled/image/crop_16_9.svg',
'filled/image/crop_3_2.svg',
'filled/image/crop_5_4.svg',
'filled/image/crop_7_5.svg',
'filled/image/crop_din.svg',
'filled/image/crop_free.svg',
'filled/image/crop_landscape.svg',
'filled/image/crop_original.svg',
'filled/image/crop_portrait.svg',
'filled/image/crop_rotate.svg',
'filled/image/crop_square.svg',
'filled/image/dehaze.svg',
'filled/image/details.svg',
'filled/image/edit.svg',
'filled/image/exposure.svg',
'filled/image/exposure_neg_1.svg',
'filled/image/exposure_neg_2.svg',
'filled/image/exposure_plus_1.svg',
'filled/image/exposure_plus_2.svg',
'filled/image/exposure_zero.svg',
'filled/image/filter.svg',
'filled/image/filter_1.svg',
'filled/image/filter_2.svg',
'filled/image/filter_3.svg',
'filled/image/filter_4.svg',
'filled/image/filter_5.svg',
'filled/image/filter_6.svg',
'filled/image/filter_7.svg',
'filled/image/filter_8.svg',
'filled/image/filter_9.svg',
'filled/image/filter_9_plus.svg',
'filled/image/filter_b_and_w.svg',
'filled/image/filter_center_focus.svg',
'filled/image/filter_drama.svg',
'filled/image/filter_frames.svg',
'filled/image/filter_hdr.svg',
'filled/image/filter_none.svg',
'filled/image/filter_tilt_shift.svg',
'filled/image/filter_vintage.svg',
'filled/image/flare.svg',
'filled/image/flash_auto.svg',
'filled/image/flash_off.svg',
'filled/image/flash_on.svg',
'filled/image/flip.svg',
'filled/image/gradient.svg',
'filled/image/grain.svg',
'filled/image/grid_off.svg',
'filled/image/grid_on.svg',
'filled/image/hdr_off.svg',
'filled/image/hdr_on.svg',
'filled/image/hdr_strong.svg',
'filled/image/hdr_weak.svg',
'filled/image/healing.svg',
'filled/image/image.svg',
'filled/image/image_aspect_ratio.svg',
'filled/image/iso.svg',
'filled/image/landscape.svg',
'filled/image/leak_add.svg',
'filled/image/leak_remove.svg',
'filled/image/lens.svg',
'filled/image/linked_camera.svg',
'filled/image/looks.svg',
'filled/image/looks_3.svg',
'filled/image/looks_4.svg',
'filled/image/looks_5.svg',
'filled/image/looks_6.svg',
'filled/image/looks_one.svg',
'filled/image/looks_two.svg',
'filled/image/loupe.svg',
'filled/image/monochrome_photos.svg',
'filled/image/movie_creation.svg',
'filled/image/movie_filter.svg',
'filled/image/musnote.svg',
'filled/image/nature.svg',
'filled/image/nature_people.svg',
'filled/image/navigate_before.svg',
'filled/image/navigate_next.svg',
'filled/image/palette.svg',
'filled/image/panorama.svg',
'filled/image/panorama_fish_eye.svg',
'filled/image/panorama_horizontal.svg',
'filled/image/panorama_vertical.svg',
'filled/image/panorama_wide_angle.svg',
'filled/image/photo.svg',
'filled/image/photo_album.svg',
'filled/image/photo_camera.svg',
'filled/image/photo_filter.svg',
'filled/image/photo_library.svg',
'filled/image/photo_size_select_actual.svg',
'filled/image/photo_size_select_large.svg',
'filled/image/photo_size_select_small.svg',
'filled/image/picture_as_pdf.svg',
'filled/image/portrait.svg',
'filled/image/remove_red_eye.svg',
'filled/image/rotate_90_degrees_ccw.svg',
'filled/image/rotate_left.svg',
'filled/image/rotate_right.svg',
'filled/image/slideshow.svg',
'filled/image/straighten.svg',
'filled/image/style.svg',
'filled/image/switch_camera.svg',
'filled/image/switch_video.svg',
'filled/image/tag_faces.svg',
'filled/image/texture.svg',
'filled/image/timelapse.svg',
'filled/image/timer.svg',
'filled/image/timer_10.svg',
'filled/image/timer_3.svg',
'filled/image/timer_off.svg',
'filled/image/tonality.svg',
'filled/image/transform.svg',
'filled/image/tune.svg',
'filled/image/view_comfy.svg',
'filled/image/view_compact.svg',
'filled/image/vignette.svg',
'filled/image/wb_auto.svg',
'filled/image/wb_cloudy.svg',
'filled/image/wb_incandescent.svg',
'filled/image/wb_iridescent.svg',
'filled/image/wb_sunny.svg',
'filled/maps/add_location.svg',
'filled/maps/beenhere.svg',
'filled/maps/directions.svg',
'filled/maps/directions_bike.svg',
'filled/maps/directions_boat.svg',
'filled/maps/directions_bus.svg',
'filled/maps/directions_car.svg',
'filled/maps/directions_railway.svg',
'filled/maps/directions_run.svg',
'filled/maps/directions_subway.svg',
'filled/maps/directions_transit.svg',
'filled/maps/directions_walk.svg',
'filled/maps/edit_location.svg',
'filled/maps/ev_station.svg',
'filled/maps/flight.svg',
'filled/maps/hotel.svg',
'filled/maps/layers.svg',
'filled/maps/layers_clear.svg',
'filled/maps/local_activity.svg',
'filled/maps/local_airport.svg',
'filled/maps/local_atm.svg',
'filled/maps/local_bar.svg',
'filled/maps/local_cafe.svg',
'filled/maps/local_car_wash.svg',
'filled/maps/local_convenience_store.svg',
'filled/maps/local_dining.svg',
'filled/maps/local_drink.svg',
'filled/maps/local_florist.svg',
'filled/maps/local_gas_station.svg',
'filled/maps/local_grocery_store.svg',
'filled/maps/local_hospital.svg',
'filled/maps/local_hotel.svg',
'filled/maps/local_laundry_service.svg',
'filled/maps/local_library.svg',
'filled/maps/local_mall.svg',
'filled/maps/local_movies.svg',
'filled/maps/local_offer.svg',
'filled/maps/local_parking.svg',
'filled/maps/local_pharmacy.svg',
'filled/maps/local_phone.svg',
'filled/maps/local_pizza.svg',
'filled/maps/local_play.svg',
'filled/maps/local_post_office.svg',
'filled/maps/local_printshop.svg',
'filled/maps/local_see.svg',
'filled/maps/local_shipping.svg',
'filled/maps/local_taxi.svg',
'filled/maps/map.svg',
'filled/maps/my_location.svg',
'filled/maps/navigation.svg',
'filled/maps/near_me.svg',
'filled/maps/person_pin.svg',
'filled/maps/person_pin_circle.svg',
'filled/maps/pin_drop.svg',
'filled/maps/place.svg',
'filled/maps/rate_review.svg',
'filled/maps/restaurant.svg',
'filled/maps/restaurant_menu.svg',
'filled/maps/satellite.svg',
'filled/maps/store_mall_directory.svg',
'filled/maps/streetview.svg',
'filled/maps/subway.svg',
'filled/maps/terrain.svg',
'filled/maps/traffsvg.svg',
'filled/maps/train.svg',
'filled/maps/tram.svg',
'filled/maps/transfer_within_a_station.svg',
'filled/maps/zoom_out_map.svg',
'filled/navigation/apps.svg',
'filled/navigation/arrow_back.svg',
'filled/navigation/arrow_downward.svg',
'filled/navigation/arrow_drop_down.svg',
'filled/navigation/arrow_drop_down_circle.svg',
'filled/navigation/arrow_drop_up.svg',
'filled/navigation/arrow_forward.svg',
'filled/navigation/arrow_upward.svg',
'filled/navigation/cancel.svg',
'filled/navigation/check.svg',
'filled/navigation/chevron_left.svg',
'filled/navigation/chevron_right.svg',
'filled/navigation/close.svg',
'filled/navigation/expand_less.svg',
'filled/navigation/expand_more.svg',
'filled/navigation/first_page.svg',
'filled/navigation/fullscreen.svg',
'filled/navigation/fullscreen_exit.svg',
'filled/navigation/last_page.svg',
'filled/navigation/menu.svg',
'filled/navigation/more_horiz.svg',
'filled/navigation/more_vert.svg',
'filled/navigation/refresh.svg',
'filled/navigation/subdirectory_arrow_left.svg',
'filled/navigation/subdirectory_arrow_right.svg',
'filled/navigation/unfold_less.svg',
'filled/navigation/unfold_more.svg',
'filled/notification/adb.svg',
'filled/notification/airline_seat_flat.svg',
'filled/notification/airline_seat_flat_angled.svg',
'filled/notification/airline_seat_individual_suite.svg',
'filled/notification/airline_seat_legroom_extra.svg',
'filled/notification/airline_seat_legroom_normal.svg',
'filled/notification/airline_seat_legroom_reduced.svg',
'filled/notification/airline_seat_recline_extra.svg',
'filled/notification/airline_seat_recline_normal.svg',
'filled/notification/bluetooth_audio.svg',
'filled/notification/confirmation_number.svg',
'filled/notification/disc_full.svg',
'filled/notification/do_not_disturb.svg',
'filled/notification/do_not_disturb_alt.svg',
'filled/notification/do_not_disturb_off.svg',
'filled/notification/do_not_disturb_on.svg',
'filled/notification/drive_eta.svg',
'filled/notification/enhanced_encryption.svg',
'filled/notification/event_available.svg',
'filled/notification/event_busy.svg',
'filled/notification/event_note.svg',
'filled/notification/folder_special.svg',
'filled/notification/live_tv.svg',
'filled/notification/mms.svg',
'filled/notification/more.svg',
'filled/notification/network_check.svg',
'filled/notification/network_locked.svg',
'filled/notification/no_encryption.svg',
'filled/notification/ondemand_video.svg',
'filled/notification/personal_video.svg',
'filled/notification/phone_bluetooth_speaker.svg',
'filled/notification/phone_forwarded.svg',
'filled/notification/phone_in_talk.svg',
'filled/notification/phone_locked.svg',
'filled/notification/phone_missed.svg',
'filled/notification/phone_paused.svg',
'filled/notification/power.svg',
'filled/notification/priority_high.svg',
'filled/notification/rv_hookup.svg',
'filled/notification/sd_card.svg',
'filled/notification/sim_card_alert.svg',
'filled/notification/sms.svg',
'filled/notification/sms_failed.svg',
'filled/notification/sync.svg',
'filled/notification/sync_disabled.svg',
'filled/notification/sync_problem.svg',
'filled/notification/system_update.svg',
'filled/notification/tap_and_play.svg',
'filled/notification/time_to_leave.svg',
'filled/notification/vibration.svg',
'filled/notification/voice_chat.svg',
'filled/notification/vpn_lock.svg',
'filled/notification/wc.svg',
'filled/notification/wifi.svg',
'filled/places/ac_unit.svg',
'filled/places/airport_shuttle.svg',
'filled/places/all_inclusive.svg',
'filled/places/beach_access.svg',
'filled/places/business_center.svg',
'filled/places/casino.svg',
'filled/places/child_care.svg',
'filled/places/child_friendly.svg',
'filled/places/fitness_center.svg',
'filled/places/free_breakfast.svg',
'filled/places/golf_course.svg',
'filled/places/hot_tub.svg',
'filled/places/kitchen.svg',
'filled/places/pool.svg',
'filled/places/room_service.svg',
'filled/places/rv_hookup.svg',
'filled/places/smoke_free.svg',
'filled/places/smoking_rooms.svg',
'filled/places/spa.svg',
'filled/social/cake.svg',
'filled/social/domain.svg',
'filled/social/group.svg',
'filled/social/group_add.svg',
'filled/social/location_city.svg',
'filled/social/mood.svg',
'filled/social/mood_bad.svg',
'filled/social/notifications.svg',
'filled/social/notifications_active.svg',
'filled/social/notifications_none.svg',
'filled/social/notifications_off.svg',
'filled/social/notifications_paused.svg',
'filled/social/pages.svg',
'filled/social/party_mode.svg',
'filled/social/people.svg',
'filled/social/people_outline.svg',
'filled/social/person.svg',
'filled/social/person_add.svg',
'filled/social/person_outline.svg',
'filled/social/plus_one.svg',
'filled/social/poll.svg',
'filled/social/publ24px.svg',
'filled/social/school.svg',
'filled/social/sentiment_dissatisfied.svg',
'filled/social/sentiment_neutral.svg',
'filled/social/sentiment_satisfied.svg',
'filled/social/sentiment_very_dissatisfied.svg',
'filled/social/sentiment_very_satisfied.svg',
'filled/social/share.svg',
'filled/social/whatshot.svg',
'filled/toggle/check_box.svg',
'filled/toggle/check_box_outline_blank.svg',
'filled/toggle/indeterminate_check_box.svg',
'filled/toggle/radio_button_checked.svg',
'filled/toggle/radio_button_unchecked.svg',
'filled/toggle/star.svg',
'filled/toggle/star_border.svg',
'filled/toggle/star_half.svg'
]
},
{
nameSpace: 'outlined',
list: [
'outlined/action/3d_rotation.svg',
'outlined/action/accessibility.svg',
'outlined/action/accessibility_new.svg',
'outlined/action/accessible.svg',
'outlined/action/accessible_forward.svg',
'outlined/action/account_balance.svg',
'outlined/action/account_balance_wallet.svg',
'outlined/action/account_box.svg',
'outlined/action/account_circle.svg',
'outlined/action/add_shopping_cart.svg',
'outlined/action/alarm.svg',
'outlined/action/alarm_add.svg',
'outlined/action/alarm_off.svg',
'outlined/action/alarm_on.svg',
'outlined/action/all_inbox.svg',
'outlined/action/all_out.svg',
'outlined/action/announcement.svg',
'outlined/action/arrow_right_alt.svg',
'outlined/action/aspect_ratio.svg',
'outlined/action/assessment.svg',
'outlined/action/assignment.svg',
'outlined/action/assignment_ind.svg',
'outlined/action/assignment_late.svg',
'outlined/action/assignment_return.svg',
'outlined/action/assignment_returned.svg',
'outlined/action/assignment_turned_in.svg',
'outlined/action/autorenew.svg',
'outlined/action/backup.svg',
'outlined/action/book.svg',
'outlined/action/bookmarks.svg',
'outlined/action/bookmark_border.svg',
'outlined/action/bug_report.svg',
'outlined/action/build.svg',
'outlined/action/cached.svg',
'outlined/action/calendar_today.svg',
'outlined/action/calendar_view_day.svg',
'outlined/action/camera_enhance.svg',
'outlined/action/card_giftcard.svg',
'outlined/action/card_membership.svg',
'outlined/action/card_travel.svg',
'outlined/action/change_history.svg',
'outlined/action/check_circle.svg',
'outlined/action/check_circle_outline.svg',
'outlined/action/chrome_reader_mode.svg',
'outlined/action/class.svg',
'outlined/action/code.svg',
'outlined/action/commute.svg',
'outlined/action/compare_arrows.svg',
'outlined/action/contact_support.svg',
'outlined/action/copyright.svg',
'outlined/action/credit_card.svg',
'outlined/action/dashboard.svg',
'outlined/action/date_range.svg',
'outlined/action/delete.svg',
'outlined/action/delete_forever.svg',
'outlined/action/delete_outline.svg',
'outlined/action/description.svg',
'outlined/action/dns.svg',
'outlined/action/done.svg',
'outlined/action/done_all.svg',
'outlined/action/done_outline.svg',
'outlined/action/donut_large.svg',
'outlined/action/donut_small.svg',
'outlined/action/drag_indicator.svg',
'outlined/action/eject.svg',
'outlined/action/euro_symbol.svg',
'outlined/action/event.svg',
'outlined/action/event_seat.svg',
'outlined/action/exit_to_app.svg',
'outlined/action/explore.svg',
'outlined/action/explore_off (1).svg',
'outlined/action/explore_off.svg',
'outlined/action/extension (1).svg',
'outlined/action/extension.svg',
'outlined/action/face (1).svg',
'outlined/action/face.svg',
'outlined/action/favorite.svg',
'outlined/action/favorite_border.svg',
'outlined/action/flip_to_front.svg',
'outlined/action/gavel.svg',
'outlined/action/get_app.svg',
'outlined/action/gif.svg',
'outlined/action/grade.svg',
'outlined/action/group_work.svg',
'outlined/action/g_translate.svg',
'outlined/action/help_outline.svg',
'outlined/action/highlight_off.svg',
'outlined/action/history.svg',
'outlined/action/home.svg',
'outlined/action/horizontal_split.svg',
'outlined/action/hourglass_empty.svg',
'outlined/action/hourglass_full.svg',
'outlined/action/http.svg',
'outlined/action/https.svg',
'outlined/action/important_devices.svg',
'outlined/action/info.svg',
'outlined/action/input.svg',
'outlined/action/invert_colors.svg',
'outlined/action/label.svg',
'outlined/action/label_important.svg',
'outlined/action/label_off.svg',
'outlined/action/language.svg',
'outlined/action/note_add.svg',
'outlined/action/offline_bolt.svg',
'outlined/action/offline_pin.svg',
'outlined/action/opacity.svg',
'outlined/action/open_in_browser.svg',
'outlined/action/open_in_new.svg',
'outlined/action/open_with.svg',
'outlined/action/pageview.svg',
'outlined/action/pan_tool.svg',
'outlined/action/payment.svg',
'outlined/action/perm_camera_mic.svg',
'outlined/action/perm_contact_calendar.svg',
'outlined/action/perm_data_setting.svg',
'outlined/action/perm_device_information.svg',
'outlined/action/perm_identity.svg',
'outlined/action/perm_media.svg',
'outlined/action/perm_phone_msg.svg',
'outlined/action/perm_scan_wifi.svg',
'outlined/action/pets.svg',
'outlined/action/picture_in_picture.svg',
'outlined/action/picture_in_picture_alt.svg',
'outlined/action/play_for_work.svg',
'outlined/action/polymer.svg',
'outlined/action/power_settings_new.svg',
'outlined/action/pregnant_woman.svg',
'outlined/action/print.svg',
'outlined/action/query_builder.svg',
'outlined/action/question_answer.svg',
'outlined/action/receipt.svg',
'outlined/action/record_voice_over.svg',
'outlined/action/redeem.svg',
'outlined/action/remove_shopping_cart.svg',
'outlined/action/reorder.svg',
'outlined/action/report_problem.svg',
'outlined/action/restore.svg',
'outlined/action/restore_from_trash.svg',
'outlined/action/restore_page.svg',
'outlined/action/room.svg',
'outlined/action/rounded_corner.svg',
'outlined/action/rowing.svg',
'outlined/action/schedule.svg',
'outlined/action/search.svg',
'outlined/action/settings.svg',
'outlined/action/settings_applications.svg',
'outlined/action/settings_backup_restore.svg',
'outlined/action/settings_bluetooth.svg',
'outlined/action/settings_brightness.svg',
'outlined/action/settings_cell.svg',
'outlined/action/settings_ethernet.svg',
'outlined/action/settings_input_antenna.svg',
'outlined/action/settings_input_component.svg',
'outlined/action/settings_input_composite.svg',
'outlined/action/settings_input_hdmi.svg',
'outlined/action/settings_input_svideo.svg',
'outlined/action/settings_overscan.svg',
'outlined/action/settings_phone.svg',
'outlined/action/settings_power.svg',
'outlined/action/settings_remote.svg',
'outlined/action/settings_voice.svg',
'outlined/action/shop.svg',
'outlined/action/shopping_basket.svg',
'outlined/action/shopping_cart.svg',
'outlined/action/shop_two.svg',
'outlined/action/speaker_notes.svg',
'outlined/action/speaker_notes_off.svg',
'outlined/action/spellcheck.svg',
'outlined/action/stars.svg',
'outlined/action/star_rate-18px.svg',
'outlined/action/store.svg',
'outlined/action/subject.svg',
'outlined/action/supervised_user_circle.svg',
'outlined/action/supervisor_account.svg',
'outlined/action/swap_horiz.svg',
'outlined/action/swap_horizontal_circle.svg',
'outlined/action/swap_vert.svg',
'outlined/action/swap_vertical_circle.svg',
'outlined/action/tab.svg',
'outlined/action/tab_unselected.svg',
'outlined/action/text_rotate_up.svg',
'outlined/action/text_rotate_vertical.svg',
'outlined/action/text_rotation_down.svg',
'outlined/action/text_rotation_none.svg',
'outlined/action/theaters.svg',
'outlined/action/thumbs_up_down.svg',
'outlined/action/thumb_down.svg',
'outlined/action/thumb_up.svg',
'outlined/action/timeline.svg',
'outlined/action/toc.svg',
'outlined/action/today.svg',
'outlined/action/toll.svg',
'outlined/action/touch_app.svg',
'outlined/action/track_changes.svg',
'outlined/action/translate.svg',
'outlined/action/trending_down.svg',
'outlined/action/trending_flat.svg',
'outlined/action/trending_up.svg',
'outlined/action/turned_in.svg',
'outlined/action/turned_in_not.svg',
'outlined/action/update.svg',
'outlined/action/verified_user.svg',
'outlined/action/vertical_split.svg',
'outlined/action/view_agenda.svg',
'outlined/action/view_array.svg',
'outlined/action/view_carousel.svg',
'outlined/action/view_column.svg',
'outlined/action/view_day.svg',
'outlined/action/view_headline.svg',
'outlined/action/view_list.svg',
'outlined/action/view_module.svg',
'outlined/action/view_quilt.svg',
'outlined/action/view_stream.svg',
'outlined/action/view_week.svg',
'outlined/action/visibility.svg',
'outlined/action/visibility_off.svg',
'outlined/action/voice_over_off.svg',
'outlined/action/watch_later.svg',
'outlined/action/work.svg',
'outlined/action/work_off.svg',
'outlined/action/work_outline.svg',
'outlined/action/youtube_searched_for.svg',
'outlined/action/zoom_in.svg',
'outlined/action/zoom_out.svg',
'outlined/alert/add_alert.svg',
'outlined/alert/error_outline.svg',
'outlined/alert/notification_important.svg',
'outlined/av/4k.svg',
'outlined/av/add_to_queue.svg',
'outlined/av/airplay.svg',
'outlined/av/album.svg',
'outlined/av/art_track.svg',
'outlined/av/av_timer.svg',
'outlined/av/branding_watermark.svg',
'outlined/av/call_to_action.svg',
'outlined/av/closed_caption.svg',
'outlined/av/control_camera.svg',
'outlined/av/equalizer.svg',
'outlined/av/explicit.svg',
'outlined/av/fast_forward.svg',
'outlined/av/fast_rewind.svg',
'outlined/av/featured_play_list.svg',
'outlined/av/featured_video.svg',
'outlined/av/fiber_dvr.svg',
'outlined/av/fiber_manual_record.svg',
'outlined/av/fiber_new.svg',
'outlined/av/fiber_pin.svg',
'outlined/av/fiber_smart_record.svg',
'outlined/av/forward_10.svg',
'outlined/av/forward_30.svg',
'outlined/av/forward_5.svg',
'outlined/av/games.svg',
'outlined/av/hd.svg',
'outlined/av/hearing.svg',
'outlined/av/high_quality.svg',
'outlined/av/library_add.svg',
'outlined/av/library_books.svg',
'outlined/av/library_music.svg',
'outlined/av/loop.svg',
'outlined/av/mic.svg',
'outlined/av/mic_none.svg',
'outlined/av/mic_off.svg',
'outlined/av/missed_video_call.svg',
'outlined/av/movie.svg',
'outlined/av/music_video.svg',
'outlined/av/new_releases.svg',
'outlined/av/note.svg',
'outlined/av/not_interested.svg',
'outlined/av/pause.svg',
'outlined/av/pause_circle_filled.svg',
'outlined/av/pause_circle_outline.svg',
'outlined/av/playlist_add.svg',
'outlined/av/playlist_add_check.svg',
'outlined/av/playlist_play.svg',
'outlined/av/play_arrow.svg',
'outlined/av/play_circle_filled.svg',
'outlined/av/play_circle_filled_white.svg',
'outlined/av/play_circle_outline.svg',
'outlined/av/queue.svg',
'outlined/av/queue_music.svg',
'outlined/av/queue_play_next.svg',
'outlined/av/radio.svg',
'outlined/av/recent_actors.svg',
'outlined/av/remove_from_queue.svg',
'outlined/av/repeat.svg',
'outlined/av/repeat_one.svg',
'outlined/av/replay.svg',
'outlined/av/replay_10.svg',
'outlined/av/replay_30.svg',
'outlined/av/replay_5.svg',
'outlined/av/shuffle.svg',
'outlined/av/skip_next.svg',
'outlined/av/skip_previous.svg',
'outlined/av/slow_motion_video.svg',
'outlined/av/snooze.svg',
'outlined/av/sort_by_alpha.svg',
'outlined/av/stop.svg',
'outlined/av/subscriptions.svg',
'outlined/av/subtitles.svg',
'outlined/av/surround_sound.svg',
'outlined/av/videocam.svg',
'outlined/av/videocam_off.svg',
'outlined/av/video_call.svg',
'outlined/av/video_label.svg',
'outlined/av/video_library.svg',
'outlined/av/volume_down.svg',
'outlined/av/volume_mute.svg',
'outlined/av/volume_off.svg',
'outlined/av/volume_up.svg',
'outlined/av/web.svg',
'outlined/av/web_asset.svg',
'outlined/communication/alternate_email.svg',
'outlined/communication/business.svg',
'outlined/communication/call.svg',
'outlined/communication/call_end.svg',
'outlined/communication/call_made.svg',
'outlined/communication/call_merge.svg',
'outlined/communication/call_missed.svg',
'outlined/communication/call_missed_outgoing.svg',
'outlined/communication/call_received.svg',
'outlined/communication/call_split.svg',
'outlined/communication/cancel_presentation.svg',
'outlined/communication/cell_wifi.svg',
'outlined/communication/chat.svg',
'outlined/communication/chat_bubble.svg',
'outlined/communication/chat_bubble_outline.svg',
'outlined/communication/clear_all.svg',
'outlined/communication/comment.svg',
'outlined/communication/contacts.svg',
'outlined/communication/contact_mail.svg',
'outlined/communication/contact_phone.svg',
'outlined/communication/desktop_access_disabled.svg',
'outlined/communication/dialer_sip.svg',
'outlined/communication/dialpad.svg',
'outlined/communication/domain_disabled.svg',
'outlined/communication/duo.svg',
'outlined/communication/email.svg',
'outlined/communication/forum.svg',
'outlined/communication/import_contacts.svg',
'outlined/communication/import_export.svg',
'outlined/communication/invert_colors_off.svg',
'outlined/communication/list_alt.svg',
'outlined/communication/live_help.svg',
'outlined/communication/location_off.svg',
'outlined/communication/location_on.svg',
'outlined/communication/mail_outline.svg',
'outlined/communication/message.svg',
'outlined/communication/mobile_screen_share.svg',
'outlined/communication/no_sim.svg',
'outlined/communication/pause_presentation.svg',
'outlined/communication/person_add_disabled.svg',
'outlined/communication/phone.svg',
'outlined/communication/phonelink_erase.svg',
'outlined/communication/phonelink_lock.svg',
'outlined/communication/phonelink_ring.svg',
'outlined/communication/phonelink_setup.svg',
'outlined/communication/portable_wifi_off.svg',
'outlined/communication/present_to_all.svg',
'outlined/communication/print_disabled.svg',
'outlined/communication/ring_volume.svg',
'outlined/communication/rss_feed.svg',
'outlined/communication/screen_share.svg',
'outlined/communication/sentiment_satisfied_alt.svg',
'outlined/communication/speaker_phone.svg',
'outlined/communication/stay_current_landscape.svg',
'outlined/communication/stay_current_portrait.svg',
'outlined/communication/stay_primary_landscape.svg',
'outlined/communication/stay_primary_portrait.svg',
'outlined/communication/stop_screen_share.svg',
'outlined/communication/swap_calls.svg',
'outlined/communication/textsms.svg',
'outlined/communication/unsubscribe.svg',
'outlined/communication/voicemail.svg',
'outlined/communication/vpn_key.svg',
'outlined/content/add.svg',
'outlined/content/add_box.svg',
'outlined/content/add_circle.svg',
'outlined/content/add_circle_outline.svg',
'outlined/content/archive.svg',
'outlined/content/backspace.svg',
'outlined/content/ballot.svg',
'outlined/content/block.svg',
'outlined/content/clear.svg',
'outlined/content/create.svg',
'outlined/content/delete_sweep.svg',
'outlined/content/drafts.svg',
'outlined/content/file_copy.svg',
'outlined/content/filter_list.svg',
'outlined/content/flag.svg',
'outlined/content/font_download.svg',
'outlined/content/forward.svg',
'outlined/content/gesture.svg',
'outlined/content/how_to_reg.svg',
'outlined/content/how_to_vote.svg',
'outlined/content/inbox.svg',
'outlined/content/link.svg',
'outlined/content/link_off.svg',
'outlined/content/low_priority.svg',
'outlined/content/mail.svg',
'outlined/content/markunread.svg',
'outlined/content/move_to_inbox.svg',
'outlined/content/next_week.svg',
'outlined/content/outlined_flag.svg',
'outlined/content/redo.svg',
'outlined/content/remove.svg',
'outlined/content/remove_circle.svg',
'outlined/content/remove_circle_outline.svg',
'outlined/content/reply.svg',
'outlined/content/reply_all.svg',
'outlined/content/report.svg',
'outlined/content/report_off.svg',
'outlined/content/save.svg',
'outlined/content/save_alt.svg',
'outlined/content/select_all.svg',
'outlined/content/send.svg',
'outlined/content/sort.svg',
'outlined/content/text_format.svg',
'outlined/content/unarchive.svg',
'outlined/content/undo.svg',
'outlined/content/waves.svg',
'outlined/content/weekend.svg',
'outlined/content/where_to_vote.svg',
'outlined/device/access_alarm.svg',
'outlined/device/access_alarms.svg',
'outlined/device/access_time.svg',
'outlined/device/add_alarm.svg',
'outlined/device/add_to_home_screen.svg',
'outlined/device/airplanemode_active.svg',
'outlined/device/airplanemode_inactive.svg',
'outlined/device/battery_20.svg',
'outlined/device/battery_30.svg',
'outlined/device/battery_50.svg',
'outlined/device/battery_60.svg',
'outlined/device/battery_80.svg',
'outlined/device/battery_90.svg',
'outlined/device/battery_alert.svg',
'outlined/device/battery_charging_20.svg',
'outlined/device/battery_charging_30.svg',
'outlined/device/battery_charging_50.svg',
'outlined/device/battery_charging_60.svg',
'outlined/device/battery_charging_80.svg',
'outlined/device/battery_charging_90.svg',
'outlined/device/battery_charging_full.svg',
'outlined/device/battery_full.svg',
'outlined/device/battery_std.svg',
'outlined/device/battery_unknown.svg',
'outlined/device/bluetooth.svg',
'outlined/device/bluetooth_connected.svg',
'outlined/device/bluetooth_disabled.svg',
'outlined/device/bluetooth_searching.svg',
'outlined/device/brightness_auto.svg',
'outlined/device/brightness_high.svg',
'outlined/device/brightness_low.svg',
'outlined/device/brightness_medium.svg',
'outlined/device/data_usage.svg',
'outlined/device/developer_mode.svg',
'outlined/device/devices.svg',
'outlined/device/dvr.svg',
'outlined/device/gps_fixed.svg',
'outlined/device/gps_not_fixed.svg',
'outlined/device/gps_off.svg',
'outlined/device/graphic_eq.svg',
'outlined/device/location_disabled.svg',
'outlined/device/location_searching.svg',
'outlined/device/mobile_friendly.svg',
'outlined/device/mobile_off.svg',
'outlined/device/network_cell.svg',
'outlined/device/network_wifi.svg',
'outlined/device/nfc.svg',
'outlined/device/screen_lock_landscape.svg',
'outlined/device/screen_lock_portrait.svg',
'outlined/device/screen_lock_rotation.svg',
'outlined/device/screen_rotation.svg',
'outlined/device/sd_storage.svg',
'outlined/device/settings_system_daydream.svg',
'outlined/device/signal_cellular_0_bar.svg',
'outlined/device/signal_cellular_1_bar.svg',
'outlined/device/signal_cellular_2_bar.svg',
'outlined/device/signal_cellular_3_bar.svg',
'outlined/device/signal_cellular_4_bar.svg',
'outlined/device/signal_cellular_alt.svg',
'outlined/device/signal_cellular_connected_no_internet_0_bar.svg',
'outlined/device/signal_cellular_connected_no_internet_1_bar.svg',
'outlined/device/signal_cellular_connected_no_internet_2_bar.svg',
'outlined/device/signal_cellular_connected_no_internet_3_bar.svg',
'outlined/device/signal_cellular_connected_no_internet_4_bar.svg',
'outlined/device/signal_cellular_no_sim.svg',
'outlined/device/signal_cellular_null.svg',
'outlined/device/signal_cellular_off.svg',
'outlined/device/signal_wifi_0_bar.svg',
'outlined/device/signal_wifi_1_bar.svg',
'outlined/device/signal_wifi_1_bar_lock.svg',
'outlined/device/signal_wifi_2_bar.svg',
'outlined/device/signal_wifi_2_bar_lock.svg',
'outlined/device/signal_wifi_3_bar.svg',
'outlined/device/signal_wifi_3_bar_lock.svg',
'outlined/device/signal_wifi_4_bar.svg',
'outlined/device/signal_wifi_4_bar_lock.svg',
'outlined/device/signal_wifi_off.svg',
'outlined/device/storage.svg',
'outlined/device/usb.svg',
'outlined/device/wallpaper.svg',
'outlined/device/widgets.svg',
'outlined/device/wifi_lock.svg',
'outlined/device/wifi_tethering.svg',
'outlined/editor/add_comment.svg',
'outlined/editor/attach_file.svg',
'outlined/editor/attach_money.svg',
'outlined/editor/bar_chart.svg',
'outlined/editor/border_all.svg',
'outlined/editor/border_bottom.svg',
'outlined/editor/border_clear.svg',
'outlined/editor/border_color.svg',
'outlined/editor/border_horizontal.svg',
'outlined/editor/border_inner.svg',
'outlined/editor/border_left.svg',
'outlined/editor/border_outer.svg',
'outlined/editor/border_right.svg',
'outlined/editor/border_style.svg',
'outlined/editor/border_top.svg',
'outlined/editor/border_vertical.svg',
'outlined/editor/bubble_chart.svg',
'outlined/editor/drag_handle.svg',
'outlined/editor/format_align_center.svg',
'outlined/editor/format_align_justify.svg',
'outlined/editor/format_align_left.svg',
'outlined/editor/format_align_right.svg',
'outlined/editor/format_bold.svg',
'outlined/editor/format_clear.svg',
'outlined/editor/format_color_fill.svg',
'outlined/editor/format_color_reset.svg',
'outlined/editor/format_color_text.svg',
'outlined/editor/format_indent_decrease.svg',
'outlined/editor/format_indent_increase.svg',
'outlined/editor/format_italic.svg',
'outlined/editor/format_line_spacing.svg',
'outlined/editor/format_list_bulleted.svg',
'outlined/editor/format_list_numbered.svg',
'outlined/editor/format_list_numbered_rtl.svg',
'outlined/editor/format_paint.svg',
'outlined/editor/format_quote.svg',
'outlined/editor/format_shapes.svg',
'outlined/editor/format_size.svg',
'outlined/editor/format_strikethrough.svg',
'outlined/editor/format_textdirection_l_to_r.svg',
'outlined/editor/format_textdirection_r_to_l.svg',
'outlined/editor/format_underlined.svg',
'outlined/editor/functions.svg',
'outlined/editor/highlight.svg',
'outlined/editor/insert_chart.svg',
'outlined/editor/insert_chart_outlined.svg',
'outlined/editor/insert_comment.svg',
'outlined/editor/insert_drive_file.svg',
'outlined/editor/insert_emoticon.svg',
'outlined/editor/insert_invitation.svg',
'outlined/editor/insert_link.svg',
'outlined/editor/insert_photo.svg',
'outlined/editor/linear_scale.svg',
'outlined/editor/merge_type.svg',
'outlined/editor/mode_comment.svg',
'outlined/editor/monetization_on.svg',
'outlined/editor/money_off.svg',
'outlined/editor/multiline_chart.svg',
'outlined/editor/notes.svg',
'outlined/editor/pie_chart.svg',
'outlined/editor/publish.svg',
'outlined/editor/scatter_plot.svg',
'outlined/editor/score.svg',
'outlined/editor/short_text.svg',
'outlined/editor/show_chart.svg',
'outlined/editor/space_bar.svg',
'outlined/editor/strikethrough_s.svg',
'outlined/editor/table_chart.svg',
'outlined/editor/text_fields.svg',
'outlined/editor/title.svg',
'outlined/editor/vertical_align_bottom.svg',
'outlined/editor/vertical_align_center.svg',
'outlined/editor/vertical_align_top.svg',
'outlined/editor/wrap_text.svg',
'outlined/fill/attachment.svg',
'outlined/fill/cloud.svg',
'outlined/fill/cloud_circle.svg',
'outlined/fill/cloud_done.svg',
'outlined/fill/cloud_download.svg',
'outlined/fill/cloud_off.svg',
'outlined/fill/cloud_queue.svg',
'outlined/fill/cloud_upload.svg',
'outlined/fill/create_new_folder.svg',
'outlined/fill/folder.svg',
'outlined/fill/folder_open.svg',
'outlined/fill/folder_shared.svg',
'outlined/hardware/cast.svg',
'outlined/hardware/cast_connected.svg',
'outlined/hardware/cast_for_education.svg',
'outlined/hardware/computer.svg',
'outlined/hardware/desktop_mac.svg',
'outlined/hardware/desktop_windows.svg',
'outlined/hardware/developer_board.svg',
'outlined/hardware/devices_other.svg',
'outlined/hardware/device_hub.svg',
'outlined/hardware/device_unknown.svg',
'outlined/hardware/dock.svg',
'outlined/hardware/gamepad.svg',
'outlined/hardware/headset.svg',
'outlined/hardware/headset_mic.svg',
'outlined/hardware/keyboard.svg',
'outlined/hardware/keyboard_arrow_down.svg',
'outlined/hardware/keyboard_arrow_left.svg',
'outlined/hardware/keyboard_arrow_right.svg',
'outlined/hardware/keyboard_arrow_up.svg',
'outlined/hardware/keyboard_backspace.svg',
'outlined/hardware/keyboard_capslock.svg',
'outlined/hardware/keyboard_hide.svg',
'outlined/hardware/keyboard_return.svg',
'outlined/hardware/keyboard_tab.svg',
'outlined/hardware/keyboard_voice.svg',
'outlined/hardware/laptop.svg',
'outlined/hardware/laptop_chromebook.svg',
'outlined/hardware/laptop_mac.svg',
'outlined/hardware/laptop_windows.svg',
'outlined/hardware/memory.svg',
'outlined/hardware/mouse.svg',
'outlined/hardware/phonelink.svg',
'outlined/hardware/phonelink_off.svg',
'outlined/hardware/phone_android.svg',
'outlined/hardware/phone_iphone.svg',
'outlined/hardware/power_input.svg',
'outlined/hardware/router.svg',
'outlined/hardware/scanner.svg',
'outlined/hardware/security.svg',
'outlined/hardware/sim_card.svg',
'outlined/hardware/smartphone.svg',
'outlined/hardware/speaker.svg',
'outlined/hardware/speaker_group.svg',
'outlined/hardware/tablet.svg',
'outlined/hardware/tablet_android.svg',
'outlined/hardware/tablet_mac.svg',
'outlined/hardware/toys.svg',
'outlined/hardware/tv.svg',
'outlined/hardware/videogame_asset.svg',
'outlined/hardware/watch.svg',
'outlined/image/add_a_photo.svg',
'outlined/image/add_photo_alternate.svg',
'outlined/image/add_to_photos.svg',
'outlined/image/adjust.svg',
'outlined/image/assistant.svg',
'outlined/image/assistant_photo.svg',
'outlined/image/audiotrack.svg',
'outlined/image/blur_circular.svg',
'outlined/image/blur_linear.svg',
'outlined/image/blur_off.svg',
'outlined/image/blur_on.svg',
'outlined/image/brightness_1.svg',
'outlined/image/brightness_2.svg',
'outlined/image/brightness_3.svg',
'outlined/image/brightness_4.svg',
'outlined/image/brightness_5.svg',
'outlined/image/brightness_6.svg',
'outlined/image/brightness_7.svg',
'outlined/image/broken_image.svg',
'outlined/image/brush.svg',
'outlined/image/burst_mode.svg',
'outlined/image/camera.svg',
'outlined/image/camera_alt.svg',
'outlined/image/camera_front.svg',
'outlined/image/camera_rear.svg',
'outlined/image/camera_roll.svg',
'outlined/image/center_focus_strong.svg',
'outlined/image/center_focus_weak.svg',
'outlined/image/collections.svg',
'outlined/image/collections_bookmark.svg',
'outlined/image/colorize.svg',
'outlined/image/color_lens.svg',
'outlined/image/compare.svg',
'outlined/image/control_point.svg',
'outlined/image/control_point_duplicate.svg',
'outlined/image/crop.svg',
'outlined/image/crop_16_9.svg',
'outlined/image/crop_3_2.svg',
'outlined/image/crop_5_4.svg',
'outlined/image/crop_7_5.svg',
'outlined/image/crop_din.svg',
'outlined/image/crop_free.svg',
'outlined/image/crop_landscape.svg',
'outlined/image/crop_original.svg',
'outlined/image/crop_portrait.svg',
'outlined/image/crop_rotate.svg',
'outlined/image/crop_square.svg',
'outlined/image/details.svg',
'outlined/image/edit.svg',
'outlined/image/exposure.svg',
'outlined/image/exposure_neg_1.svg',
'outlined/image/exposure_neg_2.svg',
'outlined/image/exposure_plus_1.svg',
'outlined/image/exposure_plus_2.svg',
'outlined/image/exposure_zero.svg',
'outlined/image/filter.svg',
'outlined/image/filter_1.svg',
'outlined/image/filter_2.svg',
'outlined/image/filter_3.svg',
'outlined/image/filter_4.svg',
'outlined/image/filter_5.svg',
'outlined/image/filter_6.svg',
'outlined/image/filter_7.svg',
'outlined/image/filter_8.svg',
'outlined/image/filter_9.svg',
'outlined/image/filter_9_plus.svg',
'outlined/image/filter_b_and_w.svg',
'outlined/image/filter_center_focus.svg',
'outlined/image/filter_drama.svg',
'outlined/image/filter_frames.svg',
'outlined/image/filter_hdr.svg',
'outlined/image/filter_none.svg',
'outlined/image/filter_tilt_shift.svg',
'outlined/image/filter_vintage.svg',
'outlined/image/flare.svg',
'outlined/image/flash_auto.svg',
'outlined/image/flash_off.svg',
'outlined/image/flash_on.svg',
'outlined/image/flip.svg',
'outlined/image/gradient.svg',
'outlined/image/grain.svg',
'outlined/image/grid_off.svg',
'outlined/image/grid_on.svg',
'outlined/image/hdr_off.svg',
'outlined/image/hdr_on.svg',
'outlined/image/hdr_strong.svg',
'outlined/image/hdr_weak.svg',
'outlined/image/healing.svg',
'outlined/image/image.svg',
'outlined/image/image_aspect_ratio.svg',
'outlined/image/image_search.svg',
'outlined/image/iso.svg',
'outlined/image/landscape.svg',
'outlined/image/leak_add.svg',
'outlined/image/leak_remove.svg',
'outlined/image/lens.svg',
'outlined/image/linked_camera.svg',
'outlined/image/looks.svg',
'outlined/image/looks_3.svg',
'outlined/image/looks_4.svg',
'outlined/image/looks_5.svg',
'outlined/image/looks_6.svg',
'outlined/image/looks_one.svg',
'outlined/image/looks_two.svg',
'outlined/image/loupe.svg',
'outlined/image/monochrome_photos.svg',
'outlined/image/movie_creation.svg',
'outlined/image/movie_filter.svg',
'outlined/image/music_note.svg',
'outlined/image/music_off.svg',
'outlined/image/nature.svg',
'outlined/image/nature_people.svg',
'outlined/image/navigate_before.svg',
'outlined/image/navigate_next.svg',
'outlined/image/palette.svg',
'outlined/image/panorama.svg',
'outlined/image/panorama_fish_eye.svg',
'outlined/image/panorama_horizontal.svg',
'outlined/image/panorama_vertical.svg',
'outlined/image/panorama_wide_angle.svg',
'outlined/image/photo.svg',
'outlined/image/photo_album.svg',
'outlined/image/photo_camera.svg',
'outlined/image/photo_filter.svg',
'outlined/image/photo_library.svg',
'outlined/image/photo_size_select_actual.svg',
'outlined/image/photo_size_select_large.svg',
'outlined/image/photo_size_select_small.svg',
'outlined/image/picture_as_pdf.svg',
'outlined/image/portrait.svg',
'outlined/image/remove_red_eye.svg',
'outlined/image/rotate_90_degrees_ccw.svg',
'outlined/image/rotate_left.svg',
'outlined/image/rotate_right.svg',
'outlined/image/shutter_speed.svg',
'outlined/image/slideshow.svg',
'outlined/image/straighten.svg',
'outlined/image/style.svg',
'outlined/image/switch_camera.svg',
'outlined/image/switch_video.svg',
'outlined/image/tag_faces.svg',
'outlined/image/texture.svg',
'outlined/image/timelapse.svg',
'outlined/image/timer.svg',
'outlined/image/timer_10.svg',
'outlined/image/timer_3.svg',
'outlined/image/timer_off.svg',
'outlined/image/tonality.svg',
'outlined/image/transform.svg',
'outlined/image/tune.svg',
'outlined/image/view_comfy.svg',
'outlined/image/view_compact.svg',
'outlined/image/vignette.svg',
'outlined/image/wb_auto.svg',
'outlined/image/wb_cloudy.svg',
'outlined/image/wb_incandescent.svg',
'outlined/image/wb_iridescent.svg',
'outlined/image/wb_sunny.svg',
'outlined/maps/directions_railway.svg',
'outlined/maps/directions_run.svg',
'outlined/maps/directions_subway.svg',
'outlined/maps/directions_transit.svg',
'outlined/maps/directions_walk.svg',
'outlined/maps/edit_attributes.svg',
'outlined/maps/edit_location.svg',
'outlined/maps/ev_station.svg',
'outlined/maps/fastfood.svg',
'outlined/maps/flight.svg',
'outlined/maps/hotel.svg',
'outlined/maps/layers.svg',
'outlined/maps/layers_clear.svg',
'outlined/maps/local_activity.svg',
'outlined/maps/local_airport.svg',
'outlined/maps/local_atm.svg',
'outlined/maps/local_bar.svg',
'outlined/maps/local_cafe.svg',
'outlined/maps/local_car_wash.svg',
'outlined/maps/local_convenience_store.svg',
'outlined/maps/local_dining.svg',
'outlined/maps/local_drink.svg',
'outlined/maps/local_florist.svg',
'outlined/maps/local_gas_station.svg',
'outlined/maps/local_grocery_store.svg',
'outlined/maps/local_hospital.svg',
'outlined/maps/local_hotel.svg',
'outlined/maps/local_laundry_service.svg',
'outlined/maps/local_library.svg',
'outlined/maps/local_mall.svg',
'outlined/maps/local_movies.svg',
'outlined/maps/local_offer.svg',
'outlined/maps/local_parking.svg',
'outlined/maps/local_pharmacy.svg',
'outlined/maps/local_phone.svg',
'outlined/maps/local_pizza.svg',
'outlined/maps/local_play.svg',
'outlined/maps/local_post_office.svg',
'outlined/maps/local_printshop.svg',
'outlined/maps/local_see.svg',
'outlined/maps/local_shipping.svg',
'outlined/maps/local_taxi.svg',
'outlined/maps/map.svg',
'outlined/maps/money.svg',
'outlined/maps/my_location.svg',
'outlined/maps/navigation.svg',
'outlined/maps/near_me.svg',
'outlined/maps/not_listed_location.svg',
'outlined/maps/person_pin.svg',
'outlined/maps/person_pin_circle.svg',
'outlined/maps/pin_drop.svg',
'outlined/maps/place.svg',
'outlined/maps/rate_review.svg',
'outlined/maps/restaurant.svg',
'outlined/maps/restaurant_menu.svg',
'outlined/maps/satellite.svg',
'outlined/maps/store_mall_directory.svg',
'outlined/maps/streetview.svg',
'outlined/maps/subway.svg',
'outlined/maps/terrain.svg',
'outlined/maps/traffic.svg',
'outlined/maps/train.svg',
'outlined/maps/tram.svg',
'outlined/maps/transfer_within_a_station.svg',
'outlined/maps/transit_enterexit.svg',
'outlined/maps/trip_origin.svg',
'outlined/maps/zoom_out_map.svg',
'outlined/navigation/apps.svg',
'outlined/navigation/arrow_back.svg',
'outlined/navigation/arrow_back_ios.svg',
'outlined/navigation/arrow_downward.svg',
'outlined/navigation/arrow_drop_down.svg',
'outlined/navigation/arrow_drop_down_circle.svg',
'outlined/navigation/arrow_drop_up.svg',
'outlined/navigation/arrow_forward.svg',
'outlined/navigation/arrow_forward_ios.svg',
'outlined/navigation/arrow_left.svg',
'outlined/navigation/arrow_right.svg',
'outlined/navigation/arrow_upward.svg',
'outlined/navigation/cancel.svg',
'outlined/navigation/check.svg',
'outlined/navigation/chevron_left.svg',
'outlined/navigation/chevron_right.svg',
'outlined/navigation/close.svg',
'outlined/navigation/expand_less.svg',
'outlined/navigation/expand_more.svg',
'outlined/navigation/first_page.svg',
'outlined/navigation/fullscreen.svg',
'outlined/navigation/fullscreen_exit.svg',
'outlined/navigation/last_page.svg',
'outlined/navigation/menu.svg',
'outlined/navigation/more_horiz.svg',
'outlined/navigation/more_vert.svg',
'outlined/navigation/refresh.svg',
'outlined/navigation/subdirectory_arrow_left.svg',
'outlined/navigation/subdirectory_arrow_right.svg',
'outlined/navigation/unfold_less.svg',
'outlined/navigation/unfold_more.svg',
'outlined/notification/adb.svg',
'outlined/notification/airline_seat_flat.svg',
'outlined/notification/airline_seat_flat_angled.svg',
'outlined/notification/airline_seat_individual_suite.svg',
'outlined/notification/airline_seat_legroom_extra.svg',
'outlined/notification/airline_seat_legroom_normal.svg',
'outlined/notification/airline_seat_legroom_reduced.svg',
'outlined/notification/airline_seat_recline_extra.svg',
'outlined/notification/airline_seat_recline_normal.svg',
'outlined/notification/bluetooth_audio.svg',
'outlined/notification/confirmation_number.svg',
'outlined/notification/disc_full.svg',
'outlined/notification/drive_eta.svg',
'outlined/notification/enhanced_encryption.svg',
'outlined/notification/event_available.svg',
'outlined/notification/event_busy.svg',
'outlined/notification/event_note.svg',
'outlined/notification/folder_special.svg',
'outlined/notification/live_tv.svg',
'outlined/notification/mms.svg',
'outlined/notification/more.svg',
'outlined/notification/network_check.svg',
'outlined/notification/network_locked.svg',
'outlined/notification/no_encryption.svg',
'outlined/notification/ondemand_video.svg',
'outlined/notification/personal_video.svg',
'outlined/notification/phone_bluetooth_speaker.svg',
'outlined/notification/phone_callback.svg',
'outlined/notification/phone_forwarded.svg',
'outlined/notification/phone_in_talk.svg',
'outlined/notification/phone_locked.svg',
'outlined/notification/phone_missed.svg',
'outlined/notification/phone_paused.svg',
'outlined/notification/power.svg',
'outlined/notification/power_off.svg',
'outlined/notification/priority_high.svg',
'outlined/notification/sd_card.svg',
'outlined/notification/sms.svg',
'outlined/notification/sms_failed.svg',
'outlined/notification/sync.svg',
'outlined/notification/sync_disabled.svg',
'outlined/notification/sync_problem.svg',
'outlined/notification/system_update.svg',
'outlined/notification/tap_and_play.svg',
'outlined/notification/time_to_leave.svg',
'outlined/notification/tv_off.svg',
'outlined/notification/vibration.svg',
'outlined/notification/voice_chat.svg',
'outlined/notification/vpn_lock.svg',
'outlined/notification/wc.svg',
'outlined/notification/wifi.svg',
'outlined/notification/wifi_off.svg',
'outlined/places/ac_unit.svg',
'outlined/places/airport_shuttle.svg',
'outlined/places/all_inclusive.svg',
'outlined/places/beach_access.svg',
'outlined/places/business_center.svg',
'outlined/places/casino.svg',
'outlined/places/child_care.svg',
'outlined/places/child_friendly.svg',
'outlined/places/fitness_center.svg',
'outlined/places/free_breakfast.svg',
'outlined/places/golf_course.svg',
'outlined/places/hot_tub.svg',
'outlined/places/kitchen.svg',
'outlined/places/meeting_room.svg',
'outlined/places/no_meeting_room.svg',
'outlined/places/pool.svg',
'outlined/places/room_service.svg',
'outlined/places/rv_hookup.svg',
'outlined/places/smoke_free.svg',
'outlined/places/smoking_rooms.svg',
'outlined/places/spa.svg',
'outlined/social/cake.svg',
'outlined/social/domain.svg',
'outlined/social/group.svg',
'outlined/social/group_add.svg',
'outlined/social/location_city.svg',
'outlined/social/mood.svg',
'outlined/social/mood_bad.svg',
'outlined/social/notifications.svg',
'outlined/social/notifications_active.svg',
'outlined/social/notifications_none.svg',
'outlined/social/notifications_off.svg',
'outlined/social/notifications_paused.svg',
'outlined/social/pages.svg',
'outlined/social/party_mode.svg',
'outlined/social/people.svg',
'outlined/social/people_outline.svg',
'outlined/social/person.svg',
'outlined/social/person_add.svg',
'outlined/social/person_outline.svg',
'outlined/social/plus_one.svg',
'outlined/social/poll.svg',
'outlined/social/public.svg',
'outlined/social/school.svg',
'outlined/social/sentiment_dissatisfied.svg',
'outlined/social/sentiment_satisfied.svg',
'outlined/social/sentiment_very_dissatisfied.svg',
'outlined/social/sentiment_very_satisfied.svg',
'outlined/social/share.svg',
'outlined/social/thumb_down_alt.svg',
'outlined/social/thumb_up_alt.svg',
'outlined/social/whatshot.svg',
'outlined/toggle/check_box.svg',
'outlined/toggle/check_box_outline_blank.svg',
'outlined/toggle/indeterminate_check_box.svg',
'outlined/toggle/radio_button_checked.svg',
'outlined/toggle/radio_button_unchecked.svg',
'outlined/toggle/star.svg',
'outlined/toggle/star_border.svg',
'outlined/toggle/star_half.svg',
'outlined/toggle/toggle_off.svg',
'outlined/toggle/toggle_on.svg'
]
}
];
/** @type {?} */
const ChineseIconCategory = [
['action', '动作类'],
['alert', '警示类'],
['av', '音视频类'],
['communication', '通信类'],
['content', '内容类'],
['device', '装置类'],
['editor', '编辑类'],
['fill', '填充类'],
['hardware', '硬件类'],
['image', '形象类'],
['maps', '类'],
['navigation', '导航类'],
['notification', '告示类'],
['places', '位置类'],
['social', '社会'],
['toggle', '开关']
];
class IconCategory {
}
if (false) {
/** @type {?} */
IconCategory.prototype.category;
/** @type {?} */
IconCategory.prototype.categoryCN;
/** @type {?} */
IconCategory.prototype.icons;
}
class Icon {
/**
* @param {?} data
*/
constructor(data) {
this.name = data.name;
this.fs = data.fs;
}
}
if (false) {
/** @type {?} */
Icon.prototype.name;
/** @type {?} */
Icon.prototype.fs;
}
class IconList {
constructor() {
this.icons = {};
iconList.forEach((/**
* @param {?} v
* @return {?}
*/
v => {
/** @type {?} */
const groupCategory = {};
/** @type {?} */
const categoryOrder = [];
v.list.forEach((/**
* @param {?} vv
* @return {?}
*/
vv => {
/** @type {?} */
const key = vv.split(/(\\|\/)/g)[2];
if (!groupCategory[key]) {
/** @type {?} */
const c = new IconCategory();
c.category = key;
/** @type {?} */
const findArr = ChineseIconCategory.find((/**
* @param {?} cnArr
* @return {?}
*/
cnArr => cnArr[0] === key));
if (findArr) {
c.categoryCN = findArr[1];
}
else {
c.categoryCN = c.category;
}
c.icons = [new Icon({ name: withoutExt(vv), fs: vv })];
groupCategory[key] = c;
categoryOrder.push(c);
}
else {
groupCategory[key].icons.push(new Icon({ name: withoutExt(vv), fs: vv }));
}
}));
this.icons[v.nameSpace] = categoryOrder;
}));
}
}
IconList.decorators = [
{ type: Injectable, args: [{
providedIn: 'root'
},] }
];
/** @nocollapse */
IconList.ctorParameters = () => [];
/** @nocollapse */ IconList.ngInjectableDef = ɵɵdefineInjectable({ factory: function IconList_Factory() { return new IconList(); }, token: IconList, providedIn: "root" });
if (false) {
/** @type {?} */
IconList.prototype.icons;
}
/**
* @param {?} fsName
* @return {?}
*/
function withoutExt(fsName) {
return fsName
.split(/(\\|\/)/g)
.pop()
.split('.')[0];
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class AppLoadService {
/**
* @param {?} injector
* @param {?} eles
* @param {?} project
* @param {?} title
* @param {?} iconRegistry
* @param {?} sanitizer
* @param {?} iconList
*/
constructor(injector, eles, project, title, iconRegistry, sanitizer, iconList // private snackBar: MatSnackBar
) {
this.injector = injector;
this.eles = eles;
this.project = project;
this.title = title;
this.iconList = iconList;
// this.goRoute = this.goRoute.bind(this);
Object.keys(this.iconList.icons).forEach((/**
* @param {?} ns
* @return {?}
*/
ns => {
this.iconList.icons[ns].forEach((/**
* @param {?} cate
* @return {?}
*/
cate => {
cate.icons.forEach((/**
* @param {?} icon
* @return {?}
*/
icon => {
iconRegistry.addSvgIconInNamespace(ns, icon.name, sanitizer.bypassSecurityTrustResourceUrl('assets/icon/' + icon.fs));
}));
}));
}));
}
/**
* @return {?}
*/
initializeApp() {
/** @type {?} */
const This = this;
window.onbeforeunload = (/**
* @return {?}
*/
() => {
if (This.store) {
This.store.save();
}
});
this.project.applicationStatus = 'start-init';
return new Promise((/**
* @param {?} resolve
* @param {?} reject
* @return {?}
*/
(resolve, reject) => {
setTimeout((/**
* @return {?}
*/
() => {
// 获取Project前缀
/** @type {?} */
let projectName;
/** @type {?} */
let creator;
This.router = this.injector.get(Router);
/** @type {?} */
const subscribeRouter = This.router.events.subscribe((/**
* @param {?} event
* @return {?}
*/
event => {
if (event instanceof RoutesRecognized) {
subscribeRouter.unsubscribe();
// 防止根目录跳转到login,url取到的是根目录
/** @type {?} */
const paths = event.urlAfterRedirects.split('/');
creator = decodeURIComponent(decodeURI(paths[2]));
projectName = decodeURIComponent(decodeURI(paths[3]));
/** @type {?} */
const eleName = decodeURIComponent(decodeURI(paths[4]));
this.project.setProject(projectName, creator);
// 这里不能自动注入authservice,因为其用到了router,会出现undefine
This.auth = this.injector.get(AuthService);
This.auth.serverIsLogged().subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
This.project.getProjectInfo().subscribe((/**
* @param {?} state
* @return {?}
*/
state => {
this.title.setTitle(this.project.projectLabel);
this.eles.setPub(this.project.publicElements);
if (v) {
this.store = this.injector.get(StoreService);
this.store.load();
}
else {
// 判断是否是公共的菜单项,公共的菜单项不需要重新路由
if (!this.eles.getPubEles()[eleName]) {
// 如果没有登录,则路由到默认页
this.router.navigate(['']);
}
}
resolve();
return;
}));
}), (/**
* @param {?} err
* @return {?}
*/
err => {
// this.snackBar.open(err.message, '确定', { verticalPosition: 'top' });
reject();
}));
}
}));
}));
})).then((/**
* @param {?} v
* @return {?}
*/
v => {
this.project.applicationStatus = 'init-done';
ApplicationInited.next(v);
}), (/**
* @param {?} v
* @return {?}
*/
v => {
this.project.applicationStatus = 'init-error';
// 路由到默认页面,要防止当前url是具体内部的业务功能,没有针对init-error的处理呈现
// 默认页面一般是login页面,有对这种情况的呈现处理
this.router.navigate(['']);
}));
}
}
AppLoadService.decorators = [
{ type: Injectable, args: [{
providedIn: 'root'
},] }
];
/** @nocollapse */
AppLoadService.ctorParameters = () => [
{ type: Injector },
{ type: ElementsService },
{ type: ProjectService },
{ type: Title },
{ type: MatIconRegistry },
{ type: DomSanitizer },
{ type: IconList }
];
/** @nocollapse */ AppLoadService.ngInjectableDef = ɵɵdefineInjectable({ factory: function AppLoadService_Factory() { return new AppLoadService(ɵɵinject(INJECTOR), ɵɵinject(ElementsService), ɵɵinject(ProjectService), ɵɵinject(Title), ɵɵinject(MatIconRegistry), ɵɵinject(DomSanitizer), ɵɵinject(IconList)); }, token: AppLoadService, providedIn: "root" });
if (false) {
/**
* @type {?}
* @private
*/
AppLoadService.prototype.auth;
/**
* @type {?}
* @private
*/
AppLoadService.prototype.store;
/**
* @type {?}
* @private
*/
AppLoadService.prototype.router;
/**
* @type {?}
* @private
*/
AppLoadService.prototype.injector;
/**
* @type {?}
* @private
*/
AppLoadService.prototype.eles;
/**
* @type {?}
* @private
*/
AppLoadService.prototype.project;
/**
* @type {?}
* @private
*/
AppLoadService.prototype.title;
/**
* @type {?}
* @private
*/
AppLoadService.prototype.iconList;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class ThemeService {
constructor() {
this._theme = new BehaviorSubject(localStorage.getItem('theme'));
this.theme = this._theme.pipe(tap((/**
* @param {?} v
* @return {?}
*/
v => {
localStorage.setItem('theme', v);
})), map((/**
* @param {?} v
* @return {?}
*/
v => {
switch (v) {
case 'blue-light-theme':
return {
name: v,
color: 'blue',
model: 'light'
};
case 'blue-dark-theme':
return {
name: v,
color: 'blue',
model: 'dark'
};
case 'deep-purple-light-theme':
return {
name: v,
color: 'deep-purple',
model: 'light'
};
case 'deep-purple-dark-theme':
return {
name: v,
color: 'deep-purple',
model: 'dark'
};
case 'pink-light-theme':
return {
name: v,
color: 'pink',
model: 'light'
};
case 'pink-dark-theme':
return {
name: v,
color: 'pink',
model: 'dark'
};
case 'orange-light-theme':
return {
name: v,
color: 'orange',
model: 'light'
};
case 'orange-dark-theme':
return {
name: v,
color: 'orange',
model: 'dark'
};
case 'green-light-theme':
return {
name: v,
color: 'green',
model: 'light'
};
case 'green-dark-theme':
return {
name: v,
color: 'green',
model: 'dark'
};
default:
return {
name: v,
color: 'blue',
model: 'light'
};
}
})));
}
/**
* @param {?} val
* @return {?}
*/
setTheme(val) {
this._theme.next(val);
}
}
ThemeService.decorators = [
{ type: Injectable, args: [{
providedIn: 'root'
},] }
];
/** @nocollapse */ ThemeService.ngInjectableDef = ɵɵdefineInjectable({ factory: function ThemeService_Factory() { return new ThemeService(); }, token: ThemeService, providedIn: "root" });
if (false) {
/**
* @type {?}
* @private
*/
ThemeService.prototype._theme;
/** @type {?} */
ThemeService.prototype.theme;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
const ElementBillClone = 'billclone';
/**
* @record
*/
function GetClonePKParam() { }
if (false) {
/** @type {?} */
GetClonePKParam.prototype.OldSignPK;
/** @type {?} */
GetClonePKParam.prototype.EleName;
}
/**
* @record
*/
function BillCloneParam() { }
if (false) {
/** @type {?} */
BillCloneParam.prototype.EleName;
/** @type {?} */
BillCloneParam.prototype.OldSignPK;
/** @type {?} */
BillCloneParam.prototype.NewPK;
}
/**
* @record
*/
function BillCloneResult() { }
if (false) {
/** @type {?} */
BillCloneResult.prototype.Ok;
/** @type {?} */
BillCloneResult.prototype.Error;
}
class BillCloneBackfaceService {
/**
* @param {?} api
*/
constructor(api) {
this.api = api;
}
/**
* @param {?} param
* @return {?}
*/
getClonePK(param) {
return this.api.get(ElementBillClone, 'get-clone-pk', param);
}
/**
* @param {?} param
* @return {?}
*/
billClone(param) {
return this.api.post(ElementBillClone, 'bill-clone', param);
}
}
BillCloneBackfaceService.decorators = [
{ type: Injectable, args: [{
providedIn: 'root'
},] }
];
/** @nocollapse */
BillCloneBackfaceService.ctorParameters = () => [
{ type: ElementApiService }
];
/** @nocollapse */ BillCloneBackfaceService.ngInjectableDef = ɵɵdefineInjectable({ factory: function BillCloneBackfaceService_Factory() { return new BillCloneBackfaceService(ɵɵinject(ElementApiService)); }, token: BillCloneBackfaceService, providedIn: "root" });
if (false) {
/**
* @type {?}
* @private
*/
BillCloneBackfaceService.prototype.api;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class CloneComponent {
/**
* @param {?} dialogRef
* @param {?} data
*/
constructor(dialogRef, data) {
this.dialogRef = dialogRef;
this.data = data;
this.hostClass = true;
}
/**
* @return {?}
*/
ngOnInit() {
this.clone.nativeElement.parentElement.parentElement.style = 'padding:0px;';
}
/**
* @return {?}
*/
ok() {
/** @type {?} */
const rev = {};
this.data.forEach((/**
* @param {?} v
* @return {?}
*/
v => {
rev[v.Name] = v.Fill;
}));
this.dialogRef.close(rev);
}
/**
* @return {?}
*/
close() {
this.dialogRef.close();
}
}
CloneComponent.decorators = [
{ type: Component, args: [{
selector: 'common-clone',
template: "<div #clone class=\"clone-all\">\r\n\t<div class=\"clone-title\" >\u514B\u9686\u5F53\u524D\u8BB0\u5F55</div>\r\n\t<div class=\"clone-tips\">\u8BF7\u8F93\u5165\u65B0\u4E3B\u952E\u503C</div>\r\n\t<div class=\"clone-content\" mat-dialog-content>\r\n\t\t<div class=\"clone-field\" *ngFor=\"let field of data\">\r\n\t\t\t<div class=\"clone-field-name\">{{ field.Name }}</div>\r\n\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t<input matInput [(ngModel)]=\"field.Fill\" />\r\n\t\t\t</mat-form-field>\r\n\t\t</div>\r\n\t</div>\r\n\t<div class=\"clone-warn\">\u514B\u9686\u7684\u662F\u5DF2\u7ECF\u4FDD\u5B58\u5230\u6570\u636E\u5E93\u7684\u503C,\u800C\u4E0D\u662F\u754C\u9762\u4E0A\u672A\u4FDD\u5B58\u7684\u6570\u636E</div>\r\n\t<div class=\"clone-actions\" mat-dialog-actions>\r\n\t\t<button mat-button (click)=\"close()\">\u53D6\u6D88</button>\r\n\t\t<button class=\"clone-confirm\" mat-button color='primary' (click)=\"ok()\">\u514B\u9686</button>\r\n\t</div>\r\n</div>\r\n",
styles: [".clone-all{width:368px;max-height:calc(100% - 240px);padding:24px 0 16px;display:flex;flex-direction:column}.clone-title{font-size:20px;font-weight:700;padding-left:24px}.clone-tips{font-size:14px;padding:8px 0 24px 24px}.clone-content{flex-grow:1;overflow-y:auto}.clone-content .clone-field{width:100%;padding:0 24px 0 8px;box-sizing:border-box;display:flex;align-items:center}.clone-content .clone-field .clone-field-name{font-size:16px;width:80px;margin-right:8px;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.clone-content .clone-field .mat-form-field{flex-grow:1;font-size:16px}.clone-content .clone-field .mat-form-field ::ng-deep .mat-form-field-infix{border:0;height:16px;padding:12px 0}.clone-content .clone-field .mat-form-field ::ng-deep .mat-form-field-wrapper{padding-bottom:0!important}.clone-warn{padding:8px 10px 24px 24px;box-sizing:border-box;font-size:12px}.clone-actions{text-align:right;padding-right:10px}.clone-actions button{font-size:16px}.clone-actions .clone-confirm{margin-left:8px;font-weight:700}"]
}] }
];
/** @nocollapse */
CloneComponent.ctorParameters = () => [
{ type: MatDialogRef },
{ type: Array, decorators: [{ type: Inject, args: [MAT_DIALOG_DATA,] }] }
];
CloneComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.c-bill-colone',] }],
clone: [{ type: ViewChild, args: ['clone', { static: true },] }]
};
if (false) {
/** @type {?} */
CloneComponent.prototype.hostClass;
/** @type {?} */
CloneComponent.prototype.clone;
/** @type {?} */
CloneComponent.prototype.fillValues;
/** @type {?} */
CloneComponent.prototype.dialogRef;
/** @type {?} */
CloneComponent.prototype.data;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @record
*/
function DialogData() { }
if (false) {
/** @type {?} */
DialogData.prototype.message;
}
class ErrorMessageComponent {
/**
* @param {?} dialogRef
* @param {?} data
*/
constructor(dialogRef, data) {
this.dialogRef = dialogRef;
this.data = data;
this.hostClass = true;
}
/**
* @return {?}
*/
ngOnInit() { }
/**
* @return {?}
*/
onNoClick() {
this.dialogRef.close();
}
}
ErrorMessageComponent.decorators = [
{ type: Component, args: [{
selector: 'common-error-message',
template: "<h1 mat-dialog-title>\u9519\u8BEF\u63D0\u793A</h1>\n<div mat-dialog-content>\n <p>{{data.message}}</p>\n</div>\n<div mat-dialog-actions>\n <button mat-button (click)=\"onNoClick()\">\u5173\u95ED</button>\n</div>",
styles: [""]
}] }
];
/** @nocollapse */
ErrorMessageComponent.ctorParameters = () => [
{ type: MatDialogRef },
{ type: undefined, decorators: [{ type: Inject, args: [MAT_DIALOG_DATA,] }] }
];
ErrorMessageComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.c-bill-error-message',] }]
};
if (false) {
/** @type {?} */
ErrorMessageComponent.prototype.hostClass;
/** @type {?} */
ErrorMessageComponent.prototype.dialogRef;
/** @type {?} */
ErrorMessageComponent.prototype.data;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @record
*/
function Record() { }
if (false) {
/** @type {?} */
Record.prototype.Main;
/** @type {?|undefined} */
Record.prototype.Child;
}
/**
* @record
*/
function BeforeSaveParam() { }
if (false) {
/** @type {?} */
BeforeSaveParam.prototype.record;
/** @type {?|undefined} */
BeforeSaveParam.prototype.tag;
}
class BillComponent {
/**
* @param {?} rele
* @param {?} billBackface
* @param {?} tabs
* @param {?} dialog
* @param {?} billCloneService
* @param {?} snackBar
*/
constructor(rele, billBackface, tabs, dialog, billCloneService, snackBar) {
this.rele = rele;
this.billBackface = billBackface;
this.tabs = tabs;
this.dialog = dialog;
this.billCloneService = billCloneService;
this.snackBar = snackBar;
this.init = new EventEmitter();
// 这里的Name依据typestruct来
this.useTypeRecord = false;
this.typeRecord = {};
this.rele.currentElement.subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
this.element = v;
this.billBackface.get(v).subscribe((/**
* @param {?} vv
* @return {?}
*/
vv => {
this.checkResults = vv.CheckResults;
this.oldData = vv.EncodeData;
this.operate = vv.Operate;
this.allowClone = vv.AllowClone;
this.fields = vv.Fields;
this.typeRecord = vv.TypeRecord;
this.record = vv.Record;
this.signKeyValues = vv.SignKeyValues;
this.useTypeRecord = vv.TypeRecord !== undefined && vv.TypeRecord !== null;
// 对主表字段的映射
this.fieldMap = vv.Fields.reduce((/**
* @param {?} result
* @param {?} item
* @return {?}
*/
(result, item) => {
result[item.Name] = item;
return result;
}), {});
// 只建立主表的formgroup
if (this.useTypeRecord) {
this.formGroup = new FormGroup(this.fields.reduce((/**
* @param {?} result
* @param {?} fld
* @return {?}
*/
(result, fld) => {
if (fld.Type === BillFieldDataType.DATE && this.typeRecord[fld.Name]) {
result[fld.Name] = new FormControl({
value: this.fixShowDate((/** @type {?} */ (this.typeRecord[fld.Name]))),
// 去掉时区
disabled: fld.Readonly
});
}
else {
result[fld.Name] = new FormControl({
value: this.typeRecord[fld.Name],
disabled: fld.Readonly
});
}
return result;
}), {}));
}
else {
this.formGroup = new FormGroup(this.fields.reduce((/**
* @param {?} result
* @param {?} fld
* @return {?}
*/
(result, fld) => {
if (fld.Type === BillFieldDataType.DATE && this.record.Main[fld.Name]) {
result[fld.Name] = new FormControl({
value: this.fixShowDate((/** @type {?} */ (this.record.Main[fld.Name]))),
// 去掉时区
disabled: fld.Readonly
});
}
else {
result[fld.Name] = new FormControl({
value: this.record.Main[fld.Name],
disabled: fld.Readonly
});
}
return result;
}), {}));
}
this.init.emit();
}), (/**
* @param {?} err
* @return {?}
*/
(err) => {
this.error = err.error.Error;
}));
}));
}
/**
* @private
* @param {?} d
* @return {?}
*/
fixShowDate(d) {
if (d) {
return d.substr(0, 16);
}
return d;
}
/**
* @return {?}
*/
ngAfterContentInit() { }
/**
* @param {?} mes
* @return {?}
*/
showErrorMessage(mes) {
this.dialog.open(ErrorMessageComponent, {
// width: '450px',
data: { message: mes },
autoFocus: false
});
// dialogRef.afterClosed().subscribe(result => {
// console.log('The dialog was closed');
// });
}
/**
* @return {?}
*/
ngOnInit() { }
/**
* @return {?}
*/
isAdd() {
return this.operate === BillOperate.Add;
}
/**
* @return {?}
*/
isEdit() {
return this.operate === BillOperate.Edit;
}
/**
* @return {?}
*/
isDelete() {
return this.operate === BillOperate.Delete;
}
/**
* @return {?}
*/
isBrowse() {
return this.operate === BillOperate.Browse;
}
/**
* @return {?}
*/
close() {
this.tabs.close();
}
/**
* @private
* @param {?} d
* @return {?}
*/
fixDate(d) {
/** @type {?} */
const timezoneOffsetInHours = -(d.getTimezoneOffset() / 60);
// UTC minus local time
/** @type {?} */
const sign = timezoneOffsetInHours >= 0 ? '+' : '-';
/** @type {?} */
const leadingZero = Math.abs(timezoneOffsetInHours) < 10 ? '0' : '';
// It's a bit unfortunate that we need to construct a new Date instance
// (we don't want _this_ Date instance to be modified)
/** @type {?} */
const correctedDate = new Date(d.getFullYear(), d.getMonth(), d.getDate(), d.getHours(), d.getMinutes(), d.getSeconds(), d.getMilliseconds());
correctedDate.setHours(d.getHours() + timezoneOffsetInHours);
/** @type {?} */
const iso = correctedDate.toISOString().replace('Z', '');
return iso + sign + leadingZero + Math.abs(timezoneOffsetInHours).toString() + ':00';
}
// 返回formgroup的转换好类型的值
/**
* @return {?}
*/
getFormGroupValueAsType() {
/** @type {?} */
const rev = {};
this.fields.forEach((/**
* @param {?} fld
* @return {?}
*/
fld => {
switch (fld.Type) {
case BillFieldDataType.FLOAT:
rev[fld.Name] = parseFloat(this.formGroup.get(fld.Name).value);
break;
case BillFieldDataType.INT:
rev[fld.Name] = parseInt(this.formGroup.get(fld.Name).value, 10);
break;
case BillFieldDataType.DATE:
if (this.formGroup.get(fld.Name).value) {
rev[fld.Name] = this.fixDate(new Date(this.formGroup.get(fld.Name).value));
}
else {
rev[fld.Name] = null;
}
break;
default:
rev[fld.Name] = this.formGroup.get(fld.Name).value;
break;
}
}));
return rev;
}
/**
* @return {?}
*/
save() {
// 合并修改的数据
if (this.useTypeRecord) {
this.typeRecord = Object.assign({}, this.typeRecord, this.getFormGroupValueAsType());
}
else {
this.record = {
Main: Object.assign({}, this.record.Main, this.getFormGroupValueAsType()),
Child: Object.assign({}, this.record.Child)
};
}
/** @type {?} */
const process = (/**
* @param {?} data
* @return {?}
*/
(data) => {
// 合并修改的数据
if (this.useTypeRecord) {
this.typeRecord = Object.assign({}, this.typeRecord, data ? data.record : null);
}
else {
if (data && data.record) {
this.record.Main = Object.assign({}, this.record.Main, data.record.Main);
this.record.Child = data.record.Child;
}
}
this.billBackface
.post(this.element, (/** @type {?} */ ({
CheckOnly: false,
OldData: this.oldData,
Tag: data ? data.tag : null,
NewTypeRecord: this.typeRecord,
NewRecord: this.record
})))
.subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
if (v.Ok) {
this.tabs.close();
return;
}
this.showErrorMessage(v.Error);
}));
});
if (this.onBeforeSave) {
this.onBeforeSave(this).subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
process(v);
}));
}
else {
process(null);
}
}
/**
* @return {?}
*/
delete() {
return this.billBackface.delete(this.element, this.oldData).subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
if (v.Ok) {
this.tabs.close();
return;
}
this.showErrorMessage(v.Error);
}));
}
/**
* @return {?}
*/
clone() {
this.billCloneService
.getClonePK({ OldSignPK: this.signKeyValues, EleName: this.element.element.Name })
.subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
/** @type {?} */
const dialogRef = this.dialog.open(CloneComponent, {
// width: '450px',
data: v
});
dialogRef.afterClosed().subscribe((/**
* @param {?} result
* @return {?}
*/
(result) => {
if (result) {
this.billCloneService
.billClone({
EleName: this.element.element.Name,
OldSignPK: this.signKeyValues,
NewPK: result
})
.subscribe((/**
* @param {?} apirev
* @return {?}
*/
apirev => {
if (apirev.Ok) {
this.snackBar.open('成功完成克隆', '关闭', {
horizontalPosition: 'right',
verticalPosition: 'bottom',
duration: 5000
});
}
else {
this.snackBar.open(apirev.Error, '关闭', {
horizontalPosition: 'right',
verticalPosition: 'bottom'
});
}
}));
}
}));
}));
}
}
BillComponent.decorators = [
{ type: Component, args: [{
selector: 'common-bill',
template: "<div *ngIf=\"error;else noErr\">{{error}}</div>\r\n<ng-template #noErr>\r\n\t<div class=\"bill\">\r\n\t\t<div class=\"content\">\r\n\t\t\t<ng-content></ng-content>\r\n\t\t</div>\r\n\t\t<div class=\"footer\">\r\n\t\t\t<div class=\"clone\">\r\n\t\t\t\t<button mat-button class=\"\u529F\u80FD\u6309\u94AE\" (click)=\"clone()\"\r\n\t\t\t\t\t*ngIf=\"allowClone\">\r\n\t\t\t\t\t<mat-icon svgIcon=\"compare_arrows\"></mat-icon>\u514B\u9686\r\n\t\t\t\t</button>\r\n\t\t\t</div>\r\n\t\t\t<button mat-button class=\"\u529F\u80FD\u6309\u94AE\"\r\n\t\t\t\t*ngIf=\"checkResults&&checkResults.length>0\">\r\n\t\t\t\t<mat-icon svgIcon=\"spellcheck\"></mat-icon>\u5BA1\u6838\u5907\u6CE8\r\n\t\t\t</button>\r\n\t\t\t<div class=\"\u5206\u5272\u7EBF\"\r\n\t\t\t\t*ngIf=\"allowClone || (checkResults && checkResults.length>0)\">\r\n\t\t\t</div>\r\n\t\t\t<!-- <button mat-button class=\"\u529F\u80FD\u6309\u94AE\" (click)=\"close()\">\r\n\t\t\t\t<mat-icon svgIcon=\"outlined:book\"></mat-icon>\u65E5\u5FD7\r\n\t\t\t</button> -->\r\n\t\t\t<button mat-button class=\"\u529F\u80FD\u6309\u94AE\" (click)=\"close()\"\r\n\t\t\t\t*ngIf=\"isAdd() || isEdit() || isDelete()\">\r\n\t\t\t\t<mat-icon svgIcon=\"close\"></mat-icon>\u53D6\u6D88\r\n\t\t\t</button>\r\n\t\t\t<button mat-button class=\"\u529F\u80FD\u6309\u94AE\" (click)=\"close()\"\r\n\t\t\t\t*ngIf=\"isBrowse()\">\r\n\t\t\t\t<mat-icon svgIcon=\"close\"></mat-icon>\u5173\u95ED\r\n\t\t\t</button>\r\n\t\t\t<button mat-button class=\"\u529F\u80FD\u6309\u94AE\" (click)=\"save()\" *ngIf=\"isAdd()\">\r\n\t\t\t\t<mat-icon svgIcon=\"add\"></mat-icon>\u65B0\u589E\r\n\t\t\t</button>\r\n\t\t\t<button mat-button class=\"\u529F\u80FD\u6309\u94AE \u4FDD\u5B58\u6309\u94AE\" (click)=\"save()\"\r\n\t\t\t\t*ngIf=\"isEdit()\">\r\n\t\t\t\t<mat-icon svgIcon=\"outlined:save\"></mat-icon>\u4FDD\u5B58\r\n\t\t\t</button>\r\n\t\t\t<button mat-button class=\"\u529F\u80FD\u6309\u94AE\" (click)=\"delete()\"\r\n\t\t\t\t*ngIf=\"isDelete()\">\r\n\t\t\t\t<mat-icon svgIcon=\"delete\"></mat-icon>\u5220\u9664\r\n\t\t\t</button>\r\n\t\t</div>\r\n\t</div>\r\n</ng-template>",
styles: ["@charset \"UTF-8\";.bill{width:100%;height:100%;display:flex;flex-direction:column;align-items:stretch}.content{width:100%;flex:1;overflow:auto;padding:16px 8px;box-sizing:border-box}.footer{width:100%;height:48px;display:flex;justify-content:flex-end;align-items:center;padding-right:16px;box-sizing:border-box}.clone{text-align:left}.\u529F\u80FD\u6309\u94AE{height:32px;text-align:center;max-height:32px;line-height:32px;font-size:14px;cursor:pointer}.\u529F\u80FD\u6309\u94AE .mat-icon{width:16px;height:16px;line-height:16px;margin-right:4px;vertical-align:middle}.\u4FDD\u5B58\u6309\u94AE{display:inline-block;margin-left:8px}.\u5206\u5272\u7EBF{width:1px;height:50%;margin:0 24px}"]
}] }
];
/** @nocollapse */
BillComponent.ctorParameters = () => [
{ type: RouteElementService },
{ type: BillBackfaceService },
{ type: TabsService },
{ type: MatDialog },
{ type: BillCloneBackfaceService },
{ type: MatSnackBar }
];
BillComponent.propDecorators = {
onBeforeSave: [{ type: Input }],
init: [{ type: Output }]
};
if (false) {
/** @type {?} */
BillComponent.prototype.onBeforeSave;
/** @type {?} */
BillComponent.prototype.init;
/** @type {?} */
BillComponent.prototype.element;
/**
* @type {?}
* @private
*/
BillComponent.prototype.oldData;
/**
* @type {?}
* @private
*/
BillComponent.prototype.operate;
/** @type {?} */
BillComponent.prototype.allowClone;
/** @type {?} */
BillComponent.prototype.checkResults;
/** @type {?} */
BillComponent.prototype.fieldMap;
/** @type {?} */
BillComponent.prototype.fields;
/**
* @type {?}
* @private
*/
BillComponent.prototype.useTypeRecord;
/**
* @type {?}
* @private
*/
BillComponent.prototype.signKeyValues;
/** @type {?} */
BillComponent.prototype.formGroup;
/** @type {?} */
BillComponent.prototype.typeRecord;
/** @type {?} */
BillComponent.prototype.record;
/** @type {?} */
BillComponent.prototype.error;
/** @type {?} */
BillComponent.prototype.rele;
/**
* @type {?}
* @private
*/
BillComponent.prototype.billBackface;
/**
* @type {?}
* @private
*/
BillComponent.prototype.tabs;
/** @type {?} */
BillComponent.prototype.dialog;
/**
* @type {?}
* @private
*/
BillComponent.prototype.billCloneService;
/**
* @type {?}
* @private
*/
BillComponent.prototype.snackBar;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @record
*/
function DialogData$1() { }
if (false) {
/** @type {?} */
DialogData$1.prototype.icon;
/** @type {?} */
DialogData$1.prototype.color;
}
class IconSelectComponent {
/**
* @param {?} iconList
* @param {?} dialogRef
* @param {?} data
*/
constructor(iconList, dialogRef, data) {
this.iconList = iconList;
this.dialogRef = dialogRef;
this.data = data;
this.hostClass = true;
this.iconCategoryCN = '编辑类';
this.icon(this.data.icon);
}
/**
* @return {?}
*/
ngOnInit() {
this.图标选择.nativeElement.parentElement.parentElement.style = 'padding:0px;';
}
/**
* @param {?} event
* @return {?}
*/
check(event) {
if (event.checked) {
this.nameSpace = 'outlined';
}
else {
this.nameSpace = '';
}
}
/**
* @return {?}
*/
categories() {
return this.iconList.icons[this.nameSpace];
}
/**
* @return {?}
*/
ok() {
return {
icon: this.nameSpace ? this.nameSpace + ':' + this.iconName : this.iconName,
color: this.data.color
};
}
/**
* @param {?} val
* @return {?}
*/
icon(val) {
console.log(val);
if (val) {
/** @type {?} */
const ns = val.split(':');
if (ns.length > 1) {
this.nameSpace = ns[0];
this.iconName = ns[1];
}
else {
this.nameSpace = '';
this.iconName = ns[0];
}
}
else {
this.nameSpace = '';
}
}
}
IconSelectComponent.decorators = [
{ type: Component, args: [{
selector: 'common-icon-select',
template: "<div #\u56FE\u6807\u9009\u62E9 class=\"icon-dialog\">\r\n\t<div class=\"title \u5B57\u4F53\u989C\u8272\">\u56FE\u6807\u9009\u62E9</div>\r\n\t<div>\r\n\t\t<div class=\"color-select\">\r\n\t\t\t<div class=\"one-color\">\r\n\t\t\t\t<div class=\"color-div default\" (click)=\"data.color = 'default'\">\r\n\t\t\t\t\t<mat-icon svgIcon=\"done\" *ngIf=\"data.color == 'default'\"></mat-icon>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"color-name\">\u9ED8\u8BA4</div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"one-color\">\r\n\t\t\t\t<div class=\"color-div primary\" (click)=\"data.color = 'primary'\">\r\n\t\t\t\t\t<mat-icon svgIcon=\"done\" *ngIf=\"data.color == 'primary'\"></mat-icon>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"color-name\">\u4E3B\u9898\u8272</div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"one-color\">\r\n\t\t\t\t<div class=\"color-div warn\" (click)=\"data.color = 'warn'\">\r\n\t\t\t\t\t<mat-icon svgIcon=\"done\" *ngIf=\"data.color == 'warn'\"></mat-icon>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"color-name\">\u8B66\u544A</div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"one-color\">\r\n\t\t\t\t<div class=\"color-div accent\" (click)=\"data.color = 'accent'\">\r\n\t\t\t\t\t<mat-icon svgIcon=\"done\" *ngIf=\"data.color == 'accent'\"></mat-icon>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"color-name\">\u63D0\u9192</div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"one-color\">\r\n\t\t\t\t<div class=\"color-div safe\" (click)=\"data.color = 'safe'\">\r\n\t\t\t\t\t<mat-icon svgIcon=\"done\" *ngIf=\"data.color == 'safe'\"></mat-icon>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"color-name\">\u5B89\u5168</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<div class=\"sample\">\r\n\t\t\t<span class=\"\u5B57\u4F53\u989C\u8272\">\u6548\u679C\u9884\u89C8</span>\r\n\t\t\t<div class=\"\u9884\u89C8\u6846 \">\r\n\t\t\t\t<mat-icon\r\n\t\t\t\t\t[svgIcon]=\"nameSpace ? nameSpace + ':' + iconName : iconName\"\r\n\t\t\t\t\t[ngClass]=\"this.data.color\"\r\n\t\t\t\t></mat-icon>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n\t<div class=\"icon-select-area\">\r\n\t\t<div class=\"icon-select-title\">\r\n\t\t\t<mat-form-field class=\"\u9009\u62E9\u6846 \u5B57\u4F53\u989C\u8272\" appearance=\"outline\">\r\n\t\t\t\t<mat-select [(value)]=\"iconCategoryCN\">\r\n\t\t\t\t\t<mat-option *ngFor=\"let ele of categories()\" [value]=\"ele.categoryCN\">\r\n\t\t\t\t\t\t{{ ele.categoryCN }}</mat-option\r\n\t\t\t\t\t>\r\n\t\t\t\t</mat-select>\r\n\t\t\t</mat-form-field>\r\n\t\t\t<div>\r\n\t\t\t\t<mat-button-toggle-group\r\n\t\t\t\t\tclass=\"\u56FE\u6807\u7C7B\u578B\"\r\n\t\t\t\t\t#group=\"matButtonToggleGroup\"\r\n\t\t\t\t\t(change)=\"nameSpace = group.value\"\r\n\t\t\t\t>\r\n\t\t\t\t\t<mat-button-toggle\r\n\t\t\t\t\t\t[ngClass]=\"{ '\u56FE\u6807\u7C7B\u578B-\u9009\u4E2D': nameSpace === '' }\"\r\n\t\t\t\t\t\tclass=\"\u56FE\u6807\u7C7B\u578B-\u6837\u5F0F \u7EBF\u6027\"\r\n\t\t\t\t\t\tvalue=\"\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t\u7EBF\u6027\r\n\t\t\t\t\t</mat-button-toggle>\r\n\t\t\t\t\t<mat-button-toggle\r\n\t\t\t\t\t\t[ngClass]=\"{ '\u56FE\u6807\u7C7B\u578B-\u9009\u4E2D': nameSpace === 'outlined' }\"\r\n\t\t\t\t\t\tclass=\"\u56FE\u6807\u7C7B\u578B-\u6837\u5F0F \u586B\u5145\"\r\n\t\t\t\t\t\tvalue=\"outlined\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t\u586B\u5145\r\n\t\t\t\t\t</mat-button-toggle>\r\n\t\t\t\t</mat-button-toggle-group>\r\n\t\t\t\t<!-- <mat-slide-toggle [checked]=\"nameSpace == 'outlined'\" (change)=\"check($event)\"\r\n\t\t\t\t>{{ nameSpace == 'outlined' ? '\u7EBF\u6027' : '\u586B\u5145' }}\r\n\t\t\t</mat-slide-toggle> -->\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<div class=\"icon-select-content\">\r\n\t\t\t<div *ngFor=\"let icons of categories()\">\r\n\t\t\t\t<div class=\"\u56FE\u6807\u5E93\" *ngIf=\"icons.categoryCN == iconCategoryCN\">\r\n\t\t\t\t\t<div\r\n\t\t\t\t\t\tclass=\"\u56FE\u6807\u8FB9\u6846 \u5B57\u4F53\u989C\u8272\"\r\n\t\t\t\t\t\t*ngFor=\"let i of icons.icons\"\r\n\t\t\t\t\t\t(click)=\"iconName = i.name\"\r\n\t\t\t\t\t\t[ngClass]=\"{ 'icon-selected': i.name === iconName }\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<mat-icon [svgIcon]=\"nameSpace ? nameSpace + ':' + i.name : i.name\"> </mat-icon>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n\t<div class=\"\u5E95\u90E8\u529F\u80FD\u6309\u94AE\">\r\n\t\t<button color=\"primary\" mat-button (click)=\"iconName = ''\">\u6E05\u7A7A</button>\r\n\t\t<span>\r\n\t\t\t<button mat-button (click)=\"dialogRef.close()\">\u53D6\u6D88</button>\r\n\t\t\t<button class=\"\u786E\u5B9A\" mat-button [mat-dialog-close]=\"ok()\">\u786E\u5B9A</button>\r\n\t\t</span>\r\n\t</div>\r\n</div>\r\n",
styles: ["@charset \"UTF-8\";.icon-dialog{width:100%;height:100%;display:flex;flex-direction:column;padding:16px 0 64px 20px;box-sizing:border-box;position:relative}.title{font-size:18px;font-weight:700;margin-bottom:24px}.color-div{width:24px;height:24px;cursor:pointer}.color-div .mat-icon{color:#fff}.color-select{display:flex}.color-select .one-color{margin-right:24px;display:flex;flex-direction:column;align-items:center}.color-select .one-color .color-name{margin-top:8px;font-size:14px}.sample{position:absolute;right:16px;top:16px}.sample span{font-size:14px}.sample .\u9884\u89C8\u6846{width:80px;height:80px;border-radius:4px;overflow:hidden;position:relative}.sample .\u9884\u89C8\u6846 .mat-icon{width:32px;height:32px;line-height:32px;position:absolute;left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.icon-select-area{height:50px;flex-grow:1;display:flex;flex-direction:column}.icon-select-area .icon-select-title{margin-top:24px;display:flex;justify-content:space-between}.icon-select-area .icon-select-title .\u9009\u62E9\u6846{width:160px;font-size:14px}.icon-select-area .icon-select-title .\u9009\u62E9\u6846 ::ng-deep .mat-form-field-wrapper{margin:0;padding-bottom:10px}.icon-select-area .icon-select-title .\u9009\u62E9\u6846 ::ng-deep .mat-form-field-infix{border:0;padding:8px 0}.icon-select-area .icon-select-title .\u9009\u62E9\u6846 ::ng-deep .mat-select-arrow-wrapper{display:block}.icon-select-area .icon-select-title .\u56FE\u6807\u7C7B\u578B{width:90px;height:24px;margin-right:16px;border-radius:12px;display:flex;justify-content:space-between}.icon-select-area .icon-select-title .\u56FE\u6807\u7C7B\u578B .\u56FE\u6807\u7C7B\u578B-\u6837\u5F0F{width:48px;height:24px;border-radius:12px;font-size:12px;z-index:99;border:0}.icon-select-area .icon-select-title .\u56FE\u6807\u7C7B\u578B .\u56FE\u6807\u7C7B\u578B-\u6837\u5F0F ::ng-deep .mat-button-toggle-label-content{text-align:center;padding:0;line-height:24px!important}.icon-select-area .icon-select-title .\u56FE\u6807\u7C7B\u578B .\u586B\u5145{margin-right:-3px}.icon-select-area .icon-select-title .\u56FE\u6807\u7C7B\u578B .\u7EBF\u6027{margin-left:-3px}.icon-select-area .icon-select-title .\u56FE\u6807\u7C7B\u578B .\u56FE\u6807\u7C7B\u578B-\u9009\u4E2D{color:#fff}.icon-select-area .icon-select-content{flex-grow:1;overflow-y:auto}.icon-select-area .icon-select-content .\u56FE\u6807\u5E93{display:flex;flex-wrap:wrap}.icon-select-area .icon-select-content .\u56FE\u6807\u5E93 .\u56FE\u6807\u8FB9\u6846{width:40px;height:40px;margin:0 16px 24px 0;display:flex;justify-content:center;align-items:center;border-radius:2px;cursor:pointer;box-sizing:border-box}.\u5E95\u90E8\u529F\u80FD\u6309\u94AE{position:absolute;bottom:0;left:0;width:100%;height:64px;display:flex;justify-content:space-between;align-items:center}.\u5E95\u90E8\u529F\u80FD\u6309\u94AE .\u786E\u5B9A{margin:0 16px;color:#fff}"]
}] }
];
/** @nocollapse */
IconSelectComponent.ctorParameters = () => [
{ type: IconList },
{ type: MatDialogRef },
{ type: undefined, decorators: [{ type: Inject, args: [MAT_DIALOG_DATA,] }] }
];
IconSelectComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.icon-select',] }],
图标选择: [{ type: ViewChild, args: ['图标选择', { static: true },] }]
};
if (false) {
/** @type {?} */
IconSelectComponent.prototype.hostClass;
/** @type {?} */
IconSelectComponent.prototype.图标选择;
/** @type {?} */
IconSelectComponent.prototype.nameSpace;
/** @type {?} */
IconSelectComponent.prototype.iconName;
/** @type {?} */
IconSelectComponent.prototype.iconCategoryCN;
/** @type {?} */
IconSelectComponent.prototype.iconList;
/** @type {?} */
IconSelectComponent.prototype.dialogRef;
/** @type {?} */
IconSelectComponent.prototype.data;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @record
*/
function IColumnType() { }
if (false) {
/** @type {?} */
IColumnType.prototype.Name;
/** @type {?} */
IColumnType.prototype.Type;
}
/**
* @record
*/
function ICategory() { }
if (false) {
/** @type {?} */
ICategory.prototype.ID;
/** @type {?} */
ICategory.prototype.Name;
/** @type {?} */
ICategory.prototype.OwnerBy;
/** @type {?} */
ICategory.prototype.Owner;
/** @type {?} */
ICategory.prototype.Position;
/** @type {?|undefined} */
ICategory.prototype.Labels;
}
/**
* @record
*/
function ILabelKey() { }
if (false) {
/** @type {?} */
ILabelKey.prototype.CategoryID;
/** @type {?} */
ILabelKey.prototype.ID;
}
/**
* @record
*/
function ILabel() { }
if (false) {
/** @type {?} */
ILabel.prototype.Name;
}
// 当ownerby 为E时,owner字段固定的值
/** @type {?} */
const ownerElement = 'ele';
/** @enum {string} */
const OwnerByEnum = {
unknow: '',
// ownerByUser 属于用户的标签、列集,加数字是便于排序
ownerByUser: '1U',
// ownerByDept 属于部门的标签、列集
ownerByDept: '2D',
// ownerByEle 属于工作元素的标签、列集
ownerByEle: '3E',
};
/** @enum {string} */
const NodeTypeEnum = {
unknow: '',
NodeAnd: 'AND',
NodeOr: 'OR',
NodeCondition: 'CONDITION',
NodePlain: 'PLAIN',
};
/**
* @record
*/
function INode() { }
if (false) {
/** @type {?} */
INode.prototype.NodeType;
/** @type {?|undefined} */
INode.prototype.Field;
/** @type {?|undefined} */
INode.prototype.Operate;
/** @type {?|undefined} */
INode.prototype.Value;
/** @type {?|undefined} */
INode.prototype.PlainText;
/** @type {?|undefined} */
INode.prototype.Children;
}
/**
* @record
*/
function IElementHisLog() { }
if (false) {
/** @type {?} */
IElementHisLog.prototype.Operate;
/** @type {?} */
IElementHisLog.prototype.CategoryName;
/** @type {?} */
IElementHisLog.prototype.LabelName;
/** @type {?} */
IElementHisLog.prototype.User;
}
/**
* @record
*/
function IElementHis() { }
if (false) {
/** @type {?} */
IElementHis.prototype.Day;
/** @type {?} */
IElementHis.prototype.Logs;
}
/**
* @record
*/
function ILabelHisItem() { }
if (false) {
/** @type {?} */
ILabelHisItem.prototype.Version;
/** @type {?} */
ILabelHisItem.prototype.WriteTime;
}
/**
* @record
*/
function ILabelHisKey() { }
if (false) {
/** @type {?} */
ILabelHisKey.prototype.CategoryID;
/** @type {?} */
ILabelHisKey.prototype.ID;
/** @type {?} */
ILabelHisKey.prototype.Version;
}
/**
* @record
*/
function ColumnsWithLetter() { }
if (false) {
/** @type {?} */
ColumnsWithLetter.prototype.Letter;
/** @type {?} */
ColumnsWithLetter.prototype.Columns;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @record
*/
function Controller() { }
if (false) {
/** @type {?} */
Controller.prototype.Name;
/** @type {?} */
Controller.prototype.Bill;
}
/**
* @record
*/
function IFetchElementInitDataResult() { }
if (false) {
/** @type {?} */
IFetchElementInitDataResult.prototype.Controllers;
/** @type {?} */
IFetchElementInitDataResult.prototype.Categories;
/** @type {?} */
IFetchElementInitDataResult.prototype.CategoriesEN;
/** @type {?} */
IFetchElementInitDataResult.prototype.Roles;
/** @type {?} */
IFetchElementInitDataResult.prototype.CanSelectRoles;
}
/**
* @record
*/
function MainColumn() { }
if (false) {
/** @type {?} */
MainColumn.prototype.Name;
/** @type {?} */
MainColumn.prototype.Type;
/** @type {?} */
MainColumn.prototype.PrimaryKey;
/** @type {?} */
MainColumn.prototype.MaxLength;
/** @type {?} */
MainColumn.prototype.Null;
}
class ElementBackFace {
/**
* @param {?} api
* @param {?} eles
*/
constructor(api, eles) {
this.api = api;
this.eles = eles;
}
/**
* @private
* @template T
* @param {?} method
* @param {?=} param
* @return {?}
*/
get(method, param) {
return this.api.get(this.element.apiURL(), method, this.eles.getURLSign(this.element.apiURL()), param);
}
/**
* @private
* @template T
* @param {?} method
* @param {?=} param
* @return {?}
*/
post(method, param) {
return this.api.post(this.element.apiURL(), method, this.eles.getURLSign(this.element.apiURL()), param);
}
/**
* @param {?} name
* @return {?}
*/
fetchElementInitData(name) {
return this.get('fetch-element-init-data', name);
}
/**
* @return {?}
*/
fetchElementNames() {
return this.get('fetch-element-names');
}
/**
* @param {?} cname
* @return {?}
*/
fetchBillMainColumns(cname) {
return this.get('fetch-bill-main-columns', cname);
}
/**
* @param {?} db
* @return {?}
*/
fetchTables(db) {
return this.get('fetch-tables', db);
}
/**
* @return {?}
*/
fetchDB() {
return this.get('fetch-db');
}
/**
* @param {?} param
* @return {?}
*/
checkSQL(param) {
return this.post('check-sql', param);
}
/**
* @param {?} table
* @return {?}
*/
fetchTableColumns(table) {
return this.get('fetch-table-columns', table);
}
}
ElementBackFace.decorators = [
{ type: Injectable }
];
/** @nocollapse */
ElementBackFace.ctorParameters = () => [
{ type: ApiService },
{ type: ElementsService }
];
if (false) {
/** @type {?} */
ElementBackFace.prototype.element;
/**
* @type {?}
* @private
*/
ElementBackFace.prototype.api;
/**
* @type {?}
* @private
*/
ElementBackFace.prototype.eles;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
const pinyin = pinyin_;
/**
* @param {?} v
* @return {?}
*/
function map2WithLetter(v) {
/** @type {?} */
const mapList = new Map();
v.forEach((/**
* @param {?} vv
* @return {?}
*/
vv => {
/** @type {?} */
let headerLetter;
// 增加对英文字段的支持
if (vv.match('^[a-zA-Z].*')) {
headerLetter = vv[0].toUpperCase();
}
else {
headerLetter = pinyin(vv, { style: pinyin.STYLE_FIRST_LETTER }).map((/**
* @param {?} s
* @return {?}
*/
s => s[0]))[0];
}
if (mapList.has(headerLetter)) {
mapList.get(headerLetter).push(vv);
}
else {
mapList.set(headerLetter, [vv]);
}
}));
// 排序
/** @type {?} */
const rev = (/** @type {?} */ ([]));
mapList.forEach((/**
* @param {?} columns
* @param {?} letter
* @return {?}
*/
(columns, letter) => {
rev.push((/** @type {?} */ ({ Letter: letter, Columns: columns })));
}));
return rev.sort((/**
* @param {?} a
* @param {?} b
* @return {?}
*/
(a, b) => a.Letter.localeCompare(b.Letter)));
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @enum {number} */
const FillAt = {
SkipFill: 0,
FillAtOpen: 1,
FillAtSave: 2,
};
FillAt[FillAt.SkipFill] = 'SkipFill';
FillAt[FillAt.FillAtOpen] = 'FillAtOpen';
FillAt[FillAt.FillAtSave] = 'FillAtSave';
/**
* @record
*/
function BillParam() { }
if (false) {
/** @type {?} */
BillParam.prototype.Operate;
/** @type {?} */
BillParam.prototype.AllowClone;
/** @type {?} */
BillParam.prototype.ClonePrimaryKeySettings;
/** @type {?} */
BillParam.prototype.FieldSettings;
/** @type {?} */
BillParam.prototype.Tag;
}
/**
* @record
*/
function FieldSetting() { }
if (false) {
/** @type {?} */
FieldSetting.prototype.Name;
/** @type {?} */
FieldSetting.prototype.Fill;
/** @type {?} */
FieldSetting.prototype.FillAt;
/** @type {?} */
FieldSetting.prototype.Visibility;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @enum {string} */
const ImportStyle = {
Normal: 'NORMAL',
Must: 'MUST',
Fill: 'FILL',
Skip: 'SKIP',
};
/**
* @record
*/
function ImportParam() { }
if (false) {
/** @type {?} */
ImportParam.prototype.After;
/** @type {?} */
ImportParam.prototype.Before;
/** @type {?} */
ImportParam.prototype.DB;
/** @type {?} */
ImportParam.prototype.Fields;
/** @type {?} */
ImportParam.prototype.Table;
/** @type {?} */
ImportParam.prototype.Where;
/** @type {?} */
ImportParam.prototype.NullIden;
}
/**
* @record
*/
function ImportField() { }
if (false) {
/** @type {?} */
ImportField.prototype.Name;
/** @type {?} */
ImportField.prototype.Alias;
/** @type {?} */
ImportField.prototype.Remark;
/** @type {?} */
ImportField.prototype.Style;
/** @type {?} */
ImportField.prototype.Value;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @record
*/
function IElementData() { }
if (false) {
/** @type {?} */
IElementData.prototype.Tabs;
/** @type {?} */
IElementData.prototype.parent;
}
/**
* @record
*/
function IProcess() { }
if (false) {
/** @type {?} */
IProcess.prototype.Name;
/** @type {?|undefined} */
IProcess.prototype.Icon;
/** @type {?|undefined} */
IProcess.prototype.Color;
/** @type {?|undefined} */
IProcess.prototype.ElementName;
/** @type {?} */
IProcess.prototype.BindRecord;
/** @type {?|undefined} */
IProcess.prototype.TransPath;
/** @type {?|undefined} */
IProcess.prototype.TransQuery;
/** @type {?|undefined} */
IProcess.prototype.WithSql;
/** @type {?|undefined} */
IProcess.prototype.Visable;
/** @type {?|undefined} */
IProcess.prototype.MoreStr;
}
class ElementDataRecordView {
/**
* @param {?} parent
*/
constructor(parent) {
this.parent = parent;
this.Tabs = ['取数SQL', '默认显示列', '处理列表', '标签', '条件模板'];
this.inited = new EventEmitter();
this.currentProcess = new BehaviorSubject(null);
}
/**
* @return {?}
*/
get Params() {
return (/** @type {?} */ (this.parent.Params));
}
/**
* @return {?}
*/
init() {
forkJoin([
this.parent.back.fetchDB(),
this.parent.back.fetchElementNames(),
this.parent.back.fetchTables(this.Params.DB)
]).subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
this.DBList = v[0];
this.allElementNames = v[1];
this.Tables = v[2];
this.refreshProcesses();
if (this.bindRecordProcesses && this.bindRecordProcesses.length > 0) {
this.currentProcess.next(this.bindRecordProcesses[0]);
}
else if (this.notBindRecordProcesses && this.notBindRecordProcesses.length > 0) {
this.currentProcess.next(this.notBindRecordProcesses[0]);
}
if (this.Params.ConditionalTemplates && this.Params.ConditionalTemplates.length > 0) {
this.currentConditionTemplate = this.Params.ConditionalTemplates[0];
}
this.checkSQL().subscribe();
this.inited.emit();
}));
}
/**
* @return {?}
*/
refreshTables() {
this.parent.back.fetchTables(this.Params.DB).subscribe((/**
* @param {?} v
* @return {?}
*/
v => (this.Tables = v)));
}
/**
* @return {?}
*/
refreshProcesses() {
this.bindRecordProcesses = (this.Params.Processes || []).filter((/**
* @param {?} v
* @return {?}
*/
v => v.BindRecord));
this.notBindRecordProcesses = (this.Params.Processes || []).filter((/**
* @param {?} v
* @return {?}
*/
v => !v.BindRecord));
}
// 将分开的处理列表合并成一个
/**
* @return {?}
*/
collectionProcesses() {
this.Params.Processes = [...this.bindRecordProcesses, ...this.notBindRecordProcesses];
}
/**
* @return {?}
*/
checkSQL() {
return this.parent.back
.checkSQL({
DB: this.Params.DB,
Table: this.Params.TableName,
ManualPage: this.Params.ManualPage,
SQL: this.Params.Sql
})
.pipe(tap((/**
* @param {?} v
* @return {?}
*/
v => {
this.SQLCheckError = v.Error;
if (!this.SQLCheckError) {
// 要把旧的类型复制过来
this.Params.AllColumns = v.Columns.map((/**
* @param {?} col
* @return {?}
*/
col => {
/** @type {?} */
let t = col.Type;
if (this.Params.AllColumns) {
/** @type {?} */
const oldCol = this.Params.AllColumns.find((/**
* @param {?} fv
* @return {?}
*/
fv => fv.Name === col.Name));
if (oldCol) {
t = oldCol.Type;
}
}
return {
Name: col.Name,
Type: t
};
}));
this.allColumnNames = this.Params.AllColumns.map((/**
* @param {?} vv
* @return {?}
*/
vv => vv.Name));
this.allColumnWithLetter = map2WithLetter(this.allColumnNames);
// 删除不存在的列
if (this.Params.Columns) {
this.Params.Columns = this.Params.Columns.filter((/**
* @param {?} col
* @return {?}
*/
col => this.allColumnNames.includes(col.Name)));
}
}
})));
}
}
if (false) {
/** @type {?} */
ElementDataRecordView.prototype.labelCategories;
/** @type {?} */
ElementDataRecordView.prototype.Tabs;
/** @type {?} */
ElementDataRecordView.prototype.DBList;
/** @type {?} */
ElementDataRecordView.prototype.Tables;
/** @type {?} */
ElementDataRecordView.prototype.allElementNames;
/** @type {?} */
ElementDataRecordView.prototype.SQLCheckError;
/** @type {?} */
ElementDataRecordView.prototype.allColumnNames;
/** @type {?} */
ElementDataRecordView.prototype.allColumnWithLetter;
/** @type {?} */
ElementDataRecordView.prototype.bindRecordProcesses;
/** @type {?} */
ElementDataRecordView.prototype.notBindRecordProcesses;
/** @type {?} */
ElementDataRecordView.prototype.inited;
/** @type {?} */
ElementDataRecordView.prototype.currentProcess;
/** @type {?} */
ElementDataRecordView.prototype.currentConditionTemplate;
/** @type {?} */
ElementDataRecordView.prototype.parent;
}
class ElementDataImport {
/**
* @param {?} parent
*/
constructor(parent) {
this.parent = parent;
this.Tabs = ['字段设置', '属性'];
}
/**
* @return {?}
*/
get Params() {
return (/** @type {?} */ (this.parent.Params));
}
/**
* @return {?}
*/
init() {
return forkJoin([this.parent.back.fetchDB(), this.parent.back.fetchTables(this.Params.DB)]).pipe(tap((/**
* @param {?} v
* @return {?}
*/
v => {
this.DBList = v[0];
this.Tables = v[1];
this.syncTableColumn();
})));
}
// 根据表名,同步最新的字段清单
/**
* @return {?}
*/
syncTableColumn() {
this.parent.back.fetchTableColumns(this.Params.Table).subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
this.Params.Fields = v.map((/**
* @param {?} one
* @return {?}
*/
one => {
/** @type {?} */
const found = this.Params.Fields.find((/**
* @param {?} sv
* @return {?}
*/
sv => sv.Name === one));
if (found) {
return found;
}
return (/** @type {?} */ ({
Name: one,
Style: ImportStyle.Normal
}));
}));
}));
}
/**
* @return {?}
*/
refreshTables() {
this.parent.back.fetchTables(this.Params.DB).subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
this.Tables = v;
}));
}
}
if (false) {
/** @type {?} */
ElementDataImport.prototype.Tabs;
/** @type {?} */
ElementDataImport.prototype.DBList;
/** @type {?} */
ElementDataImport.prototype.Tables;
/** @type {?} */
ElementDataImport.prototype.parent;
}
class ElementDataUpdate {
/**
* @param {?} parent
*/
constructor(parent) {
this.parent = parent;
this.Tabs = ['设置'];
}
/**
* @return {?}
*/
get Params() {
return (/** @type {?} */ (this.parent.Params));
}
/**
* @return {?}
*/
isAllSelected() {
return this.Params.Fields && this.Params.Fields.find((/**
* @param {?} v
* @return {?}
*/
v => !v.selected)) === undefined;
}
/**
* @return {?}
*/
hasSelected() {
return this.Params.Fields && this.Params.Fields.find((/**
* @param {?} v
* @return {?}
*/
v => v.selected)) !== undefined;
}
/**
* @return {?}
*/
init() {
this.parent.back.fetchDB().subscribe((/**
* @param {?} v
* @return {?}
*/
v => (this.DBList = v)));
this.refreshTables();
}
/**
* @return {?}
*/
refreshTables() {
this.parent.back.fetchTables(this.Params.DB).subscribe((/**
* @param {?} v
* @return {?}
*/
v => (this.Tables = v)));
}
}
if (false) {
/** @type {?} */
ElementDataUpdate.prototype.Tabs;
/** @type {?} */
ElementDataUpdate.prototype.DBList;
/** @type {?} */
ElementDataUpdate.prototype.Tables;
/** @type {?} */
ElementDataUpdate.prototype.parent;
}
class ElementDataBill {
/**
* @param {?} parent
*/
constructor(parent) {
this.parent = parent;
this.Tabs = ['设置'];
this.parent.init.subscribe((/**
* @return {?}
*/
() => {
this.parent.bill.formGroup
.get('Controller')
.valueChanges.pipe(startWith(this.parent.bill.formGroup.get('Controller').value))
.subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
// 如果是单据,则需要修复填充列的设置
/** @type {?} */
const ctrl = this.parent.Controllers.find((/**
* @param {?} c
* @return {?}
*/
c => c.Name === v));
if (ctrl && ctrl.Bill) {
this.parent.back.fetchBillMainColumns(v).subscribe((/**
* @param {?} cols
* @return {?}
*/
cols => {
this.MainColumns = cols;
this.fixFieldSettings(cols.map((/**
* @param {?} c
* @return {?}
*/
c => c.Name)));
this.fixCloneSettings();
}));
}
}));
}));
}
/**
* @return {?}
*/
get Param() {
return (/** @type {?} */ (this.parent.Params));
}
/**
* @param {?} cols
* @return {?}
*/
fixFieldSettings(cols) {
this.Param.FieldSettings = cols.map((/**
* @param {?} col
* @return {?}
*/
col => {
/** @type {?} */
let foundField;
if (this.Param && this.Param.FieldSettings) {
foundField = this.Param.FieldSettings.find((/**
* @param {?} fld
* @return {?}
*/
fld => fld.Name === col));
}
if (foundField) {
return foundField;
}
return (/** @type {?} */ ({
Name: col,
Fill: '',
FillAt: FillAt.SkipFill,
Visibility: ''
}));
}));
}
/**
* @return {?}
*/
fixCloneSettings() {
/** @type {?} */
const old = [...(this.Param.ClonePrimaryKeySettings || [])];
if (this.Param.AllowClone) {
this.Param.ClonePrimaryKeySettings = this.MainColumns.filter((/**
* @param {?} v
* @return {?}
*/
v => v.PrimaryKey)).map((/**
* @param {?} v
* @return {?}
*/
v => {
/** @type {?} */
const oldField = old.find((/**
* @param {?} o
* @return {?}
*/
o => o.Name === v.Name));
return (/** @type {?} */ ({
Name: v.Name,
Fill: oldField ? oldField.Fill : '{{.SRC}}',
Visibility: oldField ? oldField.Visibility : ''
}));
}));
console.log(this.Param.ClonePrimaryKeySettings);
}
else {
this.Param.ClonePrimaryKeySettings = null;
}
}
}
if (false) {
/** @type {?} */
ElementDataBill.prototype.Tabs;
/** @type {?} */
ElementDataBill.prototype.MainColumns;
/** @type {?} */
ElementDataBill.prototype.parent;
}
class ElementService {
/**
* @param {?} back
*/
constructor(back) {
this.back = back;
this.init = new EventEmitter();
this.BaseActive = true;
this.data = {
recordview: new ElementDataRecordView(this),
import: new ElementDataImport(this),
update: new ElementDataUpdate(this),
bill: new ElementDataBill(this)
};
}
/**
* @param {?} ele
* @return {?}
*/
onInit(ele) {
this.back.element = ele;
this.back.fetchElementInitData(this.bill.typeRecord.Name).subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
this.Controllers = v.Controllers;
this.Categories = v.Categories;
this.CategoriesEN = v.CategoriesEN;
if (v.CanSelectRoles) {
this.Roles = v.CanSelectRoles.map((/**
* @param {?} sv
* @return {?}
*/
sv => ({
Name: sv,
OldChecked: v.Roles && v.Roles.find((/**
* @param {?} vv
* @return {?}
*/
vv => vv === sv)) !== undefined,
Checked: false,
Modify: false
})));
this.Roles.forEach((/**
* @param {?} role
* @return {?}
*/
role => (role.Checked = role.OldChecked)));
}
this.init.emit();
}));
}
}
ElementService.decorators = [
{ type: Injectable }
];
/** @nocollapse */
ElementService.ctorParameters = () => [
{ type: ElementBackFace }
];
if (false) {
/** @type {?} */
ElementService.prototype.bill;
/** @type {?} */
ElementService.prototype.init;
/** @type {?} */
ElementService.prototype.Controllers;
/** @type {?} */
ElementService.prototype.Categories;
/** @type {?} */
ElementService.prototype.CategoriesEN;
/** @type {?} */
ElementService.prototype.BaseActive;
/** @type {?} */
ElementService.prototype.ActiveTab;
/** @type {?} */
ElementService.prototype.Roles;
/** @type {?} */
ElementService.prototype.Params;
/** @type {?} */
ElementService.prototype.data;
/** @type {?} */
ElementService.prototype.back;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
const RecordViewControllerName = 'recordview';
/**
* @record
*/
function ElementPostTag() { }
if (false) {
/** @type {?} */
ElementPostTag.prototype.Roles;
/** @type {?} */
ElementPostTag.prototype.Other;
}
/**
* @record
*/
function ElementRecordViewPostTagOther() { }
if (false) {
/** @type {?} */
ElementRecordViewPostTagOther.prototype.EleName;
/** @type {?} */
ElementRecordViewPostTagOther.prototype.OwnerBy;
/** @type {?} */
ElementRecordViewPostTagOther.prototype.Owner;
/** @type {?} */
ElementRecordViewPostTagOther.prototype.Data;
}
class ElementComponent {
/**
* @param {?} iconRegistry
* @param {?} sanitizer
* @param {?} svr
* @param {?} dialog
*/
constructor(iconRegistry, sanitizer, svr, dialog) {
this.svr = svr;
this.dialog = dialog;
// ElementOwnerNormal 正常的工作元素
this.ElementOwnerNormal = 0;
// ElementOwnerAutoCreate 自动创建的工作元素
this.ElementOwnerAutoCreate = 1;
this.hostClass = true;
this.onBeforeSave = this.onBeforeSave.bind(this);
/** @type {?} */
const icons = [
'all_chosen',
'cancel_chosen',
'return_chosen',
'single_chosen',
'double_down',
'drag_indicator',
'arrow_collapse',
'arrow_expand',
'sorting_arrows',
'color_add',
'file_copy'
];
icons.forEach((/**
* @param {?} v
* @return {?}
*/
v => {
iconRegistry.addSvgIcon(v, sanitizer.bypassSecurityTrustResourceUrl('assets/record-view/icon/' + v + '.svg'));
}));
}
/**
* @return {?}
*/
ngOnInit() {
this.bill.init.subscribe((/**
* @return {?}
*/
() => {
this.svr.bill = this.bill;
/** @type {?} */
const val = this.bill.formGroup.get('Params').value;
if (val) {
this.svr.Params = JSON.parse(val);
}
else {
this.svr.Params = {};
}
this.svr.onInit(this.bill.element);
this.svr.init.subscribe((/**
* @return {?}
*/
() => {
this.filteredCategories = this.bill.formGroup.get('Category').valueChanges.pipe(startWith(''), map((/**
* @param {?} cate
* @return {?}
*/
(cate) => {
return this.svr.Categories.filter((/**
* @param {?} str
* @return {?}
*/
str => str.includes(cate)));
})));
this.filteredCategoriesEN = this.bill.formGroup.get('CategoryEN').valueChanges.pipe(startWith(''), map((/**
* @param {?} cate
* @return {?}
*/
(cate) => {
return this.svr.CategoriesEN.filter((/**
* @param {?} str
* @return {?}
*/
str => str.includes(cate)));
})));
this.filteredControllers = this.bill.formGroup.get('Controller').valueChanges.pipe(startWith(''), map((/**
* @param {?} ctr
* @return {?}
*/
(ctr) => {
return this.svr.Controllers.filter((/**
* @param {?} c
* @return {?}
*/
c => c.Name.toLowerCase().includes(ctr.toLowerCase())));
})));
}));
}));
}
/**
* @return {?}
*/
baseActive() {
this.svr.BaseActive = true;
this.slider.nativeElement.style.top = '16px';
this.slider.nativeElement.style.transition = 'all 0.5s';
}
/**
* @param {?} tab
* @param {?} event
* @return {?}
*/
tabActive(tab, event) {
this.svr.ActiveTab = tab;
this.svr.BaseActive = false;
this.slider.nativeElement.style.top = ((/** @type {?} */ (event.target))).offsetTop + 'px';
this.slider.nativeElement.style.transition = 'all 0.5s';
}
/**
* @param {?} self
* @return {?}
*/
onBeforeSave(self) {
// 需要把最新修改的角色传递到后端
/** @type {?} */
const tag = (/** @type {?} */ ({
Roles: this.svr.Roles.filter((/**
* @param {?} v
* @return {?}
*/
v => v.Checked !== v.OldChecked)) // 只需要传递变动的角色
}));
// 只需要考虑最新的模块是recordview的情况,不需要考虑之前是recordview,现在不是的情况,这些情况
// 已经在后端进行了处理
if (this.bill.formGroup.get('Controller').value === RecordViewControllerName) {
/** @type {?} */
const recviewSvr = (/** @type {?} */ (this.svr.data.recordview));
/** @type {?} */
let eleName = this.bill.typeRecord.Name;
// 新增recordview的菜单项的话,需要把elename设置成最新的
if (this.bill.isAdd()) {
eleName = this.bill.formGroup.get('Name').value;
/** @type {?} */
const rec = recviewSvr.labelCategories || [];
rec.forEach((/**
* @param {?} v
* @return {?}
*/
v => (v.EleName = eleName)));
}
if (this.bill.isAdd() || this.bill.isEdit()) {
tag.Other = (/** @type {?} */ ({
EleName: eleName,
OwnerBy: OwnerByEnum.ownerByEle,
Owner: ownerElement,
Data: recviewSvr.labelCategories
}));
}
}
return of((/** @type {?} */ ({ record: { Params: JSON.stringify(this.svr.Params) }, tag: tag })));
}
/**
* @return {?}
*/
isBillController() {
if (this.svr.Controllers && this.bill && this.bill.formGroup && this.bill.formGroup.get('Controller').value) {
/** @type {?} */
const found = this.svr.Controllers.find((/**
* @param {?} v
* @return {?}
*/
v => v.Name === this.bill.formGroup.get('Controller').value));
return found && found.Bill;
}
return false;
}
/**
* @return {?}
*/
tabs() {
if (this.bill && this.bill.formGroup && this.bill.formGroup.get('Controller').value) {
if (this.isBillController()) {
return this.svr.data.bill.Tabs;
}
if (this.svr.data[this.bill.formGroup.get('Controller').value]) {
return this.svr.data[this.bill.formGroup.get('Controller').value].Tabs || [];
}
}
return [];
}
/**
* @return {?}
*/
selectIcon() {
// 查看或者删除状态下,不能修改图标
if (this.bill.isBrowse() || this.bill.isDelete()) {
return;
}
/** @type {?} */
const v = {
icon: this.bill.formGroup.get('Icon').value,
color: this.bill.formGroup.get('Color').value
};
/** @type {?} */
const dialogRef = this.dialog.open(IconSelectComponent, {
width: '384px',
height: '100%',
data: v,
position: {
top: '0px',
right: '0px'
}
});
dialogRef.afterClosed().subscribe((/**
* @param {?} result
* @return {?}
*/
result => {
if (result) {
this.bill.formGroup.get('Icon').setValue(result.icon);
this.bill.formGroup.get('Color').setValue(result.color);
}
}));
}
}
ElementComponent.decorators = [
{ type: Component, args: [{
selector: 'common-element',
template: "<common-bill #bill [onBeforeSave]=\"onBeforeSave\">\r\n\t<div class=\"\u83DC\u5355\u9879\u5B9A\u4E49\u680F mat-elevation-z2\">\r\n\t\t<div class=\"\u83DC\u5355\u9879\u5B9A\u4E49\u5BFC\u822A\u680F\">\r\n\t\t\t<div class=\"\u5BFC\u822A\u6ED1\u5757\" #slider></div>\r\n\t\t\t<div class=\"\u5BFC\u822A\u6837\u5F0F \u5B57\u4F53\u989C\u8272\" [class.\u5F53\u524D\u5BFC\u822A\u6837\u5F0F]=\"svr.BaseActive\" (click)=\"baseActive()\">\r\n\t\t\t\t\u57FA\u7840\u8BBE\u7F6E\r\n\t\t\t</div>\r\n\t\t\t<div *ngFor=\"let tab of tabs(); let index = index\" class=\"\u5BFC\u822A\u6837\u5F0F \u5B57\u4F53\u989C\u8272\"\r\n\t\t\t\t[class.\u5F53\u524D\u5BFC\u822A\u6837\u5F0F]=\"tab === svr.ActiveTab && !svr.BaseActive\" (click)=\"tabActive(tab, $event)\">\r\n\t\t\t\t{{ tab }}\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<div *ngIf=\"svr.BaseActive; else propertySetting\" class=\"\u57FA\u7840\u5C5E\u6027\u680F \u6A21\u5757\">\r\n\t\t\t<div [formGroup]=\"bill.formGroup\" class=\"main \u5B57\u4F53\u989C\u8272\" *ngIf=\"bill.formGroup\">\r\n\t\t\t\t<div class=\"\u4E00\u7EA7\u6807\u9898\">\u57FA\u672C\u4FE1\u606F</div>\r\n\t\t\t\t<div class=\"\u540D\u79F0\">\r\n\t\t\t\t\t<div class=\"\u4E8C\u7EA7\u6807\u9898\">\u540D\u79F0</div>\r\n\t\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t\t<input matInput formControlName=\"Name\" commonBillField />\r\n\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t<div class=\"\u56FE\u6807 mat-elevation-z4\" (click)=\"selectIcon()\">\r\n\t\t\t\t\t\t<mat-icon [svgIcon]=\"bill.formGroup.get('Icon').value\"\r\n\t\t\t\t\t\t\t[ngClass]=\"bill.formGroup.get('Color').value\">\r\n\t\t\t\t\t\t</mat-icon>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"\u4E2D\u82F1\u6587\u663E\u793A\">\r\n\t\t\t\t\t<div class=\"\u4E2D\u6587\">\r\n\t\t\t\t\t\t<span class=\"\u4E8C\u7EA7\u6807\u9898\">\u663E\u793A\u540D\u79F0</span>\r\n\t\t\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t\t\t<input matInput formControlName=\"Label\" commonBillField />\r\n\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"\u82F1\u6587\">\r\n\t\t\t\t\t\t<span class=\"\u4E8C\u7EA7\u6807\u9898\">\u663E\u793A\u540D\u79F0(\u82F1\u6587)</span>\r\n\t\t\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t\t\t<input matInput formControlName=\"LabelEN\" commonBillField />\r\n\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<span class=\"\u4E8C\u7EA7\u6807\u9898\">\u7C7B\u522B</span>\r\n\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t<input matInput [matAutocomplete]=\"auto\" formControlName=\"Category\" commonBillField />\r\n\t\t\t\t\t<mat-autocomplete #auto=\"matAutocomplete\">\r\n\t\t\t\t\t\t<mat-option *ngFor=\"let item of filteredCategories|async\" [value]=\"item\">{{item}}</mat-option>\r\n\t\t\t\t\t</mat-autocomplete>\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t\t<span class=\"\u4E8C\u7EA7\u6807\u9898\">\u7C7B\u522B(\u82F1\u6587)</span>\r\n\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t<input matInput formControlName=\"CategoryEN\" [matAutocomplete]=\"auto_en\" commonBillField />\r\n\t\t\t\t\t<mat-autocomplete #auto_en=\"matAutocomplete\">\r\n\t\t\t\t\t\t<mat-option *ngFor=\"let item of filteredCategoriesEN|async\" [value]=\"item\">{{item}}</mat-option>\r\n\t\t\t\t\t</mat-autocomplete>\r\n\t\t\t\t</mat-form-field>\r\n\r\n\t\t\t\t<span class=\"\u4E8C\u7EA7\u6807\u9898\">\u6A21\u5757</span>\r\n\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t<input type=\"text\" matInput formControlName=\"Controller\" commonBillField\r\n\t\t\t\t\t\t[matAutocomplete]=\"auto_ctrl\">\r\n\t\t\t\t</mat-form-field>\r\n\r\n\t\t\t\t<mat-autocomplete #auto_ctrl=\"matAutocomplete\">\r\n\t\t\t\t\t<mat-option *ngFor=\"let module of filteredControllers|async\" [value]=\"module.Name\">{{module.Name}}\r\n\t\t\t\t\t</mat-option>\r\n\t\t\t\t</mat-autocomplete>\r\n\r\n\t\t\t\t<span class=\"\u4E8C\u7EA7\u6807\u9898\">\u521B\u5EFA\u7528\u6237</span>\r\n\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t<input matInput formControlName=\"UserName\" commonBillField />\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t\t<span class=\"\u4E8C\u7EA7\u6807\u9898\">\u90E8\u95E8</span>\r\n\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t<input matInput formControlName=\"Dept\" commonBillField />\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t\t<span class=\"\u4E8C\u7EA7\u6807\u9898\">\u5F52\u5C5E\u65B9\u5F0F</span>\r\n\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t<mat-select formControlName=\"Owner\" commonBillField>\r\n\t\t\t\t\t\t<mat-option [value]=\"ElementOwnerNormal\">\r\n\t\t\t\t\t\t\t\u6B63\u5E38\r\n\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t<mat-option [value]=\"ElementOwnerAutoCreate\">\r\n\t\t\t\t\t\t\t\u81EA\u52A8\u521B\u5EFA\r\n\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t</mat-select>\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t\t<div class=\"checkbox\">\r\n\t\t\t\t\t<mat-checkbox [checked]=\"bill.formGroup.get('Pub').value===1\"\r\n\t\t\t\t\t\t(change)=\"bill.formGroup.get('Pub').patchValue($event.checked?1:0)\" commonBillField>\u516C\u5171\r\n\t\t\t\t\t</mat-checkbox>\r\n\t\t\t\t\t<mat-checkbox [checked]=\"bill.formGroup.get('NewWindow').value===1\"\r\n\t\t\t\t\t\t(change)=\"bill.formGroup.get('NewWindow').patchValue($event.checked?1:0)\" commonBillField>\r\n\t\t\t\t\t\t\u65B0\u7A97\u53E3\r\n\t\t\t\t\t</mat-checkbox>\r\n\t\t\t\t\t<mat-checkbox [checked]=\"bill.formGroup.get('IsAPI').value===1\"\r\n\t\t\t\t\t\t(change)=\"bill.formGroup.get('IsAPI').patchValue($event.checked?1:0)\" commonBillField>\u63A5\u53E3\r\n\t\t\t\t\t</mat-checkbox>\r\n\t\t\t\t</div>\r\n\t\t\t\t<span class=\"\u4E8C\u7EA7\u6807\u9898\">\u5E2E\u52A9\u6587\u6848</span>\r\n\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t<textarea matInput formControlName=\"HelpText\" commonBillField></textarea>\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t\t<span class=\"\u4E8C\u7EA7\u6807\u9898\">\u5E2E\u52A9\u6587\u6848(\u82F1\u6587)</span>\r\n\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t<textarea matInput formControlName=\"HelpTextEN\" commonBillField></textarea>\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t\t<div class=\"checkbox\">\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"\u5206\u5272\u7EBF\"></div>\r\n\t\t\t<div class=\"\u57FA\u7840\u5C5E\u6027-\u96B6\u5C5E\u89D2\u8272\u680F\">\r\n\t\t\t\t<div class=\"\u4E00\u7EA7\u6807\u9898 \u5B57\u4F53\u989C\u8272\">\u96B6\u5C5E\u89D2\u8272</div>\r\n\t\t\t\t<div class=\"\u57FA\u7840\u5C5E\u6027-\u96B6\u5C5E\u89D2\u8272-\u590D\u9009\u6846\" *ngFor=\"let role of svr.Roles\">\r\n\t\t\t\t\t<mat-checkbox [(ngModel)]=\"role.Checked\" (change)=\"role.Modify = true\">\r\n\t\t\t\t\t\t<span class=\"\u590D\u9009\u6846\u5185\u5BB9 \u4E8C\u7EA7\u6807\u9898\">{{ role.Name }}</span>\r\n\t\t\t\t\t</mat-checkbox>\r\n\t\t\t\t\t<ng-container *ngIf=\"role.Checked !== role.OldChecked\">*\r\n\t\t\t\t\t</ng-container>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<ng-template #propertySetting>\r\n\t\t\t<common-set-property-bill *ngIf=\"isBillController();else controllerPropertySetting\">\r\n\t\t\t</common-set-property-bill>\r\n\t\t\t<ng-template #controllerPropertySetting>\r\n\t\t\t\t<ng-container [ngSwitch]=\"bill.formGroup?.get('Controller').value\">\r\n\t\t\t\t\t<common-set-property-recordview *ngSwitchCase=\"'recordview'\">\r\n\t\t\t\t\t</common-set-property-recordview>\r\n\t\t\t\t\t<common-set-property-import *ngSwitchCase=\"'import'\">\r\n\t\t\t\t\t</common-set-property-import>\r\n\t\t\t\t\t<common-set-property-update *ngSwitchCase=\"'update'\">\r\n\t\t\t\t\t</common-set-property-update>\r\n\t\t\t\t</ng-container>\r\n\t\t\t</ng-template>\r\n\t\t</ng-template>\r\n\t</div>\r\n</common-bill>",
providers: [ElementService, ElementBackFace],
styles: ["@charset \"UTF-8\";.\u83DC\u5355\u9879\u5B9A\u4E49\u680F{display:flex;justify-content:space-between;width:100%;max-width:960px;height:100%;box-sizing:border-box;margin:0 auto;border-radius:4px}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u83DC\u5355\u9879\u5B9A\u4E49\u5BFC\u822A\u680F{width:152px;height:100%;flex-shrink:0;position:relative}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u83DC\u5355\u9879\u5B9A\u4E49\u5BFC\u822A\u680F .\u5BFC\u822A\u6837\u5F0F{width:100%;height:32px;line-height:32px;padding-left:24px;box-sizing:border-box;margin:16px 0;font-size:16px;font-weight:700;cursor:pointer}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u83DC\u5355\u9879\u5B9A\u4E49\u5BFC\u822A\u680F .\u5F53\u524D\u5BFC\u822A\u6837\u5F0F{font-size:20px}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u83DC\u5355\u9879\u5B9A\u4E49\u5BFC\u822A\u680F .\u5BFC\u822A\u6ED1\u5757{width:8px;height:32px;position:absolute;left:0;top:16px}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u83DC\u5355\u9879\u5B9A\u4E49\u5BFC\u822A\u680F .\u4E8C\u7EA7\u83DC\u5355{width:100%;position:absolute;top:118px;left:0}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u83DC\u5355\u9879\u5B9A\u4E49\u5BFC\u822A\u680F .\u4E8C\u7EA7\u83DC\u5355 button{width:100%;font-size:16px;padding-left:32px;text-align:left}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u57FA\u7840\u5C5E\u6027\u680F{padding:16px 0;box-sizing:border-box;display:flex;overflow-y:auto}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u57FA\u7840\u5C5E\u6027\u680F .main{width:471px;height:100%;padding:8px 48px;box-sizing:border-box;display:flex;flex-direction:column;font-size:14px}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u57FA\u7840\u5C5E\u6027\u680F .main ::ng-deep .mat-form-field-wrapper{margin:0;padding-bottom:10px}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u57FA\u7840\u5C5E\u6027\u680F .main ::ng-deep .mat-form-field-infix{border:0;padding:8px 0}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u57FA\u7840\u5C5E\u6027\u680F .main ::ng-deep .mat-select-arrow-wrapper{display:block}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u57FA\u7840\u5C5E\u6027\u680F .main .\u540D\u79F0{width:100%;position:relative}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u57FA\u7840\u5C5E\u6027\u680F .main .\u540D\u79F0 .mat-form-field{width:300px}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u57FA\u7840\u5C5E\u6027\u680F .main .\u540D\u79F0 .\u56FE\u6807{position:absolute;right:0;bottom:10px;width:56px;height:56px;border-radius:2px;display:flex;justify-content:center;align-items:center}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u57FA\u7840\u5C5E\u6027\u680F .main .\u4E2D\u82F1\u6587\u663E\u793A{display:flex}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u57FA\u7840\u5C5E\u6027\u680F .main .\u4E2D\u82F1\u6587\u663E\u793A .\u4E2D\u6587{flex-grow:1}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u57FA\u7840\u5C5E\u6027\u680F .main .\u4E2D\u82F1\u6587\u663E\u793A .\u82F1\u6587{flex-grow:1;margin-left:8px}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u57FA\u7840\u5C5E\u6027\u680F .main .\u4E2D\u82F1\u6587\u663E\u793A ::ng-deep .mat-form-field-wrapper{width:184px}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u57FA\u7840\u5C5E\u6027\u680F .main .checkbox{display:flex;margin-bottom:8px}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u57FA\u7840\u5C5E\u6027\u680F .main .checkbox .mat-checkbox{margin-right:8px}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u57FA\u7840\u5C5E\u6027\u680F .\u5206\u5272\u7EBF{width:1px;height:100%}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u57FA\u7840\u5C5E\u6027\u680F .\u57FA\u7840\u5C5E\u6027-\u96B6\u5C5E\u89D2\u8272\u680F{width:336px;height:100%;padding:8px 16px;box-sizing:border-box}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u57FA\u7840\u5C5E\u6027\u680F .\u57FA\u7840\u5C5E\u6027-\u96B6\u5C5E\u89D2\u8272\u680F .\u57FA\u7840\u5C5E\u6027-\u96B6\u5C5E\u89D2\u8272-\u590D\u9009\u6846{width:148px;height:47px;margin-bottom:8px;display:inline-block;font-size:14px;line-height:20px;vertical-align:top}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u57FA\u7840\u5C5E\u6027\u680F .\u57FA\u7840\u5C5E\u6027-\u96B6\u5C5E\u89D2\u8272\u680F .\u57FA\u7840\u5C5E\u6027-\u96B6\u5C5E\u89D2\u8272-\u590D\u9009\u6846 .\u590D\u9009\u6846\u5185\u5BB9{vertical-align:top}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u57FA\u7840\u5C5E\u6027\u680F .\u57FA\u7840\u5C5E\u6027-\u96B6\u5C5E\u89D2\u8272\u680F .\u57FA\u7840\u5C5E\u6027-\u96B6\u5C5E\u89D2\u8272-\u590D\u9009\u6846 ::ng-deep .mat-checkbox-layout{line-height:20px;height:47px;white-space:pre-wrap}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u57FA\u7840\u5C5E\u6027\u680F .\u57FA\u7840\u5C5E\u6027-\u96B6\u5C5E\u89D2\u8272\u680F .\u57FA\u7840\u5C5E\u6027-\u96B6\u5C5E\u89D2\u8272-\u590D\u9009\u6846 ::ng-deep .mat-checkbox-inner-container{margin:auto 8px 24px 0}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u6A21\u5757{width:808px;height:100%}.\u4E00\u7EA7\u6807\u9898{font-size:16px;font-weight:700;margin-bottom:16px}.\u4E8C\u7EA7\u6807\u9898{font-size:12px;margin-bottom:8px}"]
}] }
];
/** @nocollapse */
ElementComponent.ctorParameters = () => [
{ type: MatIconRegistry$1 },
{ type: DomSanitizer },
{ type: ElementService },
{ type: MatDialog }
];
ElementComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.element',] }],
slider: [{ type: ViewChild, args: ['slider', { static: false },] }],
bill: [{ type: ViewChild, args: ['bill', { static: true },] }]
};
if (false) {
/** @type {?} */
ElementComponent.prototype.ElementOwnerNormal;
/** @type {?} */
ElementComponent.prototype.ElementOwnerAutoCreate;
/** @type {?} */
ElementComponent.prototype.hostClass;
/** @type {?} */
ElementComponent.prototype.slider;
/** @type {?} */
ElementComponent.prototype.bill;
/** @type {?} */
ElementComponent.prototype.filteredCategories;
/** @type {?} */
ElementComponent.prototype.filteredCategoriesEN;
/** @type {?} */
ElementComponent.prototype.filteredControllers;
/** @type {?} */
ElementComponent.prototype.svr;
/**
* @type {?}
* @private
*/
ElementComponent.prototype.dialog;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class ErrorMessageModule {
}
ErrorMessageModule.decorators = [
{ type: NgModule, args: [{
declarations: [ErrorMessageComponent],
entryComponents: [ErrorMessageComponent],
imports: [CommonModule, MatDialogModule]
},] }
];
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class BillFieldDirective {
/**
* @param {?} control
* @param {?} bill
* @param {?} matField
* @param {?} matCheckBox
*/
constructor(control, bill, matField, matCheckBox) {
this.control = control;
this.bill = bill;
this.matField = matField;
this.matCheckBox = matCheckBox;
}
/**
* @return {?}
*/
ngAfterContentInit() {
if (this.bill.fieldMap[this.control.name].Hidden) {
if (this.matField) {
this.matField._elementRef.nativeElement.style.display = 'none';
}
else if (this.matCheckBox) {
this.matCheckBox._elementRef.nativeElement.style.display = 'none';
}
}
}
}
BillFieldDirective.decorators = [
{ type: Directive, args: [{
selector: '[formControlName][commonBillField]'
},] }
];
/** @nocollapse */
BillFieldDirective.ctorParameters = () => [
{ type: NgControl },
{ type: BillComponent },
{ type: MatFormField, decorators: [{ type: Optional }] },
{ type: MatCheckbox, decorators: [{ type: Optional }] }
];
if (false) {
/**
* @type {?}
* @private
*/
BillFieldDirective.prototype.control;
/**
* @type {?}
* @private
*/
BillFieldDirective.prototype.bill;
/**
* @type {?}
* @private
*/
BillFieldDirective.prototype.matField;
/**
* @type {?}
* @private
*/
BillFieldDirective.prototype.matCheckBox;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class TrueFalseValueDirective {
/**
* @param {?} control
* @param {?} matCheckBox
*/
constructor(control, matCheckBox) {
this.control = control;
this.matCheckBox = matCheckBox;
// tslint:disable-next-line: no-input-rename
this.falseValue = false;
this.trueValue = true;
this.subs = [];
}
/**
* @return {?}
*/
ngOnDestroy() {
this.subs.forEach((/**
* @param {?} v
* @return {?}
*/
v => v.unsubscribe()));
}
/**
* @return {?}
*/
ngOnInit() {
this.matCheckBox.checked = this.trueValue === this.control.value ? true : false;
this.subs.push(this.matCheckBox.change.subscribe((/**
* @param {?} event
* @return {?}
*/
(event) => {
// patchValue 会引起checkbox的checked属性改变,这个问题以后解决
this.control.control.patchValue(event.checked ? this.trueValue : this.falseValue);
this.matCheckBox.checked = event.checked;
})));
}
}
TrueFalseValueDirective.decorators = [
{ type: Directive, args: [{
// tslint:disable-next-line: directive-selector
selector: 'mat-checkbox[trueFalseValue][formControlName]'
},] }
];
/** @nocollapse */
TrueFalseValueDirective.ctorParameters = () => [
{ type: FormControlName },
{ type: MatCheckbox }
];
TrueFalseValueDirective.propDecorators = {
falseValue: [{ type: Input }],
trueValue: [{ type: Input }]
};
if (false) {
/** @type {?} */
TrueFalseValueDirective.prototype.falseValue;
/** @type {?} */
TrueFalseValueDirective.prototype.trueValue;
/** @type {?} */
TrueFalseValueDirective.prototype.subs;
/**
* @type {?}
* @private
*/
TrueFalseValueDirective.prototype.control;
/**
* @type {?}
* @private
*/
TrueFalseValueDirective.prototype.matCheckBox;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class BillModule {
}
BillModule.decorators = [
{ type: NgModule, args: [{
declarations: [BillComponent, BillFieldDirective, CloneComponent, TrueFalseValueDirective],
imports: [
CommonModule,
MatButtonModule,
MatIconModule$1,
MatFormFieldModule$1,
MatInputModule$1,
ReactiveFormsModule,
MatSnackBarModule,
FormsModule,
ErrorMessageModule
],
exports: [BillComponent, BillFieldDirective, TrueFalseValueDirective, ReactiveFormsModule],
entryComponents: [CloneComponent]
},] }
];
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @record
*/
function ColumnsWithLetter$1() { }
if (false) {
/** @type {?} */
ColumnsWithLetter$1.prototype.Letter;
/** @type {?} */
ColumnsWithLetter$1.prototype.Columns;
}
/**
* @record
*/
function IDisplayColumn() { }
if (false) {
/** @type {?} */
IDisplayColumn.prototype.Name;
/** @type {?} */
IDisplayColumn.prototype.Hidden;
/** @type {?} */
IDisplayColumn.prototype.Order;
}
/** @enum {string} */
const Order = {
// OrderAsc 升序
OrderAsc: '+',
// OrderDesc 降序
OrderDesc: '-',
// OrderNone 无排序
OrderNone: '',
};
/**
* @record
*/
function IColumnType$1() { }
if (false) {
/** @type {?} */
IColumnType$1.prototype.Name;
/** @type {?} */
IColumnType$1.prototype.Type;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
const pinyin$1 = pinyin_;
class ViewDefineComponent {
/**
* @param {?} iconRegistry
* @param {?} sanitizer
*/
constructor(iconRegistry, sanitizer) {
this.hostClass = true;
this.ModifyEvent = new EventEmitter();
this.checkColumns = new Map();
this.orderAsc = Order.OrderAsc;
this.orderDesc = Order.OrderDesc;
this.orderNone = Order.OrderNone;
/** @type {?} */
const icons = [
'all_chosen',
'cancel_chosen',
'return_chosen',
'single_chosen',
'double_down',
'drag_indicator',
'arrow_collapse',
'arrow_expand',
'sorting_arrows',
'color_add',
'file_copy',
'bg_bottom_out'
];
icons.forEach((/**
* @param {?} v
* @return {?}
*/
v => {
iconRegistry.addSvgIcon(v, sanitizer.bypassSecurityTrustResourceUrl('assets/record-view/icon/' + v + '.svg'));
}));
}
/**
* @param {?} val
* @return {?}
*/
set AllColumns(val) {
this._allColumns = val;
this.refreshSelectedColumns(this._selectedColumns);
}
/**
* @param {?} val
* @return {?}
*/
set SelectedColumns(val) {
this.refreshSelectedColumns(val);
}
/**
* @return {?}
*/
ngOnInit() { }
/**
* @private
* @return {?}
*/
refreshCanSelectColumns() {
if (this._allColumns) {
this.CanSelectColumns = map2WithLetter$1(this._allColumns.filter((/**
* @param {?} col
* @return {?}
*/
col => !this._selectedColumns || !this._selectedColumns.find((/**
* @param {?} sel
* @return {?}
*/
sel => sel.Name === col)))));
}
}
/**
* @private
* @param {?=} cols
* @return {?}
*/
refreshSelectedColumns(cols) {
this.checkColumns.clear();
this._selectedColumns = cols;
this.refreshCanSelectColumns();
}
/**
* @param {?} event
* @return {?}
*/
drop(event) {
if (event.container === this.rightList) {
// 右边内部移动
if (event.previousContainer === event.container) {
moveItemInArray(event.container.data, event.previousIndex, event.currentIndex);
}
else {
// 从左边拖到右边
this._selectedColumns = this._selectedColumns || [];
this._selectedColumns.splice(event.currentIndex, 0, (/** @type {?} */ ({
Name: event.item.data,
Hidden: false,
Order: Order.OrderNone
})));
this.refreshCanSelectColumns();
}
}
else if (event.previousContainer !== event.container) {
// 从右边拖动到左边
event.previousContainer.data.splice(event.previousIndex, 1);
this.refreshCanSelectColumns();
}
this.emitModify();
}
/**
* @param {?} event
* @return {?}
*/
chkSelectChange(event) {
if (event.checked) {
this.checkColumns.set(event.source.value, true);
}
else {
this.checkColumns.delete(event.source.value);
}
}
/**
* @param {?} colName
* @return {?}
*/
toRight(colName) {
this._selectedColumns = this._selectedColumns || [];
this._selectedColumns.push((/** @type {?} */ ({
Name: colName,
Hidden: false,
Order: Order.OrderNone
})));
this.refreshCanSelectColumns();
this.emitModify();
}
/**
* @param {?} idx
* @return {?}
*/
toLeft(idx) {
this._selectedColumns.splice(idx, 1);
this.refreshCanSelectColumns();
this.emitModify();
}
/**
* @param {?} event
* @return {?}
*/
checkAll(event) {
if (event.checked) {
this.checkColumns.clear();
this.CanSelectColumns.forEach((/**
* @param {?} item
* @return {?}
*/
item => {
item.Columns.forEach((/**
* @param {?} node
* @return {?}
*/
node => {
this.checkColumns.set(node, true);
// console.log(this.checkColumns.get(node));
}));
}));
}
else {
this.checkColumns.clear();
}
}
/**
* @return {?}
*/
toRightAll() {
this._selectedColumns = this._selectedColumns || [];
this.CanSelectColumns.forEach((/**
* @param {?} v
* @return {?}
*/
v => {
v.Columns.forEach((/**
* @param {?} col
* @return {?}
*/
col => {
if (this.checkColumns.has(col)) {
this._selectedColumns.push((/** @type {?} */ ({
Name: col,
Hidden: false,
Order: Order.OrderNone
})));
}
}));
}));
this.refreshCanSelectColumns();
this.emitModify();
}
/**
* @param {?} letter
* @return {?}
*/
acronymFun(letter) {
document.querySelector('#' + letter).scrollIntoView(true);
}
/**
* @return {?}
*/
emitModify() {
this.ModifyEvent.emit(this._selectedColumns);
}
}
ViewDefineComponent.decorators = [
{ type: Component, args: [{
selector: 'common-view-define',
template: "<div class=\"main\">\r\n\t<div\r\n\t\t[class.\u9690\u85CF]=\"readonly\"\r\n\t\tclass=\"left-columns column-padding\"\r\n\t\tcdkDropList\r\n\t\t#leftList=\"cdkDropList\"\r\n\t\t[cdkDropListData]=\"CanSelectColumns\"\r\n\t\t[cdkDropListSortingDisabled]=\"true\"\r\n\t\t[cdkDropListConnectedTo]=\"[rightList]\"\r\n\t\t(cdkDropListDropped)=\"drop($event)\"\r\n\t>\r\n\t\t<div class=\"column-title\">\u5176\u4ED6\u5217</div>\r\n\t\t<div class=\"column-list\">\r\n\t\t\t<div *ngFor=\"let list of CanSelectColumns\">\r\n\t\t\t\t<div class=\"letter-color \u6307\u6807\u9996\u5B57\u6BCD\" id=\"{{ list.Letter }}\">\r\n\t\t\t\t\t{{ list.Letter | uppercase }}\r\n\t\t\t\t</div>\r\n\t\t\t\t<span\r\n\t\t\t\t\tmat-button\r\n\t\t\t\t\tclass=\"\u5217 \u5217\u5BBD\"\r\n\t\t\t\t\t*ngFor=\"let column of list.Columns; let index = index\"\r\n\t\t\t\t\tcdkDrag\r\n\t\t\t\t\t[cdkDragData]=\"column\"\r\n\t\t\t\t>\r\n\t\t\t\t\t<mat-checkbox\r\n\t\t\t\t\t\tclass=\"checkbox\"\r\n\t\t\t\t\t\t[value]=\"column\"\r\n\t\t\t\t\t\t[checked]=\"checkColumns.get(column)\"\r\n\t\t\t\t\t\t(change)=\"chkSelectChange($event)\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<span>{{ column }}</span>\r\n\t\t\t\t\t</mat-checkbox>\r\n\r\n\t\t\t\t\t<mat-icon class=\"\u663E\u793A\u5217\u524D\u6807\u7B7E \u6D6E\u52A8\u663E\u793A \u56FE\u6807\u5927\u5C0F\" svgIcon=\"drag_indicator\" cdkDragHandle></mat-icon>\r\n\t\t\t\t\t<div class=\"\u8981\u663E\u793A\u5217-\u529F\u80FD\u56FE\u6807 \u6D6E\u52A8\u663E\u793A\">\r\n\t\t\t\t\t\t<button mat-icon-button class=\"\u56FE\u6807\u6D9F\u6F2A\" (click)=\"toRight(column)\">\r\n\t\t\t\t\t\t\t<mat-icon class=\"\u4EAE\u8272\u5B57\u4F53 \u56FE\u6807\u5927\u5C0F\" svgIcon=\"last_page\"> </mat-icon>\r\n\t\t\t\t\t\t</button>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</span>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<div class=\"letter-list\">\r\n\t\t\t<div *ngFor=\"let list of CanSelectColumns\">\r\n\t\t\t\t<div class=\"letter-color \u5C45\u4E2D\" (click)=\"acronymFun(list.Letter)\">\r\n\t\t\t\t\t{{ list.Letter | uppercase }}\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<div class=\"\u5168\u9009\">\r\n\t\t\t<mat-checkbox (change)=\"checkAll($event)\">\r\n\t\t\t\t<span>\u5168\u9009</span>\r\n\t\t\t</mat-checkbox>\r\n\t\t\t<mat-icon class=\"\u5168\u9009\u56FE\u6807\" (click)=\"toRightAll()\" svgIcon=\"last_page\"> </mat-icon>\r\n\t\t</div>\r\n\t</div>\r\n\t<div\r\n\t\tclass=\"right column-padding\"\r\n\t\tcdkDropList\r\n\t\t#rightList=\"cdkDropList\"\r\n\t\t[cdkDropListData]=\"_selectedColumns\"\r\n\t\t[cdkDropListConnectedTo]=\"[leftList]\"\r\n\t\t(cdkDropListDropped)=\"drop($event)\"\r\n\t>\r\n\t\t<div class=\"column-title\">\u663E\u793A\u7684\u5217</div>\r\n\t\t<div\r\n\t\t\t*ngFor=\"let column of _selectedColumns; let index = index\"\r\n\t\t\tclass=\"\u5217\"\r\n\t\t\t[class.\u900F\u660E\u5EA6]=\"column.Hidden == true\"\r\n\t\t\t[cdkDragDisabled]=\"readonly\"\r\n\t\t\tcdkDrag\r\n\t\t>\r\n\t\t\t{{ index + 1 }} {{ column.Name }}\r\n\t\t\t<mat-icon class=\"\u663E\u793A\u5217\u524D\u6807\u7B7E \u6D6E\u52A8\u663E\u793A \u56FE\u6807\u5927\u5C0F\" svgIcon=\"drag_indicator\" cdkDragHandle></mat-icon>\r\n\t\t\t<mat-icon\r\n\t\t\t\t*ngIf=\"column.Order === orderDesc\"\r\n\t\t\t\tclass=\"\u663E\u793A\u5217\u524D\u6807\u7B7E \u6392\u5E8F \u56FE\u6807\u5927\u5C0F\"\r\n\t\t\t\tsvgIcon=\"arrow_downward\"\r\n\t\t\t></mat-icon>\r\n\t\t\t<mat-icon\r\n\t\t\t\t*ngIf=\"column.Order === orderAsc\"\r\n\t\t\t\tclass=\"\u663E\u793A\u5217\u524D\u6807\u7B7E \u6392\u5E8F \u56FE\u6807\u5927\u5C0F\"\r\n\t\t\t\tsvgIcon=\"arrow_upward\"\r\n\t\t\t></mat-icon>\r\n\t\t\t<div *ngIf=\"!readonly\" class=\"\u8981\u663E\u793A\u5217-\u529F\u80FD\u56FE\u6807 \u6D6E\u52A8\u663E\u793A\">\r\n\t\t\t\t<button mat-icon-button class=\"\u56FE\u6807\u6D9F\u6F2A\" (click)=\"column.Hidden = !column.Hidden; emitModify();\">\r\n\t\t\t\t\t<mat-icon class=\"\u56FE\u6807\u5927\u5C0F\" [svgIcon]=\"column.Hidden ? 'visibility_off' : 'visibility'\"> </mat-icon>\r\n\t\t\t\t</button>\r\n\r\n\t\t\t\t<ng-container [ngSwitch]=\"column.Order\">\r\n\t\t\t\t\t<button\r\n\t\t\t\t\t\tmat-icon-button\r\n\t\t\t\t\t\tclass=\"\u56FE\u6807\u6D9F\u6F2A\"\r\n\t\t\t\t\t\t*ngSwitchCase=\"orderAsc\"\r\n\t\t\t\t\t\t(click)=\"column.Order = orderNone;emitModify();\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<mat-icon class=\"\u56FE\u6807\u5927\u5C0F\" svgIcon=\"arrow_upward\"> </mat-icon>\r\n\t\t\t\t\t</button>\r\n\t\t\t\t\t<button\r\n\t\t\t\t\t\tmat-icon-button\r\n\t\t\t\t\t\tclass=\"\u56FE\u6807\u6D9F\u6F2A\"\r\n\t\t\t\t\t\t*ngSwitchCase=\"orderDesc\"\r\n\t\t\t\t\t\t(click)=\"column.Order = orderAsc; emitModify();\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<mat-icon class=\"\u56FE\u6807\u5927\u5C0F\" svgIcon=\"arrow_downward\"> </mat-icon>\r\n\t\t\t\t\t</button>\r\n\t\t\t\t\t<button\r\n\t\t\t\t\t\tmat-icon-button\r\n\t\t\t\t\t\tclass=\"\u56FE\u6807\u6D9F\u6F2A\"\r\n\t\t\t\t\t\t*ngSwitchDefault\r\n\t\t\t\t\t\t(click)=\"column.Order = orderDesc;emitModify();\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<mat-icon class=\"\u56FE\u6807\u5927\u5C0F\" svgIcon=\"sorting_arrows\"> </mat-icon>\r\n\t\t\t\t\t</button>\r\n\t\t\t\t</ng-container>\r\n\t\t\t\t<button mat-icon-button class=\"\u56FE\u6807\u6D9F\u6F2A\" (click)=\"toLeft(index)\">\r\n\t\t\t\t\t<mat-icon class=\"\u4EAE\u8272\u5B57\u4F53 \u56FE\u6807\u5927\u5C0F \u65CB\u8F6C\" svgIcon=\"last_page\"> </mat-icon>\r\n\t\t\t\t</button>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n</div>\r\n",
styles: ["@charset \"UTF-8\";.main{width:100%;height:100%;display:flex;flex-direction:row}.main .left-columns{max-width:248px;min-width:170px;flex-grow:1;height:100%;position:relative}.main .left-columns .column-list{height:calc(100% - 48px);max-height:100%;margin:0;overflow-y:auto}.main .left-columns .letter-list{height:calc(100% - 34px);position:absolute;top:34px;right:0;z-index:1;overflow-y:auto}.main .left-columns .\u5168\u9009{width:128px;height:32px;line-height:24px;border-radius:16px;position:absolute;left:0;bottom:8px;font-size:16px;box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.12),0 1px 5px 0 rgba(0,0,0,.2)}.main .left-columns .\u5168\u9009 .mat-checkbox{padding-left:16px;vertical-align:top!important;margin:0}.main .left-columns .\u5168\u9009 .\u5168\u9009\u56FE\u6807{position:absolute;top:4px;right:16px;width:24px;height:24px;font-size:24px;line-height:16px;cursor:pointer}.main .left-columns .letter-color{width:20px;font-size:12px;text-align:center}.main .left-columns .\u6307\u6807\u9996\u5B57\u6BCD{margin:8px 8px 4px}.main .left-columns .\u5C45\u4E2D{text-align:center;cursor:pointer}.main .right{flex-grow:2;min-width:200px;height:100%;position:relative}.main .column-padding{display:block;padding-top:32px;box-sizing:border-box}.main .column-padding .column-title{height:16px;border-left:4px solid #000;padding-left:12px;font-size:14px;position:absolute;top:8px;left:0}.main .\u65CB\u8F6C{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.main .\u900F\u660E\u5EA6{opacity:.5}.main .\u9690\u85CF{display:none}.\u5217{display:block;height:32px;line-height:32px;padding:0 24px;box-sizing:border-box;text-align:left;font-size:14px;cursor:pointer;position:relative}.\u5217 .\u6D6E\u52A8\u663E\u793A{display:none}.\u5217 .\u663E\u793A\u5217\u524D\u6807\u7B7E{position:absolute;top:50%;left:0;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.\u5217 .\u6392\u5E8F{display:block}.\u5217 .\u8981\u663E\u793A\u5217-\u529F\u80FD\u56FE\u6807{height:32px;line-height:32px;position:absolute;right:0;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.\u5217 .\u56FE\u6807\u5927\u5C0F{width:16px;height:16px;line-height:16px}.\u5217 .\u56FE\u6807\u6D9F\u6F2A{width:32px;height:32px;text-align:center;line-height:32px;vertical-align:top}.\u5217:hover{box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);z-index:5}.\u5217:hover .\u6D6E\u52A8\u663E\u793A{display:block}.\u5217:hover .\u6392\u5E8F{display:none}.\u5217\u5BBD{width:calc(100% - 24px)}"]
}] }
];
/** @nocollapse */
ViewDefineComponent.ctorParameters = () => [
{ type: MatIconRegistry$1 },
{ type: DomSanitizer }
];
ViewDefineComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.view-define',] }],
readonly: [{ type: Input }],
AllColumns: [{ type: Input }],
ModifyEvent: [{ type: Output }],
leftList: [{ type: ViewChild, args: ['leftList', { static: false },] }],
rightList: [{ type: ViewChild, args: ['rightList', { static: false },] }],
SelectedColumns: [{ type: Input }]
};
if (false) {
/** @type {?} */
ViewDefineComponent.prototype.hostClass;
/** @type {?} */
ViewDefineComponent.prototype.readonly;
/** @type {?} */
ViewDefineComponent.prototype.ModifyEvent;
/** @type {?} */
ViewDefineComponent.prototype._allColumns;
/** @type {?} */
ViewDefineComponent.prototype.leftList;
/** @type {?} */
ViewDefineComponent.prototype.rightList;
/** @type {?} */
ViewDefineComponent.prototype.CanSelectColumns;
/** @type {?} */
ViewDefineComponent.prototype._selectedColumns;
/** @type {?} */
ViewDefineComponent.prototype.checkColumns;
/** @type {?} */
ViewDefineComponent.prototype.orderAsc;
/** @type {?} */
ViewDefineComponent.prototype.orderDesc;
/** @type {?} */
ViewDefineComponent.prototype.orderNone;
}
/**
* @param {?} v
* @return {?}
*/
function map2WithLetter$1(v) {
/** @type {?} */
const mapList = new Map();
v.forEach((/**
* @param {?} vv
* @return {?}
*/
vv => {
/** @type {?} */
let headerLetter = pinyin$1(vv, { style: pinyin$1.STYLE_FIRST_LETTER }).map((/**
* @param {?} s
* @return {?}
*/
s => s[0]))[0];
if (headerLetter.length > 1) {
headerLetter = headerLetter[0];
}
if (mapList.has(headerLetter)) {
mapList.get(headerLetter).push(vv);
}
else {
mapList.set(headerLetter, [vv]);
}
}));
// 排序
/** @type {?} */
const rev = (/** @type {?} */ ([]));
mapList.forEach((/**
* @param {?} columns
* @param {?} letter
* @return {?}
*/
(columns, letter) => {
rev.push((/** @type {?} */ ({ Letter: letter, Columns: columns })));
}));
return rev.sort((/**
* @param {?} a
* @param {?} b
* @return {?}
*/
(a, b) => a.Letter.localeCompare(b.Letter)));
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class Label {
/**
* @param {?} data
* @return {?}
*/
static fromInterface(data) {
/** @type {?} */
const rev = new Label();
Object.assign(rev, data);
return rev;
}
/**
* @return {?}
*/
displayLabel() {
return this.Name;
}
/**
* @param {?} data
* @return {?}
*/
equal(data) {
return this.CategoryID === data.CategoryID && this.ID === data.ID && this.Name === data.Name;
}
}
if (false) {
/** @type {?} */
Label.prototype.CategoryID;
/** @type {?} */
Label.prototype.ID;
/** @type {?} */
Label.prototype.Name;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class Category {
/**
* @param {?} data
* @return {?}
*/
static fromInterface(data) {
/** @type {?} */
const rev = new Category();
rev.ID = data.ID;
rev.Name = data.Name;
rev.OwnerBy = data.OwnerBy;
rev.Owner = data.Owner;
rev.Position = data.Position;
if (data.Labels) {
rev.Labels = data.Labels.map((/**
* @param {?} v
* @return {?}
*/
v => Label.fromInterface(Object.assign({ CategoryID: data.ID }, v))));
}
return rev;
}
/**
* @return {?}
*/
displayLabel() {
return `${this.Position}.${this.Name}(${this.Owner})`;
}
/**
* @param {?} ids
* @return {?}
*/
setLabelsPosition(ids) {
/** @type {?} */
const oldArray = [...this.Labels];
this.Labels.splice(0, oldArray.length, ...ids.map((/**
* @param {?} v
* @return {?}
*/
v => oldArray.find((/**
* @param {?} vv
* @return {?}
*/
vv => vv.ID === v)))));
}
}
if (false) {
/** @type {?} */
Category.prototype.ID;
/** @type {?} */
Category.prototype.Name;
/** @type {?} */
Category.prototype.OwnerBy;
/** @type {?} */
Category.prototype.Owner;
/** @type {?} */
Category.prototype.Position;
/** @type {?} */
Category.prototype.Labels;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @record
*/
function ModelElementCategory() { }
if (false) {
/** @type {?} */
ModelElementCategory.prototype.ID;
/** @type {?} */
ModelElementCategory.prototype.EleName;
/** @type {?} */
ModelElementCategory.prototype.OwnerBy;
/** @type {?} */
ModelElementCategory.prototype.Owner;
/** @type {?} */
ModelElementCategory.prototype.Name;
/** @type {?} */
ModelElementCategory.prototype.Position;
/** @type {?} */
ModelElementCategory.prototype.Labels;
}
/**
* @record
*/
function ModelElementLabel() { }
if (false) {
/** @type {?} */
ModelElementLabel.prototype.CategoryID;
/** @type {?} */
ModelElementLabel.prototype.ID;
/** @type {?} */
ModelElementLabel.prototype.Name;
/** @type {?} */
ModelElementLabel.prototype.Position;
/** @type {?} */
ModelElementLabel.prototype.LastWriteTime;
/** @type {?} */
ModelElementLabel.prototype.LastWriteUser;
/** @type {?} */
ModelElementLabel.prototype.Conts;
/** @type {?} */
ModelElementLabel.prototype.PlainText;
}
/**
* @record
*/
function AddCategoryParam() { }
if (false) {
/** @type {?} */
AddCategoryParam.prototype.EleName;
/** @type {?} */
AddCategoryParam.prototype.Name;
/** @type {?} */
AddCategoryParam.prototype.OwnerBy;
/** @type {?|undefined} */
AddCategoryParam.prototype.BeforeAtID;
}
/**
* @record
*/
function SetCategoryPositionParam() { }
if (false) {
/** @type {?} */
SetCategoryPositionParam.prototype.ID;
/** @type {?} */
SetCategoryPositionParam.prototype.Position;
}
/**
* @record
*/
function SetCategoryPositionResult() { }
if (false) {
/** @type {?} */
SetCategoryPositionResult.prototype.ID;
/** @type {?} */
SetCategoryPositionResult.prototype.Position;
}
/**
* @record
*/
function UpdateCategoryParam() { }
if (false) {
/** @type {?} */
UpdateCategoryParam.prototype.ID;
/** @type {?} */
UpdateCategoryParam.prototype.Name;
/** @type {?} */
UpdateCategoryParam.prototype.OwnerBy;
}
/**
* @record
*/
function AddLabelParam() { }
if (false) {
/** @type {?} */
AddLabelParam.prototype.CategoryID;
/** @type {?} */
AddLabelParam.prototype.Name;
/** @type {?} */
AddLabelParam.prototype.Conts;
/** @type {?} */
AddLabelParam.prototype.PlainText;
}
/**
* @record
*/
function SetLabelPositionParam() { }
if (false) {
/** @type {?} */
SetLabelPositionParam.prototype.CategoryID;
/** @type {?} */
SetLabelPositionParam.prototype.ID;
/** @type {?} */
SetLabelPositionParam.prototype.Position;
}
/**
* @record
*/
function SetLabelPositionResult() { }
if (false) {
/** @type {?} */
SetLabelPositionResult.prototype.ID;
/** @type {?} */
SetLabelPositionResult.prototype.Position;
}
/**
* @record
*/
function UpdateLabelParam() { }
if (false) {
/** @type {?} */
UpdateLabelParam.prototype.CategoryID;
/** @type {?} */
UpdateLabelParam.prototype.ID;
/** @type {?} */
UpdateLabelParam.prototype.Name;
/** @type {?} */
UpdateLabelParam.prototype.Conts;
/** @type {?} */
UpdateLabelParam.prototype.PlainText;
}
/**
* @record
*/
function IFetchElementAllCategoriesResult() { }
if (false) {
/** @type {?} */
IFetchElementAllCategoriesResult.prototype.OwnerBy;
/** @type {?} */
IFetchElementAllCategoriesResult.prototype.Owner;
/** @type {?} */
IFetchElementAllCategoriesResult.prototype.DeptName;
}
class FetchElementAllCategoriesResult {
/**
* @param {?} data
* @return {?}
*/
static fromInterface(data) {
/** @type {?} */
const rev = new FetchElementAllCategoriesResult();
Object.assign(rev, Object.assign({}, data));
return rev;
}
/**
* @return {?}
*/
categoryDisplayLabel() {
switch (this.OwnerBy) {
case OwnerByEnum.ownerByEle:
return '缺省';
case OwnerByEnum.ownerByDept:
return `${this.Owner}.${this.DeptName}`;
case OwnerByEnum.ownerByUser:
return '私有';
}
}
}
if (false) {
/** @type {?} */
FetchElementAllCategoriesResult.prototype.OwnerBy;
/** @type {?} */
FetchElementAllCategoriesResult.prototype.Owner;
/** @type {?} */
FetchElementAllCategoriesResult.prototype.DeptName;
}
/**
* @record
*/
function FetchLabelResult() { }
if (false) {
/** @type {?} */
FetchLabelResult.prototype.Name;
/** @type {?} */
FetchLabelResult.prototype.Position;
/** @type {?} */
FetchLabelResult.prototype.LastWriteTime;
/** @type {?} */
FetchLabelResult.prototype.LastWriteUser;
/** @type {?} */
FetchLabelResult.prototype.Conts;
/** @type {?} */
FetchLabelResult.prototype.PlainText;
}
class EleViewBackFaceService {
/**
* @param {?} api
*/
constructor(api) {
this.api = api;
this.ele = 'eleview';
}
/**
* @param {?} param
* @return {?}
*/
addCategory(param) {
return this.api
.post(this.ele, 'add-category', param)
.pipe(map((/**
* @param {?} v
* @return {?}
*/
v => (v ? Category.fromInterface(v) : null))));
}
/**
* @param {?} id
* @return {?}
*/
removeCategory(id) {
return this.api.post(this.ele, 'remove-category', id);
}
/**
* @param {?} param
* @return {?}
*/
setCategoryPosition(param) {
return this.api.post(this.ele, 'set-category-position', param);
}
/**
* @param {?} param
* @return {?}
*/
updateCategory(param) {
return this.api.post(this.ele, 'update-category', param);
}
/**
* @param {?} param
* @return {?}
*/
fetchCategories(param) {
return this.api
.get(this.ele, 'fetch-categories', param)
.pipe(map((/**
* @param {?} v
* @return {?}
*/
v => (v ? v.map((/**
* @param {?} vv
* @return {?}
*/
vv => Category.fromInterface(vv))) : null))));
}
/**
* @param {?} eleName
* @return {?}
*/
fetchElementAllCategories(eleName) {
return this.api.get(this.ele, 'fetch-element-all-categories', eleName).pipe(map((/**
* @param {?} v
* @return {?}
*/
v => {
return v.map((/**
* @param {?} vv
* @return {?}
*/
vv => FetchElementAllCategoriesResult.fromInterface(vv)));
})));
}
// 获取菜单项所有标签的日志
/**
* @param {?} param
* @return {?}
*/
fetchCategoryLabelHis(param) {
return this.api.get(this.ele, 'fetch-category-label-his', param);
}
// 获取标签的日志列表
/**
* @param {?} param
* @return {?}
*/
fetchLabelHisList(param) {
return this.api.get(this.ele, 'fetch-label-his-list', param);
}
// 根据时间获取label的内容
/**
* @param {?} param
* @return {?}
*/
fetchLabelHis(param) {
return this.api.get(this.ele, 'fetch-label-his', param);
}
/**
* @param {?} param
* @return {?}
*/
addLabel(param) {
return this.api.post(this.ele, 'add-label', param);
}
/**
* @param {?} param
* @return {?}
*/
removeLabel(param) {
return this.api.post(this.ele, 'remove-label', param);
}
/**
* @param {?} param
* @return {?}
*/
nodeToString(param) {
if (param) {
return this.api.post(this.ele, 'node-to-string', param);
}
else {
return of('');
}
}
/**
* @param {?} param
* @return {?}
*/
stringToNode(param) {
if (param) {
return this.api.post(this.ele, 'string-to-node', param);
}
else {
return of(null);
}
}
/**
* @param {?} param
* @return {?}
*/
setLabelPosition(param) {
return this.api.post(this.ele, 'set-label-position', param);
}
/**
* @param {?} param
* @return {?}
*/
updateLabel(param) {
return this.api.post(this.ele, 'update-label', param);
}
/**
* @param {?} param
* @return {?}
*/
fetchLabel(param) {
return this.api.get(this.ele, 'fetch-label', param);
}
/**
* @param {?} param
* @return {?}
*/
fetchFullCategories(param) {
return this.api.get(this.ele, 'fetch-full-categories', param);
}
}
EleViewBackFaceService.decorators = [
{ type: Injectable, args: [{
providedIn: 'root'
},] }
];
/** @nocollapse */
EleViewBackFaceService.ctorParameters = () => [
{ type: ElementApiService }
];
/** @nocollapse */ EleViewBackFaceService.ngInjectableDef = ɵɵdefineInjectable({ factory: function EleViewBackFaceService_Factory() { return new EleViewBackFaceService(ɵɵinject(ElementApiService)); }, token: EleViewBackFaceService, providedIn: "root" });
if (false) {
/** @type {?} */
EleViewBackFaceService.prototype.ele;
/**
* @type {?}
* @private
*/
EleViewBackFaceService.prototype.api;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @return {?}
*/
function newID() {
/** @type {?} */
const buf = v1(null, []);
/** @type {?} */
const TYPED_ARRAY = new Uint8Array(buf);
/** @type {?} */
const STRING_CHAR = TYPED_ARRAY.reduce((/**
* @param {?} data
* @param {?} byte
* @return {?}
*/
(data, byte) => {
return data + String.fromCharCode(byte);
}), '');
/** @type {?} */
const base64String = btoa(STRING_CHAR);
return base64String;
}
class LabelMockBackfaceService {
/**
* @param {?} backface
* @param {?} curr
*/
constructor(backface, curr) {
this.backface = backface;
this.curr = curr;
}
/**
* @param {?} param
* @return {?}
*/
addCategory(param) {
if (!param.Name) {
return throwError('名称为空');
}
if (this.recordViewData.labelCategories.find((/**
* @param {?} v
* @return {?}
*/
v => v.Name === param.Name))) {
return throwError('名称重复');
}
/** @type {?} */
const newCate = (/** @type {?} */ ({
ID: newID(),
EleName: param.EleName,
OwnerBy: param.OwnerBy,
Owner: ownerElement,
Name: param.Name
}));
if (param.BeforeAtID) {
this.recordViewData.labelCategories.splice(this.recordViewData.labelCategories.findIndex((/**
* @param {?} v
* @return {?}
*/
v => v.ID === param.BeforeAtID)), 0, newCate);
}
else {
this.recordViewData.labelCategories.push(newCate);
}
this.recordViewData.labelCategories.forEach((/**
* @param {?} v
* @param {?} i
* @return {?}
*/
(v, i) => (v.Position = i + 1)));
/** @type {?} */
const rev = new Category();
rev.ID = newCate.ID;
rev.Name = newCate.Name;
rev.Owner = newCate.Owner;
rev.OwnerBy = newCate.OwnerBy;
rev.Position = newCate.Position;
return of(rev);
}
/**
* @param {?} id
* @return {?}
*/
removeCategory(id) {
this.recordViewData.labelCategories
.splice(this.recordViewData.labelCategories.findIndex((/**
* @param {?} v
* @return {?}
*/
v => v.ID === id)), 1)
.forEach((/**
* @param {?} v
* @param {?} i
* @return {?}
*/
(v, i) => (v.Position = i + 1)));
return of(true);
}
/**
* @param {?} param
* @return {?}
*/
setCategoryPosition(param) {
moveItemInArray(this.recordViewData.labelCategories, this.recordViewData.labelCategories.findIndex((/**
* @param {?} v
* @return {?}
*/
v => v.ID === param.ID)), param.Position - 1);
this.recordViewData.labelCategories.forEach((/**
* @param {?} v
* @param {?} i
* @return {?}
*/
(v, i) => (v.Position = i + 1)));
return of(this.recordViewData.labelCategories.map((/**
* @param {?} v
* @return {?}
*/
v => ({ ID: v.ID, Position: v.Position }))));
}
/**
* @param {?} param
* @return {?}
*/
updateCategory(param) {
/** @type {?} */
const c = this.recordViewData.labelCategories.find((/**
* @param {?} v
* @return {?}
*/
v => v.ID === param.ID));
c.Name = param.Name;
return of(true);
}
/**
* @param {?} param
* @return {?}
*/
fetchCategories(param) {
// 新增状态下,不能去取数据,因为有可能会取到已存在的记录数据,造成泄密
if (this.isAdd) {
return of([]);
}
return this.backface
.fetchFullCategories({ EleName: param.EleName, OwnerBy: param.OwnerBy, Owner: param.Owner })
.pipe(map((/**
* @param {?} cates
* @return {?}
*/
cates => {
this.recordViewData.labelCategories = cates;
return this.recordViewData.labelCategories.map((/**
* @param {?} v
* @return {?}
*/
v => {
/** @type {?} */
let lbls;
if (v.Labels) {
lbls = v.Labels.map((/**
* @param {?} lbl
* @return {?}
*/
lbl => ({
ID: lbl.ID,
Name: lbl.Name
})));
}
return Category.fromInterface({
ID: v.ID,
Name: v.Name,
Owner: v.Owner,
OwnerBy: v.OwnerBy,
Position: v.Position,
Labels: lbls
});
}));
})));
}
// 获取菜单项所有标签的日志
/**
* @param {?} param
* @return {?}
*/
fetchCategoryLabelHis(param) {
if (this.isAdd) {
return of([]);
}
return this.backface.fetchCategoryLabelHis(param);
}
// 获取标签的日志列表
/**
* @param {?} param
* @return {?}
*/
fetchLabelHisList(param) {
if (this.isAdd) {
return of([]);
}
return this.backface.fetchLabelHisList(param);
}
// 根据时间获取label的内容
/**
* @param {?} param
* @return {?}
*/
fetchLabelHis(param) {
return this.backface.fetchLabelHis(param);
}
/**
* @param {?} param
* @return {?}
*/
addLabel(param) {
/** @type {?} */
const c = this.recordViewData.labelCategories.find((/**
* @param {?} v
* @return {?}
*/
v => v.ID === param.CategoryID));
c.Labels = c.Labels || [];
if (c.Labels.find((/**
* @param {?} v
* @return {?}
*/
v => v.Name === param.Name))) {
return throwError('重复的名称');
}
/** @type {?} */
const lbl = (/** @type {?} */ ({
CategoryID: param.CategoryID,
ID: newID(),
Name: param.Name,
LastWriteTime: new Date(),
LastWriteUser: this.curr.data.UserName,
Conts: param.Conts,
PlainText: param.PlainText
}));
c.Labels.push(lbl);
c.Labels.forEach((/**
* @param {?} v
* @param {?} i
* @return {?}
*/
(v, i) => (v.Position = i + 1)));
return of(lbl);
}
/**
* @param {?} param
* @return {?}
*/
removeLabel(param) {
/** @type {?} */
const lbls = this.recordViewData.labelCategories.find((/**
* @param {?} v
* @return {?}
*/
v => v.ID === param.CategoryID)).Labels;
lbls.splice(lbls.findIndex((/**
* @param {?} v
* @return {?}
*/
v => v.ID === param.ID)), 1);
return of(true);
}
/**
* @param {?} param
* @return {?}
*/
nodeToString(param) {
return this.backface.nodeToString(param);
}
/**
* @param {?} param
* @return {?}
*/
stringToNode(param) {
return this.backface.stringToNode(param);
}
/**
* @param {?} param
* @return {?}
*/
setLabelPosition(param) {
/** @type {?} */
const lbls = this.recordViewData.labelCategories.find((/**
* @param {?} v
* @return {?}
*/
v => v.ID === param.CategoryID)).Labels;
moveItemInArray(lbls, lbls.findIndex((/**
* @param {?} v
* @return {?}
*/
v => v.ID === param.ID)), param.Position - 1);
lbls.forEach((/**
* @param {?} v
* @param {?} i
* @return {?}
*/
(v, i) => (v.Position = i + 1)));
return of(lbls.map((/**
* @param {?} v
* @return {?}
*/
v => ({ ID: v.ID, Position: v.Position }))));
}
/**
* @param {?} param
* @return {?}
*/
updateLabel(param) {
/** @type {?} */
const lbl = this.recordViewData.labelCategories
.find((/**
* @param {?} v
* @return {?}
*/
v => v.ID === param.CategoryID))
.Labels.find((/**
* @param {?} v
* @return {?}
*/
v => v.ID === param.ID));
lbl.Name = param.Name;
lbl.Conts = param.Conts;
lbl.PlainText = param.PlainText;
lbl.LastWriteTime = new Date();
return of(lbl);
}
/**
* @param {?} param
* @return {?}
*/
fetchLabel(param) {
return of(this.recordViewData.labelCategories.find((/**
* @param {?} v
* @return {?}
*/
v => v.ID === param.CategoryID)).Labels.find((/**
* @param {?} v
* @return {?}
*/
v => v.ID === param.ID)));
}
}
LabelMockBackfaceService.decorators = [
{ type: Injectable }
];
/** @nocollapse */
LabelMockBackfaceService.ctorParameters = () => [
{ type: EleViewBackFaceService },
{ type: CurrentService }
];
if (false) {
/** @type {?} */
LabelMockBackfaceService.prototype.isAdd;
/** @type {?} */
LabelMockBackfaceService.prototype.recordViewData;
/**
* @type {?}
* @private
*/
LabelMockBackfaceService.prototype.backface;
/**
* @type {?}
* @private
*/
LabelMockBackfaceService.prototype.curr;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class SetPropertyRecordviewComponent {
/**
* @param {?} elementSvr
* @param {?} backface
*/
constructor(elementSvr, backface) {
this.elementSvr = elementSvr;
this.backface = backface;
this.hostClass = true;
this.ownerByEle = OwnerByEnum.ownerByEle;
this.ownerElement = ownerElement;
this.svr = (/** @type {?} */ (this.elementSvr.data.recordview));
this.backface.isAdd = this.elementSvr.bill.isAdd();
this.backface.recordViewData = this.svr;
}
/**
* @return {?}
*/
ngOnInit() {
this.svr.init();
}
/**
* @param {?} event
* @return {?}
*/
viewModify(event) {
this.svr.Params.Columns = event;
}
}
SetPropertyRecordviewComponent.decorators = [
{ type: Component, args: [{
selector: 'common-set-property-recordview',
template: "<div class=\"\u5C5E\u6027\u6837\u5F0F\" [ngSwitch]=\"elementSvr.ActiveTab\">\r\n\t<common-params-recordview-fetch-sql *ngSwitchCase=\"'\u53D6\u6570SQL'\"> </common-params-recordview-fetch-sql>\r\n\t<common-view-define\r\n\t\t#viewDefine\r\n\t\t*ngSwitchCase=\"'\u9ED8\u8BA4\u663E\u793A\u5217'\"\r\n\t\t[AllColumns]=\"svr.allColumnNames\"\r\n\t\t[SelectedColumns]=\"svr.Params.Columns\"\r\n\t\t(ModifyEvent)=\"viewModify($event)\"\r\n\t></common-view-define>\r\n\t<common-conditional-template *ngSwitchCase=\"'\u6761\u4EF6\u6A21\u677F'\"> </common-conditional-template>\r\n\t<common-processing-lists *ngSwitchCase=\"'\u5904\u7406\u5217\u8868'\"> </common-processing-lists>\r\n\t<div class=\"\u6807\u7B7E\u754C\u9762\" *ngSwitchCase=\"'\u6807\u7B7E'\">\r\n\t\t<common-label-manager\r\n\t\t\t[eleName]=\"elementSvr.bill.typeRecord['Name']\"\r\n\t\t\t[ownerBy]=\"ownerByEle\"\r\n\t\t\t[owner]=\"ownerElement\"\r\n\t\t\t[backface]=\"backface\"\r\n\t\t\t[title]=\"'\u7F3A\u7701'\"\r\n\t\t\t[allColumnsWithLetter]=\"svr.allColumnWithLetter\"\r\n\t\t\t[hasClose]=\"false\"\r\n\t\t>\r\n\t\t</common-label-manager>\r\n\t</div>\r\n</div>\r\n",
providers: [LabelMockBackfaceService],
styles: ["@charset \"UTF-8\";:host{width:100%;display:block}.\u5C5E\u6027\u6837\u5F0F{width:100%;height:100%;box-sizing:border-box}.\u5C5E\u6027\u6837\u5F0F .\u6807\u7B7E\u754C\u9762{width:100%;height:100%;padding:0 40px;box-sizing:border-box}"]
}] }
];
/** @nocollapse */
SetPropertyRecordviewComponent.ctorParameters = () => [
{ type: ElementService },
{ type: LabelMockBackfaceService }
];
SetPropertyRecordviewComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.set-property-recordview',] }],
viewDefine: [{ type: ViewChild, args: ['viewDefine', { static: false },] }]
};
if (false) {
/** @type {?} */
SetPropertyRecordviewComponent.prototype.hostClass;
/** @type {?} */
SetPropertyRecordviewComponent.prototype.viewDefine;
/** @type {?} */
SetPropertyRecordviewComponent.prototype.ownerByEle;
/** @type {?} */
SetPropertyRecordviewComponent.prototype.ownerElement;
/** @type {?} */
SetPropertyRecordviewComponent.prototype.svr;
/** @type {?} */
SetPropertyRecordviewComponent.prototype.elementSvr;
/** @type {?} */
SetPropertyRecordviewComponent.prototype.backface;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class ParamsRecordviewFetchSQLComponent {
/**
* @param {?} elementSvr
* @param {?} theme
*/
constructor(elementSvr, theme) {
this.elementSvr = elementSvr;
this.theme = theme;
this.hostClass = true;
this.svr = (/** @type {?} */ (this.elementSvr.data.recordview));
this.options = { maxLines: 12, printMargin: false };
this.dataColumns = true;
this.startCheck = false;
this.messageShow = false;
}
/**
* @return {?}
*/
ngOnInit() {
ace.config.set('basePath', '/front/assets/ace-builds/src-min-noconflict');
}
/**
* @return {?}
*/
genSQL() {
this.svr.Params.Sql = `<<if eq "oci8" .Driver>>
<<if ge .Limit 0>>
SELECT * FROM(
<<end>>
SELECT <<if .Columns>><<.Columns>><<else>>*<<end>>
FROM ${this.svr.Params.TableName}
<<if .Where>>WHERE <<.Where>><<end>>
<<if .OrderBy>>ORDER BY <<.OrderBy>><<end>>
<<if ge .Limit 0>>
)WHERE ROWNUM<=<<.Limit>>
<<end>>
<<else>>
SELECT <<if .Columns>><<.Columns>><<else>>*<<end>>
FROM ${this.svr.Params.TableName}
<<if .Where>>WHERE <<.Where>><<end>>
<<if .OrderBy>>ORDER BY <<.OrderBy>><<end>>
<<if ge .Limit 0>>LIMIT <<.Limit>><<end>>
<<end>>`;
}
/**
* @return {?}
*/
rebuildColumns() {
this.elementSvr.back
.checkSQL({
DB: this.svr.Params.DB,
Table: this.svr.Params.TableName,
ManualPage: this.svr.Params.ManualPage,
SQL: this.svr.Params.Sql
})
.subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
this.svr.SQLCheckError = v.Error;
if (!this.svr.SQLCheckError) {
this.svr.Params.AllColumns = v.Columns;
}
}));
}
/**
* @param {?} event
* @return {?}
*/
drop(event) {
moveItemInArray(this.svr.Params.AllColumns, event.previousIndex, event.currentIndex);
/** @type {?} */
const FieldChange = [];
this.svr.Params.AllColumns.forEach((/**
* @param {?} v
* @return {?}
*/
v => {
if (this.svr.Params.UniqueField.includes(v.Name)) {
FieldChange.push(v.Name);
}
}));
this.svr.Params.UniqueField = FieldChange;
}
/**
* @return {?}
*/
checkSQL() {
this.startCheck = true;
this.svr.checkSQL().subscribe((/**
* @return {?}
*/
() => {
this.startCheck = false;
this.messageShow = true;
}));
}
}
ParamsRecordviewFetchSQLComponent.decorators = [
{ type: Component, args: [{
selector: 'common-params-recordview-fetch-sql',
template: "<div class=\"\u53D6\u6570SQl\">\r\n\t<div class=\"\u4E00\u7EA7\u6807\u9898 \u5B57\u4F53\u989C\u8272\">\u53D6\u6570SQL</div>\r\n\t<div class=\"\u6570\u636E\u5E93\">\r\n\t\t<div class=\"\u4E8C\u7EA7\u6807\u9898\">\u6570\u636E\u5E93</div>\r\n\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t<mat-select [(ngModel)]=\"svr.Params.DB\"\r\n\t\t\t\t(valueChange)=\"svr.refreshTables()\">\r\n\t\t\t\t<mat-option [value]=\"\"> (\u5F53\u524D\u6570\u636E\u5E93) </mat-option>\r\n\t\t\t\t<mat-option *ngFor=\"let db of svr.DBList\" [value]=\"db\">\r\n\t\t\t\t\t{{ db }}\r\n\t\t\t\t</mat-option>\r\n\t\t\t</mat-select>\r\n\t\t</mat-form-field>\r\n\t</div>\r\n\t<div class=\"\u8868\">\r\n\t\t<div class=\"\u4E8C\u7EA7\u6807\u9898\">\u8868</div>\r\n\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t<mat-select [(ngModel)]=\"svr.Params.TableName\"\r\n\t\t\t\t(selectionChange)=\"checkSQL()\">\r\n\t\t\t\t<mat-option [value]=\"\">(\u7A7A) </mat-option>\r\n\t\t\t\t<mat-option *ngFor=\"let tab of svr.Tables\"\r\n\t\t\t\t\t[value]=\"tab|uppercase\">\r\n\t\t\t\t\t{{ tab|uppercase }}\r\n\t\t\t\t</mat-option>\r\n\t\t\t</mat-select>\r\n\t\t</mat-form-field>\r\n\t</div>\r\n\t<div class=\"\u4E8C\u7EA7\u6807\u9898\">\u4E3B\u952E</div>\r\n\t<mat-form-field appearance=\"outline\">\r\n\t\t<mat-select [(ngModel)]=\"svr.Params.UniqueField\" multiple>\r\n\t\t\t<div cdkDropList (cdkDropListDropped)=\"drop($event)\">\r\n\t\t\t\t<span *ngFor=\"let col of svr.Params.AllColumns\" cdkDrag>\r\n\t\t\t\t\t<mat-option [value]=\"col.Name\">\r\n\t\t\t\t\t\t{{ col.Name }}\r\n\t\t\t\t\t</mat-option>\r\n\t\t\t\t</span>\r\n\t\t\t</div>\r\n\t\t</mat-select>\r\n\t</mat-form-field>\r\n\t<div class=\"SQL\u8BBE\u7F6E\">\r\n\t\t<div class=\"SQL\u8BBE\u7F6E-\u6807\u9898 \u5B57\u4F53\u989C\u8272\">\r\n\t\t\t<span>SQL</span>\r\n\t\t\t<button class=\"\u6D6E\u52A8 \u751F\u6210SQL\" mat-raised-button\r\n\t\t\t\t(click)=\"genSQL()\">\u751F\u6210SQL</button>\r\n\t\t\t<mat-checkbox class=\"\u6D6E\u52A8\" [(ngModel)]=\"svr.Params.ManualPage\">\u624B\u5DE5\u5206\u9875\r\n\t\t\t</mat-checkbox>\r\n\t\t</div>\r\n\t\t<div class=\" SQL\u8BBE\u7F6E-\u5185\u5BB9 SQL\u8BBE\u7F6E-\u8FB9\u6846\">\r\n\t\t\t<div ace-editor [(text)]=\"svr.Params.Sql\" mode=\"sql\"\r\n\t\t\t\t[theme]=\"(theme.theme|async).model==='dark'?'tomorrow_night': 'eclipse'\"\r\n\t\t\t\t[options]=\"options\" [autoUpdateContent]=\"true\"\r\n\t\t\t\t[durationBeforeCallback]=\"1000\"\r\n\t\t\t\tstyle=\"min-height: 192px; width:100%; overflow: auto;\"></div>\r\n\t\t</div>\r\n\t\t<div class=\"check-toolbar\">\r\n\t\t\t<button class=\"\u9A8C\u8BC1SQL\" mat-stroked-button [disabled]=\"startCheck\"\r\n\t\t\t\t(click)=\"checkSQL()\">\r\n\t\t\t\t\u9A8C\u8BC1SQL\r\n\t\t\t</button>\r\n\t\t\t<div *ngIf=\"dataColumns\" class=\"\u6570\u636E\u5217\">\r\n\t\t\t\t<span class=\"\u663E\u793A\u6570\u636E\u5217\u6309\u94AE\" (click)=\"dataColumns = !dataColumns\">\r\n\t\t\t\t\t\u7ED3\u679C\u53CA\u6570\u636E\u5217\r\n\t\t\t\t\t<mat-icon svgIcon=\"expand_more\"></mat-icon>\r\n\t\t\t\t</span>\r\n\t\t\t</div>\r\n\t\t\t<div *ngIf=\"!dataColumns\" class=\"\u6570\u636E\u5217\">\r\n\t\t\t\t<button class=\"\u91CD\u7F6E\" mat-button (click)=\"rebuildColumns()\">\r\n\t\t\t\t\t\u590D\u4F4D\r\n\t\t\t\t</button>\r\n\t\t\t\t<span class=\"\u663E\u793A\u6570\u636E\u5217\u6309\u94AE\" (click)=\"dataColumns = !dataColumns\">\r\n\t\t\t\t\t\u6536\u8D77\r\n\t\t\t\t\t<mat-icon svgIcon=\"expand_less\"></mat-icon>\r\n\t\t\t\t</span>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<div *ngIf=\"!dataColumns\" class=\"\u4E3B\u952E\">\r\n\t\t\t<div class=\"\u4E3B\u952E\u7C7B\u578B\" *ngFor=\"let col of svr.Params.AllColumns\">\r\n\t\t\t\t<div class=\"\u4E8C\u7EA7\u6807\u9898 \u4E3B\u952E\u6807\u9898\">{{ col.Name }}</div>\r\n\t\t\t\t<mat-form-field class=\"\u9009\u62E9\u7C7B\u578B \u5B57\u4F53\u989C\u8272\" appearance=\"outline\">\r\n\t\t\t\t\t<mat-select [(ngModel)]=\"col.Type\">\r\n\t\t\t\t\t\t<mat-option value=\"STR\">\u5B57\u7B26\u4E32</mat-option>\r\n\t\t\t\t\t\t<mat-option value=\"FLOAT\">\u6570\u503C</mat-option>\r\n\t\t\t\t\t\t<mat-option value=\"INT\">\u6574\u578B</mat-option>\r\n\t\t\t\t\t\t<mat-option value=\"DATE\">\u65E5\u671F</mat-option>\r\n\t\t\t\t\t\t<mat-option value=\"BYTEA\">\u4E8C\u8FDB\u5236</mat-option>\r\n\t\t\t\t\t</mat-select>\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<ng-template #noError>\r\n\t\t\t<div *ngIf=\"messageShow\" class=\"\u6821\u9A8C\u6210\u529F\">\r\n\t\t\t\t<span>\r\n\t\t\t\t\t<mat-icon svgIcon=\"check_circle\"></mat-icon>SQL\u6821\u9A8C\u6210\u529F\r\n\t\t\t\t</span>\r\n\t\t\t\t<mat-icon class=\"\u5220\u9664\" svgIcon=\"cancel\"\r\n\t\t\t\t\t(click)=\"messageShow=false\"></mat-icon>\r\n\t\t\t</div>\r\n\t\t</ng-template>\r\n\t\t<div *ngIf=\"svr.SQLCheckError && messageShow;else noError\"\r\n\t\t\tclass=\"SQL\u8BBE\u7F6E-\u68C0\u9A8C\u5185\u5BB9 SQL\u8BBE\u7F6E-\u80CC\u666F\">\r\n\t\t\t<div class=\"\u6821\u9A8C\u5931\u8D25\">\r\n\t\t\t\t<mat-icon svgIcon=\"warning\"></mat-icon>\u4EE3\u7801\u62A5\u9519\uFF1A\r\n\t\t\t\t<mat-icon class=\"\u5220\u9664\" svgIcon=\"cancel\"\r\n\t\t\t\t\t(click)=\"messageShow=false\"></mat-icon>\r\n\t\t\t</div>\r\n\t\t\t<pre>\r\n\t\t\t{{ svr.SQLCheckError }}\r\n\t\t\t</pre>\r\n\t\t</div>\r\n\t</div>\r\n</div>",
styles: ["@charset \"UTF-8\";.\u53D6\u6570SQl{max-width:808px;height:100%;padding:24px 24px 24px 48px;overflow-y:auto;box-sizing:border-box}.\u53D6\u6570SQl .\u6570\u636E\u5E93{display:inline-block;margin-right:48px}.\u53D6\u6570SQl .\u8868{display:inline-block}.\u53D6\u6570SQl .\u91CD\u7F6E{min-width:56px;height:24px;line-height:24px;color:#fff;font-size:12px}.\u53D6\u6570SQl ::ng-deep .mat-form-field-wrapper{margin:0;padding-bottom:10px}.\u53D6\u6570SQl ::ng-deep .mat-form-field-infix{border:0;padding:8px 0}.\u53D6\u6570SQl ::ng-deep .mat-select-arrow-wrapper{display:block}.\u53D6\u6570SQl .mat-form-field{width:340px;font-size:14px}.\u53D6\u6570SQl .SQL\u8BBE\u7F6E-\u6807\u9898{height:48px;line-height:48px;font-size:14px}.\u53D6\u6570SQl .\u751F\u6210SQL{color:#fff;margin:6px 0 6px 16px}.\u53D6\u6570SQl .\u9A8C\u8BC1SQL{margin:16px 0}.\u53D6\u6570SQl .SQL\u8BBE\u7F6E-\u5185\u5BB9{height:192px;border-radius:4px;box-sizing:border-box;vertical-align:top;overflow:hidden}.\u53D6\u6570SQl .SQL\u8BBE\u7F6E-\u68C0\u9A8C\u5185\u5BB9{border-radius:4px;padding:8px;box-sizing:border-box;overflow:auto;font-size:12px}.\u53D6\u6570SQl .\u6821\u9A8C\u6210\u529F{height:36px;line-height:20px;border-radius:4px;padding:8px;box-sizing:border-box;font-size:14px;font-weight:700;background-color:rgba(126,211,33,.1);color:#7ed321}.\u53D6\u6570SQl .\u6821\u9A8C\u6210\u529F .mat-icon{width:16px;height:16px;line-height:16px;vertical-align:middle;margin:2px 8px 2px 0}.\u53D6\u6570SQl .\u6821\u9A8C\u6210\u529F .\u5220\u9664{float:right;margin:2px 8px 2px 0}.\u53D6\u6570SQl .\u6821\u9A8C\u5931\u8D25{height:36px;line-height:20px;padding:0 0 8px 16px;box-sizing:border-box;font-size:14px;font-weight:700}.\u53D6\u6570SQl .\u6821\u9A8C\u5931\u8D25 .mat-icon{width:16px;height:16px;line-height:16px;vertical-align:middle;margin:2px 8px 2px 0}.\u53D6\u6570SQl .\u6821\u9A8C\u5931\u8D25 .\u5220\u9664{float:right;margin:2px 0}.\u53D6\u6570SQl .\u6570\u636E\u5217{height:32px;line-height:32px;font-size:14px;margin:18px 0}.\u53D6\u6570SQl .\u6570\u636E\u5217 .mat-icon{width:24px;height:24px;line-height:24px;vertical-align:middle}.\u53D6\u6570SQl .\u6570\u636E\u5217 .\u663E\u793A\u6570\u636E\u5217\u6309\u94AE{cursor:pointer}.\u53D6\u6570SQl .\u6D6E\u52A8{float:right;font-size:14px}.\u53D6\u6570SQl .\u4E3B\u952E{width:100%;display:flex;flex-wrap:wrap;justify-content:flex-start}.\u53D6\u6570SQl .\u4E3B\u952E .\u4E3B\u952E\u7C7B\u578B{margin-right:20px;margin-bottom:14px;position:relative}.\u53D6\u6570SQl .\u4E3B\u952E .\u4E3B\u952E\u7C7B\u578B .\u9009\u62E9{position:absolute;left:0;bottom:15px}.\u53D6\u6570SQl .\u4E3B\u952E .\u9009\u62E9\u7C7B\u578B{width:140px;font-size:14px}.\u53D6\u6570SQl .\u4E3B\u952E .\u4E3B\u952E\u6807\u9898{font-weight:700}.check-toolbar{display:flex;justify-content:space-between}.\u4E00\u7EA7\u6807\u9898{font-size:16px;font-weight:700;margin-bottom:16px}.\u4E8C\u7EA7\u6807\u9898{font-size:12px;margin-bottom:8px}"]
}] }
];
/** @nocollapse */
ParamsRecordviewFetchSQLComponent.ctorParameters = () => [
{ type: ElementService },
{ type: ThemeService }
];
ParamsRecordviewFetchSQLComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.recordview-fetchSQL',] }]
};
if (false) {
/** @type {?} */
ParamsRecordviewFetchSQLComponent.prototype.hostClass;
/** @type {?} */
ParamsRecordviewFetchSQLComponent.prototype.svr;
/** @type {?} */
ParamsRecordviewFetchSQLComponent.prototype.options;
/** @type {?} */
ParamsRecordviewFetchSQLComponent.prototype.dataColumns;
/** @type {?} */
ParamsRecordviewFetchSQLComponent.prototype.startCheck;
/** @type {?} */
ParamsRecordviewFetchSQLComponent.prototype.messageShow;
/** @type {?} */
ParamsRecordviewFetchSQLComponent.prototype.elementSvr;
/** @type {?} */
ParamsRecordviewFetchSQLComponent.prototype.theme;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class SetPropertyImportComponent {
/**
* @param {?} elementSvr
*/
constructor(elementSvr) {
this.elementSvr = elementSvr;
this.hostClass = true;
this.svr = (/** @type {?} */ (this.elementSvr.data.import));
}
/**
* @return {?}
*/
ngOnInit() { }
}
SetPropertyImportComponent.decorators = [
{ type: Component, args: [{
selector: 'common-set-property-import',
template: "\r\n<div [ngSwitch]=\"elementSvr.ActiveTab\">\r\n\t<common-import-field *ngSwitchCase=\"'\u5B57\u6BB5\u8BBE\u7F6E'\"></common-import-field>\r\n\t\r\n\t<common-import-set *ngSwitchCase=\"'\u5C5E\u6027'\"></common-import-set>\r\n</div>\r\n",
styles: [":host{width:100%;height:100%;padding:24px 24px 24px 48px;overflow-y:auto;box-sizing:border-box}"]
}] }
];
/** @nocollapse */
SetPropertyImportComponent.ctorParameters = () => [
{ type: ElementService }
];
SetPropertyImportComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.set-property-import',] }]
};
if (false) {
/** @type {?} */
SetPropertyImportComponent.prototype.hostClass;
/** @type {?} */
SetPropertyImportComponent.prototype.svr;
/** @type {?} */
SetPropertyImportComponent.prototype.elementSvr;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class ProcessingListsComponent {
/**
* @param {?} elementSvr
* @param {?} eles
* @param {?} dialog
*/
constructor(elementSvr, eles, dialog) {
this.elementSvr = elementSvr;
this.eles = eles;
this.dialog = dialog;
this.hostClass = true;
this.svr = (/** @type {?} */ (this.elementSvr.data.recordview));
this.ctrlElementName = new FormControl();
this.subs = [];
}
/**
* @return {?}
*/
ngOnDestroy() {
this.subs.forEach((/**
* @param {?} v
* @return {?}
*/
v => v.unsubscribe()));
}
/**
* @return {?}
*/
ngOnInit() {
this.subs.push(this.svr.currentProcess.subscribe((/**
* @param {?} pro
* @return {?}
*/
pro => this.ctrlElementName.patchValue(pro ? pro.ElementName : null))), this.svr.inited.subscribe((/**
* @return {?}
*/
() => {
this.subs.push(this.ctrlElementName.valueChanges.pipe(startWith('')).subscribe((/**
* @param {?} val
* @return {?}
*/
val => {
this.filterElemets = this.svr.allElementNames
.filter((/**
* @param {?} v
* @return {?}
*/
v => v.includes(val)))
.sort((/**
* @param {?} a
* @param {?} b
* @return {?}
*/
(a, b) => a.localeCompare(b)));
})), this.ctrlElementName.valueChanges.subscribe((/**
* @param {?} val
* @return {?}
*/
val => {
if (this.svr.currentProcess.value) {
this.svr.currentProcess.value.ElementName = val;
}
})));
})));
}
/**
* @param {?} event
* @return {?}
*/
dropBind(event) {
moveItemInArray(this.svr.bindRecordProcesses, event.previousIndex, event.currentIndex);
this.svr.collectionProcesses();
}
/**
* @param {?} event
* @return {?}
*/
dropNotBind(event) {
moveItemInArray(this.svr.notBindRecordProcesses, event.previousIndex, event.currentIndex);
this.svr.collectionProcesses();
}
/**
* @param {?} pro
* @return {?}
*/
selectProcess(pro) {
this.svr.currentProcess.next(pro);
}
/**
* @return {?}
*/
add() {
/** @type {?} */
const pro = this.svr.currentProcess.value;
if (pro && pro.BindRecord) {
this.svr.bindRecordProcesses = this.svr.bindRecordProcesses || [];
this.svr.bindRecordProcesses.push({
Name: '新的处理',
BindRecord: true
});
}
else {
this.svr.notBindRecordProcesses = this.svr.notBindRecordProcesses || [];
this.svr.notBindRecordProcesses.push({
Name: '新的处理',
BindRecord: false
});
}
this.svr.collectionProcesses();
}
/**
* @return {?}
*/
delete() {
if (this.svr.currentProcess.value) {
this.svr.Params.Processes.splice(this.svr.Params.Processes.findIndex((/**
* @param {?} v
* @return {?}
*/
v => v === this.svr.currentProcess.value)), 1);
if (this.svr.Params.Processes.length > 0) {
this.svr.currentProcess.next(this.svr.Params.Processes[0]);
}
this.svr.refreshProcesses();
}
}
/**
* @return {?}
*/
openIconDialog() {
/** @type {?} */
const pro = this.svr.currentProcess.value;
if (!pro) {
return;
}
/** @type {?} */
const v = { icon: pro.Icon, color: pro.Color };
/** @type {?} */
const dialogRef = this.dialog.open(IconSelectComponent, {
width: '384px',
height: '100%',
data: v,
position: {
top: '0px',
right: '0px'
}
});
dialogRef.afterClosed().subscribe((/**
* @param {?} result
* @return {?}
*/
result => {
if (result) {
pro.Icon = result.icon;
pro.Color = result.color;
}
}));
}
}
ProcessingListsComponent.decorators = [
{ type: Component, args: [{
selector: 'common-processing-lists',
template: "<div class=\"content\">\r\n\t<div class=\"left\">\r\n\t\t<div class=\"title\">\r\n\t\t\t<div class=\"list-\u4E00\u7EA7\u6807\u9898 \u5B57\u4F53\u989C\u8272\">\u5904\u7406\u5217\u8868</div>\r\n\t\t\t<div class=\"\u65B0\u589E\" (click)=\"add()\">\r\n\t\t\t\t<mat-icon svgIcon=\"add\"></mat-icon>\r\n\t\t\t\t<span>\u65B0\u589E\u5904\u7406\u5217</span>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<div class=\"\u8BB0\u5F55\u6807\u9898\">\u7ED1\u5B9A\u8BB0\u5F55</div>\r\n\t\t<div cdkDropList class=\"pro-list\"\r\n\t\t\t(cdkDropListDropped)=\"dropBind($event)\">\r\n\t\t\t<div *ngFor=\"let pro of svr.bindRecordProcesses\" class=\"process\"\r\n\t\t\t\t[class.\u9009\u4E2D]=\"(svr.currentProcess|async).Name == pro.Name\"\r\n\t\t\t\t(click)=\"selectProcess(pro)\" cdkDrag>\r\n\t\t\t\t<mat-icon class=\"\u62D6\u62FD\u56FE\u6807\" svgIcon=\"drag_indicator\" cdkDragHandle>\r\n\t\t\t\t</mat-icon>\r\n\t\t\t\t<mat-icon class=\"\u5904\u7406\u5217\u56FE\u6807\" [svgIcon]=\"pro.Icon\"\r\n\t\t\t\t\t[ngClass]=\"pro.Color\"></mat-icon>\r\n\t\t\t\t<span>{{ pro.Name }}</span>\r\n\t\t\t\t<mat-icon *ngIf=\"(svr.currentProcess|async).Name == pro.Name\"\r\n\t\t\t\t\tclass=\"\u53F3\u6307\u793A\u7BAD\u5934\" svgIcon=\"keyboard_arrow_right\"></mat-icon>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<div class=\"\u8BB0\u5F55\u6807\u9898\">\u672A\u7ED1\u5B9A\u8BB0\u5F55</div>\r\n\t\t<div cdkDropList class=\"pro-list\"\r\n\t\t\t(cdkDropListDropped)=\"dropNotBind($event)\">\r\n\t\t\t<div class=\"process\" *ngFor=\"let pro of svr.notBindRecordProcesses\"\r\n\t\t\t\t[class.\u9009\u4E2D]=\"(svr.currentProcess|async)?.Name == pro.Name\"\r\n\t\t\t\t(click)=\"selectProcess(pro)\" cdkDrag>\r\n\t\t\t\t<mat-icon class=\"\u62D6\u62FD\u56FE\u6807\" svgIcon=\"drag_indicator\" cdkDragHandle>\r\n\t\t\t\t</mat-icon>\r\n\t\t\t\t<mat-icon class=\"\u5904\u7406\u5217\u56FE\u6807\" [svgIcon]=\"pro.Icon\"\r\n\t\t\t\t\t[ngClass]=\"pro.Color\"></mat-icon>\r\n\t\t\t\t<span>{{ pro.Name }}</span>\r\n\t\t\t\t<mat-icon *ngIf=\"(svr.currentProcess|async)?.Name == pro.Name\"\r\n\t\t\t\t\tclass=\"\u53F3\u6307\u793A\u7BAD\u5934\" svgIcon=\"keyboard_arrow_right\"></mat-icon>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n\t<div class=\"right\" *ngIf=\"svr.currentProcess|async\">\r\n\t\t<div class=\"list-\u4E00\u7EA7\u6807\u9898 \u5B57\u4F53\u989C\u8272\">\u5C5E\u6027\u8BBE\u7F6E</div>\r\n\t\t<div class=\"\u5220\u9664\">\r\n\t\t\t<mat-icon svgIcon=\"outlined:delete\" (click)=\"delete()\"\r\n\t\t\t\t*ngIf=\"svr.currentProcess\"></mat-icon>\r\n\t\t</div>\r\n\t\t<div class=\"\u5217\u4FE1\u606F\">\r\n\t\t\t<div class=\"\u56FE\u6807 mat-elevation-z4\" (click)=\"openIconDialog()\">\r\n\t\t\t\t<mat-icon [svgIcon]=\"(svr.currentProcess|async).Icon\"\r\n\t\t\t\t\t[ngClass]=\"(svr.currentProcess|async).Color\"></mat-icon>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"\u540D\u79F0\">\r\n\t\t\t\t<div class=\"list-\u4E8C\u7EA7\u6807\u9898\">\u540D\u79F0</div>\r\n\t\t\t\t<mat-form-field class=\"\u9009\u62E9\u6846\" appearance=\"outline\">\r\n\t\t\t\t\t<input matInput [(ngModel)]=\"svr.currentProcess.value.Name\"/>\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t</div>\r\n\t\t\t<mat-checkbox class=\"checkbox\"\r\n\t\t\t\t[(ngModel)]=\"svr.currentProcess.value.WithSql\">\r\n\t\t\t\t<span>\u4F20\u9001SQL</span>\r\n\t\t\t</mat-checkbox>\r\n\t\t\t<mat-checkbox class=\"checkbox\"\r\n\t\t\t\t[(ngModel)]=\"svr.currentProcess.value.BindRecord\"\r\n\t\t\t\t(change)=\"svr.refreshProcesses()\">\r\n\t\t\t\t<span>\u7ED1\u5B9A\u8BB0\u5F55</span>\r\n\t\t\t</mat-checkbox>\r\n\t\t</div>\r\n\t\t<div class=\"\u83DC\u5355\u9879\">\r\n\t\t\t<div class=\"list-\u4E8C\u7EA7\u6807\u9898\">\u83DC\u5355\u9879</div>\r\n\t\t\t<mat-form-field class=\"\u9009\u62E9\u6846\" appearance=\"outline\">\r\n\t\t\t\t<input matInput [formControl]=\"ctrlElementName\"\r\n\t\t\t\t\t[matAutocomplete]=\"autoElements\" />\r\n\t\t\t</mat-form-field>\r\n\t\t\t<mat-autocomplete #autoElements=\"matAutocomplete\">\r\n\t\t\t\t<mat-option *ngFor=\"let ele of filterElemets\"\r\n\t\t\t\t\t[value]=\"ele\"> {{ ele }}</mat-option>\r\n\t\t\t</mat-autocomplete>\r\n\t\t</div>\r\n\t\t<div class=\"\u4E3B\u952E\">\r\n\t\t\t<div class=\"list-\u4E8C\u7EA7\u6807\u9898\">\u4E3B\u952E</div>\r\n\t\t\t<mat-form-field class=\"\u9009\u62E9\u6846\" appearance=\"outline\">\r\n\t\t\t\t<mat-select [(ngModel)]=\"svr.currentProcess.value.TransPath\" multiple>\r\n\t\t\t\t\t<mat-option *ngFor=\"let col of svr.allColumnNames\"\r\n\t\t\t\t\t\t[value]=\"col\">{{ col }}</mat-option>\r\n\t\t\t\t</mat-select>\r\n\t\t\t</mat-form-field>\r\n\t\t</div>\r\n\t\t<div class=\"\u53C2\u6570\">\r\n\t\t\t<div class=\"list-\u4E8C\u7EA7\u6807\u9898\">Query\u53C2\u6570</div>\r\n\t\t\t<mat-form-field class=\"\u9009\u62E9\u6846\" appearance=\"outline\">\r\n\t\t\t\t<textarea matInput\r\n\t\t\t\t\t[(ngModel)]=\"svr.currentProcess.value.TransQuery\"></textarea>\r\n\t\t\t</mat-form-field>\r\n\t\t</div>\r\n\t\t<div class=\"\u53C2\u6570\">\r\n\t\t\t<div class=\"list-\u4E8C\u7EA7\u6807\u9898\">\u663E\u793A\u6761\u4EF6</div>\r\n\t\t\t<mat-form-field class=\"\u9009\u62E9\u6846\" appearance=\"outline\">\r\n\t\t\t\t<textarea matInput\r\n\t\t\t\t\t[(ngModel)]=\"svr.currentProcess.value.Visable\"></textarea>\r\n\t\t\t</mat-form-field>\r\n\t\t</div>\r\n\t\t<div class=\"\u53C2\u6570\">\r\n\t\t\t<div class=\"list-\u4E8C\u7EA7\u6807\u9898\">MoreStr</div>\r\n\t\t\t<mat-form-field class=\"\u9009\u62E9\u6846\" appearance=\"outline\">\r\n\t\t\t\t<textarea matInput\r\n\t\t\t\t\t[(ngModel)]=\"svr.currentProcess.value.MoreStr\"></textarea>\r\n\t\t\t</mat-form-field>\r\n\t\t</div>\r\n\t</div>\r\n</div>",
styles: ["@charset \"UTF-8\";:host{width:100%;height:100%}.content{height:100%;display:flex;padding:16px 0;box-sizing:border-box}.left{flex-grow:1;max-width:272px;min-width:172px;padding:8px;box-sizing:border-box;display:flex;flex-direction:column;overflow-y:auto}.left .title{display:flex;justify-content:space-between;margin-bottom:8px}.left .title .\u65B0\u589E{font-size:14px;cursor:pointer}.left .title .\u65B0\u589E span{display:inline-block;height:24px;line-height:24px;vertical-align:top}.left .\u8BB0\u5F55\u6807\u9898{font-size:14px;margin:16px 24px}.left .\u5904\u7406\u5217\u56FE\u6807{margin:8px 0;vertical-align:top}.process{height:40px;line-height:40px;font-size:14px;padding:0 24px;margin-bottom:8px;box-sizing:border-box;position:relative;cursor:pointer}.process span{vertical-align:top;margin-left:16px}.process .\u62D6\u62FD\u56FE\u6807{width:16px;height:16px;line-height:16px;position:absolute;left:0;top:12px;display:none}.process .\u53F3\u6307\u793A\u7BAD\u5934{position:absolute;right:0;top:8px}.process:hover{padding:0 24px 0 32px;box-shadow:0 2px 4px 0 rgba(0,0,0,.14)}.process:hover .\u62D6\u62FD\u56FE\u6807{display:block}.right{max-width:536px;flex-grow:2;height:100%;padding:8px 0 8px 8px;box-sizing:border-box;position:relative;display:flex;flex-wrap:wrap;align-content:flex-start;overflow-y:auto}.right ::ng-deep .mat-form-field-wrapper{margin:0;padding-bottom:10px}.right ::ng-deep .mat-form-field-infix{border:0;padding:8px 0}.right ::ng-deep .mat-select-arrow-wrapper{display:block}.right .\u5217\u4FE1\u606F{width:100%;height:136px;padding:16px 0 24px 32px;box-sizing:border-box}.right .\u5217\u4FE1\u606F .\u56FE\u6807{display:inline-block;width:80px;height:80px;border-radius:4px;overflow:hidden;position:relative;cursor:pointer}.right .\u5217\u4FE1\u606F .\u56FE\u6807 .mat-icon{width:24px;height:24px;position:absolute;left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.right .\u5217\u4FE1\u606F .\u540D\u79F0{display:inline-block;width:200px;margin-left:16px;vertical-align:bottom}.right .\u5217\u4FE1\u606F .checkbox{float:right;margin-right:12px;font-size:14px}.right .\u5220\u9664{cursor:pointer;position:absolute;right:24px;top:8px}.right .\u9009\u62E9\u6846{font-size:14px}.right .\u4E3B\u952E,.right .\u83DC\u5355\u9879{width:216px;margin-left:32px}.right .\u4E3B\u952E .\u9009\u62E9\u6846,.right .\u83DC\u5355\u9879 .\u9009\u62E9\u6846{width:216px}.right .\u53C2\u6570{margin-left:32px}.right .\u53C2\u6570 .\u9009\u62E9\u6846{width:462px}.right .\u53C2\u6570 .\u9009\u62E9\u6846 .mat-form-field-autofill-control{height:144px;resize:none}.list-\u4E00\u7EA7\u6807\u9898{font-size:16px;font-weight:700;margin-bottom:16px}.list-\u4E8C\u7EA7\u6807\u9898{margin:4px 0;display:block;font-size:12px}"]
}] }
];
/** @nocollapse */
ProcessingListsComponent.ctorParameters = () => [
{ type: ElementService },
{ type: ElementsService },
{ type: MatDialog }
];
ProcessingListsComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.processing-lists',] }]
};
if (false) {
/** @type {?} */
ProcessingListsComponent.prototype.hostClass;
/** @type {?} */
ProcessingListsComponent.prototype.svr;
/** @type {?} */
ProcessingListsComponent.prototype.ctrlElementName;
/** @type {?} */
ProcessingListsComponent.prototype.filterElemets;
/**
* @type {?}
* @private
*/
ProcessingListsComponent.prototype.subs;
/** @type {?} */
ProcessingListsComponent.prototype.elementSvr;
/** @type {?} */
ProcessingListsComponent.prototype.eles;
/** @type {?} */
ProcessingListsComponent.prototype.dialog;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class ViewDefineModule {
}
ViewDefineModule.decorators = [
{ type: NgModule, args: [{
declarations: [ViewDefineComponent],
imports: [
CommonModule,
DragDropModule,
MatFormFieldModule$1,
MatInputModule$1,
MatButtonModule,
MatCheckboxModule,
MatSelectModule,
MatRadioModule,
MatIconModule$1,
MatTableModule
],
exports: [ViewDefineComponent]
},] }
];
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class IconSelectModule {
}
IconSelectModule.decorators = [
{ type: NgModule, args: [{
declarations: [IconSelectComponent],
imports: [
CommonModule,
MatIconModule$1,
MatSlideToggleModule,
MatFormFieldModule$1,
MatSelectModule,
MatDialogModule,
MatButtonToggleModule,
MatButtonModule
],
exports: [IconSelectComponent],
entryComponents: [IconSelectComponent]
},] }
];
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class ShowHistoryDialogComponent {
/**
* @param {?} dialogRef
* @param {?} data
*/
constructor(dialogRef, data) {
this.dialogRef = dialogRef;
this.data = data;
this.hostClass = true;
}
/**
* @return {?}
*/
ngOnInit() { }
/**
* @return {?}
*/
close() {
this.dialogRef.close();
}
}
ShowHistoryDialogComponent.decorators = [
{ type: Component, args: [{
selector: 'common-show-history-dialog',
template: "<div class=\"\u6240\u6709\u65E5\u5FD7\">\r\n\t<div class=\"\u65E5\u5FD7\" *ngFor=\"let his of data; let index = index\">\r\n\t\t<div class=\"\u65F6\u95F4\">{{ his.Day | date: 'yy-MM-dd' }}</div>\r\n\t\t<div class=\"\u5185\u5BB9\" *ngFor=\"let log of his.Logs\">\r\n\t\t\t<span class=\"\u64CD\u4F5C\">{{ log.Operate }}</span\r\n\t\t\t>{{ log.CategoryName }}; {{ log.LabelName }};\r\n\t\t\t{{ log.User }}\r\n\t\t</div>\r\n\t\t<mat-divider class=\"\u5206\u5272\u7EBF\" *ngIf=\"data && data.length !== index + 1\"></mat-divider>\r\n\t</div>\r\n</div>\r\n<mat-icon (click)=\"close()\" class=\"\u53D6\u6D88\u7BAD\u5934\" svgIcon=\"double_down\"></mat-icon>\r\n",
styles: ["@charset \"UTF-8\";:host{width:320px;display:block;box-sizing:border-box;position:relative}.\u6240\u6709\u65E5\u5FD7{width:100%;box-sizing:border-box;max-height:400px;overflow-y:auto}.\u53D6\u6D88\u7BAD\u5934{width:16px;height:16px;-webkit-transform:rotate(180deg);transform:rotate(180deg);position:absolute;right:-13px;top:-19px}.\u65E5\u5FD7{width:100%;margin:8px 0}.\u65E5\u5FD7 .\u65F6\u95F4{font-size:14px;margin-bottom:4px}.\u65E5\u5FD7 .\u5185\u5BB9{width:100%;margin:4px 0;font-size:12px}.\u65E5\u5FD7 .\u5185\u5BB9 .\u64CD\u4F5C{display:inline-block;margin-right:24px}.\u65E5\u5FD7 .\u5206\u5272\u7EBF{margin-top:8px}"]
}] }
];
/** @nocollapse */
ShowHistoryDialogComponent.ctorParameters = () => [
{ type: MatDialogRef },
{ type: Array, decorators: [{ type: Inject, args: [MAT_DIALOG_DATA,] }] }
];
ShowHistoryDialogComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.show-history-dialog',] }]
};
if (false) {
/** @type {?} */
ShowHistoryDialogComponent.prototype.hostClass;
/** @type {?} */
ShowHistoryDialogComponent.prototype.dialogRef;
/** @type {?} */
ShowHistoryDialogComponent.prototype.data;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class ShowHistoryDialogModule {
}
ShowHistoryDialogModule.decorators = [
{ type: NgModule, args: [{
declarations: [ShowHistoryDialogComponent],
imports: [CommonModule, MatIconModule$1, MatDividerModule$1],
entryComponents: [ShowHistoryDialogComponent],
exports: [ShowHistoryDialogComponent]
},] }
];
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @record
*/
function DialogData$2() { }
if (false) {
/** @type {?} */
DialogData$2.prototype.name;
/** @type {?} */
DialogData$2.prototype.title;
}
class EditCategoryDialogComponent {
/**
* @param {?} dialogRef
* @param {?} data
*/
constructor(dialogRef, data) {
this.dialogRef = dialogRef;
this.data = data;
this.hostClass = true;
}
/**
* @return {?}
*/
ngOnInit() { }
/**
* @return {?}
*/
cancel() {
this.dialogRef.close();
}
}
EditCategoryDialogComponent.decorators = [
{ type: Component, args: [{
selector: 'common-edit-category-dialog',
template: "<div class=\"\u6807\u9898\" mat-dialog-title>{{ data.title }}</div>\r\n<div class=\"\u8F93\u5165\" mat-dialog-content>\r\n\t<!-- <div class=\"\u6DFB\u52A0\u7C7B\u522B-\u6807\u9898\">\u8F93\u5165\u7C7B\u522B\u540D\u79F0</div> -->\r\n\t<mat-form-field>\r\n\t\t<input matInput [(ngModel)]=\"data.name\" maxlength=\"20\" cdkFocusInitial />\r\n\t\t<mat-hint>\u8F93\u5165\u4E0D\u80FD\u8D85\u8FC720\u4E2A\u5B57\u7B26</mat-hint>\r\n\t</mat-form-field>\r\n</div>\r\n<div class=\"\u529F\u80FD\u6309\u94AE\" mat-dialog-actions>\r\n\t<button mat-button (click)=\"cancel()\">\u53D6\u6D88</button>\r\n\t<button class=\"\u786E\u8BA4\u6309\u94AE\" mat-button [mat-dialog-close]=\"data\">\u786E\u5B9A</button>\r\n</div>\r\n",
styles: ["@charset \"UTF-8\";.\u6807\u9898{font-size:20px;font-weight:700;letter-spacing:.25px;text-align:left}.\u8F93\u5165{margin:16px 0;padding:0}.\u6DFB\u52A0\u7C7B\u522B-\u6807\u9898{font-size:14px;opacity:.6;margin:16px 0 0;font-weight:700}.mat-form-field{font-size:14px;width:100%}.mat-form-field ::ng-deep .mat-form-field-infix{border:0}.mat-radio-group{font-size:14px}.mat-dialog-title{margin:0}.\u529F\u80FD\u6309\u94AE{height:32px;float:right;font-size:16px}.\u529F\u80FD\u6309\u94AE .\u786E\u8BA4\u6309\u94AE{font-weight:700}"]
}] }
];
/** @nocollapse */
EditCategoryDialogComponent.ctorParameters = () => [
{ type: MatDialogRef },
{ type: undefined, decorators: [{ type: Inject, args: [MAT_DIALOG_DATA,] }] }
];
EditCategoryDialogComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.edit-category-dialog',] }]
};
if (false) {
/** @type {?} */
EditCategoryDialogComponent.prototype.hostClass;
/** @type {?} */
EditCategoryDialogComponent.prototype.dialogRef;
/** @type {?} */
EditCategoryDialogComponent.prototype.data;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class Node {
/**
* @param {?} data
* @return {?}
*/
static fromInterface(data) {
/** @type {?} */
const rev = new Node();
rev.NodeType = NodeTypeEnum.unknow;
if (data) {
rev.NodeType = data.NodeType;
rev.Field = data.Field;
rev.Operate = data.Operate;
rev.Value = data.Value;
rev.PlainText = data.PlainText;
if (data.Children) {
rev.Children = data.Children.map((/**
* @param {?} v
* @return {?}
*/
v => {
/** @type {?} */
const n = Node.fromInterface(v);
n.parent = rev;
return n;
}));
}
}
return rev;
}
/**
* @param {?} src
* @return {?}
*/
assign(src) {
this.NodeType = src.NodeType;
this.Field = src.Field;
this.Operate = src.Operate;
this.Value = src.Value;
this.PlainText = src.PlainText;
if (src.Children) {
this.Children = src.Children.map((/**
* @param {?} v
* @return {?}
*/
v => {
/** @type {?} */
const rev = Node.fromInterface(v);
rev.parent = this;
return rev;
}));
}
}
/**
* @return {?}
*/
toInterface() {
// empty node
if (this.NodeType === NodeTypeEnum.unknow) {
return null;
}
/** @type {?} */
const rev = {
NodeType: this.NodeType,
Field: this.Field,
Operate: this.Operate,
Value: this.Value,
PlainText: this.PlainText
};
if (this.Children) {
rev.Children = this.Children.map((/**
* @param {?} v
* @return {?}
*/
v => v.toInterface()));
}
return rev;
}
/**
* @param {?} index
* @param {?} node
* @return {?}
*/
insertChild(index, node) {
this.Children = this.Children || [];
/** @type {?} */
const n = Node.fromInterface(node);
n.parent = this;
if (index >= this.Children.length) {
this.Children.push(n);
}
else {
this.Children.splice(index, 0, n);
}
}
/**
* @param {?} node
* @param {?} newNode
* @return {?}
*/
replaceChild(node, newNode) {
newNode.parent = this;
this.Children.splice(this.Children.findIndex((/**
* @param {?} v
* @return {?}
*/
v => v === node)), 1, newNode);
}
// 添加兄弟,在当前节点之上
/**
* @param {?} node
* @return {?}
*/
addTopSibling(node) {
if (!this.parent) {
this.addChildSibling(node);
return;
}
this.parent.insertChild(this.parent.Children.findIndex((/**
* @param {?} v
* @return {?}
*/
v => v === this)), node);
}
// 添加兄弟,在当前节点之下
/**
* @param {?} node
* @return {?}
*/
addBottomSibling(node) {
if (!this.parent) {
this.addChildSibling(node);
return;
}
this.parent.insertChild(this.parent.Children.findIndex((/**
* @param {?} v
* @return {?}
*/
v => v === this)) + 1, node);
}
// 当前节点和该节点形成一个新的and节点,取代当前节点的位置
/**
* @param {?} node
* @return {?}
*/
addChildSibling(node) {
if (this.parent) {
/** @type {?} */
const andNode = Node.fromInterface({ NodeType: NodeTypeEnum.NodeAnd });
andNode.insertChild(0, node);
this.parent.replaceChild(this, andNode);
andNode.insertChild(0, this);
}
else {
// 如果只有一个条件节点,则需要对内容进行替换,因为组件引用用到是指针
/** @type {?} */
const newThis = Node.fromInterface({
NodeType: this.NodeType,
Field: this.Field,
Operate: this.Operate,
Value: this.Value,
PlainText: this.PlainText
});
newThis.parent = this;
this.NodeType = NodeTypeEnum.NodeAnd;
this.Field = undefined;
this.Operate = undefined;
this.Value = undefined;
this.PlainText = undefined;
this.Children = [newThis];
this.insertChild(1, node);
}
}
// 返回扁平化后的总体高度,每个子节点算1
/**
* @return {?}
*/
flatHeight() {
if (NodeTypeEnum.NodeCondition === this.NodeType || NodeTypeEnum.NodePlain === this.NodeType) {
return 1;
}
/** @type {?} */
let rev = 0;
if (this.Children) {
this.Children.forEach((/**
* @param {?} v
* @return {?}
*/
v => (rev += v.flatHeight())));
}
return rev;
}
// 收集单节点,提升到上级
/**
* @return {?}
*/
collection() {
if (!this.Children) {
return;
}
if (this.Children.length === 1) {
this.NodeType = this.Children[0].NodeType;
this.Field = this.Children[0].Field;
this.Operate = this.Children[0].Operate;
this.Value = this.Children[0].Value;
this.PlainText = this.Children[0].PlainText;
this.Children = this.Children[0].Children;
this.collection();
}
else {
this.Children.forEach((/**
* @param {?} v
* @return {?}
*/
v => v.collection()));
}
}
/**
* @return {?}
*/
findRoot() {
/** @type {?} */
let find;
for (find = this; find.parent; find = find.parent) { }
return find;
}
/**
* @param {?} node
* @return {?}
*/
removeChild(node) {
if (this.Children.length > 1) {
this.Children.splice(this.Children.findIndex((/**
* @param {?} v
* @return {?}
*/
v => v === node)), 1);
// root开始检查,提取到上级
this.findRoot().collection();
}
else {
if (this.parent) {
this.parent.removeChild(this);
}
else {
this.NodeType = NodeTypeEnum.unknow;
this.Field = undefined;
this.Operate = undefined;
this.Value = undefined;
this.PlainText = undefined;
this.Children = undefined;
}
}
}
/**
* @return {?}
*/
remove() {
if (this.parent) {
this.parent.removeChild(this);
}
else {
this.NodeType = NodeTypeEnum.unknow;
this.Field = undefined;
this.Operate = undefined;
this.Value = undefined;
this.PlainText = undefined;
this.Children = undefined;
}
}
}
if (false) {
/** @type {?} */
Node.prototype.parent;
/** @type {?} */
Node.prototype.NodeType;
/** @type {?} */
Node.prototype.Field;
/** @type {?} */
Node.prototype.Operate;
/** @type {?} */
Node.prototype.Value;
/** @type {?} */
Node.prototype.Children;
/** @type {?} */
Node.prototype.PlainText;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class EditLabel {
/**
* @param {?} svr
* @param {?} snackBar
*/
constructor(svr, snackBar) {
this.svr = svr;
this.snackBar = snackBar;
this.titleInput = true;
this.isAdd = true;
this.modify = false;
}
/**
* @param {?} categoryID
* @return {?}
*/
add(categoryID) {
this.isAdd = true;
this.titleInput = true;
this.CategoryID = categoryID;
this.Name = '新的标签';
this.title = this.Name;
this.Conts = Node.fromInterface({ NodeType: NodeTypeEnum.unknow });
}
/**
* @return {?}
*/
done() {
if (!this.title || this.title.length === 0) {
alert('不能输入空的名称');
return false;
}
if (!this.isAdd && this.title !== this.Name) {
this.modify = true;
}
this.Name = this.title;
this.titleInput = false;
return true;
}
/**
* @return {?}
*/
edit() {
this.title = this.Name;
this.titleInput = true;
}
/**
* @return {?}
*/
editCancel() {
this.titleInput = false;
}
/**
* @private
* @param {?} whereString
* @return {?}
*/
processSave(whereString) {
if (this.isAdd) {
return this.svr.backface
.addLabel({
CategoryID: this.CategoryID,
Name: this.Name,
Conts: whereString,
PlainText: this.PlainText
})
.pipe(map((/**
* @param {?} lbl
* @return {?}
*/
lbl => {
/** @type {?} */
const rev = Label.fromInterface(lbl);
/** @type {?} */
const category = this.svr.categorys.find((/**
* @param {?} v
* @return {?}
*/
v => v.ID === lbl.CategoryID));
if (!category.Labels) {
category.Labels = [];
}
category.Labels.push(rev);
return true;
})), catchError((/**
* @param {?} err
* @param {?} caught
* @return {?}
*/
(err, caught) => {
if (err instanceof HttpErrorResponse) {
/** @type {?} */
const derr = IsDuplicatePKError(err.error);
if (derr.Yes) {
this.snackBar.open('名称重复', '关闭', { duration: 5000 });
}
else {
this.snackBar.open(err.error, '关闭', { duration: 5000 });
}
}
else {
this.snackBar.open(err, '关闭', { duration: 5000 });
}
return of(false);
})));
}
else {
return this.svr.backface
.updateLabel({
CategoryID: this.CategoryID,
ID: this.LabelID,
Name: this.Name,
Conts: whereString,
PlainText: this.PlainText
})
.pipe(map((/**
* @param {?} lbl
* @return {?}
*/
lbl => {
/** @type {?} */
const rev = this.svr.categorys
.find((/**
* @param {?} v
* @return {?}
*/
v => v.ID === lbl.CategoryID))
.Labels.find((/**
* @param {?} vv
* @return {?}
*/
vv => vv.ID === lbl.ID));
rev.Name = lbl.Name;
return true;
})));
}
}
/**
* @return {?}
*/
save() {
// 如果正在修改名称,则自动进行确认,如果确认失败,则退出处理
if (this.titleInput) {
if (!this.done()) {
return of(false);
}
}
/** @type {?} */
const rev = new Subject();
// 转换node-->string
if (this.Conts && this.Conts.NodeType !== NodeTypeEnum.unknow) {
this.svr.backface.nodeToString(this.Conts.toInterface()).subscribe((/**
* @param {?} whereString
* @return {?}
*/
whereString => {
this.processSave(whereString).subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
rev.next(v);
}));
}));
}
else {
return this.processSave('');
}
return rev;
}
}
if (false) {
/** @type {?} */
EditLabel.prototype.CategoryID;
/** @type {?} */
EditLabel.prototype.LabelID;
/** @type {?} */
EditLabel.prototype.Name;
/** @type {?} */
EditLabel.prototype.Conts;
/** @type {?} */
EditLabel.prototype.PlainText;
/** @type {?} */
EditLabel.prototype.titleInput;
/** @type {?} */
EditLabel.prototype.isAdd;
/** @type {?} */
EditLabel.prototype.title;
/** @type {?} */
EditLabel.prototype.readonly;
/** @type {?} */
EditLabel.prototype.modify;
/**
* @type {?}
* @private
*/
EditLabel.prototype.svr;
/**
* @type {?}
* @private
*/
EditLabel.prototype.snackBar;
}
class LabelManagerService {
/**
* @param {?} snackBar
*/
constructor(snackBar) {
this.snackBar = snackBar;
this.editLabel = new EditLabel(this, this.snackBar);
}
/**
* @param {?} CategoryID
* @param {?} LabelID
* @return {?}
*/
removeLabel(CategoryID, LabelID) {
return this.backface.removeLabel({ CategoryID: CategoryID, ID: LabelID }).pipe(tap((/**
* @param {?} v
* @return {?}
*/
v => {
if (v) {
/** @type {?} */
const labels = this.categorys.find((/**
* @param {?} vv
* @return {?}
*/
vv => vv.ID === CategoryID)).Labels;
labels.splice(labels.findIndex((/**
* @param {?} vv
* @return {?}
*/
vv => vv.ID === LabelID)), 1);
}
})));
}
/**
* @param {?} id
* @return {?}
*/
removeCategory(id) {
return this.backface.removeCategory(id).pipe(tap((/**
* @param {?} v
* @return {?}
*/
v => {
if (v) {
this.categorys.splice(this.categorys.findIndex((/**
* @param {?} vv
* @return {?}
*/
vv => vv.ID === id)), 1);
this.categorys.forEach((/**
* @param {?} vv
* @param {?} idx
* @return {?}
*/
(vv, idx) => (vv.Position = idx + 1)));
}
})));
}
/**
* @param {?} param
* @return {?}
*/
addCategory(param) {
return this.backface
.addCategory({
EleName: this.eleName,
Name: param.name,
OwnerBy: this.ownerBy,
BeforeAtID: param.beforeAtID
})
.pipe(tap((/**
* @param {?} v
* @return {?}
*/
v => {
// 调整位置并插入
if (param.beforeAtID) {
/** @type {?} */
const idx = this.categorys.findIndex((/**
* @param {?} vv
* @return {?}
*/
vv => vv.ID === param.beforeAtID));
this.categorys.splice(idx, 0, v);
}
else {
this.categorys.push(v);
}
this.categorys.forEach((/**
* @param {?} vv
* @param {?} idx
* @return {?}
*/
(vv, idx) => (vv.Position = idx + 1)));
})));
}
/**
* @param {?} param
* @return {?}
*/
editCategory(param) {
return this.backface
.updateCategory({
ID: param.id,
Name: param.name,
OwnerBy: this.ownerBy
})
.pipe(tap((/**
* @param {?} v
* @return {?}
*/
v => {
this.categorys.find((/**
* @param {?} vv
* @return {?}
*/
vv => vv.ID === param.id)).Name = param.name;
})));
}
/**
* @return {?}
*/
fetchCategoryLabelHis() {
return this.backface.fetchCategoryLabelHis({
EleName: this.eleName,
OwnerBy: this.ownerBy,
Owner: [this.owner]
});
}
/**
* @return {?}
*/
fetchCategories() {
this.backface
.fetchCategories({ EleName: this.eleName, OwnerBy: this.ownerBy, Owner: this.owner })
.subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
this.categorys = v;
}));
}
/**
* @param {?} cate
* @param {?} idx
* @return {?}
*/
setCategoryPosition(cate, idx) {
this.backface.setCategoryPosition({ ID: cate.ID, Position: idx }).subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
// 先赋值position
v.forEach((/**
* @param {?} vv
* @return {?}
*/
vv => {
/** @type {?} */
const findc = this.categorys.find((/**
* @param {?} c
* @return {?}
*/
c => c.ID === vv.ID));
if (findc) {
findc.Position = vv.Position;
}
}));
// 再排序
this.categorys.sort((/**
* @param {?} a
* @param {?} b
* @return {?}
*/
(a, b) => a.Position - b.Position));
}));
}
}
LabelManagerService.decorators = [
{ type: Injectable }
];
/** @nocollapse */
LabelManagerService.ctorParameters = () => [
{ type: MatSnackBar }
];
if (false) {
/** @type {?} */
LabelManagerService.prototype.eleName;
/** @type {?} */
LabelManagerService.prototype.ownerBy;
/** @type {?} */
LabelManagerService.prototype.owner;
/** @type {?} */
LabelManagerService.prototype.categorys;
/** @type {?} */
LabelManagerService.prototype.editLabel;
/** @type {?} */
LabelManagerService.prototype.allColumnsWithLetter;
/** @type {?} */
LabelManagerService.prototype.backface;
/**
* @type {?}
* @private
*/
LabelManagerService.prototype.snackBar;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @record
*/
function DragData() { }
if (false) {
/** @type {?} */
DragData.prototype.Type;
/** @type {?} */
DragData.prototype.Data;
}
class EditLabelService {
constructor() {
this.onNodeChange = new EventEmitter();
}
/**
* @return {?}
*/
buildDragedNode() {
/** @type {?} */
let node;
switch (this.dragData.Type) {
case 'column':
node = {
NodeType: NodeTypeEnum.NodeCondition,
Field: (/** @type {?} */ (this.dragData.Data)),
Operate: '='
};
break;
case 'node':
node = ((/** @type {?} */ (this.dragData.Data))).toInterface();
break;
}
return node;
}
}
if (false) {
/** @type {?} */
EditLabelService.prototype.dragData;
/** @type {?} */
EditLabelService.prototype.prevNodeEle;
/** @type {?} */
EditLabelService.prototype.dragOverNode;
/** @type {?} */
EditLabelService.prototype.dragOverArea;
/** @type {?} */
EditLabelService.prototype.onNodeChange;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @record
*/
function LabelHistoryDialogData() { }
if (false) {
/** @type {?} */
LabelHistoryDialogData.prototype.svr;
/** @type {?} */
LabelHistoryDialogData.prototype.data;
}
class LabelHistoryComponent {
/**
* @param {?} dialogRef
* @param {?} data
*/
constructor(dialogRef, data) {
this.dialogRef = dialogRef;
this.data = data;
this.hostClass = true;
}
/**
* @return {?}
*/
ngOnInit() {
this.data.svr.backface.fetchLabelHisList(this.data.data).subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
this.labelHisList = v || [];
if (this.labelHisList.length > 0) {
this.selectedItem = this.labelHisList[0];
this.fetchData(this.labelHisList[0]);
}
}));
this.dislogLabel.nativeElement.parentElement.parentElement.style = 'padding:0';
}
/**
* @private
* @param {?} key
* @return {?}
*/
fetchData(key) {
this.data.svr.backface
.fetchLabelHis({
CategoryID: this.data.data.CategoryID,
ID: this.data.data.ID,
Version: key.Version
})
.subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
this.whereString = v.Conts;
this.plainText = v.PlainText;
}));
}
/**
* @param {?} event
* @return {?}
*/
selectChange(event) {
this.fetchData((/** @type {?} */ (event.value)));
this.selectedItem = (/** @type {?} */ (event.value));
}
/**
* @return {?}
*/
close() {
this.dialogRef.close();
}
}
LabelHistoryComponent.decorators = [
{ type: Component, args: [{
selector: 'common-label-history',
template: "<div #dialogLabel class=\"label-main\">\r\n\t\t<ng-container *ngIf=\"labelHisList && labelHisList.length>0;else empty\">\r\n\t\t\t\t<div class=\"label-top\">\r\n\t\t\t\t\t\t<div class=\"top-left\">\r\n\t\t\t\t\t\t\t<mat-icon class=\"open-with\" svgIcon=\"open_with\"></mat-icon>\r\n\t\t\t\t\t\t\t<mat-form-field class=\"select-input\">\r\n\t\t\t\t\t\t\t\t<mat-select (selectionChange)=\"selectChange($event)\" [value]=\"selectedItem\">\r\n\t\t\t\t\t\t\t\t\t<mat-option *ngFor=\"let item of labelHisList\" [value]=\"item\">\r\n\t\t\t\t\t\t\t\t\t\t\t{{item.Version}}.{{item.WriteTime}}\r\n\t\t\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class=\"top-right\">\r\n\t\t\t\t\t\t\t<mat-icon svgIcon=\"library_books\"></mat-icon>\r\n\t\t\t\t\t\t\t<mat-icon class=\"cancel\" svgIcon=\"cancel\" (click)=\"close()\"></mat-icon>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"label-box-sql\">\r\n\t\t\t\t\t\t<mat-form-field class=\"sql-textarea\">\r\n\t\t\t\t\t\t\t<textarea matInput readonly=\"true\" matTextareaAutosize readonly=\"true\" [value]=\"whereString\"></textarea>\r\n\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"label-box-condition\">\r\n\t\t\t\t\t\t<div class=\"box-title\">\u9644\u52A0\u9AD8\u7EA7\u6761\u4EF6</div>\r\n\t\t\t\t\t\t<mat-form-field class=\"condition-textarea\">\r\n\t\t\t\t\t\t\t<textarea matInput rreadonly=\"true\" [value]=\"plainText\" matTextareaAutosize></textarea>\r\n\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t</div>\r\n\t\t</ng-container>\r\n\t\t<ng-template #empty>\u6CA1\u6709\u6570\u636E</ng-template>\r\n</div>\r\n\r\n",
styles: [".label-main{width:100%;height:100%;box-sizing:border-box;padding:16px 8px 8px;border-radius:4px}.label-top{display:flex;justify-content:space-between;width:100%;height:20px;box-sizing:border-box}.label-top .select-input{margin-top:5px}.top-left{display:flex;align-items:center;box-sizing:border-box;font-size:14px}.top-left .open-with{margin-right:8px}.top-right{display:flex;align-items:center}.top-right .cancel{margin-left:8px}.label-box-condition,.label-box-sql{width:100%;box-sizing:border-box;overflow:auto;font-size:12px}.label-box-sql{height:172px;margin-top:16px}.label-box-sql .sql-textarea{width:100%;box-sizing:border-box;padding-left:12px;padding-right:12px}.label-box-condition{height:147px;box-sizing:border-box;padding-top:12px;padding-left:4px;padding-right:12px}.label-box-condition .condition-textarea{width:100%;box-sizing:border-box;padding-left:8px}"]
}] }
];
/** @nocollapse */
LabelHistoryComponent.ctorParameters = () => [
{ type: MatDialogRef },
{ type: undefined, decorators: [{ type: Inject, args: [MAT_DIALOG_DATA,] }] }
];
LabelHistoryComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.label-history',] }],
dislogLabel: [{ type: ViewChild, args: ['dialogLabel', { static: true },] }]
};
if (false) {
/** @type {?} */
LabelHistoryComponent.prototype.hostClass;
/** @type {?} */
LabelHistoryComponent.prototype.labelHisList;
/** @type {?} */
LabelHistoryComponent.prototype.selectedItem;
/** @type {?} */
LabelHistoryComponent.prototype.whereString;
/** @type {?} */
LabelHistoryComponent.prototype.plainText;
/** @type {?} */
LabelHistoryComponent.prototype.dislogLabel;
/** @type {?} */
LabelHistoryComponent.prototype.dialogRef;
/** @type {?} */
LabelHistoryComponent.prototype.data;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class EditLabelComponent {
/**
* @param {?} theme
* @param {?} dialog
* @param {?} lblSvr
* @param {?} dialogRef
* @param {?} svr
*/
constructor(theme, dialog, lblSvr, dialogRef, svr) {
this.theme = theme;
this.dialog = dialog;
this.lblSvr = lblSvr;
this.dialogRef = dialogRef;
this.svr = svr;
this.hostClass = true;
this.nodeTypeCondition = NodeTypeEnum.NodeCondition;
this.nodeTypeAnd = NodeTypeEnum.NodeAnd;
this.nodeTypeOr = NodeTypeEnum.NodeOr;
this.nodeTypeUnknow = NodeTypeEnum.unknow;
this.nodeTypePlain = NodeTypeEnum.NodePlain;
this.AdditionalSQL = true;
this.AdditionalSQLDisplay = true;
this.options = { maxLines: 12, printMargin: false };
this.theme.theme.subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
this.themeModel = v.model;
}));
}
/**
* @return {?}
*/
ngAfterViewInit() {
this.labelNode.nativeElement.ondragover = (/**
* @param {?} event
* @return {?}
*/
(event) => {
// 把labelNode变成一个容器,能拖入条件
event.preventDefault();
// console.log(event);
event.stopPropagation();
});
}
/**
* @return {?}
*/
ngOnInit() {
ace.config.set('basePath', '/front/assets/ace-builds/src-min-noconflict');
this.lblSvr.onNodeChange.subscribe((/**
* @return {?}
*/
() => {
if (this.svr.editLabel.Conts && this.svr.editLabel.Conts.NodeType !== NodeTypeEnum.unknow) {
this.svr.backface
.nodeToString(this.svr.editLabel.Conts.toInterface())
.subscribe((/**
* @param {?} str
* @return {?}
*/
str => (this.whereString = str)));
}
else {
this.whereString = '';
}
}));
this.lblSvr.onNodeChange.emit();
this.标签定义.nativeElement.parentElement.parentElement.style = 'padding:0px;';
}
/**
* @param {?} event
* @return {?}
*/
labelDrop(event) {
if (this.svr.editLabel.Conts.NodeType === this.nodeTypeUnknow) {
this.svr.editLabel.Conts.assign(this.lblSvr.buildDragedNode());
this.lblSvr.onNodeChange.emit();
}
else if (this.svr.editLabel.Conts.NodeType === this.nodeTypeAnd ||
this.svr.editLabel.Conts.NodeType === this.nodeTypeOr) {
this.svr.editLabel.Conts.Children[this.svr.editLabel.Conts.Children.length - 1].addBottomSibling(this.lblSvr.buildDragedNode());
if (this.lblSvr.dragData.Type === 'node') {
((/** @type {?} */ (this.lblSvr.dragData.Data))).remove();
}
this.lblSvr.onNodeChange.emit();
}
else if (this.svr.editLabel.Conts.NodeType === this.nodeTypeCondition ||
this.svr.editLabel.Conts.NodeType === this.nodeTypePlain) {
this.svr.editLabel.Conts.addChildSibling(this.lblSvr.buildDragedNode());
if (this.lblSvr.dragData.Type === 'node') {
((/** @type {?} */ (this.lblSvr.dragData.Data))).remove();
}
this.lblSvr.onNodeChange.emit();
}
event.stopPropagation();
}
/**
* @param {?} event
* @param {?} column
* @return {?}
*/
colDragStart(event, column) {
this.lblSvr.dragData = { Type: 'column', Data: column };
}
/**
* @return {?}
*/
openHis() {
this.dialog.open(LabelHistoryComponent, {
width: '296px',
height: '384px',
data: (/** @type {?} */ ({
svr: this.svr,
data: { CategoryID: this.svr.editLabel.CategoryID, ID: this.svr.editLabel.LabelID }
})),
autoFocus: false
});
}
/**
* @param {?} letter
* @return {?}
*/
acronymScroll(letter) {
document.querySelector('#' + letter).scrollIntoView(true);
}
/**
* @return {?}
*/
save() {
this.svr.editLabel.save().subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
if (v) {
this.dialogRef.close();
}
}));
}
}
EditLabelComponent.decorators = [
{ type: Component, args: [{
selector: 'common-edit-label',
template: "<div #\u6807\u7B7E\u5B9A\u4E49 class=\"\u6807\u7B7E\u5B9A\u4E49\u5185\u5BB9\" cdkDropListGroup>\r\n\t<div class=\"\u6807\u7B7E\u5B9A\u4E49\u5DE6\">\r\n\t\t<div *ngIf=\"!svr.editLabel.titleInput\" class=\"\u6807\u7B7E\u540D\u79F0\" [matTooltip]=\"svr.editLabel.Name\">\r\n\t\t\t{{ svr.editLabel.Name }}\r\n\t\t</div>\r\n\t\t<mat-form-field *ngIf=\"svr.editLabel.titleInput\" class=\"\u540D\u79F0\u7F16\u8F91\">\r\n\t\t\t<input type=\"text\" matInput [(ngModel)]=\"svr.editLabel.title\" />\r\n\t\t</mat-form-field>\r\n\t\t<div class=\"\u6307\u6807\u529F\u80FD\u56FE\u6807\">\r\n\t\t\t<mat-icon *ngIf=\"svr.editLabel.titleInput\" (click)=\"svr.editLabel.editCancel()\" class=\"edit-cancel close\"\r\n\t\t\t\tsvgIcon=\"close\"></mat-icon>\r\n\t\t\t<mat-icon *ngIf=\"svr.editLabel.titleInput\" (click)=\"svr.editLabel.done()\" class=\"done\" svgIcon=\"done\">\r\n\t\t\t</mat-icon>\r\n\t\t\t<mat-icon *ngIf=\"!svr.editLabel.titleInput\" (click)=\"svr.editLabel.edit()\" class=\"edit\" svgIcon=\"edit\">\r\n\t\t\t</mat-icon>\r\n\t\t\t<mat-icon svgIcon=\"alarm_on\" (click)=\"openHis()\"></mat-icon>\r\n\t\t</div>\r\n\t\t<div class=\"left-columns\">\r\n\t\t\t<div class=\"column-list\">\r\n\t\t\t\t<div *ngFor=\"let list of svr.allColumnsWithLetter\">\r\n\t\t\t\t\t<div class=\"letter-color \u6307\u6807\u9996\u5B57\u6BCD\" id=\"{{ list.Letter }}\">\r\n\t\t\t\t\t\t{{ list.Letter | uppercase }}\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div mat-button class=\"\u6307\u6807\" (dragstart)=\"colDragStart($event, column)\"\r\n\t\t\t\t\t\t*ngFor=\"let column of list.Columns\" [draggable]=\"true\">\r\n\t\t\t\t\t\t{{ column }}\r\n\t\t\t\t\t\t<mat-icon class=\"\u62D6\u52A8\" svgIcon=\"drag_indicator\" [cdkDragHandle]=\"true\"> </mat-icon>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"letter-list\">\r\n\t\t\t\t<div *ngFor=\"let list of svr.allColumnsWithLetter\">\r\n\t\t\t\t\t<div class=\"letter-color \u5C45\u4E2D\" (click)=\"acronymScroll(list.Letter)\">\r\n\t\t\t\t\t\t{{ list.Letter | uppercase }}\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n\t<div class=\"\u6807\u7B7E\u5B9A\u4E49\u53F3\">\r\n\t\t<div #labelNode class=\"node-content\" (drop)=\"labelDrop($event)\" onselectstart=\"return false;\">\r\n\t\t\t<common-node class=\"node\" [data]=\"svr.editLabel.Conts\"\r\n\t\t\t\t[ngClass]=\"{ empty: svr.editLabel.Conts.NodeType === '' }\">\r\n\t\t\t</common-node>\r\n\t\t</div>\r\n\t\t<div class=\"\u9644\u52A0\u529F\u80FD\">\r\n\t\t\t<div class=\"\u9644\u52A0\u529F\u80FD\u5BFC\u822A\">\r\n\t\t\t\t<span [class.\u9009\u4E2D\u7684\u9644\u52A0\u5BFC\u822A]=\"AdditionalSQL\" (click)=\"AdditionalSQL = true\">SQL\u4EE3\u7801\u663E\u793A</span><span\r\n\t\t\t\t\t[class.\u9009\u4E2D\u7684\u9644\u52A0\u5BFC\u822A]=\"!AdditionalSQL\" (click)=\"AdditionalSQL = false\">\u9644\u52A0\u9AD8\u7EA7\u6761\u4EF6</span>\r\n\t\t\t\t<mat-icon (click)=\"AdditionalSQLDisplay = !AdditionalSQLDisplay\"\r\n\t\t\t\t\tsvgIcon=\"{{ AdditionalSQLDisplay ? 'expand_more' : 'expand_less' }}\">\r\n\t\t\t\t</mat-icon>\r\n\t\t\t</div>\r\n\t\t\t<div *ngIf=\"AdditionalSQLDisplay\" class=\"\u9644\u52A0\u529F\u80FD\u5185\u5BB9\">\r\n\t\t\t\t<div ace-editor class=\"where-string\" *ngIf=\"AdditionalSQL\" [readOnly]=\"true\" [text]=\"whereString\" mode=\"text\"\r\n\t\t\t\t\t[theme]=\"themeModel === 'dark' ? 'tomorrow_night' : 'eclipse'\" [options]=\"options\" [autoUpdateContent]=\"true\"\r\n\t\t\t\t\t[durationBeforeCallback]=\"1000\" style=\"min-height: 172px; width:100%; overflow: auto;\">\r\n\t\t\t\t</div>\r\n\t\t\t\t<div ace-editor class=\"where-string\" *ngIf=\"!AdditionalSQL\" [text]=\"svr.editLabel.PlainText\" mode=\"text\"\r\n\t\t\t\t\t[theme]=\"themeModel === 'dark' ? 'tomorrow_night' : 'eclipse'\" [options]=\"options\" [autoUpdateContent]=\"true\"\r\n\t\t\t\t\t[durationBeforeCallback]=\"1000\" style=\"min-height: 172px; width:100%; overflow: auto;\">\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n</div>\r\n\r\n<div class=\"\u6807\u7B7E\u5B9A\u4E49\u5E95\u90E8\">\r\n\t<button mat-button (click)=\"dialogRef.close()\">\u53D6\u6D88</button>\r\n\t<button mat-button class=\"\u786E\u5B9A\" (click)=\"save()\">\u786E\u5B9A</button>\r\n</div>",
providers: [EditLabelService],
styles: ["@charset \"UTF-8\";:host{width:800px;height:100%;padding:0;display:flex;box-sizing:border-box;flex-direction:column}.\u6807\u7B7E\u5B9A\u4E49\u5185\u5BB9{height:calc(100% - 40px);width:100%;flex-grow:1;display:flex}.\u6807\u7B7E\u5B9A\u4E49\u5DE6{width:232px;height:100%;box-sizing:border-box;position:relative}.\u6807\u7B7E\u5B9A\u4E49\u5DE6 .\u6807\u7B7E\u540D\u79F0{padding-left:16px;font-weight:700;width:110px;height:24px;margin:9px 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block}.\u6807\u7B7E\u5B9A\u4E49\u5DE6 .\u540D\u79F0\u7F16\u8F91{padding-left:16px;font-weight:700;width:110px;height:40px}.\u6807\u7B7E\u5B9A\u4E49\u5DE6 .\u540D\u79F0\u7F16\u8F91 ::ng-deep .mat-form-field-wrapper{padding:0 0 12px}.\u6807\u7B7E\u5B9A\u4E49\u5DE6 .\u540D\u79F0\u7F16\u8F91 ::ng-deep .mat-form-field-infix{border:0;padding:12px 0}.\u6807\u7B7E\u5B9A\u4E49\u5DE6 .\u6307\u6807\u529F\u80FD\u56FE\u6807{height:24px;position:absolute;right:8px;top:12px}.\u6807\u7B7E\u5B9A\u4E49\u5DE6 .\u6307\u6807\u529F\u80FD\u56FE\u6807 .mat-icon{width:24px;height:24px;margin-right:4px;vertical-align:middle;cursor:pointer}.\u6807\u7B7E\u5B9A\u4E49\u5DE6 .left-columns{width:100%;height:calc(100% - 60px);position:relative}.\u6807\u7B7E\u5B9A\u4E49\u5DE6 .left-columns .column-list{width:100%;height:100%;box-sizing:border-box;overflow-y:auto}.\u6807\u7B7E\u5B9A\u4E49\u5DE6 .left-columns .letter-list{height:100%;position:absolute;top:0;right:0;overflow-y:auto}.\u6807\u7B7E\u5B9A\u4E49\u5DE6 .left-columns .letter-color{width:20px;font-size:12px;text-align:center}.\u6807\u7B7E\u5B9A\u4E49\u5DE6 .left-columns .\u6307\u6807{width:calc(100% - 20px);height:32px;line-height:32px;padding:0 24px;font-size:14px;box-sizing:border-box;text-align:left;position:relative}.\u6807\u7B7E\u5B9A\u4E49\u5DE6 .left-columns .\u6307\u6807 .\u62D6\u52A8{width:16px;height:16px;line-height:16px;cursor:pointer;position:absolute;top:50%;left:0;-webkit-transform:translateY(-50%);transform:translateY(-50%);display:none}.\u6807\u7B7E\u5B9A\u4E49\u5DE6 .left-columns .\u6307\u6807:hover{box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.12),0 1px 5px 0 rgba(0,0,0,.2)}.\u6807\u7B7E\u5B9A\u4E49\u5DE6 .left-columns .\u6307\u6807:hover .\u62D6\u52A8{display:block}.\u6807\u7B7E\u5B9A\u4E49\u5DE6 .left-columns .\u6307\u6807\u9996\u5B57\u6BCD{margin:8px 8px 4px}.\u6807\u7B7E\u5B9A\u4E49\u5DE6 .left-columns .\u5C45\u4E2D{text-align:center;cursor:pointer}.\u6807\u7B7E\u5B9A\u4E49\u5E95\u90E8{width:100%;height:40px;line-height:40px;text-align:right;position:relative}.\u6807\u7B7E\u5B9A\u4E49\u5E95\u90E8 button{margin-right:16px}.\u6807\u7B7E\u5B9A\u4E49\u53F3{width:0;flex-grow:1;height:100%;display:flex;flex-direction:column}.node-content{width:100%;height:0;flex-grow:1;padding:16px 16px 0;box-sizing:border-box}.node-content .node{width:100%;height:100%;overflow-x:auto;overflow-y:auto;display:block}.node-drag{display:flex;width:104px;height:36px;border-radius:4px;font-size:14px;color:#2679a0;background:#7fc3e2;align-items:center;justify-content:center}.empty{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.\u9644\u52A0\u529F\u80FD{width:100%}.\u9644\u52A0\u529F\u80FD .\u9644\u52A0\u529F\u80FD\u5BFC\u822A{width:100%;height:32px;font-size:14px;line-height:32px}.\u9644\u52A0\u529F\u80FD .\u9644\u52A0\u529F\u80FD\u5BFC\u822A span{line-height:32px;margin:0 12px 0 4px;cursor:pointer}.\u9644\u52A0\u529F\u80FD .\u9644\u52A0\u529F\u80FD\u5BFC\u822A .mat-icon{float:right;margin:4px;cursor:pointer}.\u9644\u52A0\u529F\u80FD .\u9644\u52A0\u529F\u80FD\u5185\u5BB9{width:100%;height:204px;padding:16px 8px;box-sizing:border-box}.where-string{border-radius:4px}"]
}] }
];
/** @nocollapse */
EditLabelComponent.ctorParameters = () => [
{ type: ThemeService },
{ type: MatDialog },
{ type: EditLabelService },
{ type: MatDialogRef },
{ type: LabelManagerService, decorators: [{ type: Inject, args: [MAT_DIALOG_DATA,] }] }
];
EditLabelComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.edit-label',] }],
标签定义: [{ type: ViewChild, args: ['标签定义', { static: true },] }],
labelNode: [{ type: ViewChild, args: ['labelNode', { static: false },] }]
};
if (false) {
/** @type {?} */
EditLabelComponent.prototype.hostClass;
/** @type {?} */
EditLabelComponent.prototype.nodeTypeCondition;
/** @type {?} */
EditLabelComponent.prototype.nodeTypeAnd;
/** @type {?} */
EditLabelComponent.prototype.nodeTypeOr;
/** @type {?} */
EditLabelComponent.prototype.nodeTypeUnknow;
/** @type {?} */
EditLabelComponent.prototype.nodeTypePlain;
/** @type {?} */
EditLabelComponent.prototype.AdditionalSQL;
/** @type {?} */
EditLabelComponent.prototype.AdditionalSQLDisplay;
/** @type {?} */
EditLabelComponent.prototype.whereString;
/** @type {?} */
EditLabelComponent.prototype.options;
/** @type {?} */
EditLabelComponent.prototype.themeModel;
/** @type {?} */
EditLabelComponent.prototype.标签定义;
/** @type {?} */
EditLabelComponent.prototype.labelNode;
/**
* @type {?}
* @private
*/
EditLabelComponent.prototype.theme;
/** @type {?} */
EditLabelComponent.prototype.dialog;
/**
* @type {?}
* @private
*/
EditLabelComponent.prototype.lblSvr;
/** @type {?} */
EditLabelComponent.prototype.dialogRef;
/** @type {?} */
EditLabelComponent.prototype.svr;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class NodeComponent {
/**
* @param {?} lblSvr
* @param {?} ref
*/
constructor(lblSvr, ref) {
this.lblSvr = lblSvr;
this.ref = ref;
this.nodeTypeCondition = NodeTypeEnum.NodeCondition;
this.nodeTypeAnd = NodeTypeEnum.NodeAnd;
this.nodeTypeOr = NodeTypeEnum.NodeOr;
this.nodeTypeUnknow = NodeTypeEnum.unknow;
this.nodeTypePlain = NodeTypeEnum.NodePlain;
this.hostClass = true;
}
/**
* @return {?}
*/
ngOnInit() { }
/**
* @return {?}
*/
svgHeight() {
return this.data.flatHeight() * 50;
}
/**
* @param {?} event
* @return {?}
*/
nodeDragover(event) {
// 判断如果是节点
if (this.data.NodeType === this.nodeTypeAnd || this.data.NodeType === this.nodeTypeOr) {
event.preventDefault();
/** @type {?} */
const rect = ((/** @type {?} */ (this.ref.nativeElement))).getBoundingClientRect();
/** @type {?} */
const offsetY = event.pageY - rect.top;
/** @type {?} */
const clientHeight = rect.height;
if (this.lblSvr.dragOverNode !== this.data && this.lblSvr.prevNodeEle) {
/** @type {?} */
const ref = (/** @type {?} */ (this.lblSvr.prevNodeEle.nativeElement));
ref.style.borderTop = '4px solid transparent';
ref.style.borderBottom = '4px solid transparent';
ref.style.backgroundColor = null;
}
// Handle drag area
/** @type {?} */
const percentageY = offsetY / clientHeight;
if (percentageY < 0.5) {
((/** @type {?} */ (this.nodeMain.nativeElement))).style.borderTop = '4px solid #67c204';
((/** @type {?} */ (this.nodeMain.nativeElement))).style.borderBottom = '4px solid transparent';
this.lblSvr.dragOverArea = 'above';
}
else if (percentageY >= 0.5) {
((/** @type {?} */ (this.nodeMain.nativeElement))).style.borderTop = '4px solid transparent';
((/** @type {?} */ (this.nodeMain.nativeElement))).style.borderBottom = '4px solid #67c204';
this.lblSvr.dragOverArea = 'below';
}
this.lblSvr.dragOverNode = this.data;
this.lblSvr.prevNodeEle = this.nodeMain;
}
event.stopPropagation();
}
// 把拖动的node放到节点上边
/**
* @param {?} event
* @return {?}
*/
dropTop(event) {
if (this.data.parent) {
this.data.addTopSibling(this.lblSvr.buildDragedNode());
if (this.lblSvr.dragData.Type === 'node') {
((/** @type {?} */ (this.lblSvr.dragData.Data))).remove();
}
}
else {
this.data.Children[0].addTopSibling(this.lblSvr.buildDragedNode());
if (this.lblSvr.dragData.Type === 'node') {
((/** @type {?} */ (this.lblSvr.dragData.Data))).remove();
}
}
}
// 把拖动的node放到节点下边
/**
* @param {?} event
* @return {?}
*/
dropBottom(event) {
this.data.addBottomSibling(this.lblSvr.buildDragedNode());
if (this.lblSvr.dragData.Type === 'node') {
((/** @type {?} */ (this.lblSvr.dragData.Data))).remove();
}
}
/**
* @param {?} event
* @return {?}
*/
nodeDrop(event) {
if (this.data.NodeType === this.nodeTypeAnd || this.data.NodeType === this.nodeTypeOr) {
switch (this.lblSvr.dragOverArea) {
case 'above':
this.dropTop(event);
break;
case 'below':
this.dropBottom(event);
break;
}
this.lblSvr.onNodeChange.emit();
this.lblSvr.dragOverNode = null;
if (this.lblSvr.prevNodeEle) {
/** @type {?} */
const ref = (/** @type {?} */ (this.lblSvr.prevNodeEle.nativeElement));
ref.style.borderTop = '4px solid transparent';
ref.style.borderBottom = '4px solid transparent';
ref.style.backgroundColor = null;
}
}
event.stopPropagation();
}
/**
* @param {?} event
* @return {?}
*/
drop(event) {
if (this.data.NodeType === this.nodeTypeUnknow) {
this.data.assign(this.lblSvr.buildDragedNode());
this.lblSvr.onNodeChange.emit();
}
}
/**
* @return {?}
*/
logicClick() {
if (this.data.NodeType === NodeTypeEnum.NodeAnd) {
this.data.NodeType = NodeTypeEnum.NodeOr;
}
else {
this.data.NodeType = NodeTypeEnum.NodeAnd;
}
this.lblSvr.onNodeChange.emit();
}
}
NodeComponent.decorators = [
{ type: Component, args: [{
selector: 'common-node',
template: "<div #nodeMain class=\"node-main\" (drop)=\"nodeDrop($event)\" onselectstart=\"return false;\">\r\n\t<ng-container *ngIf=\"data.NodeType !== nodeTypeUnknow; else else_content\">\r\n\t\t<common-condition-node\r\n\t\t\t*ngIf=\"data.NodeType === nodeTypeCondition || data.NodeType === nodeTypePlain; else parentNode\"\r\n\t\t\t[data]=\"data\">\r\n\t\t</common-condition-node>\r\n\t\t<ng-template #parentNode>\r\n\t\t\t<div class=\"main\" *ngIf=\"data.NodeType !== nodeTypeCondition\" onselectstart=\"return false;\">\r\n\t\t\t\t<div class=\"node-left\" (dragover)=\"nodeDragover($event)\">\r\n\t\t\t\t\t<div class=\"logic\" >\r\n\t\t\t\t\t\t<div class=\"\u903B\u8F91 mat-elevation-z4\" (click)=\"logicClick()\" *ngIf=\"data.NodeType === nodeTypeAnd\">\u548C\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class=\"\u903B\u8F91 mat-elevation-z4\" (click)=\"logicClick()\" *ngIf=\"data.NodeType === nodeTypeOr\">\u6216\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"line\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"child-node\">\r\n\t\t\t\t\t<common-node *ngFor=\"let node of data.Children\" [data]=\"node\"> </common-node>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</ng-template>\r\n\t</ng-container>\r\n\t<ng-template #else_content>\r\n\t\t<div class=\"empty\" (drop)=\"drop($event)\" (dragover)=\"$event.preventDefault()\">\r\n\t\t\t<p>\u7A7A\u5185\u5BB9</p>\r\n\t\t</div>\r\n\t</ng-template>\r\n</div>",
styles: ["@charset \"UTF-8\";.node-main{border-top:4px solid transparent;border-bottom:4px solid transparent;margin:-2px 0}.main{display:flex;justify-content:flex-start;align-items:stretch;margin:3px 0}.node-left{display:flex;justify-content:flex-start;align-items:stretch}.child-node{display:flex;flex-direction:column}.empty{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.logic{display:flex;align-items:center}.logic .\u903B\u8F91{width:24px;height:24px;border-radius:4px;font-size:14px;text-align:center;line-height:24px;color:#fff;cursor:pointer}.line{width:15px;flex-shrink:0;border-top:1px solid #ccc;border-left:1px solid #ccc;border-bottom:1px solid #ccc;margin-left:4px;box-sizing:border-box}"]
}] }
];
/** @nocollapse */
NodeComponent.ctorParameters = () => [
{ type: EditLabelService },
{ type: ElementRef }
];
NodeComponent.propDecorators = {
data: [{ type: Input }],
hostClass: [{ type: HostBinding, args: ['class.node',] }],
nodeMain: [{ type: ViewChild, args: ['nodeMain', { static: true },] }]
};
if (false) {
/** @type {?} */
NodeComponent.prototype.nodeTypeCondition;
/** @type {?} */
NodeComponent.prototype.nodeTypeAnd;
/** @type {?} */
NodeComponent.prototype.nodeTypeOr;
/** @type {?} */
NodeComponent.prototype.nodeTypeUnknow;
/** @type {?} */
NodeComponent.prototype.nodeTypePlain;
/** @type {?} */
NodeComponent.prototype.data;
/** @type {?} */
NodeComponent.prototype.hostClass;
/** @type {?} */
NodeComponent.prototype.nodeMain;
/**
* @type {?}
* @private
*/
NodeComponent.prototype.lblSvr;
/**
* @type {?}
* @private
*/
NodeComponent.prototype.ref;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @enum {number} */
const DataType = {
STR: 0,
INT: 1,
DATE: 2,
BYTEA: 3,
FLOAT: 4,
};
DataType[DataType.STR] = 'STR';
DataType[DataType.INT] = 'INT';
DataType[DataType.DATE] = 'DATE';
DataType[DataType.BYTEA] = 'BYTEA';
DataType[DataType.FLOAT] = 'FLOAT';
/** @type {?} */
const STR = DataType.STR;
/** @type {?} */
const INT = DataType.INT;
/** @type {?} */
const DATE = DataType.DATE;
/** @type {?} */
const BYTEA = DataType.BYTEA;
/** @type {?} */
const FLOAT = DataType.FLOAT;
/**
* @record
*/
function Operate() { }
if (false) {
/** @type {?} */
Operate.prototype.Name;
/** @type {?} */
Operate.prototype.Label;
/** @type {?} */
Operate.prototype.AllowTypes;
}
// 各种数据类型允许使用的运算符
/** @type {?} */
const Operates = [
{ Name: '=', Label: '等于', AllowTypes: [STR, INT, DATE, BYTEA, FLOAT] },
{ Name: '?', Label: '包含', AllowTypes: [STR, BYTEA] },
{ Name: '?>', Label: '前缀', AllowTypes: [STR, DATE, BYTEA] },
{ Name: 'e', Label: '为空', AllowTypes: [STR, INT, DATE, BYTEA, FLOAT] },
{ Name: '!=', Label: '不等于', AllowTypes: [STR, INT, DATE, BYTEA, FLOAT] },
{ Name: '>', Label: '大于', AllowTypes: [STR, INT, DATE, BYTEA, FLOAT] },
{ Name: '>=', Label: '大于等于', AllowTypes: [STR, INT, DATE, BYTEA, FLOAT] },
{ Name: '<', Label: '小于', AllowTypes: [STR, INT, DATE, BYTEA, FLOAT] },
{ Name: '<=', Label: '小于等于', AllowTypes: [STR, INT, DATE, BYTEA, FLOAT] },
{ Name: '!?', Label: '不包含', AllowTypes: [STR, BYTEA] },
{ Name: '!?>', Label: '非前缀', AllowTypes: [STR, DATE, BYTEA] },
{ Name: '<?', Label: '后缀', AllowTypes: [STR, DATE, BYTEA] },
{ Name: '!<?', Label: '非后缀', AllowTypes: [STR, DATE, BYTEA] },
{ Name: 'in', Label: '在列表', AllowTypes: [STR, INT, DATE, BYTEA, FLOAT] },
{ Name: '!in', Label: '不在列表', AllowTypes: [STR, INT, DATE, BYTEA, FLOAT] },
{ Name: '~', Label: '正则', AllowTypes: [STR] },
{ Name: '!~', Label: '非正则', AllowTypes: [STR] },
{ Name: '!e', Label: '非空', AllowTypes: [STR, INT, DATE, BYTEA, FLOAT] },
{ Name: '_', Label: '长度等于', AllowTypes: [STR, BYTEA] },
{ Name: '!_', Label: '长度不等于', AllowTypes: [STR, BYTEA] },
{ Name: '_>', Label: '长度大于', AllowTypes: [STR, BYTEA] },
{ Name: '_<', Label: '长度小于', AllowTypes: [STR, BYTEA] }
];
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class ConditionNodeComponent {
/**
* @param {?} lblSvr
* @param {?} ref
*/
constructor(lblSvr, ref) {
this.lblSvr = lblSvr;
this.ref = ref;
this.Operates = Operates;
this.nodeTypeCondition = NodeTypeEnum.NodeCondition;
this.hostClass = true;
}
/**
* @return {?}
*/
ngAfterViewInit() {
this.dvMain.nativeElement.ondragover = (/**
* @param {?} event
* @return {?}
*/
(event) => {
// 不能自己拖到自己
if (this.lblSvr.dragData &&
this.lblSvr.dragData.Type === 'node' &&
((/** @type {?} */ (this.lblSvr.dragData.Data))) === this.data) {
return;
}
event.preventDefault();
/** @type {?} */
const rect = ((/** @type {?} */ (this.ref.nativeElement))).getBoundingClientRect();
/** @type {?} */
const offsetY = event.pageY - rect.top;
// const clientHeight = rect.height;
if (this.lblSvr.dragOverNode !== this.data && this.lblSvr.prevNodeEle) {
/** @type {?} */
const ref = (/** @type {?} */ (this.lblSvr.prevNodeEle.nativeElement));
ref.style.borderTop = '4px solid transparent';
ref.style.borderBottom = '4px solid transparent';
ref.style.backgroundColor = null;
}
// Handle drag area
if (offsetY < 4) {
((/** @type {?} */ (this.dvMain.nativeElement))).style.borderTop = '4px solid #67c204';
((/** @type {?} */ (this.dvMain.nativeElement))).style.borderBottom = '4px solid transparent';
((/** @type {?} */ (this.dvMain.nativeElement.childNodes[0]))).style.backgroundColor = null;
this.lblSvr.dragOverArea = 'above';
}
else if (offsetY > 40) {
((/** @type {?} */ (this.dvMain.nativeElement))).style.borderTop = '4px solid transparent';
((/** @type {?} */ (this.dvMain.nativeElement.childNodes[0]))).style.backgroundColor = null;
((/** @type {?} */ (this.dvMain.nativeElement))).style.borderBottom = '4px solid #67c204';
this.lblSvr.dragOverArea = 'below';
}
else {
((/** @type {?} */ (this.dvMain.nativeElement))).style.borderTop = '4px solid transparent';
((/** @type {?} */ (this.dvMain.nativeElement))).style.borderBottom = '4px solid transparent';
((/** @type {?} */ (this.dvMain.nativeElement.childNodes[0]))).style.backgroundColor = '#67c204';
this.lblSvr.dragOverArea = 'center';
}
this.lblSvr.dragOverNode = this.data;
this.lblSvr.prevNodeEle = this.dvMain;
event.stopPropagation();
});
}
/**
* @return {?}
*/
ngOnInit() { }
/**
* @param {?} event
* @return {?}
*/
dropTop(event) {
this.data.addTopSibling(this.lblSvr.buildDragedNode());
if (this.lblSvr.dragData.Type === 'node') {
((/** @type {?} */ (this.lblSvr.dragData.Data))).remove();
}
}
/**
* @param {?} event
* @return {?}
*/
dropBottom(event) {
this.data.addBottomSibling(this.lblSvr.buildDragedNode());
if (this.lblSvr.dragData.Type === 'node') {
((/** @type {?} */ (this.lblSvr.dragData.Data))).remove();
}
}
/**
* @param {?} event
* @return {?}
*/
dropRight(event) {
this.data.addChildSibling(this.lblSvr.buildDragedNode());
if (this.lblSvr.dragData.Type === 'node') {
((/** @type {?} */ (this.lblSvr.dragData.Data))).remove();
}
}
/**
* @param {?} event
* @return {?}
*/
drop(event) {
switch (this.lblSvr.dragOverArea) {
case 'above':
this.dropTop(event);
break;
case 'below':
this.dropBottom(event);
break;
case 'center':
this.dropRight(event);
break;
}
this.lblSvr.onNodeChange.emit();
this.lblSvr.dragOverNode = null;
if (this.lblSvr.prevNodeEle) {
/** @type {?} */
const ref = (/** @type {?} */ (this.lblSvr.prevNodeEle.nativeElement));
ref.style.borderTop = '4px solid transparent';
ref.style.borderBottom = '4px solid transparent';
ref.style.backgroundColor = null;
}
event.stopPropagation();
}
/**
* @param {?} event
* @return {?}
*/
dragStart(event) {
this.lblSvr.dragData = { Type: 'node', Data: this.data };
}
/**
* @param {?} event
* @return {?}
*/
dragover(event) {
// console.log('dragend');
this.dvMain.nativeElement.style.borderTop = '4px solid transparent';
this.dvMain.nativeElement.style.borderBottom = '4px solid transparent';
this.dvMain.nativeElement.childNodes[0].style.backgroundColor = null;
}
/**
* @param {?} event
* @return {?}
*/
delete(event) {
this.data.remove();
this.lblSvr.onNodeChange.emit();
}
}
ConditionNodeComponent.decorators = [
{ type: Component, args: [{
selector: 'common-condition-node',
template: "<div class=\"condition-main\" #main (drop)=\"drop($event)\" (dragstart)=\"dragStart($event)\" (dragleave)=\"dragover($event)\">\r\n\t<div class=\"main\" draggable=\"true\">\r\n\t\t<ng-container *ngIf=\"data.NodeType === nodeTypeCondition; else plaintext\">\r\n\t\t\t<div class=\"field\">\r\n\t\t\t\t{{ data.Field }}\r\n\t\t\t</div>\r\n\t\t\t<mat-form-field class=\"operate\" appearance=\"outline\">\r\n\t\t\t\t<mat-select [(value)]=\"data.Operate\" (valueChange)=\"lblSvr.onNodeChange.emit()\">\r\n\t\t\t\t\t<mat-option *ngFor=\"let ope of Operates\" [value]=\"ope.Name\">\r\n\t\t\t\t\t\t{{ ope.Label }}\r\n\t\t\t\t\t</mat-option>\r\n\t\t\t\t</mat-select>\r\n\t\t\t</mat-form-field>\r\n\t\t\t<mat-form-field class=\"value\" appearance=\"outline\">\r\n\t\t\t\t<input matInput placeholder=\"value\" [(ngModel)]=\"data.Value\" (change)=\"lblSvr.onNodeChange.emit()\" />\r\n\t\t\t</mat-form-field>\r\n\t\t\t<button class=\"\u5220\u9664\" mat-icon-button (click)=\"delete($event)\">\r\n\t\t\t\t<mat-icon svgIcon=\"outlined:delete\"></mat-icon>\r\n\t\t\t</button>\r\n\t\t</ng-container>\r\n\t\t<ng-template #plaintext>\r\n\t\t\t<mat-form-field class=\"plaintext\" appearance=\"outline\">\r\n\t\t\t\t<textarea matInput placeholder=\"plaintext\" (change)=\"lblSvr.onNodeChange.emit()\"\r\n\t\t\t\t\t[(ngModel)]=\"data.PlainText\">\r\n\t\t\t</textarea>\r\n\t\t\t</mat-form-field>\r\n\t\t</ng-template>\r\n\t</div>\r\n</div>",
styles: ["@charset \"UTF-8\";.condition-main{width:440px;border-top:4px solid transparent;border-bottom:4px solid transparent;margin:-4px 0}.main{display:flex;width:408px;height:40px;border-radius:4px;box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.12),0 1px 5px 0 rgba(0,0,0,.2);margin:4px 32px 4px 4px}.main .\u5220\u9664{width:32px;height:40px;line-height:40px;text-align:left;display:none}.main:hover{width:440px;margin:4px 0 4px 4px}.main:hover .\u5220\u9664{display:block}.field{width:152px;height:40px;line-height:40px;box-sizing:border-box;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0 8px}.operate,.plaintext,.value{font-size:14px}.operate ::ng-deep .mat-form-field-wrapper,.plaintext ::ng-deep .mat-form-field-wrapper,.value ::ng-deep .mat-form-field-wrapper{padding:0}.operate ::ng-deep .mat-form-field-infix,.plaintext ::ng-deep .mat-form-field-infix,.value ::ng-deep .mat-form-field-infix{border:0;padding:11px 0}.operate ::ng-deep .mat-select-arrow-wrapper,.plaintext ::ng-deep .mat-select-arrow-wrapper,.value ::ng-deep .mat-select-arrow-wrapper{-webkit-transform:translateY(0);transform:translateY(0)}.operate{width:96px}.value{width:160px;margin:0 8px}.plaintext{width:100%}.drop-above{border-top:1px solid red}.drop-below{border-bottom:1px solid red}.drop-center{background-color:#ddd}"]
}] }
];
/** @nocollapse */
ConditionNodeComponent.ctorParameters = () => [
{ type: EditLabelService },
{ type: ElementRef }
];
ConditionNodeComponent.propDecorators = {
dvMain: [{ type: ViewChild, args: ['main', { static: false },] }],
data: [{ type: Input }],
hostClass: [{ type: HostBinding, args: ['class.condition-node',] }]
};
if (false) {
/** @type {?} */
ConditionNodeComponent.prototype.Operates;
/** @type {?} */
ConditionNodeComponent.prototype.nodeTypeCondition;
/** @type {?} */
ConditionNodeComponent.prototype.dvMain;
/** @type {?} */
ConditionNodeComponent.prototype.data;
/** @type {?} */
ConditionNodeComponent.prototype.hostClass;
/** @type {?} */
ConditionNodeComponent.prototype.lblSvr;
/**
* @type {?}
* @private
*/
ConditionNodeComponent.prototype.ref;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class NodeModule {
}
NodeModule.decorators = [
{ type: NgModule, args: [{
imports: [
CommonModule,
MatFormFieldModule$1,
MatSelectModule,
MatInputModule$1,
DragDropModule,
FormsModule,
MatButtonModule,
MatIconModule$1
],
exports: [NodeComponent],
declarations: [NodeComponent, ConditionNodeComponent],
schemas: [NO_ERRORS_SCHEMA]
},] }
];
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @record
*/
function Item() { }
if (false) {
/** @type {?} */
Item.prototype.CategoryID;
/** @type {?} */
Item.prototype.ID;
/** @type {?} */
Item.prototype.Name;
}
class CategoryComponent {
/**
* @param {?} svr
* @param {?} dialog
* @param {?} snackBar
* @param {?} viewportRuler
* @param {?} cd
*/
constructor(svr, dialog, snackBar, viewportRuler, cd) {
this.svr = svr;
this.dialog = dialog;
this.snackBar = snackBar;
this.viewportRuler = viewportRuler;
this.cd = cd;
this.hostClass = true;
this.source = null;
this.dropListEnterPredicate = (/**
* @param {?} drag
* @param {?} drop
* @return {?}
*/
(drag, drop) => {
if (drop === this.placeholder) {
return true;
}
if (drop !== this.activeContainer) {
return false;
}
/** @type {?} */
const phElement = this.placeholder.element.nativeElement;
/** @type {?} */
const sourceElement = drag.dropContainer.element.nativeElement;
/** @type {?} */
const dropElement = drop.element.nativeElement;
/** @type {?} */
const dragIndex = this.indexOfNum(dropElement.parentElement.children, this.source ? phElement : sourceElement);
/** @type {?} */
const dropIndex = this.indexOfNum(dropElement.parentElement.children, dropElement);
if (!this.source) {
this.sourceIndex = dragIndex;
this.source = drag.dropContainer;
phElement.style.width = sourceElement.clientWidth + 'px';
phElement.style.height = sourceElement.clientHeight + 'px';
sourceElement.parentElement.removeChild(sourceElement);
}
this.targetIndex = dropIndex;
this.target = drop;
phElement.style.display = '';
dropElement.parentElement.insertBefore(phElement, dropIndex > dragIndex ? dropElement.nextSibling : dropElement);
this.placeholder.enter(drag, drag.element.nativeElement.offsetLeft, drag.element.nativeElement.offsetTop);
return false;
// tslint:disable-next-line:semicolon
});
}
/**
* @return {?}
*/
ngOnInit() { }
/**
* @return {?}
*/
ngAfterViewInit() {
/** @type {?} */
const phElement = this.placeholder.element.nativeElement;
phElement.style.display = 'none';
phElement.parentElement.removeChild(phElement);
}
/**
* @return {?}
*/
add() {
this.svr.editLabel.add(this.category.ID);
this.dialog.open(EditLabelComponent, {
width: '800px',
height: '100%',
minWidth: '800px',
data: this.svr,
position: {
top: '0px',
right: '0px'
}
});
}
/**
* @return {?}
*/
addCategoryClick() {
/** @type {?} */
const dialogRef = this.dialog.open(EditCategoryDialogComponent, {
width: '360px',
height: '224px',
data: {
name: '新的类别',
title: '增加新的类别'
}
});
dialogRef.afterClosed().subscribe((/**
* @param {?} result
* @return {?}
*/
(result) => {
if (result) {
this.svr
.addCategory({ name: result.name, beforeAtID: this.category.ID })
.subscribe((/**
* @return {?}
*/
() => { }), this.errProcess());
}
}));
}
/**
* @private
* @return {?}
*/
errProcess() {
return (/**
* @param {?} err
* @return {?}
*/
err => {
if (err instanceof HttpErrorResponse) {
/** @type {?} */
const derr = IsDuplicatePKError(err.error);
if (derr.Yes) {
this.snackBar.open('名称重复', '关闭', { duration: 5000 });
}
else {
this.snackBar.open(err.error, '关闭', { duration: 5000 });
}
}
else {
this.snackBar.open(err, '关闭', { duration: 5000 });
}
});
}
/**
* @return {?}
*/
editCategoryClick() {
/** @type {?} */
const dialogRef = this.dialog.open(EditCategoryDialogComponent, {
width: '360px',
height: '224px',
data: {
name: this.category.Name,
title: '修改类别'
}
});
dialogRef.afterClosed().subscribe((/**
* @param {?} result
* @return {?}
*/
(result) => {
if (result) {
this.svr
.editCategory({ name: result.name, id: this.category.ID })
.subscribe((/**
* @return {?}
*/
() => { }), this.errProcess());
}
}));
}
/**
* @return {?}
*/
up() {
this.svr.setCategoryPosition(this.category, this.category.Position - 1);
}
/**
* @return {?}
*/
down() {
this.svr.setCategoryPosition(this.category, this.category.Position + 1);
}
/**
* @return {?}
*/
delete() {
/** @type {?} */
const dialogRef = this.dialog.open(ConfirmDialogComponent, {
width: '360px',
height: '224px',
data: `确定要删除类别[${this.category.Name}]及其所有的标签吗?`
});
dialogRef.afterClosed().subscribe((/**
* @param {?} result
* @return {?}
*/
(result) => {
if (result) {
this.svr.removeCategory(this.category.ID).subscribe((/**
* @return {?}
*/
() => { }), this.errProcess());
}
}));
}
/**
* @param {?} e
* @return {?}
*/
dragMoved(e) {
/** @type {?} */
const point = this.getPointerPositionOnPage(e.event);
this.listGroup._items.forEach((/**
* @param {?} dropList
* @return {?}
*/
dropList => {
if (__isInsideDropListClientRect(dropList, point.x, point.y)) {
this.activeContainer = dropList;
return;
}
}));
}
/**
* @param {?} event
* @return {?}
*/
dropListDropped(event) {
if (!this.target) {
return;
}
/** @type {?} */
const phElement = this.placeholder.element.nativeElement;
/** @type {?} */
const parent = phElement.parentElement;
phElement.style.display = 'none';
parent.removeChild(phElement);
parent.appendChild(phElement);
parent.insertBefore(this.source.element.nativeElement, parent.children[this.sourceIndex]);
this.target = null;
this.source = null;
if (this.sourceIndex !== this.targetIndex && this.category.Labels) {
this.cd.detach();
// moveItemInArray(this.category.Labels, this.sourceIndex, this.targetIndex);
this.svr.backface
.setLabelPosition({
CategoryID: this.category.ID,
ID: this.category.Labels[this.sourceIndex].ID,
Position: this.targetIndex
})
.subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
this.category.setLabelsPosition(v.map((/**
* @param {?} vv
* @return {?}
*/
vv => vv.ID)));
this.cd.reattach();
}), this.errProcess());
}
}
/**
* @param {?} event
* @return {?}
*/
getPointerPositionOnPage(event) {
// `touches` will be empty for start/end events so we have to fall back to `changedTouches`.
/** @type {?} */
const point = __isTouchEvent(event) ? event.touches[0] || event.changedTouches[0] : event;
/** @type {?} */
const scrollPosition = this.viewportRuler.getViewportScrollPosition();
return {
x: point.pageX - scrollPosition.left,
y: point.pageY - scrollPosition.top
};
}
/**
* @param {?} collection
* @param {?} node
* @return {?}
*/
indexOfNum(collection, node) {
return Array.prototype.indexOf.call(collection, node);
}
}
CategoryComponent.decorators = [
{ type: Component, args: [{
selector: 'common-label-category',
template: "<div class=\"title\">\r\n\t<ng-content></ng-content>\r\n\t<span>\r\n\t\t<span class=\"title-name\">{{ category?.displayLabel() }}</span></span\r\n\t>\r\n\t<span>\r\n\t\t<button mat-icon-button (click)=\"editCategoryClick()\">\r\n\t\t\t<mat-icon class=\"\u7C7B\u522B\u529F\u80FD\u56FE\u6807\" svgIcon=\"outlined:edit\"></mat-icon>\r\n\t\t</button>\r\n\t\t<button mat-icon-button (click)=\"delete()\">\r\n\t\t\t<mat-icon class=\"\u7C7B\u522B\u529F\u80FD\u56FE\u6807\" svgIcon=\"outlined:delete\"></mat-icon>\r\n\t\t</button>\r\n\t\t<div class=\"\u5206\u5272\u7EBF\"></div>\r\n\t\t<button mat-icon-button (click)=\"up()\" *ngIf=\"category.Position > 1\">\r\n\t\t\t<mat-icon class=\"\u7C7B\u522B\u529F\u80FD\u56FE\u6807 \u7C7B\u522B\u529F\u80FD\u9AD8\u4EAE\u56FE\u6807\" svgIcon=\"arrow_upward\"></mat-icon>\r\n\t\t</button>\r\n\t\t<button mat-icon-button (click)=\"down()\" *ngIf=\"svr.categorys[svr.categorys.length - 1] !== category\">\r\n\t\t\t<mat-icon class=\"\u7C7B\u522B\u529F\u80FD\u56FE\u6807 \u7C7B\u522B\u529F\u80FD\u9AD8\u4EAE\u56FE\u6807\" svgIcon=\"arrow_downward\"></mat-icon>\r\n\t\t</button>\r\n\r\n\t\t<button mat-icon-button (click)=\"addCategoryClick()\">\r\n\t\t\t<mat-icon class=\"\u7C7B\u522B\u529F\u80FD\u56FE\u6807 \u7C7B\u522B\u529F\u80FD\u9AD8\u4EAE\u56FE\u6807\" svgIcon=\"outlined:add\"></mat-icon>\r\n\t\t</button>\r\n\t</span>\r\n</div>\r\n<div class=\"example-container\" cdkDropListGroup>\r\n\t<div\r\n\t\tcdkDropList\r\n\t\t[cdkDropListEnterPredicate]=\"dropListEnterPredicate\"\r\n\t\t(cdkDropListDropped)=\"dropListDropped($event)\"\r\n\t></div>\r\n\t<div\r\n\t\tcdkDropList\r\n\t\t*ngFor=\"let label of category?.Labels\"\r\n\t\t[cdkDropListEnterPredicate]=\"dropListEnterPredicate\"\r\n\t\t(cdkDropListDropped)=\"dropListDropped($event)\"\r\n\t>\r\n\t\t<common-label-for-edit\r\n\t\t\t[label]=\"label\"\r\n\t\t\t[categoryID]=\"category?.ID\"\r\n\t\t\tcdkDrag\r\n\t\t\tclass=\"example-box \u5355\u4E2A\u6807\u7B7E\"\r\n\t\t\t(cdkDragMoved)=\"dragMoved($event)\"\r\n\t\t>\r\n\t\t\t<mat-icon cdkDragHandle class=\"\u62D6\u52A8\u56FE\u6807\" svgIcon=\"drag_indicator\"> </mat-icon>\r\n\t\t</common-label-for-edit>\r\n\t</div>\r\n\t<span class=\"\u6807\u7B7E \u6DFB\u52A0\u6807\u7B7E\" (click)=\"add()\">\r\n\t\t<mat-icon class=\"\u6DFB\u52A0\u56FE\u6807\" svgIcon=\"add\"></mat-icon>\r\n\t</span>\r\n</div>\r\n",
styles: ["@charset \"UTF-8\";:host:hover .title{padding-left:32px;box-sizing:border-box}:host:hover .title .title-name{font-size:14px;font-weight:700}:host:hover .title .\u5206\u5272\u7EBF,:host:hover .title .\u7C7B\u522B\u529F\u80FD\u56FE\u6807{display:inline-block}.title{height:64px;padding:16px 0 16px 8px;box-sizing:border-box;display:flex;justify-content:space-between;align-items:center}.title .title-name{font-size:12px}.title button{width:32px;height:32px;line-height:32px}.title .\u7C7B\u522B\u529F\u80FD\u56FE\u6807{width:24px;height:24px;line-height:24px;cursor:pointer;display:none}.title .\u5206\u5272\u7EBF{width:1px;height:24px;vertical-align:middle;display:none}.\u6807\u7B7E{font-size:14px;display:inline-block;margin:0 16px 8px 0;height:34px;padding:0 24px;border-radius:4px;line-height:34px;cursor:pointer;position:relative}.\u6807\u7B7E:hover .\u67E5\u770B\u6309\u94AE{display:block}.\u5355\u4E2A\u6807\u7B7E{height:34px;border-radius:4px;line-height:34px;margin:0 16px 16px 0;cursor:pointer}.\u5355\u4E2A\u6807\u7B7E .\u62D6\u52A8\u56FE\u6807{width:16px;height:16px;line-height:16px;position:absolute;left:0;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);display:none}.\u5355\u4E2A\u6807\u7B7E:hover .\u62D6\u52A8\u56FE\u6807{display:block}.\u6DFB\u52A0\u6807\u7B7E{width:40px;padding:0 8px;text-align:center;vertical-align:top}.\u6DFB\u52A0\u56FE\u6807{padding:5px 0;width:24px;height:24px;line-height:24px}.\u67E5\u770B\u6309\u94AE{width:16px;height:16px;line-height:16px;position:absolute;right:0;top:0;display:none}.example-container{padding-left:24px;display:flex;flex-wrap:wrap}.example-box{min-width:50px;position:relative;z-index:1;box-shadow:none}.example-box:last-child{border:0}.cdk-drop-list{display:flex}.cdk-drag-preview{box-sizing:border-box;border-radius:4px}.cdk-drag-placeholder{opacity:.3}.cdk-drag-animating{transition:transform 250ms cubic-bezier(0,0,.2,1);transition:transform 250ms cubic-bezier(0,0,.2,1),-webkit-transform 250ms cubic-bezier(0,0,.2,1)}"]
}] }
];
/** @nocollapse */
CategoryComponent.ctorParameters = () => [
{ type: LabelManagerService },
{ type: MatDialog },
{ type: MatSnackBar },
{ type: ViewportRuler },
{ type: ChangeDetectorRef }
];
CategoryComponent.propDecorators = {
category: [{ type: Input }],
hostClass: [{ type: HostBinding, args: ['class.label-category',] }],
listGroup: [{ type: ViewChild, args: [CdkDropListGroup, { static: true },] }],
placeholder: [{ type: ViewChild, args: [CdkDropList, { static: true },] }]
};
if (false) {
/** @type {?} */
CategoryComponent.prototype.category;
/** @type {?} */
CategoryComponent.prototype.hostClass;
/** @type {?} */
CategoryComponent.prototype.listGroup;
/** @type {?} */
CategoryComponent.prototype.placeholder;
/** @type {?} */
CategoryComponent.prototype.target;
/** @type {?} */
CategoryComponent.prototype.targetIndex;
/** @type {?} */
CategoryComponent.prototype.source;
/** @type {?} */
CategoryComponent.prototype.sourceIndex;
/** @type {?} */
CategoryComponent.prototype.dragIndex;
/** @type {?} */
CategoryComponent.prototype.activeContainer;
/** @type {?} */
CategoryComponent.prototype.dropListEnterPredicate;
/** @type {?} */
CategoryComponent.prototype.svr;
/** @type {?} */
CategoryComponent.prototype.dialog;
/**
* @type {?}
* @private
*/
CategoryComponent.prototype.snackBar;
/**
* @type {?}
* @private
*/
CategoryComponent.prototype.viewportRuler;
/**
* @type {?}
* @private
*/
CategoryComponent.prototype.cd;
}
/**
* Determines whether an event is a touch event.
* @param {?} event
* @return {?}
*/
function __isTouchEvent(event) {
return event.type.startsWith('touch');
}
/**
* @param {?} dropList
* @param {?} x
* @param {?} y
* @return {?}
*/
function __isInsideDropListClientRect(dropList, x, y) {
const { top, bottom, left, right } = dropList.element.nativeElement.getBoundingClientRect();
return y >= top && y <= bottom && x >= left && x <= right;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class LabelForEditComponent {
/**
* @param {?} svr
* @param {?} dialog
*/
constructor(svr, dialog) {
this.svr = svr;
this.dialog = dialog;
this.hostClass = true;
this.removeConfirm = false;
}
/**
* @return {?}
*/
ngOnInit() { }
/**
* @return {?}
*/
edit() {
this.svr.backface.fetchLabel({ CategoryID: this.categoryID, ID: this.label.ID }).subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
this.svr.backface.stringToNode(v.Conts).subscribe((/**
* @param {?} conts
* @return {?}
*/
conts => {
this.svr.editLabel.titleInput = false;
this.svr.editLabel.CategoryID = this.categoryID;
this.svr.editLabel.LabelID = this.label.ID;
this.svr.editLabel.isAdd = false;
this.svr.editLabel.Name = v.Name;
this.svr.editLabel.Conts = Node.fromInterface(conts);
this.svr.editLabel.PlainText = v.PlainText;
this.dialog.open(EditLabelComponent, {
width: '800px',
height: '100%',
minWidth: '800px',
disableClose: true,
data: this.svr,
position: {
top: '0px',
right: '0px'
}
});
}));
}));
}
/**
* @return {?}
*/
remove() {
this.svr.removeLabel(this.categoryID, this.label.ID).subscribe((/**
* @return {?}
*/
() => (this.removeConfirm = false)));
}
}
LabelForEditComponent.decorators = [
{ type: Component, args: [{
selector: 'common-label-for-edit',
template: "<div class=\"\u6807\u7B7E\">\r\n\t<span class=\"label-text\">\r\n\t\t{{ label?.displayLabel() }}\r\n\t</span>\r\n\t<mat-icon class=\"\u7F16\u8F91\u56FE\u6807 \u56FE\u6807\" svgIcon=\"outlined:edit\" (click)=\"edit()\"></mat-icon>\r\n\t<ng-content></ng-content>\r\n\r\n\t<mat-icon *ngIf=\"!removeConfirm\" (click)=\"removeConfirm = true\" class=\"\u5220\u9664\u6807\u7B7E \u56FE\u6807\" svgIcon=\"outlined:delete\">\r\n\t</mat-icon>\r\n\t<div *ngIf=\"removeConfirm\" class=\"\u4E8C\u6B21\u786E\u8BA4\">\r\n\t\t<span class=\"\u4E8C\u6B21\u786E\u8BA4-\u786E\u5B9A\" (click)=\"remove()\">\u786E\u5B9A</span>\r\n\t\t<span class=\"\u4E8C\u6B21\u786E\u8BA4-\u53D6\u6D88\" (click)=\"removeConfirm = false\">\u53D6\u6D88</span>\r\n\t</div>\r\n</div>\r\n",
styles: ["@charset \"UTF-8\";.\u6807\u7B7E{font-size:14px;display:inline-block;height:34px;padding:0 24px;border-radius:4px;line-height:34px;cursor:pointer;position:relative}.\u6807\u7B7E .\u7F16\u8F91\u56FE\u6807{position:absolute;right:0;top:0}.\u6807\u7B7E .\u62D6\u52A8\u56FE\u6807{position:absolute;left:0;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.\u6807\u7B7E .\u5220\u9664\u6807\u7B7E{position:absolute;right:0;bottom:0}.\u6807\u7B7E .\u56FE\u6807{width:16px;height:16px;line-height:16px;display:none}.\u6807\u7B7E .\u4E8C\u6B21\u786E\u8BA4{width:100%;height:100%;position:absolute;top:0;left:0;font-size:12px}.\u6807\u7B7E .\u4E8C\u6B21\u786E\u8BA4 .\u4E8C\u6B21\u786E\u8BA4-\u53D6\u6D88,.\u6807\u7B7E .\u4E8C\u6B21\u786E\u8BA4 .\u4E8C\u6B21\u786E\u8BA4-\u786E\u5B9A{text-align:center;display:inline-block;width:50%;height:100%}.\u6807\u7B7E:hover .\u56FE\u6807{display:block}.label-text{border:1px solid transparent}"]
}] }
];
/** @nocollapse */
LabelForEditComponent.ctorParameters = () => [
{ type: LabelManagerService },
{ type: MatDialog }
];
LabelForEditComponent.propDecorators = {
label: [{ type: Input }],
categoryID: [{ type: Input }],
hostClass: [{ type: HostBinding, args: ['class.label-for-edit',] }]
};
if (false) {
/** @type {?} */
LabelForEditComponent.prototype.label;
/** @type {?} */
LabelForEditComponent.prototype.categoryID;
/** @type {?} */
LabelForEditComponent.prototype.hostClass;
/** @type {?} */
LabelForEditComponent.prototype.removeConfirm;
/** @type {?} */
LabelForEditComponent.prototype.svr;
/**
* @type {?}
* @private
*/
LabelForEditComponent.prototype.dialog;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class LabelManagerComponent {
/**
* @param {?} svr
* @param {?} dialog
* @param {?} snackBar
*/
constructor(svr, dialog, snackBar) {
this.svr = svr;
this.dialog = dialog;
this.snackBar = snackBar;
this.hostClass = true;
this.hasClose = true;
this.close = new EventEmitter();
}
/**
* @param {?} val
* @return {?}
*/
set eleName(val) {
this.svr.eleName = val;
}
/**
* @param {?} val
* @return {?}
*/
set ownerBy(val) {
this.svr.ownerBy = val;
}
/**
* @param {?} val
* @return {?}
*/
set owner(val) {
this.svr.owner = val;
}
/**
* @param {?} val
* @return {?}
*/
set allColumnsWithLetter(val) {
this.svr.allColumnsWithLetter = val;
}
/**
* @param {?} val
* @return {?}
*/
set backface(val) {
this.svr.backface = val;
}
/**
* @return {?}
*/
ngOnInit() {
this.svr.fetchCategories();
}
/**
* @return {?}
*/
addCategoryClick() {
/** @type {?} */
const dialogRef = this.dialog.open(EditCategoryDialogComponent, {
width: '360px',
height: '224px',
data: {
name: '新的类别',
title: '增加新的类别'
}
});
dialogRef.afterClosed().subscribe((/**
* @param {?} result
* @return {?}
*/
(result) => {
if (result) {
this.svr.addCategory({ name: result.name }).subscribe((/**
* @return {?}
*/
() => { }), (/**
* @param {?} err
* @return {?}
*/
err => {
this.snackBar.open(err, '确定', { duration: 5000 });
}));
}
}));
}
/**
* @return {?}
*/
openHisDialog() {
this.svr.fetchCategoryLabelHis().subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
this.dialog.open(ShowHistoryDialogComponent, {
width: '360px',
data: v,
position: {
top: '46px',
right: '16px'
}
});
}));
}
/**
* @param {?} event
* @return {?}
*/
drop(event) {
this.svr.setCategoryPosition(this.svr.categorys[event.previousIndex], event.currentIndex + 1);
}
/**
* @return {?}
*/
categoryDisplayTitle() {
switch (this.svr.ownerBy) {
case OwnerByEnum.ownerByEle:
return '缺省';
case OwnerByEnum.ownerByDept:
return `${this.svr.owner}`;
case OwnerByEnum.ownerByUser:
return '私有';
}
}
}
LabelManagerComponent.decorators = [
{ type: Component, args: [{
selector: 'common-label-manager',
template: "<!-- <ng-container *ngIf=\"svr.editLabel.showEditLabel; else editList\"> -->\r\n<!-- <common-edit-label #labelEditUI *ngIf=\"!svr.editLabel.showEditLabel\"> </common-edit-label> -->\r\n<!-- </ng-container> -->\r\n<ng-container>\r\n\t<div class=\"content\">\r\n\t\t<div class=\"title\">\r\n\t\t\t<div class=\"title-name\">{{ title }}\u6807\u7B7E\u7F16\u8F91</div>\r\n\t\t\t<button class=\"\u65E5\u5FD7\" mat-button (click)=\"openHisDialog()\">\r\n\t\t\t\t<mat-icon svgIcon=\"photo_album\"></mat-icon>\r\n\t\t\t\t\u65E5\u5FD7 <mat-icon svgIcon=\"double_down\" class=\"\u5411\u4E0B\u53CC\u7BAD\u5934\"></mat-icon>\r\n\t\t\t</button>\r\n\t\t</div>\r\n\t\t<div\r\n\t\t\tclass=\"edit-list\"\r\n\t\t\t*ngIf=\"svr.categorys?.length > 0; else empty\"\r\n\t\t\tcdkDropList\r\n\t\t\t(cdkDropListDropped)=\"drop($event)\"\r\n\t\t>\r\n\t\t\t<common-label-category *ngFor=\"let category of svr.categorys\" class=\"\u7C7B\u522B\" [category]=\"category\" cdkDrag>\r\n\t\t\t\t<mat-icon cdkDragHandle class=\"\u62D6\u52A8\" svgIcon=\"drag_indicator\"></mat-icon>\r\n\t\t\t</common-label-category>\r\n\t\t</div>\r\n\t\t<ng-template #empty>\r\n\t\t\t<div class=\"\u521B\u5EFA\">\r\n\t\t\t\t<div class=\"\u521B\u5EFA-\u6807\u9898\">\u6682\u65E0\u4EFB\u4F55\u6807\u7B7E</div>\r\n\t\t\t\t<div class=\"\u521B\u5EFA-\u63D0\u793A\">\u70B9\u51FB\u521B\u5EFA\u6309\u94AE\u521B\u5EFA\u7C7B\u522B\u540E\u5373\u53EF\u65B0\u589E\u6807\u7B7E</div>\r\n\t\t\t\t<button mat-stroked-button (click)=\"addCategoryClick()\">\r\n\t\t\t\t\t<mat-icon svgIcon=\"add\"></mat-icon> \u521B\u5EFA\r\n\t\t\t\t</button>\r\n\t\t\t</div>\r\n\t\t</ng-template>\r\n\t\t<div class=\"footer\" *ngIf=\"hasClose\">\r\n\t\t\t<button mat-button (click)=\"close.emit()\" mat-flat-button color=\"primary\">\u5173\u95ED</button>\r\n\t\t</div>\r\n\t</div>\r\n</ng-container>\r\n",
providers: [LabelManagerService],
styles: ["@charset \"UTF-8\";:host{width:100%;height:100%}.content{width:100%;height:100%;display:flex;flex-direction:column}.title{display:flex;padding:8px 16px 8px 24px;justify-content:space-between}.title .title-name{font-size:16px;font-weight:700}.\u521B\u5EFA{flex-grow:1;display:flex;flex-direction:column;justify-content:center;align-items:center}.\u521B\u5EFA .\u521B\u5EFA-\u6807\u9898{text-align:center;font-size:18;font-weight:700}.\u521B\u5EFA .\u521B\u5EFA-\u63D0\u793A{margin:8px 0 24px;font-size:12px}.\u521B\u5EFA button{width:88px;height:32px;line-height:32px}.edit-list{width:100%;flex-grow:1;overflow-y:auto;box-sizing:border-box}.\u7C7B\u522B{position:relative}.\u7C7B\u522B .\u62D6\u52A8{position:absolute;top:24px;left:0;width:16px;height:16px;line-height:16px;vertical-align:middle;cursor:pointer;display:none}.\u7C7B\u522B:hover .\u62D6\u52A8{display:inline-block}.footer{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;padding:16px;height:64px;box-sizing:border-box}.\u65E5\u5FD7{height:24px;line-height:24px;padding:0 8px;font-size:12px}.\u65E5\u5FD7 .mat-icon{width:16px;height:16px;line-height:16px}.\u65E5\u5FD7 .\u5411\u4E0B\u53CC\u7BAD\u5934{width:12px;height:12px;line-height:12px}"]
}] }
];
/** @nocollapse */
LabelManagerComponent.ctorParameters = () => [
{ type: LabelManagerService },
{ type: MatDialog },
{ type: MatSnackBar }
];
LabelManagerComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.label-manager',] }],
title: [{ type: Input }],
eleName: [{ type: Input }],
ownerBy: [{ type: Input }],
owner: [{ type: Input }],
allColumnsWithLetter: [{ type: Input }],
backface: [{ type: Input }],
hasClose: [{ type: Input }],
close: [{ type: Output }]
};
if (false) {
/** @type {?} */
LabelManagerComponent.prototype.hostClass;
/** @type {?} */
LabelManagerComponent.prototype.title;
/** @type {?} */
LabelManagerComponent.prototype.hasClose;
/** @type {?} */
LabelManagerComponent.prototype.close;
/** @type {?} */
LabelManagerComponent.prototype.svr;
/** @type {?} */
LabelManagerComponent.prototype.dialog;
/**
* @type {?}
* @private
*/
LabelManagerComponent.prototype.snackBar;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class LabelManagerModule {
}
LabelManagerModule.decorators = [
{ type: NgModule, args: [{
declarations: [
LabelManagerComponent,
CategoryComponent,
LabelForEditComponent,
EditCategoryDialogComponent,
EditLabelComponent,
LabelHistoryComponent
],
imports: [
CommonModule,
FormsModule,
MatIconModule$1,
MatInputModule$1,
MatDividerModule$1,
MatSnackBarModule,
MatButtonModule,
MatDialogModule,
MatTooltipModule,
MatFormFieldModule$1,
MatSelectModule,
AceEditorModule,
ConfirmDialogModule,
DragDropModule,
NodeModule,
ShowHistoryDialogModule
],
exports: [LabelManagerComponent],
entryComponents: [EditCategoryDialogComponent, LabelHistoryComponent, EditLabelComponent],
schemas: [NO_ERRORS_SCHEMA]
},] }
];
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @enum {string} */
const CTType = {
// CTTypeInput 录入
Input: 'I',
// CTTypeSelect 单选
Select: 'S',
// CTTypeSlider 范围选择
Slider: 'SL',
// CTTypeMultiSelect 多选
MultiSelect: 'MS',
// CTTypeRangeInput 范围录入
RangeInput: 'RI',
};
/**
* @record
*/
function RecordViewParam() { }
if (false) {
/** @type {?} */
RecordViewParam.prototype.DB;
/** @type {?} */
RecordViewParam.prototype.Sql;
/** @type {?} */
RecordViewParam.prototype.ManualPage;
/** @type {?} */
RecordViewParam.prototype.TableName;
/** @type {?} */
RecordViewParam.prototype.UniqueField;
/** @type {?} */
RecordViewParam.prototype.Columns;
/** @type {?} */
RecordViewParam.prototype.Processes;
/** @type {?} */
RecordViewParam.prototype.AllColumns;
/** @type {?} */
RecordViewParam.prototype.ConditionalTemplates;
}
/**
* @record
*/
function ConditionalTemplate() { }
if (false) {
/** @type {?} */
ConditionalTemplate.prototype.Type;
/** @type {?} */
ConditionalTemplate.prototype.Field;
/** @type {?} */
ConditionalTemplate.prototype.Setting;
}
/**
* @record
*/
function Option() { }
if (false) {
/** @type {?} */
Option.prototype.Text;
/** @type {?} */
Option.prototype.Value;
}
/**
* @record
*/
function CTSelectSetting() { }
if (false) {
/** @type {?} */
CTSelectSetting.prototype.Options;
/** @type {?} */
CTSelectSetting.prototype.OtherOption;
}
/**
* @record
*/
function CTSilderSetting() { }
if (false) {
/** @type {?} */
CTSilderSetting.prototype.Min;
/** @type {?} */
CTSilderSetting.prototype.Max;
/** @type {?|undefined} */
CTSilderSetting.prototype.Step;
/** @type {?} */
CTSilderSetting.prototype.EnforceStep;
/** @type {?} */
CTSilderSetting.prototype.PositiveInfinity;
/** @type {?} */
CTSilderSetting.prototype.NegativeInfinity;
/** @type {?} */
CTSilderSetting.prototype.LabelTemplate;
/** @type {?} */
CTSilderSetting.prototype.Ratio;
}
class SilderSetting {
/**
* @param {?} data
*/
constructor(data) {
this.data = data;
this.translate = this.translate.bind(this);
}
/**
* @return {?}
*/
static defaultOptions() {
return {
floor: 0,
ceil: 100,
draggableRange: true
};
}
/**
* @param {?} val
* @return {?}
*/
translate(val) {
if (this.data.PositiveInfinity && this.data.Max === val) {
return '∞';
}
if (this.data.NegativeInfinity && this.data.Min === val) {
return '-∞';
}
if (this.data.LabelTemplate) {
return this.data.LabelTemplate.replace('${val}', `${val}`);
}
return `${val}`;
}
/**
* @return {?}
*/
toOptions() {
/** @type {?} */
const rev = (/** @type {?} */ ({
floor: this.data.Min ? this.data.Min : 0,
ceil: this.data.Max ? this.data.Max : 100,
draggableRange: true,
translate: this.translate
}));
if (this.data.Step) {
if (this.data.EnforceStep) {
rev.step = this.data.Step;
}
else {
rev.tickStep = this.data.Step;
}
rev.showTicks = true;
}
return rev;
}
}
if (false) {
/** @type {?} */
SilderSetting.prototype.data;
}
/**
* @record
*/
function CTMultiSelectSetting() { }
if (false) {
/** @type {?} */
CTMultiSelectSetting.prototype.Options;
/** @type {?} */
CTMultiSelectSetting.prototype.OtherOption;
}
/**
* @record
*/
function CTRangeInputSetting() { }
if (false) {
/** @type {?} */
CTRangeInputSetting.prototype.LowLabel;
/** @type {?} */
CTRangeInputSetting.prototype.HighLabel;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class ConditionalTemplateComponent {
/**
* @param {?} elementSvr
*/
constructor(elementSvr) {
this.elementSvr = elementSvr;
this.hostClass = true;
this.optionType = '区间选择';
this.optionIndicator = '联系地址';
this.Input = CTType.Input;
this.Select = CTType.Select;
this.Slider = CTType.Slider;
this.MultiSelect = CTType.MultiSelect;
this.RangeInput = CTType.RangeInput;
this.svr = (/** @type {?} */ (this.elementSvr.data.recordview));
}
/**
* @return {?}
*/
ngOnInit() { }
/**
* @param {?} event
* @return {?}
*/
drop(event) {
moveItemInArray(this.svr.Params.ConditionalTemplates, event.previousIndex, event.currentIndex);
}
/**
* @return {?}
*/
addCondition() {
this.svr.Params.ConditionalTemplates = this.svr.Params.ConditionalTemplates || [];
/** @type {?} */
const c = (/** @type {?} */ ({
Type: CTType.Input,
Field: this.svr.Params.AllColumns.length > 0 ? this.svr.Params.AllColumns[0].Name : undefined,
Setting: {}
}));
this.svr.Params.ConditionalTemplates.push(c);
this.svr.currentConditionTemplate = c;
}
/**
* @param {?} data
* @return {?}
*/
SelectCondition(data) {
data.Setting = data.Setting || {};
this.svr.currentConditionTemplate = data;
}
/**
* @return {?}
*/
remove() {
/** @type {?} */
const idx = this.svr.Params.ConditionalTemplates.findIndex((/**
* @param {?} v
* @return {?}
*/
v => v === this.svr.currentConditionTemplate));
this.svr.Params.ConditionalTemplates.splice(idx, 1);
if (this.svr.Params.ConditionalTemplates.length > 0) {
this.svr.currentConditionTemplate = this.svr.Params.ConditionalTemplates[Math.min(idx, this.svr.Params.ConditionalTemplates.length - 1)];
}
else {
this.svr.currentConditionTemplate = undefined;
}
}
/**
* @return {?}
*/
typeChange() {
switch (this.svr.currentConditionTemplate.Type) {
case CTType.Input:
this.svr.currentConditionTemplate.Setting = {};
break;
case CTType.Select:
this.svr.currentConditionTemplate.Setting = (/** @type {?} */ (this.svr.currentConditionTemplate
.Setting));
break;
case CTType.MultiSelect:
this.svr.currentConditionTemplate.Setting = (/** @type {?} */ (this.svr.currentConditionTemplate
.Setting));
break;
case CTType.RangeInput:
this.svr.currentConditionTemplate.Setting = (/** @type {?} */ (this.svr.currentConditionTemplate
.Setting));
break;
case CTType.Slider:
this.svr.currentConditionTemplate.Setting = (/** @type {?} */ (this.svr.currentConditionTemplate
.Setting));
break;
}
}
/**
* @param {?} ty
* @return {?}
*/
typeName(ty) {
switch (ty) {
case CTType.Input:
return '录入';
case CTType.Select:
return '单选';
case CTType.MultiSelect:
return '多选';
case CTType.RangeInput:
return '范围录入';
case CTType.Slider:
return '范围选择';
}
}
}
ConditionalTemplateComponent.decorators = [
{ type: Component, args: [{
selector: 'common-conditional-template',
template: "<div class=\"\u6761\u4EF6\u5217\u8868\">\r\n\t<div class=\"\u6761\u4EF6\u6807\u9898 \u5B57\u4F53\u989C\u8272\">\r\n\t\t<span>\u6761\u4EF6\u5217\u8868</span>\r\n\t\t<span class=\"\u65B0\u589E\u6761\u4EF6 \u5B57\u4F53\u989C\u8272\" (click)=\"addCondition()\">\r\n\t\t\t<mat-icon svgIcon=\"add_circle\"></mat-icon>\r\n\t\t\t<span>\u65B0\u589E\u6761\u4EF6</span>\r\n\t\t</span>\r\n\t</div>\r\n\t<div cdkDropList class=\"example-list\" (cdkDropListDropped)=\"drop($event)\">\r\n\t\t<div\r\n\t\t\tclass=\"example-box\"\r\n\t\t\t*ngFor=\"let condition of svr.Params.ConditionalTemplates\"\r\n\t\t\tcdkDrag\r\n\t\t\t(click)=\"SelectCondition(condition)\"\r\n\t\t\t[ngClass]=\"{ active: condition == svr.currentConditionTemplate }\"\r\n\t\t>\r\n\t\t\t<mat-icon cdkDragHandle class=\"\u62D6\u52A8 \u56FE\u6807\" svgIcon=\"drag_indicator\"> </mat-icon>\r\n\t\t\t{{ condition.Field }}-{{ typeName(condition.Type) }}\r\n\t\t\t<mat-icon\r\n\t\t\t\tclass=\"\u6307\u793A\u7BAD\u5934\"\r\n\t\t\t\t*ngIf=\"condition == svr.currentConditionTemplate\"\r\n\t\t\t\tsvgIcon=\"chevron_right\"\r\n\t\t\t></mat-icon>\r\n\t\t</div>\r\n\t</div>\r\n</div>\r\n<div class=\"\u5206\u5272\u7EBF \u5206\u5272\u7EBF\u8272\u503C\"></div>\r\n<ng-template #emptyUI>\r\n\t<div class=\"\u6761\u4EF6\u8BBE\u7F6E\">\r\n\t\t<div class=\"\u6761\u4EF6\u6807\u9898 \u5B57\u4F53\u989C\u8272\">\r\n\t\t\t<span>\u6761\u4EF6\u8BBE\u7F6E</span>\r\n\t\t</div>\r\n\t\t<div class=\"\u65E0\u6761\u4EF6\u7F16\u8F91\">\r\n\t\t\t<div>\u65E0\u53EF\u7F16\u8F91\u5185\u5BB9</div>\r\n\t\t\t<div class=\"\u9009\u62E9\u63D0\u793A\">\u70B9\u51FB\u5DE6\u4FA7\u67D0\u4E00\u6761\u4EF6\u5217\u5BF9\u5176\u8FDB\u884C\u7F16\u8F91</div>\r\n\t\t</div>\r\n\t</div>\r\n</ng-template>\r\n\r\n<div class=\"\u6761\u4EF6\u8BBE\u7F6E\" *ngIf=\"svr.currentConditionTemplate; else emptyUI\">\r\n\t<div class=\"\u6761\u4EF6\u6807\u9898 \u5B57\u4F53\u989C\u8272\">\r\n\t\t<span>\u6761\u4EF6\u8BBE\u7F6E</span>\r\n\t\t<button mat-icon-button (click)=\"remove()\">\r\n\t\t\t<mat-icon class=\"\u5220\u9664\" svgIcon=\"outlined:delete\" title=\"\u5220\u9664\"> </mat-icon>\r\n\t\t</button>\r\n\t</div>\r\n\t<div class=\"\u591A\u6761\u4EF6-\u4E8C\u7EA7\u6807\u9898\">\u6307\u6807\u540D\u79F0</div>\r\n\t<mat-form-field class=\"\u9009\u62E9\u6846\" appearance=\"outline\">\r\n\t\t<mat-select [(value)]=\"svr.currentConditionTemplate.Field\">\r\n\t\t\t<mat-option *ngFor=\"let col of svr.Params.AllColumns\" [value]=\"col.Name\">{{ col.Name }}</mat-option>\r\n\t\t</mat-select>\r\n\t</mat-form-field>\r\n\t<div class=\"\u591A\u6761\u4EF6-\u4E8C\u7EA7\u6807\u9898\">\u7C7B\u578B</div>\r\n\t<mat-form-field class=\"\u9009\u62E9\u6846\" appearance=\"outline\">\r\n\t\t<mat-select [(value)]=\"svr.currentConditionTemplate.Type\" (valueChange)=\"typeChange()\">\r\n\t\t\t<mat-option [value]=\"Input\">{{ typeName(Input) }}</mat-option>\r\n\t\t\t<mat-option [value]=\"Select\">{{ typeName(Select) }}</mat-option>\r\n\t\t\t<mat-option [value]=\"MultiSelect\">{{ typeName(MultiSelect) }} </mat-option>\r\n\t\t\t<mat-option [value]=\"RangeInput\">{{ typeName(RangeInput) }} </mat-option>\r\n\t\t\t<mat-option [value]=\"Slider\">{{ typeName(Slider) }}</mat-option>\r\n\t\t</mat-select>\r\n\t</mat-form-field>\r\n\t<div class=\"\u6837\u5F0F\u8BBE\u7F6E\" [ngSwitch]=\"true\">\r\n\t\t<common-select-setting\r\n\t\t\t*ngSwitchCase=\"\r\n\t\t\t\tsvr.currentConditionTemplate.Type == Select || svr.currentConditionTemplate.Type == MultiSelect\r\n\t\t\t\"\r\n\t\t\t[data]=\"svr.currentConditionTemplate.Setting\"\r\n\t\t>\r\n\t\t</common-select-setting>\r\n\t\t<common-range-input-setting\r\n\t\t\t*ngSwitchCase=\"svr.currentConditionTemplate.Type == RangeInput\"\r\n\t\t\t[data]=\"svr.currentConditionTemplate.Setting\"\r\n\t\t>\r\n\t\t</common-range-input-setting>\r\n\t\t<common-slider-setting\r\n\t\t\t*ngSwitchCase=\"svr.currentConditionTemplate.Type == Slider\"\r\n\t\t\t[inData]=\"svr.currentConditionTemplate.Setting\"\r\n\t\t>\r\n\t\t</common-slider-setting>\r\n\t</div>\r\n</div>\r\n",
styles: ["@charset \"UTF-8\";:host{width:100%;height:100%;padding:16px 0;box-sizing:border-box;display:flex}.\u6761\u4EF6\u8BBE\u7F6E{min-width:240px;flex-grow:2;height:100%;overflow-y:auto;padding:0 24px;box-sizing:border-box;position:relative;display:flex;flex-direction:column}.\u6761\u4EF6\u8BBE\u7F6E .\u9009\u62E9\u6846{width:100%;max-width:384px}.\u6761\u4EF6\u8BBE\u7F6E .\u9009\u62E9\u6846 ::ng-deep .mat-form-field-wrapper{margin:0;padding-bottom:10px;vertical-align:bottom;-webkit-transform:translateY(0);transform:translateY(0)}.\u6761\u4EF6\u8BBE\u7F6E .\u9009\u62E9\u6846 ::ng-deep .mat-form-field-infix{border:0;font-size:14px;padding:10px 0;box-sizing:border-box}.\u6761\u4EF6\u8BBE\u7F6E .\u9009\u62E9\u6846 ::ng-deep .mat-select-arrow-wrapper{display:block}.\u6761\u4EF6\u8BBE\u7F6E .\u9009\u62E9\u6846 ::ng-deep .mat-form-field.mat-focused .mat-form-field-label{color:#50d0fb!important}.\u6761\u4EF6\u8BBE\u7F6E .\u6837\u5F0F\u8BBE\u7F6E{margin-top:40px;width:100%;height:0;flex-grow:1}.\u6761\u4EF6\u8BBE\u7F6E .\u65E0\u6761\u4EF6\u7F16\u8F91{position:absolute;left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);text-align:center;font-size:18px;font-weight:700}.\u6761\u4EF6\u8BBE\u7F6E .\u65E0\u6761\u4EF6\u7F16\u8F91 .\u9009\u62E9\u63D0\u793A{margin-top:8;font-size:12px;font-weight:inherit}.\u5206\u5272\u7EBF{height:100%;width:1px}.\u6761\u4EF6\u5217\u8868{max-width:272px;min-width:200px;flex-grow:1;height:100%;padding:8px 16px;box-sizing:border-box;display:flex;flex-direction:column}.example-list{width:100%;flex-grow:1;display:block;overflow-y:auto;box-shadow:none!important}.example-box{padding:20px;box-shadow:none;box-sizing:border-box;cursor:pointer;font-size:14px;position:relative}.example-box:hover{z-index:99;box-shadow:0 4px 5px 0 rgba(0,0,0,.14)}.example-box:hover .\u56FE\u6807{display:block}.example-box .\u6307\u793A\u7BAD\u5934{width:24px;height:24px;position:absolute;right:8px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.example-box .\u56FE\u6807{width:16px;height:16px;display:none}.example-box .\u62D6\u52A8{position:absolute;top:50%;left:0;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.\u6761\u4EF6\u6807\u9898{width:100%;margin-bottom:16px;line-height:40px;font-weight:700;display:flex;justify-content:space-between}.\u6761\u4EF6\u6807\u9898 .\u65B0\u589E\u6761\u4EF6{cursor:pointer;font-size:14px}.\u6761\u4EF6\u6807\u9898 .\u65B0\u589E\u6761\u4EF6 .mat-icon{width:24px;height:24px;line-height:24px;margin-right:8px;vertical-align:middle}.\u591A\u6761\u4EF6-\u4E8C\u7EA7\u6807\u9898{display:block;font-size:12px;margin-bottom:8px}.example-box:last-child{border:none}"]
}] }
];
/** @nocollapse */
ConditionalTemplateComponent.ctorParameters = () => [
{ type: ElementService }
];
ConditionalTemplateComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.conditional-template',] }]
};
if (false) {
/** @type {?} */
ConditionalTemplateComponent.prototype.hostClass;
/** @type {?} */
ConditionalTemplateComponent.prototype.optionType;
/** @type {?} */
ConditionalTemplateComponent.prototype.optionIndicator;
/** @type {?} */
ConditionalTemplateComponent.prototype.Input;
/** @type {?} */
ConditionalTemplateComponent.prototype.Select;
/** @type {?} */
ConditionalTemplateComponent.prototype.Slider;
/** @type {?} */
ConditionalTemplateComponent.prototype.MultiSelect;
/** @type {?} */
ConditionalTemplateComponent.prototype.RangeInput;
/** @type {?} */
ConditionalTemplateComponent.prototype.svr;
/** @type {?} */
ConditionalTemplateComponent.prototype.elementSvr;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class SelectSettingComponent {
constructor() {
this.hostClass = true;
}
/**
* @return {?}
*/
ngOnInit() {
this.data.Options = this.data.Options || [];
if (this.data.Options.length === 0) {
this.data.Options.push((/** @type {?} */ ({ Text: '新的选项', Value: 'val' })));
}
}
/**
* @param {?} idx
* @return {?}
*/
add(idx) {
this.data.Options.splice(idx + 1, 0, (/** @type {?} */ ({ Text: '新的选项', Value: 'val' })));
}
/**
* @param {?} idx
* @return {?}
*/
remove(idx) {
this.data.Options.splice(idx, 1);
}
}
SelectSettingComponent.decorators = [
{ type: Component, args: [{
selector: 'common-select-setting',
template: "<div class=\"\u95F4\u8DDD title\">\u6837\u5F0F\u8BBE\u7F6E</div>\r\n<div class=\"\u591A\u9879\u9009\u62E9\">\r\n\t<div class=\"\u95F4\u8DDD\" *ngFor=\"let item of data.Options; let idx = index\">\r\n\t\t<div class=\"title\">\u9009\u9879{{ idx + 1 }}</div>\r\n\t\t<div class=\"\u9009\u9879\">\r\n\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t<input matInput [(ngModel)]=\"item.Value\" placeholder=\"\u8BF7\u8F93\u5165\u540D\u79F0\" />\r\n\t\t\t</mat-form-field>\r\n\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t<input matInput [(ngModel)]=\"item.Text\" placeholder=\"\u8BF7\u8F93\u5165\u503C\" />\r\n\t\t\t</mat-form-field>\r\n\t\t\t<mat-icon class=\"\u6DFB\u52A0\" (click)=\"add(idx)\" svgIcon=\"add_circle\"> </mat-icon>\r\n\t\t\t<mat-icon class=\"\u5220\u9664\" (click)=\"remove(idx)\" *ngIf=\"data.Options.length > 1\" svgIcon=\"remove_circle\">\r\n\t\t\t</mat-icon>\r\n\t\t</div>\r\n\t</div>\r\n\t<div class=\"\u5176\u4ED6\u9009\u9879\">\r\n\t\t<span class=\"\u5176\u4ED6\u9879\u6807\u9898 title\">\u5176\u4ED6\u9879\u4E3A</span>\r\n\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t<mat-select [(ngModel)]=\"data.OtherOption\">\r\n\t\t\t\t<mat-option value=\"\">(\u65E0)</mat-option>\r\n\t\t\t\t<mat-option *ngFor=\"let item of data.Options\" [value]=\"item.Value\">\r\n\t\t\t\t\t{{ item.Value }}({{ item.Text }})\r\n\t\t\t\t</mat-option>\r\n\t\t\t</mat-select>\r\n\t\t</mat-form-field>\r\n\t</div>\r\n</div>\r\n",
styles: ["@charset \"UTF-8\";:host{height:100%;display:flex;flex-direction:column;overflow-y:auto}.title{font-size:14px}.\u95F4\u8DDD{margin-bottom:16px}.\u591A\u9879\u9009\u62E9{width:100%;flex-grow:1;overflow-y:auto}.\u9009\u9879{margin-top:4px;display:flex;justify-content:flex-start;align-items:center}.\u9009\u9879 .mat-form-field{width:144px;font-size:12px;margin-right:16px}.\u9009\u9879 .mat-form-field ::ng-deep .mat-form-field-wrapper{margin:0;padding-bottom:0;vertical-align:bottom;-webkit-transform:translateY(0);transform:translateY(0)}.\u9009\u9879 .mat-form-field ::ng-deep .mat-form-field-infix{border:0;font-size:14px;padding:10px 0;box-sizing:border-box}.\u9009\u9879 .mat-icon{margin-right:8px;cursor:pointer}.\u5176\u4ED6\u9009\u9879{display:flex;justify-content:flex-start;align-items:center}.\u5176\u4ED6\u9009\u9879 .\u5176\u4ED6\u9879\u6807\u9898{margin-right:16px}.\u5176\u4ED6\u9009\u9879 .mat-form-field{width:180px;font-size:12px}.\u5176\u4ED6\u9009\u9879 ::ng-deep .mat-form-field-wrapper{margin:0;padding-bottom:0}.\u5176\u4ED6\u9009\u9879 ::ng-deep .mat-form-field-infix{border:0;padding:8px 0}.\u5176\u4ED6\u9009\u9879 ::ng-deep .mat-select-arrow-wrapper{display:block}"]
}] }
];
/** @nocollapse */
SelectSettingComponent.ctorParameters = () => [];
SelectSettingComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.select-setting',] }],
data: [{ type: Input }]
};
if (false) {
/** @type {?} */
SelectSettingComponent.prototype.hostClass;
/** @type {?} */
SelectSettingComponent.prototype.data;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class SliderSettingComponent {
constructor() {
this.hostClass = true;
this.upValue = 1;
this.downValue = 50;
this.options = SilderSetting.defaultOptions();
}
/**
* @param {?} val
* @return {?}
*/
set inData(val) {
this.data = new SilderSetting(val);
this.options = this.data.toOptions();
}
/**
* @return {?}
*/
ngOnInit() { }
}
SliderSettingComponent.decorators = [
{ type: Component, args: [{
selector: 'common-slider-setting',
template: "<div class=\"\u95F4\u8DDD title\">\u6837\u5F0F\u8BBE\u7F6E</div>\r\n<div class=\"\u6ED1\u5757\u9009\u62E9\">\r\n\t<ng5-slider [(value)]=\"downValue\" [(highValue)]=\"upValue\" [options]=\"options\"> </ng5-slider>\r\n</div>\r\n<div class=\"\u8303\u56F4\u8BBE\u7F6E\">\r\n\t<div class=\"\u8303\u56F4\u503C\">\r\n\t\t<span class=\"\u540D\u79F0\">\u8D77\u59CB\u503C</span>\r\n\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t<input matInput [(ngModel)]=\"downValue\" />\r\n\t\t</mat-form-field>\r\n\t</div>\r\n\t<div class=\"\u8303\u56F4\u503C\">\r\n\t\t<span class=\"\u540D\u79F0\">\u7ED3\u675F\u503C</span>\r\n\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t<input matInput [(ngModel)]=\"upValue\" />\r\n\t\t</mat-form-field>\r\n\t</div>\r\n</div>\r\n<!-- \u4E0A\u9650:<input /> \u4E0B\u9650:<input /> -->\r\n<div class=\"\u6ED1\u5757\u503C\">\r\n\t<div class=\"\u8F93\u5165\u6846\">\r\n\t\t<div class=\"\u540D\u79F0\">\u6700\u5C0F\u503C</div>\r\n\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t<input\r\n\t\t\t\tmatInput\r\n\t\t\t\t#min\r\n\t\t\t\t[(ngModel)]=\"data.data.Min\"\r\n\t\t\t\t(ngModelChange)=\"data.data.Min = +data.data.Min; options = data.toOptions()\"\r\n\t\t\t/>\r\n\t\t</mat-form-field>\r\n\t</div>\r\n\t<div class=\"\u8F93\u5165\u6846\">\r\n\t\t<div class=\"\u540D\u79F0\">\u6700\u5927\u503C</div>\r\n\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t<input\r\n\t\t\t\tmatInput\r\n\t\t\t\t#max\r\n\t\t\t\t[(ngModel)]=\"data.data.Max\"\r\n\t\t\t\t(ngModelChange)=\"data.data.Max = +data.data.Max; options = data.toOptions()\"\r\n\t\t\t/>\r\n\t\t</mat-form-field>\r\n\t</div>\r\n\t<div class=\"\u8F93\u5165\u6846\">\r\n\t\t<div class=\"\u540D\u79F0\">\u6B65\u957F</div>\r\n\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t<input\r\n\t\t\t\tmatInput\r\n\t\t\t\t#step\r\n\t\t\t\t[(ngModel)]=\"data.data.Step\"\r\n\t\t\t\t(ngModelChange)=\"\r\n\t\t\t\t\tdata.data.Step = data.data.Step ? +data.data.Step : data.data.Step; options = data.toOptions()\r\n\t\t\t\t\"\r\n\t\t\t/>\r\n\t\t</mat-form-field>\r\n\t</div>\r\n\t<div class=\"\u6807\u6CE8\u6A21\u677F\">\r\n\t\t<span class=\"\u540D\u79F0\">\u6807\u6CE8\u6A21\u677F</span>\r\n\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t<input\r\n\t\t\t\tmatInput\r\n\t\t\t\tmatInput\r\n\t\t\t\t[(ngModel)]=\"data.data.LabelTemplate\"\r\n\t\t\t\t(ngModelChange)=\"options = data.toOptions()\"\r\n\t\t\t/>\r\n\t\t</mat-form-field>\r\n\t\t<span class=\"\u8BF4\u660E\u6587\u5B57\">\u6B64\u5904\u7528\u4E8E\u8BF4\u660E\u6587\u5B57</span>\r\n\t</div>\r\n\t<div class=\"\u6362\u7B97\u7CFB\u6570\">\r\n\t\t<span class=\"\u540D\u79F0\">\u6362\u7B97\u7CFB\u6570</span>\r\n\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t<input\r\n\t\t\t\tmatInput\r\n\t\t\t\t#ratio\r\n\t\t\t\t[(ngModel)]=\"data.data.Ratio\"\r\n\t\t\t\t(ngModelChange)=\"data.data.Ratio = data.data.Ratio ? +data.data.Ratio : data.data.Ratio\"\r\n\t\t\t/>\r\n\t\t</mat-form-field>\r\n\t</div>\r\n</div>\r\n\r\n<div class=\"\u6ED1\u5757\u6837\u5F0F\u9009\u62E9 title\">\r\n\t<mat-checkbox class=\"\u6355\u6349\u6807\u6CE8\u70B9\" [(ngModel)]=\"data.data.EnforceStep\" (ngModelChange)=\"options = data.toOptions()\"\r\n\t\t>\u6355\u6349\u6807\u6CE8\u70B9</mat-checkbox\r\n\t>\r\n\t<mat-checkbox [(ngModel)]=\"data.data.PositiveInfinity\" (ngModelChange)=\"options = data.toOptions()\"\r\n\t\t>\u6700\u5927\u503C\u4E3A+\u221E</mat-checkbox\r\n\t>\r\n\t<mat-checkbox [(ngModel)]=\"data.data.NegativeInfinity\" (ngModelChange)=\"options = data.toOptions()\"\r\n\t\t>\u6700\u5C0F\u503C\u4E3A-\u221E</mat-checkbox\r\n\t>\r\n</div>\r\n",
styles: ["@charset \"UTF-8\";:host{width:100%}.\u6ED1\u5757\u9009\u62E9{max-width:386px;width:100%}::ng-deep .\u6ED1\u5757\u9009\u62E9 .ng5-slider .ng5-slider-bar{height:4px!important}::ng-deep .\u6ED1\u5757\u9009\u62E9 .ng5-slider .ng5-slider-selection{height:6px!important;-webkit-transform:translate(9px,-1px);transform:translate(9px,-1px)}::ng-deep .\u6ED1\u5757\u9009\u62E9 .ng5-slider .ng5-slider-pointer{width:14px;height:14px;top:-5px;border-radius:50%!important;-webkit-transform:translateX(9px);transform:translateX(9px)}::ng-deep .\u6ED1\u5757\u9009\u62E9 .ng5-slider .ng5-slider-pointer:after{width:12px;height:12px;top:1px;left:1px;border-radius:50%!important}::ng-deep .\u6ED1\u5757\u9009\u62E9 .ng5-slider .ng5-slider-pointer.ng5-slider-active:after{background-color:#fff}::ng-deep .\u6ED1\u5757\u9009\u62E9 .ng5-slider .ng5-slider-span{font-size:12px}::ng-deep .\u6ED1\u5757\u9009\u62E9 .ng5-slider .ng5-slider-model-high,::ng-deep .\u6ED1\u5757\u9009\u62E9 .ng5-slider .ng5-slider-model-value{-webkit-transform:translateX(9px);transform:translateX(9px)}.title{font-size:14px}.\u95F4\u8DDD{margin-bottom:16px}.\u8303\u56F4\u8BBE\u7F6E{margin:8px 0 0;max-width:386px;width:100%;display:flex;flex-wrap:wrap;justify-content:flex-start}.\u8303\u56F4\u8BBE\u7F6E .\u8303\u56F4\u503C{width:110px;margin:0 32px 0 0;display:flex}.\u8303\u56F4\u8BBE\u7F6E .\u8303\u56F4\u503C .\u540D\u79F0{font-size:12px;line-height:32px;margin-right:8px}.\u8303\u56F4\u8BBE\u7F6E .\u8303\u56F4\u503C .mat-form-field{max-width:64px;flex-grow:1}.\u6ED1\u5757\u503C{margin:24px 0 0;display:flex;flex-wrap:wrap}.\u6ED1\u5757\u503C .\u8F93\u5165\u6846{width:80px;margin-right:24px}.\u6ED1\u5757\u503C .\u8F93\u5165\u6846 .\u540D\u79F0{font-size:12px;margin-bottom:4px}.\u6ED1\u5757\u503C .\u6807\u6CE8\u6A21\u677F{max-width:240px;margin:10px 32px 0 0;display:flex;flex-wrap:wrap}.\u6ED1\u5757\u503C .\u6807\u6CE8\u6A21\u677F .\u540D\u79F0{font-size:12px;line-height:32px;margin-right:4px}.\u6ED1\u5757\u503C .\u6807\u6CE8\u6A21\u677F .\u8BF4\u660E\u6587\u5B57{font-size:12px;margin:8px 0 0}.\u6ED1\u5757\u503C .\u6807\u6CE8\u6A21\u677F .mat-form-field{max-width:176px;flex-grow:1}.\u6ED1\u5757\u503C .\u6362\u7B97\u7CFB\u6570{width:140px;margin:10px 0 0;display:flex}.\u6ED1\u5757\u503C .\u6362\u7B97\u7CFB\u6570 .\u540D\u79F0{font-size:12px;line-height:32px;margin-right:4px}.\u6ED1\u5757\u503C .\u6362\u7B97\u7CFB\u6570 .mat-form-field{max-width:88px;flex-grow:1}.mat-form-field{width:100%;font-size:12px}.mat-form-field ::ng-deep .mat-form-field-wrapper{margin:0;padding-bottom:0;vertical-align:bottom;-webkit-transform:translateY(0);transform:translateY(0)}.mat-form-field ::ng-deep .mat-form-field-infix{border:0;font-size:14px;padding:10px 0;box-sizing:border-box}.\u6ED1\u5757\u6837\u5F0F\u9009\u62E9{margin:16px 0 0}.\u6ED1\u5757\u6837\u5F0F\u9009\u62E9 .mat-checkbox{margin-right:32px}.\u6ED1\u5757\u6837\u5F0F\u9009\u62E9 .\u6355\u6349\u6807\u6CE8\u70B9{display:block;margin:0 0 16px}"]
}] }
];
/** @nocollapse */
SliderSettingComponent.ctorParameters = () => [];
SliderSettingComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.slider-setting',] }],
inData: [{ type: Input }]
};
if (false) {
/** @type {?} */
SliderSettingComponent.prototype.hostClass;
/** @type {?} */
SliderSettingComponent.prototype.upValue;
/** @type {?} */
SliderSettingComponent.prototype.downValue;
/** @type {?} */
SliderSettingComponent.prototype.data;
/** @type {?} */
SliderSettingComponent.prototype.options;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class RangeInputSettingComponent {
constructor() {
this.hostClass = true;
}
/**
* @return {?}
*/
ngOnInit() { }
}
RangeInputSettingComponent.decorators = [
{ type: Component, args: [{
selector: 'common-range-input-setting',
template: "<div class=\"title\">\u6837\u5F0F\u8BBE\u7F6E</div>\r\n<div class=\"\u663E\u793A\u6587\u672C\">\r\n\t<div class=\"\u6587\u672C\">\r\n\t\t<div class=\"\u6587\u672C\u6846\"></div>\r\n\t\t<div class=\"\u6587\u672C\u8BF4\u660E\">\u8BF4\u660E\u6587\u672C1</div>\r\n\t</div>\r\n\t<div class=\"\u8FC7\u5EA6\u7EBF\"></div>\r\n\t<div class=\"\u6587\u672C\">\r\n\t\t<div class=\"\u6587\u672C\u6846\"></div>\r\n\t\t<div class=\"\u6587\u672C\u8BF4\u660E\">\u8BF4\u660E\u6587\u672C2</div>\r\n\t</div>\r\n</div>\r\n<div class=\"\u6587\u672C\u8F93\u5165\">\r\n\t<div class=\"\u6587\u672C\u8F93\u5165\u8BF4\u660E title\">\u8BF4\u660E\u6587\u672C1</div>\r\n\t<mat-form-field appearance=\"outline\">\r\n\t\t<input matInput [(ngModel)]=\"data.LowLabel\" placeholder=\"\u53EF\u4E0D\u5199\" />\r\n\t</mat-form-field>\r\n\t<div class=\"\u6587\u672C\u8F93\u5165\u8BF4\u660E title\">\u6587\u672C\u8BF4\u660E2</div>\r\n\t<mat-form-field appearance=\"outline\">\r\n\t\t<input matInput [(ngModel)]=\"data.HighLabel\" placeholder=\"\u53EF\u4E0D\u5199\" />\r\n\t</mat-form-field>\r\n</div>\r\n",
styles: ["@charset \"UTF-8\";.title{font-size:14px}.\u663E\u793A\u6587\u672C{width:100%;margin:16px 0;display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:flex-start}.\u663E\u793A\u6587\u672C .\u6587\u672C{width:128px}.\u663E\u793A\u6587\u672C .\u6587\u672C .\u6587\u672C\u6846{width:128px;height:32px;margin-bottom:8px}.\u663E\u793A\u6587\u672C .\u6587\u672C .\u6587\u672C\u8BF4\u660E{font-size:12px}.\u663E\u793A\u6587\u672C .\u8FC7\u5EA6\u7EBF{width:14px;height:1px;margin:16px 14px 0}.\u6587\u672C\u8F93\u5165 .\u6587\u672C\u8F93\u5165\u8BF4\u660E{margin-bottom:4px}.mat-form-field{max-width:384px;width:100%;font-size:12px}.mat-form-field ::ng-deep .mat-form-field-wrapper{margin:0;padding-bottom:10px;vertical-align:bottom;-webkit-transform:translateY(0);transform:translateY(0)}.mat-form-field ::ng-deep .mat-form-field-infix{border:0;font-size:14px;padding:10px 0;box-sizing:border-box}"]
}] }
];
/** @nocollapse */
RangeInputSettingComponent.ctorParameters = () => [];
RangeInputSettingComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.range-input-setting',] }],
data: [{ type: Input }]
};
if (false) {
/** @type {?} */
RangeInputSettingComponent.prototype.hostClass;
/** @type {?} */
RangeInputSettingComponent.prototype.data;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class SetPropertyBillComponent {
/**
* @param {?} elementSvr
* @param {?} theme
*/
constructor(elementSvr, theme) {
this.elementSvr = elementSvr;
this.theme = theme;
this.hostClass = true;
this.edtOption = { maxLines: 12, printMargin: false };
this.svr = (/** @type {?} */ (this.elementSvr.data.bill));
this.isReadonly = this.svr.parent.bill.isDelete() || this.svr.parent.bill.isBrowse();
this.SkipFill = FillAt.SkipFill;
this.FillAtOpen = FillAt.FillAtOpen;
this.FillAtSave = FillAt.FillAtSave;
this.options = [
{
Name: '用户名',
Value: '{{.User.Name}}'
},
{
Name: '部门代码',
Value: '{{.User.Dept.Code}}'
},
{
Name: '部门名称',
Value: '{{.User.Dept.Name}}'
},
{
Name: '当前时间',
Value: '{{datetime}}'
},
{
Name: '当前日期',
Value: '{{date}}'
},
{
Name: '唯一编号',
Value: '{{guid64}}'
}
];
this.primaryKeyFillOptions = [
...this.options,
{
Name: '原值',
Value: '{{.SRC}}'
}
];
}
/**
* @return {?}
*/
ngOnInit() {
ace.config.set('basePath', '/front/assets/ace-builds/src-min-noconflict');
}
// 可操作/只读/不可见
/**
* @param {?} e
* @return {?}
*/
selectShow(e) {
this.svr.Param.FieldSettings.forEach((/**
* @param {?} v
* @return {?}
*/
v => {
v.Visibility = e;
}));
}
// 不填充/打开时/保存时
/**
* @param {?} e
* @return {?}
*/
selectSave(e) {
this.svr.Param.FieldSettings.forEach((/**
* @param {?} v
* @return {?}
*/
v => {
v.FillAt = e;
}));
}
// 可操作/只读/不可见
/**
* @param {?} e
* @return {?}
*/
selectCloneShow(e) {
this.svr.Param.ClonePrimaryKeySettings.forEach((/**
* @param {?} v
* @return {?}
*/
v => {
v.Visibility = e;
}));
}
}
SetPropertyBillComponent.decorators = [
{ type: Component, args: [{
selector: 'common-set-property-bill',
template: "<div class=\"main\">\r\n\t<!-- 1. \u8BBE\u7F6E\u6807\u9898 \u2193\u2193\u2193 -->\r\n\t<header class=\"set-title\">\u8BBE\u7F6E</header>\r\n\t<!-- 1. \u8BBE\u7F6E \u7ED3\u675F \u2191\u2191\u2191 -->\r\n\t<!-- 2. \u64CD\u4F5C\u7C7B\u578B \u2193\u2193\u2193 -->\r\n\t<div class=\"types-title\">\u64CD\u4F5C\u7C7B\u578B</div>\r\n\t<section class=\"set-types\">\r\n\t\t<div class=\"types-left\">\r\n\t\t\t<mat-radio-group [(ngModel)]=\"svr.Param.Operate\" [disabled]=\"isReadonly\">\r\n\t\t\t\t<mat-radio-button value=\"add\">\u65B0\u589E</mat-radio-button>\r\n\t\t\t\t<mat-radio-button value=\"edit\">\u4FEE\u6539</mat-radio-button>\r\n\t\t\t\t<mat-radio-button value=\"delete\">\u5220\u9664</mat-radio-button>\r\n\t\t\t\t<mat-radio-button value=\"browse\">\u67E5\u770B</mat-radio-button>\r\n\t\t\t</mat-radio-group>\r\n\t\t</div>\r\n\t\t<div class=\"types-right\">\r\n\t\t\t<mat-checkbox [(ngModel)]=\"svr.Param.AllowClone\" [disabled]=\"isReadonly\" (change)=\"svr.fixCloneSettings()\">\r\n\t\t\t\t\u5141\u8BB8\u514B\u9686\r\n\t\t\t</mat-checkbox>\r\n\t\t</div>\r\n\t</section>\r\n\t<!-- 2. \u64CD\u4F5C\u7C7B\u578B \u7ED3\u675F \u2191\u2191\u2191 -->\r\n\t<!-- 3. \u514B\u9686\u4E3B\u952E\u8BBE\u7F6E \u2193\u2193\u2193 -->\r\n\t<section class=\"set-content\" *ngIf=\"svr.Param.AllowClone\">\r\n\t\t<div class=\"content-title\">\u514B\u9686\u4E3B\u952E\u8BBE\u7F6E</div>\r\n\t\t<div class=\"table-wrapper\">\r\n\t\t\t<table class=\"set-table\" mat-table [dataSource]=\"svr.Param.ClonePrimaryKeySettings\">\r\n\r\n\t\t\t\t<ng-container matColumnDef=\"no\">\r\n\t\t\t\t\t<th mat-header-cell *matHeaderCellDef> \u5E8F\u53F7 </th>\r\n\t\t\t\t\t<td mat-cell *matCellDef=\"let element,index as i\"> {{i}}\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</ng-container>\r\n\r\n\t\t\t\t<ng-container matColumnDef=\"name\">\r\n\t\t\t\t\t<th mat-header-cell *matHeaderCellDef> \u540D\u79F0 </th>\r\n\t\t\t\t\t<td mat-cell *matCellDef=\"let element\"> {{element.Name}}\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</ng-container>\r\n\r\n\t\t\t\t<ng-container matColumnDef=\"visibility\">\r\n\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\r\n\t\t\t\t\t\t<mat-form-field class=\"th-common-click\">\r\n\t\t\t\t\t\t\t\u6743\u9650\r\n\t\t\t\t\t\t\t<mat-select class=\"select-position\" [disabled]=\"isReadonly\"\r\n\t\t\t\t\t\t\t\t(selectionChange)=\"selectCloneShow($event.value)\">\r\n\t\t\t\t\t\t\t\t<mat-option value=\"\">\u53EF\u64CD\u4F5C</mat-option>\r\n\t\t\t\t\t\t\t\t<mat-option value=\"readonly\">\u53EA\u8BFB</mat-option>\r\n\t\t\t\t\t\t\t\t<mat-option value=\"hidden\">\u4E0D\u53EF\u89C1</mat-option>\r\n\t\t\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t\t<!-- </div> -->\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<td mat-cell *matCellDef=\"let element\">\r\n\t\t\t\t\t\t<div class=\"filed-adjust\">\r\n\t\t\t\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t\t\t\t<mat-select [(ngModel)]=\"element.Visibility\" [disabled]=\"isReadonly\">\r\n\t\t\t\t\t\t\t\t\t<mat-option value=\"\">\u53EF\u64CD\u4F5C</mat-option>\r\n\t\t\t\t\t\t\t\t\t<mat-option value=\"readonly\">\u53EA\u8BFB</mat-option>\r\n\t\t\t\t\t\t\t\t\t<mat-option value=\"hidden\">\u4E0D\u53EF\u89C1</mat-option>\r\n\t\t\t\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</ng-container>\r\n\r\n\t\t\t\t<ng-container matColumnDef=\"fill\">\r\n\t\t\t\t\t<th mat-header-cell *matHeaderCellDef> \u586B\u5145\u503C </th>\r\n\t\t\t\t\t<td mat-cell *matCellDef=\"let element\">\r\n\r\n\t\t\t\t\t\t<div class=\"filed-adjust\">\r\n\t\t\t\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t\t\t\t<div class=\"fill-input\">\r\n\t\t\t\t\t\t\t\t\t<input type=\"text\" matInput [disabled]=\"isReadonly\" [(ngModel)]=\"element.Fill\"\r\n\t\t\t\t\t\t\t\t\t\t[matAutocomplete]=\"auto\" placeholder=\"\u70B9\u51FB\u8F93\u5165\">\r\n\t\t\t\t\t\t\t\t\t<span class=\"fill-input-text\">\u5E38\u7528</span>\r\n\t\t\t\t\t\t\t\t\t<mat-icon class=\"arrow\" svgIcon=\"arrow_drop_down\">\r\n\t\t\t\t\t\t\t\t\t</mat-icon>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<mat-autocomplete #auto=\"matAutocomplete\">\r\n\t\t\t\t\t\t\t<mat-option *ngFor=\"let option of primaryKeyFillOptions\" [value]=\"option.Value\">\r\n\t\t\t\t\t\t\t\t{{option.Name}}</mat-option>\r\n\t\t\t\t\t\t</mat-autocomplete>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</ng-container>\r\n\r\n\t\t\t\t<tr mat-header-row *matHeaderRowDef=\"['no','name','visibility','fill']\"></tr>\r\n\t\t\t\t<tr mat-row *matRowDef=\"let row;columns:['no','name','visibility','fill']\">\r\n\t\t\t\t</tr>\r\n\t\t\t</table>\r\n\r\n\t\t</div>\r\n\t</section>\r\n\t<!-- 3. \u5185\u5BB9\u8BBE\u7F6E \u7ED3\u675F \u2191\u2191\u2191 -->\r\n\t<!-- 4. \u5185\u5BB9\u8BBE\u7F6E \u2193\u2193\u2193 -->\r\n\t<section class=\"set-content\">\r\n\t\t<div class=\"content-title\">\u5185\u5BB9\u8BBE\u7F6E</div>\r\n\t\t<div class=\"table-wrapper\">\r\n\t\t\t<table class=\"set-table\" mat-table [dataSource]=\"svr.Param.FieldSettings\">\r\n\r\n\t\t\t\t<ng-container matColumnDef=\"no\">\r\n\t\t\t\t\t<th mat-header-cell *matHeaderCellDef> \u5E8F\u53F7 </th>\r\n\t\t\t\t\t<td mat-cell *matCellDef=\"let element,index as i\"> {{i}}\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</ng-container>\r\n\r\n\t\t\t\t<ng-container matColumnDef=\"name\">\r\n\t\t\t\t\t<th mat-header-cell *matHeaderCellDef> \u540D\u79F0 </th>\r\n\t\t\t\t\t<td mat-cell *matCellDef=\"let element\"> {{element.Name}}\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</ng-container>\r\n\r\n\t\t\t\t<ng-container matColumnDef=\"visibility\">\r\n\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\r\n\t\t\t\t\t\t<mat-form-field class=\"th-common-click\">\r\n\t\t\t\t\t\t\t\u6743\u9650\r\n\t\t\t\t\t\t\t<mat-select class=\"select-position\" [disabled]=\"isReadonly\"\r\n\t\t\t\t\t\t\t\t(selectionChange)=\"selectShow($event.value)\">\r\n\t\t\t\t\t\t\t\t<mat-option value=\"\">\u53EF\u64CD\u4F5C</mat-option>\r\n\t\t\t\t\t\t\t\t<mat-option value=\"readonly\">\u53EA\u8BFB</mat-option>\r\n\t\t\t\t\t\t\t\t<mat-option value=\"hidden\">\u4E0D\u53EF\u89C1</mat-option>\r\n\t\t\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t\t<!-- </div> -->\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<td mat-cell *matCellDef=\"let element\">\r\n\t\t\t\t\t\t<div class=\"filed-adjust\">\r\n\t\t\t\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t\t\t\t<mat-select [(ngModel)]=\"element.Visibility\" [disabled]=\"isReadonly\">\r\n\t\t\t\t\t\t\t\t\t<mat-option value=\"\">\u53EF\u64CD\u4F5C</mat-option>\r\n\t\t\t\t\t\t\t\t\t<mat-option value=\"readonly\">\u53EA\u8BFB</mat-option>\r\n\t\t\t\t\t\t\t\t\t<mat-option value=\"hidden\">\u4E0D\u53EF\u89C1</mat-option>\r\n\t\t\t\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</ng-container>\r\n\t\t\t\t<ng-container matColumnDef=\"fillat\">\r\n\t\t\t\t\t<th class=\"th-common-click\" mat-header-cell *matHeaderCellDef>\r\n\t\t\t\t\t\t<mat-form-field class=\"th-click\">\r\n\t\t\t\t\t\t\t\u586B\u5145\u65F6\u673A\r\n\t\t\t\t\t\t\t<mat-select class=\"select2-position\" [disabled]=\"isReadonly\"\r\n\t\t\t\t\t\t\t\t(selectionChange)=\"selectSave($event.value)\">\r\n\t\t\t\t\t\t\t\t<mat-option [value]=\"SkipFill\">\u4E0D\u586B\u5145</mat-option>\r\n\t\t\t\t\t\t\t\t<mat-option [value]=\"FillAtOpen\">\u6253\u5F00\u65F6\r\n\t\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t\t\t<mat-option [value]=\"FillAtSave\">\u4FDD\u5B58\u65F6\r\n\t\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<td mat-cell *matCellDef=\"let element\">\r\n\t\t\t\t\t\t<div class=\"filed-adjust\">\r\n\t\t\t\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t\t\t\t<mat-select [(ngModel)]=\"element.FillAt\" [disabled]=\"isReadonly\">\r\n\t\t\t\t\t\t\t\t\t<mat-option [value]=\"SkipFill\">\u4E0D\u586B\u5145\r\n\t\t\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t\t\t\t<mat-option [value]=\"FillAtOpen\">\u6253\u5F00\u65F6\r\n\t\t\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t\t\t\t<mat-option [value]=\"FillAtSave\">\u4FDD\u5B58\u65F6\r\n\t\t\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</ng-container>\r\n\r\n\t\t\t\t<ng-container matColumnDef=\"fill\">\r\n\t\t\t\t\t<th mat-header-cell *matHeaderCellDef> \u586B\u5145\u503C </th>\r\n\t\t\t\t\t<td mat-cell *matCellDef=\"let element\">\r\n\r\n\t\t\t\t\t\t<div class=\"filed-adjust\">\r\n\t\t\t\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t\t\t\t<div class=\"fill-input\">\r\n\t\t\t\t\t\t\t\t\t<input type=\"text\" matInput [disabled]=\"isReadonly\" [(ngModel)]=\"element.Fill\"\r\n\t\t\t\t\t\t\t\t\t\t[matAutocomplete]=\"auto\" placeholder=\"\u70B9\u51FB\u8F93\u5165\">\r\n\t\t\t\t\t\t\t\t\t<span class=\"fill-input-text\">\u5E38\u7528</span>\r\n\t\t\t\t\t\t\t\t\t<mat-icon class=\"arrow\" svgIcon=\"arrow_drop_down\">\r\n\t\t\t\t\t\t\t\t\t</mat-icon>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<mat-autocomplete #auto=\"matAutocomplete\">\r\n\t\t\t\t\t\t\t<mat-option *ngFor=\"let option of options\" [value]=\"option.Value\">\r\n\t\t\t\t\t\t\t\t{{option.Name}}</mat-option>\r\n\t\t\t\t\t\t</mat-autocomplete>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</ng-container>\r\n\r\n\t\t\t\t<tr mat-header-row *matHeaderRowDef=\"['no','name','visibility','fillat','fill']\">\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr mat-row *matRowDef=\"let row;columns:['no','name','visibility','fillat','fill']\">\r\n\t\t\t\t</tr>\r\n\t\t\t</table>\r\n\r\n\t\t</div>\r\n\t</section>\r\n\t<!-- 4. \u5185\u5BB9\u8BBE\u7F6E \u7ED3\u675F \u2191\u2191\u2191 -->\r\n\t<!-- 5. \u9644\u52A0\u53C2\u6570 \u2193\u2193\u2193 -->\r\n\t<section class=\"set-arguments\">\r\n\t\t<div class=\"arg-title\">\u9644\u52A0\u4FE1\u606F</div>\r\n\t\t<div class=\"arg-area\" ace-editor [readOnly]=\"isReadonly\" [(text)]=\"svr.Param.Tag\" mode=\"sql\"\r\n\t\t\t[theme]=\"(theme.theme|async).model==='dark'?'tomorrow_night': 'eclipse'\" [options]=\"edtOption\"\r\n\t\t\t[autoUpdateContent]=\"true\" [durationBeforeCallback]=\"1000\"\r\n\t\t\tstyle=\"min-height: 124px; width:100%; overflow: auto;\">\r\n\r\n\t\t</div>\r\n\t</section>\r\n\t<!-- 5. \u9644\u52A0\u53C2\u6570 \u7ED3\u675F \u2191\u2191\u2191 -->\r\n\r\n</div>",
styles: ["@charset \"UTF-8\";.main{width:808px;height:100%;padding:16px 48px;box-sizing:border-box;overflow:auto}.arg-title,.content-title,.set-title,.type-title,.types-title{margin-bottom:16px}.set-arguments,.set-content,.set-types{width:100%}.set-title{font-size:18px}.arg-title,.content-title,.types-title{font-size:12px}.set-table,.set-types{font-size:14px}.set-content,.set-types{margin-bottom:24px}.set-types{display:flex;justify-content:space-between;box-sizing:border-box}.set-table,.table-wrapper{width:100%}.set-table .th-click,.set-table .th-common-click{display:flex;justify-content:space-between;align-items:center;width:100%}.set-table .th-click ::ng-deep .mat-select-value,.set-table .th-common-click ::ng-deep .mat-select-value{width:0!important}.set-table .th-click ::ng-deep .mat-select-arrow-wrapper,.set-table .th-common-click ::ng-deep .mat-select-arrow-wrapper{padding-left:60px;padding-bottom:0}.set-table .th-click ::ng-deep .mat-form-field-wrapper,.set-table .th-common-click ::ng-deep .mat-form-field-wrapper{padding-bottom:0}.set-table .th-click .select-position,.set-table .th-common-click .select-position{margin-left:-30px}.set-table .th-click .th-click ::ng-deep .mat-select-arrow-wrapper,.set-table .th-common-click .th-click ::ng-deep .mat-select-arrow-wrapper{padding-left:68px;padding-bottom:0}.set-table .th-click .select2-position,.set-table .th-common-click .select2-position{margin-left:-54px}.set-table ::ng-deep .mat-form-field-infix{padding:0;margin-top:-10px}.set-table ::ng-deep .mat-form-field-appearance-legacy .mat-form-field-infix{padding:0}.set-table .filed-adjust ::ng-deep .mat-input-placeholder-wrapper{top:-10px}.set-table .filed-adjust .mat-form-field{width:100%}.set-table .filed-adjust .mat-form-field ::ng-deep .mat-form-field-wrapper{margin:0;padding-bottom:0;vertical-align:bottom}.set-table .filed-adjust .mat-form-field ::ng-deep .mat-form-field-infix{border:0;padding-bottom:0;box-sizing:border-box}.set-table .filed-adjust .mat-form-field ::ng-deep .mat-form-field-appearance-legacy .mat-form-field-infix{padding:none}.adjust-position{display:flex;justify-content:space-between}.fill-input{display:flex;justify-content:space-between;align-items:center;box-sizing:border-box}.fill-input .arrow{width:24px;height:24px}.arg-area{width:100%;height:192px;border-radius:4px}"]
}] }
];
/** @nocollapse */
SetPropertyBillComponent.ctorParameters = () => [
{ type: ElementService },
{ type: ThemeService }
];
SetPropertyBillComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.set-property-bill',] }]
};
if (false) {
/** @type {?} */
SetPropertyBillComponent.prototype.hostClass;
/** @type {?} */
SetPropertyBillComponent.prototype.edtOption;
/** @type {?} */
SetPropertyBillComponent.prototype.svr;
/** @type {?} */
SetPropertyBillComponent.prototype.isReadonly;
/** @type {?} */
SetPropertyBillComponent.prototype.SkipFill;
/** @type {?} */
SetPropertyBillComponent.prototype.FillAtOpen;
/** @type {?} */
SetPropertyBillComponent.prototype.FillAtSave;
/** @type {?} */
SetPropertyBillComponent.prototype.options;
/** @type {?} */
SetPropertyBillComponent.prototype.primaryKeyFillOptions;
/** @type {?} */
SetPropertyBillComponent.prototype.elementSvr;
/** @type {?} */
SetPropertyBillComponent.prototype.theme;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class SetParamsComponent {
/**
* @param {?} dialogRef
* @param {?=} set
*/
constructor(dialogRef, set) {
this.dialogRef = dialogRef;
this.set = set;
this.options = { maxLines: 12, printMargin: false };
}
/**
* @return {?}
*/
ngOnInit() { }
}
SetParamsComponent.decorators = [
{ type: Component, args: [{
selector: 'common-set-params',
template: "<div>\r\n\t<span>\u81EA\u5B9A\u4E49set</span>\r\n\t<div>\r\n\t\t<span>\u9644\u52A0\u7684set\u5B50\u53E5</span>\r\n\t\t<div\r\n\t\t\tace-editor\r\n\t\t\t[(text)]=\"set.AdditionSet\"\r\n\t\t\tmode=\"sql\"\r\n\t\t\t[theme]=\"'eclipse'\"\r\n\t\t\t[options]=\"options\" \r\n\t\t\t[autoUpdateContent]=\"true\"\r\n\t\t\t[durationBeforeCallback]=\"1000\"\r\n\t\t\tstyle=\"min-height: 124px; width:100%; overflow: auto;\"\r\n\t\t></div>\r\n\t</div>\r\n\t<div>\r\n\t\t<span>\u9644\u52A0\u6267\u884C\u7684SQL(\u7528DataSQL\u5F15\u7528\u4F20\u5165\u7684\u6570\u636E\u8303\u56F4SQL)</span>\r\n\t\t<div\r\n\t\t\tace-editor\r\n\t\t\t[(text)]=\"set.BeforeSQL\"\r\n\t\t\tmode=\"sql\"\r\n\t\t\t[theme]=\"'eclipse'\"\r\n\t\t\t[options]=\"options\" \r\n\t\t\t[autoUpdateContent]=\"true\"\r\n\t\t\t[durationBeforeCallback]=\"1000\"\r\n\t\t\tstyle=\"min-height: 124px; width:100%; overflow: auto;\"\r\n\t\t></div>\r\n\t</div>\r\n\t<div>\r\n\t\t<span>\u6570\u636E\u8303\u56F4</span>\r\n\t\t<div\r\n\t\t\tace-editor\r\n\t\t\t[(text)]=\"set.AdditionWhere\"\r\n\t\t\tmode=\"sql\"\r\n\t\t\t[theme]=\"'eclipse'\"\r\n\t\t\t[options]=\"options\" \r\n\t\t\t[autoUpdateContent]=\"true\"\r\n\t\t\t[durationBeforeCallback]=\"1000\"\r\n\t\t\tstyle=\"min-height: 124px; width:100%; overflow: auto;\"\r\n\t\t></div>\r\n\t</div>\r\n\t<div>\r\n\t\t<button mat-button [mat-dialog-close]=\"set\">\u5B8C\u6210</button>\r\n\t</div>\r\n</div>",
styles: [""]
}] }
];
/** @nocollapse */
SetParamsComponent.ctorParameters = () => [
{ type: MatDialogRef },
{ type: undefined, decorators: [{ type: Inject, args: [MAT_DIALOG_DATA,] }] }
];
if (false) {
/** @type {?} */
SetParamsComponent.prototype.options;
/** @type {?} */
SetParamsComponent.prototype.dialogRef;
/** @type {?} */
SetParamsComponent.prototype.set;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class ListParamsComponent {
/**
* @param {?} dialogRef
* @param {?=} lists
*/
constructor(dialogRef, lists) {
this.dialogRef = dialogRef;
this.lists = lists;
this.hostClass = true;
this.type = 'list';
this.listTxt = '';
if (!lists) {
return;
}
this.lists.forEach((/**
* @param {?} list
* @param {?} index
* @return {?}
*/
(list, index) => {
if (this.lists.length === index + 1) {
this.listTxt += list.Value + '=' + list.Label;
}
else {
this.listTxt += list.Value + '=' + list.Label + ',';
}
}));
}
/**
* @return {?}
*/
ngOnInit() {
this.列表设置.nativeElement.parentElement.parentElement.style = 'padding:16px 16px 16px 24px;';
}
}
ListParamsComponent.decorators = [
{ type: Component, args: [{
selector: 'common-list-params',
template: "<div #\u5217\u8868\u8BBE\u7F6E class=\"\u5217\u8868\u8BBE\u7F6E\">\r\n\t<div class=\"\u5217\u8868\u8BBE\u7F6E-\u9009\u62E9\u6837\u5F0F\">\r\n\t\t<span>\u8BBE\u7F6E</span>\r\n\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t<mat-select [(ngModel)]=\"type\">\r\n\t\t\t\t<mat-option [value]=\"'list'\">\u5217\u8868\u6837\u5F0F</mat-option>\r\n\t\t\t\t<mat-option [value]=\"'input'\">\u8F93\u5165\u6846\u5F0F</mat-option>\r\n\t\t\t</mat-select>\r\n\t\t</mat-form-field>\r\n\t</div>\r\n\t<ng-container [ngSwitch]=\"type\">\r\n\t\t<div class=\"\u5217\u8868\u8BBE\u7F6E-\u5217\u8868\u6837\u5F0F\" *ngSwitchCase=\"'list'\">\r\n\t\t\t<div class=\"\u5217\u8868\u8BBE\u7F6E-\u5355\u4E2A\u6837\u5F0F\" *ngFor=\"let list of lists\">\r\n\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t<input matInput placeholder=\"\u8BF7\u8F93\u5165\u540D\u79F0\" [(ngModel)]=\"list.Label\" />\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t\t<span>=</span>\r\n\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t<input matInput placeholder=\"\u8BF7\u8F93\u5165\u8868\u8FBE\u5F0F\" [(ngModel)]=\"list.Value\" />\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"\u5217\u8868\u8BBE\u7F6E-\u5355\u4E2A\u6837\u5F0F\">\r\n\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t<input matInput placeholder=\"\u8BF7\u8F93\u5165\u540D\u79F0\" value=\"\" />\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t\t<span>=</span>\r\n\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t<input matInput placeholder=\"\u8BF7\u8F93\u5165\u8868\u8FBE\u5F0F\" value=\"\" />\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<div class=\"\u5217\u8868\u8BBE\u7F6E-\u5217\u8868\u6837\u5F0F\" *ngSwitchCase=\"'input'\">\r\n\t\t\t<span>\u8BF4\u660E:\u7528\u9017\u53F7\u5206\u9694\u5404\u9879,\u7B49\u53F7\u5206\u9694\u503C\u548C\u6807\u7B7E,\u8868\u8FBE\u5F0F\u7528``\u5305\u62EC</span>\r\n\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t<textarea matInput [(ngModel)]=\"listTxt\"></textarea>\r\n\t\t\t</mat-form-field>\r\n\t\t</div>\r\n\t</ng-container>\r\n\t<div>\r\n\t\t<button mat-button [mat-dialog-close]=\"lists\">\u5B8C\u6210</button>\r\n\t</div>\r\n</div>\r\n",
styles: ["@charset \"UTF-8\";.\u5217\u8868\u8BBE\u7F6E{width:100%;height:100%;display:flex;flex-direction:column;justify-content:space-between}.\u5217\u8868\u8BBE\u7F6E .\u5217\u8868\u8BBE\u7F6E-\u9009\u62E9\u6837\u5F0F{display:flex;justify-content:space-between;margin-bottom:24px}.\u5217\u8868\u8BBE\u7F6E .\u5217\u8868\u8BBE\u7F6E-\u9009\u62E9\u6837\u5F0F .mat-form-field{width:160px}.\u5217\u8868\u8BBE\u7F6E .\u5217\u8868\u8BBE\u7F6E-\u9009\u62E9\u6837\u5F0F .mat-form-field ::ng-deep .mat-form-field-infix{border:0;padding:8px 0!important}.\u5217\u8868\u8BBE\u7F6E .\u5217\u8868\u8BBE\u7F6E-\u9009\u62E9\u6837\u5F0F span{font-size:18px;font-weight:700}.\u5217\u8868\u8BBE\u7F6E .\u5217\u8868\u8BBE\u7F6E-\u5217\u8868\u6837\u5F0F{flex-grow:1}.\u5217\u8868\u8BBE\u7F6E .\u5217\u8868\u8BBE\u7F6E-\u5217\u8868\u6837\u5F0F .\u5217\u8868\u8BBE\u7F6E-\u5355\u4E2A\u6837\u5F0F{display:flex;justify-content:space-around;margin:0 0 8px}.\u5217\u8868\u8BBE\u7F6E .\u5217\u8868\u8BBE\u7F6E-\u5217\u8868\u6837\u5F0F .\u5217\u8868\u8BBE\u7F6E-\u5355\u4E2A\u6837\u5F0F .mat-form-field{width:120px}.\u5217\u8868\u8BBE\u7F6E .mat-form-field{font-size:14px}.\u5217\u8868\u8BBE\u7F6E .mat-form-field ::ng-deep .mat-form-field-wrapper{margin:0;padding-bottom:0}.\u5217\u8868\u8BBE\u7F6E .mat-form-field ::ng-deep .mat-form-field-infix{border:0;padding:10px 0}.\u5217\u8868\u8BBE\u7F6E .mat-form-field ::ng-deep .mat-select-arrow-wrapper{-webkit-transform:translateY(0);transform:translateY(0)}"]
}] }
];
/** @nocollapse */
ListParamsComponent.ctorParameters = () => [
{ type: MatDialogRef },
{ type: Array, decorators: [{ type: Inject, args: [MAT_DIALOG_DATA,] }] }
];
ListParamsComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.list-params',] }],
列表设置: [{ type: ViewChild, args: ['列表设置', { static: true },] }]
};
if (false) {
/** @type {?} */
ListParamsComponent.prototype.hostClass;
/** @type {?} */
ListParamsComponent.prototype.列表设置;
/** @type {?} */
ListParamsComponent.prototype.type;
/** @type {?} */
ListParamsComponent.prototype.listTxt;
/** @type {?} */
ListParamsComponent.prototype.dialogRef;
/** @type {?} */
ListParamsComponent.prototype.lists;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @record
*/
function List() { }
if (false) {
/** @type {?} */
List.prototype.Value;
/** @type {?} */
List.prototype.Label;
}
/**
* @record
*/
function Sets() { }
if (false) {
/** @type {?|undefined} */
Sets.prototype.AdditionSet;
/** @type {?|undefined} */
Sets.prototype.AdditionWhere;
/** @type {?|undefined} */
Sets.prototype.BeforeSQL;
}
class SetPropertyUpdateComponent {
/**
* @param {?} elementSvr
* @param {?} dialog
*/
constructor(elementSvr, dialog) {
this.elementSvr = elementSvr;
this.dialog = dialog;
this.hostClass = true;
this.svr = (/** @type {?} */ (this.elementSvr.data.update));
}
/**
* @param {?} event
* @return {?}
*/
selectChecked(event) {
this.svr.Params.Fields.forEach((/**
* @param {?} v
* @return {?}
*/
v => (v.selected = event.checked)));
}
/**
* @return {?}
*/
openSetDialog() {
/** @type {?} */
const setValue = {
AdditionSet: this.svr.Params.AdditionSet,
AdditionWhere: this.svr.Params.AdditionWhere,
BeforeSQL: this.svr.Params.BeforeSQL
};
/** @type {?} */
const setRef = this.dialog.open(SetParamsComponent, {
width: '380px',
height: '100%',
data: setValue
});
setRef.afterClosed().subscribe((/**
* @param {?} result
* @return {?}
*/
result => {
// console.log('The setDialog was closed');
this.svr.Params.AdditionSet = setValue.AdditionSet;
this.svr.Params.AdditionWhere = setValue.AdditionWhere;
this.svr.Params.BeforeSQL = setValue.BeforeSQL;
}));
}
/**
* @param {?} selected
* @param {?=} list
* @return {?}
*/
openListDialog(selected, list) {
if (selected) {
/** @type {?} */
const listRef = this.dialog.open(ListParamsComponent, {
width: '384px',
height: 'calc(100% - 0px)',
data: list,
position: {
right: '0',
bottom: '0'
}
});
listRef.afterClosed().subscribe((/**
* @param {?} result
* @return {?}
*/
result => {
console.log('The listDialog was closed');
}));
}
}
/**
* @return {?}
*/
ngOnInit() {
this.svr.init();
}
}
SetPropertyUpdateComponent.decorators = [
{ type: Component, args: [{
selector: 'common-set-property-update',
template: "<div>\r\n\t<div>\r\n\t\t<div class=\"\u8BBE\u7F6E-\u5934\u90E8\">\r\n\t\t\t<div class=\"\u5934\u90E8-\u8F93\u5165\u6846\">\r\n\t\t\t\t<span>\u6570\u636E\u5E93</span>\r\n\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t<mat-select [(ngModel)]=\"svr.Params.DB\" (valueChange)=\"svr.refreshTables()\">\r\n\t\t\t\t\t\t<mat-option [value]=\"''\"> (\u5F53\u524D\u6570\u636E\u5E93) </mat-option>\r\n\t\t\t\t\t\t<mat-option *ngFor=\"let db of svr.DBList\" [value]=\"db\">\r\n\t\t\t\t\t\t\t{{ db }}\r\n\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t</mat-select>\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"\u5934\u90E8-\u8F93\u5165\u6846\">\r\n\t\t\t\t<span>\u8868</span>\r\n\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t<input type=\"text\" matInput [(ngModel)]=\"svr.Params.TableName\" [matAutocomplete]=\"auto\" />\r\n\t\t\t\t\t<mat-autocomplete #auto=\"matAutocomplete\">\r\n\t\t\t\t\t\t<mat-option *ngFor=\"let tab of svr.Tables\" [value]=\"tab | uppercase\">\r\n\t\t\t\t\t\t\t{{ tab | uppercase }}\r\n\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t</mat-autocomplete>\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"\u81EA\u5B9A\u4E49set\">\r\n\t\t\t\t<span (click)=\"openSetDialog()\">\u81EA\u5B9A\u4E49set</span>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<div class=\"\u8868\u683C\">\r\n\t\t\t<table mat-table [dataSource]=\"svr.Params.Fields\">\r\n\t\t\t\t<!-- \u9009\u62E9\u6846 \u663E\u793A -->\r\n\t\t\t\t<ng-container matColumnDef=\"select\">\r\n\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\r\n\t\t\t\t\t\t<mat-checkbox\r\n\t\t\t\t\t\t\t(change)=\"selectChecked($event)\"\r\n\t\t\t\t\t\t\t[checked]=\"svr.isAllSelected()\"\r\n\t\t\t\t\t\t\t[indeterminate]=\"svr.hasSelected() && !svr.isAllSelected()\"\r\n\t\t\t\t\t\t\t>\u663E\u793A\r\n\t\t\t\t\t\t</mat-checkbox>\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<td mat-cell *matCellDef=\"let row\">\r\n\t\t\t\t\t\t<mat-checkbox [(ngModel)]=\"row.selected\"> </mat-checkbox>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</ng-container>\r\n\t\t\t\t<!-- \u9009\u62E9\u6846 \u5FC5\u586B -->\r\n\t\t\t\t<ng-container matColumnDef=\"must\">\r\n\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\r\n\t\t\t\t\t\t<mat-checkbox>\u5FC5\u586B </mat-checkbox>\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<td mat-cell *matCellDef=\"let element; let index = index\">\r\n\t\t\t\t\t\t<!-- <mat-checkbox [(ngModel)]=\"row.selected\">\r\n\t\t\t\t\t\t</mat-checkbox> -->\r\n\t\t\t\t\t\t<mat-slide-toggle\r\n\t\t\t\t\t\t\t[disabled]=\"!svr.Params.Fields[index].selected\"\r\n\t\t\t\t\t\t\t[(ngModel)]=\"element.Must\"\r\n\t\t\t\t\t\t></mat-slide-toggle>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</ng-container>\r\n\t\t\t\t<!-- \u540D\u79F0 -->\r\n\t\t\t\t<ng-container matColumnDef=\"name\">\r\n\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\r\n\t\t\t\t\t\t\u540D\u79F0\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<td\r\n\t\t\t\t\t\tmat-cell\r\n\t\t\t\t\t\t*matCellDef=\"let element; let index = index\"\r\n\t\t\t\t\t\t[ngClass]=\"{ selectedState: !svr.Params.Fields[index].selected }\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t{{ element.Name }}\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</ng-container>\r\n\t\t\t\t<!-- \u6807\u7B7E -->\r\n\t\t\t\t<ng-container matColumnDef=\"label\">\r\n\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\r\n\t\t\t\t\t\t\u6807\u7B7E\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<td mat-cell *matCellDef=\"let element; let index = index\">\r\n\t\t\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\tmatInput\r\n\t\t\t\t\t\t\t\t[disabled]=\"!svr.Params.Fields[index].selected\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"element.Label\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</ng-container>\r\n\t\t\t\t<!-- \u63D0\u793A -->\r\n\t\t\t\t<ng-container matColumnDef=\"tooltip\">\r\n\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\r\n\t\t\t\t\t\t\u63D0\u793A\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<td mat-cell *matCellDef=\"let element; let index = index\">\r\n\t\t\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\tmatInput\r\n\t\t\t\t\t\t\t\t[disabled]=\"!svr.Params.Fields[index].selected\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"element.Tooltip\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</ng-container>\r\n\t\t\t\t<!-- \u81EA\u7531\u5F55\u5165 -->\r\n\t\t\t\t<ng-container matColumnDef=\"freeentry\">\r\n\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\r\n\t\t\t\t\t\t<mat-checkbox>\u81EA\u7531\u5F55\u5165</mat-checkbox>\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<td mat-cell *matCellDef=\"let element; let index = index\">\r\n\t\t\t\t\t\t<mat-checkbox [disabled]=\"!svr.Params.Fields[index].selected\">\u542F\u7528</mat-checkbox>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</ng-container>\r\n\t\t\t\t<!-- \u5FEB\u901F\u64CD\u4F5C\u8BBE\u7F6E -->\r\n\t\t\t\t<ng-container matColumnDef=\"listnum\">\r\n\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\r\n\t\t\t\t\t\t\u5FEB\u901F\u64CD\u4F5C\u8BBE\u7F6E\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<td\r\n\t\t\t\t\t\tmat-cell\r\n\t\t\t\t\t\t*matCellDef=\"let element; let index = index\"\r\n\t\t\t\t\t\t[ngClass]=\"{ selectedState: !svr.Params.Fields[index].selected }\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t{{ element.List ? element.List.length : 0 }}\r\n\r\n\t\t\t\t\t\t<button mat-icon-button [disabled]=\"!svr.Params.Fields[index].selected\">\r\n\t\t\t\t\t\t\t<mat-icon\r\n\t\t\t\t\t\t\t\tsvgIcon=\"outlined:edit\"\r\n\t\t\t\t\t\t\t\t(click)=\"openListDialog(svr.Params.Fields[index].selected, element.List)\"\r\n\t\t\t\t\t\t\t></mat-icon>\r\n\t\t\t\t\t\t</button>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</ng-container>\r\n\t\t\t\t<!-- \u8868\u5934\u8BBE\u7F6E -->\r\n\t\t\t\t<tr\r\n\t\t\t\t\tmat-header-row\r\n\t\t\t\t\t*matHeaderRowDef=\"['select', 'must', 'name', 'label', 'tooltip', 'freeentry', 'listnum']\"\r\n\t\t\t\t></tr>\r\n\t\t\t\t<tr\r\n\t\t\t\t\tmat-row\r\n\t\t\t\t\t*matRowDef=\"\r\n\t\t\t\t\t\tlet row;\r\n\t\t\t\t\t\tcolumns: ['select', 'must', 'name', 'label', 'tooltip', 'freeentry', 'listnum']\r\n\t\t\t\t\t\"\r\n\t\t\t\t></tr>\r\n\t\t\t</table>\r\n\t\t</div>\r\n\t</div>\r\n</div>\r\n",
styles: ["@charset \"UTF-8\";:host{width:100%;padding:0 16px;box-sizing:border-box}:host .mat-form-field ::ng-deep .mat-form-field-wrapper{margin:0;padding-bottom:0}:host .mat-form-field ::ng-deep .mat-form-field-infix{border:0;padding:10px 0}:host .mat-form-field ::ng-deep .mat-select-arrow-wrapper{-webkit-transform:translateY(0);transform:translateY(0)}:host .\u8BBE\u7F6E-\u5934\u90E8{width:100%;display:flex;justify-content:flex-end;align-items:center;margin:16px 0 24px;font-size:14px}:host .\u8BBE\u7F6E-\u5934\u90E8 .\u5934\u90E8-\u8F93\u5165\u6846{margin-right:16px}:host .\u8BBE\u7F6E-\u5934\u90E8 .\u5934\u90E8-\u8F93\u5165\u6846 span{margin-right:8px}:host .\u8BBE\u7F6E-\u5934\u90E8 .\u5934\u90E8-\u8F93\u5165\u6846 .mat-form-field{width:125px}:host .\u8BBE\u7F6E-\u5934\u90E8 .\u81EA\u5B9A\u4E49set{margin-right:8px;cursor:pointer}:host .\u8868\u683C{width:100%}:host .\u8868\u683C th{font-size:14px;font-weight:700}:host .\u8868\u683C td{font-size:14px}:host .\u8868\u683C td.mat-cell:first-of-type,:host .\u8868\u683C th.mat-header-cell:first-of-type{padding-left:8px;min-width:48px;width:48px}:host .\u8868\u683C td.mat-column-listnum{text-align:right}:host .\u8868\u683C td.mat-cell,:host .\u8868\u683C th.mat-header-cell{min-width:72px;padding:0 8px}:host .\u8868\u683C .mat-form-field{width:104px}"]
}] }
];
/** @nocollapse */
SetPropertyUpdateComponent.ctorParameters = () => [
{ type: ElementService },
{ type: MatDialog }
];
SetPropertyUpdateComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.set-property-update',] }]
};
if (false) {
/** @type {?} */
SetPropertyUpdateComponent.prototype.hostClass;
/** @type {?} */
SetPropertyUpdateComponent.prototype.svr;
/** @type {?} */
SetPropertyUpdateComponent.prototype.elementSvr;
/** @type {?} */
SetPropertyUpdateComponent.prototype.dialog;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class ImportFieldComponent {
/**
* @param {?} elementSvr
*/
constructor(elementSvr) {
this.elementSvr = elementSvr;
this.hostClass = true;
this.svr = (/** @type {?} */ (this.elementSvr.data.import));
this.titles = ['序号', '名称', '别名', '类别', '值', '备注'];
}
/**
* @param {?} event
* @return {?}
*/
drop(event) {
moveItemInArray(this.svr.Params.Fields, event.previousIndex, event.currentIndex);
}
/**
* @return {?}
*/
ngOnInit() {
// console.log(this.svr.Params.Fields);
}
}
ImportFieldComponent.decorators = [
{ type: Component, args: [{
selector: 'common-import-field',
template: "<span class=\"\u5BFC\u5165-\u4E00\u7EA7\u6807\u9898 \u5B57\u4F53\u989C\u8272\">\u5B57\u6BB5\u8BBE\u7F6E</span>\r\n<div class=\"import-title\">\r\n\t<div class=\"tit-{{i+1}}\" *ngFor=\"let tit of titles;let i =index\">{{tit}}</div>\r\n</div>\r\n<div class=\"\u5BFC\u5165-\u5B57\u6BB5\u8BBE\u7F6E\" cdkDropList (cdkDropListDropped)=\"drop($event)\">\r\n\t<div class=\"\u5BFC\u5165-\u5355\u4E2A\u5B57\u6BB5\" *ngFor=\"let field of svr.Params.Fields; let i = index\"\r\n\t\tcdkDrag>\r\n\t\t<mat-icon class=\"check-icon\" svgIcon=\"drag_indicator\" cdkDragHandle></mat-icon>\r\n\t\t<span class=\"\u7D22\u5F15\" class=\"field-list-1\">{{ i+1 }}</span>\r\n\t\t<span class=\"\u540D\u79F0\" class=\"field-list-2\">{{ field.Name }}</span>\r\n\t\t<mat-form-field class=\"field-list-3\" appearance=\"outline\">\r\n\t\t\t<input matInput [(ngModel)]=\"field.Alias\" />\r\n\t\t</mat-form-field>\r\n\t\t<mat-form-field class=\"field-list-4\" appearance=\"outline\">\r\n\t\t\t<mat-select [(ngModel)]=\"field.Style\">\r\n\t\t\t\t<mat-option [value]=\"'NORMAL'\">\u6B63\u5E38\u5BFC\u5165\u5B57\u6BB5</mat-option>\r\n\t\t\t\t<mat-option [value]=\"'MUST'\">\u5FC5\u987B\u5BFC\u5165\u7684\u5B57\u6BB5</mat-option>\r\n\t\t\t\t<mat-option [value]=\"'FILL'\">\u81EA\u52A8\u586B\u5145\u7684\u5B57\u6BB5</mat-option>\r\n\t\t\t\t<mat-option [value]=\"'SKIP'\">\u5FFD\u7565\u7684\u5B57\u6BB5</mat-option>\r\n\t\t\t</mat-select>\r\n\t\t</mat-form-field>\r\n\t\t<mat-form-field class=\"field-list-5\" appearance=\"outline\">\r\n\t\t\t<input matInput placeholder=\"\u503C\" [(ngModel)]=\"field.Value\" />\r\n\t\t</mat-form-field>\r\n\t\t<mat-form-field class=\"field-list-6\" appearance=\"outline\">\r\n\t\t\t<input matInput placeholder=\"\u5907\u6CE8\" [(ngModel)]=\"field.Remark\" />\r\n\t\t</mat-form-field>\r\n\t\t<!-- <mat-divider *ngIf=\"svr.Params.Fields.length - 1 > i\"> </mat-divider> -->\r\n\t</div>\r\n</div>",
styles: ["@charset \"UTF-8\";.\u5BFC\u5165-\u4E00\u7EA7\u6807\u9898{font-size:16px;font-weight:700;margin-bottom:16px}.\u5BFC\u5165-\u5B57\u6BB5\u8BBE\u7F6E{margin:16px 0 0}.\u5BFC\u5165-\u5355\u4E2A\u5B57\u6BB5{position:relative;display:flex;align-items:center;width:100%;height:56px;font-size:14px}.\u5BFC\u5165-\u5355\u4E2A\u5B57\u6BB5 .mat-form-field{max-width:160px;min-width:80px;margin:0 8px 0 0}.\u5BFC\u5165-\u5355\u4E2A\u5B57\u6BB5 .mat-form-field ::ng-deep .mat-form-field-wrapper{margin:0;padding-bottom:0}.\u5BFC\u5165-\u5355\u4E2A\u5B57\u6BB5 .mat-form-field ::ng-deep .mat-form-field-infix{border:0;padding:10px 0}.\u5BFC\u5165-\u5355\u4E2A\u5B57\u6BB5 .mat-form-field ::ng-deep .mat-select-arrow-wrapper{-webkit-transform:translateY(0);transform:translateY(0)}.\u5BFC\u5165-\u5355\u4E2A\u5B57\u6BB5 .mat-icon{flex-shrink:0;width:16px;height:16px;line-height:16px;cursor:pointer;opacity:0}.\u5BFC\u5165-\u5355\u4E2A\u5B57\u6BB5 .\u7D22\u5F15{width:32px;padding:0 8px}.\u5BFC\u5165-\u5355\u4E2A\u5B57\u6BB5 .\u540D\u79F0{width:128px;padding:0 8px}.\u5BFC\u5165-\u5355\u4E2A\u5B57\u6BB5 .mat-divider{width:100%;position:absolute;bottom:0;left:0}.\u5BFC\u5165-\u5355\u4E2A\u5B57\u6BB5:hover{box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.12),0 1px 5px 0 rgba(0,0,0,.2);border-radius:4px}.\u5BFC\u5165-\u5355\u4E2A\u5B57\u6BB5:hover .mat-icon{opacity:1}.import-title{display:flex;flex-wrap:nowrap;width:100%;box-sizing:border-box;margin-top:24px;font:14px bold}.tit-1{width:calc(10% + 12px);min-width:58px;max-width:84px}.check-icon{width:16px}.field-list-1{width:10%;min-width:42px}.tit-2{width:calc(25% - 12px);min-width:80px;max-width:168px}.field-list-2{width:25%;min-width:80px}.tit-3{width:15%;min-width:88px;max-width:108px}.field-list-3{width:15%}.tit-4{width:20%;min-width:88px;max-width:144px}.field-list-4{width:20%}.tit-5{width:20%;min-width:88px;max-width:144px}.field-list-5{width:20%}.tit-6{width:10%;min-width:80px}.field-list-6{width:10%}"]
}] }
];
/** @nocollapse */
ImportFieldComponent.ctorParameters = () => [
{ type: ElementService }
];
ImportFieldComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.c-import-field',] }]
};
if (false) {
/** @type {?} */
ImportFieldComponent.prototype.hostClass;
/** @type {?} */
ImportFieldComponent.prototype.svr;
/** @type {?} */
ImportFieldComponent.prototype.titles;
/** @type {?} */
ImportFieldComponent.prototype.elementSvr;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class ImportSetComponent {
/**
* @param {?} elementSvr
* @param {?} theme
*/
constructor(elementSvr, theme) {
this.elementSvr = elementSvr;
this.theme = theme;
this.hostClass = true;
this.svr = (/** @type {?} */ (this.elementSvr.data.import));
this.tableControl = new FormControl();
this.options = { maxLines: 12, printMargin: false };
this.subs = [];
this.subs.push(this.theme.theme.subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
this.themeModel = v.model;
})));
}
/**
* @return {?}
*/
ngOnDestroy() {
this.subs.forEach((/**
* @param {?} v
* @return {?}
*/
v => v.unsubscribe()));
}
/**
* @return {?}
*/
ngOnInit() {
ace.config.set('basePath', '/front/assets/ace-builds/src-min-noconflict');
this.subs.push(this.svr.init().subscribe((/**
* @return {?}
*/
() => {
this.tableControl.patchValue(this.svr.Params.Table);
this.subs.push(
// 后一句用了startWith '' ,所以必须另外订阅。否则会每次都清空
this.tableControl.valueChanges.subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
this.svr.Params.Table = v;
this.svr.syncTableColumn();
})), this.tableControl.valueChanges.pipe(startWith('')).subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
this.tables = this.svr.Tables.filter((/**
* @param {?} sv
* @return {?}
*/
sv => sv.toUpperCase().includes(v.toUpperCase())));
})));
})));
}
}
ImportSetComponent.decorators = [
{ type: Component, args: [{
selector: 'common-import-set',
template: "<div class=\"set-import-main\">\r\n\t<!-- \u2193\u2193 1. \u5927\u6807\u9898 \u2193\u2193 -->\r\n\t<header class=\"set-title\">\u57FA\u672C\u4FE1\u606F</header>\r\n\t<!-- \u2193\u2193 2. \u6570\u636E\u5E93 \u2193\u2193 -->\r\n\t<section class=\"title-box\">\r\n\t\t<div class=\"first\">\r\n\t\t\t<div class=\"second-title\">\u6570\u636E\u5E93</div>\r\n\t\t\t<mat-form-field class=\"select-box\" appearance=\"outline\">\r\n\t\t\t\t<mat-select [(ngModel)]=\"svr.Params.DB\"\r\n\t\t\t\t\t(valueChange)=\"svr.refreshTables()\">\r\n\t\t\t\t\t<mat-option [value]=\"''\"> (\u5F53\u524D\u6570\u636E\u5E93) </mat-option>\r\n\t\t\t\t\t<mat-option *ngFor=\"let db of svr.DBList\" [value]=\"db\">\r\n\t\t\t\t\t\t{{ db }}\r\n\t\t\t\t\t</mat-option>\r\n\t\t\t\t</mat-select>\r\n\t\t\t</mat-form-field>\r\n\t\t</div>\r\n\t\t<div class=\"second\">\r\n\t\t\t<div class=\"second-title\">\u8868</div>\r\n\t\t\t<mat-form-field class=\"select-box\" appearance=\"outline\">\r\n\t\t\t\t<input type=\"text\" matInput [formControl]=\"tableControl\" [matAutocomplete]=\"auto\">\r\n\t\t\t\t\r\n\t\t\t\t<mat-autocomplete #auto=\"matAutocomplete\" >\r\n\t\t\t\t\t<mat-option *ngFor=\"let tab of tables\" [value]=\"tab|uppercase\">\r\n\t\t\t\t\t\t{{tab|uppercase}}\r\n\t\t\t\t\t</mat-option>\r\n\t\t\t\t</mat-autocomplete>\r\n\t\t\t</mat-form-field>\r\n\t\t</div>\r\n\t\t<div class=\"third\">\r\n\t\t\t<div class=\"second-title\">Null\u503C\u8BC6\u522B\u7801</div>\r\n\t\t\t<mat-form-field class=\"select-box\" appearance=\"outline\">\r\n\t\t\t\t<input type=\"text\" matInput [(ngModel)]=\"svr.Params.NullIden\">\r\n\t\t\t</mat-form-field>\r\n\t\t</div>\r\n\t</section>\r\n\t<section class=\"sql-statement\">\r\n\t\t<div class=\"second-title\">where</div>\r\n\t\t<div class=\"sql-box\">\r\n\t\t\t<div class=\"sql-wrapper\" ace-editor [(text)]=\"svr.Params.Where\"\r\n\t\t\t\tmode=\"sql\" [theme]=\"themeModel === 'dark'?'tomorrow_night':'eclipse'\" [options]=\"options\"\r\n\t\t\t\t[autoUpdateContent]=\"true\" [durationBeforeCallback]=\"1000\"></div>\r\n\t\t</div>\r\n\t</section>\r\n\t<section class=\"sql-statement\">\r\n\t\t<div class=\"second-title\">before\uFF08\u7528ImportTempTable\u5F15\u7528\u4E34\u65F6\u8868\uFF09</div>\r\n\t\t<div class=\"sql-wrapper\" ace-editor [(text)]=\"svr.Params.Before\" mode=\"sql\"\r\n\t\t\t[theme]=\"themeModel === 'dark'?'tomorrow_night':'eclipse'\" [options]=\"options\" [autoUpdateContent]=\"true\"\r\n\t\t\t[durationBeforeCallback]=\"1000\"></div>\r\n\t</section>\r\n\t<section class=\"sql-statement\">\r\n\t\t<div class=\"second-title\">after</div>\r\n\t\t<div class=\"sql-wrapper\" ace-editor [(text)]=\"svr.Params.After\" mode=\"sql\"\r\n\t\t[theme]=\"themeModel === 'dark'?'tomorrow_night':'eclipse'\" [options]=\"options\" [autoUpdateContent]=\"true\"\r\n\t\t\t[durationBeforeCallback]=\"1000\"></div>\r\n\t</section>\r\n</div>\r\n\r\n<!-- \r\n<div class=\"\u5BFC\u5165-\u4E00\u7EA7\u6807\u9898 \u5B57\u4F53\u989C\u8272\">\u57FA\u7840\u5C5E\u6027</div>\r\n<div class=\"\u5BFC\u5165-\u4E8C\u7EA7\u6807\u9898 \u4E8C\u7EA7\u5B57\u4F53\u989C\u8272\">\u6570\u636E\u5E93</div>\r\n<mat-form-field class=\"\u9009\u62E9\u6846\" appearance=\"outline\">\r\n\t<mat-select [(ngModel)]=\"svr.Params.DB\" (valueChange)=\"svr.refreshTables()\">\r\n\t\t<mat-option [value]=\"''\"> (\u5F53\u524D\u6570\u636E\u5E93) </mat-option>\r\n\t\t<mat-option *ngFor=\"let db of svr.DBList\" [value]=\"db\">\r\n\t\t\t{{ db }}\r\n\t\t</mat-option>\r\n\t</mat-select>\r\n</mat-form-field>\r\n<div class=\"\u5BFC\u5165-\u4E8C\u7EA7\u6807\u9898 \u4E8C\u7EA7\u5B57\u4F53\u989C\u8272\">\u8868</div>\r\n<mat-form-field class=\"\u9009\u62E9\u6846\" appearance=\"outline\">\r\n\t<input type=\"text\" matInput [(ngModel)]=\"svr.Params.Table\" [matAutocomplete]=\"auto\">\r\n\t\r\n\t<mat-autocomplete #auto=\"matAutocomplete\" >\r\n\t\t<mat-option *ngFor=\"let tab of svr.Tables\" [value]=\"tab|uppercase\">\r\n\t\t\t{{tab|uppercase}}\r\n\t\t</mat-option>\r\n\t</mat-autocomplete>\r\n</mat-form-field>\r\n<div class=\"\u5BFC\u5165-\u4E8C\u7EA7\u6807\u9898 \u4E8C\u7EA7\u5B57\u4F53\u989C\u8272\">Null\u503C\u8BC6\u522B\u7801</div>\r\n<mat-form-field class=\"\u9009\u62E9\u6846\" appearance=\"outline\">\r\n\t<input type=\"text\" matInput [(ngModel)]=\"svr.Params.NullIden\" >\r\n</mat-form-field>\r\n<div class=\"\u5BFC\u5165-\u4E8C\u7EA7\u6807\u9898 \u4E8C\u7EA7\u5B57\u4F53\u989C\u8272\">where</div>\r\n<div class=\"SQL\u8BED\u53E5 \u8FB9\u6846\"\r\n\tace-editor\r\n\t[(text)]=\"svr.Params.Where\"\r\n\tmode=\"sql\"\r\n\t[theme]=\"'eclipse'\"\r\n\t[options]=\"options\" \r\n\t[autoUpdateContent]=\"true\"\r\n\t[durationBeforeCallback]=\"1000\"\r\n\tstyle=\"min-height: 124px; width:100%; overflow: auto;\"\r\n></div>\r\n<div class=\"\u5BFC\u5165-\u4E8C\u7EA7\u6807\u9898 \u4E8C\u7EA7\u5B57\u4F53\u989C\u8272\">before\uFF08\u7528ImportTempTable\u5F15\u7528\u4E34\u65F6\u8868\uFF09</div>\r\n<div class=\"SQL\u8BED\u53E5 \u8FB9\u6846\"\r\n\tace-editor\r\n\t[(text)]=\"svr.Params.Before\"\r\n\tmode=\"sql\"\r\n\t[theme]=\"'eclipse'\"\r\n\t[options]=\"options\" \r\n\t[autoUpdateContent]=\"true\"\r\n\t[durationBeforeCallback]=\"1000\"\r\n\tstyle=\"min-height: 124px; width:100%; overflow: auto;\"\r\n></div>\r\n<div class=\"\u5BFC\u5165-\u4E8C\u7EA7\u6807\u9898 \u4E8C\u7EA7\u5B57\u4F53\u989C\u8272\">after</div>\r\n<div class=\"SQL\u8BED\u53E5 \u8FB9\u6846\"\r\n\tace-editor\r\n\t[(text)]=\"svr.Params.After\"\r\n\tmode=\"sql\"\r\n\t[theme]=\"'eclipse'\"\r\n\t[options]=\"options\" \r\n\t[autoUpdateContent]=\"true\"\r\n\t[durationBeforeCallback]=\"1000\"\r\n\tstyle=\"min-height: 124px; width:100%; overflow: auto;\"\r\n></div> -->",
styles: [".set-import-main{width:100%;box-sizing:border-box}.set-title{width:100%;font:16px bold;margin-bottom:16px}.title-box{display:flex;justify-content:space-between;width:100%;box-sizing:border-box;margin-bottom:8px}.title-box .second-title{font-size:12px;margin-bottom:8px}.title-box .select-box{font-size:14px}.first,.second,.third{flex:1}.second{margin-left:24px;margin-right:24px}.second .select-box{max-width:220px}.second-title{white-space:nowrap;box-sizing:border-box;margin-bottom:4px}.sql-statement{width:100%;box-sizing:border-box;margin-top:16px}.sql-statement .second-title{font-size:14px}.sql-wrapper{width:100%;min-height:124px;border-radius:4px;overflow:auto}"]
}] }
];
/** @nocollapse */
ImportSetComponent.ctorParameters = () => [
{ type: ElementService },
{ type: ThemeService }
];
ImportSetComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.c-import-set',] }]
};
if (false) {
/** @type {?} */
ImportSetComponent.prototype.hostClass;
/** @type {?} */
ImportSetComponent.prototype.themeModel;
/** @type {?} */
ImportSetComponent.prototype.svr;
/** @type {?} */
ImportSetComponent.prototype.tableControl;
/** @type {?} */
ImportSetComponent.prototype.options;
/** @type {?} */
ImportSetComponent.prototype.tables;
/** @type {?} */
ImportSetComponent.prototype.subs;
/** @type {?} */
ImportSetComponent.prototype.elementSvr;
/**
* @type {?}
* @private
*/
ImportSetComponent.prototype.theme;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
const ɵ0 = SaveStateData;
class ElementModule {
}
ElementModule.decorators = [
{ type: NgModule, args: [{
declarations: [
ElementComponent,
SetPropertyRecordviewComponent,
ParamsRecordviewFetchSQLComponent,
SetPropertyImportComponent,
ConditionalTemplateComponent,
ProcessingListsComponent,
SelectSettingComponent,
SliderSettingComponent,
RangeInputSettingComponent,
SetPropertyBillComponent,
SetPropertyUpdateComponent,
SetParamsComponent,
ListParamsComponent,
ImportFieldComponent,
ImportSetComponent
],
imports: [
BillModule,
CommonModule,
MatFormFieldModule$1,
MatCheckboxModule,
MatSelectModule,
FormsModule,
MatInputModule$1,
MatButtonModule,
MatIconModule$1,
DragDropModule,
MatTableModule,
MatRadioModule,
MatTooltipModule,
MatAutocompleteModule,
MatSlideToggleModule,
MatDialogModule,
AceEditorModule,
MatSidenavModule$1,
ViewDefineModule,
IconSelectModule,
LabelManagerModule,
MatDividerModule$1,
Ng5SliderModule,
RouterModule.forChild([
{
path: '**',
component: ElementComponent,
data: ɵ0
}
])
],
entryComponents: [SetParamsComponent, ListParamsComponent]
},] }
];
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
const exportAnimation = trigger('exportAnimations', [
state('changing', style({
position: 'absolute',
top: '16px',
width: '960px',
height: '160px',
left: '50%',
marginLeft: '-480px'
})),
state('changed', style({
position: 'relative',
width: '560px',
height: '100px',
margin: 'auto',
paddingTop: '16px',
borderRadius: '4px',
opacity: 0.5,
display: 'none'
})),
state('changing_', style({
position: 'absolute !important',
top: '192px !important',
bottom: '56px',
width: '960px',
height: 'auto !important',
overflow: 'auto',
left: '50%',
marginLeft: '-480px'
})),
state('changed_', style({
position: 'relative',
width: '560px',
height: '100px',
margin: 'auto',
paddingTop: '16px',
borderRadius: '4px',
opacity: 0.5,
display: 'none'
})),
transition('*=>*', [animate('0.2s')])
]);
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @record
*/
function DoExportParam() { }
if (false) {
/** @type {?} */
DoExportParam.prototype.Format;
/** @type {?} */
DoExportParam.prototype.DB;
/** @type {?} */
DoExportParam.prototype.TableName;
/** @type {?} */
DoExportParam.prototype.Encoding;
/** @type {?} */
DoExportParam.prototype.Columns;
}
/**
* @record
*/
function ExportInfo() { }
if (false) {
/** @type {?} */
ExportInfo.prototype.FromElement;
/** @type {?} */
ExportInfo.prototype.Timeout;
/** @type {?} */
ExportInfo.prototype.RowCount;
/** @type {?} */
ExportInfo.prototype.Columns;
/** @type {?} */
ExportInfo.prototype.DBNames;
/** @type {?} */
ExportInfo.prototype.DefaultTableName;
}
/**
* @record
*/
function DoExportResult() { }
if (false) {
/** @type {?} */
DoExportResult.prototype.TaskID;
/** @type {?} */
DoExportResult.prototype.Timeout;
/** @type {?} */
DoExportResult.prototype.ZipFileSignURL;
/** @type {?} */
DoExportResult.prototype.TaskInfoURL;
/** @type {?} */
DoExportResult.prototype.TaskInfoSign;
/** @type {?} */
DoExportResult.prototype.ResultURL;
/** @type {?} */
DoExportResult.prototype.BrowseTaskElement;
}
/**
* @record
*/
function Column() { }
if (false) {
/** @type {?|undefined} */
Column.prototype.selected;
/** @type {?} */
Column.prototype.Name;
/** @type {?} */
Column.prototype.Type;
/** @type {?} */
Column.prototype.MaxLength;
}
/**
* @record
*/
function ExportTaskWSMessage() { }
if (false) {
/** @type {?} */
ExportTaskWSMessage.prototype.Data;
}
class ExportService {
/**
* @param {?} eles
* @param {?} api
*/
constructor(eles, api) {
this.eles = eles;
this.api = api;
this.step = 'toPrepare';
this.format = 'csv';
this.encoding = 'utf8';
}
/**
* @return {?}
*/
isAllSelected() {
return this.columns && this.columns.find((/**
* @param {?} v
* @return {?}
*/
v => !v.selected)) === undefined;
}
/**
* @return {?}
*/
hasSelected() {
return this.columns && this.columns.find((/**
* @param {?} v
* @return {?}
*/
v => v.selected)) !== undefined;
}
/**
* @return {?}
*/
init() {
return this.api.get('get-export-info').subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
this.srcElementTitle = v.FromElement;
this.rowCount = v.RowCount;
this.columns = v.Columns;
// this.columns = [...v.Columns, ...v.Columns, ...v.Columns]; //测试长数据时使用
this.columns.forEach((/**
* @param {?} c
* @return {?}
*/
c => (c.selected = true)));
this.dbNames = v.DBNames;
this.dbName = '';
this.tableName = v.DefaultTableName;
}));
}
/**
* @param {?} param
* @return {?}
*/
doExport(param) {
// console.log('进入post请求');
return this.api.post('do-export', param).pipe(tap((/**
* @param {?} v
* @return {?}
*/
v => {
// 注册查看任务明细的url
this.eles.addElement(v.BrowseTaskElement);
this.eles.setURLSign(v.TaskInfoURL, v.TaskInfoSign);
})));
}
}
ExportService.decorators = [
{ type: Injectable }
];
/** @nocollapse */
ExportService.ctorParameters = () => [
{ type: ElementsService },
{ type: CurrentApiService }
];
if (false) {
/** @type {?} */
ExportService.prototype.step;
/** @type {?} */
ExportService.prototype.srcElementTitle;
/** @type {?} */
ExportService.prototype.rowCount;
/** @type {?} */
ExportService.prototype.format;
/** @type {?} */
ExportService.prototype.encoding;
/** @type {?} */
ExportService.prototype.dbName;
/** @type {?} */
ExportService.prototype.tableName;
/** @type {?} */
ExportService.prototype.columns;
/** @type {?} */
ExportService.prototype.dbNames;
/** @type {?} */
ExportService.prototype.timeRemaining;
/** @type {?} */
ExportService.prototype.exportProgress;
/** @type {?} */
ExportService.prototype.zipFileURL;
/** @type {?} */
ExportService.prototype.taskInfoURL;
/**
* @type {?}
* @private
*/
ExportService.prototype.eles;
/**
* @type {?}
* @private
*/
ExportService.prototype.api;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class ExportComponent {
/**
* @param {?} svr
* @param {?} prj
* @param {?} eles
* @param {?} cur
*/
constructor(svr, prj, eles, cur) {
this.svr = svr;
this.prj = prj;
this.eles = eles;
this.cur = cur;
this.hostClass = true;
this.subs = [];
}
/**
* @return {?}
*/
ngOnInit() {
this.svr.init();
}
/**
* @return {?}
*/
ngOnDestroy() {
this.subs.forEach((/**
* @param {?} v
* @return {?}
*/
v => v.unsubscribe()));
}
/**
* @param {?} event
* @return {?}
*/
selectChecked(event) {
this.svr.columns.forEach((/**
* @param {?} v
* @return {?}
*/
v => (v.selected = event.checked)));
}
/**
* @return {?}
*/
doExport() {
this.svr
.doExport({
Format: this.svr.format,
DB: this.svr.dbName,
TableName: this.svr.tableName,
Encoding: this.svr.encoding,
Columns: this.svr.columns.filter((/**
* @param {?} v
* @return {?}
*/
v => v.selected)).map((/**
* @param {?} v
* @return {?}
*/
v => v.Name))
})
.subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
this.svr.step = 'inTheExpord';
/** @type {?} */
const startTime = new Date();
this.svr.taskInfoURL = this.prj.frontURL('task', v.TaskInfoURL);
this.svr.zipFileURL = fullApiPath(v.ZipFileSignURL);
this.subs.push(this.cur.wsCtrl.observable.subscribe((/**
* @param {?} mes
* @return {?}
*/
(mes) => {
if (mes.Data.TaskID === v.TaskID) {
if (!mes.Data.Completed) {
/** @type {?} */
const g = mes.Data.Data / this.svr.rowCount;
this.svr.exportProgress = g * 100;
/** @type {?} */
const d = new Date().getTime() - startTime.getTime();
this.svr.timeRemaining = (d / g) * (1 - g);
}
else {
this.svr.exportProgress = 100;
this.svr.step = 'complete';
}
}
})));
}));
}
/**
* @param {?} type
* @return {?}
*/
chineseString(type) {
if (type === 'STR') {
return '字符串';
}
else if (type === 'INT') {
return '整型';
}
else if (type === 'DATE') {
return '日期';
}
else if (type === 'FLOAT') {
return '浮点';
}
else if (type === 'BYTEA') {
return '二进制';
}
}
}
ExportComponent.decorators = [
{ type: Component, args: [{
selector: 'common-export',
template: "<ng-container [ngSwitch]=\"svr.step\">\r\n\t\t<!-- **** \u6570\u636E\u5BFC\u51FA\u8868\u603B **** -->\r\n\t\t<div class=\"export-data\" *ngSwitchCase=\"'toPrepare'\">\r\n\t\t\t\t<!-- **** \u6570\u636E\u5BFC\u51FA\u8868\uFF08\u4E0A\uFF09 **** -->\r\n\t\t\t\t<div class=\"data-wrapper\">\r\n\t\t\t\t\t<!-- ** \u6570\u636E\u5BFC\u51FA\u5927\u6807\u9898 ** -->\r\n\t\t\t\t\t<header class=\"data-title\">\u6570\u636E\u5BFC\u51FA</header>\r\n\t\t\t\t\t<!-- ** \u6570\u636E\u5BFC\u51FA\u6B63\u8868 ** -->\r\n\t\t\t\t\t<section class=\"export-table\">\r\n\t\t\t\t\t\t<table>\r\n\t\t\t\t\t\t\t<!-- * \u8868\u5934 * -->\r\n\t\t\t\t\t\t\t<thead>\r\n\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t<th>\u6765\u6E90</th>\r\n\t\t\t\t\t\t\t\t\t<th>\u8BB0\u5F55\u6570</th>\r\n\t\t\t\t\t\t\t\t\t<th>\u683C\u5F0F</th>\r\n\t\t\t\t\t\t\t\t\t<th>\u7F16\u7801</th>\r\n\t\t\t\t\t\t\t\t\t<th>\u76EE\u6807\u6570\u636E\u5E93</th>\r\n\t\t\t\t\t\t\t\t\t<th>\u76EE\u6807\u8868</th>\r\n\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t</thead>\r\n\t\t\t\t\t\t\t<!-- * \u8868\u5355\u6B63\u4F53 * -->\r\n\t\t\t\t\t\t\t<tbody>\r\n\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t<!-- \u6765\u6E90 -->\r\n\t\t\t\t\t\t\t\t\t<td>{{svr.srcElementTitle}}</td>\r\n\t\t\t\t\t\t\t\t\t<!-- \u8BB0\u5F55\u6570 -->\r\n\t\t\t\t\t\t\t\t\t<td>{{svr.rowCount}}</td>\r\n\t\t\t\t\t\t\t\t\t<!-- \u683C\u5F0F -->\r\n\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t\t\t\t\t\t\t<mat-select class=\"export-slt\" [(ngModel)]=\"svr.format\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<mat-option value=\"csv\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tCSV(\u9017\u53F7\u5206\u9694\u6587\u672C)\r\n\t\t\t\t\t\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<mat-option value=\"txt\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tTXT(TAB\u5206\u9694\u6587\u672C)\r\n\t\t\t\t\t\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<mat-option value=\"json\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tJSON\r\n\t\t\t\t\t\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<mat-option value=\"excel\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tXLS(Excel\u683C\u5F0F\u6587\u4EF6)\r\n\t\t\t\t\t\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<mat-option value=\"sqlite3\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tSQLITE3\r\n\t\t\t\t\t\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<mat-option value=\"mytable\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\u6570\u636E\u5E93\u8868\r\n\t\t\t\t\t\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t<!-- \u7F16\u7801 -->\r\n\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t\t\t\t\t\t\t<mat-select [(ngModel)]=\"svr.encoding\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<mat-option value=\"utf8\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tUTF-8\r\n\t\t\t\t\t\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<mat-option value=\"gbk\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tGBK\r\n\t\t\t\t\t\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t<!-- \u76EE\u6807\u6570\u636E\u5E93 -->\r\n\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t\t\t\t\t\t\t<mat-select [(ngModel)]=\"svr.dbName\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t[disabled]=\"svr.format!=='mytable'\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<mat-option value=\"\">(\u7A7A)</mat-option>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<mat-option *ngFor=\"let item of svr.dbNames\" [value]=\"item\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{{item}}\r\n\t\t\t\t\t\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t<!-- \u76EE\u6807\u8868 -->\r\n\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t\t\t\t\t\t\t<input matInput [(ngModel)]=\"svr.tableName\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t[disabled]=\"svr.format!=='mytable'\">\r\n\t\t\t\t\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t</tbody>\r\n\t\t\t\t\t\t</table>\r\n\t\t\t\t\t</section>\r\n\t\t\t\t</div>\r\n\t\t\r\n\t\t\t\t<!-- *** \u6307\u6807\u9009\u62E9\u8868\u5355\uFF08\u4E0B\uFF09 *** -->\r\n\t\t\t\t<div class=\"select-wrapper\">\r\n\t\t\t\t\t<!-- ** \u9009\u62E9\u8868\u5927\u6807\u9898 ** -->\r\n\t\t\t\t\t<header class=\"select-title\">\u6307\u6807\u9009\u62E9</header>\r\n\t\t\t\t\t<!-- ** \u9009\u62E9\u8868\u6B63\u8868 ** -->\r\n\t\t\t\t\t<section class=\"select-table\">\r\n\t\t\t\t\t\t<!-- * \u9009\u62E9\u8868 * -->\r\n\t\t\t\t\t\t<table mat-table [dataSource]=\"svr.columns\">\r\n\t\t\t\t\t\t\t<!-- \u9009\u62E9\u6846 -->\r\n\t\t\t\t\t\t\t<ng-container class=\"slt-checkbox\" matColumnDef=\"select\">\r\n\t\t\t\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\r\n\t\t\t\t\t\t\t\t\t<mat-checkbox (change)=\"selectChecked($event)\"\r\n\t\t\t\t\t\t\t\t\t\t[checked]=\"svr.isAllSelected()\"\r\n\t\t\t\t\t\t\t\t\t\t[indeterminate]=\"svr.hasSelected() && !svr.isAllSelected()\">\r\n\t\t\t\t\t\t\t\t\t</mat-checkbox>\r\n\t\t\t\t\t\t\t\t</th>\r\n\t\t\t\t\t\t\t\t<td mat-cell *matCellDef=\"let row\">\r\n\t\t\t\t\t\t\t\t\t<mat-checkbox [(ngModel)]=\"row.selected\">\r\n\t\t\t\t\t\t\t\t\t</mat-checkbox>\r\n\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t\t\t<!-- \u5E8F\u53F7 -->\r\n\t\t\t\t\t\t\t<ng-container matColumnDef=\"position\">\r\n\t\t\t\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\r\n\t\t\t\t\t\t\t\t\t\u5E8F\u53F7</th>\r\n\t\t\t\t\t\t\t\t<td mat-cell *matCellDef=\"let element,index as i\">\r\n\t\t\t\t\t\t\t\t\t{{ i+1 }}\r\n\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t\t\t<!-- \u540D\u79F0 -->\r\n\t\t\t\t\t\t\t<ng-container matColumnDef=\"name\">\r\n\t\t\t\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\r\n\t\t\t\t\t\t\t\t\t\u540D\u79F0</th>\r\n\t\t\t\t\t\t\t\t<td mat-cell *matCellDef=\"let element\">\r\n\t\t\t\t\t\t\t\t\t{{ element.Name }}\r\n\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t\t\t<!-- \u5B57\u6BB5\u7C7B\u578B -->\r\n\t\t\t\t\t\t\t<ng-container matColumnDef=\"type\">\r\n\t\t\t\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\r\n\t\t\t\t\t\t\t\t\t\u5B57\u6BB5\u7C7B\u578B\r\n\t\t\t\t\t\t\t\t</th>\r\n\t\t\t\t\t\t\t\t<td mat-cell *matCellDef=\"let element\">\r\n\t\t\t\t\t\t\t\t\t{{ chineseString(element.Type) }}\r\n\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t\t\t<!-- \u957F\u5EA6 -->\r\n\t\t\t\t\t\t\t<ng-container matColumnDef=\"maxlength\">\r\n\t\t\t\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\r\n\t\t\t\t\t\t\t\t\t\u957F\u5EA6\r\n\t\t\t\t\t\t\t\t</th>\r\n\t\t\t\t\t\t\t\t<td mat-cell *matCellDef=\"let element\">\r\n\t\t\t\t\t\t\t\t\t{{ element.MaxLength }}\r\n\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t\t\t<!-- \u8868\u5934\u8BBE\u7F6E -->\r\n\t\t\t\t\t\t\t<tr mat-header-row\r\n\t\t\t\t\t\t\t\t*matHeaderRowDef=\"['select','position','name','type','maxlength']; sticky: true\">\r\n\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t<tr mat-row\r\n\t\t\t\t\t\t\t\t*matRowDef=\"let row; columns: ['select','name','position','type','maxlength']\">\r\n\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t</table>\r\n\t\t\t\t\t</section>\r\n\t\t\t\t\t<footer class=\"btn\">\r\n\t\t\t\t\t\t\t<button class=\"export-btn\" mat-button type=\"button\" (click)=\"doExport()\">\u5BFC\u51FA</button>\r\n\t\t\t\t\t</footer>\r\n\t\t\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\r\n\t<!-- \u76EE\u524D\u4E0D\u4E00\u5B9A\u9700\u8981 -->\r\n <div class=\"expording\" *ngSwitchCase=\"'inTheExpord'\">\r\n\r\n\t\t<div class=\"expording-wrapper\">\r\n\t\t\t<div class=\"expording-title\">\r\n\t\t\t\t\u6570\u636E\u6B63\u5728\u5BFC\u51FA\uFF0C\u5269\u4F59\r\n\t\t\t\t<span class=\"expording-num\">{{ svr.timeRemaining }}</span>\r\n\t\t\t\t\u79D2\r\n\t\t\t</div>\r\n\t\t\t<div class=\"expording-text\">\r\n\t\t\t\t\u540E\u53F0\u6B63\u5728\u5BFC\u51FA\u6570\u636E\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85\uFF0C\u7ED3\u675F\u540E\u5373\u53EF\u4E0B\u8F7D\uFF1B\u672C\u9875\u9762\u5173\u95ED\u540E\u53EF\u5728<u class=\"text-check\">\u4EFB\u52A1\u67E5\u8BE2</u>\u4E2D\u67E5\u770B\u8FDB\u5EA6\r\n\t\t\t</div>\r\n\t\t\t<div>\r\n\t\t\t\t<mat-progress-bar color=\"accent\" mode=\"determinate\"\r\n\t\t\t\t\t[value]=\"svr.exportProgress\"> </mat-progress-bar>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n\r\n\t<div class=\"prepare\" *ngSwitchCase=\"'complete'\">\r\n\t\t<div class=\"prepare-wrapper\">\r\n\t\t\t<div class=\"prepare-title\">\u6587\u4EF6\u5DF2\u7ECF\u51C6\u5907\u5B8C\u6BD5</div>\r\n\t\t\t<div class=\"prepare-text\">\r\n\t\t\t\t\u53EF\u67E5\u770B\u4E0B\u8F7D\u6587\u4EF6\u7684\u5185\u5BB9\u6216\u76F4\u63A5\u8FDB\u884C\u4E0B\u8F7D\uFF1B\u672C\u9875\u9762\u5173\u95ED\u540E\u53EF\u5728<u class=\"text-check\"><a\r\n\t\t\t\t\t\t[routerLink]=\"svr.taskInfoURL\">\u4EFB\u52A1\u660E\u7EC6</a></u>\u9875\u9762\u4E2D\u67E5\u770B\u8FDB\u5EA6\r\n\t\t\t</div>\r\n\t\t\t<div class=\"btn\">\r\n\t\t\t\t<a mat-button [href]=\"svr.zipFileURL\"\r\n\t\t\t\t\t*ngIf=\"svr.format !=='mytable'\">\u4E0B\u8F7D</a>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n</ng-container>\r\n\r\n",
animations: [exportAnimation],
providers: [ExportService],
styles: ["a{text-decoration:none}.export-data .data-wrapper,.export-data .select-wrapper{max-width:960px;min-width:688px;margin:0 auto;box-sizing:border-box;border-radius:4px;padding:16px 24px;box-shadow:0 5px 13px 0 rgba(0,0,0,.14)}.export-data .data-title,.export-data .select-title{margin-bottom:16px}.export-data .export-table,.export-data .select-table{width:100%}.export-data .data-wrapper{height:160px}.export-data .data-wrapper .data-title{font:20px bold}.export-data .data-wrapper .export-table{font-size:14px}.export-data .data-wrapper .export-table table{width:100%;border-collapse:collapse;box-sizing:border-box}.export-data .data-wrapper .export-table td,.export-data .data-wrapper .export-table th{height:40px;padding:0 8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;box-sizing:border-box}.export-data .data-wrapper .export-table th{text-align:left}.export-data .select-wrapper{height:auto;margin-top:16px}.export-data .select-wrapper .select-title{font:16px bold}.export-data .select-wrapper .select-table{width:100%;max-height:535px;overflow:auto;box-shadow:0 5px 13px 0 rgba(0,0,0,.14)}.export-data .select-wrapper table{width:100%;box-sizing:border-box}.export-data .select-wrapper .slt-checkbox{width:50px}.export-data .select-wrapper td,.export-data .select-wrapper th{height:32px;box-sizing:border-box}.export-data .select-wrapper .btn{width:100%;text-align:right;margin-top:16px}.export-data .select-wrapper .btn .export-btn{width:80px;height:32px;line-height:32px;color:#fff;font-size:14px}.expording{display:flex;justify-content:center;align-items:center;width:100%;height:calc(100vh - 30px)}.expording .expording-wrapper{width:624px;height:456px;margin-top:-60px;background:url(/front/assets/export/prepare.png) top center/300px 300px no-repeat;box-shadow:0 2px 5px 0 rgba(0,0,0,.14);box-sizing:border-box}.expording .expording-wrapper .expording-text,.expording .expording-wrapper .expording-title{width:100%;box-sizing:border-box}.expording .expording-wrapper .expording-title{padding:271px 128px 0;font-size:24px}.expording .expording-wrapper .expording-text{padding:16px 128px 88px;font-size:16px}.expording .expording-wrapper .expording-text .text-check{font-weight:700}.prepare{display:flex;justify-content:center;align-items:center;width:100%;height:calc(100vh - 30px)}.prepare .prepare-wrapper{width:624px;height:456px;margin-top:-60px;background:url(/front/assets/export/done.png) top center/300px 300px no-repeat;box-shadow:0 2px 5px 0 rgba(0,0,0,.14);box-sizing:border-box}.prepare .prepare-wrapper .expording-text,.prepare .prepare-wrapper .expording-title{width:100%;box-sizing:border-box}.prepare .prepare-wrapper .prepare-title{padding:271px 128px 0;font-size:24px}.prepare .prepare-wrapper .prepare-text{padding:16px 128px 0;font-size:16px}.prepare .prepare-wrapper .prepare-text .text-check{font-weight:700}.prepare .prepare-wrapper .btn{width:100%;text-align:right;padding:35px 32px 25px 0;box-sizing:border-box}.prepare .prepare-wrapper .btn a{width:80px;height:32px;line-height:32px;color:#fff;font-size:14px}"]
}] }
];
/** @nocollapse */
ExportComponent.ctorParameters = () => [
{ type: ExportService },
{ type: ProjectService },
{ type: ElementsService },
{ type: CurrentService }
];
ExportComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.export',] }]
};
if (false) {
/** @type {?} */
ExportComponent.prototype.hostClass;
/** @type {?} */
ExportComponent.prototype.subs;
/** @type {?} */
ExportComponent.prototype.svr;
/** @type {?} */
ExportComponent.prototype.prj;
/**
* @type {?}
* @private
*/
ExportComponent.prototype.eles;
/**
* @type {?}
* @private
*/
ExportComponent.prototype.cur;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
const ɵ0$1 = SaveStateData;
class ExportModule {
}
ExportModule.decorators = [
{ type: NgModule, args: [{
declarations: [ExportComponent],
imports: [
MatSelectModule$1,
MatExpansionModule,
MatIconModule,
MatInputModule,
FormsModule,
CommonModule,
MatButtonModule$1,
MatTableModule$1,
MatCheckboxModule$1,
MatProgressBarModule,
MatStepperModule,
MatFormFieldModule,
RouterModule.forChild([{ path: '**', data: ɵ0$1, component: ExportComponent }])
]
},] }
];
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class ElementViewDigest {
/**
* @param {?} data
* @return {?}
*/
static fromInterface(data) {
/** @type {?} */
const rev = new ElementViewDigest();
Object.assign(rev, data);
return rev;
}
/**
* @return {?}
*/
displayLabel() {
if (this.OwnerBy === OwnerByEnum.ownerByEle) {
return '缺省显示列';
}
if (this.OwnerBy === OwnerByEnum.unknow) {
return '标签合并列';
}
return this.Name;
}
/**
* @param {?} userName
* @param {?} deptCode
* @return {?}
*/
canModify(userName, deptCode) {
return ((this.OwnerBy === OwnerByEnum.ownerByDept && this.Owner === deptCode) ||
(this.OwnerBy === OwnerByEnum.ownerByUser && this.Owner === userName));
}
}
if (false) {
/** @type {?} */
ElementViewDigest.prototype.OwnerBy;
/** @type {?} */
ElementViewDigest.prototype.Owner;
/** @type {?} */
ElementViewDigest.prototype.Name;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @record
*/
function TableColumnType() { }
if (false) {
/**
* 附加的属性,用于客户端
* @type {?}
*/
TableColumnType.prototype.index;
/** @type {?} */
TableColumnType.prototype.sticky;
/** @type {?} */
TableColumnType.prototype.stickyEnd;
/** @type {?} */
TableColumnType.prototype.showToolbar;
}
/** @enum {string} */
const Order$1 = {
// OrderAsc 升序
OrderAsc: '+',
// OrderDesc 降序
OrderDesc: '-',
// OrderNone 无排序
OrderNone: '',
};
/** @enum {string} */
const SelectType = {
Selected: 's',
Unselected: 'ns',
};
/**
* @record
*/
function ConditionalValue() { }
if (false) {
/** @type {?} */
ConditionalValue.prototype.Type;
/** @type {?} */
ConditionalValue.prototype.Field;
/** @type {?} */
ConditionalValue.prototype.Value;
}
/**
* @record
*/
function RangeInputConditionalValue() { }
if (false) {
/** @type {?} */
RangeInputConditionalValue.prototype.LowValue;
/** @type {?} */
RangeInputConditionalValue.prototype.HighValue;
}
/**
* @record
*/
function SelectConditionalValue() { }
if (false) {
/** @type {?} */
SelectConditionalValue.prototype.Value;
/** @type {?} */
SelectConditionalValue.prototype.OtherOption;
/** @type {?} */
SelectConditionalValue.prototype.Options;
}
/**
* @record
*/
function MultiSelectConditionalValue() { }
if (false) {
/** @type {?} */
MultiSelectConditionalValue.prototype.Value;
/** @type {?} */
MultiSelectConditionalValue.prototype.OtherOption;
/** @type {?} */
MultiSelectConditionalValue.prototype.Options;
}
/**
* @record
*/
function SliderConditionalValue() { }
if (false) {
/** @type {?} */
SliderConditionalValue.prototype.LowValue;
/** @type {?} */
SliderConditionalValue.prototype.HighValue;
/** @type {?} */
SliderConditionalValue.prototype.PositiveInfinity;
/** @type {?} */
SliderConditionalValue.prototype.NegativeInfinity;
/** @type {?} */
SliderConditionalValue.prototype.Ratio;
}
/**
* @record
*/
function IFetchDataParam() { }
if (false) {
/**
* 分隔行的主键值
* @type {?|undefined}
*/
IFetchDataParam.prototype.Divide;
/**
* 排序的字段,升序只填字段名,降序字段名前加-(减号)
* @type {?|undefined}
*/
IFetchDataParam.prototype.Order;
/**
* 字段
* @type {?|undefined}
*/
IFetchDataParam.prototype.Field;
/**
* 运算符
* @type {?|undefined}
*/
IFetchDataParam.prototype.Opt;
/**
* 值
* @type {?|undefined}
*/
IFetchDataParam.prototype.Value;
/**
* 选择类型
* @type {?|undefined}
*/
IFetchDataParam.prototype.SelType;
/**
* 选择的主键
* @type {?|undefined}
*/
IFetchDataParam.prototype.SelKeys;
/**
* 每页最多行数
* @type {?|undefined}
*/
IFetchDataParam.prototype.Limit;
/**
* 开始行号
* @type {?|undefined}
*/
IFetchDataParam.prototype.DivideRowNum;
/** @type {?|undefined} */
IFetchDataParam.prototype.Labels;
/** @type {?|undefined} */
IFetchDataParam.prototype.View;
/** @type {?|undefined} */
IFetchDataParam.prototype.ConditionalTemplate;
}
/**
* @record
*/
function IFetchRowCountResult() { }
if (false) {
/** @type {?} */
IFetchRowCountResult.prototype.RowCount;
}
/**
* @record
*/
function IFetchDataResultType() { }
if (false) {
/** @type {?} */
IFetchDataResultType.prototype.Error;
/** @type {?} */
IFetchDataResultType.prototype.FData;
}
/**
* @record
*/
function IFetchDataResult() { }
if (false) {
/** @type {?} */
IFetchDataResult.prototype.Title;
/** @type {?} */
IFetchDataResult.prototype.Rows;
/** @type {?} */
IFetchDataResult.prototype.Columns;
/** @type {?} */
IFetchDataResult.prototype.DisplayColumns;
/**
* 一般为0,除非最后一页,通过最后的序号得出总数
* @type {?}
*/
IFetchDataResult.prototype.RowCount;
/**
* 下一页用到的起始序号
* @type {?}
*/
IFetchDataResult.prototype.DownRowNum;
/**
* 下一页用到的起始分界值
* @type {?}
*/
IFetchDataResult.prototype.DownDivide;
/**
* 非绑定记录的处理按钮的可用性
* @type {?}
*/
IFetchDataResult.prototype.Processes;
}
/**
* @record
*/
function IRenderProcess() { }
if (false) {
/** @type {?} */
IRenderProcess.prototype.URL;
/** @type {?} */
IRenderProcess.prototype.Sign;
/** @type {?} */
IRenderProcess.prototype.Enabled;
}
/**
* @record
*/
function IRenderRow() { }
if (false) {
/** @type {?} */
IRenderRow.prototype.RowNum;
/**
* 是否被选中
* @type {?}
*/
IRenderRow.prototype.Checked;
/**
* 该行关联的主键值,多字段用csv格式组合
* @type {?}
*/
IRenderRow.prototype.Key;
/** @type {?} */
IRenderRow.prototype.Data;
/**
* 绑定记录的处理按钮的可用性
* @type {?}
*/
IRenderRow.prototype.Processes;
}
/**
* 菜单项定义中的处理按钮的参数
* @record
*/
function IRecordViewProcess() { }
if (false) {
/** @type {?} */
IRecordViewProcess.prototype.Name;
/**
* [namespace]:[name] 的方式
* @type {?}
*/
IRecordViewProcess.prototype.Icon;
/**
* 图标的颜色
* @type {?}
*/
IRecordViewProcess.prototype.Color;
/** @type {?} */
IRecordViewProcess.prototype.ElementName;
/** @type {?} */
IRecordViewProcess.prototype.Element;
/** @type {?} */
IRecordViewProcess.prototype.BindRecord;
/**
* 传递到下一个工作元素的路径上,一般用来传递主键,如果为空则自动传递表的主键
* @type {?}
*/
IRecordViewProcess.prototype.TransPath;
/**
* 传递到下一个工作元素的参数,用模板来完成,
* 一般是用来传递到另一个RecordView的附加条件及标题
* @type {?}
*/
IRecordViewProcess.prototype.TransQuery;
/**
* 是否传递sql
* @type {?}
*/
IRecordViewProcess.prototype.WithSql;
/**
* 非空的话计算可见性,用templater的语法
* @type {?}
*/
IRecordViewProcess.prototype.Visable;
/**
* 动态传入的more参数,从recordview的query中提取
* @type {?}
*/
IRecordViewProcess.prototype.MoreStr;
}
/**
* @record
*/
function IFetchParamResult() { }
if (false) {
/** @type {?} */
IFetchParamResult.prototype.UniqueField;
/** @type {?} */
IFetchParamResult.prototype.Processes;
/** @type {?} */
IFetchParamResult.prototype.ConditionalTemplates;
}
/**
* @record
*/
function IDisplayColumn$1() { }
if (false) {
/** @type {?} */
IDisplayColumn$1.prototype.Name;
/** @type {?} */
IDisplayColumn$1.prototype.Hidden;
/** @type {?} */
IDisplayColumn$1.prototype.Order;
}
/**
* @record
*/
function IElementViewDigest() { }
if (false) {
/** @type {?} */
IElementViewDigest.prototype.OwnerBy;
/** @type {?} */
IElementViewDigest.prototype.Owner;
/** @type {?} */
IElementViewDigest.prototype.Name;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @enum {number} */
const DataType$1 = {
STR: 0,
INT: 1,
DATE: 2,
BYTEA: 3,
FLOAT: 4,
};
DataType$1[DataType$1.STR] = 'STR';
DataType$1[DataType$1.INT] = 'INT';
DataType$1[DataType$1.DATE] = 'DATE';
DataType$1[DataType$1.BYTEA] = 'BYTEA';
DataType$1[DataType$1.FLOAT] = 'FLOAT';
/** @type {?} */
const STR$1 = DataType$1.STR;
/** @type {?} */
const INT$1 = DataType$1.INT;
/** @type {?} */
const DATE$1 = DataType$1.DATE;
/** @type {?} */
const BYTEA$1 = DataType$1.BYTEA;
/** @type {?} */
const FLOAT$1 = DataType$1.FLOAT;
/**
* @record
*/
function Operate$1() { }
if (false) {
/** @type {?} */
Operate$1.prototype.Name;
/** @type {?} */
Operate$1.prototype.Label;
/** @type {?} */
Operate$1.prototype.AllowTypes;
}
// 各种数据类型允许使用的运算符
/** @type {?} */
const Operates$1 = [
{ Name: '=', Label: '等于', AllowTypes: [STR$1, INT$1, DATE$1, BYTEA$1, FLOAT$1] },
{ Name: '?', Label: '包含', AllowTypes: [STR$1, BYTEA$1] },
{ Name: '?>', Label: '前缀', AllowTypes: [STR$1, DATE$1, BYTEA$1] },
{ Name: 'e', Label: '为空', AllowTypes: [STR$1, INT$1, DATE$1, BYTEA$1, FLOAT$1] },
{ Name: '!=', Label: '不等于', AllowTypes: [STR$1, INT$1, DATE$1, BYTEA$1, FLOAT$1] },
{ Name: '>', Label: '大于', AllowTypes: [STR$1, INT$1, DATE$1, BYTEA$1, FLOAT$1] },
{ Name: '>=', Label: '大于等于', AllowTypes: [STR$1, INT$1, DATE$1, BYTEA$1, FLOAT$1] },
{ Name: '<', Label: '小于', AllowTypes: [STR$1, INT$1, DATE$1, BYTEA$1, FLOAT$1] },
{ Name: '<=', Label: '小于等于', AllowTypes: [STR$1, INT$1, DATE$1, BYTEA$1, FLOAT$1] },
{ Name: '!?', Label: '不包含', AllowTypes: [STR$1, BYTEA$1] },
{ Name: '!?>', Label: '非前缀', AllowTypes: [STR$1, DATE$1, BYTEA$1] },
{ Name: '<?', Label: '后缀', AllowTypes: [STR$1, DATE$1, BYTEA$1] },
{ Name: '!<?', Label: '非后缀', AllowTypes: [STR$1, DATE$1, BYTEA$1] },
{ Name: 'in', Label: '在列表', AllowTypes: [STR$1, INT$1, DATE$1, BYTEA$1, FLOAT$1] },
{ Name: '!in', Label: '不在列表', AllowTypes: [STR$1, INT$1, DATE$1, BYTEA$1, FLOAT$1] },
{ Name: '~', Label: '正则', AllowTypes: [STR$1] },
{ Name: '!~', Label: '非正则', AllowTypes: [STR$1] },
{ Name: '!e', Label: '非空', AllowTypes: [STR$1, INT$1, DATE$1, BYTEA$1, FLOAT$1] },
{ Name: '_', Label: '长度等于', AllowTypes: [STR$1, BYTEA$1] },
{ Name: '!_', Label: '长度不等于', AllowTypes: [STR$1, BYTEA$1] },
{ Name: '_>', Label: '长度大于', AllowTypes: [STR$1, BYTEA$1] },
{ Name: '_<', Label: '长度小于', AllowTypes: [STR$1, BYTEA$1] }
];
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @record
*/
function CacheFetchParam() { }
if (false) {
/** @type {?} */
CacheFetchParam.prototype.timeOutTime;
/** @type {?} */
CacheFetchParam.prototype.data;
}
/**
* @record
*/
function UpdateViewParam() { }
if (false) {
/** @type {?} */
UpdateViewParam.prototype.Name;
/** @type {?} */
UpdateViewParam.prototype.OwnerBy;
/** @type {?} */
UpdateViewParam.prototype.Owner;
/** @type {?} */
UpdateViewParam.prototype.Columns;
}
/**
* @record
*/
function UpdateViewNameParam() { }
if (false) {
/** @type {?} */
UpdateViewNameParam.prototype.OldName;
/** @type {?} */
UpdateViewNameParam.prototype.Name;
/** @type {?} */
UpdateViewNameParam.prototype.OwnerBy;
/** @type {?} */
UpdateViewNameParam.prototype.Owner;
}
/**
* @record
*/
function BuildRecordViewURLParam() { }
if (false) {
/** @type {?} */
BuildRecordViewURLParam.prototype.Title;
/** @type {?} */
BuildRecordViewURLParam.prototype.Condition;
/** @type {?|undefined} */
BuildRecordViewURLParam.prototype.More;
}
class BackFaceService {
/**
* @param {?} eleApi
* @param {?} api
* @param {?} eles
*/
constructor(eleApi, api, eles) {
this.eleApi = eleApi;
this.api = api;
this.eles = eles;
this.paramCache = new Map();
}
/**
* @param {?} param
* @return {?}
*/
buildRecordViewURL(param) {
return this.eleApi.get(this.eleName, 'build-record-view-url', param);
}
/**
* @private
* @template T
* @param {?} method
* @param {?=} param
* @return {?}
*/
apiGet(method, param) {
return this.api.get(this.url, method, this.eles.getURLSign(this.url), param);
}
/**
* @private
* @template T
* @param {?} method
* @param {?=} param
* @return {?}
*/
apiPost(method, param) {
return this.api.post(this.url, method, this.eles.getURLSign(this.url), param);
}
/**
* @param {?} param
* @return {?}
*/
fetchRowCount(param) {
return this.apiPost('fetch-row-count', param);
}
/**
* @param {?} param
* @return {?}
*/
fetchData(param) {
/** @type {?} */
const startTime = new Date().getTime();
return this.apiPost('fetch-data', param).pipe(map((/**
* @param {?} v
* @return {?}
*/
v => (Object.assign({}, v, { TimeConsuming: (new Date().getTime() - startTime) / 1000 })))));
}
/**
* @return {?}
*/
fetParamCache() {
if (this.paramCache.has(this.eleName)) {
/** @type {?} */
const data = this.paramCache.get(this.eleName);
// 如果没有超时则返回
if (data.timeOutTime > new Date()) {
return from([data.data]);
}
}
// console.log('fetch', eleName, 'param');
return this.apiGet('fetch-param').pipe(tap((/**
* @param {?} val
* @return {?}
*/
val => {
/** @type {?} */
const date = new Date();
date.setTime(date.getTime() + 5 * 1000 * 60); // 5分钟超时
this.paramCache.set(this.eleName, { timeOutTime: date, data: val });
})));
}
/**
* @return {?}
*/
fetchAllColumns() {
return this.apiGet('fetch-all-columns');
}
// 获取视图清单
/**
* @return {?}
*/
fetchElementViewList() {
return this.apiGet('fetch-element-view-list', this.eleName).pipe(map((/**
* @param {?} v
* @return {?}
*/
v => v.map((/**
* @param {?} vv
* @return {?}
*/
vv => ElementViewDigest.fromInterface(vv))))));
}
/**
* @param {?} param
* @return {?}
*/
getViewColumns(param) {
return this.apiGet('get-view-columns', param);
}
// 新增视图,只有名称,没有内容
/**
* @param {?} param
* @return {?}
*/
addView(param) {
return this.apiPost('add-view', param);
}
// 更新视图
/**
* @param {?} param
* @return {?}
*/
updateView(param) {
return this.apiPost('update-view', param);
}
// 更新视图名称
/**
* @param {?} param
* @return {?}
*/
updateViewName(param) {
return this.apiPost('update-view-name', param);
}
// 删除视图
/**
* @param {?} param
* @return {?}
*/
removeView(param) {
return this.apiPost('remove-view', param);
}
// 返回多个标签的涉及列
/**
* @return {?}
*/
comboLabelsView() {
return this.apiGet('combo-labels-view');
}
}
BackFaceService.decorators = [
{ type: Injectable }
];
/** @nocollapse */
BackFaceService.ctorParameters = () => [
{ type: ElementApiService },
{ type: ApiService },
{ type: ElementsService }
];
if (false) {
/** @type {?} */
BackFaceService.prototype.eleName;
/** @type {?} */
BackFaceService.prototype.url;
/** @type {?} */
BackFaceService.prototype.paramCache;
/**
* @type {?}
* @private
*/
BackFaceService.prototype.eleApi;
/**
* @type {?}
* @private
*/
BackFaceService.prototype.api;
/**
* @type {?}
* @private
*/
BackFaceService.prototype.eles;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
const defaultColumnsItem = ElementViewDigest.fromInterface({
Name: '(缺省显示列)',
Owner: ownerElement,
OwnerBy: OwnerByEnum.ownerByEle
});
/** @type {?} */
const combLabelColumnsItem = ElementViewDigest.fromInterface({
Name: '(所有标签并集)',
Owner: '',
OwnerBy: OwnerByEnum.unknow
});
class ConditionalTemplateRunner {
/**
* @param {?} data
* @return {?}
*/
static fromInterface(data) {
/** @type {?} */
const rev = new ConditionalTemplateRunner();
Object.assign(rev, data);
rev.Data = {
Field: data.Field,
Type: data.Type,
Value: null
};
return rev;
}
}
if (false) {
/** @type {?} */
ConditionalTemplateRunner.prototype.Type;
/** @type {?} */
ConditionalTemplateRunner.prototype.Field;
/** @type {?} */
ConditionalTemplateRunner.prototype.Setting;
/** @type {?} */
ConditionalTemplateRunner.prototype.Data;
/** @type {?} */
ConditionalTemplateRunner.prototype.enable;
}
class ServiceData {
constructor() {
// 条件模板的用户数据
this.rowProcesses = [];
// 不跟随数据行,下方工具栏的处理列表
this.toolbarProcesses = [];
// 选中的标签
this.selectedLabels = [];
// 上一页按钮可用性
this.prevPageDisable = true;
// 下一页按钮可用性
this.nextPageDisable = true;
// 保存的上一页的取值参数
this.upRowNum = [];
this.upDivide = [];
// 和当前数据对应的取数参数
this.prevFetchRowNum = null;
this.prevFetchDivide = null;
// 界面上的各种设置直接映射到该参数结构中
this.fetchParam = { Limit: 50 };
// 记录总数
this.rowCount = -1;
// 打开哪一个抽屉
this.showLabelDrawer = true;
// 耗时
this.timeConsuming = 0;
// 静态的视图
this.constViewItems = [defaultColumnsItem, combLabelColumnsItem];
this.tableRowSelection = new SelectionModel(true, []);
}
}
ServiceData.decorators = [
{ type: Injectable }
];
if (false) {
/** @type {?} */
ServiceData.prototype.conditionalTemplates;
/** @type {?} */
ServiceData.prototype.rowProcesses;
/** @type {?} */
ServiceData.prototype.toolbarProcesses;
/** @type {?} */
ServiceData.prototype.uniqueFields;
/** @type {?} */
ServiceData.prototype.allColumns;
/** @type {?} */
ServiceData.prototype.allColumnNames;
/** @type {?} */
ServiceData.prototype.allColumnsWithLetter;
/** @type {?} */
ServiceData.prototype.categories;
/** @type {?} */
ServiceData.prototype.selectedLabels;
/** @type {?} */
ServiceData.prototype.prevPageDisable;
/** @type {?} */
ServiceData.prototype.nextPageDisable;
/** @type {?} */
ServiceData.prototype.upRowNum;
/** @type {?} */
ServiceData.prototype.upDivide;
/** @type {?} */
ServiceData.prototype.prevFetchRowNum;
/** @type {?} */
ServiceData.prototype.prevFetchDivide;
/** @type {?} */
ServiceData.prototype.fetchParam;
/** @type {?} */
ServiceData.prototype.rowCount;
/** @type {?} */
ServiceData.prototype.tableData;
/** @type {?} */
ServiceData.prototype.showLabelDrawer;
/** @type {?} */
ServiceData.prototype.viewList;
/** @type {?} */
ServiceData.prototype.Operates;
/** @type {?} */
ServiceData.prototype.timeConsuming;
/** @type {?} */
ServiceData.prototype.constViewItems;
/** @type {?} */
ServiceData.prototype.selectedView;
/** @type {?} */
ServiceData.prototype.tableRowSelection;
/** @type {?} */
ServiceData.prototype.refreshDataProgress;
/** @type {?} */
ServiceData.prototype.refreshRowCountProgress;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class EditView {
/**
* @param {?} svr
*/
constructor(svr) {
this.svr = svr;
this.titleInput = true;
this.isAdd = true;
this.addOwnerBy = OwnerByEnum.ownerByUser; // 仅新增时用到
this.modify = false; // current是否被修改过
// current是否被修改过
this.currentChange = new EventEmitter();
}
/**
* @return {?}
*/
get current() {
return this._current;
}
/**
* @param {?} val
* @return {?}
*/
set current(val) {
/** @type {?} */
const process = (/**
* @return {?}
*/
() => {
this._current = val;
this.Readonly = !this._current.canModify(this.svr.current.data.UserName, this.svr.current.data.Dept.Code);
this.currentChange.emit();
});
if (val === combLabelColumnsItem) {
this.svr.backface.comboLabelsView().subscribe((/**
* @param {?} cols
* @return {?}
*/
cols => {
this.SelectedColumns = cols.map((/**
* @param {?} col
* @return {?}
*/
col => ({
Name: col,
Hidden: false,
Order: Order$1.OrderNone
})));
}));
process();
}
else {
this.svr.backface.getViewColumns(val).subscribe((/**
* @param {?} cols
* @return {?}
*/
cols => {
this.SelectedColumns = cols;
process();
}));
}
}
/**
* @return {?}
*/
done() {
if (this.isAdd) {
/** @type {?} */
const view = {
Name: this.title,
OwnerBy: this.addOwnerBy,
Owner: this.addOwnerBy === OwnerByEnum.ownerByDept
? this.svr.current.data.Dept.Code
: this.svr.current.data.UserName
};
return this.svr.backface.addView(view).pipe(map((/**
* @return {?}
*/
() => {
/** @type {?} */
const dView = ElementViewDigest.fromInterface(view);
this.svr.data.viewList.push(dView);
this.current = dView;
this.titleInput = false;
return true;
})));
}
else {
return this.svr.backface
.updateViewName({
OldName: this.current.Name,
Name: this.title,
OwnerBy: this.current.OwnerBy,
Owner: this.current.Owner
})
.pipe(map((/**
* @param {?} v
* @return {?}
*/
v => {
this.current.Name = this.title;
this.titleInput = false;
return true;
})));
}
}
/**
* @return {?}
*/
remove() {
this.svr.backface.removeView(this.current).subscribe((/**
* @return {?}
*/
() => {
/** @type {?} */
const num = this.svr.data.viewList.findIndex((/**
* @param {?} v
* @return {?}
*/
v => v === this.current));
this.svr.data.viewList.splice(num, 1);
if (this.svr.data.viewList.length > 0) {
if (num < this.svr.data.viewList.length) {
this.current = this.svr.data.viewList[num];
}
else {
this.current = this.svr.data.viewList[this.svr.data.viewList.length - 1];
}
}
else {
this.current = this.svr.data.constViewItems[0];
}
}));
}
/**
* @return {?}
*/
add() {
this.title = '新的视图';
this.isAdd = true;
this.titleInput = true;
}
/**
* @return {?}
*/
edit() {
this.title = this._current.Name;
this.isAdd = false;
this.titleInput = true;
}
/**
* @return {?}
*/
cancel() {
this.titleInput = false;
if (!this.current) {
if (this.svr.data.viewList && this.svr.data.viewList.length > 0) {
this.current = this.svr.data.viewList[0];
}
else {
this.current = this.svr.data.constViewItems[0];
}
}
}
/**
* @return {?}
*/
save() {
return this.svr.backface
.updateView({
Name: this.current.Name,
OwnerBy: this.current.OwnerBy,
Owner: this.current.Owner,
Columns: this.SelectedColumns
})
.pipe(tap((/**
* @return {?}
*/
() => {
this.modify = false;
})));
}
}
if (false) {
/** @type {?} */
EditView.prototype.titleInput;
/** @type {?} */
EditView.prototype.isAdd;
/** @type {?} */
EditView.prototype.addOwnerBy;
/** @type {?} */
EditView.prototype.title;
/**
* @type {?}
* @private
*/
EditView.prototype._current;
/** @type {?} */
EditView.prototype.Readonly;
/** @type {?} */
EditView.prototype.SelectedColumns;
/** @type {?} */
EditView.prototype.modify;
/** @type {?} */
EditView.prototype.currentChange;
/**
* @type {?}
* @private
*/
EditView.prototype.svr;
}
/**
* @record
*/
function RefreshDataConfig() { }
if (false) {
/** @type {?|undefined} */
RefreshDataConfig.prototype.keepDivide;
/** @type {?|undefined} */
RefreshDataConfig.prototype.keepRowCount;
}
class ServiceService {
/**
* @param {?} data
* @param {?} prj
* @param {?} backface
* @param {?} tabs
* @param {?} eles
* @param {?} current
* @param {?} eleview
* @param {?} snackBar
* @param {?} curr
*/
constructor(data, prj, backface, tabs, eles, current, eleview, snackBar, curr) {
this.data = data;
this.prj = prj;
this.backface = backface;
this.tabs = tabs;
this.eles = eles;
this.current = current;
this.eleview = eleview;
this.snackBar = snackBar;
this.curr = curr;
this.subscribe = [];
this.editView = new EditView(this);
this.paramsChange = new Subject(); // 参数发生变化,一般是初始化时一次,切换处理地一次
// 参数发生变化,一般是初始化时一次,切换处理地一次
// 标签定义界面的数据
this.refreshDataEvent = new EventEmitter();
}
/**
* @return {?}
*/
ngOnDestroy() {
this.subscribe.forEach((/**
* @param {?} v
* @return {?}
*/
v => v.unsubscribe()));
}
/**
* @param {?} element
* @param {?} title
* @param {?} condition
* @return {?}
*/
initByCondition(element, title, condition) {
this.backface.eleName = element.Name;
// 如果没有条件,则直接初始化
if (!title && !condition) {
this.init(element, this.prj.apiURL(element.Name));
}
else {
this.backface
.buildRecordViewURL({
Title: title,
Condition: condition
})
.subscribe((/**
* @param {?} str
* @return {?}
*/
str => {
this.init(element, str);
}));
}
}
/**
* @param {?} element
* @param {?} url
* @return {?}
*/
init(element, url) {
this.element = element;
this.backface.eleName = element.Name;
this.backface.url = url;
this.subscribe.push(this.curr.change$.subscribe((/**
* @return {?}
*/
() => {
// tslint:disable-next-line: deprecation
forkJoin(this.backface.fetParamCache(), this.eleview.fetchElementAllCategories(element.Name), this.backface.fetchElementViewList(), this.backface.fetchAllColumns()).subscribe((/**
* @param {?} __0
* @return {?}
*/
([param, categories, columnsList, allColumns]) => {
if (param.Processes) {
// 注册相关的element,必须是第一时间注册,后面会引用到
param.Processes.forEach((/**
* @param {?} v
* @return {?}
*/
v => {
this.eles.addElement(Object.assign({}, v.Element, { NotMenu: true }));
}));
this.data.rowProcesses = this.withDefaultIconProcess(param.Processes.filter((/**
* @param {?} one
* @return {?}
*/
one => one.BindRecord)));
this.data.toolbarProcesses = this.withDefaultIconProcess(param.Processes.filter((/**
* @param {?} one
* @return {?}
*/
one => !one.BindRecord)));
}
else {
this.data.rowProcesses = [];
this.data.toolbarProcesses = [];
}
this.data.uniqueFields = param.UniqueField;
if (param.ConditionalTemplates) {
this.data.conditionalTemplates = param.ConditionalTemplates.map((/**
* @param {?} v
* @return {?}
*/
v => ConditionalTemplateRunner.fromInterface(v)));
}
this.data.categories = categories;
this.data.viewList = columnsList;
this.data.selectedView = defaultColumnsItem;
this.data.allColumns = allColumns;
this.data.allColumnNames = allColumns.map((/**
* @param {?} v
* @return {?}
*/
v => v.Name));
this.data.allColumnsWithLetter = map2WithLetter(this.data.allColumnNames);
this.paramsChange.next();
this.refreshData().subscribe();
}), (/**
* @param {?} err
* @return {?}
*/
(err) => {
console.log(err);
if (err.error.Err.Message) {
this.snackBar.open(err.error.Err.Message, '确定', { horizontalPosition: 'right' });
}
}));
})));
}
/**
* @param {?} process
* @return {?}
*/
withDefaultIconProcess(process) {
return process.map((/**
* @param {?} pro
* @return {?}
*/
pro => {
/** @type {?} */
const rev = pro;
if (!pro.Icon) {
/** @type {?} */
const ele = this.eles.get(pro.ElementName);
if (ele.Bill) {
switch (pro.Element.BillOperate) {
case BillOperate.Add:
rev.Icon = 'add';
break;
case BillOperate.Edit:
rev.Icon = 'outlined:create';
break;
case BillOperate.Browse:
rev.Icon = 'outlined:visibility';
break;
case BillOperate.Delete:
rev.Icon = 'outlined:delete';
rev.Color = 'warn';
break;
}
}
else {
rev.Icon = '';
}
}
return rev;
}));
}
/**
* @return {?}
*/
refreshRowCount() {
this.data.fetchParam.View = this.data.selectedView;
this.data.fetchParam.Labels = this.data.selectedLabels;
this.data.fetchParam.SelKeys = this.data.tableRowSelection.selected;
this.data.refreshRowCountProgress = true;
if (this.data.conditionalTemplates) {
this.data.fetchParam.ConditionalTemplate = this.data.conditionalTemplates
.filter((/**
* @param {?} v
* @return {?}
*/
v => v.enable))
.map((/**
* @param {?} v
* @return {?}
*/
v => v.Data));
}
return this.backface.fetchRowCount(this.data.fetchParam).pipe(map((/**
* @param {?} v
* @return {?}
*/
v => {
this.data.rowCount = v.RowCount;
this.data.refreshRowCountProgress = false;
return true;
})));
}
// seek 指明是不是没有动过条件,仅仅翻页
/**
* @param {?=} config
* @return {?}
*/
refreshData(config) {
if (config && config.keepDivide) {
this.data.prevFetchDivide = this.data.fetchParam.Divide;
this.data.prevFetchRowNum = this.data.fetchParam.DivideRowNum;
}
else {
this.data.prevFetchDivide = undefined;
this.data.prevFetchRowNum = undefined;
this.data.fetchParam.Divide = undefined;
this.data.fetchParam.DivideRowNum = undefined;
this.data.upDivide = undefined;
this.data.upRowNum = undefined;
}
this.data.fetchParam.View = this.data.selectedView;
this.data.fetchParam.Labels = this.data.selectedLabels;
this.data.fetchParam.SelKeys = this.data.tableRowSelection.selected;
this.data.refreshDataProgress = true;
if (this.data.conditionalTemplates) {
this.data.fetchParam.ConditionalTemplate = this.data.conditionalTemplates
.filter((/**
* @param {?} v
* @return {?}
*/
v => v.enable))
.map((/**
* @param {?} v
* @return {?}
*/
v => v.Data));
}
return this.backface.fetchData(this.data.fetchParam).pipe(map((/**
* @param {?} v
* @return {?}
*/
v => {
if (v.Error) {
this.snackBar.open(v.Error, '确定', { duration: 5000 });
this.data.refreshDataProgress = false;
return { ok: false, error: v.Error };
}
// console.log('=======:', v.FData);
this.data.tableData = v.FData;
this.data.timeConsuming = v.TimeConsuming;
this.data.nextPageDisable =
(v.FData.RowCount === 0 && v.FData.Rows.length === 0) || v.FData.RowCount > 0;
this.data.prevPageDisable =
(v.FData.RowCount === 0 && v.FData.Rows.length === 0) || v.FData.Rows[0].RowNum === 1;
this.registerURLS();
if (v.FData.RowCount >= 0) {
this.data.rowCount = v.FData.RowCount;
}
else {
if (!config || !config.keepRowCount) {
this.data.rowCount = -1; // 放这里可以防止界面无必要刷新
}
}
// 如果后端返回title,则说明是需要动态改变title值
if (v.FData.Title) {
this.tabs.active.titleObservable.next(v.FData.Title);
}
this.refreshDataEvent.emit(config);
this.data.refreshDataProgress = false;
return { ok: true };
})));
}
// 注册相关的url的签名
/**
* @return {?}
*/
registerURLS() {
Object.keys(this.data.tableData.Processes).forEach((/**
* @param {?} v
* @return {?}
*/
v => {
this.eles.setURLSign(this.data.tableData.Processes[v].URL, this.data.tableData.Processes[v].Sign);
}));
this.data.tableData.Rows.forEach((/**
* @param {?} row
* @return {?}
*/
row => {
Object.keys(row.Processes).forEach((/**
* @param {?} v
* @return {?}
*/
v => {
this.eles.setURLSign(row.Processes[v].URL, row.Processes[v].Sign);
}));
}));
}
// 获取指定列允许使用的运算符
/**
* @private
* @param {?} col
* @return {?}
*/
getOperates(col) {
if (!col) {
return [];
}
/** @type {?} */
const colType = DataType$1[this.data.tableData.Columns.find((/**
* @param {?} c
* @return {?}
*/
c => c.Name === col)).Type];
return [
(/** @type {?} */ ({
Name: '',
Label: '(无)'
})),
...Operates$1.filter((/**
* @param {?} v
* @return {?}
*/
v => v.AllowTypes.includes(colType)))
];
}
/**
* @param {?} colName
* @return {?}
*/
onColumnChange(colName) {
this.data.Operates = this.getOperates(colName);
// 如果之前的运算符已经不在列表中,则默认为 无
if (this.data.fetchParam.Opt && !this.data.Operates.find((/**
* @param {?} v
* @return {?}
*/
v => v.Name === this.data.fetchParam.Opt))) {
this.data.fetchParam.Opt = null;
}
}
}
ServiceService.decorators = [
{ type: Injectable }
];
/** @nocollapse */
ServiceService.ctorParameters = () => [
{ type: ServiceData },
{ type: ProjectService },
{ type: BackFaceService },
{ type: TabsService },
{ type: ElementsService },
{ type: CurrentService },
{ type: EleViewBackFaceService },
{ type: MatSnackBar },
{ type: CurrentService }
];
if (false) {
/**
* @type {?}
* @private
*/
ServiceService.prototype.subscribe;
/** @type {?} */
ServiceService.prototype.element;
/** @type {?} */
ServiceService.prototype.editView;
/** @type {?} */
ServiceService.prototype.paramsChange;
/** @type {?} */
ServiceService.prototype.refreshDataEvent;
/** @type {?} */
ServiceService.prototype.data;
/**
* @type {?}
* @private
*/
ServiceService.prototype.prj;
/** @type {?} */
ServiceService.prototype.backface;
/**
* @type {?}
* @private
*/
ServiceService.prototype.tabs;
/**
* @type {?}
* @private
*/
ServiceService.prototype.eles;
/** @type {?} */
ServiceService.prototype.current;
/**
* @type {?}
* @private
*/
ServiceService.prototype.eleview;
/**
* @type {?}
* @private
*/
ServiceService.prototype.snackBar;
/**
* @type {?}
* @private
*/
ServiceService.prototype.curr;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class FooterToolbarComponent {
// 用来控制翅膀是否展开
/**
* @param {?} svr
* @param {?} eles
*/
constructor(svr, eles) {
this.svr = svr;
this.eles = eles;
this.refreshDisable = false;
this.nextPageDisable = false;
this.PrevPageDisable = false;
this.processClick = new EventEmitter();
this.rowCountClick = new EventEmitter();
this.prevPageClick = new EventEmitter();
this.nextPageClick = new EventEmitter();
this.Math = Math;
}
/**
* @return {?}
*/
ngOnInit() { }
/**
* @return {?}
*/
pageText() {
// 小于0,则是不知道记录总数
if (this.rowCount > 0) {
return `${Math.ceil(this.startRowNo / this.pageSize)}/${Math.ceil(this.rowCount / this.pageSize)}页`;
}
return `第${Math.ceil(this.startRowNo / this.pageSize)}页`;
}
/**
* @return {?}
*/
rowCountText() {
if (this.rowCount >= 0) {
return `${this.rowCount.toString()}`;
}
return '/';
}
/**
* @return {?}
*/
responseTimeText() {
if (this.responseTime > 1) {
return this.responseTime.toFixed(2) + ' s';
}
else {
return (this.responseTime * 1000).toFixed(0) + ' ms';
}
}
}
FooterToolbarComponent.decorators = [
{ type: Component, args: [{
selector: 'common-footer-toolbar',
template: "<div class=\"\u5E95\u90E8\u5DE5\u5177\u6761\">\r\n\t<div class=\"\u64CD\u4F5C\u5F00\u5173\">\r\n\t\t<mat-icon class=\"\u8865\u5145\" svgIcon=\"bg_bottom_out\"></mat-icon>\r\n\t\t<!-- <div class=\"\u7FC5\u8180\u56FE\u6807\"></div> -->\r\n\t\t<img class=\"\u7FC5\u8180\u56FE\u6807\" (mouseover)=\"wingAnimation = true\" (mouseout)=\"wingAnimation = false\"\r\n\t\t\tsrc=\"{{ wingAnimation ? 'assets/record-view/\u4FEE\u6539\u7FBD\u6BDB.gif' : 'assets/record-view/\u4FEE\u6539\u7FBD\u6BDB.png' }}\"\r\n\t\t\t[matMenuTriggerFor]=\"openMenu\" alt=\"\" />\r\n\t</div>\r\n\t<mat-menu #openMenu=\"matMenu\" overlapTrigger=\"true\">\r\n\t\t<div class=\"\u5E95\u90E8\u5DE5\u5177\">\r\n\t\t\t<div *ngFor=\"let pro of process\" class=\"process\" (click)=\"processClick.emit(pro)\">\r\n\t\t\t\t<mat-icon class=\"page-icon\" [svgIcon]=\"pro.Icon? pro.Icon : 'default'\" [color]=\"pro.Color\"> </mat-icon>\r\n\t\t\t\t<p class=\"text\">{{ pro.Name }}</p>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</mat-menu>\r\n\t<div class=\"\u7FFB\u9875\u529F\u80FD\">\r\n\t\t<div class=\"\u9875\u7801\">\r\n\t\t\t\u8BB0\u5F55\u603B\u6570 <span class=\"\u603B\u6570 \u663E\u773C\">{{ rowCountText() }}</span>\r\n\t\t</div>\r\n\t\t<div class=\"\u5237\u65B0\" [class.\u5237\u65B0\u52A8\u753B]=\"!svr.data.refreshRowCountProgress\" (click)=\"rowCountClick.emit($event)\">\r\n\t\t\t<mat-icon class=\"\u5237\u65B0\u56FE\u6807 \u663E\u773C\" [class.\u5237\u65B0\u56FE\u6807\u52A8\u753B]=\"svr.data.refreshRowCountProgress\" svgIcon=\"cached\">\r\n\t\t\t</mat-icon>\r\n\t\t</div>\r\n\t\t<div class=\"\u54CD\u5E94\u65F6\u95F4\">\r\n\t\t\t\u54CD\u5E94\u65F6\u95F4\r\n\t\t\t<span *ngIf=\"!svr.data.refreshDataProgress\" class=\"\u603B\u6570 \u663E\u773C\">{{ responseTimeText() }}</span>\r\n\t\t\t<div class=\"\u8FDB\u5EA6\u6761\" [ngClass]=\"{ hide: !svr.data.refreshDataProgress }\">\r\n\t\t\t\t<img src=\"assets/record-view/tip.png\" alt=\"\u8FDB\u5EA6\u6761\" />\r\n\t\t\t</div>\r\n\t\t</div>\r\n\r\n\t\t<button class=\"bottoms\" mat-icon-button (click)=\"prevPageClick.emit($event)\" [disabled]=\"PrevPageDisable\">\r\n\t\t\t<mat-icon svgIcon=\"chevron_left\"> </mat-icon>\r\n\t\t</button>\r\n\t\t<div class=\"\u9875\u7801 \u663E\u773C\" *ngIf=\"rowCount > 0; else pageElse\">\r\n\t\t\t{{ Math.ceil(this.startRowNo / this.pageSize) }}/{{ Math.ceil(this.rowCount / this.pageSize) }}\u9875\r\n\t\t</div>\r\n\t\t<ng-template #pageElse>\r\n\t\t\t<div class=\"\u9875\u7801 \u663E\u773C\">\u7B2C{{ Math.ceil(this.startRowNo / this.pageSize) }}\u9875</div>\r\n\t\t</ng-template>\r\n\t\t<button class=\"bottoms\" mat-icon-button (click)=\"nextPageClick.emit($event)\" [disabled]=\"nextPageDisable\">\r\n\t\t\t<mat-icon svgIcon=\"chevron_right\"> </mat-icon>\r\n\t\t</button>\r\n\t</div>\r\n</div>",
styles: ["@charset \"UTF-8\";:host{width:100%;height:24px;box-sizing:border-box;z-index:999;position:absolute;bottom:0;left:0}.\u5E95\u90E8\u5DE5\u5177\u6761{width:100%;height:100%;position:relative}.\u5E95\u90E8\u5DE5\u5177\u6761 .\u64CD\u4F5C\u5F00\u5173{width:98px;height:53px;position:absolute;left:0;bottom:0;text-align:center}.\u5E95\u90E8\u5DE5\u5177\u6761 .\u64CD\u4F5C\u5F00\u5173 .\u8865\u5145{width:98px;position:absolute;left:0;bottom:23px}.\u5E95\u90E8\u5DE5\u5177\u6761 .\u64CD\u4F5C\u5F00\u5173 .\u7FC5\u8180\u56FE\u6807{cursor:pointer;position:absolute;left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:32px;height:32px}.\u5E95\u90E8\u5DE5\u5177\u6761 .\u7FFB\u9875\u529F\u80FD{height:24px;position:absolute;top:0;right:24px;line-height:24px;font-size:12px;display:flex;justify-content:flex-start;align-items:center}.\u5E95\u90E8\u5DE5\u5177\u6761 .\u7FFB\u9875\u529F\u80FD .\u9875\u7801{line-height:24px;vertical-align:top}.\u5E95\u90E8\u5DE5\u5177\u6761 .\u7FFB\u9875\u529F\u80FD .\u9875\u7801 .\u603B\u6570{text-align:center;display:inline-block;min-width:15px;margin-left:8px}.\u5E95\u90E8\u5DE5\u5177\u6761 .\u7FFB\u9875\u529F\u80FD .\u663E\u773C{color:#fff}.\u5E95\u90E8\u5DE5\u5177\u6761 .\u7FFB\u9875\u529F\u80FD .\u54CD\u5E94\u65F6\u95F4{display:inline-block;vertical-align:top;height:24px}.\u5E95\u90E8\u5DE5\u5177\u6761 .\u7FFB\u9875\u529F\u80FD .\u54CD\u5E94\u65F6\u95F4 .\u603B\u6570{text-align:left;display:inline-block;width:45px;height:24px;margin-left:8px;margin-right:32px;vertical-align:top}.\u5E95\u90E8\u5DE5\u5177\u6761 .\u7FFB\u9875\u529F\u80FD .\u54CD\u5E94\u65F6\u95F4 .\u8FDB\u5EA6\u6761{width:64px;height:8px;line-height:8px;border-radius:4px;margin-right:13px;margin-left:8px;display:inline-block;overflow:hidden}.\u5E95\u90E8\u5DE5\u5177\u6761 .\u7FFB\u9875\u529F\u80FD .\u54CD\u5E94\u65F6\u95F4 .\u8FDB\u5EA6\u6761 img{-webkit-animation:2s linear infinite progressBar;animation:2s linear infinite progressBar}@-webkit-keyframes progressBar{from{-webkit-transform:translateX(-60px);transform:translateX(-60px)}to{-webkit-transform:translateX(-5px);transform:translateX(-5px)}}@keyframes progressBar{from{-webkit-transform:translateX(-60px);transform:translateX(-60px)}to{-webkit-transform:translateX(-5px);transform:translateX(-5px)}}.\u5E95\u90E8\u5DE5\u5177\u6761 .\u7FFB\u9875\u529F\u80FD .bottoms{margin:0 8px;padding:0;width:24px;height:24px;line-height:19px}.\u5E95\u90E8\u5DE5\u5177\u6761 .\u7FFB\u9875\u529F\u80FD .\u5237\u65B0{width:24px;height:24px;text-align:center;display:inline-block;margin:0 24px 0 8px;padding:4px;box-sizing:border-box}.\u5E95\u90E8\u5DE5\u5177\u6761 .\u7FFB\u9875\u529F\u80FD .\u5237\u65B0 .\u5237\u65B0\u56FE\u6807{width:16px;height:16px;line-height:16px}.\u5E95\u90E8\u5DE5\u5177\u6761 .\u7FFB\u9875\u529F\u80FD .\u5237\u65B0 .\u5237\u65B0\u56FE\u6807\u52A8\u753B{-webkit-animation:1s linear infinite refresh;animation:1s linear infinite refresh}@-webkit-keyframes refresh{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(-360deg);transform:rotate(-360deg)}}@keyframes refresh{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(-360deg);transform:rotate(-360deg)}}::ng-deep .mat-menu-panel{max-width:none!important}.\u5E95\u90E8\u5DE5\u5177{width:328px;padding:16px 16px 8px;box-sizing:border-box;display:flex;align-items:stretch;flex-wrap:wrap;justify-content:flex-start}.\u5E95\u90E8\u5DE5\u5177 .process{width:64px;padding:8px 0;text-align:center;margin:0 4px;cursor:pointer}.\u5E95\u90E8\u5DE5\u5177 .text{width:64px;font-size:14px;margin:0}.hide{display:none!important}"]
}] }
];
/** @nocollapse */
FooterToolbarComponent.ctorParameters = () => [
{ type: ServiceService },
{ type: ElementsService }
];
FooterToolbarComponent.propDecorators = {
class: [{ type: Input }],
process: [{ type: Input }],
pageSize: [{ type: Input }],
startRowNo: [{ type: Input }],
rowCount: [{ type: Input }],
responseTime: [{ type: Input }],
refreshDisable: [{ type: Input }],
nextPageDisable: [{ type: Input }],
PrevPageDisable: [{ type: Input }],
processClick: [{ type: Output }],
rowCountClick: [{ type: Output }],
prevPageClick: [{ type: Output }],
nextPageClick: [{ type: Output }]
};
if (false) {
/** @type {?} */
FooterToolbarComponent.prototype.class;
/** @type {?} */
FooterToolbarComponent.prototype.process;
/** @type {?} */
FooterToolbarComponent.prototype.pageSize;
/** @type {?} */
FooterToolbarComponent.prototype.startRowNo;
/** @type {?} */
FooterToolbarComponent.prototype.rowCount;
/** @type {?} */
FooterToolbarComponent.prototype.responseTime;
/** @type {?} */
FooterToolbarComponent.prototype.refreshDisable;
/** @type {?} */
FooterToolbarComponent.prototype.nextPageDisable;
/** @type {?} */
FooterToolbarComponent.prototype.PrevPageDisable;
/** @type {?} */
FooterToolbarComponent.prototype.processClick;
/** @type {?} */
FooterToolbarComponent.prototype.rowCountClick;
/** @type {?} */
FooterToolbarComponent.prototype.prevPageClick;
/** @type {?} */
FooterToolbarComponent.prototype.nextPageClick;
/** @type {?} */
FooterToolbarComponent.prototype.Math;
/** @type {?} */
FooterToolbarComponent.prototype.wingAnimation;
/** @type {?} */
FooterToolbarComponent.prototype.svr;
/**
* @type {?}
* @private
*/
FooterToolbarComponent.prototype.eles;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class LabelDrawerForEditComponent {
/**
* @param {?} svr
* @param {?} dialog
* @param {?} eleviewBackFace
*/
constructor(svr, dialog, eleviewBackFace) {
this.svr = svr;
this.dialog = dialog;
this.eleviewBackFace = eleviewBackFace;
this.hostClass = true;
this.back = new EventEmitter();
}
/**
* @return {?}
*/
ngOnInit() { }
}
LabelDrawerForEditComponent.decorators = [
{ type: Component, args: [{
selector: 'common-label-drawer-for-edit',
template: "<div class=\"content\">\r\n\t<common-label-manager\r\n\t\t[eleName]=\"svr.element.Name\"\r\n\t\t[ownerBy]=\"category.OwnerBy\"\r\n\t\t[owner]=\"this.category.Owner\"\r\n\t\t[title]=\"this.category.categoryDisplayLabel()\"\r\n\t\t[allColumnsWithLetter]=\"svr.data.allColumnsWithLetter\"\r\n\t\t[backface]=\"eleviewBackFace\"\r\n\t\t(close)=\"back.emit()\"\r\n\t>\r\n\t</common-label-manager>\r\n</div>\r\n",
styles: [":host{width:618px;height:100%;box-sizing:border-box}.edit-list{width:618px;height:100%;box-sizing:border-box;display:flex;flex-direction:column}.content{width:618px;height:100%;overflow-y:auto;box-sizing:border-box}"]
}] }
];
/** @nocollapse */
LabelDrawerForEditComponent.ctorParameters = () => [
{ type: ServiceService },
{ type: MatDialog },
{ type: EleViewBackFaceService }
];
LabelDrawerForEditComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.label-drawer-for-edit',] }],
back: [{ type: Output }],
category: [{ type: Input }]
};
if (false) {
/** @type {?} */
LabelDrawerForEditComponent.prototype.hostClass;
/** @type {?} */
LabelDrawerForEditComponent.prototype.back;
/** @type {?} */
LabelDrawerForEditComponent.prototype.category;
/** @type {?} */
LabelDrawerForEditComponent.prototype.svr;
/** @type {?} */
LabelDrawerForEditComponent.prototype.dialog;
/** @type {?} */
LabelDrawerForEditComponent.prototype.eleviewBackFace;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class LabelDrawerForSelectComponent {
/**
* @param {?} svr
*/
constructor(svr) {
this.svr = svr;
this.edit = new EventEmitter();
this.close = new EventEmitter();
this.hostClass = true;
this.panelActiveIndex = 0;
this.panelOpenState = {};
this.subject = [];
}
/**
* @return {?}
*/
ngOnDestroy() {
this.subject.forEach((/**
* @param {?} v
* @return {?}
*/
v => v.unsubscribe()));
}
/**
* @return {?}
*/
ngAfterViewInit() {
this.subject.push(this.svr.paramsChange.subscribe((/**
* @return {?}
*/
() => {
this.panelActiveIndex = 0;
this.panelOpenState = [];
})));
}
/**
* @param {?} index
* @return {?}
*/
removeLabel(index) {
this.selectedLabels.splice(index, 1);
}
/**
* @return {?}
*/
ok() {
/** @type {?} */
const old = [...this.svr.data.selectedLabels];
this.svr.data.selectedLabels.splice(0, this.svr.data.selectedLabels.length, ...this.selectedLabels);
this.subject.push(this.svr.refreshData().subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
if (v.ok) {
this.close.emit();
}
else {
this.svr.data.selectedLabels.splice(0, this.svr.data.selectedLabels.length, ...old);
alert(v.error);
}
})));
}
/**
* @param {?} index
* @return {?}
*/
panelOpened(index) {
this.panelActiveIndex = index;
this.panelOpenState[index] = true;
}
/**
* @param {?} index
* @return {?}
*/
panelClosed(index) {
this.panelOpenState[index] = false;
}
}
LabelDrawerForSelectComponent.decorators = [
{ type: Component, args: [{
selector: 'common-label-drawer-for-select',
template: "<div class=\"title\">\r\n\t<span class=\"title-label\">\r\n\t\t\u6807\u7B7E (<span\r\n\t\t\t[class.\u9009\u4E2D\u7684\u6570\u503C]=\"selectedLabels?.length > 0\">{{ selectedLabels?.length }}</span>)\r\n\t</span>\r\n</div>\r\n<mat-chip-list class=\"\u6807\u7B7E\u82AF\u7247\" *ngIf=\"selectedLabels.length > 0\">\r\n\t<mat-chip *ngFor=\"let selectedLabel of selectedLabels; let index = index\"\r\n\t\t[matTooltip]=\"selectedLabel?.Name\">\r\n\t\t<span class=\"\u6807\u7B7E\">{{ selectedLabel?.Name }}</span>\r\n\t\t<mat-icon class=\"\u5220\u9664\u6807\u7B7E\" (click)=\"removeLabel(index)\" svgIcon=\"close\">\r\n\t\t</mat-icon>\r\n\t</mat-chip>\r\n</mat-chip-list>\r\n<mat-accordion class=\"content\">\r\n\t<mat-expansion-panel\r\n\t\t*ngFor=\"let category of svr.data.categories; let index = index;first as isFirst\"\r\n\t\t[expanded]=\"isFirst\" (opened)=\"panelOpened(index)\"\r\n\t\t(closed)=\"panelClosed(index)\" [class.\u5C55\u5F00\u533A\u80CC\u666F]=\"panelOpenState[index]\"\r\n\t\t[class.\u5E95\u8FB9\u6846]=\"svr.data.categories.length == index + 1\">\r\n\t\t<mat-expansion-panel-header [class.\u5C55\u5F00]=\"panelOpenState[index]\"\r\n\t\t\t[collapsedHeight]=\"'40px'\" [expandedHeight]=\"'40px'\">\r\n\t\t\t<!-- <mat-divider class=\"divider-top\"></mat-divider> -->\r\n\t\t\t<div class=\"\u6ED1\u5757\" *ngIf=\"panelActiveIndex === index\"></div>\r\n\t\t\t<mat-panel-title [ngClass]=\"{ openItem: panelOpenState[index] }\">\r\n\t\t\t\t{{category.categoryDisplayLabel()}}</mat-panel-title>\r\n\t\t\t<mat-panel-description *ngIf=\"panelOpenState[index]\">\r\n\t\t\t\t<button mat-icon-button (click)=\"edit.emit(category)\">\r\n\t\t\t\t\t<mat-icon svgIcon=\"edit\"></mat-icon>\r\n\t\t\t\t</button>\r\n\t\t\t</mat-panel-description>\r\n\t\t</mat-expansion-panel-header>\r\n\t\t<common-label-select [selectedLabels]=\"selectedLabels\"\r\n\t\t\t[eleName]=\"svr.element.Name\" [ownerBy]=\"category.OwnerBy\"\r\n\t\t\t[owner]=\"category.Owner\">\r\n\t\t</common-label-select>\r\n\t</mat-expansion-panel>\r\n</mat-accordion>\r\n<div class=\"footer\">\r\n\t<div class=\"button-bar\">\r\n\t\t<button (click)=\"close.emit()\" mat-button>\u53D6\u6D88</button>\r\n\t\t<button (click)=\"ok()\" mat-flat-button color=\"primary\"\r\n\t\t\tmat-button>\u5B8C\u6210</button>\r\n\t</div>\r\n</div>",
styles: ["@charset \"UTF-8\";:host{display:flex;flex-direction:column;width:618px;height:100%;box-sizing:border-box}.title{display:flex;padding:16px 16px 8px 24px;justify-content:space-between}.title-label{font-size:18px;font-weight:700}.\u6807\u7B7E\u82AF\u7247{max-width:100%;padding:8px}.\u6807\u7B7E\u82AF\u7247 .mat-chip{width:108px;padding-right:24px;margin:4px;border-radius:4px;position:relative}.\u6807\u7B7E\u82AF\u7247 .mat-chip .\u6807\u7B7E{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block}.\u6807\u7B7E\u82AF\u7247 .mat-chip .\u5220\u9664\u6807\u7B7E{position:absolute;right:8px;top:8px}.\u6807\u7B7E\u82AF\u7247 .mat-icon{width:16px;height:16px}.\u9690\u85CF{display:none}.footer{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;padding:16px}.footer .footer-search{display:inline-block;height:24px;width:152px;line-height:24px;padding:0 24px 0 8px;border-radius:4px;font-size:12px;position:relative}.footer .footer-search input{height:24px}.footer .footer-search .mat-icon{position:absolute;top:0;right:0;margin:0}.content{flex-grow:1;overflow-y:auto;box-sizing:border-box}.content .mat-expansion-panel{box-shadow:none;margin:0;padding:8px 0 0;position:relative}.content .mat-expansion-panel-header-title{font-size:18px;font-weight:700;line-height:40px}.content .mat-expansion-panel-header-description{flex-grow:0}.content .mat-expansion-panel-header{height:40px!important;padding:0 16px;position:relative}.content .mat-expansion-panel-spacing{margin:0}.content .\u6ED1\u5757{width:8px;height:32px;position:absolute;left:0;top:4px}.content .divider-top{width:100%;height:1px;position:absolute;left:0;top:0}.content .divider-bottom{width:100%;height:1px;position:absolute;left:0;bottom:0}.content .\u5C55\u5F00 ::ng-deep .mat-expansion-indicator{display:inline-block;margin:10px 0 0}"]
}] }
];
/** @nocollapse */
LabelDrawerForSelectComponent.ctorParameters = () => [
{ type: ServiceService }
];
LabelDrawerForSelectComponent.propDecorators = {
selectedLabels: [{ type: Input }],
edit: [{ type: Output }],
close: [{ type: Output }],
hostClass: [{ type: HostBinding, args: ['class.label-drawer-for-select',] }],
accordionPanel: [{ type: ViewChildren, args: ['accordionPanel',] }]
};
if (false) {
/** @type {?} */
LabelDrawerForSelectComponent.prototype.selectedLabels;
/** @type {?} */
LabelDrawerForSelectComponent.prototype.edit;
/** @type {?} */
LabelDrawerForSelectComponent.prototype.close;
/** @type {?} */
LabelDrawerForSelectComponent.prototype.hostClass;
/** @type {?} */
LabelDrawerForSelectComponent.prototype.accordionPanel;
/** @type {?} */
LabelDrawerForSelectComponent.prototype.panelActiveIndex;
/** @type {?} */
LabelDrawerForSelectComponent.prototype.panelOpenState;
/**
* @type {?}
* @private
*/
LabelDrawerForSelectComponent.prototype.subject;
/** @type {?} */
LabelDrawerForSelectComponent.prototype.svr;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class LabelDrawerComponent {
constructor() {
this.editModel = false;
this.selectedLabels = [];
this.hostClass = true;
this.close = new EventEmitter();
}
/**
* @return {?}
*/
ngOnInit() {
console.log('start', this.editModel);
}
/**
* @param {?} event
* @return {?}
*/
editClick(event) {
this.editCategory = event;
this.editModel = true;
}
}
LabelDrawerComponent.decorators = [
{ type: Component, args: [{
selector: 'common-label-drawer',
template: "<common-label-drawer-for-select (close)=\"close.emit($event)\"\r\n\t[selectedLabels]=\"selectedLabels\" *ngIf=\"!editModel\"\r\n\t(edit)=\"editClick($event)\">\r\n</common-label-drawer-for-select>\r\n<common-label-drawer-for-edit *ngIf=\"editModel\" (back)=\"editModel=false\"\r\n\t[category]=\"editCategory\">\r\n</common-label-drawer-for-edit>",
styles: [":host{height:618px}"]
}] }
];
/** @nocollapse */
LabelDrawerComponent.ctorParameters = () => [];
LabelDrawerComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.label-drawer',] }],
close: [{ type: Output }]
};
if (false) {
/** @type {?} */
LabelDrawerComponent.prototype.editModel;
/** @type {?} */
LabelDrawerComponent.prototype.selectedLabels;
/** @type {?} */
LabelDrawerComponent.prototype.editCategory;
/** @type {?} */
LabelDrawerComponent.prototype.hostClass;
/** @type {?} */
LabelDrawerComponent.prototype.close;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class LabelSelectorComponent {
/**
* @param {?} svr
*/
constructor(svr) {
this.svr = svr;
this.chipListShow = true;
this.open = new EventEmitter();
this.hostClass = true;
}
/**
* @return {?}
*/
ngOnInit() { }
/**
* @param {?} index
* @return {?}
*/
deleteLabel(index) {
this.svr.data.selectedLabels.splice(index, 1);
this.svr.refreshData().subscribe();
}
}
LabelSelectorComponent.decorators = [
{ type: Component, args: [{
selector: 'common-label-selector',
template: "<mat-chip-list *ngIf=\"chipListShow\" class=\"\u6807\u7B7E\u82AF\u7247\">\r\n\t<mat-chip\r\n\t\t*ngFor=\"let selectedLabel of svr.data.selectedLabels.slice(0, 3); let index = index\"\r\n\t\t[matTooltip]=\"selectedLabel?.Name\"\r\n\t>\r\n\t\t<span class=\"\u6807\u7B7E\">{{ selectedLabel?.Name }}</span>\r\n\t\t<mat-icon class=\"\u5220\u9664\u6807\u7B7E\" (click)=\"deleteLabel(index)\" svgIcon=\"close\"> </mat-icon>\r\n\t</mat-chip>\r\n</mat-chip-list>\r\n<mat-icon\r\n\t*ngIf=\"svr.data.selectedLabels?.length > 3\"\r\n\t(click)=\"chipListShow = false\"\r\n\tsvgIcon=\"double_down\"\r\n\t[matMenuTriggerFor]=\"beforeMenu\"\r\n\tclass=\"\u5411\u4E0B\u53CC\u7BAD\u5934\"\r\n>\r\n</mat-icon>\r\n<mat-menu #beforeMenu=\"matMenu\" xPosition=\"before\" overlapTrigger=\"true\" (closed)=\"chipListShow = true\">\r\n\t<div class=\"\u6807\u7B7E\u83DC\u5355\">\r\n\t\t<mat-icon class=\"\u5411\u4E0A\u6807\u7B7E\u7BAD\u5934\" svgIcon=\"double_down\"></mat-icon>\r\n\t\t<mat-chip-list>\r\n\t\t\t<mat-chip\r\n\t\t\t\t*ngFor=\"let selectedLabel of svr.data.selectedLabels; let index\"\r\n\t\t\t\tmatTooltip=\"{{ selectedLabel.Name }}\"\r\n\t\t\t>\r\n\t\t\t\t<span class=\"\u9650\u5236\u6807\u7B7E\">{{ selectedLabel.Name }}</span>\r\n\t\t\t\t<mat-icon class=\"\u5220\u9664\u6807\u7B7E\" (click)=\"deleteLabel(index)\" svgIcon=\"close\"></mat-icon>\r\n\t\t\t</mat-chip>\r\n\t\t</mat-chip-list>\r\n\t</div>\r\n</mat-menu>\r\n<button mat-flat-button class=\"\u6807\u7B7E\u6309\u94AE\" (click)=\"open.emit()\">\r\n\t\u6A21\u677F <mat-icon class=\"\u6A21\u677F\u56FE\u6807\" svgIcon=\"device_hub\"></mat-icon>\r\n</button>\r\n",
styles: ["@charset \"UTF-8\";:host{line-height:32px}.mat-chip{width:96px;padding:0 24px 0 8px;border-radius:4px;position:relative}.mat-chip .\u5220\u9664\u6807\u7B7E{line-height:16px;position:absolute;right:8px;top:8px}.mat-chip .\u6807\u7B7E{font-size:12px;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block}.\u6807\u7B7E\u82AF\u7247{display:inline-block}.\u6807\u7B7E\u82AF\u7247 ::ng-deep .mat-chip-list-wrapper{margin:0}.\u6807\u7B7E\u82AF\u7247 .mat-chip{margin:0 4px}.\u6807\u7B7E\u6309\u94AE{height:32px;width:96px;line-height:32px;margin:0 16px;color:#fff;border-radius:16px}.\u6807\u7B7E\u6309\u94AE .\u6A21\u677F\u56FE\u6807{line-height:16px;margin-left:4px;vertical-align:middle}.mat-menu-item{padding:0 4px}.mat-menu-item .mat-icon{margin-right:4px}.mat-icon{width:16px;height:16px}.\u6807\u7B7E\u83DC\u5355{display:inline-block;width:200px;padding:24px 8px;position:relative;box-sizing:border-box}.\u6807\u7B7E\u83DC\u5355 .mat-chip{margin:4px 0 4px 4px}.\u6807\u7B7E\u83DC\u5355 .\u5411\u4E0A\u6807\u7B7E\u7BAD\u5934{position:absolute;top:0;right:8px;-webkit-transform:rotate(180deg);transform:rotate(180deg)}"]
}] }
];
/** @nocollapse */
LabelSelectorComponent.ctorParameters = () => [
{ type: ServiceService }
];
LabelSelectorComponent.propDecorators = {
open: [{ type: Output }],
hostClass: [{ type: HostBinding, args: ['class.label-selector',] }]
};
if (false) {
/** @type {?} */
LabelSelectorComponent.prototype.chipListShow;
/** @type {?} */
LabelSelectorComponent.prototype.open;
/** @type {?} */
LabelSelectorComponent.prototype.hostClass;
/** @type {?} */
LabelSelectorComponent.prototype.svr;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class LabelSelectorModule {
}
LabelSelectorModule.decorators = [
{ type: NgModule, args: [{
declarations: [LabelSelectorComponent],
imports: [
CommonModule,
MatChipsModule,
MatIconModule$1,
MatMenuModule$1,
MatTooltipModule,
MatDividerModule$1,
MatButtonModule
],
exports: [LabelSelectorComponent]
},] }
];
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class ContextMenu {
constructor() {
this.contextMenuPosition = { x: '0px', y: '0px' };
}
/**
* @param {?} colIndex
* @param {?} rowIndex
* @return {?}
*/
cellSelector(colIndex, rowIndex) {
return false;
}
/**
* @param {?} event
* @param {?} col
* @param {?} row
* @return {?}
*/
openContextMenu(event, col, row) {
if (this.cellSelector(col, row)) {
event.preventDefault(); // Suppress the browser's context menu
this.contextMenuPosition = { x: event.clientX + 'px', y: event.clientY + 'px' };
this.contextMenu.openMenu(); // Open your custom context menu instead
document
.getElementsByClassName('cdk-overlay-backdrop')[0]
.addEventListener('contextmenu', (/**
* @param {?} offEvent
* @return {?}
*/
(offEvent) => {
offEvent.preventDefault();
this.contextMenu.closeMenu();
}));
}
}
/**
* @param {?} hasTitle
* @return {?}
*/
onSelCopyClick(hasTitle) {
// 注意有反向选择
/** @type {?} */
const x = Math.min(this.selector.startX, this.selector.endX);
/** @type {?} */
const x1 = Math.max(this.selector.startX, this.selector.endX);
/** @type {?} */
const y = Math.min(this.selector.startY, this.selector.endY);
/** @type {?} */
const y1 = Math.max(this.selector.startY, this.selector.endY);
/** @type {?} */
const text = [];
if (hasTitle) {
/** @type {?} */
const line = [];
for (let ix = x; ix <= x1; ix++) {
line.push(this.tabData.nativeElement.rows[0].cells[ix].innerText.trim()); // 发现有换行,需要去除
}
text.push(line.join('\t'));
}
for (let iy = y; iy <= y1; iy++) {
/** @type {?} */
const line = [];
for (let ix = x; ix <= x1; ix++) {
line.push(this.tabData.nativeElement.rows[iy + 1].cells[ix].innerText.trim());
}
text.push(line.join('\t'));
}
this._clipboardService.copyFromContent(text.join('\n'));
}
/**
* @param {?} event
* @return {?}
*/
onSelLineMenuClick(event) {
/** @type {?} */
const y = Math.min(this.selector.startY, this.selector.endY);
/** @type {?} */
const y1 = Math.max(this.selector.startY, this.selector.endY);
this.svr.data.tableRowSelection.select(...this.dataSource.slice(y, y1 + 1).map((/**
* @param {?} v
* @return {?}
*/
v => v.Key)));
}
/**
* @return {?}
*/
onSelCancelLineMenuClick() {
/** @type {?} */
const y = Math.min(this.selector.startY, this.selector.endY);
/** @type {?} */
const y1 = Math.max(this.selector.startY, this.selector.endY);
this.svr.data.tableRowSelection.deselect(...this.dataSource.slice(y, y1 + 1).map((/**
* @param {?} v
* @return {?}
*/
v => v.Key)));
}
/**
* @return {?}
*/
onSelAllMenuClick() {
if (this.dataSource.length > 0) {
this.selector.startX = 1;
this.selector.startY = 0;
this.selector.endX = this.columns.length + 1; // 加个序号列
this.selector.endY = this.dataSource.length - 1;
}
}
}
if (false) {
/** @type {?} */
ContextMenu.prototype.contextMenu;
/** @type {?} */
ContextMenu.prototype.contextMenuPosition;
/** @type {?} */
ContextMenu.prototype.svr;
/** @type {?} */
ContextMenu.prototype.selector;
/** @type {?} */
ContextMenu.prototype.tabData;
/** @type {?} */
ContextMenu.prototype._clipboardService;
/** @type {?} */
ContextMenu.prototype.dataSource;
/** @type {?} */
ContextMenu.prototype.columns;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
const toolbarShowDelay = 300;
class Header {
/**
* @param {?} col
* @param {?} event
* @return {?}
*/
headerMouseenter(col, event) {
this.current.x = ((/** @type {?} */ (event.target))).cellIndex;
this.headerToolbarShowTimer = setTimeout((/**
* @return {?}
*/
() => {
col.showToolbar = true;
}), toolbarShowDelay);
}
/**
* @param {?} col
* @return {?}
*/
headerMouseleave(col) {
if (this.headerToolbarShowTimer) {
clearTimeout(this.headerToolbarShowTimer);
this.headerToolbarShowTimer = undefined;
}
col.showToolbar = false;
}
/**
* @param {?} event
* @param {?} col
* @return {?}
*/
lockButtonClick(event, col) {
col.sticky = true;
col.showToolbar = false;
this.syncColumn();
event.stopPropagation();
event.preventDefault();
}
/**
* @param {?} event
* @param {?} col
* @return {?}
*/
unlockButtonClick(event, col) {
col.sticky = false;
col.showToolbar = false;
this.syncColumn();
event.stopPropagation();
event.preventDefault();
}
/**
* @param {?} event
* @param {?} col
* @return {?}
*/
toLeftButtonClick(event, col) {
/** @type {?} */
const realIndex = col.index;
/** @type {?} */
const tmp = this.columns[realIndex];
tmp.showToolbar = false;
this.columns[realIndex] = this.columns[realIndex - 1];
this.columns[realIndex - 1] = tmp;
this.syncColumn();
event.stopPropagation();
event.preventDefault();
}
/**
* @param {?} event
* @param {?} col
* @return {?}
*/
toRightButtonClick(event, col) {
/** @type {?} */
const realIndex = col.index;
/** @type {?} */
const tmp = this.columns[realIndex];
tmp.showToolbar = false;
this.columns[realIndex] = this.columns[realIndex + 1];
this.columns[realIndex + 1] = tmp;
this.syncColumn();
event.stopPropagation();
event.preventDefault();
}
/**
* 返回一个列是不是固定列的最右边列
* @param {?} colIndex
* @return {?}
*/
stickyColumnRight(colIndex) {
return (colIndex < this._tableColumns.length - 1 &&
this._tableColumns[colIndex].sticky &&
!this._tableColumns[colIndex + 1].sticky);
}
// 同步列的设置,主要是重新根据固定列排定顺序
/**
* @return {?}
*/
syncColumn() {
/**
* 先把上次存在的列照样输出,注意保留原有的顺序
* @type {?}
*/
let cols = (this.columns || []).filter((/**
* @param {?} col
* @return {?}
*/
col => this.displayColumns.find((/**
* @param {?} vv
* @return {?}
*/
vv => vv.Name === col.Name)) !== undefined));
/**
* 再输出剩下的列
* @type {?}
*/
const cc = (this.displayColumns || []).filter((/**
* @param {?} col
* @return {?}
*/
col => cols.find((/**
* @param {?} vv
* @return {?}
*/
vv => vv.Name === col.Name)) === undefined));
cols = cols.concat(cc);
// 把固定列提升到最前面
cols = cols.filter((/**
* @param {?} v
* @return {?}
*/
v => v.sticky)).concat(cols.filter((/**
* @param {?} v
* @return {?}
*/
v => !v.sticky)));
cols.forEach((/**
* @param {?} v1
* @param {?} idx
* @return {?}
*/
(v1, idx) => (v1.index = idx)));
this.columns = cols;
this._tableColumns = [...this.fixStartColumns].concat(
/**固定的列排在前面 */
this.columns, this.fixEndColumns);
this.displayColumnNames = this._tableColumns.map((/**
* @param {?} vv
* @return {?}
*/
vv => vv.Name));
/**妈蛋,列内容变化,宽度还是算上一次的,造成列宽计算不对,只有变通的延后调用一次强制更新 */
setTimeout((/**
* @return {?}
*/
() => {
this.tabDataOrg.updateStickyColumnStyles();
}), 10);
}
}
if (false) {
/** @type {?} */
Header.prototype.current;
/** @type {?} */
Header.prototype.columns;
/** @type {?} */
Header.prototype._tableColumns;
/** @type {?} */
Header.prototype.displayColumns;
/** @type {?} */
Header.prototype.displayColumnNames;
/** @type {?} */
Header.prototype.headerToolbarShowTimer;
/** @type {?} */
Header.prototype.tabDataOrg;
/** @type {?} */
Header.prototype.fixStartColumns;
/** @type {?} */
Header.prototype.fixEndColumns;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @record
*/
function ISelector() { }
if (false) {
/** @type {?} */
ISelector.prototype.show;
/** @type {?} */
ISelector.prototype.startX;
/** @type {?} */
ISelector.prototype.startY;
/** @type {?} */
ISelector.prototype.endX;
/** @type {?} */
ISelector.prototype.endY;
}
/**
* @record
*/
function IPoint() { }
if (false) {
/** @type {?} */
IPoint.prototype.x;
/** @type {?} */
IPoint.prototype.y;
}
/** @type {?} */
const noneSelector = { show: false, startX: -1, startY: -1, endX: -1, endY: -1 };
/** @type {?} */
const nonePoint = { x: -1, y: -1 };
class Selector {
/**
* @param {?} colIndex
* @param {?} rowIndex
* @return {?}
*/
cellSelector(colIndex, rowIndex) {
if (!this.selector.show) {
return false;
}
// 注意有反向选择
/** @type {?} */
const x = Math.max(1, Math.min(this.selector.startX, this.selector.endX));
/** @type {?} */
const x1 = Math.min(this.tabData.nativeElement.rows[0].cells.length - 1, Math.max(this.selector.startX, this.selector.endX));
/** @type {?} */
const y = Math.min(this.selector.startY, this.selector.endY);
/** @type {?} */
const y1 = Math.max(this.selector.startY, this.selector.endY);
return colIndex >= x && colIndex <= x1 && rowIndex >= y && rowIndex <= y1;
}
// 是否左边
/**
* @param {?} col
* @param {?} row
* @return {?}
*/
cellSelectorLeft(col, row) {
if (!this.selector.show) {
return false;
}
/** @type {?} */
const x = Math.min(this.selector.startX, this.selector.endX);
/** @type {?} */
const y = Math.min(this.selector.startY, this.selector.endY);
/** @type {?} */
const y1 = Math.max(this.selector.startY, this.selector.endY);
return col === x && row >= y && row <= y1;
}
// 是否下边
/**
* @param {?} col
* @param {?} row
* @return {?}
*/
cellSelectorBottom(col, row) {
if (!this.selector.show) {
return false;
}
/** @type {?} */
const x = Math.min(this.selector.startX, this.selector.endX);
/** @type {?} */
const x1 = Math.max(this.selector.startX, this.selector.endX);
/** @type {?} */
const y1 = Math.max(this.selector.startY, this.selector.endY);
return col >= x && col <= x1 && row === y1;
}
// 是否右边
/**
* @param {?} col
* @param {?} row
* @return {?}
*/
cellSelectorRight(col, row) {
if (!this.selector.show) {
return false;
}
/** @type {?} */
const x1 = Math.max(this.selector.startX, this.selector.endX);
/** @type {?} */
const y = Math.min(this.selector.startY, this.selector.endY);
/** @type {?} */
const y1 = Math.max(this.selector.startY, this.selector.endY);
return col === x1 && row >= y && row <= y1;
}
// 是否上边
/**
* @param {?} col
* @param {?} row
* @return {?}
*/
cellSelectorTop(col, row) {
if (!this.selector.show) {
return false;
}
/** @type {?} */
const x = Math.min(this.selector.startX, this.selector.endX);
/** @type {?} */
const x1 = Math.max(this.selector.startX, this.selector.endX);
/** @type {?} */
const y = Math.min(this.selector.startY, this.selector.endY);
return row === y && col >= x && col <= x1;
}
/**
* @param {?} event
* @param {?} colIndex
* @param {?} rowIndex
* @return {?}
*/
cellMouseDown(event, colIndex, rowIndex) {
if (event.button !== 0) {
return;
}
this.leftPressed = true;
this.selector.show = true;
this.selector.startX = colIndex;
this.selector.startY = rowIndex;
this.selector.endX = colIndex;
this.selector.endY = rowIndex;
// Add listeners
this.closeMouseDownListern = this.renderer.listen('window', 'mousemove', this.onMouseMove);
this.timer = setInterval((/**
* @return {?}
*/
() => {
if (this.leftPressed) {
this.scrollTable();
}
}), 20);
// event.preventDefault();
// event.stopPropagation();
}
/**
* @param {?} event
* @return {?}
*/
mouseUp(event) {
if (event.button === 0) {
this.leftPressed = false;
if (this.closeMouseDownListern) {
this.closeMouseDownListern();
}
if (this.timer) {
clearInterval(this.timer);
this.timer = null;
}
// event.preventDefault();
// event.stopPropagation();
}
}
/**
* @param {?} event
* @return {?}
*/
cellMouseEnter(event) {
this.current.x = ((/** @type {?} */ (event.target))).cellIndex;
this.current.y = ((/** @type {?} */ (((/** @type {?} */ (event.target))).parentElement))).rowIndex;
}
/**
* @param {?} event
* @return {?}
*/
onMouseMove(event) {
this.x = event.x;
this.y = event.y;
if (this.leftPressed) {
/** @type {?} */
const cell = cellFromPosition(this.tabData.nativeElement, event.x, event.y);
// 需要去掉第一列和最后一列
if (cell.columnIndex === 0) {
cell.columnIndex = 1;
}
if (cell.columnIndex === this.tabData.nativeElement.rows[0].cells.length - 1) {
cell.columnIndex = cell.columnIndex - 1;
}
// 需要去掉第一行
if (cell.rowIndex === 0) {
cell.rowIndex = 1;
}
if (cell) {
this.selector.endX = cell.columnIndex;
this.selector.endY = cell.rowIndex - 1; // 需要去掉标题行
}
this.scrollTable();
}
}
/**
* @return {?}
*/
scrollTable() {
// 元素在文档的位置x,y
const { left: xLeft, top: yTop, right: xRight, bottom: yBottom } = this.elRef.nativeElement.getBoundingClientRect();
// 判断鼠标是否到元素边界
if (this.y <= yTop) {
// 滚动条的位置
this.elRef.nativeElement.scrollTop -= yTop - this.y;
}
else if (this.y >= yBottom - 20) {
this.elRef.nativeElement.scrollTop += this.y - yBottom + 20;
}
if (this.x <= xLeft) {
this.elRef.nativeElement.scrollLeft -= xLeft - this.x;
}
else if (this.x >= xRight) {
this.elRef.nativeElement.scrollLeft += this.x - xRight;
}
}
}
if (false) {
/** @type {?} */
Selector.prototype.renderer;
/** @type {?} */
Selector.prototype.closeMouseDownListern;
/** @type {?} */
Selector.prototype.selector;
/** @type {?} */
Selector.prototype.leftPressed;
/** @type {?} */
Selector.prototype.x;
/** @type {?} */
Selector.prototype.y;
/** @type {?} */
Selector.prototype.current;
/** @type {?} */
Selector.prototype.timer;
/** @type {?} */
Selector.prototype.elRef;
/** @type {?} */
Selector.prototype.tabData;
}
/**
* @record
*/
function CellPosition() { }
if (false) {
/** @type {?} */
CellPosition.prototype.columnIndex;
/** @type {?} */
CellPosition.prototype.rowIndex;
/** @type {?} */
CellPosition.prototype.outter;
}
// 根据鼠标位置,返回一个单元格坐标,总是返回一个坐标,超出可视区域范围的,返回边界上的坐标
/**
* @param {?} ele
* @param {?} ox
* @param {?} oy
* @return {?}
*/
function cellFromPosition(ele, ox, oy) {
if (!ele || ele.rows.length === 0) {
return null;
}
const { left, top, bottom, right } = ele.getBoundingClientRect();
/** @type {?} */
let outter = false;
let [x, y] = [ox, oy];
// 超出可视区域,用边界代替
if (ox < left) {
outter = true;
x = left;
}
else if (ox > right) {
outter = true;
x = right;
}
if (oy < top) {
outter = true;
y = top;
}
else if (oy > bottom) {
outter = true;
y = bottom;
}
/** @type {?} */
let colIndex = ele.rows[0].cells.length - 1;
/** @type {?} */
let rowIndex = ele.rows.length - 1;
/** @type {?} */
let totalLeft = left;
/** @type {?} */
let totalTop = top;
// 表格必定会有一行,先确定列位置
for (let i = 0; i < ele.rows[0].cells.length; i++) {
totalLeft += ele.rows[0].cells[i].offsetWidth;
if (x < totalLeft) {
colIndex = i;
break;
}
}
for (let i = 0; i < ele.rows.length; i++) {
// 不用offsetheight,防止四舍五入引起累计偏差
/** @type {?} */
const rect = ele.rows[i].getBoundingClientRect();
totalTop += rect.height;
if (y < totalTop) {
rowIndex = i;
break;
}
}
return { columnIndex: colIndex, rowIndex: rowIndex, outter: outter };
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class TableComponent {
/**
* @param {?} svr
* @param {?} _clipboardService
* @param {?} elRef
* @param {?} renderer
*/
constructor(svr, _clipboardService, elRef, renderer) {
this.svr = svr;
this._clipboardService = _clipboardService;
this.elRef = elRef;
this.renderer = renderer;
this.hostClass = 'content mat-elevation-z1';
this.dataSource = [];
// 跟随数据行的处理列表,初始值为空数组,防止出现不能访问.length的错误
this._processes = [];
this.sortChange = new EventEmitter();
this.processClick = new EventEmitter();
this._tableColumns = [];
// 处理按钮是否是展开的
this.processExpand = true;
this.displayColumnNames = [];
this.fixStartColumns = [
{ index: 0, Name: '_select', Type: '', sticky: true, stickyEnd: false, showToolbar: false },
{ index: 1, Name: '_序号', Type: 'STR', sticky: true, stickyEnd: false, showToolbar: false }
];
this.fixEndColumns = [];
this.contextMenuPosition = { x: '0px', y: '0px' };
// 要用复制的方式,否则会修改掉nonePoint
this.current = Object.assign({}, nonePoint);
// 选择用到的属性、函数
this.selector = Object.assign({}, noneSelector);
this.cellSelector = Selector.prototype.cellSelector;
this.cellSelectorLeft = Selector.prototype.cellSelectorLeft;
this.cellSelectorBottom = Selector.prototype.cellSelectorBottom;
this.cellSelectorRight = Selector.prototype.cellSelectorRight;
this.cellSelectorTop = Selector.prototype.cellSelectorTop;
this.cellMouseDown = Selector.prototype.cellMouseDown;
this.cellMouseEnter = Selector.prototype.cellMouseEnter;
this.mouseUp = Selector.prototype.mouseUp;
this.onMouseMove = Selector.prototype.onMouseMove.bind(this);
this.scrollTable = Selector.prototype.scrollTable;
this.openContextMenu = ContextMenu.prototype.openContextMenu;
this.onSelCopyClick = ContextMenu.prototype.onSelCopyClick;
this.onSelLineMenuClick = ContextMenu.prototype.onSelLineMenuClick;
this.onSelCancelLineMenuClick = ContextMenu.prototype.onSelCancelLineMenuClick;
this.onSelAllMenuClick = ContextMenu.prototype.onSelAllMenuClick;
// 列头功能
this.headerMouseenter = Header.prototype.headerMouseenter;
this.headerMouseleave = Header.prototype.headerMouseleave;
this.lockButtonClick = Header.prototype.lockButtonClick;
this.stickyColumnRight = Header.prototype.stickyColumnRight;
this.syncColumn = Header.prototype.syncColumn;
this.unlockButtonClick = Header.prototype.unlockButtonClick;
this.toLeftButtonClick = Header.prototype.toLeftButtonClick;
this.toRightButtonClick = Header.prototype.toRightButtonClick;
this.scrollLeft = 0;
this.scrollTop = 0;
}
/**
* @param {?} val
* @return {?}
*/
set processes(val) {
if (val.length > 0) {
if (this.fixEndColumns.length === 0) {
this.fixEndColumns.push({
index: -1,
Name: '_操作',
Type: '',
sticky: false,
stickyEnd: true,
showToolbar: false
});
}
}
else {
this.fixEndColumns.splice(0);
}
this._processes = val;
}
/**
* @return {?}
*/
get processes() {
return this._processes;
}
// keepSequence是否保留列的顺序
/**
* @param {?} val
* @param {?} dispCols
* @param {?} keepSequence
* @return {?}
*/
setDataSource(val, dispCols, keepSequence) {
// 要复制,不能赋值,否则会修改掉noneSelector的值
Object.assign(this.selector, noneSelector);
this.dataSource = val;
this.displayColumns = dispCols;
if (!keepSequence) {
// 清除之前的列顺序定义
this.columns = [];
}
// 同步列信息
this.syncColumn();
// 一定要延后更新,否则没有效果
setTimeout((/**
* @return {?}
*/
() => {
this.updateTableHasScrollbar();
}), 20);
}
/**
* @return {?}
*/
ngOnInit() { }
/**
* @return {?}
*/
ngAfterViewInit() {
// 不使用setTimeout会引起错误
setTimeout((/**
* @return {?}
*/
() => {
this.tableHasScrollbar = this.elRef.nativeElement.scrollWidth > this.elRef.nativeElement.clientWidth;
}), 100);
}
/**
* @param {?} event
* @return {?}
*/
onResize(event) {
this.updateTableHasScrollbar();
}
/**
* @private
* @return {?}
*/
updateTableHasScrollbar() {
this.tableHasScrollbar = this.elRef.nativeElement.scrollWidth > this.elRef.nativeElement.clientWidth;
}
/**
* @return {?}
*/
onDetach() {
this.scrollLeft = this.elRef.nativeElement.scrollLeft;
this.scrollTop = this.elRef.nativeElement.scrollTop;
}
/**
* @param {?} ref
* @param {?} activatedRoute
* @return {?}
*/
onAttach(ref, activatedRoute) {
this.elRef.nativeElement.scrollLeft = this.scrollLeft;
this.elRef.nativeElement.scrollTop = this.scrollTop;
}
/**
* Selects all rows if they are not all selected; otherwise clear selection.
* @return {?}
*/
masterToggle() {
this.isPageSelected()
? this.svr.data.tableRowSelection.deselect(...this.dataSource.map((/**
* @param {?} row
* @return {?}
*/
row => row.Key)))
: this.svr.data.tableRowSelection.select(...this.dataSource.map((/**
* @param {?} row
* @return {?}
*/
row => row.Key)));
}
/**
* Whether the number of selected elements matches the total number of rows.
* @return {?}
*/
isPageSelected() {
return this.dataSource.find((/**
* @param {?} v
* @return {?}
*/
v => !this.svr.data.tableRowSelection.isSelected(v.Key))) === undefined;
}
/**
* @param {?} i
* @param {?} col
* @return {?}
*/
trackByName(i, col) {
return col.Name;
}
}
TableComponent.decorators = [
{ type: Component, args: [{
selector: 'common-table',
template: "<div\r\n\tstyle=\"position: fixed\"\r\n\t[style.left]=\"contextMenuPosition.x\"\r\n\t[style.top]=\"contextMenuPosition.y\"\r\n\t[matMenuTriggerFor]=\"contextMenu\"\r\n></div>\r\n<mat-menu #contextMenu=\"matMenu\">\r\n\t<button mat-menu-item (click)=\"onSelCopyClick(true)\"><mat-icon svgIcon=\"content_copy\"></mat-icon>\u590D\u5236</button>\r\n\t<button mat-menu-item (click)=\"onSelCopyClick(false)\"><mat-icon></mat-icon>\u590D\u5236(\u65E0\u6807\u9898)</button>\r\n\t<!-- <mat-divider></mat-divider> -->\r\n\t<button mat-menu-item (click)=\"onSelLineMenuClick($event)\">\r\n\t\t<mat-icon svgIcon=\"single_chosen\"></mat-icon>\u9009\u4E2D\u884C\r\n\t</button>\r\n\t<button mat-menu-item (click)=\"onSelCancelLineMenuClick()\">\r\n\t\t<mat-icon svgIcon=\"cancel_chosen\"></mat-icon>\u53D6\u6D88\u9009\u4E2D\r\n\t</button>\r\n\t<button mat-menu-item (click)=\"onSelAllMenuClick()\"><mat-icon svgIcon=\"return_chosen\"></mat-icon>\u5168\u9009</button>\r\n</mat-menu>\r\n<table\r\n\tmat-table\r\n\t[dataSource]=\"dataSource\"\r\n\tmatSort\r\n\tmatSortStart=\"desc\"\r\n\t(matSortChange)=\"sortChange.emit($event)\"\r\n\t#tabData\r\n>\r\n\t<ng-container matColumnDef=\"_select\" sticky>\r\n\t\t<th mat-header-cell *matHeaderCellDef>\r\n\t\t\t<!--labelPosition=\"before\" \u4E00\u5B9A\u8981\u8FD9\u6837\u8BBE\u7F6E\uFF0C\u5426\u5219\u4F1A\u51FA\u73B0\u7A7A\u9699-->\r\n\t\t\t<mat-checkbox\r\n\t\t\t\t(change)=\"$event ? masterToggle() : null\"\r\n\t\t\t\t[checked]=\"svr.data.tableRowSelection.hasValue() && isPageSelected()\"\r\n\t\t\t\t[indeterminate]=\"svr.data.tableRowSelection.hasValue() && !isPageSelected()\"\r\n\t\t\t\tlabelPosition=\"before\"\r\n\t\t\t>\r\n\t\t\t</mat-checkbox>\r\n\t\t</th>\r\n\t\t<td\r\n\t\t\tmat-cell\r\n\t\t\t*matCellDef=\"let row; let rowIndex = index\"\r\n\t\t\t[ngClass]=\"{ 'current-row': current.y === rowIndex + 1 }\"\r\n\t\t>\r\n\t\t\t<mat-checkbox\r\n\t\t\t\t(click)=\"$event.stopPropagation()\"\r\n\t\t\t\t(change)=\"$event ? svr.data.tableRowSelection.toggle(row.Key) : null\"\r\n\t\t\t\t[checked]=\"svr.data.tableRowSelection.isSelected(row.Key)\"\r\n\t\t\t\tlabelPosition=\"before\"\r\n\t\t\t>\r\n\t\t\t</mat-checkbox>\r\n\t\t</td>\r\n\t</ng-container>\r\n\t<ng-container matColumnDef=\"_\u5E8F\u53F7\" sticky>\r\n\t\t<th\r\n\t\t\tmat-header-cell\r\n\t\t\t*matHeaderCellDef\r\n\t\t\tclass=\"number-cell\"\r\n\t\t\t[ngClass]=\"{\r\n\t\t\t\t'current-col': current.x === 1,\r\n\t\t\t\t'sticky-right': tableHasScrollbar && stickyColumnRight(1)\r\n\t\t\t}\"\r\n\t\t>\r\n\t\t\t\u5E8F\u53F7\r\n\t\t</th>\r\n\t\t<td\r\n\t\t\tmat-cell\r\n\t\t\t*matCellDef=\"let row; let rowIndex = index\"\r\n\t\t\tclass=\"number-cell\"\r\n\t\t\t(contextmenu)=\"openContextMenu($event, 1, rowIndex)\"\r\n\t\t\t[ngClass]=\"{\r\n\t\t\t\tselector: cellSelector(1, rowIndex),\r\n\t\t\t\t'sel-left': cellSelectorLeft(1, rowIndex),\r\n\t\t\t\t'sel-bottom': cellSelectorBottom(1, rowIndex),\r\n\t\t\t\t'sel-right': cellSelectorRight(1, rowIndex),\r\n\t\t\t\t'sel-top': cellSelectorTop(1, rowIndex),\r\n\t\t\t\t'current-row': current.y === rowIndex + 1,\r\n\t\t\t\t'sticky-right': tableHasScrollbar && stickyColumnRight(1)\r\n\t\t\t}\"\r\n\t\t\t(mousedown)=\"cellMouseDown($event, 1, rowIndex)\"\r\n\t\t>\r\n\t\t\t{{ row.RowNum }}\r\n\t\t</td>\r\n\t</ng-container>\r\n\t<ng-container *ngFor=\"let col of columns; trackBy: trackByName\" matColumnDef=\"{{ col.Name }}\" [sticky]=\"col.sticky\">\r\n\t\t<th\r\n\t\t\tmat-header-cell\r\n\t\t\t[arrowPosition]=\"col.Type !== 'INT' && col.Type !== 'FLOAT' ? 'after' : 'before'\"\r\n\t\t\t*matHeaderCellDef\r\n\t\t\tmat-sort-header\r\n\t\t\t[ngClass]=\"{\r\n\t\t\t\t'current-col': current.x === col.index + 2,\r\n\t\t\t\t'sticky-right': tableHasScrollbar && stickyColumnRight(col.index + 2),\r\n\t\t\t\t'number-cell': col.Type === 'INT' || col.Type === 'FLOAT'\r\n\t\t\t}\"\r\n\t\t\t(mouseenter)=\"headerMouseenter(col, $event)\"\r\n\t\t\t(mouseleave)=\"headerMouseleave(col)\"\r\n\t\t>\r\n\t\t\t<div *ngIf=\"col.showToolbar\" class=\"col-toolbar\">\r\n\t\t\t\t<mat-icon\r\n\t\t\t\t\tmatRipple\r\n\t\t\t\t\tmatRippleRadius=\"8\"\r\n\t\t\t\t\tmatRippleCentered=\"true\"\r\n\t\t\t\t\tmatTooltip=\"\u9501\u5B9A\u5217\u5230\u5DE6\u8FB9\"\r\n\t\t\t\t\t*ngIf=\"!col.sticky\"\r\n\t\t\t\t\tsvgIcon=\"lock\"\r\n\t\t\t\t\t(click)=\"lockButtonClick($event, col)\"\r\n\t\t\t\t></mat-icon>\r\n\t\t\t\t<mat-icon\r\n\t\t\t\t\tmatRipple\r\n\t\t\t\t\tmatRippleRadius=\"8\"\r\n\t\t\t\t\tmatRippleCentered=\"true\"\r\n\t\t\t\t\tmatTooltip=\"\u79FB\u9664\u9501\u5B9A\"\r\n\t\t\t\t\t*ngIf=\"col.sticky\"\r\n\t\t\t\t\tsvgIcon=\"lock_open\"\r\n\t\t\t\t\t(click)=\"unlockButtonClick($event, col)\"\r\n\t\t\t\t></mat-icon>\r\n\t\t\t\t<mat-icon\r\n\t\t\t\t\tmatRipple\r\n\t\t\t\t\tmatRippleRadius=\"8\"\r\n\t\t\t\t\tmatRippleCentered=\"true\"\r\n\t\t\t\t\tmatTooltip=\"\u5DE6\u79FB\"\r\n\t\t\t\t\t*ngIf=\"col.sticky && col.index > 0\"\r\n\t\t\t\t\tsvgIcon=\"arrow_back\"\r\n\t\t\t\t\t(click)=\"toLeftButtonClick($event, col)\"\r\n\t\t\t\t></mat-icon>\r\n\t\t\t\t<mat-icon\r\n\t\t\t\t\tmatRipple\r\n\t\t\t\t\tmatRippleRadius=\"8\"\r\n\t\t\t\t\tmatRippleCentered=\"true\"\r\n\t\t\t\t\tmatTooltip=\"\u53F3\u79FB\"\r\n\t\t\t\t\t*ngIf=\"col.sticky && !stickyColumnRight(col.index + 2)\"\r\n\t\t\t\t\tsvgIcon=\"arrow_forward\"\r\n\t\t\t\t\t(click)=\"toRightButtonClick($event, col)\"\r\n\t\t\t\t></mat-icon>\r\n\t\t\t</div>\r\n\t\t\t{{ col.Name }}\r\n\t\t</th>\r\n\t\t<td\r\n\t\t\tmat-cell\r\n\t\t\t*matCellDef=\"let row; let rowIndex = index\"\r\n\t\t\t(contextmenu)=\"openContextMenu($event, col.index + 2, rowIndex)\"\r\n\t\t\t[ngClass]=\"{\r\n\t\t\t\tselector: cellSelector(col.index + 2, rowIndex),\r\n\t\t\t\t'sel-left': cellSelectorLeft(col.index + 2, rowIndex),\r\n\t\t\t\t'sel-bottom': cellSelectorBottom(col.index + 2, rowIndex),\r\n\t\t\t\t'sel-right': cellSelectorRight(col.index + 2, rowIndex),\r\n\t\t\t\t'sel-top': cellSelectorTop(col.index + 2, rowIndex),\r\n\t\t\t\t'current-row': current.y === rowIndex + 1,\r\n\t\t\t\t'sticky-right': tableHasScrollbar && stickyColumnRight(col.index + 2),\r\n\t\t\t\t'number-cell': col.Type === 'INT' || col.Type === 'FLOAT'\r\n\t\t\t}\"\r\n\t\t\t(mouseenter)=\"cellMouseEnter($event)\"\r\n\t\t\t(mousedown)=\"cellMouseDown($event, col.index + 2, rowIndex)\"\r\n\t\t>\r\n\t\t\t<span class=\"line-breaker\" *ngIf=\"col.Type === 'DATE'\">\r\n\t\t\t\t{{ row.Data[col.Name] | date: 'yyyy-MM-dd hh:mm:ss' }}\r\n\t\t\t</span>\r\n\t\t\t<span class=\"line-breaker\" *ngIf=\"col.Type !== 'DATE'\">\r\n\t\t\t\t{{ row.Data[col.Name] }}\r\n\t\t\t</span>\r\n\t\t</td>\r\n\t</ng-container>\r\n\r\n\t<ng-container matColumnDef=\"_\u64CD\u4F5C\" stickyEnd *ngIf=\"processes.length > 0\">\r\n\t\t<th mat-header-cell *matHeaderCellDef [ngClass]=\"{ 'sticky-left': tableHasScrollbar }\" class=\"col-\u64CD\u4F5C\">\r\n\t\t\t<span>\r\n\t\t\t\t<span *ngIf=\"processExpand\">\u64CD\u4F5C</span\r\n\t\t\t\t><button mat-icon-button (click)=\"processExpand = !processExpand\">\r\n\t\t\t\t\t<mat-icon\r\n\t\t\t\t\t\t[matTooltip]=\"processExpand ? '\u6536\u7F29' : '\u5C55\u5F00'\"\r\n\t\t\t\t\t\t[svgIcon]=\"processExpand ? 'first_page' : 'last_page'\"\r\n\t\t\t\t\t></mat-icon>\r\n\t\t\t\t</button>\r\n\t\t\t</span>\r\n\t\t</th>\r\n\t\t<td\r\n\t\t\tmat-cell\r\n\t\t\tclass=\"cell-\u64CD\u4F5C\"\r\n\t\t\t*matCellDef=\"let row; let rowIndex = index\"\r\n\t\t\t[ngClass]=\"{ 'current-row': current.y === rowIndex + 1, 'sticky-left': tableHasScrollbar }\"\r\n\t\t>\r\n\t\t\t<common-process\r\n\t\t\t\t[processes]=\"processes\"\r\n\t\t\t\t[processStatus]=\"row.Processes\"\r\n\t\t\t\t[buttonShowNum]=\"processExpand ? 3 : 0\"\r\n\t\t\t\t(processClick)=\"processClick.emit({ pro: $event, row: row })\"\r\n\t\t\t></common-process>\r\n\t\t</td>\r\n\t</ng-container>\r\n\r\n\t<tr mat-header-row *matHeaderRowDef=\"displayColumnNames; sticky: true\" class=\"table-header\"></tr>\r\n\t<tr mat-row *matRowDef=\"let myRowData; let rowIndex = index; columns: displayColumnNames\"></tr>\r\n</table>\r\n",
styles: ["@charset \"UTF-8\";.content{height:100%;width:100%;overflow:auto;flex-grow:1}.line-breaker{white-space:pre}table{margin-bottom:24px;white-space:nowrap}table .col-toolbar{position:absolute;border-radius:2px;left:0;top:0;height:18px;background-color:rgba(0,0,0,.4)}table .col-toolbar .common-icon-button,table .col-toolbar .mat-icon{color:#fff;padding-top:2px;width:16px;height:16px}table .number-cell{text-align:right}table .mat-cell{font-size:14px;line-height:20px;min-height:auto;padding-left:8px;padding-right:16px;cursor:default}table .mat-row{height:40px}table .mat-row.mat-table-sticky:last{border-right:1px solid #e0e0e0!important}table .table-header{padding-right:0!important;padding-left:0!important;height:40px}table .table-header ::ng-deep .number-cell .mat-sort-header-container{justify-content:flex-end}table .table-header .col-\u64CD\u4F5C{padding-right:0!important;padding-left:0!important}table .table-header .col-\u64CD\u4F5C span{display:flex;justify-content:center;align-items:center}table .table-header .col-\u64CD\u4F5C span button{margin-bottom:3px}table .table-header .mat-header-cell{font-size:14px;line-height:20px;min-height:auto;padding-left:8px;padding-right:16px}table .cell-\u64CD\u4F5C{padding:0;text-align:center}"]
}] }
];
/** @nocollapse */
TableComponent.ctorParameters = () => [
{ type: ServiceService },
{ type: ClipboardService },
{ type: ElementRef },
{ type: Renderer2 }
];
TableComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class',] }],
processes: [{ type: Input }],
sortChange: [{ type: Output }],
processClick: [{ type: Output }],
tabData: [{ type: ViewChild, args: ['tabData', { read: ElementRef, static: true },] }],
tabDataOrg: [{ type: ViewChild, args: ['tabData', { static: true },] }],
contextMenu: [{ type: ViewChild, args: [MatMenuTrigger, { static: true },] }],
mouseUp: [{ type: HostListener, args: ['window:mouseup', ['$event'],] }],
onResize: [{ type: HostListener, args: ['window:resize', ['$event'],] }]
};
if (false) {
/** @type {?} */
TableComponent.prototype.hostClass;
/** @type {?} */
TableComponent.prototype.displayColumns;
/** @type {?} */
TableComponent.prototype.dataSource;
/**
* @type {?}
* @private
*/
TableComponent.prototype._processes;
/** @type {?} */
TableComponent.prototype.sortChange;
/** @type {?} */
TableComponent.prototype.processClick;
/** @type {?} */
TableComponent.prototype._tableColumns;
/** @type {?} */
TableComponent.prototype.tabData;
/** @type {?} */
TableComponent.prototype.tabDataOrg;
/** @type {?} */
TableComponent.prototype.contextMenu;
/** @type {?} */
TableComponent.prototype.columns;
/** @type {?} */
TableComponent.prototype.processExpand;
/** @type {?} */
TableComponent.prototype.displayColumnNames;
/** @type {?} */
TableComponent.prototype.timer;
/** @type {?} */
TableComponent.prototype.leftPressed;
/** @type {?} */
TableComponent.prototype.x;
/** @type {?} */
TableComponent.prototype.y;
/** @type {?} */
TableComponent.prototype.fixStartColumns;
/** @type {?} */
TableComponent.prototype.fixEndColumns;
/** @type {?} */
TableComponent.prototype.contextMenuPosition;
/** @type {?} */
TableComponent.prototype.current;
/** @type {?} */
TableComponent.prototype.selector;
/** @type {?} */
TableComponent.prototype.cellSelector;
/** @type {?} */
TableComponent.prototype.cellSelectorLeft;
/** @type {?} */
TableComponent.prototype.cellSelectorBottom;
/** @type {?} */
TableComponent.prototype.cellSelectorRight;
/** @type {?} */
TableComponent.prototype.cellSelectorTop;
/** @type {?} */
TableComponent.prototype.cellMouseDown;
/** @type {?} */
TableComponent.prototype.cellMouseEnter;
/** @type {?} */
TableComponent.prototype.mouseUp;
/** @type {?} */
TableComponent.prototype.closeMouseDownListern;
/** @type {?} */
TableComponent.prototype.onMouseMove;
/** @type {?} */
TableComponent.prototype.scrollTable;
/** @type {?} */
TableComponent.prototype.openContextMenu;
/** @type {?} */
TableComponent.prototype.onSelCopyClick;
/** @type {?} */
TableComponent.prototype.onSelLineMenuClick;
/** @type {?} */
TableComponent.prototype.onSelCancelLineMenuClick;
/** @type {?} */
TableComponent.prototype.onSelAllMenuClick;
/** @type {?} */
TableComponent.prototype.headerMouseenter;
/** @type {?} */
TableComponent.prototype.headerMouseleave;
/** @type {?} */
TableComponent.prototype.lockButtonClick;
/** @type {?} */
TableComponent.prototype.stickyColumnRight;
/** @type {?} */
TableComponent.prototype.syncColumn;
/** @type {?} */
TableComponent.prototype.unlockButtonClick;
/** @type {?} */
TableComponent.prototype.toLeftButtonClick;
/** @type {?} */
TableComponent.prototype.toRightButtonClick;
/** @type {?} */
TableComponent.prototype.tableHasScrollbar;
/** @type {?} */
TableComponent.prototype.headerToolbarShowTimer;
/**
* @type {?}
* @private
*/
TableComponent.prototype.scrollLeft;
/**
* @type {?}
* @private
*/
TableComponent.prototype.scrollTop;
/** @type {?} */
TableComponent.prototype.svr;
/** @type {?} */
TableComponent.prototype._clipboardService;
/** @type {?} */
TableComponent.prototype.elRef;
/** @type {?} */
TableComponent.prototype.renderer;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class ViewDrawerComponent {
/**
* @param {?} svr
* @param {?} curr
* @param {?} dialog
* @param {?} snackBar
*/
constructor(svr, curr, dialog, snackBar) {
this.svr = svr;
this.curr = curr;
this.dialog = dialog;
this.snackBar = snackBar;
this.ownerByUser = OwnerByEnum.ownerByUser;
this.ownerByDept = OwnerByEnum.ownerByDept;
this.hostClass = true;
this.close = new EventEmitter();
this.subscribes = [];
}
/**
* @return {?}
*/
ngOnInit() {
// this.subscribes.push(
// this.svr.editView.currentChange.subscribe(
// () => (this.viewDefine.SelectedColumns = this.svr.editView.SelectedColumns)
// )
// );
}
/**
* @return {?}
*/
ngOnDestroy() {
this.subscribes.forEach((/**
* @param {?} v
* @return {?}
*/
v => v.unsubscribe()));
}
/**
* @return {?}
*/
canModify() {
return (!this.svr.editView.titleInput &&
this.svr.editView.current &&
this.svr.editView.current.canModify(this.curr.data.UserName, this.curr.data.Dept.Code));
}
/**
* @return {?}
*/
ok() {
/** @type {?} */
const process = (/**
* @return {?}
*/
() => {
this.svr.data.selectedView = this.svr.editView.current;
this.svr.refreshData().subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
if (v.ok) {
this.close.emit();
}
else {
this.snackBar.open(v.error, '确定', { duration: 5000 });
}
}));
});
if (this.svr.editView.modify) {
this.svr.editView.save().subscribe((/**
* @return {?}
*/
() => {
process();
}));
}
else {
process();
}
}
/**
* @return {?}
*/
remove() {
/** @type {?} */
const dialogRef = this.dialog.open(ConfirmDialogComponent, {
width: '360px',
height: '184px',
data: '确定要删除视图[' + this.svr.editView.current.Name + '] 吗?',
autoFocus: false
});
dialogRef.afterClosed().subscribe((/**
* @param {?} result
* @return {?}
*/
(result) => {
if (result) {
this.svr.editView.remove();
}
}));
}
/**
* @return {?}
*/
editDone() {
this.svr.editView.done().subscribe((/**
* @return {?}
*/
() => { }), (/**
* @param {?} err
* @return {?}
*/
(err) => {
/** @type {?} */
const derr = IsDuplicatePKError(err.error);
if (derr.Yes) {
this.snackBar.open('名称重复', '确定', { duration: 5000 });
}
else {
this.snackBar.open(err.error, '确定', { duration: 5000 });
}
}));
}
}
ViewDrawerComponent.decorators = [
{ type: Component, args: [{
selector: 'common-view-drawer',
template: "<div class=\"title\">\r\n\t<mat-select *ngIf=\"!svr.editView.titleInput\"\r\n\t\t[(ngModel)]=\"svr.editView.current\">\r\n\t\t<mat-option *ngFor=\"let view of svr.data.constViewItems\" [value]=\"view\">\r\n\t\t\t{{ view.Name }}\r\n\t\t</mat-option>\r\n\t\t<mat-option *ngFor=\"let view of svr.data.viewList\" [value]=\"view\">\r\n\t\t\t{{ view.Name }}\r\n\t\t</mat-option>\r\n\t</mat-select>\r\n\t<div class=\"\u661F\u661F\" *ngIf=\"!svr.editView.titleInput && svr.editView.modify\">*\r\n\t</div>\r\n\t<ng-container *ngIf=\"!svr.editView.titleInput\">\r\n\t\t<span *ngIf=\"svr.editView.current?.OwnerBy === ownerByUser\">\u7528\u6237\u7EA7</span>\r\n\t\t<span *ngIf=\"svr.editView.current?.OwnerBy === ownerByDept\">\u90E8\u95E8\u7EA7</span>\r\n\t</ng-container>\r\n\t<mat-form-field *ngIf=\"svr.editView.titleInput\" class=\"\u663E\u793A\u5217\u6807\u9898\u8F93\u5165\">\r\n\t\t<input matInput [(ngModel)]=\"svr.editView.title\" />\r\n\t</mat-form-field>\r\n\r\n\t<mat-radio-group class=\"\u9009\u62E9\u7EA7\u522B\"\r\n\t\t*ngIf=\"svr.editView.titleInput && svr.editView.isAdd\"\r\n\t\taria-label=\"Select an option\" [(ngModel)]=\"svr.editView.addOwnerBy\">\r\n\t\t<mat-radio-button [value]=\"ownerByUser\">\u7528\u6237\u7EA7</mat-radio-button>\r\n\t\t<mat-radio-button [value]=\"ownerByDept\">\u90E8\u95E8\u7EA7</mat-radio-button>\r\n\t</mat-radio-group>\r\n\t<div class=\"\u663E\u793A\u5217\u6807\u9898\u56FE\u6807\">\r\n\t\t<button mat-icon-button (click)=\"svr.editView.cancel()\"\r\n\t\t\t*ngIf=\"svr.editView.titleInput\">\r\n\t\t\t<mat-icon svgIcon=\"close\"> </mat-icon>\r\n\t\t</button>\r\n\t\t<button mat-icon-button class=\"\u4EAE\u8272\u5B57\u4F53\" (click)=\"editDone()\"\r\n\t\t\t*ngIf=\"svr.editView.titleInput\">\r\n\t\t\t<mat-icon class=\"columnTitleDone\" svgIcon=\"done\"> </mat-icon>\r\n\t\t</button>\r\n\t\t<button mat-icon-button (click)=\"svr.editView.edit()\"\r\n\t\t\t*ngIf=\"canModify()\">\r\n\t\t\t<mat-icon svgIcon=\"edit\"> </mat-icon>\r\n\t\t</button>\r\n\t\t<button mat-icon-button (click)=\"svr.editView.add()\"\r\n\t\t\t*ngIf=\"!svr.editView.titleInput\">\r\n\t\t\t<mat-icon svgIcon=\"add_circle\"></mat-icon>\r\n\t\t</button>\r\n\t\t<button mat-icon-button (click)=\"remove()\" *ngIf=\"canModify()\">\r\n\t\t\t<mat-icon svgIcon=\"delete\"></mat-icon>\r\n\t\t</button>\r\n\t</div>\r\n</div>\r\n\r\n<common-view-define #viewDefine class=\"main\" [readonly]=\"svr.editView.Readonly\"\r\n\t[AllColumns]=\"svr.data.allColumnNames\" [SelectedColumns]=\"svr.editView.SelectedColumns\" (ModifyEvent)=\"svr.editView.modify=true\">\r\n</common-view-define>\r\n<div class=\"bottom-function\">\r\n\t<button mat-button (click)=\"close.emit()\">\r\n\t\t\u53D6\u6D88\r\n\t</button>\r\n\t<button mat-button class=\"\u786E\u5B9A\u6309\u94AE\" (click)=\"ok()\"\r\n\t\t*ngIf=\"!this.svr.editView.Readonly && !this.svr.editView.titleInput\">\r\n\t\t\u786E\u5B9A\r\n\t</button>\r\n</div>\r\n<div class=\"\u906E\u7F69\" *ngIf=\"svr.editView.titleInput && svr.editView.isAdd\"></div>",
styles: ["@charset \"UTF-8\";:host{width:618px;height:100%;display:flex;align-items:stretch;flex-direction:column}.\u906E\u7F69{width:100%;height:calc(100% - 40px);position:absolute;bottom:0;left:0}.title{height:40px;line-height:40px;padding-left:24px}.title .mat-select{display:inline-block;width:160px;font-size:18px;font-weight:600}.title .\u661F\u661F{position:absolute;left:200px;top:0;font-size:18px;display:inline-block;-webkit-transform:translateX(-50px);transform:translateX(-50px)}.title .\u663E\u793A\u5217\u6807\u9898\u8F93\u5165{display:inline-block;width:282px;height:30px}.title .\u663E\u793A\u5217\u6807\u9898\u8F93\u5165 ::ng-deep .mat-form-field-infix{border:none}.title .\u9009\u62E9\u7EA7\u522B{font-size:14px}.title .\u663E\u793A\u5217\u6807\u9898\u56FE\u6807{float:right;height:40px;line-height:40px}.title .\u663E\u793A\u5217\u6807\u9898\u56FE\u6807 .mat-icon{vertical-align:middle;cursor:pointer}.main{flex-grow:1}.bottom-function{height:56px;line-height:56px;text-align:right}.bottom-function .\u786E\u5B9A\u6309\u94AE{margin:0 16px;color:#fff}"]
}] }
];
/** @nocollapse */
ViewDrawerComponent.ctorParameters = () => [
{ type: ServiceService },
{ type: CurrentService },
{ type: MatDialog },
{ type: MatSnackBar }
];
ViewDrawerComponent.propDecorators = {
viewDefine: [{ type: ViewChild, args: ['viewDefine', { static: true, read: ViewDefineComponent },] }],
hostClass: [{ type: HostBinding, args: ['class.view-drawer',] }],
close: [{ type: Output }]
};
if (false) {
/** @type {?} */
ViewDrawerComponent.prototype.ownerByUser;
/** @type {?} */
ViewDrawerComponent.prototype.ownerByDept;
/** @type {?} */
ViewDrawerComponent.prototype.viewDefine;
/** @type {?} */
ViewDrawerComponent.prototype.hostClass;
/** @type {?} */
ViewDrawerComponent.prototype.close;
/** @type {?} */
ViewDrawerComponent.prototype.subscribes;
/** @type {?} */
ViewDrawerComponent.prototype.svr;
/** @type {?} */
ViewDrawerComponent.prototype.curr;
/**
* @type {?}
* @private
*/
ViewDrawerComponent.prototype.dialog;
/**
* @type {?}
* @private
*/
ViewDrawerComponent.prototype.snackBar;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class RecordViewComponent {
/**
* @param {?} svr
* @param {?} ele
* @param {?} prj
* @param {?} _clipboardService
* @param {?} iconRegistry
* @param {?} sanitizer
* @param {?} router
* @param {?} eles
*/
constructor(svr, ele, prj, _clipboardService, iconRegistry, sanitizer, router, eles) {
this.svr = svr;
this.ele = ele;
this.prj = prj;
this._clipboardService = _clipboardService;
this.router = router;
this.eles = eles;
this.SelectTypeSelected = SelectType.Selected;
this.SelectTypeUnselected = SelectType.Unselected;
this.showConditionalTemplateRunner = false;
this.editLabelModel = false;
this.subscribe = [];
/** @type {?} */
const icons = [
'all_chosen',
'cancel_chosen',
'return_chosen',
'single_chosen',
'double_down',
'drag_indicator',
'arrow_collapse',
'arrow_expand',
'sorting_arrows',
'color_add',
'file_copy',
'bg_bottom_out',
'default'
];
icons.forEach((/**
* @param {?} v
* @return {?}
*/
v => {
iconRegistry.addSvgIcon(v, sanitizer.bypassSecurityTrustResourceUrl('assets/record-view/icon/' + v + '.svg'));
}));
}
/**
* @return {?}
*/
ngOnDestroy() {
this.subscribe.forEach((/**
* @param {?} v
* @return {?}
*/
v => v.unsubscribe()));
}
/**
* @return {?}
*/
onDetach() {
this.dataTable.onDetach();
}
/**
* @param {?} ref
* @param {?} activatedRoute
* @return {?}
*/
onAttach(ref, activatedRoute) {
this.dataTable.onAttach(ref, activatedRoute);
}
/**
* @return {?}
*/
ngOnInit() {
this.subscribe.push(this.svr.refreshDataEvent.subscribe((/**
* @param {?} v
* @return {?}
*/
(v) => {
this.dataTable.setDataSource(this.svr.data.tableData.Rows, this.svr.data.tableData.DisplayColumns.map((/**
* @param {?} vv
* @return {?}
*/
vv => ((/** @type {?} */ (Object.assign({}, vv)))))), (v && v.keepDivide) || (v && v.keepRowCount));
})));
// 如果是组件方式调用
if (this.eleName !== undefined) {
this.svr.initByCondition(this.eles.get(this.eleName), this.title, this.condition);
}
else {
// init param
this.ele.currentElement.pipe(take(1)).subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
this.svr.init(v.element, this.prj.frontToApiURL(v.url));
}));
}
}
/**
* @return {?}
*/
selectedRowText() {
/** @type {?} */
const total = this.svr.data.tableRowSelection.selected.length;
/** @type {?} */
let current = 0;
if (this.svr.data.tableData && this.svr.data.tableData.Rows) {
current = this.svr.data.tableData.Rows.filter((/**
* @param {?} row
* @return {?}
*/
row => this.svr.data.tableRowSelection.isSelected(row.Key)))
.length;
}
if (total === current) {
return `已选${total}条`;
}
else {
return `${current}/${total}`;
}
}
/**
* @param {?} sortInfo
* @return {?}
*/
onTableSort(sortInfo) {
switch (sortInfo.direction) {
case '':
this.svr.data.fetchParam.Order = null;
break;
case 'asc':
this.svr.data.fetchParam.Order = [sortInfo.active];
break;
case 'desc':
this.svr.data.fetchParam.Order = [`-${sortInfo.active}`];
}
this.svr.refreshData({ keepRowCount: true }).subscribe();
}
/**
* @return {?}
*/
searchClick() {
this.showConditionalTemplateRunner = false;
this.svr.refreshData().subscribe();
}
/**
* @param {?} event
* @return {?}
*/
onRecordProcessClick(event) {
/** @type {?} */
let fields = this.svr.data.uniqueFields;
if (event.pro.TransPath && event.pro.TransPath.length > 0) {
fields = event.pro.TransPath;
}
/** @type {?} */
const keyValues = fields.map((/**
* @param {?} v
* @return {?}
*/
v => `[${event.row.Data[v]}]`)).join(' ');
/** @type {?} */
const ustr = this.eles.frontElementURL(this.svr.data.rowProcesses.find((/**
* @param {?} v
* @return {?}
*/
v => v.Name === event.pro.Name)).ElementName, event.row.Processes[event.pro.Name].URL);
this.router.navigateByUrl(ustr, {
state: (/** @type {?} */ ({
// 因为route自动会进行encode,所以需要把服务端的url解开,但是服务端又不能不编码,因为斜杠需要正确处理
url: this.router.parseUrl(ustr),
key: ustr,
title: `${event.pro.Name} - ${keyValues}`
}))
});
}
/**
* @param {?} pro
* @return {?}
*/
onToolbarProcessClick(pro) {
/** @type {?} */
const ustr = this.eles.frontElementURL(pro.ElementName, this.svr.data.tableData.Processes[pro.Name].URL);
this.router.navigateByUrl(ustr, {
state: (/** @type {?} */ ({
url: this.router.parseUrl(ustr),
key: ustr,
title: pro.Name
}))
});
}
/**
* @param {?} event
* @return {?}
*/
onNextPageClick(event) {
this.svr.data.fetchParam.Divide = this.svr.data.tableData.DownDivide;
this.svr.data.fetchParam.DivideRowNum = this.svr.data.tableData.DownRowNum;
if (this.svr.data.prevFetchDivide) {
this.svr.data.upDivide = this.svr.data.upDivide || [];
this.svr.data.upRowNum = this.svr.data.upRowNum || [];
this.svr.data.upDivide.push(this.svr.data.prevFetchDivide);
this.svr.data.upRowNum.push(this.svr.data.prevFetchRowNum);
}
this.svr.refreshData({ keepDivide: true, keepRowCount: true }).subscribe();
}
/**
* @param {?} event
* @return {?}
*/
onPrevPageClick(event) {
if (this.svr.data.upDivide) {
this.svr.data.fetchParam.Divide = this.svr.data.upDivide.pop();
}
else {
this.svr.data.fetchParam.Divide = undefined;
}
if (this.svr.data.upRowNum) {
this.svr.data.fetchParam.DivideRowNum = this.svr.data.upRowNum.pop();
}
else {
this.svr.data.fetchParam.DivideRowNum = undefined;
}
this.svr.refreshData({ keepDivide: true, keepRowCount: true }).subscribe();
}
/**
* @param {?} event
* @return {?}
*/
onFooterRowCountClick(event) {
this.svr.refreshRowCount().subscribe();
}
/**
* @return {?}
*/
startRowNo() {
if (this.svr.data && this.svr.data.tableData && this.svr.data.tableData.Rows.length > 0) {
return this.svr.data.tableData.Rows[0].RowNum + 1;
}
return 0;
}
/**
* @return {?}
*/
openLabelDrawer() {
this.svr.data.showLabelDrawer = true;
setTimeout((/**
* @return {?}
*/
() => {
// 复制,因为对话框内部会改变值
this.labelDrawer.selectedLabels = [...this.svr.data.selectedLabels];
// 点击模板打开抽屉
this.drawer.toggle();
}), 0);
}
/**
* @return {?}
*/
openColumnsDrawer() {
this.svr.data.showLabelDrawer = false;
if (!this.svr.data.viewList || this.svr.data.viewList.length === 0) {
this.svr.editView.add();
}
else {
this.svr.editView.titleInput = false;
this.svr.editView.current = this.svr.data.viewList[0];
}
// 点击模板打开抽屉
this.drawer.toggle();
}
/**
* @return {?}
*/
hasConditionalTemplate() {
return !!this.svr.data.conditionalTemplates.find((/**
* @param {?} v
* @return {?}
*/
v => v.enable));
}
/**
* @return {?}
*/
closeDrawer() {
// this.labelDrawer.editModel = false;
this.editLabelModel = false;
console.log('close', this.editLabelModel, this.labelDrawer.editModel);
}
}
RecordViewComponent.decorators = [
{ type: Component, args: [{
selector: 'common-recview',
template: "<div class=\"record-view main\">\r\n\t<mat-drawer-container class=\"container\">\r\n\t\t<mat-drawer #drawer mode=\"over\" position=\"end\" autoFocus=\"false\" (closedStart)=\"labelDrawer.editModel=false;\">\r\n\t\t\t<common-label-drawer #labelDrawer *ngIf=\"svr.data.showLabelDrawer\" [IsEditModel]=\"editLabelModel\"\r\n\t\t\t\t(close)=\"drawer.toggle()\">\r\n\t\t\t</common-label-drawer>\r\n\t\t\t<common-view-drawer #columnsDrawer *ngIf=\"!svr.data.showLabelDrawer\" (close)=\"drawer.toggle()\">\r\n\t\t\t</common-view-drawer>\r\n\t\t</mat-drawer>\r\n\t\t<mat-drawer-content>\r\n\t\t\t<div class=\"rec-body\" (click)=\"showConditionalTemplateRunner = false\">\r\n\t\t\t\t<div class=\"toolbar-panel\">\r\n\t\t\t\t\t<div>\r\n\t\t\t\t\t\t<div class=\"toolbar \u9009\u62E9\u5DE5\u5177\u680F my-elevation-z5\">\r\n\t\t\t\t\t\t\t<span class=\"\u9009\u62E9\u63D0\u793A \u5DF2\u9009\u62E9\">{{ selectedRowText() }}</span>\r\n\t\t\t\t\t\t\t<mat-form-field class=\"sel\u9009\u62E9\">\r\n\t\t\t\t\t\t\t\t<mat-select [(ngModel)]=\"svr.data.fetchParam.SelType\">\r\n\t\t\t\t\t\t\t\t\t<mat-option value=\"\"> \u6240\u6709 </mat-option>\r\n\t\t\t\t\t\t\t\t\t<mat-option [value]=\"SelectTypeSelected\">\r\n\t\t\t\t\t\t\t\t\t\t\u4EC5\u9009\u4E2D </mat-option>\r\n\t\t\t\t\t\t\t\t\t<mat-option [value]=\"SelectTypeUnselected\">\r\n\t\t\t\t\t\t\t\t\t\t\u672A\u9009\u4E2D </mat-option>\r\n\t\t\t\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class=\"toolbar \u5355\u6307\u6807\u6761\u4EF6\u5DE5\u5177\u680F my-elevation-z5\">\r\n\t\t\t\t\t\t\t<mat-form-field class=\"sel\u6307\u6807\">\r\n\t\t\t\t\t\t\t\t<mat-select [(ngModel)]=\"svr.data.fetchParam.Field\"\r\n\t\t\t\t\t\t\t\t\t(ngModelChange)=\"svr.onColumnChange($event)\">\r\n\t\t\t\t\t\t\t\t\t<mat-option value=\"\"> </mat-option>\r\n\t\t\t\t\t\t\t\t\t<mat-option *ngFor=\"let col of svr.data?.tableData?.Columns\" [value]=\"col.Name\">\r\n\t\t\t\t\t\t\t\t\t\t{{ col.Name }}\r\n\t\t\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t\t\t<mat-form-field class=\"sel\u89C4\u5219\" floatLabel=\"never\">\r\n\t\t\t\t\t\t\t\t<mat-select [(ngModel)]=\"svr.data.fetchParam.Opt\" placeholder=\"(\u65E0)\">\r\n\t\t\t\t\t\t\t\t\t<mat-option *ngFor=\"let ope of svr.data.Operates\" [value]=\"ope.Name\">{{\r\n\t\t\t\t\t\t\t\t\t\tope.Label\r\n\t\t\t\t\t\t\t\t\t}}</mat-option>\r\n\t\t\t\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t\t\t<mat-divider [vertical]=\"true\"></mat-divider>\r\n\t\t\t\t\t\t\t<mat-form-field class=\"inp\u503C\" appearance=\"standard\">\r\n\t\t\t\t\t\t\t\t<input matInput [(ngModel)]=\"svr.data.fetchParam.Value\" (keyup.enter)=\"searchClick()\" />\r\n\t\t\t\t\t\t\t\t<button mat-icon-button matSuffix\r\n\t\t\t\t\t\t\t\t\t*ngIf=\"svr.data.fetchParam?.Opt == 'in' || svr.data.fetchParam?.Opt == '!in'\">\r\n\t\t\t\t\t\t\t\t\t<mat-icon svgIcon=\"more_vert\"></mat-icon>\r\n\t\t\t\t\t\t\t\t</button>\r\n\t\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class=\"toolbar\">\r\n\t\t\t\t\t\t\t<div class=\"condition-button\">\r\n\t\t\t\t\t\t\t\t<button mat-raised-button class=\"my-elevation-z5 \u67E5\u8BE2\u6309\u94AE\">\r\n\t\t\t\t\t\t\t\t\t<mat-icon svgIcon=\"search\" (click)=\"searchClick()\"></mat-icon>\r\n\t\t\t\t\t\t\t\t\t<span *ngIf=\"svr.data.conditionalTemplates\" class=\"\u5206\u5272\u7EBF\"></span>\r\n\t\t\t\t\t\t\t\t\t<ng-container *ngIf=\"svr.data.conditionalTemplates\">\r\n\t\t\t\t\t\t\t\t\t\t<mat-icon svgIcon=\"view_list\"\r\n\t\t\t\t\t\t\t\t\t\t\t[class.openConditionalTemplate]=\"showConditionalTemplateRunner\"\r\n\t\t\t\t\t\t\t\t\t\t\t[class.revised]=\"hasConditionalTemplate() && !showConditionalTemplateRunner\"\r\n\t\t\t\t\t\t\t\t\t\t\t(click)=\"showConditionalTemplateRunner = !showConditionalTemplateRunner;$event.stopPropagation();\">\r\n\t\t\t\t\t\t\t\t\t\t</mat-icon>\r\n\t\t\t\t\t\t\t\t\t\t<span *ngIf=\"hasConditionalTemplate()\" class=\"revised-star\">*</span>\r\n\t\t\t\t\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t\t\t\t</button>\r\n\t\t\t\t\t\t\t\t<!-- <button mat-raised-button class=\"my-elevation-z5 \u67E5\u8BE2\u6309\u94AE\"></button> -->\r\n\t\t\t\t\t\t\t\t<mat-icon *ngIf=\"showConditionalTemplateRunner\" class=\"condition-triangle\">\r\n\t\t\t\t\t\t\t\t\t<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" width=\"24px\" height=\"24px\">\r\n\t\t\t\t\t\t\t\t\t\t<path name=\"\u4E09\u89D2\u5F62\" d=\"M0 15 L12 0 L24 15 Z\" />\r\n\t\t\t\t\t\t\t\t\t</svg>\r\n\t\t\t\t\t\t\t\t</mat-icon>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"right-top-area\">\r\n\t\t\t\t\t\t<common-label-selector (open)=\"openLabelDrawer()\">\r\n\t\t\t\t\t\t</common-label-selector>\r\n\t\t\t\t\t\t<common-view-selector (managerClick)=\"openColumnsDrawer()\">\r\n\t\t\t\t\t\t</common-view-selector>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"condition-parent\">\r\n\t\t\t\t\t<div class=\"condition-card my-elevation-z8\" *ngIf=\"showConditionalTemplateRunner\">\r\n\t\t\t\t\t\t<common-conditional-template-runner (click)=\"$event.stopPropagation();\"\r\n\t\t\t\t\t\t\t(enterPress)=\"showConditionalTemplateRunner=false;searchClick();\">\r\n\t\t\t\t\t\t</common-conditional-template-runner>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"condition-mask\" *ngIf=\"showConditionalTemplateRunner\"></div>\r\n\t\t\t\t\t<common-table #dataTable [processes]=\"svr.data?.rowProcesses\" (sortChange)=\"onTableSort($event)\"\r\n\t\t\t\t\t\t(processClick)=\"onRecordProcessClick($event)\">\r\n\t\t\t\t\t</common-table>\r\n\t\t\t\t</div>\r\n\t\t\t\t<common-footer-toolbar class=\"\u64CD\u4F5C\u5DE5\u5177\u680F my-elevation-z5\" [process]=\"svr.data.toolbarProcesses\"\r\n\t\t\t\t\t[rowCount]=\"svr.data.rowCount\" [pageSize]=\"svr.data.fetchParam.Limit\" [startRowNo]=\"startRowNo()\"\r\n\t\t\t\t\t[responseTime]=\"svr.data.timeConsuming\" [nextPageDisable]=\"svr.data.nextPageDisable\"\r\n\t\t\t\t\t[PrevPageDisable]=\"svr.data.prevPageDisable\" (processClick)=\"onToolbarProcessClick($event)\"\r\n\t\t\t\t\t(nextPageClick)=\"onNextPageClick($event)\" (prevPageClick)=\"onPrevPageClick($event)\"\r\n\t\t\t\t\t(rowCountClick)=\"onFooterRowCountClick($event)\">\r\n\t\t\t\t</common-footer-toolbar>\r\n\t\t\t</div>\r\n\t\t</mat-drawer-content>\r\n\t</mat-drawer-container>\r\n</div>",
providers: [ServiceService, BackFaceService, ServiceData],
styles: ["@charset \"UTF-8\";.record-view{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;-o-user-select:none;position:relative;display:flex;box-sizing:border-box;flex-direction:column;height:100%;width:100%}.record-view .header{font-size:12px;position:relative;z-index:1;display:inline-flex;justify-content:space-between;align-items:center;height:32px}.record-view .header .left{display:inline-flex;justify-content:space-between;align-items:center;height:32px;line-height:32px}.record-view .header .left .\u4F4D\u7F6E{margin-right:4px}.record-view .header .left .\u7C7B\u522B{margin-right:8px}.record-view .header .left button{width:24px;height:24px;line-height:24px}.record-view .header .left button .\u590D\u5236\u56FE\u6807{width:16px;height:16px;margin-bottom:6px}.record-view .header .left .\u7B49\u5F85\u56FE\u6807{width:16px;height:16px}.record-view .header .left .span\u7B49\u5F85\u56FE\u6807{margin-left:16px;padding-top:8px}.record-view .header .\u8BED\u8A00{font-size:12px;height:24px;line-height:20px}.record-view .toolbar-panel{padding-top:8px;padding-bottom:16px;display:inline-flex;justify-content:space-between}.record-view .toolbar-panel .toolbar{display:inline-flex;align-items:center;border-radius:16px;height:32px}.record-view .toolbar-panel .toolbar ::ng-deep .mat-form-field-underline{display:none}.record-view .toolbar-panel .toolbar .mat-form-field-type-mat-select{padding-top:6px}.record-view .toolbar-panel .toolbar .mat-divider{height:16px}.record-view .toolbar-panel .toolbar.\u9009\u62E9\u5DE5\u5177\u680F{vertical-align:top;box-sizing:border-box;width:152px;padding-left:16px;padding-right:8px;margin-right:24px}.record-view .toolbar-panel .toolbar.\u9009\u62E9\u5DE5\u5177\u680F .\u9009\u62E9\u63D0\u793A{font-size:12px;line-height:18px;width:72px}.record-view .toolbar-panel .toolbar.\u9009\u62E9\u5DE5\u5177\u680F .sel\u9009\u62E9{font-size:14px;width:72px}.record-view .toolbar-panel .toolbar.\u5355\u6307\u6807\u6761\u4EF6\u5DE5\u5177\u680F{vertical-align:top;box-sizing:border-box;width:360px;padding-left:16px;padding-right:8px;margin-right:8px}.record-view .toolbar-panel .toolbar.\u5355\u6307\u6807\u6761\u4EF6\u5DE5\u5177\u680F .sel\u6307\u6807{width:80px;font-size:14px;line-height:20px;margin-right:8px}.record-view .toolbar-panel .toolbar.\u5355\u6307\u6807\u6761\u4EF6\u5DE5\u5177\u680F .sel\u89C4\u5219{width:88px;font-size:14px;line-height:20px;margin-right:8px}.record-view .toolbar-panel .toolbar.\u5355\u6307\u6807\u6761\u4EF6\u5DE5\u5177\u680F .inp\u503C{margin-left:4px;width:156px}.record-view .toolbar-panel .toolbar.\u5355\u6307\u6807\u6761\u4EF6\u5DE5\u5177\u680F .inp\u503C button{position:relative;top:4px;width:24px;height:24px;line-height:24px}.record-view .toolbar-panel .toolbar.\u6A21\u677F\u5DE5\u5177\u680F{vertical-align:top;box-sizing:border-box;width:112px;padding-left:16px;padding-right:8px}.record-view .toolbar-panel .toolbar.\u6A21\u677F\u5DE5\u5177\u680F .sel{width:88px;font-size:14px;line-height:20px}.record-view .toolbar-panel .toolbar.\u516C\u7528\u6A21\u677F{margin-right:24px}.record-view .toolbar-panel .\u6A21\u677F\u6587\u5B57{font-size:14px;line-height:32px;margin-right:8px}.record-view .toolbar-panel .\u67E5\u8BE2\u6309\u94AE{min-width:56px;border-radius:16px;height:32px;padding-left:12px;padding-right:14px}.record-view .toolbar-panel .\u67E5\u8BE2\u6309\u94AE .mat-icon{position:relative;top:-3px}.record-view .toolbar-panel .\u67E5\u8BE2\u6309\u94AE .\u5206\u5272\u7EBF{display:inline-block;width:1px;height:16px;margin:-3px 4px 3px;vertical-align:middle}.record-view .my-elevation-z5{box-shadow:0 5px 13px 0 rgba(0,0,0,.14)}.record-view .container{width:100%;height:100%}.record-view .container .rec-body{width:100%;height:100%;display:flex;box-sizing:border-box;flex-direction:column;padding-left:8px;padding-bottom:24px}.record-view .container .rec-body .condition-parent{width:100%;height:0;position:relative;flex-grow:1;display:flex;flex-direction:column}.record-view .container .rec-body .condition-button{position:relative}.record-view .container .rec-body .revised-star{position:absolute;top:-8px;right:8px}.record-view .container .rec-body .condition-card{position:absolute;z-index:201;left:0;top:-10px;right:8px;border-radius:4px}.record-view .container .rec-body .condition-mask{position:absolute;z-index:200;left:-8px;top:0;right:0;bottom:0}.record-view .container .rec-body .condition-triangle{position:absolute;z-index:202;top:30px;left:45px;right:0}.record-view .container .rec-body .content{height:100%;width:100%;overflow:auto;flex-grow:1}.record-view .container .rec-body .content .emp-last{height:90px}.record-view .container .rec-body .mat-elevation-z1{box-shadow:none}.record-view .container .rec-body .content::-webkit-scrollbar-button:horizontal:start{height:4px;width:80px}.record-view .container .rec-body .\u64CD\u4F5C\u5DE5\u5177\u680F{height:24px;width:100%}.record-view .container .mat-drawer-content{overflow:hidden}"]
}] }
];
/** @nocollapse */
RecordViewComponent.ctorParameters = () => [
{ type: ServiceService },
{ type: RouteElementService },
{ type: ProjectService },
{ type: ClipboardService },
{ type: MatIconRegistry },
{ type: DomSanitizer },
{ type: Router },
{ type: ElementsService }
];
RecordViewComponent.propDecorators = {
eleName: [{ type: Input }],
title: [{ type: Input }],
condition: [{ type: Input }],
dataTable: [{ type: ViewChild, args: ['dataTable', { static: true },] }],
labelDrawer: [{ type: ViewChild, args: ['labelDrawer', { static: false },] }],
columnsDrawer: [{ type: ViewChild, args: ['columnsDrawer', { static: false },] }],
drawer: [{ type: ViewChild, args: ['drawer', { static: true },] }]
};
if (false) {
/** @type {?} */
RecordViewComponent.prototype.eleName;
/** @type {?} */
RecordViewComponent.prototype.title;
/** @type {?} */
RecordViewComponent.prototype.condition;
/** @type {?} */
RecordViewComponent.prototype.dataTable;
/** @type {?} */
RecordViewComponent.prototype.labelDrawer;
/** @type {?} */
RecordViewComponent.prototype.columnsDrawer;
/** @type {?} */
RecordViewComponent.prototype.element;
/** @type {?} */
RecordViewComponent.prototype.drawer;
/** @type {?} */
RecordViewComponent.prototype.SelectTypeSelected;
/** @type {?} */
RecordViewComponent.prototype.SelectTypeUnselected;
/** @type {?} */
RecordViewComponent.prototype.showConditionalTemplateRunner;
/** @type {?} */
RecordViewComponent.prototype.editLabelModel;
/**
* @type {?}
* @private
*/
RecordViewComponent.prototype.subscribe;
/** @type {?} */
RecordViewComponent.prototype.svr;
/** @type {?} */
RecordViewComponent.prototype.ele;
/**
* @type {?}
* @private
*/
RecordViewComponent.prototype.prj;
/** @type {?} */
RecordViewComponent.prototype._clipboardService;
/**
* @type {?}
* @private
*/
RecordViewComponent.prototype.router;
/**
* @type {?}
* @private
*/
RecordViewComponent.prototype.eles;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class ProcessComponent {
constructor() {
this.buttonShowNum = 3;
this.processClick = new EventEmitter();
}
/**
* @return {?}
*/
ngOnInit() { }
}
ProcessComponent.decorators = [
{ type: Component, args: [{
selector: 'common-process',
template: "<button\n\t*ngFor=\"let pro of processes.slice(0, buttonShowNum)\"\n\tmat-icon-button\n\t[disabled]=\"!processStatus[pro.Name].Enabled\"\n\t[matTooltip]=\"pro.Name\"\n\t[color]=\"pro.Color\"\n\t(click)=\"processClick.emit(pro)\"\n>\n\t<mat-icon [svgIcon]=\"pro.Icon != '' ? pro.Icon : 'bookmark_border'\"> </mat-icon>\n</button>\n<button *ngIf=\"processes.length > buttonShowNum\" mat-icon-button [matMenuTriggerFor]=\"menuProcessMore\">\n\t<mat-icon svgIcon=\"more_vert\"> </mat-icon>\n</button>\n<mat-menu #menuProcessMore=\"matMenu\">\n\t<button\n\t\tmat-menu-item\n\t\t*ngFor=\"let pro of processes.slice(buttonShowNum)\"\n\t\t[disabled]=\"!processStatus[pro.Name].Enabled\"\n\t\t(click)=\"processClick.emit(pro)\"\n\t>\n\t\t<mat-icon [svgIcon]=\"pro.Icon != '' ? pro.Icon : 'bookmark_border'\"> </mat-icon>\n\t\t<span>{{ pro.Name }}</span>\n\t</button>\n</mat-menu>\n",
styles: [":host{padding:0;display:flex;align-content:center;justify-content:center;align-items:center}:host button{width:40px}"]
}] }
];
/** @nocollapse */
ProcessComponent.ctorParameters = () => [];
ProcessComponent.propDecorators = {
buttonShowNum: [{ type: Input }],
processes: [{ type: Input }],
processStatus: [{ type: Input }],
processClick: [{ type: Output }]
};
if (false) {
/** @type {?} */
ProcessComponent.prototype.buttonShowNum;
/** @type {?} */
ProcessComponent.prototype.processes;
/** @type {?} */
ProcessComponent.prototype.processStatus;
/** @type {?} */
ProcessComponent.prototype.processClick;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class TableModule {
}
TableModule.decorators = [
{ type: NgModule, args: [{
imports: [
CommonModule,
MatTooltipModule$1,
MatMenuModule,
MatSortModule,
MatTableModule$1,
MatIconModule,
MatButtonModule$1,
ClipboardModule,
MatSelectModule$1,
MatDividerModule,
MatCheckboxModule$1,
MatRippleModule
],
exports: [TableComponent],
declarations: [TableComponent, ProcessComponent]
},] }
];
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class ViewSelectorComponent {
/**
* @param {?} svr
*/
constructor(svr) {
this.svr = svr;
this.managerClick = new EventEmitter();
}
/**
* @return {?}
*/
ngOnInit() { }
/**
* @param {?} val
* @return {?}
*/
menuClick(val) {
this.svr.data.selectedView = val;
this.svr.refreshData().subscribe();
}
}
ViewSelectorComponent.decorators = [
{ type: Component, args: [{
selector: 'common-view-selector',
template: "<button mat-button [matMenuTriggerFor]=\"templateMenu\">\r\n\t<span class=\"\u663E\u793A\u5217\u6587\u5B57\" *ngIf=\"svr.data.selectedView; else viewElse\">{{ svr.data.selectedView.Name }}</span>\r\n\t<ng-template #viewElse>\r\n\t\t<span class=\"\u663E\u793A\u5217\u6587\u5B57\">\u663E\u793A\u5217</span>\r\n\t</ng-template>\r\n\t<mat-icon class=\"\u663E\u793A\u5217\u56FE\u6807\" svgIcon=\"view_module\"></mat-icon>\r\n</button>\r\n<mat-menu #templateMenu=\"matMenu\" overlapTrigger=\"true\">\r\n\t<button mat-menu-item *ngFor=\"let item of svr.data.constViewItems\" (click)=\"menuClick(item)\">\r\n\t\t<mat-icon *ngIf=\"svr.data.selectedView === item\" svgIcon=\"done\"> </mat-icon>\r\n\t\t{{ item.displayLabel() }}\r\n\t</button>\r\n\t<mat-divider></mat-divider>\r\n\t<div class=\"\u79C1\u6709\u83DC\u5355\u9879\">\r\n\t\t<button mat-menu-item *ngFor=\"let item of svr.data.viewList\" (click)=\"menuClick(item)\">\r\n\t\t\t<mat-icon *ngIf=\"svr.data.selectedView === item\" svgIcon=\"done\"> </mat-icon>\r\n\t\t\t{{ item.Name }}\r\n\t\t</button>\r\n\t</div>\r\n\t<mat-divider *ngIf=\"svr.data.viewList && svr.data.viewList.length > 0\"> </mat-divider>\r\n\t<button mat-menu-item (click)=\"managerClick.emit()\"><mat-icon svgIcon=\"settings\"></mat-icon>\u7BA1\u7406\u663E\u793A\u5217</button>\r\n</mat-menu>\r\n",
styles: ["@charset \"UTF-8\";.\u79C1\u6709\u83DC\u5355\u9879{max-height:200px;overflow-y:auto}.mat-menu-item{min-width:136px;height:40px;line-height:40px;padding:0 24px}.mat-menu-item .mat-icon{position:absolute;left:4px;top:12px}.mat-icon{width:16px;height:16px}.\u663E\u793A\u5217\u56FE\u6807{line-height:16px;vertical-align:middle;margin-left:8px}"]
}] }
];
/** @nocollapse */
ViewSelectorComponent.ctorParameters = () => [
{ type: ServiceService }
];
ViewSelectorComponent.propDecorators = {
managerClick: [{ type: Output }],
selectedValue: [{ type: Input }],
menuItems: [{ type: Input }]
};
if (false) {
/** @type {?} */
ViewSelectorComponent.prototype.managerClick;
/** @type {?} */
ViewSelectorComponent.prototype.selectedValue;
/** @type {?} */
ViewSelectorComponent.prototype.menuItems;
/** @type {?} */
ViewSelectorComponent.prototype.svr;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class ViewSelectorModule {
}
ViewSelectorModule.decorators = [
{ type: NgModule, args: [{
declarations: [ViewSelectorComponent],
imports: [
MatChipsModule,
MatIconModule$1,
MatMenuModule$1,
MatTooltipModule,
MatDividerModule$1,
MatButtonModule,
CommonModule
],
exports: [ViewSelectorComponent]
},] }
];
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @record
*/
function IMovePosition() { }
if (false) {
/** @type {?} */
IMovePosition.prototype.category;
/** @type {?} */
IMovePosition.prototype.label;
/** @type {?} */
IMovePosition.prototype.previousIndex;
/** @type {?} */
IMovePosition.prototype.currentIndex;
}
class CategoryForSelectComponent {
/**
* @param {?} svr
*/
constructor(svr) {
this.svr = svr;
this.labelDisplay = false;
this.hostClass = true;
}
/**
* @return {?}
*/
ngOnInit() { }
/**
* @param {?} label
* @return {?}
*/
click(label) {
/** @type {?} */
const idx = this.selectedLabels.findIndex((/**
* @param {?} v
* @return {?}
*/
v => v.equal(label)));
if (idx > -1) {
this.selectedLabels.splice(idx);
}
else {
this.selectedLabels.push(label);
}
}
/**
* @param {?} event
* @return {?}
*/
drop(event) {
this.svr
.setLabelPosition({
CategoryID: this.category.ID,
ID: this.category.Labels[event.previousIndex].ID,
Position: event.currentIndex
})
.subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
this.category.setLabelsPosition(v.map((/**
* @param {?} vv
* @return {?}
*/
vv => vv.ID)));
}));
}
/**
* @param {?} data
* @return {?}
*/
isSelected(data) {
return this.selectedLabels.find((/**
* @param {?} v
* @return {?}
*/
v => v.equal(data))) !== undefined;
}
}
CategoryForSelectComponent.decorators = [
{ type: Component, args: [{
selector: 'common-category-for-select',
template: "<div class=\"title\">\r\n\t{{ category?.displayLabel() }}\r\n\t<mat-icon\r\n\t\t(click)=\"labelDisplay = !labelDisplay\"\r\n\t\tclass=\"\u663E\u793A\u9690\u85CF\u56FE\u6807\"\r\n\t\tsvgIcon=\"{{ labelDisplay ? 'expand_more' : 'expand_less' }}\"\r\n\t></mat-icon>\r\n</div>\r\n<div cdkDropList cdkDropListOrientation=\"horizontal\" [class.\u9690\u85CF]=\"labelDisplay\" (cdkDropListDropped)=\"drop($event)\">\r\n\t<div\r\n\t\t*ngFor=\"let label of category?.Labels\"\r\n\t\tclass=\"\u6807\u7B7E\"\r\n\t\tcdkDrag\r\n\t\t[class.selected]=\"isSelected(label)\"\r\n\t\t(click)=\"click(label)\"\r\n\t>\r\n\t\t{{ label?.displayLabel() }}\r\n\t\t<div *ngIf=\"isSelected(label)\" class=\"\u4E09\u89D2\u5F62\"></div>\r\n\t\t<mat-icon *ngIf=\"isSelected(label)\" class=\"\u9009\u4E2D\u6807\u7B7E\" svgIcon=\"done\"></mat-icon>\r\n\t</div>\r\n</div>\r\n",
styles: ["@charset \"UTF-8\";.title{font-size:12px;margin:8px 0 16px;display:flex;justify-content:space-between;align-items:center}.title .\u663E\u793A\u9690\u85CF\u56FE\u6807{cursor:pointer}.\u6807\u7B7E{font-size:14px;display:inline-block;margin:0 16px 16px 0;height:34px;padding:0 24px;border-radius:4px;line-height:34px;position:relative;cursor:pointer}.\u6807\u7B7E .\u4E09\u89D2\u5F62{position:absolute;bottom:0;right:0}.\u6807\u7B7E .\u9009\u4E2D\u6807\u7B7E{width:16px;height:16px;line-height:16px;color:#fff;position:absolute;bottom:0;right:0}.\u9690\u85CF{display:none}"]
}] }
];
/** @nocollapse */
CategoryForSelectComponent.ctorParameters = () => [
{ type: EleViewBackFaceService }
];
CategoryForSelectComponent.propDecorators = {
category: [{ type: Input }],
selectedLabels: [{ type: Input }],
hostClass: [{ type: HostBinding, args: ['class.category-for-select',] }]
};
if (false) {
/** @type {?} */
CategoryForSelectComponent.prototype.category;
/** @type {?} */
CategoryForSelectComponent.prototype.selectedLabels;
/** @type {?} */
CategoryForSelectComponent.prototype.labelDisplay;
/** @type {?} */
CategoryForSelectComponent.prototype.hostClass;
/**
* @type {?}
* @private
*/
CategoryForSelectComponent.prototype.svr;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class LabelSelectComponent {
/**
* @param {?} svr
*/
constructor(svr) {
this.svr = svr;
this.hostClass = true;
}
/**
* @return {?}
*/
ngOnInit() {
this.svr.fetchCategories({ EleName: this.eleName, OwnerBy: this.ownerBy, Owner: this.owner }).subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
this.categories = v;
}));
}
}
LabelSelectComponent.decorators = [
{ type: Component, args: [{
selector: 'common-label-select',
template: "<div class=\"content\">\r\n\t<common-category-for-select *ngFor=\"let category of categories\"\r\n\t\t[category]=\"category\" [selectedLabels]=\"selectedLabels\">\r\n\t</common-category-for-select>\r\n</div>\r\n",
styles: ["@charset \"UTF-8\";:host{display:flex;flex-direction:column;width:618px;height:100%;box-sizing:border-box}.title{display:flex;padding:16px 16px 0 24px;justify-content:space-between}.title .edit{cursor:pointer}.title-label{font-size:18px;font-weight:700}.\u6807\u7B7E\u82AF\u7247{max-width:100%;padding:8px}.\u6807\u7B7E\u82AF\u7247 .mat-chip{width:90px;padding-right:24px;margin:4px;border-radius:4px;position:relative}.\u6807\u7B7E\u82AF\u7247 .mat-chip .\u6807\u7B7E{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block}.\u6807\u7B7E\u82AF\u7247 .mat-chip .\u5220\u9664\u6807\u7B7E{position:absolute;right:8px;top:8px}.\u6807\u7B7E\u82AF\u7247 .mat-icon{width:16px;height:16px}.footer{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:16px}.footer .footer-search{display:inline-block;height:24px;width:152px;line-height:24px;padding:0 24px 0 8px;border-radius:4px;font-size:12px;position:relative}.footer .footer-search input{height:24px}.footer .footer-search .mat-icon{position:absolute;top:0;right:0;margin:0}.content{flex-grow:1;overflow-y:auto;box-sizing:border-box}"]
}] }
];
/** @nocollapse */
LabelSelectComponent.ctorParameters = () => [
{ type: EleViewBackFaceService }
];
LabelSelectComponent.propDecorators = {
selectedLabels: [{ type: Input }],
eleName: [{ type: Input }],
ownerBy: [{ type: Input }],
owner: [{ type: Input }],
hostClass: [{ type: HostBinding, args: ['class.label-select',] }]
};
if (false) {
/** @type {?} */
LabelSelectComponent.prototype.selectedLabels;
/** @type {?} */
LabelSelectComponent.prototype.eleName;
/** @type {?} */
LabelSelectComponent.prototype.ownerBy;
/** @type {?} */
LabelSelectComponent.prototype.owner;
/** @type {?} */
LabelSelectComponent.prototype.categories;
/** @type {?} */
LabelSelectComponent.prototype.hostClass;
/**
* @type {?}
* @private
*/
LabelSelectComponent.prototype.svr;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class LabelSelectModule {
}
LabelSelectModule.decorators = [
{ type: NgModule, args: [{
declarations: [LabelSelectComponent, CategoryForSelectComponent],
imports: [CommonModule, MatIconModule$1],
exports: [LabelSelectComponent]
},] }
];
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class ConditionalTemplateRunnerComponent {
/**
* @param {?} svr
*/
constructor(svr) {
this.svr = svr;
// 不起名conditional-template的原因是element中的设置界面,已经用了该名称
this.hostClass = true;
this.enterPress = new EventEmitter();
this.typeInput = CTType.Input;
this.typeSelect = CTType.Select;
this.typeRangeInput = CTType.RangeInput;
this.typeMultiSelect = CTType.MultiSelect;
this.typeSilder = CTType.Slider;
}
/**
* @return {?}
*/
ngOnInit() { }
/**
* @return {?}
*/
reset() {
this.svr.data.conditionalTemplates.forEach((/**
* @param {?} v
* @return {?}
*/
v => {
v.Data.Value = undefined;
v.enable = false;
}));
}
}
ConditionalTemplateRunnerComponent.decorators = [
{ type: Component, args: [{
selector: 'common-conditional-template-runner',
template: "<div class=\"\u591A\u6761\u4EF6\u7B5B\u9009\">\r\n\t<div class=\"\u7B5B\u9009\u6761\u4EF6\"\r\n\t\t*ngFor=\"let item of svr.data.conditionalTemplates; let index = index\"\r\n\t\t[class.\u7B2C\u4E00\u4E2A\u6761\u4EF6]=\"index == 0\">\r\n\t\t<div class=\"\u6307\u6807\u540D\u79F0\">{{ item.Field }} <mat-icon svgIcon=\"undo\"\r\n\t\t\t\t*ngIf=\"item.enable\"\r\n\t\t\t\t(click)=\"item.Data.Value=undefined;item.enable=false\">\r\n\t\t\t</mat-icon>\r\n\t\t</div>\r\n\t\t<ng-container [ngSwitch]=\"item.Type\">\r\n\t\t\t<common-ct-runner-input *ngSwitchCase=\"typeInput\" [data]=\"item\"\r\n\t\t\t\t(enterPress)=\"enterPress.emit()\">\r\n\t\t\t</common-ct-runner-input>\r\n\t\t\t<common-ct-runner-range-input *ngSwitchCase=\"typeRangeInput\"\r\n\t\t\t\t[data]=\"item\"></common-ct-runner-range-input>\r\n\t\t\t<common-ct-runner-select *ngSwitchCase=\"typeSelect\" [data]=\"item\">\r\n\t\t\t</common-ct-runner-select>\r\n\t\t\t<common-ct-runner-multi-select *ngSwitchCase=\"typeMultiSelect\"\r\n\t\t\t\t[data]=\"item\"></common-ct-runner-multi-select>\r\n\t\t\t<common-ct-runner-silder *ngSwitchCase=\"typeSilder\" [data]=\"item\">\r\n\t\t\t</common-ct-runner-silder>\r\n\t\t</ng-container>\r\n\t</div>\r\n</div>\r\n<button class=\"\u91CD\u7F6E\" mat-stroked-button (click)=\"reset()\">\u91CD\u7F6E</button>",
styles: ["@charset \"UTF-8\";:host{display:block;width:100%;padding:24px 0 16px}.\u591A\u6761\u4EF6\u7B5B\u9009{max-height:360px;overflow-y:auto}.\u7B5B\u9009\u6761\u4EF6{width:100%;margin-top:24px;display:flex;align-items:center}.\u7B5B\u9009\u6761\u4EF6 .\u6307\u6807\u540D\u79F0{width:150px;text-align:left;padding:0 28px 0 32px;box-sizing:border-box;font-size:14px;display:-webkit-box;-webkit-line-clamp:2;overflow:hidden;position:relative}.\u7B5B\u9009\u6761\u4EF6 .\u6307\u6807\u540D\u79F0 .mat-icon{width:16px;height:16px;line-height:16px;position:absolute;right:8px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.\u7B2C\u4E00\u4E2A\u6761\u4EF6{margin-top:0}.\u91CD\u7F6E{width:48px;height:24px;line-height:24px;font-size:14px;margin:8px 32px 0}"]
}] }
];
/** @nocollapse */
ConditionalTemplateRunnerComponent.ctorParameters = () => [
{ type: ServiceService }
];
ConditionalTemplateRunnerComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.conditional-template-runner',] }],
enterPress: [{ type: Output }]
};
if (false) {
/** @type {?} */
ConditionalTemplateRunnerComponent.prototype.hostClass;
/** @type {?} */
ConditionalTemplateRunnerComponent.prototype.enterPress;
/** @type {?} */
ConditionalTemplateRunnerComponent.prototype.typeInput;
/** @type {?} */
ConditionalTemplateRunnerComponent.prototype.typeSelect;
/** @type {?} */
ConditionalTemplateRunnerComponent.prototype.typeRangeInput;
/** @type {?} */
ConditionalTemplateRunnerComponent.prototype.typeMultiSelect;
/** @type {?} */
ConditionalTemplateRunnerComponent.prototype.typeSilder;
/** @type {?} */
ConditionalTemplateRunnerComponent.prototype.svr;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class CtRunnerInputComponent {
constructor() {
this.hostClass = true;
this.enterPress = new EventEmitter();
}
/**
* @return {?}
*/
ngOnInit() { }
}
CtRunnerInputComponent.decorators = [
{ type: Component, args: [{
selector: 'common-ct-runner-input',
template: "<mat-form-field appearance=\"outline\" *ngIf=\"data.Data\">\r\n\t<input matInput [(ngModel)]=\"data.Data.Value\"\r\n\t\t(ngModelChange)=\"data.enable = !!this.data.Data.Value\"\r\n\t\t(keyup.enter)=\"enterPress.emit()\" />\r\n</mat-form-field>",
styles: [".mat-form-field{max-width:336px;width:100%;font-size:12px}.mat-form-field ::ng-deep .mat-form-field-wrapper{margin:0;padding-bottom:0;vertical-align:bottom;-webkit-transform:translateY(0);transform:translateY(0)}.mat-form-field ::ng-deep .mat-form-field-infix{border:0;font-size:14px;padding:10px 0;box-sizing:border-box}"]
}] }
];
/** @nocollapse */
CtRunnerInputComponent.ctorParameters = () => [];
CtRunnerInputComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.ct-runner-input',] }],
data: [{ type: Input }],
enterPress: [{ type: Output }]
};
if (false) {
/** @type {?} */
CtRunnerInputComponent.prototype.hostClass;
/** @type {?} */
CtRunnerInputComponent.prototype.data;
/** @type {?} */
CtRunnerInputComponent.prototype.enterPress;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class CtRunnerSelectComponent {
constructor() {
this.hostClass = true;
}
/**
* @return {?}
*/
get setting() {
if (this.data) {
return (/** @type {?} */ (this.data.Setting));
}
return undefined;
}
/**
* @return {?}
*/
getValue() {
/** @type {?} */
const v = (/** @type {?} */ (this.data.Data.Value));
if (v) {
return v.Value;
}
return undefined;
}
/**
* @param {?} val
* @return {?}
*/
setValue(val) {
/** @type {?} */
let mval = (/** @type {?} */ (this.data.Data.Value));
if (!mval) {
mval = (/** @type {?} */ ({}));
this.data.Data.Value = mval;
}
mval.OtherOption = this.setting.OtherOption;
mval.Options = this.setting.Options.filter((/**
* @param {?} v
* @return {?}
*/
v => v.Value !== this.setting.OtherOption)).map((/**
* @param {?} v
* @return {?}
*/
v => v.Value));
mval.Value = val.value;
this.data.enable = !!val.value;
}
/**
* @return {?}
*/
ngOnInit() { }
}
CtRunnerSelectComponent.decorators = [
{ type: Component, args: [{
selector: 'common-ct-runner-select',
template: "<mat-radio-group aria-label=\"Select an option\" [value]=\"getValue()\"\r\n\t(change)=\"setValue($event)\">\r\n\t<mat-radio-button *ngFor=\"let item of setting?.Options\" class=\"\u5355\u9009\"\r\n\t\t[class.\u9009\u4E2D]=\"data?.Data.Value == item.Value\" [value]=\"item.Value\">\r\n\t\t{{ item.Text }}</mat-radio-button>\r\n</mat-radio-group>",
styles: ["@charset \"UTF-8\";.\u5355\u9009{font-size:14px;margin-right:24px;line-height:24px}"]
}] }
];
/** @nocollapse */
CtRunnerSelectComponent.ctorParameters = () => [];
CtRunnerSelectComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.ct-runner-select',] }],
data: [{ type: Input }]
};
if (false) {
/** @type {?} */
CtRunnerSelectComponent.prototype.hostClass;
/** @type {?} */
CtRunnerSelectComponent.prototype.data;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class CtRunnerMultiSelectComponent {
constructor() {
this.hostClass = true;
}
/**
* @return {?}
*/
get setting() {
if (this.data) {
return (/** @type {?} */ (this.data.Setting));
}
return undefined;
}
/**
* @param {?} val
* @return {?}
*/
getOptionCheck(val) {
/** @type {?} */
const mval = (/** @type {?} */ (this.data.Data.Value));
if (mval && mval.Value) {
return mval.Value.indexOf(val) > -1;
}
return false;
}
/**
* @param {?} val
* @param {?} check
* @return {?}
*/
setOptionCheck(val, check) {
/** @type {?} */
let mval = (/** @type {?} */ (this.data.Data.Value));
if (!mval) {
mval = (/** @type {?} */ ({ Value: [] }));
this.data.Data.Value = mval;
}
mval.OtherOption = this.setting.OtherOption;
mval.Options = this.setting.Options.filter((/**
* @param {?} v
* @return {?}
*/
v => v.Value !== this.setting.OtherOption)).map((/**
* @param {?} v
* @return {?}
*/
v => v.Value));
/** @type {?} */
let arr = mval.Value;
if (!arr) {
arr = [];
mval.Value = arr;
}
/** @type {?} */
const idx = arr.indexOf(val);
if (check && idx === -1) {
arr.push(val);
}
if (!check && idx > -1) {
arr.splice(idx, 1);
}
this.data.enable = arr && arr.length > 0;
}
/**
* @return {?}
*/
ngOnInit() { }
}
CtRunnerMultiSelectComponent.decorators = [
{ type: Component, args: [{
selector: 'common-ct-runner-multi-select',
template: "<section>\r\n\t<mat-checkbox\r\n\t\tclass=\"\u591A\u9009\"\r\n\t\t[class.\u9009\u4E2D]=\"getOptionCheck(item.Value)\"\r\n\t\t*ngFor=\"let item of setting?.Options\"\r\n\t\t[checked]=\"getOptionCheck(item.Value)\"\r\n\t\t(change)=\"setOptionCheck(item.Value, $event.checked)\"\r\n\t\t>{{ item.Text }}\r\n\t</mat-checkbox>\r\n</section>\r\n",
styles: ["@charset \"UTF-8\";.\u591A\u9009{font-size:14px;margin-right:24px;line-height:24px}"]
}] }
];
/** @nocollapse */
CtRunnerMultiSelectComponent.ctorParameters = () => [];
CtRunnerMultiSelectComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.ct-runner-multi-select',] }],
data: [{ type: Input }]
};
if (false) {
/** @type {?} */
CtRunnerMultiSelectComponent.prototype.hostClass;
/** @type {?} */
CtRunnerMultiSelectComponent.prototype.data;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class CtRunnerRangeInputComponent {
constructor() {
this.hostClass = true;
}
/**
* @return {?}
*/
getLowValue() {
/** @type {?} */
const d = (/** @type {?} */ (this.data.Data.Value));
if (d && d.LowValue) {
return d.LowValue;
}
return '';
}
/**
* @return {?}
*/
getHighValue() {
/** @type {?} */
const d = (/** @type {?} */ (this.data.Data.Value));
if (d && d.HighValue) {
return d.HighValue;
}
return '';
}
/**
* @param {?} val
* @return {?}
*/
setLowValue(val) {
/** @type {?} */
let d = (/** @type {?} */ (this.data.Data.Value));
if (!d) {
d = (/** @type {?} */ ({}));
this.data.Data.Value = d;
}
d.LowValue = val;
this.data.enable = !!d.LowValue || !!d.HighValue;
}
/**
* @param {?} val
* @return {?}
*/
setHighValue(val) {
/** @type {?} */
let d = (/** @type {?} */ (this.data.Data.Value));
if (!d) {
d = (/** @type {?} */ ({}));
this.data.Data.Value = d;
}
d.HighValue = val;
this.data.enable = !!d.LowValue || !!d.HighValue;
}
/**
* @return {?}
*/
ngOnInit() { }
}
CtRunnerRangeInputComponent.decorators = [
{ type: Component, args: [{
selector: 'common-ct-runner-range-input',
template: "<mat-form-field appearance=\"outline\">\r\n\t<input matInput #lowValue [value]=\"getLowValue()\" (change)=\"setLowValue(lowValue.value)\" />\r\n</mat-form-field>\r\n-\r\n<mat-form-field appearance=\"outline\">\r\n\t<input matInput #highValue [value]=\"getHighValue()\" (change)=\"setHighValue(highValue.value)\" />\r\n</mat-form-field>\r\n<!-- <input #lowValue [value]=\"getLowValue()\" (change)=\"setLowValue(lowValue.value)\" />\r\n\r\n<input #highValue [value]=\"getHighValue()\" (change)=\"setHighValue(highValue.value)\" /> -->\r\n",
styles: [".mat-form-field{max-width:128px;width:100%;font-size:12px}.mat-form-field ::ng-deep .mat-form-field-wrapper{margin:0;padding-bottom:0;vertical-align:bottom;-webkit-transform:translateY(0);transform:translateY(0)}.mat-form-field ::ng-deep .mat-form-field-infix{border:0;font-size:14px;padding:10px 0;box-sizing:border-box}"]
}] }
];
/** @nocollapse */
CtRunnerRangeInputComponent.ctorParameters = () => [];
CtRunnerRangeInputComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.ct-runner-range-input',] }],
data: [{ type: Input }]
};
if (false) {
/** @type {?} */
CtRunnerRangeInputComponent.prototype.hostClass;
/** @type {?} */
CtRunnerRangeInputComponent.prototype.data;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class CtRunnerSilderComponent {
constructor() {
this.hostClass = true;
this.options = SilderSetting.defaultOptions();
}
/**
* @return {?}
*/
get data() {
return this._data;
}
/**
* @param {?} val
* @return {?}
*/
set data(val) {
this._data = val;
this.options = new SilderSetting(this.setting).toOptions();
}
/**
* @return {?}
*/
get setting() {
if (this.data) {
return (/** @type {?} */ (this.data.Setting));
}
return undefined;
}
/**
* @return {?}
*/
get lowValue() {
/** @type {?} */
const r = (/** @type {?} */ (this.data.Data.Value));
if (r) {
return r.LowValue;
}
return this.setting.Min;
}
/**
* @param {?} val
* @return {?}
*/
set lowValue(val) {
/** @type {?} */
let r = (/** @type {?} */ (this.data.Data.Value));
if (!r) {
r = (/** @type {?} */ ({}));
this.data.Data.Value = r;
}
if (this.setting.NegativeInfinity) {
r.NegativeInfinity = val === this.setting.Min;
}
if (!r.Ratio) {
r.Ratio = this.setting.Ratio;
}
r.LowValue = val;
this.data.enable = r.LowValue !== this.setting.Min || r.HighValue !== this.setting.Min;
}
/**
* @return {?}
*/
get highValue() {
/** @type {?} */
const r = (/** @type {?} */ (this.data.Data.Value));
if (r) {
return r.HighValue;
}
return this.setting.Min;
}
/**
* @param {?} val
* @return {?}
*/
set highValue(val) {
/** @type {?} */
let r = (/** @type {?} */ (this.data.Data.Value));
if (!r) {
r = (/** @type {?} */ ({}));
this.data.Data.Value = r;
}
if (this.setting.PositiveInfinity) {
r.PositiveInfinity = val === this.setting.Max;
}
if (!r.Ratio) {
r.Ratio = this.setting.Ratio;
}
// 这一句必须在最后,否则执行后会跳出函数,原因未知
r.HighValue = val;
this.data.enable = r.LowValue !== this.setting.Min || r.HighValue !== this.setting.Min;
}
/**
* @return {?}
*/
ngOnInit() { }
}
CtRunnerSilderComponent.decorators = [
{ type: Component, args: [{
selector: 'common-ct-runner-silder',
template: "<div class=\"\u6ED1\u5757\u9009\u62E9\">\r\n\t<ng5-slider [(value)]=\"lowValue\" [(highValue)]=\"highValue\" [options]=\"options\"> </ng5-slider>\r\n</div>\r\n<div class=\"\u8303\u56F4\u8BBE\u7F6E\">\r\n\t<div class=\"\u8303\u56F4\u503C\">\r\n\t\t<span class=\"\u540D\u79F0\">\u8D77\u59CB\u503C</span>\r\n\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t<input matInput [(ngModel)]=\"lowValue\" />\r\n\t\t</mat-form-field>\r\n\t</div>\r\n\t<div class=\"\u8303\u56F4\u503C\">\r\n\t\t<span class=\"\u540D\u79F0\">\u7ED3\u675F\u503C</span>\r\n\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t<input matInput [(ngModel)]=\"highValue\" />\r\n\t\t</mat-form-field>\r\n\t</div>\r\n</div>\r\n<!-- \u4E0A\u9650:<input [(ngModel)]=\"lowValue\">\r\n\u4E0B\u9650:<input [(ngModel)]=\"highValue\"> -->\r\n",
styles: ["@charset \"UTF-8\";.\u6ED1\u5757\u9009\u62E9{max-width:338px;width:100%}::ng-deep .\u6ED1\u5757\u9009\u62E9 .ng5-slider .ng5-slider-bar{height:4px!important}::ng-deep .\u6ED1\u5757\u9009\u62E9 .ng5-slider .ng5-slider-selection{height:6px!important;-webkit-transform:translate(9px,-1px);transform:translate(9px,-1px)}::ng-deep .\u6ED1\u5757\u9009\u62E9 .ng5-slider .ng5-slider-pointer{width:14px;height:14px;top:-4px;border-radius:50%!important;-webkit-transform:translateX(9px);transform:translateX(9px)}::ng-deep .\u6ED1\u5757\u9009\u62E9 .ng5-slider .ng5-slider-pointer:after{width:12px;height:12px;top:1px;left:1px;border-radius:50%!important}::ng-deep .\u6ED1\u5757\u9009\u62E9 .ng5-slider .ng5-slider-pointer.ng5-slider-active:after{background-color:#fff}::ng-deep .\u6ED1\u5757\u9009\u62E9 .ng5-slider .ng5-slider-span{font-size:12px}::ng-deep .\u6ED1\u5757\u9009\u62E9 .ng5-slider .ng5-slider-model-high,::ng-deep .\u6ED1\u5757\u9009\u62E9 .ng5-slider .ng5-slider-model-value{-webkit-transform:translateX(9px);transform:translateX(9px)}.\u8303\u56F4\u8BBE\u7F6E{max-width:386px;width:100%;display:flex;justify-content:flex-start}.\u8303\u56F4\u8BBE\u7F6E .\u8303\u56F4\u503C{width:110px;margin:0 32px 0 0;display:flex}.\u8303\u56F4\u8BBE\u7F6E .\u8303\u56F4\u503C .\u540D\u79F0{font-size:12px;line-height:24px;margin-right:8px}.\u8303\u56F4\u8BBE\u7F6E .\u8303\u56F4\u503C .mat-form-field{max-width:64px;flex-grow:1}.\u8303\u56F4\u8BBE\u7F6E .\u8303\u56F4\u503C .mat-form-field ::ng-deep .mat-form-field-wrapper{margin:0;padding-bottom:0;vertical-align:bottom;-webkit-transform:translateY(0);transform:translateY(0)}.\u8303\u56F4\u8BBE\u7F6E .\u8303\u56F4\u503C .mat-form-field ::ng-deep .mat-form-field-infix{border:0;font-size:14px;padding:8px 0;box-sizing:border-box}"]
}] }
];
/** @nocollapse */
CtRunnerSilderComponent.ctorParameters = () => [];
CtRunnerSilderComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.ct-runner-silder',] }],
data: [{ type: Input }]
};
if (false) {
/** @type {?} */
CtRunnerSilderComponent.prototype.hostClass;
/** @type {?} */
CtRunnerSilderComponent.prototype._data;
/** @type {?} */
CtRunnerSilderComponent.prototype.options;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
// registerLoadedConfigEvent(CTRL_RECORDVIEW, () => getControllerRoutes(CTRL_RECORDVIEW, RecordViewComponent));
class RecordViewInnerModule {
}
RecordViewInnerModule.decorators = [
{ type: NgModule, args: [{
imports: [
CommonModule,
MatTooltipModule$1,
MatMenuModule,
MatIconModule,
ClipboardModule,
MatButtonModule$1,
MatFormFieldModule,
MatSelectModule$1,
MatDividerModule,
MatInputModule,
MatCheckboxModule$1,
MatRippleModule,
MatSidenavModule,
MatChipsModule$1,
MatTabsModule,
MatDialogModule$1,
DragDropModule,
FormsModule,
TableModule,
MatCardModule,
MatGridListModule,
MatRadioModule,
LabelSelectorModule,
MatExpansionModule$1,
ViewSelectorModule,
MatSnackBarModule,
ViewDefineModule,
LabelSelectModule,
LabelManagerModule,
Ng5SliderModule
],
exports: [CommonModule, RecordViewComponent],
declarations: [
RecordViewComponent,
FooterToolbarComponent,
LabelDrawerComponent,
LabelDrawerForSelectComponent,
LabelDrawerForEditComponent,
ViewDrawerComponent,
ConditionalTemplateRunnerComponent,
CtRunnerInputComponent,
CtRunnerSelectComponent,
CtRunnerMultiSelectComponent,
CtRunnerRangeInputComponent,
CtRunnerSilderComponent
],
schemas: [NO_ERRORS_SCHEMA]
},] }
];
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
const indexElementName = 'index';
/** @enum {string} */
const CardType = {
navigation: 'navigation',
calendar: 'calendar',
notice: 'notice',
datalist: 'datalist',
chart: 'chart',
};
/** @type {?} */
const defaultCardSize = {
[CardType.navigation]: 'sm',
[CardType.calendar]: 'sm',
[CardType.notice]: 'sm',
[CardType.datalist]: 'md',
[CardType.chart]: 'sm'
};
/**
* @record
*/
function UserIndexCard() { }
if (false) {
/** @type {?} */
UserIndexCard.prototype.Type;
/** @type {?} */
UserIndexCard.prototype.Size;
/** @type {?} */
UserIndexCard.prototype.Setting;
}
/**
* @record
*/
function UserIndexSetting() { }
if (false) {
/** @type {?} */
UserIndexSetting.prototype.Layout;
/** @type {?} */
UserIndexSetting.prototype.Cards;
/** @type {?} */
UserIndexSetting.prototype.NavigationElements;
}
/**
* @record
*/
function BannerSetting() { }
if (false) {
/** @type {?} */
BannerSetting.prototype.DefaultBannerImage;
/** @type {?} */
BannerSetting.prototype.Banners;
}
/**
* @record
*/
function UserDiary() { }
if (false) {
/** @type {?} */
UserDiary.prototype.Day;
/** @type {?} */
UserDiary.prototype.Content;
}
/**
* @record
*/
function UserNotice() { }
if (false) {
/** @type {?} */
UserNotice.prototype.ID;
/** @type {?} */
UserNotice.prototype.Title;
/** @type {?} */
UserNotice.prototype.Time;
/** @type {?} */
UserNotice.prototype.IsReaded;
/** @type {?} */
UserNotice.prototype.URL;
/** @type {?} */
UserNotice.prototype.Sign;
/** @type {?} */
UserNotice.prototype.FrontURL;
}
/**
* @record
*/
function FetchMyNoticeResult() { }
if (false) {
/** @type {?} */
FetchMyNoticeResult.prototype.ElementForBrowseNotice;
/** @type {?} */
FetchMyNoticeResult.prototype.Data;
}
class IndexService {
// 是否已经初始化完毕
/**
* @param {?} api
* @param {?} eles
*/
constructor(api, eles) {
this.api = api;
this.eles = eles;
this.userSetting = (/** @type {?} */ ({}));
this.inited = false; // 是否已经初始化完毕
}
/**
* @private
* @return {?}
*/
fetchIndexSetting() {
return this.api.get(indexElementName, 'fetch-index-setting');
}
/**
* @private
* @param {?} param
* @return {?}
*/
updateIndexSetting(param) {
return this.api.post(indexElementName, 'update-index-setting', param);
}
/**
* @private
* @return {?}
*/
fetchBanner() {
return this.api.get(indexElementName, 'fetch-banner');
}
/**
* @private
* @return {?}
*/
fetchIndexUserDiary() {
// 需要将后端传递过来的字符串转换成date类型
return this.api.get(indexElementName, 'fetch-index-user-diary').pipe(map((/**
* @param {?} vals
* @return {?}
*/
vals => vals
? vals.map((/**
* @param {?} v
* @return {?}
*/
v => ({
Day: new Date(v.Day),
Content: v.Content
// tslint:disable-next-line: indent
})))
: [])));
}
/**
* @private
* @param {?} day
* @return {?}
*/
removeIndexUserDiary(day) {
return this.api.post(indexElementName, 'remove-index-user-diary', day);
}
/**
* @private
* @param {?} param
* @return {?}
*/
updateIndexUserDiary(param) {
return this.api.post(indexElementName, 'update-index-user-diary', param);
}
/**
* @private
* @return {?}
*/
fetchMyNotice() {
/**
* @record
*/
function IUserNotice() { }
if (false) {
/** @type {?} */
IUserNotice.prototype.ID;
/** @type {?} */
IUserNotice.prototype.Title;
/** @type {?} */
IUserNotice.prototype.Time;
/** @type {?} */
IUserNotice.prototype.IsReaded;
/** @type {?} */
IUserNotice.prototype.URL;
/** @type {?} */
IUserNotice.prototype.Sign;
}
/**
* @record
*/
function IFetchMyNoticeResult() { }
if (false) {
/** @type {?} */
IFetchMyNoticeResult.prototype.ElementForBrowseNotice;
/** @type {?} */
IFetchMyNoticeResult.prototype.Data;
}
return this.api.get(indexElementName, 'fetch-my-notice').pipe(map((/**
* @param {?} v
* @return {?}
*/
v => ((/** @type {?} */ ({
ElementForBrowseNotice: v.ElementForBrowseNotice,
Data: v.Data.map((/**
* @param {?} sv
* @return {?}
*/
sv => ((/** @type {?} */ ({
ID: sv.ID,
Title: sv.Title,
Time: new Date(sv.Time),
IsReaded: sv.IsReaded,
URL: sv.URL,
Sign: sv.Sign
})))))
}))))));
}
/**
* @return {?}
*/
init() {
this.fetchIndexSetting().subscribe((/**
* @param {?} data
* @return {?}
*/
data => {
this.userSetting = data || ((/** @type {?} */ ({})));
// console.log('======', this.userSetting);
this.userSetting.Cards = this.userSetting.Cards || [];
this.userSetting.Layout = this.userSetting.Layout || 'auto';
// console.log('------', this.userSetting.Layout);
this.userSetting.NavigationElements = this.userSetting.NavigationElements || [];
// 找不到的菜单项,或者是没有权限,需要去除
this.userSetting.NavigationElements = this.userSetting.NavigationElements.filter((/**
* @param {?} v
* @return {?}
*/
v => this.eles.get(v)));
this.inited = true;
}));
this.fetchBanner().subscribe((/**
* @param {?} val
* @return {?}
*/
val => {
this.banner = val;
this.banner.DefaultBannerImage = fullApiPath(this.banner.DefaultBannerImage);
}));
}
/**
* @return {?}
*/
initCalendar() {
this.fetchIndexUserDiary().subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
this.userDiary = v;
}));
}
/**
* @return {?}
*/
initNotice() {
this.fetchMyNotice().subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
this.notice = v.Data;
this.eles.addElement(v.ElementForBrowseNotice);
v.Data.forEach((/**
* @param {?} one
* @return {?}
*/
one => this.eles.setURLSign(one.URL, one.Sign)));
// 然后才能计算前端url
this.notice.forEach((/**
* @param {?} one
* @return {?}
*/
one => {
one.FrontURL = this.eles.frontElementURL(v.ElementForBrowseNotice.Name, one.URL);
}));
}));
}
/**
* @param {?} day
* @param {?} content
* @return {?}
*/
updateUserDiary(day, content) {
return this.updateIndexUserDiary({ Day: day, Content: content }).pipe(tap((/**
* @return {?}
*/
() => {
/** @type {?} */
const found = this.userDiary.find((/**
* @param {?} v
* @return {?}
*/
v => v.Day.getTime() === day.getTime()));
if (found) {
found.Content = content;
}
else {
this.userDiary.push({ Day: day, Content: content });
this.userDiary.sort((/**
* @param {?} a
* @param {?} b
* @return {?}
*/
(a, b) => {
return a.Day.getTime() - b.Day.getTime();
}));
}
})));
}
/**
* @param {?} day
* @return {?}
*/
removeUserDiary(day) {
return this.removeIndexUserDiary(day).pipe(tap((/**
* @return {?}
*/
() => {
this.userDiary.splice(this.userDiary.findIndex((/**
* @param {?} v
* @return {?}
*/
v => v.Day.getTime() === day.getTime())), 1);
})));
}
/**
* @return {?}
*/
updateSetting() {
return this.updateIndexSetting(this.userSetting);
}
}
IndexService.decorators = [
{ type: Injectable, args: [{ providedIn: 'root' },] }
];
/** @nocollapse */
IndexService.ctorParameters = () => [
{ type: ElementApiService },
{ type: ElementsService }
];
/** @nocollapse */ IndexService.ngInjectableDef = ɵɵdefineInjectable({ factory: function IndexService_Factory() { return new IndexService(ɵɵinject(ElementApiService), ɵɵinject(ElementsService)); }, token: IndexService, providedIn: "root" });
if (false) {
/** @type {?} */
IndexService.prototype.userSetting;
/** @type {?} */
IndexService.prototype.banner;
/** @type {?} */
IndexService.prototype.userDiary;
/** @type {?} */
IndexService.prototype.notice;
/** @type {?} */
IndexService.prototype.inited;
/**
* @type {?}
* @private
*/
IndexService.prototype.api;
/**
* @type {?}
* @private
*/
IndexService.prototype.eles;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class BannerComponent {
/**
* @param {?} svr
*/
constructor(svr) {
this.svr = svr;
this.hostClass = true;
}
/**
* @return {?}
*/
ngOnInit() { }
}
BannerComponent.decorators = [
{ type: Component, args: [{
selector: 'common-banner',
template: "<div class=\"banner-all\">\r\n\t<ng-container *ngIf=\"svr.banner?.Banners?.length > 0; else default\">\r\n\t\t<a class=\"\u94FE\u63A5\" *ngFor=\"let b of svr.banner.Banners\" [href]=\"b.NavigationURL\" target=\"_blank\"\r\n\t\t\t><img [src]=\"b.ImageURL\"\r\n\t\t/></a>\r\n\t</ng-container>\r\n\t<ng-template #default>\r\n\t\t<img class=\"banner-img \" [src]=\"svr.banner?.DefaultBannerImage\" *ngIf=\"svr.banner?.DefaultBannerImage\" />\r\n\t</ng-template>\r\n</div>\r\n",
styles: ["@charset \"UTF-8\";.banner-all{height:100%;overflow:hidden;position:relative;border-radius:4px;box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}.banner-img{height:100%;position:absolute;left:50%;top:0;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.\u94FE\u63A5{width:100%;height:100%;position:relative}.\u94FE\u63A5 img{height:100%;position:absolute;left:50%;top:0;-webkit-transform:translateX(-50%);transform:translateX(-50%)}"]
}] }
];
/** @nocollapse */
BannerComponent.ctorParameters = () => [
{ type: IndexService }
];
BannerComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.c-index-banner',] }]
};
if (false) {
/** @type {?} */
BannerComponent.prototype.hostClass;
/** @type {?} */
BannerComponent.prototype.svr;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class CustomDateFormatter extends CalendarDateFormatter {
/**
* @param {?} __0
* @return {?}
*/
monthViewColumnHeader({ date, locale }) {
// console.log(formatDate(date, 'EEEEE', locale));
// switch (date.getDay()) {
// case 0:
// return 'S';
// break;
// case 1:
// return 'M';
// break;
// case 2:
// return 'T';
// break;
// case 3:
// return 'W';
// break;
// case 4:
// return 'T';
// break;
// case 5:
// return 'F';
// break;
// case 6:
// return 'S';
// break;
// }
return formatDate(date, 'EEEEE', locale); // use short week days
}
}
class CalendarComponent {
/**
* @param {?} svr
*/
constructor(svr) {
this.svr = svr;
this.hostClass = true;
this.navName = 'calendar';
this.view = CalendarView.Month;
this.viewDate = new Date();
this.isEdit = false;
this.activeDayIsOpen = true;
this.showDayHint = false;
this.navSize = this.svr.userSetting.Cards.find((/**
* @param {?} x
* @return {?}
*/
x => x.Type === this.navName)).Size;
// console.log(this.navSize);
}
/**
* @return {?}
*/
closeShowDayHint() {
this.showDayHint = false;
}
/**
* @return {?}
*/
get events() {
if (this.svr.userDiary) {
return this.svr.userDiary.map((/**
* @param {?} v
* @return {?}
*/
v => ({
start: new Date(v.Day),
title: v.Content
})));
}
return [];
}
/**
* @param {?} action
* @param {?} event
* @return {?}
*/
handleEvent(action, event) {
// 111;
console.log(action, event);
}
/**
* @return {?}
*/
ngOnInit() {
this.svr.initCalendar();
}
// ↓单击日期时
/**
* @param {?} event
* @return {?}
*/
dayClick(event) {
// console.log((event.sourceEvent.target as HTMLElement).getBoundingClientRect());
this.showDay = event.day;
this.isEdit = !this.showDay.isPast && this.showDay.events.length === 0;
this.showDayHint = true; // 日期备注是否显示
// 日期备注是否显示
// ↓ 获取备注信息栏的坐标(即 点击元素在屏幕中的位置)
/** @type {?} */
const posCircle = ((/** @type {?} */ (event.sourceEvent.target))).getBoundingClientRect();
/** @type {?} */
const distanceWidth = posCircle.width;
/** @type {?} */
const distanceRight = posCircle.right;
// 如果右侧距离不够,则往选择左侧显示
if (window.innerWidth - distanceRight < 320) {
this.disX = posCircle.left - 320 + 32;
}
else {
this.disX = posCircle.left + distanceWidth - 32;
}
this.disY = posCircle.bottom;
if (event.day.events && event.day.events.length > 0) {
this.editText = event.day.events[0].title;
}
else {
this.editText = '';
}
// console.log((this.innerWidth = window.innerWidth));
// console.log('showDay:', this.showDay);
// console.log('---');
// console.log('showDay:', this.showDay.isPast);
}
/**
* @return {?}
*/
editOk() {
this.svr.updateUserDiary(this.showDay.date, this.editText).subscribe((/**
* @return {?}
*/
() => {
this.showDayHint = false;
}));
}
/**
* @return {?}
*/
editCancel() {
this.editText === '' ? (this.showDayHint = false) : (this.isEdit = false);
}
/**
* @return {?}
*/
removeEvents() {
this.svr.removeUserDiary(this.showDay.date).subscribe((/**
* @return {?}
*/
() => {
this.showDayHint = false;
}));
}
}
CalendarComponent.decorators = [
{ type: Component, args: [{
selector: 'common-calendar',
template: "<div class=\"calendar-main mat-elevation-z2\">\r\n\t<div class=\"main-title\">\r\n\t\t<div class=\"title-left\">\r\n\t\t\t<mat-icon svgIcon=\"date_range\"></mat-icon>\r\n\t\t\t<span>\u65E5\u7A0B\u5B89\u6392</span>\r\n\t\t</div>\r\n\r\n\t\t<div class=\"title-right\">\r\n\t\t\t<common-more-vert [typeName]=\"navName\" [theNavSize]=\"navSize\">\r\n\t\t\t</common-more-vert>\r\n\t\t</div>\r\n\t</div>\r\n\t<div class=\"cal-title\">\r\n\t\t<button mat-button color=\"primary\" class=\"btn btn-primary\"\r\n\t\t\tmwlCalendarPreviousView [view]=\"view\" [(viewDate)]=\"viewDate\">\r\n\t\t\t<mat-icon svgIcon=\"keyboard_arrow_left\"></mat-icon>\r\n\t\t</button>\r\n\t\t<div class=\"title-text\">\r\n\t\t\t{{ this.viewDate|date:'yyyy\u5E74MM\u6708'}}\r\n\t\t\t<!-- {{ viewDate | calendarDate:(view + 'ViewTitle'):'en' }} -->\r\n\t\t</div>\r\n\t\t<button mat-button color=\"primary\" class=\"btn btn-primary\"\r\n\t\t\tmwlCalendarNextView [view]=\"view\" [(viewDate)]=\"viewDate\">\r\n\t\t\t<mat-icon svgIcon=\"keyboard_arrow_right\"></mat-icon>\r\n\t\t</button>\r\n\t</div>\r\n\t<div class=\"dateCal\">\r\n\t\t<mwl-calendar-month-view [viewDate]=\"viewDate\" [events]=\"events\"\r\n\t\t\t[cellTemplate]=\"customCellTemplate\" (dayClicked)=\"dayClick($event)\">\r\n\t\t</mwl-calendar-month-view>\r\n\t</div>\r\n\t<ng-template #customCellTemplate let-day=\"day\" let-locale=\"locale\">\r\n\t\t<div class=\"per-day\">\r\n\t\t\t<div class=\"per-day-cricle\"\r\n\t\t\t\t[ngClass]=\"{'active':showDay?.date?.getTime() === day.date.getTime()}\">\r\n\t\t\t\t{{ day.date | calendarDate:'monthViewDayNumber':locale }}\r\n\t\t\t\t<mat-icon class=\"icon-circle\" svgIcon=\"fiber_manual_record\"\r\n\t\t\t\t\t*ngIf=\"day.badgeTotal>0\"></mat-icon>\r\n\t\t\t\t<!-- \u7B49\u4F1A\u63D2\u5165 -->\r\n\t\t\t</div>\r\n\t\t</div>\r\n\r\n\t</ng-template>\r\n\r\n\r\n\t<div class=\"show-day mat-elevation-z2\"\r\n\t\t[ngStyle]=\"{'left.px': disX, 'top.px': disY}\" *ngIf=\"showDayHint\"\r\n\t\t(click)=\"$event.stopPropagation()\">\r\n\t\t<div *ngIf=\"isEdit;else readonly\" class=\"is-edit\">\r\n\t\t\t<div class=\"edit-title\">\r\n\t\t\t\t<b class=\"edit-left\">\r\n\t\t\t\t\t{{showDay.date|date:'yyyy.MM.dd'}}\r\n\t\t\t\t</b>\r\n\t\t\t\t<div class=\"edit-right\">\r\n\t\t\t\t\t<button mat-button>\r\n\t\t\t\t\t\t<mat-icon svgIcon=\"clear\" (click)=\"editCancel()\">\r\n\t\t\t\t\t\t</mat-icon>\r\n\t\t\t\t\t</button>\r\n\t\t\t\t\t<button color=\"primary\" mat-button>\r\n\t\t\t\t\t\t<mat-icon svgIcon=\"check\" (click)=\"editOk()\"></mat-icon>\r\n\t\t\t\t\t</button>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<textarea class=\"area\" matInput [(ngModel)]=\"editText\"></textarea>\r\n\t\t</div>\r\n\t\t<ng-template #readonly>\r\n\t\t\t<div class=\"is-read-only\">\r\n\t\t\t\t<div class=\"edit-title\">\r\n\t\t\t\t\t<b class=\"read-only-left\">\r\n\t\t\t\t\t\t{{showDay.date|date:'yyyy.MM.dd'}}\r\n\t\t\t\t\t</b>\r\n\t\t\t\t\t<div class=\"read-only-right\">\r\n\t\t\t\t\t\t<button mat-button (click)=\"removeEvents()\">\r\n\t\t\t\t\t\t\t<mat-icon svgIcon=\"delete_outline\"></mat-icon>\r\n\t\t\t\t\t\t</button>\r\n\t\t\t\t\t\t<button color=\"primary\" [disabled]=\"showDay.isPast\"\r\n\t\t\t\t\t\t\tmat-button (click)=\"isEdit=true\">\r\n\t\t\t\t\t\t\t<mat-icon svgIcon=\"create\"></mat-icon>\r\n\t\t\t\t\t\t</button>\r\n\t\t\t\t\t\t<button mat-button (click)=\"showDayHint=false\">\r\n\t\t\t\t\t\t\t<mat-icon svgIcon=\"cancel\"></mat-icon>\r\n\t\t\t\t\t\t</button>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"area\">{{showDay?.events[0]?.title}}</div>\r\n\t\t\t</div>\r\n\t\t</ng-template>\r\n\t</div>\r\n\r\n\r\n</div>",
providers: [
{
provide: CalendarDateFormatter,
useClass: CustomDateFormatter
}
],
styles: [".calendar-main{width:100%;height:100%;box-sizing:border-box;padding:8px;border-radius:4px}.main-title{display:flex;justify-content:space-between;align-items:center;width:100%;height:24px;box-sizing:border-box;margin-bottom:4px;color:#72aac9}.main-title .title-left,.main-title .title-right{align-items:center}.main-title .title-left{display:flex;align-items:center}.main-title .title-left span{margin-left:8px}.main-title .title-right{display:none}.calendar-main:hover .title-right{display:flex}.cal-title{display:flex;justify-content:space-between;width:100%;height:34px;line-height:34px;box-sizing:border-box}.cal-title .btn{display:flex;align-items:center;height:34px;line-height:34px}.dateCal{width:100%;height:195px;box-sizing:border-box;padding-left:8px;padding-right:8px;font-size:12px;overflow:auto}.per-day{position:relative;display:flex;justify-content:center;height:30px;line-height:30px;cursor:pointer}.per-day-cricle{position:relative;width:100%;max-width:30px;min-width:22px;height:30px;line-height:30px;box-sizing:border-box;border-radius:17px}.icon-circle{position:absolute;right:0;top:0;margin-top:-12px;width:8px;height:8px}.show-day{position:absolute;width:320px;height:184px;box-sizing:border-box;padding:0 8px 8px 12px;border-radius:4px;z-index:999}.active .show-day{display:block}.edit-title{display:flex;justify-content:space-between;align-items:center;flex-wrap:nowrap;width:100%;height:40px;font-size:18px}.edit-title button{width:40px;height:40px}.area{width:100%;height:136px;box-sizing:border-box}"]
}] }
];
/** @nocollapse */
CalendarComponent.ctorParameters = () => [
{ type: IndexService }
];
CalendarComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.c-index-calendar',] }],
closeShowDayHint: [{ type: HostListener, args: ['document:click',] }]
};
if (false) {
/** @type {?} */
CalendarComponent.prototype.hostClass;
/** @type {?} */
CalendarComponent.prototype.navName;
/** @type {?} */
CalendarComponent.prototype.navSize;
/** @type {?} */
CalendarComponent.prototype.view;
/** @type {?} */
CalendarComponent.prototype.viewDate;
/** @type {?} */
CalendarComponent.prototype.innerWidth;
/** @type {?} */
CalendarComponent.prototype.modalData;
/** @type {?} */
CalendarComponent.prototype.showDay;
/** @type {?} */
CalendarComponent.prototype.isEdit;
/** @type {?} */
CalendarComponent.prototype.activeDayIsOpen;
/** @type {?} */
CalendarComponent.prototype.editText;
/** @type {?} */
CalendarComponent.prototype.disX;
/** @type {?} */
CalendarComponent.prototype.disY;
/** @type {?} */
CalendarComponent.prototype.showDayHint;
/** @type {?} */
CalendarComponent.prototype.isEventsEmpty;
/** @type {?} */
CalendarComponent.prototype.svr;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class ChartComponent {
/**
* @param {?} svr
*/
constructor(svr) {
this.svr = svr;
this.navName = 'chart';
this.navSize = this.svr.userSetting.Cards.find((/**
* @param {?} x
* @return {?}
*/
x => x.Type === this.navName)).Size;
console.log(this.navSize);
}
/**
* @return {?}
*/
ngOnInit() { }
}
ChartComponent.decorators = [
{ type: Component, args: [{
selector: 'common-chart',
template: "<p>chart works!</p>\r\n\r\n\r\n",
styles: [""]
}] }
];
/** @nocollapse */
ChartComponent.ctorParameters = () => [
{ type: IndexService }
];
if (false) {
/** @type {?} */
ChartComponent.prototype.navSize;
/** @type {?} */
ChartComponent.prototype.navName;
/** @type {?} */
ChartComponent.prototype.svr;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @record
*/
function PeriodicElement() { }
if (false) {
/** @type {?} */
PeriodicElement.prototype.uid;
/** @type {?} */
PeriodicElement.prototype.name;
/** @type {?} */
PeriodicElement.prototype.portrait;
/** @type {?} */
PeriodicElement.prototype.address;
/** @type {?} */
PeriodicElement.prototype.code;
/** @type {?} */
PeriodicElement.prototype.phone;
/** @type {?} */
PeriodicElement.prototype.duty;
/** @type {?} */
PeriodicElement.prototype.remark;
}
/** @type {?} */
const ELEMENT_DATA = [
{
uid: 1,
name: 'Jon',
portrait: '/front/assets/userinfo/portrait_default.png',
address: '杭州西湖区杭州西湖区杭州西湖区杭州西湖区杭州西湖区杭州西湖区',
code: 'G2H636W',
phone: 25692615,
duty: '部长',
remark: '111111111'
},
{
uid: 2,
name: 'TUDM',
portrait: '/front/assets/userinfo/portrait_default.png',
address: '杭州余杭区杭州余杭区杭州余杭区',
code: 'G2H636W',
phone: 25692615,
duty: '组长',
remark: '555555'
},
{
uid: 3,
name: 'MMMM',
portrait: '/front/assets/userinfo/portrait_default.png',
address: '杭州余杭区杭州余杭区杭州余杭区',
code: 'G2H636W',
phone: 25692625,
duty: '组长',
remark: '备注'
},
{
uid: 1,
name: 'Jon',
portrait: '/front/assets/userinfo/portrait_default.png',
address: '杭州西湖区杭州西湖区杭州西湖区',
code: 'G2H636W',
phone: 25692615,
duty: '部长',
remark: '备注'
},
{
uid: 2,
name: 'TUDM',
portrait: '/front/assets/userinfo/portrait_default.png',
address: '杭州余杭区杭州余杭区杭州余杭区',
code: 'G2H636W',
phone: 25692615,
duty: '组长',
remark: '备注'
},
{
uid: 3,
name: 'MMMM',
portrait: '/front/assets/userinfo/portrait_default.png',
address: '杭州余杭区杭州余杭区杭州余杭区',
code: 'G2H636W',
phone: 25692625,
duty: '组长',
remark: '备注'
}
];
class DataListComponent {
/**
* @param {?} svr
*/
constructor(svr) {
this.svr = svr;
this.hostClass = true;
this.navName = 'datalist';
this.displayedColumns = ['id', 'name', 'portrait', 'address', 'code', 'phone', 'duty', 'remark'];
this.dataSource = ELEMENT_DATA;
this.navSize = this.svr.userSetting.Cards.find((/**
* @param {?} x
* @return {?}
*/
x => x.Type === this.navName)).Size;
}
/**
* @return {?}
*/
ngOnInit() { }
}
DataListComponent.decorators = [
{ type: Component, args: [{
selector: 'common-data-list',
template: "<section class=\"index-data-main mat-elevation-z2\">\r\n\t<header class=\"data-title\">\r\n\t\t<div class=\"title-left\">\r\n\t\t\t<mat-icon svgIcon=\"dns\"></mat-icon>\r\n\t\t\t<span>\u5FEB\u901F\u67E5\u770B</span>\r\n\t\t</div>\r\n\t\t<div class=\"title-right\">\r\n\t\t\t<common-more-vert [typeName]=\"navName\" [theNavSize]=\"navSize\">\r\n\t\t\t</common-more-vert>\r\n\t\t</div>\r\n\t</header>\r\n\t<section class=\"data-box\">\r\n\t\t<table mat-table [dataSource]=\"dataSource\">\r\n\t\t\t<ng-container matColumnDef=\"id\">\r\n\t\t\t\t<th mat-header-cell *matHeaderCellDef>ID</th>\r\n\t\t\t\t<td mat-cell *matCellDef=\"let i = index\">{{i+1}}</td>\r\n\t\t\t</ng-container>\r\n\t\t\t<ng-container matColumnDef=\"name\">\r\n\t\t\t\t<th mat-header-cell *matHeaderCellDef>\u6635\u79F0</th>\r\n\t\t\t\t<td mat-cell *matCellDef=\"let element\">{{element.name}}</td>\r\n\t\t\t</ng-container>\r\n\t\t\t<ng-container matColumnDef=\"portrait\">\r\n\t\t\t\t<th mat-header-cell *matHeaderCellDef>\u5934\u50CF</th>\r\n\t\t\t\t<td mat-cell *matCellDef=\"let element\">\r\n\t\t\t\t\t<div class=\"head-image\"><img [src]=\"element.portrait\" alt=\"\"></div>\r\n\t\t\t\t</td>\r\n\t\t\t</ng-container>\r\n\t\t\t<ng-container matColumnDef=\"address\">\r\n\t\t\t\t<th mat-header-cell *matHeaderCellDef>\u8BE6\u7EC6\u5730\u5740</th>\r\n\t\t\t\t<td mat-cell *matCellDef=\"let element\">{{element.address}}</td>\r\n\t\t\t</ng-container>\r\n\t\t\t<ng-container matColumnDef=\"code\">\r\n\t\t\t\t<th mat-header-cell *matHeaderCellDef>\u8054\u7CFB\u4EE3\u7801</th>\r\n\t\t\t\t<td mat-cell *matCellDef=\"let element\">{{element.code }}</td>\r\n\t\t\t</ng-container>\r\n\t\t\t<ng-container matColumnDef=\"phone\">\r\n\t\t\t\t<th mat-header-cell *matHeaderCellDef>\u7535\u8BDD</th>\r\n\t\t\t\t<td mat-cell *matCellDef=\"let element\">{{element.phone}}</td>\r\n\t\t\t</ng-container>\r\n\t\t\t<ng-container matColumnDef=\"duty\">\r\n\t\t\t\t<th mat-header-cell *matHeaderCellDef>\u804C\u52A1</th>\r\n\t\t\t\t<td mat-cell *matCellDef=\"let element\">{{element.duty}}</td>\r\n\t\t\t</ng-container>\r\n\t\t\t<ng-container matColumnDef=\"remark\">\r\n\t\t\t\t<th mat-header-cell *matHeaderCellDef>\u5907\u6CE8</th>\r\n\t\t\t\t<td mat-cell *matCellDef=\"let element\">{{element.remark}}</td>\r\n\t\t\t</ng-container>\r\n\t\t\t<tr mat-header-row *matHeaderRowDef=\"displayedColumns;sticky:true\"></tr>\r\n\t\t\t<tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\r\n\t\t</table>\r\n\t</section>\r\n</section>",
styles: [".index-data-main{position:relative;width:100%;height:100%;box-sizing:border-box;padding:8px;border-radius:4px}.data-title{display:flex;justify-content:space-between;align-items:center;width:100%;height:24px;box-sizing:border-box;margin-bottom:16px;color:#9d66c6}.data-title span{padding-left:8px;font:16px bold}.title-left{display:flex;align-items:center}.title-right{display:none}.index-data-main:hover .title-right{display:flex}.data-box{width:100%;height:220px;box-sizing:border-box;padding-left:8px;padding-right:8px;overflow:auto;flex-grow:1;overflow-y:auto}.data-box table{width:100%;white-space:nowrap}.head-image{width:40px;height:40px;box-sizing:border-box;padding:4px}.head-image img{width:100%;height:100%;border-radius:20px}"]
}] }
];
/** @nocollapse */
DataListComponent.ctorParameters = () => [
{ type: IndexService }
];
DataListComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.c-index-data-list',] }]
};
if (false) {
/** @type {?} */
DataListComponent.prototype.hostClass;
/** @type {?} */
DataListComponent.prototype.navName;
/** @type {?} */
DataListComponent.prototype.navSize;
/** @type {?} */
DataListComponent.prototype.displayedColumns;
/** @type {?} */
DataListComponent.prototype.dataSource;
/** @type {?} */
DataListComponent.prototype.svr;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class IndexComponent {
/**
* @param {?} svr
* @param {?} iconRegistry
* @param {?} sanitizer
*/
constructor(svr, iconRegistry, sanitizer) {
this.svr = svr;
this.iconRegistry = iconRegistry;
this.sanitizer = sanitizer;
// class前加c-,防止重名
this.hostClass = true;
this.svr.init();
/** @type {?} */
const icons = ['arrow_expand'];
icons.forEach((/**
* @param {?} v
* @return {?}
*/
v => {
iconRegistry.addSvgIcon(v, sanitizer.bypassSecurityTrustResourceUrl('assets/index/icon/' + v + '.svg'));
}));
}
/**
* @return {?}
*/
ngOnInit() { }
/**
* @return {?}
*/
test() {
console.log(this.svr.userSetting.Layout);
}
}
IndexComponent.decorators = [
{ type: Component, args: [{
selector: 'common-index',
template: "<div class=\"index-main\" *ngIf=\"svr.inited\">\r\n\t<div class=\"main-wrapper\" [ngClass]=\"'layout-'+svr.userSetting.Layout\">\r\n\t\t<!-- \u25BD 1. \u7B2C\u4E00\u884C\u9ED8\u8BA4\u884C welcome && banner \u25BD -->\r\n\t\t<div class=\"list-1 default-row\">\r\n\t\t\t<common-welcome></common-welcome>\r\n\t\t</div>\r\n\t\t<div class=\"list-2 default-row\">\r\n\t\t\t<common-banner></common-banner>\r\n\t\t</div>\r\n\t\t<!-- \u25BD 2. \u81EA\u5B9A\u4E49\u5E03\u5C40\u90E8\u5206 \u25BD -->\r\n\t\t<ng-container *ngFor=\"let card of svr.userSetting.Cards\"\r\n\t\t\t[ngSwitch]=\"card.Type\">\r\n\t\t\t<div class=\"defined-row\"\r\n\t\t\t\t[ngClass]=\"card.Size === 'lg' ? 'list-3' : (card.Size === 'md' ? 'list-2' : 'list-1')\"\r\n\t\t\t\t*ngSwitchCase=\"'navigation'\">\r\n\t\t\t\t<common-navigation></common-navigation>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"list-1 defined-row\"\r\n\t\t\t\t[ngClass]=\"card.Size === 'lg' ? 'list-3' : (card.Size === 'md' ? 'list-2' : 'list-1')\"\r\n\t\t\t\t*ngSwitchCase=\"'calendar'\">\r\n\t\t\t\t<common-calendar></common-calendar>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"list-1 defined-row\"\r\n\t\t\t\t[ngClass]=\"card.Size === 'lg' ? 'list-3' : (card.Size === 'md' ? 'list-2' : 'list-1')\"\r\n\t\t\t\t*ngSwitchCase=\"'notice'\">\r\n\t\t\t\t<common-notice></common-notice>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"list-2 defined-row\"\r\n\t\t\t\t[ngClass]=\"card.Size === 'lg' ? 'list-3' : 'list-2-2'\"\r\n\t\t\t\t*ngSwitchCase=\"'datalist'\">\r\n\t\t\t\t<common-data-list></common-data-list>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"list-1 defined-row\"\r\n\t\t\t\t[ngClass]=\"card.Size === 'lg' ? 'list-3' : (card.Size === 'md' ? 'list-2' : 'list-1')\"\r\n\t\t\t\t*ngSwitchCase=\"'chart'\">\r\n\t\t\t\t<common-chart></common-chart>\r\n\t\t\t</div>\r\n\t\t</ng-container>\r\n\t</div>\r\n</div>",
styles: ["@media (max-width:767px){.list-1,.list-2,.list-3{width:calc(100% - 8px)}}@media (max-width:1199px) and (min-width:768px){.list-1,.list-2{width:calc((100% - 16px)/ 2)}.list-2-2,.list-3{width:calc(100% - 8px)}}@media (min-width:1200px){.list-1{width:calc((100% - 24px)/ 3)}.list-2{width:calc((100% - 24px)/ 3 * 2 + 8px)}.list-3{width:calc(100% - 8px)}}.index-main{width:100%;height:calc(100vh - 30px);box-sizing:border-box;padding:24px 16px 0 24px;overflow:auto}.main-wrapper{display:flex;flex-wrap:wrap;min-width:280px;box-sizing:border-box;margin:0 auto}.list-1,.list-2,.list-3{box-sizing:border-box;padding:0 4px 4px;margin-bottom:16px;margin-right:8px}.default-row{height:240px}.defined-row{height:280px}.index-box{width:100%;height:100%}.layout-auto{width:100%}.layout-simple{max-width:960px!important}"]
}] }
];
/** @nocollapse */
IndexComponent.ctorParameters = () => [
{ type: IndexService },
{ type: MatIconRegistry },
{ type: DomSanitizer }
];
IndexComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.c-index',] }]
};
if (false) {
/** @type {?} */
IndexComponent.prototype.hostClass;
/** @type {?} */
IndexComponent.prototype.svr;
/**
* @type {?}
* @private
*/
IndexComponent.prototype.iconRegistry;
/**
* @type {?}
* @private
*/
IndexComponent.prototype.sanitizer;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class MoreVertComponent {
/**
* @param {?} svr
*/
constructor(svr) {
this.svr = svr;
this.hostClass = true;
// typeName: CardType;
// theNavSize: CardSize;
this.subMenuClick = new EventEmitter();
this._disShow = false;
}
/**
* @param {?} val
* @return {?}
*/
set typeName(val) {
this._typeName = val;
}
/**
* @return {?}
*/
get typeName() {
return this._typeName;
}
/**
* @param {?} val
* @return {?}
*/
set theNavSize(val) {
this._theNavSize = val;
}
/**
* @return {?}
*/
get theNavSize() {
return this._theNavSize;
}
/**
* @param {?} val
* @return {?}
*/
set disElements(val) {
this._disElements = val;
}
/**
* @return {?}
*/
get disElements() {
return this._disElements;
}
/**
* @param {?} val
* @return {?}
*/
set disShow(val) {
this._disShow = val;
}
/**
* @return {?}
*/
get disShow() {
return this._disShow;
}
/**
* @return {?}
*/
ngOnInit() { }
/**
* @param {?} sz
* @return {?}
*/
changeSize(sz) {
this.theNavSize = sz;
this.svr.userSetting.Cards.find((/**
* @param {?} x
* @return {?}
*/
x => x.Type === this.typeName)).Size = this.theNavSize;
this.svr.updateSetting().subscribe((/**
* @return {?}
*/
() => {
console.log(this.svr.userSetting.Cards);
}));
}
/**
* @param {?} cardName
* @return {?}
*/
removeCard(cardName) {
/** @type {?} */
const arr = this.svr.userSetting.Cards;
this.svr.userSetting.Cards = arr.filter((/**
* @param {?} item
* @return {?}
*/
(item) => item.Type !== cardName));
}
/**
* @param {?} i
* @return {?}
*/
removeEle(i) {
this.subMenuClick.emit(i);
}
}
MoreVertComponent.decorators = [
{ type: Component, args: [{
selector: 'common-more-vert',
template: "<div class=\"dot\">\r\n\t<button mat-button [matMenuTriggerFor]=\"dot\">\r\n\t\t<mat-icon svgIcon=\"more_vert\"></mat-icon>\r\n\t</button>\r\n</div>\r\n\r\n<mat-menu #dot=\"matMenu\" class=\"dotDot\">\r\n\t<button mat-menu-item [matMenuTriggerFor]=\"optionSelect\" *ngIf=\"disShow\">\r\n\t\t<mat-icon svgIcon=\"spellcheck\"></mat-icon>\u9009\u62E9\u6E90\r\n\t</button>\r\n\t<button mat-menu-item [matMenuTriggerFor]=\"optionSize\">\r\n\t\t<mat-icon svgIcon=\"arrow_expand\"></mat-icon>\u5C3A\u5BF8\r\n\t</button>\r\n\t<button mat-menu-item (click)=\"removeCard(typeName)\">\r\n\t\t<mat-icon svgIcon=\"delete_outline\"></mat-icon>\u79FB\u9664\u6A21\u5757\r\n\t</button>\r\n\r\n</mat-menu>\r\n\r\n<mat-menu #optionSelect=\"matMenu\">\r\n\t<button mat-menu-item *ngFor=\"let ele of disElements;let i = index\"\r\n\t\t(click)=\"removeEle(i)\">\r\n\t\t<mat-icon color=\"warn\" class=\"remove-circle\" svgIcon=\"remove_circle\">\r\n\t\t</mat-icon>\r\n\t\t<span>{{ele.title()}}</span>\r\n\t</button>\r\n</mat-menu>\r\n\r\n<mat-menu #optionSize=\"matMenu\" class=\"dotDot\">\r\n\t<button mat-menu-item [ngClass]=\"theNavSize === 'lg' ? 'pitched' : ''\"\r\n\t\t(click)=\"changeSize('lg')\">\r\n\t\t<mat-icon [svgIcon]=\"theNavSize==='lg'?'done':''\">\r\n\t\t</mat-icon>\r\n\t\t<span>100%\u5BBD</span>\r\n\t</button>\r\n\t<button mat-menu-item [ngClass]=\"theNavSize === 'md' ? 'pitched' : ''\"\r\n\t\t(click)=\"changeSize('md')\">\r\n\t\t<mat-icon [svgIcon]=\"theNavSize==='md'?'done':''\">\r\n\t\t</mat-icon>\r\n\t\t<span>2/3\u5BBD</span>\r\n\t</button>\r\n\t<button mat-menu-item [ngClass]=\"theNavSize === 'sm' ? 'pitched' : ''\"\r\n\t\t(click)=\"changeSize('sm')\">\r\n\t\t<mat-icon [svgIcon]=\"theNavSize==='sm'?'done':''\">\r\n\t\t</mat-icon>\r\n\t\t<span>1/3\u5BBD</span>\r\n\t</button>\r\n</mat-menu>",
styles: [".dot{width:100%;height:100%}"]
}] }
];
/** @nocollapse */
MoreVertComponent.ctorParameters = () => [
{ type: IndexService }
];
MoreVertComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.c-index-more-vert',] }],
subMenuClick: [{ type: Output }],
typeName: [{ type: Input }],
theNavSize: [{ type: Input }],
disElements: [{ type: Input }],
disShow: [{ type: Input }]
};
if (false) {
/** @type {?} */
MoreVertComponent.prototype.hostClass;
/** @type {?} */
MoreVertComponent.prototype.subMenuClick;
/**
* @type {?}
* @private
*/
MoreVertComponent.prototype._typeName;
/**
* @type {?}
* @private
*/
MoreVertComponent.prototype._theNavSize;
/**
* @type {?}
* @private
*/
MoreVertComponent.prototype._disElements;
/**
* @type {?}
* @private
*/
MoreVertComponent.prototype._disShow;
/** @type {?} */
MoreVertComponent.prototype.svr;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class NavigationComponent {
/**
* @param {?} svr
* @param {?} eles
* @param {?} router
* @param {?} eRef
*/
constructor(svr, eles, router, eRef) {
this.svr = svr;
this.eles = eles;
this.router = router;
this.eRef = eRef;
this.hostClass = true;
this.formControl = new FormControl();
this.validElement = false;
this.displayElements = [];
this.MaxElementNumber = 8;
this.handleNav = false;
this.navName = 'navigation';
this.navSize = this.svr.userSetting.Cards.find((/**
* @param {?} x
* @return {?}
*/
x => x.Type === this.navName)).Size;
// console.log(this.navSize);
}
/**
* @return {?}
*/
ngOnInit() {
this.allEles = Object.values(this.eles.getEles()).filter((/**
* @param {?} e
* @return {?}
*/
e => !e.NotMenu));
this.filterElements = this.formControl.valueChanges.pipe(startWith(''), map((/**
* @param {?} v
* @return {?}
*/
v => {
/** @type {?} */
const arr = this.allEles.filter((/**
* @param {?} e
* @return {?}
*/
e => this.formatElementDisplayLabel(e).toLowerCase().includes(v.toLowerCase())));
return arr.sort((/**
* @param {?} a
* @param {?} b
* @return {?}
*/
(a, b) => a.title().localeCompare(b.title())));
})));
this.formControl.valueChanges.subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
this.validElement = !!this.allEles.find((/**
* @param {?} e
* @return {?}
*/
e => this.formatElementDisplayLabel(e) === v));
}));
this.refreshDisplayElements();
}
/**
* @param {?} ele
* @return {?}
*/
formatElementDisplayLabel(ele) {
return `${ele.title()}(${ele.Name})`;
}
/**
* @return {?}
*/
refreshDisplayElements() {
this.displayElements = this.svr.userSetting.NavigationElements
.filter((/**
* @param {?} v
* @return {?}
*/
v => this.eles.get(v)))
.map((/**
* @param {?} v
* @return {?}
*/
v => this.eles.get(v)));
// console.log('----', this.displayElements);
}
/**
* @param {?} val
* @return {?}
*/
change(val) {
console.log(val);
}
/**
* @return {?}
*/
add() {
/** @type {?} */
const ele = this.allEles.find((/**
* @param {?} v
* @return {?}
*/
v => this.formatElementDisplayLabel(v) === this.formControl.value));
// console.log(ele);
if (!this.svr.userSetting.NavigationElements.includes(ele.Name)) {
this.svr.userSetting.NavigationElements.push(ele.Name);
this.svr.updateSetting().subscribe((/**
* @return {?}
*/
() => {
this.refreshDisplayElements();
}));
}
}
/**
* @return {?}
*/
execute() {
/** @type {?} */
const ele = this.allEles.find((/**
* @param {?} v
* @return {?}
*/
v => this.formatElementDisplayLabel(v) === this.formControl.value));
this.router.navigateByUrl(this.eles.frontElementURL(ele.Name, decodeURI(ele.URL)));
}
/**
* @param {?} ele
* @return {?}
*/
routerLink(ele) {
return this.eles.frontElementURL(ele.Name, decodeURI(ele.URL));
}
// ↓ 浮窗删除选择源元素
/**
* @param {?} i
* @return {?}
*/
removeEle(i) {
this.svr.userSetting.NavigationElements.splice(i, 1);
this.svr.updateSetting().subscribe((/**
* @return {?}
*/
() => {
this.refreshDisplayElements();
}));
}
/**
* @param {?} cardName
* @return {?}
*/
removeCard(cardName) {
/** @type {?} */
const arr = this.svr.userSetting.Cards;
this.svr.userSetting.Cards = arr.filter((/**
* @param {?} item
* @return {?}
*/
(item) => item.Type !== cardName));
}
/**
* @return {?}
*/
hasEles() {
/** @type {?} */
const ele = this.allEles.find((/**
* @param {?} v
* @return {?}
*/
v => this.formatElementDisplayLabel(v) === this.formControl.value));
return this.svr.userSetting.NavigationElements.includes(ele.Name);
}
/**
* @param {?} sz
* @return {?}
*/
changeSize(sz) {
this.navSize = sz;
this.svr.userSetting.Cards.find((/**
* @param {?} x
* @return {?}
*/
x => x.Type === 'navigation')).Size = this.navSize;
this.svr.updateSetting().subscribe((/**
* @return {?}
*/
() => {
console.log(this.svr.userSetting.Cards);
}));
}
}
NavigationComponent.decorators = [
{ type: Component, args: [{
selector: 'common-navigation',
template: "<div class=\"nav-main\">\r\n\t<!-- 1. \u4E0A\u534A\u90E8\u5206 -->\r\n\t<div class=\"part-A mat-elevation-z2\">\r\n\t\t<div class=\"a-title\">\r\n\t\t\t<div class=\"title-left\">\r\n\t\t\t\t<mat-icon class=\"apps\" svgIcon=\"apps\"></mat-icon>\r\n\t\t\t\t<span>\u5FEB\u901F\u64CD\u4F5C\u680F</span>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"title-right\">\r\n\t\t\t\t<common-more-vert disShow=\"true\" [disElements]=\"displayElements\" [typeName]=\"navName\" [theNavSize]=\"navSize\" (subMenuClick)=\"removeEle($event)\">\r\n\t\t\t\t</common-more-vert>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<div class=\"a-main\">\r\n\t\t\t<div class=\"ele-icon\" *ngFor=\"let ele of displayElements\"\r\n\t\t\t\t[routerLink]=\"routerLink(ele)\" matTooltip=\"{{ ele.title() }}\">\r\n\t\t\t\t<div class=\"icon\">\r\n\t\t\t\t\t<mat-icon class=\"mini-icon\" [svgIcon]=\"ele.Icon || 'dns'\">\r\n\t\t\t\t\t</mat-icon>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"icon-text\">\r\n\t\t\t\t\t{{ ele.title() }}\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n\r\n\t<!-- 2. \u4E0B\u534A\u90E8\u5206 -->\r\n\t<div class=\"part-B mat-elevation-z2\">\r\n\t\t<!-- 2.1 \u5DE6\u4FA7input -->\r\n\t\t<div class=\"b-left\">\r\n\t\t\t<input #inputHaveLength class=\"b-input\" type=\"text\"\r\n\t\t\t\t[matAutocomplete]=\"auto\" [formControl]=\"formControl\"\r\n\t\t\t\tplaceholder=\"\u641C\u7D22\u83DC\u5355\u9879\" />\r\n\t\t\t<mat-autocomplete #auto=\"matAutocomplete\">\r\n\t\t\t\t<mat-option class=\"option-title\"\r\n\t\t\t\t\t*ngFor=\"let ele of filterElements | async\"\r\n\t\t\t\t\t[value]=\"formatElementDisplayLabel(ele)\">\r\n\t\t\t\t\t{{ ele.title() }}\r\n\t\t\t\t\t<span class=\"option-text\">({{ ele.Name }})</span>\r\n\t\t\t\t</mat-option>\r\n\t\t\t</mat-autocomplete>\r\n\t\t</div>\r\n\r\n\t\t<!-- 2.2 \u53F3\u4FA7\u56FE\u6807 -->\r\n\t\t<div class=\"b-right\">\r\n\t\t\t<div *ngIf=\"!inputHaveLength.value.length\">\r\n\t\t\t\t<button mat-button disabled>\r\n\t\t\t\t\t<mat-icon svgIcon=\"search\"></mat-icon>\r\n\t\t\t\t</button>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"inputLength\" *ngIf=\"inputHaveLength.value.length\">\r\n\t\t\t\t<div matTooltip=\"\u589E\u52A0\">\r\n\t\t\t\t\t<button mat-button color=\"primary\"\r\n\t\t\t\t\t\t[disabled]=\"hasEles() || !validElement || svr.userSetting.NavigationElements.length >= MaxElementNumber\"\r\n\t\t\t\t\t\t(click)=\"add()\">\r\n\t\t\t\t\t\t<mat-icon svgIcon=\"add_circle\"></mat-icon>\r\n\t\t\t\t\t</button>\r\n\t\t\t\t</div>\r\n\t\t\t\t<button color=\"primary\" mat-button matTooltip=\"\u6267\u884C\"\r\n\t\t\t\t\t[disabled]=\"!validElement\" (click)=\"execute()\">\r\n\t\t\t\t\t<!-- \u5224\u65AD\u6267\u884C\u7ED3\u679C\uFF0C\u8FD9\u884C\u5E2E\u6211\u7559\u7740\u5427 -->\r\n\t\t\t\t\t<!-- {{validElement}} -->\r\n\t\t\t\t\t<mat-icon svgIcon=\"keyboard_arrow_right\"></mat-icon>\r\n\t\t\t\t</button>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n\r\n\t<!-- <mat-menu #dot=\"matMenu\" class=\"dotDot\">\r\n\t\t<button mat-menu-item [matMenuTriggerFor]=\"optionSelect\">\r\n\t\t\t<mat-icon svgIcon=\"spellcheck\"></mat-icon>\u9009\u62E9\u6E90\r\n\t\t</button>\r\n\t\t<button mat-menu-item [matMenuTriggerFor]=\"optionSize\">\r\n\t\t\t<mat-icon svgIcon=\"arrow_expand\"></mat-icon>\u5C3A\u5BF8\r\n\t\t</button>\r\n\t\t<button mat-menu-item (click)=\"removeCard('navigation')\">\r\n\t\t\t<mat-icon svgIcon=\"delete_outline\"></mat-icon>\u79FB\u9664\u6A21\u5757\r\n\t\t</button>\r\n\r\n\t</mat-menu>\r\n\r\n\t<mat-menu #optionSelect=\"matMenu\">\r\n\t\t<button mat-menu-item *ngFor=\"let ele of displayElements;let i = index\">\r\n\t\t\t<mat-icon color=\"warn\" class=\"remove-circle\" svgIcon=\"remove_circle\"\r\n\t\t\t\t(click)=\"removeEle(i)\">\r\n\t\t\t</mat-icon>\r\n\t\t\t<span>{{ele.title()}}</span>\r\n\t\t</button>\r\n\t</mat-menu>\r\n\r\n\t<mat-menu #optionSize=\"matMenu\">\r\n\t\t<button mat-menu-item [ngClass]=\"navSize === 'lg' ? 'pitched' : ''\"\r\n\t\t\t(click)=\"changeSize('lg')\">\r\n\t\t\t<mat-icon [svgIcon]=\"navSize === 'lg' ? 'done' : ''\">\r\n\t\t\t</mat-icon>\r\n\t\t\t<span>100%\u5BBD</span>\r\n\t\t</button>\r\n\t\t<button mat-menu-item\r\n\t\t\t[ngClass]=\"navSize === 'md' ? 'pitched' : ''\"\r\n\t\t\t(click)=\"changeSize('md')\">\r\n\t\t\t<mat-icon [svgIcon]=\"navSize === 'md' ? 'done' : ''\">\r\n\t\t\t</mat-icon>\r\n\t\t\t<span>2/3\u5BBD</span>\r\n\t\t</button>\r\n\t\t<button mat-menu-item\r\n\t\t\t[ngClass]=\"navSize === 'sm' ? 'pitched' : ''\"\r\n\t\t\t(click)=\"changeSize('sm')\">\r\n\t\t\t<mat-icon [svgIcon]=\"navSize === 'sm' ? 'done' : ''\">\r\n\t\t\t</mat-icon>\r\n\t\t\t<span>1/3\u5BBD</span>\r\n\t\t</button>\r\n\t</mat-menu> -->\r\n\r\n\r\n</div>",
styles: ["@charset \"UTF-8\";.nav-main{position:relative;width:100%;height:100%}.part-A{width:100%;height:200px;box-sizing:border-box;padding:8px 8px 0;border-radius:4px;overflow:hidden}.a-title{display:flex;justify-content:space-between;align-items:center;width:100%;height:24px;box-sizing:border-box;margin-bottom:20px;color:#61ccc4}.a-title .title-left,.a-title .title-right{align-items:center}.a-title .title-left{display:flex}.a-title .title-right{display:none}.a-title span{padding-left:8px;font:16px bold}.nav-main:hover .title-right{display:flex;justify-content:center;width:40px}.a-main{display:flex;flex-wrap:wrap;width:100%;height:144px;box-sizing:border-box;padding-left:4px;padding-right:4px;overflow:auto}.ele-icon{min-width:72px;height:56px;box-sizing:border-box;margin-left:4px;margin-right:4px;margin-bottom:16px;text-align:center;cursor:pointer}.icon{display:flex;justify-content:center;width:24px;height:24px;margin:0 auto 8px}.mini-icon{width:24px;height:24px}.icon-text{max-width:80px;margin:0 auto;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px}.part-B{display:flex;justify-content:space-between;position:relative;align-items:center;width:100%;height:64px;box-sizing:border-box;margin-top:13px;border-radius:4px}.b-left{width:100%;height:40px}.b-input{width:100%;height:40px;line-height:40px;box-sizing:border-box;border:none;padding:0 24px;outline:0;font-size:14px;background-color:transparent}.option-title{box-sizing:border-box;padding-left:24px;padding-right:24px;font-size:14px}.option-text{font-size:12px}.b-right{position:absolute;right:24px;text-align:right;width:80px;height:40px}.b-right button{min-width:40px;height:40px;padding-left:0;padding-right:0}.b-right ::ng-deep .mat-button{background-color:none;min-width:0}.b-right ::ng-deep .mat-button-focus-overlay{background-color:transparent}.b-right ::ng-deep .mat-button-active-overlay{background-color:transparent}.inputLength{display:flex;justify-content:space-between}"]
}] }
];
/** @nocollapse */
NavigationComponent.ctorParameters = () => [
{ type: IndexService },
{ type: ElementsService },
{ type: Router },
{ type: ElementRef }
];
NavigationComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.c-index-navigation',] }]
};
if (false) {
/** @type {?} */
NavigationComponent.prototype.hostClass;
/** @type {?} */
NavigationComponent.prototype.filterElements;
/** @type {?} */
NavigationComponent.prototype.formControl;
/** @type {?} */
NavigationComponent.prototype.validElement;
/** @type {?} */
NavigationComponent.prototype.allEles;
/** @type {?} */
NavigationComponent.prototype.displayElements;
/** @type {?} */
NavigationComponent.prototype.MaxElementNumber;
/** @type {?} */
NavigationComponent.prototype.handleNav;
/** @type {?} */
NavigationComponent.prototype.navSize;
/** @type {?} */
NavigationComponent.prototype.navName;
/** @type {?} */
NavigationComponent.prototype.svr;
/** @type {?} */
NavigationComponent.prototype.eles;
/**
* @type {?}
* @private
*/
NavigationComponent.prototype.router;
/**
* @type {?}
* @private
*/
NavigationComponent.prototype.eRef;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class NoticeComponent {
/**
* @param {?} svr
* @param {?} eles
*/
constructor(svr, eles) {
this.svr = svr;
this.eles = eles;
this.hostClass = true;
this.navName = 'notice';
this.navSize = this.svr.userSetting.Cards.find((/**
* @param {?} x
* @return {?}
*/
x => x.Type === this.navName)).Size;
}
/**
* @return {?}
*/
ngOnInit() {
this.svr.initNotice();
}
/**
* @return {?}
*/
get hasNotReadNoticeCount() {
if (this.svr.notice) {
return this.svr.notice.filter((/**
* @param {?} v
* @return {?}
*/
v => !v.IsReaded)).length;
}
return 0;
}
}
NoticeComponent.decorators = [
{ type: Component, args: [{
selector: 'common-notice',
template: "<section class=\"notice-main mat-elevation-z2\">\r\n\t<!-- \u2193 \u6807\u9898 \u2193 -->\r\n\t<div class=\"notice-title\">\r\n\t\t<div class=\"title-left\">\r\n\t\t\t<mat-icon class=\"apps\" svgIcon=\"notifications\"></mat-icon>\r\n\t\t\t<span>\u6D88\u606F\u901F\u89C8</span>\r\n\t\t\t<div class=\"unRead\" *ngIf=\"hasNotReadNoticeCount>0\">\r\n\t\t\t\t<div class=\"unRead-circle\">\r\n\t\t\t\t\t{{hasNotReadNoticeCount}}\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<div class=\"title-right\">\r\n\t\t\t<common-more-vert [typeName]=\"navName\" [theNavSize]=\"navSize\">\r\n\t\t\t</common-more-vert>\r\n\t\t</div>\r\n\r\n\t</div>\r\n\t<!-- \u2193 \u6D88\u606F\u660E\u7EC6 \u2193 -->\r\n\t<div class=\"notice-wrapper\">\r\n\t\t<a class=\"per-notice\" *ngFor=\"let item of svr.notice\" [routerLink]=\"item.FrontURL\">\r\n\t\t\t<div class=\"notice-left\">\r\n\t\t\t\t<div class=\"notice-left-icon\">\r\n\t\t\t\t\t<mat-icon class=\"warn-circle\" color=\"warn\" svgIcon=\"fiber_manual_record\" *ngIf=\"!item.IsReaded\">\r\n\t\t\t\t\t</mat-icon>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"left-text\">{{item.Title}}</div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"notice-right\">{{item.Time|date:'MM/dd'}}</div>\r\n\t\t</a>\r\n\t</div>\r\n\t<div class=\"shape\">\r\n\t</div>\r\n\t<a class=\"more\" [routerLink]=\"eles.frontElementURL('list-my-notice')\">\u67E5\u770B\u66F4\u591A\r\n\t\t<mat-icon svgIcon=\"navigate_next\"></mat-icon>\r\n\t</a>\r\n\r\n</section>",
styles: [".notice-main{position:relative;width:100%;height:100%;box-sizing:border-box;padding:8px;border-radius:4px}.notice-title{display:flex;justify-content:space-between;align-items:center;width:100%;height:24px;box-sizing:border-box;margin-bottom:16px;color:#c57a56}.notice-title .title-left{display:flex;align-items:center}.notice-title span{padding-left:8px;padding-right:8px;font:16px bold}.notice-title .unRead-circle{width:24px;height:20px;line-height:20px;border-radius:10px;text-align:center;font-size:14px;color:#fff}.notice-title .title-right{display:none}.notice-main:hover .title-right{display:flex}.notice-wrapper{width:100%;height:224px;box-sizing:border-box;padding-left:16px;padding-right:16px;font-size:14px;overflow:hidden}.per-notice{text-decoration:none;width:100%;display:flex;justify-content:space-between;align-items:center;height:24px;box-sizing:border-box;margin-bottom:16px;cursor:pointer}.notice-left{display:flex;width:calc(100% - 30px - 16px - 8px);height:24px;box-sizing:border-box}.notice-left .notice-left-icon{width:8px;margin-right:8px}.notice-left .left-text{box-sizing:border-box;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.notice-right{width:30px;height:24px;text-align:right;box-sizing:border-box}.warn-circle{width:8px;height:8px}.more{cursor:pointer;position:absolute;right:0;bottom:4px;display:flex;align-items:center;height:12px;line-height:12px;margin-bottom:4px;text-decoration:none;font-size:12px}.shape{position:absolute;bottom:0;right:0;width:100%;height:32px;border-radius:4px}"]
}] }
];
/** @nocollapse */
NoticeComponent.ctorParameters = () => [
{ type: IndexService },
{ type: ElementsService }
];
NoticeComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.c-index-notice',] }]
};
if (false) {
/** @type {?} */
NoticeComponent.prototype.hostClass;
/** @type {?} */
NoticeComponent.prototype.navName;
/** @type {?} */
NoticeComponent.prototype.navSize;
/** @type {?} */
NoticeComponent.prototype.svr;
/** @type {?} */
NoticeComponent.prototype.eles;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @record
*/
function SettingCard() { }
if (false) {
/** @type {?} */
SettingCard.prototype.Type;
/** @type {?} */
SettingCard.prototype.Name;
/** @type {?} */
SettingCard.prototype.Enabled;
}
class SettingDialogComponent {
/**
* @param {?} svr
* @param {?} elementRef
* @param {?} dialogRef
*/
constructor(svr, elementRef, dialogRef) {
this.svr = svr;
this.elementRef = elementRef;
this.dialogRef = dialogRef;
this.hostClass = true;
this.cards = [
{
Type: CardType.navigation,
Name: '快速导航',
Enabled: false
},
{
Type: CardType.calendar,
Name: '日历',
Enabled: false
},
{
Type: CardType.notice,
Name: '布告栏',
Enabled: false
},
{
Type: CardType.datalist,
Name: '数据表格',
Enabled: false
},
{
Type: CardType.chart,
Name: '分析图',
Enabled: false
}
];
}
/**
* @return {?}
*/
ngOnInit() {
this.elementRef.nativeElement.parentElement.style = 'padding:0px;';
this.layout = this.svr.userSetting.Layout;
this.svr.userSetting.Cards.forEach((/**
* @param {?} v
* @return {?}
*/
v => {
/** @type {?} */
const found = this.cards.find((/**
* @param {?} c
* @return {?}
*/
c => c.Type === v.Type));
if (found) {
found.Enabled = true;
}
}));
}
/**
* @return {?}
*/
ok() {
/** @type {?} */
const arr = this.cards.filter((/**
* @param {?} v
* @return {?}
*/
v => v.Enabled)).map((/**
* @param {?} v
* @return {?}
*/
v => {
/** @type {?} */
const found = this.svr.userSetting.Cards.find((/**
* @param {?} c
* @return {?}
*/
c => c.Type === v.Type));
if (found) {
return found;
}
return (/** @type {?} */ ({
Type: v.Type,
Size: defaultCardSize[v.Type],
Setting: null
}));
}));
this.svr.userSetting.Cards = arr;
this.svr.userSetting.Layout = this.layout;
this.svr.updateSetting().subscribe();
this.dialogRef.close(true);
}
}
SettingDialogComponent.decorators = [
{ type: Component, args: [{
selector: 'common-setting-dialog',
template: "<div class=\"set-title\">\u8BBE\u7F6E</div>\r\n<div class=\"set-sub-title\">\u5E03\u5C40\u5927\u5C0F</div>\r\n<mat-radio-group class=\"set-redio set-sub-title\"\r\n\t[(ngModel)]=\"layout\">\r\n\t<mat-radio-button value=\"auto\">\u81EA\u9002\u5E94</mat-radio-button>\r\n\t<mat-radio-button value=\"simple\">\u7B80\u6D01</mat-radio-button>\r\n</mat-radio-group>\r\n<div class=\"set-sub-title\">\u6A21\u5757\u9009\u62E9</div>\r\n<div class=\"\u5168\u90E8\u6A21\u5757\">\r\n\t<div class=\"\u6A21\u5757\" *ngFor=\"let card of cards\" [class.\u9009\u4E2D]=\"card.Enabled\">\r\n\t\t{{ card.Name }}\r\n\t\t<mat-icon class=\"\u529F\u80FD\u6309\u94AE\" svgIcon=\"remove_circle\" color=\"primary\"\r\n\t\t\t*ngIf=\"card.Enabled\" (click)=\"card.Enabled = false\">\u53BB\u9664</mat-icon>\r\n\t\t<mat-icon class=\"\u529F\u80FD\u6309\u94AE\" svgIcon=\"add_circle\" color=\"warn\"\r\n\t\t\t*ngIf=\"!card.Enabled\" (click)=\"card.Enabled = true\"></mat-icon>\r\n\t</div>\r\n</div>\r\n<div class=\"set-bottom\">\r\n\t<button class=\"\u8BBE\u7F6E-\u53D6\u6D88\u6309\u94AE \" mat-button (click)=\"dialogRef.close()\">\u53D6\u6D88</button>\r\n\t<button class=\"\u8BBE\u7F6E-\u786E\u5B9A\u6309\u94AE\" mat-raised-button (click)=\"ok()\">\u786E\u5B9A</button>\r\n</div>",
styles: ["@charset \"UTF-8\";:host{height:100%;padding:24px 16px 16px 24px;box-sizing:border-box;display:flex;flex-direction:column}.set-title{font-size:18px;font-weight:700;margin-bottom:24px}.set-sub-title{font-size:14px}.set-redio{display:block;font-weight:700;margin:24px 0 32px}.set-redio .mat-radio-button{margin-right:64px}.\u5168\u90E8\u6A21\u5757{width:100%;flex-grow:1;display:flex;flex-wrap:wrap}.\u5168\u90E8\u6A21\u5757 .\u6A21\u5757{width:96px;height:56px;font-size:14px;text-align:center;line-height:56px;border-radius:4px;margin:16px 16px 0 0;position:relative}.\u5168\u90E8\u6A21\u5757 .\u6A21\u5757 .\u529F\u80FD\u6309\u94AE{position:absolute;right:0;bottom:0;line-height:24px;cursor:pointer}.set-bottom{width:100%;height:32px;text-align:right}.set-bottom .\u8BBE\u7F6E-\u53D6\u6D88\u6309\u94AE{font-size:16px;font-weight:700}.set-bottom .\u8BBE\u7F6E-\u786E\u5B9A\u6309\u94AE{font-size:16px;font-weight:700;color:#fff}"]
}] }
];
/** @nocollapse */
SettingDialogComponent.ctorParameters = () => [
{ type: IndexService },
{ type: ElementRef },
{ type: MatDialogRef }
];
SettingDialogComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.c-index-setting-dialog',] }]
};
if (false) {
/** @type {?} */
SettingDialogComponent.prototype.hostClass;
/** @type {?} */
SettingDialogComponent.prototype.layout;
/** @type {?} */
SettingDialogComponent.prototype.cards;
/** @type {?} */
SettingDialogComponent.prototype.svr;
/**
* @type {?}
* @private
*/
SettingDialogComponent.prototype.elementRef;
/** @type {?} */
SettingDialogComponent.prototype.dialogRef;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class WelcomeComponent {
/**
* @param {?} prj
* @param {?} cur
* @param {?} dialog
*/
constructor(prj, cur, dialog) {
this.prj = prj;
this.cur = cur;
this.dialog = dialog;
this.hostClass = true;
this.isWrap = false;
}
/**
* @return {?}
*/
ngOnInit() {
/** @type {?} */
const titleWidth = this.prj.projectLabel.length * 24;
/** @type {?} */
const welcomeWidth = this.mainDiv.nativeElement.getBoundingClientRect().width - 16;
if (titleWidth > welcomeWidth) {
this.isWrap = true;
}
else {
this.isWrap = false;
}
}
/**
* @return {?}
*/
onResize() {
// event.target.innerWidth;
/** @type {?} */
const titleWidth = this.prj.projectLabel.length * 24;
/** @type {?} */
const welcomeWidth = this.mainDiv.nativeElement.getBoundingClientRect().width - 16;
if (titleWidth > welcomeWidth) {
this.isWrap = true;
}
else {
this.isWrap = false;
}
}
/**
* @return {?}
*/
openSetting() {
this.dialog.open(SettingDialogComponent, {
width: '720px',
height: '436px',
autoFocus: false
});
}
}
WelcomeComponent.decorators = [
{ type: Component, args: [{
selector: 'common-welcome',
template: "<div class=\"welcome-main mat-elevation-z2\" #main>\r\n\t<header class=\"main-top\">\r\n\t\t<span class=\"top-left\">{{ cur.data.UserName }}\uFF0C\u6B22\u8FCE\u8BBF\u95EE</span>\r\n\t\t<span class=\"top-right\">v{{ prj.version }}</span>\r\n\t</header>\r\n\t<section class=\"main-box\">\r\n\t\t<img class=\"logo\" [src]=\"prj.logoImageURL()\" />\r\n\t\t<div [class]=\"!isWrap ? 'box-title':'box-title-2'\"><b>{{ prj.projectLabel }}</b></div>\r\n\t</section>\r\n\t<footer class=\"main-footer\">\r\n\t\t<div>\r\n\t\t\t<span class=\"welcome-owner\">{{ prj.projectOwner }}</span>\r\n\t\t</div>\r\n\t\t<div class=\"welcome-icon\">\r\n\t\t\t<mat-icon svgIcon=\"help\"></mat-icon>\r\n\t\t\t<mat-icon svgIcon=\"settings\" (click)=\"openSetting()\"></mat-icon>\r\n\t\t</div>\r\n\t</footer>\r\n</div>\r\n",
styles: [".welcome-main{display:flex;flex-direction:column;justify-content:space-between;width:100%;height:236px;box-sizing:border-box;padding:8px;border-radius:4px;background:0 0/100% auto #666}.main-top{display:flex;justify-content:space-between;width:100%}.main-top .top-right{font-size:12px}.main-box{flex:1;display:flex;flex-direction:column;align-items:center;width:100%}.main-box .logo{width:80px;height:80px;margin-top:16px;margin-bottom:16px}.main-box .box-title{text-align:center;font-size:24px}.main-box .box-title-2{text-align:left;font-size:18px}.main-footer{display:flex;justify-content:space-between;width:100%;box-sizing:border-box}.main-footer .welcome-owner{font-size:12px}.main-footer .welcome-icon{flex-shrink:0}.main-footer .welcome-icon .mat-icon{margin-left:8px;cursor:pointer}.welcome-all{width:100%;height:100%;border-radius:4px;display:flex;flex-direction:column;justify-content:space-between;align-items:center;background:url(/front/assets/login/bg_logo.jpg) center bottom/100% auto no-repeat}.welcome-top{width:100%;display:flex;flex-direction:column;align-items:center}.welcome-top .honorific{width:100%;padding:8px 0 16px 8px;box-sizing:border-box;display:block;text-align:left;font-size:18px}.welcome-top .logo{width:80px;height:80px;margin-bottom:16px}.welcome-top .labelName{font-size:24px;font-weight:700;position:relative}.welcome-top .labelName .edition{display:block;width:40px;height:16px;border-radius:8px;line-height:16px;text-align:center;font-size:10px;font-weight:500;position:absolute;top:0;right:-44px}.welcome-bottom{width:100%;padding:0 8px 8px;box-sizing:border-box;display:flex;justify-content:space-between;align-items:flex-end}.welcome-bottom .welcome-owner{font-size:12px}.welcome-bottom .welcome-icon{flex-shrink:0}.welcome-bottom .welcome-icon .mat-icon{margin-left:8px;cursor:pointer}"]
}] }
];
/** @nocollapse */
WelcomeComponent.ctorParameters = () => [
{ type: ProjectService },
{ type: CurrentService },
{ type: MatDialog }
];
WelcomeComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.c-index-welcome',] }],
mainDiv: [{ type: ViewChild, args: ['main', { static: true },] }],
onResize: [{ type: HostListener, args: ['window:resize',] }]
};
if (false) {
/** @type {?} */
WelcomeComponent.prototype.hostClass;
/** @type {?} */
WelcomeComponent.prototype.mainDiv;
/** @type {?} */
WelcomeComponent.prototype.isWrap;
/** @type {?} */
WelcomeComponent.prototype.prj;
/** @type {?} */
WelcomeComponent.prototype.cur;
/**
* @type {?}
* @private
*/
WelcomeComponent.prototype.dialog;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
const ɵ0$2 = adapterFactory, ɵ1 = SaveStateData;
class IndexModule {
}
IndexModule.decorators = [
{ type: NgModule, args: [{
imports: [
CommonModule,
RouterModule,
MatMenuModule$1,
MatDialogModule,
MatRadioModule,
MatIconModule$1,
MatInputModule$1,
MatButtonModule,
MatTooltipModule,
MatTableModule,
FormsModule,
ReactiveFormsModule,
MatAutocompleteModule,
RecordViewInnerModule,
CalendarModule.forRoot({
provide: DateAdapter,
useFactory: ɵ0$2
}),
RouterModule.forChild([
{
path: '**',
component: IndexComponent,
data: ɵ1
}
])
],
declarations: [
IndexComponent,
WelcomeComponent,
BannerComponent,
NavigationComponent,
DataListComponent,
ChartComponent,
SettingDialogComponent,
CalendarComponent,
NoticeComponent,
MoreVertComponent
],
entryComponents: [SettingDialogComponent],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
},] }
];
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
const ɵ0$3 = SaveStateData;
// registerLoadedConfigEvent(CTRL_RECORDVIEW, () => getControllerRoutes(CTRL_RECORDVIEW, RecordViewComponent));
class RecordViewModule {
}
RecordViewModule.decorators = [
{ type: NgModule, args: [{
imports: [
RecordViewInnerModule,
RouterModule.forChild([{ path: '**', data: ɵ0$3, component: RecordViewComponent }])
],
exports: [RecordViewComponent]
},] }
];
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
const MUST = 'MUST';
/**
* @record
*/
function ImportField$1() { }
if (false) {
/** @type {?} */
ImportField$1.prototype.Name;
/** @type {?} */
ImportField$1.prototype.Alias;
/** @type {?} */
ImportField$1.prototype.Type;
/** @type {?} */
ImportField$1.prototype.MaxLength;
/** @type {?} */
ImportField$1.prototype.Style;
/** @type {?} */
ImportField$1.prototype.PrimaryKey;
/** @type {?} */
ImportField$1.prototype.Remark;
}
/**
* @record
*/
function MapField() { }
if (false) {
/** @type {?} */
MapField.prototype.Name;
/** @type {?} */
MapField.prototype.Style;
/** @type {?} */
MapField.prototype.MapName;
/** @type {?} */
MapField.prototype.Value;
/** @type {?} */
MapField.prototype.Remark;
}
/**
* @record
*/
function RefreshPreviewParam() { }
if (false) {
/** @type {?} */
RefreshPreviewParam.prototype.FileName;
/** @type {?} */
RefreshPreviewParam.prototype.Format;
/** @type {?} */
RefreshPreviewParam.prototype.Encoding;
/** @type {?} */
RefreshPreviewParam.prototype.FirstHead;
}
/**
* @record
*/
function RefreshPreviewResult() { }
if (false) {
/** @type {?} */
RefreshPreviewResult.prototype.Title;
/** @type {?} */
RefreshPreviewResult.prototype.Rows;
/** @type {?} */
RefreshPreviewResult.prototype.Error;
}
/**
* @record
*/
function DoImportParam() { }
if (false) {
/** @type {?} */
DoImportParam.prototype.FileName;
/** @type {?} */
DoImportParam.prototype.FirstHead;
/** @type {?} */
DoImportParam.prototype.Encoding;
/** @type {?} */
DoImportParam.prototype.Format;
/** @type {?} */
DoImportParam.prototype.Fields;
}
/**
* @record
*/
function DoImportResult() { }
if (false) {
/** @type {?} */
DoImportResult.prototype.TaskInfoURL;
/** @type {?} */
DoImportResult.prototype.TaskInfoSign;
/** @type {?} */
DoImportResult.prototype.BrowseTaskElement;
}
/**
* @record
*/
function ImportInfo() { }
if (false) {
/** @type {?} */
ImportInfo.prototype.TableName;
/** @type {?} */
ImportInfo.prototype.TableTotal;
/** @type {?} */
ImportInfo.prototype.TableCanRemove;
/** @type {?} */
ImportInfo.prototype.Fields;
/** @type {?} */
ImportInfo.prototype.NullIden;
}
/**
* @record
*/
function RemoveTableDataResult() { }
if (false) {
/** @type {?} */
RemoveTableDataResult.prototype.Total;
/** @type {?} */
RemoveTableDataResult.prototype.CanRemove;
}
class ImportService {
/**
* @param {?} api
* @param {?} prj
* @param {?} eles
* @param {?} snackBar
*/
constructor(api, prj, eles, snackBar) {
this.api = api;
this.prj = prj;
this.eles = eles;
this.snackBar = snackBar;
this.step = 'select-file';
// 服务端唯一的临时文件名
this.firstHead = true; // 是否是首行的标识
// 是否是首行的标识
this.format = 'CSV';
this.encoding = 'UTF8';
this.previewData = { Have: false, Title: null, Rows: null, Error: '' };
}
/**
* @return {?}
*/
init() {
this.GetImportInfo().subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
this.tableName = v.TableName;
this.tableTotal = v.TableTotal;
this.tableCanRemove = v.TableCanRemove;
this.fields = v.Fields;
this.nullIden = v.NullIden;
this.mapFields = v.Fields.map((/**
* @param {?} fld
* @return {?}
*/
fld => ({
Name: fld.Name,
Style: fld.Style,
MapName: '',
Value: '',
Remark: fld.Remark
})));
}));
}
/**
* @return {?}
*/
GetImportInfo() {
return this.api.get('get-import-info');
}
/**
* @return {?}
*/
mustFields() {
if (this.fields) {
return this.fields.filter((/**
* @param {?} v
* @return {?}
*/
v => v.Style === MUST)).map((/**
* @param {?} v
* @return {?}
*/
v => v.Name));
}
else {
return [];
}
}
/**
* @return {?}
*/
primaryKeyFields() {
if (this.fields) {
return this.fields.filter((/**
* @param {?} v
* @return {?}
*/
v => v.PrimaryKey)).map((/**
* @param {?} v
* @return {?}
*/
v => v.Name));
}
else {
return [];
}
}
/**
* @return {?}
*/
fileType() {
if (this.file) {
/** @type {?} */
const list = this.file.name.split('.');
if (list.length > 1) {
return '.' + list[1];
}
}
return '';
}
// 上传文件使用了返回的路由,所以需要自己调用原生的http请求
/**
* @return {?}
*/
upload() {
/** @type {?} */
let sentBegin;
this.api.upload(this.file, 'content', 'upload-import-file').subscribe((/**
* @param {?} event
* @return {?}
*/
event => {
switch (event.type) {
case HttpEventType.Sent:
// 小于500毫秒的上传,不显示中间的上传进度界面,防止界面闪烁
sentBegin = setTimeout((/**
* @return {?}
*/
() => {
this.step = 'upload';
sentBegin = null;
}), 500);
break;
case HttpEventType.UploadProgress:
this.uploadProgress = Math.round(event.loaded / event.total * 100);
break;
case HttpEventType.Response:
if (sentBegin) {
clearTimeout(sentBegin);
sentBegin = null;
}
this.step = 'setting';
this.serverTempFileName = event.body;
this.previewData.Error = '';
this.previewData.Have = false;
break;
default:
console.log(event);
break;
}
}));
}
/**
* @return {?}
*/
refreshPreview() {
this.api
.post('refresh-preview', (/** @type {?} */ ({
FileName: this.serverTempFileName,
Format: this.format,
Encoding: this.encoding,
FirstHead: this.firstHead
})))
.subscribe((/**
* @param {?} rev
* @return {?}
*/
rev => {
this.previewData.Have = true;
this.previewData.Title = rev.Title;
this.previewData.Rows = rev.Rows;
this.previewData.Error = rev.Error;
this.mapFields.forEach((/**
* @param {?} v
* @param {?} index
* @return {?}
*/
(v, index) => {
if (this.firstHead) {
v.MapName = this.previewData.Title.find((/**
* @param {?} str
* @return {?}
*/
str => str.toLowerCase() === v.Name.toLowerCase()));
if (!v.MapName) {
// 根据别名再找一遍
/** @type {?} */
const alias = this.fields.find((/**
* @param {?} afield
* @return {?}
*/
afield => afield.Name === v.Name)).Alias;
v.MapName = this.previewData.Title.find((/**
* @param {?} str
* @return {?}
*/
str => str.toLowerCase() === alias.toLowerCase()));
}
}
else {
v.MapName = this.previewData.Title[index];
}
if (v.MapName === undefined) {
v.MapName = '(SKIP)';
}
}));
console.log('------', this.previewData.Have || this.previewData.Error);
}));
}
/**
* @return {?}
*/
doImport() {
this.api
.post('do-import', (/** @type {?} */ ({
FileName: this.serverTempFileName,
FirstHead: this.firstHead,
Encoding: this.encoding,
Format: this.format,
Fields: this.mapFields.map((/**
* @param {?} v
* @return {?}
*/
v => ({
Name: v.Name,
MapName: v.MapName,
Value: v.Value
}))),
NullIden: this.nullIden
})))
.subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
this.step = 'done';
this.taskInfoURL = this.prj.frontURL('task', v.TaskInfoURL);
this.eles.addElement(v.BrowseTaskElement);
this.eles.setURLSign(v.TaskInfoURL, v.TaskInfoSign);
}));
}
/**
* @return {?}
*/
removeTableData() {
this.api.post('remove-table-data').subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
this.tableTotal = v.Total;
this.tableCanRemove = v.CanRemove;
this.snackBar.open('成功删除数据', '关闭', { duration: 5000 });
}));
}
}
ImportService.decorators = [
{ type: Injectable }
];
/** @nocollapse */
ImportService.ctorParameters = () => [
{ type: CurrentApiService },
{ type: ProjectService },
{ type: ElementsService },
{ type: MatSnackBar }
];
if (false) {
/** @type {?} */
ImportService.prototype.step;
/** @type {?} */
ImportService.prototype.tableName;
/** @type {?} */
ImportService.prototype.tableTotal;
/** @type {?} */
ImportService.prototype.tableCanRemove;
/** @type {?} */
ImportService.prototype.fields;
/** @type {?} */
ImportService.prototype.file;
/** @type {?} */
ImportService.prototype.uploadProgress;
/** @type {?} */
ImportService.prototype.serverTempFileName;
/** @type {?} */
ImportService.prototype.firstHead;
/** @type {?} */
ImportService.prototype.format;
/** @type {?} */
ImportService.prototype.encoding;
/** @type {?} */
ImportService.prototype.nullIden;
/** @type {?} */
ImportService.prototype.previewData;
/** @type {?} */
ImportService.prototype.mapFields;
/** @type {?} */
ImportService.prototype.taskInfoURL;
/**
* @type {?}
* @private
*/
ImportService.prototype.api;
/**
* @type {?}
* @private
*/
ImportService.prototype.prj;
/**
* @type {?}
* @private
*/
ImportService.prototype.eles;
/**
* @type {?}
* @private
*/
ImportService.prototype.snackBar;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class ImportComponent {
// selected = '(SKIP)';
/**
* @param {?} svr
* @param {?} dialog
* @param {?} tabs
*/
constructor(svr, dialog, tabs) {
this.svr = svr;
this.dialog = dialog;
this.tabs = tabs;
this.hostClass = true;
// @ViewChild('fileInput', { static: true }) fileInput: any; 先留着让我学习
this.exp = true;
this.isDisplay0 = true;
this.isDisplayflex = true;
this.isInfo = false;
this.isHidden = false;
this.isShowSpan = false;
}
/**
* @return {?}
*/
ngOnInit() {
this.svr.init();
}
// 选择文件时触发文件提交
/**
* @param {?} files
* @return {?}
*/
uploadFile(files) {
this.svr.file = files[0];
}
/**
* @param {?} e
* @return {?}
*/
dragoverFile(e) {
e.preventDefault();
}
/**
* @param {?} e
* @return {?}
*/
drop(e) {
this.svr.file = e.dataTransfer.files[0];
e.preventDefault();
}
// ↓↓↓ 侧边栏 信息显示11
/**
* @return {?}
*/
hiddenNav() {
this.isDisplay0 = !this.isDisplay0;
this.isDisplayflex = !this.isDisplayflex;
this.isInfo = !this.isInfo;
}
/**
* @return {?}
*/
changeNullIden() {
/** @type {?} */
const dialogRef = this.dialog.open(PromptDialogComponent, {
width: '250px',
data: (/** @type {?} */ ({
title: 'NULL值识别码',
prompt: '导入的数据中出现识别码的内容将被转换为NULL值',
value: this.svr.nullIden
}))
});
dialogRef.afterClosed().subscribe((/**
* @param {?} result
* @return {?}
*/
result => {
if (result !== undefined) {
this.svr.nullIden = result;
}
}));
}
/**
* @return {?}
*/
clearDialog() {
/** @type {?} */
const dialogRef = this.dialog.open(ConfirmDialogComponent, {
width: '360px',
height: '180px',
data: `确定要清除数据?`
});
dialogRef.afterClosed().subscribe((/**
* @param {?} result
* @return {?}
*/
(result) => {
if (result) {
this.svr.removeTableData();
}
}));
}
}
ImportComponent.decorators = [
{ type: Component, args: [{
selector: 'common-import',
template: "<div class=\"main main-left\" [class.main-left]=\"!isDisplay0\">\r\n\t<!-- \b*** \u5BFC\u5165\u4E3B\u4F53 *** -->\r\n\t<section class=\"section-wrapper\">\r\n\r\n\t\t<!-- \u2193\u2193\u2193 \u6CE8\u610F\u56FE\u6807 \u2193\u2193\u2193 -->\r\n\t\t<mat-icon class=\"nav-icon\" [svgIcon]=\"isDisplay0 ? 'info' : 'cancel'\"\r\n\t\t\t(click)=\"hiddenNav()\" *ngIf=\"svr.step != 'done'\">\r\n\t\t</mat-icon>\r\n\t\t<!-- \b*** \u6CE8\u610F\u4E8B\u9879 *** -->\r\n\t\t<nav class=\"nav-notice\" [class.display0]=\"isDisplay0\">\r\n\t\t\t<!-- ** \u6587\u672C\u6846 ** -->\r\n\t\t\t<section class=\"notice-wrapper\">\r\n\t\t\t\t<div class=\"notice-title\">\u6CE8\u610F\u4E8B\u9879</div>\r\n\t\t\t\t<div class=\"notice-text\">\r\n\t\t\t\t\t<!-- \u7B2C1\u53E5 -->\r\n\t\t\t\t\t<p>\r\n\t\t\t\t\t\t1.\u7A7A\u884C\u88AB\u5FFD\u7565\uFF0C\u5E76\u4E0D\u8BA1\u5165\u884C\u53F7\r\n\t\t\t\t\t</p>\r\n\t\t\t\t\t<!-- \u7B2C2\u53E5 -->\r\n\t\t\t\t\t<p>\r\n\t\t\t\t\t\t2.<span *ngFor=\"let fld of svr.mustFields()\">[{{fld}}]</span>\u4E3A\u7A7A\u7684\u5C06\u88AB\u5FFD\u7565\r\n\t\t\t\t\t</p>\r\n\t\t\t\t\t<!-- \u7B2C3\u53E5 -->\r\n\t\t\t\t\t<p>\r\n\t\t\t\t\t\t3.<span\r\n\t\t\t\t\t\t\t*ngFor=\"let fld of svr.primaryKeyFields()\">[{{fld}}]</span>\u91CD\u590D\u7684\u884C,\u4EE5\u6700\u540E\u4E00\u884C\u4E3A\u51C6\r\n\t\t\t\t\t</p>\r\n\t\t\t\t\t<!-- \u7B2C4\u53E5 -->\r\n\t\t\t\t\t<p>\r\n\t\t\t\t\t\t4.\u6307\u6807\u7684\u524D\u540E\u7A7A\u767D\u5B57\u7B26,\u5305\u62EC\u5168\u534A\u89D2\u7A7A\u683C\u3001\u56DE\u8F66\u6362\u884C\u3001\u5236\u8868\u7B26\u7B49\u5C06\u88AB\u6E05\u9664\r\n\t\t\t\t\t</p>\r\n\t\t\t\t</div>\r\n\t\t\t</section>\r\n\r\n\t\t</nav>\r\n\r\n\t\t<ng-container [ngSwitch]=\"svr.step\">\r\n\t\t\t<!-- \u2193\u2193\u2193 \u9009\u62E9\u6587\u4EF6\u6B65\u9AA4 \u2193\u2193\u2193 -->\r\n\r\n\t\t\t<div *ngSwitchCase=\"'select-file'\" class=\"import-wrapper add-margin\">\r\n\t\t\t\t<!-- ** \u4E3B\u4F53\u6807\u9898 ** -->\r\n\t\t\t\t<header>1/2\u9009\u62E9\u6587\u4EF6</header>\r\n\t\t\t\t<!-- ** \u70B9\u51FB\u56FE\u6807\u90E8\u5206 ** click \u5E94\u8BE5\u653E\u5728\u8FD9\u4E2A\u56FE\u5C42-->\r\n\t\t\t\t<section class=\"select-wrapper\">\r\n\t\t\t\t\t<!-- * \u6CA1\u6709\u9009\u53D6\u4E0A\u4F20\u6587\u4EF6\u65F6 *-->\r\n\t\t\t\t\t<!-- <ng-template> -->\r\n\t\t\t\t\t<!-- \u56FE\u6807\u90E8\u5206 -->\r\n\t\t\t\t\t<div class=\"select-main\" (click)=\"fileInput.click()\"\r\n\t\t\t\t\t\t(dragover)=\"dragoverFile($event)\" (dragenter)=\"dragoverFile($event)\"\r\n\t\t\t\t\t\t(drop)=\"drop($event)\">\r\n\t\t\t\t\t\t<mat-icon class=\"icon\"\r\n\t\t\t\t\t\t\t[svgIcon]=\"this.svr.file ? 'insert_drive_file' : 'backup'\">\r\n\t\t\t\t\t\t</mat-icon>\r\n\t\t\t\t\t\t<div *ngIf=\"!this.svr.file\" class=\"icon-text\">\u70B9\u51FB\u6DFB\u52A0<br>\u6216\u5C06\u6587\u4EF6\u62D6\u5230\u6B64\u5904</div>\r\n\t\t\t\t\t\t<div *ngIf=\"this.svr.file\" class=\"icon-text\">\r\n\t\t\t\t\t\t\t<mat-icon svgIcon=\"replay\"></mat-icon>\u91CD\u65B0\u4E0A\u4F20\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<input hidden type=\"file\" #fileInput\r\n\t\t\t\t\t\t(change)=\"uploadFile($event.target.files)\" />\r\n\t\t\t\t\t<!-- \u6587\u5B57\u90E8\u5206 -->\r\n\t\t\t\t\t<div *ngIf=\"!this.svr.file\" class=\"select-text\">*\u4EC5\u652F\u6301\u4E0A\u4F20CSV\u3001TXT\u683C\u5F0F\u6587\u4EF6\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div *ngIf=\"this.svr.file\" class=\"select-text\">\r\n\t\t\t\t\t\t{{ this.svr.file.name }}</div>\r\n\t\t\t\t\t<!-- </ng-template> -->\r\n\t\t\t\t</section>\r\n\r\n\t\t\t\t<!-- ** \u8868\u683C\u90E8\u5206 ** -->\r\n\t\t\t\t<section class=\"table-wrapper\">\r\n\t\t\t\t\t<!-- * \u6587\u4EF6\u683C\u5F0F\u8BF4\u660E\u90E8\u5206 * -->\r\n\t\t\t\t\t<header>\r\n\t\t\t\t\t\t<div class=\"layout-title\">\u6587\u4EF6\u683C\u5F0F\u8BF4\u660E</div>\r\n\t\t\t\t\t\t<div class=\"layout-text\">\r\n\t\t\t\t\t\t\t<div class=\"text-left\">\r\n\t\t\t\t\t\t\t\t\u6570\u636E\u9700\u8981\u6309\u7167\u5982\u4E0B\u7684\u683C\u5F0F\u63D0\u4F9B\uFF0C\u53EF\u4EE5\u662FCSV\u6587\u4EF6\u6216\u8005TAB\u5206\u9694\u7684\u6587\u672C\u6587\u4EF6\uFF0C\u5B57\u7B26\u96C6\u9ED8\u8BA4\u4E3AUTF8</div>\r\n\r\n\t\t\t\t\t\t\t<span>\r\n\t\t\t\t\t\t\t\t<!-- <a (click)=\"svr.removeTableData()\">\u6E05\u7A7A\u6570\u636E</a> -->\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t<button mat-button (click)=\"clearDialog()\">\u6E05\u7A7A\u6570\u636E</button>\r\n\t\t\t\t\t\t\t\t<!-- \u2193\u2193\u2193 \u6D6E\u7A97 \u2193\u2193\u2193 -->\r\n\t\t\t\t\t\t\t\t<div class=\"float-table-info\">\r\n\t\t\t\t\t\t\t\t\t<div><span>\u8868\u540D:</span><span>{{svr.tableName}}</span></div>\r\n\t\t\t\t\t\t\t\t\t<div><span>\u8BB0\u5F55\u603B\u6570:</span><span>{{svr.tableTotal}}</span></div>\r\n\t\t\t\t\t\t\t\t\t<div><span>\u53EF\u64CD\u4F5C\u8BB0\u5F55:</span><span>{{svr.tableCanRemove}}</span>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t\t\t\t<!-- \u2191\u2191\u2191 \u6D6E\u7A97 \u2191\u2191\u2191 -->\r\n\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</header>\r\n\t\t\t\t\t<!-- * \u8868\u683C\u6B63\u4F53 * -->\r\n\t\t\t\t\t<section class=\"import-table\">\r\n\t\t\t\t\t\t<div class=\"table-box\">\r\n\t\t\t\t\t\t\t<table mat-table [dataSource]=\"svr.fields\">\r\n\t\t\t\t\t\t\t\t<ng-container matColumnDef=\"no\">\r\n\t\t\t\t\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\u5E8F\u53F7</th>\r\n\t\t\t\t\t\t\t\t\t<td mat-cell *matCellDef=\"let element;let i = index\">{{i}}\r\n\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t\t\t\t<ng-container matColumnDef=\"name\">\r\n\t\t\t\t\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\u540D\u79F0</th>\r\n\t\t\t\t\t\t\t\t\t<td mat-cell *matCellDef=\"let element\">{{ element.Name }}\r\n\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t\t\t\t<ng-container matColumnDef=\"alias\">\r\n\t\t\t\t\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\u522B\u540D</th>\r\n\t\t\t\t\t\t\t\t\t<td mat-cell *matCellDef=\"let element\">{{ element.Alias }}\r\n\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t\t\t\t<ng-container matColumnDef=\"type\">\r\n\t\t\t\t\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\u6570\u636E\u7C7B\u578B</th>\r\n\t\t\t\t\t\t\t\t\t<td mat-cell *matCellDef=\"let element\">{{ element.Type }}\r\n\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t\t\t\t<ng-container matColumnDef=\"length\">\r\n\t\t\t\t\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\u957F\u5EA6</th>\r\n\t\t\t\t\t\t\t\t\t<td mat-cell *matCellDef=\"let element\">\r\n\t\t\t\t\t\t\t\t\t\t{{ element.MaxLength }}\r\n\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t\t\t\t<ng-container matColumnDef=\"style\">\r\n\t\t\t\t\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\u7C7B\u522B</th>\r\n\t\t\t\t\t\t\t\t\t<td mat-cell *matCellDef=\"let element\">{{ element.Style }}\r\n\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t\t\t\t<ng-container matColumnDef=\"comment\">\r\n\t\t\t\t\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\u5907\u6CE8</th>\r\n\t\t\t\t\t\t\t\t\t<td mat-cell *matCellDef=\"let element\">{{ element.Remark }}\r\n\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t\t\t\t<tr mat-header-row\r\n\t\t\t\t\t\t\t\t\t*matHeaderRowDef=\"['no','name','alias', 'type', 'length', 'style', 'comment'];sticky: true\">\r\n\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t<tr mat-row\r\n\t\t\t\t\t\t\t\t\t*matRowDef=\"let row; columns: ['no','name','alias', 'type', 'length', 'style', 'comment']\">\r\n\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t</table>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</section>\r\n\t\t\t\t</section>\r\n\t\t\t\t<!-- ** \u6309\u94AE ** -->\r\n\t\t\t\t<footer class=\"next-step\">\r\n\t\t\t\t\t<button [disabled]=\"!this.svr.file\" mat-flat-button\r\n\t\t\t\t\t\t(click)=\"svr.upload()\">\u4E0B\u4E00\u6B65</button>\r\n\t\t\t\t</footer>\r\n\t\t\t\t<div class=\"clear-tip\">\r\n\t\t\t\t\t<div class=\"tip-wrapper\">\r\n\t\t\t\t\t\t<div class=\"tip-left\">\u6210\u529F\u5220\u9664\u6570\u636E</div>\r\n\t\t\t\t\t\t<div class=\"tip-right\">\u5173\u95ED</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<!-- \u2193\u2193\u2193 \u8FD9\u4E2A/div\u7559\u7ED9ngSwitchCase -->\r\n\t\t\t</div>\r\n\r\n\t\t\t<!-- \u2191\u2191\u2191 \u9009\u62E9\u6587\u4EF6\u6B65\u9AA4 \u2191\u2191\u2191 -->\r\n\r\n\t\t\t<!-- \u2193\u2193\u2193 \u6587\u4EF6\u4E0A\u4F20\u4E2D\u6B65\u9AA4 \u2193\u2193\u2193 -->\r\n\t\t\t<div class=\"upload\" *ngSwitchCase=\"'upload'\">\r\n\t\t\t\t<div class=\"upload-wrapper\">\r\n\t\t\t\t\t<div class=\"upload-title\">\r\n\t\t\t\t\t\t\u6587\u4EF6\u6B63\u5728\u4E0A\u4F20\u4E2D\u00B7\u00B7\u00B7\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"upload-text\">\r\n\t\t\t\t\t\t{{svr.uploadProgress}}%\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div>\r\n\t\t\t\t\t\t<mat-progress-bar mode=\"determinate\" [value]=\"svr.uploadProgress\">\r\n\t\t\t\t\t\t</mat-progress-bar>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<!-- \u2191\u2191\u2191 \u6587\u4EF6\u4E0A\u4F20\u4E2D\u6B65\u9AA4 \u2191\u2191\u2191 -->\r\n\r\n\t\t\t<!-- \u2193\u2193\u2193 \u6587\u4EF6\u8BBE\u7F6E\u6B65\u9AA4 \u2193\u2193\u2193 -->\r\n\r\n\t\t\t<div class=\"setting-wrapper add-margin\" *ngSwitchCase=\"'setting'\" #exp>\r\n\r\n\t\t\t\t<header class=\"set-title\">2/2\u6587\u4EF6\u8BBE\u7F6E</header>\r\n\t\t\t\t<!-- * \u2193\u2193 \u6587\u4EF6\u9009\u62E9 \u2193\u2193 * -->\r\n\t\t\t\t<section class=\"set-select\">\r\n\t\t\t\t\t<div class=\"select-1\">\r\n\t\t\t\t\t\t<mat-checkbox [(ngModel)]=\"svr.firstHead\">\u9996\u884C\u662F\u6807\u9898\u884C</mat-checkbox>\r\n\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t<div class=\"select-2\">\r\n\t\t\t\t\t\t\u683C\u5F0F:\r\n\t\t\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t\t\t<mat-select [(ngModel)]=\"svr.format\">\r\n\t\t\t\t\t\t\t\t<mat-option value=\"CSV\">\r\n\t\t\t\t\t\t\t\t\tCSV(\u9017\u53F7\u5206\u9694\u6587\u672C)\r\n\t\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t\t\t<mat-option value=\"TXT\">\r\n\t\t\t\t\t\t\t\t\tTXT(TAB\u5206\u9694\u6587\u672C)\r\n\t\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t<div class=\"select-3\">\r\n\t\t\t\t\t\t\u5B57\u7B26\u96C6:\r\n\t\t\t\t\t\t<mat-radio-group [(ngModel)]=\"svr.encoding\">\r\n\t\t\t\t\t\t\t<mat-radio-button value=\"UTF8\" checked>\r\n\t\t\t\t\t\t\t\tUTF-8\r\n\t\t\t\t\t\t\t</mat-radio-button>\r\n\t\t\t\t\t\t\t<mat-radio-button value=\"GBK\">\r\n\t\t\t\t\t\t\t\tGBK\r\n\t\t\t\t\t\t\t</mat-radio-button>\r\n\t\t\t\t\t\t</mat-radio-group>\r\n\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t<div class=\"select-4\">\r\n\t\t\t\t\t\t<button mat-button (click)=\"svr.refreshPreview()\">\r\n\t\t\t\t\t\t\t<mat-icon class=\"icon-done\" svgIcon=\"done\"></mat-icon>\r\n\t\t\t\t\t\t\t\u751F\u6210\u9884\u89C8\r\n\t\t\t\t\t\t</button>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</section>\r\n\t\t\t\t<!-- * \u2191\u2191 \u6587\u4EF6\u9009\u62E9\u7ED3\u675F \u2191\u2191 * -->\r\n\t\t\t\t<!-- * \u2193\u2193 \u6587\u4EF6\u8BBE\u7F6E \u2193\u2193 * -->\r\n\t\t\t\t<section class=\"set-data\">\r\n\t\t\t\t\t<!-- * \u2193\u2193 \u6570\u636E\u9884\u89C8\u72B6\u6001 \u2193\u2193 * -->\r\n\t\t\t\t\t<div class=\"preview-data\"\r\n\t\t\t\t\t\t*ngIf=\"svr.previewData.Have; else previewDataEmpty\">\r\n\t\t\t\t\t\t<!-- * \u2193 \u6587\u4EF6\u9519\u8BEF \u2193 * -->\r\n\t\t\t\t\t\t<div class=\"error-wrapper\"\r\n\t\t\t\t\t\t\t*ngIf=\"svr.previewData.Error;else previewDataNoError\">\r\n\t\t\t\t\t\t\t<div class=\"error-title\">\r\n\t\t\t\t\t\t\t\t<mat-icon class=\"report-problem\" svgIcon=\"report_problem\">\r\n\t\t\t\t\t\t\t\t</mat-icon>\r\n\t\t\t\t\t\t\t\t\u751F\u6210\u5185\u5BB9\u51FA\u9519\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<div class=\"error-text\">{{svr.previewData.Error}}</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<!-- * \u2191 \u6587\u4EF6\u9519\u8BEF \u2191 * -->\r\n\t\t\t\t\t\t<!-- * \u2193 \u6570\u636E\u6B63\u786E\u663E\u793A \u2193 * -->\r\n\t\t\t\t\t\t<ng-template #previewDataNoError>\r\n\t\t\t\t\t\t\t<!-- \u2193 100\u884C\u6570\u636E \u2193 -->\r\n\t\t\t\t\t\t\t<section class=\"row100\">\r\n\t\t\t\t\t\t\t\t<header>\u4EE5\u4E0B\u662F\u8BC6\u522B\u51FA\u6765\u7684\u524D100\u884C\u6570\u636E</header>\r\n\t\t\t\t\t\t\t\t<section class=\"row100-data\">\r\n\t\t\t\t\t\t\t\t\t<table>\r\n\t\t\t\t\t\t\t\t\t\t<thead>\r\n\t\t\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<th *ngFor=\"let col of svr.previewData.Title\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{{col}}\r\n\t\t\t\t\t\t\t\t\t\t\t\t</th>\r\n\t\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\t</thead>\r\n\t\t\t\t\t\t\t\t\t\t<tbody>\r\n\t\t\t\t\t\t\t\t\t\t\t<tr *ngFor=\"let row of svr.previewData.Rows\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<td *ngFor=\"let col of row\">{{col}}</td>\r\n\t\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\t</tbody>\r\n\t\t\t\t\t\t\t\t\t</table>\r\n\t\t\t\t\t\t\t\t</section>\r\n\t\t\t\t\t\t\t</section>\r\n\t\t\t\t\t\t\t<!-- \u2191 100\u884C\u6570\u636E \u2191 -->\r\n\t\t\t\t\t\t\t<!-- \u2193 \u6307\u6807\u8BBE\u7F6E \u2193 -->\r\n\t\t\t\t\t\t\t<section class=\"set-index\">\r\n\t\t\t\t\t\t\t\t<header>\r\n\t\t\t\t\t\t\t\t\t<div class=\"title\">\u6307\u6807\u8BBE\u7F6E</div>\r\n\t\t\t\t\t\t\t\t\t<div class=\"text\">\r\n\t\t\t\t\t\t\t\t\t\t<div>\u4EE5\u4E0B\u662F\u6307\u6807\u5BF9\u7167\u8BBE\u7F6E\uFF0C\u53EF\u4EE5\u8BBE\u7F6E\u5BFC\u5165\u6570\u636E\u5217\u4E0E\u6570\u636E\u5E93\u5217\u7684\u6620\u5C04\u5173\u7CFB\uFF0C\u5E76\u53EF\u4EE5\u6307\u5B9A\u503C</div>\r\n\t\t\t\t\t\t\t\t\t\t<div *ngIf=\"svr.nullIden;else noNullIden\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\u5F53\u524DNull\u503C\u8BC6\u522B\u7801\u4E3A\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span>{{svr.nullIden}}</span>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<button mat-button (click)=\"changeNullIden()\">\u4FEE\u6539</button>\r\n\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t<ng-template #noNullIden>\r\n\t\t\t\t\t\t\t\t\t\t\t<div>\u5F53\u524DNull\u503C\u8BC6\u522B\u7801\u672A\u8BBE\u7F6E\r\n\t\t\t\t\t\t\t\t\t\t\t\t<button mat-button (click)=\"changeNullIden()\">\u70B9\u51FB\u8BBE\u7F6E</button>\r\n\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t</ng-template>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</header>\r\n\r\n\t\t\t\t\t\t\t\t<section class=\"index-data\">\r\n\t\t\t\t\t\t\t\t\t<!-- \u8868 -->\r\n\t\t\t\t\t\t\t\t\t<table mat-table [dataSource]=\"svr.mapFields\">\r\n\t\t\t\t\t\t\t\t\t\t<!-- \u5E8F\u53F7 -->\r\n\t\t\t\t\t\t\t\t\t\t<ng-container matColumnDef=\"no\">\r\n\t\t\t\t\t\t\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\u5E8F\u53F7</th>\r\n\t\t\t\t\t\t\t\t\t\t\t<td mat-cell *matCellDef=\"let element;let i = index\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t{{i}}\r\n\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t\t\t\t\t\t\t<!-- \u6570\u636E\u5E93 -->\r\n\t\t\t\t\t\t\t\t\t\t<ng-container matColumnDef=\"name\">\r\n\t\t\t\t\t\t\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\u6570\u636E\u5E93\u6307\u6807</th>\r\n\t\t\t\t\t\t\t\t\t\t\t<td mat-cell *matCellDef=\"let element\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t{{ element.Name }}\r\n\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t\t\t\t\t\t\t<!-- \u7C7B\u522B -->\r\n\t\t\t\t\t\t\t\t\t\t<ng-container matColumnDef=\"type\">\r\n\t\t\t\t\t\t\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\u7C7B\u522B</th>\r\n\t\t\t\t\t\t\t\t\t\t\t<td mat-cell *matCellDef=\"let element\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t{{ element.Style==='MUST'?'\u5FC5\u987B':'\u6B63\u5E38' }}\r\n\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t\t\t\t\t\t<!-- \u6620\u5C04\u5217 -->\r\n\t\t\t\t\t\t\t\t\t\t<ng-container matColumnDef=\"mapName\" class=\"map-name\">\r\n\t\t\t\t\t\t\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\u6620\u5C04\u5217</th>\r\n\t\t\t\t\t\t\t\t\t\t\t<td mat-cell *matCellDef=\"let element\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<mat-select [(ngModel)]=\"element.MapName\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<mat-option value=\"(SKIP)\">(\u5FFD\u7565)</mat-option>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<mat-option\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t*ngFor=\"let val of svr.previewData.Title\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[value]=\"val\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{{val}}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<mat-option value=\"(CUSTOM)\">(\u5B9A\u503C)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t\t\t\t\t\t<!-- \u503C -->\r\n\t\t\t\t\t\t\t\t\t\t<ng-container matColumnDef=\"value\">\r\n\t\t\t\t\t\t\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\u503C</th>\r\n\t\t\t\t\t\t\t\t\t\t\t<td mat-cell *matCellDef=\"let element\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<input matInput [(ngModel)]=\"element.Value\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t[disabled]=\"element.MapName !=='(CUSTOM)'\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t\t\t\t\t\t<!-- \u5907\u6CE8 -->\r\n\t\t\t\t\t\t\t\t\t\t<ng-container matColumnDef=\"comment\">\r\n\t\t\t\t\t\t\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\u5907\u6CE8</th>\r\n\t\t\t\t\t\t\t\t\t\t\t<td mat-cell *matCellDef=\"let element\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t{{ element.Remark }}\r\n\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t\t\t\t\t\t<tr mat-header-row\r\n\t\t\t\t\t\t\t\t\t\t\t*matHeaderRowDef=\"['no','name', 'type', 'mapName', 'value', 'comment'];sticky: true\">\r\n\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\t<tr mat-row\r\n\t\t\t\t\t\t\t\t\t\t\t*matRowDef=\"let row; columns: ['no','name', 'type', 'mapName', 'value', 'comment']\">\r\n\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t</table>\r\n\t\t\t\t\t\t\t\t</section>\r\n\t\t\t\t\t\t\t</section>\r\n\t\t\t\t\t\t\t<!-- \u2191 \u6307\u6807\u8BBE\u7F6E \u2191 -->\r\n\t\t\t\t\t\t</ng-template>\r\n\t\t\t\t\t\t<!-- * \u2191 \u6570\u636E\u6B63\u786E\u663E\u793A\u7ED3\u675F \u2191 * -->\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<!-- * \u2191\u2191 \u6570\u636E\u9884\u89C8\u72B6\u6001 \u2191\u2191 * -->\r\n\t\t\t\t\t<!-- * \u2193\u2193 \u7A7A\u6570\u636E\u72B6\u6001 \u2193\u2193 * -->\r\n\t\t\t\t\t<ng-template class=\"data-empty\" #previewDataEmpty>\r\n\t\t\t\t\t\t<div class=\"data-empty\">\r\n\t\t\t\t\t\t\t<div class=\"empty-wrapper\">\r\n\t\t\t\t\t\t\t\t<div class=\"empty-title\">\u6682\u65E0\u5185\u5BB9</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<div class=\"empty-text\">\u8BF7\u8BBE\u7F6E\u5BFC\u5165\u53C2\u6570\uFF0C\u70B9\u51FB\u751F\u6210\u9884\u89C8\u6309\u94AE\u67E5\u770B</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</ng-template>\r\n\t\t\t\t\t<!-- * \u2191\u2191 \u7A7A\u6570\u636E\u72B6\u6001\u7ED3\u675F \u2191\u2191 * -->\r\n\t\t\t\t</section>\r\n\t\t\t\t<!-- * \u2191\u2191 \u6587\u4EF6\u8BBE\u7F6E\u7ED3\u675F \u2191\u2191 * -->\r\n\t\t\t\t<footer class=\"set-button\">\r\n\t\t\t\t\t<button mat-button (click)=\"svr.step='select-file'\">\u4E0A\u4E00\u6B65</button>\r\n\t\t\t\t\t<button class=\"import-btn\" mat-flat-button\r\n\t\t\t\t\t\t[disabled]=\"!svr.previewData.Have || svr.previewData.Error !== ''\"\r\n\t\t\t\t\t\t(click)=\"svr.doImport()\">\u5BFC\u5165</button>\r\n\t\t\t\t</footer>\r\n\r\n\t\t\t</div>\r\n\r\n\t\t\t<!-- \u2191\u2191\u2191 \u6587\u4EF6\u8BBE\u7F6E\u6B65\u9AA4 \u2191\u2191\u2191 -->\r\n\t\t\t<!-- \u2193\u2193\u2193 \u5BFC\u5165\u5B8C\u6210 \u2193\u2193\u2193 -->\r\n\t\t\t<div *ngSwitchCase=\"'done'\">\r\n\t\t\t\t<div class=\"done\">\r\n\t\t\t\t\t<div class=\"done-wrapper\">\r\n\t\t\t\t\t\t<div class=\"done-title\">\r\n\t\t\t\t\t\t\t<span>\u6587\u4EF6\u5BFC\u5165\u5B8C\u6210</span>\r\n\t\t\t\t\t\t\t<div class=\"done-text\">\r\n\t\t\t\t\t\t\t\t\u672C\u9875\u9762\u5173\u95ED\u540E\u53EF\u5728<a class=\"text-check\"\r\n\t\t\t\t\t\t\t\t\t[routerLink]=\"svr.taskInfoURL\">\u4EFB\u52A1\u67E5\u8BE2</a>\u9875\u9762\u4E2D\u67E5\u770B\u6587\u4EF6\u3002\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</div>\r\n\r\n\r\n\t\t\t\t\t\t<div class=\"btn\">\r\n\t\t\t\t\t\t\t<button mat-flat-button (click)=\"tabs.close()\">\u5173\u95ED</button>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\r\n\r\n\t\t\t</div>\r\n\t\t\t<!-- \u2191\u2191\u2191 \u5BFC\u5165\u5B8C\u6210 \u2191\u2191\u2191 -->\r\n\r\n\t\t</ng-container>\r\n\r\n\r\n\t</section>\r\n\r\n</div>\r\n\r\n",
providers: [ImportService],
styles: ["@charset \"UTF-8\";.main{width:100%;padding:8px 30px;box-sizing:border-box}@media (max-width:1460px){.main-left{padding-left:176px;padding-right:12px}}.display0{display:none}.nav-icon{position:absolute;top:8px;left:-28px;width:16px;height:16px;z-index:99}.nav-notice{position:absolute;top:0;left:-172px;width:168px;padding-left:4px;padding-right:4px;box-sizing:border-box}.notice-wrapper{width:160px;box-sizing:border-box;margin-left:4px;margin-right:4px;padding:8px;border-radius:4px;box-shadow:0 2px 5px rgba(0,0,0,.14)}.notice-text,.notice-title{font-size:14px}.notice-title{font-weight:700}.section-wrapper{position:relative;width:100%;max-width:960px;max-height:calc(100vh - 16px - 48px);margin:0 auto;box-sizing:border-box}.import-wrapper,.setting-wrapper{width:100%;max-width:960px;height:100%;margin-bottom:4px;padding:24px 24px 16px;box-sizing:border-box;border-radius:4px;box-shadow:0 2px 5px rgba(0,0,0,.14)}.import-wrapper header,.setting-wrapper header{font:20px bold;white-space:nowrap}.import-wrapper .icon-text,.import-wrapper .select-text,.setting-wrapper .icon-text,.setting-wrapper .select-text{margin-top:8px;font-size:14px;white-space:nowrap}.import-wrapper .select-wrapper,.import-wrapper .table-wrapper,.setting-wrapper .select-wrapper,.setting-wrapper .table-wrapper{margin-top:24px}.import-wrapper .select-wrapper,.setting-wrapper .select-wrapper{text-align:center;box-sizing:border-box}.import-wrapper .select-wrapper .select-main,.setting-wrapper .select-wrapper .select-main{display:flex;flex-direction:column;justify-content:center;align-items:center;width:240px;height:240px;box-sizing:border-box;border-radius:4px;box-shadow:0 2px 5px rgba(0,0,0,.14);margin:0 auto;cursor:pointer}.import-wrapper .select-wrapper .select-main .icon,.setting-wrapper .select-wrapper .select-main .icon{width:120px;height:120px}.import-wrapper .select-wrapper .select-main .icon-text,.setting-wrapper .select-wrapper .select-main .icon-text{display:flex;justify-content:center;align-items:center}.table-wrapper{width:100%}.table-wrapper header .layout-title{font:18px bold}.table-wrapper header .layout-text{position:relative;display:flex;justify-content:space-between;align-items:center;font-size:12px}.table-wrapper header .layout-text .text-left{overflow:hidden}.table-wrapper header .layout-text .float-table-info{position:absolute;top:-100px;right:0;width:160px;height:88px;box-sizing:border-box;padding:8px;box-shadow:0 2px 5px rgba(0,0,0,.14)}.table-wrapper header .layout-text .float-table-info div{display:flex;justify-content:space-between;width:100%;height:24px;line-height:24px}.table-wrapper header .layout-text span{flex-grow:160px}.table-wrapper header .layout-text span .float-table-info{display:none}.table-wrapper header .layout-text span:hover .float-table-info{display:block}.table-wrapper .import-table{height:calc(100vh - 560px);max-height:calc(100vh - 430px);min-height:80px;margin-top:16px;overflow:hidden}.table-wrapper .import-table .table-box{width:100%;max-height:356px;overflow:auto}.table-wrapper .import-table table{width:100%;box-sizing:border-box}.table-wrapper .import-table td,.table-wrapper .import-table th{height:32px;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.next-step{display:flex;justify-content:flex-end;margin-top:24px}.upload{display:flex;justify-content:center;align-items:center;width:100%;height:calc(100vh - 30px - 32px)}.upload .upload-wrapper{width:624px;height:456px;margin-top:-60px;background:url(/front/assets/export/prepare.png) top center/300px 300px no-repeat;box-shadow:0 2px 5px 0 rgba(0,0,0,.14);box-sizing:border-box;text-align:center}.upload .upload-wrapper .upload-text,.upload .upload-wrapper .upload-title{width:100%;box-sizing:border-box}.upload .upload-wrapper .upload-title{padding:271px 128px 0;font-size:24px}.upload .upload-wrapper .upload-text{padding:116px 128px 16px;font-size:12px}.setting-wrapper .set-title{font:20px bold}.setting-wrapper .set-select{display:flex;justify-content:space-between;box-sizing:border-box;width:100%;height:60px;line-height:60px;font-size:14px}.setting-wrapper .set-select .select-1,.setting-wrapper .set-select .select-2,.setting-wrapper .set-select .select-3,.setting-wrapper .set-select .select-4{overflow:hidden}.setting-wrapper .set-select .select-1{padding-right:40px}.setting-wrapper .set-select .select-2{display:flex;flex-wrap:nowrap;align-items:center;white-space:nowrap}.setting-wrapper .set-select .select-2 ::ng-deep .mat-form-field{width:100%}.setting-wrapper .set-select .select-4{display:flex;align-items:center;padding-left:8px}.setting-wrapper .set-select .select-4 button{display:flex;justify-content:center;width:96px;height:40px}.setting-wrapper .set-select .select-4 button .icon-done{width:24px;height:24px}.setting-wrapper .set-data .preview-data .error-wrapper{width:100%;margin-top:32px;margin-bottom:8px;padding:8px 16px;box-sizing:border-box;border-radius:4px}.setting-wrapper .set-data .preview-data .error-wrapper .error-title{display:flex;align-items:center;margin-bottom:8px;font:14px bold}.setting-wrapper .set-data .preview-data .error-wrapper .error-title .report-problem{width:16px;height:16px;margin-right:8px}.setting-wrapper .set-data .preview-data .error-wrapper .error-text{font-size:12px}.setting-wrapper .set-data .preview-data .row100 header{margin-top:16px;margin-bottom:8px;font-size:12px;display:flex;align-content:space-between}.setting-wrapper .set-data .preview-data .row100 section.row100-data{width:100%;max-height:200px;overflow:auto}.setting-wrapper .set-data .preview-data .row100 section.row100-data table{width:100%;border-collapse:collapse;box-sizing:border-box;font-size:14px}.setting-wrapper .set-data .preview-data .row100 section.row100-data td,.setting-wrapper .set-data .preview-data .row100 section.row100-data th{height:40px;padding:0 8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;box-sizing:border-box}.setting-wrapper .set-data .preview-data .row100 section.row100-data th{text-align:left}.setting-wrapper .set-data .preview-data .set-index{width:100%;padding-top:32px}.setting-wrapper .set-data .preview-data .set-index .title{font:16px bold}.setting-wrapper .set-data .preview-data .set-index .text{padding-top:16px;padding-bottom:16px;font-size:12px;overflow:hidden}.setting-wrapper .set-data .preview-data .set-index .index-data{width:100%;height:calc(100vh - 550px);max-height:310px;min-height:80px;overflow:auto}.setting-wrapper .set-data .preview-data .set-index .index-data table{width:100%;box-sizing:border-box}.setting-wrapper .set-data .preview-data .set-index .index-data td,.setting-wrapper .set-data .preview-data .set-index .index-data th{height:40px;padding-right:8px;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.setting-wrapper .set-data .preview-data .set-index .index-data .mat-column-mapName{width:200px}.setting-wrapper .set-data .data-empty{width:100%;height:336px;margin-bottom:24px;box-sizing:border-box;text-align:center}.setting-wrapper .set-data .data-empty .empty-wrapper{width:336px;margin:0 auto;padding-top:282px;padding-bottom:8px;background:url(/front/assets/import/nocontent.png) top center/300px 300px no-repeat;text-align:center}.setting-wrapper .set-data .data-empty .empty-wrapper .empty-title{font:24px bold}.setting-wrapper .set-data .data-empty .empty-text{font-size:14px}.setting-wrapper footer.set-button{text-align:right;margin-top:24px}.setting-wrapper footer.set-button .import-btn{margin-left:16px}.done{display:flex;justify-content:center;align-items:center;width:100%;height:calc(100vh - 30px - 32px)}.done .done-wrapper{width:624px;height:456px;margin-top:-60px;background:url(/front/assets/import/done.png) top center/300px 300px no-repeat;box-shadow:0 2px 5px 0 rgba(0,0,0,.14);box-sizing:border-box}.done .done-wrapper .done-text,.done .done-wrapper .done-title{width:100%;box-sizing:border-box}.done .done-wrapper .done-title{padding:290px 128px 0}.done .done-wrapper .done-title span{font-size:24px}.done .done-wrapper .done-text{padding-top:16px;font-size:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.done .done-wrapper .done-text .text-check{font-weight:700}.done .done-wrapper .btn{width:100%;text-align:right;padding:44px 24px 16px 0;box-sizing:border-box}.clear-tip{position:absolute;display:none;bottom:0;width:100%;box-sizing:border-box}.tip-wrapper{display:flex;justify-content:space-between;align-items:center;width:340px;height:50px;font:14px bold;margin:0 auto;padding:0 16px;border-radius:4px;border:1px solid #333}.clear-tip-show{display:block}"]
}] }
];
/** @nocollapse */
ImportComponent.ctorParameters = () => [
{ type: ImportService },
{ type: MatDialog$1 },
{ type: TabsService }
];
ImportComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.import',] }],
exp: [{ type: ViewChild, args: ['exp', { static: true },] }]
};
if (false) {
/** @type {?} */
ImportComponent.prototype.hostClass;
/** @type {?} */
ImportComponent.prototype.exp;
/** @type {?} */
ImportComponent.prototype.isDisplay0;
/** @type {?} */
ImportComponent.prototype.isDisplayflex;
/** @type {?} */
ImportComponent.prototype.isInfo;
/** @type {?} */
ImportComponent.prototype.isHidden;
/** @type {?} */
ImportComponent.prototype.isShowSpan;
/** @type {?} */
ImportComponent.prototype.svr;
/** @type {?} */
ImportComponent.prototype.dialog;
/** @type {?} */
ImportComponent.prototype.tabs;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
const ɵ0$4 = SaveStateData;
class ImportModule {
}
ImportModule.decorators = [
{ type: NgModule, args: [{
declarations: [ImportComponent],
imports: [
MatIconModule,
MatButtonModule$1,
CommonModule,
MatDialogModule$1,
MatCheckboxModule$1,
MatRadioModule$1,
MatInputModule,
FormsModule,
MatProgressBarModule,
MatTableModule$1,
MatSnackBarModule,
MatSelectModule$1,
RouterModule.forChild([
{
path: '**',
component: ImportComponent,
data: ɵ0$4
}
])
]
},] }
];
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class LoginComponent {
/**
* @param {?} auth
* @param {?} project
* @param {?} snackBar
* @param {?} authLogin
*/
constructor(auth, project, snackBar, authLogin) {
this.auth = auth;
this.project = project;
this.snackBar = snackBar;
this.authLogin = authLogin;
this.hide = true;
this.eyehide = true;
this.hostClass = true;
this.logging = false;
}
/**
* @return {?}
*/
userNameEnter() {
this.pwd.nativeElement.focus();
}
/**
* @return {?}
*/
passwordEnter() {
this.btnOk.nativeElement.click();
}
/**
* @return {?}
*/
btnOkClick() {
if (this.snack) {
this.snack.dismiss();
}
if (!this.password || !this.userName) {
this.snack = this.snackBar.open('用户名或密码不能为空', '确定', {
verticalPosition: 'top',
duration: 5000
});
return;
}
this.logging = true;
this.auth.login({ UserName: this.userName, Md5Password: (/** @type {?} */ (Md5.hashStr(this.password))) }).subscribe((/**
* @param {?} n
* @return {?}
*/
n => {
this.authLogin.loginDefault(n);
this.logging = false;
}), (/**
* @param {?} err
* @return {?}
*/
err => {
console.log(err);
this.logging = false;
this.snack = this.snackBar.open('用户名或密码错误', '确定', { verticalPosition: 'top' });
}));
}
/**
* @return {?}
*/
ngOnInit() { }
/**
* @return {?}
*/
refresh() {
window.location.reload();
}
}
LoginComponent.decorators = [
{ type: Component, args: [{
selector: 'common-app-login',
template: "<ng-container [ngSwitch]=\"project.applicationStatus\">\r\n\t<!-- \u9690\u85CF\u5185\u5BB9 -->\r\n\t<div *ngSwitchCase=\"'start-init'\" class=\"flash-div\">\r\n\t\t<div class=\"\u8FDE\u63A5\u670D\u52A1\">\r\n\t\t\t<img src=\"/front/assets/login/\u8FDE\u63A5\u4E2D.png\" alt=\"\u8FDE\u63A5\u4E2D...\" />\r\n\t\t</div>\r\n\t</div>\r\n\t<div *ngSwitchCase=\"'init-error'\" class=\"flash-div\">\r\n\t\t<div class=\"\u8FDE\u63A5\u670D\u52A1\">\r\n\t\t\t<img src=\"/front/assets/login/\u670D\u52A1\u5668\u6545\u969C.png\" alt=\"\u670D\u52A1\u5668\u6545\u969C\" />\r\n\t\t\t<button class=\"\u5237\u65B0\u6309\u94AE\" mat-stroked-button (click)=\"refresh()\">\r\n\t\t\t\t\u5237\u65B0\u8BD5\u8BD5\r\n\t\t\t</button>\r\n\t\t</div>\r\n\t</div>\r\n\r\n\t<!-- *** \u4E3B\u4F53 *** -->\r\n\t<div class=\"login-main\" *ngSwitchCase=\"'init-done'\">\r\n\r\n\t\t<!-- ** \u767B\u5F55\u7A97\u53E3 ** -->\r\n\t\t<div class=\"login-container\">\r\n\t\t\t<!-- * \u6CE8\u518C\u6587\u5B57\u7A97\u53E3\u6846\u67B6 * -->\r\n\t\t\t<div class=\"login-wrapper\">\r\n\r\n\t\t\t\t<!-- \u767B\u5F55\u6587\u672C -->\r\n\t\t\t\t<div class=\"log-tit\">\u767B\u5F55</div>\r\n\r\n\t\t\t\t<!-- \u7528\u6237\u540D -->\r\n\t\t\t\t<div class=\"input-wrapper\">\r\n\t\t\t\t\t<mat-form-field class=\"user-input\">\r\n\t\t\t\t\t\t<input matInput #username autofocus placeholder=\"\u7528\u6237\u540D\" maxlength=\"30\"\r\n\t\t\t\t\t\t\t[(ngModel)]=\"userName\" (keyup.enter)=\"userNameEnter()\" [disabled]=\"logging\">\r\n\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t</div>\r\n\r\n\t\t\t\t<!-- \u5BC6\u7801 -->\r\n\t\t\t\t<div class=\"input-wrapper\">\r\n\t\t\t\t\t<mat-form-field class=\"pwd-input\">\r\n\t\t\t\t\t\t<!-- left -->\r\n\t\t\t\t\t\t<input matInput #edtPassword placeholder=\"\u5BC6\u7801\" [(ngModel)]=\"password\"\r\n\t\t\t\t\t\t\t[type]=\"hide ? 'password' : 'text'\" maxlength=\"30\" [disabled]=\"logging\"\r\n\t\t\t\t\t\t\t(keyup.enter)=\"passwordEnter()\">\r\n\t\t\t\t\t\t<!-- right icon -->\r\n\t\t\t\t\t\t<mat-icon class=\"eye-icon\" matSuffix\r\n\t\t\t\t\t\t\t[svgIcon]=\"hide ? 'visibility' : 'visibility_off'\"\r\n\t\t\t\t\t\t\t(click)=\"hide = !hide\">\r\n\t\t\t\t\t\t</mat-icon>\r\n\t\t\t\t\t</mat-form-field>\r\n\r\n\t\t\t\t</div>\r\n\r\n\t\t\t\t<!-- \u767B\u5F55\u6309\u94AE -->\r\n\t\t\t\t<div class=\"login-btn-wrapper\">\r\n\t\t\t\t\t<button class=\"login-button\" #btnOk mat-button (click)=\"btnOkClick()\" [disabled]=\"logging\">\r\n\t\t\t\t\t\t<ng-container *ngIf=\"logging;else notlogging\">\r\n\t\t\t\t\t\t\t<mat-spinner diameter=\"40\"></mat-spinner>\r\n\t\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t\t<ng-template #notlogging>\r\n\t\t\t\t\t\t\t\u767B\u5F55\r\n\t\t\t\t\t\t</ng-template>\r\n\t\t\t\t\t</button>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n\t<!-- ** \u5DE6\u4E0A\u89D2\u7CFB\u7EDF\u540D\u79F0 ** -->\r\n\t<div class=\"login-title\">{{project.projectLabel}}</div>\r\n\r\n</ng-container>\r\n",
styles: ["@charset \"UTF-8\";.login-main{display:-moz-flex;display:-ms-flex;display:flex;justify-content:center;align-items:center;width:100%;height:100%;background-image:url(/front/assets/login/bg.svg);background-size:cover}.login-main .login-container{display:flex;justify-content:flex-end;align-items:center;width:640px;height:448px;background-image:url(/front/assets/login/bg_login.png);background-size:cover;border-radius:8px;box-shadow:0 5px 13px 0 rgba(0,0,0,.14)}.login-main .login-container .login-wrapper{display:flex;flex-direction:column;justify-content:space-around;width:370px;height:390px;padding:0 45px;box-sizing:border-box}.login-main .login-container .login-wrapper .log-tit{font-size:36px;font-weight:700}.login-main .login-container .login-wrapper .pwd-input,.login-main .login-container .login-wrapper .user-input{width:100%;height:30px}.login-main .login-container .login-wrapper .pwd-input{margin-top:6px}.login-main .login-container .login-wrapper .pwd-input input{width:90%}.login-main .login-container .login-wrapper .pwd-input .eye-icon{position:absolute;right:0;top:-18px;font-size:16px}.login-main .login-container .login-wrapper .login-btn-wrapper{display:flex;justify-content:flex-end}.login-main .login-container .login-wrapper .login-btn-wrapper .mat-spinner circle,.login-main .login-container .login-wrapper .login-btn-wrapper ::ng-deep .mat-progress-spinner circle{stroke:#fff}.login-main .login-container .login-wrapper .login-btn-wrapper .login-button{display:flex;justify-content:center;font-size:24px;color:#fff;background-color:#2196f3;width:168px;height:56px;box-shadow:rgba(33,150,243,.5) 0 5px 13px 2px;margin-top:80px}.login-title{position:absolute;top:20px;left:20px;color:rgba(0,0,0,.6)}.flash-div{width:100%;height:100%;display:-moz-flex;display:-ms-flex;display:flex;justify-content:center;align-items:center;overflow-y:auto}.\u8FDE\u63A5\u670D\u52A1{max-width:560px;width:100%;text-align:center}.\u8FDE\u63A5\u670D\u52A1 img{width:100%;height:auto}.\u5237\u65B0\u6309\u94AE{border:1px solid #2196f3;color:#2196f3;width:120px;height:40px;font-size:16px;font-weight:700}"]
}] }
];
/** @nocollapse */
LoginComponent.ctorParameters = () => [
{ type: AuthService },
{ type: ProjectService },
{ type: MatSnackBar$1 },
{ type: AuthloginService }
];
LoginComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.login',] }],
username: [{ type: ViewChild, args: ['username', { static: false },] }],
pwd: [{ type: ViewChild, args: ['edtPassword', { static: false },] }],
btnOk: [{ type: ViewChild, args: ['btnOk', { read: ElementRef, static: false },] }]
};
if (false) {
/** @type {?} */
LoginComponent.prototype.userName;
/** @type {?} */
LoginComponent.prototype.password;
/** @type {?} */
LoginComponent.prototype.hide;
/** @type {?} */
LoginComponent.prototype.eyehide;
/** @type {?} */
LoginComponent.prototype.hostClass;
/** @type {?} */
LoginComponent.prototype.username;
/** @type {?} */
LoginComponent.prototype.pwd;
/** @type {?} */
LoginComponent.prototype.btnOk;
/** @type {?} */
LoginComponent.prototype.snack;
/** @type {?} */
LoginComponent.prototype.logging;
/** @type {?} */
LoginComponent.prototype.auth;
/** @type {?} */
LoginComponent.prototype.project;
/** @type {?} */
LoginComponent.prototype.snackBar;
/** @type {?} */
LoginComponent.prototype.authLogin;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
const ɵ0$5 = SaveStateData;
class LoginModule {
}
LoginModule.decorators = [
{ type: NgModule, args: [{
imports: [
CommonModule,
MatButtonModule$1,
MatFormFieldModule,
MatCardModule,
MatInputModule,
FormsModule,
MatProgressSpinnerModule,
MatSnackBarModule$1,
MatIconModule,
RouterModule.forChild([
{
path: '',
pathMatch: 'full',
redirectTo: 'default/project/login'
},
{
path: '**',
component: LoginComponent,
data: ɵ0$5
}
])
],
declarations: [LoginComponent],
exports: [LoginComponent]
},] }
];
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @record
*/
function TaslResultType() { }
if (false) {
/** @type {?} */
TaslResultType.prototype.ZipFileSize;
/** @type {?} */
TaslResultType.prototype.ZipFileURL;
/** @type {?} */
TaslResultType.prototype.MoreProgressURL;
/** @type {?} */
TaslResultType.prototype.MoreProgressURLSign;
/** @type {?} */
TaslResultType.prototype.PROGRESS;
/** @type {?} */
TaslResultType.prototype.Message;
}
/**
* @record
*/
function ResultArray() { }
if (false) {
/** @type {?} */
ResultArray.prototype.LOGTIME;
/** @type {?} */
ResultArray.prototype.ROWNO;
/** @type {?} */
ResultArray.prototype.TASKID;
}
class TaskState {
constructor() {
// 任务完成
this.complete = 'completed';
// 任务进行中
this.running = 'running';
// 任务出错
this.error = 'error';
}
}
if (false) {
/** @type {?} */
TaskState.prototype.complete;
/** @type {?} */
TaskState.prototype.running;
/** @type {?} */
TaskState.prototype.error;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class TaskService {
/**
* @param {?} taskhttp
*/
constructor(taskhttp) {
this.taskhttp = taskhttp;
}
/**
* @return {?}
*/
GetTaskMessage() {
return this.taskhttp.get('taskinfo');
}
}
TaskService.decorators = [
{ type: Injectable, args: [{
providedIn: 'root'
},] }
];
/** @nocollapse */
TaskService.ctorParameters = () => [
{ type: CurrentApiService }
];
/** @nocollapse */ TaskService.ngInjectableDef = ɵɵdefineInjectable({ factory: function TaskService_Factory() { return new TaskService(ɵɵinject(CurrentApiService)); }, token: TaskService, providedIn: "root" });
if (false) {
/**
* @type {?}
* @private
*/
TaskService.prototype.taskhttp;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class TaskComponent {
/**
* @param {?} theme
* @param {?} tservice
* @param {?} eles
* @param {?} router
* @param {?} taskState
*/
constructor(theme, tservice, eles, router, taskState) {
this.theme = theme;
this.tservice = tservice;
this.eles = eles;
this.router = router;
this.taskState = taskState;
this.hostClass = true;
this.detailMode = false;
this.IsMoreProgressUrl = false;
this.options = { maxLines: 20, printMargin: false };
this.subs = [];
this.subs.push(this.theme.theme.subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
this.themeModel = v.model;
})));
}
/**
* @return {?}
*/
ngOnInit() {
ace.config.set('basePath', '/front/assets/ace-builds/src-min-noconflict');
this.tservice.GetTaskMessage().subscribe((/**
* @param {?} n
* @return {?}
*/
n => {
this.resultInfo = n;
if (this.resultInfo.MoreProgressURL !== '') {
this.eles.setURLSign(this.resultInfo.MoreProgressURL, this.resultInfo.MoreProgressURLSign);
this.IsMoreProgressUrl = true;
}
if (this.resultInfo.ZipFileURL !== '') {
this.resultInfo.ZipFileURL = fullApiPath(this.resultInfo.ZipFileURL);
}
}));
}
/**
* @return {?}
*/
ngOnDestroy() {
this.subs.forEach((/**
* @param {?} v
* @return {?}
*/
v => v.unsubscribe()));
}
/**
* @param {?} event
* @return {?}
*/
moreProgressClick(event) {
this.router.navigateByUrl(this.resultInfo.MoreProgressURL);
}
}
TaskComponent.decorators = [
{ type: Component, args: [{
selector: 'common-task',
template: "<common-bill #bill>\r\n\t<div class=\"backgroundstyle\" [formGroup]=\"bill.formGroup\"\r\n\t\t*ngIf=\"bill.formGroup\">\r\n\t\t<div *ngIf=\"detailMode\" class=\"Task-public Task-open mat-elevation-z2\">\r\n\t\t\t<!-- <ng-template matStepLabel>\u4E0B\u8F7D</ng-template> -->\r\n\t\t\t<div class=\"title\">\u67E5\u770B\u4EFB\u52A1</div>\r\n\t\t\t<div class=\"task-content\">\r\n\t\t\t\t<div class=\"\u67E5\u770B\u4EFB\u52A1\">\r\n\t\t\t\t\t<div class=\"tabbletr\">\r\n\t\t\t\t\t\t<mat-icon svgIcon=\"link\"></mat-icon>\r\n\t\t\t\t\t\t<div class=\"\u4EFB\u52A1\u6807\u9898\">\u540D\u79F0</div>\r\n\t\t\t\t\t\t<div class=\"\u4EFB\u52A1\u53C2\u6570\">\r\n\t\t\t\t\t\t\t<span>{{ bill.formGroup.get('Name').value }}</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"tabbletr\">\r\n\t\t\t\t\t\t<mat-icon svgIcon=\"picture_in_picture_alt\"></mat-icon>\r\n\t\t\t\t\t\t<div class=\"\u4EFB\u52A1\u6807\u9898\">\u6D41\u6C34\u53F7</div>\r\n\t\t\t\t\t\t<div class=\"\u4EFB\u52A1\u53C2\u6570\">\r\n\t\t\t\t\t\t\t<span>{{ bill.formGroup.get('ID').value }}</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"tabbletr\">\r\n\t\t\t\t\t\t<mat-icon svgIcon=\"outlined:person\"></mat-icon>\r\n\t\t\t\t\t\t<div class=\"\u4EFB\u52A1\u6807\u9898\">\u6267\u884C\u4EBA</div>\r\n\t\t\t\t\t\t<div class=\"\u4EFB\u52A1\u53C2\u6570\">\r\n\t\t\t\t\t\t\t<span>{{ bill.formGroup.get('Executor').value }}</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"tabbletr\">\r\n\t\t\t\t\t\t<mat-icon svgIcon=\"domain\"></mat-icon>\r\n\t\t\t\t\t\t<div class=\"\u4EFB\u52A1\u6807\u9898\">\u6240\u5C5E\u90E8\u95E8</div>\r\n\t\t\t\t\t\t<div class=\"\u4EFB\u52A1\u53C2\u6570\">\r\n\t\t\t\t\t\t\t<span>{{ bill.formGroup.get('ExeDept').value }}</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"tabbletr\">\r\n\t\t\t\t\t\t<mat-icon svgIcon=\"outlined:router\"></mat-icon>\r\n\t\t\t\t\t\t<div class=\"\u4EFB\u52A1\u6807\u9898\">IP\u5730\u5740</div>\r\n\t\t\t\t\t\t<div class=\"\u4EFB\u52A1\u53C2\u6570\">\r\n\t\t\t\t\t\t\t<span>{{ bill.formGroup.get('ExeIP').value }}</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"tabbletr\">\r\n\t\t\t\t\t\t<mat-icon svgIcon=\"schedule\"></mat-icon>\r\n\t\t\t\t\t\t<div class=\"\u4EFB\u52A1\u6807\u9898\">\u5F00\u59CB\u65F6\u95F4</div>\r\n\t\t\t\t\t\t<div class=\"\u4EFB\u52A1\u53C2\u6570\">\r\n\t\t\t\t\t\t\t<span>{{ bill.formGroup.get('ExeTime').value | date: 'yyyy-MM-dd HH:mm:ss' }}</span>\r\n\t\t\t\t\t\t\t<span>{{ bill.formGroup.get('CompletedTime').value | date: 'yyyy-MM-dd HH:mm:ss' }}</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"tabbletr\">\r\n\t\t\t\t\t\t<mat-icon svgIcon=\"outlined:flag\"></mat-icon>\r\n\t\t\t\t\t\t<div class=\"\u4EFB\u52A1\u6807\u9898\">\u72B6\u6001</div>\r\n\t\t\t\t\t\t<div class=\"\u4EFB\u52A1\u53C2\u6570\">\r\n\t\t\t\t\t\t\t<span>{{ bill.formGroup.get('Status').value }}</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"\u5206\u5272\u7EBF\"></div>\r\n\t\t\t\t<div class=\"\u8BE6\u60C5\">\r\n\t\t\t\t\t<div class=\"\u8FDB\u5EA6\u62A5\u544A\">\r\n\t\t\t\t\t\t<div class=\"detailsTitle\">\r\n\t\t\t\t\t\t\t\u8FDB\u5EA6\u62A5\u544A\r\n\t\t\t\t\t\t\t<span *ngIf=\"IsMoreProgressUrl\"\r\n\t\t\t\t\t\t\t\t(click)=\"moreProgressClick($event)\">\u67E5\u770B\u6240\u6709\u8FDB\u5EA6\r\n\t\t\t\t\t\t\t\t<mat-icon svgIcon=\"chevron_right\"></mat-icon>\r\n\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class=\"prTable\">\r\n\t\t\t\t\t\t\t<tr *ngFor=\"let res of resultInfo?.PROGRESS; let index = index\"\r\n\t\t\t\t\t\t\t\tclass=\"prStrip\">\r\n\t\t\t\t\t\t\t\t<td class=\"prtableID\">{{ index + 1 }}</td>\r\n\t\t\t\t\t\t\t\t<td class=\"prtableTime\">\r\n\t\t\t\t\t\t\t\t\t{{ res.LOGTIME | date: 'yyyy-MM-dd HH:mm:ss' }}\r\n\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t<td class=\"prtableContent\">{{ res.CONTENT }}\r\n\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"\u53C2\u6570\">\r\n\t\t\t\t\t\t<div class=\"detailsTitle\">\u53C2\u6570</div>\r\n\t\t\t\t\t\t<div class=\"parameterbox\">\r\n\t\t\t\t\t\t\t<div ace-editor\r\n\t\t\t\t\t\t\t\t[text]=\"bill.formGroup.get('Params').value\"\r\n\t\t\t\t\t\t\t\tmode=\"yaml\" [theme]=\"themeModel === 'dark' ? 'tomorrow_night' : 'eclipse'\"\r\n\t\t\t\t\t\t\t\t[options]=\"options\" [autoUpdateContent]=\"true\"\r\n\t\t\t\t\t\t\t\t[durationBeforeCallback]=\"1000\"\r\n\t\t\t\t\t\t\t\tstyle=\"min-height: 124px; width:100%; overflow: auto;\">\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"\u7ED3\u679C\">\r\n\t\t\t\t\t\t<div class=\"detailsTitle\">\u7ED3\u679C</div>\r\n\t\t\t\t\t\t<div *ngIf=\"bill.formGroup.get('Status').value == taskState.complete\"\r\n\t\t\t\t\t\t\tclass=\"complete state-content\">\r\n\t\t\t\t\t\t\t<mat-icon svgIcon=\"check_circle\"></mat-icon>\r\n\t\t\t\t\t\t\t<div [innerHtml]=\"resultInfo?.Message|newline\"></div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div *ngIf=\"bill.formGroup.get('Status').value == taskState.running\"\r\n\t\t\t\t\t\t\tclass=\"running state-content\">\r\n\t\t\t\t\t\t\t<mat-icon svgIcon=\"info\"></mat-icon>\r\n\t\t\t\t\t\t\t<div [innerHtml]=\"resultInfo?.Message|newline\"></div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div *ngIf=\"bill.formGroup.get('Status').value == taskState.error\"\r\n\t\t\t\t\t\t\tclass=\"error state-content \u62A5\u9519\u8BE6\u7EC6\">\r\n\t\t\t\t\t\t\t<mat-icon svgIcon=\"warning\"></mat-icon>\r\n\t\t\t\t\t\t\t\u62A5\u9519\u8BE6\u60C5\uFF1A<div [innerHtml]=\"resultInfo?.Message|newline\"></div>\r\n\t\t\t\t\t\t\t<div class=\"\u5168\u90E8\u4FE1\u606F\"\r\n\t\t\t\t\t\t\t\t[innerHtml]=\"bill.formGroup.get('Result').value|newline\">\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"download\">\r\n\t\t\t\t<a *ngIf=\"resultInfo?.ZipFileURL\"\r\n\t\t\t\t\t[href]=\"resultInfo?.ZipFileURL\">\r\n\t\t\t\t\t<mat-icon svgIcon=\"save_alt\"></mat-icon>\r\n\t\t\t\t\t\u4E0B\u8F7D\u7ED3\u679C ({{ resultInfo?.ZipFileSize | number }}K)\r\n\t\t\t\t</a>\r\n\t\t\t\t<div class=\"\u5C55\u5F00\u6309\u94AE\" (click)=\"detailMode = false\">\r\n\t\t\t\t\t\u6536\u8D77\u8BE6\u7EC6\u4FE1\u606F<mat-icon svgIcon=\"expand_less\"></mat-icon>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<div *ngIf=\"!detailMode\"\r\n\t\t\tclass=\"Task-narrow Task-public mat-elevation-z2\">\r\n\t\t\t<div class=\"title\">\u67E5\u770B\u4EFB\u52A1</div>\r\n\t\t\t<div *ngIf=\"bill.formGroup.get('Status').value == taskState.complete\"\r\n\t\t\t\tclass=\"complete state-content\">\r\n\t\t\t\t<mat-icon svgIcon=\"check_circle\"></mat-icon>\r\n\t\t\t\t<div [innerHtml]=\"resultInfo?.Message|newline\"></div>\r\n\t\t\t</div>\r\n\t\t\t<div *ngIf=\"bill.formGroup.get('Status').value == taskState.running\"\r\n\t\t\t\tclass=\"running state-content\">\r\n\t\t\t\t<mat-icon svgIcon=\"info\"></mat-icon>\r\n\t\t\t\t<div [innerHtml]=\"resultInfo?.Message|newline\"></div>\r\n\t\t\t</div>\r\n\t\t\t<div *ngIf=\"bill.formGroup.get('Status').value == taskState.error\"\r\n\t\t\t\tclass=\"error state-content\">\r\n\t\t\t\t<mat-icon svgIcon=\"warning\"></mat-icon>\r\n\t\t\t\t\u62A5\u9519\u8BE6\u60C5\uFF1A<div [innerHtml]=\"resultInfo?.Message|newline\"></div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"download\">\r\n\t\t\t\t<a *ngIf=\"resultInfo?.ZipFileURL\"\r\n\t\t\t\t\thref=\"{{ resultInfo?.ZipFileURL }}\">\r\n\t\t\t\t\t<mat-icon svgIcon=\"save_alt\"></mat-icon>\r\n\t\t\t\t\t\u4E0B\u8F7D\u7ED3\u679C ({{ resultInfo?.ZipFileSize | number }}K)\r\n\t\t\t\t</a>\r\n\t\t\t\t<div class=\"\u5C55\u5F00\u6309\u94AE\" (click)=\"detailMode = true\">\r\n\t\t\t\t\t\u5C55\u5F00\u8BE6\u7EC6\u4FE1\u606F<mat-icon svgIcon=\"expand_more\"></mat-icon>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n</common-bill>",
providers: [TaskState],
styles: ["@charset \"UTF-8\";.backgroundstyle{width:100%;height:100%;padding:24px 0;box-sizing:border-box;overflow-y:auto}.backgroundstyle .Task-open{width:100%;height:100%;display:flex;flex-direction:column}.backgroundstyle .Task-open .task-content{flex-grow:1;width:100%;display:flex;align-items:center;overflow-y:auto}.backgroundstyle .Task-open .task-content .\u67E5\u770B\u4EFB\u52A1{width:284px;height:100%;flex-shrink:0}.backgroundstyle .Task-open .task-content .\u67E5\u770B\u4EFB\u52A1 .tabbletr{width:100%;padding-left:56px;box-sizing:border-box;margin:24px 0 0;position:relative}.backgroundstyle .Task-open .task-content .\u67E5\u770B\u4EFB\u52A1 .tabbletr .mat-icon{position:absolute;left:8px;top:8px;width:32px;height:32px;line-height:32px}.backgroundstyle .Task-open .task-content .\u67E5\u770B\u4EFB\u52A1 .tabbletr .\u4EFB\u52A1\u6807\u9898{font-size:14px;padding:8px 0}.backgroundstyle .Task-open .task-content .\u67E5\u770B\u4EFB\u52A1 .tabbletr .\u4EFB\u52A1\u53C2\u6570 span{font-size:16px;padding:0 0 8px;display:block}.backgroundstyle .Task-open .task-content .\u5206\u5272\u7EBF{width:1px;flex-shrink:0;height:calc(100% - 110px);margin:0 16px}.backgroundstyle .Task-open .task-content .\u8BE6\u60C5{width:0;flex-grow:1;height:100%}.backgroundstyle .Task-open .task-content .\u8BE6\u60C5 .\u8FDB\u5EA6\u62A5\u544A{width:100%;overflow:auto}.backgroundstyle .Task-open .task-content .\u8BE6\u60C5 .\u8FDB\u5EA6\u62A5\u544A .prTable{width:100%;overflow-x:auto;margin:16px 0 24px;max-height:176px;min-height:96px;padding:8px;box-sizing:border-box;border-radius:2px}.backgroundstyle .Task-open .task-content .\u8BE6\u60C5 .\u8FDB\u5EA6\u62A5\u544A .prTable .prStrip{height:32px;line-height:32px;font-size:16px;display:flex}.backgroundstyle .Task-open .task-content .\u8BE6\u60C5 .\u8FDB\u5EA6\u62A5\u544A .prTable .prStrip .prtableID{width:48px;padding-left:8px;box-sizing:border-box;flex-shrink:0}.backgroundstyle .Task-open .task-content .\u8BE6\u60C5 .\u8FDB\u5EA6\u62A5\u544A .prTable .prStrip .prtableTime{width:200px;flex-shrink:0}.backgroundstyle .Task-open .task-content .\u8BE6\u60C5 .\u8FDB\u5EA6\u62A5\u544A .prTable .prStrip .prtableContent{flex-grow:1;flex-shrink:0;padding-right:8px}.backgroundstyle .Task-open .task-content .\u8BE6\u60C5 .\u53C2\u6570{min-height:124px}.backgroundstyle .Task-open .task-content .\u8BE6\u60C5 .\u53C2\u6570 .parameterbox{max-height:300px;margin:16px 0 24px;min-height:124px;border-radius:4px;box-sizing:border-box;vertical-align:top;overflow:hidden}.backgroundstyle .Task-open .task-content .\u8BE6\u60C5 .\u7ED3\u679C{min-height:80px;max-height:28%}.backgroundstyle .Task-open .task-content .\u8BE6\u60C5 .detailsTitle{width:100%;font-size:14px}.backgroundstyle .Task-open .task-content .\u8BE6\u60C5 .detailsTitle span{float:right}.backgroundstyle .Task-open .task-content .\u8BE6\u60C5 .detailsTitle span .mat-icon{vertical-align:middle;width:22px;height:22px}.backgroundstyle .Task-narrow{height:auto}.backgroundstyle .Task-public{max-width:960px;width:100%;margin:0 auto;overflow-y:auto;padding:24px;box-sizing:border-box;border-radius:4px}.backgroundstyle .Task-public .title{font-size:20px;font-weight:700}.backgroundstyle .Task-public .state-content{margin:16px 0 24px;padding:16px 0 16px 24px;font-size:16px}.backgroundstyle .Task-public .state-content .mat-icon{margin-right:16px;vertical-align:middle}.backgroundstyle .Task-public .state-content div{display:inline-block}.backgroundstyle .Task-public .\u62A5\u9519\u8BE6\u7EC6{padding:16px 0 16px 24px;height:156px;overflow-y:auto}.backgroundstyle .Task-public .\u62A5\u9519\u8BE6\u7EC6 .\u5168\u90E8\u4FE1\u606F{font-size:12px;margin-top:8px}.backgroundstyle .Task-public .download{text-align:right;height:24px;line-height:24px}.backgroundstyle .Task-public .download a{height:24px;font-size:14px;text-decoration:none}.backgroundstyle .Task-public .download a .mat-icon{vertical-align:middle;margin-right:4px}.backgroundstyle .Task-public .download .\u5C55\u5F00\u6309\u94AE{cursor:pointer;display:inline-block;height:24px;font-size:14px;margin-left:32px}.backgroundstyle .Task-public .download .\u5C55\u5F00\u6309\u94AE .mat-icon{vertical-align:middle;margin-left:4px}"]
}] }
];
/** @nocollapse */
TaskComponent.ctorParameters = () => [
{ type: ThemeService },
{ type: TaskService },
{ type: ElementsService },
{ type: Router },
{ type: TaskState }
];
TaskComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.task',] }]
};
if (false) {
/** @type {?} */
TaskComponent.prototype.hostClass;
/** @type {?} */
TaskComponent.prototype.detailMode;
/** @type {?} */
TaskComponent.prototype.IsMoreProgressUrl;
/** @type {?} */
TaskComponent.prototype.moreEle;
/** @type {?} */
TaskComponent.prototype.resultInfo;
/** @type {?} */
TaskComponent.prototype.themeModel;
/** @type {?} */
TaskComponent.prototype.options;
/** @type {?} */
TaskComponent.prototype.subs;
/**
* @type {?}
* @private
*/
TaskComponent.prototype.theme;
/**
* @type {?}
* @private
*/
TaskComponent.prototype.tservice;
/**
* @type {?}
* @private
*/
TaskComponent.prototype.eles;
/**
* @type {?}
* @private
*/
TaskComponent.prototype.router;
/** @type {?} */
TaskComponent.prototype.taskState;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/*
* Converts newlines into html breaks
*/
class NewlinePipe {
/**
* @param {?} value
* @param {?=} args
* @return {?}
*/
transform(value, args) {
if (value) {
return value.replace(/(?:\r\n|\r|\n)/g, '<br />');
}
return value;
}
}
NewlinePipe.decorators = [
{ type: Pipe, args: [{ name: 'newline' },] }
];
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
const ɵ0$6 = SaveStateData;
class TaskModule {
}
TaskModule.decorators = [
{ type: NgModule, args: [{
declarations: [TaskComponent, NewlinePipe],
imports: [
CommonModule,
BillModule,
MatExpansionModule,
MatIconModule,
MatInputModule$1,
MatFormFieldModule$1,
AceEditorModule,
RouterModule,
RouterModule.forChild([
{
path: '**',
component: TaskComponent,
data: ɵ0$6
}
])
]
},] }
];
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class VersionComponent {
constructor() { }
/**
* @return {?}
*/
ngOnInit() {
}
}
VersionComponent.decorators = [
{ type: Component, args: [{
selector: 'common-version',
template: "<p>\n version works!\n</p>\n",
styles: [""]
}] }
];
/** @nocollapse */
VersionComponent.ctorParameters = () => [];
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
const ɵ0$7 = SaveStateData;
class VersionModule {
}
VersionModule.decorators = [
{ type: NgModule, args: [{
declarations: [VersionComponent],
imports: [
CommonModule,
RouterModule.forChild([
{
path: '**',
component: VersionComponent,
data: ɵ0$7
}
])
]
},] }
];
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @record
*/
function Point() { }
if (false) {
/** @type {?} */
Point.prototype.x;
/** @type {?} */
Point.prototype.y;
}
/**
* @param {?} x
* @param {?} y
* @param {?} m
* @param {?} n
* @param {?} r
* @return {?}
*/
function pointInCicle(x, y, m, n, r) {
return distance(x, y, m, n) <= r;
}
/**
* @param {?} x1
* @param {?} y1
* @param {?} x2
* @param {?} y2
* @return {?}
*/
function distance(x1, y1, x2, y2) {
/** @type {?} */
const a = x1 - x2;
/** @type {?} */
const b = y1 - y2;
return Math.sqrt(a * a + b * b);
}
/**
* 求二元一次方程的系数
* y1 = k * x1 + b => k = (y1 - b) / x1
* y2 = k * x2 + b => y2 = ((y1 - b) / x1) * x2 + b
* @param {?} x1
* @param {?} y1
* @param {?} x2
* @param {?} y2
* @return {?}
*/
function binaryEquationGetKB(x1, y1, x2, y2) {
/** @type {?} */
const k = (y1 - y2) / (x1 - x2);
/** @type {?} */
const b = (x1 * y2 - x2 * y1) / (x1 - x2);
return [k, b];
}
/**
* 一元二次方程求根
* ax² + bx + c = 0
* @param {?} a
* @param {?} b
* @param {?} c
* @return {?}
*/
function quadEquationGetX(a, b, c) {
/** @type {?} */
const xArr = [];
/** @type {?} */
const result = Math.pow(b, 2) - 4 * a * c;
if (result > 0) {
xArr.push((-b + Math.sqrt(result)) / (2 * a));
xArr.push((-b - Math.sqrt(result)) / (2 * a));
}
else if (result === 0) {
xArr.push(-b / (2 * a));
}
return xArr;
}
/**
* 求圆和直线之间的交点
* 直线方程:y = kx + b
* 圆的方程:(x - m)² + (x - n)² = r²
* x1, y1 = 线坐标1, x2, y2 = 线坐标2, m, n = 圆坐标, r = 半径
* @param {?} x1
* @param {?} y1
* @param {?} x2
* @param {?} y2
* @param {?} m
* @param {?} n
* @param {?} r
* @return {?}
*/
function getInsertPointBetweenCircleAndLine(x1, y1, x2, y2, m, n, r) {
// 垂直的没有斜率,要特殊判断
if (x1 === x2) {
/** @type {?} */
const arr = [];
arr.push({ x: x1, y: n + r });
arr.push({ x: x1, y: n - r });
return arr;
}
// console.log(x1, y1, x2, y2, m, n, r)
/** @type {?} */
const kbArr = binaryEquationGetKB(x1, y1, x2, y2);
/** @type {?} */
const k = kbArr[0];
/** @type {?} */
const b = kbArr[1];
/** @type {?} */
const aX = 1 + k * k;
/** @type {?} */
const bX = 2 * k * (b - n) - 2 * m;
/** @type {?} */
const cX = m * m + (b - n) * (b - n) - r * r;
/** @type {?} */
const insertPoints = [];
/** @type {?} */
const xArr = quadEquationGetX(aX, bX, cX);
xArr.forEach((/**
* @param {?} x
* @return {?}
*/
x => {
/** @type {?} */
const y = k * x + b;
insertPoints.push({ x: x, y: y });
}));
return insertPoints;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @record
*/
function MoveEvent() { }
if (false) {
/** @type {?} */
MoveEvent.prototype.startDragPoint;
}
class PortraitMaskComponent {
/**
* @param {?} elRef
*/
constructor(elRef) {
this.elRef = elRef;
this.hostClass = true;
this.cx = 100;
this.cy = 100;
this.r = 50;
this.handleX = 150;
this.handleY = 100;
this.handleR = 6;
this.cursor = 'grab';
this.startDrag = new EventEmitter();
this.dragging = new EventEmitter();
this.maskChange = new EventEmitter();
this.mouseDown = this.mouseDown.bind(this);
this.mouseUp = this.mouseUp.bind(this);
this.move = this.move.bind(this);
}
/**
* @param {?} x
* @param {?} y
* @return {?}
*/
toScreenPoint(x, y) {
/** @type {?} */
const pt = this.svg.nativeElement.createSVGPoint();
pt.x = x;
pt.y = y;
return pt.matrixTransform(this.svg.nativeElement.getScreenCTM());
}
// 将一个距离转换成屏幕尺寸
/**
* @param {?} val
* @return {?}
*/
toScreenDistance(val) {
/** @type {?} */
const p1 = this.toScreenPoint(0, 0);
/** @type {?} */
const p2 = this.toScreenPoint(val, 0);
return p2.x - p1.x;
}
/**
* @param {?} x
* @param {?} y
* @return {?}
*/
toSVGPoint(x, y) {
/** @type {?} */
const pt = this.svg.nativeElement.createSVGPoint();
pt.x = x;
pt.y = y;
return pt.matrixTransform(this.svg.nativeElement.getScreenCTM().inverse());
}
// 获取handle的受限的圆心坐标 svg
/**
* @param {?} mousePoint
* @return {?}
*/
getLimitHandleCenterPostion(mousePoint) {
// 根据mouse point拿到对应的圆心位置
/** @type {?} */
const point = { x: mousePoint.x - this.handleDistanceOffset.x, y: mousePoint.y - this.handleDistanceOffset.y };
// Create an SVGPoint for future math
/** @type {?} */
let r = distance(point.x, point.y, this.cx, this.cy);
if (r <= this.maxR) {
return point;
}
r = this.maxR;
/** @type {?} */
const arr = getInsertPointBetweenCircleAndLine(this.cx, this.cy, point.x, point.y, this.cx, this.cy, r);
/** @type {?} */
const d1 = distance(point.x, point.y, arr[0].x, arr[0].y);
/** @type {?} */
const d2 = distance(point.x, point.y, arr[1].x, arr[1].y);
if (d1 < d2) {
return arr[0];
}
else {
return arr[1];
}
}
// tslint:disable-next-line: quotemark
/**
* @param {?} event
* @return {?}
*/
mouseDown(event) {
if (event.button !== 0) {
return;
}
/** @type {?} */
const p = this.toSVGPoint(event.x, event.y);
this.handleDistanceOffset = { x: p.x - this.handleX, y: p.y - this.handleY };
this.maskDistanceOffset = { x: p.x - this.cx, y: p.y - this.cy };
this.startDragPoint = { x: event.x, y: event.y };
if (pointInCicle(p.x, p.y, this.handleX, this.handleY, this.handleR)) {
this.dragType = 'handle';
}
else if (pointInCicle(p.x, p.y, this.cx, this.cy, this.r)) {
this.dragType = 'mask';
}
else {
this.dragType = 'outside';
this.startDrag.emit(event);
}
window.addEventListener('mousemove', this.move, false);
window.addEventListener('mouseup', this.mouseUp, false);
event.stopPropagation();
}
/**
* @return {?}
*/
ngOnInit() {
this.calcSize();
}
/**
* @return {?}
*/
emitMaskRect() {
/** @type {?} */
const p1 = this.toScreenPoint(this.cx - this.r, this.cy - this.r);
/** @type {?} */
const p2 = this.toScreenPoint(this.cx + this.r, this.cy + this.r);
this.maskChange.emit({
left: p1.x,
top: p1.y,
right: p2.x,
bottom: p2.y,
width: p2.x - p1.x,
height: p2.y - p1.y
});
}
/**
* @return {?}
*/
ngAfterViewInit() {
this.emitMaskRect();
}
/**
* @param {?} event
* @return {?}
*/
move(event) {
switch (this.dragType) {
case 'handle': {
/** @type {?} */
const p = this.getLimitHandleCenterPostion(this.toSVGPoint(event.x, event.y));
this.handleX = p.x;
this.handleY = p.y;
this.r = distance(this.handleX, this.handleY, this.cx, this.cy);
this.emitMaskRect();
break;
}
case 'mask':
{
/** @type {?} */
const p = this.toSVGPoint(event.x, event.y);
p.x = Math.max(0, Math.min(this.svgWidth, p.x));
p.y = Math.max(0, Math.min(this.svgHeight, p.y));
this.cx = p.x - this.maskDistanceOffset.x;
this.cy = p.y - this.maskDistanceOffset.y;
this.handleX = p.x - this.handleDistanceOffset.x;
this.handleY = p.y - this.handleDistanceOffset.y;
this.emitMaskRect();
}
break;
case 'outside':
this.dragging.emit({ x: event.x, y: event.y });
break;
default:
break;
}
event.stopPropagation();
event.preventDefault();
}
/**
* @param {?} event
* @return {?}
*/
mouseUp(event) {
window.removeEventListener('mousemove', this.move, false);
window.removeEventListener('mouseup', this.mouseUp, false);
}
// 重置到中心点,半径为最大
/**
* @return {?}
*/
reset() {
this.calcSize();
this.emitMaskRect();
}
/**
* @private
* @return {?}
*/
calcSize() {
/** @type {?} */
const rect = this.elRef.nativeElement.getBoundingClientRect();
/** @type {?} */
const p = this.toSVGPoint(rect.left + rect.width / 2, rect.top + rect.height / 2);
/** @type {?} */
const p1 = this.toSVGPoint(rect.left, rect.top);
/** @type {?} */
const p2 = this.toSVGPoint(rect.right, rect.bottom);
this.cx = p.x;
this.cy = p.y;
this.maxR = this.r = (p2.x - p1.x) / 2;
this.svgWidth = p2.x - p1.x;
this.svgHeight = p2.y - p1.y;
this.handleX = this.cx + this.r;
this.handleY = this.cy;
}
}
PortraitMaskComponent.decorators = [
{ type: Component, args: [{
selector: 'common-portrait-mask',
template: "<svg version=\"1.1\" width=\"100%\" height=\"100%\" xmlns=\"http://www.w3.org/2000/svg\"\r\n\txmlns:xlink=\"http://www.w3.org/1999/xlink\" #svg>\r\n\t<style>\r\n\t\t.handle {\r\n\t\t\tcursor: grab;\r\n\t\t}\r\n\t</style>\r\n\t<defs>\r\n\t\t<mask id=\"Mask\">\r\n\t\t\t<rect x=\"0\" y=\"0\" width=\"100%\" height=\"100%\" fill=\"white\" />\r\n\t\t\t<circle [attr.cx]=\"cx\" [attr.cy]=\"cy\" [attr.r]=\"r\" />\r\n\t\t</mask>\r\n\t</defs>\r\n\r\n\t<rect x=\"0\" y=\"0\" width=\"100%\" height=\"100%\" opacity=\"0.4\"\r\n\t\tmask=\"url(#Mask)\" />\r\n\t<circle [attr.cx]=\"cx\" [attr.cy]=\"cy\" [attr.r]=\"r\" stroke-width=\"2\" #maskCicle\r\n\t\tclass=\"border-cicle\"/>\r\n\t<circle [attr.cx]=\"handleX\" [attr.cy]=\"handleY\" [attr.r]=\"handleR\" class=\"handle\"/>\r\n</svg>",
styles: [":host{width:100%;height:100%;display:block;position:relative}.handle{cursor:hand}"]
}] }
];
/** @nocollapse */
PortraitMaskComponent.ctorParameters = () => [
{ type: ElementRef }
];
PortraitMaskComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.portrait-mask',] }],
startDrag: [{ type: Output }],
dragging: [{ type: Output }],
maskChange: [{ type: Output }],
svg: [{ type: ViewChild, args: ['svg', { static: true },] }],
handle: [{ type: ViewChild, args: ['handle', { static: true },] }],
maskCicle: [{ type: ViewChild, args: ['maskCicle', { static: true },] }],
mouseDown: [{ type: HostListener, args: ['mousedown', ['$event'],] }]
};
if (false) {
/** @type {?} */
PortraitMaskComponent.prototype.hostClass;
/** @type {?} */
PortraitMaskComponent.prototype.cx;
/** @type {?} */
PortraitMaskComponent.prototype.cy;
/** @type {?} */
PortraitMaskComponent.prototype.r;
/** @type {?} */
PortraitMaskComponent.prototype.maxR;
/** @type {?} */
PortraitMaskComponent.prototype.svgWidth;
/** @type {?} */
PortraitMaskComponent.prototype.svgHeight;
/** @type {?} */
PortraitMaskComponent.prototype.handleX;
/** @type {?} */
PortraitMaskComponent.prototype.handleY;
/** @type {?} */
PortraitMaskComponent.prototype.handleR;
/** @type {?} */
PortraitMaskComponent.prototype.cursor;
/** @type {?} */
PortraitMaskComponent.prototype.maskDistanceOffset;
/** @type {?} */
PortraitMaskComponent.prototype.handleDistanceOffset;
/** @type {?} */
PortraitMaskComponent.prototype.startDragPoint;
/** @type {?} */
PortraitMaskComponent.prototype.dragType;
/** @type {?} */
PortraitMaskComponent.prototype.startDrag;
/** @type {?} */
PortraitMaskComponent.prototype.dragging;
/** @type {?} */
PortraitMaskComponent.prototype.maskChange;
/** @type {?} */
PortraitMaskComponent.prototype.svg;
/** @type {?} */
PortraitMaskComponent.prototype.handle;
/** @type {?} */
PortraitMaskComponent.prototype.maskCicle;
/**
* @type {?}
* @private
*/
PortraitMaskComponent.prototype.elRef;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @record
*/
function PortraitEditComponentData() { }
if (false) {
/** @type {?} */
PortraitEditComponentData.prototype.img;
/** @type {?} */
PortraitEditComponentData.prototype.default;
}
/**
* @record
*/
function PortraitEditComponentResultData() { }
if (false) {
/** @type {?} */
PortraitEditComponentResultData.prototype.ok;
/** @type {?} */
PortraitEditComponentResultData.prototype.data;
}
/** @type {?} */
const ImageMaxWidth = 224;
/** @type {?} */
const ImageMaxHeight = 224;
/** @type {?} */
const PortraitSize = 224;
// 112;
class PortraitEditComponent {
// 是否是缺省的图片,缺省图片不需要保存
/**
* @param {?} dialogRef
* @param {?} data
* @param {?} _sanitizer
* @param {?} curr
*/
constructor(dialogRef, data, _sanitizer, curr) {
this.dialogRef = dialogRef;
this.data = data;
this._sanitizer = _sanitizer;
this.curr = curr;
this.hostClass = true;
this.translateX = 0;
this.translateY = 0;
this.rotateScope = 0;
this.modified = false;
this.afterInit = false;
this.default = false; // 是否是缺省的图片,缺省图片不需要保存
}
/**
* @return {?}
*/
ngAfterViewInit() {
this.srcImage.nativeElement.onload = (/**
* @return {?}
*/
() => {
this.realImageWidth = this.srcImage.nativeElement.width;
this.realImageHeight = this.srcImage.nativeElement.height;
/** @type {?} */
let w = this.srcImage.nativeElement.width;
/** @type {?} */
let h = this.srcImage.nativeElement.height;
this.minZoomFactor = this.zoomFactor = 1;
if (w < h && h > ImageMaxHeight) {
this.minZoomFactor = this.zoomFactor = ImageMaxHeight / h;
w = w * this.zoomFactor;
h = ImageMaxHeight;
}
else if (w > h && w > ImageMaxHeight) {
this.minZoomFactor = this.zoomFactor = ImageMaxWidth / w;
h = h * this.zoomFactor;
w = ImageMaxWidth;
}
this.portraitImage.nativeElement.width = w;
this.portraitImage.nativeElement.height = h;
this.translateX = Math.round((ImageMaxWidth - w) / 2);
this.translateY = Math.round((ImageMaxHeight - h) / 2);
this.rebuildImage();
});
this.srcImage.nativeElement.src = this.data.img.src;
this.default = this.data.default;
this.afterInit = true;
}
/**
* @return {?}
*/
ngOnInit() { }
/**
* @return {?}
*/
rebuildImage() {
/** @type {?} */
const c = document.createElement('canvas');
if (this.rotateScope === 0 || this.rotateScope === 0.5) {
c.width = this.srcImage.nativeElement.width;
c.height = this.srcImage.nativeElement.height;
}
else {
c.width = this.srcImage.nativeElement.height;
c.height = this.srcImage.nativeElement.width;
}
/** @type {?} */
const ctx = c.getContext('2d');
ctx.clearRect(0, 0, c.width, c.height);
// move to the center of the canvas
ctx.translate(c.width / 2, c.height / 2);
// rotate the canvas to the specified degrees
ctx.rotate(this.rotateScope * 2 * Math.PI);
// draw the image
// since the context is rotated, the image will be rotated also
ctx.drawImage(this.srcImage.nativeElement, -this.srcImage.nativeElement.width / 2, -this.srcImage.nativeElement.height / 2);
this.portraitImage.nativeElement.src = c.toDataURL();
setTimeout((/**
* @return {?}
*/
() => {
this.drawPreview();
}), 150);
}
/**
* @return {?}
*/
pimgLoad() {
/** @type {?} */
const offset = this.correctionOffset((this.portraitImage.nativeElement.width - this.realImageWidth * this.zoomFactor) / 2, (this.portraitImage.nativeElement.height - this.realImageHeight * this.zoomFactor) / 2, this.portraitImage.nativeElement.getBoundingClientRect());
this.translateX += offset.x;
this.translateY += offset.y;
}
/**
* @param {?} event
* @return {?}
*/
startDragImage(event) {
this.dragStartPoint = { x: event.x, y: event.y };
this.dragStartTransformPosition = { x: this.translateX, y: this.translateY };
this.dragStartImageRound = this.portraitImage.nativeElement.getBoundingClientRect();
}
// 给定一个偏移,返回校正的结果
/**
* @param {?} dx
* @param {?} dy
* @param {?} imageRect
* @return {?}
*/
correctionOffset(dx, dy, imageRect) {
/** @type {?} */
const containerRect = this.dragContainer.nativeElement.getBoundingClientRect();
/** @type {?} */
let lx;
/** @type {?} */
let hx;
/** @type {?} */
let ly;
/** @type {?} */
let hy;
// 如果图片宽度小于容器,则是左边框左移不能过容器左边框
if (containerRect.width > imageRect.width) {
lx = containerRect.left - imageRect.left;
hx = containerRect.right - imageRect.right;
}
else {
// 否则是右边框左移不能离开容器右边框
lx = containerRect.right - imageRect.right;
hx = containerRect.left - imageRect.left;
}
if (containerRect.height > imageRect.height) {
ly = containerRect.top - imageRect.top;
hy = containerRect.bottom - imageRect.bottom;
}
else {
ly = containerRect.bottom - imageRect.bottom;
hy = containerRect.top - imageRect.top;
}
return { x: Math.max(lx, Math.min(hx, dx)), y: Math.max(ly, Math.min(hy, dy)) };
}
/**
* @param {?} event
* @return {?}
*/
draggingImage(event) {
/** @type {?} */
const offset = this.correctionOffset(event.x - this.dragStartPoint.x, event.y - this.dragStartPoint.y, this.dragStartImageRound);
this.translateX = this.dragStartTransformPosition.x + offset.x;
this.translateY = this.dragStartTransformPosition.y + offset.y;
this.drawPreview();
this.modified = true;
this.default = false;
}
/**
* @param {?} event
* @return {?}
*/
zoomIn(event) {
// 放大10%
this.zoomFactor = Math.min(1, this.zoomFactor * 1.1);
if (this.rotateScope === 0 || this.rotateScope === 0.5) {
this.portraitImage.nativeElement.width = this.realImageWidth * this.zoomFactor;
this.portraitImage.nativeElement.height = this.realImageHeight * this.zoomFactor;
}
else {
this.portraitImage.nativeElement.width = this.realImageHeight * this.zoomFactor;
this.portraitImage.nativeElement.height = this.realImageWidth * this.zoomFactor;
}
/** @type {?} */
const offset = this.correctionOffset(-(this.realImageWidth * this.zoomFactor - this.portraitImage.nativeElement.width) / 2, -(this.realImageHeight * this.zoomFactor - this.portraitImage.nativeElement.height) / 2, this.portraitImage.nativeElement.getBoundingClientRect());
this.translateX += offset.x;
this.translateY += offset.y;
this.modified = true;
this.default = false;
this.drawPreview();
}
/**
* @param {?} event
* @return {?}
*/
zoomOut(event) {
// 缩小10%
this.zoomFactor = Math.max(this.minZoomFactor, this.zoomFactor * 0.9);
if (this.rotateScope === 0 || this.rotateScope === 0.5) {
this.portraitImage.nativeElement.width = this.realImageWidth * this.zoomFactor;
this.portraitImage.nativeElement.height = this.realImageHeight * this.zoomFactor;
}
else {
this.portraitImage.nativeElement.width = this.realImageHeight * this.zoomFactor;
this.portraitImage.nativeElement.height = this.realImageWidth * this.zoomFactor;
}
/** @type {?} */
const offset = this.correctionOffset((this.portraitImage.nativeElement.width - this.realImageWidth * this.zoomFactor) / 2, (this.portraitImage.nativeElement.height - this.realImageHeight * this.zoomFactor) / 2, this.portraitImage.nativeElement.getBoundingClientRect());
this.translateX += offset.x;
this.translateY += offset.y;
this.modified = true;
this.default = false;
this.drawPreview();
}
/**
* @return {?}
*/
drawPreview() {
/** @type {?} */
const imageRect = this.portraitImage.nativeElement.getBoundingClientRect();
// 交集
/** @type {?} */
const r = {
left: Math.max(imageRect.left, this.maskRect.left),
top: Math.max(imageRect.top, this.maskRect.top),
right: Math.min(imageRect.right, this.maskRect.right),
bottom: Math.min(imageRect.bottom, this.maskRect.bottom)
};
// 相对图片左上角的偏移
r.left = r.left - imageRect.left;
r.top = r.top - imageRect.top;
r.right = r.right - imageRect.left;
r.bottom = r.bottom - imageRect.top;
/** @type {?} */
const drawX = this.maskRect.left < imageRect.left ? (imageRect.left - this.maskRect.left) / this.zoomFactor : 0;
/** @type {?} */
const drawY = this.maskRect.top < imageRect.top ? (imageRect.top - this.maskRect.top) / this.zoomFactor : 0;
/** @type {?} */
const realWidth = ((r.right - r.left) / this.maskRect.width) * PortraitSize;
/** @type {?} */
const realHeight = ((r.bottom - r.top) / this.maskRect.height) * PortraitSize;
// 再缩放到实际图片中
r.left /= this.zoomFactor;
r.top /= this.zoomFactor;
r.right /= this.zoomFactor;
r.bottom /= this.zoomFactor;
/** @type {?} */
const ctx = this.preview.nativeElement.getContext('2d');
if (realWidth < PortraitSize || realHeight < PortraitSize) {
ctx.fillStyle = 'white';
ctx.fillRect(0, 0, this.preview.nativeElement.width, this.preview.nativeElement.height);
}
ctx.save();
/** @type {?} */
const sc = PortraitSize / (this.maskRect.width / this.zoomFactor);
ctx.scale(sc, sc);
ctx.drawImage(this.portraitImage.nativeElement, r.left, r.top, r.right - r.left, r.bottom - r.top, drawX, drawY, r.right - r.left, r.bottom - r.top);
ctx.restore();
}
/**
* @param {?} rect
* @return {?}
*/
maskChange(rect) {
this.maskRect = rect;
// 因为最开始就会触发一次,需要初始化过后才翻转状态
if (this.afterInit) {
this.default = false;
this.modified = true;
}
this.drawPreview();
}
/**
* @param {?} event
* @return {?}
*/
rotate(event) {
if (this.rotateScope === 0) {
this.rotateScope = 0.75;
}
else {
this.rotateScope -= 0.25;
}
/** @type {?} */
const tmp = this.portraitImage.nativeElement.width;
this.portraitImage.nativeElement.width = this.portraitImage.nativeElement.height;
this.portraitImage.nativeElement.height = tmp;
this.modified = true;
this.default = false;
this.rebuildImage();
}
/**
* @return {?}
*/
get imageStyle() {
return this._sanitizer.bypassSecurityTrustStyle('translate(' + this.translateX + 'px, ' + this.translateY + 'px)');
}
/**
* @param {?} event
* @return {?}
*/
fileChange(event) {
/** @type {?} */
const reader = new FileReader();
/** @type {?} */
const self = this;
reader.onload = (/**
* @param {?} oFREvent
* @return {?}
*/
function (oFREvent) {
self.srcImage.nativeElement.src = (/** @type {?} */ (oFREvent.target.result));
});
this.modified = true;
this.default = false;
reader.readAsDataURL(event[0]);
}
/**
* @return {?}
*/
ok() {
this.dialogRef.close((/** @type {?} */ ({
ok: true,
data: this.default ? null : this.preview.nativeElement.toDataURL('image/jpeg')
})));
}
/**
* @return {?}
*/
restoreDefault() {
this.modified = true;
this.mask.reset();
this.srcImage.nativeElement.src = portraitDefault;
this.default = true;
}
}
PortraitEditComponent.decorators = [
{ type: Component, args: [{
selector: 'common-portrait-edit',
template: "<div class=\"main\">\r\n\t<div class=\"left\">\r\n\t\t<div class=\"picture-select\" #dragContainer>\r\n\t\t\t<img #srcImage class=\"hide\" crossOrigin=\"Anonymous\" />\r\n\t\t\t<img #portraitImage class=\"image\" [style.transform]=\"imageStyle\" (load)=\"pimgLoad()\" />\r\n\t\t\t<common-portrait-mask #mask\r\n\t\t\t\tclass=\"mask\"\r\n\t\t\t\t(startDrag)=\"startDragImage($event)\"\r\n\t\t\t\t(maskChange)=\"maskChange($event)\"\r\n\t\t\t\t(dragging)=\"draggingImage($event)\"\r\n\t\t\t></common-portrait-mask>\r\n\t\t</div>\r\n\t\t<div class=\"small-button\">\r\n\t\t\t<button mat-icon-button (click)=\"rotate($event)\">\r\n\t\t\t\t<mat-icon svgIcon=\"rotate_90_degrees_ccw\"></mat-icon>\r\n\t\t\t</button>\r\n\t\t\t<span>\r\n\t\t\t\t<button mat-icon-button (click)=\"zoomIn($event)\" [disabled]=\"zoomFactor >= 1\">\r\n\t\t\t\t\t<mat-icon svgIcon=\"add_circle\"></mat-icon>\r\n\t\t\t\t</button>\r\n\t\t\t\t<button mat-icon-button (click)=\"zoomOut($event)\" [disabled]=\"zoomFactor <= minZoomFactor\">\r\n\t\t\t\t\t<mat-icon svgIcon=\"remove_circle\"></mat-icon>\r\n\t\t\t\t</button>\r\n\t\t\t</span>\r\n\t\t</div>\r\n\t</div>\r\n\t<div class=\"right\">\r\n\t\t<div>\r\n\t\t\t<div class=\"\u9884\u89C8\u6807\u9898\">\u9884\u89C8</div>\r\n\t\t\t<div class=\"\u9884\u89C8\u56FE\u7247\">\r\n\t\t\t\t<canvas class=\"preview\" width=\"224\" height=\"224\" #preview></canvas>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"\u6062\u590D\u9ED8\u8BA4\u56FE\u50CF\" (click)=\"restoreDefault()\">\u6062\u590D\u9ED8\u8BA4\u56FE\u50CF</div>\r\n\t\t</div>\r\n\t\t<div class=\"button-bottom\">\r\n\t\t\t<div class=\"upload-file\">\r\n\t\t\t\t<input type=\"file\" id=\"file\" name=\"file\" (change)=\"fileChange($event.target.files)\" />\r\n\t\t\t\t<span>\u9009\u62E9\u56FE\u7247</span>\r\n\t\t\t</div>\r\n\t\t\t<button\r\n\t\t\t\tclass=\"\u786E\u8BA4\u56FE\u7247\"\r\n\t\t\t\tmat-raised-button\r\n\t\t\t\tcolor=\"primary\"\r\n\t\t\t\t(click)=\"ok()\"\r\n\t\t\t\t[disabled]=\"!modified\"\t\t\t\t\r\n\t\t\t>\r\n\t\t\t\t\u786E\u5B9A\r\n\t\t\t</button>\r\n\t\t</div>\r\n\t</div>\r\n\t<mat-icon (click)=\"dialogRef.close()\" class=\"\u5173\u95ED\" svgIcon=\"close\"></mat-icon>\r\n</div>\r\n",
styles: ["@charset \"UTF-8\";.main{display:flex;height:100%;position:relative}.main .left{display:flex;flex-direction:column}.main .left .picture-select{width:224px;height:224px;background:url(/front/assets/userinfo/bg_picselect.png) 0 0/100% 100% no-repeat;overflow:hidden;position:relative}.main .left .picture-select .mask{width:100%;height:100%;position:absolute;left:0;top:0}.main .left .small-button{margin-top:8px;display:flex;justify-content:space-between}.main .right{flex-grow:1;height:247px;display:flex;flex-direction:column;justify-content:space-between}.main .right .\u9884\u89C8\u6807\u9898{margin-left:56px;font-size:12px}.main .right .\u9884\u89C8\u56FE\u7247{text-align:center;margin:8px 0 16px}.main .right .preview{width:112px;height:112px;border-radius:56px}.main .right .\u6062\u590D\u9ED8\u8BA4\u56FE\u50CF{font-size:12px;margin-top:16px;text-align:center;cursor:pointer}.main .right .button-bottom{margin-left:24px;height:32px}.main .right .button-bottom .upload-file{display:inline-block;width:80px;height:32px;position:relative;margin-right:8px;font-size:16px;text-align:center;line-height:32px;border-radius:4px;overflow:hidden;vertical-align:bottom}.main .right .button-bottom .upload-file #file{opacity:0;height:100%;position:absolute;left:0;top:0}.main .right .button-bottom .\u786E\u8BA4\u56FE\u7247{width:80px;height:32px;font-size:16px;line-height:32px}.hide{display:none}.\u5173\u95ED{position:absolute;right:-16px;top:-16px;cursor:pointer}"]
}] }
];
/** @nocollapse */
PortraitEditComponent.ctorParameters = () => [
{ type: MatDialogRef },
{ type: undefined, decorators: [{ type: Inject, args: [MAT_DIALOG_DATA,] }] },
{ type: DomSanitizer },
{ type: CurrentService }
];
PortraitEditComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.portrait-edit',] }],
portraitImage: [{ type: ViewChild, args: ['portraitImage', { static: true },] }],
srcImage: [{ type: ViewChild, args: ['srcImage', { static: true },] }],
dragContainer: [{ type: ViewChild, args: ['dragContainer', { static: true },] }],
preview: [{ type: ViewChild, args: ['preview', { static: true },] }],
mask: [{ type: ViewChild, args: ['mask', { static: true },] }]
};
if (false) {
/** @type {?} */
PortraitEditComponent.prototype.hostClass;
/** @type {?} */
PortraitEditComponent.prototype.portraitImage;
/** @type {?} */
PortraitEditComponent.prototype.srcImage;
/** @type {?} */
PortraitEditComponent.prototype.dragContainer;
/** @type {?} */
PortraitEditComponent.prototype.preview;
/** @type {?} */
PortraitEditComponent.prototype.mask;
/** @type {?} */
PortraitEditComponent.prototype.dragStartPoint;
/** @type {?} */
PortraitEditComponent.prototype.dragStartTransformPosition;
/** @type {?} */
PortraitEditComponent.prototype.dragStartImageRound;
/** @type {?} */
PortraitEditComponent.prototype.realImageWidth;
/** @type {?} */
PortraitEditComponent.prototype.realImageHeight;
/** @type {?} */
PortraitEditComponent.prototype.zoomFactor;
/** @type {?} */
PortraitEditComponent.prototype.minZoomFactor;
/** @type {?} */
PortraitEditComponent.prototype.maskRect;
/** @type {?} */
PortraitEditComponent.prototype.translateX;
/** @type {?} */
PortraitEditComponent.prototype.translateY;
/** @type {?} */
PortraitEditComponent.prototype.rotateScope;
/** @type {?} */
PortraitEditComponent.prototype.modified;
/** @type {?} */
PortraitEditComponent.prototype.afterInit;
/** @type {?} */
PortraitEditComponent.prototype.default;
/** @type {?} */
PortraitEditComponent.prototype.dialogRef;
/** @type {?} */
PortraitEditComponent.prototype.data;
/**
* @type {?}
* @private
*/
PortraitEditComponent.prototype._sanitizer;
/** @type {?} */
PortraitEditComponent.prototype.curr;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class UserinfoComponent {
/**
* @param {?} overlayContainer
* @param {?} curr
* @param {?} httpClient
* @param {?} api
* @param {?} theme
* @param {?} dialog
* @param {?} mainNav
*/
constructor(overlayContainer, curr, httpClient, api, theme, dialog, mainNav) {
this.overlayContainer = overlayContainer;
this.curr = curr;
this.httpClient = httpClient;
this.api = api;
this.theme = theme;
this.dialog = dialog;
this.mainNav = mainNav;
this.hostClass = true;
this.num = 0;
this.isEditNickName = false;
this.nickName = '';
this.subject = [];
this.subject.push(this.mainNav.navMin.subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
if (v) {
this.mainNavStyle = 'min';
}
else {
this.mainNavStyle = 'full';
}
})), this.curr.change$.subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
if (v && v.HeadPortrait) {
this.portraitURL = v.portraitURL;
}
else {
this.portraitURL = portraitDefault;
}
})));
}
/**
* @return {?}
*/
ngOnDestroy() {
this.subject.forEach((/**
* @param {?} v
* @return {?}
*/
v => v.unsubscribe()));
}
/**
* @return {?}
*/
ngOnInit() {
this.subject.push(this.theme.theme.subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
this.themeColor = v.color;
this.themeModel = v.model;
})), this.api.get('get-user-portrait-url').subscribe((/**
* @param {?} u
* @return {?}
*/
u => {
this.uploadURL = fullApiPath(u);
})));
}
/**
* @return {?}
*/
setTheme() {
this.theme.setTheme(this.themeColor + '-' + this.themeModel + '-theme');
}
/**
* @param {?} fileToUpload
* @return {?}
*/
postFile(fileToUpload) {
/** @type {?} */
const formData = new FormData();
formData.append('portrait', fileToUpload, fileToUpload.name);
return this.httpClient.post(this.uploadURL, formData, { withCredentials: true }).subscribe((/**
* @return {?}
*/
() => {
this.curr.setPortrait(true);
this.num++;
}), (/**
* @param {?} error
* @return {?}
*/
(error) => {
console.log(error);
}));
}
/**
* @return {?}
*/
editNickName() {
this.nickName = this.curr.data.NickName;
this.isEditNickName = true;
}
/**
* @return {?}
*/
editDone() {
this.api.post('change-user-nickname', this.nickName).subscribe((/**
* @return {?}
*/
() => {
this.curr.setNickName(this.nickName);
this.isEditNickName = false;
}));
}
/**
* @return {?}
*/
showPortraitEdit() {
/** @type {?} */
const dialogRef = this.dialog.open(PortraitEditComponent, {
width: '480px',
data: (/** @type {?} */ ({
img: this.portraitImage.nativeElement,
default: this.portraitURL === portraitDefault
}))
});
dialogRef.afterClosed().subscribe((/**
* @param {?} result
* @return {?}
*/
(result) => {
if (result && result.ok) {
if (result.data) {
this.postFile(dataURLtoFile(result.data, 'portrait.jpg'));
}
else {
this.api.post('clear-user-portrait').subscribe((/**
* @return {?}
*/
() => {
this.curr.setPortrait(false);
}));
}
}
}));
}
/**
* @param {?} event
* @return {?}
*/
navStyleChange(event) {
this.mainNav.setNavMin(event.value === 'min');
}
}
UserinfoComponent.decorators = [
{ type: Component, args: [{
selector: 'common-userinfo',
template: "<div class=\"main\">\r\n\t<div class=\"top\">\r\n\t\t<div class=\"head-portrait mat-elevation-z2\">\r\n\t\t\t<div class=\"picture\">\r\n\t\t\t\t<img class=\"\u5934\u50CF\u56FE\u7247\" #portraitImage [src]=\"portraitURL\" />\r\n\t\t\t\t<div class=\"\u5934\u50CF\u7F16\u8F91\" (click)=\"showPortraitEdit()\">\r\n\t\t\t\t\t<mat-icon svgIcon=\"photo_camera\"></mat-icon>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"\u4FEE\u6539\u6635\u79F0\" *ngIf=\"isEditNickName; else nickNameTxt\">\r\n\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t<input class=\" \u8F93\u5165\u6635\u79F0 \u4E00\u7EA7\u6807\u9898\u8272\u503C\" matInput [(ngModel)]=\"nickName\" />\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t\t<mat-icon class=\"close\" svgIcon=\"close\" (click)=\"isEditNickName = false\"></mat-icon>\r\n\t\t\t\t<mat-icon color=\"primary\" svgIcon=\"done\" (click)=\"editDone()\"> </mat-icon>\r\n\t\t\t\t<!-- <button mat-stroked-button class=\" \u53D6\u6D88\" color=\"primary\" mat-button>\r\n\t\t\t\t\t\u53D6\u6D88\r\n\t\t\t\t</button>\r\n\t\t\t\t<button mat-raised-button class=\"\" color=\"primary\">\u786E\u5B9A</button> -->\r\n\t\t\t</div>\r\n\r\n\t\t\t<ng-template #nickNameTxt>\r\n\t\t\t\t<div class=\"\u6635\u79F0\">\r\n\t\t\t\t\t<span class=\" \u4E00\u7EA7\u6807\u9898\u8272\u503C\">{{ curr.data.NickName }}</span>\r\n\t\t\t\t\t<mat-icon class=\"\u7F16\u8F91\" (click)=\"editNickName()\" svgIcon=\"edit\"></mat-icon>\r\n\t\t\t\t</div>\r\n\t\t\t</ng-template>\r\n\t\t</div>\r\n\t\t<div class=\"theme mat-elevation-z2\">\r\n\t\t\t<p class=\"title \u4E00\u7EA7\u6807\u9898\u8272\u503C\">\u4E3B\u9898\u989C\u8272</p>\r\n\t\t\t<div class=\"colors\">\r\n\t\t\t\t<div class=\"theme-button\">\r\n\t\t\t\t\t<div class=\"cicle deep-purple\" (click)=\"themeColor = 'deep-purple'; setTheme()\">\r\n\t\t\t\t\t\t<mat-icon svgIcon=\"done\" *ngIf=\"themeColor == 'deep-purple'\"></mat-icon>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"text\">\u6D6A\u6F2B\u7D2B</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"theme-button\">\r\n\t\t\t\t\t<div class=\"cicle blue\" (click)=\"themeColor = 'blue'; setTheme()\">\r\n\t\t\t\t\t\t<mat-icon svgIcon=\"done\" *ngIf=\"themeColor == 'blue'\"> </mat-icon>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"text\">\u9ED8\u8BA4</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"theme-button\">\r\n\t\t\t\t\t<div class=\"cicle pink\" (click)=\"themeColor = 'pink'; setTheme()\">\r\n\t\t\t\t\t\t<mat-icon svgIcon=\"done\" *ngIf=\"themeColor == 'pink'\"> </mat-icon>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"text\">\u6E29\u60C5\u7C89</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"theme-button\">\r\n\t\t\t\t\t<div class=\"cicle orange\" (click)=\"themeColor = 'orange'; setTheme()\">\r\n\t\t\t\t\t\t<mat-icon svgIcon=\"done\" *ngIf=\"themeColor == 'orange'\"> </mat-icon>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"text\">\u6D3B\u529B\u6A59</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"theme-button\">\r\n\t\t\t\t\t<div class=\"cicle green\" (click)=\"themeColor = 'green'; setTheme()\">\r\n\t\t\t\t\t\t<mat-icon svgIcon=\"done\" *ngIf=\"themeColor == 'green'\"> </mat-icon>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"text\">\u6E05\u65B0\u7EFF</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"title \u4E00\u7EA7\u6807\u9898\u8272\u503C\">\u6A21\u5F0F</div>\r\n\t\t\t<div class=\"select-model\">\r\n\t\t\t\t<div\r\n\t\t\t\t\tclass=\"color-model\"\r\n\t\t\t\t\t[ngClass]=\"{ selected: themeModel === 'light' }\"\r\n\t\t\t\t\t(click)=\"themeModel = 'light'; setTheme()\"\r\n\t\t\t\t>\r\n\t\t\t\t\t<mat-icon svgIcon=\"brightness_7\"></mat-icon>\r\n\t\t\t\t\t<span>\u6D45\u8272\u6A21\u5F0F</span>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div\r\n\t\t\t\t\tclass=\"color-model\"\r\n\t\t\t\t\t[ngClass]=\"{ selected: themeModel === 'dark' }\"\r\n\t\t\t\t\t(click)=\"themeModel = 'dark'; setTheme()\"\r\n\t\t\t\t>\r\n\t\t\t\t\t<mat-icon svgIcon=\"brightness_2\"></mat-icon>\r\n\t\t\t\t\t<span>\u6DF1\u8272\u6A21\u5F0F</span>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n\t<div class=\"setting mat-elevation-z2\">\r\n\t\t<div class=\"\u504F\u597D\u8BBE\u7F6E \u4E00\u7EA7\u6807\u9898\u8272\u503C\">\u504F\u597D\u8BBE\u7F6E</div>\r\n\t\t<div class=\"one-setting\">\r\n\t\t\t<div class=\"default\">\u9ED8\u8BA4\u5BFC\u822A\u6837\u5F0F</div>\r\n\t\t\t<div class=\"default-radio\">\r\n\t\t\t\t<mat-radio-group aria-label=\"Select an option\" [value]=\"mainNavStyle\" (change)=\"navStyleChange($event)\">\r\n\t\t\t\t\t<mat-radio-button [class.selected]=\"mainNavStyle == 'full'\" value=\"full\">\u5B8C\u6574\u6A21\u5F0F</mat-radio-button>\r\n\t\t\t\t\t<mat-radio-button [class.selected]=\"mainNavStyle == 'min'\" value=\"min\">\u7B80\u6D01\u6A21\u5F0F</mat-radio-button>\r\n\t\t\t\t</mat-radio-group>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n</div>\r\n",
styles: ["@charset \"UTF-8\";.main{display:flex;flex-direction:column;height:100%;max-width:960px;margin:0 auto;width:100%}.main .top{margin-top:24px;display:flex}.main .top .head-portrait{display:flex;flex-direction:column;align-items:center;position:relative;width:256px;height:256px;border-radius:2px}.main .top .head-portrait .picture{width:112px;height:112px;margin:32px 0 16px;border-radius:128px;overflow:hidden;position:relative}.main .top .head-portrait .picture .\u5934\u50CF\u56FE\u7247{width:100%;height:100%}.main .top .head-portrait .picture .\u5934\u50CF\u7F16\u8F91{width:100%;height:100%;position:absolute;left:0;top:0;background-color:rgba(0,0,0,.4);display:none;cursor:pointer}.main .top .head-portrait .picture .\u5934\u50CF\u7F16\u8F91 .mat-icon{color:#fff;margin:44px}.main .top .head-portrait .picture:hover .\u5934\u50CF\u7F16\u8F91{display:block}.main .top .head-portrait .\u7F16\u8F91{cursor:pointer;display:inline-block;vertical-align:top;margin-left:4px;opacity:0}.main .top .head-portrait .\u6635\u79F0{width:232px;font-size:20px;height:24px;line-height:24px;font-weight:700;text-align:center;-webkit-transform:translateX(12px);transform:translateX(12px)}.main .top .head-portrait .\u6635\u79F0 span{display:inline-block;max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.main .top .head-portrait .\u6635\u79F0:hover .\u7F16\u8F91{opacity:1}.main .top .head-portrait .\u4FEE\u6539\u6635\u79F0{padding:0 8px;box-sizing:border-box;display:flex;align-items:center}.main .top .head-portrait .\u4FEE\u6539\u6635\u79F0 .mat-icon{cursor:pointer;line-height:24px}.main .top .head-portrait .\u4FEE\u6539\u6635\u79F0 .\u8F93\u5165\u6635\u79F0{font-weight:700;font-size:14px}.main .top .head-portrait .\u4FEE\u6539\u6635\u79F0 .close{margin:0 8px 0 12px}.main .top .head-portrait .mat-form-field{width:172px}.main .top .head-portrait .mat-form-field ::ng-deep .mat-form-field-infix{border:0;height:16px}.main .top .theme{flex-grow:1;margin-left:24px;display:flex;flex-direction:column;border-radius:4px}.main .top .theme .title{font-size:20px;font-weight:700;margin:16px 0 16px 24px}.main .top .theme .colors{display:flex;margin:4px 0}.main .top .theme .colors .theme-button{margin:0 5px 0 40px}.main .top .theme .colors .cicle{width:40px;height:40px;cursor:pointer;border-radius:20px;display:flex;justify-content:center;align-items:center;color:#fff}.main .top .theme .colors .text{text-align:center;margin:16px 0 0;font-size:14px}.main .top .theme .select-model{display:flex}.main .top .theme .select-model .color-model{cursor:pointer;display:flex;margin-left:32px}.main .top .theme .select-model .color-model span{font-size:14px;margin-left:8px}.main .setting{border-radius:4px;flex-grow:1;flex-flow:1;margin:24px 0 64px}.main .setting .\u504F\u597D\u8BBE\u7F6E{font-size:20px;font-weight:700;margin:16px}.main .setting .one-setting{display:flex}.main .setting .one-setting .default{margin-left:32px;font-size:16px}.main .setting .one-setting .default-radio{margin-left:256px;font-size:14px}.main .setting .one-setting .default-radio .mat-radio-button{margin-left:8px}"]
}] }
];
/** @nocollapse */
UserinfoComponent.ctorParameters = () => [
{ type: OverlayContainer },
{ type: CurrentService },
{ type: HttpClient },
{ type: CurrentApiService },
{ type: ThemeService },
{ type: MatDialog },
{ type: MainNavService }
];
UserinfoComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.user-info',] }],
portraitImage: [{ type: ViewChild, args: ['portraitImage', { static: false },] }]
};
if (false) {
/** @type {?} */
UserinfoComponent.prototype.hostClass;
/** @type {?} */
UserinfoComponent.prototype.portraitImage;
/** @type {?} */
UserinfoComponent.prototype.uploadURL;
/** @type {?} */
UserinfoComponent.prototype.num;
/** @type {?} */
UserinfoComponent.prototype.isEditNickName;
/** @type {?} */
UserinfoComponent.prototype.nickName;
/** @type {?} */
UserinfoComponent.prototype.themeColor;
/** @type {?} */
UserinfoComponent.prototype.themeModel;
/** @type {?} */
UserinfoComponent.prototype.mainNavStyle;
/** @type {?} */
UserinfoComponent.prototype.portraitURL;
/**
* @type {?}
* @private
*/
UserinfoComponent.prototype.subject;
/** @type {?} */
UserinfoComponent.prototype.overlayContainer;
/** @type {?} */
UserinfoComponent.prototype.curr;
/**
* @type {?}
* @private
*/
UserinfoComponent.prototype.httpClient;
/**
* @type {?}
* @private
*/
UserinfoComponent.prototype.api;
/**
* @type {?}
* @private
*/
UserinfoComponent.prototype.theme;
/** @type {?} */
UserinfoComponent.prototype.dialog;
/** @type {?} */
UserinfoComponent.prototype.mainNav;
}
/**
* @param {?} dataurl
* @param {?} filename
* @return {?}
*/
function dataURLtoFile(dataurl, filename) {
/** @type {?} */
const arr = dataurl.split(',');
/** @type {?} */
const mime = arr[0].match(/:(.*?);/)[1];
/** @type {?} */
const bstr = atob(arr[1]);
/** @type {?} */
let n = bstr.length;
/** @type {?} */
const u8arr = new Uint8Array(n);
while (n--) {
u8arr[n] = bstr.charCodeAt(n);
}
return new File([u8arr], filename, { type: mime });
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
const ɵ0$8 = SaveStateData;
class UserinfoModule {
}
UserinfoModule.decorators = [
{ type: NgModule, args: [{
declarations: [UserinfoComponent, PortraitEditComponent, PortraitMaskComponent],
imports: [
CommonModule,
FormsModule,
MatRadioModule$1,
MatButtonModule$1,
MatDialogModule,
MatInputModule$1,
MatFormFieldModule$1,
DragDropModule,
MatIconModule,
RouterModule.forChild([{ path: '**', data: ɵ0$8, component: UserinfoComponent }])
],
entryComponents: [PortraitEditComponent]
},] }
];
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @record
*/
function UpdateData() { }
if (false) {
/** @type {?} */
UpdateData.prototype.FromEle;
/** @type {?} */
UpdateData.prototype.CountNum;
/** @type {?} */
UpdateData.prototype.Fields;
}
/**
* @record
*/
function UpdateFieldSetting() { }
if (false) {
/** @type {?|undefined} */
UpdateFieldSetting.prototype.selected;
/** @type {?|undefined} */
UpdateFieldSetting.prototype.setValue;
/** @type {?} */
UpdateFieldSetting.prototype.Name;
/** @type {?} */
UpdateFieldSetting.prototype.Label;
/** @type {?} */
UpdateFieldSetting.prototype.Tooltip;
/** @type {?} */
UpdateFieldSetting.prototype.Freeentry;
/** @type {?} */
UpdateFieldSetting.prototype.Must;
/** @type {?} */
UpdateFieldSetting.prototype.List;
}
/**
* @record
*/
function SetData() { }
if (false) {
/** @type {?} */
SetData.prototype.Column;
/** @type {?} */
SetData.prototype.Value;
}
/**
* @record
*/
function DoUpdateParam() { }
if (false) {
/** @type {?} */
DoUpdateParam.prototype.Sets;
}
/**
* @record
*/
function DoUpdateResult() { }
if (false) {
/** @type {?} */
DoUpdateResult.prototype.TaskID;
/** @type {?} */
DoUpdateResult.prototype.Timeout;
/** @type {?} */
DoUpdateResult.prototype.TaskInfoURL;
/** @type {?} */
DoUpdateResult.prototype.TaskInfoSign;
}
class UpdateService {
/**
* @param {?} eles
* @param {?} api
*/
constructor(eles, api) {
this.eles = eles;
this.api = api;
this.step = '';
}
/**
* @return {?}
*/
init() {
this.step = 'prepare';
return this.api.get('get-update-data').subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
this.eleName = v.FromEle;
this.num = v.CountNum;
this.fields = v.Fields;
}));
}
/**
* @param {?} param
* @return {?}
*/
doUpdate(param) {
return this.api.post('do-update', param).pipe(tap((/**
* @param {?} v
* @return {?}
*/
v => {
// 注册查看任务明细的url
this.eles.setURLSign(v.TaskInfoURL, v.TaskInfoSign);
})));
}
}
UpdateService.decorators = [
{ type: Injectable, args: [{
providedIn: 'root'
},] }
];
/** @nocollapse */
UpdateService.ctorParameters = () => [
{ type: ElementsService },
{ type: CurrentApiService }
];
/** @nocollapse */ UpdateService.ngInjectableDef = ɵɵdefineInjectable({ factory: function UpdateService_Factory() { return new UpdateService(ɵɵinject(ElementsService), ɵɵinject(CurrentApiService)); }, token: UpdateService, providedIn: "root" });
if (false) {
/** @type {?} */
UpdateService.prototype.num;
/** @type {?} */
UpdateService.prototype.eleName;
/** @type {?} */
UpdateService.prototype.fields;
/** @type {?} */
UpdateService.prototype.taskInfoURL;
/** @type {?} */
UpdateService.prototype.step;
/**
* @type {?}
* @private
*/
UpdateService.prototype.eles;
/**
* @type {?}
* @private
*/
UpdateService.prototype.api;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class UpdateComponent {
/**
* @param {?} srv
* @param {?} tabs
* @param {?} prj
*/
constructor(srv, tabs, prj) {
this.srv = srv;
this.tabs = tabs;
this.prj = prj;
this.hostClass = true;
this.subs = [];
}
/**
* @return {?}
*/
ngOnInit() {
this.srv.init();
}
/**
* @return {?}
*/
doUpdate() {
/** @type {?} */
const sets = this.srv.fields
.filter((/**
* @param {?} v
* @return {?}
*/
v => v.selected))
.map((/**
* @param {?} v
* @return {?}
*/
v => ({ Column: v.Name, Value: v.setValue })));
this.srv.doUpdate({ Sets: sets }).subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
this.srv.step = 'complete';
this.srv.taskInfoURL = this.prj.frontURL('task', v.TaskInfoURL);
}));
}
/**
* @return {?}
*/
close() {
this.tabs.close();
}
/**
* @return {?}
*/
quantityToReplace() {
/** @type {?} */
let num = 0;
if (this.srv.fields) {
this.srv.fields.forEach((/**
* @param {?} item
* @return {?}
*/
item => {
if (item.selected || item.Must) {
num++;
}
}));
}
return num;
}
}
UpdateComponent.decorators = [
{ type: Component, args: [{
selector: 'common-update',
template: "<ng-container [ngSwitch]=\"srv.step\">\r\n\t<div class=\"update-all\" *ngSwitchCase=\"'prepare'\">\r\n\t\t<div class=\"update-top\">\r\n\t\t\t<span class=\"top-title\">\r\n\t\t\t\t<span class=\"\u6807\u9898\">\u6210\u6279\u66FF\u6362\u2014\u2014{{ srv.eleName }}</span\r\n\t\t\t\t>({{ srv.num }}\u6761\u8BB0\u5F55)</span\r\n\t\t\t>\r\n\t\t\t<span *ngIf=\"quantityToReplace() == 0\" class=\"top-tips \u63D0\u793A\">\u4EA4\u66FF\u66FF\u6362\u540E,\u6240\u6709\u8BB0\u5F55\u90FD\u5C06\u66F4\u65B0,\u8BF7\u614E\u91CD\u64CD\u4F5C</span>\r\n\t\t\t<span *ngIf=\"quantityToReplace() > 0\" class=\"top-tips \u9009\u62E9\u6570\u91CF\"\r\n\t\t\t\t>\u5DF2\u9009\u62E9 <span>{{ quantityToReplace() }}</span> \u9879\u64CD\u4F5C\u6267\u884C</span\r\n\t\t\t>\r\n\t\t</div>\r\n\t\t<div class=\"update-body\">\r\n\t\t\t<div\r\n\t\t\t\tclass=\"update-field\"\r\n\t\t\t\t*ngFor=\"let field of srv.fields; let index = index\"\r\n\t\t\t\t[ngClass]=\"{\r\n\t\t\t\t\t'activation-style': field.selected || field.Must,\r\n\t\t\t\t\t'mat-elevation-z4': field.selected || field.Must\r\n\t\t\t\t}\"\r\n\t\t\t>\r\n\t\t\t\t<span class=\"\u540D\u79F0\" [class.\u900F\u660E]=\"!field.selected && !field.Must\"\r\n\t\t\t\t\t>{{ index + 1 }}.{{ field.Label }} ({{ field.Name }})\r\n\t\t\t\t\t<mat-icon *ngIf=\"field.Tooltip\" svgIcon=\"info\" matTooltip=\"{{ field.Tooltip }}\"></mat-icon\r\n\t\t\t\t></span>\r\n\t\t\t\t<mat-checkbox [(ngModel)]=\"field.selected\" *ngIf=\"!field.Must\"> </mat-checkbox>\r\n\t\t\t\t<div *ngIf=\"field.selected || field.Must\" class=\"\u64CD\u4F5C\">\r\n\t\t\t\t\t<div class=\"\u9009\u62E9\" *ngIf=\"field.Freeentry\">\r\n\t\t\t\t\t\t<mat-select placeholder=\"\u9009\u62E9\" [(value)]=\"field.setValue\">\r\n\t\t\t\t\t\t\t<mat-option *ngFor=\"let list of field.List\" [value]=\"list.Value\">\r\n\t\t\t\t\t\t\t\t{{ list.Label }}\r\n\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"\u8F93\u5165\" *ngIf=\"field.Freeentry\">\r\n\t\t\t\t\t\t<mat-form-field class=\"example-full-width\">\r\n\t\t\t\t\t\t\t<input matInput [(ngModel)]=\"field.setValue\" />\r\n\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"\u5355\u9009\" *ngIf=\"!field.Freeentry\">\r\n\t\t\t\t\t\t<mat-radio-group>\r\n\t\t\t\t\t\t\t<mat-radio-button *ngFor=\"let list of field.List\" [value]=\"list.Value\">{{\r\n\t\t\t\t\t\t\t\tlist.Label\r\n\t\t\t\t\t\t\t}}</mat-radio-button>\r\n\t\t\t\t\t\t</mat-radio-group>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div *ngIf=\"!field.selected && !field.Must\" class=\"\u672A\u6FC0\u6D3B\">\r\n\t\t\t\t\t<span *ngIf=\"!field.setValue || field.setValue == ''\">\u6682\u65E0\u4FEE\u6539\u503C</span>\r\n\t\t\t\t\t<span *ngIf=\"field.setValue && field.setValue != ''\">\u66FF\u6362\u5185\u5BB9</span>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<div class=\"update-footer\">\r\n\t\t\t<button class=\"\u529F\u80FD\u6309\u94AE\" mat-button (click)=\"close()\"><mat-icon svgIcon=\"close\"></mat-icon> \u53D6\u6D88</button>\r\n\t\t\t<button class=\"\u6267\u884C\u6309\u94AE\" mat-button (click)=\"doUpdate()\">\r\n\t\t\t\t<mat-icon svgIcon=\"check_circle\"></mat-icon> \u6267\u884C\r\n\t\t\t</button>\r\n\t\t</div>\r\n\t</div>\r\n\t<div *ngSwitchCase=\"'runing'\">\r\n\t\t\u6B63\u5728\u6210\u6279\u66FF\u6362\u3002\u3002\u3002\r\n\t</div>\r\n\t<div class=\"replace\" *ngSwitchCase=\"'complete'\">\r\n\t\t<div class=\"replace-wrapper\">\r\n\t\t\t<div class=\"replace-title\">\u6B63\u5728\u8FDB\u884C\u4E2D...</div>\r\n\t\t\t<div class=\"replace-text\">\r\n\t\t\t\t\u6210\u6279\u66FF\u6362\u5DF2\u63D0\u4EA4\uFF0C\u53EF\u5230 <a class=\"text-check\" [routerLink]=\"srv.taskInfoURL\">\u4EFB\u52A1\u660E\u7EC6</a>\r\n\t\t\t\t\u4E2D\u67E5\u770B\uFF01\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n</ng-container>\r\n",
styles: ["@charset \"UTF-8\";.update-all{width:100%;height:100%;display:flex;flex-direction:column}.update-all .update-top{margin:24px 48px}.update-all .update-top .top-title{font-size:20px}.update-all .update-top .top-title .\u6807\u9898{font-weight:700}.update-all .update-top .top-tips{font-size:14px;display:block;margin-top:8px}.update-all .update-top .top-tips span{font-size:18px}.update-all .update-body{flex-grow:1;width:100%;display:flex;flex-wrap:wrap;align-content:flex-start;padding:0 32px 0 48px;box-sizing:border-box}.update-all .update-body .update-field{width:280px;height:120px;padding:16px 8px 14px 16px;box-sizing:border-box;margin:0 16px 24px 0;position:relative;border-radius:4px;display:flex;flex-direction:column;justify-content:space-between}.update-all .update-body .update-field .\u540D\u79F0{font-size:18px;font-weight:700}.update-all .update-body .update-field .\u540D\u79F0 .mat-icon{width:16px;height:16px;line-height:16px}.update-all .update-body .update-field .mat-checkbox{position:absolute;top:12px;right:8px}.update-all .update-body .update-field .\u64CD\u4F5C{display:flex;align-items:center}.update-all .update-body .update-field .\u64CD\u4F5C .\u9009\u62E9{width:72px;margin-right:8px}.update-all .update-body .update-field .\u64CD\u4F5C .\u8F93\u5165{flex-grow:1}.update-all .update-body .update-field .\u64CD\u4F5C .\u8F93\u5165 .mat-form-field{width:100%;font-size:12px}.update-all .update-body .update-field .\u64CD\u4F5C .\u8F93\u5165 .mat-form-field ::ng-deep .mat-form-field-wrapper{margin:0;padding-bottom:10px;vertical-align:bottom;-webkit-transform:translateY(0);transform:translateY(0)}.update-all .update-body .update-field .\u64CD\u4F5C .\u8F93\u5165 .mat-form-field ::ng-deep .mat-form-field-infix{border:0;font-size:14px;padding:10px 0;box-sizing:border-box}.update-all .update-body .update-field .\u64CD\u4F5C .\u5355\u9009{margin-left:15px}.update-all .update-body .update-field .\u64CD\u4F5C .\u5355\u9009 .mat-radio-button{margin-right:8px;font-size:14px}.update-all .update-body .update-field .\u672A\u6FC0\u6D3B{font-size:14px}.update-all .update-body .update-field .\u900F\u660E{opacity:.6}.update-all .update-footer{width:100%;height:48px;display:flex;justify-content:center;align-items:center;padding-right:16px;box-sizing:border-box}.update-all .update-footer .\u529F\u80FD\u6309\u94AE{margin-right:8px}.update-all .update-footer .\u6267\u884C\u6309\u94AE .mat-icon{margin-right:4px;vertical-align:middle}.replace{display:flex;justify-content:center;align-items:center;width:100%;height:calc(100vh - 30px)}.replace .replace-wrapper{width:624px;height:456px;margin-top:-60px;background:url(/front/assets/export/prepare.png) top center/300px 300px no-repeat;box-shadow:0 2px 5px 0 rgba(0,0,0,.14);box-sizing:border-box}.replace .replace-wrapper .replace-title{padding:271px 128px 0;font-size:24px}.replace .replace-wrapper .replace-text{padding:16px 128px 0;font-size:16px}.replace .replace-wrapper .replace-text .text-check{font-weight:700}"]
}] }
];
/** @nocollapse */
UpdateComponent.ctorParameters = () => [
{ type: UpdateService },
{ type: TabsService },
{ type: ProjectService }
];
UpdateComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.update',] }]
};
if (false) {
/** @type {?} */
UpdateComponent.prototype.hostClass;
/** @type {?} */
UpdateComponent.prototype.subs;
/** @type {?} */
UpdateComponent.prototype.srv;
/**
* @type {?}
* @private
*/
UpdateComponent.prototype.tabs;
/** @type {?} */
UpdateComponent.prototype.prj;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
const ɵ0$9 = SaveStateData;
class UpdateModule {
}
UpdateModule.decorators = [
{ type: NgModule, args: [{
declarations: [UpdateComponent],
imports: [
CommonModule,
MatInputModule$1,
MatSelectModule,
MatButtonModule,
MatRadioModule,
MatCheckboxModule,
MatIconModule$1,
MatTooltipModule,
FormsModule,
RouterModule.forChild([{ path: '**', data: ɵ0$9, component: UpdateComponent }])
]
},] }
];
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class CommonBillComponent {
constructor() {
this.hostClass = true;
}
/**
* @return {?}
*/
ngOnInit() { }
/**
* @param {?} fld
* @return {?}
*/
inputType(fld) {
switch (fld.Type) {
default:
return 'text';
case BillFieldDataType.DATE:
return 'datetime-local';
case BillFieldDataType.FLOAT:
case BillFieldDataType.INT:
return 'number';
}
}
}
CommonBillComponent.decorators = [
{ type: Component, args: [{
selector: 'common-common-bill',
template: "<common-bill #bill>\r\n\t<!-- \u2193\u2193\u2193 0. \u603B\u5916\u6846 \u2193\u2193\u2193 -->\r\n\t<div class=\"bill-main\">\r\n\t\t<!-- \u2193\u2193 1. \u8868\u5355\u5916\u6846 \u2193\u2193 -->\r\n\t\t<div class=\"bill-wrapper mat-elevation-z2\" [formGroup]=\"bill.formGroup\"\r\n\t\t\t*ngIf=\"bill.formGroup\">\r\n\t\t\t<div class=\"bill-title\">{{bill.element.element.title()}}</div>\r\n\t\t\t<!-- \u2193 2.\u5FAA\u73AF\u6BCF\u884C \u2193 -->\r\n\t\t\t<div *ngFor=\"let field of bill.fields\">\r\n\t\t\t\t<!-- 3. \u6BCF\u884C \u2193 -->\r\n\t\t\t\t<div class=\"bill-row\">\r\n\t\t\t\t\t<!-- 3.1 \u6BCF\u884C\u5DE6\u8FB9 \u2193 -->\r\n\t\t\t\t\t<div class=\"row-left\">\r\n\t\t\t\t\t\t{{field.Name}}\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<!-- 3.2 \u6BCF\u884C\u53F3\u8FB9 \u2193 -->\r\n\t\t\t\t\t<div class=\"row-right\">\r\n\t\t\t\t\t\t<div class=\"form-wrapper\">\r\n\t\t\t\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t\t\t\t<input class=\"outline-input\" matInput\r\n\t\t\t\t\t\t\t\t\t[type]=\"inputType(field)\"\r\n\t\t\t\t\t\t\t\t\t[formControlName]=\"field.Name\"\r\n\t\t\t\t\t\t\t\t\t[readOnly]=\"field.Readonly\"\r\n\t\t\t\t\t\t\t\t\t[ngStyle]=\"{'visibility':field.Hidden?'hidden':''}\"\r\n\t\t\t\t\t\t\t\t\tcommonBillField>\r\n\t\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n</common-bill>",
styles: ["@charset \"UTF-8\";.bill-main,.bill-row,.bill-wrapper,.row-left,.row-right{box-sizing:border-box}.bill-main{display:flex;justify-content:center;align-items:center;width:100%;height:calc(100vh - 116px)}.bill-title{font:24px bold;margin-left:16px;margin-bottom:16px}.bill-wrapper{width:560px;max-height:calc(100vh - 116px - 48px);padding:16px 0;border-radius:4px;overflow:auto}.bill-row{display:flex;justify-content:space-between;align-items:center;width:100%;height:40px;line-height:40px;margin-bottom:16px;font-size:14px}.row-left{width:calc(152px - 24px);text-align:right}.row-right{display:flex;align-items:center;width:408px;box-sizing:border-box}.row-right .outline-input{width:330px;box-sizing:border-box;padding-left:8px}"]
}] }
];
/** @nocollapse */
CommonBillComponent.ctorParameters = () => [];
CommonBillComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.common-bill',] }]
};
if (false) {
/** @type {?} */
CommonBillComponent.prototype.hostClass;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
const ɵ0$a = SaveStateData;
class CommonBillModule {
}
CommonBillModule.decorators = [
{ type: NgModule, args: [{
declarations: [CommonBillComponent],
imports: [
CommonModule,
BillModule,
MatInputModule$1,
MatFormFieldModule$1,
RouterModule.forChild([
{
path: '**',
component: CommonBillComponent,
data: ɵ0$a
}
])
]
},] }
];
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @record
*/
function RoleEle() { }
if (false) {
/** @type {?} */
RoleEle.prototype.RoleName;
/** @type {?} */
RoleEle.prototype.EleName;
}
/**
* @record
*/
function RoleValidElement() { }
if (false) {
/** @type {?} */
RoleValidElement.prototype.Name;
/** @type {?} */
RoleValidElement.prototype.Controller;
/** @type {?} */
RoleValidElement.prototype.Label;
/** @type {?} */
RoleValidElement.prototype.LabelEN;
/** @type {?} */
RoleValidElement.prototype.Icon;
/** @type {?} */
RoleValidElement.prototype.Color;
/** @type {?} */
RoleValidElement.prototype.Category;
/** @type {?} */
RoleValidElement.prototype.CategoryEN;
/** @type {?} */
RoleValidElement.prototype.Dept;
/** @type {?} */
RoleValidElement.prototype.Bill;
/** @type {?} */
RoleValidElement.prototype.BillOperate;
}
class RoleBack {
/**
* @param {?} api
*/
constructor(api) {
this.api = api;
}
/**
* @return {?}
*/
fetchEles() {
return this.api.get('fetch-eles');
}
/**
* @return {?}
*/
fetchHasRoleDepts() {
return this.api.get('fetch-has-role-depts');
}
}
RoleBack.decorators = [
{ type: Injectable }
];
/** @nocollapse */
RoleBack.ctorParameters = () => [
{ type: CurrentApiService }
];
if (false) {
/**
* @type {?}
* @private
*/
RoleBack.prototype.api;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class TreeNode {
/**
* @param {?} name
* @param {?} parent
*/
constructor(name, parent) {
this.name = name;
this.parent = parent;
this.children = [];
}
/**
* @return {?}
*/
title() {
if (this.ele) {
return this.ele.title();
}
if (this.name.search(/[0-9]{2}\./) > -1) {
return this.name.substr(3);
}
return this.name;
}
// 强制创建一个节点,路径上的父节点如果不存在则创建,返回最终的节点
/**
* @param {?} paths
* @param {?} ele
* @return {?}
*/
forceCreate(paths, ele) {
if (paths.length === 0) {
return null;
}
/** @type {?} */
const val = paths.shift();
// 需要排序
/** @type {?} */
const idx = this.children.findIndex((/**
* @param {?} item
* @return {?}
*/
item => val.localeCompare(item.name) <= 0));
/** @type {?} */
let node = new TreeNode(val, this);
if (idx === -1) {
this.children.push(node);
}
else if (this.children[idx].name === val) {
node = this.children[idx];
}
else {
this.children.splice(idx, 0, node);
}
if (paths.length === 0) {
node.ele = ele;
return node;
}
else {
return node.forceCreate(paths, ele);
}
}
}
if (false) {
/** @type {?} */
TreeNode.prototype.iconName;
/** @type {?} */
TreeNode.prototype.color;
/** @type {?} */
TreeNode.prototype.children;
/** @type {?} */
TreeNode.prototype.ele;
/** @type {?} */
TreeNode.prototype.name;
/** @type {?} */
TreeNode.prototype.parent;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class ValidElement extends Element {
/**
* @param {?} data
*/
constructor(data) {
super(Object.assign({}, data, { NotMenu: true, URL: '' }));
this.Dept = data.Dept;
}
}
if (false) {
/** @type {?} */
ValidElement.prototype.Dept;
}
class RoleComponent {
/**
* @param {?} eles
* @param {?} back
* @param {?} current
*/
constructor(eles, back, current) {
this.eles = eles;
this.back = back;
this.current = current;
this.menuSelectAll = 'all';
this.menuSelectChecked = 'checked';
this.menuSelectNotChecked = 'not-checked';
this.hostClass = true;
this.ctrlElementName = new FormControl();
this.ctrlMenuRange = new FormControl();
this.subs = [];
this.treeControl = new NestedTreeControl((/**
* @param {?} node
* @return {?}
*/
node => node.children));
this.dataSource = new MatTreeNestedDataSource$1();
this.ctrlDeptSelect = new FormControl();
this.hasChild = (/**
* @param {?} _
* @param {?} node
* @return {?}
*/
(_, node) => !!node.children && node.children.length > 0);
}
/**
* @return {?}
*/
ngOnDestroy() {
this.subs.forEach((/**
* @param {?} v
* @return {?}
*/
v => v.unsubscribe()));
}
/**
* @return {?}
*/
refreshFilterElements() {
/** @type {?} */
const val = this.ctrlElementName.value || '';
/** @type {?} */
const selectRange = this.ctrlMenuRange.value;
/** @type {?} */
const selectDepts = (/** @type {?} */ (this.ctrlDeptSelect.value));
this.filterElements = this.validElements.filter((/**
* @param {?} v
* @return {?}
*/
v => v.title().includes(val) || v.Category.includes(val)));
switch (selectRange) {
case this.menuSelectChecked:
this.filterElements = this.filterElements.filter((/**
* @param {?} v
* @return {?}
*/
v => this.roles.find((/**
* @param {?} sv
* @return {?}
*/
sv => sv.EleName === v.Name)) !== undefined));
break;
case this.menuSelectNotChecked:
this.filterElements = this.filterElements.filter((/**
* @param {?} v
* @return {?}
*/
v => this.roles.find((/**
* @param {?} sv
* @return {?}
*/
sv => sv.EleName === v.Name)) === undefined));
break;
}
// 过滤部门代码
this.filterElements = this.filterElements.filter((/**
* @param {?} v
* @return {?}
*/
v => selectDepts.find((/**
* @param {?} sv
* @return {?}
*/
sv => sv.Code === v.Dept))));
this.filterElements = this.filterElements.sort((/**
* @param {?} a
* @param {?} b
* @return {?}
*/
(a, b) => a.title().localeCompare(b.title())));
this.rootNode = new TreeNode('root', null);
this.filterElements.forEach((/**
* @param {?} v
* @return {?}
*/
v => {
this.rootNode.forceCreate([...v.Category.split('/'), v.Label || v.Name], v);
}));
this.dataSource.data = this.rootNode.children;
this.treeControl.dataNodes = this.rootNode.children;
// 状态保存不住,总是缩起,所以每次全展开
this.treeControl.expandAll();
}
/**
* @return {?}
*/
ngOnInit() {
this.subs.push(this.bill.init.subscribe((/**
* @return {?}
*/
() => {
this.bill.typeRecord.Eles = this.bill.typeRecord.Eles || [];
// 新增或编辑,将显示所有的菜单项,否则只显示已经选中的
if (this.bill.isAdd() || this.bill.isEdit()) {
this.ctrlMenuRange.patchValue(this.menuSelectAll);
}
else {
this.ctrlMenuRange.patchValue(this.menuSelectChecked);
}
this.subs.push(this.current.change$.subscribe((/**
* @return {?}
*/
() => {
this.back.fetchHasRoleDepts().subscribe((/**
* @param {?} depts
* @return {?}
*/
depts => {
this.hasRoleDepts = depts;
this.ctrlDeptSelect.patchValue(depts);
}));
this.back.fetchEles().subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
// 转换成Element,主要目的是用到它的title函数
this.validElements = v.map((/**
* @param {?} sv
* @return {?}
*/
sv => new ValidElement(sv)));
this.subs.push(this.ctrlElementName.valueChanges
.pipe(startWith(''), debounceTime(500))
.subscribe((/**
* @return {?}
*/
() => this.refreshFilterElements())), this.ctrlMenuRange.valueChanges.subscribe((/**
* @return {?}
*/
() => this.refreshFilterElements())), this.ctrlDeptSelect.valueChanges.subscribe((/**
* @return {?}
*/
() => this.refreshFilterElements())));
}));
})));
})));
}
/**
* @return {?}
*/
get roles() {
return (/** @type {?} */ (this.bill.typeRecord.Eles));
}
/**
* @param {?} node
* @return {?}
*/
treeNodeChecked(node) {
if (node.ele) {
return this.roles.find((/**
* @param {?} v
* @return {?}
*/
v => v.EleName === node.ele.Name)) !== undefined;
}
else {
/** @type {?} */
const foundNotChecked = node.children.find((/**
* @param {?} v
* @return {?}
*/
v => !this.treeNodeChecked(v)));
return foundNotChecked === undefined;
}
}
/**
* @param {?} node
* @param {?} event
* @return {?}
*/
changeNodeChecked(node, event) {
if (event.checked) {
if (node.ele) {
if (!this.roles.find((/**
* @param {?} v
* @return {?}
*/
v => v.EleName === node.ele.Name))) {
this.roles.push({ EleName: node.ele.Name, RoleName: this.bill.formGroup.get('Name').value });
}
}
}
else {
if (node.ele) {
/** @type {?} */
const idx = this.roles.findIndex((/**
* @param {?} v
* @return {?}
*/
v => v.EleName === node.ele.Name));
if (idx > -1) {
this.roles.splice(idx, 1);
}
}
}
node.children.forEach((/**
* @param {?} v
* @return {?}
*/
v => this.changeNodeChecked(v, event)));
}
/**
* @param {?} ele
* @return {?}
*/
dropEle(ele) {
/** @type {?} */
const idx = this.roles.findIndex((/**
* @param {?} v
* @return {?}
*/
v => v.EleName === ele.EleName));
if (idx > -1) {
this.roles.splice(idx, 1);
}
}
}
RoleComponent.decorators = [
{ type: Component, args: [{
selector: 'common-role',
template: "<common-bill #bill>\r\n\t<div [formGroup]=\"bill.formGroup\" *ngIf=\"bill.formGroup\" class=\"role mat-elevation-z2\">\r\n\t\t<div class=\"modify-role\">\r\n\t\t\t<div class=\"modify-role-title title-color\">\u4FEE\u6539\u89D2\u8272</div>\r\n\t\t\t<div class=\"modify-role-content\">\r\n\t\t\t\t<div class=\"modify-role-content-input\">\r\n\t\t\t\t\t<span class=\"tips-color\">\u540D\u79F0</span>\r\n\t\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t\t<input matInput formControlName=\"Name\" commonBillField>\r\n\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"modify-role-content-input\">\r\n\t\t\t\t\t<span class=\"tips-color\">\u90E8\u95E8</span>\r\n\t\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t\t<input matInput formControlName=\"Dept\" commonBillField>\r\n\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"modify-role-content-input role-select\">\r\n\t\t\t\t\t<span class=\"tips-color\">\u4E0B\u7EA7\u53EF\u89C1</span>\r\n\t\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t\t<mat-select formControlName=\"VisibleLower\" commonBillField>\r\n\t\t\t\t\t\t\t<mat-option [value]=\"0\">\r\n\t\t\t\t\t\t\t\t\u4E0B\u7EA7\u4E0D\u53EF\u89C1\r\n\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t\t<mat-option [value]=\"1\">\r\n\t\t\t\t\t\t\t\t\u6240\u6709\u4E0B\u7EA7\r\n\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t\t<mat-option [value]=\"2\">\r\n\t\t\t\t\t\t\t\t\u4EC5\u76F4\u63A5\u4E0B\u7EA7\r\n\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t</div>\r\n\t\t\t\t<!-- \u6682\u65F6\u4E0D\u9700\u8981,\u4E0D\u7528\u5220\u9664 -->\r\n\t\t\t\t<!-- <div class=\"modify-role-content-input\">\r\n\t\t\t\t\t<span class=\"tips-color\">\u53EF\u89C1\u6027\u8868\u8FBE\u5F0F</span>\r\n\t\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t\t<input matInput formControlName=\"Visible\" commonBillField>\r\n\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t</div> -->\r\n\t\t\t\t<mat-checkbox class=\"title-color\" #check trueFalseValue [trueValue]=\"1\" [falseValue]=\"0\"\r\n\t\t\t\t\tformControlName=\"VisibleSelf\" commonBillField>\u672C\u7EA7\u53EF\u89C1</mat-checkbox>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"menu-item-title tips-color\">\u83DC\u5355\u9879</div>\r\n\t\t\t<div class=\"menu-item-content\">\r\n\t\t\t\t<div class=\"menu-item-role\" *ngFor=\"let ele of roles\">{{ele.EleName}}<mat-icon\r\n\t\t\t\t\t\t*ngIf=\"bill.isAdd()||bill.isEdit()\" svgIcon=\"cancel\" (click)=\"dropEle(ele)\">\r\n\t\t\t\t\t</mat-icon>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<div class=\"menu-tree\">\r\n\t\t\t<div class=\"menu-tree-title\">\r\n\t\t\t\t<span class=\"tips-color\">\u53EF\u6DFB\u52A0\u83DC\u5355\u9879</span>\r\n\t\t\t\t<mat-form-field class=\"tips-color\">\r\n\t\t\t\t\t<mat-select [formControl]=\"ctrlDeptSelect\" multiple>\r\n\t\t\t\t\t\t<mat-option *ngFor=\"let oneDept of hasRoleDepts\"\r\n\t\t\t\t\t\t\t[value]=\"oneDept\">\r\n\t\t\t\t\t\t\t{{oneDept.Name}}</mat-option>\r\n\t\t\t\t\t</mat-select>\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"menu-tree-screen\">\r\n\t\t\t\t<mat-form-field appearance=\"outline\" class=\"ctrlMenuRange\">\r\n\t\t\t\t\t<mat-select [formControl]=\"ctrlMenuRange\">\r\n\t\t\t\t\t\t<mat-option [value]=\"menuSelectAll\"> \u6240\u6709 </mat-option>\r\n\t\t\t\t\t\t<mat-option [value]=\"menuSelectChecked\"> \u9009\u4E2D</mat-option>\r\n\t\t\t\t\t\t<mat-option [value]=\"menuSelectNotChecked\"> \u672A\u9009\u4E2D</mat-option>\r\n\t\t\t\t\t</mat-select>\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t\t<mat-form-field appearance=\"outline\" class=\"ctrlElementName\" *ngIf=\"bill.isEdit()||bill.isAdd()\">\r\n\t\t\t\t\t<input matInput [formControl]=\"ctrlElementName\" placeholder=\"\u8F93\u5165\u5173\u952E\u5B57\u7B5B\u9009\">\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"tree\">\r\n\t\t\t\t<mat-tree [dataSource]=\"dataSource\" [treeControl]=\"treeControl\">\r\n\t\t\t\t\t<!-- This is the tree node template for leaf nodes -->\r\n\t\t\t\t\t<mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodeToggle>\r\n\t\t\t\t\t\t<li class=\"mat-tree-node tips-color\">\r\n\t\t\t\t\t\t\t<!-- use a disabled button to provide padding for tree leaf -->\r\n\t\t\t\t\t\t\t<button mat-icon-button disabled></button>\r\n\t\t\t\t\t\t\t<mat-checkbox [checked]=\"treeNodeChecked(node)\"\r\n\t\t\t\t\t\t\t\t[disabled]=\"bill.isBrowse()||bill.isDelete()\" (change)=\"changeNodeChecked(node,$event)\">\r\n\t\t\t\t\t\t\t\t{{node.item}}</mat-checkbox>\r\n\t\t\t\t\t\t\t<mat-icon *ngIf=\"node.iconName\" class=\"tree-icon\" svgIcon=\"{{node.iconName}}\"></mat-icon>\r\n\t\t\t\t\t\t\t{{node.title()}}\r\n\t\t\t\t\t\t</li>\r\n\t\t\t\t\t</mat-tree-node>\r\n\t\t\t\t\t<!-- This is the tree node template for expandable nodes -->\r\n\t\t\t\t\t<mat-nested-tree-node *matTreeNodeDef=\"let node; when: hasChild\">\r\n\t\t\t\t\t\t<li>\r\n\t\t\t\t\t\t\t<div class=\"mat-tree-node tips-color\">\r\n\t\t\t\t\t\t\t\t<button mat-icon-button matTreeNodeToggle [attr.aria-label]=\"'toggle ' + node.name\">\r\n\t\t\t\t\t\t\t\t\t<mat-icon class=\"mat-icon-rtl-mirror\"\r\n\t\t\t\t\t\t\t\t\t\t[svgIcon]=\"treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'\">\r\n\t\t\t\t\t\t\t\t\t</mat-icon>\r\n\t\t\t\t\t\t\t\t</button>\r\n\t\t\t\t\t\t\t\t<mat-checkbox [checked]=\"treeNodeChecked(node)\"\r\n\t\t\t\t\t\t\t\t\t[disabled]=\"bill.isBrowse()||bill.isDelete()\"\r\n\t\t\t\t\t\t\t\t\t(change)=\"changeNodeChecked(node,$event)\">\r\n\t\t\t\t\t\t\t\t\t{{node.item}}</mat-checkbox>\r\n\t\t\t\t\t\t\t\t<mat-icon *ngIf=\"node.iconName\" class=\"tree-icon\" svgIcon=\"{{node.iconName}}\">\r\n\t\t\t\t\t\t\t\t</mat-icon>\r\n\t\t\t\t\t\t\t\t{{node.title()}}\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<ul [class.tree-invisible]=\"!treeControl.isExpanded(node)\">\r\n\t\t\t\t\t\t\t\t<ng-container matTreeNodeOutlet></ng-container>\r\n\t\t\t\t\t\t\t</ul>\r\n\t\t\t\t\t\t</li>\r\n\t\t\t\t\t</mat-nested-tree-node>\r\n\t\t\t\t</mat-tree>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n</common-bill>",
providers: [RoleBack],
styles: [".tree-invisible{display:none}.tree li,.tree ul{margin-top:0;margin-bottom:0;list-style-type:none}.tree ul{padding-left:28px}.role{max-width:960px;margin:14px auto;height:calc(100% - 28px);border-radius:4px;display:flex}.role .modify-role{width:0;flex-grow:1;height:100%;padding:24px 24px 8px;box-sizing:border-box;display:flex;flex-direction:column}.role .modify-role .modify-role-title{font-size:20px;font-weight:700;margin-bottom:24px}.role .modify-role .modify-role-content{width:100%;display:flex;flex-wrap:wrap;align-items:flex-end}.role .modify-role .modify-role-content .modify-role-content-input{width:168px;margin:0 24px 16px 0}.role .modify-role .modify-role-content .modify-role-content-input span{display:block;font-size:12px;margin-bottom:8px}.role .modify-role .modify-role-content .modify-role-content-input .mat-form-field{width:100%;font-size:14px}.role .modify-role .modify-role-content .role-select{width:120px}.role .modify-role .modify-role-content .mat-checkbox{font-size:14px;margin:0 0 16px}.role .modify-role .menu-item-title{font-size:12px;margin-top:8px}.role .modify-role .menu-item-content{width:100%;flex-grow:1;overflow-y:auto;display:flex;flex-wrap:wrap;align-content:flex-start}.role .modify-role .menu-item-content .menu-item-role{height:32px;padding:0 8px 0 16px;font-size:14px;border-radius:16px;margin:8px 16px 0 0;display:flex;justify-content:space-between;align-items:center}.role .modify-role .menu-item-content .menu-item-role .mat-icon{width:18px;height:18px;line-height:18px;margin-left:8px;cursor:pointer}.role .menu-tree{max-height:100%;width:298px;flex-shrink:0;padding:16px 0 8px;box-sizing:border-box;display:flex;flex-direction:column}.role .menu-tree .menu-tree-title .mat-form-field ::ng-deep .mat-form-field-underline{display:none}.role .menu-tree .menu-tree-screen{padding:0 8px 8px 16px;font-size:12px;display:flex;align-items:center}.role .menu-tree .menu-tree-screen .ctrlElementName{width:170px;font-size:12px;margin-left:8px}.role .menu-tree .menu-tree-screen .ctrlMenuRange{width:88px;font-size:12px}.role .menu-tree .menu-tree-title{padding:0 8px 8px 16px;display:flex;justify-content:space-between;align-items:center}.role .menu-tree .menu-tree-title span{font-size:20px;font-weight:700}.role .menu-tree .menu-tree-title .mat-form-field{width:128px;font-size:12px;font-weight:700;text-align:right;box-sizing:border-box}.role .menu-tree .tree{flex-grow:1;padding-right:8px;box-sizing:border-box;overflow-y:auto;font-size:14px}.role .menu-tree .tree .mat-tree-node{min-height:40px;height:40px}.role .menu-tree .tree .mat-checkbox{margin-right:8px;vertical-align:top;line-height:16px;height:16px}.role .menu-tree .tree .tree-icon{vertical-align:top;width:16px;height:16px;line-height:16px;margin-right:8px}.role .mat-form-field ::ng-deep .mat-form-field-wrapper{margin:0;padding-bottom:0}.role .mat-form-field ::ng-deep .mat-form-field-infix{border:0;padding:8px 0;height:30px;box-sizing:border-box}.role .mat-form-field ::ng-deep .mat-select-arrow-wrapper{display:block}"]
}] }
];
/** @nocollapse */
RoleComponent.ctorParameters = () => [
{ type: ElementsService },
{ type: RoleBack },
{ type: CurrentService }
];
RoleComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.c-role',] }],
bill: [{ type: ViewChild, args: ['bill', { static: true },] }]
};
if (false) {
/** @type {?} */
RoleComponent.prototype.menuSelectAll;
/** @type {?} */
RoleComponent.prototype.menuSelectChecked;
/** @type {?} */
RoleComponent.prototype.menuSelectNotChecked;
/** @type {?} */
RoleComponent.prototype.hostClass;
/** @type {?} */
RoleComponent.prototype.bill;
/** @type {?} */
RoleComponent.prototype.ctrlElementName;
/** @type {?} */
RoleComponent.prototype.ctrlMenuRange;
/** @type {?} */
RoleComponent.prototype.filterElements;
/**
* @type {?}
* @private
*/
RoleComponent.prototype.subs;
/** @type {?} */
RoleComponent.prototype.rootNode;
/** @type {?} */
RoleComponent.prototype.treeControl;
/** @type {?} */
RoleComponent.prototype.dataSource;
/** @type {?} */
RoleComponent.prototype.validElements;
/** @type {?} */
RoleComponent.prototype.ctrlDeptSelect;
/** @type {?} */
RoleComponent.prototype.hasRoleDepts;
/** @type {?} */
RoleComponent.prototype.hasChild;
/** @type {?} */
RoleComponent.prototype.eles;
/**
* @type {?}
* @private
*/
RoleComponent.prototype.back;
/** @type {?} */
RoleComponent.prototype.current;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
const ɵ0$b = SaveStateData;
class RoleModule {
}
RoleModule.decorators = [
{ type: NgModule, args: [{
declarations: [RoleComponent],
imports: [
CommonModule,
MatInputModule$1,
MatFormFieldModule$1,
MatCheckboxModule,
MatIconModule$1,
MatSelectModule,
MatTreeModule$1,
MatButtonModule,
FormsModule,
BillModule,
RouterModule.forChild([
{
path: '**',
component: RoleComponent,
data: ɵ0$b
}
])
]
},] }
];
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @enum {string} */
const RoleType = {
always: 'always',
select: 'select',
};
/**
* @record
*/
function UserRole() { }
if (false) {
/** @type {?} */
UserRole.prototype.Name;
/** @type {?} */
UserRole.prototype.Type;
}
/**
* @record
*/
function ColumnsWithLetter$2() { }
if (false) {
/** @type {?} */
ColumnsWithLetter$2.prototype.Letter;
/** @type {?} */
ColumnsWithLetter$2.prototype.Columns;
}
// ↑ 搬运的代码
class UserBack {
/**
* @param {?} api
*/
constructor(api) {
this.api = api;
}
/**
* @param {?} val
* @return {?}
*/
fetchFilterDept(val) {
return this.api.get('fetch-filter-dept', val);
}
/**
* @return {?}
*/
fetchRoles() {
return this.api.get('fetch-roles');
}
}
UserBack.decorators = [
{ type: Injectable }
];
/** @nocollapse */
UserBack.ctorParameters = () => [
{ type: CurrentApiService }
];
if (false) {
/**
* @type {?}
* @private
*/
UserBack.prototype.api;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @record
*/
function ModelUserRole() { }
if (false) {
/** @type {?} */
ModelUserRole.prototype.UserName;
/** @type {?} */
ModelUserRole.prototype.RoleName;
}
class UserComponent {
/**
* @param {?} back
* @param {?} curr
*/
constructor(back, curr) {
this.back = back;
this.curr = curr;
this.hostClass = true;
this.roles = {};
this.roleTypeAlways = RoleType.always;
this.beforeSave = this.beforeSave.bind(this);
}
/**
* @return {?}
*/
ngOnInit() {
this.back.fetchRoles().subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
this.validRoles = v;
this.roleLists = this.validRoles.map((/**
* @param {?} num
* @return {?}
*/
num => num.Name));
this.roleLitters = map2WithLetter$2(this.roleLists);
}));
}
/**
* @param {?} selft
* @return {?}
*/
beforeSave(selft) {
return of((/** @type {?} */ ({
record: {
Password: selft.typeRecord.Password ? btoa(selft.typeRecord.Password) : null,
Roles: Object.keys(this.roles)
.filter((/**
* @param {?} v
* @return {?}
*/
v => this.roles[v]))
.map((/**
* @param {?} v
* @return {?}
*/
v => ({
UserName: selft.typeRecord.Name,
RoleName: v
})))
}
})));
}
/**
* @return {?}
*/
ngAfterViewInit() {
this.bill.init.subscribe((/**
* @return {?}
*/
() => {
this.bill.formGroup.get('Password').patchValue(null);
((/** @type {?} */ ((this.bill.typeRecord.Roles || [])))).forEach((/**
* @param {?} v
* @return {?}
*/
v => {
this.roles[v.RoleName] = true;
}));
this.bill.formGroup
.get('Dept')
.valueChanges.pipe(startWith(this.curr.data.Dept.Code), debounceTime(500))
.subscribe((/**
* @param {?} val
* @return {?}
*/
val => {
this.filterDeptList = this.back.fetchFilterDept(val);
console.log('内:', this.filterDeptList);
}));
}));
this.bill.onBeforeSave = this.beforeSave;
}
/**
* @param {?} event
* @param {?} roleName
* @return {?}
*/
roleChange(event, roleName) {
if (event.checked) {
this.roles[roleName] = true;
}
else {
delete this.roles[roleName];
}
}
/**
* @param {?} letter
* @return {?}
*/
acronymFun(letter) {
document.querySelector('#' + letter).scrollIntoView(true);
}
/**
* @return {?}
*/
try() {
console.log(this.filterDeptList);
}
}
UserComponent.decorators = [
{ type: Component, args: [{
selector: 'common-user',
template: "<common-bill #bill>\r\n\r\n\t<div [formGroup]=\"bill.formGroup\" *ngIf=\"bill.formGroup\" class=\"main mat-elevation-z2 dis-row-sb\">\r\n\t\t<section class=\"section-1\">\r\n\t\t\t<header class=\"title\">\u4FEE\u6539\u7528\u6237</header>\r\n\t\t\t<section class=\"s1-content\">\r\n\t\t\t\t<div class=\"box-1\">\r\n\t\t\t\t\t<div class=\"wrapper\">\r\n\t\t\t\t\t\t<div class=\"title\">\u540D\u79F0</div>\r\n\t\t\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t\t\t<input matInput formControlName=\"Name\"\r\n\t\t\t\t\t\t\t\tcommonBillField>\r\n\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"wrapper\">\r\n\t\t\t\t\t\t<div class=\"title\">\u6635\u79F0</div>\r\n\t\t\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t\t\t<input matInput formControlName=\"NickName\"\r\n\t\t\t\t\t\t\t\tcommonBillField>\r\n\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"wrapper\">\r\n\t\t\t\t\t\t<div class=\"title\">\u5BC6\u7801</div>\r\n\t\t\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t\t\t<input matInput type=\"password\"\r\n\t\t\t\t\t\t\t\tformControlName=\"Password\" commonBillField>\r\n\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"wrapper\">\r\n\t\t\t\t\t\t<div class=\"title\">\u6240\u5C5E\u90E8\u95E8</div>\r\n\t\t\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t\t\t<input matInput formControlName=\"Dept\"\r\n\t\t\t\t\t\t\t\tcommonBillField [matAutocomplete]=\"autoDept\">\r\n\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t\t<mat-autocomplete #autoDept=\"matAutocomplete\">\r\n\t\t\t\t\t\t\t<mat-option *ngFor=\"let dept of filterDeptList|async\" [value]=\"dept.Code\">{{dept.Code}} - {{dept.Name}}\r\n\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t</mat-autocomplete>\r\n\t\t\t\t\t</div>\r\n\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"box-2\">\r\n\t\t\t\t\t<div class=\"wrapper freeze-time\">\r\n\t\t\t\t\t\t<div class=\"title\">\u51BB\u7ED3\u65E5\u671F</div>\r\n\t\t\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t\t\t<input matInput type=\"datetime-local\" \r\n\t\t\t\t\t\t\t\tformControlName=\"FreezeTime\" commonBillField\r\n\t\t\t\t\t\t\t\tstep=\"1\">\r\n\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"wrapper\">\r\n\t\t\t\t\t\t<div class=\"title\">\u51BB\u7ED3\u539F\u56E0</div>\r\n\t\t\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t\t\t<input matInput formControlName=\"FreezeDesc\"\r\n\t\t\t\t\t\t\t\tcommonBillField>\r\n\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"wrapper\">\r\n\t\t\t\t\t\t<div class=\"title\">\u9644\u52A0\u4FE1\u606F</div>\r\n\t\t\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t\t\t<textarea matInput matTextareaAutosize matAutosizeMinRows=2 matAutosizeMaxRows=5 formControlName=\"Tag\"\r\n\t\t\t\t\t\t\t\tcommonBillField></textarea>\r\n\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</section>\r\n\t\t</section>\r\n\t\t<section class=\"section-2\">\r\n\t\t\t\r\n\t\t\t<section class=\"s2-content\">\r\n\t\t\t\t<header class=\"title\">\u89D2\u8272</header>\r\n\t\t\t\t<div class=\"s2-box-1\">\r\n\t\t\t\t\t<div class=\"wrapper-box\" *ngFor=\"let letter of roleLitters\">\r\n\t\t\t\t\t\t<div class=\"s2-title\" id=\"{{ letter.Letter }}\">{{letter.Letter | uppercase}}</div>\r\n\t\t\t\t\t\t<div class=\"s2-wrapper\" *ngFor=\"let list of letter.Columns\">\r\n\t\t\t\t\t\t\t<mat-checkbox [checked]=\"roles[list]\" (change)=\"roleChange($event,list)\"></mat-checkbox>\r\n\t\t\t\t\t\t\t<span>{{list}}</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t\r\n\t\t\t\t</div>\r\n\t\t\t\r\n\t\t\t</section>\r\n\t\t\t<section class=\"s2-content-2\">\r\n\t\t\t\t<div class=\"s2-title\" *ngFor=\"let letter of roleLitters\">\r\n\t\t\t\t\t<span (click)=\"acronymFun(letter.Letter)\">{{letter.Letter | uppercase}}</span>\r\n\t\t\t\t</div>\r\n\t\t\t</section>\r\n\t\t</section>\r\n\t</div>\r\n<button (click)=\"try()\">111</button>\r\n</common-bill>\r\n\r\n\r\n<!-- 0: {Name: \"Name\", DBName: \"NAME\", Type: \"STR\", MaxLength: 50, Hidden: true, \u2026}\r\n1: {Name: \"NickName\", DBName: \"NICKNAME\", Type: \"STR\", MaxLength: 50, Null: true, \u2026}\r\n2: {Name: \"Salt\", DBName: \"SALT\", Type: \"BYTEA\", Value: \"pMA8mf37dmKZ8QKiZ/1FiA==\"}\r\n3: {Name: \"Password\", DBName: \"PASSWORD\", Type: \"BYTEA\", Value: \"ul0c07xKTaeYr2IX/jd6VI8iRnkWlCukaMF0Q4JyEic=\"}\r\n4: {Name: \"Dept\", DBName: \"DEPT\", Type: \"STR\", MaxLength: 50, Value: \"r\"}\r\n5: {Name: \"Tag\", DBName: \"TAG\", Type: \"STR\", MaxLength: 300, Null: true, \u2026}\r\n6: {Name: \"FreezeTime\", DBName: \"FREEZETIME\", Type: \"DATE\", Null: true, Value: \"\"}\r\n7: {Name: \"FreezeDesc\", DBName: \"FREEZEDESC\", Type: \"STR\", MaxLength: 300, Null: true, \u2026}\r\n8: {Name: \"HeadPortrait\", DBName: \"HEADPORTRAIT\", Type: \"BYTEA\", Null: true, Value: \"\"}\r\n9: {Name: \"HeadPortraitType\", DBName: \"HEADPORTRAITTYPE\", Type: \"STR\", MaxLength: 15, Null: true, \u2026}\r\n10: {Name: \"HeadPortraitTime\", DBName: \"HEADPORTRAITTIME\", Type: \"DATE\", Null: true, Value: \"\"}\r\n11: {Name: \"IndexSetting\", DBName: \"INDEXSETTING\", Type: \"BY -->\r\n\r\n\r\n\r\n<!-- \r\n<common-bill #bill>\r\n\t<div [formGroup]=\"bill.formGroup\" *ngIf=\"bill.formGroup\" class=\"main\">\r\n\t\t<span>\u540D\u79F0</span>\r\n\t\t<mat-form-field>\r\n\t\t\t<input matInput formControlName=\"Name\" commonBillField>\r\n\t\t</mat-form-field>\r\n\t\t<span>\u6635\u79F0</span>\r\n\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t<input matInput formControlName=\"NickName\" commonBillField>\r\n\t\t</mat-form-field>\r\n\t\t<span>\u5BC6\u7801</span>\r\n\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t<input matInput type=\"password\" formControlName=\"Password\" commonBillField>\r\n\t\t</mat-form-field>\r\n\t\t<span>\u6240\u5C5E\u90E8\u95E8</span>\r\n\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t<input matInput formControlName=\"Dept\" commonBillField [matAutocomplete]=\"autoDept\">\r\n\t\t</mat-form-field>\r\n\t\t<mat-autocomplete #autoDept=\"matAutocomplete\">\r\n\t\t\t<mat-option *ngFor=\"let dept of filterDeptList|async\" [value]=\"dept.Code\">{{dept.Code}} - {{dept.Name}}\r\n\t\t\t</mat-option>\r\n\t\t</mat-autocomplete>\r\n\t\t<span>\u51BB\u7ED3\u5230\u671F</span>\r\n\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t<input type=\"datetime-local\" matInput formControlName=\"FreezeTime\" commonBillField step=\"1\">\r\n\t\t</mat-form-field>\r\n\t\t<span>\u51BB\u7ED3\u539F\u56E0</span>\r\n\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t<input matInput formControlName=\"FreezeDesc\" commonBillField>\r\n\t\t</mat-form-field>\r\n\t\t<span>\u9644\u52A0\u4FE1\u606F</span>\r\n\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t<input matInput formControlName=\"Tag\" commonBillField>\r\n\t\t</mat-form-field>\r\n\t</div>\r\n\t<ng-container *ngFor=\"let role of validRoles\">\r\n\t\t<mat-checkbox *ngIf=\"role.Type==='roleTypeAlways';else normalRole\" [checked]=\"roles[role.Name]\"\r\n\t\t\t(click)=\"$event.preventDefault()\" (change)=\"roleChange($event,role.Name)\">\r\n\t\t\t{{role.Name}}\r\n\t\t</mat-checkbox>\r\n\t\t<ng-template #normalRole>\r\n\t\t\t<mat-checkbox [checked]=\"roles[role.Name]\" (change)=\"roleChange($event,role.Name)\">\r\n\t\t\t\t{{role.Name}}\r\n\t\t\t</mat-checkbox>\r\n\t\t</ng-template>\r\n\t</ng-container>\r\n\r\n</common-bill> -->",
providers: [UserBack],
styles: ["@charset \"UTF-8\";.dis-row-c{display:flex;justify-content:center}.dis-row-sb{display:flex;justify-content:space-between}.main{width:100%;max-width:960px;min-width:300px;height:calc(100% - 48px - 40px);box-sizing:border-box;margin:48px auto;border-radius:4px}.main .mat-form-field ::ng-deep .mat-form-field-wrapper{margin:0;padding-bottom:0}.main .mat-form-field ::ng-deep .mat-form-field-infix{border:0;padding:14px 0 11px}.section-1{width:65%;max-width:664px;min-width:100px;box-sizing:border-box;margin-top:24px;margin-left:24px}.section-1 .title{font-size:20px}.s1-content{display:flex;width:100%;max-width:664px;min-width:300px;height:100%;box-sizing:border-box}.s1-content .title{padding-top:24px;padding-bottom:8px}.box-1{width:35%;max-width:216px;min-width:100px;box-sizing:border-box;padding-right:32px;height:calc(100% - 48px - 24px)}.box-1 .wrapper{width:100%;max-width:100%}.box-1 .wrapper .title{font-size:12px}.box-1 .wrapper .mat-form-field{width:100%;font-size:14px}.box-2{width:65%;max-width:304px;min-width:100px;box-sizing:border-box;margin-left:32px;height:368px}.box-2 .wrapper{width:100%;max-width:100%}.box-2 .wrapper .title{font-size:12px}.box-2 .wrapper .mat-form-field{width:100%;font-size:14px}.section-2{position:relative;width:30%;max-width:296px;min-width:100px;box-sizing:border-box}.s2-content{padding-left:24px}.s2-content header{padding-top:24px;margin-bottom:8px;font-size:14px}.s2-title{font-size:12px}.s2-box-1{height:100%;max-height:calc(100vh - 96px - 192px);box-sizing:border-box;overflow:auto}.s2-box-1 .wrapper-box{margin-bottom:8px}.s2-box-1 .s2-wrapper{font-size:14px;height:40px;line-height:40px}.s2-box-1 .s2-wrapper span{margin-left:16px}.s2-content-2{position:absolute;top:0;right:0;margin-top:74px;margin-right:12px}"]
}] }
];
/** @nocollapse */
UserComponent.ctorParameters = () => [
{ type: UserBack },
{ type: CurrentService }
];
UserComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.c-user',] }],
bill: [{ type: ViewChild, args: ['bill', { static: true },] }]
};
if (false) {
/** @type {?} */
UserComponent.prototype.hostClass;
/** @type {?} */
UserComponent.prototype.bill;
/** @type {?} */
UserComponent.prototype.filterDeptList;
/** @type {?} */
UserComponent.prototype.validRoles;
/** @type {?} */
UserComponent.prototype.roles;
/** @type {?} */
UserComponent.prototype.roleLists;
/** @type {?} */
UserComponent.prototype.roleLitters;
/** @type {?} */
UserComponent.prototype.roleTypeAlways;
/**
* @type {?}
* @private
*/
UserComponent.prototype.back;
/**
* @type {?}
* @private
*/
UserComponent.prototype.curr;
}
/**
* @param {?} v
* @return {?}
*/
function map2WithLetter$2(v) {
/** @type {?} */
const mapList = new Map();
v.forEach((/**
* @param {?} vv
* @return {?}
*/
vv => {
/** @type {?} */
let headerLetter = pinyin___default(vv, { style: pinyin___default.STYLE_FIRST_LETTER }).map((/**
* @param {?} s
* @return {?}
*/
s => s[0]))[0];
if (headerLetter.length > 1) {
headerLetter = headerLetter[0];
}
if (mapList.has(headerLetter)) {
mapList.get(headerLetter).push(vv);
}
else {
mapList.set(headerLetter, [vv]);
}
}));
// 排序
/** @type {?} */
const rev = (/** @type {?} */ ([]));
mapList.forEach((/**
* @param {?} columns
* @param {?} letter
* @return {?}
*/
(columns, letter) => {
rev.push((/** @type {?} */ ({ Letter: letter, Columns: columns })));
}));
return rev.sort((/**
* @param {?} a
* @param {?} b
* @return {?}
*/
(a, b) => a.Letter.localeCompare(b.Letter)));
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
const ɵ0$c = SaveStateData;
class UserModule {
}
UserModule.decorators = [
{ type: NgModule, args: [{
declarations: [UserComponent],
imports: [
CommonModule,
BillModule,
MatFormFieldModule$1,
MatCheckboxModule,
MatAutocompleteModule,
MatInputModule$1,
RouterModule.forChild([
{
path: '**',
component: UserComponent,
data: ɵ0$c
}
])
]
},] }
];
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class NoticeComponent$1 {
/**
* @param {?} theme
* @param {?} api
*/
constructor(theme, api) {
this.theme = theme;
this.api = api;
this.hostClass = true;
this.options = { maxLines: 1000, printMargin: false };
this.subs = [];
this.subs.push(this.theme.theme.subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
this.themeModel = v.model;
})));
}
/**
* @return {?}
*/
get content() {
return this.bill.formGroup.get('Content').value;
}
/**
* @param {?} val
* @return {?}
*/
set content(val) {
this.bill.formGroup.get('Content').patchValue(val);
}
/**
* @return {?}
*/
ngOnDestroy() {
this.subs.forEach((/**
* @param {?} v
* @return {?}
*/
v => v.unsubscribe()));
}
/**
* @return {?}
*/
ngOnInit() {
ace.config.set('basePath', '/front/assets/ace-builds/src-min-noconflict');
this.subs.push(this.bill.init.subscribe((/**
* @return {?}
*/
() => {
if (this.bill.isBrowse()) {
this.api.get('get-content-html').subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
this.contentHTML = v;
}));
if (this.bill.typeRecord.Publish === '1') {
this.api.get('read-notice').subscribe();
}
}
})));
}
}
NoticeComponent$1.decorators = [
{ type: Component, args: [{
selector: 'common-notice',
template: "<common-bill #bill>\r\n\t<div\r\n\t\tclass=\"notice-all \"\r\n\t\t[formGroup]=\"bill.formGroup\"\r\n\t\t*ngIf=\"bill.formGroup\"\r\n\t>\r\n\t\t<ng-container *ngIf=\"bill.isBrowse(); else normal\">\r\n\t\t\t<div class=\"notice-content notice-content-preview mat-elevation-z2\">\r\n\t\t\t\t<div class=\"deptInformation\">\r\n\t\t\t\t\t<span>\r\n\t\t\t\t\t\t<span class=\"notice-creator\">{{\r\n\t\t\t\t\t\t\tbill.formGroup.get(\"Creator\").value\r\n\t\t\t\t\t\t}}</span>\r\n\t\t\t\t\t\t<span>{{ bill.formGroup.get(\"DeptCode\").value }}</span>\r\n\t\t\t\t\t</span>\r\n\t\t\t\t\t<span>{{\r\n\t\t\t\t\t\tbill.formGroup.get(\"PublishTime\").value\r\n\t\t\t\t\t\t\t| date: \"yyyy/MM/dd HH:mm:ss\"\r\n\t\t\t\t\t}}</span>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"notice-title\">\r\n\t\t\t\t\t{{ bill.formGroup.get(\"Title\").value }}\r\n\t\t\t\t</div>\r\n\t\t\t\t<div\r\n\t\t\t\t\tclass=\"markdown vscode-{{ themeModel }}\"\r\n\t\t\t\t\t[innerHTML]=\"contentHTML\"\r\n\t\t\t\t></div>\r\n\t\t\t</div>\r\n\t\t</ng-container>\r\n\t\t<ng-template #normal>\r\n\t\t\t<div class=\"notice-content notice-content-add mat-elevation-z2\">\r\n\t\t\t\t<div class=\"deptInformation\">\r\n\t\t\t\t\t<span>\r\n\t\t\t\t\t\t<span class=\"notice-creator\">{{\r\n\t\t\t\t\t\t\tbill.formGroup.get(\"Creator\").value\r\n\t\t\t\t\t\t}}</span>\r\n\t\t\t\t\t\t<span>{{ bill.formGroup.get(\"DeptCode\").value }}</span>\r\n\t\t\t\t\t</span>\r\n\t\t\t\t\t<span>{{\r\n\t\t\t\t\t\tbill.formGroup.get(\"PublishTime\").value\r\n\t\t\t\t\t\t\t| date: \"yyyy/MM/dd HH:mm:ss\"\r\n\t\t\t\t\t}}</span>\r\n\t\t\t\t</div>\r\n\t\t\t\t<!-- <mat-form-field appearance=\"outline\">\r\n\t\t\t\t<input matInput formControlName=\"ID\" commonBillField />\r\n\t\t\t</mat-form-field> -->\r\n\t\t\t\t<mat-form-field class=\"notice-title\" appearance=\"outline\">\r\n\t\t\t\t\t<input\r\n\t\t\t\t\t\tmatInput\r\n\t\t\t\t\t\tformControlName=\"Title\"\r\n\t\t\t\t\t\tcommonBillField\r\n\t\t\t\t\t\tplaceholder=\"\u8BF7\u5728\u6B64\u5904\u8F93\u5165\u6807\u9898\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t\t<div class=\"notice-ace-editor\">\r\n\t\t\t\t\t<div\r\n\t\t\t\t\t\tace-editor\r\n\t\t\t\t\t\t[(text)]=\"content\"\r\n\t\t\t\t\t\tmode=\"markdown\"\r\n\t\t\t\t\t\t[theme]=\"\r\n\t\t\t\t\t\t\tthemeModel === 'dark' ? 'tomorrow_night' : 'eclipse'\r\n\t\t\t\t\t\t\"\r\n\t\t\t\t\t\t[options]=\"options\"\r\n\t\t\t\t\t\t[autoUpdateContent]=\"true\"\r\n\t\t\t\t\t\t[durationBeforeCallback]=\"1000\"\r\n\t\t\t\t\t\tstyle=\"min-height: 100%; width:100%;\"\r\n\t\t\t\t\t></div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<mat-checkbox\r\n\t\t\t\t\ttrueFalseValue\r\n\t\t\t\t\t[falseValue]=\"''\"\r\n\t\t\t\t\t[trueValue]=\"'1'\"\r\n\t\t\t\t\tformControlName=\"Publish\"\r\n\t\t\t\t\tcommonBillField\r\n\t\t\t\t\t>\u4FDD\u5B58\u65F6\u53D1\u5E03</mat-checkbox\r\n\t\t\t\t>\r\n\t\t\t</div>\r\n\t\t</ng-template>\r\n\t</div>\r\n</common-bill>\r\n",
styles: [".notice-all{max-width:960px;height:100%;margin:0 auto;padding:8px 0;box-sizing:border-box}.notice-content{width:100%;margin:0 auto;box-sizing:border-box;border-radius:4px;display:flex;flex-direction:column}.notice-content-preview{max-height:100%;padding:0 0 32px 40px;box-sizing:border-box}.notice-content-preview .markdown{padding-right:40px;flex-grow:1;overflow:auto}.notice-content-preview .markdown p{margin:0}.notice-content-preview .deptInformation{padding-right:40px}.notice-content-preview .notice-title{padding-right:40px;padding-bottom:16px}.notice-content-add{padding:0 40px;height:100%}.notice-content-add .notice-ace-editor{flex-grow:1;border-radius:4px;overflow:auto}.notice-content-add .mat-checkbox{text-align:right;margin:8px 0;font-size:14px}.notice-content-add .mat-form-field ::ng-deep .mat-form-field-wrapper{margin:0;padding-bottom:16px;vertical-align:bottom;-webkit-transform:translateY(0);transform:translateY(0)}.notice-content-add .mat-form-field ::ng-deep .mat-form-field-infix{border:0;padding:10px 0;height:22px}.deptInformation{padding:8px 0 24px;display:flex;justify-content:space-between;font-size:14px}.deptInformation .notice-creator{margin-right:16px}.notice-title{width:100%;font-size:24px;font-weight:700}"]
}] }
];
/** @nocollapse */
NoticeComponent$1.ctorParameters = () => [
{ type: ThemeService },
{ type: CurrentApiService }
];
NoticeComponent$1.propDecorators = {
bill: [{ type: ViewChild, args: ['bill', { static: true },] }],
hostClass: [{ type: HostBinding, args: ['class.c-notice',] }]
};
if (false) {
/** @type {?} */
NoticeComponent$1.prototype.bill;
/** @type {?} */
NoticeComponent$1.prototype.hostClass;
/** @type {?} */
NoticeComponent$1.prototype.options;
/** @type {?} */
NoticeComponent$1.prototype.subs;
/** @type {?} */
NoticeComponent$1.prototype.themeModel;
/** @type {?} */
NoticeComponent$1.prototype.contentHTML;
/**
* @type {?}
* @private
*/
NoticeComponent$1.prototype.theme;
/**
* @type {?}
* @private
*/
NoticeComponent$1.prototype.api;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
const ɵ0$d = SaveStateData;
class NoticeModule {
}
NoticeModule.decorators = [
{ type: NgModule, args: [{
declarations: [NoticeComponent$1],
imports: [
CommonModule,
BillModule,
MatFormFieldModule$1,
MatInputModule$1,
MatCheckboxModule,
FormsModule,
AceEditorModule,
RouterModule.forChild([
{
path: '**',
component: NoticeComponent$1,
data: ɵ0$d
}
])
]
},] }
];
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @enum {string} */
const DumpType = {
institution: 'institution',
data: 'data',
};
/**
* @record
*/
function InstitutionModel() { }
if (false) {
/** @type {?} */
InstitutionModel.prototype.Name;
/** @type {?} */
InstitutionModel.prototype.Tables;
}
/**
* @record
*/
function DumpResult() { }
if (false) {
/** @type {?} */
DumpResult.prototype.TaskInfoURL;
/** @type {?} */
DumpResult.prototype.TaskInfoSign;
/** @type {?} */
DumpResult.prototype.BrowseTaskElement;
}
class DumpInstitutionService {
/**
* @param {?} api
*/
constructor(api) {
this.api = api;
this.dumpType = DumpType.institution;
}
/**
* @return {?}
*/
init() {
this.getModels().subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
this.models = v;
}));
}
/**
* @return {?}
*/
getModels() {
return this.api.get('get-models');
}
/**
* @return {?}
*/
dump() {
return this.api.post('dump', this.dumpType);
}
}
DumpInstitutionService.decorators = [
{ type: Injectable }
];
/** @nocollapse */
DumpInstitutionService.ctorParameters = () => [
{ type: CurrentApiService }
];
if (false) {
/** @type {?} */
DumpInstitutionService.prototype.models;
/** @type {?} */
DumpInstitutionService.prototype.dumpType;
/**
* @type {?}
* @private
*/
DumpInstitutionService.prototype.api;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class DumpInstitutionComponent {
/**
* @param {?} svr
* @param {?} project
* @param {?} current
* @param {?} tabs
* @param {?} eles
*/
constructor(svr, project, current, tabs, eles) {
this.svr = svr;
this.project = project;
this.current = current;
this.tabs = tabs;
this.eles = eles;
this.hostClass = true;
this.displayedColumns = ['index', 'Name', 'Tables'];
this.dumpTypeInstitution = DumpType.institution;
this.dumpTypeData = DumpType.data;
this.dumpDone = false;
}
/**
* @return {?}
*/
ngOnInit() {
this.svr.init();
}
/**
* @return {?}
*/
dump() {
this.dumpDone = false;
this.svr.dump().subscribe((/**
* @param {?} v
* @return {?}
*/
v => {
this.dumpDone = true;
this.taskURL = this.project.frontURL('task', v.TaskInfoURL);
this.eles.addElement(v.BrowseTaskElement);
this.eles.setURLSign(v.TaskInfoURL, v.TaskInfoSign);
}));
}
/**
* @return {?}
*/
close() {
this.tabs.close();
}
}
DumpInstitutionComponent.decorators = [
{ type: Component, args: [{
selector: 'common-dump-institution',
template: "<ng-container *ngIf=\"!dumpDone;else done\">\r\n\t<div class=\"dumpSystem-all mat-elevation-z2\">\r\n\t\t<div class=\"dumpSystem-title\">\u5BFC\u51FA\u5236\u5EA6</div>\r\n\t<div class=\"dumpSystem-dept\"><div class=\"dumpSystem-dept-title\">\u5BFC\u51FA\u90E8\u95E8\u4EE3\u7801</div><div class=\"dumpSystem-dept-content\">{{current.data.Dept.Code}}</div></div>\r\n\t<div class=\"dumpSystem-dept\">\r\n\t\t<div class=\"dumpSystem-dept-title\">\u5BFC\u51FA\u7C7B\u578B</div>\r\n <div class=\"dumpSystem-dept-content\"><mat-radio-group [(ngModel)]=\"svr.dumpType\">\r\n\t\t\t<mat-radio-button [value]=\"dumpTypeInstitution\">\u5236\u5EA6\u5305 (\u751F\u6210\u9ED8\u8BA4\u5236\u5EA6\u6587\u4EF6)\r\n\t\t\t</mat-radio-button>\r\n\t\t\t<mat-radio-button [value]=\"dumpTypeData\">\u6570\u636E\u5305 (\u751F\u6210\u53EF\u4E0B\u8F7DZIP\u6587\u4EF6)\r\n\t\t\t</mat-radio-button>\r\n\t\t</mat-radio-group></div>\r\n\t</div>\r\n <div class=\"dumpType-tips\">\u5236\u5EA6\u5305\u542B\u6709\u4EE5\u4E0Bmodel</div>\r\n\t\r\n\t\r\n\t<!-- <div *ngFor=\"let row of svr.models;index as i\">\r\n\t\t<div>{{i}}</div>\r\n\t\t<div>{{row.Name}}</div>\r\n\t\t<div>{{row.Tables}}</div>\r\n\t</div> -->\r\n\t<div class=\"example-container mat-elevation-z4\">\r\n\t\t<table mat-table [dataSource]=\"svr.models\">\r\n\t\t\t<ng-container matColumnDef=\"index\">\r\n\t\t\t\t<th mat-header-cell *matHeaderCellDef> ID </th>\r\n\t\t\t\t<td mat-cell *matCellDef=\"let index = index\"> {{index + 1}} </td>\r\n\t\t\t</ng-container>\r\n\t\t\t<ng-container matColumnDef=\"Name\">\r\n\t\t\t <th mat-header-cell *matHeaderCellDef> Name </th>\r\n\t\t\t <td mat-cell *matCellDef=\"let element\"> {{element.Name}} </td>\r\n\t\t\t</ng-container>\r\n\t\t\t<ng-container matColumnDef=\"Tables\">\r\n\t\t\t <th mat-header-cell *matHeaderCellDef> Tables </th>\r\n\t\t\t <td mat-cell *matCellDef=\"let element\"> {{element.Tables}} </td>\r\n\t\t\t</ng-container>\r\n\t\t\t<tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\r\n\t\t\t<tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\r\n\t\t</table>\r\n\t</div>\r\n\t<div class=\"dumpType-button\">\r\n\t\t<button mat-flat-button color=\"primary\" (click)=\"dump()\">\u5BFC\u51FA</button>\r\n </div>\r\n</div>\r\n</ng-container>\r\n<ng-template #done>\r\n\t<!-- <div>\r\n\t\t\u4EFB\u52A1\u63D0\u4EA4\u5230\u540E\u53F0\uFF0C\u70B9\u51FB\r\n\t\t<a [routerLink]=\"taskURL\">\u4EFB\u52A1\u660E\u7EC6</a>\u67E5\u770B\u8FDB\u5EA6\r\n\t\t<button mat-button (click)=\"close()\">\u5173\u95ED</button>\r\n\t</div> -->\r\n\t<div class=\"prepare\">\r\n\t\t<div class=\"prepare-wrapper\">\r\n\t\t\t<div class=\"prepare-text\">\r\n\t\t\t\t\u4EFB\u52A1\u63D0\u4EA4\u5230\u540E\u53F0\uFF0C\u70B9\u51FB\r\n\t\t<a [routerLink]=\"taskURL\">\u4EFB\u52A1\u660E\u7EC6</a>\u67E5\u770B\u8FDB\u5EA6\r\n\t\t\t</div>\r\n\t\t\t<div class=\"btn\">\r\n\t\t\t\t<button mat-flat-button color=\"primary\" (click)=\"close()\">\u5173\u95ED</button>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n</ng-template>",
providers: [DumpInstitutionService],
styles: [":host{width:100%;height:100%}.dumpSystem-all{max-width:960px;margin:16px auto;padding:16px 24px;max-height:calc(100% - 32px);border-radius:4px;box-sizing:border-box;display:flex;flex-direction:column}.dumpSystem-all .dumpSystem-title{font-size:20px;font-weight:700;margin-bottom:16px}.dumpSystem-all .dumpSystem-dept{width:100%;display:flex;align-items:center;margin:8px 0}.dumpSystem-all .dumpSystem-dept .dumpSystem-dept-title{width:140px;font-size:14px}.dumpSystem-all .dumpSystem-dept .dumpSystem-dept-content{flex-grow:1;font-size:14px}.dumpSystem-all .dumpSystem-dept .dumpSystem-dept-content .mat-radio-button{margin-right:32px}.dumpSystem-all .dumpType-tips{margin:0 0 12px;font-size:12px}.dumpSystem-all .example-container{flex-grow:1;overflow-y:auto}.dumpSystem-all table{width:100%}.dumpSystem-all .dumpType-button{text-align:right;margin-top:16px;color:#fff}.prepare{display:flex;justify-content:center;align-items:center;width:100%;height:100%}.prepare .prepare-wrapper{width:624px;height:456px;margin-top:-60px;background:url(/front/assets/export/done.png) top center/300px 300px no-repeat;box-shadow:0 2px 5px 0 rgba(0,0,0,.14);box-sizing:border-box;border-radius:4px;display:flex;flex-direction:column;justify-content:flex-end}.prepare .prepare-wrapper .prepare-text{padding:16px 128px 0;font-size:16px}.prepare .prepare-wrapper .prepare-text a{font-weight:700}.prepare .prepare-wrapper .btn{width:100%;text-align:right;padding:35px 32px 25px 0;box-sizing:border-box}"]
}] }
];
/** @nocollapse */
DumpInstitutionComponent.ctorParameters = () => [
{ type: DumpInstitutionService },
{ type: ProjectService },
{ type: CurrentService },
{ type: TabsService },
{ type: ElementsService }
];
DumpInstitutionComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.c-dump-institution',] }]
};
if (false) {
/** @type {?} */
DumpInstitutionComponent.prototype.hostClass;
/** @type {?} */
DumpInstitutionComponent.prototype.displayedColumns;
/** @type {?} */
DumpInstitutionComponent.prototype.dumpTypeInstitution;
/** @type {?} */
DumpInstitutionComponent.prototype.dumpTypeData;
/** @type {?} */
DumpInstitutionComponent.prototype.dumpDone;
/** @type {?} */
DumpInstitutionComponent.prototype.taskURL;
/** @type {?} */
DumpInstitutionComponent.prototype.svr;
/**
* @type {?}
* @private
*/
DumpInstitutionComponent.prototype.project;
/** @type {?} */
DumpInstitutionComponent.prototype.current;
/**
* @type {?}
* @private
*/
DumpInstitutionComponent.prototype.tabs;
/**
* @type {?}
* @private
*/
DumpInstitutionComponent.prototype.eles;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
const ɵ0$e = SaveStateData;
class DumpInstitutionModule {
}
DumpInstitutionModule.decorators = [
{ type: NgModule, args: [{
declarations: [DumpInstitutionComponent],
imports: [
CommonModule,
MatFormFieldModule$1,
MatButtonModule,
MatTableModule,
MatRadioModule,
FormsModule,
RouterModule.forChild([{ path: '**', data: ɵ0$e, component: DumpInstitutionComponent }])
]
},] }
];
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @record
*/
function FetchDataResult() { }
if (false) {
/** @type {?} */
FetchDataResult.prototype.FromElement;
/** @type {?} */
FetchDataResult.prototype.Count;
}
/**
* @record
*/
function RemoveselResult() { }
if (false) {
/** @type {?} */
RemoveselResult.prototype.TaskInfoURL;
/** @type {?} */
RemoveselResult.prototype.TaskInfoSign;
/** @type {?} */
RemoveselResult.prototype.BrowseTaskElement;
}
class RemoveselComponent {
/**
* @param {?} api
*/
constructor(api) {
this.api = api;
this.hostClass = true;
}
/**
* @return {?}
*/
ngOnInit() { }
/**
* @return {?}
*/
apiFetchRemoveSelData() {
return this.api.get('fetch-data');
}
/**
* @return {?}
*/
apiRemovesel() {
return this.api.post('removesel');
}
}
RemoveselComponent.decorators = [
{ type: Component, args: [{
selector: 'common-removesel',
template: "<p>removesel works!!!</p>\n",
styles: [""]
}] }
];
/** @nocollapse */
RemoveselComponent.ctorParameters = () => [
{ type: CurrentApiService }
];
RemoveselComponent.propDecorators = {
hostClass: [{ type: HostBinding, args: ['class.c-removesel',] }]
};
if (false) {
/** @type {?} */
RemoveselComponent.prototype.hostClass;
/**
* @type {?}
* @private
*/
RemoveselComponent.prototype.api;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
const ɵ0$f = SaveStateData;
class RemoveselModule {
}
RemoveselModule.decorators = [
{ type: NgModule, args: [{
declarations: [RemoveselComponent],
imports: [
CommonModule,
RouterModule.forChild([
{
path: '**',
component: RemoveselComponent,
data: ɵ0$f
}
])
]
},] }
];
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
export { AppLoadService, CTRL_DUMP_INSTITUTION, CTRL_ELEMENT, CTRL_EXPORT, CTRL_IMPORT, CTRL_INDEX, CTRL_LOGIN, CTRL_NOTICE, CTRL_RECORDVIEW, CTRL_REMOVESEL, CTRL_ROLE, CTRL_TASK, CTRL_UPDATE, CTRL_USER, CTRL_USERINFO, CTRL_VERSION, CommonBillModule, DBWebCommonModule, DumpInstitutionModule, ElementModule, ExportModule, HomeComponent, ImportModule, IndexModule, LoginModule, NoticeModule, PageNotFoundComponent, PageNotFoundModule, RecordViewInnerModule, RecordViewModule, RemoveselModule, RoleModule, SetDeptModule, TaskModule, ThemeService, UpdateModule, UserModule, UserinfoModule, VersionModule, portraitDefault, HomeModule as ɵa, SetDeptComponent as ɵb, SetPropertyImportComponent as ɵba, ConditionalTemplateComponent as ɵbb, ProcessingListsComponent as ɵbc, SelectSettingComponent as ɵbd, SliderSettingComponent as ɵbe, RangeInputSettingComponent as ɵbf, SetPropertyBillComponent as ɵbg, SetPropertyUpdateComponent as ɵbj, SetParamsComponent as ɵbk, ListParamsComponent as ɵbl, ImportFieldComponent as ɵbm, ImportSetComponent as ɵbn, BillModule as ɵbo, BillComponent as ɵbp, BillCloneBackfaceService as ɵbq, BillFieldDirective as ɵbr, CloneComponent as ɵbs, TrueFalseValueDirective as ɵbt, ErrorMessageModule as ɵbu, ErrorMessageComponent as ɵbv, ViewDefineModule as ɵbw, ViewDefineComponent as ɵbx, IconSelectModule as ɵby, IconSelectComponent as ɵbz, SetDeptService as ɵc, LabelManagerModule as ɵca, LabelManagerComponent as ɵcb, LabelManagerService as ɵcc, CategoryComponent as ɵcd, LabelForEditComponent as ɵce, EditCategoryDialogComponent as ɵcf, EditLabelComponent as ɵcg, EditLabelService as ɵch, LabelHistoryComponent as ɵci, NodeModule as ɵcj, NodeComponent as ɵck, ConditionNodeComponent as ɵcl, ShowHistoryDialogModule as ɵcm, ShowHistoryDialogComponent as ɵcn, ExportComponent as ɵcp, exportAnimation as ɵcq, ExportService as ɵcr, TableModule as ɵcs, TableComponent as ɵct, ServiceService as ɵcu, ServiceData as ɵcv, BackFaceService as ɵcw, ProcessComponent as ɵcx, LabelSelectorModule as ɵcy, LabelSelectorComponent as ɵcz, HomeTabfunctionService as ɵd, ViewSelectorModule as ɵda, ViewSelectorComponent as ɵdb, LabelSelectModule as ɵdc, LabelSelectComponent as ɵdd, CategoryForSelectComponent as ɵde, RecordViewComponent as ɵdf, FooterToolbarComponent as ɵdg, LabelDrawerComponent as ɵdh, LabelDrawerForSelectComponent as ɵdi, LabelDrawerForEditComponent as ɵdj, ViewDrawerComponent as ɵdk, ConditionalTemplateRunnerComponent as ɵdl, CtRunnerInputComponent as ɵdm, CtRunnerSelectComponent as ɵdn, CtRunnerMultiSelectComponent as ɵdo, CtRunnerRangeInputComponent as ɵdp, CtRunnerSilderComponent as ɵdq, IndexComponent as ɵdr, IndexService as ɵds, WelcomeComponent as ɵdt, BannerComponent as ɵdu, NavigationComponent as ɵdv, DataListComponent as ɵdw, ChartComponent as ɵdx, SettingDialogComponent as ɵdy, CustomDateFormatter as ɵdz, TabsService as ɵe, CalendarComponent as ɵea, NoticeComponent as ɵeb, MoreVertComponent as ɵec, ImportComponent as ɵed, ImportService as ɵee, LoginComponent as ɵef, TaskComponent as ɵeg, TaskState as ɵeh, TaskService as ɵei, NewlinePipe as ɵej, VersionComponent as ɵek, UserinfoComponent as ɵel, PortraitEditComponent as ɵem, PortraitMaskComponent as ɵen, UpdateComponent as ɵeo, UpdateService as ɵep, CommonBillComponent as ɵeq, RoleComponent as ɵer, RoleBack as ɵes, UserComponent as ɵet, UserBack as ɵeu, NoticeComponent$1 as ɵev, DumpInstitutionComponent as ɵew, DumpInstitutionService as ɵex, RemoveselComponent as ɵey, HomeNavComponent as ɵf, NavtreeService as ɵg, NavHome as ɵh, MainNavService as ɵi, MenuComponent as ɵj, RouterTab as ɵk, RouterTabItem as ɵl, RouterTabComponent as ɵm, NavSelectionDeptComponent as ɵn, ConfirmDialogModule as ɵo, ConfirmDialogComponent as ɵp, PromptDialogModule as ɵq, PromptDialogComponent as ɵr, IconList as ɵs, ElementComponent as ɵt, ElementService as ɵu, ElementBackFace as ɵv, SetPropertyRecordviewComponent as ɵw, LabelMockBackfaceService as ɵx, EleViewBackFaceService as ɵy, ParamsRecordviewFetchSQLComponent as ɵz };
//# sourceMappingURL=dbweb-common.js.map