Browse Source

修改bug

main
kely 2 years ago
parent
commit
b399c19f9f
  1. 17
      web-admin-app/README.md
  2. 3
      web-admin-app/src/app/components/apply-asset-flow/asset-employee-apply/asset-employee-apply.component.html
  3. 3
      web-admin-app/src/app/components/apply-asset-flow/asset-employee-apply/asset-employee-apply.component.ts
  4. 3
      web-admin-app/src/app/components/apply-asset-flow/asset-employee-loss/asset-employee-loss.component.html
  5. 3
      web-admin-app/src/app/components/apply-asset-flow/eam-asset-employee-handover/eam-asset-employee-handover.component.html
  6. 2
      web-admin-app/src/app/components/apply-asset-flow/eam-asset-employee-handover/eam-asset-employee-handover.component.ts
  7. 3
      web-admin-app/src/app/components/apply-asset-flow/eam-asset-employee-repair/eam-asset-employee-repair.component.html
  8. 2
      web-admin-app/src/app/components/apply-asset-flow/eam-asset-employee-repair/eam-asset-employee-repair.component.ts
  9. 3
      web-admin-app/src/app/components/apply-asset-flow/eam-asset-employee-scrap/eam-asset-employee-scrap.component.html
  10. 2
      web-admin-app/src/app/components/apply-asset-flow/eam-asset-employee-scrap/eam-asset-employee-scrap.component.ts
  11. 3
      web-admin-app/src/app/components/apply-asset-flow/eam-asset-equipment-repair/eam-asset-equipment-repair.component.html
  12. 2
      web-admin-app/src/app/components/apply-asset-flow/eam-asset-equipment-repair/eam-asset-equipment-repair.component.ts
  13. 3
      web-admin-app/src/app/components/apply-asset-flow/eam-asset-purchase-apply/eam-asset-purchase-apply.component.html
  14. 3
      web-admin-app/src/app/components/apply-asset-flow/eam-asset-purchase-apply/eam-asset-purchase-apply.component.ts
  15. 3
      web-admin-app/src/app/components/apply-asset-flow/eam-asset-stock-goods-use/eam-asset-stock-goods-use.component.html
  16. 3
      web-admin-app/src/app/components/apply-asset-flow/eam-asset-stock-goods-use/eam-asset-stock-goods-use.component.ts
  17. 28
      web-admin-app/src/app/components/apply-asset-flow/flow-result/flow-result.component.html
  18. 0
      web-admin-app/src/app/components/apply-asset-flow/flow-result/flow-result.component.less
  19. 27
      web-admin-app/src/app/components/apply-asset-flow/flow-result/flow-result.component.ts
  20. 2
      web-admin-app/src/app/components/asset-business-revert-form/asset-business-revert-form.component.html
  21. 22
      web-admin-app/src/app/components/asset-form/asset-form.component.html
  22. 19
      web-admin-app/src/app/components/asset-form/asset-form.component.ts
  23. 2
      web-admin-app/src/app/components/asset-select/asset-select.component.ts
  24. 11
      web-admin-app/src/app/components/component-org-tree/component-org-tree.component.ts
  25. 6
      web-admin-app/src/app/components/select-user-by-org/select-user-by-org.component.html
  26. 9
      web-admin-app/src/app/components/select-user-by-org/select-user-by-org.component.ts
  27. 4
      web-admin-app/src/app/constants/index.ts
  28. 2
      web-admin-app/src/app/guards/auth.guard.ts
  29. 333
      web-admin-app/src/app/pages/dashboard/dashboard.component.html
  30. 88
      web-admin-app/src/app/pages/dashboard/dashboard.component.less
  31. 326
      web-admin-app/src/app/pages/dashboard/dashboard.component.ts
  32. 7
      web-admin-app/src/app/pages/fixed-asset/alert/alert-inventory-down/alert-inventory-down.component.ts
  33. 7
      web-admin-app/src/app/pages/fixed-asset/alert/alert-inventory-safety/alert-inventory-safety.component.ts
  34. 7
      web-admin-app/src/app/pages/fixed-asset/alert/alert-inventory-up/alert-inventory-up.component.ts
  35. 23
      web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage/fixed-asset-manage.component.html
  36. 1
      web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage/fixed-asset-manage.component.ts
  37. 16
      web-admin-app/src/app/pages/fixed-asset/stocktaking/stockaking-job/stockaking-job.component.html
  38. 10
      web-admin-app/src/app/pages/fixed-asset/stocktaking/stockaking-plan/stockaking-plan.component.html
  39. 2
      web-admin-app/src/app/pages/fixed-asset/stocktaking/stockaking-plan/stockaking-plan.component.ts
  40. 6
      web-admin-app/src/app/pages/fixed-asset/stocktaking/stocktaking-detail/stocktaking-detail.component.html
  41. 2
      web-admin-app/src/app/pages/fixed-asset/stocktaking/stocktaking-detail/stocktaking-detail.component.ts
  42. 9
      web-admin-app/src/app/pages/flow/flow-my-apply/flow-my-apply.component.html
  43. 2
      web-admin-app/src/app/pages/flow/flow-my-apply/flow-my-apply.component.ts
  44. 7
      web-admin-app/src/app/pages/flow/flow-my-todo/flow-my-todo.component.html
  45. 3
      web-admin-app/src/app/pages/flow/flow-my-todo/flow-my-todo.component.ts
  46. 9
      web-admin-app/src/app/pages/org-setting/org-setting.component.html
  47. 12
      web-admin-app/src/app/services/api.service.ts

17
web-admin-app/README.md

@ -69,3 +69,20 @@
- 驳回
- 取消
# 05-17
- ~~新增用户 按钮位置 #~~
- ~~部门状态 status 类型问题 #~~
- ~~导入提示文字 #~~
- ~~盘点明细 null .assetCode #~~
- ~~开始盘点的按钮颜色 # ~~
- ~~流程处理结果~~
- ~~流程列表状态:finishTime 审批中 /已完成~~
- ~~选择员工 添加 全部 ~~
- ~~资产管理 财务信息 残值率 百分比 / 最小值 0~~
- ~~资产管理 财务信息 caiwufenlei 后面隐藏~~
- ~~盘点计划 状态 启用/禁用 #~~
- ~~归还 #~~
- ~~库存 列表字段 / 仓库、分类字段~~
- ~~ 我处理 不要作废 ~~

3
web-admin-app/src/app/components/apply-asset-flow/asset-employee-apply/asset-employee-apply.component.html

@ -47,6 +47,9 @@
</nz-form-item>
</div>
</div>
@if (data?.value) {
<app-flow-result [flow]="data.value" />
}
</div>
</form>

3
web-admin-app/src/app/components/apply-asset-flow/asset-employee-apply/asset-employee-apply.component.ts

@ -12,6 +12,7 @@ import { NZ_MODAL_DATA } from 'ng-zorro-antd/modal'
import { SupplierSelectComponent } from '../../supplier-select/supplier-select.component'
import { AssetSelectComponent } from '../../asset-select/asset-select.component'
import { WarehouseSelectComponent } from '../../warehouse-select/warehouse-select.component'
import { FlowResultComponent } from '../flow-result/flow-result.component'
@Component({
selector: 'app-asset-employee-apply',
@ -24,6 +25,7 @@ import { WarehouseSelectComponent } from '../../warehouse-select/warehouse-selec
OrgSelectComponent,
PositionSelectComponent,
WarehouseSelectComponent,
FlowResultComponent,
],
templateUrl: './asset-employee-apply.component.html',
styleUrl: './asset-employee-apply.component.less',
@ -44,7 +46,6 @@ export class AssetEmployeeApplyComponent {
uploadLoading = false
ngOnInit(): void {
console.log('this.data', this.data)
this.formGroup = this.fb.group({
id: this.fb.control(null, []),
title: this.fb.control(this.data.value?.name, [FormValidators.required('请输入')]),

3
web-admin-app/src/app/components/apply-asset-flow/asset-employee-loss/asset-employee-loss.component.html

@ -55,6 +55,9 @@
</nz-form-item>
</div>
</div>
<!-- @if (data?.preview) {
<app-flow-result />
} -->
</div>
</form>

3
web-admin-app/src/app/components/apply-asset-flow/eam-asset-employee-handover/eam-asset-employee-handover.component.html

@ -79,6 +79,9 @@
</nz-form-item>
</div>
</div>
@if (data?.value) {
<app-flow-result [flow]="data.value" />
}
</div>
</form>

2
web-admin-app/src/app/components/apply-asset-flow/eam-asset-employee-handover/eam-asset-employee-handover.component.ts

@ -12,6 +12,7 @@ import { NZ_MODAL_DATA } from 'ng-zorro-antd/modal'
import { SupplierSelectComponent } from '../../supplier-select/supplier-select.component'
import { AssetSelectComponent } from '../../asset-select/asset-select.component'
import { WarehouseSelectComponent } from '../../warehouse-select/warehouse-select.component'
import { FlowResultComponent } from '../flow-result/flow-result.component'
@Component({
selector: 'app-eam-asset-employee-handover',
@ -24,6 +25,7 @@ import { WarehouseSelectComponent } from '../../warehouse-select/warehouse-selec
OrgSelectComponent,
PositionSelectComponent,
WarehouseSelectComponent,
FlowResultComponent,
],
templateUrl: './eam-asset-employee-handover.component.html',
styleUrl: './eam-asset-employee-handover.component.less',

3
web-admin-app/src/app/components/apply-asset-flow/eam-asset-employee-repair/eam-asset-employee-repair.component.html

@ -71,6 +71,9 @@
</nz-form-item>
</div>
</div>
@if (data?.value) {
<app-flow-result [flow]="data.value" />
}
</div>
</form>

2
web-admin-app/src/app/components/apply-asset-flow/eam-asset-employee-repair/eam-asset-employee-repair.component.ts

@ -12,6 +12,7 @@ import { NZ_MODAL_DATA } from 'ng-zorro-antd/modal'
import { SupplierSelectComponent } from '../../supplier-select/supplier-select.component'
import { AssetSelectComponent } from '../../asset-select/asset-select.component'
import { WarehouseSelectComponent } from '../../warehouse-select/warehouse-select.component'
import { FlowResultComponent } from '../flow-result/flow-result.component'
@Component({
selector: 'app-eam-asset-employee-repair',
@ -24,6 +25,7 @@ import { WarehouseSelectComponent } from '../../warehouse-select/warehouse-selec
OrgSelectComponent,
PositionSelectComponent,
WarehouseSelectComponent,
FlowResultComponent,
],
templateUrl: './eam-asset-employee-repair.component.html',
styleUrl: './eam-asset-employee-repair.component.less',

3
web-admin-app/src/app/components/apply-asset-flow/eam-asset-employee-scrap/eam-asset-employee-scrap.component.html

@ -86,6 +86,9 @@
</nz-form-item>
</div>
</div>
@if (data?.value) {
<app-flow-result [flow]="data.value" />
}
</div>
</form>

2
web-admin-app/src/app/components/apply-asset-flow/eam-asset-employee-scrap/eam-asset-employee-scrap.component.ts

@ -12,6 +12,7 @@ import { NZ_MODAL_DATA } from 'ng-zorro-antd/modal'
import { SupplierSelectComponent } from '../../supplier-select/supplier-select.component'
import { AssetSelectComponent } from '../../asset-select/asset-select.component'
import { WarehouseSelectComponent } from '../../warehouse-select/warehouse-select.component'
import { FlowResultComponent } from '../flow-result/flow-result.component'
@Component({
selector: 'app-eam-asset-employee-scrap',
@ -24,6 +25,7 @@ import { WarehouseSelectComponent } from '../../warehouse-select/warehouse-selec
OrgSelectComponent,
PositionSelectComponent,
WarehouseSelectComponent,
FlowResultComponent,
],
templateUrl: './eam-asset-employee-scrap.component.html',
styleUrl: './eam-asset-employee-scrap.component.less',

3
web-admin-app/src/app/components/apply-asset-flow/eam-asset-equipment-repair/eam-asset-equipment-repair.component.html

@ -96,6 +96,9 @@
</nz-form-item>
</div>
</div>
@if (data?.value) {
<app-flow-result [flow]="data.value" />
}
</div>
</form>

2
web-admin-app/src/app/components/apply-asset-flow/eam-asset-equipment-repair/eam-asset-equipment-repair.component.ts

@ -12,6 +12,7 @@ import { NZ_MODAL_DATA } from 'ng-zorro-antd/modal'
import { SupplierSelectComponent } from '../../supplier-select/supplier-select.component'
import { AssetSelectComponent } from '../../asset-select/asset-select.component'
import { WarehouseSelectComponent } from '../../warehouse-select/warehouse-select.component'
import { FlowResultComponent } from '../flow-result/flow-result.component'
@Component({
selector: 'app-eam-asset-equipment-repair',
@ -24,6 +25,7 @@ import { WarehouseSelectComponent } from '../../warehouse-select/warehouse-selec
OrgSelectComponent,
PositionSelectComponent,
WarehouseSelectComponent,
FlowResultComponent,
],
templateUrl: './eam-asset-equipment-repair.component.html',
styleUrl: './eam-asset-equipment-repair.component.less',

3
web-admin-app/src/app/components/apply-asset-flow/eam-asset-purchase-apply/eam-asset-purchase-apply.component.html

@ -130,6 +130,9 @@
</nz-form-item>
</div>
</div>
@if (data?.value) {
<app-flow-result [flow]="data.value" />
}
</div>
</form>

3
web-admin-app/src/app/components/apply-asset-flow/eam-asset-purchase-apply/eam-asset-purchase-apply.component.ts

@ -12,6 +12,7 @@ import { NZ_MODAL_DATA } from 'ng-zorro-antd/modal'
import { SupplierSelectComponent } from '../../supplier-select/supplier-select.component'
import { AssetSelectComponent } from '../../asset-select/asset-select.component'
import { WarehouseSelectComponent } from '../../warehouse-select/warehouse-select.component'
import { FlowResultComponent } from '../flow-result/flow-result.component'
@Component({
selector: 'app-eam-asset-purchase-apply',
@ -24,6 +25,7 @@ import { WarehouseSelectComponent } from '../../warehouse-select/warehouse-selec
OrgSelectComponent,
PositionSelectComponent,
WarehouseSelectComponent,
FlowResultComponent,
],
templateUrl: './eam-asset-purchase-apply.component.html',
styleUrl: './eam-asset-purchase-apply.component.less',
@ -65,6 +67,7 @@ export class EamAssetPurchaseApplyComponent {
notes: this.fb.control(null, []),
urgency: this.fb.control(1, []),
assetIdList: this.fb.control([], []),
attach: this.fb.control(null, []),
})

3
web-admin-app/src/app/components/apply-asset-flow/eam-asset-stock-goods-use/eam-asset-stock-goods-use.component.html

@ -48,6 +48,9 @@
</nz-form-item>
</div>
</div>
@if (data?.value) {
<app-flow-result [flow]="data.value" />
}
</div>
</form>

3
web-admin-app/src/app/components/apply-asset-flow/eam-asset-stock-goods-use/eam-asset-stock-goods-use.component.ts

@ -12,6 +12,7 @@ import { NZ_MODAL_DATA } from 'ng-zorro-antd/modal'
import { SupplierSelectComponent } from '../../supplier-select/supplier-select.component'
import { AssetSelectComponent } from '../../asset-select/asset-select.component'
import { WarehouseSelectComponent } from '../../warehouse-select/warehouse-select.component'
import { FlowResultComponent } from '../flow-result/flow-result.component'
@Component({
selector: 'app-eam-asset-stock-goods-use',
@ -24,6 +25,7 @@ import { WarehouseSelectComponent } from '../../warehouse-select/warehouse-selec
OrgSelectComponent,
PositionSelectComponent,
WarehouseSelectComponent,
FlowResultComponent,
],
templateUrl: './eam-asset-stock-goods-use.component.html',
styleUrl: './eam-asset-stock-goods-use.component.less',
@ -57,6 +59,7 @@ export class EamAssetStockGoodsUseComponent {
notes: this.fb.control(null, [FormValidators.required('请输入')]),
urgency: this.fb.control(1, []),
assetIdList: this.fb.control([], []),
})
this.patchValues()

28
web-admin-app/src/app/components/apply-asset-flow/flow-result/flow-result.component.html

@ -0,0 +1,28 @@
<div>
<h2>流程记录</h2>
<div class="mt-4 p-3">
<nz-timeline>
@for (item of flowRecords; track $index) {
<nz-timeline-item [nzDot]="item.finishTime ? undefined : dotTemplate">
<div>
{{ item.createTime }}
<span>
{{ item.comment?.comment }}
</span>
</div>
<div>任务名称:{{ item.taskName }}</div>
<div>审批人:{{ item?.assigneeName ?? '-' }}</div>
@if (item.finishTime) {
<div>
<span> 流程完成时间:{{ item.finishTime }} </span>
<span> 用时:{{ item.duration }} </span>
</div>
}
</nz-timeline-item>
}
</nz-timeline>
<ng-template #dotTemplate>
<span nz-icon nzType="clock-circle-o" style="font-size: 16px"></span>
</ng-template>
</div>
</div>

0
web-admin-app/src/app/components/apply-asset-flow/flow-result/flow-result.component.less

27
web-admin-app/src/app/components/apply-asset-flow/flow-result/flow-result.component.ts

@ -0,0 +1,27 @@
import { Component, Input, OnInit } from '@angular/core'
import { ApiService } from 'app/services'
import { SharedModule } from 'app/shared/shared.module'
import { NzSafeAny } from 'ng-zorro-antd/core/types'
@Component({
selector: 'app-flow-result',
standalone: true,
imports: [SharedModule],
templateUrl: './flow-result.component.html',
styleUrl: './flow-result.component.less',
})
export class FlowResultComponent implements OnInit {
constructor(private api: ApiService) {}
@Input() flow: NzSafeAny = null
flowRecords: NzSafeAny[] = []
ngOnInit(): void {
if (this.flow) {
this.api.getFlowRecord(this.flow.deployId, this.flow.procInsId).subscribe((res) => {
this.flowRecords = res.body.flowList
})
}
}
}

2
web-admin-app/src/app/components/asset-business-revert-form/asset-business-revert-form.component.html

@ -98,7 +98,7 @@
<nz-form-item>
<nz-form-label>资产列表</nz-form-label>
<nz-form-control [nzErrorTip]="errorTpl">
<app-asset-select formControlName="assetIdList" />
<app-asset-select formControlName="assetIdList" [storage]="true" />
</nz-form-control>
</nz-form-item>
</div>

22
web-admin-app/src/app/components/asset-form/asset-form.component.html

@ -269,12 +269,20 @@
<div nz-col [nzSpan]="8">
<nz-form-item>
<nz-form-label>财务分类</nz-form-label>
<nz-form-control [nzErrorTip]="errorTpl">
<app-maintenance-select formControlName="financialCategoryId" />
<nz-form-control [nzErrorTip]="errorTpl" formControlName="financialCategoryId">
<nz-select [nzPlaceHolder]="'请选择'">
@for (item of financialCategory; track $index) {
<nz-option
[nzLabel]="item.financialCategoryName"
[nzValue]="item.financialCategoryId"
>
</nz-option>
}
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="8">
<!-- <div nz-col [nzSpan]="8">
<nz-form-item>
<nz-form-label>费用项目</nz-form-label>
<nz-form-control [nzErrorTip]="errorTpl">
@ -289,7 +297,7 @@
<app-maintenance-select formControlName="financialOption" />
</nz-form-control>
</nz-form-item>
</div>
</div> -->
<div nz-col [nzSpan]="8">
<nz-form-item>
<nz-form-label>入账日期</nz-form-label>
@ -312,6 +320,7 @@
<nz-form-control [nzErrorTip]="errorTpl">
<nz-input-number
class="!w-full"
[nzMin]="0"
formControlName="totalAmountPrice"
nzPlaceHolder="请输入未税成本"
/>
@ -324,6 +333,7 @@
<nz-form-control [nzErrorTip]="errorTpl">
<nz-input-number
class="!w-full"
[nzMin]="0"
formControlName="taxAmountRate"
nzPlaceHolder="请输入资产税额"
/>
@ -336,6 +346,7 @@
<nz-form-control [nzErrorTip]="errorTpl">
<nz-input-number
class="!w-full"
[nzMin]="0"
formControlName="navPrice"
nzPlaceHolder="请输入资产净值"
/>
@ -346,11 +357,14 @@
<nz-form-item>
<nz-form-label>残值率</nz-form-label>
<nz-form-control [nzErrorTip]="errorTpl">
<nz-input-group nzAddOnAfter="%">
<nz-input-number
class="!w-full"
[nzMin]="0"
formControlName="residualsRate"
nzPlaceHolder="请输入残值率"
/>
</nz-input-group>
</nz-form-control>
</nz-form-item>
</div>

19
web-admin-app/src/app/components/asset-form/asset-form.component.ts

@ -6,7 +6,7 @@ import { FormValidators, Utils } from 'app/utils'
import { NzMessageService } from 'ng-zorro-antd/message'
import { AssetCategorySelectComponent } from '../asset-category-select/asset-category-select.component'
import { OrgSelectComponent } from '../org-select/org-select.component'
import { ASSET_SOURCE_MAP, ASSET_STATUS, MAINTENANCE_STATUS, MAINTENANCE_TYPE } from 'app/constants'
import { ASSET_SOURCE_MAP, ASSET_STATUS, MAINTENANCE_STATUS, MAINTENANCE_TYPE, MAX_PAGE_SIZE } from 'app/constants'
import { SelectUserByOrgComponent } from '../select-user-by-org/select-user-by-org.component'
import { ManufacturerSelectComponent } from '../manufacturer-select/manufacturer-select.component'
import { PositionSelectComponent } from '../position-select/position-select.component'
@ -54,6 +54,8 @@ export class AssetFormComponent implements OnInit {
MAINTENANCE_TYPE = MAINTENANCE_TYPE
financialCategory: NzSafeAny[] = []
ngOnInit(): void {
this.formGroup = this.fb.group({
assetId: this.fb.control(null, []),
@ -97,6 +99,21 @@ export class AssetFormComponent implements OnInit {
})
this.patchValues()
this.api
.getBasicFinancialCategory({
depth: '',
financialCategoryId: 0,
financialCategoryName: '',
notes: '',
parentId: 0,
useTerms: 0,
pageSize: MAX_PAGE_SIZE,
pageNum: 1,
})
.subscribe((res) => {
this.financialCategory = res.body.rows
})
}
patchValues() {

2
web-admin-app/src/app/components/asset-select/asset-select.component.ts

@ -134,7 +134,7 @@ export class AssetSelectComponent {
this.allGetedDataMap.forEach((i: NzSafeAny) => {
if (this.table.ref.selected.has(String(i.assetId))) {
if (!this.selectedDataList.some((s) => s.assetId === i.assetId)) {
this.selectedDataList.push({ ...i, count: 1, max: i.count })
this.selectedDataList.push({ ...i, count: i.count === 0 ? 0 : 1, max: i.count })
}
}
})

11
web-admin-app/src/app/components/component-org-tree/component-org-tree.component.ts

@ -31,6 +31,8 @@ export class ComponentOrgTreeComponent implements OnInit {
@Input() companyAndOrg: boolean = false
@Input() selectUer = false
@Output() onOrgSelectedChange = new EventEmitter<NzSafeAny>()
drawerRef?: NzDrawerRef
@ -79,7 +81,9 @@ export class ComponentOrgTreeComponent implements OnInit {
})
}
this.nodes = Utils.buildTree(c, 'organizationId', 'organizationName')
this.nodes = this.selectUer
? [{ title: '全部', key: 'all' }, ...Utils.buildTree(c, 'organizationId', 'organizationName')]
: [...Utils.buildTree(c, 'organizationId', 'organizationName')]
this.expandedKeys = [...this.expandedKeys]
})
}
@ -118,7 +122,10 @@ export class ComponentOrgTreeComponent implements OnInit {
})
if (edit) {
this.isOrg = origin.organizationType !== '2'
this.form.patchValue(origin)
this.form.patchValue({
...origin,
status: origin.status === '0',
})
} else {
this.parentId = origin?.organizationId
}

6
web-admin-app/src/app/components/select-user-by-org/select-user-by-org.component.html

@ -36,7 +36,11 @@
>
<div class="h-96 flex">
<div class="flex-1 org py-3 px-2 overflow-auto">
<app-component-org-tree [createable]="false" (onOrgSelectedChange)="onOrgSelectedChange($event)" />
<app-component-org-tree
[createable]="false"
[selectUer]="true"
(onOrgSelectedChange)="onOrgSelectedChange($event)"
/>
</div>
<div class="flex-1 flex flex-col overflow-hidden relative user-list">
<div class="hd flex items-center justify-between py-2 px-3">

9
web-admin-app/src/app/components/select-user-by-org/select-user-by-org.component.ts

@ -89,14 +89,19 @@ export class SelectUserByOrgComponent implements ControlValueAccessor, OnInit {
onOrgSelectedChange(v?: NzSafeAny, uid?: number) {
this.api
.getUserPage({ pageSize: MAX_PAGE_SIZE, pageNum: 1, userId: uid, organizationId: v?.organizationId })
.getUserPage({
tree: Boolean(v?.organizationId),
pageSize: MAX_PAGE_SIZE,
pageNum: 1,
userId: uid,
organizationId: v?.organizationId,
})
.subscribe((res) => {
if (Array.isArray(res.body?.rows) && res.body.rows.length > 0) {
res.body.rows.forEach((element: NzSafeAny) => {
this.currentUsers = res.body.rows
this.allGetedDataMap.set(element.userId, element)
this.statusChange()
console.log('this.allGetedDataMap', this.allGetedDataMap)
})
}
})

4
web-admin-app/src/app/constants/index.ts

@ -1,5 +1,9 @@
export const MAX_PAGE_SIZE = 10000000
export const LOCALSTORAGKEY = {
quickAction: 'QUICKACTION',
}
export const ASSET_STATUS = [
{ label: '闲置', value: 0 },
{ label: '在用', value: 1 },

2
web-admin-app/src/app/guards/auth.guard.ts

@ -12,7 +12,7 @@ export const authGuard: CanActivateFn = (route, state) => {
return router.createUrlTree(['/login'])
}
permission.loadPermission(authInfo?.permissions ?? [])
permission.isRoot = Boolean(authInfo?.roles.includes('admin'))
// permission.isRoot = Boolean(authInfo?.roles.includes('admin'))
// console.log('authInfo', authInfo, Boolean(authInfo?.roles.includes('admin')), permission)
return true
}

333
web-admin-app/src/app/pages/dashboard/dashboard.component.html

@ -1,87 +1,302 @@
<app-page>
<div>
<app-page class="dashboard">
<div nz-row nzGutter="16">
<div nz-col nzSpan="4">
<div nz-col nzSpan="18">
<nz-card [nzBordered]="false">
<div nz-row nzGutter="16">
<div nz-col nzSpan="6">
<div class="statistic">
<div class="icon">
<span nz-icon nzType="database" nzTheme="outline"></span>
</div>
<div class="flex-1">
<nz-statistic [nzValue]="data.assetTotal.total" [nzTitle]="'资产总数'"></nz-statistic>
<div>
<nz-statistic [nzValue]="counter.totalClient" [nzTitle]="'xx'"></nz-statistic>
<span
[ngClass]="{
'text-green-500': data.assetTotal.change > 0,
'text-red-500': data.assetTotal.change < 0
}"
>
<span [ngClass]="{ hidden: data.assetTotal.change === 0 }">
<span nz-icon nzType="caret-down" nzTheme="outline"></span>
</span>
<span>{{ data.assetTotal.change }}</span>
</span>
<span class="ml-2 text-black opacity-40"> 今日变化 </span>
</div>
</nz-card>
</div>
<div nz-col nzSpan="12">
<nz-card [nzBordered]="false">
<div nz-row nzGutter="24">
<div nz-col nzSpan="8">
<nz-statistic [nzValue]="counter.totalClient" [nzTitle]="'xx'"></nz-statistic>
</div>
<div nz-col nzSpan="8">
<nz-statistic [nzValue]="counter.totalProduct" [nzTitle]="'xx'"></nz-statistic>
</div>
<div nz-col nzSpan="8">
<nz-statistic [nzValue]="counter.totalLicense" [nzTitle]="'xx'"></nz-statistic>
<div nz-col nzSpan="6">
<div class="statistic">
<div class="icon" style="background-color: #98d87d">
<span nz-icon nzType="exception" nzTheme="outline"></span>
</div>
<div class="flex-1">
<nz-statistic
[nzValue]="data.borrowWarning.total"
[nzTitle]="'借用预警'"
></nz-statistic>
<div>
<span
[ngClass]="{
'text-green-500': data.borrowWarning.change > 0,
'text-red-500': data.borrowWarning.change < 0
}"
>
<span [ngClass]="{ hidden: data.borrowWarning.change === 0 }">
<span nz-icon nzType="caret-down" nzTheme="outline"></span>
</span>
<span>{{ data.borrowWarning.change }}</span>
</span>
<span class="ml-2 text-black opacity-40"> 今日变化 </span>
</div>
</nz-card>
</div>
<div nz-col nzSpan="8">
<nz-card [nzBordered]="false">
<div nz-row nzGutter="24">
<div nz-col nzSpan="12">
<nz-statistic [nzValue]="counter.totalClient" [nzTitle]="'xx'"></nz-statistic>
</div>
<div nz-col nzSpan="12">
<nz-statistic [nzValue]="counter.totalProduct" [nzTitle]="'xx'"></nz-statistic>
</div>
<div nz-col nzSpan="6">
<div class="statistic">
<div class="icon" style="background-color: #ffd86e">
<span nz-icon nzType="alert" nzTheme="outline"></span>
</div>
</nz-card>
<div class="flex-1">
<nz-statistic
[nzValue]="data.maintenanceWarning.total"
[nzTitle]="'维保到期预警'"
></nz-statistic>
<div>
<span
[ngClass]="{
'text-green-500': data.maintenanceWarning.change > 0,
'text-red-500': data.maintenanceWarning.change < 0
}"
>
<span [ngClass]="{ hidden: data.maintenanceWarning.change === 0 }">
<span nz-icon nzType="caret-down" nzTheme="outline"></span>
</span>
<span>{{ data.maintenanceWarning.change }}</span>
</span>
<span class="ml-2 text-black opacity-40"> 今日变化 </span>
</div>
</div>
</div>
</div>
<div nz-col nzSpan="6">
<div class="statistic">
<div class="icon" style="background-color: #f3857c">
<span nz-icon nzType="container" nzTheme="outline"></span>
</div>
<div class="flex-1">
<nz-statistic
[nzValue]="data.inventorySecurityWarning.total"
[nzTitle]="'库存安全预警'"
></nz-statistic>
<!-- <div class="hi">
<span
[ngClass]="{
'text-green-500': data.inventorySecurityWarning.change > 0,
'text-red-500': data.inventorySecurityWarning.change < 0
}"
>
<span [ngClass]="{ hidden: data.inventorySecurityWarning.change === 0 }">
<span nz-icon nzType="caret-down" nzTheme="outline"></span>
</span>
<span>{{ data.inventorySecurityWarning.change }}</span>
</span>
<span class="ml-2 text-black opacity-40"> 今日变化 </span>
</div> -->
</div>
</div>
</div>
</div>
</nz-card>
<div class="mt-4"></div>
<div nz-row [nzGutter]="[16, 16]">
<div nz-col [nzSpan]="12">
<nz-card [nzBordered]="false" nzTitle="近30天xx">
<div class="h-80" #chart1Tpl></div>
<div nz-col [nzSpan]="8">
<nz-card [nzBordered]="false" nzTitle="资产状态分布" [nzExtra]="extraStatusTpl">
<ng-template #extraStatusTpl>
<nz-segmented
[(ngModel)]="chartType.c1"
(ngModelChange)="onChartTypeChange(1, $event)"
[nzOptions]="[
{ label: '数量', value: '1' },
{ label: '占比', value: '2' }
]"
/>
</ng-template>
<div class="h-72" #chart1Tpl></div>
</nz-card>
</div>
<div nz-col [nzSpan]="8">
<nz-card [nzBordered]="false" nzTitle="资产存放分布" [nzExtra]="extraPositionTpl">
<ng-template #extraPositionTpl>
<nz-segmented
[(ngModel)]="chartType.c2"
(ngModelChange)="onChartTypeChange(2, $event)"
[nzOptions]="[
{ label: '数量', value: '1' },
{ label: '占比', value: '2' }
]"
/>
</ng-template>
<div class="h-72" #chart2Tpl></div>
</nz-card>
</div>
<div nz-col [nzSpan]="8">
<nz-card [nzBordered]="false" nzTitle="资产类型分布" [nzExtra]="extraCateTpl">
<ng-template #extraCateTpl>
<nz-segmented
[(ngModel)]="chartType.c3"
(ngModelChange)="onChartTypeChange(3, $event)"
[nzOptions]="[
{ label: '数量', value: '1' },
{ label: '占比', value: '2' }
]"
/>
</ng-template>
<div class="h-72" #chart3Tpl></div>
</nz-card>
</div>
<div nz-col [nzSpan]="8">
<nz-card [nzBordered]="false" nzTitle="资产库存分布" [nzExtra]="extraStroageTpl">
<ng-template #extraStroageTpl>
<nz-segmented
[(ngModel)]="chartType.c4"
(ngModelChange)="onChartTypeChange(4, $event)"
[nzOptions]="[
{ label: '数量', value: '1' },
{ label: '占比', value: '2' }
]"
/>
</ng-template>
<div class="h-72" #chart4Tpl></div>
</nz-card>
</div>
<div nz-col [nzSpan]="12">
<nz-card [nzBordered]="false" nzTitle="近30天xxx">
<div class="h-80" #chart2Tpl></div>
<div nz-col [nzSpan]="8">
<nz-card [nzBordered]="false" nzTitle="资产归属分布" [nzExtra]="extraBelongTpl">
<ng-template #extraBelongTpl>
<nz-segmented
[(ngModel)]="chartType.c5"
(ngModelChange)="onChartTypeChange(5, $event)"
[nzOptions]="[
{ label: '数量', value: '1' },
{ label: '占比', value: '2' }
]"
/>
</ng-template>
<div class="h-72" #chart5Tpl></div>
</nz-card>
</div>
<div nz-col [nzSpan]="12">
<nz-card [nzBordered]="false" nzTitle="近30天xx">
<div class="h-80" #chart3Tpl></div>
<div nz-col [nzSpan]="8">
<nz-card [nzBordered]="false" nzTitle="资产使用分布" [nzExtra]="extraUseTpl">
<ng-template #extraUseTpl>
<nz-segmented
[(ngModel)]="chartType.c6"
(ngModelChange)="onChartTypeChange(6, $event)"
[nzOptions]="[
{ label: '数量', value: '1' },
{ label: '占比', value: '2' }
]"
/>
</ng-template>
<div class="h-72" #chart6Tpl></div>
</nz-card>
</div>
<div nz-col [nzSpan]="12">
<nz-card [nzBordered]="false" nzTitle="近30天xx">
<nz-table nzTemplateMode nzSize="small" [nzBordered]="true">
<thead>
<tr>
<th>xx</th>
<!-- <th>版本</th> -->
<th>到期时间</th>
</tr>
</thead>
<tbody>
@for (p of expiringSoon; track $index) {
<tr>
<td>{{ p.clientName }}</td>
<!-- <td></td> -->
<td>
{{ p.endTime * 1000 | date: 'yyyy-MM-dd HH:mm:ss' }}
</td>
</tr>
} @empty {
<tr>
<td [colSpan]="4">
<nz-empty nzNotFoundContent="没有近30天到期的会员"></nz-empty>
</td>
</tr>
</div>
</div>
<div nz-col nzSpan="6">
<div class="cursor-pointer" routerLink="/asset-flow/my-todo">
<nz-card [nzBordered]="false" nzTitle="待我处理" [nzExtra]="todoTpl" [nzBodyStyle]="{ padding: '0' }">
<ng-template #todoTpl>
<span>
<span class="mr-2">
<span class="text-red-500">{{ count || 0 }}</span>
</span>
<span nz-icon nzType="right" nzTheme="outline"></span>
</span>
</ng-template>
</nz-card>
</div>
<div class="mt-3">
<nz-card [nzBordered]="false" nzTitle="快捷操作" [nzExtra]="extraQuickTpl">
<ng-template #extraQuickTpl>
<a (click)="onSort(sortTpl)"> 排序 </a>
</ng-template>
<ng-template #sortTpl>
<div class="block -mt-4 mb-2 text-black opacity-40">拖拽排序</div>
<div cdkDropList class="example-list" (cdkDropListDropped)="drop($event)">
@for (i of quickAction; track i.link) {
<div class="example-box" cdkDrag>
<button nz-button nzType="text" cdkDragHandle>
<span nz-icon nzType="holder" nzTheme="outline"></span>
</button>
<span class="flex-1 ml-2">
{{ i.title }}
</span>
</div>
}
</div>
</ng-template>
<nz-carousel class="h-[164px] select-none">
@for (g of quickActionGroup; track $index) {
<div nz-carousel-content>
<ul class="flex items-center flex-wrap">
@for (i of g; track $index) {
<li
[routerLink]="i.link"
class="cursor-pointer w-1/4 mb-3 flex flex-col items-center justify-center"
>
<div class="icon">
<span nz-icon [nzType]="i.icon" nzTheme="outline"></span>
</div>
<div class="mt-1">
{{ i.title }}
</div>
</li>
}
</tbody>
</nz-table>
</ul>
</div>
}
</nz-carousel>
</nz-card>
</div>
<div class="mt-3">
<nz-card [nzBordered]="false" nzTitle="最近新增资产" [nzExtra]="extraNewTpl">
<ng-template #extraNewTpl>
<button nz-button nzType="link" nzSize="small" routerLink="/fixed-asset/manage/list">
查看全部资产
</button>
</ng-template>
<div class="-mt-4 h-[530px] overflow-auto">
<nz-list [nzBordered]="false">
@for (item of data.recentlyAddedAssets; track item) {
<nz-list-item>
<div>
<div>
<span nz-typography>
{{ item.name }}
</span>
</div>
<div class="text-black opacity-40">
<span>
{{ item.assetCode }}
</span>
<span class="ml-3">
{{ item.createTime }}
</span>
</div>
</div>
</nz-list-item>
}
</nz-list>
</div>
</nz-card>
</div>
</div>

88
web-admin-app/src/app/pages/dashboard/dashboard.component.less

@ -0,0 +1,88 @@
.dashboard {
.statistic {
@apply flex;
}
.icon {
display: block;
width: 48px;
height: 48px;
border-radius: 50%;
background-color: #1890ff;
color: #fff;
font-size: 20px;
@apply flex items-center justify-center mr-2 flex-shrink-0;
}
[nz-carousel-content] {
text-align: center;
height: 160px !important;
}
::ng-deep {
.ant-carousel .slick-dots-bottom {
bottom: 0;
}
.ant-carousel .slick-dots li button {
background-color: rgba(0, 0, 0, .35);
}
.ant-carousel .slick-dots li.slick-active button {
background-color: #1890ff;
}
}
}
.example-list {
width: 500px;
max-width: 100%;
border: solid 1px #ccc;
min-height: 30px;
display: block;
background: white;
border-radius: 4px;
overflow: hidden;
}
.example-box {
padding: 6px 10px;
border-bottom: solid 1px #ccc;
color: rgba(0, 0, 0, 0.87);
display: flex;
flex-direction: row;
align-items: center;
box-sizing: border-box;
cursor: move;
background: white;
font-size: 14px;
}
.cdk-drag-preview {
box-sizing: border-box;
border-radius: 4px;
box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2),
0 8px 10px 1px rgba(0, 0, 0, 0.14),
0 3px 14px 2px rgba(0, 0, 0, 0.12);
}
.cdk-drag-placeholder {
opacity: 0;
}
.cdk-drag-animating {
transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
}
.example-box:last-child {
border: none;
}
.example-list.cdk-drop-list-dragging .example-box:not(.cdk-drag-placeholder) {
transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
}

326
web-admin-app/src/app/pages/dashboard/dashboard.component.ts

@ -1,8 +1,13 @@
import { AfterViewInit, Component, ElementRef, HostListener, OnInit, ViewChild } from '@angular/core'
import { AfterViewInit, Component, ElementRef, HostListener, OnInit, TemplateRef, ViewChild } from '@angular/core'
import { init, EChartsType } from 'echarts'
import { SharedModule } from '../../shared/shared.module'
import { ApiService } from 'app/services'
import { ConsoleClientTopDTO, ConsoleCountDTO, ConsoleExpireDTO } from 'app/services/api.dto'
import { NzSafeAny } from 'ng-zorro-antd/core/types'
import { NzModalService } from 'ng-zorro-antd/modal'
import { NzMessageService } from 'ng-zorro-antd/message'
import { CdkDragDrop, CdkDropList, CdkDrag, moveItemInArray } from '@angular/cdk/drag-drop'
import { LOCALSTORAGKEY } from 'app/constants'
const antvColor = [
'#5B8FF9',
@ -17,15 +22,35 @@ const antvColor = [
'#F08BB4',
]
const defaultAction = [
{ icon: 'database', title: '资产管理', link: '/fixed-asset/manage/list' },
{ icon: 'download', title: '资产入库', link: '/fixed-asset/manage/entry' },
{ icon: 'user-add', title: '资产领用', link: '/fixed-asset/manage/distribution' },
{ icon: 'import', title: '资产退库', link: '/fixed-asset/manage/return' },
{ icon: 'node-expand', title: '资产借用', link: '/fixed-asset/manage/borrow' },
{ icon: 'node-collapse', title: '资产归还', link: '/fixed-asset/manage/revert' },
{ icon: 'node-index', title: '资产调拨', link: '/fixed-asset/manage/allot' },
{ icon: 'sync', title: '资产转换', link: '/fixed-asset/manage/transfer' },
{ icon: 'delete', title: '资产报废', link: '/fixed-asset/manage/scrap' },
{ icon: 'profile', title: '盘点计划', link: '/fixed-asset/stocktaking/plan' },
{ icon: 'file-protect', title: '盘点任务', link: '/fixed-asset/stocktaking/job/list' },
{ icon: 'carry-out', title: '维修登记', link: '/fixed-asset/repair/list' },
{ icon: 'alert', title: '故障登记', link: '/fixed-asset/repair/fault' },
]
@Component({
standalone: true,
imports: [SharedModule],
imports: [SharedModule, CdkDropList, CdkDrag],
selector: 'app-dashboard',
templateUrl: './dashboard.component.html',
styleUrls: ['./dashboard.component.less'],
})
export class DashboardComponent implements OnInit, AfterViewInit {
constructor(private api: ApiService) {}
constructor(
private api: ApiService,
private modal: NzModalService,
private msg: NzMessageService,
) {}
@ViewChild('chart1Tpl') chart1!: ElementRef<HTMLDivElement>
@ -33,47 +58,186 @@ export class DashboardComponent implements OnInit, AfterViewInit {
@ViewChild('chart3Tpl') chart3!: ElementRef<HTMLDivElement>
@ViewChild('chart4Tpl') chart4!: ElementRef<HTMLDivElement>
@ViewChild('chart5Tpl') chart5!: ElementRef<HTMLDivElement>
@ViewChild('chart6Tpl') chart6!: ElementRef<HTMLDivElement>
echartRef1?: EChartsType
echartRef2?: EChartsType
echartRef3?: EChartsType
echartRef4?: EChartsType
echartRef5?: EChartsType
echartRef6?: EChartsType
counter: ConsoleCountDTO = { totalClient: 0, totalLicense: 0, totalProduct: 0 }
expiringSoon: ConsoleExpireDTO[] = []
clientTopTen: ConsoleClientTopDTO[] = []
chartType = {
c1: 0,
c2: 0,
c3: 0,
c4: 0,
c5: 0,
c6: 0,
}
data = {
assetCategoryChart: [],
assetInventoryChart: [],
assetOwnChart: [],
assetPositionChart: [],
assetStatusChart: [],
assetUseChart: [],
recentlyAddedAssets: [] as NzSafeAny[],
assetTotal: {
change: 0,
total: 0,
},
borrowWarning: { change: 0, total: 0 },
inventorySecurityWarning: { change: 0, total: 0 },
maintenanceWarning: { change: 0, total: 0 },
todo: null,
}
@HostListener('window:resize')
onResize() {
// this.echartRef1?.resize();
this.echartRef1?.resize()
this.echartRef2?.resize()
this.echartRef3?.resize()
this.echartRef4?.resize()
this.echartRef5?.resize()
this.echartRef6?.resize()
}
count = 0
quickActionGroup: NzSafeAny[] = []
quickAction: NzSafeAny[] = []
ngOnInit(): void {
// this.api.getDashboardCounter().subscribe((res) => {
// this.counter = res.data
// })
// this.api.getDashboardExpire().subscribe((res) => {
// this.expiringSoon = res.data
// })
// this.api.getDashboardClientTop().subscribe((res) => {
// this.clientTopTen = res.data
// this.initChart2()
// })
this.api.getHomeData().subscribe((res) => {
this.data = res.body
this.initChartBar(this.chart1, this.data.assetStatusChart, 1)
this.initChartBar(this.chart2, this.data.assetPositionChart, 2)
this.initChartBar(this.chart3, this.data.assetCategoryChart, 3)
this.initChartBar(this.chart4, this.data.assetInventoryChart, 4)
this.initChartBar(this.chart5, this.data.assetOwnChart, 5)
this.initChartBar(this.chart6, this.data.assetUseChart, 6)
})
this.api.getHomeTodocountData().subscribe((res) => {
this.count = res.body
})
this.initQuickAction()
}
ngAfterViewInit(): void {
// this.initChart1();
this.initChart2(this.chart1.nativeElement)
this.initChart2(this.chart2.nativeElement)
this.initChart2(this.chart3.nativeElement)
this.domMap = [this.chart1, this.chart2, this.chart3, this.chart4, this.chart5, this.chart6]
}
onSort(nzContent: TemplateRef<{}>) {
this.modal.create({
nzTitle: '快捷操作排序',
nzContent,
nzFooter: null,
})
}
initChart1() {
const el = this.chart1.nativeElement
drop(event: CdkDragDrop<string[]>) {
moveItemInArray(this.quickAction, event.previousIndex, event.currentIndex)
localStorage.setItem(LOCALSTORAGKEY.quickAction, JSON.stringify(this.quickAction))
this.groupQuickAction()
this.msg.success('排序成功')
}
initQuickAction() {
let quickAction = []
try {
quickAction = JSON.parse(localStorage.getItem(LOCALSTORAGKEY.quickAction) ?? '[]')
} catch (error) {}
if (quickAction.length === 0) {
quickAction = defaultAction
}
this.quickAction = quickAction
this.groupQuickAction()
}
groupQuickAction() {
this.quickActionGroup = this.quickAction.reduce((a, c, i) => {
const g = Math.floor(i / 8)
if (a[g]) {
a[g].push(c)
} else {
a[g] = [c]
}
return a
}, [] as NzSafeAny[])
}
dataMap = [
'assetStatusChart',
'assetPositionChart',
'assetCategoryChart',
'assetInventoryChart',
'assetOwnChart',
'assetUseChart',
]
domMap = [this.chart1, this.chart2, this.chart3, this.chart4, this.chart5, this.chart6]
echartRefMap = [
this.echartRef1,
this.echartRef2,
this.echartRef3,
this.echartRef4,
this.echartRef5,
this.echartRef6,
]
onChartTypeChange(n: number, index: number) {
//@ts-expect-error
this['echartRef' + n]?.dispose()
if (index === 0) {
//@ts-expect-error
this.initChartBar(this.domMap[n - 1], this.data[this.dataMap[n - 1]], n)
} else {
//@ts-expect-error
this.initPieChart(this.domMap[n - 1], this.data[this.dataMap[n - 1]], n)
}
}
initChartBar(e: ElementRef<HTMLDivElement>, data: NzSafeAny[] = [], ref?: number) {
const el = e.nativeElement
if (el) {
this.echartRef1 = init(el)
this.echartRef1.setOption({
let names: NzSafeAny[] = []
let values: NzSafeAny[] = []
data.forEach((i) => {
names.push(i.name)
values.push(i.total)
})
//@ts-expect-error
if (this['echartRef' + ref]) {
//@ts-expect-error
this['echartRef' + ref].dispose()
}
//@ts-expect-error
this['echartRef' + ref] = init(el)
// this.echartRefMap.push(ref)
//@ts-expect-error
this['echartRef' + ref].setOption({
color: antvColor,
tooltip: {
trigger: 'axis',
@ -85,20 +249,21 @@ export class DashboardComponent implements OnInit, AfterViewInit {
},
},
legend: {
data: ['晶未智慧安全平台', 'NG-WAF', 'DLP', 'API'],
data: names,
},
grid: {
left: '10px',
right: '10px',
left: '3%',
right: '3%',
bottom: '3%',
top: '3%',
containLabel: true,
},
xAxis: [
{
type: 'category',
boundaryGap: false,
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
data: names,
},
],
yAxis: [
@ -108,96 +273,51 @@ export class DashboardComponent implements OnInit, AfterViewInit {
],
series: [
{
name: '晶未智慧安全平台',
type: 'line',
smooth: true,
areaStyle: {
opacity: 0.2,
},
emphasis: {
focus: 'series',
},
data: [620, 332, 401, 534, 190, 330, 410],
},
{
name: 'NG-WAF',
type: 'line',
smooth: true,
areaStyle: {
opacity: 0.2,
},
emphasis: {
focus: 'series',
},
data: [220, 182, 191, 234, 290, 330, 310],
},
{
name: 'API',
type: 'line',
smooth: true,
areaStyle: {
opacity: 0.2,
},
emphasis: {
focus: 'series',
},
data: [55, 612, 491, 34, 90, 200, 411],
},
{
name: 'DLP',
type: 'line',
smooth: true,
areaStyle: {
opacity: 0.2,
},
emphasis: {
focus: 'series',
},
data: [20, 162, 291, 134, 390, 300, 10],
data: values,
type: 'bar',
},
],
})
}
}
initChart2(e: HTMLElement) {
initPieChart(e: ElementRef<HTMLDivElement>, data: NzSafeAny[] = [], ref?: number) {
// const el = this.chart2.nativeElement
const el = e
const el = e.nativeElement
const total = data.reduce((a, b) => a + b.total, 0)
data = data.map((i) => {
return {
name: i.name,
value: Math.round((i.total / total) * 100),
}
})
if (el) {
this.echartRef2 = init(el)
this.echartRef2.setOption({
//@ts-expect-error
this['echartRef' + ref] = init(el)
//@ts-expect-error
this['echartRef' + ref].setOption({
color: antvColor,
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
label: {
backgroundColor: '#6a7985',
},
trigger: 'item',
formatter: '{b}: {d}%',
},
},
grid: {
left: '10px',
right: '10px',
bottom: '3%',
containLabel: true,
},
xAxis: {
type: 'category',
// data: this.clientTopTen.map((i) => i.clientName),
data: Array.from({ length: 30 }, (_, i) => i + 1),
},
yAxis: {
type: 'value',
legend: {
type: 'scroll',
// orient: 'vertical',
bottom: 'bottom',
},
series: [
{
// data: this.clientTopTen.map((i) => i.count),
data: [
120, 200, 150, 80, 70, 110, 130, 120, 200, 150, 80, 70, 110, 130, 120, 200, 150, 80, 70,
110, 130, 110, 130, 110, 130, 110, 130, 110, 130, 130,
],
type: 'bar',
type: 'pie',
radius: '50%',
data: data,
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)',
},
},
},
],
})

7
web-admin-app/src/app/pages/fixed-asset/alert/alert-inventory-down/alert-inventory-down.component.ts

@ -40,12 +40,15 @@ export class AlertInventoryDownComponent {
// rowKey: 'id',
// })
.setColumn([
{ key: '_category', title: '资产分类', visible: true },
{ key: 'categoryName', title: '资产分类', visible: true },
{ key: 'assetCode', title: '资产编号', visible: true },
{ key: 'name', title: '名称', visible: true },
{ key: 'model', title: '规格型号', visible: true },
{ key: '_warehouse', title: '仓库', visible: true },
{ key: 'warehouseName', title: '仓库', visible: true },
{ key: 'safetyLimit', title: '安全库存', visible: true, width: '100px' },
{ key: 'upperLimit', title: '库存上限', visible: true, width: '100px' },
{ key: 'lowerLimit', title: '库存下限', visible: true, width: '100px' },
// { key: 'createTime', title: '创建时间', visible: true },
])
}

7
web-admin-app/src/app/pages/fixed-asset/alert/alert-inventory-safety/alert-inventory-safety.component.ts

@ -40,12 +40,15 @@ export class AlertInventorySafetyComponent {
// rowKey: 'id',
// })
.setColumn([
{ key: '_category', title: '资产分类', visible: true },
{ key: 'categoryName', title: '资产分类', visible: true },
{ key: 'assetCode', title: '资产编号', visible: true },
{ key: 'name', title: '名称', visible: true },
{ key: 'model', title: '规格型号', visible: true },
{ key: '_warehouse', title: '仓库', visible: true },
{ key: 'warehouseName', title: '仓库', visible: true },
{ key: 'safetyLimit', title: '安全库存', visible: true, width: '100px' },
{ key: 'upperLimit', title: '库存上限', visible: true, width: '100px' },
{ key: 'lowerLimit', title: '库存下限', visible: true, width: '100px' },
// { key: 'createTime', title: '创建时间', visible: true },
])
}

7
web-admin-app/src/app/pages/fixed-asset/alert/alert-inventory-up/alert-inventory-up.component.ts

@ -40,12 +40,15 @@ export class AlertInventoryUpComponent {
// rowKey: 'id',
// })
.setColumn([
{ key: '_category', title: '资产分类', visible: true },
{ key: 'categoryName', title: '资产分类', visible: true },
{ key: 'assetCode', title: '资产编号', visible: true },
{ key: 'name', title: '名称', visible: true },
{ key: 'model', title: '规格型号', visible: true },
{ key: '_warehouse', title: '仓库', visible: true },
{ key: 'warehouseName', title: '仓库', visible: true },
{ key: 'safetyLimit', title: '安全库存', visible: true, width: '100px' },
{ key: 'upperLimit', title: '库存上限', visible: true, width: '100px' },
{ key: 'lowerLimit', title: '库存下限', visible: true, width: '100px' },
// { key: 'createTime', title: '创建时间', visible: true },
])
}

23
web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage/fixed-asset-manage.component.html

@ -243,10 +243,7 @@
</ng-template>
<ng-template #importExcelTpl>
<div nz-form>
<nz-alert [nzMessage]="copyTextTpl">
<ng-template #copyTextTpl> 按照要求填写Excel数据,系统会对部分字段做验证! </ng-template>
</nz-alert>
<div class="mt-3">
<div class="mb-3">
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired> 模版文件 </nz-form-label>
<nz-form-control [nzSpan]="12">
@ -264,5 +261,23 @@
</nz-form-control>
</nz-form-item>
</div>
<nz-alert [nzMessage]="copyTextTpl">
<ng-template #copyTextTpl>
按照要求填写Excel数据,系统会对部分字段做验证! <br />
资产导入规则 字段填写要求:<br />
1、资产编码:资产编号由后台自动生成,导入数据时不填写<br />
2、资产分类:填写系统中存在的资产分类名称,若资产分类存在重名时,请同时填写上资产分类的id<br />
3、所属公司:填写系统中存在的公司名称,若公司存在重名时,请同时填写上公司的id<br />
4、使用组织:填写系统中存在的组织名称,若组织存在重名时,请同时填写上组织的id<br />
5、管理人员:填写系统中存在的管理员姓名,若管理员姓名存在重名时,请同时填写上管理员id<br />
6、供应商:填写系统中存在的供应商名称,若供应商存在重名时,请同时填写上供应商的id<br />
7、资产厂商:填写系统中存在的资产厂商名称,若资产厂商存在重名时,请同时填写上资产厂商的id<br />
8、使用人员:填写系统中存在的账户姓名,若账户姓名存在重名时,请同时填写上使用人员id<br />
9、存放位置:填写系统中存在的存放位置名称,若存放位置名称存在重名时,请同时填写上存放位置id<br />
10、维保信息_维保厂商:填写系统中存在的维保厂商名称,若维保厂商名称存在重名时,请同时填写上维保厂商id<br />
11、日期格式:yyyy-MM-dd HH:mm:ss<br />
12、财务信息:保留2位小数,若您填写超过2位小数后,系统会自动做四舍五入处理<br />
</ng-template>
</nz-alert>
</div>
</ng-template>

1
web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage/fixed-asset-manage.component.ts

@ -176,6 +176,7 @@ export class FixedAssetManageComponent {
this.importModalRef = this.modal.create({
nzTitle: '资产数据导入',
nzContent,
nzWidth: 800,
nzFooter: null,
})
}

16
web-admin-app/src/app/pages/fixed-asset/stocktaking/stockaking-job/stockaking-job.component.html

@ -73,10 +73,22 @@
<ng-template #tableActionTpl>
<nz-space>
<button *nzSpaceItem nz-button nzType="primary" (click)="onCreate()">新建</button>
<button *nzSpaceItem [disabled]="table.ref.selected.size === 0" nz-button (click)="onBegin()">
<button
*nzSpaceItem
nzType="primary"
[disabled]="table.ref.selected.size === 0"
nz-button
(click)="onBegin()"
>
开始盘点
</button>
<button *nzSpaceItem [disabled]="table.ref.selected.size === 0" nz-button (click)="onStop()">
<button
*nzSpaceItem
nzType="primary"
[disabled]="table.ref.selected.size === 0"
nz-button
(click)="onStop()"
>
结束盘点
</button>
</nz-space>

10
web-admin-app/src/app/pages/fixed-asset/stocktaking/stockaking-plan/stockaking-plan.component.html

@ -24,16 +24,10 @@
@case ('status') {
@switch (data) {
@case (0) {
<nz-badge [nzText]="'未开始'" [nzStatus]="'default'" />
<nz-badge [nzText]="'禁用'" [nzStatus]="'error'" />
}
@case (1) {
<nz-badge [nzText]="'进行中'" [nzStatus]="'processing'" />
}
@case (2) {
<nz-badge [nzText]="'取消'" [nzStatus]="'error'" />
}
@case (3) {
<nz-badge [nzText]="'已完成'" [nzStatus]="'success'" />
<nz-badge [nzText]="'启用'" [nzStatus]="'success'" />
}
@default {
-

2
web-admin-app/src/app/pages/fixed-asset/stocktaking/stockaking-plan/stockaking-plan.component.ts

@ -163,6 +163,7 @@ export class StockakingPlanComponent {
ownCompanyId: data._ownCompany?.organizationId + '',
useOrganizationId: data._useOrganization?.organizationId + '',
warehouseId: data._warehouse?.warehouseId,
status: data.status === 1,
})
}
this.drawerRef = this.drawer.create({
@ -193,6 +194,7 @@ export class StockakingPlanComponent {
stocktakingUserId: value.stocktakingUserId?.[0],
head: value.head?.[0],
useUserId: value.useUserId?.[0],
status: value.status ? 1 : 0,
})
.subscribe((res) => {
this.msg.success(res.desc)

6
web-admin-app/src/app/pages/fixed-asset/stocktaking/stocktaking-detail/stocktaking-detail.component.html

@ -28,13 +28,13 @@
</nz-tag>
}
@case ('code') {
{{ row?._asset.assetCode ?? '-' }}
{{ row?._asset?.assetCode ?? '-' }}
}
@case ('name') {
{{ row?._asset.name ?? '-' }}
{{ row?._asset?.name ?? '-' }}
}
@case ('category') {
{{ row?._asset._category?.categoryName ?? '-' }}
{{ row?._asset?._category?.categoryName ?? '-' }}
}
@case ('_warehouse') {
{{ data?.name ?? '-' }}

2
web-admin-app/src/app/pages/fixed-asset/stocktaking/stocktaking-detail/stocktaking-detail.component.ts

@ -79,7 +79,7 @@ export class StocktakingDetailComponent {
{ key: 'id', title: '主键', visible: true },
{ key: 'code', title: '资产编号', visible: true },
{ key: 'name', title: '资产名称', visible: true },
{ key: 'category', title: '资产分类', visible: true },
// { key: 'category', title: '资产分类', visible: true },
{ key: 'status', title: '盘点状态', visible: true },
{ key: 'createTime', title: '操作时间', visible: true },
// { key: '_ownCompany', title: '所属公司', visible: true },

9
web-admin-app/src/app/pages/flow/flow-my-apply/flow-my-apply.component.html

@ -12,7 +12,14 @@
<nz-tag> {{ data.userName }} </nz-tag>
}
@case ('procVars') {
{{ data.title }}
{{ data?.title }}
}
@case ('status') {
@if (row.finishTime) {
<nz-badge nzText="已完成" [nzStatus]="'success'" />
} @else {
<nz-badge nzText="进行中" [nzStatus]="'processing'" />
}
}
@case ('urgency') {
<nz-tag>

2
web-admin-app/src/app/pages/flow/flow-my-apply/flow-my-apply.component.ts

@ -48,7 +48,7 @@ export class FlowMyApplyComponent {
// })
.setColumn([
{ key: 'procVars', title: '名称', visible: true },
// { key: 'status', title: '审批状态', visible: true },
{ key: 'status', title: '流程状态', visible: true },
{ key: 'urgency', title: '紧急程度', visible: true },
{ key: 'procDefName', title: '流程类型', visible: true },
{ key: 'assigneeName', title: '审批人', visible: true },

7
web-admin-app/src/app/pages/flow/flow-my-todo/flow-my-todo.component.html

@ -14,6 +14,13 @@
@case ('procVars') {
{{ data.title }}
}
@case ('status') {
@if (row.finishTime) {
<nz-badge nzText="已完成" [nzStatus]="'success'" />
} @else {
<nz-badge nzText="进行中" [nzStatus]="'processing'" />
}
}
@case ('urgency') {
<nz-tag>
{{ data === 2 ? '紧急' : '普通' }}

3
web-admin-app/src/app/pages/flow/flow-my-todo/flow-my-todo.component.ts

@ -48,6 +48,7 @@ export class FlowMyTodoComponent {
.setColumn([
{ key: 'procVars', title: '名称', visible: true },
// { key: 'status', title: '审批状态', visible: true },
{ key: 'status', title: '流程状态', visible: true },
{ key: 'urgency', title: '紧急程度', visible: true },
{ key: 'procDefName', title: '流程类型', visible: true },
// { key: 'assigneeName', title: '审批人', visible: true },
@ -57,7 +58,7 @@ export class FlowMyTodoComponent {
])
.setRowOperate([
{ title: '查看', onClick: this.onDetail.bind(this) },
{ title: '作废', onClick: this.cancleFlow.bind(this) },
// { title: '作废', onClick: this.cancleFlow.bind(this) },
])
}

9
web-admin-app/src/app/pages/org-setting/org-setting.component.html

@ -1,4 +1,4 @@
<app-page class="p-3" [actions]="actionsTpl">
<app-page class="p-3">
<ng-template #actionsTpl>
<nz-space>
<button
@ -17,7 +17,12 @@
<app-component-org-tree class="block w-60" (onOrgSelectedChange)="onOrgSelectedChange($event)" />
</nz-card>
<div class="flex-1 pl-3 overflow-hidden">
<app-server-paginated-table [options]="table" [renderColumn]="renderColumnTpl" [formGroup]="queryForm">
<app-server-paginated-table
[options]="table"
[tableAction]="actionsTpl"
[renderColumn]="renderColumnTpl"
[formGroup]="queryForm"
>
<ng-template #renderColumnTpl let-data let-key="key" let-row="row">
@switch (key) {
@case ('avatar') {

12
web-admin-app/src/app/services/api.service.ts

@ -60,6 +60,12 @@ export class ApiService {
return this.http.post<JwResponse>('/api/oauth/logout', null)
}
getHomeTodocountData() {
return this.http.post<JwResponse>('/api/flowable/task/todoListCount', null)
}
getHomeData() {
return this.http.post<JwResponse>('/api/home/data', null)
}
getOrgTree() {
return this.http.post<JwResponse>('/api/umsOrganization/tree', null)
}
@ -118,6 +124,9 @@ export class ApiService {
return this.http.post<JwResponse>('/api/umsRole/update', data)
}
getBasicFinancialCategory(data: {}) {
return this.http.post<JwResponse>('/api/eamBasicFinancialCategory/list', data)
}
getAssetPage(data: {}) {
return this.http.post<JwResponse>('/api/eamAsset/list', data)
}
@ -529,6 +538,9 @@ export class ApiService {
getFlowForms(data: {}) {
return this.http.post<JwResponse>(`/api/flForm/all`, data)
}
getFlowRecord(deployId: string, procInsId: string) {
return this.http.get<JwResponse>(`/api/flowable/task/flowRecord?deployId=${deployId}&procInsId=${procInsId}`)
}
setFlowFormsAssignee(data: {}) {
return this.http.post<JwResponse>(`/api/flForm/assignee`, null, {
params: data,

Loading…
Cancel
Save