|
|
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
|
|
import { HttpClient } from '@angular/common/http';
|
|
|
|
import { Component, Inject, OnInit } from '@angular/core';
|
|
|
|
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
|
|
|
import { MatTableDataSource } from '@angular/material/table';
|
|
|
|
import { NzFormatEmitEvent } from 'ng-zorro-antd/tree';
|
|
|
|
@Component({
|
|
|
|
selector: 'app-create-test-score',
|
|
|
|
templateUrl: './create-test-score.component.html',
|
|
|
|
styleUrls: ['./create-test-score.component.scss']
|
|
|
|
})
|
|
|
|
export class CreateTestScoreComponent implements OnInit {
|
|
|
|
|
|
|
|
constructor(public dialog: MatDialog,private http: HttpClient) { }
|
|
|
|
selectedTab:number = 1 //选中的选项卡
|
|
|
|
selectTab(index){
|
|
|
|
this.selectedTab = index
|
|
|
|
}
|
|
|
|
ngOnInit(): void {
|
|
|
|
this.getUnitData()
|
|
|
|
this.getAround()
|
|
|
|
}
|
|
|
|
|
|
|
|
//模拟单位数据
|
|
|
|
unitDatas:any = [
|
|
|
|
{name:'富丽华大酒店1',score:0,basicInfoScore:0,basicInfoItemScore:0,basicInfoNodes : [
|
|
|
|
{
|
|
|
|
name: '单位信息',
|
|
|
|
key: '0-0',
|
|
|
|
type:'基本信息',
|
|
|
|
expanded: true,
|
|
|
|
children: [
|
|
|
|
{name: '统一社会信用代码',key: '1',isLeaf:true},
|
|
|
|
{name: '单位类型',key: '2',isLeaf:true},
|
|
|
|
{name: '联系人',key: '3',isLeaf:true},
|
|
|
|
{name: '联系电话',key: '4',isLeaf:true},
|
|
|
|
{name: '辖区中队',key: '5',isLeaf:true},
|
|
|
|
{name: '单位地址',key: '6',isLeaf:true}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: '建筑信息',
|
|
|
|
key: '0-1',
|
|
|
|
type:'基本信息',
|
|
|
|
expanded: true,
|
|
|
|
children: [
|
|
|
|
{ name: '面积', key: '0-1-0-0',isLeaf:true},
|
|
|
|
{ name: '高度', key: '0-1-0-1',isLeaf:true},
|
|
|
|
{ name: '层数', key: '0-1-0-2',isLeaf:true}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
],aroundScore:0,aroundItemScore:0,aroundNodes :[
|
|
|
|
{
|
|
|
|
name: '单位四周毗邻',
|
|
|
|
key: '11',
|
|
|
|
expanded: true,
|
|
|
|
type:'四周毗邻',
|
|
|
|
children: [
|
|
|
|
{name: '东方向',key: '55',isLeaf:true},
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: '建筑四周毗邻',
|
|
|
|
key: '22',
|
|
|
|
expanded: true,
|
|
|
|
type:'四周毗邻',
|
|
|
|
children: [
|
|
|
|
{name: '东方向',key: '55',isLeaf:true},
|
|
|
|
]
|
|
|
|
},
|
|
|
|
]},
|
|
|
|
// {name:'富丽华大酒店2',score:0,basicInfoScore:0}
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
//上个页面传过来的单位数据
|
|
|
|
unitId:any = [{name:'最最最最最',id:'5fb76c42919f2b44e464016f'},
|
|
|
|
{name:'华南城集团有限公司',id:'5ee19fe06f91049f5e23e937'},
|
|
|
|
{name:'贵港油库',id:'5fa35d68f8eb762cb03c662e'}
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//获取单位数据
|
|
|
|
getUnitData(){
|
|
|
|
this.unitId.forEach((element,index) => {
|
|
|
|
element.score = 0
|
|
|
|
element.basicInfoScore = 0
|
|
|
|
element.basicInfoItemScore = 0
|
|
|
|
|
|
|
|
this.http.get(`/api/Companies/${element.id}`).subscribe((data:any)=>{
|
|
|
|
// console.log('单位信息',index,data)
|
|
|
|
let unitData = {
|
|
|
|
name: '单位信息',
|
|
|
|
type:'基本信息',
|
|
|
|
expanded: false,
|
|
|
|
key:(Math.random()*10000000).toString(16).substr(0,4)+(new Date()).getTime()+Math.random().toString().substr(2,5),
|
|
|
|
children:[]
|
|
|
|
}
|
|
|
|
data.usci ? unitData.children.push({
|
|
|
|
name: '统一社会信用代码',key: element.id+'统一社会信用代码',isLeaf:true,value:data.usci
|
|
|
|
}) : null
|
|
|
|
data.buildingTypes[0].name ? unitData.children.push({
|
|
|
|
name: '单位类型',key: element.id+'单位类型',isLeaf:true,value:data.buildingTypes[0].name
|
|
|
|
}) : null
|
|
|
|
data.contacts ? unitData.children.push({
|
|
|
|
name: '联系人',key: element.id+'联系人',isLeaf:true,value:data.contacts
|
|
|
|
}) : null
|
|
|
|
data.phone ? unitData.children.push({
|
|
|
|
name: '联系电话',key: element.id+'联系电话',isLeaf:true,value:data.phone
|
|
|
|
}) : null
|
|
|
|
data.organizationName ? unitData.children.push({
|
|
|
|
name: '辖区中队',key: element.id+'辖区中队',isLeaf:true,value:data.organizationName
|
|
|
|
}) : null
|
|
|
|
data.address ? unitData.children.push({
|
|
|
|
name: '单位地址',key: element.id+'单位地址',isLeaf:true,value:data.address
|
|
|
|
}) : null
|
|
|
|
|
|
|
|
element.basicInfoNodes = []
|
|
|
|
element.basicInfoNodes.push(unitData)
|
|
|
|
|
|
|
|
var buildingsData:any
|
|
|
|
this.http.get("/api/Buildings",{
|
|
|
|
params:{
|
|
|
|
companyId:element.id
|
|
|
|
}
|
|
|
|
}).subscribe(async (data:any)=>{
|
|
|
|
buildingsData = data
|
|
|
|
for (let i = 0, length = data.length; i < length; i++){
|
|
|
|
const result = await new Promise((resolve) =>{
|
|
|
|
this.http.get("/api/BuildingBasicInfos",{ // 循环请求当前单位建筑每一个建筑的信息保存到数组中
|
|
|
|
params:{
|
|
|
|
companyId :element.id,
|
|
|
|
buildingId:data[i].id,
|
|
|
|
buildingType:data[i].buildingTypes[0].id
|
|
|
|
}
|
|
|
|
}).subscribe((buildingsData:any)=>{
|
|
|
|
// console.log(1234,buildingsData)
|
|
|
|
buildingsData.name = data[i].name
|
|
|
|
buildingsData.buildingType = data[i].buildingTypes[0].name
|
|
|
|
|
|
|
|
buildingsData[0].buildingBasicGroups.forEach((y,m) => {
|
|
|
|
let propertyInfosArr = []
|
|
|
|
let tabledata
|
|
|
|
if(y.type == 1){//如果是表格类
|
|
|
|
var map = {},
|
|
|
|
dest:any = [];
|
|
|
|
for(var i = 0; i < y.propertyInfos.length; i++){
|
|
|
|
var ai = y.propertyInfos[i];
|
|
|
|
if(!map[ai.propertyName]){
|
|
|
|
dest.push({
|
|
|
|
propertyName: ai.propertyName,
|
|
|
|
data: [ai]
|
|
|
|
});
|
|
|
|
map[ai.propertyName] = ai;
|
|
|
|
}else{
|
|
|
|
for(var j = 0; j < dest.length; j++){
|
|
|
|
var dj = dest[j];
|
|
|
|
if(dj.propertyName == ai.propertyName){
|
|
|
|
dj.data.push(ai);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//根据行数确定在循环数组中的index
|
|
|
|
dest.forEach(item => {
|
|
|
|
item.data.sort(function(a,b){
|
|
|
|
return Number(a.tag) - Number(b.tag)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
y.tabledata = dest
|
|
|
|
tabledata = dest
|
|
|
|
y.tabledata[0].data.forEach((x,key) => {
|
|
|
|
if(x.propertyValue){
|
|
|
|
x.key = (Math.random()*10000000).toString(16).substr(0,4)+(new Date()).getTime()+Math.random().toString().substr(2,5)
|
|
|
|
x.isLeaf = true
|
|
|
|
x.name = x.propertyValue
|
|
|
|
propertyInfosArr.push(x)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}else{
|
|
|
|
y.propertyInfos.forEach((x,key) => {
|
|
|
|
if(x.propertyValue){
|
|
|
|
x.key = (Math.random()*10000000).toString(16).substr(0,4)+(new Date()).getTime()+Math.random().toString().substr(2,5)
|
|
|
|
x.isLeaf = true
|
|
|
|
x.name = x.propertyName
|
|
|
|
propertyInfosArr.push(x)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
if(propertyInfosArr.length != 0){
|
|
|
|
element.basicInfoNodes.push({
|
|
|
|
name:y.name != '基本信息' ? buildingsData.name + '-' + y.name : buildingsData.name ,
|
|
|
|
type:'基本信息',
|
|
|
|
expanded: false,
|
|
|
|
key:(Math.random()*10000000).toString(16).substr(0,4)+(new Date()).getTime()+Math.random().toString().substr(2,5),
|
|
|
|
children:propertyInfosArr,
|
|
|
|
tabledata:tabledata ? tabledata : null
|
|
|
|
})
|
|
|
|
element.basicInfoNodes = [...element.basicInfoNodes]
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
resolve(i)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
// console.log(987,this.unitId)
|
|
|
|
})
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
})
|
|
|
|
}
|
|
|
|
//获取四周毗邻数据
|
|
|
|
getAround(){
|
|
|
|
this.unitId.forEach((element,index) => {
|
|
|
|
element.aroundScore = 0
|
|
|
|
element.aroundItemScore = 0
|
|
|
|
element.aroundNodes = []
|
|
|
|
//获得当前单位的单位毗邻
|
|
|
|
let id = {companyId:element.id}
|
|
|
|
this.http.get('/api/CompanyAdjoins',{params:id}).subscribe((data:any)=>{
|
|
|
|
// console.log(index+'四周毗邻',data)
|
|
|
|
data.forEach(item => {
|
|
|
|
item.direction == 0 ? item.title = '东方向' : null
|
|
|
|
item.direction == 1 ? item.title = '西方向' : null
|
|
|
|
item.direction == 2 ? item.title = '南方向' : null
|
|
|
|
item.direction == 3 ? item.title = '北方向' : null
|
|
|
|
item.direction == 4 ? item.title = '东南方向' : null
|
|
|
|
item.direction == 5 ? item.title = '西南方向' : null
|
|
|
|
item.direction == 6 ? item.title = '东北方向' : null
|
|
|
|
item.direction == 7 ? item.title = '西北方向' : null
|
|
|
|
item.isLeaf = true
|
|
|
|
})
|
|
|
|
//如果存在单位毗邻
|
|
|
|
if(data.length != 0){
|
|
|
|
this.unitId[index].aroundNodes.push({
|
|
|
|
name: '单位毗邻',
|
|
|
|
key: (Math.random()*10000000).toString(16).substr(0,4)+(new Date()).getTime()+Math.random().toString().substr(2,5),
|
|
|
|
expanded: false,
|
|
|
|
type:'四周毗邻',
|
|
|
|
children: data
|
|
|
|
})
|
|
|
|
element.aroundNodes = [...element.aroundNodes]
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
//获得当前单位的建筑毗邻
|
|
|
|
this.http.get('/api/Buildings',{params:id}).subscribe((data:any)=>{
|
|
|
|
if (data.length) {
|
|
|
|
getAllArchitecture(data)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
let that = this
|
|
|
|
async function getAllArchitecture(buildongsdata){
|
|
|
|
for (let i = 0, length = buildongsdata.length; i < length; i++){
|
|
|
|
let id = {buildingId:buildongsdata[i].id}
|
|
|
|
let result = await new Promise((resolve, reject) => {
|
|
|
|
that.http.get('/api/BuildingAdjoins',{params:id}).subscribe((data:any)=>{
|
|
|
|
data.forEach(item => {
|
|
|
|
item.direction == 0 ? item.title = '东方向' : null
|
|
|
|
item.direction == 1 ? item.title = '西方向' : null
|
|
|
|
item.direction == 2 ? item.title = '南方向' : null
|
|
|
|
item.direction == 3 ? item.title = '北方向' : null
|
|
|
|
item.direction == 4 ? item.title = '东南方向' : null
|
|
|
|
item.direction == 5 ? item.title = '西南方向' : null
|
|
|
|
item.direction == 6 ? item.title = '东北方向' : null
|
|
|
|
item.direction == 7 ? item.title = '西北方向' : null
|
|
|
|
item.isLeaf = true
|
|
|
|
})
|
|
|
|
if(data.length != 0){
|
|
|
|
that.unitId[index].aroundNodes.push({
|
|
|
|
name: buildongsdata[i].name,
|
|
|
|
key: (Math.random()*10000000).toString(16).substr(0,4)+(new Date()).getTime()+Math.random().toString().substr(2,5),
|
|
|
|
expanded: false,
|
|
|
|
type:'四周毗邻',
|
|
|
|
children: data
|
|
|
|
})
|
|
|
|
element.aroundNodes = [...element.aroundNodes]
|
|
|
|
}
|
|
|
|
resolve('1')
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//查看树节点
|
|
|
|
lookTreeNode(node){
|
|
|
|
// console.log(node.origin)
|
|
|
|
const dialogRef = this.dialog.open(LookTreeNodeDialog, {
|
|
|
|
// width: '380px',
|
|
|
|
// height: '136px',
|
|
|
|
id:'lookTreeNode',
|
|
|
|
data: node.origin
|
|
|
|
});
|
|
|
|
|
|
|
|
dialogRef.afterClosed().subscribe(result => {
|
|
|
|
console.log('The dialog was closed');
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//阻止input事件冒泡
|
|
|
|
stopPropagation($event){
|
|
|
|
$event.stopPropagation()
|
|
|
|
}
|
|
|
|
//模拟预案数据
|
|
|
|
planDatas:any = [
|
|
|
|
{name:'5楼电路故障灾情扑救',or:'上海总队',time:'2020-09-24',isOpen:'未公开',level:'总队',scroe:0},
|
|
|
|
{name:'6楼电路故障灾情扑救',or:'上海总队',time:'2020-09-24',isOpen:'未公开',level:'总队',scroe:0},
|
|
|
|
{name:'7楼电路故障灾情扑救',or:'上海总队',time:'2020-09-24',isOpen:'未公开',level:'总队',scroe:0}
|
|
|
|
]
|
|
|
|
|
|
|
|
defaultCheckedKeys = []; //指定选中复选框的树节点 key值
|
|
|
|
defaultExpandedKeys = []; //展开指定的树节点 key值
|
|
|
|
defaultSelectedKeys = []; //指定选中的树节点 key值
|
|
|
|
|
|
|
|
examScore:any = 0//整个试卷的总分
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//计算分数
|
|
|
|
calculateScore(key){
|
|
|
|
//key代表第几个建筑
|
|
|
|
//计算整个单位的总分
|
|
|
|
|
|
|
|
this.unitId[key].score = this.unitId[key].basicInfoScore + this.unitId[key].aroundScore
|
|
|
|
|
|
|
|
//计算整个试卷的总分
|
|
|
|
let examScore = 0
|
|
|
|
this.unitId.forEach(element => {
|
|
|
|
examScore += Number(element.score)
|
|
|
|
})
|
|
|
|
this.examScore = examScore
|
|
|
|
}
|
|
|
|
|
|
|
|
//tree的选择事件
|
|
|
|
nzEvent(event: NzFormatEmitEvent,key): void {
|
|
|
|
|
|
|
|
if(event.node.origin.type == '基本信息' || (event.node.parentNode && event.node.parentNode.origin.type == '基本信息')){
|
|
|
|
|
|
|
|
let selectedNum = []
|
|
|
|
this.unitId[key].basicInfoNodes.forEach(item => {
|
|
|
|
item.children.forEach(i => {
|
|
|
|
i.checked ? selectedNum.push(i) : ''
|
|
|
|
})
|
|
|
|
})
|
|
|
|
if(selectedNum.length != 0 ){
|
|
|
|
this.unitId[key].basicInfoScore ? this.unitId[key].basicInfoItemScore = this.unitId[key].basicInfoScore / selectedNum.length : null
|
|
|
|
}else{
|
|
|
|
this.unitId[key].basicInfoItemScore = 0
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(event.node.origin.type == '四周毗邻' || (event.node.parentNode && event.node.parentNode.origin.type == '四周毗邻')){
|
|
|
|
let selectedNum = []
|
|
|
|
this.unitId[key].aroundNodes.forEach(item => {
|
|
|
|
item.children.forEach(i => {
|
|
|
|
i.checked ? selectedNum.push(i) : ''
|
|
|
|
})
|
|
|
|
})
|
|
|
|
if(selectedNum.length != 0 ){
|
|
|
|
this.unitId[key].aroundScore ? this.unitId[key].aroundItemScore = this.unitId[key].aroundScore / selectedNum.length : null
|
|
|
|
}else{
|
|
|
|
this.unitId[key].aroundItemScore = 0
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//单位各项总分数动态计算
|
|
|
|
sumScore(type,key){
|
|
|
|
//key代表第几个建筑 type代表哪个部分
|
|
|
|
if(type == '基本信息'){
|
|
|
|
let selectedNum = 0
|
|
|
|
this.unitId[key].basicInfoNodes.forEach(item => {
|
|
|
|
item.children.forEach(i => {
|
|
|
|
i.checked ? selectedNum++ : ''
|
|
|
|
})
|
|
|
|
})
|
|
|
|
if(selectedNum != 0){
|
|
|
|
this.unitId[key].basicInfoItemScore = this.unitId[key].basicInfoScore / selectedNum
|
|
|
|
}else{
|
|
|
|
this.unitId[key].basicInfoItemScore = 0
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
if(type == '四周毗邻'){
|
|
|
|
let selectedNum = 0
|
|
|
|
this.unitId[key].aroundNodes.forEach(item => {
|
|
|
|
item.children.forEach(i => {
|
|
|
|
i.checked ? selectedNum++ : ''
|
|
|
|
})
|
|
|
|
})
|
|
|
|
if(selectedNum != 0){
|
|
|
|
this.unitId[key].aroundItemScore = this.unitId[key].aroundScore / selectedNum
|
|
|
|
}else{
|
|
|
|
this.unitId[key].aroundItemScore = 0
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
this.calculateScore(key)//更新标题栏分数
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
//添加预案
|
|
|
|
addPlan(){
|
|
|
|
const dialogRef = this.dialog.open(AddPlanDialog, {
|
|
|
|
width: '380px',
|
|
|
|
height: '136px',
|
|
|
|
data: {}
|
|
|
|
});
|
|
|
|
|
|
|
|
dialogRef.afterClosed().subscribe(result => {
|
|
|
|
console.log('The dialog was closed');
|
|
|
|
});
|
|
|
|
}
|
|
|
|
//每条预案分数增加在试卷分数
|
|
|
|
planItemScore(item){
|
|
|
|
this.examScore += item.score
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//添加预案1
|
|
|
|
@Component({
|
|
|
|
selector: 'addplan-dialog',
|
|
|
|
templateUrl: 'addPlan.html',
|
|
|
|
styleUrls: ['addPlan.scss']
|
|
|
|
})
|
|
|
|
export class AddPlanDialog {
|
|
|
|
|
|
|
|
constructor(public dialog: MatDialog,public dialogRef: MatDialogRef<AddPlanDialog>,@Inject(MAT_DIALOG_DATA) public data: any) {}
|
|
|
|
|
|
|
|
onNoClick(): void {
|
|
|
|
this.dialogRef.close();
|
|
|
|
}
|
|
|
|
|
|
|
|
close(){
|
|
|
|
this.dialogRef.close();
|
|
|
|
}
|
|
|
|
|
|
|
|
//选择想要添加的预案类型 (已存在或者自定义)
|
|
|
|
selectType(type){
|
|
|
|
const dialogRef = this.dialog.open(AddPlanTwoDialog, {
|
|
|
|
id:'addPlanTwo',
|
|
|
|
data: {type}
|
|
|
|
});
|
|
|
|
|
|
|
|
dialogRef.afterClosed().subscribe(result => {
|
|
|
|
console.log('The dialog was closed');
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
const ELEMENT_DATA: any = [
|
|
|
|
{id: 1, name: '五楼电梯故障', people:'上海总队',time:'2020-06-15',level:'总队'},
|
|
|
|
{id: 2, name: '故障搜救', people:'超级管理员',time:'2020-06-15',level:'总队'},
|
|
|
|
{id: 3, name: '故障搜救', people:'超级管理员',time:'2020-06-15',level:'总队'},
|
|
|
|
{id: 4, name: '五楼电梯故障', people:'上海总队',time:'2020-06-15',level:'总队'},
|
|
|
|
];
|
|
|
|
|
|
|
|
//添加预案2
|
|
|
|
@Component({
|
|
|
|
selector: 'addplantwo-dialog',
|
|
|
|
templateUrl: 'addPlanTwo.html',
|
|
|
|
styleUrls: ['addPlanTwo.scss']
|
|
|
|
})
|
|
|
|
export class AddPlanTwoDialog {
|
|
|
|
|
|
|
|
constructor(public dialog: MatDialog,public dialogRef: MatDialogRef<AddPlanTwoDialog>,@Inject(MAT_DIALOG_DATA) public data: any) {}
|
|
|
|
|
|
|
|
planType:any = this.data.type == 1 ? true : false//显示的预案类型
|
|
|
|
displayedColumns: string[] = ['select', 'name', 'people', 'time', 'level'];
|
|
|
|
dataSource = new MatTableDataSource<any>(ELEMENT_DATA);
|
|
|
|
selection = new SelectionModel<any>(true, []);
|
|
|
|
isAllSelected() {
|
|
|
|
const numSelected = this.selection.selected.length;
|
|
|
|
const numRows = this.dataSource.data.length;
|
|
|
|
return numSelected === numRows;
|
|
|
|
}
|
|
|
|
|
|
|
|
masterToggle() {
|
|
|
|
this.isAllSelected() ?
|
|
|
|
this.selection.clear() :
|
|
|
|
this.dataSource.data.forEach(row => this.selection.select(row));
|
|
|
|
}
|
|
|
|
ngOnInit(): void {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
onNoClick(): void {
|
|
|
|
this.dialogRef.close();
|
|
|
|
}
|
|
|
|
//确定
|
|
|
|
confirm(){
|
|
|
|
if(this.planType == 1){
|
|
|
|
console.log(this.selection)
|
|
|
|
}else{
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//取消
|
|
|
|
close(){
|
|
|
|
this.dialogRef.close();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//查看答案
|
|
|
|
@Component({
|
|
|
|
selector: 'lookTreeNode-dialog',
|
|
|
|
templateUrl: 'lookTreeNode.html',
|
|
|
|
styleUrls: ['lookTreeNode.scss']
|
|
|
|
})
|
|
|
|
export class LookTreeNodeDialog {
|
|
|
|
|
|
|
|
constructor(public dialog: MatDialog,public dialogRef: MatDialogRef<LookTreeNodeDialog>,@Inject(MAT_DIALOG_DATA) public data: any) {}
|
|
|
|
|
|
|
|
|
|
|
|
ngOnInit(): void {
|
|
|
|
console.log(this.data)
|
|
|
|
}
|
|
|
|
|
|
|
|
onNoClick(): void {
|
|
|
|
this.dialogRef.close();
|
|
|
|
}
|
|
|
|
|
|
|
|
//取消
|
|
|
|
close(){
|
|
|
|
this.dialogRef.close();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|