diff --git a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html index cbd2edd..9e7edc0 100644 --- a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html +++ b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html @@ -220,37 +220,50 @@
{{item.groupName}}
-
+
{{element.headName}} + +
- - - + + + + + + + + +
- -
+ +
- +
-
-
- - -
-
+
+
+ +
+
+
+ +
+ +
diff --git a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss index b70344b..9e6d5b9 100644 --- a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss +++ b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss @@ -230,6 +230,7 @@ height: 100%; display: flex; flex-direction: column; + overflow-y: auto; .boxHead{ height: 40px; width: 100%; @@ -261,6 +262,14 @@ line-height: 40px; color: #B99A00; } + img{ + cursor: pointer; + width: 20px; + height: 20px; + float: right; + margin-top: 10px; + margin-right: 10px; + } } .body{ width: 100%; @@ -290,6 +299,21 @@ outline: none; } } + td{ + border: 1px solid #999; + height: 40px; + font-size: 16px; + text-align: center; + input { + background-color: #FFFFFF; + text-align: center; + height: 100%; + width: 100%; + font-size: 16px; + border: none; + outline: none; + } + } .inputtext { width: 100%; height: 100%; diff --git a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts index ee666d1..5dac629 100644 --- a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts +++ b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts @@ -4,13 +4,13 @@ * @Author: sueRimn * @Date: 2021-06-16 13:56:54 * @LastEditors: sueRimn - * @LastEditTime: 2021-06-17 10:01:26 + * @LastEditTime: 2021-06-17 17:05:09 */ import { HttpClient } from '@angular/common/http'; import { Component, Inject, OnInit, Renderer2, ViewChild, Input } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; -import { MatSnackBar } from '@angular/material/snack-bar'; +import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar'; @Component({ selector: 'app-create-plan-online-five', @@ -30,8 +30,28 @@ export class CreatePlanOnlineFiveComponent implements OnInit { console.log('级别', this.planLevel) this.getTemplateData() this.getUnitData() + this.tree = { + json:this.treedate, + config: this.treeConfig + }; } - +//树形结构数据 +treedate=[ + { + "guid": "bc4c7a02-5379-4046-92be-12c67af4295a", + "displayName": "Elentrix", + "children": [ + /* "85d412c2-ebc1-4d56-96c9-7da433ac9bb2", + "28aac445-83b1-464d-9695-a4157dab6eac" */ + ] + } + +] +tree +treeConfig = { + nodeWidth: 90, + nodeHeight: 60 +}; //获得单位信息 unitData: any @@ -51,6 +71,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit { selectedItem: string = '封面' clickTitleItem(item) { + this.addNumber=-1 item == '封面' ? this.selectedItem = '封面' : this.selectedItem = item.groupName if (this.selectedItem == '重点图示') { this.getAllBuildings() @@ -202,15 +223,6 @@ export class CreatePlanOnlineFiveComponent implements OnInit { dialogRef.afterClosed().subscribe((data) => { }); } - - - - //input key值,一个字符焦点消失问题 - trackByFn(index) { - return index - } - - //正常上传 async uploadFile(companyId: string, planId: string, file) { let formData = new FormData() @@ -221,6 +233,46 @@ export class CreatePlanOnlineFiveComponent implements OnInit { }) }) } + //input key值,一个字符焦点消失问题 + trackByFn(index){ + return index + } + //表格增加一行 + addNumber=-1 + addTd(key,i){ + this.addNumber++ + //this.planTemplateData[key].attribute[i].push({tabletr:[]}) + if(this.planTemplateData[key].attribute[i].tabletr==undefined){ + this.planTemplateData[key].attribute[i].tabletr=[] + } + this.planTemplateData[key].attribute[i].tabletr.push({tabletd:[]}) + for(var j=0;j { + this.http.put(`/api/PlanComponents2D/${this.data.element.id}`, body2d, options).subscribe(data => { this.dialogRef.close("success"); }) } else { diff --git a/src/app/plan-management/plan-management.module.ts b/src/app/plan-management/plan-management.module.ts index 1cd0c56..86ea283 100644 --- a/src/app/plan-management/plan-management.module.ts +++ b/src/app/plan-management/plan-management.module.ts @@ -67,7 +67,7 @@ import { ReinforcePlanComponent } from './reinforce-plan/reinforce-plan.componen import { CreatePlanOnlineFiveComponent, OpenPlanToolDialog } from './create-plan-online-five/create-plan-online-five.component'; import { CreatePlanOnlineThreeComponent } from './create-plan-online-three/create-plan-online-three.component' import { UiModule } from '../ui/ui.module'; - +import { TreeDiagramModule } from '../ui/ng-tree-diagram/src/ng-tree-diagram'; @NgModule({ declarations: [EntryPlanComponent, PassPlanComponent, OpenPlanComponent, EntryPlanLookComponent, AddPlanone, PlanType, AuditSatus, PlanLevel, DownloadFile, AuditResult, ChangeName, @@ -120,7 +120,8 @@ import { UiModule } from '../ui/ui.module'; MatToolbarModule, MatTooltipModule, MatTreeModule, - UiModule + UiModule, + TreeDiagramModule ], exports: [PlanType, AuditSatus, PlanLevel, state] }) diff --git a/src/app/ui/plan-template/addgroup.html b/src/app/ui/plan-template/addgroup.html index 05916d2..643f8f5 100644 --- a/src/app/ui/plan-template/addgroup.html +++ b/src/app/ui/plan-template/addgroup.html @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2021-05-24 10:08:22 * @LastEditors: sueRimn - * @LastEditTime: 2021-06-01 14:25:50 + * @LastEditTime: 2021-06-18 15:17:41 -->
diff --git a/src/app/ui/plan-template/plan-template.component.html b/src/app/ui/plan-template/plan-template.component.html index 4c8e53d..d1a0661 100644 --- a/src/app/ui/plan-template/plan-template.component.html +++ b/src/app/ui/plan-template/plan-template.component.html @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2021-05-19 15:50:20 * @LastEditors: sueRimn - * @LastEditTime: 2021-06-16 10:10:05 + * @LastEditTime: 2021-06-18 10:55:32 -->
@@ -251,7 +251,7 @@
- +
diff --git a/src/app/ui/plan-template/plan-template.component.ts b/src/app/ui/plan-template/plan-template.component.ts index 0366bfa..80f60e4 100644 --- a/src/app/ui/plan-template/plan-template.component.ts +++ b/src/app/ui/plan-template/plan-template.component.ts @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2021-05-31 10:40:01 * @LastEditors: sueRimn - * @LastEditTime: 2021-06-15 13:54:16 + * @LastEditTime: 2021-06-18 15:15:40 */ import { Component, Inject, OnInit,ViewEncapsulation } from '@angular/core'; @@ -658,8 +658,8 @@ export class addGroup{ } //复选框点击事件 clicki - checkClick(i){ - this.clicki=i + checkClick(){ + //this.clicki=i //console.log(e,item) /* if (e.checked) { this.groupName.push(item) @@ -670,7 +670,7 @@ export class addGroup{ } }) } */ - //console.log(this.data) + console.log(this.data) } //确定提交 newGroup(){ diff --git a/src/assets/images/deletered.png b/src/assets/images/deletered.png new file mode 100644 index 0000000..0a056db Binary files /dev/null and b/src/assets/images/deletered.png differ