From d101f9562739307531b23e88c2d219c22344251a Mon Sep 17 00:00:00 2001 From: chenjingyu Date: Thu, 17 Jun 2021 16:04:01 +0800 Subject: [PATCH 1/2] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]=E9=A2=84=E6=A1=88?= =?UTF-8?q?=E5=9C=A8=E7=BA=BF=E7=BC=96=E5=88=B6=E7=81=BE=E6=83=85=E8=AE=BE?= =?UTF-8?q?=E5=AE=9A=E8=A1=A8=E6=A0=BC=E8=BE=93=E5=85=A5=E6=A1=86=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E6=96=B0=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../create-plan-online-five.component.html | 24 +++++++--- .../create-plan-online-five.component.scss | 23 ++++++++++ .../create-plan-online-five.component.ts | 41 +++++++++++++++++- .../plan-management/plan-management.module.ts | 4 +- src/assets/images/deletered.png | Bin 0 -> 580 bytes 5 files changed, 84 insertions(+), 8 deletions(-) create mode 100644 src/assets/images/deletered.png 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 0557afd..bbfbeb5 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 @@ -125,9 +125,11 @@
{{item.groupName}}
-
+
{{element.headName}} + +
@@ -136,14 +138,26 @@ + + + + + + + + - + -
-
+
-
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 c8d47be..ffc36ee 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 @@ -122,6 +122,7 @@ height: 100%; display: flex; flex-direction: column; + overflow-y: auto; .boxHead{ height: 40px; width: 100%; @@ -153,6 +154,13 @@ line-height: 40px; color: #B99A00; } + img{ + width: 20px; + height: 20px; + float: right; + margin-top: 10px; + margin-right: 10px; + } } .body{ width: 100%; @@ -182,6 +190,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 dbfeb2d..1f57b01 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,11 +4,12 @@ * @Author: sueRimn * @Date: 2021-06-16 13:56:54 * @LastEditors: sueRimn - * @LastEditTime: 2021-06-17 10:01:26 + * @LastEditTime: 2021-06-17 15:15:17 */ import { HttpClient } from '@angular/common/http'; import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; +import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar'; @Component({ selector: 'app-create-plan-online-five', @@ -17,7 +18,7 @@ import { ActivatedRoute } from '@angular/router'; }) export class CreatePlanOnlineFiveComponent implements OnInit { - constructor(private http: HttpClient, private route: ActivatedRoute) { } + constructor(private http: HttpClient, private route: ActivatedRoute,public snackBar: MatSnackBar) { } planName: string //预案名称 @@ -49,6 +50,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit { selectedItem: string = '封面' clickTitleItem(item) { + this.addNumber=-1 item == '封面' ? this.selectedItem = '封面' : this.selectedItem = item.groupName } planTemplateData: any @@ -65,6 +67,41 @@ export class CreatePlanOnlineFiveComponent implements OnInit { 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;jJ=Fnmfe|ozc=&t{pX3^-`D(W(>jkx7C6NB zH>j^)6UX@#WmfJ598UOz$ehGt-@}F<5)2|meE%Jp%v+h5DBg77VZqm=Z5kV2NKeo2 z(x=A)8(s>fhQ)FIm=`W@e&KLF>;Fk3YK&K0k-uUC3mrJI3B# z7#xJwR-1K+@E9Ag>85pe!|5sH^U&D|4GnN|0?p0P)dk1LK^P3wbepEsY&5vN9j2xN zCrlq72lG=cE`sO5$Ox>i!qHK6VA!e^_@Gwc+KD z*@Mj`kQCQVhl5io*x9i~2J?o7AepSRW?o$Pwf%iu$(-Hz7h&)U2-* z3eUy!9<}uOh*B?0B~QsayVB=wJKjdA_u@F4Vax9ae6yg34GM*I@w}f={{96v6-r^} Sj7@X^0000 Date: Fri, 18 Jun 2021 15:18:35 +0800 Subject: [PATCH 2/2] =?UTF-8?q?[=E4=BF=AE=E6=94=B9]=E4=B8=89=E5=9B=9B?= =?UTF-8?q?=E4=BA=94=E7=BA=A7=E9=A2=84=E6=A1=88=E7=BC=96=E8=BE=91=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E4=BC=A0=E5=8F=82=E4=BF=AE=E6=94=B9body?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../create-plan-online-five.component.html | 4 ++++ .../create-plan-online-five.component.scss | 1 + .../create-plan-online-five.component.ts | 24 +++++++++++++++++-- .../entry-plan-look.component.ts | 9 ++++--- src/app/ui/plan-template/addgroup.html | 2 +- .../plan-template.component.html | 4 ++-- .../plan-template/plan-template.component.ts | 8 +++---- 7 files changed, 40 insertions(+), 12 deletions(-) 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 6532b17..6e7ac6d 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 @@ -170,6 +170,10 @@
+ +
+ +
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 c93dad0..9cb8d29 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 @@ -155,6 +155,7 @@ color: #B99A00; } img{ + cursor: pointer; width: 20px; height: 20px; float: right; 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 b754cb3..326a0a7 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,7 +4,7 @@ * @Author: sueRimn * @Date: 2021-06-16 13:56:54 * @LastEditors: sueRimn - * @LastEditTime: 2021-06-17 15:15:17 + * @LastEditTime: 2021-06-17 17:05:09 */ import { HttpClient } from '@angular/common/http'; import { Component, OnInit } from '@angular/core'; @@ -29,8 +29,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 diff --git a/src/app/plan-management/entry-plan-look/entry-plan-look.component.ts b/src/app/plan-management/entry-plan-look/entry-plan-look.component.ts index 76e5b48..d200f32 100644 --- a/src/app/plan-management/entry-plan-look/entry-plan-look.component.ts +++ b/src/app/plan-management/entry-plan-look/entry-plan-look.component.ts @@ -206,7 +206,7 @@ export class EntryPlanLookComponent implements OnInit { window.open(`/planManagement/createplanonlinefive?navIsOpen=false&companyId=${this.companyId}&planName=${e.name}&unitName=${this.unitdata.unitname}&planCategory=${e.planCategory}&planId=${e.id}`) } else{ - let body = JSON.stringify(""); + let body = {}; let resetAudit = true let headers = new HttpHeaders({ 'Content-Type': 'text/json' @@ -1203,9 +1203,12 @@ export class ChangeName { let options = { headers }; - let body = JSON.stringify(value.name); + let body = { + name:value.name + } + let body2d=JSON.stringify(value.name) if (this.data.element.planType == 1) {//如果是二维预案 - this.http.put(`/api/PlanComponents2D/${this.data.element.id}`, body, options).subscribe(data => { + this.http.put(`/api/PlanComponents2D/${this.data.element.id}`, body2d, options).subscribe(data => { this.dialogRef.close("success"); }) } else { 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(){