考核考试系统
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

310 lines
21 KiB

<div class="box" id="createtestscore">
<div class="topbox">
<app-tabbar></app-tabbar>
</div>
<div class="contant">
<div class="main">
<div class="leftDiv">
<div class="title">
<div>
单位列表
</div>
<div>
总分: <span class="colorspan">{{examScore}}</span>
</div>
</div>
<div class="unitList">
<table>
<tr>
<td>单位名称</td>
<td>总分</td>
</tr>
<tr style="cursor: pointer;" *ngFor="let item of unitId;let key = index" (click)="clickUnitName(key)" [ngClass]="{'selectedLi': key == selectedUnitIndex}">
<td>{{item.name}}</td>
<td class="colorspan">{{item.score}}</td>
</tr>
</table>
</div>
</div>
<div class="rightDiv">
<div class="tabsbox">
<div [ngClass]="{selectedTab: selectedTab == 1}" (click)="selectTab(1)">
基本信息
</div>
<div [ngClass]="{selectedTab: selectedTab == 2}" (click)="selectTab(2)">
作战部署
</div>
</div>
<div class="maincontantbox">
<div id="basicinfodiv" class="basicinfodiv" [hidden]="!(selectedTab == 1)">
<div *ngFor="let unit of unitId;let key = index">
<div [hidden]="!(key == selectedUnitIndex)">
<!-- 选择的单位名称 -->
<p class="colorspan" style="margin: 0 0 12px 6px;">{{unit.name}}</p>
<!-- 基本信息 -->
<mat-accordion *ngIf="unit.basicInfoNodes && unit.basicInfoNodes.length != 0">
<mat-expansion-panel style="box-shadow: 0 0 black;" expanded>
<mat-expansion-panel-header collapsedHeight ='40px' expandedHeight='40px' style="position: relative;padding-left:20px;background: #F5FDFE;">
<mat-panel-title>
基本信息
<!-- <span class="colorspan" style="margin-left: 20px;">{{unit.basicInfoScore ? unit.basicInfoScore : 0}}分</span> -->
<span style="margin-left: 20px;">
总分值: <input onchange="if(!value)value=0" class="scoreInput" type="number" (click)="stopPropagation($event)"
[(ngModel)]="unit.basicInfoScore" (input)="sumScore('基本信息',key)"> 分,
单项
<span style="color: #FF8678;">
{{unit.basicInfoItemScore ? unit.basicInfoItemScore : 0}}
</span>
<span *ngIf="unit.basicInfoSelectedNum">(已选择 {{unit.basicInfoSelectedNum}} 项)</span>
</span>
</mat-panel-title>
</mat-expansion-panel-header>
<div style="box-sizing: border-box;padding: 10px;">
<nz-tree
[nzData]="unit.basicInfoNodes"
nzCheckable
nzMultiple
[nzCheckedKeys]="unit.basicInfoNodesKey"
[nzExpandedKeys]="defaultExpandedKeys"
[nzSelectedKeys]="defaultSelectedKeys"
(nzClick)="nzEvent($event,key)"
(nzExpandChange)="nzEvent($event,key)"
(nzCheckBoxChange)="nzEvent($event,key)"
[nzTreeTemplate]="nzTreeTemplate"
>
</nz-tree>
<ng-template #nzTreeTemplate let-node let-origin="origin">
<div class="treeNodeTemplate">
<label class="overflowText textNode">{{node.origin.name}}</label>
<div class="scoreDiv" *ngIf="node.level == '0'">
<span class="colorspan lookitem" (click)="lookTreeNode(node)">查看</span>
</div>
</div>
</ng-template>
</div>
</mat-expansion-panel>
</mat-accordion>
<!-- 四周毗邻 -->
<mat-accordion *ngIf="unit.aroundNodes && unit.aroundNodes.length != 0">
<mat-expansion-panel style="box-shadow: 0 0 black;" expanded>
<mat-expansion-panel-header collapsedHeight ='40px' expandedHeight='40px' style="position: relative;padding-left:20px;background: #F5FDFE;">
<mat-panel-title>
四周毗邻
<span style="margin-left: 20px;">
总分值: <input class="scoreInput" type="number" (click)="stopPropagation($event)"
[(ngModel)]="unit.aroundScore" (input)="sumScore('四周毗邻',key)"> 分,
单项 <span style="color: #FF8678;">
{{unit.aroundItemScore ? unit.aroundItemScore : 0}}
</span>
<span *ngIf="unit.aroundSelectedNum">(已选择 {{unit.aroundSelectedNum}} 项)</span>
</span>
</mat-panel-title>
</mat-expansion-panel-header>
<div style="box-sizing: border-box;padding: 10px;">
<nz-tree
[nzData]="unit.aroundNodes"
nzCheckable
nzMultiple
[nzCheckedKeys]="unit.aroundNodesKey"
[nzExpandedKeys]="defaultExpandedKeys"
[nzSelectedKeys]="defaultSelectedKeys"
(nzClick)="nzEvent($event,key)"
(nzExpandChange)="nzEvent($event,key)"
(nzCheckBoxChange)="nzEvent($event,key)"
[nzTreeTemplate]="nzTreeTemplate"
>
</nz-tree>
<ng-template #nzTreeTemplate let-node let-origin="origin">
<div class="treeNodeTemplate">
<label class="overflowText textNode">{{node.origin.title ? node.origin.title : node.origin.name}}</label>
<div class="scoreDiv" *ngIf="node.level == '0'">
<span class="colorspan lookitem" (click)="lookTreeNode(node)">查看</span>
</div>
</div>
</ng-template>
</div>
</mat-expansion-panel>
</mat-accordion>
<!-- 重点部位 -->
<mat-accordion *ngIf="unit.keySiteNodes && unit.keySiteNodes.length != 0">
<mat-expansion-panel style="box-shadow: 0 0 black;" expanded>
<mat-expansion-panel-header collapsedHeight ='40px' expandedHeight='40px' style="position: relative;padding-left:20px;background: #F5FDFE;">
<mat-panel-title>
重点部位
<span style="margin-left: 20px;">
总分值: <input class="scoreInput" type="number" (click)="stopPropagation($event)"
[(ngModel)]="unit.keySiteScore" (input)="sumScore('重点部位',key)"> 分,
单项 <span style="color: #FF8678;">
{{unit.keySiteItemScore ? unit.keySiteItemScore : 0}}
</span>
<span *ngIf="unit.keySiteSelectedNum">(已选择 {{unit.keySiteSelectedNum}} 项)</span>
</span>
</mat-panel-title>
</mat-expansion-panel-header>
<div style="box-sizing: border-box;padding: 10px;">
<nz-tree
[nzData]="unit.keySiteNodes"
nzCheckable
nzMultiple
[nzCheckedKeys]="unit.keySiteNodesKey"
[nzExpandedKeys]="defaultExpandedKeys"
[nzSelectedKeys]="defaultSelectedKeys"
(nzClick)="nzEvent($event,key)"
(nzExpandChange)="nzEvent($event,key)"
(nzCheckBoxChange)="nzEvent($event,key)"
[nzTreeTemplate]="nzTreeTemplate"
>
</nz-tree>
<ng-template #nzTreeTemplate let-node let-origin="origin">
<div class="treeNodeTemplate">
<label class="overflowText textNode">{{node.origin.title ? node.origin.title : node.origin.name}}</label>
<div class="scoreDiv" *ngIf="node.level == '0'">
<span class="colorspan lookitem" (click)="lookTreeNode(node)">查看</span>
</div>
</div>
</ng-template>
</div>
</mat-expansion-panel>
</mat-accordion>
<!-- 功能分区 -->
<mat-accordion *ngIf="unit.funDivNodes && unit.funDivNodes.length != 0">
<mat-expansion-panel style="box-shadow: 0 0 black;" expanded>
<mat-expansion-panel-header collapsedHeight ='40px' expandedHeight='40px' style="position: relative;padding-left:20px;background: #F5FDFE;">
<mat-panel-title>
功能分区
<span style="margin-left: 20px;">
总分值: <input class="scoreInput" type="number" (click)="stopPropagation($event)"
[(ngModel)]="unit.funDivScore" (input)="sumScore('功能分区',key)"> 分,
单项 <span style="color: #FF8678;">
{{unit.funDivItemScore ? unit.funDivItemScore : 0}}
</span>
<span *ngIf="unit.funDivSelectedNum">(已选择 {{unit.funDivSelectedNum}} 项)</span>
</span>
</mat-panel-title>
</mat-expansion-panel-header>
<div style="box-sizing: border-box;padding: 10px;">
<nz-tree
[nzData]="unit.funDivNodes"
nzCheckable
nzMultiple
[nzCheckedKeys]="unit.funDivNodesKey"
[nzExpandedKeys]="defaultExpandedKeys"
[nzSelectedKeys]="defaultSelectedKeys"
(nzClick)="nzEvent($event,key)"
(nzExpandChange)="nzEvent($event,key)"
(nzCheckBoxChange)="nzEvent($event,key)"
[nzTreeTemplate]="nzTreeTemplate"
>
</nz-tree>
<ng-template #nzTreeTemplate let-node let-origin="origin">
<div class="treeNodeTemplate">
<label class="overflowText textNode">{{node.origin.region ? node.origin.region : node.origin.name}}</label>
<div class="scoreDiv" *ngIf="node.level == '0'">
<span class="colorspan lookitem" (click)="lookTreeNode(node)">查看</span>
</div>
</div>
</ng-template>
</div>
</mat-expansion-panel>
</mat-accordion>
<!-- 数据核验(消防设施) -->
<mat-accordion *ngIf="unit.fireFacNodes && unit.fireFacNodes .length != 0">
<mat-expansion-panel style="box-shadow: 0 0 black;" expanded>
<mat-expansion-panel-header collapsedHeight ='40px' expandedHeight='40px' style="position: relative;padding-left:20px;background: #F5FDFE;">
<mat-panel-title>
数据核验
<span style="margin-left: 20px;">
总分值: <input class="scoreInput" type="number" (click)="stopPropagation($event)"
[(ngModel)]="unit.fireFacScore " (input)="sumScore('数据核验',key)"> 分,
单项 <span style="color: #FF8678;">
{{unit.fireFacItemScore ? unit.fireFacItemScore : 0}}
</span>
<span *ngIf="unit.fireFacSelectedNum">(已选择 {{unit.fireFacSelectedNum}} 项)</span>
</span>
</mat-panel-title>
</mat-expansion-panel-header>
<div style="box-sizing: border-box;padding: 10px;">
<nz-tree
[nzData]="unit.fireFacNodes"
nzCheckable
nzMultiple
[nzCheckedKeys]="unit.fireFacNodesKey"
[nzExpandedKeys]="defaultExpandedKeys"
[nzSelectedKeys]="defaultSelectedKeys"
(nzClick)="nzEvent($event,key)"
(nzExpandChange)="nzEvent($event,key)"
(nzCheckBoxChange)="nzEvent($event,key)"
[nzTreeTemplate]="nzTreeTemplate"
>
</nz-tree>
<ng-template #nzTreeTemplate let-node let-origin="origin">
<div class="treeNodeTemplate">
<label class="overflowText textNode">{{node.origin.name}}</label>
<div class="scoreDiv" *ngIf="node.level == '0'">
<span class="colorspan lookitem" (click)="lookTreeNode(node)">查看</span>
</div>
</div>
</ng-template>
</div>
</mat-expansion-panel>
</mat-accordion>
</div>
</div>
</div>
<div class="fightdeploydiv" [hidden]="!(selectedTab == 2) ">
<div class="addPlan" (click)="addPlan()" *ngIf="!(pattern=='look')">
<mat-icon style="vertical-align: text-top">add_circle_outline</mat-icon>添加预案
</div>
<div class="planList" *ngIf="unitId[selectedUnitIndex]">
<table>
<tr >
<td>预案名称</td>
<td>添加人</td>
<td>修改时间</td>
<td>是否公开</td>
<td>编制级别</td>
<td>设置分数</td>
<td *ngIf="!(pattern=='look')">操作</td>
</tr>
<tr *ngFor="let item of unitId[selectedUnitIndex].planList">
<td>{{item.title}}</td>
<td>{{item.creatorName}}</td>
<td>{{item.modifiedTime | date:'yyyy-MM-dd'}}</td>
<td>{{item.isPublic ? '已公开' : '未公开'}}</td>
<td>{{item.planLevel | planlevel}}</td>
<td>
<input (input)="planItemScore()" type="number" [(ngModel)]="item.score">
</td>
<td *ngIf="!(pattern=='look')">
<span style="color: #07CDCF;" (click)="edit(item)" >编辑</span>
<span style="color: #FF8678;" (click)="deletePlan(item)">删除</span>
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="btnbox">
<div class="btn" (click)="goBack()">
上一步
</div>
<div class="btn" (click)="save()" *ngIf="!(pattern=='look')">
完成
</div>
</div>
</div>
</div>