From 31daff2ea5af70654be628de1607e223233e2557 Mon Sep 17 00:00:00 2001
From: SHAOJIAHAO <55341701@qq.com>
Date: Fri, 6 May 2022 11:34:42 +0800
Subject: [PATCH] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]=E6=96=B0=E5=A2=9E=E6=A1=A3?=
=?UTF-8?q?=E6=A1=88=E7=B1=BB=E8=AF=81=E7=85=A7=E7=AE=A1=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../analysis-of-the-host.component.html | 4 +-
.../add-file-of-license.component.html | 11 ++
.../add-file-of-license.component.scss | 0
.../add-file-of-license.component.ts | 24 ++++
.../edit-file-of-license.component.html | 11 ++
.../edit-file-of-license.component.scss | 0
.../edit-file-of-license.component.ts | 24 ++++
.../file-of-license.component.html | 30 ++++
.../file-of-license.component.scss | 57 ++++++++
.../file-of-license.component.ts | 132 ++++++++++++++++++
.../navigation/navigation.component.html | 2 +
.../role/role.component.html | 2 +-
.../system-management-routing.module.ts | 6 +-
.../system-management.module.ts | 12 +-
.../add-update-of-license.component.html | 1 +
.../add-update-of-license.component.scss | 0
.../add-update-of-license.component.ts | 15 ++
.../edit-update-of-license.component.html | 1 +
.../edit-update-of-license.component.scss | 0
.../edit-update-of-license.component.ts | 15 ++
.../update-of-license.component.html | 1 +
.../update-of-license.component.scss | 0
.../update-of-license.component.ts | 15 ++
src/assets/images/icon/license.png | Bin 0 -> 252 bytes
src/theme.less | 3 +-
25 files changed, 358 insertions(+), 8 deletions(-)
create mode 100644 src/app/system-management/file-of-license/add-file-of-license/add-file-of-license.component.html
create mode 100644 src/app/system-management/file-of-license/add-file-of-license/add-file-of-license.component.scss
create mode 100644 src/app/system-management/file-of-license/add-file-of-license/add-file-of-license.component.ts
create mode 100644 src/app/system-management/file-of-license/edit-file-of-license/edit-file-of-license.component.html
create mode 100644 src/app/system-management/file-of-license/edit-file-of-license/edit-file-of-license.component.scss
create mode 100644 src/app/system-management/file-of-license/edit-file-of-license/edit-file-of-license.component.ts
create mode 100644 src/app/system-management/file-of-license/file-of-license.component.html
create mode 100644 src/app/system-management/file-of-license/file-of-license.component.scss
create mode 100644 src/app/system-management/file-of-license/file-of-license.component.ts
create mode 100644 src/app/system-management/update-of-license/add-update-of-license/add-update-of-license.component.html
create mode 100644 src/app/system-management/update-of-license/add-update-of-license/add-update-of-license.component.scss
create mode 100644 src/app/system-management/update-of-license/add-update-of-license/add-update-of-license.component.ts
create mode 100644 src/app/system-management/update-of-license/edit-update-of-license/edit-update-of-license.component.html
create mode 100644 src/app/system-management/update-of-license/edit-update-of-license/edit-update-of-license.component.scss
create mode 100644 src/app/system-management/update-of-license/edit-update-of-license/edit-update-of-license.component.ts
create mode 100644 src/app/system-management/update-of-license/update-of-license.component.html
create mode 100644 src/app/system-management/update-of-license/update-of-license.component.scss
create mode 100644 src/app/system-management/update-of-license/update-of-license.component.ts
create mode 100644 src/assets/images/icon/license.png
diff --git a/src/app/system-management/analysis-of-the-host/analysis-of-the-host.component.html b/src/app/system-management/analysis-of-the-host/analysis-of-the-host.component.html
index 6f0708f..ca8b9dc 100644
--- a/src/app/system-management/analysis-of-the-host/analysis-of-the-host.component.html
+++ b/src/app/system-management/analysis-of-the-host/analysis-of-the-host.component.html
@@ -48,7 +48,7 @@
-
+
ip |
@@ -77,7 +77,7 @@
-
+
名称 |
diff --git a/src/app/system-management/file-of-license/add-file-of-license/add-file-of-license.component.html b/src/app/system-management/file-of-license/add-file-of-license/add-file-of-license.component.html
new file mode 100644
index 0000000..8f6d510
--- /dev/null
+++ b/src/app/system-management/file-of-license/add-file-of-license/add-file-of-license.component.html
@@ -0,0 +1,11 @@
+
+
+
\ No newline at end of file
diff --git a/src/app/system-management/file-of-license/add-file-of-license/add-file-of-license.component.scss b/src/app/system-management/file-of-license/add-file-of-license/add-file-of-license.component.scss
new file mode 100644
index 0000000..e69de29
diff --git a/src/app/system-management/file-of-license/add-file-of-license/add-file-of-license.component.ts b/src/app/system-management/file-of-license/add-file-of-license/add-file-of-license.component.ts
new file mode 100644
index 0000000..e08d323
--- /dev/null
+++ b/src/app/system-management/file-of-license/add-file-of-license/add-file-of-license.component.ts
@@ -0,0 +1,24 @@
+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';
+
+@Component({
+ selector: 'app-add-file-of-license',
+ templateUrl: './add-file-of-license.component.html',
+ styleUrls: ['./add-file-of-license.component.scss']
+})
+export class AddFileOfLicenseComponent implements OnInit {
+
+ validateForm!: FormGroup;
+ constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient) { }
+
+ ngOnInit(): void {
+ this.validateForm = this.fb.group({
+ name: [null, [Validators.required]]
+ });
+ }
+ destroyModal(): void {
+ this.modal.destroy({ data: 'this the result data' });
+ }
+}
diff --git a/src/app/system-management/file-of-license/edit-file-of-license/edit-file-of-license.component.html b/src/app/system-management/file-of-license/edit-file-of-license/edit-file-of-license.component.html
new file mode 100644
index 0000000..8f6d510
--- /dev/null
+++ b/src/app/system-management/file-of-license/edit-file-of-license/edit-file-of-license.component.html
@@ -0,0 +1,11 @@
+
+
+
\ No newline at end of file
diff --git a/src/app/system-management/file-of-license/edit-file-of-license/edit-file-of-license.component.scss b/src/app/system-management/file-of-license/edit-file-of-license/edit-file-of-license.component.scss
new file mode 100644
index 0000000..e69de29
diff --git a/src/app/system-management/file-of-license/edit-file-of-license/edit-file-of-license.component.ts b/src/app/system-management/file-of-license/edit-file-of-license/edit-file-of-license.component.ts
new file mode 100644
index 0000000..c99154e
--- /dev/null
+++ b/src/app/system-management/file-of-license/edit-file-of-license/edit-file-of-license.component.ts
@@ -0,0 +1,24 @@
+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';
+
+@Component({
+ selector: 'app-edit-file-of-license',
+ templateUrl: './edit-file-of-license.component.html',
+ styleUrls: ['./edit-file-of-license.component.scss']
+})
+export class EditFileOfLicenseComponent implements OnInit {
+ @Input() data?: any;
+ validateForm!: FormGroup;
+ constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient) { }
+
+ ngOnInit(): void {
+ this.validateForm = this.fb.group({
+ name: [this.data.licenseName, [Validators.required]]
+ });
+ }
+ destroyModal(): void {
+ this.modal.destroy({ data: 'this the result data' });
+ }
+}
diff --git a/src/app/system-management/file-of-license/file-of-license.component.html b/src/app/system-management/file-of-license/file-of-license.component.html
new file mode 100644
index 0000000..34d528c
--- /dev/null
+++ b/src/app/system-management/file-of-license/file-of-license.component.html
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+ 档案类证件 |
+ 操作 |
+
+
+
+
+ {{data.licenseName}} |
+
+ 编辑
+ 删除
+ |
+
+
+
+
+
\ No newline at end of file
diff --git a/src/app/system-management/file-of-license/file-of-license.component.scss b/src/app/system-management/file-of-license/file-of-license.component.scss
new file mode 100644
index 0000000..2c00b6f
--- /dev/null
+++ b/src/app/system-management/file-of-license/file-of-license.component.scss
@@ -0,0 +1,57 @@
+.licenseBox {
+ width: 100%;
+ height: 100%;
+ background: #FFFFFF;
+ box-sizing: border-box;
+ padding: 20px;
+ overflow: hidden;
+ display: flex;
+ flex-direction: column;
+
+ tbody {
+ tr {
+ td {
+ span {
+ margin-right: 18px;
+ }
+ }
+
+ td:nth-child(1) {
+ padding-left: 40px;
+ }
+ }
+
+ .operation {
+ a {
+ color: #2399FF;
+ margin-right: 8px;
+ }
+
+ a:last-child {
+ color: rgba(0, 13, 33, 0.48);
+ }
+ }
+
+ }
+}
+
+.topbox {
+ width: 100%;
+ height: 36px;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ margin-bottom: 12px;
+
+ .lefttop {
+ span {
+ color: #000D21;
+ }
+ }
+}
+
+.tablebox {
+ flex: 1;
+ overflow-y: auto;
+
+}
diff --git a/src/app/system-management/file-of-license/file-of-license.component.ts b/src/app/system-management/file-of-license/file-of-license.component.ts
new file mode 100644
index 0000000..34f18ef
--- /dev/null
+++ b/src/app/system-management/file-of-license/file-of-license.component.ts
@@ -0,0 +1,132 @@
+import { Component, OnInit, TemplateRef, ViewContainerRef } from '@angular/core';
+import { FormBuilder, FormGroup, Validators } from '@angular/forms';
+import { NzModalService } from 'ng-zorro-antd/modal';
+import { NzMessageService } from 'ng-zorro-antd/message';
+import { HttpClient } from '@angular/common/http';
+import { AddFileOfLicenseComponent } from './add-file-of-license/add-file-of-license.component';
+import { EditFileOfLicenseComponent } from './edit-file-of-license/edit-file-of-license.component';
+
+@Component({
+ selector: 'app-file-of-license',
+ templateUrl: './file-of-license.component.html',
+ styleUrls: ['./file-of-license.component.scss']
+})
+export class FileOfLicenseComponent implements OnInit {
+
+ constructor(private modal: NzModalService, private viewContainerRef: ViewContainerRef, private message: NzMessageService, private http: HttpClient) { }
+
+ ngOnInit(): void {
+ this.getLicense()
+ }
+
+ listOfData: any[] = [];
+
+ //获取证照列表
+
+ getLicense() {
+ let params = {
+ SkipCount: '0',
+ MaxResultCount: '999'
+ }
+ this.http.get('/api/services/app/FileLicenseType/GetAll', {
+ params: params
+ }).subscribe((data: any) => {
+ console.log('证照列表', data.result.items)
+ this.listOfData = data.result.items
+ })
+ }
+
+ addRole(): void {
+ const modal = this.modal.create({
+ nzTitle: '新增证照',
+ nzContent: AddFileOfLicenseComponent,
+ nzViewContainerRef: this.viewContainerRef,
+ nzWidth: 288,
+ nzComponentParams: {},
+ nzOnOk: async () => {
+ if (instance.validateForm.valid) {
+ await new Promise(resolve => {
+ console.log('表单信息', instance.validateForm)
+ let body = {
+ licenseName: instance.validateForm.value.name,
+ }
+ this.http.post('/api/services/app/FileLicenseType/Create', body).subscribe(data => {
+ resolve(data)
+ this.message.create('success', '创建成功!');
+ this.getLicense()
+ return true
+ })
+ })
+ } else {
+ this.message.create('warning', '请填写完整!');
+ return false
+ }
+ }
+ });
+ const instance = modal.getContentComponent();
+ modal.afterOpen.subscribe(() => console.log('[afterOpen] emitted!'));
+ // Return a result when closed
+ modal.afterClose.subscribe(result => console.log('[afterClose] The result is:', result));
+ }
+
+
+ edit(item) {
+ const modal = this.modal.create({
+ nzTitle: '编辑证照',
+ nzContent: EditFileOfLicenseComponent,
+ nzViewContainerRef: this.viewContainerRef,
+ nzWidth: 325,
+ nzComponentParams: {
+ data: item
+ },
+ nzOnOk: async () => {
+ if (instance.validateForm.valid) {
+ await new Promise(resolve => {
+ console.log('表单信息', instance.validateForm)
+ let body = {
+ id: item.id,
+ licenseName: instance.validateForm.value.name
+ }
+ this.http.put('/api/services/app/FileLicenseType/Update', body).subscribe(data => {
+ resolve(data)
+ this.message.create('success', '修改成功!');
+ this.getLicense()
+ return true
+ })
+ })
+ } else {
+ this.message.create('warning', '请填写完整!');
+ return false
+ }
+ }
+ });
+ const instance = modal.getContentComponent();
+ modal.afterOpen.subscribe(() => console.log('[afterOpen] emitted!'));
+ // Return a result when closed
+ modal.afterClose.subscribe(result => console.log('[afterClose] The result is:', result));
+ }
+
+ delete(item) {
+ console.log(item)
+ this.modal.confirm({
+ nzTitle: `确定要删除${item.licenseName}这个证照吗?`,
+ nzOkText: '确定',
+ nzOkType: 'danger',
+ nzOnOk: () => {
+ this.http.delete('/api/services/app/FileLicenseType/Delete', {
+ params: {
+ Id: item.id
+ }
+ }).subscribe(data => {
+ this.message.create('success', '删除成功!');
+ this.getLicense()
+ })
+ },
+ nzCancelText: '取消',
+ nzOnCancel: () => {
+
+ }
+ });
+ }
+
+}
diff --git a/src/app/system-management/navigation/navigation.component.html b/src/app/system-management/navigation/navigation.component.html
index d7010d6..b2ac420 100644
--- a/src/app/system-management/navigation/navigation.component.html
+++ b/src/app/system-management/navigation/navigation.component.html
@@ -18,6 +18,8 @@
角色管理
分析主机管理
推送管理
+
更新类证照管理
+
档案类证照管理
diff --git a/src/app/system-management/role/role.component.html b/src/app/system-management/role/role.component.html
index a3db2a4..b91e611 100644
--- a/src/app/system-management/role/role.component.html
+++ b/src/app/system-management/role/role.component.html
@@ -9,7 +9,7 @@
-
+
角色 |
diff --git a/src/app/system-management/system-management-routing.module.ts b/src/app/system-management/system-management-routing.module.ts
index c21a207..a8990e2 100644
--- a/src/app/system-management/system-management-routing.module.ts
+++ b/src/app/system-management/system-management-routing.module.ts
@@ -7,13 +7,17 @@ import { OrganizationComponent } from './organization/organization.component';
import { UserComponent } from './user/user.component';
import { AnalysisOfTheHostComponent } from './analysis-of-the-host/analysis-of-the-host.component';
import { PushComponent } from './push/push.component';
+import { UpdateOfLicenseComponent } from './update-of-license/update-of-license.component';
+import { FileOfLicenseComponent } from './file-of-license/file-of-license.component';
const routes: Routes = [
{ path: 'organization', component: OrganizationComponent },
{ path: 'user', component: UserComponent },
{ path: 'role', component: RoleComponent },
{ path: 'host', component: AnalysisOfTheHostComponent },
- { path: 'push', component: PushComponent }
+ { path: 'push', component: PushComponent },
+ { path: 'fileOfLicense', component: FileOfLicenseComponent },
+ { path: 'updateOfLicense', component: UpdateOfLicenseComponent }
];
@NgModule({
diff --git a/src/app/system-management/system-management.module.ts b/src/app/system-management/system-management.module.ts
index f5d4321..b4231bb 100644
--- a/src/app/system-management/system-management.module.ts
+++ b/src/app/system-management/system-management.module.ts
@@ -34,8 +34,14 @@ import { AddcameraComponent } from './analysis-of-the-host/addcamera/addcamera.c
import { EditcameraComponent } from './analysis-of-the-host/editcamera/editcamera.component';
import { PushComponent } from './push/push.component';
import { EditPushItemComponent } from './push/edit-push-item/edit-push-item.component';
+import { FileOfLicenseComponent } from './file-of-license/file-of-license.component';
+import { UpdateOfLicenseComponent } from './update-of-license/update-of-license.component';
+import { AddFileOfLicenseComponent } from './file-of-license/add-file-of-license/add-file-of-license.component';
+import { EditFileOfLicenseComponent } from './file-of-license/edit-file-of-license/edit-file-of-license.component';
+import { AddUpdateOfLicenseComponent } from './update-of-license/add-update-of-license/add-update-of-license.component';
+import { EditUpdateOfLicenseComponent } from './update-of-license/edit-update-of-license/edit-update-of-license.component';
@NgModule({
- declarations: [OrganizationComponent, UserComponent, RoleComponent, NavigationComponent, AdduserComponent, EdituserComponent, AddroleComponent, EditroleComponent, AddorComponent, EditorComponent, AnalysisOfTheHostComponent, AddhostComponent, EdithostComponent, AddcameraComponent, EditcameraComponent, PushComponent, EditPushItemComponent],
+ declarations: [OrganizationComponent, UserComponent, RoleComponent, NavigationComponent, AdduserComponent, EdituserComponent, AddroleComponent, EditroleComponent, AddorComponent, EditorComponent, AnalysisOfTheHostComponent, AddhostComponent, EdithostComponent, AddcameraComponent, EditcameraComponent, PushComponent, EditPushItemComponent, FileOfLicenseComponent, UpdateOfLicenseComponent, AddFileOfLicenseComponent, EditFileOfLicenseComponent, AddUpdateOfLicenseComponent, EditUpdateOfLicenseComponent],
imports: [
CommonModule,
SystemRoutingModule,
@@ -57,7 +63,7 @@ import { EditPushItemComponent } from './push/edit-push-item/edit-push-item.comp
NzTreeSelectModule,
NzCheckboxModule
],
- entryComponents :[AdduserComponent,EdituserComponent,AddroleComponent,EditroleComponent,AddorComponent,EditorComponent,AddhostComponent,EdithostComponent,AddcameraComponent,EditcameraComponent,EditPushItemComponent]
-
+ entryComponents: [AdduserComponent, EdituserComponent, AddroleComponent, EditroleComponent, AddorComponent, EditorComponent, AddhostComponent, EdithostComponent, AddcameraComponent, EditcameraComponent, EditPushItemComponent, AddFileOfLicenseComponent, EditFileOfLicenseComponent, AddUpdateOfLicenseComponent, EditUpdateOfLicenseComponent]
+
})
export class SystemManagementModule { }
diff --git a/src/app/system-management/update-of-license/add-update-of-license/add-update-of-license.component.html b/src/app/system-management/update-of-license/add-update-of-license/add-update-of-license.component.html
new file mode 100644
index 0000000..5ff984d
--- /dev/null
+++ b/src/app/system-management/update-of-license/add-update-of-license/add-update-of-license.component.html
@@ -0,0 +1 @@
+add-update-of-license works!
diff --git a/src/app/system-management/update-of-license/add-update-of-license/add-update-of-license.component.scss b/src/app/system-management/update-of-license/add-update-of-license/add-update-of-license.component.scss
new file mode 100644
index 0000000..e69de29
diff --git a/src/app/system-management/update-of-license/add-update-of-license/add-update-of-license.component.ts b/src/app/system-management/update-of-license/add-update-of-license/add-update-of-license.component.ts
new file mode 100644
index 0000000..e8db50d
--- /dev/null
+++ b/src/app/system-management/update-of-license/add-update-of-license/add-update-of-license.component.ts
@@ -0,0 +1,15 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+ selector: 'app-add-update-of-license',
+ templateUrl: './add-update-of-license.component.html',
+ styleUrls: ['./add-update-of-license.component.scss']
+})
+export class AddUpdateOfLicenseComponent implements OnInit {
+
+ constructor() { }
+
+ ngOnInit(): void {
+ }
+
+}
diff --git a/src/app/system-management/update-of-license/edit-update-of-license/edit-update-of-license.component.html b/src/app/system-management/update-of-license/edit-update-of-license/edit-update-of-license.component.html
new file mode 100644
index 0000000..eff1106
--- /dev/null
+++ b/src/app/system-management/update-of-license/edit-update-of-license/edit-update-of-license.component.html
@@ -0,0 +1 @@
+edit-update-of-license works!
diff --git a/src/app/system-management/update-of-license/edit-update-of-license/edit-update-of-license.component.scss b/src/app/system-management/update-of-license/edit-update-of-license/edit-update-of-license.component.scss
new file mode 100644
index 0000000..e69de29
diff --git a/src/app/system-management/update-of-license/edit-update-of-license/edit-update-of-license.component.ts b/src/app/system-management/update-of-license/edit-update-of-license/edit-update-of-license.component.ts
new file mode 100644
index 0000000..054d4a8
--- /dev/null
+++ b/src/app/system-management/update-of-license/edit-update-of-license/edit-update-of-license.component.ts
@@ -0,0 +1,15 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+ selector: 'app-edit-update-of-license',
+ templateUrl: './edit-update-of-license.component.html',
+ styleUrls: ['./edit-update-of-license.component.scss']
+})
+export class EditUpdateOfLicenseComponent implements OnInit {
+
+ constructor() { }
+
+ ngOnInit(): void {
+ }
+
+}
diff --git a/src/app/system-management/update-of-license/update-of-license.component.html b/src/app/system-management/update-of-license/update-of-license.component.html
new file mode 100644
index 0000000..879cd76
--- /dev/null
+++ b/src/app/system-management/update-of-license/update-of-license.component.html
@@ -0,0 +1 @@
+update-of-license works!
diff --git a/src/app/system-management/update-of-license/update-of-license.component.scss b/src/app/system-management/update-of-license/update-of-license.component.scss
new file mode 100644
index 0000000..e69de29
diff --git a/src/app/system-management/update-of-license/update-of-license.component.ts b/src/app/system-management/update-of-license/update-of-license.component.ts
new file mode 100644
index 0000000..3ce9e84
--- /dev/null
+++ b/src/app/system-management/update-of-license/update-of-license.component.ts
@@ -0,0 +1,15 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+ selector: 'app-update-of-license',
+ templateUrl: './update-of-license.component.html',
+ styleUrls: ['./update-of-license.component.scss']
+})
+export class UpdateOfLicenseComponent implements OnInit {
+
+ constructor() { }
+
+ ngOnInit(): void {
+ }
+
+}
diff --git a/src/assets/images/icon/license.png b/src/assets/images/icon/license.png
new file mode 100644
index 0000000000000000000000000000000000000000..4c3d396f1cf40e1e445fb34d8e757c398007fb78
GIT binary patch
literal 252
zcmVjrK>p-@ODbx;1y66D|A@ULlS=9@QflEL;w
z(n?ZSX>pY_!}di|N75;cr=Fx+09sNGj8lNNHWKm?d@g#zN7;%
zNC7_AFYQPM?!vW7MfpRa?NOCVU|YBHXJ4VPR2yXi;TF-OtRo#~U~W5>E6Ras6xd{Z
zUA{`;;uk2e{Kmt^8Fe0Jjopy~Apfg}tv`oW-`5>6@WF8~wuX}c0000tr>th {
background: rgba(145, 204, 255, 0.15);
}