This commit is contained in:
Taric Xin
2022-01-24 19:55:10 +08:00
parent 203701315d
commit 89242d8d15
4 changed files with 35 additions and 43 deletions

View File

@ -11,7 +11,12 @@ import { environment } from '@env/environment';
// #region NG-ALAIN Config
const alainConfig: AlainConfig = {
st: { modal: { size: 'lg' } },
st: {
req: { method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' } },
res: { reName: { list: 'data.records', total: 'data.total' } },
page: { show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] },
modal: { size: 'lg' }
},
sf: { button: { search: '查询' } },
pageHeader: { homeI18n: 'home', recursiveBreadcrumb: true },
auth: { login_url: '/dashboard' }

View File

@ -13,16 +13,8 @@
<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>
<sf #sf [schema]="schema" [ui]="ui" [mode]="'search'" [disabled]="!sf?.valid" [loading]="service.http.loading"
(formSubmit)="st?.load(1)" (formReset)="resetSF()"></sf>
</div>
<!-- 查询字段大于3个时根据展开状态调整布局 -->
@ -37,7 +29,8 @@
</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" [disabled]="!sf.valid" [nzLoading]="service.http.loading"
(click)="st?.load(1)">查询</button>
<button nz-button (click)="resetSF()">重置</button>
<button nz-button nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }}
@ -50,26 +43,13 @@
<nz-card class="content-box" nzBordered>
<div style="position: relative">
<nz-alert
nzType="info"
[nzMessage]="'当前共' + st?.total + '行记录已选择' + selectedRows.length + ''"
nzShowIcon
[ngStyle]="{ margin: '0 0 1rem 0' }"
>
<nz-alert nzType="info" [nzMessage]="'当前共' + st?.total + '行记录已选择' + selectedRows.length + ''" nzShowIcon
[ngStyle]="{ margin: '0 0 1rem 0' }">
</nz-alert>
</div>
<st
#st
[data]="service.$api_listDetailed_page"
[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]="{ x: '1200px', y: '370px' }"
(change)="stChange($event)"
>
<st #st [data]="service.$api_listDetailed_page" [columns]="columns" [req]="{ params: reqParams }"
[loading]="service.http.loading" [scroll]="{ x: '1200px', y: '370px' }" (change)="stChange($event)">
<ng-template st-row="contractCode" let-item let-index="index">
<a [routerLink]="'/contract-management/index/detail/' + item.id">{{ item?.contractCode }}</a>
</ng-template>
@ -80,13 +60,9 @@
<div nz-row nzGutter="8">
<div nz-col nzSpan="24" se-container [labelWidth]="80">
<se [col]="1" label="备注">
<textarea
nz-input
rows="3"
placeholder="同意可以不用填写原因 ,拒绝必须说明原因"
style="width: 325px; margin-left: 14px"
></textarea>
<textarea nz-input rows="3" placeholder="同意可以不用填写原因 ,拒绝必须说明原因"
style="width: 325px; margin-left: 14px"></textarea>
</se>
</div>
</div>
</ng-template>
</ng-template>

View File

@ -37,15 +37,26 @@
<div class="d-flex" style="align-items: center;justify-content: space-between;">
<input type="time" [(ngModel)]="item.itemValue.startTime" placeHolder="开始时间"
style="margin-left: 23px;">
<!-- <nz-time-picker nzFormat="HH:mm" nzPlaceHolder="开始时间"
[(ngModel)]="item.itemValue.startTime" style="margin-left: 23px;">
</nz-time-picker> -->
<label class="ml-sm mr-sm"> --</label>
<input type="time" [(ngModel)]="item.itemValue.endTime" placeHolder="结束时间"
style="margin-left: 0;" class=" mr-xl">
<!-- <nz-time-picker nzFormat="HH:mm" nzPlaceHolder="结束时间"
[(ngModel)]="item.itemValue.endTime">
</nz-time-picker> -->
</div>
</ng-container>
<ng-container *ngSwitchCase="6">
<div class="d-flex" style="align-items: center;justify-content: space-between;">
<nz-radio-group [(ngModel)]="item.itemValue.radio" class="mr-xl">
<label nz-radio [nzValue]="0" class="ml-xl">{{item.remark?.[0] ||
'否'}}</label>
<label nz-radio [nzValue]="1" class="ml-xl">{{item.remark?.[1] ||
'是'}}</label>
</nz-radio-group>
<input type="time" [(ngModel)]="item.itemValue.startTime" placeHolder="开始时间"
style="margin-left: 23px;">
<label class="ml-sm mr-sm"> --</label>
<input type="time" [(ngModel)]="item.itemValue.endTime" placeHolder="结束时间"
style="margin-left: 0;" class=" mr-xl">
</div>
</ng-container>
</ng-container>

View File

@ -1,7 +1,7 @@
import { Component, OnInit, EventEmitter, Input, Output } from '@angular/core';
import { BaseService } from '@shared';
const JSONTYPE = new Set([5]);
const JSONTYPE = new Set([5,6]);
@Component({
selector: 'app-dynamic-setting-h5',
templateUrl: './dynamic-setting-h5.component.html',