50 changed files with 1061 additions and 241 deletions
@ -1 +1 @@ |
|||||
<p>maintenance-calendar works!</p> |
<app-calendar-list type="maintenance" /> |
||||
|
|||||
@ -1,12 +1,12 @@ |
|||||
import { Component } from '@angular/core'; |
import { Component } from '@angular/core' |
||||
|
import { CalendarListComponent } from 'app/components/plan-task/calendar-list/calendar-list.component' |
||||
|
import { SharedModule } from 'app/shared/shared.module' |
||||
|
|
||||
@Component({ |
@Component({ |
||||
selector: 'app-maintenance-calendar', |
selector: 'app-maintenance-calendar', |
||||
standalone: true, |
standalone: true, |
||||
imports: [], |
imports: [SharedModule, CalendarListComponent], |
||||
templateUrl: './maintenance-calendar.component.html', |
templateUrl: './maintenance-calendar.component.html', |
||||
styleUrl: './maintenance-calendar.component.less' |
styleUrl: './maintenance-calendar.component.less', |
||||
}) |
}) |
||||
export class MaintenanceCalendarComponent { |
export class MaintenanceCalendarComponent {} |
||||
|
|
||||
} |
|
||||
|
|||||
@ -1 +1 @@ |
|||||
<p>maintenance-plan works!</p> |
<app-plan-list type="maintenance" /> |
||||
|
|||||
@ -1,12 +1,12 @@ |
|||||
import { Component } from '@angular/core'; |
import { Component } from '@angular/core' |
||||
|
import { PlanListComponent } from 'app/components/plan-task/plan-list/plan-list.component' |
||||
|
import { SharedModule } from 'app/shared/shared.module' |
||||
|
|
||||
@Component({ |
@Component({ |
||||
selector: 'app-maintenance-plan', |
selector: 'app-maintenance-plan', |
||||
standalone: true, |
standalone: true, |
||||
imports: [], |
imports: [SharedModule, PlanListComponent], |
||||
templateUrl: './maintenance-plan.component.html', |
templateUrl: './maintenance-plan.component.html', |
||||
styleUrl: './maintenance-plan.component.less' |
styleUrl: './maintenance-plan.component.less', |
||||
}) |
}) |
||||
export class MaintenancePlanComponent { |
export class MaintenancePlanComponent {} |
||||
|
|
||||
} |
|
||||
|
|||||
@ -1 +1 @@ |
|||||
<p>maintenance-task works!</p> |
<app-task-list type="maintenance" /> |
||||
|
|||||
@ -1,12 +1,12 @@ |
|||||
import { Component } from '@angular/core'; |
import { Component } from '@angular/core' |
||||
|
import { TaskListComponent } from 'app/components/plan-task/task-list/task-list.component' |
||||
|
import { SharedModule } from 'app/shared/shared.module' |
||||
|
|
||||
@Component({ |
@Component({ |
||||
selector: 'app-maintenance-task', |
selector: 'app-maintenance-task', |
||||
standalone: true, |
standalone: true, |
||||
imports: [], |
imports: [SharedModule, TaskListComponent], |
||||
templateUrl: './maintenance-task.component.html', |
templateUrl: './maintenance-task.component.html', |
||||
styleUrl: './maintenance-task.component.less' |
styleUrl: './maintenance-task.component.less', |
||||
}) |
}) |
||||
export class MaintenanceTaskComponent { |
export class MaintenanceTaskComponent {} |
||||
|
|
||||
} |
|
||||
|
|||||
@ -1 +1 @@ |
|||||
<p>stocktaking-calendar works!</p> |
<app-calendar-list type="stocktaking" /> |
||||
|
|||||
@ -1,12 +1,12 @@ |
|||||
import { Component } from '@angular/core'; |
import { Component } from '@angular/core' |
||||
|
import { CalendarListComponent } from 'app/components/plan-task/calendar-list/calendar-list.component' |
||||
|
import { SharedModule } from 'app/shared/shared.module' |
||||
|
|
||||
@Component({ |
@Component({ |
||||
selector: 'app-stocktaking-calendar', |
selector: 'app-stocktaking-calendar', |
||||
standalone: true, |
standalone: true, |
||||
imports: [], |
imports: [SharedModule, CalendarListComponent], |
||||
templateUrl: './stocktaking-calendar.component.html', |
templateUrl: './stocktaking-calendar.component.html', |
||||
styleUrl: './stocktaking-calendar.component.less' |
styleUrl: './stocktaking-calendar.component.less', |
||||
}) |
}) |
||||
export class StocktakingCalendarComponent { |
export class StocktakingCalendarComponent {} |
||||
|
|
||||
} |
|
||||
|
|||||
@ -1 +1 @@ |
|||||
<p>stocktaking-plan works!</p> |
<app-plan-list type="stocktaking" /> |
||||
|
|||||
@ -1,12 +1,12 @@ |
|||||
import { Component } from '@angular/core'; |
import { Component } from '@angular/core' |
||||
|
import { PlanListComponent } from 'app/components/plan-task/plan-list/plan-list.component' |
||||
|
import { SharedModule } from 'app/shared/shared.module' |
||||
|
|
||||
@Component({ |
@Component({ |
||||
selector: 'app-stocktaking-plan', |
selector: 'app-stocktaking-plan', |
||||
standalone: true, |
standalone: true, |
||||
imports: [], |
imports: [SharedModule, PlanListComponent], |
||||
templateUrl: './stocktaking-plan.component.html', |
templateUrl: './stocktaking-plan.component.html', |
||||
styleUrl: './stocktaking-plan.component.less' |
styleUrl: './stocktaking-plan.component.less', |
||||
}) |
}) |
||||
export class StocktakingPlanComponent { |
export class StocktakingPlanComponent {} |
||||
|
|
||||
} |
|
||||
|
|||||
@ -1 +1 @@ |
|||||
<p>stocktaking-task works!</p> |
<app-task-list type="stocktaking" /> |
||||
|
|||||
@ -1,12 +1,12 @@ |
|||||
import { Component } from '@angular/core'; |
import { Component } from '@angular/core' |
||||
|
import { TaskListComponent } from 'app/components/plan-task/task-list/task-list.component' |
||||
|
import { SharedModule } from 'app/shared/shared.module' |
||||
|
|
||||
@Component({ |
@Component({ |
||||
selector: 'app-stocktaking-task', |
selector: 'app-stocktaking-task', |
||||
standalone: true, |
standalone: true, |
||||
imports: [], |
imports: [SharedModule, TaskListComponent], |
||||
templateUrl: './stocktaking-task.component.html', |
templateUrl: './stocktaking-task.component.html', |
||||
styleUrl: './stocktaking-task.component.less' |
styleUrl: './stocktaking-task.component.less', |
||||
}) |
}) |
||||
export class StocktakingTaskComponent { |
export class StocktakingTaskComponent {} |
||||
|
|
||||
} |
|
||||
|
|||||
@ -0,0 +1 @@ |
|||||
|
<p>flow-management works!</p> |
||||
@ -0,0 +1,12 @@ |
|||||
|
import { Component } from '@angular/core'; |
||||
|
|
||||
|
@Component({ |
||||
|
selector: 'app-flow-management', |
||||
|
standalone: true, |
||||
|
imports: [], |
||||
|
templateUrl: './flow-management.component.html', |
||||
|
styleUrl: './flow-management.component.less' |
||||
|
}) |
||||
|
export class FlowManagementComponent { |
||||
|
|
||||
|
} |
||||
@ -0,0 +1 @@ |
|||||
|
<p>flow-report works!</p> |
||||
@ -0,0 +1,12 @@ |
|||||
|
import { Component } from '@angular/core'; |
||||
|
|
||||
|
@Component({ |
||||
|
selector: 'app-flow-report', |
||||
|
standalone: true, |
||||
|
imports: [], |
||||
|
templateUrl: './flow-report.component.html', |
||||
|
styleUrl: './flow-report.component.less' |
||||
|
}) |
||||
|
export class FlowReportComponent { |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,44 @@ |
|||||
|
<app-page> |
||||
|
<div class="flex-1 overflow-hidden"> |
||||
|
<app-server-paginated-table [options]="table" [formGroup]="queryForm" [renderColumn]="renderColumnTpl"> |
||||
|
<ng-template #renderColumnTpl let-data let-key="key" let-row="row"> |
||||
|
@switch (key) { |
||||
|
@case ('_useUser') { |
||||
|
{{ data?.userName ?? '-' }} |
||||
|
} |
||||
|
@case ('_warehouse') { |
||||
|
{{ data?.name ?? '-' }} |
||||
|
} |
||||
|
@case ('_position') { |
||||
|
{{ data?.name ?? '-' }} |
||||
|
} |
||||
|
@case ('_head') { |
||||
|
{{ data?.userName ?? '-' }} |
||||
|
} |
||||
|
@case ('_ownCompany') { |
||||
|
{{ data?.organizationName ?? '-' }} |
||||
|
} |
||||
|
@case ('_useOrganization') { |
||||
|
{{ data?.organizationName ?? '-' }} |
||||
|
} |
||||
|
@case ('_category') { |
||||
|
{{ data?.categoryName ?? '-' }} |
||||
|
} |
||||
|
@default { |
||||
|
{{ data }} |
||||
|
} |
||||
|
} |
||||
|
</ng-template> |
||||
|
<ng-container *appTableAction> |
||||
|
<nz-space> |
||||
|
<button *nzSpaceItem nz-button nzType="link" nzDanger="">删除</button> |
||||
|
</nz-space> |
||||
|
</ng-container> |
||||
|
<ng-container *appTableForm> |
||||
|
<app-query-item label="内容"> |
||||
|
<input nz-input placeholder="请输入" formControlName="logContent" /> |
||||
|
</app-query-item> |
||||
|
</ng-container> |
||||
|
</app-server-paginated-table> |
||||
|
</div> |
||||
|
</app-page> |
||||
@ -0,0 +1,57 @@ |
|||||
|
import { Component, TemplateRef, ViewChild } from '@angular/core' |
||||
|
import { FormControl, FormGroup } from '@angular/forms' |
||||
|
|
||||
|
import { AnyObject, TableOption } from 'app/shared/components/server-paginated-table' |
||||
|
import { ApiService } from 'app/services' |
||||
|
import { SharedModule } from 'app/shared/shared.module' |
||||
|
import { format } from 'date-fns' |
||||
|
import { lastValueFrom, of } from 'rxjs' |
||||
|
import { NzSafeAny } from 'ng-zorro-antd/core/types' |
||||
|
import { NzModalService } from 'ng-zorro-antd/modal' |
||||
|
import { NzMessageService } from 'ng-zorro-antd/message' |
||||
|
import { BUSINESS_STATUS_MAP } from 'app/constants' |
||||
|
import { FormValidators } from 'app/utils' |
||||
|
|
||||
|
@Component({ |
||||
|
selector: 'app-flow-msg', |
||||
|
standalone: true, |
||||
|
imports: [SharedModule], |
||||
|
templateUrl: './flow-msg.component.html', |
||||
|
styleUrl: './flow-msg.component.less', |
||||
|
}) |
||||
|
export class FlowMsgComponent { |
||||
|
constructor( |
||||
|
private api: ApiService, |
||||
|
private modal: NzModalService, |
||||
|
private msg: NzMessageService, |
||||
|
) {} |
||||
|
|
||||
|
@ViewChild('createFormTpl') createFormTpl!: TemplateRef<{}> |
||||
|
|
||||
|
queryForm = new FormGroup({ |
||||
|
logContent: new FormControl(''), |
||||
|
logType: new FormControl(''), |
||||
|
createTime: new FormControl(''), |
||||
|
}) |
||||
|
|
||||
|
table = new TableOption(this.fetchData.bind(this)) |
||||
|
|
||||
|
ngOnInit(): void { |
||||
|
this.table |
||||
|
// .setConfig({
|
||||
|
// selectable: true,
|
||||
|
// rowKey: 'id',
|
||||
|
// })
|
||||
|
.setColumn([ |
||||
|
{ key: 'logId', title: '序号', visible: true }, |
||||
|
{ key: 'createTime', title: '时间', visible: true }, |
||||
|
{ key: 'logType', title: '类型', visible: true }, |
||||
|
{ key: 'logContent', title: '内容', visible: true }, |
||||
|
{ key: 'logContent', title: '待我处理', visible: true }, |
||||
|
]) |
||||
|
} |
||||
|
|
||||
|
fetchData(p: {}, q: AnyObject) { |
||||
|
return this.api.getAlarmMsg({ ...p, ...q }) |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,67 @@ |
|||||
|
<div |
||||
|
class="menu bg-white shadow fixed left-0 top-12 bottom-0 z-20 w-48 flex-shrink-0 py-3 overflow-y-auto overflow-x-hidden" |
||||
|
> |
||||
|
<ul nz-menu nzMode="inline"> |
||||
|
<li |
||||
|
*appPermission="['asset-flow-home:view']" |
||||
|
nz-menu-item |
||||
|
[nzPaddingLeft]="12" |
||||
|
[routerLink]="['/msg/flow']" |
||||
|
nzMatchRouter |
||||
|
> |
||||
|
流程消息 |
||||
|
</li> |
||||
|
|
||||
|
<li |
||||
|
nzMatchRouter |
||||
|
[nzPaddingLeft]="12" |
||||
|
nz-submenu |
||||
|
nzTitle="预警中心" |
||||
|
[nzOpen]="openedSubmenu.startsWith('/msg/alert')" |
||||
|
*appPermission="['stocktaking-plan:view', 'stocktaking-job:view']" |
||||
|
> |
||||
|
<ul> |
||||
|
<li |
||||
|
*appPermission="['stocktaking-plan:view']" |
||||
|
nz-menu-item |
||||
|
[nzPaddingLeft]="24" |
||||
|
[routerLink]="['/msg/alert/borrow']" |
||||
|
nzMatchRouter |
||||
|
> |
||||
|
借用超期预警 |
||||
|
</li> |
||||
|
<li |
||||
|
*appPermission="['stocktaking-job:view']" |
||||
|
nz-menu-item |
||||
|
[nzPaddingLeft]="24" |
||||
|
[routerLink]="['/msg/alert/maintenance']" |
||||
|
nzMatchRouter |
||||
|
> |
||||
|
维保到期预警 |
||||
|
</li> |
||||
|
<li |
||||
|
*appPermission="['stocktaking-job:view']" |
||||
|
nz-menu-item |
||||
|
[nzPaddingLeft]="24" |
||||
|
[routerLink]="['/msg/alert/inventory']" |
||||
|
nzMatchRouter |
||||
|
> |
||||
|
库存安全预警 |
||||
|
</li> |
||||
|
</ul> |
||||
|
</li> |
||||
|
<li |
||||
|
*appPermission="['asset-flow-my-finished:view']" |
||||
|
nz-menu-item |
||||
|
[nzPaddingLeft]="12" |
||||
|
[routerLink]="['/msg/log']" |
||||
|
nzMatchRouter |
||||
|
> |
||||
|
系统日志 |
||||
|
</li> |
||||
|
</ul> |
||||
|
</div> |
||||
|
|
||||
|
<div class="pl-48 overflow-hidden"> |
||||
|
<router-outlet></router-outlet> |
||||
|
</div> |
||||
@ -0,0 +1,24 @@ |
|||||
|
import { Component } from '@angular/core' |
||||
|
import { Router } from '@angular/router' |
||||
|
import { SharedModule } from 'app/shared/shared.module' |
||||
|
|
||||
|
@Component({ |
||||
|
selector: 'app-flow-layout', |
||||
|
standalone: true, |
||||
|
imports: [SharedModule], |
||||
|
templateUrl: './msg-layout.component.html', |
||||
|
styleUrl: './msg-layout.component.less', |
||||
|
}) |
||||
|
export class MsgLayoutComponent { |
||||
|
constructor(private router: Router) { |
||||
|
this.openedSubmenu = this.router.url |
||||
|
} |
||||
|
|
||||
|
openedSubmenu = '' |
||||
|
|
||||
|
ngOnInit(): void {} |
||||
|
|
||||
|
onMenuOpenChange(open: boolean) { |
||||
|
this.openedSubmenu = open ? this.router.url : '' |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,44 @@ |
|||||
|
<app-page> |
||||
|
<div class="flex-1 overflow-hidden"> |
||||
|
<app-server-paginated-table [options]="table" [formGroup]="queryForm" [renderColumn]="renderColumnTpl"> |
||||
|
<ng-template #renderColumnTpl let-data let-key="key" let-row="row"> |
||||
|
@switch (key) { |
||||
|
@case ('_useUser') { |
||||
|
{{ data?.userName ?? '-' }} |
||||
|
} |
||||
|
@case ('_warehouse') { |
||||
|
{{ data?.name ?? '-' }} |
||||
|
} |
||||
|
@case ('_position') { |
||||
|
{{ data?.name ?? '-' }} |
||||
|
} |
||||
|
@case ('_head') { |
||||
|
{{ data?.userName ?? '-' }} |
||||
|
} |
||||
|
@case ('_ownCompany') { |
||||
|
{{ data?.organizationName ?? '-' }} |
||||
|
} |
||||
|
@case ('_useOrganization') { |
||||
|
{{ data?.organizationName ?? '-' }} |
||||
|
} |
||||
|
@case ('_category') { |
||||
|
{{ data?.categoryName ?? '-' }} |
||||
|
} |
||||
|
@default { |
||||
|
{{ data }} |
||||
|
} |
||||
|
} |
||||
|
</ng-template> |
||||
|
<ng-container *appTableAction> |
||||
|
<nz-space> |
||||
|
<button *nzSpaceItem nz-button nzType="link" nzDanger="">删除</button> |
||||
|
</nz-space> |
||||
|
</ng-container> |
||||
|
<ng-container *appTableForm> |
||||
|
<app-query-item label="内容"> |
||||
|
<input nz-input placeholder="请输入" formControlName="logContent" /> |
||||
|
</app-query-item> |
||||
|
</ng-container> |
||||
|
</app-server-paginated-table> |
||||
|
</div> |
||||
|
</app-page> |
||||
@ -0,0 +1,56 @@ |
|||||
|
import { Component, TemplateRef, ViewChild } from '@angular/core' |
||||
|
import { FormControl, FormGroup } from '@angular/forms' |
||||
|
|
||||
|
import { AnyObject, TableOption } from 'app/shared/components/server-paginated-table' |
||||
|
import { ApiService } from 'app/services' |
||||
|
import { SharedModule } from 'app/shared/shared.module' |
||||
|
import { format } from 'date-fns' |
||||
|
import { lastValueFrom, of } from 'rxjs' |
||||
|
import { NzSafeAny } from 'ng-zorro-antd/core/types' |
||||
|
import { NzModalService } from 'ng-zorro-antd/modal' |
||||
|
import { NzMessageService } from 'ng-zorro-antd/message' |
||||
|
import { BUSINESS_STATUS_MAP } from 'app/constants' |
||||
|
import { FormValidators } from 'app/utils' |
||||
|
|
||||
|
@Component({ |
||||
|
selector: 'app-alert-borrow', |
||||
|
standalone: true, |
||||
|
imports: [SharedModule], |
||||
|
templateUrl: './system-log.component.html', |
||||
|
styleUrl: './system-log.component.less', |
||||
|
}) |
||||
|
export class SystemLogComponent { |
||||
|
constructor( |
||||
|
private api: ApiService, |
||||
|
private modal: NzModalService, |
||||
|
private msg: NzMessageService, |
||||
|
) {} |
||||
|
|
||||
|
@ViewChild('createFormTpl') createFormTpl!: TemplateRef<{}> |
||||
|
|
||||
|
queryForm = new FormGroup({ |
||||
|
logContent: new FormControl(''), |
||||
|
logType: new FormControl(''), |
||||
|
createTime: new FormControl(''), |
||||
|
}) |
||||
|
|
||||
|
table = new TableOption(this.fetchData.bind(this)) |
||||
|
|
||||
|
ngOnInit(): void { |
||||
|
this.table |
||||
|
// .setConfig({
|
||||
|
// selectable: true,
|
||||
|
// rowKey: 'id',
|
||||
|
// })
|
||||
|
.setColumn([ |
||||
|
{ key: 'logId', title: '序号', visible: true }, |
||||
|
{ key: 'createTime', title: '时间', visible: true }, |
||||
|
{ key: 'logType', title: '类型', visible: true }, |
||||
|
{ key: 'logContent', title: '内容', visible: true }, |
||||
|
]) |
||||
|
} |
||||
|
|
||||
|
fetchData(p: {}, q: AnyObject) { |
||||
|
return this.api.getSysLog({ ...p, ...q }) |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue