From d9747f91950b6f9672566dec13087142719d15fd Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Mon, 6 Dec 2021 12:35:34 +0800 Subject: [PATCH 1/4] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=8F=90=E7=A4=BA=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/pages/login/login.component.ts | 11 ++++------- src/app/system-management/user/user.component.ts | 4 ++-- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/app/pages/login/login.component.ts b/src/app/pages/login/login.component.ts index 7bbb432..a59692f 100644 --- a/src/app/pages/login/login.component.ts +++ b/src/app/pages/login/login.component.ts @@ -106,7 +106,7 @@ 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, '/'); - sessionStorage.setItem("encryptedAccessToken",data.result.encryptedAccessToken); + sessionStorage.setItem("encryptedAccessToken", data.result.encryptedAccessToken); console.log('token', data) this.http.get('/api/services/app/Session/GetCurrentLoginInformations').subscribe((data: any) => { sessionStorage.setItem('userdata', JSON.stringify(data.result.user)) @@ -119,21 +119,18 @@ export class LoginComponent implements OnInit { if (data.result.user.userName == 'admin') { sessionStorage.setItem("isGasStation", 'false'); this.router.navigate(['/system/organization']) + this.message.create('success', `登陆成功`); } else { if (data.result.user.organization.isGasStation) { sessionStorage.setItem("isGasStation", 'true'); this.router.navigate(['/warning/petrolStation']) + this.message.create('success', `登陆成功`); } else { sessionStorage.setItem("isGasStation", 'false'); this.router.navigate(['/homepage']) + this.message.create('success', `登陆成功`); } } - this.message.create('success', `登陆成功`); - - - let _this = this; - - }, err => { this.isLoading = false; }) diff --git a/src/app/system-management/user/user.component.ts b/src/app/system-management/user/user.component.ts index 18ac3df..0460206 100644 --- a/src/app/system-management/user/user.component.ts +++ b/src/app/system-management/user/user.component.ts @@ -132,12 +132,12 @@ export class UserComponent implements OnInit { } this.http.put('/api/services/app/User/Update', body).subscribe(data => { resolve(data) - this.message.create('success', '创建成功!'); + this.message.create('success', '编辑成功!'); this.getAllUsers() return true }, err => { resolve(err) - this.message.create('warning', '创建失败'); + this.message.create('warning', '编辑失败'); return false }) }) From 79e429ee8d0a9bf75407fe4ae798322b32bbcd48 Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Mon, 6 Dec 2021 13:20:41 +0800 Subject: [PATCH 2/4] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E6=A1=86=E6=89=93=E5=BC=80=E6=97=B6loading=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../role/editrole/editrole.component.ts | 3 +- .../system-management/role/role.component.ts | 3 +- .../user/adduser/adduser.component.html | 2 +- .../user/edituser/edituser.component.html | 2 +- .../user/edituser/edituser.component.ts | 42 ++++++++++--------- .../system-management/user/user.component.ts | 4 +- 6 files changed, 31 insertions(+), 25 deletions(-) diff --git a/src/app/system-management/role/editrole/editrole.component.ts b/src/app/system-management/role/editrole/editrole.component.ts index 2dae734..474dc53 100644 --- a/src/app/system-management/role/editrole/editrole.component.ts +++ b/src/app/system-management/role/editrole/editrole.component.ts @@ -31,7 +31,8 @@ export class EditroleComponent implements OnInit { loadMore() { this.http.get('/api/services/app/Role/GetAllPermissions').subscribe((data:any) => { this.optionList = data.result.items - console.log('所有权限',data) + this.modal.containerInstance.config.nzOkLoading = false + // console.log('所有权限',data) }) } diff --git a/src/app/system-management/role/role.component.ts b/src/app/system-management/role/role.component.ts index b4165c6..35a6e10 100644 --- a/src/app/system-management/role/role.component.ts +++ b/src/app/system-management/role/role.component.ts @@ -75,7 +75,8 @@ export class RoleComponent implements OnInit { nzTitle: '编辑角色', nzContent: EditroleComponent, nzViewContainerRef: this.viewContainerRef, - nzWidth: 288, + nzWidth: 325, + nzOkLoading: true, nzComponentParams: { data: item }, diff --git a/src/app/system-management/user/adduser/adduser.component.html b/src/app/system-management/user/adduser/adduser.component.html index 954b570..f5a8682 100644 --- a/src/app/system-management/user/adduser/adduser.component.html +++ b/src/app/system-management/user/adduser/adduser.component.html @@ -24,7 +24,7 @@ - + diff --git a/src/app/system-management/user/edituser/edituser.component.html b/src/app/system-management/user/edituser/edituser.component.html index f7084b7..3470db9 100644 --- a/src/app/system-management/user/edituser/edituser.component.html +++ b/src/app/system-management/user/edituser/edituser.component.html @@ -24,7 +24,7 @@ - + diff --git a/src/app/system-management/user/edituser/edituser.component.ts b/src/app/system-management/user/edituser/edituser.component.ts index c20d1c4..02a736c 100644 --- a/src/app/system-management/user/edituser/edituser.component.ts +++ b/src/app/system-management/user/edituser/edituser.component.ts @@ -23,11 +23,9 @@ export class EdituserComponent implements OnInit { role: [null, [Validators.required]], phonenum: [null, [Validators.required]] }); - - - console.log(this.data) - this.getAllRoles() - this.getAllOrganization() + Promise.all([this.getAllRoles(), this.getAllOrganization()]).then(()=>{ + this.modal.containerInstance.config.nzOkLoading = false + }) } destroyModal(): void { this.modal.destroy({ data: 'this the result data' }); @@ -36,29 +34,33 @@ export class EdituserComponent implements OnInit { listOfData: any[] = []; //获取角色列表 - getAllRoles() { - this.http.get('/api/services/app/Role/GetAll').subscribe((data: any) => { - console.log('角色列表', data.result.items) - this.listOfData = data.result.items + async getAllRoles() { + await new Promise((resolve, reject) => { + this.http.get('/api/services/app/Role/GetAll').subscribe((data: any) => { + resolve(data) + this.listOfData = data.result.items + }) }) } //获取所有组织机构 - nodes:any = [] - getAllOrganization() { + nodes: any = [] + async getAllOrganization() { let OrganizationUnitId = sessionStorage.getItem('isGasStation') == 'true' ? JSON.parse(sessionStorage.getItem('userdataOfgasstation')).organization.id : JSON.parse(sessionStorage.getItem('userdata')).organization.id let params = { OrganizationUnitId: OrganizationUnitId, IsContainsChildren: "true" } - this.http.get('/api/services/app/Organization/GetAll', { - params: params - }).subscribe((data: any) => { - data.result.items.forEach(element => { - element.key = element.id - element.title = element.displayName - }); - this.nodes = [...this.toTree.toTree(data.result.items)] + await new Promise((resolve, reject) => { + this.http.get('/api/services/app/Organization/GetAll', { + params: params + }).subscribe((data: any) => { + data.result.items.forEach(element => { + element.key = element.id + element.title = element.displayName + }); + this.nodes = [...this.toTree.toTree(data.result.items)] + resolve(data) + }) }) } - } diff --git a/src/app/system-management/user/user.component.ts b/src/app/system-management/user/user.component.ts index 0460206..f18c41b 100644 --- a/src/app/system-management/user/user.component.ts +++ b/src/app/system-management/user/user.component.ts @@ -71,6 +71,7 @@ export class UserComponent implements OnInit { subtitle: '' }, nzOnOk: async () => { + // console.log(instance.validateForm.value) if (instance.validateForm.valid) { await new Promise(resolve => { let body = { @@ -114,6 +115,7 @@ export class UserComponent implements OnInit { nzContent: EdituserComponent, nzViewContainerRef: this.viewContainerRef, nzWidth: 288, + nzOkLoading: true, nzComponentParams: { data: data, }, @@ -122,7 +124,7 @@ export class UserComponent implements OnInit { if (instance.validateForm.valid) { await new Promise(resolve => { let body = { - id:data.id, + id: data.id, userName: instance.validateForm.value.account, name: instance.validateForm.value.name, organizationUnitId: instance.validateForm.value.organization, From 53ecb555b6cc9c6a6ba7fa5ca77d257069b76a03 Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Mon, 6 Dec 2021 13:24:52 +0800 Subject: [PATCH 3/4] =?UTF-8?q?[=E5=AE=8C=E5=96=84]signalr=E6=89=93?= =?UTF-8?q?=E5=8C=85=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/shared/helpers/SignalRAspNetCoreHelper.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/shared/helpers/SignalRAspNetCoreHelper.ts b/src/shared/helpers/SignalRAspNetCoreHelper.ts index 44dd445..38b7427 100644 --- a/src/shared/helpers/SignalRAspNetCoreHelper.ts +++ b/src/shared/helpers/SignalRAspNetCoreHelper.ts @@ -2,7 +2,9 @@ declare var abp: any export class SignalRAspNetCoreHelper { static initSignalR(callback?: () => void): void { const encryptedAuthToken = sessionStorage.getItem("encryptedAccessToken"); - let url = "http://39.106.78.171:8906"; + console.log('window.location.origin',window.location.origin) + // let url = "http://39.106.78.171:8906"; + let url = window.location.origin abp.signalr = { autoConnect: true, connect: undefined, From 44ca86612ac968f78d11db021052623d7f734677 Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Mon, 6 Dec 2021 17:06:50 +0800 Subject: [PATCH 4/4] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=E5=AE=8C=E5=96=84?= =?UTF-8?q?=E6=95=B0=E5=AD=97=E7=AB=99=E7=82=B9=E8=A1=A8=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plan-admin/plan-admin.component.html | 38 +++++++++++-------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/src/app/pages/plan-admin/plan-admin.component.html b/src/app/pages/plan-admin/plan-admin.component.html index fcd62fe..bec8f22 100644 --- a/src/app/pages/plan-admin/plan-admin.component.html +++ b/src/app/pages/plan-admin/plan-admin.component.html @@ -53,34 +53,40 @@
+ [nzScroll]="{ y:tableheight() }" [nzNoResult]='null' nzTableLayout="fixed"> - - 加油站名称 + +
+ +
加油站名称 + 区域 所属公司 联系人 联系电话 油站等级 经营品类 - 油机数量 - 车道数量 - 油罐容积 - 操作 + 油机数量 + 车道数量 + 油罐容积 + 操作 - - {{item.stationName}} - {{item.locationName}} - {{item.companyName}} - {{item.leaderName}} - {{item.leaderContact}} - {{item.stationLevel}} - {{item.sellVariety}} + +
+ +
+ {{item.stationName}} + + {{item.locationName}} + {{item.companyName}} + {{item.leaderName}} + {{item.leaderContact}} + {{item.stationLevel}} + {{item.sellVariety}} {{item.gasStationCount}} {{item.laneCount}} {{item.tankVolume}}