import { Injectable, ɵɵdefineInjectable, ɵɵinject, EventEmitter, Component, ElementRef, Output, Input, Pipe, NgModule } from '@angular/core';
import { DatePipe, CommonModule } from '@angular/common';
import { NzMessageService, NgZorroAntdModule } from 'ng-zorro-antd';
import { utils, write } from 'xlsx';
import { saveAs } from 'file-saver';
import { HttpClient } from '@angular/common/http';
import { isNil } from 'lodash';
import { BcacIconModule } from 'bcac-lib/base-component/currency/bcac-icon';
import { FormsModule } from '@angular/forms';

/**
 * @fileoverview added by tsickle
 * Generated from: table.service.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
class TableService {
    /**
     * @param {?} httpClient
     */
    constructor(httpClient) {
        this.httpClient = httpClient;
    }
    /**
     * @param {?} url
     * @param {?} method
     * @param {?} token
     * @param {?} param
     * @return {?}
     */
    accessInterface(url, method, token, param) {
        switch (method) {
            case "get":
                return this.httpClient.get(url, token);
            case "post":
                return this.httpClient.post(url, param, token);
            default:
                return this.httpClient.get(url, token);
        }
    }
}
TableService.decorators = [
    { type: Injectable, args: [{
                providedIn: 'root'
            },] }
];
/** @nocollapse */
TableService.ctorParameters = () => [
    { type: HttpClient }
];
/** @nocollapse */ TableService.ngInjectableDef = ɵɵdefineInjectable({ factory: function TableService_Factory() { return new TableService(ɵɵinject(HttpClient)); }, token: TableService, providedIn: "root" });
if (false) {
    /**
     * @type {?}
     * @private
     */
    TableService.prototype.httpClient;
}

/**
 * @fileoverview added by tsickle
 * Generated from: bcac-common-table/bcac-common-table.component.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
class BcacCommonTableComponent {
    /**
     * @param {?} nzMessageService
     * @param {?} elementRef
     * @param {?} tableService
     */
    constructor(nzMessageService, elementRef, tableService) {
        this.nzMessageService = nzMessageService;
        this.elementRef = elementRef;
        this.tableService = tableService;
        this.redColor = "#FF0000";
        this.greenColor = "#7ED320";
        this.yellowColor = "#f2dd21";
        this.grayColor = "#bab7b5";
        this.checkBoxEmit = new EventEmitter();
        this.tdClickEmit = new EventEmitter();
        this.tableSearchValue = "";
        this.tableloading = false;
        this.bcacAddEmit = new EventEmitter();
        this.bcacBatchDeleteEmit = new EventEmitter();
        this.BcacBatchDownloadEmit = new EventEmitter();
        // row operation
        this.bcacDetailEmit = new EventEmitter();
        this.bcacEditorEmit = new EventEmitter();
        this.bcacDeleteEmit = new EventEmitter();
        this.bcacReviewEmit = new EventEmitter();
        this.trClickConf = {
            open: false,
            activeColor: "#99CCCC",
        };
        this.activeTrId = null;
        this.trClickEmit = new EventEmitter();
        this.tableData = [];
        this.tableTitle = {
            show: true,
            label: "基础数据表",
        };
        // 右侧固定操作列
        this.rightFixedOperationColumn = "";
        this.colorRange = {};
        // @Input()
        this.tableIconRow = {
            show: true,
            iconDivider: true,
            // refreshIcon: {
            //   show: false,
            //   label: "刷新",
            // },
            addIcon: {
                show: true,
                label: "新增",
            },
            configIcon: {
                show: true,
                label: "设置",
            },
            deleteIcon: {
                show: true,
                label: "删除",
            },
            excelIcon: {
                show: true,
                label: "导出",
            },
            batchDownload: {
                show: true,
                label: "下载",
            },
            searchInput: {
                show: true
            },
            batchReview: {
                show: false,
                label: "批量审核"
            },
            batchDistributeOrder: {
                show: false,
                label: "批量派单"
            },
            batchTurnDown: {
                show: false,
                label: "批量驳回"
            },
            batchSubmit: {
                show: false,
                label: "批量提交"
            },
            batchImport: {
                show: false,
                label: "批量导入"
            },
            downTemplate: {
                show: false,
                label: "下载模板"
            },
            newUser: {
                show: false,
                label: "新建用户"
            },
            newRole: {
                show: false,
                label: "新建角色"
            },
        };
        this.bcacBatchDistributeOrderEmit = new EventEmitter();
        this.bcacNewRoleEmit = new EventEmitter();
        this.bcacNewUserEmit = new EventEmitter();
        this.bcacDownTemplateEmit = new EventEmitter();
        this.bcacBatchImportEmit = new EventEmitter();
        this.bcacBatchSubmitEmit = new EventEmitter();
        this.bcacBatchTurnDownEmit = new EventEmitter();
        this.bcacBatchReviewEmit = new EventEmitter();
        this.tableContent = {
            show: true,
            uniqueIndex: "rid",
            // tableData: [],
            pagination: {
                show: true,
                pageSize: 10,
                pageSizeOptions: [10, 20, 50, 100],
            },
            checkBox: {
                show: true,
                width: "3.8rem",
                checkField: "rid",
            },
            columnOptions: [],
            rowOperation: {
                show: true,
                label: "操作",
                width: "8rem",
                detailIcon: {
                    show: true,
                    label: "详情",
                },
                editorIcon: {
                    show: false,
                    label: "编辑",
                },
                deleteIcon: {
                    show: false,
                    label: "删除",
                },
                reviewIcon: {
                    show: false,
                    label: "审核"
                },
                reviewRecordIcon: {
                    show: false,
                    label: "审核记录"
                },
                previewIcon: {
                    show: false,
                    label: "预览"
                },
                downloadIcon: {
                    show: false,
                    label: "下载"
                },
                fillInIcon: {
                    show: false,
                    label: "填报"
                },
                submitIcon: {
                    show: false,
                    label: "提交"
                },
                turnDownIcon: {
                    show: false,
                    label: "驳回"
                },
                configIcon: {
                    show: false,
                    label: "设置"
                },
                distributeOrderIcon: {
                    show: false,
                    label: "派单"
                },
                clearIcon: {
                    show: false,
                    label: "清除"
                },
                receiveWorkOrderIcon: {
                    show: false,
                    label: "接单"
                },
                handleWorkOrderIcon: {
                    show: false,
                    label: "处理工单"
                },
                transferWorkOrderIcon: {
                    show: false,
                    label: "转派"
                },
                menuAuthorityIcon: {
                    show: false,
                    label: "菜单权限"
                }
            },
        };
        this.bcacRowHandleWorkOrderEmit = new EventEmitter();
        this.bcacRowTransferWorkOrderEmit = new EventEmitter();
        this.bcacRowReceiveWorkOrderEmit = new EventEmitter();
        this.bcacRowClearEmit = new EventEmitter();
        this.bcacRowDistributeOrderEmit = new EventEmitter();
        this.bcacRowConfigEmit = new EventEmitter();
        this.bcacRowSubmitEmit = new EventEmitter();
        this.bcacDownloadEmit = new EventEmitter();
        this.bcacFillInEmit = new EventEmitter();
        this.bcacPreviewEmit = new EventEmitter();
        this.bcacTurnDownEmit = new EventEmitter();
        this.bcacReviewRecordEmit = new EventEmitter();
        this.bcacMenuAuthorityEmit = new EventEmitter();
        // 分页函数
        this.isIndeterminate = false;
        this.isAllDisplayDataChecked = false;
        this.listOfDisplayData = [];
        this.mapOfCheckedId = {};
        //列操作排序容器
        this.mapOfSort = {};
        // sort事件
        this.sortName = null;
        this.sortValue = null;
        this.filterListOfMap = {};
        this.filterList = [];
        this.listOfFilterValueOfMap = {};
        this.searchDropMenuVisible = false;
        this.columnSearchValueMap = {};
        this.columnSearchList = [];
        this.isMulltipleData = false;
        this.tableSourceDatas = [];
        this.dataSelectWidth = "8rem";
        this.searchDropMenuVisibleMap = {};
        this.tableData_bak = [];
        this.allChecked = false;
        this.indeterminate = true;
        this.columnConfigPanelWidth = "14rem";
        this.switchLoadingMap = {};
        // testLabel="2010-12-12";
        this.testLabel2 = "-99";
    }
    /**
     * @param {?} field
     * @param {?} data
     * @return {?}
     */
    tdClick(field, data) {
        this.tdClickEmit.emit({
            field: field,
            data: data
        });
        console.log("tdClick", {
            field: field,
            data: data
        });
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacLoading(value) {
        this.tableloading = value;
    }
    /**
     * @return {?}
     */
    clickAdd() {
        this.bcacAddEmit.emit(1);
    }
    /**
     * @return {?}
     */
    clickBatchDelete() {
        /** @type {?} */
        let checkedIdList = [];
        for (let key in this.mapOfCheckedId) {
            if (this.mapOfCheckedId[key]) {
                checkedIdList.push(key);
            }
        }
        if (checkedIdList.length > 0) {
            this.bcacBatchDeleteEmit.emit(checkedIdList);
        }
        else {
            this.nzMessageService.info("无选中记录");
        }
    }
    /**
     * @return {?}
     */
    batchDownload() {
        /** @type {?} */
        let checkedIdList = [];
        for (let key in this.mapOfCheckedId) {
            if (this.mapOfCheckedId[key]) {
                checkedIdList.push(key);
            }
        }
        /** @type {?} */
        let checkedObjList = this.tableData.filter((/**
         * @param {?} element
         * @return {?}
         */
        element => checkedIdList.indexOf(element[this.tableContent.uniqueIndex] + "") > -1));
        // in语法有问题，舍弃in
        // let checkedObjList = this.tableData.filter(element=> (element[this.tableContent.uniqueIndex] + "") in checkedIdList);
        if (checkedObjList.length > 0) {
            this.BcacBatchDownloadEmit.emit(checkedObjList);
        }
        else {
            this.nzMessageService.info("无选中记录");
        }
    }
    /**
     * @param {?} data
     * @return {?}
     */
    clickDetail(data) {
        this.bcacDetailEmit.emit(data);
    }
    /**
     * @param {?} data
     * @return {?}
     */
    clickEditor(data) {
        this.bcacEditorEmit.emit(data);
    }
    /**
     * @param {?} data
     * @return {?}
     */
    clickDelete(data) {
        this.bcacDeleteEmit.emit(data);
    }
    /**
     * @param {?} data
     * @return {?}
     */
    clickReview(data) {
        this.bcacReviewEmit.emit(data);
    }
    /**
     * @param {?} data
     * @return {?}
     */
    trClick(data) {
        if (!this.trClickConf.open) {
            return;
        }
        if (this.activeTrId === null) {
            this.activeTrId = data[this.tableContent.uniqueIndex];
            this.trClickEmit.emit(data);
        }
        else {
            if (this.activeTrId === data[this.tableContent.uniqueIndex]) {
                this.activeTrId = null;
                this.trClickEmit.emit(null);
            }
            else {
                this.activeTrId = data[this.tableContent.uniqueIndex];
                this.trClickEmit.emit(data);
            }
        }
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacOpenTrClick(value) {
        this.trClickConf.open = true;
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacTrClickColor(value) {
        this.trClickConf.activeColor = value;
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacShowTitle(value) {
        this.tableTitle.show = true,
            this.tableTitle.label = value;
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacCloseTitle(value) {
        this.tableTitle.show = false;
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacRightFixedOperationColumn(value) {
        this.rightFixedOperationColumn = value;
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacShowBatchDistributeOrderIcon(value) {
        this.tableIconRow.batchDistributeOrder.show = true;
    }
    /**
     * @return {?}
     */
    clickBatchDistributeOrder() {
        /** @type {?} */
        let checkedObjList = this.getCheckedObj();
        if (checkedObjList.length > 0) {
            this.bcacBatchDistributeOrderEmit.emit(checkedObjList);
        }
        else {
            this.nzMessageService.info("无选中记录");
        }
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacCloseIconDivider(value) {
        this.tableIconRow.iconDivider = false;
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacShowNewRoleIcon(value) {
        this.tableIconRow.newRole.show = true;
    }
    /**
     * @return {?}
     */
    clickNewRole() {
        this.bcacNewRoleEmit.emit(1);
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacShowNewUserIcon(value) {
        this.tableIconRow.newUser.show = true;
    }
    /**
     * @return {?}
     */
    clickNewUser() {
        this.bcacNewUserEmit.emit(1);
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacShowDownTemplateIcon(value) {
        this.tableIconRow.downTemplate.show = true;
    }
    /**
     * @return {?}
     */
    clickDownTemplate() {
        this.bcacDownTemplateEmit.emit(1);
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacShowBatchImportIcon(value) {
        this.tableIconRow.batchImport.show = true;
    }
    /**
     * @return {?}
     */
    clickBatchImport() {
        this.bcacBatchImportEmit.emit(1);
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacShowBatchSubmitIcon(value) {
        this.tableIconRow.batchSubmit.show = true;
    }
    /**
     * @return {?}
     */
    clickBatchSubmit() {
        /** @type {?} */
        let checkedObjList = this.getCheckedObj();
        if (checkedObjList.length > 0) {
            this.bcacBatchSubmitEmit.emit(checkedObjList);
        }
        else {
            this.nzMessageService.info("无选中记录");
        }
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacShowBatchTurnDownIcon(value) {
        this.tableIconRow.batchTurnDown.show = true;
    }
    /**
     * @return {?}
     */
    clickBatchTurnDown() {
        /** @type {?} */
        let checkedIdList = [];
        for (let key in this.mapOfCheckedId) {
            if (this.mapOfCheckedId[key]) {
                checkedIdList.push(key);
            }
        }
        /** @type {?} */
        let checkedObjList = this.tableData.filter((/**
         * @param {?} element
         * @return {?}
         */
        element => checkedIdList.indexOf(element[this.tableContent.uniqueIndex] + "") > -1));
        // in语法有问题，舍弃in
        // let checkedObjList = this.tableData.filter(element=> (element[this.tableContent.uniqueIndex] + "") in checkedIdList);
        if (checkedObjList.length > 0) {
            this.bcacBatchTurnDownEmit.emit(checkedObjList);
        }
        else {
            this.nzMessageService.info("无选中记录");
        }
    }
    /**
     * @return {?}
     */
    getCheckedObj() {
        /** @type {?} */
        let checkedIdList = [];
        for (let key in this.mapOfCheckedId) {
            if (this.mapOfCheckedId[key]) {
                checkedIdList.push(key);
            }
        }
        /** @type {?} */
        let checkedObjList = this.tableData.filter((/**
         * @param {?} element
         * @return {?}
         */
        element => checkedIdList.indexOf(element[this.tableContent.uniqueIndex] + "") > -1));
        return checkedObjList;
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacShowBatchReviewIcon(value) {
        this.tableIconRow.batchReview.show = true;
    }
    /**
     * @return {?}
     */
    clickBatchReview() {
        /** @type {?} */
        let checkedIdList = [];
        for (let key in this.mapOfCheckedId) {
            if (this.mapOfCheckedId[key]) {
                checkedIdList.push(key);
            }
        }
        /** @type {?} */
        let checkedObjList = this.tableData.filter((/**
         * @param {?} element
         * @return {?}
         */
        element => checkedIdList.indexOf(element[this.tableContent.uniqueIndex] + "") > -1));
        // in语法有问题，舍弃in
        // let checkedObjList = this.tableData.filter(element=> (element[this.tableContent.uniqueIndex] + "") in checkedIdList);
        if (checkedObjList.length > 0) {
            this.bcacBatchReviewEmit.emit(checkedObjList);
        }
        else {
            this.nzMessageService.info("无选中记录");
        }
    }
    // @Input()
    // set bcacShowTableRefreshIcon(value) {
    //   this.tableIconRow.refreshIcon.show = true;
    // }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacCloseTableIcon(value) {
        this.tableIconRow.show = false;
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacCloseTableAddIcon(value) {
        this.tableIconRow.addIcon.show = false;
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacCloseTableConfigIcon(value) {
        this.tableIconRow.configIcon.show = false;
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacCloseTableDeleteIcon(value) {
        this.tableIconRow.deleteIcon.show = false;
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacCloseTableExcelIcon(value) {
        this.tableIconRow.excelIcon.show = false;
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacCloseBatchDownIcon(value) {
        this.tableIconRow.batchDownload.show = false;
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacCloseTableSearch(value) {
        this.tableIconRow.searchInput.show = false;
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacShowHandleWorkOrderRowIcon(value) {
        this.tableContent.rowOperation.handleWorkOrderIcon.show = true;
    }
    /**
     * @param {?} data
     * @return {?}
     */
    clickRowHandleWorkOrder(data) {
        this.bcacRowHandleWorkOrderEmit.emit(data);
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacShowTransferWorkOrderRowIcon(value) {
        this.tableContent.rowOperation.transferWorkOrderIcon.show = true;
    }
    /**
     * @param {?} data
     * @return {?}
     */
    clickRowTransferWorkOrder(data) {
        this.bcacRowTransferWorkOrderEmit.emit(data);
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacShowReceiveWorkOrderRowIcon(value) {
        this.tableContent.rowOperation.receiveWorkOrderIcon.show = true;
    }
    /**
     * @param {?} data
     * @return {?}
     */
    clickRowReceiveWorkOrder(data) {
        this.bcacRowReceiveWorkOrderEmit.emit(data);
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacShowClearRowIcon(value) {
        this.tableContent.rowOperation.clearIcon.show = true;
    }
    /**
     * @param {?} data
     * @return {?}
     */
    clickRowClear(data) {
        this.bcacRowClearEmit.emit(data);
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacShowDistributeOrderRowIcon(value) {
        this.tableContent.rowOperation.distributeOrderIcon.show = true;
    }
    /**
     * @param {?} data
     * @return {?}
     */
    clickRowDistributeOrder(data) {
        this.bcacRowDistributeOrderEmit.emit(data);
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacShowConfigRowIcon(value) {
        this.tableContent.rowOperation.configIcon.show = true;
    }
    /**
     * @param {?} data
     * @return {?}
     */
    clickRowConfig(data) {
        this.bcacRowConfigEmit.emit(data);
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacShowSubmitRowIcon(value) {
        this.tableContent.rowOperation.submitIcon.show = true;
    }
    /**
     * @param {?} data
     * @return {?}
     */
    clickRowSubmit(data) {
        this.bcacRowSubmitEmit.emit(data);
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacShowdownloadIcon(value) {
        this.tableContent.rowOperation.downloadIcon.show = true;
    }
    /**
     * @param {?} data
     * @return {?}
     */
    clickDownload(data) {
        this.bcacDownloadEmit.emit(data);
    }
    /**
     * @param {?} data
     * @return {?}
     */
    clickFillIn(data) {
        this.bcacFillInEmit.emit(data);
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacShowPreviewIcon(value) {
        this.tableContent.rowOperation.previewIcon.show = true;
    }
    /**
     * @param {?} data
     * @return {?}
     */
    clickPreview(data) {
        this.bcacPreviewEmit.emit(data);
    }
    /**
     * @param {?} data
     * @return {?}
     */
    clickTurnDown(data) {
        this.bcacTurnDownEmit.emit(data);
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacShowReviewRecordIcon(value) {
        this.tableContent.rowOperation.reviewRecordIcon.show = true;
    }
    /**
     * @param {?} data
     * @return {?}
     */
    clickReviewRecord(data) {
        this.bcacReviewRecordEmit.emit(data);
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacShowMenuAuthorityIcon(value) {
        this.tableContent.rowOperation.menuAuthorityIcon.show = true;
    }
    /**
     * @param {?} data
     * @return {?}
     */
    clickMenuAuthorityEmit(data) {
        this.bcacMenuAuthorityEmit.emit(data);
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacShowReviewIcon(value) {
        this.tableContent.rowOperation.reviewIcon.show = true;
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacShowTurnDownRowIcon(value) {
        this.tableContent.rowOperation.turnDownIcon.show = true;
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacColumnOptions(value) {
        this.tableContent.columnOptions = value;
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacCloseRowOperation(value) {
        this.tableContent.rowOperation.show = false;
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacRowOperationWidth(value) {
        this.tableContent.rowOperation.width = value;
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacCloseDetailRowIcon(value) {
        this.tableContent.rowOperation.detailIcon.show = false;
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacShowEditorRowIcon(value) {
        this.tableContent.rowOperation.editorIcon.show = true;
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacShowDeleteRowIcon(value) {
        this.tableContent.rowOperation.deleteIcon.show = true;
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacShowFillInRowIcon(value) {
        this.tableContent.rowOperation.fillInIcon.show = true;
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacUniqueIndex(value) {
        this.tableContent.uniqueIndex = value;
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacClosePagination(value) {
        this.tableContent.pagination.show = false;
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacPageSize(value) {
        this.tableContent.pagination.pageSize = value;
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacPageSizeOptions(value) {
        this.tableContent.pagination.pageSizeOptions = value;
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacCloseCheckBox(value) {
        this.tableContent.checkBox.show = false;
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacCheckBoxWidth(value) {
        this.tableContent.checkBox.width = value;
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacCheckField(value) {
        this.tableContent.checkBox.checkField = value;
    }
    /**
     * @param {?} $event
     * @return {?}
     */
    currentPageDataChange($event) {
        this.listOfDisplayData = $event;
        this.refreshStatus();
    }
    /**
     * @return {?}
     */
    refreshStatus() {
        this.isAllDisplayDataChecked = this.listOfDisplayData.every((/**
         * @param {?} item
         * @return {?}
         */
        (item) => this.mapOfCheckedId[item[this.tableContent.uniqueIndex]]));
        this.isIndeterminate =
            this.listOfDisplayData.some((/**
             * @param {?} item
             * @return {?}
             */
            (item) => this.mapOfCheckedId[item[this.tableContent.uniqueIndex]])) && !this.isAllDisplayDataChecked;
        this.checkBoxEmit.emit(this.mapOfCheckedId);
    }
    /**
     * @param {?} value
     * @return {?}
     */
    checkAll(value) {
        this.listOfDisplayData.forEach((/**
         * @param {?} item
         * @return {?}
         */
        (item) => (this.mapOfCheckedId[item[this.tableContent.uniqueIndex]] = value)));
        this.refreshStatus();
    }
    /**
     * @return {?}
     */
    initMapOfSort() {
        this.tableContent.columnOptions.forEach((/**
         * @param {?} element
         * @return {?}
         */
        (element) => {
            /** @type {?} */
            let column = element.value;
            this.mapOfSort[column] = null;
        }));
    }
    /**
     * @param {?} sortName
     * @param {?} value
     * @return {?}
     */
    sort(sortName, value) {
        this.sortName = sortName; //排序字段
        this.sortValue = value; //排序方式
        // 互斥排序模式
        for (const key in this.mapOfSort) {
            this.mapOfSort[key] = key === sortName ? value : null;
        }
        this.search();
    }
    /**
     * @return {?}
     */
    initFilterListMapBak() {
        this.tableContent.columnOptions.forEach((/**
         * @param {?} element
         * @return {?}
         */
        (element) => {
            /** @type {?} */
            let list = Array.from(new Set(this.tableData.map((/**
             * @param {?} item
             * @return {?}
             */
            (item) => item[element.value])))).map((/**
             * @param {?} e
             * @return {?}
             */
            (e) => {
                if (element.tdType == "nzBadge" || element.tdType == "bgColor" || element.tdType == "bgColorCustom") {
                    return { text: element.tooltipMap[e], value: e };
                }
                else {
                    return { text: e, value: e };
                }
            }));
            /** @type {?} */
            let column = element.value;
            this.filterListOfMap[column] = list;
            this.filterList.push(column);
            this.listOfFilterValueOfMap[column] = [];
        }));
    }
    /**
     * @return {?}
     */
    initFilterListMap() {
        this.initFilter = [];
        this.tableContent.columnOptions.forEach((/**
         * @param {?} element
         * @return {?}
         */
        (element) => {
            /** @type {?} */
            let list = Array.from(new Set(this.tableData.map((/**
             * @param {?} item
             * @return {?}
             */
            (item) => item[element.value])))).map((/**
             * @param {?} e
             * @return {?}
             */
            (e) => {
                /** @type {?} */
                let df = false;
                if (Boolean(element.dafaultFilter) && element.showFilter) {
                    df = element.dafaultFilter.includes(e);
                    this.initFilter.push({
                        filed: element.value,
                        event: element.dafaultFilter
                    });
                }
                if (element.tdType == "nzBadge" || element.tdType == "bgColor" || element.tdType == "bgColorCustom") {
                    return { text: element.tooltipMap[e], value: e, byDefault: df };
                }
                else {
                    return { text: e, value: e, byDefault: df };
                }
            }));
            /** @type {?} */
            let column = element.value;
            this.filterListOfMap[column] = list;
            this.filterList.push(column);
            this.listOfFilterValueOfMap[column] = [];
        }));
        this.initFilter = this.remove_duplicate(this.initFilter);
    }
    //去重
    /**
     * @param {?} oldlist
     * @return {?}
     */
    remove_duplicate(oldlist) {
        /** @type {?} */
        let newlist = {};
        return oldlist.reduce((/**
         * @param {?} p
         * @param {?} c
         * @return {?}
         */
        (p, c) => {
            newlist[c.filed] ? '' : newlist[c.filed] = true && p.push(c);
            return p;
        }), []);
    }
    /**
     * @param {?} event
     * @param {?} field
     * @return {?}
     */
    filter(event, field) {
        this.listOfFilterValueOfMap[field] = event;
        this.search();
    }
    /**
     * @return {?}
     */
    initColumnSearchValueMap() {
        this.tableContent.columnOptions.forEach((/**
         * @param {?} element
         * @return {?}
         */
        (element) => {
            /** @type {?} */
            let column = element.value;
            this.columnSearchValueMap[column] = "";
            this.columnSearchList.push(column);
        }));
    }
    /**
     * @param {?} value
     * @return {?}
     */
    reset(value) {
        this.columnSearchValueMap[value] = "";
        this.search();
    }
    // checkedcol = [];
    /**
     * @param {?} value
     * @return {?}
     */
    columnCheckChange(value) {
        // this.checkedcol = this.tableContent.columnOptions
        //   .filter((e) => e.checked === true)
        //   .map((e) => e.value);
    }
    /**
     * @return {?}
     */
    deleteRowCancel() {
        // this.nzMessageService.info("点击取消");
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacOpenMultipleData(value) {
        this.isMulltipleData = true;
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set bcacDataSelectWidth(value) {
        this.dataSelectWidth = value;
    }
    /**
     * @param {?} data
     * @return {?}
     */
    selectValueChange(data) {
        this.tableData = data;
        this.tableDataInit();
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set tabledatas(value) {
        if (this.isMulltipleData) {
            this.tableSourceDatas = value;
            if (this.tableSourceDatas.length > 0) {
                this.selectValue = this.tableSourceDatas[0].value;
                this.tableData = this.selectValue;
                this.tableDataInit();
            }
        }
        else {
            this.tableData = value;
            this.tableDataInit();
        }
    }
    /**
     * @return {?}
     */
    initTableSearchValue() {
        this.tableSearchValue = "";
    }
    /**
     * @return {?}
     */
    ngOnInit() {
        this.tableDataInit();
        for (const item of this.initFilter) {
            this.filter(item.event, item.filed);
        }
    }
    /**
     * @param {?} changes
     * @return {?}
     */
    ngOnChanges(changes) {
        if (changes.tabledatas
            && changes.tabledatas.currentValue
            && changes.tabledatas.currentValue.length) {
            for (const item of this.initFilter) {
                this.filter(item.event, item.filed);
            }
        }
    }
    /**
     * @return {?}
     */
    tableDataInit() {
        this.tableData_bak = this.tableData;
        // this.checkedcol = this.tableContent.columnOptions
        //   .filter((e) => e.checked === true)
        //   .map((e) => e.value);
        this.initTableSearchValue();
        this.initMapOfSort();
        this.initFilterListMap();
        this.initColumnSearchValueMap();
        this.initSearchDropMenuVisibleMap();
    }
    /**
     * @return {?}
     */
    initSearchDropMenuVisibleMap() {
        this.tableContent.columnOptions.forEach((/**
         * @param {?} element
         * @return {?}
         */
        (element) => {
            /** @type {?} */
            let column = element.value;
            this.searchDropMenuVisibleMap[column] = false;
        }));
    }
    /**
     * @return {?}
     */
    search() {
        //列选择过滤搜索函数
        /** @type {?} */
        const filterFunc = (/**
         * @param {?} item
         * @return {?}
         */
        (item) => {
            /** @type {?} */
            let filterResult = true;
            for (let i = 0; i < this.filterList.length; i++) {
                /** @type {?} */
                let column = this.filterList[i];
                if (this.listOfFilterValueOfMap[column].length &&
                    this.listOfFilterValueOfMap[column].every((/**
                     * @param {?} name
                     * @return {?}
                     */
                    (name) => String(item[column]).indexOf(name) === -1))) {
                    filterResult = false;
                    break;
                }
            }
            return filterResult;
        });
        /** @type {?} */
        const filterFuncAll = (/**
         * @param {?} item
         * @return {?}
         */
        (item) => {
            /** @type {?} */
            let filterAllResult = false;
            for (let i = 0; i < this.tableContent.columnOptions.length; i++) {
                /** @type {?} */
                let column = this.tableContent.columnOptions[i].value;
                if (item[column] &&
                    new String(item[column]).indexOf(this.tableSearchValue) !== -1) {
                    filterAllResult = true;
                    break;
                }
            }
            return filterAllResult;
        });
        // 列模糊搜索函数
        /** @type {?} */
        const singleColumnSearch = (/**
         * @param {?} item
         * @return {?}
         */
        (item) => {
            /** @type {?} */
            let columnSearchResult = true;
            for (let i = 0; i < this.columnSearchList.length; i++) {
                /** @type {?} */
                let column = this.columnSearchList[i];
                if (this.columnSearchValueMap[column] &&
                    new String(item[column]).indexOf(this.columnSearchValueMap[column]) === -1) {
                    columnSearchResult = false;
                    break;
                }
            }
            return columnSearchResult;
        });
        /** @type {?} */
        const complexFilter = (/**
         * @param {?} item
         * @return {?}
         */
        (item) => {
            return (filterFunc(item) && filterFuncAll(item) && singleColumnSearch(item));
        });
        /** @type {?} */
        let filterData = this.tableData_bak;
        filterData = this.tableData_bak.filter((/**
         * @param {?} item
         * @return {?}
         */
        (item) => complexFilter(item)));
        // if ((this.listOfSearchMnName.length || this.listOfSearchAdmin.length) || this.searchValue || this.addrSearchValue) {
        // } else {
        //   filterData = this.tableData_bak.filter((item)=> item);
        // }
        if (this.sortValue != null) {
            this.tableData = filterData.sort((/**
             * @param {?} a
             * @param {?} b
             * @return {?}
             */
            (a, b) => 
            // this.sortValue === "ascend"
            //   ? a[this.sortName!] > b[this.sortName!]
            //     ? 1
            //     : -1
            //   : b[this.sortName!] > a[this.sortName!]
            //   ? 1
            //   : -1
            this.sortValue === "ascend"
                ? isNaN(a[(/** @type {?} */ (this.sortName))] - b[(/** @type {?} */ (this.sortName))]) ? a[(/** @type {?} */ (this.sortName))] > b[(/** @type {?} */ (this.sortName))] ? 1 : -1 : a[(/** @type {?} */ (this.sortName))] - b[(/** @type {?} */ (this.sortName))] > 0 ? 1 : -1
                : isNaN(b[(/** @type {?} */ (this.sortName))] - a[(/** @type {?} */ (this.sortName))]) ? b[(/** @type {?} */ (this.sortName))] > a[(/** @type {?} */ (this.sortName))] ? 1 : -1 : b[(/** @type {?} */ (this.sortName))] - a[(/** @type {?} */ (this.sortName))] > 0 ? 1 : -1));
        }
        else {
            this.tableData = filterData;
        }
        this.searchDropMenuVisible = false;
        // this.nzModalService.closeAll();
        // this.addrSearchDropMenuVisible=false;
    }
    /**
     * @return {?}
     */
    updateAllChecked() {
        this.indeterminate = false;
        if (this.allChecked) {
            this.tableContent.columnOptions = this.tableContent.columnOptions.map((/**
             * @param {?} item
             * @return {?}
             */
            (item) => {
                return Object.assign({}, item, { checked: true });
            }));
        }
        else {
            this.tableContent.columnOptions = this.tableContent.columnOptions.map((/**
             * @param {?} item
             * @return {?}
             */
            (item) => {
                return Object.assign({}, item, { checked: false });
            }));
        }
        // this.checkedcol = this.tableContent.columnOptions
        //   .filter((e) => e.checked === true)
        //   .map((e) => e.value);
    }
    /**
     * @return {?}
     */
    updateSingleChecked() {
        if (this.tableContent.columnOptions.every((/**
         * @param {?} item
         * @return {?}
         */
        (item) => !item.checked))) {
            this.allChecked = false;
            this.indeterminate = false;
        }
        else if (this.tableContent.columnOptions.every((/**
         * @param {?} item
         * @return {?}
         */
        (item) => item.checked))) {
            this.allChecked = true;
            this.indeterminate = false;
        }
        else {
            this.indeterminate = true;
        }
    }
    /**
     * @return {?}
     */
    exportExcel() {
        /** @type {?} */
        let exportData = [];
        /** @type {?} */
        let tempData = [];
        if (this.tableContent.checkBox.show) {
            /** @type {?} */
            let checkedIdList = [];
            for (let key in this.mapOfCheckedId) {
                if (this.mapOfCheckedId[key]) {
                    checkedIdList.push(key);
                }
            }
            /** @type {?} */
            let checkedObjList = this.tableData.filter((/**
             * @param {?} element
             * @return {?}
             */
            element => checkedIdList.indexOf(element[this.tableContent.uniqueIndex] + "") > -1));
            tempData = checkedObjList;
        }
        else {
            tempData = this.tableData;
        }
        tempData.forEach((/**
         * @param {?} element
         * @return {?}
         */
        (element) => {
            /** @type {?} */
            let dataObj = {};
            this.tableContent.columnOptions.forEach((/**
             * @param {?} column
             * @return {?}
             */
            (column) => {
                if (column.checked) {
                    dataObj[column.label] = element[column.value];
                }
            }));
            exportData.push(dataObj);
        }));
        if (exportData.length === 0) {
            /** @type {?} */
            let dataObj = {};
            this.tableContent.columnOptions.forEach((/**
             * @param {?} column
             * @return {?}
             */
            (column) => {
                if (column.checked) {
                    dataObj[column.label] = "";
                }
            }));
            exportData.push(dataObj);
        }
        /** @type {?} */
        const worksheet = utils.json_to_sheet(exportData);
        /** @type {?} */
        const workbook = {
            Sheets: { data: worksheet },
            SheetNames: ["data"],
        };
        /** @type {?} */
        const excelBuffer = write(workbook, {
            bookType: "xlsx",
            type: "array",
        });
        /** @type {?} */
        const blob = new Blob([excelBuffer], {
            type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8",
        });
        if (this.tableTitle.label) {
            saveAs(blob, this.tableTitle.label);
        }
        else {
            saveAs(blob, "数据表");
        }
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set columnConfigWidth(value) {
        this.columnConfigPanelWidth = value;
    }
    /**
     * @param {?} value
     * @return {?}
     */
    switchChange(value) {
        console.log("value", value);
    }
    /**
     * @param {?} data
     * @param {?} index
     * @param {?} field
     * @param {?} switchInfo
     * @return {?}
     */
    clickSwitch(data, index, field, switchInfo) {
        this.switchLoadingMap[index + field] = true;
        this.tableService.accessInterface(switchInfo.interfaceUrl, switchInfo.method, switchInfo.token, data)
            .subscribe((/**
         * @param {?} res
         * @return {?}
         */
        (res) => {
            this.switchLoadingMap[index + field] = false;
            data[field] = !data[field];
        }), (/**
         * @param {?} error
         * @return {?}
         */
        error => {
            this.nzMessageService.error("操作失败");
            this.switchLoadingMap[index + field] = false;
        }));
    }
    /**
     * @param {?} value
     * @param {?} item
     * @return {?}
     */
    getGradientColor(value, item) {
        if (!isNil(value)) {
            /** @type {?} */
            let colorIndex = 0;
            if (+value - (+item.colorMap.valueRange[0]) >= 0 && (+value - (+item.colorMap.valueRange[0])) < 1) {
                colorIndex = Math.floor((+value - item.colorMap.valueRange[0]) * 100);
            }
            else {
                colorIndex = Number(Number(value).toFixed(0)) - Number(item.colorMap.valueRange[0]);
            }
            // let colorIndex = Number(Number(value).toFixed(0)) - Number(item.colorMap.valueRange[0]);
            if (isNil(this.colorRange[item.value])) {
                this.colorRange[item.value] = [];
                /** @type {?} */
                let step = 0;
                if (+item.colorMap.valueRange[1] - (+item.colorMap.valueRange[0]) >= 0 && (+item.colorMap.valueRange[1] - (+item.colorMap.valueRange[0])) < 1) {
                    step = Math.floor((+item.colorMap.valueRange[1] - (+item.colorMap.valueRange[0])) * 100 / (item.colorMap.colorRange.length - 1));
                }
                else {
                    step = Math.round((Number(item.colorMap.valueRange[1]) - Number(item.colorMap.valueRange[0])) / (item.colorMap.colorRange.length - 1));
                }
                // step = Math.round((Number(item.colorMap.valueRange[1]) - Number(item.colorMap.valueRange[0]))/(item.colorMap.colorRange.length - 1));
                for (let i = 0; i < item.colorMap.colorRange.length - 1; i++) {
                    this.colorRange[item.value] = this.colorRange[item.value].concat(this.gradient(item.colorMap.colorRange[i], item.colorMap.colorRange[i + 1], step));
                }
            }
            if (colorIndex > this.colorRange[item.value].length - 1 || +value > +item.colorMap.valueRange[1]) {
                return this.colorRange[item.value][this.colorRange[item.value].length - 1];
            }
            else if (colorIndex < 0) {
                return this.colorRange[item.value][0];
            }
            else {
                return this.colorRange[item.value][colorIndex];
            }
        }
        else {
            return "";
        }
    }
    /**
     * @param {?} startColor
     * @param {?} endColor
     * @param {?} step
     * @return {?}
     */
    gradient(startColor, endColor, step) {
        /** @type {?} */
        let startRGB = this.colorRgb(startColor);
        //转换为rgb数组模式
        /** @type {?} */
        let startR = startRGB[0];
        /** @type {?} */
        let startG = startRGB[1];
        /** @type {?} */
        let startB = startRGB[2];
        /** @type {?} */
        let endRGB = this.colorRgb(endColor);
        /** @type {?} */
        let endR = endRGB[0];
        /** @type {?} */
        let endG = endRGB[1];
        /** @type {?} */
        let endB = endRGB[2];
        /** @type {?} */
        let sR = (endR - startR) / step;
        //总差值
        /** @type {?} */
        let sG = (endG - startG) / step;
        /** @type {?} */
        let sB = (endB - startB) / step;
        /** @type {?} */
        var colorArr = [];
        for (var i = 0; i < step; i++) {
            //计算每一步的hex值
            /** @type {?} */
            var hex = this.colorHex('rgb(' + parseInt((sR * i + startR)) + ',' + parseInt((sG * i + startG)) + ',' + parseInt((sB * i + startB)) + ')');
            colorArr.push(hex);
        }
        return colorArr;
    }
    /**
     * @param {?} sColor
     * @return {?}
     */
    colorRgb(sColor) {
        /** @type {?} */
        var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
        /** @type {?} */
        var sColor = sColor.toLowerCase();
        if (sColor && reg.test(sColor)) {
            if (sColor.length === 4) {
                /** @type {?} */
                var sColorNew = "#";
                for (var i = 1; i < 4; i += 1) {
                    sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
                }
                sColor = sColorNew;
            }
            //处理六位的颜色值
            /** @type {?} */
            var sColorChange = [];
            for (var i = 1; i < 7; i += 2) {
                sColorChange.push(parseInt("0x" + sColor.slice(i, i + 2)));
            }
            return sColorChange;
        }
        else {
            return sColor;
        }
    }
    ;
    /**
     * @param {?} rgb
     * @return {?}
     */
    colorHex(rgb) {
        /** @type {?} */
        var _this = rgb;
        /** @type {?} */
        var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
        if (/^(rgb|RGB)/.test(_this)) {
            /** @type {?} */
            var aColor = _this.replace(/(?:(|)|rgb|RGB)*/g, "").split(",");
            /** @type {?} */
            var strHex = "#";
            for (var i = 0; i < aColor.length; i++) {
                /** @type {?} */
                var hex = Number(aColor[i]).toString(16);
                hex = hex < '10' ? 0 + '' + hex : hex; // 保证每个rgb的值为2位
                if (hex === "0") {
                    hex += hex;
                }
                strHex += hex;
            }
            if (strHex.length !== 7) {
                strHex = _this;
            }
            return strHex;
        }
        else if (reg.test(_this)) {
            /** @type {?} */
            var aNum = _this.replace(/#/, "").split("");
            if (aNum.length === 6) {
                return _this;
            }
            else if (aNum.length === 3) {
                /** @type {?} */
                var numHex = "#";
                for (var i = 0; i < aNum.length; i += 1) {
                    numHex += (aNum[i] + aNum[i]);
                }
                return numHex;
            }
        }
        else {
            return _this;
        }
    }
    /**
     * @param {?} data
     * @return {?}
     */
    getTrClickBackgroundColor(data) {
        if (this.trClickConf.open) {
            if (this.activeTrId === data[this.tableContent.uniqueIndex]) {
                return {
                    'background-color': this.trClickConf.activeColor
                };
            }
            else {
                return {};
            }
        }
        else {
            return {};
        }
    }
    // 获取 强调显示的值
    /**
     * @param {?} data
     * @param {?} emphasisValue
     * @return {?}
     */
    getEmphasisColor(data, emphasisValue) {
        if (!isNil(emphasisValue)) {
            if (typeof (emphasisValue) === 'string') {
                if (data === emphasisValue) {
                    return this.redColor;
                }
            }
            else if (emphasisValue instanceof Array) {
                if (emphasisValue.includes(data)) {
                    return this.redColor;
                }
            }
        }
    }
}
BcacCommonTableComponent.decorators = [
    { type: Component, args: [{
                selector: "bcac-common-table",
                template: "<div class=\"table-card\">\r\n    <div *ngIf=\"tableTitle.show\" class=\"table-header\" nz-row>\r\n        <div nz-col nzSpan=\"14\" class=\"table-title-label\">{{tableTitle.label}}\r\n        </div>\r\n        <div nz-col nzSpan=\"10\" *ngIf=\"tableIconRow.show\" class=\"table-icon-row\">\r\n            <nz-select *ngIf=\"isMulltipleData\" nzSize=\"small\" (ngModelChange)=\"selectValueChange($event)\"\r\n                [(ngModel)]=\"selectValue\" [style.width]=\"dataSelectWidth\">\r\n                <nz-option *ngFor=\"let item of tableSourceDatas\" [nzLabel]=\"item.label\" [nzValue]=\"item.value\">\r\n                </nz-option>\r\n            </nz-select>\r\n            <!-- <bcac-icon *ngIf=\"tableIconRow.refreshIcon.show\" iconType=\"refresh\"\r\n                [tooltipTitle]=\"tableIconRow.refreshIcon.label\" (click)=\"refreshData()\"></bcac-icon> -->\r\n            <bcac-icon *ngIf=\"tableIconRow.configIcon.show\" iconType=\"config\"\r\n                [tooltipTitle]=\"tableIconRow.configIcon.label\" nz-dropdown nzTrigger=\"click\"\r\n                [nzDropdownMenu]=\"configDropDown\" nzPlacement=\"bottomLeft\">\r\n                <nz-dropdown-menu #configDropDown=\"nzDropdownMenu\">\r\n                    <div class=\"columnConfigPanel\" [style.width]=\"columnConfigPanelWidth\">\r\n                        <label nz-checkbox [(ngModel)]=\"allChecked\" (ngModelChange)=\"updateAllChecked()\"\r\n                            [nzIndeterminate]=\"indeterminate\">\r\n                            \u5168\u9009\r\n                        </label>\r\n                        <nz-divider style=\"margin: 0.2rem\"></nz-divider>\r\n                        <nz-checkbox-group [(ngModel)]=\"tableContent.columnOptions\"\r\n                            (ngModelChange)=\"columnCheckChange($event)\">\r\n                        </nz-checkbox-group>\r\n                    </div>\r\n                </nz-dropdown-menu>\r\n            </bcac-icon>\r\n            <bcac-icon *ngIf=\"tableIconRow.addIcon.show\" iconType=\"add\" [tooltipTitle]=\"tableIconRow.addIcon.label\"\r\n                (click)=\"clickAdd()\">\r\n            </bcac-icon>\r\n            <bcac-icon *ngIf=\"tableIconRow.newUser.show\" iconType=\"new_user\" [tooltipTitle]=\"tableIconRow.newUser.label\"\r\n                (click)=\"clickNewUser()\">\r\n            </bcac-icon>\r\n            <bcac-icon *ngIf=\"tableIconRow.newRole.show\" iconType=\"new_role\" [tooltipTitle]=\"tableIconRow.newRole.label\"\r\n                (click)=\"clickNewRole()\">\r\n            </bcac-icon>\r\n            <bcac-icon *ngIf=\"tableIconRow.deleteIcon.show\" iconType=\"delete\"\r\n                [tooltipTitle]=\"tableIconRow.deleteIcon.label\" nz-popconfirm nzPopconfirmTitle=\"\u786E\u8BA4\u5220\u9664?\"\r\n                (nzOnConfirm)=\"clickBatchDelete()\" nzPopconfirmPlacement=\"top\">\r\n            </bcac-icon>\r\n            <bcac-icon *ngIf=\"tableIconRow.batchSubmit.show\" iconType=\"submit\"\r\n                [tooltipTitle]=\"tableIconRow.batchSubmit.label\" (click)=\"clickBatchSubmit()\"></bcac-icon>\r\n            <bcac-icon *ngIf=\"tableIconRow.batchReview.show\" iconType=\"review\"\r\n                [tooltipTitle]=\"tableIconRow.batchReview.label\" (click)=\"clickBatchReview()\"></bcac-icon>\r\n            <bcac-icon *ngIf=\"tableIconRow.batchDistributeOrder.show\" iconType=\"distribute_order\"\r\n                [tooltipTitle]=\"tableIconRow.batchDistributeOrder.label\" (click)=\"clickBatchDistributeOrder()\">\r\n            </bcac-icon>\r\n            <bcac-icon *ngIf=\"tableIconRow.batchTurnDown.show\" iconType=\"turn_down\"\r\n                [tooltipTitle]=\"tableIconRow.batchTurnDown.label\" (click)=\"clickBatchTurnDown()\"></bcac-icon>\r\n            <nz-divider *ngIf=\"tableIconRow.iconDivider\" nzType=\"vertical\"\r\n                style=\"background: #8e8e8e; margin: 0rem 0.4rem;\"></nz-divider>\r\n            <bcac-icon *ngIf=\"tableIconRow.excelIcon.show\" iconType=\"excel_out\"\r\n                [tooltipTitle]=\"tableIconRow.excelIcon.label\" (click)=\"exportExcel()\"></bcac-icon>\r\n            <bcac-icon *ngIf=\"tableIconRow.batchDownload.show\" iconType=\"batch_download\"\r\n                [tooltipTitle]=\"tableIconRow.batchDownload.label\" (click)=\"batchDownload()\"></bcac-icon>\r\n            <bcac-icon *ngIf=\"tableIconRow.batchImport.show\" iconType=\"import\"\r\n                [tooltipTitle]=\"tableIconRow.batchImport.label\" (click)=\"clickBatchImport()\"></bcac-icon>\r\n            <bcac-icon *ngIf=\"tableIconRow.downTemplate.show\" iconType=\"template_download\"\r\n                [tooltipTitle]=\"tableIconRow.downTemplate.label\" (click)=\"clickDownTemplate()\"></bcac-icon>\r\n            <span>&nbsp;</span>\r\n            <input *ngIf=\"tableIconRow.searchInput.show\" type=\"text\" nzSize=\"small\" nz-input placeholder=\"\u641C\u7D22\"\r\n                [(ngModel)]=\"tableSearchValue\" (ngModelChange)='search()' />\r\n        </div>\r\n    </div>\r\n    <div *ngIf=\"tableContent.show\" class=\"table-content\">\r\n        <nz-table #tableDatas [nzData]=\"tableData\" nzSize=\"small\" nzBordered [nzShowTotal]=\"rangeTemplate\"\r\n            [nzPageSize]=\"tableContent.pagination.pageSize\" [nzLoading]=\"tableloading\"\r\n            [nzPageSizeOptions]=\"tableContent.pagination.pageSizeOptions\"\r\n            [nzFrontPagination]=\"tableContent.pagination.show\" [nzShowPagination]=\"tableContent.pagination.show\"\r\n            [nzShowSizeChanger]=\"tableContent.pagination.show\" (nzCurrentPageDataChange)=\"currentPageDataChange($event)\"\r\n            [nzScroll]=\"{ x:'100%'}\">\r\n            <thead>\r\n                <tr class=\"table-thead-tr\">\r\n                    <th *ngIf=\"tableContent.checkBox.show\" nzShowCheckbox [nzIndeterminate]=\"isIndeterminate\"\r\n                        (nzCheckedChange)=\"checkAll($event)\" [(nzChecked)]=\"isAllDisplayDataChecked\"\r\n                        [nzWidth]=\"tableContent.checkBox.width\"></th>\r\n                    <ng-container *ngFor=\"let item of tableContent.columnOptions\">\r\n                        <th *ngIf=\"item.checked\" [nzWidth]=\"item.width\" [nzShowSort]=\"item.showSort\"\r\n                            [(nzSort)]=\"mapOfSort[item.value]\" (nzSortChange)=\"sort(item.value, $event)\"\r\n                            [nzShowFilter]=\"item.showFilter\" [nzFilters]=\"filterListOfMap[item.value]\"\r\n                            (nzFilterChange)=\"filter($event, item.value)\" nzCustomFilter=\"item.showCustomFilter\">\r\n                            {{item.label}}\r\n                            <span\u00A0class=\"overline\">{{item.overline}}</span><sub>{{item.labelSub}}</sub>\r\n                            <span *ngIf=\"item.unit\" class=\"th-unit\">({{item.unit}})</span>\r\n                            <i *ngIf=\"item.showCustomFilter\" nz-th-extra class=\"ant-table-filter-icon\" nz-icon\r\n                                nz-dropdown #dropdown=\"nzDropdown\" nzType=\"search\" [nzDropdownMenu]=\"searchDropMenu\"\r\n                                [(nzVisible)]=\"searchDropMenuVisibleMap[item.value]\"\r\n                                [class.ant-table-filter-open]=\"dropdown.nzVisible\" nzTrigger=\"click\"\r\n                                nzPlacement=\"bottomRight\" [nzClickHide]=\"false\" nzTableFilter>\r\n                                <nz-dropdown-menu #searchDropMenu=\"nzDropdownMenu\">\r\n                                    <div class=\"search-box clearfix\">\r\n                                        <input type=\"text\" nz-input nzSize=\"small\" placeholder=\"\u8BF7\u8F93\u5165\"\r\n                                            [(ngModel)]=\"columnSearchValueMap[item.value]\" />\r\n                                        <button nz-button nzSize=\"small\" nzType=\"primary\" (click)=\"search()\">\r\n                                            \u641C\u7D22\r\n                                        </button>\r\n                                        <button nz-button nzSize=\"small\" (click)=\"reset(item.value)\">\u91CD\u7F6E</button>\r\n                                    </div>\r\n                                </nz-dropdown-menu>\r\n                            </i>\r\n                        </th>\r\n                    </ng-container>\r\n                    <th *ngIf=\"tableContent.rowOperation.show\" [nzWidth]=\"tableContent.rowOperation.width\"\r\n                        [nzRight]=\"rightFixedOperationColumn\">\r\n                        {{tableContent.rowOperation.label}}</th>\r\n                </tr>\r\n            </thead>\r\n            <tbody>\r\n                <tr class=\"table-tbody-tr\" *ngFor=\"let data of tableDatas.data; let j=index;\" (click)=\"trClick(data)\">\r\n                    <td *ngIf=\"tableContent.checkBox.show\" nzShowCheckbox\r\n                        [(nzChecked)]=\"mapOfCheckedId[data[tableContent.uniqueIndex]]\"\r\n                        (nzCheckedChange)=\"refreshStatus()\" [ngStyle]=\"getTrClickBackgroundColor(data)\">\r\n                    </td>\r\n                    <ng-container *ngFor=\"let item of tableContent.columnOptions; let i=index;\">\r\n                        <ng-container *ngIf=\"item.checked\" [ngSwitch]=\"item.tdType\">\r\n                            <ng-template ngSwitchCase=\"nzBadge\">\r\n                                <td class=\"nz-badge-td\" [ngStyle]=\"getTrClickBackgroundColor(data)\">\r\n                                    <nz-badge [nzColor]=\"redColor\" *ngIf=\"data[item.value] == 0\"\r\n                                        [nzTitle]=\"item.tooltip? item.tooltipMap[data[item.value]]: ''\"\r\n                                        nzPlacement=\"top\" nz-tooltip></nz-badge>\r\n                                    <nz-badge [nzColor]=\"greenColor\" *ngIf=\"data[item.value] == 1\"\r\n                                        [nzTitle]=\"item.tooltip? item.tooltipMap[data[item.value]]: ''\"\r\n                                        nzPlacement=\"top\" nz-tooltip></nz-badge>\r\n                                    <nz-badge [nzColor]=\"yellowColor\" *ngIf=\"data[item.value] == 2\"\r\n                                        [nzTitle]=\"item.tooltip? item.tooltipMap[data[item.value]]: ''\"\r\n                                        nzPlacement=\"top\" nz-tooltip></nz-badge>\r\n                                    <nz-badge [nzColor]=\"grayColor\" *ngIf=\"data[item.value] == 3\"\r\n                                        [nzTitle]=\"item.tooltip? item.tooltipMap[data[item.value]]: ''\"\r\n                                        nzPlacement=\"top\" nz-tooltip></nz-badge>\r\n                                </td>\r\n                            </ng-template>\r\n                            <ng-template ngSwitchCase=\"bgColor\">\r\n                                <td style=\"padding: 0; line-height: 1.5;\" [ngStyle]=\"getTrClickBackgroundColor(data)\">\r\n                                    <div [style.background-color]=\"redColor\" *ngIf=\"data[item.value] == 0\"\r\n                                        [nzTitle]=\"item.tooltip? item.tooltipMap[data[item.value]]: ''\"\r\n                                        nzPlacement=\"top\" nz-tooltip>&nbsp;&nbsp;</div>\r\n                                    <div [style.background-color]=\"greenColor\" *ngIf=\"data[item.value] == 1\"\r\n                                        [nzTitle]=\"item.tooltip? item.tooltipMap[data[item.value]]: ''\"\r\n                                        nzPlacement=\"top\" nz-tooltip>&nbsp;&nbsp;</div>\r\n                                    <div [style.background-color]=\"yellowColor\" *ngIf=\"data[item.value] == 2\"\r\n                                        [nzTitle]=\"item.tooltip? item.tooltipMap[data[item.value]]: ''\"\r\n                                        nzPlacement=\"top\" nz-tooltip>&nbsp;&nbsp;</div>\r\n                                    <div [style.background-color]=\"grayColor\" *ngIf=\"data[item.value] == 3\"\r\n                                        [nzTitle]=\"item.tooltip? item.tooltipMap[data[item.value]]: ''\"\r\n                                        nzPlacement=\"top\" nz-tooltip>&nbsp;&nbsp;</div>\r\n                                </td>\r\n                            </ng-template>\r\n                            <ng-template ngSwitchCase=\"bgColorCustom\">\r\n                                <td style=\"padding: 0; line-height: 1.5;\" [ngStyle]=\"getTrClickBackgroundColor(data)\">\r\n                                    <div [style.background-color]=\"item.bgColorMap[data[item.value]] !== '' ? item.bgColorMap[data[item.value]] :'#000' \"\r\n                                        [nzTitle]=\"item.tooltip? item.tooltipMap[data[item.value]]: ''\" nzPlacement=\"top\" nz-tooltip>\r\n                                        &nbsp;&nbsp;</div>\r\n                                </td>\r\n                            </ng-template>\r\n                            <ng-template ngSwitchCase=\"gradientColor\">\r\n                                <td style=\"padding: 0; line-height: 1.5;\" [ngStyle]=\"getTrClickBackgroundColor(data)\">\r\n                                    <div [style.background-color]=\"getGradientColor(data[item.value], item)\">\r\n                                        {{data[item.value | bcacPipe: item.format]}}\r\n                                    </div>\r\n                                </td>\r\n                            </ng-template>\r\n                            <ng-template ngSwitchCase=\"overDisplay\">\r\n                                <td [style.color]=\"data[item.value] > item.overLine? redColor: ''\"\r\n                                    [ngStyle]=\"getTrClickBackgroundColor(data)\">\r\n                                    {{data[item.value] | bcacPipe: item.format}}</td>\r\n                            </ng-template>\r\n                            <ng-template ngSwitchCase=\"overIntervalDisplay\">\r\n                                <td *ngIf=\"data[item.value] != null &&  data[item.value] != -99 \"\r\n                                    [style.color]=\"data[item.value] > item.IntervalLine[1] || data[item.value] < item.IntervalLine[0]? redColor: ''\"\r\n                                    [ngStyle]=\"getTrClickBackgroundColor(data)\">\r\n                                    {{data[item.value] | bcacPipe: item.format}}</td>\r\n                                <td *ngIf=\"data[item.value] == null || data[item.value] == -99 \"\r\n                                    [ngStyle]=\"getTrClickBackgroundColor(data)\">\r\n                                    {{data[item.value] | bcacPipe: item.format}}</td>\r\n                            </ng-template>\r\n                            <ng-template ngSwitchCase=\"emphasis\">\r\n                                <td [style.color]=\"getEmphasisColor(data[item.value], item.emphasisValue)\" [ngStyle]=\"getTrClickBackgroundColor(data)\">\r\n                                    {{data[item.value] | bcacPipe: item.format}}\r\n                                </td>\r\n                            </ng-template>\r\n                            <ng-template ngSwitchCase=\"canClick\">\r\n                                <td [ngStyle]=\"getTrClickBackgroundColor(data)\"><a\r\n                                        (click)=\"tdClick(item.value, data)\">{{data[item.value] | bcacPipe:\r\n                                        item.format}}</a>\r\n                                </td>\r\n                            </ng-template>\r\n                            <ng-template ngSwitchCase=\"switch\">\r\n                                <td [ngStyle]=\"getTrClickBackgroundColor(data)\">\r\n                                    <nz-switch [(ngModel)]=\"data[item.value]\" nzCheckedChildren=\"\u5F00\"\r\n                                        nzUnCheckedChildren=\"\u5173\" nzSize=\"small\"\r\n                                        (click)=\"clickSwitch(data, j, item.value, item.switchInfo)\" [nzControl]=\"true\"\r\n                                        [nzLoading]=\"switchLoadingMap[j + item.value]\"></nz-switch>\r\n                                </td>\r\n                            </ng-template>\r\n                            <ng-template ngSwitchCase=\"audio\">\r\n                                <td style=\"line-height: 0.9;\" [ngStyle]=\"getTrClickBackgroundColor(data)\">\r\n                                    <bcac-sound-record [bcacSource]=\"item.baseAudioUri + data[item.value]\">\r\n                                    </bcac-sound-record>\r\n                                </td>\r\n                            </ng-template>\r\n                            <ng-template ngSwitchDefault>\r\n                                <td [nzTooltipTitle]=\"item.tooltip?(data[item.value]|bcacPipe: item.format): ''\"\r\n                                    nzTooltipPlacement=\"top\" nz-tooltip [ngStyle]=\"getTrClickBackgroundColor(data)\">\r\n                                    {{data[item.value] | bcacPipe: item.format}}\r\n                                </td>\r\n                            </ng-template>\r\n                        </ng-container>\r\n                    </ng-container>\r\n                    <td *ngIf=\"tableContent.rowOperation.show\" style=\"padding: 0.8rem 1.2rem; line-height: 1;\"\r\n                        [ngStyle]=\"getTrClickBackgroundColor(data)\" [nzRight]=\"rightFixedOperationColumn\">\r\n                        <a *ngIf=\"tableContent.rowOperation.detailIcon.show\">\r\n                            <bcac-icon iconType=\"detail\" iconColor=\"#1890ff\"\r\n                                [tooltipTitle]=\"tableContent.rowOperation.detailIcon.label\" (click)=\"clickDetail(data)\">\r\n                            </bcac-icon>\r\n                            &nbsp;\r\n                        </a>\r\n                        <a *ngIf=\"tableContent.rowOperation.menuAuthorityIcon.show\">\r\n                            <bcac-icon iconType=\"menu_authority\" iconColor=\"#1890ff\"\r\n                                [tooltipTitle]=\"tableContent.rowOperation.menuAuthorityIcon.label\"\r\n                                (click)=\"clickMenuAuthorityEmit(data)\"></bcac-icon>\r\n                            &nbsp;\r\n                        </a>\r\n                        <a *ngIf=\"tableContent.rowOperation.configIcon.show\">\r\n                            <bcac-icon iconType=\"config\" iconColor=\"#1890ff\"\r\n                                [tooltipTitle]=\"tableContent.rowOperation.configIcon.label\"\r\n                                (click)=\"clickRowConfig(data)\">\r\n                            </bcac-icon>\r\n                            &nbsp;\r\n                        </a>\r\n                        <a *ngIf=\"tableContent.rowOperation.editorIcon.show\">\r\n                            <bcac-icon iconType=\"editor\" iconColor=\"#1890ff\"\r\n                                [tooltipTitle]=\"tableContent.rowOperation.editorIcon.label\" (click)=\"clickEditor(data)\">\r\n                            </bcac-icon>\r\n                            &nbsp;\r\n                        </a>\r\n                        <a *ngIf=\"tableContent.rowOperation.deleteIcon.show\">\r\n                            <bcac-icon iconType=\"delete\" iconColor=\"#1890ff\"\r\n                                [tooltipTitle]=\"tableContent.rowOperation.deleteIcon.label\" nz-popconfirm\r\n                                nzPopconfirmTitle=\"\u786E\u8BA4\u5220\u9664?\" (nzOnConfirm)=\"clickDelete(data)\" nzPopconfirmPlacement=\"top\">\r\n                            </bcac-icon>\r\n                            &nbsp;\r\n                        </a>\r\n                        <a *ngIf=\"tableContent.rowOperation.reviewIcon.show\">\r\n                            <bcac-icon iconType=\"review\" iconColor=\"#1890ff\"\r\n                                [tooltipTitle]=\"tableContent.rowOperation.reviewIcon.label\" (click)=\"clickReview(data)\">\r\n                            </bcac-icon>\r\n                            &nbsp;\r\n                        </a>\r\n                        <a *ngIf=\"tableContent.rowOperation.reviewRecordIcon.show\">\r\n                            <bcac-icon iconType=\"review_record\" iconColor=\"#1890ff\"\r\n                                [tooltipTitle]=\"tableContent.rowOperation.reviewRecordIcon.label\"\r\n                                (click)=\"clickReviewRecord(data)\"></bcac-icon>\r\n                            &nbsp;\r\n                        </a>\r\n                        <a *ngIf=\"tableContent.rowOperation.previewIcon.show\">\r\n                            <bcac-icon iconType=\"preview\" iconColor=\"#1890ff\"\r\n                                [tooltipTitle]=\"tableContent.rowOperation.previewIcon.label\"\r\n                                (click)=\"clickPreview(data)\"></bcac-icon>\r\n                            &nbsp;\r\n                        </a>\r\n                        <a *ngIf=\"tableContent.rowOperation.downloadIcon.show\">\r\n                            <bcac-icon iconType=\"download\" iconColor=\"#1890ff\"\r\n                                [tooltipTitle]=\"tableContent.rowOperation.downloadIcon.label\"\r\n                                (click)=\"clickDownload(data)\"></bcac-icon>\r\n                            &nbsp;\r\n                        </a>\r\n                        <a *ngIf=\"tableContent.rowOperation.submitIcon.show\">\r\n                            <bcac-icon iconType=\"submit\" iconColor=\"#1890ff\"\r\n                                [tooltipTitle]=\"tableContent.rowOperation.submitIcon.label\"\r\n                                (click)=\"clickRowSubmit(data)\"></bcac-icon>\r\n                            &nbsp;\r\n                        </a>\r\n                        <a *ngIf=\"tableContent.rowOperation.fillInIcon.show\">\r\n                            <bcac-icon iconType=\"fill_in\" iconColor=\"#1890ff\"\r\n                                [tooltipTitle]=\"tableContent.rowOperation.fillInIcon.label\" (click)=\"clickFillIn(data)\">\r\n                            </bcac-icon>\r\n                            &nbsp;\r\n                        </a>\r\n                        <a *ngIf=\"tableContent.rowOperation.distributeOrderIcon.show\">\r\n                            <bcac-icon iconType=\"distribute_order\" iconColor=\"#1890ff\"\r\n                                [tooltipTitle]=\"tableContent.rowOperation.distributeOrderIcon.label\"\r\n                                (click)=\"clickRowDistributeOrder(data)\"></bcac-icon>\r\n                            &nbsp;\r\n                        </a>\r\n                        <a *ngIf=\"tableContent.rowOperation.transferWorkOrderIcon.show\">\r\n                            <bcac-icon iconType=\"transfer_work_order\" iconColor=\"#1890ff\"\r\n                                [tooltipTitle]=\"tableContent.rowOperation.transferWorkOrderIcon.label\"\r\n                                (click)=\"clickRowTransferWorkOrder(data)\"></bcac-icon>\r\n                            &nbsp;\r\n                        </a>\r\n                        <a *ngIf=\"tableContent.rowOperation.receiveWorkOrderIcon.show\">\r\n                            <bcac-icon iconType=\"receive_work_order\" iconColor=\"#1890ff\"\r\n                                [tooltipTitle]=\"tableContent.rowOperation.receiveWorkOrderIcon.label\"\r\n                                (click)=\"clickRowReceiveWorkOrder(data)\"></bcac-icon>\r\n                            &nbsp;\r\n                        </a>\r\n                        <a *ngIf=\"tableContent.rowOperation.handleWorkOrderIcon.show\">\r\n                            <bcac-icon iconType=\"handle_work_order\" iconColor=\"#1890ff\"\r\n                                [tooltipTitle]=\"tableContent.rowOperation.handleWorkOrderIcon.label\"\r\n                                (click)=\"clickRowHandleWorkOrder(data)\"></bcac-icon>\r\n                            &nbsp;\r\n                        </a>\r\n                        <a *ngIf=\"tableContent.rowOperation.clearIcon.show\">\r\n                            <bcac-icon iconType=\"clear\" iconColor=\"#1890ff\"\r\n                                [tooltipTitle]=\"tableContent.rowOperation.clearIcon.label\"\r\n                                (click)=\"clickRowClear(data)\"></bcac-icon>\r\n                            &nbsp;\r\n                        </a>\r\n                        <a *ngIf=\"tableContent.rowOperation.turnDownIcon.show\">\r\n                            <bcac-icon iconType=\"turn_down\" iconColor=\"#1890ff\"\r\n                                [tooltipTitle]=\"tableContent.rowOperation.turnDownIcon.label\"\r\n                                (click)=\"clickTurnDown(data)\"></bcac-icon>\r\n                            &nbsp;\r\n                        </a>\r\n                    </td>\r\n                </tr>\r\n            </tbody>\r\n        </nz-table>\r\n\r\n    </div>\r\n</div>\r\n<ng-template #rangeTemplate let-range=\"range\" let-total> \u5171{{ total }}\u6761\r\n</ng-template>",
                styles: [".table-card{padding:1.2rem 2rem;background:#fff;box-shadow:0 .3rem .6rem -.4rem rgba(0,0,0,.45)}.table-card .table-header{height:3.6rem}.table-card .table-title-label{font-size:1.4rem;font-weight:500;color:#101010;line-height:1.5}.table-card .table-icon-row{text-align:right;margin-bottom:.4rem}.table-card .table-icon-row bcac-icon{cursor:pointer}.table-card .table-icon-row input{width:15rem;font-size:1.2rem;margin-bottom:.3rem;margin-left:.2rem}.table-card .th-unit{color:rgba(0,0,0,.5);font-size:1.2rem}.table-card .table-content tbody{overflow:auto}.table-card .table-content .table-thead-tr{background-color:#eeebeb}.table-card .table-content .table-thead-tr th{font-size:1.4rem;padding:.8rem 1.2rem;white-space:nowrap;border-radius:2px}.table-card .table-content .table-thead-tr .overline{text-decoration:overline}.table-card .table-content .table-tbody-tr:nth-child(even) .ant-table-td-left-sticky,.table-card .table-content .table-tbody-tr:nth-child(even) .ant-table-td-right-sticky,.table-card .table-content .table-tbody-tr:nth-child(even) td{background:#fafafa}.table-card .table-content .table-tbody-tr td{text-align:left;font-size:1.4rem;padding:.8rem 1.2rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.table-card .table-content .table-tbody-tr td.nz-badge-td{text-align:center}.search-box{padding:.6rem}.search-box input{width:16rem;display:block;margin:0 0 .4rem}.search-box button{padding:0 .4rem;margin-left:.4rem;float:right}.search-box.clearfix:after{content:\" \";display:block;height:0;clear:both}.search-box.clearfix{zoom:1}bcac-icon{width:2rem}:host ::ng-deep .ant-table-small{border-radius:0}:host ::ng-deep .ant-table-small .ant-table-body::-webkit-scrollbar{height:5px;width:6px;background-color:#eeecec}:host ::ng-deep .ant-table-small .ant-table-body::-webkit-scrollbar-thumb{background-color:silver;border-radius:5px}:host ::ng-deep .ant-table-small.ant-table-bordered .ant-table-body>table{table-layout:fixed}:host ::ng-deep .ant-table-small.ant-table-bordered.ant-table-scroll-position-left{border-radius:2px}::ng-deep .ant-tooltip-content .ant-tooltip-inner{color:#333232;background-color:rgba(224,224,224,.7);box-shadow:1px 1px #8b8b8b;padding:.3rem .4rem;min-height:unset}.columnConfigPanel{padding:1rem;background-color:#fff;border:1px solid #f1e8e8;box-shadow:1px 1px 2px #888;margin-top:-.3rem}::ng-deep .columnConfigPanel .ant-checkbox-group-item{display:block}"]
            }] }
];
/** @nocollapse */
BcacCommonTableComponent.ctorParameters = () => [
    { type: NzMessageService },
    { type: ElementRef },
    { type: TableService }
];
BcacCommonTableComponent.propDecorators = {
    checkBoxEmit: [{ type: Output }],
    tdClickEmit: [{ type: Output }],
    bcacLoading: [{ type: Input }],
    bcacAddEmit: [{ type: Output }],
    bcacBatchDeleteEmit: [{ type: Output }],
    BcacBatchDownloadEmit: [{ type: Output }],
    bcacDetailEmit: [{ type: Output }],
    bcacEditorEmit: [{ type: Output }],
    bcacDeleteEmit: [{ type: Output }],
    bcacReviewEmit: [{ type: Output }],
    trClickEmit: [{ type: Output }],
    bcacOpenTrClick: [{ type: Input }],
    bcacTrClickColor: [{ type: Input }],
    tableData: [{ type: Input }],
    bcacShowTitle: [{ type: Input }],
    bcacCloseTitle: [{ type: Input }],
    bcacRightFixedOperationColumn: [{ type: Input }],
    bcacShowBatchDistributeOrderIcon: [{ type: Input }],
    bcacBatchDistributeOrderEmit: [{ type: Output }],
    bcacCloseIconDivider: [{ type: Input }],
    bcacShowNewRoleIcon: [{ type: Input }],
    bcacNewRoleEmit: [{ type: Output }],
    bcacShowNewUserIcon: [{ type: Input }],
    bcacNewUserEmit: [{ type: Output }],
    bcacShowDownTemplateIcon: [{ type: Input }],
    bcacDownTemplateEmit: [{ type: Output }],
    bcacShowBatchImportIcon: [{ type: Input }],
    bcacBatchImportEmit: [{ type: Output }],
    bcacShowBatchSubmitIcon: [{ type: Input }],
    bcacBatchSubmitEmit: [{ type: Output }],
    bcacShowBatchTurnDownIcon: [{ type: Input }],
    bcacBatchTurnDownEmit: [{ type: Output }],
    bcacShowBatchReviewIcon: [{ type: Input }],
    bcacBatchReviewEmit: [{ type: Output }],
    bcacCloseTableIcon: [{ type: Input }],
    bcacCloseTableAddIcon: [{ type: Input }],
    bcacCloseTableConfigIcon: [{ type: Input }],
    bcacCloseTableDeleteIcon: [{ type: Input }],
    bcacCloseTableExcelIcon: [{ type: Input }],
    bcacCloseBatchDownIcon: [{ type: Input }],
    bcacCloseTableSearch: [{ type: Input }],
    bcacShowHandleWorkOrderRowIcon: [{ type: Input }],
    bcacRowHandleWorkOrderEmit: [{ type: Output }],
    bcacShowTransferWorkOrderRowIcon: [{ type: Input }],
    bcacRowTransferWorkOrderEmit: [{ type: Output }],
    bcacShowReceiveWorkOrderRowIcon: [{ type: Input }],
    bcacRowReceiveWorkOrderEmit: [{ type: Output }],
    bcacShowClearRowIcon: [{ type: Input }],
    bcacRowClearEmit: [{ type: Output }],
    bcacShowDistributeOrderRowIcon: [{ type: Input }],
    bcacRowDistributeOrderEmit: [{ type: Output }],
    bcacShowConfigRowIcon: [{ type: Input }],
    bcacRowConfigEmit: [{ type: Output }],
    bcacShowSubmitRowIcon: [{ type: Input }],
    bcacRowSubmitEmit: [{ type: Output }],
    bcacShowdownloadIcon: [{ type: Input }],
    bcacDownloadEmit: [{ type: Output }],
    bcacFillInEmit: [{ type: Output }],
    bcacShowPreviewIcon: [{ type: Input }],
    bcacPreviewEmit: [{ type: Output }],
    bcacTurnDownEmit: [{ type: Output }],
    bcacShowReviewRecordIcon: [{ type: Input }],
    bcacReviewRecordEmit: [{ type: Output }],
    bcacShowMenuAuthorityIcon: [{ type: Input }],
    bcacMenuAuthorityEmit: [{ type: Output }],
    bcacShowReviewIcon: [{ type: Input }],
    bcacShowTurnDownRowIcon: [{ type: Input }],
    bcacColumnOptions: [{ type: Input }],
    bcacCloseRowOperation: [{ type: Input }],
    bcacRowOperationWidth: [{ type: Input }],
    bcacCloseDetailRowIcon: [{ type: Input }],
    bcacShowEditorRowIcon: [{ type: Input }],
    bcacShowDeleteRowIcon: [{ type: Input }],
    bcacShowFillInRowIcon: [{ type: Input }],
    bcacUniqueIndex: [{ type: Input }],
    bcacClosePagination: [{ type: Input }],
    bcacPageSize: [{ type: Input }],
    bcacPageSizeOptions: [{ type: Input }],
    bcacCloseCheckBox: [{ type: Input }],
    bcacCheckBoxWidth: [{ type: Input }],
    bcacCheckField: [{ type: Input }],
    bcacOpenMultipleData: [{ type: Input }],
    bcacDataSelectWidth: [{ type: Input }],
    tabledatas: [{ type: Input }],
    columnConfigWidth: [{ type: Input }]
};
if (false) {
    /** @type {?} */
    BcacCommonTableComponent.prototype.redColor;
    /** @type {?} */
    BcacCommonTableComponent.prototype.greenColor;
    /** @type {?} */
    BcacCommonTableComponent.prototype.yellowColor;
    /** @type {?} */
    BcacCommonTableComponent.prototype.grayColor;
    /** @type {?} */
    BcacCommonTableComponent.prototype.checkBoxEmit;
    /** @type {?} */
    BcacCommonTableComponent.prototype.tdClickEmit;
    /** @type {?} */
    BcacCommonTableComponent.prototype.tableSearchValue;
    /** @type {?} */
    BcacCommonTableComponent.prototype.tableloading;
    /** @type {?} */
    BcacCommonTableComponent.prototype.bcacAddEmit;
    /** @type {?} */
    BcacCommonTableComponent.prototype.bcacBatchDeleteEmit;
    /** @type {?} */
    BcacCommonTableComponent.prototype.BcacBatchDownloadEmit;
    /** @type {?} */
    BcacCommonTableComponent.prototype.bcacDetailEmit;
    /** @type {?} */
    BcacCommonTableComponent.prototype.bcacEditorEmit;
    /** @type {?} */
    BcacCommonTableComponent.prototype.bcacDeleteEmit;
    /** @type {?} */
    BcacCommonTableComponent.prototype.bcacReviewEmit;
    /** @type {?} */
    BcacCommonTableComponent.prototype.trClickConf;
    /** @type {?} */
    BcacCommonTableComponent.prototype.activeTrId;
    /** @type {?} */
    BcacCommonTableComponent.prototype.trClickEmit;
    /** @type {?} */
    BcacCommonTableComponent.prototype.tableData;
    /** @type {?} */
    BcacCommonTableComponent.prototype.tableTitle;
    /** @type {?} */
    BcacCommonTableComponent.prototype.rightFixedOperationColumn;
    /** @type {?} */
    BcacCommonTableComponent.prototype.colorRange;
    /** @type {?} */
    BcacCommonTableComponent.prototype.tableIconRow;
    /** @type {?} */
    BcacCommonTableComponent.prototype.bcacBatchDistributeOrderEmit;
    /** @type {?} */
    BcacCommonTableComponent.prototype.bcacNewRoleEmit;
    /** @type {?} */
    BcacCommonTableComponent.prototype.bcacNewUserEmit;
    /** @type {?} */
    BcacCommonTableComponent.prototype.bcacDownTemplateEmit;
    /** @type {?} */
    BcacCommonTableComponent.prototype.bcacBatchImportEmit;
    /** @type {?} */
    BcacCommonTableComponent.prototype.bcacBatchSubmitEmit;
    /** @type {?} */
    BcacCommonTableComponent.prototype.bcacBatchTurnDownEmit;
    /** @type {?} */
    BcacCommonTableComponent.prototype.bcacBatchReviewEmit;
    /** @type {?} */
    BcacCommonTableComponent.prototype.tableContent;
    /** @type {?} */
    BcacCommonTableComponent.prototype.bcacRowHandleWorkOrderEmit;
    /** @type {?} */
    BcacCommonTableComponent.prototype.bcacRowTransferWorkOrderEmit;
    /** @type {?} */
    BcacCommonTableComponent.prototype.bcacRowReceiveWorkOrderEmit;
    /** @type {?} */
    BcacCommonTableComponent.prototype.bcacRowClearEmit;
    /** @type {?} */
    BcacCommonTableComponent.prototype.bcacRowDistributeOrderEmit;
    /** @type {?} */
    BcacCommonTableComponent.prototype.bcacRowConfigEmit;
    /** @type {?} */
    BcacCommonTableComponent.prototype.bcacRowSubmitEmit;
    /** @type {?} */
    BcacCommonTableComponent.prototype.bcacDownloadEmit;
    /** @type {?} */
    BcacCommonTableComponent.prototype.bcacFillInEmit;
    /** @type {?} */
    BcacCommonTableComponent.prototype.bcacPreviewEmit;
    /** @type {?} */
    BcacCommonTableComponent.prototype.bcacTurnDownEmit;
    /** @type {?} */
    BcacCommonTableComponent.prototype.bcacReviewRecordEmit;
    /** @type {?} */
    BcacCommonTableComponent.prototype.bcacMenuAuthorityEmit;
    /** @type {?} */
    BcacCommonTableComponent.prototype.isIndeterminate;
    /** @type {?} */
    BcacCommonTableComponent.prototype.isAllDisplayDataChecked;
    /** @type {?} */
    BcacCommonTableComponent.prototype.listOfDisplayData;
    /** @type {?} */
    BcacCommonTableComponent.prototype.mapOfCheckedId;
    /** @type {?} */
    BcacCommonTableComponent.prototype.mapOfSort;
    /** @type {?} */
    BcacCommonTableComponent.prototype.sortName;
    /** @type {?} */
    BcacCommonTableComponent.prototype.sortValue;
    /** @type {?} */
    BcacCommonTableComponent.prototype.filterListOfMap;
    /** @type {?} */
    BcacCommonTableComponent.prototype.filterList;
    /** @type {?} */
    BcacCommonTableComponent.prototype.listOfFilterValueOfMap;
    /** @type {?} */
    BcacCommonTableComponent.prototype.initFilter;
    /** @type {?} */
    BcacCommonTableComponent.prototype.searchDropMenuVisible;
    /** @type {?} */
    BcacCommonTableComponent.prototype.columnSearchValueMap;
    /** @type {?} */
    BcacCommonTableComponent.prototype.columnSearchList;
    /** @type {?} */
    BcacCommonTableComponent.prototype.isMulltipleData;
    /** @type {?} */
    BcacCommonTableComponent.prototype.tableSourceDatas;
    /** @type {?} */
    BcacCommonTableComponent.prototype.selectValue;
    /** @type {?} */
    BcacCommonTableComponent.prototype.dataSelectWidth;
    /** @type {?} */
    BcacCommonTableComponent.prototype.searchDropMenuVisibleMap;
    /** @type {?} */
    BcacCommonTableComponent.prototype.tableData_bak;
    /** @type {?} */
    BcacCommonTableComponent.prototype.allChecked;
    /** @type {?} */
    BcacCommonTableComponent.prototype.indeterminate;
    /** @type {?} */
    BcacCommonTableComponent.prototype.columnConfigPanelWidth;
    /** @type {?} */
    BcacCommonTableComponent.prototype.switchLoadingMap;
    /** @type {?} */
    BcacCommonTableComponent.prototype.testLabel2;
    /**
     * @type {?}
     * @private
     */
    BcacCommonTableComponent.prototype.nzMessageService;
    /**
     * @type {?}
     * @private
     */
    BcacCommonTableComponent.prototype.elementRef;
    /**
     * @type {?}
     * @private
     */
    BcacCommonTableComponent.prototype.tableService;
    /* Skipping unhandled member: ;*/
}

/**
 * @fileoverview added by tsickle
 * Generated from: bcac.pipe.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
class BcacPipe {
    /**
     * @param {?} value
     * @param {?} type
     * @return {?}
     */
    transform(value, type) {
        if (value && value != -99 && value != "-99" && value != "null") {
            switch (type) {
                case "year":
                    if (value instanceof Date) {
                        return new DatePipe("en-US").transform(value, "yyyy");
                    }
                    else {
                        return new DatePipe("en-US").transform(new Date(value), "yyyy");
                    }
                case "month":
                    if (value instanceof Date) {
                        return new DatePipe("en-US").transform(value, "yyyy-MM");
                    }
                    else {
                        return new DatePipe("en-US").transform(new Date(value), "yyyy-MM");
                    }
                case "date":
                    if (value instanceof Date) {
                        return new DatePipe("en-US").transform(value, "yyyy-MM-dd");
                    }
                    else {
                        return new DatePipe("en-US").transform(new Date(value), "yyyy-MM-dd");
                    }
                case "date-time":
                    if (value instanceof Date) {
                        return new DatePipe("en-US").transform(value, "yyyy-MM-dd HH:mm:ss");
                    }
                    else {
                        return new DatePipe("en-US").transform(new Date(value), "yyyy-MM-dd HH:mm:ss");
                    }
                case "time":
                    if (value instanceof Date) {
                        return new DatePipe("en-US").transform(value, "HH:mm:ss");
                    }
                    else {
                        return new DatePipe("en-US").transform(new Date(value), "HH:mm:ss");
                    }
                case "number":
                    return Number(value).toFixed(0);
                case "number1":
                    return Number(value).toFixed(1);
                case "number2":
                    return Number(value).toFixed(2);
                default:
                    return value;
            }
        }
        else {
            return "--";
        }
    }
}
BcacPipe.decorators = [
    { type: Pipe, args: [{
                name: 'bcacPipe'
            },] }
];

/**
 * @fileoverview added by tsickle
 * Generated from: bcac-table.module.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
// import { BcacLibModule } from 'bcac-lib';
class BcacTableModule {
}
BcacTableModule.decorators = [
    { type: NgModule, args: [{
                declarations: [BcacCommonTableComponent, BcacPipe],
                imports: [
                    CommonModule,
                    FormsModule,
                    NgZorroAntdModule,
                    BcacIconModule,
                ], exports: [
                    BcacCommonTableComponent
                ]
            },] }
];

/**
 * @fileoverview added by tsickle
 * Generated from: public-api.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * Generated from: index.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * Generated from: bcac-lib-business-component-bcac-table.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

export { BcacCommonTableComponent, BcacTableModule, TableService as ɵa, BcacPipe as ɵb };
//# sourceMappingURL=bcac-lib-business-component-bcac-table.js.map
