邵佳豪 4 years ago
parent
commit
b6ca04c7ca
  1. 99
      src/app/examiner/examiner-new-one/examiner-new-one.component.html
  2. 129
      src/app/examiner/examiner-new-one/examiner-new-one.component.scss
  3. 67
      src/app/examiner/examiner-new-one/examiner-new-one.component.ts
  4. 10
      src/app/ui/collection-tools/collection-tools.component.html
  5. 25
      src/app/ui/collection-tools/collection-tools.component.ts
  6. 33
      src/app/ui/collection-tools/examinationQuestions.html
  7. 93
      src/app/ui/collection-tools/examinationQuestions.ts
  8. 6
      src/app/ui/collection-tools/saveOne.html
  9. 45
      src/app/ui/collection-tools/uploadQuestions.html
  10. 3
      src/app/ui/ui.module.ts

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

@ -4,27 +4,49 @@
* @Author: sueRimn
* @Date: 2020-12-11 16:34:26
* @LastEditors: sueRimn
* @LastEditTime: 2020-12-11 17:42:09
* @LastEditTime: 2020-12-13 09:43:19
-->
<div class="content">
<div class="contentLeft">
<div class="header">
<form #form="ngForm">
<form (ngSubmit)="onSubmit(form.value)" #form="ngForm">
<div class="queryBox">
<div class="queryField">
<div><label style="margin-right: 10px;">单位名称:</label></div>
<div><input type="text" name="identityCard" autocomplete="off" placeholder="请填写"></div>
<div><input type="text" name="companyName" [(ngModel)]="companyName" autocomplete="off" placeholder="请填写"></div>
</div>
<div class="queryField">
<div><label style="margin-right: 10px;">统一社会信用代码:</label></div>
<div><input type="text" name="identityCard" autocomplete="off" placeholder="请填写"></div>
<div><input type="text" name="shehui" [(ngModel)]="shehui" autocomplete="off" placeholder="请填写"></div>
</div>
<div class="queryField">
<div><label style="margin-right: 10px;">辖区中队:</label></div>
<div><input type="text" name="identityCard" autocomplete="off" placeholder="请填写">
<mat-checkbox style="margin-left: 10px;">包含下级</mat-checkbox>
<button mat-raised-button style="background-color: #07CDCF;margin-left: 90px;">查询</button>
<button mat-raised-button style=" background-color: #FF8678;margin-left: 10px;">重置</button>
<div class="queryField ordiv">
<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>
<div class="organizationbox" *ngIf="isorganizationbox">
<div (click)="closediv()" class="closediv"><mat-icon>clear</mat-icon></div>
<mat-tree [dataSource]="dataSource" [treeControl]="treeControl">
<mat-tree-node *matTreeNodeDef="let node" matTreeNodePadding (click)='add(node)' class="organizationlist">
<button type="button" mat-icon-button disabled ></button>
<li>{{node.name}}</li>
</mat-tree-node>
<mat-tree-node *matTreeNodeDef="let node;when: hasChild" matTreeNodePadding (click)='add(node)' class="organizationlist">
<button
type="button"
mat-icon-button
matTreeNodeToggle
[attr.aria-label]="'toggle ' + node.name">
<mat-icon class="mat-icon-rtl-mirror">
{{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
</mat-icon>
</button>
<li>{{node.name}}</li>
</mat-tree-node>
</mat-tree>
</div>
<button mat-raised-button style="background-color: #07CDCF;margin-left: 90px;" color="primary">查询</button>
<button mat-raised-button style=" background-color: #FF8678;margin-left: 10px;" (click)="reset()">重置</button>
</div>
</div>
@ -32,8 +54,61 @@
</form>
</div>
<div class="contenttable">
<table></table>
<table mat-table [dataSource]="tabledataSource" class="mat-elevation-z8">
<ng-container matColumnDef="checked">
<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>
</td>
</ng-container>
<ng-container matColumnDef="unitname">
<th mat-header-cell *matHeaderCellDef>单位名称</th>
<td mat-cell *matCellDef="let element">{{element.name}}</td>
</ng-container>
<ng-container matColumnDef="jurisdictionsquadron">
<th mat-header-cell *matHeaderCellDef>辖区中队</th>
<td mat-cell *matCellDef="let element">{{element.organizationName}}</td>
</ng-container>
<ng-container matColumnDef="unittype">
<th mat-header-cell *matHeaderCellDef>单位类型</th>
<td mat-cell *matCellDef="let element">{{element.buildingTypes.length != 0 ? element.buildingTypes[0].name : ''}}</td>
</ng-container>
<ng-container matColumnDef="scc">
<th mat-header-cell *matHeaderCellDef>统一社会信用代码</th>
<td mat-cell *matCellDef="let element">{{element.usci}}</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
</table>
<mat-paginator [length]="length"
[pageSize]="pageSize"
[pageSizeOptions]="pageSizeOptions"
(page)="chagePage($event)">
</mat-paginator>
</div>
</div>
<div class="contentRight">
<div class="rightone">
<span>所选单位</span>
</div>
<div class="righttwo">
<table >
<thead>
<th style="width: 60%;">单位名称</th>
<th style="width: 40%;">操作</th>
</thead>
<tbody>
<tr *ngFor="let item of selectedunitArr">
<td>{{item.name}}</td>
<td (click)="deleteWork($event)" id={{item.id}} style="color: #FF8678;cursor:pointer;">删除</td>
</tr>
</tbody>
</table>
</div>
<div class="rightthree">
<button mat-raised-button style="background-color: #07CDCF;margin-left: 100px;width: 120px;" color="primary" (click)="nextClick()">下一步</button>
</div>
</div>
<div class="contentRight"></div>
</div>

129
src/app/examiner/examiner-new-one/examiner-new-one.component.scss

@ -1,3 +1,4 @@
table {
width: 100%;
text-align: center;
@ -18,13 +19,73 @@ table {
margin: 20px 20px 10px 50px;
background-color: #FFFFFF;
border-radius: 16px ;
.contenttable{
width: 1200px;
//margin-right: 40px;
margin-left: 30px;
//background-color: none;
table{
width: 100%;
margin-top: 15px;
background-color:transparent;
font-size: 16px;
th{
background-color: #F5FDFE;
color: #000000;
font-size: 15px;
}
td{font-size: 15px;}
.mat-table{
background-color:transparent;
}
}
mat-paginator{
width: 100%;
// margin-top: 30px;
}
}
}
.contentRight{
width: 320px;
height: 850px;
margin: 20px 20px 10px 10px;
background-color: #FFFFFF;
border-radius: 16px ;
display: flex;
flex-direction: column;
.rightone{
width: 100%;
margin:30px 20px;
span{
font-size: 20px;
}
}
.righttwo{
height: 670px;
width:280px;
margin-left: 20px;
overflow-y: auto;
table{
th,td{
height: 48px;
font-size: 15px;
}
thead{
background-color: #F5FDFE;
}
table tbody{
height: 570px;
overflow-y:scroll;
tr{
table-layout:fixed
}
}
}
}
::-webkit-scrollbar {
width:2px;
}
}
}
.header {
@ -67,37 +128,61 @@ table {
border-radius: 8px;
outline:0 none !important;
}
}
.headerright{
float: right;
}
} //queryBox
}
.centertable{
width: 1632px;
margin-right: 40px;
margin-left: 40px;
background-color: #FFFFFF;
table{
td,th{
height: 48px;
font-size: 18px;
.ordiv{
position: relative;
.organizationbox{
button{
color: #000000;
position: relative;
bottom: 5px;
}
width:450px;
height: 200px;
background: white;
position: absolute;
top: 48px;
left: 27px;
z-index: 999;
border: 1px solid grey;
overflow-y: auto;
li{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
td{
border-bottom: 1px solid #F2F5F6;
mat-tree-node{
cursor: pointer;
white-space:pre;
}
mat-tree-node:hover{
background: rgba(225, 225, 225, 0.8);
}
.closediv{
z-index: 100;
position: absolute;
right: 0;
top: 0;
width: 30px;
height: 30px;
cursor: pointer;
line-height: 30px;
text-align: center;
}
thead{
background-color:#F5FDFE;
.closediv:hover{
background:rgba(225, 225, 225, 0.8);
}
.green{
color: #07CDCF;
}
.red{
color: #FF8678;
}
.headerright{
float: right;
}
} //queryBox
}
.operationSpan{
margin: 0 10px;
.spanbtn {

67
src/app/examiner/examiner-new-one/examiner-new-one.component.ts

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2020-12-11 16:34:26
* @LastEditors: sueRimn
* @LastEditTime: 2020-12-12 09:13:04
* @LastEditTime: 2020-12-13 10:13:54
*/
import { Component, OnInit, ViewChild, Inject } from '@angular/core';
import { HttpClient } from '@angular/common/http'
@ -30,9 +30,13 @@ export class ExaminerNewOneComponent implements OnInit {
constructor(private http:HttpClient,private router:Router,private route:ActivatedRoute,private tree: TreeService,public dialog: MatDialog,public snackBar: MatSnackBar) { }
ngOnInit(): void {
//this.getAllKeyUnit();
this.getunitdata();
this.getOrganizations();
this.getUnittype();
this.getAllKeyUnit();
}
removeClass=document.getElementsByClassName("mat-form-field-underline")
private _transformer = (node, level: number) => { //初始化tree
return {
expandable: !!node.children && node.children.length > 0,
@ -62,7 +66,7 @@ export class ExaminerNewOneComponent implements OnInit {
pageSizeOptions: number[] = [10] //设置每页条数
PageNumber:any //第几页
displayedColumns: string[] = ['checked','Follow','unitname','integrity','jurisdictionsquadron', 'unittype','scc', 'time','operation'];
displayedColumns: string[] = ['checked','unitname','jurisdictionsquadron', 'unittype','scc'];
tabledataSource:any
allorganizations:any
oldDataSource:any; //原始表格数据
@ -213,9 +217,9 @@ export class ExaminerNewOneComponent implements OnInit {
Sort: this.integritySort ? 'integrityscore' : '',
SortType: this.integritySort || '',
}
console.log(paramsdata)
//console.log(paramsdata)
this.http.get("/api/Companies",{params:paramsdata}).subscribe((data:any)=>{
console.log(data)
//console.log(data)
this.length = data.totalCount
this.allKeyUnitInfo = data
// data.items.sort( (a,b) => {
@ -224,9 +228,21 @@ export class ExaminerNewOneComponent implements OnInit {
data.items.forEach( (item,index) => {
item.integrity = this.wanzhengduArr[index]
})
console.log(789,data.items)
//console.log(789,data.items)
this.tabledataSource = new MatTableDataSource(data.items);
//console.log(this.tabledataSource)
if(this.selectedunitArr.length!=0){
for(var i=0;i<this.tabledataSource.filteredData.length;i++){
for(var j=0;j<this.selectedunitArr.length;j++){
if(this.tabledataSource.filteredData[i].id==this.selectedunitArr[j].id){
this.tabledataSource.filteredData[i].checked=this.selectedunitArr[j].checked
}
}
}
}
})
//console.log(this.tabledataSource)
}
//得到当前单位信息
getunitdata(){
@ -289,10 +305,45 @@ export class ExaminerNewOneComponent implements OnInit {
}
)
}
selectedunitArr:any =[] //选中单位的数组
selectedunitArr:any =JSON.parse(localStorage.getItem("checkedWork"))||[] //选中单位的数组
deleteByid=""//根据id取消选中
//勾选框事件
checkChange(e,element){
console.log(e,element)
element.checked = e.checked
if(element.checked){
this.selectedunitArr.push(element)
}
else{
for(var i=0;i<this.selectedunitArr.length;i++){
if(this.selectedunitArr[i].id==element.companyIntegrityScore.companyId){
this.selectedunitArr.splice(i,1)
}
}
}
console.log(this.selectedunitArr)
}
//删除某一个单位信息
deleteWork(e){
console.log(e.target.id)
console.log(this.tabledataSource.data)
for(var i=0;i<this.selectedunitArr.length;i++){
if(this.selectedunitArr[i].id==e.target.id){
this.selectedunitArr.splice(i,1)
}
}
for(var i=0;i<this.tabledataSource.data.length;i++){
if(this.tabledataSource.data[i].id==e.target.id){
this.tabledataSource.data[i].checked=false
}
}
}
//下一步事件
nextClick(){
//console.log(this.selectedunitArr)
localStorage.setItem("checkedWork",JSON.stringify(this.selectedunitArr) )
this.router.navigateByUrl("/examiner/create-test-score")
}
//编辑单位信息
editunit(){
@ -392,4 +443,6 @@ export class ExaminerNewOneComponent implements OnInit {
this.isorganizationbox = false
}
}

10
src/app/ui/collection-tools/collection-tools.component.html

@ -1,13 +1,13 @@
<div class="content">
<!-- header头部 -->
<div class="header">
<div class="headerTitle">富丽华大酒店</div>
<div class="headerCenter"> <input type="text" placeholder="请输入考试要点"> </div>
<div class="headerTitle">{{examMsg.conpanyName}}</div>
<div class="headerCenter"> <input type="text" placeholder="请输入考试要点" [(ngModel)]="examMsg.keynote"> </div>
<div class="headerRight">
<label class="fraction">总分<input type="text"></label>
<button style="border: 1px solid #07CDCF; border-radius: 5px; margin: 0 15px;"><mat-icon>visibility</mat-icon>消防设施考题设定</button>
<label class="fraction">总分<input type="text" [(ngModel)]="examMsg.grade"></label>
<button style="border: 1px solid #07CDCF; border-radius: 5px; margin: 0 15px;" (click)='openFireExamination()'><mat-icon>visibility</mat-icon>消防设施考题设定</button>
<button (click)="saveSite()"><mat-icon>description</mat-icon>保存</button>
<button><mat-icon>open_in_browser</mat-icon>上传</button>
<button (click)="openUploadQuestions()"><mat-icon>open_in_browser</mat-icon>上传</button>
</div>
</div>
<!-- header头部 -->

25
src/app/ui/collection-tools/collection-tools.component.ts

@ -16,6 +16,7 @@ import { delay } from 'rxjs/operators';
import { windows } from 'src/app/interface';
import { GameMode } from 'src/app/working-area/model/gameMode';
import { ActivatedRoute, Router } from '@angular/router';
import { examinationQuestions,uploadQuestions } from './examinationQuestions'
@ -627,6 +628,11 @@ export class CollectionToolsComponent implements OnInit {
isSixShow = true
isSixbtn = true //控制想定作业编辑按钮
isxxx = true //控制查看编辑模式的编辑模式按钮
examMsg = { //单位,考试信息
conpanyName: '富丽华大酒店', //单位名称
keynote: '', //考试要点
grade: '', //分数
}
ngOnInit(): void {
sessionStorage.setItem('companyId','5fa2512ef8eb762cb03c65fb')
@ -658,7 +664,8 @@ export class CollectionToolsComponent implements OnInit {
ngAfterViewInit(): void {
this.getSitePlan()
this.getSitePlan() //获取总平面图/楼层
// 监听canvas组件选中素材事件
this.canvas.on("select",obj=>{
//选中素材属性注入函数
@ -1306,6 +1313,20 @@ export class CollectionToolsComponent implements OnInit {
// };
}
//打开消防设施考题设定
openFireExamination () {
let treeData = JSON.parse( JSON.stringify(this.dataSource.data) )
let data = { treeData: treeData }
let dialogRef = this.dialog.open(examinationQuestions,{data});
}
//上传考题
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});
}
//封装 刷新 tree 数据
async renovateTreeData (isRefresh:boolean = true) {
this.allFireElements[this.allFireElements.length-1].children = []
@ -1348,7 +1369,7 @@ export class CollectionToolsComponent implements OnInit {
toggleExpandPanel:boolean = false; //左侧可展开面板展开或关闭
toggleExpandPanelRight:boolean = false; //右侧可展开面板展开或关闭
togglePlane:boolean = true; //可展开面板平面图 显隐
toggleMaterialBank:boolean = false; //可展开面板素材库 显隐
toggleMaterialBank:boolean = true; //可展开面板素材库 显隐
toggleHandlePlans:boolean = true; //可展开面板处置预案 显隐
//可展开面板展开或关闭
toggle () {

33
src/app/ui/collection-tools/examinationQuestions.html

@ -0,0 +1,33 @@
<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;">
<!-- 消防列表树 -->
<mat-tree [dataSource]="dataSource" [treeControl]="treeControl" cdkDropList [cdkDropListData]="dataSource">
<mat-tree-node cdkDrag cdkDragDisabled="false" [ngClass]="{'isLookPattern': !node.isLookPattern}" *matTreeNodeDef="let node;" matTreeNodePadding cdkTreeNodePaddingIndent='26' class="treeNode">
<button mat-icon-button disabled></button>
<span title="{{node.name}}" [ngClass]="{'treeText': !node.isTemplate}">
{{node.name}}
</span>
<span *ngIf="node.isTemplate">({{node.children.length}})</span>
<mat-checkbox style="margin-left: auto;" color=primary></mat-checkbox>
</mat-tree-node>
<mat-tree-node cdkDrag cdkDragDisabled="false" [ngClass]="{'isLookPattern': !node.isLookPattern}" *matTreeNodeDef="let node;when: hasChild" matTreeNodePadding class="treeNode" >
<button mat-icon-button matTreeNodeToggle [attr.aria-label]="'toggle ' + node.name">
<mat-icon class="mat-icon-rtl-mirror">
{{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
</mat-icon>
</button>
<span title="{{node.name}}" [ngClass]="{'treeText': !node.isTemplate}">
{{node.name}}
</span>
<span *ngIf="node.isTemplate && node.isNewElement">({{node.children.length}})</span>
<mat-checkbox style="margin-left: auto;" color=primary></mat-checkbox>
</mat-tree-node>
</mat-tree>
<!-- 消防列表树 -->
</div>
<div style="text-align: center;"><button mat-stroked-button style="border: none;background-color: #FF8678;color: #fff;" mat-dialog-close>退出</button></div>
</div>

93
src/app/ui/collection-tools/examinationQuestions.ts

@ -0,0 +1,93 @@
import { Component, OnInit, Inject } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
import {CanvasShareDataService,DisposalNodeData} from '../../canvas-share-data.service' //引入服务
import { FlatTreeControl } from '@angular/cdk/tree';
import { MatTreeFlatDataSource, MatTreeFlattener } from '@angular/material/tree';
@Component({
selector: 'dialog-examination-questions',
templateUrl: './examinationQuestions.html',
styleUrls: ['./collection-tools.component.scss',]
})
export class examinationQuestions {
constructor(private http:HttpClient, public dialog: MatDialog, public snackBar: MatSnackBar, public dialogRef: MatDialogRef<any>,
@Inject(MAT_DIALOG_DATA) public data) {}
// tree配置
private _transformer = (node, level: number) => {//要给渲染节点传那些属性参数
return {
expandable: !!node.children && node.children.length > 0,
name: node.name || node.Name,
level: level,
id: node.id || node.Id,
children:node.children,
isTemplate:node.isTemplate,
isNewElement:node.isNewElement,
isLook:node.isLook,
isLookPattern:node.isLookPattern || null
};
}
treeControl = new FlatTreeControl<any>(node => node.level, node => node.expandable);
treeFlattener = new MatTreeFlattener(this._transformer, node => node.level, node => node.expandable, node => node.children);
dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
hasChild = (_: number, node: any) => node.expandable;
ngOnInit(): void {
this.dataSource.data = this.data.treeData
this.treeControl.expandAll()
}
}
@Component({
selector: 'dialog-upload-questions',
templateUrl: './uploadQuestions.html',
styleUrls: ['./collection-tools.component.scss',]
})
export class uploadQuestions {
constructor(private http:HttpClient, public dialog: MatDialog, public snackBar: MatSnackBar, public dialogRef: MatDialogRef<any>,
@Inject(MAT_DIALOG_DATA) public data) {}
// tree配置
private _transformer = (node, level: number) => {//要给渲染节点传那些属性参数
return {
expandable: !!node.children && node.children.length > 0,
name: node.name || node.Name,
level: level,
id: node.id || node.Id,
children:node.children,
isTemplate:node.isTemplate,
isNewElement:node.isNewElement,
isLook:node.isLook,
isLookPattern:node.isLookPattern || null
};
}
treeControl = new FlatTreeControl<any>(node => node.level, node => node.expandable);
treeFlattener = new MatTreeFlattener(this._transformer, node => node.level, node => node.expandable, node => node.children);
dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
hasChild = (_: number, node: any) => node.expandable;
ngOnInit(): void {
this.dataSource.data = this.data.treeData
this.treeControl.expandAll()
}
//上传
submit () {
if (this.data.question.grade && this.data.question.keynote) {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('上传成功','确定',config);
this.dialogRef.close()
} else {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('请填写必填项','确定',config);
}
}
}

6
src/app/ui/collection-tools/saveOne.html

@ -1,5 +1,5 @@
<div mat-dialog-title>处置节点保存</div>
<div style="text-align: center; margin-bottom: 25px; font-weight: 550;">处置节点保存</div>
<div style="display: flex;">
<button mat-stroked-button style="margin-right: 5px;" (click)="saveType('new')">新建节点并保存</button>
<button mat-stroked-button (click)="saveType('old')">保存到已有节点</button>
<button mat-stroked-button style="margin-right: 15px; color: #fff; background-color: #07CDCF; border: none;" (click)="saveType('new')">新建节点并保存</button>
<button mat-stroked-button style="margin-left: 15px; color: #fff; background-color: #FF8678; border: none;" (click)="saveType('old')">保存到已有节点</button>
</div>

45
src/app/ui/collection-tools/uploadQuestions.html

@ -0,0 +1,45 @@
<div style="min-width: 260px;">
<div style="text-align: center;font-weight: 550;">上传</div>
<div style="padding-left: 10px; font-size: 14px; font-weight: 550;margin: 5px 0;">设置分数</div>
<div style="margin-bottom: 25px;">
<input type="text" style="width: 100%;border-radius: 5px;height: 26px;background-color: #dfe0e0;" placeholder="请填写考试分数" [(ngModel)]="data.question.grade">
</div>
<div style="padding-left: 10px; font-size: 14px; font-weight: 550;margin: 5px 0;">考试要点</div>
<div style="margin-bottom: 25px;">
<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="max-height: 200px;overflow-y: auto;margin-bottom: 25px;">
<!-- 消防列表树 -->
<mat-tree [dataSource]="dataSource" [treeControl]="treeControl" cdkDropList [cdkDropListData]="dataSource">
<mat-tree-node cdkDrag cdkDragDisabled="false" [ngClass]="{'isLookPattern': !node.isLookPattern}" *matTreeNodeDef="let node;" matTreeNodePadding cdkTreeNodePaddingIndent='26' class="treeNode">
<button mat-icon-button disabled></button>
<span title="{{node.name}}" [ngClass]="{'treeText': !node.isTemplate}">
{{node.name}}
</span>
<span *ngIf="node.isTemplate">({{node.children.length}})</span>
<mat-checkbox style="margin-left: auto;" color=primary></mat-checkbox>
</mat-tree-node>
<mat-tree-node cdkDrag cdkDragDisabled="false" [ngClass]="{'isLookPattern': !node.isLookPattern}" *matTreeNodeDef="let node;when: hasChild" matTreeNodePadding class="treeNode" >
<button mat-icon-button matTreeNodeToggle [attr.aria-label]="'toggle ' + node.name">
<mat-icon class="mat-icon-rtl-mirror">
{{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
</mat-icon>
</button>
<span title="{{node.name}}" [ngClass]="{'treeText': !node.isTemplate}">
{{node.name}}
</span>
<span *ngIf="node.isTemplate && node.isNewElement">({{node.children.length}})</span>
<mat-checkbox style="margin-left: auto;" color=primary></mat-checkbox>
</mat-tree-node>
</mat-tree>
<!-- 消防列表树 -->
</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>
</div>
</div>

3
src/app/ui/ui.module.ts

@ -70,8 +70,9 @@ import {leftFunctionalDomainComponent,editPlaneFigureComponent,addDisposalNodeCo
import {saveOneDialog,saveTwoDialog} from './collection-tools/save'
import {WorkingAreaComponent} from '../working-area/working-area.component'
import { NzTreeModule } from 'ng-zorro-antd/tree';
import { examinationQuestions,uploadQuestions } from './collection-tools/examinationQuestions'
@NgModule({
declarations: [FolderDialog,ViewDetails,ChangepasswordComponent,SizePipe,NamePipe,NamePipe2,NamePipe3,ConfirmpswDirective, AllFileComponent, ChangeuserdataComponent, UploadFilesComponent,AddEnterpriserUser,EnterpriseuserComponent,editenterpriseuser,seeenterpriseuser,TeacherManagementComponent,editTeacher,AddTeacher,seeTeacher, LearningRecordDetailsComponent, EhartsStatisticsComponent, CreateExamComponent, LookOverTestComponent, StatisticAnalysisComponent, JoinExamComponent, TestRecordsComponent,testState,CreateDialog,CollectionToolsComponent,CreateBuilding,EditBuilding,ViewDetailss,leftFunctionalDomainComponent,editPlaneFigureComponent,addDisposalNodeComponent,editDisposalNodeComponent,saveOneDialog,saveTwoDialog,WorkingAreaComponent],
declarations: [FolderDialog,ViewDetails,ChangepasswordComponent,SizePipe,NamePipe,NamePipe2,NamePipe3,ConfirmpswDirective, AllFileComponent, ChangeuserdataComponent, UploadFilesComponent,AddEnterpriserUser,EnterpriseuserComponent,editenterpriseuser,seeenterpriseuser,TeacherManagementComponent,editTeacher,AddTeacher,seeTeacher, LearningRecordDetailsComponent, EhartsStatisticsComponent, CreateExamComponent, LookOverTestComponent, StatisticAnalysisComponent, JoinExamComponent, TestRecordsComponent,testState,CreateDialog,CollectionToolsComponent,CreateBuilding,EditBuilding,ViewDetailss,leftFunctionalDomainComponent,editPlaneFigureComponent,addDisposalNodeComponent,editDisposalNodeComponent,saveOneDialog,saveTwoDialog,WorkingAreaComponent,examinationQuestions,uploadQuestions],
imports: [
NzDatePickerModule,

Loading…
Cancel
Save