From d06b7ca974eb9572b74094d596075a5b80e7d740 Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Thu, 24 Feb 2022 15:34:36 +0800 Subject: [PATCH] edit --- .../role-management/edit/edit.component.ts | 15 ++- .../role-management.component.ts | 16 +-- .../sys-setting/services/system.service.ts | 2 + .../freight/list/detail/detail.component.html | 99 ++++++++++--------- .../freight/list/detail/detail.component.less | 19 ++-- .../freight/list/list.component.html | 19 ++-- .../components/freight/list/list.component.ts | 3 +- src/styles/theme.less | 3 +- 8 files changed, 104 insertions(+), 72 deletions(-) diff --git a/src/app/routes/sys-setting/components/role-management/edit/edit.component.ts b/src/app/routes/sys-setting/components/role-management/edit/edit.component.ts index 7a3f2ec8..29c5ec89 100644 --- a/src/app/routes/sys-setting/components/role-management/edit/edit.component.ts +++ b/src/app/routes/sys-setting/components/role-management/edit/edit.component.ts @@ -88,6 +88,8 @@ export class SettingRoleEditComponent implements OnInit { // this.service.msgSrv.warning('请选择权限!'); // return; // } + console.log(this.params); + const auths = this.menu?.washTree(); const params: any = { id: this.params.id, @@ -98,13 +100,22 @@ export class SettingRoleEditComponent implements OnInit { if (this.params.id === 0) { delete params.id; } + if (this.params?.type === 'freight') { + Object.assign(params, { enterpriseId: 0, enterpriseProjectId: 0 }); + } if (this.params.id) { this.service.request(this.params.updateUrl, params).subscribe(res => { - this.modal.close(true); + if (res) { + this.service.msgSrv.success('编辑成功'); + this.modal.close(true); + } }); } else { this.service.request(this.params.addUrl, params).subscribe(res => { - this.modal.close(true); + if (res) { + this.service.msgSrv.success('新增成功'); + this.modal.close(true); + } }); } } diff --git a/src/app/routes/sys-setting/components/role-management/role-management.component.ts b/src/app/routes/sys-setting/components/role-management/role-management.component.ts index e188fe9d..f51eddad 100644 --- a/src/app/routes/sys-setting/components/role-management/role-management.component.ts +++ b/src/app/routes/sys-setting/components/role-management/role-management.component.ts @@ -30,7 +30,7 @@ export class RoleManagementComponent implements OnInit { columns: STColumn[] = [ { title: '角色名称', index: 'roleName' }, { title: '角色描述', index: 'roleDescription' }, - { title: '企业数量', index: 'roleDescription', iif: _ => this.type === 'freight' }, + { title: '企业数量', index: 'userNumber', iif: _ => this.type === 'freight' }, { title: '创建人手机号', index: 'telephone' }, { title: '创建时间', @@ -46,13 +46,13 @@ export class RoleManagementComponent implements OnInit { text: '编辑', click: item => this.roleAction(item), iif: item => item.roleName !== '超级管理员', - acl: { ability: ['SYSTEM-ROLE-edit'] }, + acl: { ability: ['SYSTEM-ROLE-edit'] } }, { text: '删除', click: item => this.deleteAction(item), iif: item => item.roleName !== '超级管理员', - acl: { ability: ['SYSTEM-ROLE-delete'] }, + acl: { ability: ['SYSTEM-ROLE-delete'] } } ] } @@ -65,7 +65,8 @@ export class RoleManagementComponent implements OnInit { infoUrl: this.service.$api_getRoleInfo, addUrl: this.service.$api_save_role, updateUrl: this.service.$api_update_role, - title:'角色管理' + title: '角色管理', + type: 'user' }; constructor(public service: SystemService, private nzModalService: NzModalService, private route: ActivatedRoute) { @@ -74,13 +75,14 @@ export class RoleManagementComponent implements OnInit { this.type = type; if (type !== 'user') { this.params = { - listUrl: this.service.$api_get_role_page, + listUrl: this.service.$api_get_ent_role_page, deleteUrl: this.service.$api_dalete_role, infoUrl: this.service.$api_getRoleInfo, addUrl: this.service.$api_save_role, updateUrl: this.service.$api_update_role, appId: 'A48F72F0A304427F921794BAD86B3522', - title:'企业角色管理' + title: '企业角色管理', + type: 'freight' }; } } @@ -103,7 +105,7 @@ export class RoleManagementComponent implements OnInit { const modal = this.nzModalService.create({ nzContent: SettingRoleEditComponent, nzWidth: 900, - nzComponentParams: item ? { params: { ...item, ...this.params } } : { params: { id: 0 } }, + nzComponentParams: item ? { params: { ...item, ...this.params } } : { params: { id: 0, ...this.params } }, nzFooter: null }); modal.afterClose.subscribe(res => { diff --git a/src/app/routes/sys-setting/services/system.service.ts b/src/app/routes/sys-setting/services/system.service.ts index f0fdf2aa..f5254056 100644 --- a/src/app/routes/sys-setting/services/system.service.ts +++ b/src/app/routes/sys-setting/services/system.service.ts @@ -31,6 +31,8 @@ export class SystemService extends BaseService { // 分页获取应用角色列表 $api_get_role_page = '/api/mdc/cuc/roleInfo/getAppRoleInfoList'; + // 分页获取配置角色列表 + $api_get_ent_role_page = '/api/mdc/cuc/roleInfo/getConfigurationRoleList'; // 新增角色 $api_save_role = '/api/mdc/cuc/roleInfo/saveRoleInfo'; // 编辑角色 diff --git a/src/app/routes/usercenter/components/freight/list/detail/detail.component.html b/src/app/routes/usercenter/components/freight/list/detail/detail.component.html index 0f87865c..0b7ac4bd 100644 --- a/src/app/routes/usercenter/components/freight/list/detail/detail.component.html +++ b/src/app/routes/usercenter/components/freight/list/detail/detail.component.html @@ -111,38 +111,7 @@ - - 企业管理员信息 - - - - - {{detailData.adminUserInfo?.mobile}} - - - - - -
- - - - -
-
- - - - -
- - - + @@ -303,6 +284,32 @@ + + + 企业管理员信息 + + + + + {{detailData.adminUserInfo?.mobile}} + + + + + +
+ + + + +
+
+
+ 企业开票信息 diff --git a/src/app/routes/usercenter/components/freight/list/detail/detail.component.less b/src/app/routes/usercenter/components/freight/list/detail/detail.component.less index 351c14db..fb1041ee 100644 --- a/src/app/routes/usercenter/components/freight/list/detail/detail.component.less +++ b/src/app/routes/usercenter/components/freight/list/detail/detail.component.less @@ -20,20 +20,27 @@ } } -:host::ng-deep { - +::ng-deep { .affix { position: fixed; top : 20px !important; z-index : 999 !important; right : 25px; - left : 250px; + left : 25px; } -} -::ng-deep{ - .aside-collapsed .alain-pro__main { + .alain-pro__menu-side .alain-pro__main { + .affix { + position: fixed; + top : 20px !important; + z-index : 999 !important; + right : 25px; + left : 250px; + } + } + + .aside-collapsed.alain-pro__menu-side .alain-pro__main { .affix { left: 106px; } diff --git a/src/app/routes/usercenter/components/freight/list/list.component.html b/src/app/routes/usercenter/components/freight/list/list.component.html index 9b1cf776..59fa855e 100644 --- a/src/app/routes/usercenter/components/freight/list/list.component.html +++ b/src/app/routes/usercenter/components/freight/list/list.component.html @@ -18,9 +18,12 @@
- - - + + +