edit
This commit is contained in:
@ -0,0 +1,28 @@
|
||||
<page-header-wrapper title="系统日志">
|
||||
</page-header-wrapper>
|
||||
|
||||
<nz-card class="search-box">
|
||||
<div nz-row nzGutter="8">
|
||||
<div nz-col [nzSpan]="18">
|
||||
<sf #sf [schema]="searchSchema" [ui]="{ '*': { spanLabelFixed: 90,grid: { span: 8 } }}" [compact]="true"
|
||||
[button]="'none'"></sf>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="6" class="text-right">
|
||||
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button>
|
||||
<button nz-button (click)="resetSF()">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</nz-card>
|
||||
|
||||
<nz-card class="content-box">
|
||||
<div class="d-flex justify-content-end mb-sm">
|
||||
<div>
|
||||
<button nz-button nzType="primary" (click)="reasonAction()">新增</button>
|
||||
</div>
|
||||
</div>
|
||||
<st #st [data]="url" [columns]="columns"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
|
||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
||||
[loading]="service.http.loading" [scroll]="{ y: '370px' }" (change)="stChange($event)"></st>
|
||||
</nz-card>
|
||||
@ -0,0 +1,21 @@
|
||||
:host::ng-deep {
|
||||
.search-box {
|
||||
.ant-card-body {
|
||||
padding-bottom: 18px;
|
||||
}
|
||||
}
|
||||
|
||||
.content-box {
|
||||
.ant-card-body {
|
||||
padding-top: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
nz-range-picker {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.expend-options {
|
||||
margin-top: -40px;
|
||||
}
|
||||
@ -0,0 +1,127 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { STChange, STColumn, STComponent } from '@delon/abc/st';
|
||||
import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { SystemService } from '../../services/system.service';
|
||||
import { AuditResonConfigActionModalComponent } from './audit-reson-config-action-modal/audit-reson-config-action-modal.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-audit-reason-config',
|
||||
templateUrl: './audit-reason-config.component.html',
|
||||
styleUrls: ['./audit-reason-config.component.less']
|
||||
})
|
||||
export class AuditReasonConfigComponent implements OnInit {
|
||||
@ViewChild('st', { static: true })
|
||||
st!: STComponent;
|
||||
@ViewChild('sf', { static: false })
|
||||
sf!: SFComponent;
|
||||
|
||||
url = `/rule?_allow_anonymous=true`;
|
||||
|
||||
searchSchema: SFSchema = {
|
||||
properties: {
|
||||
expand: {
|
||||
type: 'boolean',
|
||||
ui: {
|
||||
hidden: true
|
||||
}
|
||||
},
|
||||
receiveName: {
|
||||
type: 'string',
|
||||
title: '审核类型',
|
||||
enum: [
|
||||
{ label: '全部', value: '全部' },
|
||||
{ label: '企业认证审核', value: '企业认证审核' },
|
||||
{ label: '企业管理员审核', value: '企业管理员审核' },
|
||||
{ label: '用户实名认证审核', value: '用户实名认证审核' },
|
||||
{ label: '司机实名认证审核', value: '司机实名认证审核' },
|
||||
{ label: '司机驾驶证审核', value: '司机驾驶证审核' },
|
||||
{ label: '车辆审核', value: '车辆审核' }
|
||||
],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
change: (i: any) => {
|
||||
this.sf.value.receiveName = i;
|
||||
this.sf?.setValue('/receiveName', i);
|
||||
}
|
||||
}
|
||||
},
|
||||
phone: {
|
||||
type: 'string',
|
||||
title: '驳回理由',
|
||||
ui: { placeholder: '请输入' }
|
||||
},
|
||||
createTime: {
|
||||
title: '创建时间',
|
||||
type: 'string',
|
||||
ui: {
|
||||
widget: 'date',
|
||||
mode: 'range',
|
||||
format: 'yyyy-MM-dd'
|
||||
} as SFDateWidgetSchema
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
columns: STColumn[] = [
|
||||
{ title: '操作时间', index: 'updatedAt', type: 'date' },
|
||||
{ title: '操作人', index: 'description' },
|
||||
{ title: '操作人手机号码', index: 'description' },
|
||||
{ title: '操作页面', index: 'description' },
|
||||
{ title: '操作内容', index: 'description' },
|
||||
{
|
||||
title: '创建时间',
|
||||
index: 'updatedAt',
|
||||
type: 'date'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
buttons: [
|
||||
{
|
||||
text: '编辑',
|
||||
click: item => this.reasonAction(item)
|
||||
},
|
||||
{
|
||||
text: '删除',
|
||||
click: item => this.deleteReason(item)
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
reqParams = { pageIndex: 1, pageSize: 10 };
|
||||
|
||||
constructor(public service: SystemService, private nzModalService: NzModalService) {}
|
||||
|
||||
ngOnInit(): void {}
|
||||
|
||||
stChange(e: STChange): void {}
|
||||
|
||||
reasonAction(item?: any) {
|
||||
const modal = this.nzModalService.create({
|
||||
nzContent: AuditResonConfigActionModalComponent,
|
||||
nzComponentParams: item ? { i: { ...item, roleId: 1, name: '车辆审核', phone: 18555555555 } } : { i: { id: 0 } },
|
||||
nzFooter: null
|
||||
});
|
||||
modal.afterClose.subscribe(res => {
|
||||
this.st.load();
|
||||
});
|
||||
}
|
||||
|
||||
deleteReason(item: any) {
|
||||
this.nzModalService.error({
|
||||
nzTitle: '确认删除?',
|
||||
nzClosable: false,
|
||||
nzCancelText: '取消',
|
||||
nzOnOk: () => {}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置表单
|
||||
*/
|
||||
resetSF() {
|
||||
this.sf.reset();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
<div class="modal-header">
|
||||
<div class="modal-title">{{ i.id === 0 ? '新增配置' : '编辑配置' }}</div>
|
||||
</div>
|
||||
<div>
|
||||
<sf #sf [compact]="true" [ui]="ui" [schema]="schema" [button]="'none'">
|
||||
</sf>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button nz-button type="button" (click)="close()">取消</button>
|
||||
<button nz-button type="button" nzType="primary" (click)="sure()" [disabled]="!sf.valid">保存</button>
|
||||
</div>
|
||||
@ -0,0 +1,94 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
|
||||
import { NzMessageService } from 'ng-zorro-antd/message';
|
||||
import { NzModalRef } from 'ng-zorro-antd/modal';
|
||||
import { SystemService } from '../../../services/system.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-audit-reson-config-action-modal',
|
||||
templateUrl: './audit-reson-config-action-modal.component.html',
|
||||
styleUrls: ['./audit-reson-config-action-modal.component.less']
|
||||
})
|
||||
export class AuditResonConfigActionModalComponent implements OnInit {
|
||||
@ViewChild('sf', { static: false })
|
||||
sf!: SFComponent;
|
||||
i: any;
|
||||
schema!: SFSchema;
|
||||
ui: SFUISchema = {
|
||||
'*': {
|
||||
spanLabelFixed: 120,
|
||||
grid: { span: 24 }
|
||||
}
|
||||
};
|
||||
constructor(private modal: NzModalRef, public service: SystemService) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.initSF(this.i);
|
||||
}
|
||||
initSF(staff: any) {
|
||||
this.schema = {
|
||||
properties: {
|
||||
name: {
|
||||
title: '选择审核类型',
|
||||
type: 'string',
|
||||
enum: [
|
||||
{ label: '全部', value: '全部' },
|
||||
{ label: '企业认证审核', value: '企业认证审核' },
|
||||
{ label: '企业管理员审核', value: '企业管理员审核' },
|
||||
{ label: '用户实名认证审核', value: '用户实名认证审核' },
|
||||
{ label: '司机实名认证审核', value: '司机实名认证审核' },
|
||||
{ label: '司机驾驶证审核', value: '司机驾驶证审核' },
|
||||
{ label: '车辆审核', value: '车辆审核' }
|
||||
],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
change: (i: any) => {
|
||||
this.sf.value.name = i;
|
||||
this.sf?.setValue('/name', i);
|
||||
}
|
||||
},
|
||||
default: staff.name
|
||||
},
|
||||
phone: {
|
||||
title: '驳回理由',
|
||||
type: 'string',
|
||||
ui: { placeholder: '请输入', widget: 'textarea', autosize: { minRows: 2, maxRows: 6 } },
|
||||
default: staff.phone
|
||||
}
|
||||
},
|
||||
required: ['name']
|
||||
};
|
||||
}
|
||||
|
||||
sure() {
|
||||
if (this.i.id === 0) {
|
||||
const params: any = {
|
||||
...this.sf.value,
|
||||
roleId: this.sf.value.roleId,
|
||||
telephone: this.sf.value.phone,
|
||||
staffName: this.sf.value.name
|
||||
};
|
||||
// this.service.request(this.service.$api_addStaff, params).subscribe((res) => {
|
||||
// console.log(res);
|
||||
// if (res) {
|
||||
// this.service.msgSrv.success('保存成功!');
|
||||
// this.modal.close(true);
|
||||
// }
|
||||
// // this.showInviteFlag = true;
|
||||
// // this.inviteCode = res.inviteCode;
|
||||
// });
|
||||
} else {
|
||||
const params: any = {
|
||||
appUserId: this.i.appUserId,
|
||||
staffName: this.sf.value.name,
|
||||
roleId: this.sf.value.roleId,
|
||||
telephone: this.i.telephone
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
close() {
|
||||
this.modal.destroy();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user