From 805a8805d1f8bf1dbdcdfb652ce9be86db2d2231 Mon Sep 17 00:00:00 2001
From: jingbowen <970029315@qq.com>
Date: Tue, 16 Aug 2022 14:46:30 +0800
Subject: [PATCH] =?UTF-8?q?=E4=B8=80=E4=BD=93=E5=8C=96=E4=BB=BB=E5=8A=A1?=
=?UTF-8?q?=E5=88=B7=E6=96=B0=E8=B7=B3=E8=BD=ACbug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../da-monthly-task-overview.component.html | 686 +++++-----
.../da-monthly-task-overview.component.scss | 1146 ++++++++---------
.../da-monthly-task-overview.component.ts | 560 ++++----
.../allot-person/allot-person.component.html | 42 +-
.../allot-person/allot-person.component.ts | 66 +-
.../da-subordinate-audit.component.html | 120 +-
.../da-subordinate-audit.component.scss | 322 ++---
.../da-subordinate-audit.component.ts | 478 +++----
.../station-task-apply.component.html | 220 ++--
.../station-task-apply.component.ts | 396 +++---
src/app/home/task/task.component.html | 92 +-
src/app/home/task/task.component.ts | 44 +-
src/app/http-interceptors/base-interceptor.ts | 166 +--
src/app/pages/login/login.component.ts | 266 ++--
src/app/service/cache-token.service.ts | 84 +-
src/styles.scss | 444 +++----
16 files changed, 2577 insertions(+), 2555 deletions(-)
diff --git a/src/app/home/task/da-monthly-task-overview/da-monthly-task-overview.component.html b/src/app/home/task/da-monthly-task-overview/da-monthly-task-overview.component.html
index dd661b9..8febbf9 100644
--- a/src/app/home/task/da-monthly-task-overview/da-monthly-task-overview.component.html
+++ b/src/app/home/task/da-monthly-task-overview/da-monthly-task-overview.component.html
@@ -1,344 +1,344 @@
-
-
-
-
-
-
-
-
- {{item.name}}
-
-
-
-
-
-
-
-
-
-
-
-
- {{item.name}}
- 返回
-
-
-
-
- 济南历下森豪室内娱乐场
-
-
- 已分配
- 已检查
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

-
{{i.company.companyName}}
-
-
-
-
- {{i.mainSupervisor ? i.mainSupervisor.name : '未分配'}}
-
-
-
- {{i.assitantSupervisor ? i.assitantSupervisor.name : '未分配'}}
-
-
分配
-
|
-
申请人: {{i.assitantOrganization.name}}
-
-
-
-
-
-
-

-

-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 月计划统计
-
-
-
- 月计划总数
- 15
-
-
已完成 15
-
- 完成率
-
-
- 75%
-
-
-
-
-
- 周计划统计
-
-
-
- 周计划总数
- 15
-
-
已完成 15
-
- 完成率
-
-
- 75%
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 尬粒酒店管理有限公司济南泺文路分公司
-
-
- 单位名称
-
-
-
-
- 重点单位
-
-
- 级别
-
-
-
-
- 历下区A消防救援站
-
-
- 责任机构
-
-
-
-
- 历下区B消防救援站
-
-
- 协助机构
-
-
-
-
- 宣传
-
-
- 同步工作
-
-
-
-
-
-
-
-
- 进度
-
-
-
-
-
-
-
-
-
-
- 尬粒酒店管理有限公司济南泺文路分公司
-
-
- 单位名称
-
-
-
-
- 重点单位
-
-
- 级别
-
-
-
-
- 历下区A消防救援站
-
-
- 责任机构
-
-
-
-
- 历下区B消防救援站
-
-
- 协助机构
-
-
-
-
- 宣传
-
-
- 同步工作
-
-
-
-
-
-
-
-
- 进度
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+ {{item.name}}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.name}}
+ 返回
+
+
+
+
+ 济南历下森豪室内娱乐场
+
+
+ 已分配
+ 已检查
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+
{{i.company.companyName}}
+
+
+
+
+ {{i.mainSupervisor ? i.mainSupervisor.name : '未分配'}}
+
+
+
+ {{i.assitantSupervisor ? i.assitantSupervisor.name : '未分配'}}
+
+
分配
+
|
+
申请人: {{i.assitantOrganization.name}}
+
+
+
+
+
+
+

+

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 月计划统计
+
+
+
+ 月计划总数
+ 15
+
+
已完成 15
+
+ 完成率
+
+
+ 75%
+
+
+
+
+
+ 周计划统计
+
+
+
+ 周计划总数
+ 15
+
+
已完成 15
+
+ 完成率
+
+
+ 75%
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 尬粒酒店管理有限公司济南泺文路分公司
+
+
+ 单位名称
+
+
+
+
+ 重点单位
+
+
+ 级别
+
+
+
+
+ 历下区A消防救援站
+
+
+ 责任机构
+
+
+
+
+ 历下区B消防救援站
+
+
+ 协助机构
+
+
+
+
+ 宣传
+
+
+ 同步工作
+
+
+
+
+
+
+
+
+ 进度
+
+
+
+
+
+
+
+
+
+
+ 尬粒酒店管理有限公司济南泺文路分公司
+
+
+ 单位名称
+
+
+
+
+ 重点单位
+
+
+ 级别
+
+
+
+
+ 历下区A消防救援站
+
+
+ 责任机构
+
+
+
+
+ 历下区B消防救援站
+
+
+ 协助机构
+
+
+
+
+ 宣传
+
+
+ 同步工作
+
+
+
+
+
+
+
+
+ 进度
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/app/home/task/da-monthly-task-overview/da-monthly-task-overview.component.scss b/src/app/home/task/da-monthly-task-overview/da-monthly-task-overview.component.scss
index 6cdd98b..7d37d10 100644
--- a/src/app/home/task/da-monthly-task-overview/da-monthly-task-overview.component.scss
+++ b/src/app/home/task/da-monthly-task-overview/da-monthly-task-overview.component.scss
@@ -1,573 +1,573 @@
-.box {
- width: 100%;
- height: 100%;
- display: flex;
- flex-direction: column;
- overflow: hidden;
-}
-
-.timebox {
- width: 100%;
- height: 68px;
- box-sizing: border-box;
- padding: 0 20px;
- display: flex;
- align-items: center;
-
- border-bottom: 1px dashed #C7CAD0;
-
- nz-select {
- margin-right: 16px;
- border-radius: 4px 4px 4px 4px;
- }
-
- .monthbtn {
- width: 80px;
- height: 32px;
- line-height: 32px;
- background: #FFFFFF;
- border-radius: 4px 4px 4px 4px;
- opacity: 1;
- border: 1px solid #E4E7EC;
- color: #303133;
- margin-right: 16px;
- cursor: pointer;
- }
-
- .selectedMonth {
-
- background: #2C4DC0;
- color: #FFFFFF;
- }
-}
-
-.instrumentpanelbox {
- box-sizing: border-box;
- padding: 18px;
- color: #303133;
-
- .instrumentpanelheader {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 15px;
- }
-
- .instrumentpanel {
- display: flex;
- flex-wrap: wrap;
- justify-content: space-between;
- }
-
- .instrumentpanelitem {
- background: #FFFFFF;
- box-shadow: 0px 3px 8px 1px rgba(0, 0, 0, 0.0800);
- border-radius: 4px 4px 4px 4px;
- opacity: 1;
- border: 1px solid #E4E7EC;
- display: flex;
-
-
- .itemone {
- width: 100%;
- height: 100%;
- display: flex;
-
- .instrumentpanelitemleft {
- display: flex;
- flex-direction: column;
- justify-content: space-around;
- align-items: flex-start;
- flex: 1;
- box-sizing: border-box;
-
-
- .panelheadername {
- width: 80%;
- height: 46px;
- line-height: 46px;
- text-align: center;
- box-sizing: border-box;
- border-radius: 6px 0px 6px 6px;
- color: #fff;
-
- img {
- vertical-align: text-top;
- }
- }
-
- .tasknum {
- margin-left: 8px;
-
- p {
- margin: 0;
- }
- }
-
- .jindu {
- width: 80%;
- margin-left: 8px;
-
- p {
- margin: 0;
- display: flex;
- justify-content: space-between;
- }
- }
- }
-
- .instrumentpanelitemright {
- flex: 1;
- display: flex;
- align-items: center;
-
- nz-progress {
- margin-top: 65px;
- }
- }
- }
-
- .itemtwo {
- width: 100%;
- height: 100%;
- display: flex;
- box-sizing: border-box;
- padding: 16px;
- flex-direction: column;
- overflow: hidden;
-
- .itemtwotitle {
- display: flex;
- justify-content: space-between;
-
- .back {
- cursor: pointer;
-
- i {
- margin-right: 3px;
- }
- }
-
- margin-bottom: 0;
- }
-
- .itemtwocontent {
- flex: 1;
- overflow-y: auto;
- display: flex;
- flex-direction: column;
-
- .itemtwocontentitem {
- border-bottom: 1px dashed #C7CAD0;
- height: 70px;
- display: flex;
- flex-direction: column;
- justify-content: space-around;
- align-items: flex-start;
- box-sizing: border-box;
- padding: 8px 0;
-
- p {
- margin-bottom: 0;
- }
-
- .itemtwocontentitemp1 {
- width: 100%;
- display: flex;
- justify-content: space-between;
- box-sizing: border-box;
- padding-right: 5px;
-
- .itemtwocontentitemp1name {
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- }
- }
- }
- }
- }
-
- .instrumentpanelitemopen {
- width: 24.3%;
- height: 260px;
- margin-bottom: 18px;
-
- .itemone {
- .instrumentpanelitemleft {
- padding: 26px 0 26px 10%;
- }
- }
- }
-
- .instrumentpanelitemclose {
- width: 11.7%;
- height: 250px;
- margin-bottom: 0px;
-
- .itemone {
- .instrumentpanelitemleft {
- padding: 15px 0 15px 10%;
- }
- }
- }
-}
-
-.taskaudit {
- box-sizing: border-box;
- padding: 18px;
- color: #303133;
- border-top: 1px dashed #C7CAD0;
-
- .taskauditheader {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 15px;
- }
-
- .taskauditbox {
-
- width: 100%;
- background: #FFFFFF;
- box-shadow: 0px 3px 8px 1px rgba(0, 0, 0, 0.0800);
- border-radius: 4px 4px 4px 4px;
- opacity: 1;
- border: 1px solid #E4E7EC;
- box-sizing: border-box;
- padding: 18px;
- margin-bottom: 18px;
-
- .header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- }
-
- .content {
- .card:first-child {
- margin-top: 18px;
- }
-
- .card:last-child {
- margin-bottom: 0px;
- }
-
- .card {
- color: #303133;
- width: 100%;
- height: 70px;
- border-radius: 4px 4px 4px 4px;
- opacity: 1;
- display: flex;
- box-sizing: border-box;
- padding: 0 20px;
- position: relative;
- margin-bottom: 18px;
-
- div {
- display: flex;
- align-items: center;
-
- img {
- margin-top: -3px;
- }
- }
-
- .unitname {
- flex: 3;
- }
-
- .info {
- flex: 6;
-
- span {
- margin-right: 20px;
- }
- }
-
- .btn {
- flex: 1;
-
- button:nth-child(1) {
- background: #42B983;
- color: white;
- }
-
- button:nth-child(2) {
- background: #FF0000;
- color: white;
- margin-left: 20px;
- }
- }
-
- .auditimg {
- position: absolute;
- right: 18%;
- top: 9%;
- }
- }
-
- .greencard {
- background: rgba(66, 185, 131, 0.0400);
- border: 1px solid rgba(66, 185, 131, 0.1600);
- }
-
- .redcard {
- background: rgba(255, 0, 0, 0.0200);
- border: 1px solid rgba(255, 0, 0, 0.1000);
- }
- }
- }
-
- .taskauditbox:nth-child(2) {
- margin-bottom: 0px;
-
- }
-}
-
-.deploybox {
- box-sizing: border-box;
- padding: 18px;
- color: #303133;
- border-top: 1px dashed #C7CAD0;
-
- .deployboxheader {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 15px;
- }
-
- .deploycontent {
- width: 100%;
- display: flex;
- justify-content: space-between;
-
- .deploycontentitem {
- width: 49.5%;
- height: 110px;
- background: linear-gradient(180deg, #7AA3FC 0%, #2C4DC0 100%);
- box-shadow: 0px 3px 8px 1px rgba(0, 0, 0, 0.0800);
- border-radius: 4px 4px 4px 4px;
- opacity: 1;
- box-sizing: border-box;
- padding: 18px 18px;
- display: flex;
- flex-direction: column;
- justify-content: space-around;
- color: #fff;
-
- .title {
- text-align: left;
- }
-
- .details {
- display: flex;
- justify-content: space-between;
- align-items: center;
-
- .detailsname {
- display: flex;
- align-items: center;
- }
-
- .progresssquare {
- width: 60%;
- display: flex;
- color: #fff;
- align-items: center;
-
- span:nth-child(1) {
- margin-right: 16px;
- }
-
- span:last-child {
- margin-left: 16px;
- }
- }
- }
- }
-
- .deploycontentitem:nth-child(1) {
- background: linear-gradient(180deg, #7AA3FC 0%, #2C4DC0 100%);
- }
-
- .deploycontentitem:nth-child(2) {
-
- background: linear-gradient(180deg, #56C5FF 0%, #005DFF 100%);
- }
- }
-}
-
-
-
-.stationcardlistbox {
- .stationcardlistitembox {
- width: 100%;
- border-top: 1px dashed #C7CAD0;
- box-sizing: border-box;
- padding: 18px;
-
- .stationcardlistitem {
- width: 100%;
- background: #FFFFFF;
- box-shadow: 0px 3px 8px 1px rgba(0, 0, 0, 0.0800);
- border-radius: 4px 4px 4px 4px;
- border: 1px solid #E4E7EC;
- color: #303133;
- box-sizing: border-box;
- padding: 0 18px;
-
- .header {
- width: 100%;
- height: 64px;
- display: flex;
- align-items: center;
- text-align: left;
-
- .progress {
- width: 200px;
- display: flex;
- align-items: center;
-
- span {
- margin-right: 12px;
-
- }
-
- nz-progress {
- width: 230px;
- }
- }
-
- .expand {
- margin-left: 20px;
- }
- }
-
- .maincontent {
- .maincontentitem {
- box-sizing: border-box;
- padding: 16px;
- margin-bottom: 18px;
- border-radius: 4px 4px 4px 4px;
- border: 1px solid #42B983;
- display: flex;
- }
-
- .maincontentitemleft {
- width: 170px;
- box-sizing: border-box;
- padding-right: 40px;
- display: flex;
- flex-direction: column;
- justify-content: flex-start;
- align-items: center;
- border-right: 1px dashed #C7CAD0;
-
- .panelheadername {
- width: 90%;
- height: 38px;
- line-height: 38px;
- text-align: center;
- box-sizing: border-box;
- border-radius: 6px 0px 6px 6px;
- color: #fff;
- margin-bottom: 8px;
-
- img {
- vertical-align: text-top;
- }
- }
-
- .num {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 8px;
-
- .round {
- width: 8px;
- height: 8px;
- }
-
- .word {
- margin: 0 6px;
- }
-
- .boldspan {
- font-weight: 800;
- font-size: 25px;
- }
- }
- }
-
- .maincontentitemright {
- flex: 1;
- box-sizing: border-box;
- padding-left: 40px;
- display: flex;
- flex-direction: column;
- justify-content: space-around;
- // align-items: center;
-
- .maincontentitemrightitem {
- display: flex;
- align-items: center;
- box-sizing: border-box;
- padding: 12px 0px;
- border-bottom: 1px dashed #C7CAD0;
-
-
-
- .flexcol {
- display: flex;
- flex-direction: column;
- align-items: flex-start;
- margin-right: 3%;
-
- span:nth-child(1) {
- color: #303133;
- margin-bottom: 8px;
- }
-
- span:nth-child(2) {
- color: #C7CAD0;
- }
- }
-
- .namebox {
- width: 28%;
- }
-
- .progressbox {
- width: 220px;
-
- span:nth-child(1) {
- width: 100%;
- }
- }
-
- .btnbox {
- display: flex;
- justify-content: flex-end;
- align-self: flex-start;
- }
- }
-
- div:last-child {
- border-bottom: 0px;
- }
- }
- }
- }
- }
-
-}
-
-.cutoffrule {
- width: 100%;
- border-top: 1px dashed #C7CAD0;
-}
+.box {
+ width: 100%;
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+ overflow: hidden;
+}
+
+.timebox {
+ width: 100%;
+ height: 68px;
+ box-sizing: border-box;
+ padding: 0 20px;
+ display: flex;
+ align-items: center;
+
+ border-bottom: 1px dashed #C7CAD0;
+
+ nz-select {
+ margin-right: 16px;
+ border-radius: 4px 4px 4px 4px;
+ }
+
+ .monthbtn {
+ width: 80px;
+ height: 32px;
+ line-height: 32px;
+ background: #FFFFFF;
+ border-radius: 4px 4px 4px 4px;
+ opacity: 1;
+ border: 1px solid #E4E7EC;
+ color: #303133;
+ margin-right: 16px;
+ cursor: pointer;
+ }
+
+ .selectedMonth {
+
+ background: #2C4DC0;
+ color: #FFFFFF;
+ }
+}
+
+.instrumentpanelbox {
+ box-sizing: border-box;
+ padding: 18px;
+ color: #303133;
+
+ .instrumentpanelheader {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ margin-bottom: 15px;
+ }
+
+ .instrumentpanel {
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: space-between;
+ }
+
+ .instrumentpanelitem {
+ background: #FFFFFF;
+ box-shadow: 0px 3px 8px 1px rgba(0, 0, 0, 0.0800);
+ border-radius: 4px 4px 4px 4px;
+ opacity: 1;
+ border: 1px solid #E4E7EC;
+ display: flex;
+
+
+ .itemone {
+ width: 100%;
+ height: 100%;
+ display: flex;
+
+ .instrumentpanelitemleft {
+ display: flex;
+ flex-direction: column;
+ justify-content: space-around;
+ align-items: flex-start;
+ flex: 1;
+ box-sizing: border-box;
+
+
+ .panelheadername {
+ width: 80%;
+ height: 46px;
+ line-height: 46px;
+ text-align: center;
+ box-sizing: border-box;
+ border-radius: 6px 0px 6px 6px;
+ color: #fff;
+
+ img {
+ vertical-align: text-top;
+ }
+ }
+
+ .tasknum {
+ margin-left: 8px;
+
+ p {
+ margin: 0;
+ }
+ }
+
+ .jindu {
+ width: 80%;
+ margin-left: 8px;
+
+ p {
+ margin: 0;
+ display: flex;
+ justify-content: space-between;
+ }
+ }
+ }
+
+ .instrumentpanelitemright {
+ flex: 1;
+ display: flex;
+ align-items: center;
+
+ nz-progress {
+ margin-top: 65px;
+ }
+ }
+ }
+
+ .itemtwo {
+ width: 100%;
+ height: 100%;
+ display: flex;
+ box-sizing: border-box;
+ padding: 16px;
+ flex-direction: column;
+ overflow: hidden;
+
+ .itemtwotitle {
+ display: flex;
+ justify-content: space-between;
+
+ .back {
+ cursor: pointer;
+
+ i {
+ margin-right: 3px;
+ }
+ }
+
+ margin-bottom: 0;
+ }
+
+ .itemtwocontent {
+ flex: 1;
+ overflow-y: auto;
+ display: flex;
+ flex-direction: column;
+
+ .itemtwocontentitem {
+ border-bottom: 1px dashed #C7CAD0;
+ height: 70px;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-around;
+ align-items: flex-start;
+ box-sizing: border-box;
+ padding: 8px 0;
+
+ p {
+ margin-bottom: 0;
+ }
+
+ .itemtwocontentitemp1 {
+ width: 100%;
+ display: flex;
+ justify-content: space-between;
+ box-sizing: border-box;
+ padding-right: 5px;
+
+ .itemtwocontentitemp1name {
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ .instrumentpanelitemopen {
+ width: 24.3%;
+ height: 260px;
+ margin-bottom: 18px;
+
+ .itemone {
+ .instrumentpanelitemleft {
+ padding: 26px 0 26px 10%;
+ }
+ }
+ }
+
+ .instrumentpanelitemclose {
+ width: 11.7%;
+ height: 250px;
+ margin-bottom: 0px;
+
+ .itemone {
+ .instrumentpanelitemleft {
+ padding: 15px 0 15px 10%;
+ }
+ }
+ }
+}
+
+.taskaudit {
+ box-sizing: border-box;
+ padding: 18px;
+ color: #303133;
+ border-top: 1px dashed #C7CAD0;
+
+ .taskauditheader {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ margin-bottom: 15px;
+ }
+
+ .taskauditbox {
+
+ width: 100%;
+ background: #FFFFFF;
+ box-shadow: 0px 3px 8px 1px rgba(0, 0, 0, 0.0800);
+ border-radius: 4px 4px 4px 4px;
+ opacity: 1;
+ border: 1px solid #E4E7EC;
+ box-sizing: border-box;
+ padding: 18px;
+ margin-bottom: 18px;
+
+ .header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ }
+
+ .content {
+ .card:first-child {
+ margin-top: 18px;
+ }
+
+ .card:last-child {
+ margin-bottom: 0px;
+ }
+
+ .card {
+ color: #303133;
+ width: 100%;
+ height: 70px;
+ border-radius: 4px 4px 4px 4px;
+ opacity: 1;
+ display: flex;
+ box-sizing: border-box;
+ padding: 0 20px;
+ position: relative;
+ margin-bottom: 18px;
+
+ div {
+ display: flex;
+ align-items: center;
+
+ img {
+ margin-top: -3px;
+ }
+ }
+
+ .unitname {
+ flex: 3;
+ }
+
+ .info {
+ flex: 6;
+
+ span {
+ margin-right: 20px;
+ }
+ }
+
+ .btn {
+ flex: 1;
+
+ button:nth-child(1) {
+ background: #42B983;
+ color: white;
+ }
+
+ button:nth-child(2) {
+ background: #FF0000;
+ color: white;
+ margin-left: 20px;
+ }
+ }
+
+ .auditimg {
+ position: absolute;
+ right: 18%;
+ top: 9%;
+ }
+ }
+
+ .greencard {
+ background: rgba(66, 185, 131, 0.0400);
+ border: 1px solid rgba(66, 185, 131, 0.1600);
+ }
+
+ .redcard {
+ background: rgba(255, 0, 0, 0.0200);
+ border: 1px solid rgba(255, 0, 0, 0.1000);
+ }
+ }
+ }
+
+ .taskauditbox:nth-child(2) {
+ margin-bottom: 0px;
+
+ }
+}
+
+.deploybox {
+ box-sizing: border-box;
+ padding: 18px;
+ color: #303133;
+ border-top: 1px dashed #C7CAD0;
+
+ .deployboxheader {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ margin-bottom: 15px;
+ }
+
+ .deploycontent {
+ width: 100%;
+ display: flex;
+ justify-content: space-between;
+
+ .deploycontentitem {
+ width: 49.5%;
+ height: 110px;
+ background: linear-gradient(180deg, #7AA3FC 0%, #2C4DC0 100%);
+ box-shadow: 0px 3px 8px 1px rgba(0, 0, 0, 0.0800);
+ border-radius: 4px 4px 4px 4px;
+ opacity: 1;
+ box-sizing: border-box;
+ padding: 18px 18px;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-around;
+ color: #fff;
+
+ .title {
+ text-align: left;
+ }
+
+ .details {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+
+ .detailsname {
+ display: flex;
+ align-items: center;
+ }
+
+ .progresssquare {
+ width: 60%;
+ display: flex;
+ color: #fff;
+ align-items: center;
+
+ span:nth-child(1) {
+ margin-right: 16px;
+ }
+
+ span:last-child {
+ margin-left: 16px;
+ }
+ }
+ }
+ }
+
+ .deploycontentitem:nth-child(1) {
+ background: linear-gradient(180deg, #7AA3FC 0%, #2C4DC0 100%);
+ }
+
+ .deploycontentitem:nth-child(2) {
+
+ background: linear-gradient(180deg, #56C5FF 0%, #005DFF 100%);
+ }
+ }
+}
+
+
+
+.stationcardlistbox {
+ .stationcardlistitembox {
+ width: 100%;
+ border-top: 1px dashed #C7CAD0;
+ box-sizing: border-box;
+ padding: 18px;
+
+ .stationcardlistitem {
+ width: 100%;
+ background: #FFFFFF;
+ box-shadow: 0px 3px 8px 1px rgba(0, 0, 0, 0.0800);
+ border-radius: 4px 4px 4px 4px;
+ border: 1px solid #E4E7EC;
+ color: #303133;
+ box-sizing: border-box;
+ padding: 0 18px;
+
+ .header {
+ width: 100%;
+ height: 64px;
+ display: flex;
+ align-items: center;
+ text-align: left;
+
+ .progress {
+ width: 200px;
+ display: flex;
+ align-items: center;
+
+ span {
+ margin-right: 12px;
+
+ }
+
+ nz-progress {
+ width: 230px;
+ }
+ }
+
+ .expand {
+ margin-left: 20px;
+ }
+ }
+
+ .maincontent {
+ .maincontentitem {
+ box-sizing: border-box;
+ padding: 16px;
+ margin-bottom: 18px;
+ border-radius: 4px 4px 4px 4px;
+ border: 1px solid #42B983;
+ display: flex;
+ }
+
+ .maincontentitemleft {
+ width: 170px;
+ box-sizing: border-box;
+ padding-right: 40px;
+ display: flex;
+ flex-direction: column;
+ justify-content: flex-start;
+ align-items: center;
+ border-right: 1px dashed #C7CAD0;
+
+ .panelheadername {
+ width: 90%;
+ height: 38px;
+ line-height: 38px;
+ text-align: center;
+ box-sizing: border-box;
+ border-radius: 6px 0px 6px 6px;
+ color: #fff;
+ margin-bottom: 8px;
+
+ img {
+ vertical-align: text-top;
+ }
+ }
+
+ .num {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ margin-bottom: 8px;
+
+ .round {
+ width: 8px;
+ height: 8px;
+ }
+
+ .word {
+ margin: 0 6px;
+ }
+
+ .boldspan {
+ font-weight: 800;
+ font-size: 25px;
+ }
+ }
+ }
+
+ .maincontentitemright {
+ flex: 1;
+ box-sizing: border-box;
+ padding-left: 40px;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-around;
+ // align-items: center;
+
+ .maincontentitemrightitem {
+ display: flex;
+ align-items: center;
+ box-sizing: border-box;
+ padding: 12px 0px;
+ border-bottom: 1px dashed #C7CAD0;
+
+
+
+ .flexcol {
+ display: flex;
+ flex-direction: column;
+ align-items: flex-start;
+ margin-right: 3%;
+
+ span:nth-child(1) {
+ color: #303133;
+ margin-bottom: 8px;
+ }
+
+ span:nth-child(2) {
+ color: #C7CAD0;
+ }
+ }
+
+ .namebox {
+ width: 28%;
+ }
+
+ .progressbox {
+ width: 220px;
+
+ span:nth-child(1) {
+ width: 100%;
+ }
+ }
+
+ .btnbox {
+ display: flex;
+ justify-content: flex-end;
+ align-self: flex-start;
+ }
+ }
+
+ div:last-child {
+ border-bottom: 0px;
+ }
+ }
+ }
+ }
+ }
+
+}
+
+.cutoffrule {
+ width: 100%;
+ border-top: 1px dashed #C7CAD0;
+}
diff --git a/src/app/home/task/da-monthly-task-overview/da-monthly-task-overview.component.ts b/src/app/home/task/da-monthly-task-overview/da-monthly-task-overview.component.ts
index cdf6990..3be48a2 100644
--- a/src/app/home/task/da-monthly-task-overview/da-monthly-task-overview.component.ts
+++ b/src/app/home/task/da-monthly-task-overview/da-monthly-task-overview.component.ts
@@ -1,280 +1,280 @@
-import { HttpClient } from '@angular/common/http';
-import { Component, OnInit, ViewContainerRef } from '@angular/core';
-import { NzMessageService } from 'ng-zorro-antd/message';
-import { NzModalService } from 'ng-zorro-antd/modal';
-import { AllotPersonComponent } from '../da-subordinate-audit/allot-person/allot-person.component';
-
-@Component({
- selector: 'app-da-monthly-task-overview',
- templateUrl: './da-monthly-task-overview.component.html',
- styleUrls: ['./da-monthly-task-overview.component.scss']
-})
-export class DaMonthlyTaskOverviewComponent implements OnInit {
-
- constructor(private http: HttpClient, private modal: NzModalService, private viewContainerRef: ViewContainerRef, private message: NzMessageService) { }
-
- OrganizationId
- ngOnInit(): void {
- this.OrganizationId = JSON.parse(sessionStorage.getItem('userData')).organizationId
- this.selectedMonth = new Date().getMonth() + 1
-
- this.getTaskList()
- //获得主协调查人员
- this.getSupervisor('main')
- this.getSupervisor('assisted')
- }
-
- selectedMonth
- selectedYear = 2022
- selectedTime
- selectMonth(item) {
- this.selectedMonth = item.id
- this.getTaskList()
- }
- selectYear(e) {
- this.selectedYear = e
- console.log('年', e)
- this.getTaskList()
- }
- months = [
- { id: 1, name: '1月', isable: true },
- { id: 2, name: '2月', isable: true },
- { id: 3, name: '3月', isable: true },
- { id: 4, name: '4月', isable: true },
- { id: 5, name: '5月', isable: true },
- { id: 6, name: '6月', isable: true },
- { id: 7, name: '7月', isable: true },
- { id: 8, name: '8月', isable: true },
- { id: 9, name: '9月', isable: true },
- { id: 10, name: '10月', isable: true },
- { id: 11, name: '11月', isable: true },
- { id: 12, name: '12月', isable: true }
- ]
-
-
- istaskauditExpanded = true
- istaskauditexpand() {
- this.istaskauditExpanded = !this.istaskauditExpanded
- }
-
- isdeployboxExpanded = true
- isdeployboxexpand() {
- this.isdeployboxExpanded = !this.isdeployboxExpanded
- }
-
-
- shuxiTaskData = {
- isExpand: true
- }
- zhidaoTaskData = {
- isExpand: true
- }
- PageNumber = 1
- PageSize = 9999
-
- taskData = [
- { id: 0, name: '熟悉演练任务', finished: 0, totalCount: 0, list: [], isExpand: true },
- { id: 1, name: '联络指导任务', finished: 0, totalCount: 0, list: [], isExpand: true }
- ]
-
- isloading = false
- getTaskList() {
- this.isloading = true
- this.taskData = [
- { id: 0, name: '熟悉演练任务', finished: 0, totalCount: 0, list: [], isExpand: true },
- { id: 1, name: '联络指导任务', finished: 0, totalCount: 0, list: [], isExpand: true }
- ]
- let selectedTime = this.selectedYear + '-' + this.selectedMonth + '-' + '01'
- console.log('查询时间', selectedTime)
- let params = {
- Month: selectedTime,
- OrganizationId: this.OrganizationId,
- PageNumber: this.PageNumber,
- PageSize: this.PageSize
- }
- this.http.get('/api/PlanTasks', {
- params: params
- }).subscribe((data: any) => {
- let arr1 = []
- let arr2 = []
- data.items.forEach(element => {
- if (element.taskName == '熟悉演练') {
- arr1.push(element)
- }
- if (element.taskName == '联络指导') {
- arr2.push(element)
- }
- });
- arr1.forEach(item => {
- if (!!item.approvalStatus) {
- this.taskData[0].finished += 1
- }
- });
- arr2.forEach(item => {
- if (!!item.approvalStatus) {
- this.taskData[1].finished += 1
- }
- });
- this.taskData[0].totalCount = arr1.length
- this.taskData[0].list = [...arr1]
- this.taskData[1].totalCount = arr2.length
- this.taskData[1].list = [...arr2]
-
- this.isloading = false
- })
- }
- assitantsupervisorList
- mainsupervisorList
- getSupervisor(type) {
- let params = {
- inspectorType: type
- }
- this.http.get('/api/Users/Inspectors', {
- params: params
- }).subscribe((data: any) => {
- console.log('检查员列表', data)
- if (type == 'main') {
- this.mainsupervisorList = data
- } else {
- this.assitantsupervisorList = data
- }
- })
- }
-
- allot(item) {
- console.log(item)
- if (this.mainsupervisorList.length == 0 || this.assitantsupervisorList.length == 0) {
- this.message.create('warning', '请从用户管理添加检查人员');
- return
- }
- const modal = this.modal.create({
- nzTitle: '分配监督检查员',
- nzContent: AllotPersonComponent,
- nzViewContainerRef: this.viewContainerRef,
- nzWidth: 485,
- nzMaskClosable: false,
- nzComponentParams: {
- mainsupervisorList: this.mainsupervisorList,
- assitantsupervisorList: this.assitantsupervisorList
- },
- nzOnOk: async () => {
- if (instance.validateForm.valid) {
- await new Promise((resolve, reject) => {
- let body = {
- mainSupervisorId: instance.validateForm.value.main,
- assitantSupervisorId: instance.validateForm.value.assitant
- }
- this.http.patch(`/api/PlanTasks/${item.id}`, body).subscribe({
- next: async (data) => {
- this.message.create('success', '分配成功');
- resolve(data)
- this.getTaskList()
- return true
- },
- error: (err) => {
- this.message.create('warning', '分配失败');
- reject(err)
- return false
- }
- })
- })
- } else {
- this.message.create('warning', '请填写完整!');
- return false
- }
- }
- });
- const instance = modal.getContentComponent();
- modal.afterOpen.subscribe(() => console.log('[afterOpen] emitted!'));
- modal.afterClose.subscribe(result => console.log('[afterClose] The result is:', result));
- }
-
- agree(item) {
- this.modal.confirm({
- nzTitle: `确定要同意该申请吗?`,
- nzOkText: '确定',
- nzOkType: 'default',
- nzOnOk: () => {
- this.http.post(`/api/PlanTasks/Approval/${item.id}`, null, {
- params: {
- approvalStatus: 'approved'
- }
- }).subscribe({
- next: (data) => {
- this.message.create('success', '审核成功');
- this.getTaskList()
- },
- error: (err) => {
- this.message.create('warning', '审核失败');
- }
- })
- },
- nzCancelText: '取消'
- });
- }
-
- reject(item) {
- this.modal.confirm({
- nzTitle: `确定要驳回该申请吗?`,
- nzOkText: '确定',
- nzOkType: 'default',
- nzOnOk: () => {
- this.http.post(`/api/PlanTasks/Approval/${item.id}`, null, {
- params: {
- approvalStatus: 'reject'
- }
- }).subscribe({
- next: (data) => {
- this.message.create('success', '审核成功');
- this.getTaskList()
- },
- error: (err) => {
- this.message.create('warning', '审核失败');
- }
- })
- },
- nzCancelText: '取消'
- });
- }
-
-
-
- expand(data) {
- data.isExpand = !data.isExpand
- }
-
- formatOne = (percent: number): string => `${percent}%\n完成率`;
-
-
- cardData = [
- { name: '重大活动', isDetails: false, background: '#FF9203', icon: 'huodong.png' },
- { name: '双随机', isDetails: false, background: '#1D9DFF', icon: 'suiji.png' },
- { name: '行政许可', isDetails: false, background: '#42B983', icon: 'xuke.png' },
- { name: '熟悉演练', isDetails: false, background: '#9D80FF', icon: 'yanlian.png' },
- { name: '联络指导', isDetails: false, background: '#5483EA', icon: 'zhidao.png' },
- { name: '消防宣传', isDetails: false, background: '#FF5D2A', icon: 'xuanchuan.png' },
- { name: '投诉举报', isDetails: false, background: '#5087FF', icon: 'tousu.png' },
- { name: '火灾调查', isDetails: false, background: '#FF404D', icon: 'huozai.png' }
- ]
-
- openDetails(data, type) {
- data.isDetails = type
- }
- xxx = false
- radioChange(e) {
-
- setTimeout(() => {
- this.xxx = !this.xxx
- }, 0);
-
- }
- stationData = [
- { name: '历下区A消防救援站', isExpand: true },
- { name: '历下区B消防救援站', isExpand: false },
- { name: '历下区C消防救援站', isExpand: false }
- ]
- expandcarditem(item) {
- item.isExpand = !item.isExpand
- }
-
-}
+import { HttpClient } from '@angular/common/http';
+import { Component, OnInit, ViewContainerRef } from '@angular/core';
+import { NzMessageService } from 'ng-zorro-antd/message';
+import { NzModalService } from 'ng-zorro-antd/modal';
+import { AllotPersonComponent } from '../da-subordinate-audit/allot-person/allot-person.component';
+
+@Component({
+ selector: 'app-da-monthly-task-overview',
+ templateUrl: './da-monthly-task-overview.component.html',
+ styleUrls: ['./da-monthly-task-overview.component.scss']
+})
+export class DaMonthlyTaskOverviewComponent implements OnInit {
+
+ constructor(private http: HttpClient, private modal: NzModalService, private viewContainerRef: ViewContainerRef, private message: NzMessageService) { }
+
+ OrganizationId
+ ngOnInit(): void {
+ this.OrganizationId = JSON.parse(sessionStorage.getItem('userData')).organizationId
+ this.selectedMonth = new Date().getMonth() + 1
+
+ this.getTaskList()
+ //获得主协调查人员
+ this.getSupervisor('main')
+ this.getSupervisor('assisted')
+ }
+
+ selectedMonth
+ selectedYear = 2022
+ selectedTime
+ selectMonth(item) {
+ this.selectedMonth = item.id
+ this.getTaskList()
+ }
+ selectYear(e) {
+ this.selectedYear = e
+ console.log('年', e)
+ this.getTaskList()
+ }
+ months = [
+ { id: 1, name: '1月', isable: true },
+ { id: 2, name: '2月', isable: true },
+ { id: 3, name: '3月', isable: true },
+ { id: 4, name: '4月', isable: true },
+ { id: 5, name: '5月', isable: true },
+ { id: 6, name: '6月', isable: true },
+ { id: 7, name: '7月', isable: true },
+ { id: 8, name: '8月', isable: true },
+ { id: 9, name: '9月', isable: true },
+ { id: 10, name: '10月', isable: true },
+ { id: 11, name: '11月', isable: true },
+ { id: 12, name: '12月', isable: true }
+ ]
+
+
+ istaskauditExpanded = true
+ istaskauditexpand() {
+ this.istaskauditExpanded = !this.istaskauditExpanded
+ }
+
+ isdeployboxExpanded = true
+ isdeployboxexpand() {
+ this.isdeployboxExpanded = !this.isdeployboxExpanded
+ }
+
+
+ shuxiTaskData = {
+ isExpand: true
+ }
+ zhidaoTaskData = {
+ isExpand: true
+ }
+ PageNumber = 1
+ PageSize = 9999
+
+ taskData = [
+ { id: 0, name: '熟悉演练任务', finished: 0, totalCount: 0, list: [], isExpand: true },
+ { id: 1, name: '联络指导任务', finished: 0, totalCount: 0, list: [], isExpand: true }
+ ]
+
+ isloading = false
+ getTaskList() {
+ this.isloading = true
+ this.taskData = [
+ { id: 0, name: '熟悉演练任务', finished: 0, totalCount: 0, list: [], isExpand: true },
+ { id: 1, name: '联络指导任务', finished: 0, totalCount: 0, list: [], isExpand: true }
+ ]
+ let selectedTime = this.selectedYear + '-' + this.selectedMonth + '-' + '01'
+ console.log('查询时间', selectedTime)
+ let params = {
+ Month: selectedTime,
+ OrganizationId: this.OrganizationId,
+ PageNumber: this.PageNumber,
+ PageSize: this.PageSize
+ }
+ this.http.get('/api/PlanTasks', {
+ params: params
+ }).subscribe((data: any) => {
+ let arr1 = []
+ let arr2 = []
+ data.items.forEach(element => {
+ if (element.taskName == '熟悉演练') {
+ arr1.push(element)
+ }
+ if (element.taskName == '联络指导') {
+ arr2.push(element)
+ }
+ });
+ arr1.forEach(item => {
+ if (!!item.approvalStatus) {
+ this.taskData[0].finished += 1
+ }
+ });
+ arr2.forEach(item => {
+ if (!!item.approvalStatus) {
+ this.taskData[1].finished += 1
+ }
+ });
+ this.taskData[0].totalCount = arr1.length
+ this.taskData[0].list = [...arr1]
+ this.taskData[1].totalCount = arr2.length
+ this.taskData[1].list = [...arr2]
+
+ this.isloading = false
+ })
+ }
+ assitantsupervisorList
+ mainsupervisorList
+ getSupervisor(type) {
+ let params = {
+ inspectorType: type
+ }
+ this.http.get('/api/Users/Inspectors', {
+ params: params
+ }).subscribe((data: any) => {
+ console.log('检查员列表', data)
+ if (type == 'main') {
+ this.mainsupervisorList = data
+ } else {
+ this.assitantsupervisorList = data
+ }
+ })
+ }
+
+ allot(item) {
+ console.log(item)
+ if (this.mainsupervisorList.length == 0 || this.assitantsupervisorList.length == 0) {
+ this.message.create('warning', '请从用户管理添加检查人员');
+ return
+ }
+ const modal = this.modal.create({
+ nzTitle: '分配监督检查员',
+ nzContent: AllotPersonComponent,
+ nzViewContainerRef: this.viewContainerRef,
+ nzWidth: 485,
+ nzMaskClosable: false,
+ nzComponentParams: {
+ mainsupervisorList: this.mainsupervisorList,
+ assitantsupervisorList: this.assitantsupervisorList
+ },
+ nzOnOk: async () => {
+ if (instance.validateForm.valid) {
+ await new Promise((resolve, reject) => {
+ let body = {
+ mainSupervisorId: instance.validateForm.value.main,
+ assitantSupervisorId: instance.validateForm.value.assitant
+ }
+ this.http.patch(`/api/PlanTasks/${item.id}`, body).subscribe({
+ next: async (data) => {
+ this.message.create('success', '分配成功');
+ resolve(data)
+ this.getTaskList()
+ return true
+ },
+ error: (err) => {
+ this.message.create('warning', '分配失败');
+ reject(err)
+ return false
+ }
+ })
+ })
+ } else {
+ this.message.create('warning', '请填写完整!');
+ return false
+ }
+ }
+ });
+ const instance = modal.getContentComponent();
+ modal.afterOpen.subscribe(() => console.log('[afterOpen] emitted!'));
+ modal.afterClose.subscribe(result => console.log('[afterClose] The result is:', result));
+ }
+
+ agree(item) {
+ this.modal.confirm({
+ nzTitle: `确定要同意该申请吗?`,
+ nzOkText: '确定',
+ nzOkType: 'default',
+ nzOnOk: () => {
+ this.http.post(`/api/PlanTasks/Approval/${item.id}`, null, {
+ params: {
+ approvalStatus: 'approved'
+ }
+ }).subscribe({
+ next: (data) => {
+ this.message.create('success', '审核成功');
+ this.getTaskList()
+ },
+ error: (err) => {
+ this.message.create('warning', '审核失败');
+ }
+ })
+ },
+ nzCancelText: '取消'
+ });
+ }
+
+ reject(item) {
+ this.modal.confirm({
+ nzTitle: `确定要驳回该申请吗?`,
+ nzOkText: '确定',
+ nzOkType: 'default',
+ nzOnOk: () => {
+ this.http.post(`/api/PlanTasks/Approval/${item.id}`, null, {
+ params: {
+ approvalStatus: 'reject'
+ }
+ }).subscribe({
+ next: (data) => {
+ this.message.create('success', '审核成功');
+ this.getTaskList()
+ },
+ error: (err) => {
+ this.message.create('warning', '审核失败');
+ }
+ })
+ },
+ nzCancelText: '取消'
+ });
+ }
+
+
+
+ expand(data) {
+ data.isExpand = !data.isExpand
+ }
+
+ formatOne = (percent: number): string => `${percent}%\n完成率`;
+
+
+ cardData = [
+ { name: '重大活动', isDetails: false, background: '#FF9203', icon: 'huodong.png' },
+ { name: '双随机', isDetails: false, background: '#1D9DFF', icon: 'suiji.png' },
+ { name: '行政许可', isDetails: false, background: '#42B983', icon: 'xuke.png' },
+ { name: '熟悉演练', isDetails: false, background: '#9D80FF', icon: 'yanlian.png' },
+ { name: '联络指导', isDetails: false, background: '#5483EA', icon: 'zhidao.png' },
+ { name: '消防宣传', isDetails: false, background: '#FF5D2A', icon: 'xuanchuan.png' },
+ { name: '投诉举报', isDetails: false, background: '#5087FF', icon: 'tousu.png' },
+ { name: '火灾调查', isDetails: false, background: '#FF404D', icon: 'huozai.png' }
+ ]
+
+ openDetails(data, type) {
+ data.isDetails = type
+ }
+ xxx = false
+ radioChange(e) {
+
+ setTimeout(() => {
+ this.xxx = !this.xxx
+ }, 0);
+
+ }
+ stationData = [
+ { name: '历下区A消防救援站', isExpand: true },
+ { name: '历下区B消防救援站', isExpand: false },
+ { name: '历下区C消防救援站', isExpand: false }
+ ]
+ expandcarditem(item) {
+ item.isExpand = !item.isExpand
+ }
+
+}
diff --git a/src/app/home/task/da-subordinate-audit/allot-person/allot-person.component.html b/src/app/home/task/da-subordinate-audit/allot-person/allot-person.component.html
index c669f80..0415b4e 100644
--- a/src/app/home/task/da-subordinate-audit/allot-person/allot-person.component.html
+++ b/src/app/home/task/da-subordinate-audit/allot-person/allot-person.component.html
@@ -1,22 +1,22 @@
-
-
+
+
\ No newline at end of file
diff --git a/src/app/home/task/da-subordinate-audit/allot-person/allot-person.component.ts b/src/app/home/task/da-subordinate-audit/allot-person/allot-person.component.ts
index d33a5e4..5b6b9f3 100644
--- a/src/app/home/task/da-subordinate-audit/allot-person/allot-person.component.ts
+++ b/src/app/home/task/da-subordinate-audit/allot-person/allot-person.component.ts
@@ -1,33 +1,33 @@
-import { Component, OnInit, Input } from '@angular/core';
-import { NzModalRef } from 'ng-zorro-antd/modal';
-import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { HttpClient } from '@angular/common/http';
-import { TreeService } from 'src/app/service/tree.service';
-@Component({
- selector: 'app-allot-person',
- templateUrl: './allot-person.component.html',
- styleUrls: ['./allot-person.component.scss']
-})
-export class AllotPersonComponent implements OnInit {
-
- @Input() mainsupervisorList?: any;
- @Input() assitantsupervisorList?: any;
- validateForm!: FormGroup;
- constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient) { }
-
- ngOnInit(): void {
- this.validateForm = this.fb.group({
- main: [null, [Validators.required]],
- assitant: [null, [Validators.required]]
- });
-
-
- }
- destroyModal(): void {
- this.modal.destroy({ data: 'this the result data' });
- }
-
- listOfData: any[] = [];
-
-
-}
+import { Component, OnInit, Input } from '@angular/core';
+import { NzModalRef } from 'ng-zorro-antd/modal';
+import { FormBuilder, FormGroup, Validators } from '@angular/forms';
+import { HttpClient } from '@angular/common/http';
+import { TreeService } from 'src/app/service/tree.service';
+@Component({
+ selector: 'app-allot-person',
+ templateUrl: './allot-person.component.html',
+ styleUrls: ['./allot-person.component.scss']
+})
+export class AllotPersonComponent implements OnInit {
+
+ @Input() mainsupervisorList?: any;
+ @Input() assitantsupervisorList?: any;
+ validateForm!: FormGroup;
+ constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient) { }
+
+ ngOnInit(): void {
+ this.validateForm = this.fb.group({
+ main: [null, [Validators.required]],
+ assitant: [null, [Validators.required]]
+ });
+
+
+ }
+ destroyModal(): void {
+ this.modal.destroy({ data: 'this the result data' });
+ }
+
+ listOfData: any[] = [];
+
+
+}
diff --git a/src/app/home/task/da-subordinate-audit/da-subordinate-audit.component.html b/src/app/home/task/da-subordinate-audit/da-subordinate-audit.component.html
index a061e51..895f0d9 100644
--- a/src/app/home/task/da-subordinate-audit/da-subordinate-audit.component.html
+++ b/src/app/home/task/da-subordinate-audit/da-subordinate-audit.component.html
@@ -1,61 +1,61 @@
-
-
-
-
-
-
-
-
- {{item.name}}
-
-
-
-
-
-
-
-
-
-
-

-
{{item.company.companyName}}
-
-
-
-
- {{item.mainSupervisor ? item.mainSupervisor.name : '未分配'}}
-
-
-
- {{item.assitantSupervisor ? item.assitantSupervisor.name : '未分配'}}
-
-
分配
-
|
-
申请人: {{item.assitantOrganization.name}}
-
-
-
-
-
-
-

-

-
-
-
+
+
+
+
+
+
+
+
+ {{item.name}}
+
+
+
+
+
+
+
+
+
+
+

+
{{item.company.companyName}}
+
+
+
+
+ {{item.mainSupervisor ? item.mainSupervisor.name : '未分配'}}
+
+
+
+ {{item.assitantSupervisor ? item.assitantSupervisor.name : '未分配'}}
+
+
分配
+
|
+
申请人: {{item.assitantOrganization.name}}
+
+
+
+
+
+
+

+

+
+
+
\ No newline at end of file
diff --git a/src/app/home/task/da-subordinate-audit/da-subordinate-audit.component.scss b/src/app/home/task/da-subordinate-audit/da-subordinate-audit.component.scss
index 481f790..91228f6 100644
--- a/src/app/home/task/da-subordinate-audit/da-subordinate-audit.component.scss
+++ b/src/app/home/task/da-subordinate-audit/da-subordinate-audit.component.scss
@@ -1,161 +1,161 @@
-.box {
- width: 100%;
- height: 100%;
- display: flex;
- flex-direction: column;
- overflow: hidden;
-}
-
-.timebox {
- width: 100%;
- height: 68px;
- box-sizing: border-box;
- padding: 0 20px;
- display: flex;
- align-items: center;
-
- nz-select {
- margin-right: 16px;
- border-radius: 4px 4px 4px 4px;
- }
-
- .monthbtn {
- width: 80px;
- height: 32px;
- line-height: 32px;
- background: #FFFFFF;
- border-radius: 4px 4px 4px 4px;
- opacity: 1;
- border: 1px solid #E4E7EC;
- color: #303133;
- margin-right: 16px;
- cursor: pointer;
- }
-
- .selectedMonth {
-
- background: #2C4DC0;
- color: #FFFFFF;
- }
-}
-
-.content {
- flex: 1;
- overflow: hidden;
- margin: 20px;
- margin-top: 0px;
- background: #fff;
- box-shadow: 0px 3px 8px 1px rgba(0, 0, 0, 0.0800);
- border-radius: 4px 4px 4px 4px;
- opacity: 1;
- border: 1px solid #E4E7EC;
- color: #303133;
- text-align: left;
- display: flex;
- flex-direction: column;
- position: relative;
-
-
-
- .tabheader {
- width: 100%;
- height: 52px;
- background: #E4E7EC;
- display: flex;
-
- .tabtitle {
- width: 205px;
- height: 52px;
- line-height: 52px;
- text-align: center;
- display: flex;
- justify-content: center;
- cursor: pointer;
-
- div {
- border-top: 2px solid #E4E7EC;
- }
- }
-
- .selectedTab {
- background: #fff;
-
- div {
- border-top: 2px solid #2C4DC0;
- }
- }
- }
-
- .tabbody {
- flex: 1;
- overflow-y: auto;
- color: #000;
- box-sizing: border-box;
- padding: 18px;
-
- .card {
- color: #303133;
- width: 100%;
- height: 70px;
- border-radius: 4px 4px 4px 4px;
- opacity: 1;
- display: flex;
- margin-bottom: 18px;
- box-sizing: border-box;
- padding: 0 20px;
- position: relative;
-
- div {
- display: flex;
- align-items: center;
-
- img {
- margin-top: -3px;
- }
- }
-
- .unitname {
- flex: 3;
- }
-
- .info {
- flex: 6;
-
- span {
- margin-right: 20px;
- }
- }
-
- .btn {
- flex: 1;
-
- button:nth-child(1) {
- background: #42B983;
- color: white;
- }
-
- button:nth-child(2) {
- background: #FF0000;
- color: white;
- margin-left: 20px;
- }
- }
-
- .auditimg {
- position: absolute;
- right: 18%;
- top: 9%;
- }
- }
-
- .greencard {
- background: rgba(66, 185, 131, 0.0400);
- border: 1px solid rgba(66, 185, 131, 0.1600);
- }
-
- .redcard {
- background: rgba(255, 0, 0, 0.0200);
- border: 1px solid rgba(255, 0, 0, 0.1000);
- }
- }
-}
+.box {
+ width: 100%;
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+ overflow: hidden;
+}
+
+.timebox {
+ width: 100%;
+ height: 68px;
+ box-sizing: border-box;
+ padding: 0 20px;
+ display: flex;
+ align-items: center;
+
+ nz-select {
+ margin-right: 16px;
+ border-radius: 4px 4px 4px 4px;
+ }
+
+ .monthbtn {
+ width: 80px;
+ height: 32px;
+ line-height: 32px;
+ background: #FFFFFF;
+ border-radius: 4px 4px 4px 4px;
+ opacity: 1;
+ border: 1px solid #E4E7EC;
+ color: #303133;
+ margin-right: 16px;
+ cursor: pointer;
+ }
+
+ .selectedMonth {
+
+ background: #2C4DC0;
+ color: #FFFFFF;
+ }
+}
+
+.content {
+ flex: 1;
+ overflow: hidden;
+ margin: 20px;
+ margin-top: 0px;
+ background: #fff;
+ box-shadow: 0px 3px 8px 1px rgba(0, 0, 0, 0.0800);
+ border-radius: 4px 4px 4px 4px;
+ opacity: 1;
+ border: 1px solid #E4E7EC;
+ color: #303133;
+ text-align: left;
+ display: flex;
+ flex-direction: column;
+ position: relative;
+
+
+
+ .tabheader {
+ width: 100%;
+ height: 52px;
+ background: #E4E7EC;
+ display: flex;
+
+ .tabtitle {
+ width: 205px;
+ height: 52px;
+ line-height: 52px;
+ text-align: center;
+ display: flex;
+ justify-content: center;
+ cursor: pointer;
+
+ div {
+ border-top: 2px solid #E4E7EC;
+ }
+ }
+
+ .selectedTab {
+ background: #fff;
+
+ div {
+ border-top: 2px solid #2C4DC0;
+ }
+ }
+ }
+
+ .tabbody {
+ flex: 1;
+ overflow-y: auto;
+ color: #000;
+ box-sizing: border-box;
+ padding: 18px;
+
+ .card {
+ color: #303133;
+ width: 100%;
+ height: 70px;
+ border-radius: 4px 4px 4px 4px;
+ opacity: 1;
+ display: flex;
+ margin-bottom: 18px;
+ box-sizing: border-box;
+ padding: 0 20px;
+ position: relative;
+
+ div {
+ display: flex;
+ align-items: center;
+
+ img {
+ margin-top: -3px;
+ }
+ }
+
+ .unitname {
+ flex: 3;
+ }
+
+ .info {
+ flex: 6;
+
+ span {
+ margin-right: 20px;
+ }
+ }
+
+ .btn {
+ flex: 1;
+
+ button:nth-child(1) {
+ background: #42B983;
+ color: white;
+ }
+
+ button:nth-child(2) {
+ background: #FF0000;
+ color: white;
+ margin-left: 20px;
+ }
+ }
+
+ .auditimg {
+ position: absolute;
+ right: 18%;
+ top: 9%;
+ }
+ }
+
+ .greencard {
+ background: rgba(66, 185, 131, 0.0400);
+ border: 1px solid rgba(66, 185, 131, 0.1600);
+ }
+
+ .redcard {
+ background: rgba(255, 0, 0, 0.0200);
+ border: 1px solid rgba(255, 0, 0, 0.1000);
+ }
+ }
+}
diff --git a/src/app/home/task/da-subordinate-audit/da-subordinate-audit.component.ts b/src/app/home/task/da-subordinate-audit/da-subordinate-audit.component.ts
index c3132b3..9cc6566 100644
--- a/src/app/home/task/da-subordinate-audit/da-subordinate-audit.component.ts
+++ b/src/app/home/task/da-subordinate-audit/da-subordinate-audit.component.ts
@@ -1,239 +1,239 @@
-import { HttpClient } from '@angular/common/http';
-import { Component, OnInit, ViewContainerRef } from '@angular/core';
-import { NzMessageService } from 'ng-zorro-antd/message';
-import { NzModalService } from 'ng-zorro-antd/modal';
-import { AllotPersonComponent } from './allot-person/allot-person.component';
-
-@Component({
- selector: 'app-da-subordinate-audit',
- templateUrl: './da-subordinate-audit.component.html',
- styleUrls: ['./da-subordinate-audit.component.scss']
-})
-export class DaSubordinateAuditComponent implements OnInit {
-
- constructor(private http: HttpClient, private modal: NzModalService, private viewContainerRef: ViewContainerRef, private message: NzMessageService) { }
-
- OrganizationId
- selectedTab = 0
-
- atPresentData = { id: 0, name: '', finished: 0, totalCount: 0, list: [] }
-
- selectTab(item) {
- this.selectedTab = item.id
- this.atPresentData = item
- }
- ngOnInit(): void {
- this.OrganizationId = JSON.parse(sessionStorage.getItem('userData')).organizationId
- this.selectedMonth = new Date().getMonth() + 1
-
- this.getTaskList(0)
-
-
- //获得主协调查人员
- this.getSupervisor('main')
- this.getSupervisor('assisted')
-
-
- }
- months = [
- { id: 1, name: '1月', isable: true },
- { id: 2, name: '2月', isable: true },
- { id: 3, name: '3月', isable: true },
- { id: 4, name: '4月', isable: true },
- { id: 5, name: '5月', isable: true },
- { id: 6, name: '6月', isable: true },
- { id: 7, name: '7月', isable: true },
- { id: 8, name: '8月', isable: true },
- { id: 9, name: '9月', isable: true },
- { id: 10, name: '10月', isable: true },
- { id: 11, name: '11月', isable: true },
- { id: 12, name: '12月', isable: true }
- ]
- selectedMonth
- selectedYear = 2022
- selectedTime
- selectMonth(item) {
- this.selectedMonth = item.id
-
- this.getTaskList(this.selectedTab)
- }
- selectYear(e) {
- this.selectedYear = e
- console.log('年', e)
- this.getTaskList(this.selectedTab)
- }
-
- PageNumber = 1
- PageSize = 9999
-
- data = [
- { id: 0, name: '熟悉演练任务', finished: 0, totalCount: 0, list: [] },
- { id: 1, name: '联络指导任务', finished: 0, totalCount: 0, list: [] }
- ]
-
- isloading = false
- getTaskList(index) {
- this.isloading = true
- this.data = [
- { id: 0, name: '熟悉演练任务', finished: 0, totalCount: 0, list: [] },
- { id: 1, name: '联络指导任务', finished: 0, totalCount: 0, list: [] }
- ]
- let selectedTime = this.selectedYear + '-' + this.selectedMonth + '-' + '01'
- console.log('查询时间', selectedTime)
- let params = {
- Month: selectedTime,
- OrganizationId: this.OrganizationId,
- PageNumber: this.PageNumber,
- PageSize: this.PageSize
- }
- this.http.get('/api/PlanTasks', {
- params: params
- }).subscribe((data: any) => {
- let arr1 = []
- let arr2 = []
- data.items.forEach(element => {
- if (element.taskName == '熟悉演练') {
- arr1.push(element)
- }
- if (element.taskName == '联络指导') {
- arr2.push(element)
- }
- });
- arr1.forEach(item => {
- if (!!item.approvalStatus) {
- this.data[0].finished += 1
- }
- });
- arr2.forEach(item => {
- if (!!item.approvalStatus) {
- this.data[1].finished += 1
- }
- });
- this.data[0].totalCount = arr1.length
- this.data[0].list = [...arr1]
- this.data[1].totalCount = arr2.length
- this.data[1].list = [...arr2]
-
- this.atPresentData = this.data[index]
- console.log(this.atPresentData)
- this.isloading = false
- })
- }
-
-
-
- assitantsupervisorList
- mainsupervisorList
- getSupervisor(type) {
- let params = {
- inspectorType: type
- }
- this.http.get('/api/Users/Inspectors', {
- params: params
- }).subscribe((data: any) => {
- console.log('检查员列表', data)
- if (type == 'main') {
- this.mainsupervisorList = data
- } else {
- this.assitantsupervisorList = data
- }
- })
- }
-
- allot(item) {
- console.log(item)
- if (this.mainsupervisorList.length == 0 || this.assitantsupervisorList.length == 0) {
- this.message.create('warning', '请从用户管理添加检查人员');
- return
- }
- const modal = this.modal.create({
- nzTitle: '分配监督检查员',
- nzContent: AllotPersonComponent,
- nzViewContainerRef: this.viewContainerRef,
- nzWidth: 485,
- nzMaskClosable: false,
- nzComponentParams: {
- mainsupervisorList: this.mainsupervisorList,
- assitantsupervisorList: this.assitantsupervisorList
- },
- nzOnOk: async () => {
- if (instance.validateForm.valid) {
- await new Promise((resolve, reject) => {
- let body = {
- mainSupervisorId: instance.validateForm.value.main,
- assitantSupervisorId: instance.validateForm.value.assitant
- }
- this.http.patch(`/api/PlanTasks/${item.id}`, body).subscribe({
- next: async (data) => {
- this.message.create('success', '分配成功');
- resolve(data)
- this.getTaskList(this.selectedTab)
- return true
- },
- error: (err) => {
- this.message.create('warning', '分配失败');
- reject(err)
- return false
- }
- })
- })
- } else {
- this.message.create('warning', '请填写完整!');
- return false
- }
- }
- });
- const instance = modal.getContentComponent();
- modal.afterOpen.subscribe(() => console.log('[afterOpen] emitted!'));
- modal.afterClose.subscribe(result => console.log('[afterClose] The result is:', result));
- }
-
- agree(item) {
- this.modal.confirm({
- nzTitle: `确定要同意该申请吗?`,
- nzOkText: '确定',
- nzOkType: 'default',
- nzOnOk: () => {
- this.http.post(`/api/PlanTasks/Approval/${item.id}`, null, {
- params: {
- approvalStatus: 'approved'
- }
- }).subscribe({
- next: (data) => {
- this.message.create('success', '审核成功');
- this.getTaskList(this.selectedTab)
- },
- error: (err) => {
- this.message.create('warning', '审核失败');
- }
- })
- },
- nzCancelText: '取消'
- });
- }
-
- reject(item) {
- this.modal.confirm({
- nzTitle: `确定要驳回该申请吗?`,
- nzOkText: '确定',
- nzOkType: 'default',
- nzOnOk: () => {
- this.http.post(`/api/PlanTasks/Approval/${item.id}`, null, {
- params: {
- approvalStatus: 'reject'
- }
- }).subscribe({
- next: (data) => {
- this.message.create('success', '审核成功');
- this.getTaskList(this.selectedTab)
- },
- error: (err) => {
- this.message.create('warning', '审核失败');
- }
- })
- },
- nzCancelText: '取消'
- });
- }
-}
-
+import { HttpClient } from '@angular/common/http';
+import { Component, OnInit, ViewContainerRef } from '@angular/core';
+import { NzMessageService } from 'ng-zorro-antd/message';
+import { NzModalService } from 'ng-zorro-antd/modal';
+import { AllotPersonComponent } from './allot-person/allot-person.component';
+
+@Component({
+ selector: 'app-da-subordinate-audit',
+ templateUrl: './da-subordinate-audit.component.html',
+ styleUrls: ['./da-subordinate-audit.component.scss']
+})
+export class DaSubordinateAuditComponent implements OnInit {
+
+ constructor(private http: HttpClient, private modal: NzModalService, private viewContainerRef: ViewContainerRef, private message: NzMessageService) { }
+
+ OrganizationId
+ selectedTab = 0
+
+ atPresentData = { id: 0, name: '', finished: 0, totalCount: 0, list: [] }
+
+ selectTab(item) {
+ this.selectedTab = item.id
+ this.atPresentData = item
+ }
+ ngOnInit(): void {
+ this.OrganizationId = JSON.parse(sessionStorage.getItem('userData')).organizationId
+ this.selectedMonth = new Date().getMonth() + 1
+
+ this.getTaskList(0)
+
+
+ //获得主协调查人员
+ this.getSupervisor('main')
+ this.getSupervisor('assisted')
+
+
+ }
+ months = [
+ { id: 1, name: '1月', isable: true },
+ { id: 2, name: '2月', isable: true },
+ { id: 3, name: '3月', isable: true },
+ { id: 4, name: '4月', isable: true },
+ { id: 5, name: '5月', isable: true },
+ { id: 6, name: '6月', isable: true },
+ { id: 7, name: '7月', isable: true },
+ { id: 8, name: '8月', isable: true },
+ { id: 9, name: '9月', isable: true },
+ { id: 10, name: '10月', isable: true },
+ { id: 11, name: '11月', isable: true },
+ { id: 12, name: '12月', isable: true }
+ ]
+ selectedMonth
+ selectedYear = 2022
+ selectedTime
+ selectMonth(item) {
+ this.selectedMonth = item.id
+
+ this.getTaskList(this.selectedTab)
+ }
+ selectYear(e) {
+ this.selectedYear = e
+ console.log('年', e)
+ this.getTaskList(this.selectedTab)
+ }
+
+ PageNumber = 1
+ PageSize = 9999
+
+ data = [
+ { id: 0, name: '熟悉演练任务', finished: 0, totalCount: 0, list: [] },
+ { id: 1, name: '联络指导任务', finished: 0, totalCount: 0, list: [] }
+ ]
+
+ isloading = false
+ getTaskList(index) {
+ this.isloading = true
+ this.data = [
+ { id: 0, name: '熟悉演练任务', finished: 0, totalCount: 0, list: [] },
+ { id: 1, name: '联络指导任务', finished: 0, totalCount: 0, list: [] }
+ ]
+ let selectedTime = this.selectedYear + '-' + this.selectedMonth + '-' + '01'
+ console.log('查询时间', selectedTime)
+ let params = {
+ Month: selectedTime,
+ OrganizationId: this.OrganizationId,
+ PageNumber: this.PageNumber,
+ PageSize: this.PageSize
+ }
+ this.http.get('/api/PlanTasks', {
+ params: params
+ }).subscribe((data: any) => {
+ let arr1 = []
+ let arr2 = []
+ data.items.forEach(element => {
+ if (element.taskName == '熟悉演练') {
+ arr1.push(element)
+ }
+ if (element.taskName == '联络指导') {
+ arr2.push(element)
+ }
+ });
+ arr1.forEach(item => {
+ if (!!item.approvalStatus) {
+ this.data[0].finished += 1
+ }
+ });
+ arr2.forEach(item => {
+ if (!!item.approvalStatus) {
+ this.data[1].finished += 1
+ }
+ });
+ this.data[0].totalCount = arr1.length
+ this.data[0].list = [...arr1]
+ this.data[1].totalCount = arr2.length
+ this.data[1].list = [...arr2]
+
+ this.atPresentData = this.data[index]
+ console.log(this.atPresentData)
+ this.isloading = false
+ })
+ }
+
+
+
+ assitantsupervisorList
+ mainsupervisorList
+ getSupervisor(type) {
+ let params = {
+ inspectorType: type
+ }
+ this.http.get('/api/Users/Inspectors', {
+ params: params
+ }).subscribe((data: any) => {
+ console.log('检查员列表', data)
+ if (type == 'main') {
+ this.mainsupervisorList = data
+ } else {
+ this.assitantsupervisorList = data
+ }
+ })
+ }
+
+ allot(item) {
+ console.log(item)
+ if (this.mainsupervisorList.length == 0 || this.assitantsupervisorList.length == 0) {
+ this.message.create('warning', '请从用户管理添加检查人员');
+ return
+ }
+ const modal = this.modal.create({
+ nzTitle: '分配监督检查员',
+ nzContent: AllotPersonComponent,
+ nzViewContainerRef: this.viewContainerRef,
+ nzWidth: 485,
+ nzMaskClosable: false,
+ nzComponentParams: {
+ mainsupervisorList: this.mainsupervisorList,
+ assitantsupervisorList: this.assitantsupervisorList
+ },
+ nzOnOk: async () => {
+ if (instance.validateForm.valid) {
+ await new Promise((resolve, reject) => {
+ let body = {
+ mainSupervisorId: instance.validateForm.value.main,
+ assitantSupervisorId: instance.validateForm.value.assitant
+ }
+ this.http.patch(`/api/PlanTasks/${item.id}`, body).subscribe({
+ next: async (data) => {
+ this.message.create('success', '分配成功');
+ resolve(data)
+ this.getTaskList(this.selectedTab)
+ return true
+ },
+ error: (err) => {
+ this.message.create('warning', '分配失败');
+ reject(err)
+ return false
+ }
+ })
+ })
+ } else {
+ this.message.create('warning', '请填写完整!');
+ return false
+ }
+ }
+ });
+ const instance = modal.getContentComponent();
+ modal.afterOpen.subscribe(() => console.log('[afterOpen] emitted!'));
+ modal.afterClose.subscribe(result => console.log('[afterClose] The result is:', result));
+ }
+
+ agree(item) {
+ this.modal.confirm({
+ nzTitle: `确定要同意该申请吗?`,
+ nzOkText: '确定',
+ nzOkType: 'default',
+ nzOnOk: () => {
+ this.http.post(`/api/PlanTasks/Approval/${item.id}`, null, {
+ params: {
+ approvalStatus: 'approved'
+ }
+ }).subscribe({
+ next: (data) => {
+ this.message.create('success', '审核成功');
+ this.getTaskList(this.selectedTab)
+ },
+ error: (err) => {
+ this.message.create('warning', '审核失败');
+ }
+ })
+ },
+ nzCancelText: '取消'
+ });
+ }
+
+ reject(item) {
+ this.modal.confirm({
+ nzTitle: `确定要驳回该申请吗?`,
+ nzOkText: '确定',
+ nzOkType: 'default',
+ nzOnOk: () => {
+ this.http.post(`/api/PlanTasks/Approval/${item.id}`, null, {
+ params: {
+ approvalStatus: 'reject'
+ }
+ }).subscribe({
+ next: (data) => {
+ this.message.create('success', '审核成功');
+ this.getTaskList(this.selectedTab)
+ },
+ error: (err) => {
+ this.message.create('warning', '审核失败');
+ }
+ })
+ },
+ nzCancelText: '取消'
+ });
+ }
+}
+
diff --git a/src/app/home/task/station-task-apply/station-task-apply.component.html b/src/app/home/task/station-task-apply/station-task-apply.component.html
index 2c300dc..5d7732f 100644
--- a/src/app/home/task/station-task-apply/station-task-apply.component.html
+++ b/src/app/home/task/station-task-apply/station-task-apply.component.html
@@ -1,111 +1,111 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 任务名称 |
- 单位名称 |
-
- 协助机构 |
- 时间 |
- 申请结果 |
- 检查结果 |
- 操作 |
-
-
-
-
-
- {{item.taskName}}
- |
-
- {{item.company.companyName}}
- |
-
-
- {{item.assitantOrganization.name}}
- |
-
- {{item.creationTime | date:"yyyy-MM-dd hh:mm:ss"}}
- |
-
-
-
- 审核驳回
-
-
- 审核通过
-
-
-
- 未审核
-
- |
-
- /
- |
-
- 查看
- |
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 任务名称 |
+ 单位名称 |
+
+ 协助机构 |
+ 时间 |
+ 申请结果 |
+ 检查结果 |
+ 操作 |
+
+
+
+
+
+ {{item.taskName}}
+ |
+
+ {{item.company.companyName}}
+ |
+
+
+ {{item.assitantOrganization.name}}
+ |
+
+ {{item.creationTime | date:"yyyy-MM-dd hh:mm:ss"}}
+ |
+
+
+
+ 审核驳回
+
+
+ 审核通过
+
+
+
+ 未审核
+
+ |
+
+ /
+ |
+
+ 查看
+ |
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/app/home/task/station-task-apply/station-task-apply.component.ts b/src/app/home/task/station-task-apply/station-task-apply.component.ts
index 05e75e8..b766ea7 100644
--- a/src/app/home/task/station-task-apply/station-task-apply.component.ts
+++ b/src/app/home/task/station-task-apply/station-task-apply.component.ts
@@ -1,198 +1,198 @@
-import { Component, OnInit, TemplateRef, ViewContainerRef } from '@angular/core';
-import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { NzFormatEmitEvent, NzTreeComponent, NzTreeNodeOptions } from 'ng-zorro-antd/tree';
-import { NzModalService } from 'ng-zorro-antd/modal';
-import { NzMessageService } from 'ng-zorro-antd/message';
-import { HttpClient } from '@angular/common/http';
-import { TreeService } from 'src/app/service/tree.service';
-import { ApplyComponent } from './apply/apply.component';
-import { ApplyLookComponent } from './apply-look/apply-look.component';
-
-@Component({
- selector: 'app-station-task-apply',
- templateUrl: './station-task-apply.component.html',
- styleUrls: ['./station-task-apply.component.scss']
-})
-export class StationTaskApplyComponent implements OnInit {
-
- validateForm!: FormGroup;
- constructor(private fb: FormBuilder, private modal: NzModalService, private viewContainerRef: ViewContainerRef, private message: NzMessageService, private http: HttpClient, private toTree: TreeService) { }
- searchForm = {
- taskname: '',
- unitname: '',
- unitlevel: '',
- or: ''
- }
- OrganizationId
- ngOnInit(): void {
- this.OrganizationId = JSON.parse(sessionStorage.getItem('userData')).organizationId
- this.getAllOrganization()
- this.getTaskList()
- }
-
-
- cancel(item, type) {
-
- }
- delete(item) {
-
- }
-
- nzLoading = false
- totalCount
- PageNumber = 1
- PageSize = 10
- taskLIst = []
- getTaskList() {
- this.nzLoading = true
- let params = {
- OrganizationId: this.OrganizationId,
- TaskName: this.searchForm.taskname,
- CompanyName: this.searchForm.unitname,
- AssitantOrganizationId: this.searchForm.or,
- PageNumber: this.PageNumber,
- PageSize: this.PageSize
- }
- this.http.get('/api/PlanTasks', {
- params: params
- }).subscribe((data: any) => {
- this.nzLoading = false
- console.log('任务申请列表', data);
- this.totalCount = data.totalCount
- this.taskLIst = [...data.items]
- })
- }
- pageChange($event) {
- this.PageNumber = $event
- this.getTaskList()
- }
- search() {
- this.PageNumber = 1
- this.getTaskList()
- }
- reset() {
- this.PageNumber = 1
- this.searchForm = {
- taskname: '',
- unitname: '',
- unitlevel: '',
- or: ''
- }
- this.getTaskList()
- }
-
-
- expandKeys
- defaultOrId: string
- //获取所有组织机构
- nodes: any = []
- getAllOrganization() {
- let params = {
- PageNumber: 1,
- PageSize: 9999
- }
- this.http.get('/api/Organizations', {
- params: params
- }).subscribe((data: any) => {
- data.items.forEach(element => {
- element.key = element.id
- element.title = element.name
- });
- this.nodes = [...this.toTree.toTree(data.items)]
- })
- }
-
- apply() {
- if (this.nodes.length == 0) {
- this.message.create('warning', '组织机构初始化中,请稍后重试');
- return
- }
- const modal = this.modal.create({
- nzTitle: '申请',
- nzContent: ApplyComponent,
- nzViewContainerRef: this.viewContainerRef,
- nzWidth: 660,
- nzMaskClosable: false,
- nzComponentParams: {
- title: "熟悉演练",
- nodes: this.nodes,
- },
- nzOnOk: async () => {
- if (instance.validateForm.valid) {
- await new Promise((resolve, reject) => {
- let body = {
- organizationId: this.OrganizationId,
- taskName: "联络指导",
- companyId: instance.validateForm.value.unitname,
- assitantOrganizationId: instance.validateForm.value.organization,
- }
- this.http.post('/api/PlanTasks', body).subscribe({
- next: (data) => {
- this.message.create('success', '创建成功');
- resolve(data)
- this.getTaskList()
- return true
- },
- error: (err) => {
- this.message.create('warning', '创建失败');
- reject(err)
- return false
- }
- })
- })
- } else {
- this.message.create('warning', '请填写完整!');
- return false
- }
- }
- });
- const instance = modal.getContentComponent();
- modal.afterOpen.subscribe(() => console.log('[afterOpen] emitted!'));
- modal.afterClose.subscribe(result => console.log('[afterClose] The result is:', result));
- }
- look(item) {
- const modal = this.modal.create({
- nzTitle: '详情',
- nzContent: ApplyLookComponent,
- nzViewContainerRef: this.viewContainerRef,
- nzWidth: 660,
- nzMaskClosable: false,
- nzComponentParams: {
- data: item,
- },
- nzFooter: null,
- nzOnOk: async () => {
- if (instance.validateForm.valid) {
- await new Promise(resolve => {
- let roleNames = [...instance.validateForm.value.role, ...instance.validateForm.value.role2]
- let body = {
- userName: instance.validateForm.value.account,
- name: instance.validateForm.value.name,
- organizationUnitId: Number(instance.validateForm.value.organization),
- roleNames: roleNames,
- phoneNumber: instance.validateForm.value.phonenum,
- isActive: true
- }
- // this.http.post(this.addUrl, body).subscribe(data => {
- // resolve(data)
- // this.message.create('success', '创建成功!');
- // this.SkipCount = 0
- // this.getAllUsers()
- // return true
- // }, err => {
- // resolve(err)
- // this.message.create('warning', err.error.error.message);
- // return false
- // })
- })
- } else {
- this.message.create('warning', '请填写完整!');
- return false
- }
- }
- });
- const instance = modal.getContentComponent();
- modal.afterOpen.subscribe(() => console.log('[afterOpen] emitted!'));
- modal.afterClose.subscribe(result => console.log('[afterClose] The result is:', result));
- }
-}
+import { Component, OnInit, TemplateRef, ViewContainerRef } from '@angular/core';
+import { FormBuilder, FormGroup, Validators } from '@angular/forms';
+import { NzFormatEmitEvent, NzTreeComponent, NzTreeNodeOptions } from 'ng-zorro-antd/tree';
+import { NzModalService } from 'ng-zorro-antd/modal';
+import { NzMessageService } from 'ng-zorro-antd/message';
+import { HttpClient } from '@angular/common/http';
+import { TreeService } from 'src/app/service/tree.service';
+import { ApplyComponent } from './apply/apply.component';
+import { ApplyLookComponent } from './apply-look/apply-look.component';
+
+@Component({
+ selector: 'app-station-task-apply',
+ templateUrl: './station-task-apply.component.html',
+ styleUrls: ['./station-task-apply.component.scss']
+})
+export class StationTaskApplyComponent implements OnInit {
+
+ validateForm!: FormGroup;
+ constructor(private fb: FormBuilder, private modal: NzModalService, private viewContainerRef: ViewContainerRef, private message: NzMessageService, private http: HttpClient, private toTree: TreeService) { }
+ searchForm = {
+ taskname: '',
+ unitname: '',
+ unitlevel: '',
+ or: ''
+ }
+ OrganizationId
+ ngOnInit(): void {
+ this.OrganizationId = JSON.parse(sessionStorage.getItem('userData')).organizationId
+ this.getAllOrganization()
+ this.getTaskList()
+ }
+
+
+ cancel(item, type) {
+
+ }
+ delete(item) {
+
+ }
+
+ nzLoading = false
+ totalCount
+ PageNumber = 1
+ PageSize = 10
+ taskLIst = []
+ getTaskList() {
+ this.nzLoading = true
+ let params = {
+ OrganizationId: this.OrganizationId,
+ TaskName: this.searchForm.taskname,
+ CompanyName: this.searchForm.unitname,
+ AssitantOrganizationId: this.searchForm.or,
+ PageNumber: this.PageNumber,
+ PageSize: this.PageSize
+ }
+ this.http.get('/api/PlanTasks', {
+ params: params
+ }).subscribe((data: any) => {
+ this.nzLoading = false
+ console.log('任务申请列表', data);
+ this.totalCount = data.totalCount
+ this.taskLIst = [...data.items]
+ })
+ }
+ pageChange($event) {
+ this.PageNumber = $event
+ this.getTaskList()
+ }
+ search() {
+ this.PageNumber = 1
+ this.getTaskList()
+ }
+ reset() {
+ this.PageNumber = 1
+ this.searchForm = {
+ taskname: '',
+ unitname: '',
+ unitlevel: '',
+ or: ''
+ }
+ this.getTaskList()
+ }
+
+
+ expandKeys
+ defaultOrId: string
+ //获取所有组织机构
+ nodes: any = []
+ getAllOrganization() {
+ let params = {
+ PageNumber: 1,
+ PageSize: 9999
+ }
+ this.http.get('/api/Organizations', {
+ params: params
+ }).subscribe((data: any) => {
+ data.items.forEach(element => {
+ element.key = element.id
+ element.title = element.name
+ });
+ this.nodes = [...this.toTree.toTree(data.items)]
+ })
+ }
+
+ apply() {
+ if (this.nodes.length == 0) {
+ this.message.create('warning', '组织机构初始化中,请稍后重试');
+ return
+ }
+ const modal = this.modal.create({
+ nzTitle: '申请',
+ nzContent: ApplyComponent,
+ nzViewContainerRef: this.viewContainerRef,
+ nzWidth: 660,
+ nzMaskClosable: false,
+ nzComponentParams: {
+ title: "熟悉演练",
+ nodes: this.nodes,
+ },
+ nzOnOk: async () => {
+ if (instance.validateForm.valid) {
+ await new Promise((resolve, reject) => {
+ let body = {
+ organizationId: this.OrganizationId,
+ taskName: "联络指导",
+ companyId: instance.validateForm.value.unitname,
+ assitantOrganizationId: instance.validateForm.value.organization,
+ }
+ this.http.post('/api/PlanTasks', body).subscribe({
+ next: (data) => {
+ this.message.create('success', '创建成功');
+ resolve(data)
+ this.getTaskList()
+ return true
+ },
+ error: (err) => {
+ this.message.create('warning', '创建失败');
+ reject(err)
+ return false
+ }
+ })
+ })
+ } else {
+ this.message.create('warning', '请填写完整!');
+ return false
+ }
+ }
+ });
+ const instance = modal.getContentComponent();
+ modal.afterOpen.subscribe(() => console.log('[afterOpen] emitted!'));
+ modal.afterClose.subscribe(result => console.log('[afterClose] The result is:', result));
+ }
+ look(item) {
+ const modal = this.modal.create({
+ nzTitle: '详情',
+ nzContent: ApplyLookComponent,
+ nzViewContainerRef: this.viewContainerRef,
+ nzWidth: 660,
+ nzMaskClosable: false,
+ nzComponentParams: {
+ data: item,
+ },
+ nzFooter: null,
+ nzOnOk: async () => {
+ if (instance.validateForm.valid) {
+ await new Promise(resolve => {
+ let roleNames = [...instance.validateForm.value.role, ...instance.validateForm.value.role2]
+ let body = {
+ userName: instance.validateForm.value.account,
+ name: instance.validateForm.value.name,
+ organizationUnitId: Number(instance.validateForm.value.organization),
+ roleNames: roleNames,
+ phoneNumber: instance.validateForm.value.phonenum,
+ isActive: true
+ }
+ // this.http.post(this.addUrl, body).subscribe(data => {
+ // resolve(data)
+ // this.message.create('success', '创建成功!');
+ // this.SkipCount = 0
+ // this.getAllUsers()
+ // return true
+ // }, err => {
+ // resolve(err)
+ // this.message.create('warning', err.error.error.message);
+ // return false
+ // })
+ })
+ } else {
+ this.message.create('warning', '请填写完整!');
+ return false
+ }
+ }
+ });
+ const instance = modal.getContentComponent();
+ modal.afterOpen.subscribe(() => console.log('[afterOpen] emitted!'));
+ modal.afterClose.subscribe(result => console.log('[afterClose] The result is:', result));
+ }
+}
diff --git a/src/app/home/task/task.component.html b/src/app/home/task/task.component.html
index cf7a218..0d52a2d 100644
--- a/src/app/home/task/task.component.html
+++ b/src/app/home/task/task.component.html
@@ -1,47 +1,47 @@
-
-
-
- -
-
- 任务指标
-
- -
-
- 工作审批
-
-
-
- -
-
- 月度任务总览
-
- -
-
- 下级任务申请
-
- -
-
- 本级计划
-
-
-
- -
-
- 任务执行
-
- -
-
- 任务申请
-
- -
-
- 生成周计划
-
-
-
-
+
+
+
+ -
+
+ 任务指标
+
+ -
+
+ 工作审批
+
+
+
+ -
+
+ 月度任务总览
+
+ -
+
+ 下级任务申请
+
+ -
+
+ 本级计划
+
+
+
+ -
+
+ 任务执行
+
+ -
+
+ 任务申请
+
+ -
+
+ 生成周计划
+
+
+
+
\ No newline at end of file
diff --git a/src/app/home/task/task.component.ts b/src/app/home/task/task.component.ts
index daf3a70..eaff0bd 100644
--- a/src/app/home/task/task.component.ts
+++ b/src/app/home/task/task.component.ts
@@ -1,17 +1,27 @@
-import { Component, OnInit } from '@angular/core';
-import { Router } from '@angular/router';
-
-@Component({
- selector: 'app-task',
- templateUrl: './task.component.html',
- styleUrls: ['./task.component.scss']
-})
-export class TaskComponent implements OnInit {
- level=""
- constructor(private router: Router) { }
-
- ngOnInit(): void {
-
- this.level=JSON.parse(sessionStorage.getItem('userData')).organizationLevel
- }
-}
+import { Component, OnInit } from '@angular/core';
+import { Router } from '@angular/router';
+
+@Component({
+ selector: 'app-task',
+ templateUrl: './task.component.html',
+ styleUrls: ['./task.component.scss']
+})
+export class TaskComponent implements OnInit {
+ level=""
+ constructor(private router: Router) { }
+
+ ngOnInit(): void {
+
+ this.level=JSON.parse(sessionStorage.getItem('userData')).organizationLevel
+ if(this.router.url=="/task"){
+ if(this.level=="brigade"){
+ this.router.navigate(['/task/indicators'])
+ }else if(this.level=="battalion"){
+ this.router.navigate(['/task/monthlytaskoverview'])
+ }else if(this.level=="squadron"){
+ this.router.navigate(['/task/taskexecution'])
+ }
+ }
+ }
+
+}
diff --git a/src/app/http-interceptors/base-interceptor.ts b/src/app/http-interceptors/base-interceptor.ts
index 4edbd23..9c706b0 100644
--- a/src/app/http-interceptors/base-interceptor.ts
+++ b/src/app/http-interceptors/base-interceptor.ts
@@ -1,83 +1,83 @@
-import { Injectable } from '@angular/core';
-import {
- HttpClient, HttpInterceptor, HttpHandler, HttpRequest,
- HttpErrorResponse
-} from '@angular/common/http';
-import { throwError } from 'rxjs'
-import { catchError } from 'rxjs/operators';
-import { Router } from '@angular/router'
-import { CacheTokenService } from '../service/cache-token.service'
-import { NzMessageService } from 'ng-zorro-antd/message';
-//baseurl
-// const baseurl = 'http://39.106.78.171:8008';
-
-@Injectable()
-export class BaseInterceptor implements HttpInterceptor {
-
- constructor(private router: Router, public token: CacheTokenService, private message: NzMessageService) { }
-
- intercept(req: any, next: HttpHandler) {
-
- let params = req.params;
- for (const key of req.params.keys()) {
- if (params.get(key) === undefined || params.get(key) === null) {
- params = params.delete(key, undefined);
- }
- }
- req = req.clone({ params });
- // debugger
- // console.log('xxxxxx',req)
- let newReq = req.clone({
- url: req.hadBaseurl ? `${req.url}` : `${req.url}`,
- });
- if (!req.cancelToken) {
- /*获取token*/
- let token = sessionStorage.getItem('token')
- /*此处设置额外请求头,token令牌*/
- newReq.headers =
- newReq.headers.set('Authorization', `Bearer ${token}`)
- }
-
- // 携带请求头发送下一次请求
- return next.handle(newReq)
- .pipe(
- //箭头函数,注意this指向
- catchError((err) => this.handleError(err))
- )
- }
-
- // 捕获错误
- //401 token过期 403没权限!!! 400参数错误 404未找到 614刷新令牌过期!!!
-
- private handleError(error: HttpErrorResponse) {
- console.log('http错误', error)
- // 用户认证失败返回登录页
- if (error.status === 401) {
- this.token.delete()
- sessionStorage.clear()
- localStorage.removeItem("isautologin")
- this.message.create('error', `认证失败!`);
- this.router.navigate(['/login'])
- return
- }
- if (error.status === 403) {
- this.message.create('error', `无权限!`);
- return
- }
- if (error.error instanceof ErrorEvent) {
- // 发生客户端或网络错误。相应处理。
- console.error('An error occurred:', error.message);
- } else {
- // 服务端返回http状态码
- // 服务端返回错误信息
- console.error(
- `状态码${error.status}, ` +
- `错误内容:${error.error}`);
- this.message.create('error', error.error.title);
- }
- // 返回带有面向用户的错误信息
- return throwError(() => {
- new Error('error')
- });
- };
-}
+import { Injectable } from '@angular/core';
+import {
+ HttpClient, HttpInterceptor, HttpHandler, HttpRequest,
+ HttpErrorResponse
+} from '@angular/common/http';
+import { throwError } from 'rxjs'
+import { catchError } from 'rxjs/operators';
+import { Router } from '@angular/router'
+import { CacheTokenService } from '../service/cache-token.service'
+import { NzMessageService } from 'ng-zorro-antd/message';
+//baseurl
+// const baseurl = 'http://39.106.78.171:8008';
+
+@Injectable()
+export class BaseInterceptor implements HttpInterceptor {
+
+ constructor(private router: Router, public token: CacheTokenService, private message: NzMessageService) { }
+
+ intercept(req: any, next: HttpHandler) {
+
+ let params = req.params;
+ for (const key of req.params.keys()) {
+ if (params.get(key) === undefined || params.get(key) === null) {
+ params = params.delete(key, undefined);
+ }
+ }
+ req = req.clone({ params });
+ // debugger
+ // console.log('xxxxxx',req)
+ let newReq = req.clone({
+ url: req.hadBaseurl ? `${req.url}` : `${req.url}`,
+ });
+ if (!req.cancelToken) {
+ /*获取token*/
+ let token = sessionStorage.getItem('token')
+ /*此处设置额外请求头,token令牌*/
+ newReq.headers =
+ newReq.headers.set('Authorization', `Bearer ${token}`)
+ }
+
+ // 携带请求头发送下一次请求
+ return next.handle(newReq)
+ .pipe(
+ //箭头函数,注意this指向
+ catchError((err) => this.handleError(err))
+ )
+ }
+
+ // 捕获错误
+ //401 token过期 403没权限!!! 400参数错误 404未找到 614刷新令牌过期!!!
+
+ private handleError(error: HttpErrorResponse) {
+ console.log('http错误', error)
+ // 用户认证失败返回登录页
+ if (error.status === 401) {
+ this.token.delete()
+ sessionStorage.clear()
+ localStorage.removeItem("isautologin")
+ this.message.create('error', `认证失败!`);
+ this.router.navigate(['/login'])
+ return
+ }
+ if (error.status === 403) {
+ this.message.create('error', `无权限!`);
+ return
+ }
+ if (error.error instanceof ErrorEvent) {
+ // 发生客户端或网络错误。相应处理。
+ console.error('An error occurred:', error.message);
+ } else {
+ // 服务端返回http状态码
+ // 服务端返回错误信息
+ console.error(
+ `状态码${error.status}, ` +
+ `错误内容:${error.error}`);
+ this.message.create('error', error.error.title);
+ }
+ // 返回带有面向用户的错误信息
+ return throwError(() => {
+ new Error('error')
+ });
+ };
+}
diff --git a/src/app/pages/login/login.component.ts b/src/app/pages/login/login.component.ts
index 51cd0a8..f7a121b 100644
--- a/src/app/pages/login/login.component.ts
+++ b/src/app/pages/login/login.component.ts
@@ -1,127 +1,139 @@
-import { Component, OnInit } from '@angular/core';
-import { HttpClient } from '@angular/common/http'
-import { Router } from '@angular/router'
-import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { NzMessageService } from 'ng-zorro-antd/message';
-import { Base64 } from 'js-base64';
-@Component({
- selector: 'app-login',
- templateUrl: './login.component.html',
- styleUrls: ['./login.component.scss'],
-
-})
-export class LoginComponent implements OnInit {
-
- validateForm!: FormGroup;
- constructor(private http: HttpClient, private router: Router, private fb: FormBuilder, private message: NzMessageService) { }
-
- ngOnInit() {
- this.validateForm = this.fb.group({
- userName: [null, [Validators.required]],
- password: [null, [Validators.required]],
- remember: [null],
- autologin: [null],
- });
- //如果本地储存了账号密码信息,那就回显在输入框
- let account = localStorage.getItem('account')
- let password = localStorage.getItem('password')
- if (account && password) {
- this.validateForm.patchValue({
- userName: Base64.decode(localStorage.getItem('account')),
- password: Base64.decode(localStorage.getItem('password'))
- });
- this.remember = true //这一步是回显后让勾选框为选中状态
- }
- //自动登录
- if (localStorage.getItem('isautologin') == 'true') {
- this.submitForm()
- this.autologin = true //这一步是回显后让勾选框为选中状态
- }
-
- }
-
- errmsg: string = ''; //错误信息
-
-
-
- // //跳转注册页面
- // toRegister() {
- // this.router.navigate(['/register'])
- // }
-
-
- //记住密码
- rememberInfo() {
- // 判断用户是否勾选记住密码,如果勾选,在本地储存中储存登录信息
- if (this.remember) {
- localStorage.setItem("account", Base64.encode(this.validateForm.value.userName))
- localStorage.setItem("password", Base64.encode(this.validateForm.value.password))
- }
- }
- //自动登录
- autoLogin() {
- if (this.autologin) {
- localStorage.setItem("isautologin", 'true')
- }
- }
-
-
-
- remember: any//记住密码
- autologin: any//自动登录
- isLoading = false;
- messages: any
- encryptedAccessToken: any
- submitForm(): void {
-
- if (!this.remember) {
- localStorage.removeItem("account")
- localStorage.removeItem("password")
- }
- if (!this.autologin) {
- localStorage.removeItem("isautologin")
- }
-
-
- for (const i in this.validateForm.controls) {
- this.validateForm.controls[i].markAsDirty();
- this.validateForm.controls[i].updateValueAndValidity();
- }
- if (!this.validateForm.valid) {
- this.message.create('error', `请输入账号密码`);
- return
- }
- this.isLoading = true;
- this.http.post('/api/Accounts/SignIn', {
- username: this.validateForm.value.userName,
- password: this.validateForm.value.password
- }).subscribe({
- next: (data: any) => {
- sessionStorage.setItem("token", data.token);
- sessionStorage.setItem("refreshToken", data.refreshToken);
- this.http.get('/api/Accounts/Profile').subscribe({
- next: (data: any) => {
- console.log('登录用户信息', data)
- this.isLoading = false;
- this.rememberInfo()
- this.autoLogin()
- this.router.navigate(['/system'])
- this.message.create('success', `登录成功`);
- sessionStorage.setItem("userData", JSON.stringify(data));
- },
- error: (err) => {
- this.isLoading = false;
- }
- })
-
- },
- error: (err) => {
- this.isLoading = false;
- }
- })
- }
-
- forget() {
- this.message.create('warning', `请联系管理员`);
- }
-}
+import { Component, OnInit } from '@angular/core';
+import { HttpClient } from '@angular/common/http'
+import { Router } from '@angular/router'
+import { FormBuilder, FormGroup, Validators } from '@angular/forms';
+import { NzMessageService } from 'ng-zorro-antd/message';
+import { Base64 } from 'js-base64';
+@Component({
+ selector: 'app-login',
+ templateUrl: './login.component.html',
+ styleUrls: ['./login.component.scss'],
+
+})
+export class LoginComponent implements OnInit {
+
+ validateForm!: FormGroup;
+ constructor(private http: HttpClient, private router: Router, private fb: FormBuilder, private message: NzMessageService) { }
+
+ ngOnInit() {
+ this.validateForm = this.fb.group({
+ userName: [null, [Validators.required]],
+ password: [null, [Validators.required]],
+ remember: [null],
+ autologin: [null],
+ });
+ //如果本地储存了账号密码信息,那就回显在输入框
+ let account = localStorage.getItem('account')
+ let password = localStorage.getItem('password')
+ if (account && password) {
+ this.validateForm.patchValue({
+ userName: Base64.decode(localStorage.getItem('account')),
+ password: Base64.decode(localStorage.getItem('password'))
+ });
+ this.remember = true //这一步是回显后让勾选框为选中状态
+ }
+ //自动登录
+ if (localStorage.getItem('isautologin') == 'true') {
+ this.submitForm()
+ this.autologin = true //这一步是回显后让勾选框为选中状态
+ }
+
+ }
+
+ errmsg: string = ''; //错误信息
+
+
+
+ // //跳转注册页面
+ // toRegister() {
+ // this.router.navigate(['/register'])
+ // }
+
+
+ //记住密码
+ rememberInfo() {
+ // 判断用户是否勾选记住密码,如果勾选,在本地储存中储存登录信息
+ if (this.remember) {
+ localStorage.setItem("account", Base64.encode(this.validateForm.value.userName))
+ localStorage.setItem("password", Base64.encode(this.validateForm.value.password))
+ }
+ }
+ //自动登录
+ autoLogin() {
+ if (this.autologin) {
+ localStorage.setItem("isautologin", 'true')
+ }
+ }
+
+
+
+ remember: any//记住密码
+ autologin: any//自动登录
+ isLoading = false;
+ messages: any
+ encryptedAccessToken: any
+ submitForm(): void {
+
+ if (!this.remember) {
+ localStorage.removeItem("account")
+ localStorage.removeItem("password")
+ }
+ if (!this.autologin) {
+ localStorage.removeItem("isautologin")
+ }
+
+
+ for (const i in this.validateForm.controls) {
+ this.validateForm.controls[i].markAsDirty();
+ this.validateForm.controls[i].updateValueAndValidity();
+ }
+ if (!this.validateForm.valid) {
+ this.message.create('error', `请输入账号密码`);
+ return
+ }
+ this.isLoading = true;
+ this.http.post('/api/Accounts/SignIn', {
+ username: this.validateForm.value.userName,
+ password: this.validateForm.value.password
+ }).subscribe({
+ next: (data: any) => {
+ sessionStorage.setItem("token", data.token);
+ sessionStorage.setItem("refreshToken", data.refreshToken);
+ this.http.get('/api/Accounts/Profile').subscribe({
+ next: async (data: any) => {
+ console.log('登录用户信息', data)
+ this.isLoading = false;
+ this.rememberInfo()
+ this.autoLogin()
+ this.router.navigate(['/system'])
+ this.message.create('success', `登录成功`);
+ sessionStorage.setItem("userData", JSON.stringify(data));
+ await this.getLevel()
+ },
+ error: (err) => {
+ this.isLoading = false;
+ }
+ })
+
+ },
+ error: (err) => {
+ this.isLoading = false;
+ }
+ })
+ }
+
+ forget() {
+ this.message.create('warning', `请联系管理员`);
+ }
+ getLevel(){
+ const a = JSON.parse(sessionStorage.getItem("userData")).organizationLevel
+ if(a=="brigade"){
+ sessionStorage.setItem('levelRouter',"/task/indicators")
+ }else if(a=="battalion"){
+ sessionStorage.setItem('levelRouter',"/task/monthlytaskoverview")
+ }else{
+ sessionStorage.setItem('levelRouter',"/task/taskexecution")
+ }
+
+ }
+}
diff --git a/src/app/service/cache-token.service.ts b/src/app/service/cache-token.service.ts
index 161e3b6..2ce22d0 100644
--- a/src/app/service/cache-token.service.ts
+++ b/src/app/service/cache-token.service.ts
@@ -1,42 +1,42 @@
-import { Injectable } from '@angular/core';
-import { HttpClient } from '@angular/common/http'
-
-@Injectable({
- providedIn: 'root'
-})
-export class CacheTokenService {
-
- constructor(private http: HttpClient) { }
-
- public timer: number | undefined;
-
- //刷新token令牌定时器
- startUp = (): void => {
- window.clearInterval(this.timer)
- this.timer = window.setInterval(() => {
- var token = sessionStorage.getItem("token");
- var refreshToken = sessionStorage.getItem("refreshToken");
- this.http.post('/api/Accounts/RefreshToken', {
- token: token,
- refreshToken: refreshToken
- }).subscribe((data: any) => {
- console.log('定时刷新token成功', data)
- sessionStorage.setItem("token", data.token);
- sessionStorage.setItem("refreshToken", data.refreshToken);
- })
- }, 60 * 1000)
- console.log('启动定时刷新token')
- }
-
-
-
-
-
- //删除定时器
- delete = (): void => {
- console.log('消除定时刷新token')
- window.clearInterval(this.timer)
- }
-
-
-}
+import { Injectable } from '@angular/core';
+import { HttpClient } from '@angular/common/http'
+
+@Injectable({
+ providedIn: 'root'
+})
+export class CacheTokenService {
+
+ constructor(private http: HttpClient) { }
+
+ public timer: number | undefined;
+
+ //刷新token令牌定时器
+ startUp = (): void => {
+ window.clearInterval(this.timer)
+ this.timer = window.setInterval(() => {
+ var token = sessionStorage.getItem("token");
+ var refreshToken = sessionStorage.getItem("refreshToken");
+ this.http.post('/api/Accounts/RefreshToken', {
+ token: token,
+ refreshToken: refreshToken
+ }).subscribe((data: any) => {
+ console.log('定时刷新token成功', data)
+ sessionStorage.setItem("token", data.token);
+ sessionStorage.setItem("refreshToken", data.refreshToken);
+ })
+ }, 60 * 1000)
+ console.log('启动定时刷新token')
+ }
+
+
+
+
+
+ //删除定时器
+ delete = (): void => {
+ console.log('消除定时刷新token')
+ window.clearInterval(this.timer)
+ }
+
+
+}
diff --git a/src/styles.scss b/src/styles.scss
index dcf0ab3..2710b17 100644
--- a/src/styles.scss
+++ b/src/styles.scss
@@ -1,223 +1,223 @@
-@import "~ng-zorro-antd/ng-zorro-antd.min.css";
-
-@import "~ng-zorro-antd/style/index.min.css";
-/* 引入基本样式 */
-@import "~ng-zorro-antd/button/style/index.min.css";
-/* 引入组件样式 */
-
-@font-face {
- font-family: synormal;
- src: url("./assets/font-family/synormal.OTF");
-}
-
-/* css初始化 */
-html,
-body {
- margin: 0;
- padding: 0;
- width: 100%;
- height: 100%;
- overflow: hidden;
- font-family: synormal !important;
-
-}
-
-body {
- font-family: Roboto, "Helvetica Neue", sans-serif;
-}
-
-ul,
-ol,
-dl,
-li,
-dt,
-dd,
-p,
-form,
-input,
-h1,
-h2,
-h3,
-h4,
-h5,
-h6,
-section,
-article,
-aside,
-header,
-footer,
-nav,
-figure,
-time,
-mark,
-main,
-canvas {
- margin: 0;
- padding: 0;
-}
-
-b,
-strong,
-i,
-em,
-h1,
-h2,
-h3,
-h4,
-h5,
-h6 {
- font-weight: 500;
- font-style: normal;
-}
-
-img {
- border: none;
- outline: none;
-}
-
-a {
- text-decoration: none;
- color: #000;
-}
-
-p {
- color: #000;
-}
-
-ul,
-ol,
-li {
- list-style: none;
- overflow-x: hidden;
-}
-
-textarea {
- resize: none;
-}
-
-/* 滚动条样式 */
-// ::-webkit-scrollbar:horizontal { width: 5px; background-color: white; }
-::-webkit-scrollbar-thumb {
- background: #E4E7EC;
-}
-
-::-webkit-scrollbar {
- width: 5px;
-}
-
-::-webkit-scrollbar-track {
- // background-color: #999;
-}
-
-app-root {
- height: 100%;
-}
-
-.blue {
- cursor: pointer;
- color: #2C4DC0 !important;
-}
-
-.green {
- cursor: pointer;
- color: #42B983 !important;
-}
-
-.red {
- cursor: pointer;
- color: #FF0000 !important;
-}
-
-
-.forbid {
- color: gray;
- pointer-events: none
-}
-
-.forbidbtn {
- background: gray !important;
- pointer-events: none
-}
-
-.box {
- width: 100%;
- height: 100%;
- overflow-y: auto;
-}
-
-
-.ant-tabs-content {
- height: 100%;
-}
-
-.ant-pagination-next,
-.ant-pagination-prev {
- overflow: hidden;
-}
-
-.pagination {
- margin: 15px 0;
- display: flex;
- align-items: center;
- justify-content: center;
-}
-
-.maxHeightTreeSelect {
- max-height: 280px;
-}
-
-// 可展开面板
-.panel {
- width: 100%;
- background: #FFFFFF;
- box-shadow: 0px 3px 8px 1px rgba(0, 0, 0, 0.0800);
- border-radius: 4px 4px 4px 4px;
- opacity: 1;
- border: 1px solid #E4E7EC;
- box-sizing: border-box;
- padding: 16px;
-
- .panelheader {
- height: 46px;
- display: flex;
- align-items: center;
- }
-
-}
-
-.panelheadernameblue {
- background-color: #1D9DFF;
-}
-
-.panelheadernamepurple {
- background-color: #9D80FF;
-}
-
-.panelheadernameblue2 {
- background-color: #5087FF;
-}
-
-.panelheadernamegreen {
- background-color: #42B983;
-}
-
-.panelheadernameor {
- background-color: #FF9203;
-}
-
-.panelheadernameor2 {
- background-color: #FF5D2A;
-}
-
-.panelheadernamered {
- background-color: #FF404D;
-}
-.spin {
- background: rgb(134, 131, 131, 0.2);
- position: absolute;
- width: 100%;
- height: 100%;
- display: flex;
- align-items: center;
- justify-content: center;
+@import "~ng-zorro-antd/ng-zorro-antd.min.css";
+
+@import "~ng-zorro-antd/style/index.min.css";
+/* 引入基本样式 */
+@import "~ng-zorro-antd/button/style/index.min.css";
+/* 引入组件样式 */
+
+@font-face {
+ font-family: synormal;
+ src: url("./assets/font-family/synormal.OTF");
+}
+
+/* css初始化 */
+html,
+body {
+ margin: 0;
+ padding: 0;
+ width: 100%;
+ height: 100%;
+ overflow: hidden;
+ font-family: synormal !important;
+
+}
+
+body {
+ font-family: Roboto, "Helvetica Neue", sans-serif;
+}
+
+ul,
+ol,
+dl,
+li,
+dt,
+dd,
+p,
+form,
+input,
+h1,
+h2,
+h3,
+h4,
+h5,
+h6,
+section,
+article,
+aside,
+header,
+footer,
+nav,
+figure,
+time,
+mark,
+main,
+canvas {
+ margin: 0;
+ padding: 0;
+}
+
+b,
+strong,
+i,
+em,
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
+ font-weight: 500;
+ font-style: normal;
+}
+
+img {
+ border: none;
+ outline: none;
+}
+
+a {
+ text-decoration: none;
+ color: #000;
+}
+
+p {
+ color: #000;
+}
+
+ul,
+ol,
+li {
+ list-style: none;
+ overflow-x: hidden;
+}
+
+textarea {
+ resize: none;
+}
+
+/* 滚动条样式 */
+// ::-webkit-scrollbar:horizontal { width: 5px; background-color: white; }
+::-webkit-scrollbar-thumb {
+ background: #E4E7EC;
+}
+
+::-webkit-scrollbar {
+ width: 5px;
+}
+
+::-webkit-scrollbar-track {
+ // background-color: #999;
+}
+
+app-root {
+ height: 100%;
+}
+
+.blue {
+ cursor: pointer;
+ color: #2C4DC0 !important;
+}
+
+.green {
+ cursor: pointer;
+ color: #42B983 !important;
+}
+
+.red {
+ cursor: pointer;
+ color: #FF0000 !important;
+}
+
+
+.forbid {
+ color: gray;
+ pointer-events: none
+}
+
+.forbidbtn {
+ background: gray !important;
+ pointer-events: none
+}
+
+.box {
+ width: 100%;
+ height: 100%;
+ overflow-y: auto;
+}
+
+
+.ant-tabs-content {
+ height: 100%;
+}
+
+.ant-pagination-next,
+.ant-pagination-prev {
+ overflow: hidden;
+}
+
+.pagination {
+ margin: 15px 0;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
+.maxHeightTreeSelect {
+ max-height: 280px;
+}
+
+// 可展开面板
+.panel {
+ width: 100%;
+ background: #FFFFFF;
+ box-shadow: 0px 3px 8px 1px rgba(0, 0, 0, 0.0800);
+ border-radius: 4px 4px 4px 4px;
+ opacity: 1;
+ border: 1px solid #E4E7EC;
+ box-sizing: border-box;
+ padding: 16px;
+
+ .panelheader {
+ height: 46px;
+ display: flex;
+ align-items: center;
+ }
+
+}
+
+.panelheadernameblue {
+ background-color: #1D9DFF;
+}
+
+.panelheadernamepurple {
+ background-color: #9D80FF;
+}
+
+.panelheadernameblue2 {
+ background-color: #5087FF;
+}
+
+.panelheadernamegreen {
+ background-color: #42B983;
+}
+
+.panelheadernameor {
+ background-color: #FF9203;
+}
+
+.panelheadernameor2 {
+ background-color: #FF5D2A;
+}
+
+.panelheadernamered {
+ background-color: #FF404D;
+}
+.spin {
+ background: rgb(134, 131, 131, 0.2);
+ position: absolute;
+ width: 100%;
+ height: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
}
\ No newline at end of file