<div nz-row class="breadcrumbs">
    <div nz-col nzSpan="16">
        <nz-breadcrumb class="padding-8-0">
            <nz-breadcrumb-item>
                首页
            </nz-breadcrumb-item>
            <nz-breadcrumb-item>
                <a>工作总览</a>
            </nz-breadcrumb-item>
            <nz-breadcrumb-item>
                我的关注
            </nz-breadcrumb-item>
        </nz-breadcrumb>
    </div>
    <div nz-col nzSpan="8" class="text-right">
        <button (click)="ngOnInit()" nz-button nzType="primary"><i class="anticon anticon-sync"></i></button>
        <smart-full-screen></smart-full-screen>
    </div>
</div>
<div nz-row [nzGutter]="4" class="search-form">
    <div nz-col nzSpan="2">
        <button (click)="showModal()"
                nz-button nzType="default"><i class="anticon anticon-search"></i>配置
        </button>
    </div>
</div>
<nz-row [nzGutter]="4">
    <div nz-col nzSpan="12">
        <!--        运维事件-->
        <nz-table #nzTable1 [nzData]="table.eventList" [nzPageSize]="5" [nzLoading]="loading.eventLoading" [nzFrontPagination]="true">
            <thead>
            <tr>
                <th>事件编号</th>
                <th nzWidth="20%">标题</th>
                <th nzWidth="15%">处理人</th>
                <th>状态</th>
            </tr>
            </thead>
            <tbody>
            <tr *ngFor="let data of nzTable1.data">
                <td class="round-tag tag-form">
                    {{data.id}}
                </td>
                <td>
                    {{data.title}}
                </td>
                <td>
                  <span style="margin-right: 5px;" *ngFor="let item of data?.operators">
                    {{item.username}}
                  </span>
                </td>
                <td>
                    <span *ngIf="data.status == 0">待处理</span>
                    <span *ngIf="data.status == 2">待确认</span>
                    <span *ngIf="data.status == 1">已结束</span>
                </td>
            </tr>
            </tbody>
        </nz-table>
    </div>
    <div nz-col nzSpan="12">
        <!--        巡检计划-->
        <nz-table #nzTable2 [nzData]="table.planList" [nzLoading]="loading.planLoading" [nzPageSize]="5" [nzFrontPagination]="true">
            <thead>
            <tr>
                <th nzWidth="20%">计划名称</th>
                <th>计划类型</th>
                <th>循环周期</th>
                <th>计划状态</th>
            </tr>
            </thead>
            <tbody>
            <tr *ngFor="let data of nzTable2.data">
                <td class="round-tag tag-form">
                    {{data.title}}
                </td>
                <td>
                    {{data.typeName}}
                </td>
                <td>
                    <span *ngIf="data.cycleType == '0'">每天</span>
                    <span *ngIf="data.cycleType == '1'">工作日</span>
                    <span *ngIf="data.cycleType == '2'">每周</span>
                    <span *ngIf="data.cycleType == '3'">每月</span>
                    <span *ngIf="data.cycleType == '4'">每季度</span>
                    <span *ngIf="data.cycleType == '5'">每半年</span>
                    <span *ngIf="data.cycleType == '6'">无</span>
                    /{{data.cycleNum}}次
                </td>
                <td>
                    <span *ngIf="data.status == 0">未开始</span>
                    <span *ngIf="data.status == 1">进行中</span>
                    <span *ngIf="data.status == 2">已结束</span>
                </td>
            </tr>
            </tbody>
        </nz-table>
    </div>
</nz-row>
<nz-row [nzGutter]="4">
    <div nz-col nzSpan="12">
        <!--        资产管理-->
        <nz-table #nzTable3 [nzData]="table.childrenList" [nzFrontPagination]="true" [nzPageSize]="5"
                  [nzLoading]="loading.childrenLoading">
            <thead>
            <tr>
                <th nzWidth="20%">子分类</th>
                <th>资产总数</th>
                <th>库存</th>
                <th>使用中</th>
                <th>关联事件</th>
            </tr>
            </thead>
            <tbody>
            <tr *ngFor="let data of nzTable3.data">
                <td class="round-tag tag-form main-color cursor">
                    {{data.name}}
                </td>
                <td>
                    {{data.inventorycount}}
                </td>
                <td>{{data.stock}}</td>
                <td>
                    {{data.usedcount}}
                </td>
                <td>{{data.eventSum}}</td>
            </tr>
            </tbody>
        </nz-table>
    </div>
    <div nz-col nzSpan="12">
        <!--        备件管理-->
        <nz-table #nzTable4 [nzPageSize]="5" [nzData]="table.spareList" [nzFrontPagination]="true" [nzLoading]="loading.spareLoading">
            <thead>
            <tr>
                <th>编号</th>
                <th nzWidth="10%">名称</th>
                <th>品牌</th>
                <th>型号</th>
                <th>序列号</th>
            </tr>
            </thead>
            <tbody>
            <tr *ngFor="let data of nzTable4.data">
                <td>{{data.versionNo}}</td>
                <td>{{data.name}}</td>
                <td>{{data.brand}}</td>
                <td>{{data.model}}</td>
                <td>{{data.serialNo}}</td>
            </tr>
            </tbody>
        </nz-table>
    </div>
</nz-row>
<nz-row [nzGutter]="4">
    <div nz-col nzSpan="12">
        <!--        系统变更-->
        <nz-table #nzTable5 [nzPageSize]="5" [nzData]="table.changeList" [nzLoading]="loading.changeLoading" [nzFrontPagination]="true" >
            <thead>
            <tr>
                <th>变更编号</th>
                <th>负责人</th>
                <th>变更级别</th>
                <th>变更内容</th>
                <th>审核人</th>
                <th>审核意见</th>
                <th>状态</th>
            </tr>
            </thead>
            <tbody>
            <tr *ngFor="let data of nzTable5.data">
                <td>{{data.id}}</td>
                <td>{{data.manageUserName}}</td>
                <td>
                    <span *ngIf="data.type == 1">普通变更</span>
                    <span *ngIf="data.type == 2">重大变更</span>
                    <span *ngIf="data.type == 3">紧急变更</span>
                </td>
                <td>{{data.description}}</td>
                <td>{{data.verifyUserName}}</td>
                <td>{{data.checkOpinion}}</td>
                <td>
                    <span *ngIf="data.status == 1">待提交</span>
                    <span *ngIf="data.status == 2">待审核</span>
                    <span *ngIf="data.status == 3">审核通过</span>
                    <span *ngIf="data.status == 4">审核未通过</span>
                    <span *ngIf="data.status == 5">退回关闭</span>
                    <span *ngIf="data.status == 6">待处理</span>
                    <span *ngIf="data.status == 7">变更完成</span>
                </td>
            </tr>
            </tbody>
        </nz-table>
    </div>
    <div nz-col nzSpan="12">
        <!--        运维项目-->
        <nz-table #nzTable6 [nzPageSize]="5" [nzData]="table.projectList" [nzLoading]="loading.projectLoading" [nzFrontPagination]="true">
            <thead>
            <tr>
                <th>项目单位</th>
                <th nzWidth="10%">项目名称</th>
                <th>项目负责人</th>
                <th>项目年度</th>
                <th>项目状态</th>
            </tr>
            </thead>
            <tbody>
            <tr *ngFor="let data of nzTable6.data">
                <td class="round-tag tag-form">
                    {{data.officeName}}
                </td>
                <td>
                    {{data.name}}
                </td>
                <td>{{data.officePrincipal}}</td>
                <td>
                    {{data.yearly}}
                </td>
                <td>
                    <span *ngIf="data.status == 0">执行中</span>
                    <span *ngIf="data.status == 1">已完成</span>
                    <span *ngIf="data.status == 2">待启动</span>
                </td>
            </tr>
            </tbody>
        </nz-table>
    </div>
</nz-row>
<nz-row [nzGutter]="4">
    <div nz-col nzSpan="12">
        <!--        运维公司-->
        <nz-table #nzTable7 [nzPageSize]="5" [nzData]="table.companyList" [nzLoading]="loading.companyLoading" [nzFrontPagination]="true">
            <thead>
            <tr>
                <th nzWidth="20%">维护公司名称</th>
                <th>运维负责人</th>
                <th>工作类型</th>
                <th>当前项目</th>
                <th>项目总额</th>
            </tr>
            </thead>
            <tbody>
            <tr *ngFor="let data of nzTable7.data">
                <td>{{data.name}}</td>
                <td>{{data.principal}}</td>
                <td>
                    <span *ngIf="data.type == 0">中心驻场</span>
                    <span *ngIf="data.type == 1">中心运维</span>
                    <span *ngIf="data.type == 2">外单位驻场</span>
                    <span *ngIf="data.type == 3">外单位运维</span>
                </td>
                <td>{{data.projectNum}}</td>
                <td>{{data.totalAmount}}</td>
            </tr>
            </tbody>
        </nz-table>
    </div>
    <div nz-col nzSpan="12">
        <!--        运维团队-->
        <nz-table #nzTable8 [nzPageSize]="5" [nzData]="table.teamList" [nzLoading]="loading.teamLoading" [nzFrontPagination]="true">
            <thead>
            <tr>
                <th nzWidth="20%">团队名称</th>
                <th>团队类型</th>
                <th>所在公司</th>
                <th>关联项目</th>
                <th>团队负责人</th>
            </tr>
            </thead>
            <tbody>
            <tr *ngFor="let data of nzTable8.data">
                <td>{{data.name}}</td>
                <td>
                    <span *ngIf="data.type == 0">驻场团队</span>
                    <span *ngIf="data.type == 1">非驻场团队</span>
                </td>
                <td>{{data.companyName}}</td>
                <td>{{data.projectName}}</td>
                <td>{{data.principal}}</td>
            </tr>
            </tbody>
        </nz-table>
    </div>
</nz-row>
<nz-row [nzGutter]="4">
    <div nz-col nzSpan="12">
        <!--        运维费用-->
        <nz-table #nzTable9 [nzPageSize]="5" [nzData]="table.costList" [nzLoading]="loading.costLoading" [nzFrontPagination]="true">
            <thead>
            <tr>
                <th nzWidth="10%">维护项目</th>
                <th>填报时间</th>
                <th>填报人</th>
                <th>费用说明</th>
                <th>总费用</th>
            </tr>
            </thead>
            <tbody>
            <tr *ngFor="let data of nzTable9.data">
                <td>{{data.projectName}}</td>
                <td>{{data.timeStr | date:'yyyy-MM-dd HH:mm:ss'}}</td>
                <td>{{data.people}}</td>
                <td>{{data.costdescribe}}</td>
                <td>{{data.total}}</td>
            </tr>
            </tbody>
        </nz-table>
    </div>
    <div nz-col nzSpan="12">
        <!--        资源预警-->
        <nz-table #nzTable10 [nzPageSize]="5" [nzData]="table.resourceList" [nzLoading]="loading.resourceLoading" [nzFrontPagination]="true">
            <thead>
            <tr>
                <th>预警时间</th>
                <th>预警级别</th>
                <th>预警内容</th>
            </tr>
            </thead>
            <tbody>
            <tr *ngFor="let data of nzTable10.data">
                <td>{{data.createTime}}</td>
                <td>
                    <span *ngIf="data.ruleLevel == 1">一般</span>
                    <span *ngIf="data.ruleLevel == 2">严重</span>
                </td>
                <td>{{data.ruleContent}}</td>
            </tr>
            </tbody>
        </nz-table>
    </div>
</nz-row>
<nz-row [nzGutter]="4">
    <div nz-col nzSpan="12">
        <!--        业务预警-->
        <nz-table #nzTable11 [nzPageSize]="5" [nzData]="table.businessList" [nzLoading]="loading.businessLoading" [nzFrontPagination]="true">
            <thead>
            <tr>
                <th>预警时间</th>
                <th>预警级别</th>
                <th>预警内容</th>
            </tr>
            </thead>
            <tbody>
            <tr *ngFor="let data of nzTable11.data">
                <td>{{data.createTime}}</td>
                <td>
                    <span *ngIf="data.ruleLevel == 1">一般</span>
                    <span *ngIf="data.ruleLevel == 2">严重</span>
                </td>
                <td>{{data.ruleContent}}</td>
            </tr>
            </tbody>
        </nz-table>
    </div>
    <div nz-col nzSpan="12">
        <!--        工作预警-->
        <nz-table #nzTable12 [nzPageSize]="5" [nzData]="table.workList" [nzLoading]="loading.workLoading" [nzFrontPagination]="true">
            <thead>
            <tr>
                <th>预警时间</th>
                <th>预警级别</th>
                <th>预警内容</th>
            </tr>
            </thead>
            <tbody>
            <tr *ngFor="let data of nzTable12.data">
                <td>{{data.createTime}}</td>
                <td>
                    <span *ngIf="data.ruleLevel == 1">一般</span>
                    <span *ngIf="data.ruleLevel == 2">严重</span>
                </td>
                <td>{{data.ruleContent}}</td>
            </tr>
            </tbody>
        </nz-table>
    </div>
</nz-row>
<smart-module-config #smartModuleConfig (done)="getAllModule()"></smart-module-config>
