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/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}} |
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 18ac3df..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,
@@ -132,12 +134,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
})
})
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,