diff --git a/src/app/pages/equipment-info/addequipment/addequipment.component.html b/src/app/pages/equipment-info/addequipment/addequipment.component.html
index 39fbbb6..5a1f864 100644
--- a/src/app/pages/equipment-info/addequipment/addequipment.component.html
+++ b/src/app/pages/equipment-info/addequipment/addequipment.component.html
@@ -1 +1,48 @@
-
addequipment works!
+
diff --git a/src/app/pages/equipment-info/addequipment/addequipment.component.scss b/src/app/pages/equipment-info/addequipment/addequipment.component.scss
index e69de29..af2ac6a 100644
--- a/src/app/pages/equipment-info/addequipment/addequipment.component.scss
+++ b/src/app/pages/equipment-info/addequipment/addequipment.component.scss
@@ -0,0 +1,82 @@
+.box {
+ .title {
+ font-family: sybold;
+ width: 100%;
+ height: 48px;
+ background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.57) 50%, rgba(35, 153, 255, 0) 100%);
+ display: flex;
+ align-items: center;
+ position: relative;
+
+ .titlecontent {
+ width: 100%;
+ height: 32px;
+ line-height: 32px;
+ background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.57) 50%, rgba(35, 153, 255, 0) 100%);
+ text-align: center;
+ color: #91CCFF;
+ font-size: 16px;
+ }
+
+ i {
+ position: absolute;
+ right: 12px;
+ color: #fff;
+ font-size: 18px;
+ cursor: pointer;
+ }
+ }
+
+ .form {
+ box-sizing: border-box;
+ padding: 0 17px;
+
+ p {
+ margin-bottom: 0;
+ color: #C4E2FC;
+ margin: 16px 0;
+ }
+
+ nz-form-item {
+ margin-bottom: 0;
+
+ input {
+ color: rgba(145, 204, 255, 0.95) !important;
+ }
+ }
+
+ nz-date-picker {
+ background-color: #143c61;
+ width: 100%;
+ }
+
+ .btnbox {
+ width: 100%;
+ margin-top: 24px;
+ margin-bottom: 17px;
+ display: flex;
+ justify-content: flex-end;
+
+ button {
+ border-radius: 0px;
+ color: #91CCFF;
+ }
+
+ button:nth-child(2) {
+ margin-left: 16px;
+ }
+
+ .ok {
+ background: rgba(0, 129, 255, 0.4);
+ }
+
+ .cancel {
+ border: 1px solid #C4E2FC;
+ background: #0c1e38;
+ color: rgba(99, 102, 105, 0.6);
+ box-shadow: 0 0 3px 0 #fff inset;
+ }
+ }
+ }
+
+}
diff --git a/src/app/pages/equipment-info/addequipment/addequipment.component.ts b/src/app/pages/equipment-info/addequipment/addequipment.component.ts
index d4bf6b1..3a8fafa 100644
--- a/src/app/pages/equipment-info/addequipment/addequipment.component.ts
+++ b/src/app/pages/equipment-info/addequipment/addequipment.component.ts
@@ -1,5 +1,7 @@
-import { Component, OnInit } from '@angular/core';
-
+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-addequipment',
templateUrl: './addequipment.component.html',
@@ -7,9 +9,23 @@ import { Component, OnInit } from '@angular/core';
})
export class AddequipmentComponent implements OnInit {
- constructor() { }
+ validateForm!: FormGroup;
+ constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient) { }
ngOnInit(): void {
+ this.validateForm = this.fb.group({
+ name: [null, [Validators.required]],
+ specification: [null, [Validators.required]],
+ buytime: [null, [Validators.required]],
+ prodtime: [null, [Validators.required]],
+ validitytime: [null, [Validators.required]]
+ });
}
+ destroyModal(){
+ this.modal.destroy();
+ }
+ ok(){
+ this.modal.triggerOk()
+ }
}
diff --git a/src/app/pages/equipment-info/editequipment/editequipment.component.html b/src/app/pages/equipment-info/editequipment/editequipment.component.html
index f5d5238..8e25462 100644
--- a/src/app/pages/equipment-info/editequipment/editequipment.component.html
+++ b/src/app/pages/equipment-info/editequipment/editequipment.component.html
@@ -1 +1,48 @@
-editequipment works!
+
diff --git a/src/app/pages/equipment-info/editequipment/editequipment.component.scss b/src/app/pages/equipment-info/editequipment/editequipment.component.scss
index e69de29..af2ac6a 100644
--- a/src/app/pages/equipment-info/editequipment/editequipment.component.scss
+++ b/src/app/pages/equipment-info/editequipment/editequipment.component.scss
@@ -0,0 +1,82 @@
+.box {
+ .title {
+ font-family: sybold;
+ width: 100%;
+ height: 48px;
+ background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.57) 50%, rgba(35, 153, 255, 0) 100%);
+ display: flex;
+ align-items: center;
+ position: relative;
+
+ .titlecontent {
+ width: 100%;
+ height: 32px;
+ line-height: 32px;
+ background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.57) 50%, rgba(35, 153, 255, 0) 100%);
+ text-align: center;
+ color: #91CCFF;
+ font-size: 16px;
+ }
+
+ i {
+ position: absolute;
+ right: 12px;
+ color: #fff;
+ font-size: 18px;
+ cursor: pointer;
+ }
+ }
+
+ .form {
+ box-sizing: border-box;
+ padding: 0 17px;
+
+ p {
+ margin-bottom: 0;
+ color: #C4E2FC;
+ margin: 16px 0;
+ }
+
+ nz-form-item {
+ margin-bottom: 0;
+
+ input {
+ color: rgba(145, 204, 255, 0.95) !important;
+ }
+ }
+
+ nz-date-picker {
+ background-color: #143c61;
+ width: 100%;
+ }
+
+ .btnbox {
+ width: 100%;
+ margin-top: 24px;
+ margin-bottom: 17px;
+ display: flex;
+ justify-content: flex-end;
+
+ button {
+ border-radius: 0px;
+ color: #91CCFF;
+ }
+
+ button:nth-child(2) {
+ margin-left: 16px;
+ }
+
+ .ok {
+ background: rgba(0, 129, 255, 0.4);
+ }
+
+ .cancel {
+ border: 1px solid #C4E2FC;
+ background: #0c1e38;
+ color: rgba(99, 102, 105, 0.6);
+ box-shadow: 0 0 3px 0 #fff inset;
+ }
+ }
+ }
+
+}
diff --git a/src/app/pages/equipment-info/editequipment/editequipment.component.ts b/src/app/pages/equipment-info/editequipment/editequipment.component.ts
index 6aacf38..f980ed2 100644
--- a/src/app/pages/equipment-info/editequipment/editequipment.component.ts
+++ b/src/app/pages/equipment-info/editequipment/editequipment.component.ts
@@ -1,5 +1,7 @@
-import { Component, OnInit } from '@angular/core';
-
+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-editequipment',
templateUrl: './editequipment.component.html',
@@ -7,9 +9,26 @@ import { Component, OnInit } from '@angular/core';
})
export class EditequipmentComponent implements OnInit {
- constructor() { }
+ @Input() data?: any;
+
+ validateForm!: FormGroup;
+ constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient) { }
ngOnInit(): void {
+ this.validateForm = this.fb.group({
+ name: [null, [Validators.required]],
+ specification: [null, [Validators.required]],
+ buytime: [null, [Validators.required]],
+ prodtime: [null, [Validators.required]],
+ validitytime: [null, [Validators.required]]
+ });
+ }
+
+ destroyModal(){
+ this.modal.destroy({ data: 'this the result data' });
+ }
+ ok(){
+ this.modal.triggerOk()
}
}
diff --git a/src/app/pages/equipment-info/equipment-info.component.html b/src/app/pages/equipment-info/equipment-info.component.html
index d7c1748..4ae0464 100644
--- a/src/app/pages/equipment-info/equipment-info.component.html
+++ b/src/app/pages/equipment-info/equipment-info.component.html
@@ -62,10 +62,10 @@
2021.01.05
-
+
编辑
-
+
删除
@@ -73,9 +73,10 @@
diff --git a/src/app/pages/equipment-info/equipment-info.component.ts b/src/app/pages/equipment-info/equipment-info.component.ts
index 0acf9db..690c819 100644
--- a/src/app/pages/equipment-info/equipment-info.component.ts
+++ b/src/app/pages/equipment-info/equipment-info.component.ts
@@ -1,5 +1,10 @@
-import { Component, OnInit } from '@angular/core';
+import { Component, OnInit, 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 { AddequipmentComponent } from './addequipment/addequipment.component';
+import { HttpClient } from '@angular/common/http';
+import { EditequipmentComponent } from './editequipment/editequipment.component';
@Component({
selector: 'app-equipment-info',
templateUrl: './equipment-info.component.html',
@@ -7,17 +12,150 @@ import { FormBuilder, FormGroup, Validators } from '@angular/forms';
})
export class EquipmentInfoComponent implements OnInit {
validateForm!: FormGroup;
- constructor(private fb: FormBuilder) { }
- arr = [1,1,1,1,1,1,1,1,1]
+ constructor(private fb: FormBuilder, private modal: NzModalService, private viewContainerRef: ViewContainerRef, private message: NzMessageService, private http: HttpClient) { }
+ arr = []
ngOnInit(): void {
this.validateForm = this.fb.group({
search: [null]
});
+ this.getEquipment()
+ console.log(JSON.parse(sessionStorage.getItem('userdata')))
}
- submitForm(){
+
+ //获取装备列表
+ equipmentList: any
+
+ getEquipment() {
+ this.http.get('/api/services/app/FireEquipment/GetAll', {
+ params: {
+ OrganizationId: JSON.parse(sessionStorage.getItem('userdata')).organizationIds[0]
+ }
+ }).subscribe((data: any) => {
+ // console.log(data)
+ this.equipmentList = data.result.items
+ this.equipmentNum = data.result.totalCount
+ })
+ }
+ SkipCount: number = 0 //0 16 32 48
+ MaxResultCount: number = 16
+ equipmentNum: string
+ pageChange($event) {
+ this.SkipCount = ($event - 1) * this.MaxResultCount
+ this.getEquipment()
+ }
+
+
+ submitForm() {
}
- add(){
+ add() {
+ const modal = this.modal.create({
+ // nzTitle: '新增角色',
+ nzContent: AddequipmentComponent,
+ nzViewContainerRef: this.viewContainerRef,
+ nzWidth: 380,
+ nzBodyStyle: {
+ 'border': '1px solid #91CCFF',
+ 'border-radius': '0px',
+ 'padding': '7px',
+ 'box-shadow': '0 0 8px 0 #fff',
+ 'background-image': 'linear-gradient(#003665, #000f25)'
+ },
+ nzComponentParams: {},
+ nzFooter: null,
+ nzClosable: false,
+ nzOnOk: async () => {
+ if (instance.validateForm.valid) {
+ await new Promise(resolve => {
+ let body = {
+ name: instance.validateForm.value.name,
+ specification: instance.validateForm.value.specification,
+ productionDate: instance.validateForm.value.prodtime,
+ purchaseDate: instance.validateForm.value.buytime,
+ validityEndTime: instance.validateForm.value.validitytime,
+ organizationId: JSON.parse(sessionStorage.getItem('userdata')).organizationIds[0]
+ }
+ this.http.post('/api/services/app/FireEquipment/Create', body).subscribe(data => {
+ resolve(data)
+ this.getEquipment()
+ this.message.create('success', '创建成功!');
+ return true
+ })
+ })
+ } else {
+ this.message.create('warning', '请填写完整!');
+ return false
+ }
+ console.log(instance.validateForm.value)
+ return false
+ }
+ });
+ const instance = modal.getContentComponent();
+ }
+ edit(item) {
+ const modal = this.modal.create({
+ // nzTitle: '新增角色',
+ nzContent: EditequipmentComponent,
+ nzViewContainerRef: this.viewContainerRef,
+ nzWidth: 380,
+ nzBodyStyle: {
+ 'border': '1px solid #91CCFF',
+ 'border-radius': '0px',
+ 'padding': '7px',
+ 'box-shadow': '0 0 8px 0 #fff',
+ 'background-image': 'linear-gradient(#003665, #000f25)'
+ },
+ nzComponentParams: {
+ data: item
+ },
+ nzFooter: null,
+ nzClosable: false,
+ nzOnOk: async () => {
+ if (instance.validateForm.valid) {
+ await new Promise(resolve => {
+ let body = {
+ name: instance.validateForm.value.name,
+ specification: instance.validateForm.value.specification,
+ productionDate: instance.validateForm.value.prodtime,
+ purchaseDate: instance.validateForm.value.buytime,
+ validityEndTime: instance.validateForm.value.validitytime,
+ organizationId: JSON.parse(sessionStorage.getItem('userdata')).organizationIds[0]
+ }
+ this.http.post('/api/services/app/FireEquipment/Create', body).subscribe(data => {
+ resolve(data)
+ this.message.create('success', '创建成功!');
+ // return true
+ this.modal.closeAll()
+ })
+ })
+ } else {
+ this.message.create('warning', '请填写完整!');
+ return false
+ }
+ }
+ });
+ const instance = modal.getContentComponent();
+ modal.afterClose.subscribe(result => this.getEquipment());
+ }
+ delete(item) {
+ this.modal.confirm({
+ nzTitle: `确定要删除${item.name}这个器材吗?`,
+ nzOkText: '确定',
+ nzOkType: 'danger',
+ nzOnOk: () => {
+ this.http.delete('', {
+ params: {
+ Id: item.id
+ }
+ }).subscribe(data => {
+ this.message.create('success', '删除成功!');
+
+ })
+ },
+ nzCancelText: '取消',
+ nzOnCancel: () => {
+ }
+ });
}
}
diff --git a/src/app/pages/login/login.component.ts b/src/app/pages/login/login.component.ts
index d05f00f..19abd0d 100644
--- a/src/app/pages/login/login.component.ts
+++ b/src/app/pages/login/login.component.ts
@@ -55,6 +55,9 @@ export class LoginComponent implements OnInit {
sessionStorage.setItem("token", data.result.accessToken);
this.cookieService.set("token", data.result.accessToken, null, '/');
this.cookieService.set("refreshToken", data.result.encryptedAccessToken, null, '/');
+ this.http.get('/api/services/app/Session/GetCurrentLoginInformations').subscribe((data:any) => {
+ sessionStorage.setItem('userdata',JSON.stringify(data.result.user))
+ })
this.router.navigate(['/home/plan'])
//调用服务中的function刷新token
// this.token.startUp()
diff --git a/src/app/pages/oil-station-info/oil-station-info.component.html b/src/app/pages/oil-station-info/oil-station-info.component.html
index 4513a0b..b0437db 100644
--- a/src/app/pages/oil-station-info/oil-station-info.component.html
+++ b/src/app/pages/oil-station-info/oil-station-info.component.html
@@ -1 +1,88 @@
-oil-station-info works!
+
+
+
+
+
+
+
+ 所属组织机构 |
+ |
+ 开业时间 |
+ |
+
+
+ 油站类型 |
+ |
+ 车道数量 |
+ |
+
+
+ 地址 |
+ |
+
+
+
+
+ 辖区派出所 |
+ |
+ 地址 |
+ |
+
+
+ 距离 |
+ |
+ 联系方式 |
+ |
+
+
+
+
+ 辖区医院 |
+ |
+ 地址 |
+ |
+
+
+ 距离 |
+ |
+ 联系方式 |
+ |
+
+
+
+
+ 辖区消防队 |
+ |
+ 地址 |
+ |
+
+
+ 距离 |
+ |
+ 联系方式 |
+ |
+
+
+
+
+ 营业执照 |
+ |
+
+
+ 危险化学品 经营许可证 |
+ |
+
+
+ 成品油零售 经营许可证 |
+ |
+
+
+
+
+
+
+
+
+
diff --git a/src/app/pages/oil-station-info/oil-station-info.component.scss b/src/app/pages/oil-station-info/oil-station-info.component.scss
index e69de29..5be00df 100644
--- a/src/app/pages/oil-station-info/oil-station-info.component.scss
+++ b/src/app/pages/oil-station-info/oil-station-info.component.scss
@@ -0,0 +1,79 @@
+.box {
+ width: 100%;
+ height: 100%;
+ display: flex;
+ justify-content: center;
+}
+
+::-webkit-scrollbar {
+ display: none
+}
+
+.content {
+ width: 1000px;
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+
+
+
+ .title {
+ height: 48px;
+ width: 100%;
+ margin: 16px 0;
+ }
+
+ .tablebox {
+ flex: 1;
+ overflow-y: auto;
+
+
+
+ .table {
+
+ table,
+ table tr th,
+ table tr td {
+ border: 1px solid #91CCFF;
+ }
+
+ table {
+ width: 100%;
+ text-align: center;
+ border-collapse: collapse;
+ margin-bottom: 24px;
+
+ tr {
+ td {
+ height: 40px;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ color: #C4E2FC;
+ box-sizing: border-box;
+ padding: 0 16px;
+ }
+
+ .head {
+ width: 17%;
+ background: #0b3863;
+ color: #23D9FF;
+ text-align: right;
+ }
+
+ .text {
+ width: 33%;
+ }
+ }
+ }
+
+ .imgtable {
+
+ tr,
+ td {
+ height: 98px;
+ }
+ }
+ }
+ }
+}
diff --git a/src/app/pages/pages.module.ts b/src/app/pages/pages.module.ts
index 2780709..470eb6a 100644
--- a/src/app/pages/pages.module.ts
+++ b/src/app/pages/pages.module.ts
@@ -66,6 +66,7 @@ import { EditequipmentComponent } from './equipment-info/editequipment/editequip
NzMessageModule,
NzSpinModule,
NzTreeModule
- ]
+ ],
+ entryComponents :[AddequipmentComponent,EditequipmentComponent]
})
export class PagesModule { }
diff --git a/src/app/pages/today-warning/today-warning.component.html b/src/app/pages/today-warning/today-warning.component.html
index 14ae5cd..33d2c81 100644
--- a/src/app/pages/today-warning/today-warning.component.html
+++ b/src/app/pages/today-warning/today-warning.component.html
@@ -35,7 +35,7 @@
-
+
diff --git a/src/app/system-management/organization/addor/addor.component.html b/src/app/system-management/organization/addor/addor.component.html
index ab9ed73..88a35af 100644
--- a/src/app/system-management/organization/addor/addor.component.html
+++ b/src/app/system-management/organization/addor/addor.component.html
@@ -1,21 +1,18 @@
diff --git a/src/app/system-management/organization/addor/addor.component.ts b/src/app/system-management/organization/addor/addor.component.ts
index 3a5dc13..ea41c3f 100644
--- a/src/app/system-management/organization/addor/addor.component.ts
+++ b/src/app/system-management/organization/addor/addor.component.ts
@@ -1,4 +1,4 @@
-import { Component, OnInit, Input } from '@angular/core';
+import { Component, OnInit } from '@angular/core';
import { NzModalRef } from 'ng-zorro-antd/modal';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { HttpClient } from '@angular/common/http';
@@ -9,14 +9,13 @@ import { HttpClient } from '@angular/common/http';
})
export class AddorComponent implements OnInit {
- @Input() title?: string;
- @Input() subtitle?: string;
validateForm!: FormGroup;
constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient) { }
ngOnInit(): void {
this.validateForm = this.fb.group({
- name: [null, [Validators.required]]
+ name: [null, [Validators.required]],
+ code: [null, [Validators.required]]
});
}
destroyModal(): void {
diff --git a/src/app/system-management/organization/organization.component.ts b/src/app/system-management/organization/organization.component.ts
index 3629aaa..8bfae24 100644
--- a/src/app/system-management/organization/organization.component.ts
+++ b/src/app/system-management/organization/organization.component.ts
@@ -34,7 +34,7 @@ export class OrganizationComponent implements OnInit {
//获取所有组织机构
searchValue = '';
nzExpandAll = false;
- totalCount:string
+ totalCount: string
getAllOrganization() {
this.http.get('/api/services/app/Organization/GetAll').subscribe((data: any) => {
this.totalCount = data.result.totalCount
@@ -88,25 +88,26 @@ export class OrganizationComponent implements OnInit {
}
addOr(node?: any) {
+ console.log(node)
const modal = this.modal.create({
nzTitle: node ? '新增组织机构' : '新增一级组织机构',
nzContent: AddorComponent,
nzViewContainerRef: this.viewContainerRef,
nzWidth: 288,
- nzComponentParams: {
- title: '',
- subtitle: ''
- },
+ nzComponentParams: {},
nzOnOk: async () => {
console.log('hhhhhhh', instance.validateForm)
if (instance.validateForm.valid) {
await new Promise(resolve => {
let body = {
-
+ parentId: node ? Number(node.key) : null,
+ code: instance.validateForm.value.code,
+ displayName: instance.validateForm.value.name,
}
- this.http.post('/api/services/app/User/Create', body).subscribe(data => {
+ this.http.post('/api/services/app/Organization/Create', body).subscribe(data => {
resolve(data)
this.message.create('success', '创建成功!');
+ this.getAllOrganization()
return true
}, err => {
resolve(err)
diff --git a/src/app/system-management/role/role.component.ts b/src/app/system-management/role/role.component.ts
index 41abbde..b4165c6 100644
--- a/src/app/system-management/role/role.component.ts
+++ b/src/app/system-management/role/role.component.ts
@@ -1,7 +1,6 @@
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 { AddroleComponent } from './addrole/addrole.component';
diff --git a/src/app/system-management/user/user.component.html b/src/app/system-management/user/user.component.html
index 22c1157..9077a79 100644
--- a/src/app/system-management/user/user.component.html
+++ b/src/app/system-management/user/user.component.html
@@ -37,7 +37,7 @@
{{ data.userName }} |
{{ data.name }} |
- {{item}}
+ {{item}}
|
@@ -55,7 +55,7 @@
|