chenjingyu 4 years ago
parent
commit
6c2a44f332
  1. 9
      src/app/examiner/create-test-score/create-test-score.component.html
  2. 7
      src/app/examiner/create-test-score/create-test-score.component.scss
  3. 46
      src/app/examiner/create-test-score/create-test-score.component.ts
  4. 4
      src/app/examiner/examiner-new-one/examiner-new-one.component.html

9
src/app/examiner/create-test-score/create-test-score.component.html

@ -19,7 +19,7 @@
<td>单位名称</td>
<td>总分</td>
</tr>
<tr *ngFor="let item of unitId">
<tr *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>
@ -37,7 +37,8 @@
</div>
<div class="maincontantbox">
<div class="basicinfodiv" *ngIf="selectedTab == 1">
<div *ngFor="let unit of unitId;let key = index" style="margin-bottom: 30px;">
<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>
<!-- 基本信息 -->
@ -253,6 +254,8 @@
</mat-expansion-panel>
</mat-accordion>
</div>
</div>
</div>
<div class="fightdeploydiv" *ngIf="selectedTab == 2">
<div class="addPlan" (click)="addPlan()">
@ -290,7 +293,7 @@
</div>
</div>
<div class="btnbox">
<div class="btn">
<div class="btn" (click)="goBack()">
上一步
</div>
<div class="btn" (click)="finishClick()">

7
src/app/examiner/create-test-score/create-test-score.component.scss

@ -59,6 +59,13 @@ table { text-align: center; border-collapse: collapse; padding:2px;}
tr:nth-child(1){
background: #F5FDFE;
}
.selectedLi{
background-color: #07CDCF;
color: #fff;
.colorspan{
color: #fff;
}
}
}
}
}

46
src/app/examiner/create-test-score/create-test-score.component.ts

@ -28,7 +28,11 @@ export class CreateTestScoreComponent implements OnInit {
this.getFunDiv()
this.getFireFac()
}
//当前选中的单位
selectedUnitIndex = 0
clickUnitName(key){
this.selectedUnitIndex = key
}
//模拟单位数据
unitDatas:any = [
{name:'富丽华大酒店1',score:0,basicInfoScore:0,basicInfoItemScore:0,basicInfoNodes : [
@ -81,11 +85,11 @@ export class CreateTestScoreComponent implements OnInit {
]
//上个页面传过来的单位数据
unitId:any = [{name:'最最最最最',id:'5fb76c42919f2b44e464016f'},
{name:'华南城集团有限公司',id:'5ee19fe06f91049f5e23e937'},
{name:'贵港油库',id:'5fa35d68f8eb762cb03c662e'}
]
// unitId:any = [{name:'最最最最最',id:'5fb76c42919f2b44e464016f'},
// {name:'华南城集团有限公司',id:'5ee19fe06f91049f5e23e937'},
// {name:'贵港油库',id:'5fa35d68f8eb762cb03c662e'}
// ]
unitId:any = JSON.parse(localStorage.getItem('checkedWork'))
//获取单位基本信息
getUnitData(){
this.unitId.forEach((element,index) => {
@ -737,7 +741,7 @@ export class CreateTestScoreComponent implements OnInit {
})
this.examScore = examScore + examScore2
}
@ViewChild('nzTreeComponent', { static: false }) nzTreeComponent!: NzTreeComponent;
//保存
save(){
let copyDatas = JSON.parse(JSON.stringify(this.unitId))
@ -1001,14 +1005,32 @@ export class CreateTestScoreComponent implements OnInit {
//循环每个建筑处理数据
console.log(copyDatas)
// copyDatas.forEach(item =>{
// //建筑的基本信息模块处理
// item.basicInfoNodes.forEach((i,key) => {
// })
let paperDataInfo = []
copyDatas.forEach((item,key) =>{
paperDataInfo[key] = {}
paperDataInfo[key].id = ''
paperDataInfo[key].paperId = ''
paperDataInfo[key].companyId = item.id
paperDataInfo[key].basicInfoData = item.basicInfoNodes
paperDataInfo[key].basicInfoScore = item.basicInfoScore
paperDataInfo[key].adjoinData = item.aroundNodes
paperDataInfo[key].adjoinScore = item.aroundScore
paperDataInfo[key].importLocationData = item.keySiteNodes
paperDataInfo[key].importLocationScore = item.keySiteScore
paperDataInfo[key].functionalDivisionData = item.funDivNodes
paperDataInfo[key].functionalDivisionScore = item.funDivScore
paperDataInfo[key].facilityData = item.fireFacNodes
paperDataInfo[key].facilityScore = item.fireFacScore
})
console.log(paperDataInfo)
// })
}
//上一步
goBack(){
window.history.back();
}
//完成按钮
finishClick(){

4
src/app/examiner/examiner-new-one/examiner-new-one.component.html

@ -23,7 +23,7 @@
<div><label style="margin-right: 10px;position: relative;top: 5px;" >辖区中队:</label></div>
<div>
<input (click)="stopclose($event)" readonly autocomplete="off" [(ngModel)]="js" name="js" (focus)="openorganizationbox()" placeholder="请填写">
<mat-checkbox style="margin-left: 6px;" [(ngModel)]="jscheck" name="jscheck">包含下级</mat-checkbox>
<mat-checkbox color="primary" style="margin-left: 6px;" [(ngModel)]="jscheck" name="jscheck">包含下级</mat-checkbox>
<div class="organizationbox" *ngIf="isorganizationbox">
<div (click)="closediv()" class="closediv"><mat-icon>clear</mat-icon></div>
<mat-tree [dataSource]="dataSource" [treeControl]="treeControl">
@ -59,7 +59,7 @@
<th mat-header-cell *matHeaderCellDef>
</th>
<td mat-cell *matCellDef="let element">
<mat-checkbox id={{element.id}} (change)="checkChange($event,element)" [(ngModel)]="element.checked"></mat-checkbox>
<mat-checkbox color="primary" id={{element.id}} (change)="checkChange($event,element)" [(ngModel)]="element.checked"></mat-checkbox>
</td>
</ng-container>
<ng-container matColumnDef="unitname">

Loading…
Cancel
Save