edit
This commit is contained in:
@ -19,9 +19,9 @@
|
||||
</nz-card>
|
||||
|
||||
<nz-card class="content-box">
|
||||
<st #st [data]="url" [columns]="columns"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
|
||||
<st #st [data]="service.$api_get_version_logs" [columns]="columns"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' },process: beforeReq }"
|
||||
[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>
|
||||
[loading]="service.http.loading" [scroll]="{ y: '370px' }"></st>
|
||||
</nz-card>
|
||||
@ -17,5 +17,16 @@
|
||||
}
|
||||
|
||||
.expend-options {
|
||||
margin-top: -40px;
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
.expend-options {
|
||||
max-width: 400px;
|
||||
position : absolute;
|
||||
right : 0;
|
||||
bottom : 25px;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,6 +1,7 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { STComponent, STColumn, STChange } from '@delon/abc/st';
|
||||
import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st';
|
||||
import { SFComponent, SFDateWidgetSchema, SFSchema } from '@delon/form';
|
||||
import { dateTimePickerUtil } from '@delon/util';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { SystemService } from '../../services/system.service';
|
||||
|
||||
@ -15,8 +16,6 @@ export class VersionLogsComponent implements OnInit {
|
||||
@ViewChild('sf', { static: false })
|
||||
sf!: SFComponent;
|
||||
|
||||
url = `/rule?_allow_anonymous=true`;
|
||||
|
||||
searchSchema: SFSchema = {
|
||||
properties: {
|
||||
expand: {
|
||||
@ -25,17 +24,37 @@ export class VersionLogsComponent implements OnInit {
|
||||
hidden: true
|
||||
}
|
||||
},
|
||||
receiveName: {
|
||||
publishPort: {
|
||||
type: 'string',
|
||||
title: '端口',
|
||||
ui: { placeholder: '请输入' }
|
||||
enum: [
|
||||
{ label: '全部', value: null },
|
||||
{ label: '司机', value: '1' },
|
||||
{ label: '货主', value: '2' },
|
||||
{ label: '运营平台', value: '3' }
|
||||
],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择'
|
||||
},
|
||||
default: null
|
||||
},
|
||||
phone: {
|
||||
publishType: {
|
||||
type: 'string',
|
||||
title: '端口方式',
|
||||
ui: { placeholder: '请输入' }
|
||||
enum: [
|
||||
{ label: '全部', value: null },
|
||||
{ label: 'PC ', value: '1' },
|
||||
{ label: 'APP', value: '2' },
|
||||
{ label: '小程序', value: '3' }
|
||||
],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择'
|
||||
},
|
||||
default: null
|
||||
},
|
||||
page: {
|
||||
publishVersion: {
|
||||
type: 'string',
|
||||
title: '版本号',
|
||||
ui: {
|
||||
@ -58,38 +77,35 @@ export class VersionLogsComponent implements OnInit {
|
||||
};
|
||||
|
||||
columns: STColumn[] = [
|
||||
{ title: '端口', index: 'no' },
|
||||
{ title: '端口方式', index: 'description' },
|
||||
{ title: '版本号', index: 'description' },
|
||||
{ title: '端口', index: 'publishPort', type: 'enum', enum: { 1: '司机', 2: '货主', 3: '运营平台' } },
|
||||
{ title: '端口方式', index: 'publishType', type: 'enum', enum: { 1: 'PC', 2: 'APP', 3: '小程序' } },
|
||||
{ title: '版本号', index: 'publishVersion' },
|
||||
{
|
||||
title: '发布时间',
|
||||
index: 'updatedAt',
|
||||
index: 'createTime',
|
||||
type: 'date'
|
||||
},
|
||||
{ title: '更新内容', index: 'description' }
|
||||
{ title: '更新内容', index: 'publicshContext' }
|
||||
];
|
||||
|
||||
selectedRows: any[] = [];
|
||||
|
||||
reqParams = { pageIndex: 1, pageSize: 10 };
|
||||
_$expand = false;
|
||||
|
||||
constructor(public service: SystemService, private nzModalService: NzModalService) {}
|
||||
|
||||
ngOnInit(): void {}
|
||||
|
||||
stChange(e: STChange): void {
|
||||
switch (e.type) {
|
||||
case 'checkbox':
|
||||
this.selectedRows = e.checkbox!;
|
||||
break;
|
||||
case 'filter':
|
||||
this.st.load();
|
||||
break;
|
||||
beforeReq = (requestOptions: STRequestOptions) => {
|
||||
if (this.sf) {
|
||||
Object.assign(requestOptions.body, {
|
||||
...this.sf.value,
|
||||
publishTime: {
|
||||
start: this.sf.value.time?.start ? dateTimePickerUtil.format(this.sf.value.time?.start, 'yyyy-MM-dd HH:mm:ss') : null,
|
||||
end: this.sf.value.time?.end ? dateTimePickerUtil.format(this.sf.value.time?.end, 'yyyy-MM-dd HH:mm:ss') : null
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
return requestOptions;
|
||||
};
|
||||
|
||||
roleAction(item?: any) {}
|
||||
ngOnInit(): void {}
|
||||
|
||||
/**
|
||||
* 重置表单
|
||||
|
||||
Reference in New Issue
Block a user