From 599bea074e3769c65284688654fab03a826ad17b Mon Sep 17 00:00:00 2001 From: chenjingyu Date: Fri, 8 Jan 2021 09:54:54 +0800 Subject: [PATCH] =?UTF-8?q?[=E4=BF=AE=E6=94=B9]=E5=90=84=E7=BA=A7=E9=A2=84?= =?UTF-8?q?=E6=A1=88=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../onetwo-entry-plan.component.html | 48 +++++++++--------- .../onetwo-entry-plan.component.ts | 49 ++++++++++++------- .../plan-management/type-plan/newunit.html | 9 +++- .../plan-management/type-plan/newunit.scss | 21 +++++++- .../type-plan/type-plan.component.html | 1 + .../type-plan/type-plan.component.ts | 9 +++- 6 files changed, 91 insertions(+), 46 deletions(-) diff --git a/src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.html b/src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.html index c05a228..ca64906 100644 --- a/src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.html +++ b/src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.html @@ -4,11 +4,11 @@ * @Author: sueRimn * @Date: 2020-12-24 14:15:10 * @LastEditors: sueRimn - * @LastEditTime: 2021-01-06 10:37:08 + * @LastEditTime: 2021-01-08 09:47:51 -->
-
+
@@ -19,35 +19,32 @@
-
- - - - Ⅰ级 - Ⅱ级 - - -
+
- +
- + 🠊 - +
- - + + + 卡片预案 + 二维预案 + 三维预案 + 其他预案 +
@@ -86,12 +83,13 @@
+
- + @@ -99,33 +97,35 @@ - + - + - + - + - + - + - diff --git a/src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.ts b/src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.ts index 77b6370..34e21aa 100644 --- a/src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.ts +++ b/src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.ts @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2020-12-24 14:15:10 * @LastEditors: sueRimn - * @LastEditTime: 2021-01-06 10:39:07 + * @LastEditTime: 2021-01-08 09:48:06 */ import { Component, OnInit, ViewChild, Inject } from '@angular/core'; import { HttpClient } from '@angular/common/http' @@ -19,20 +19,7 @@ import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar'; import { TreeService } from '../../http-interceptors/tree.service' import { ConstantPool } from '@angular/compiler'; import { MatTableDataSource } from '@angular/material/table'; -export interface PeriodicElement { - unitname: string; - level: string; - addname: string; - addtime: string; - unittype: string; - unitstate: string; - isopen: string; - projectlevel: string; -} -const ELEMENT_DATA=[ - {unitname:"抗洪抢险救援应急救援预案",level:"Ⅰ级",addname:"张三",addtime:"2020-12-16",plantype:"洪涝",passstate:"审核通过",isopen:"未公开",projectlevel:"总队"}, - {unitname:"泥石流应急救援预案",level:"Ⅰ级",addname:"韩信",addtime:"2020-12-16",plantype:"泥石流",passstate:"审核中",isopen:"未公开",projectlevel:"支队"} -] + @Component({ selector: 'app-onetwo-entry-plan', @@ -72,18 +59,20 @@ export class OnetwoEntryPlanComponent implements OnInit { ] } this.url=window.location.href.substring(window.location.href.length-1,window.location.href.length) + this.getAlltabledate() } url preparelevels:any plcheck:boolean //编制级别勾选框 displayedColumns: string[] = ['unitname','level','addname','addtime', 'plantype', 'passstate','isopen','projectlevel','operation']; - tabledataSource=ELEMENT_DATA + tabledataSource unitname//预案名称 level//预案级别 addname//添加人 addtime//添加时间 - unittype//预案类型 + endtime//结束时间 + reservePlanType//预案类型 unitstate//审核状态 projectlevel//编制级别 //分页 @@ -112,17 +101,41 @@ export class OnetwoEntryPlanComponent implements OnInit { }) } + //获取表格数据 + getAlltabledate(){ + let paramsdata:any = { + PlanCategory:this.url=='2'?2:1, + PlanType:this.projectlevel||'', + AuditStatus:this.unitstate|| '', + PageNumber: this.PageNumber || '1', + PageSize: this.pageSizeOptions[0], + + } + this.http.get("/api/PlanComponentsMajor",{params:paramsdata}).subscribe((data:any)=>{ + this.length = data.totalCount + this.tabledataSource = data.items + console.log(this.tabledataSource) + }) + } + //重置 reset(){ this.unitname='' this.level='' this.addname='' this.addtime='' - this.unittype='' + //this.unittype='' this.unitstate='' this.projectlevel='' } + //查询 + onSubmit (value) { + this.PageNumber = 1 + this.pageEvent.pageIndex = 0 + this.getAlltabledate(); + } + //新增预案弹窗 addunit(){ const dialogRef = this.dialog.open(newunitComponent, { diff --git a/src/app/plan-management/type-plan/newunit.html b/src/app/plan-management/type-plan/newunit.html index cd632ec..4953720 100644 --- a/src/app/plan-management/type-plan/newunit.html +++ b/src/app/plan-management/type-plan/newunit.html @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2020-12-24 16:26:16 * @LastEditors: sueRimn - * @LastEditTime: 2021-01-06 10:15:18 + * @LastEditTime: 2021-01-06 15:16:50 -->
@@ -18,7 +18,12 @@
- + + +
diff --git a/src/app/plan-management/type-plan/newunit.scss b/src/app/plan-management/type-plan/newunit.scss index 7e78e9c..880da22 100644 --- a/src/app/plan-management/type-plan/newunit.scss +++ b/src/app/plan-management/type-plan/newunit.scss @@ -32,4 +32,23 @@ height: 36px; font-size: 16px; } - } \ No newline at end of file + } + .fileinput-button { + width: 148px; + height: 36px; + top: 10px; + position: relative; + display: inline-block; + overflow: hidden; + background-color: #2196F3; + color: #FFFFFF; + font-size: 16px; +} + +.fileinput-button input{ + position: absolute; + right: 0px; + top: 0px; + opacity: 0; + -ms-filter: 'alpha(opacity=0)'; +} diff --git a/src/app/plan-management/type-plan/type-plan.component.html b/src/app/plan-management/type-plan/type-plan.component.html index ab8c247..67109d3 100644 --- a/src/app/plan-management/type-plan/type-plan.component.html +++ b/src/app/plan-management/type-plan/type-plan.component.html @@ -63,6 +63,7 @@
+
预案名称{{element.unitname}}{{element.name}} 预案级别 添加人{{element.addname}}{{element.creatorName}} 添加时间{{element.addtime}}{{element.creationTime|date:'yyyy-MM-dd'}} 预案类型{{element.plantype}}{{element.planType=='1'?'二维预案':element.planType=='2'?'三维预案':element.planType=='4'?'其他预案':'卡片预案'}} 审核状态{{element.passstate}}{{element.auditStatus=='8'?'未提交审核':element.auditStatus=='1'?'审核中':element.auditStatus=='2'?'审核通过':'审核退回'}} 是否公开{{element.isopen}}{{element.openRange}} 编制级别{{element.projectlevel}}{{element.planLevel=='0'?'总队':element.planLevel=='1'?'支队':element.planLevel=='2'?'大队':'中队'}} 操作 + 查看预案 + 下载 + 删除
diff --git a/src/app/plan-management/type-plan/type-plan.component.ts b/src/app/plan-management/type-plan/type-plan.component.ts index 9c36971..e579495 100644 --- a/src/app/plan-management/type-plan/type-plan.component.ts +++ b/src/app/plan-management/type-plan/type-plan.component.ts @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2021-01-06 09:47:43 * @LastEditors: sueRimn - * @LastEditTime: 2021-01-06 10:27:09 + * @LastEditTime: 2021-01-06 15:12:30 */ import { Component, OnInit, ViewChild, Inject } from '@angular/core'; import { HttpClient } from '@angular/common/http' @@ -115,4 +115,11 @@ export class newunitType{ close(){ this.dialogRef.close(); } + //上传 + upload(){ + document.getElementById('up').click() + } + upchange(e){ + console.log(e) + } }