<!--事件详情-->
<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-item>
                事件编号：{{event?.id}}
            </nz-breadcrumb-item>
        </nz-breadcrumb>
    </div>
    <div nz-col nzSpan="8" class="text-right">
        <button nzType="primary" (click)="returnBack()" nz-button>返回上一页</button>
        <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>
    <div nz-col nzSpan="12">
        <h2>事件信息</h2>
        <div nz-row>
            <div nz-col nzSpan="4">事件编号</div>
            <div nz-col nzSpan="1"></div>
            <div nz-col nzSpan="7">{{event?.id}}</div>
            <div nz-col nzSpan="4">提交时间</div>
            <div nz-col nzSpan="1"></div>
            <div nz-col nzSpan="7">{{event?.createTime | date:"yyyy-MM-dd HH:mm:ss"}}</div>
        </div>
        <div nz-row>
            <div nz-col nzSpan="4">请求人</div>
            <div nz-col nzSpan="1"></div>
            <div nz-col nzSpan="3">{{event?.requester}}</div>
            <div nz-col nzSpan="7">{{event?.requesterPhone}}</div>
        </div>
        <div nz-row>
            <div nz-col nzSpan="4">事件标题</div>
            <div nz-col nzSpan="1"></div>
            <div nz-col nzSpan="7">{{event?.title}}</div>
            <div nz-col nzSpan="4">事件分类</div>
            <div nz-col nzSpan="1"></div>
            <div nz-col nzSpan="7">{{event?.typeName}}</div>
        </div>
        <div nz-row>
            <div nz-col nzSpan="4">详细描述</div>
            <div nz-col nzSpan="1"></div>
            <div nz-col nzSpan="7">{{event?.description}}</div>
        </div>
        <div nz-row>
            <div nz-col nzSpan="4">附件</div>
            <div nz-col nzSpan="1"></div>
            <div nz-col nzSpan="7">
                <ng-container *ngIf="event?.fileName">
                    {{event?.fileName}}
                    <span (click)="downLoad()" class="main-color cursor">下载</span>
                </ng-container>
            </div>
        </div>

        <h2>流转记录</h2>
        <ng-container *ngFor="let item of transforsList;">
            <div nz-row>
                <div nz-col nzSpan="4">{{item.requesterName}}</div>
                <div nz-col nzSpan="7">转派给{{item.operatorInfo[1]}}</div>
            </div>
        </ng-container>
    </div>
    <div nz-col nzSpan="12">

        <h2>处理结果</h2>
        <div nz-row>
            <div nz-col nzSpan="4">处理结果</div>
            <div nz-col nzSpan="1"></div>
            <div nz-col nzSpan="19">
                <span *ngIf="event?.operateStatus == '0'">未解决</span>
                <span *ngIf="event?.operateStatus == '1'">部分解决</span>
                <span *ngIf="event?.operateStatus == '2'">已解决</span>
            </div>
        </div>
        <div nz-row>
            <div nz-col nzSpan="4">完成时间</div>
            <div nz-col nzSpan="1"></div>
            <div nz-col nzSpan="19">
                {{event?.completeTime | date:"yyyy-MM-dd HH:mm:ss"}}
            </div>
        </div>
        <div nz-row>
            <div nz-col nzSpan="4">关联资产</div>
            <div nz-col nzSpan="1"></div>
            <div nz-col nzSpan="19">
                <p *ngFor="let item of event?.inventorys;">
                    <span style="margin-right: 5px">{{item.inventoryNo}}</span>
                    <span style="margin-right: 5px">{{item.name}}</span>
                    <span>{{item.typeName}}</span>
                </p>
            </div>
        </div>
        <div nz-row>
            <div nz-col nzSpan="4">关联费用</div>
            <div nz-col nzSpan="1"></div>
            <div nz-col nzSpan="19">
                <p class="margin-bottom-10" *ngFor="let item of event?.eventCostList;let i = index">
                    <span class="margin-right-5">
                        <ng-container *ngIf="item.costTypeId == '0'">委外费用</ng-container>
                        <ng-container *ngIf="item.costTypeId == '1'">物料费用</ng-container>
                        <ng-container *ngIf="item.costTypeId == '2'">其他</ng-container>
                    </span>
                    <span class="margin-right-5">{{item.amount}}</span>
                </p>
            </div>
        </div>
        <div nz-row>
            <div nz-col nzSpan="4">违规通报</div>
            <div nz-col nzSpan="1"></div>
            <div nz-col nzSpan="19">
                <p class="margin-bottom-10" *ngFor="let item of event?.eventViolationVOList;let i = index">
                    <span class="margin-right-5">{{item.title}}</span>
                    <span class="margin-right-5">{{item.projectName}}</span>
                </p>
            </div>
        </div>
        <div nz-row>
            <div nz-col nzSpan="4">处理情况</div>
            <div nz-col nzSpan="1"></div>
            <div nz-col nzSpan="19" style="word-wrap:break-word">
                {{event?.operateResult}}
            </div>
        </div>

        <h2>确认与评价</h2>
        <div nz-row>
            <div nz-col nzSpan="4"><span class="color-red">*</span>处理结果:</div>
            <div nz-col nzSpan="1"></div>
            <div nz-col nzSpan="19">
                <ng-container *ngIf="event?.status == 2">
                    <nz-radio-group [(ngModel)]="obj.confirmStatus">
                        <label nz-radio nzValue="0">未解决</label>
                        <label nz-radio nzValue="1">部分解决</label>
                        <label nz-radio nzValue="2">已解决</label>
                    </nz-radio-group>
                </ng-container>
                <ng-container *ngIf="event?.status == 1">
                    <span *ngIf="event?.confirm?.confirmStatus == 0">未解决</span>
                    <span *ngIf="event?.confirm?.confirmStatus == 1">部分解决</span>
                    <span *ngIf="event?.confirm?.confirmStatus == 2">已解决</span>
                </ng-container>
            </div>
        </div>
        <div nz-row>
            <div nz-col nzSpan="4"><span class="color-red">*</span>服务评价:</div>
            <div nz-col nzSpan="1"></div>
            <div nz-col nzSpan="19">
                <ng-container *ngIf="event?.status == 2">
                    <ng-container *ngFor="let star of starList;let i = index;">
                        <i (click)="checkStar(i)" [ngClass]="star" class="anticon"></i>
                    </ng-container>
                </ng-container>
                <ng-container *ngIf="event?.status == 1">
                    {{event?.confirm?.score}}分
                </ng-container>
            </div>
        </div>
        <div nz-row>
            <div nz-col nzSpan="4">评价人:</div>
            <div nz-col nzSpan="1"></div>
            <div nz-col nzSpan="19">
                <ng-container *ngIf="event?.status == 1">
                    {{event?.confirm?.userName}}
                </ng-container>
                <ng-container *ngIf="event?.status == 2">
                    {{userName}}
                </ng-container>
            </div>
        </div>
        <div nz-row>
            <div nz-col nzSpan="4">意见建议:</div>
            <div nz-col nzSpan="1"></div>
            <div nz-col nzSpan="19" style="word-wrap:break-word">
                <ng-container *ngIf="event?.status == 1">
                    {{event?.confirm?.suggest}}
                </ng-container>
                <ng-container *ngIf="event?.status == 2">
                    <textarea [(ngModel)]="obj.suggest" id="tyoeDescribe" row="4" maxlength="500" nz-input></textarea>
                </ng-container>
            </div>
        </div>
        <p *ngIf="event?.status == 2">
            <button (click)="done()" nz-button><span>确定</span></button>
        </p>
    </div>
</div>
