diff --git a/angular.json b/angular.json index 07cf0ab..d183d30 100644 --- a/angular.json +++ b/angular.json @@ -30,11 +30,13 @@ ], "styles": [ "src/styles.scss", - "node_modules/viewerjs/dist/viewer.css" + "node_modules/viewerjs/dist/viewer.css", + "./node_modules/swiper/css/swiper.min.css" ], "scripts": [ "node_modules/echarts/dist/echarts.js", - "src/assets/echarts/echarts.common.min.js" + "src/assets/echarts/echarts.common.min.js", + "./node_modules/swiper/js/swiper.min.js" ] }, "configurations": { diff --git a/src/app/examiner/create-test-score/addPlanTwo.html b/src/app/examiner/create-test-score/addPlanTwo.html index e509b01..9ff055d 100644 --- a/src/app/examiner/create-test-score/addPlanTwo.html +++ b/src/app/examiner/create-test-score/addPlanTwo.html @@ -3,7 +3,7 @@ <div class="title"> 添加预案 </div> - <div *ngIf="dataSource.length != 0" class="tablebox"> + <div *ngIf="dataSource && dataSource.length != 0" class="tablebox"> <table mat-table [dataSource]="dataSource" class="mat-elevation-z8"> <!-- Checkbox Column --> @@ -47,7 +47,7 @@ </table> </div> - <div *ngIf="dataSource.length == 0"> + <div *ngIf="dataSource && dataSource.length == 0"> 该单位暂无审核通过的二维预案 </div> </div> diff --git a/src/app/examiner/create-test-score/create-test-score.component.html b/src/app/examiner/create-test-score/create-test-score.component.html index a87ec3d..d747395 100644 --- a/src/app/examiner/create-test-score/create-test-score.component.html +++ b/src/app/examiner/create-test-score/create-test-score.component.html @@ -36,7 +36,7 @@ </div> </div> <div class="maincontantbox"> - <div class="basicinfodiv" [hidden]="!(selectedTab == 1)"> + <div id="basicinfodiv" class="basicinfodiv" [hidden]="!(selectedTab == 1)"> <div *ngFor="let unit of unitId;let key = index"> <div [hidden]="!(key == selectedUnitIndex)"> <!-- 选择的单位名称 --> diff --git a/src/app/examiner/create-test-score/create-test-score.component.ts b/src/app/examiner/create-test-score/create-test-score.component.ts index f3c270e..49fe135 100644 --- a/src/app/examiner/create-test-score/create-test-score.component.ts +++ b/src/app/examiner/create-test-score/create-test-score.component.ts @@ -60,7 +60,7 @@ export class CreateTestScoreComponent implements OnInit { clickUnitName(key){ this.selectedUnitIndex = key } - unitId:any = JSON.parse(sessionStorage.getItem('checkedWork')) + unitId:any = JSON.parse(sessionStorage.getItem(sessionStorage.getItem('paperId'))) //获取单位基本信息 async getUnitData(){ @@ -1080,11 +1080,19 @@ export class CreateTestScoreComponent implements OnInit { paperDataInfo[key].functionalDivisionScore = item.funDivScore paperDataInfo[key].facilityData = item.fireFacNodes ? JSON.stringify(item.fireFacNodes) : '[]' paperDataInfo[key].facilityScore = item.fireFacScore + paperDataInfo[key].planList = item.planList }) - // console.log(123456,paperDataInfo) //判断是否存在总分填写后没有勾选 或者勾选了没有填写总分的情况 paperDataInfo.forEach(element => { + element.planList ? element.planList.forEach(item => { + if(!item.score || item.score == 0){ + element.isPlanScore = false + }else{ + element.isPlanScore = true + } + }) : null + //判断存在总分填写后没有勾选题目 if( (element.basicInfoScore != 0 && JSON.parse(element.basicInfoData).length == 0) || (element.adjoinScore != 0 && JSON.parse(element.adjoinData).length == 0) || @@ -1109,14 +1117,26 @@ export class CreateTestScoreComponent implements OnInit { config.duration = 3000 this.snackBar.open('存在勾选过题目,但未填写总分的分组','确定',config); return + }else + //存在预案没有填写总分 + if(!element.isPlanScore){ + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('存在预案未填写总分的分组','确定',config); + return }else{ - const dialogRef = this.dialog.open(FinishDialog, { - width: '650px', - data: paperDataInfo - }); - dialogRef.afterClosed().subscribe(result => { - - }); + + if(window.confirm('你确定要创建该试卷吗?')){ + console.log(555,this.unitId) + + console.log(666,paperDataInfo) + + }else{ + + + } + } @@ -1220,7 +1240,7 @@ export class AddPlanTwoDialog { sessionStorage.setItem('planId',this.selectedRadioData.id) sessionStorage.setItem('buildingTypeId',this.data.companyData.companyData.buildingTypes[0].id) sessionStorage.setItem('companyId',this.data.companyData.companyData.id) - window.open('/canvasTool?openType=1') + window.open(`/canvasTool?openType=1&planName=${this.selectedRadioData.name}`) }else{ if(this.dataSource.length == 0){ this.dialogRef.close(); @@ -1254,7 +1274,7 @@ export class AddPlanTwoDialog { sessionStorage.setItem("companyId",this.data.companyData.companyData.id) sessionStorage.setItem("buildingTypeId",this.data.companyData.companyData.buildingTypes[0].id) sessionStorage.setItem("editable","1") - window.open('/canvasTool?openType=2') + window.open(`/canvasTool?openType=2&planName=${this.customPlanName}`) }) } } @@ -1275,103 +1295,21 @@ export class FinishDialog{ constructor(private router:Router,private http: HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar,public dialogRef: MatDialogRef<AddPlanTwoDialog>,@Inject(MAT_DIALOG_DATA) public data: any) {} ngOnInit(): void { - this.getProfiles() - } - //获取登录账号的个人资料 - Profiles:any - getProfiles(){ - this.http.get('/api/ExamAccounts/Profiles').subscribe(data => { - console.log(data) - this.Profiles = data - }) + } - startTime:string//考试开始时间 - endTime:string//考试结束时间 - examName:string//考试名称 - //弹窗确定点击事件 onNoClick(): void { - const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - if(this.startTime!=undefined&&this.endTime!=undefined&&this.examName!=undefined){ - if(this.startTime>this.endTime){ - this.snackBar.open('开始时间不能大于结束时间','确定',config); - } - else{ - //截取字符串,得到日期部分"2009-12-02",用split把字符串分隔成数组 - var begin1=this.startTime.substr(0,10).split("-"); - var end1=this.endTime.substr(0,10).split("-"); - //将拆分的数组重新组合,并实例成化新的日期对象 - var date1=new Date(begin1[1] + - + begin1[2] + - + begin1[0]); - var date2=new Date(end1[1] + - + end1[2] + - + end1[0]); - //得到两个日期之间的差值m,以分钟为单位 - var m=Number(Math.abs(Number(date2)-Number(date1))/1000/60); - //小时数和分钟数相加得到总的分钟数 - var min1=parseInt(this.startTime.substr(11,2))*60+parseInt(this.startTime.substr(14,2)); - var min2=parseInt(this.endTime.substr(11,2))*60+parseInt(this.endTime.substr(14,2)); - //两个分钟数相减得到时间部分的差值,以分钟为单位 - var n=min2-min1; - //将日期和时间两个部分计算出来的差值相加,即得到两个时间相减后的分钟数 - var minutes=m+n; - - console.log(this.startTime,this.endTime) - let params = { - id: null, - title: this.examName, - duration: minutes, - modifiedTime: new Date(), - deleted: false, - startTime: this.startTime, - endTime: this.endTime, - organizationId: this.Profiles.organizationId, - creatorId: this.Profiles.id, - paperDataInfo: this.data - } - this.http.post('/api/Papers',params).subscribe(data => { - this.snackBar.open('创建成功','确定',config); - this.dialogRef.close(); - sessionStorage.removeItem("checkedWork") - this.router.navigate(['/home/createexam-index']) //跳转试卷列表页面 - },err => { - this.snackBar.open(err,'确定',config); - }) - } - } - else{ - if(this.startTime==undefined) - this.snackBar.open('请输入开始时间','确定',config); - else if(this.endTime==undefined) - this.snackBar.open('请输入结束时间','确定',config); - else if(this.examName==undefined) - this.snackBar.open('请输入试卷名称','确定',config); - } - - } + if(window.confirm('你确定要创建该试卷吗?')){ + alert("确定"); + + }else{ + alert("取消"); - //ngzerro组件 - timeDefaultValue = setHours(new Date(), 0); - disabledDateTime: DisabledTimeFn = () => { - var second=[] - for(var i=1;i<60;i++){ - second.push(i) } - return { - nzDisabledHours: () => [], - nzDisabledMinutes: () => [], - nzDisabledSeconds: () => second - }; - }; - - onChange(result: Date[]): void { - console.log('onChange: ', result); } - getWeek(result: Date[]): void { - console.log('week: ', result.map(getISOWeek)); - } close(){ this.dialogRef.close(); } diff --git a/src/app/examiner/create-test-score/finishDialog.html b/src/app/examiner/create-test-score/finishDialog.html index b2a3cde..576f9a8 100644 --- a/src/app/examiner/create-test-score/finishDialog.html +++ b/src/app/examiner/create-test-score/finishDialog.html @@ -6,7 +6,7 @@ * @LastEditors: sueRimn * @LastEditTime: 2020-12-14 14:08:52 --> -<div class="box"> +<!-- <div class="box"> <div class="diaone"> <div style="margin-bottom: 5px;"><label>请填写试卷名称:</label></div> <div><input placeholder="请填写" [(ngModel)]="examName"></div> @@ -14,8 +14,7 @@ <div class="diatwo"> <div class="starttime"> <div style="margin-bottom: 5px;"><label>请选择开始时间:</label></div> - <!-- <div><nz-range-picker class="datepicker" nzFormat="yyyy-MM-dd HH:mm" [nzShowTime]="{ nzHideDisabledOptions: true, nzDefaultOpenValue: timeDefaultValue }" [nzDisabledTime]="disabledDateTime" [(ngModel)]="date" (ngModelChange)="onChange($event)"></nz-range-picker> - </div> --> + <div><input type="datetime-local" name="start_time" value="" [(ngModel)]="startTime" /></div> </div> <div class="endtime"> @@ -29,4 +28,4 @@ <button mat-button (click)="onNoClick()" style="background-color: #07CDCF;margin-left: 200px;color: #fff;">确定</button> <button mat-button type="button" (click)="close()" style=" background-color: #FF8678;margin-left: 25px;color: #fff;">取消</button> </div> -</div> \ No newline at end of file +</div> --> \ No newline at end of file diff --git a/src/app/ui/collection-tools/collection-tools.component.ts b/src/app/ui/collection-tools/collection-tools.component.ts index bc026a5..30c1264 100644 --- a/src/app/ui/collection-tools/collection-tools.component.ts +++ b/src/app/ui/collection-tools/collection-tools.component.ts @@ -1080,10 +1080,8 @@ export class CollectionToolsComponent implements OnInit { } - //打开消防设施考题设定 openFireExamination () { - console.log(1,this.beforeOneCheckedBuilding) let treeData = JSON.parse( JSON.stringify(this.dataSource.data) ) let buildFloorData = { buildingData:this.beforeOneCheckedBuilding, @@ -1096,8 +1094,16 @@ export class CollectionToolsComponent implements OnInit { //上传考题 openUploadQuestions () { let treeData = JSON.parse( JSON.stringify(this.dataSource.data) ) - let data = { treeData: treeData, question: JSON.parse( JSON.stringify(this.examMsg) ) } - let dialogRef = this.dialog.open(uploadQuestions,{data}); + let nodes = JSON.parse( JSON.stringify( JSON.parse(sessionStorage.getItem('examNodeList')) ) ) + if (nodes) { + let data = { treeData: treeData, question: JSON.parse( JSON.stringify(this.examMsg) ), node: nodes } + let dialogRef = this.dialog.open(uploadQuestions,{data}); + } else { + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('未选择考核处置节点','确定',config); + } } //封装 刷新 tree 数据 @@ -1687,7 +1693,8 @@ export class CollectionToolsComponent implements OnInit { let api this.examType == 1? api='/api/DisposalNodes' : api='/api/ExamDisposalNodes' this.selectDisposalNode = '' - let params = {disasterId: this.allFirePlan[0].id || ''} + let params + this.examType == 1? params = {disasterId: this.allFirePlan[0].id || ''} : params = {examDisasterId: this.allFirePlan[0].id || ''} this.http.get(api,{params:params}).subscribe(data=>{ //处置节点 this.canvasData.allDisposalNode = data this.handleHybridTree() @@ -1729,7 +1736,8 @@ export class CollectionToolsComponent implements OnInit { let api this.examType == 1? api='/api/DisposalNodes' : api='/api/ExamDisposalNodes' this.defaultExpandedKeys = [] - let params = {disasterId: this.allFirePlan[0].id || ''} + let params + this.examType == 1? params = {disasterId: this.allFirePlan[0].id || ''} : params = {examDisasterId: this.allFirePlan[0].id || ''} this.http.get(api,{params:params}).subscribe(nodeData=>{ //处置节点 this.canvasData.allDisposalNode = nodeData let oldTreeData = this.nzTreeComponent.getExpandedNodeList() @@ -1843,7 +1851,7 @@ export class CollectionToolsComponent implements OnInit { const config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000 - this.snackBar.open('暂无数据节点','确定',config); + this.snackBar.open('暂无处置节点','确定',config); } } diff --git a/src/app/ui/collection-tools/examinationQuestions.html b/src/app/ui/collection-tools/examinationQuestions.html index dc0ce44..8bbd8fd 100644 --- a/src/app/ui/collection-tools/examinationQuestions.html +++ b/src/app/ui/collection-tools/examinationQuestions.html @@ -1,6 +1,6 @@ -<div style="min-width: 240px;" id="nodeTree"> +<div style="min-width: 240px;" > <div style="text-align: center;font-weight: 550;">消防设施考题设定</div> - <div style="max-height: 300px;overflow-y: auto; margin: 25px 0;"> + <div id="nodeTree" style="max-height: 300px;overflow-y: auto; margin: 25px 0;"> <!-- 消防列表树 --> <nz-tree #nzTreeComponent diff --git a/src/app/ui/collection-tools/examinationQuestions.ts b/src/app/ui/collection-tools/examinationQuestions.ts index ce064fc..35ce3ac 100644 --- a/src/app/ui/collection-tools/examinationQuestions.ts +++ b/src/app/ui/collection-tools/examinationQuestions.ts @@ -6,6 +6,7 @@ import {CanvasShareDataService,DisposalNodeData} from '../../canvas-share-data.s import { FlatTreeControl } from '@angular/cdk/tree'; import { MatTreeFlatDataSource, MatTreeFlattener } from '@angular/material/tree'; import { NzFormatBeforeDropEvent, NzFormatEmitEvent,NzTreeComponent } from 'ng-zorro-antd/tree'; +import { ActivatedRoute } from '@angular/router'; @Component({ selector: 'dialog-examination-questions', @@ -26,7 +27,6 @@ export class examinationQuestions { ngOnInit(): void { this.renderData = this.data.treeData if(JSON.parse(sessionStorage.getItem('tree型数据')) && JSON.parse(sessionStorage.getItem('tree型数据'))[this.data.buildFloorData.floorData.id]){ - // console.log(123,JSON.parse(sessionStorage.getItem('tree型数据'))[this.data.buildFloorData.floorData.id]) this.defaultCheckedKeys = JSON.parse(sessionStorage.getItem('tree型数据'))[this.data.buildFloorData.floorData.id] } this.data.treeData.forEach(element => { @@ -86,14 +86,23 @@ export class examinationQuestions { isChecked? checkList.push(element) : null } //存储真实素材数据 - + let basicAssetsId = [] + if(checkList && checkList.length != 0){ + checkList.forEach(item => { + basicAssetsId.push(item.TemplateId) + }) + } + basicAssetsId = Array.from(new Set(basicAssetsId)) + console.log(123,this.data.buildFloorData) let obj = { name:this.data.buildFloorData.buildingData.name + '-' + this.data.buildFloorData.floorData.name, key:this.data.buildFloorData.floorData.id, - children:checkList + buildingId:this.data.buildFloorData.buildingData.id, + children:checkList, + basicAssetsId:basicAssetsId } - let data = JSON.parse(sessionStorage.getItem("试卷id")) + let data = JSON.parse(sessionStorage.getItem("消防设施"+sessionStorage.getItem('paperId'))) if(data && data.length != 0){ console.log(1) @@ -113,13 +122,13 @@ export class examinationQuestions { }else{ data.push(obj) } - sessionStorage.setItem("试卷id",JSON.stringify(data)) + sessionStorage.setItem("消防设施"+sessionStorage.getItem('paperId'),JSON.stringify(data)) }else{ console.log(2) data = [] data[0] = obj - sessionStorage.setItem("试卷id",JSON.stringify(data)) + sessionStorage.setItem("消防设施"+sessionStorage.getItem('paperId'),JSON.stringify(data)) } @@ -127,11 +136,13 @@ export class examinationQuestions { config.verticalPosition = 'top'; config.duration = 3000 this.snackBar.open('当层消防设施考题设置完成','确定',config); - // this.dialogRef.close() + this.dialogRef.close() } } + +//上传按钮 @Component({ selector: 'dialog-upload-questions', templateUrl: './uploadQuestions.html', @@ -140,31 +151,101 @@ export class examinationQuestions { export class uploadQuestions { constructor(private http:HttpClient, public dialog: MatDialog, public snackBar: MatSnackBar, public dialogRef: MatDialogRef<any>, - @Inject(MAT_DIALOG_DATA) public data) {} + @Inject(MAT_DIALOG_DATA) public data,private route:ActivatedRoute) {} defaultCheckedKeys = []; //指定选中复选框的树节点 key值 defaultExpandedKeys = []; //展开指定的树节点 key值 defaultSelectedKeys = []; //指定选中的树节点 key值 renderData:any + ngOnInit(): void { - let data = JSON.parse(sessionStorage.getItem("试卷id")) - data.forEach(item => { + let data = JSON.parse(sessionStorage.getItem("消防设施"+sessionStorage.getItem('paperId'))) + data ? data.forEach(item => { item.children.forEach(i => { i.isLeaf = true }) - }) + }) :null this.renderData = data + this.getProfiles() + this.nodeInit() + } + + //获取登录账号的个人资料 + Profiles:any + getProfiles(){ + this.http.get('/api/ExamAccounts/Profiles').subscribe(data => { + this.Profiles = data + }) + } + + nodeTreeData:any = []; //处置节点tree + //节点初始化 + nodeInit () { + let treeData = [] + this.data.node.forEach(element => { + element.title = element.name //name + element.key = element.id //id + element.children = [] //children + if (element.sitePlanId || element.buildingAreaId) { //是数据节点 + element.isLeaf = true + element.isDataNode = true + } else { //不是数据节点 + element.isLeaf = false + element.isDataNode = false + } + this.data.node.forEach(item=>{ + item.parentId === element.id? element.children.push(item) : null + }) + }); + this.data.node.forEach(element=>{ + !element.parentId? treeData.push(element) : null + }) + this.nodeTreeData = [...treeData] } + nzEvent($event){ console.log($event) } //上传 submit () { console.log(this.data.question) + let body:any = { + id: null, + paperId: sessionStorage.getItem('paperId'), + planComponentId: sessionStorage.getItem('planId'), + examPlanType: this.route.snapshot.queryParams.openType == 1 ? 0 : 1, + creatorId: this.Profiles.id, + modifiedTime: new Date(), + isPublic: true, + title: this.route.snapshot.queryParams.planName, + mainPoint: this.data.question.keynote, + score: null, + examFacilityAssetsData: sessionStorage.getItem('消防设施' + sessionStorage.getItem('paperId')) ? sessionStorage.getItem('消防设施' + sessionStorage.getItem('paperId')) : null, + examDisposalNodesData: sessionStorage.getItem('examNodeList') ? sessionStorage.getItem('examNodeList') : null + } + let params:any = { + paperId:sessionStorage.getItem('paperId'), + examPlanType:this.route.snapshot.queryParams.openType == 1 ? 0 : 1 + } + this.http.post("/api/PaperPlans",body,{params:params}).subscribe(data => { + + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('设置完成,页面将于一秒后关闭','确定',config); + setTimeout(() => { + window.close() + }, 1000); + + }) + } } + + +//保存考的节点 @Component({ selector: 'dialog-disposal-nodes', templateUrl: './uploadDisposalNodes.html', @@ -188,6 +269,12 @@ export class uploadDisposalNodes { let isChecked = (this.nzTreeComponent.getTreeNodeByKey(element.id)).isChecked isChecked? checkList.push(element) : null }); + let galfList = this.nzTreeComponent.getHalfCheckedNodeList() + this.data.oldTreeData.forEach(element => { + galfList.forEach(elements => { + element.id == elements.origin.id? checkList.push(element) : null + }); + }); if (checkList.length) { this.dialogRef.close(checkList); } else { diff --git a/src/app/ui/collection-tools/save.ts b/src/app/ui/collection-tools/save.ts index 413870a..6f17074 100644 --- a/src/app/ui/collection-tools/save.ts +++ b/src/app/ui/collection-tools/save.ts @@ -119,8 +119,8 @@ export class saveOneDialog { imageNames: null, imageUrls: null, parentId: this.nodeItem ? this.nodeItem.id : null, - disasterId: this.data.disasterId, - planComponentId: sessionStorage.getItem('planId') || '', + examDisasterId: this.data.disasterId, + ExamPlanComponentId: sessionStorage.getItem('planId') || '', companyId: this.data.siteOrbuilding == -1 ? sessionStorage.getItem('companyId') : null, sitePlanId: this.data.siteOrbuilding==-1 ? this.selectedSiteData.id : null, buildingId: this.selectedBuildingData.id || null, @@ -180,8 +180,8 @@ export class saveOneDialog { id: "", data: JSON.stringify(this.canvasData.selectPanelPoint.Data) || null, version: this.canvasData.selectPanelPoint.Version || "2.0", - disposalNodeId: data.id, - planComponentId: sessionStorage.getItem("planId"), + ExamDisposalNodeId: data.id, + ExamPlanComponentId: sessionStorage.getItem("planId"), } this.http.post(`/api/ExamDisposalNodeData`,objData).subscribe(data => { const config = new MatSnackBarConfig(); @@ -226,12 +226,12 @@ export class saveOneDialog { } } dispositionNodeData = { - id: "", + id: null, name: value.name, level: this.nodeItem && this.nodeItem.id != null ? this.nodeItem.level + 1 : 0, order: order, - description: "", - notes: "", + description: null, + notes: null, weather: null, airTemperature: 0, windDirection: 0, @@ -239,8 +239,8 @@ export class saveOneDialog { imageNames: null, imageUrls: null, parentId: this.nodeItem ? this.nodeItem.id : null, - disasterId: this.data.disasterId, - planComponentId: sessionStorage.getItem('planId') || '', + examDisasterId: this.data.disasterId, + ExamPlanComponentId: sessionStorage.getItem('planId') || '', companyId: null, sitePlanId: null, buildingId: null, @@ -273,11 +273,11 @@ export class saveOneDialog { // let postdata =JSON.parse(JSON.stringify(this.canvasData.selectPanelPoint)) // postdata.Data = JSON.stringify(postdata.Data) let objData = { - id: "", + id: null, data: JSON.stringify(this.canvasData.selectPanelPoint.Data) || null, version: this.canvasData.selectPanelPoint.Version || "2.0", - disposalNodeId: data.id, - planComponentId: sessionStorage.getItem("planId"), + ExamDisposalNodeId: data.id, + ExamPlanComponentId: sessionStorage.getItem("planId"), } this.http.post(`/api/ExamDisposalNodeData`,objData).subscribe(data => { diff --git a/src/app/ui/collection-tools/uploadQuestions.html b/src/app/ui/collection-tools/uploadQuestions.html index a8d57c7..a891755 100644 --- a/src/app/ui/collection-tools/uploadQuestions.html +++ b/src/app/ui/collection-tools/uploadQuestions.html @@ -5,7 +5,7 @@ <textarea style="width: 100%;background-color: #dfe0e0;border: none;outline: none;height: 50px;border-radius: 5px;resize: none;" placeholder="请填写考试要点" [(ngModel)]="data.question.keynote"></textarea> </div> <div style="padding-left: 10px; font-size: 14px; font-weight: 550;margin: 5px 0;">考核消防设施</div> - <div style="height: 200px;overflow-y: auto;margin-bottom: 25px;"> + <div style="max-height: 200px;overflow-y: auto;margin-bottom: 25px;"> <!-- 消防列表树 --> <nz-tree #nzTreeComponent @@ -27,6 +27,23 @@ </ng-template> <!-- 消防列表树 --> </div> + <div style="padding-left: 10px; font-size: 14px; font-weight: 550;margin: 5px 0;">考核处置节点</div> + <div style="max-height: 200px;overflow-y: auto;margin-bottom: 25px;"> + <!-- 消防列表树 --> + <nz-tree + #nzTreeComponent + [nzData]="nodeTreeData" + nzMultiple + [nzTreeTemplate]="nzTreeTemplate" + > + </nz-tree> + <ng-template #nzTreeTemplate let-node let-origin="origin"> + <div class="treeNodeTemplate"> + <label class="overflowText textNode">{{node.origin.name || node.origin.Name}}</label> + </div> + </ng-template> + <!-- 消防列表树 --> + </div> <div style="text-align: center;"> <button mat-stroked-button style="margin-right: 15px;border: none;background: #07CDCF;color: #fff;" (click)='submit()'>确定</button> <button mat-stroked-button style="margin-left: 15px;border: none;background: #dfe0e0;" mat-dialog-close>取消</button> diff --git a/src/assets/css/ngZorroTree.css b/src/assets/css/ngZorroTree.css index 2386294..84a89b6 100644 --- a/src/assets/css/ngZorroTree.css +++ b/src/assets/css/ngZorroTree.css @@ -344,12 +344,8 @@ text-align: center; cursor: pointer } -#createtestscore,#nodeTree .ant-tree .ant-tree-switcher { - line-height: 22px; -} -#uploadfiretree .ant-tree .ant-tree-switcher { - line-height: 20px; -} + + #disposalNodeTree .ant-tree-checkbox { margin-top: 10px; } diff --git a/src/styles.scss b/src/styles.scss index 16022e1..5f379de 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -117,3 +117,9 @@ table td.mat-footer-cell:last-of-type{ } } + +#nodeTree,#basicinfodiv,#uploadfiretree{ + .ant-tree .ant-tree-switcher { + line-height: 22px; + } +}