From f9b2e292822147f969dc22acbed3b488f98ea693 Mon Sep 17 00:00:00 2001
From: SHAOJIAHAO <55341701@qq.com>
Date: Wed, 9 Nov 2022 14:31:48 +0800
Subject: [PATCH] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]=E7=94=A8=E6=88=B7=E7=A6=81?=
=?UTF-8?q?=E7=94=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../system-management/user/user.component.html | 17 +++++++++++++----
.../system-management/user/user.component.ts | 14 +++++++++++++-
.../station-task-execution.component.ts | 3 ---
.../station-weekly-plan.component.ts | 4 ++--
src/app/pages/login/login.component.ts | 2 +-
src/styles.scss | 4 ++++
6 files changed, 33 insertions(+), 11 deletions(-)
diff --git a/src/app/home/system-management/user/user.component.html b/src/app/home/system-management/user/user.component.html
index 801836d..f45db77 100644
--- a/src/app/home/system-management/user/user.component.html
+++ b/src/app/home/system-management/user/user.component.html
@@ -39,7 +39,8 @@
角色 |
职位 |
创建时间 |
- 操作 |
+ 状态 |
+ 操作 |
@@ -66,11 +67,19 @@
{{item.creationTime | date:"yyyy-MM-dd"}}
|
+
+
+ 已启用
+
+
+ 已禁用
+
+ |
- 编辑
+ 编辑
重置密码
-
+ 启用
+ 禁用
删除
|
diff --git a/src/app/home/system-management/user/user.component.ts b/src/app/home/system-management/user/user.component.ts
index c0b5ab3..7e0e087 100644
--- a/src/app/home/system-management/user/user.component.ts
+++ b/src/app/home/system-management/user/user.component.ts
@@ -247,7 +247,19 @@ export class UserComponent implements OnInit {
}
//禁用
cancel(item, type) {
-
+ this.isLoading = true
+ let body = {
+ enabled: type
+ }
+ this.http.patch(`/api/Users/${item.id}`, body).subscribe({
+ next: (data) => {
+ this.isLoading = false
+ item.enabled = type
+ },
+ error: (err) => {
+ this.isLoading = false
+ }
+ })
}
delete(item) {
this.modal.confirm({
diff --git a/src/app/home/task/station-task-execution/station-task-execution.component.ts b/src/app/home/task/station-task-execution/station-task-execution.component.ts
index ba571f2..7e55637 100644
--- a/src/app/home/task/station-task-execution/station-task-execution.component.ts
+++ b/src/app/home/task/station-task-execution/station-task-execution.component.ts
@@ -322,7 +322,6 @@ export class StationTaskExecutionComponent implements OnInit {
}
-
look(item) {
console.log(item)
if (item.approvalStatus == '待检查') {
@@ -372,8 +371,6 @@ export class StationTaskExecutionComponent implements OnInit {
modal.afterClose.subscribe(result => console.log('[afterClose] The result is:', result));
}
-
-
ischat = false
taskId
openchat(item) {
diff --git a/src/app/home/task/station-weekly-plan/station-weekly-plan.component.ts b/src/app/home/task/station-weekly-plan/station-weekly-plan.component.ts
index eed8dce..e2521a9 100644
--- a/src/app/home/task/station-weekly-plan/station-weekly-plan.component.ts
+++ b/src/app/home/task/station-weekly-plan/station-weekly-plan.component.ts
@@ -189,13 +189,13 @@ export class StationWeeklyPlanComponent implements OnInit {
let isShow = true
if (element.creationType == '申领任务') {
if (this.isSupervisor) {//检查员
- if ((element.taskType == '熟悉演练') ||
+ if (element.taskType == '熟悉演练' ||
(element.taskType == '联络指导' && element.approvalStatus == '待处理' && element.relatedTaskId == null)
) {
isShow = false
}
} else {//消防站
- if ((element.taskType == '联络指导') ||
+ if (element.taskType == '联络指导' ||
(element.taskType == '熟悉演练' && element.approvalStatus == '待处理' && element.relatedTaskId == null) ||
(element.taskType == '双随机' && element.relatedTaskId == null)) {
isShow = false
diff --git a/src/app/pages/login/login.component.ts b/src/app/pages/login/login.component.ts
index 857684c..0c68fae 100644
--- a/src/app/pages/login/login.component.ts
+++ b/src/app/pages/login/login.component.ts
@@ -20,7 +20,7 @@ export class LoginComponent implements OnInit {
userName: [null, [Validators.required]],
password: [null, [Validators.required]],
remember: [null],
- autologin: [null],
+ autologin: [null]
});
//如果本地储存了账号密码信息,那就回显在输入框
let account = localStorage.getItem('account')
diff --git a/src/styles.scss b/src/styles.scss
index e67a4f8..ae29e79 100644
--- a/src/styles.scss
+++ b/src/styles.scss
@@ -128,6 +128,10 @@ app-root {
color: #FF0000 !important;
}
+.orange{
+ color: orange !important;
+}
+
.forbid {
color: gray !important;