<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-appstore"></i>配置
        </button>
    </div>
</div>
<nz-row [nzGutter]="4">
    <div nz-col nzSpan="12" *ngIf="page.lookModule.includes('运维事件')">
        <p class="title">运维事件
            <span (click)="goMore('workHandle')">更多</span>
        </p>
        <!--        运维事件-->
        <nz-table #nzTable1 [nzData]="table.eventList" [nzPageSize]="5" [nzLoading]="loading.eventLoading"
                  [nzFrontPagination]="true">
            <thead>
            <tr>
                <th>事件编号</th>
                <th nzWidth="30%">标题</th>
                <th nzWidth="20%">处理人</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 | stringSlice:8:8}}
                </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"  *ngIf="page.lookModule.includes('巡检计划')">
        <p class="title">巡检计划 <span (click)="goMore('inspectPlan')">更多</span></p>
        <!--        巡检计划-->
        <nz-table #nzTable2 [nzData]="table.planList" [nzLoading]="loading.planLoading" [nzPageSize]="5"
                  [nzFrontPagination]="true">
            <thead>
            <tr>
                <th nzWidth="30%">计划名称</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 | stringSlice:8:8}}
                </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>
    <div nz-col nzSpan="12"  *ngIf="page.lookModule.includes('资产管理')">
        <p class="title">资产管理 <span (click)="goMore('assetPart')">更多</span></p>
        <!--        资产管理-->
        <nz-table #nzTable3 [nzData]="table.childrenList" [nzFrontPagination]="true" [nzPageSize]="5"
                  [nzLoading]="loading.childrenLoading">
            <thead>
            <tr>
                <th nzWidth="30%">子分类</th>
                <th>资产总数</th>
                <th>库存</th>
                <th>使用中</th>
                <th>关联事件</th>
            </tr>
            </thead>
            <tbody>
            <tr *ngFor="let data of nzTable3.data">
                <td>
                    {{data.name | stringSlice:8:8}}
                </td>
                <td>
                    {{data.inventorycount}}
                </td>
                <td>{{data.stock}}</td>
                <td>
                    {{data.usedcount}}
                </td>
                <td>{{data.eventSum | stringSlice:8:8}}</td>
            </tr>
            </tbody>
        </nz-table>
    </div>
    <div nz-col nzSpan="12" *ngIf="page.lookModule.includes('备件管理')">
        <p class="title">备件管理 <span (click)="goMore('SparePartsManagement')">更多</span></p>
        <!--        备件管理-->
        <nz-table #nzTable4 [nzPageSize]="5" [nzData]="table.spareList" [nzFrontPagination]="true"
                  [nzLoading]="loading.spareLoading">
            <thead>
            <tr>
                <th>备件编号</th>
                <th nzWidth="30%">备件名称</th>
                <th>所属类型</th>
                <th>归属项目</th>
            </tr>
            </thead>
            <tbody>
            <tr *ngFor="let data of nzTable4.data">
                <td>{{data.inventoryNo}}</td>
                <td>{{data.inventoryName | stringSlice:8:8}}</td>
                <td>{{data.inventoryType}}</td>
                <td>{{data.belongObject | stringSlice:8:8}}</td>
            </tr>
            </tbody>
        </nz-table>
    </div>
    <div nz-col nzSpan="12" *ngIf="page.lookModule.includes('系统变更')">
        <p class="title">系统变更 <span (click)="goMore('changeManage')">更多</span></p>
        <!--        系统变更-->
        <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>
            </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 | stringSlice:8:8}}</td>
                <td>{{data.verifyUserName}}</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" *ngIf="page.lookModule.includes('运维项目')">
        <p class="title">运维项目 <span (click)="goMore('oprProject')">更多</span></p>
        <!--        运维项目-->
        <nz-table #nzTable6 [nzPageSize]="5" [nzData]="table.projectList" [nzLoading]="loading.projectLoading"
                  [nzFrontPagination]="true">
            <thead>
            <tr>
                <th nzWidth="30%">项目名称</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 | stringSlice:8:8}}
                </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>
    <div nz-col nzSpan="12" *ngIf="page.lookModule.includes('运维公司')">
        <p class="title">运维公司 <span (click)="goMore('oprCompany')">更多</span></p>
        <!--        运维公司-->
        <nz-table #nzTable7 [nzPageSize]="5" [nzData]="table.companyList" [nzLoading]="loading.companyLoading"
                  [nzFrontPagination]="true">
            <thead>
            <tr>
                <th nzWidth="30%">维护公司名称</th>
                <th>运维负责人</th>
                <th>工作类型</th>
                <th>当前项目</th>
                <th>项目总额</th>
            </tr>
            </thead>
            <tbody>
            <tr *ngFor="let data of nzTable7.data">
                <td>{{data.name  | stringSlice:8:8}}</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" *ngIf="page.lookModule.includes('运维团队')">
        <p class="title">运维团队 <span (click)="goMore('oprTeam')">更多</span></p>
        <!--        运维团队-->
        <nz-table #nzTable8 [nzPageSize]="5" [nzData]="table.teamList" [nzLoading]="loading.teamLoading"
                  [nzFrontPagination]="true">
            <thead>
            <tr>
                <th nzWidth="30%">团队名称</th>
                <th>团队类型</th>
                <th>所在公司</th>
                <th>团队负责人</th>
            </tr>
            </thead>
            <tbody>
            <tr *ngFor="let data of nzTable8.data">
                <td>{{data.name  | stringSlice:8:8}}</td>
                <td>
                    <span *ngIf="data.type == 0">驻场团队</span>
                    <span *ngIf="data.type == 1">非驻场团队</span>
                </td>
                <td>{{data.companyName  | stringSlice:8:8}}</td>
                <td>{{data.principal}}</td>
            </tr>
            </tbody>
        </nz-table>
    </div>
    <div nz-col nzSpan="12" *ngIf="page.lookModule.includes('运维费用')">
        <p class="title">运维费用 <span (click)="goMore('oprCost')">更多</span></p>
        <!--        运维费用-->
        <nz-table #nzTable9 [nzPageSize]="5" [nzData]="table.costList" [nzLoading]="loading.costLoading"
                  [nzFrontPagination]="true">
            <thead>
            <tr>
                <th nzWidth="30%">维护项目</th>
                <th>填报时间</th>
                <th>填报人</th>
                <th>费用说明</th>
                <th>总费用</th>
            </tr>
            </thead>
            <tbody>
            <tr *ngFor="let data of nzTable9.data">
                <td>{{data.projectName | stringSlice:8:8}}</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" *ngIf="page.lookModule.includes('资源预警')">
        <p class="title">资源预警 <span (click)="goMore('resource-warning')">更多</span></p>
        <!--        资源预警-->
        <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>
    <div nz-col nzSpan="12" *ngIf="page.lookModule.includes('业务预警')">
        <p class="title">业务预警 <span (click)="goMore('business-warning')">更多</span></p>
        <!--        业务预警-->
        <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" *ngIf="page.lookModule.includes('工作预警')">
        <p class="title">工作预警 <span (click)="goMore('work-warning')">更多</span></p>
        <!--        工作预警-->
        <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>
