This commit is contained in:
Taric Xin
2022-05-05 17:14:41 +08:00
parent d9d6546226
commit 283e6e4a26
12 changed files with 205 additions and 440 deletions

View File

@ -1,22 +1,12 @@
<!--
* @Description :
* @Version : 1.0
* @Author : Shiming
* @Date : 2022-01-14 14:39:04
* @LastEditors : Shiming
* @LastEditTime : 2022-02-11 15:13:48
* @FilePath : \\tms-obc-web\\src\\app\\shared\\components\\account-detail\\account-detail.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
<st #st [data]="url" [columns]="columns" bordered size="small"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }"
[res]="{ reName: { list: 'data'} }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
[loading]="false" [scroll]="{ y: '370px' }">
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [loading]="false"
[scroll]="{ y: '370px' }">
<ng-template st-row="paAccount" let-item let-index="index">
<a (click)="createAccount(item,'1')" acl [acl-ability]="['USERCENTER-DRIVER-LIST-createAccount']" >{{ item.paAccount || '添加' }}</a>
<a (click)="createAccount(item,'1')">{{ item.paAccount || '添加' }}</a>
</ng-template>
<ng-template st-row="pfAccount" let-item let-index="index">
<a (click)="createAccount(item,'2')" acl [acl-ability]="['USERCENTER-DRIVER-LIST-createAccount']" >{{ item.pfAccount || '添加' }}</a>
<a (click)="createAccount(item,'2')">{{ item.pfAccount || '添加' }}</a>
</ng-template>
</st>

View File

@ -1,6 +1,7 @@
import { CurrencyPipe } from '@angular/common';
import { Component, OnInit, ViewChild } from '@angular/core';
import { STComponent, STColumn, STRequestOptions } from '@delon/abc/st';
import { ACLService } from '@delon/acl';
import { NzModalRef } from 'ng-zorro-antd/modal';
import { BaseService } from '../../services';
@ -18,7 +19,9 @@ export class AccountDetailComponent implements OnInit {
isCanCreate = false;
params: any = {};
constructor(public service: BaseService, public currencyPipe: CurrencyPipe, private modalHelp: NzModalRef) {
constructor(public service: BaseService, public currencyPipe: CurrencyPipe, private modalHelp: NzModalRef, private acl: ACLService) {
const acls = acl.data.abilities || [];
this.isCanCreate = acl.data.full || !!acls.find(acl => acl === 'USERCENTER-FREIGHT-LIST-createAccount');
this.initST();
}