解决冲突

This commit is contained in:
wangshiming
2022-02-23 19:38:18 +08:00
parent c27874bb3f
commit f40c5a53a4
19 changed files with 520 additions and 150 deletions

View File

@ -1,46 +1,31 @@
<!--
* @Author: your name
* @Date: 2021-12-24 15:38:08
* @LastEditTime: 2021-12-27 10:30:01
* @LastEditors: Please set LastEditors
* @LastEditTime : 2022-02-23 17:14:33
* @LastEditors : Shiming
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \tms-obc-web\src\app\routes\sys-setting\components\crm-management\crm-management.component.html
* @FilePath : \\tms-obc-web\\src\\app\\routes\\sys-setting\\components\\crm-management\\crm-management.component.html
-->
<page-header-wrapper title="CRM客户管理">
</page-header-wrapper>
<nz-card>
<nz-card class="search-box">
<div nz-row nzGutter="8">
<!-- 查询字段小于或等于3个时不显示伸缩按钮 -->
<div nz-col nzSpan="24" *ngIf="queryFieldCount <= 4">
<sf #sf [schema]="schema" [ui]="ui" [mode]="'search'" [disabled]="!sf?.valid" [loading]="service.http.loading"
(formSubmit)="st?.load(1)" (formReset)="resetSF()"></sf>
</div>
<!-- 查询字段大于3个时根据展开状态调整布局 -->
<ng-container *ngIf="queryFieldCount > 4">
<div nz-col [nzSpan]="_$expand ? 24 : 18">
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
<div nz-col [nzSpan]="10">
<sf #sf [schema]="schema" [ui]="ui"
[button]="'none'"></sf>
</div>
<div nz-col [nzSpan]="_$expand ? 24 : 6" [class.text-right]="_$expand">
<button nz-button nzType="primary" [disabled]="!sf.valid" [nzLoading]="service.http.loading"
(click)="st?.load(1)">查询</button>
<button nz-button nzType="primary">导出</button>
<button nz-button (click)="resetSF()">重置</button>
<button nz-button nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }}
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
</button>
<div nz-col [nzSpan]="8" nzOffset="1">
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)" acl [acl-ability]="['SYSTEM-CRM-list']">查询</button>
<button nz-button (click)="resetSF()">重置</button>
</div>
</ng-container>
</div>
</nz-card>
<nz-card class="content-box">
<div class="d-flex justify-content-end mb-sm">
<div>
<button nz-button nzType="primary" (click)="roleAction('',1)">新增CRM客户</button>
<button nz-button nzType="primary" (click)="roleAction('',1)" acl [acl-ability]="['SYSTEM-CRM-add']">新增CRM客户</button>
</div>
</div>
<st #st [data]="service.$api_get_crmCustomer_page" [columns]="columns" [req]="{ params: reqParams }"

View File

@ -34,11 +34,13 @@ export class CrmManagementComponent implements OnInit {
buttons: [
{
text: '编辑',
click: item => this.roleAction(item, 2)
click: item => this.roleAction(item, 2),
acl: { ability: ['SYSTEM-CRM-edit'] },
},
{
text: '删除',
click: item => this.deleteAction(item)
click: item => this.deleteAction(item),
acl: { ability: ['SYSTEM-CRM-delete'] },
},
]
}
@ -106,7 +108,7 @@ export class CrmManagementComponent implements OnInit {
}
};
this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } };
this.ui = { '*': { spanLabelFixed: 110, grid: { span: 12, gutter: 4 } } };
}
initSFFre() {
this.addSchema = {

View File

@ -8,7 +8,7 @@
[button]="'none'"></sf>
</div>
<div nz-col [nzSpan]="8" nzOffset="1">
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button>
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)" acl [acl-ability]="['SYSTEM-ROLE-list']">查询</button>
<button nz-button (click)="resetSF()">重置</button>
</div>
</div>
@ -17,7 +17,7 @@
<nz-card>
<div class="d-flex justify-content-end mb-sm">
<div>
<button nz-button nzType="primary" (click)="roleAction()">新建角色</button>
<button nz-button nzType="primary" (click)="roleAction()" acl [acl-ability]="['SYSTEM-ROLE-add']">新建角色</button>
</div>
</div>
<st #st [data]="params.listUrl" [columns]="columns" [req]="{ process: beforeReq }" [loading]="service.http.loading"

View File

@ -45,12 +45,14 @@ export class RoleManagementComponent implements OnInit {
{
text: '编辑',
click: item => this.roleAction(item),
iif: item => item.roleName !== '超级管理员'
iif: item => item.roleName !== '超级管理员',
acl: { ability: ['SYSTEM-ROLE-edit'] },
},
{
text: '删除',
click: item => this.deleteAction(item),
iif: item => item.roleName !== '超级管理员'
iif: item => item.roleName !== '超级管理员',
acl: { ability: ['SYSTEM-ROLE-delete'] },
}
]
}

View File

@ -8,7 +8,7 @@
[button]="'none'"></sf>
</div>
<div nz-col [nzSpan]="8" nzOffset="1">
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button>
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)" acl [acl-ability]="['SYSTEM-STAFF-list']">查询</button>
<button nz-button (click)="resetSF()">重置</button>
</div>
</div>
@ -18,8 +18,8 @@
<div class="d-flex justify-content-between mb-sm">
<label style="font-size: 18px;">员工列表</label>
<div>
<button nz-button nzType="primary" (click)="staffAction()">添加员工</button>
<button nz-button>导出</button>
<button nz-button nzType="primary" (click)="staffAction()" acl [acl-ability]="['SYSTEM-STAFF-add']">添加员工</button>
<button nz-button acl [acl-ability]="['SYSTEM-STAFF-export']">导出</button>
</div>
</div>

View File

@ -52,27 +52,32 @@ export class StaffManagementComponent implements OnInit {
buttons: [
{
text: '编辑',
click: item => this.staffAction(item)
click: item => this.staffAction(item),
acl: { ability: ['SYSTEM-STAFF-edit'] },
},
{
text: '恢复',
iif: item => item.stateLocked === 1,
click: item => this.action(item, 2)
click: item => this.action(item, 2),
acl: { ability: ['SYSTEM-STAFF-lock'] },
},
{
text: '冻结',
iif: item => item.stateLocked === 0 && item.roleCode.split(',').indexOf('Administrator') === -1,
click: item => this.action(item, 1)
click: item => this.action(item, 1),
acl: { ability: ['SYSTEM-STAFF-lock'] },
},
{
text: '超管转授',
iif: item => item.stateLocked === 0 && item.roleCode.split(',').indexOf('Administrator') === -1,
click: item => this.transpowerAction(item)
click: item => this.transpowerAction(item),
acl: { ability: ['SYSTEM-STAFF-shiftAdmin'] },
},
{
text: '删除',
iif: item => item.stateLocked === 0 && item.roleCode.split(',').indexOf('Administrator') === -1,
click: item => this.action(item, 3)
click: item => this.action(item, 3),
acl: { ability: ['SYSTEM-STAFF-delete'] },
}
]
}