+
- 固资台账
-
- 固资流程
- 库存物品
- - 盘点管理
+ -
+
+
+
- 预警中心
- - 基础数据
+
+ -
+
+ -
+ 物品档案
+
+ -
+ 物品分类
+
+ -
+ 生产商
+
+ -
+ 供应商
+
+ -
+ 维保商
+
+ -
+ 存放位置
+
+ -
+ 存放仓库
+
+
+
+
- 系统设置
-
+
+
+
diff --git a/web-admin-app/src/app/pages/fixed-asset/fixed-asset.component.less b/web-admin-app/src/app/pages/fixed-asset/fixed-asset.component.less
index 0bf4d7d..9d03848 100644
--- a/web-admin-app/src/app/pages/fixed-asset/fixed-asset.component.less
+++ b/web-admin-app/src/app/pages/fixed-asset/fixed-asset.component.less
@@ -1,4 +1,6 @@
-:host {
- display: flex !important;
- width: 100%;
-}
\ No newline at end of file
+// :host {
+// display: flex !important;
+// width: auto;
+// overflow: hidden;
+
+// }
\ No newline at end of file
diff --git a/web-admin-app/src/app/pages/fixed-asset/ledger/fixed-asset-belong/fixed-asset-belong.component.ts b/web-admin-app/src/app/pages/fixed-asset/ledger/fixed-asset-belong/fixed-asset-belong.component.ts
index 1831785..13e06f3 100644
--- a/web-admin-app/src/app/pages/fixed-asset/ledger/fixed-asset-belong/fixed-asset-belong.component.ts
+++ b/web-admin-app/src/app/pages/fixed-asset/ledger/fixed-asset-belong/fixed-asset-belong.component.ts
@@ -1,7 +1,7 @@
import { Component } from '@angular/core'
import { FormControl, FormGroup } from '@angular/forms'
-import { AnyObject, TableOption } from 'app/components/server-paginated-table'
-import { ComponentOrgTreeComponent } from 'app/pages/component-org-tree/component-org-tree.component'
+import { AnyObject, TableOption } from 'app/shared/components/server-paginated-table'
+import { ComponentOrgTreeComponent } from 'app/components/component-org-tree/component-org-tree.component'
import { ApiService } from 'app/services'
import { SharedModule } from 'app/shared/shared.module'
import { format } from 'date-fns'
diff --git a/web-admin-app/src/app/pages/fixed-asset/ledger/fixed-asset-category/fixed-asset-category.component.ts b/web-admin-app/src/app/pages/fixed-asset/ledger/fixed-asset-category/fixed-asset-category.component.ts
index d1177e8..3d5ebbe 100644
--- a/web-admin-app/src/app/pages/fixed-asset/ledger/fixed-asset-category/fixed-asset-category.component.ts
+++ b/web-admin-app/src/app/pages/fixed-asset/ledger/fixed-asset-category/fixed-asset-category.component.ts
@@ -1,6 +1,6 @@
import { Component } from '@angular/core'
import { FormControl, FormGroup } from '@angular/forms'
-import { AnyObject, TableOption } from 'app/components/server-paginated-table'
+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'
diff --git a/web-admin-app/src/app/pages/fixed-asset/ledger/fixed-asset-employee/fixed-asset-employee.component.ts b/web-admin-app/src/app/pages/fixed-asset/ledger/fixed-asset-employee/fixed-asset-employee.component.ts
index 585af41..da794c7 100644
--- a/web-admin-app/src/app/pages/fixed-asset/ledger/fixed-asset-employee/fixed-asset-employee.component.ts
+++ b/web-admin-app/src/app/pages/fixed-asset/ledger/fixed-asset-employee/fixed-asset-employee.component.ts
@@ -1,6 +1,6 @@
import { Component } from '@angular/core'
import { FormControl, FormGroup } from '@angular/forms'
-import { AnyObject, TableOption } from 'app/components/server-paginated-table'
+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'
diff --git a/web-admin-app/src/app/pages/fixed-asset/ledger/fixed-asset-ledger/fixed-asset-ledger.component.ts b/web-admin-app/src/app/pages/fixed-asset/ledger/fixed-asset-ledger/fixed-asset-ledger.component.ts
index 74d3c42..5348189 100644
--- a/web-admin-app/src/app/pages/fixed-asset/ledger/fixed-asset-ledger/fixed-asset-ledger.component.ts
+++ b/web-admin-app/src/app/pages/fixed-asset/ledger/fixed-asset-ledger/fixed-asset-ledger.component.ts
@@ -1,6 +1,6 @@
import { Component, OnInit } from '@angular/core'
import { ActivatedRoute, NavigationEnd, Router } from '@angular/router'
-import { AppPageComponent } from 'app/components/app-page/app-page.component'
+
import { SharedModule } from 'app/shared/shared.module'
import { Subscription, filter } from 'rxjs'
@@ -38,7 +38,7 @@ const tabs = [
@Component({
selector: 'app-fixed-asset-ledger',
standalone: true,
- imports: [SharedModule, AppPageComponent],
+ imports: [SharedModule],
templateUrl: './fixed-asset-ledger.component.html',
styleUrl: './fixed-asset-ledger.component.less',
})
diff --git a/web-admin-app/src/app/pages/fixed-asset/ledger/fixed-asset-myown/fixed-asset-myown.component.ts b/web-admin-app/src/app/pages/fixed-asset/ledger/fixed-asset-myown/fixed-asset-myown.component.ts
index f78c8ad..69d2a0e 100644
--- a/web-admin-app/src/app/pages/fixed-asset/ledger/fixed-asset-myown/fixed-asset-myown.component.ts
+++ b/web-admin-app/src/app/pages/fixed-asset/ledger/fixed-asset-myown/fixed-asset-myown.component.ts
@@ -1,6 +1,6 @@
import { Component } from '@angular/core'
import { FormControl, FormGroup } from '@angular/forms'
-import { AnyObject, TableOption } from 'app/components/server-paginated-table'
+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'
diff --git a/web-admin-app/src/app/pages/fixed-asset/ledger/fixed-asset-org/fixed-asset-org.component.ts b/web-admin-app/src/app/pages/fixed-asset/ledger/fixed-asset-org/fixed-asset-org.component.ts
index c313b7e..939825d 100644
--- a/web-admin-app/src/app/pages/fixed-asset/ledger/fixed-asset-org/fixed-asset-org.component.ts
+++ b/web-admin-app/src/app/pages/fixed-asset/ledger/fixed-asset-org/fixed-asset-org.component.ts
@@ -1,6 +1,6 @@
import { Component } from '@angular/core'
import { FormControl, FormGroup } from '@angular/forms'
-import { AnyObject, TableOption } from 'app/components/server-paginated-table'
+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'
diff --git a/web-admin-app/src/app/pages/fixed-asset/ledger/fixed-asset-position/fixed-asset-position.component.ts b/web-admin-app/src/app/pages/fixed-asset/ledger/fixed-asset-position/fixed-asset-position.component.ts
index d26ca9f..5cef505 100644
--- a/web-admin-app/src/app/pages/fixed-asset/ledger/fixed-asset-position/fixed-asset-position.component.ts
+++ b/web-admin-app/src/app/pages/fixed-asset/ledger/fixed-asset-position/fixed-asset-position.component.ts
@@ -1,6 +1,6 @@
import { Component } from '@angular/core'
import { FormControl, FormGroup } from '@angular/forms'
-import { AnyObject, TableOption } from 'app/components/server-paginated-table'
+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'
diff --git a/web-admin-app/src/app/pages/fixed-asset/ledger/fixed-asset-search/fixed-asset-search.component.ts b/web-admin-app/src/app/pages/fixed-asset/ledger/fixed-asset-search/fixed-asset-search.component.ts
index 3f802e0..a843f10 100644
--- a/web-admin-app/src/app/pages/fixed-asset/ledger/fixed-asset-search/fixed-asset-search.component.ts
+++ b/web-admin-app/src/app/pages/fixed-asset/ledger/fixed-asset-search/fixed-asset-search.component.ts
@@ -1,6 +1,6 @@
import { Component } from '@angular/core'
import { FormControl, FormGroup } from '@angular/forms'
-import { AnyObject, TableOption } from 'app/components/server-paginated-table'
+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'
diff --git a/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-allot/fixed-asset-manage-allot.component.ts b/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-allot/fixed-asset-manage-allot.component.ts
index a03d665..c056b51 100644
--- a/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-allot/fixed-asset-manage-allot.component.ts
+++ b/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-allot/fixed-asset-manage-allot.component.ts
@@ -1,7 +1,7 @@
import { Component } from '@angular/core'
import { FormControl, FormGroup } from '@angular/forms'
-import { AppPageComponent } from 'app/components/app-page/app-page.component'
-import { AnyObject, TableOption } from 'app/components/server-paginated-table'
+
+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'
@@ -10,7 +10,7 @@ import { of } from 'rxjs'
@Component({
selector: 'app-fixed-asset-manage-allot',
standalone: true,
- imports: [SharedModule, AppPageComponent],
+ imports: [SharedModule],
templateUrl: './fixed-asset-manage-allot.component.html',
styleUrl: './fixed-asset-manage-allot.component.less',
})
diff --git a/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-borrow/fixed-asset-manage-borrow.component.ts b/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-borrow/fixed-asset-manage-borrow.component.ts
index 1bbdc27..f8188e7 100644
--- a/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-borrow/fixed-asset-manage-borrow.component.ts
+++ b/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-borrow/fixed-asset-manage-borrow.component.ts
@@ -1,7 +1,7 @@
import { Component } from '@angular/core'
import { FormControl, FormGroup } from '@angular/forms'
-import { AppPageComponent } from 'app/components/app-page/app-page.component'
-import { AnyObject, TableOption } from 'app/components/server-paginated-table'
+
+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'
@@ -9,7 +9,7 @@ import { of } from 'rxjs'
@Component({
selector: 'app-fixed-asset-manage-borrow',
standalone: true,
- imports: [SharedModule, AppPageComponent],
+ imports: [SharedModule],
templateUrl: './fixed-asset-manage-borrow.component.html',
styleUrl: './fixed-asset-manage-borrow.component.less',
})
diff --git a/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-distribution/fixed-asset-manage-distribution.component.ts b/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-distribution/fixed-asset-manage-distribution.component.ts
index 6b7ec49..42969bd 100644
--- a/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-distribution/fixed-asset-manage-distribution.component.ts
+++ b/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-distribution/fixed-asset-manage-distribution.component.ts
@@ -1,7 +1,7 @@
import { Component } from '@angular/core'
import { FormControl, FormGroup } from '@angular/forms'
-import { AppPageComponent } from 'app/components/app-page/app-page.component'
-import { AnyObject, TableOption } from 'app/components/server-paginated-table'
+
+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'
@@ -10,7 +10,7 @@ import { of } from 'rxjs'
@Component({
selector: 'app-fixed-asset-manage-distribution',
standalone: true,
- imports: [SharedModule, AppPageComponent],
+ imports: [SharedModule],
templateUrl: './fixed-asset-manage-distribution.component.html',
styleUrl: './fixed-asset-manage-distribution.component.less',
})
diff --git a/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-entry/fixed-asset-manage-entry.component.ts b/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-entry/fixed-asset-manage-entry.component.ts
index 00e8b53..26900f9 100644
--- a/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-entry/fixed-asset-manage-entry.component.ts
+++ b/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-entry/fixed-asset-manage-entry.component.ts
@@ -1,7 +1,7 @@
import { Component } from '@angular/core'
import { FormControl, FormGroup } from '@angular/forms'
-import { AppPageComponent } from 'app/components/app-page/app-page.component'
-import { AnyObject, TableOption } from 'app/components/server-paginated-table'
+
+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'
@@ -10,7 +10,7 @@ import { of } from 'rxjs'
@Component({
selector: 'app-fixed-asset-manage-entry',
standalone: true,
- imports: [SharedModule, AppPageComponent],
+ imports: [SharedModule],
templateUrl: './fixed-asset-manage-entry.component.html',
styleUrl: './fixed-asset-manage-entry.component.less',
})
diff --git a/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-return/fixed-asset-manage-return.component.ts b/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-return/fixed-asset-manage-return.component.ts
index 2755cb8..65fe9ec 100644
--- a/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-return/fixed-asset-manage-return.component.ts
+++ b/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-return/fixed-asset-manage-return.component.ts
@@ -1,7 +1,7 @@
import { Component } from '@angular/core'
import { FormControl, FormGroup } from '@angular/forms'
-import { AppPageComponent } from 'app/components/app-page/app-page.component'
-import { AnyObject, TableOption } from 'app/components/server-paginated-table'
+
+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'
@@ -10,7 +10,7 @@ import { of } from 'rxjs'
@Component({
selector: 'app-fixed-asset-manage-return',
standalone: true,
- imports: [SharedModule, AppPageComponent],
+ imports: [SharedModule],
templateUrl: './fixed-asset-manage-return.component.html',
styleUrl: './fixed-asset-manage-return.component.less',
})
diff --git a/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-revert/fixed-asset-manage-revert.component.ts b/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-revert/fixed-asset-manage-revert.component.ts
index 2fc5e15..ec4c127 100644
--- a/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-revert/fixed-asset-manage-revert.component.ts
+++ b/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-revert/fixed-asset-manage-revert.component.ts
@@ -1,8 +1,8 @@
import { Component } from '@angular/core'
import { FormControl, FormGroup } from '@angular/forms'
-import { AppPageComponent } from 'app/components/app-page/app-page.component'
-import { AnyObject, TableOption } from 'app/components/server-paginated-table'
+
import { ApiService } from 'app/services'
+import { AnyObject, TableOption } from 'app/shared/components/server-paginated-table'
import { SharedModule } from 'app/shared/shared.module'
import { format } from 'date-fns'
import { of } from 'rxjs'
@@ -10,7 +10,7 @@ import { of } from 'rxjs'
@Component({
selector: 'app-fixed-asset-manage-revert',
standalone: true,
- imports: [SharedModule, AppPageComponent],
+ imports: [SharedModule],
templateUrl: './fixed-asset-manage-revert.component.html',
styleUrl: './fixed-asset-manage-revert.component.less',
})
diff --git a/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-scrap/fixed-asset-manage-scrap.component.ts b/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-scrap/fixed-asset-manage-scrap.component.ts
index 33add4b..2733c91 100644
--- a/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-scrap/fixed-asset-manage-scrap.component.ts
+++ b/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-scrap/fixed-asset-manage-scrap.component.ts
@@ -1,7 +1,7 @@
import { Component } from '@angular/core'
import { FormControl, FormGroup } from '@angular/forms'
-import { AppPageComponent } from 'app/components/app-page/app-page.component'
-import { AnyObject, TableOption } from 'app/components/server-paginated-table'
+
+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'
@@ -10,7 +10,7 @@ import { of } from 'rxjs'
@Component({
selector: 'app-fixed-asset-manage-scrap',
standalone: true,
- imports: [SharedModule, AppPageComponent],
+ imports: [SharedModule],
templateUrl: './fixed-asset-manage-scrap.component.html',
styleUrl: './fixed-asset-manage-scrap.component.less',
})
diff --git a/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-transfer/fixed-asset-manage-transfer.component.ts b/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-transfer/fixed-asset-manage-transfer.component.ts
index 2bc5d0d..cd7c6d2 100644
--- a/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-transfer/fixed-asset-manage-transfer.component.ts
+++ b/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage-transfer/fixed-asset-manage-transfer.component.ts
@@ -1,7 +1,7 @@
import { Component } from '@angular/core'
import { FormControl, FormGroup } from '@angular/forms'
-import { AppPageComponent } from 'app/components/app-page/app-page.component'
-import { AnyObject, TableOption } from 'app/components/server-paginated-table'
+
+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'
@@ -10,7 +10,7 @@ import { of } from 'rxjs'
@Component({
selector: 'app-fixed-asset-manage-transfer',
standalone: true,
- imports: [SharedModule, AppPageComponent],
+ imports: [SharedModule],
templateUrl: './fixed-asset-manage-transfer.component.html',
styleUrl: './fixed-asset-manage-transfer.component.less',
})
diff --git a/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage/fixed-asset-manage.component.ts b/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage/fixed-asset-manage.component.ts
index 385408e..8ae9f18 100644
--- a/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage/fixed-asset-manage.component.ts
+++ b/web-admin-app/src/app/pages/fixed-asset/manage/fixed-asset-manage/fixed-asset-manage.component.ts
@@ -1,7 +1,7 @@
import { Component } from '@angular/core'
import { FormControl, FormGroup } from '@angular/forms'
-import { AppPageComponent } from 'app/components/app-page/app-page.component'
-import { AnyObject, TableOption } from 'app/components/server-paginated-table'
+
+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'
@@ -10,7 +10,7 @@ import { of } from 'rxjs'
@Component({
selector: 'app-fixed-asset-manage',
standalone: true,
- imports: [SharedModule, AppPageComponent],
+ imports: [SharedModule],
templateUrl: './fixed-asset-manage.component.html',
styleUrl: './fixed-asset-manage.component.less',
})
diff --git a/web-admin-app/src/app/pages/fixed-asset/stocktaking/stockaking-job/stockaking-job.component.html b/web-admin-app/src/app/pages/fixed-asset/stocktaking/stockaking-job/stockaking-job.component.html
new file mode 100644
index 0000000..8c07129
--- /dev/null
+++ b/web-admin-app/src/app/pages/fixed-asset/stocktaking/stockaking-job/stockaking-job.component.html
@@ -0,0 +1,179 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/web-admin-app/src/app/pages/fixed-asset/stocktaking/stockaking-job/stockaking-job.component.less b/web-admin-app/src/app/pages/fixed-asset/stocktaking/stockaking-job/stockaking-job.component.less
new file mode 100644
index 0000000..e69de29
diff --git a/web-admin-app/src/app/pages/fixed-asset/stocktaking/stockaking-job/stockaking-job.component.ts b/web-admin-app/src/app/pages/fixed-asset/stocktaking/stockaking-job/stockaking-job.component.ts
new file mode 100644
index 0000000..df8e92d
--- /dev/null
+++ b/web-admin-app/src/app/pages/fixed-asset/stocktaking/stockaking-job/stockaking-job.component.ts
@@ -0,0 +1,162 @@
+import { Component, OnInit, TemplateRef, ViewChild } from '@angular/core'
+import { SharedModule } from 'app/shared/shared.module'
+import { ApiService } from 'app/services'
+import { FormBuilder, FormGroup } from '@angular/forms'
+import { AnyObject, TableOption } from 'app/shared/components/server-paginated-table'
+import { NzSafeAny } from 'ng-zorro-antd/core/types'
+import { NzModalService } from 'ng-zorro-antd/modal'
+import { NzMessageService } from 'ng-zorro-antd/message'
+import { NzDrawerRef, NzDrawerService } from 'ng-zorro-antd/drawer'
+import { lastValueFrom } from 'rxjs'
+import { FormValidators } from 'app/utils'
+import { SelectUserByOrgComponent } from 'app/components'
+
+@Component({
+ selector: 'app-stockaking-job',
+ standalone: true,
+ imports: [SharedModule, SelectUserByOrgComponent],
+ templateUrl: './stockaking-job.component.html',
+ styleUrl: './stockaking-job.component.less',
+})
+export class StockakingJobComponent {
+ constructor(
+ private modal: NzModalService,
+ private msg: NzMessageService,
+ private drawer: NzDrawerService,
+ private api: ApiService,
+ private fb: FormBuilder,
+ ) {}
+
+ table = new TableOption(this.fetchData.bind(this))
+
+ queryForm!: FormGroup
+
+ createForm!: FormGroup
+
+ drawerRef?: NzDrawerRef
+
+ @ViewChild('drawerFooterTpl') drawerFooterTpl!: TemplateRef
+
+ @ViewChild('formContentTpl') formContentTpl!: TemplateRef
+
+ initCreateForm() {
+ this.createForm = this.fb.group({
+ stocktakingJobId: [],
+ name: ['', [FormValidators.required('请输入')]],
+ notes: ['', []],
+ fullStocktaking: [1, []],
+ stocktakingStartDate: [null, []],
+ stocktakingEndDate: [null, []],
+ })
+ }
+ initQueryForm() {
+ this.queryForm = this.fb.group({
+ name: [''],
+ uscc: [''],
+ code: [''],
+ })
+ }
+
+ ngOnInit(): void {
+ this.table
+ .setConfig({
+ selectable: true,
+ rowKey: 'stocktakingJobId',
+ })
+ .setColumn([
+ { key: 'name', title: '名称' },
+ { key: 'fullStocktaking', title: '全员盘点' },
+ { key: 'status', title: '盘点状态' },
+ { key: 'head', title: '负责人' },
+ { key: 'stocktakingUserId', title: '盘点人' },
+ { key: 'stocktakingStartDate', title: '购置开始日期', width: '180px' },
+ { key: 'stocktakingEndDate', title: '购置结束日期', width: '180px' },
+ { key: 'createTime', title: '创建时间', width: '180px' },
+ { key: 'createUser', title: '创建人' },
+ { key: 'notes', title: '备注' },
+ ])
+ .setRowOperate([
+ { title: '编辑', onClick: this.onCreate.bind(this) },
+ { title: '编辑', onClick: this.onCreate.bind(this) },
+ { title: '删除', onClick: this.deleteItem.bind(this) },
+ ])
+ this.initQueryForm()
+ this.initCreateForm()
+ }
+
+ fetchData(p: {}, q: AnyObject) {
+ return this.api.getStocktakingJobPage({ ...p, ...q })
+ }
+
+ onCreate(data?: NzSafeAny) {
+ if (data) {
+ this.createForm.patchValue(data)
+ }
+ this.drawerRef = this.drawer.create({
+ nzTitle: data ? '编辑盘点任务' : '新增盘点任务',
+ nzContent: this.formContentTpl,
+ nzFooter: this.drawerFooterTpl,
+ nzWidth: 600,
+ nzOnCancel: this.onCancel.bind(this),
+ })
+ }
+
+ onConfirm() {
+ if (FormValidators.validateFormGroup(this.createForm)) {
+ const { value } = this.createForm
+
+ this.api
+ .saveStocktakingJob({
+ ...value,
+
+ // stocktakingJobId: value.stocktakingJobId ?? 0,
+ })
+ .subscribe((res) => {
+ this.msg.success(res.desc)
+ this.onCancel()
+ this.table.ref.reload()
+ })
+ }
+ }
+
+ async onCancel() {
+ this.drawerRef?.close()
+ this.createForm.reset({})
+ }
+
+ deleteItem(item: NzSafeAny) {
+ this.modal.confirm({
+ nzTitle: '警告',
+ nzContent: '是否要删除该盘点任务?',
+ nzOnOk: async () => {
+ const res = await lastValueFrom(this.api.deleteStocktakingJob([item.stocktakingJobId]))
+ this.msg.success(res.desc)
+ this.table.ref.reload()
+ },
+ })
+ }
+ onBegin() {
+ const ids = Array.from(this.table.ref.selected).map((i) => Number(i))
+ this.modal.confirm({
+ nzTitle: '警告',
+ nzContent: '是否要开始该盘点任务?',
+ nzOnOk: async () => {
+ const res = await lastValueFrom(this.api.beginStocktakingJob(ids))
+ this.msg.success(res.desc)
+ this.table.ref.reload()
+ },
+ })
+ }
+ onStop() {
+ const ids = Array.from(this.table.ref.selected).map((i) => Number(i))
+ this.modal.confirm({
+ nzTitle: '警告',
+ nzContent: '是否要结束该盘点任务?',
+ nzOnOk: async () => {
+ const res = await lastValueFrom(this.api.stopStocktakingJob(ids))
+ this.msg.success(res.desc)
+ this.table.ref.reload()
+ },
+ })
+ }
+}
diff --git a/web-admin-app/src/app/pages/fixed-asset/stocktaking/stockaking-plan/stockaking-plan.component.html b/web-admin-app/src/app/pages/fixed-asset/stocktaking/stockaking-plan/stockaking-plan.component.html
new file mode 100644
index 0000000..31ce39d
--- /dev/null
+++ b/web-admin-app/src/app/pages/fixed-asset/stocktaking/stockaking-plan/stockaking-plan.component.html
@@ -0,0 +1 @@
+stockaking-plan works!
diff --git a/web-admin-app/src/app/pages/fixed-asset/stocktaking/stockaking-plan/stockaking-plan.component.less b/web-admin-app/src/app/pages/fixed-asset/stocktaking/stockaking-plan/stockaking-plan.component.less
new file mode 100644
index 0000000..e69de29
diff --git a/web-admin-app/src/app/pages/fixed-asset/stocktaking/stockaking-plan/stockaking-plan.component.ts b/web-admin-app/src/app/pages/fixed-asset/stocktaking/stockaking-plan/stockaking-plan.component.ts
new file mode 100644
index 0000000..2a32057
--- /dev/null
+++ b/web-admin-app/src/app/pages/fixed-asset/stocktaking/stockaking-plan/stockaking-plan.component.ts
@@ -0,0 +1,21 @@
+import { Component, OnInit, TemplateRef, ViewChild } from '@angular/core'
+import { SharedModule } from 'app/shared/shared.module'
+import { ApiService } from 'app/services'
+import { FormBuilder, FormGroup } from '@angular/forms'
+import { AnyObject, TableOption } from 'app/shared/components/server-paginated-table'
+import { NzSafeAny } from 'ng-zorro-antd/core/types'
+import { NzModalService } from 'ng-zorro-antd/modal'
+import { NzMessageService } from 'ng-zorro-antd/message'
+import { NzDrawerRef, NzDrawerService } from 'ng-zorro-antd/drawer'
+import { lastValueFrom } from 'rxjs'
+import { FormValidators } from 'app/utils'
+import { SelectUserByOrgComponent } from 'app/components'
+
+@Component({
+ selector: 'app-stockaking-plan',
+ standalone: true,
+ imports: [],
+ templateUrl: './stockaking-plan.component.html',
+ styleUrl: './stockaking-plan.component.less',
+})
+export class StockakingPlanComponent {}
diff --git a/web-admin-app/src/app/pages/login/login.component.less b/web-admin-app/src/app/pages/login/login.component.less
index 454d57d..d306dd6 100644
--- a/web-admin-app/src/app/pages/login/login.component.less
+++ b/web-admin-app/src/app/pages/login/login.component.less
@@ -4,8 +4,11 @@
.bg {
background-image: url(/assets/images/login-bg.jpg);
background-repeat: no-repeat;
- background-size: cover;
- filter: blur(1px);
+ background-position: bottom;
+ display: flex;
+ align-items: flex-end;
+ justify-content: center;
+ background-color: #3d62f1;
}
diff --git a/web-admin-app/src/app/pages/login/login.component.ts b/web-admin-app/src/app/pages/login/login.component.ts
index d3d5f3d..d5f4f41 100644
--- a/web-admin-app/src/app/pages/login/login.component.ts
+++ b/web-admin-app/src/app/pages/login/login.component.ts
@@ -18,7 +18,6 @@ export class LoginComponent {
constructor(
private api: ApiService,
private msg: NzMessageService,
- private local: LocalHttpInterceptorService,
private router: Router,
) {}
@@ -39,13 +38,9 @@ export class LoginComponent {
this.loading = false
}),
)
- .subscribe((res) => {
+ .subscribe(() => {
this.msg.success('登录成功')
- this.local.setAccess({
- access_token: res.body.authorization,
- ...res.body,
- })
- localStorage.setItem('add', res.data)
+
this.router.navigate(['/'])
})
}
diff --git a/web-admin-app/src/app/pages/org-setting/org-setting.component.html b/web-admin-app/src/app/pages/org-setting/org-setting.component.html
index b394883..9436ede 100644
--- a/web-admin-app/src/app/pages/org-setting/org-setting.component.html
+++ b/web-admin-app/src/app/pages/org-setting/org-setting.component.html
@@ -1,40 +1,84 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/web-admin-app/src/app/pages/org-setting/org-setting.component.ts b/web-admin-app/src/app/pages/org-setting/org-setting.component.ts
index c988e75..5fbbd66 100644
--- a/web-admin-app/src/app/pages/org-setting/org-setting.component.ts
+++ b/web-admin-app/src/app/pages/org-setting/org-setting.component.ts
@@ -1,92 +1,182 @@
-import { Component, OnInit } from '@angular/core'
-import { AppPageComponent } from 'app/components/app-page/app-page.component'
+import { Component, OnInit, TemplateRef, ViewChild } from '@angular/core'
import { SharedModule } from 'app/shared/shared.module'
-import { ComponentOrgTreeComponent } from '../component-org-tree/component-org-tree.component'
-import { AnyObject, TableOption } from 'app/components/server-paginated-table'
+import { ComponentOrgTreeComponent } from 'app/components/component-org-tree/component-org-tree.component'
+
import { format } from 'date-fns'
import { ApiService } from 'app/services'
-import { of } from 'rxjs'
+import { FormBuilder, FormGroup } from '@angular/forms'
+import { AnyObject, TableOption } from 'app/shared/components/server-paginated-table'
+import { NzSafeAny } from 'ng-zorro-antd/core/types'
+import { NzModalService } from 'ng-zorro-antd/modal'
+import { NzMessageService } from 'ng-zorro-antd/message'
+import { NzDrawerRef, NzDrawerService } from 'ng-zorro-antd/drawer'
+import { lastValueFrom } from 'rxjs'
+import { FormValidators } from 'app/utils'
@Component({
selector: 'app-org-setting',
standalone: true,
- imports: [SharedModule, AppPageComponent, ComponentOrgTreeComponent],
+ imports: [SharedModule, ComponentOrgTreeComponent],
templateUrl: './org-setting.component.html',
styleUrl: './org-setting.component.less',
})
export class OrgSettingComponent implements OnInit {
- constructor(private api: ApiService) {}
+ constructor(
+ private modal: NzModalService,
+ private msg: NzMessageService,
+ private drawer: NzDrawerService,
+ private api: ApiService,
+ private fb: FormBuilder,
+ ) {}
table = new TableOption(this.fetchData.bind(this))
+ queryForm!: FormGroup
+
+ createForm!: FormGroup
+
+ drawerRef?: NzDrawerRef
+
+ organization: null | NzSafeAny = null
+
+ iconPreview = ''
+
+ uploadLoading = false
+
+ @ViewChild('drawerFooterTpl') drawerFooterTpl!: TemplateRef
+
+ @ViewChild('formContentTpl') formContentTpl!: TemplateRef
+
+ initCreateForm() {
+ this.createForm = this.fb.group({
+ userId: [],
+ userName: ['', FormValidators.required('请输入')],
+ loginName: ['', FormValidators.required('请输入')],
+ phone: [
+ '',
+ [FormValidators.required('请输入'), FormValidators.pattern(/^1[3-9]\d{9}$/, '请输入正确的手机号')],
+ ],
+ password: [],
+ repassword: [],
+ email: [],
+ status: ['0'],
+ sex: ['0'],
+ avatar: [],
+ roleId: [],
+ })
+ }
+ initQueryForm() {
+ this.queryForm = this.fb.group({
+ userName: [''],
+ loginName: [''],
+ phone: [''],
+ email: [''],
+ status: [''],
+ sex: [''],
+ })
+ }
+
ngOnInit(): void {
this.table
- .setConfig({
- selectable: true,
- })
+
.setColumn([
- { key: '公司ID', title: '公司ID', visible: true },
- { key: '工号', title: '工号' },
- { key: '姓名', title: '姓名' },
- { key: '性别', title: '性别' },
- { key: '手机号', title: '手机号' },
- { key: '部门', title: '部门' },
- { key: '主岗', title: '主岗' },
- { key: 'ID', title: 'ID', visible: false },
- { key: '人员ID', title: '人员ID', visible: false },
- { key: '状态', title: '状态', visible: false },
- { key: '修改人ID', title: '修改人ID', visible: false },
- { key: '类型', title: '类型', visible: false },
- { key: '直属领导', title: '直属领导', visible: false },
- { key: 'extInfo', title: 'extInfo', visible: false },
- { key: '身份证', title: '身份证', visible: false },
- { key: '兼岗', title: '兼岗', visible: false },
- { key: '签约方', title: '签约方', visible: false },
- { key: '成本中心', title: '成本中心', visible: false },
- { key: '客户信息', title: '客户信息', visible: false },
-
- { key: 'createTime', title: '创建时间' },
+ { key: 'avatar', title: '头像', width: '100px' },
+ { key: 'userName', title: '姓名' },
+ { key: 'loginName', title: '账号名' },
+ { key: 'phone', title: '联系电话' },
+ { key: 'email', title: '邮箱' },
+ { key: 'status', title: '状态' },
+ { key: 'sex', title: '性别' },
])
- .setRowOperate([{ title: '查看', premissions: [] }, { title: '编辑' }, { title: '删除' }])
+ .setRowOperate([
+ { title: '编辑', onClick: this.onCreate.bind(this) },
+ { title: '删除', onClick: this.deleteItem.bind(this) },
+ ])
+ this.initQueryForm()
+ this.initCreateForm()
}
fetchData(p: {}, q: AnyObject) {
- if (Array.isArray(q['createTime'])) {
- const createTimeStart = q['createTime']?.[0]
- const createTimeEnd = q['createTime']?.[1]
+ return this.api.getUserPage({ ...p, ...q, organizationId: this.organization?.organizationId })
+ }
- q['createTimeStart'] = createTimeStart ? format(new Date(createTimeStart), 'yyyy-MM-dd HH:mm:ss') : ''
- q['createTimeEnd'] = createTimeEnd ? format(new Date(createTimeEnd), 'yyyy-MM-dd HH:mm:ss') : ''
+ onOrgSelectedChange(org: NzSafeAny) {
+ console.log('org', org)
+ this.organization = org
+ this.table.ref.search()
+ }
+
+ onCreate(data?: NzSafeAny) {
+ if (data) {
+ this.createForm.patchValue(data)
+ }
+ this.drawerRef = this.drawer.create({
+ nzTitle: data ? '编辑员工' : '新增员工',
+ nzContent: this.formContentTpl,
+ nzFooter: this.drawerFooterTpl,
+ nzWidth: 600,
+ nzOnCancel: this.onCancel.bind(this),
+ })
+ }
+
+ onConfirm() {
+ if (FormValidators.validateFormGroup(this.createForm)) {
+ const { value } = this.createForm
+ if (value.password && value.repassword !== value.password) {
+ this.msg.error('两次密码输入不一致')
+ return
+ }
+ this.api
+ .saveUser({
+ ...value,
+ organizationId: this.organization?.organizationId,
+ })
+ .subscribe((res) => {
+ this.msg.success(res.desc)
+ this.onCancel()
+ this.table.ref.reload()
+ })
}
- return of({
- data: {
- total: 5,
- records: [
- {
- id: 1,
- name: '沙滩',
- price: 590,
- type: 0,
- lifespan: 6,
- number: 20,
- max: 20,
- status: 1,
- createTime: '2024-05-01',
- },
-
- {
- id: 2,
- name: '清凉一夏~沙滩排球',
- price: 100000,
- type: 1,
- lifespan: 12,
- max: 20,
- status: 1,
- createTime: '2024-05-01',
- },
- ],
+ }
+
+ async onCancel() {
+ this.drawerRef?.close()
+ this.createForm.reset({
+ sex: '0',
+ status: '0',
+ })
+ }
+
+ deleteItem(item: NzSafeAny) {
+ this.modal.confirm({
+ nzTitle: '警告',
+ nzContent: '是否要删除该员工?',
+ nzOnOk: async () => {
+ const res = await lastValueFrom(this.api.deleteUser([item.userId]))
+ this.msg.success(res.desc)
+ this.table.ref.reload()
},
})
- return this.api.getEntityPage(p, q)
+ }
+
+ onFileChange(e: Event) {
+ const target = e.target as HTMLInputElement
+ const file = target.files![0]
+ target.value = ''
+ if (file.size / 1024 / 1024 >= 2) {
+ this.msg.error('图片大小不能超过2M')
+ return
+ }
+ const fileReader = new FileReader()
+ fileReader.onload = () => {
+ const base64 = fileReader.result as string
+ this.iconPreview = base64
+ }
+ fileReader.readAsDataURL(file)
+ const formdata = new FormData()
+ formdata.append('file', file)
+ this.api.upload(formdata).subscribe((res) => {
+ this.createForm.get('avatar')?.setValue(res.body.fileName)
+ })
}
}
diff --git a/web-admin-app/src/app/pages/profile-account/profile-account.component.ts b/web-admin-app/src/app/pages/profile-account/profile-account.component.ts
index 599bf3b..ae2fa92 100644
--- a/web-admin-app/src/app/pages/profile-account/profile-account.component.ts
+++ b/web-admin-app/src/app/pages/profile-account/profile-account.component.ts
@@ -20,27 +20,27 @@ export class ProfileAccountComponent {
) {}
formGroup = new FormGroup({
- id: new FormControl(this.api.authInfo.id),
- username: new FormControl({ value: this.api.authInfo.username, disabled: true }, [
- FormValidators.required('请输入用户名'),
- ]),
- password: new FormControl('', [FormValidators.required('请输入密码')]),
- confirmPassword: new FormControl('', [FormValidators.required('请再次输入密码')]),
+ // id: new FormControl(this.api.authInfo.id),
+ // username: new FormControl({ value: this.api.authInfo.username, disabled: true }, [
+ // FormValidators.required('请输入用户名'),
+ // ]),
+ // password: new FormControl('', [FormValidators.required('请输入密码')]),
+ // confirmPassword: new FormControl('', [FormValidators.required('请再次输入密码')]),
})
onSubmit() {
if (FormValidators.validateFormGroup(this.formGroup)) {
- if (this.formGroup.value.confirmPassword !== this.formGroup.value.password) {
- this.msg.error('两次输入密码不一致')
- return
- }
- const v = this.formGroup.getRawValue()
- this.api.changePassword(v).subscribe(() => {
- this.msg.success('修改成功,请重新登录').onClose.subscribe(() => {
- this.local.removeAccess()
- window.location.href = '/login'
- })
- })
+ // if (this.formGroup.value.confirmPassword !== this.formGroup.value.password) {
+ // this.msg.error('两次输入密码不一致')
+ // return
+ // }
+ // const v = this.formGroup.getRawValue()
+ // this.api.changePassword(v).subscribe(() => {
+ // this.msg.success('修改成功,请重新登录').onClose.subscribe(() => {
+ // this.local.removeAccess()
+ // window.location.href = '/login'
+ // })
+ // })
}
}
}
diff --git a/web-admin-app/src/app/pages/profile-basic/profile-basic.component.ts b/web-admin-app/src/app/pages/profile-basic/profile-basic.component.ts
index 216fd1a..8332377 100644
--- a/web-admin-app/src/app/pages/profile-basic/profile-basic.component.ts
+++ b/web-admin-app/src/app/pages/profile-basic/profile-basic.component.ts
@@ -1,7 +1,6 @@
import { Component, OnDestroy, OnInit } from '@angular/core'
import { SharedModule } from '../../shared/shared.module'
import { ApiService } from 'app/services'
-import { UserFormComponent } from 'app/components/user-form/user-form.component'
import { FormBuilder, FormControl, FormGroup } from '@angular/forms'
import { FormValidators } from 'app/utils'
import { NzMessageService } from 'ng-zorro-antd/message'
@@ -9,7 +8,7 @@ import { Subscription } from 'rxjs'
@Component({
standalone: true,
- imports: [SharedModule, UserFormComponent],
+ imports: [SharedModule],
selector: 'app-profile-basic',
templateUrl: './profile-basic.component.html',
styleUrls: ['./profile-basic.component.less'],
@@ -24,10 +23,10 @@ export class ProfileBasicComponent implements OnInit, OnDestroy {
formGroup!: FormGroup
ngOnInit(): void {
- this.formGroup = this.fb.group({
- name: new FormControl(this.api.authInfo.name, [FormValidators.required('请输入姓名')]),
- remark: new FormControl(this.api.authInfo.remark),
- })
+ // this.formGroup = this.fb.group({
+ // name: new FormControl(this.api.authInfo.name, [FormValidators.required('请输入姓名')]),
+ // remark: new FormControl(this.api.authInfo.remark),
+ // })
}
ngOnDestroy(): void {}
@@ -45,7 +44,7 @@ export class ProfileBasicComponent implements OnInit, OnDestroy {
if (vals) {
this.api.saveUser({ ...this.api.authInfo, ...vals }).subscribe(() => {
this.msg.success('保存成功')
- this.api.getAuthInfo(true).subscribe(() => {})
+ // this.api.getAuthInfo(true).subscribe(() => {})
})
}
}
diff --git a/web-admin-app/src/app/pages/profile/profile.component.html b/web-admin-app/src/app/pages/profile/profile.component.html
index 67fc742..14d4ca4 100644
--- a/web-admin-app/src/app/pages/profile/profile.component.html
+++ b/web-admin-app/src/app/pages/profile/profile.component.html
@@ -2,18 +2,10 @@
- {{ api.authInfo.username }}
+ {{ api.authInfo?.loginName }}
- {{ api.authInfo.name }}
-
-
-
- @if (api.authInfo.enable) {
-
- } @else {
-
- }
+ {{ api.authInfo?.userName }}
diff --git a/web-admin-app/src/app/pages/profile/profile.component.ts b/web-admin-app/src/app/pages/profile/profile.component.ts
index cd46449..5a8c0c6 100644
--- a/web-admin-app/src/app/pages/profile/profile.component.ts
+++ b/web-admin-app/src/app/pages/profile/profile.component.ts
@@ -14,9 +14,7 @@ import { Subscription } from 'rxjs'
export class ProfileComponent implements OnInit, OnDestroy {
constructor(public api: ApiService) {}
- ngOnInit(): void {
- this.api.getUserInfo(this.api.authInfo.id).subscribe((res) => {})
- }
+ ngOnInit(): void {}
ngOnDestroy(): void {}
}
diff --git a/web-admin-app/src/app/pages/system/system.component.html b/web-admin-app/src/app/pages/system/index/system.component.html
similarity index 56%
rename from web-admin-app/src/app/pages/system/system.component.html
rename to web-admin-app/src/app/pages/system/index/system.component.html
index 67e7bd4..7634b59 100644
--- a/web-admin-app/src/app/pages/system/system.component.html
+++ b/web-admin-app/src/app/pages/system/index/system.component.html
@@ -1 +1,2 @@
+ad
diff --git a/web-admin-app/src/app/pages/system/index/system.component.less b/web-admin-app/src/app/pages/system/index/system.component.less
new file mode 100644
index 0000000..e69de29
diff --git a/web-admin-app/src/app/pages/system/system.component.ts b/web-admin-app/src/app/pages/system/index/system.component.ts
similarity index 100%
rename from web-admin-app/src/app/pages/system/system.component.ts
rename to web-admin-app/src/app/pages/system/index/system.component.ts
diff --git a/web-admin-app/src/app/pages/system/system-user/system-user.component.html b/web-admin-app/src/app/pages/system/system-user/system-user.component.html
new file mode 100644
index 0000000..0434380
--- /dev/null
+++ b/web-admin-app/src/app/pages/system/system-user/system-user.component.html
@@ -0,0 +1 @@
+system-user works!
diff --git a/web-admin-app/src/app/pages/system/system-user/system-user.component.less b/web-admin-app/src/app/pages/system/system-user/system-user.component.less
new file mode 100644
index 0000000..e69de29
diff --git a/web-admin-app/src/app/pages/system/system-user/system-user.component.ts b/web-admin-app/src/app/pages/system/system-user/system-user.component.ts
new file mode 100644
index 0000000..3588e8f
--- /dev/null
+++ b/web-admin-app/src/app/pages/system/system-user/system-user.component.ts
@@ -0,0 +1,11 @@
+import { Component } from '@angular/core'
+import { SharedModule } from 'app/shared/shared.module'
+
+@Component({
+ selector: 'app-system-user',
+ standalone: true,
+ imports: [SharedModule],
+ templateUrl: './system-user.component.html',
+ styleUrl: './system-user.component.less',
+})
+export class SystemUserComponent {}
diff --git a/web-admin-app/src/app/services/api.dto.ts b/web-admin-app/src/app/services/api.dto.ts
index 6339870..5615f20 100644
--- a/web-admin-app/src/app/services/api.dto.ts
+++ b/web-admin-app/src/app/services/api.dto.ts
@@ -1,15 +1,9 @@
export type AuthDTO = {
- createTime: string
- enable: boolean
- groupId: string
- id: string
- name: string
- remark: string
- roleId: string
- roleName: string
- updateTime: string
- username: string
- authorities: AuthorityDTO[]
+ authorization: string
+ loginName: string
+ permissions: string[]
+ roles: string[]
+ userName: string
}
export type AuthorityDTO = { authority: string }
diff --git a/web-admin-app/src/app/services/api.service.ts b/web-admin-app/src/app/services/api.service.ts
index 928d504..dee21c5 100644
--- a/web-admin-app/src/app/services/api.service.ts
+++ b/web-admin-app/src/app/services/api.service.ts
@@ -6,7 +6,6 @@ import { NzTreeNodeOptions } from 'ng-zorro-antd/tree'
import { BehaviorSubject, map, of, tap } from 'rxjs'
import {
AuthDTO,
- AuthorityDTO,
AuthorizeItemDTO,
ConsoleClientTopDTO,
ConsoleCountDTO,
@@ -20,6 +19,7 @@ import {
UserDTO,
} from './api.dto'
import { PermissionService } from 'app/shared/permission/permission.service'
+import { NzSafeAny } from 'ng-zorro-antd/core/types'
export interface UserGroupTreeItem {
name: string
@@ -37,224 +37,178 @@ export class ApiService {
private permission: PermissionService,
) {}
- authInfo: AuthDTO = {
- createTime: '',
- enable: false,
- groupId: '',
- id: '',
- name: '',
- remark: '',
- roleId: '',
- roleName: '',
- updateTime: '',
- username: '',
- authorities: [],
- }
+ AUTH_KEY_NAME = 'auth'
- getAuthInfo(force?: boolean) {
- if (this.authInfo && !force) {
- return of(this.authInfo)
- }
- localStorage.setItem('da', 'af')
- return of(this.authInfo)
- // return this.http.get>('/api/auth/info').pipe(
- // map((res) => res.data),
- // tap((res) => {
- // this.authInfo = res
- // this.permission.loadPermission(res.authorities.map((f) => f.authority))
- // }),
- // )
+ get authInfo(): AuthDTO | null {
+ let authInfo: AuthDTO | null = null
+ try {
+ const strData = localStorage.getItem(this.AUTH_KEY_NAME)
+ if (strData) {
+ authInfo = JSON.parse(strData)
+ this.permission.loadPermission(authInfo?.permissions ?? [])
+ }
+ } catch (error) {}
+ return authInfo
}
- login(data: {}) {
- return this.http.post('/api/oauth/login', data)
+ removeAuthData() {
+ localStorage.removeItem(this.AUTH_KEY_NAME)
}
- private _parseUserGroupTree(group: UserGroupTreeItem[]): NzTreeNodeOptions[] {
- if (group?.length === 0) {
- return []
- }
- return group.map((i) => {
- return {
- ...i,
- key: i.id,
- title: i.name,
- children: this._parseUserGroupTree(i.children ?? []),
- isLeaf: i.children?.length === 0 || !i.children,
- }
- })
+ upload(data: FormData) {
+ return this.http.post('/api/common/upload', data)
}
- changeUserPassword(id: string, password: string) {
- return this.http.put('/api/user/reset/password', {
- id,
- password,
- })
+ login(data: {}) {
+ return this.http.post('/api/oauth/login', data).pipe(
+ tap((res) => {
+ localStorage.setItem(this.AUTH_KEY_NAME, JSON.stringify(res.body))
+ }),
+ )
}
- getDashboardCounter() {
- return this.http.get>(`/api/console/count`)
+ logout() {
+ return this.http.post('/api/oauth/logout', null)
}
- getDashboardExpire() {
- return this.http.get>(`/api/console/expire`)
+ getOrgTree() {
+ return this.http.post('/api/umsOrganization/tree', null)
}
- getDashboardClientTop() {
- return this.http.get>(`/api/console/client/top`)
+ saveOrg(data: NzSafeAny) {
+ if (Utils.isEmpty(data.organizationId)) {
+ return this.http.post('/api/umsOrganization/add', data)
+ }
+ return this.http.post('/api/umsOrganization/update', data)
}
- getUserInfo(id: string) {
- return this.http.get>(`/api/user/${id}`).pipe()
+ deleteOrg(id: number) {
+ return this.http.post('/api/umsOrganization/delete', [id])
}
- changePassword(data: {}) {
- return this.http.put('/api/user/password', data)
+ getUserPage(data: {}) {
+ return this.http.post('/api/umsUser/list', data)
}
- getUserPage(p: {}, q: {}) {
- const params = Utils.objectToURLSearchParams({ ...p, ...q })
- return this.http.get(`/api/user/pages?${params}`)
+ deleteUser(ids: number[]) {
+ return this.http.post(`/api/umsUser/delete`, ids)
}
- saveUser(user: any) {
- if (user.id) {
- return this.http.put('/api/user', user)
- } else {
- return this.http.post('/api/user', user)
+ saveUser(data: NzSafeAny) {
+ if (Utils.isEmpty(data.userId)) {
+ return this.http.post('/api/umsUser/add', data)
}
+ return this.http.post('/api/umsUser/update', data)
}
- deleteUser(id: string) {
- return this.http.delete(`/api/user/${id}`)
- }
-
- getUserGroupTree() {
- return this.http.get>('/api/user/group/tree').pipe(
- map((res) => {
- return this._parseUserGroupTree(res.data)
- }),
- )
+ getBasicPositionPage(data: {}) {
+ return this.http.post('/api/eamBasicPosition/list', data)
}
-
- saveUserGroup(group: Partial) {
- if (group.id) {
- return this.http.put('/api/user/group', group)
- } else {
- return this.http.post('/api/user/group', group)
+ saveBasicPosition(data: NzSafeAny) {
+ if (Utils.isEmpty(data.positionId)) {
+ return this.http.post('/api/eamBasicPosition/add', data)
}
+ return this.http.post('/api/eamBasicPosition/update', data)
}
-
- updateUserStatus(id: string) {
- return this.http.put(`/api/user/enable/${id}`, null)
+ deleteBasicPosition(ids: number[]) {
+ return this.http.post(`/api/eamBasicPosition/delete`, ids)
}
- deleteUserGroup(id: string) {
- return this.http.delete(`/api/user/group/${id}`)
+ getBasicMaintenanceVendorPage(data: {}) {
+ return this.http.post('/api/eamBasicMaintenanceVendor/list', data)
}
-
- getAllRole() {
- return this.http.get>(`/api/sysRole/list`)
+ saveBasicMaintenanceVendor(data: NzSafeAny) {
+ if (Utils.isEmpty(data.maintenanceVendorId)) {
+ return this.http.post('/api/eamBasicMaintenanceVendor/add', data)
+ }
+ return this.http.post('/api/eamBasicMaintenanceVendor/update', data)
}
-
- getRolePage(p: {}, q: {}) {
- const params = Utils.objectToURLSearchParams({ ...p, ...q })
- return this.http.get(`/api/sysRole/pages?${params}`)
+ deleteBasicMaintenanceVendor(ids: number[]) {
+ return this.http.post(`/api/eamBasicMaintenanceVendor/delete`, ids)
}
- getAllPermission() {
- return this.http.get>('/api/authority/tree')
+ getBasicManufacturersVendorPage(data: {}) {
+ return this.http.post('/api/eamBasicManufacturersVendor/list', data)
}
-
- getRoleById(id: string) {
- return this.http.get>(`/api/sysRole/${id}`)
+ saveBasicManufacturersVendor(data: NzSafeAny) {
+ if (Utils.isEmpty(data.manufacturersVendorId)) {
+ return this.http.post('/api/eamBasicManufacturersVendor/add', data)
+ }
+ return this.http.post('/api/eamBasicManufacturersVendor/update', data)
}
-
- deleteRole(id: string) {
- return this.http.delete(`/api/sysRole/${id}`)
+ deleteBasicManufacturersVendor(ids: number[]) {
+ return this.http.post(`/api/eamBasicManufacturersVendor/delete`, ids)
}
- saveRole(role: NullableProps) {
- if (role.id) {
- return this.http.put('/api/sysRole', role)
- } else {
- return this.http.post('/api/sysRole', role)
+ getBasicSupplierVendorPage(data: {}) {
+ return this.http.post('/api/eamBasicSupplierVendor/list', data)
+ }
+ saveBasicSupplierVendor(data: NzSafeAny) {
+ if (Utils.isEmpty(data.supplierVendorId)) {
+ return this.http.post('/api/eamBasicSupplierVendor/add', data)
}
+ return this.http.post('/api/eamBasicSupplierVendor/update', data)
}
-
- authorize(v: {}) {
- return this.http.post('/api/client/license', v)
+ deleteBasicSupplierVendor(ids: number[]) {
+ return this.http.post(`/api/eamBasicSupplierVendor/delete`, ids)
}
- getSysLog(p: {}, q: {}) {
- const params = Utils.objectToURLSearchParams({ ...p, ...q })
- return this.http.get(`/api/sysLog/pages?${params}`)
+ getBasicWarehousePage(data: {}) {
+ return this.http.post('/api/eamBasicWarehouse/list', data)
}
-
- getEntityPage(p: {}, q: {}) {
- const params = Utils.objectToURLSearchParams({ ...p, ...q })
- return this.http.get(`/api/client/pages?${params}`)
+ saveBasicWarehouse(data: NzSafeAny) {
+ if (Utils.isEmpty(data.warehouseId)) {
+ return this.http.post('/api/eamBasicWarehouse/add', data)
+ }
+ return this.http.post('/api/eamBasicWarehouse/update', data)
}
-
- getEntityAuthorizeList(clientId: string) {
- return this.http.get>(`/api/licenseLog/${clientId}/list`)
+ deleteBasicWarehouse(ids: number[]) {
+ return this.http.post(`/api/eamBasicWarehouse/delete`, ids)
}
- getEntityDetail(id: string) {
- return this.http.get>(`/api/client/${id}`)
+ getBasicCategoryTree() {
+ return this.http.post('/api/eamBasicCategory/tree', null)
}
-
- saveEntity(entity: Partial>) {
- if (entity.id) {
- return this.http.put('/api/client', entity)
- } else {
- return this.http.post('/api/client', entity)
- }
+ addBasicCategoryTree(data: {}) {
+ return this.http.post('/api/eamBasicCategory/add', data)
}
-
- deleteEntity(id: string) {
- return this.http.delete(`/api/client/${id}`)
+ updateBasicCategoryTree(data: {}) {
+ return this.http.post('/api/eamBasicCategory/update', data)
}
-
- getProductPage(p: {}, q: {}) {
- const params = Utils.objectToURLSearchParams({ ...p, ...q })
- return this.http.get(`/api/product/pages?${params}`)
+ deleteBasicCategory(ids: number[]) {
+ return this.http.post('/api/eamBasicCategory/delete', ids)
}
- getAllProduct() {
- return this.http.get>(`/api/product/list`)
+ getStocktakingJobPage(data: {}) {
+ return this.http.post('/api/eamStocktakingJob/list', data)
}
-
- saveProduct(entity: Partial>) {
- if (entity.id) {
- return this.http.put('/api/product', entity)
- } else {
- return this.http.post('/api/product', entity)
+ saveStocktakingJob(data: NzSafeAny) {
+ if (Utils.isEmpty(data.stocktakingJobId)) {
+ return this.http.post('/api/eamStocktakingJob/add', data)
}
+ return this.http.post('/api/eamStocktakingJob/update', data)
}
-
- deleteProduct(id: string) {
- return this.http.delete(`/api/product/${id}`)
+ deleteStocktakingJob(ids: number[]) {
+ return this.http.post(`/api/eamStocktakingJob/delete`, ids)
}
- getProductVersionPage(p: {}, q: {}) {
- const params = Utils.objectToURLSearchParams({ ...p, ...q })
- return this.http.get(`/api/product/pages?${params}`)
+ beginStocktakingJob(ids: number[]) {
+ return this.http.post(`/api/eamStocktakingJob/start`, ids)
}
-
- saveVersion(entity: Partial>) {
- if (entity.id) {
- return this.http.put('/api/product', entity)
- } else {
- return this.http.post('/api/product', entity)
- }
+ stopStocktakingJob(ids: number[]) {
+ return this.http.post(`/api/eamStocktakingJob/complete`, ids)
}
- deleteVersion(id: string, pid: string) {
- return this.http.delete(`/api/product/${id}`)
- }
+ /**
+ *
+ *
+ * -------------------------------
+ *
+ *
+ */
- getProductDetail(pid: string) {
- return this.http.get(`/api/product/${pid}`)
+ getEntityPage(p: {}, q: {}) {
+ const params = Utils.objectToURLSearchParams({ ...p, ...q })
+ return this.http.get(`/api/client/pages?${params}`)
}
}
diff --git a/web-admin-app/src/app/services/local-http-interceptor.service.ts b/web-admin-app/src/app/services/local-http-interceptor.service.ts
index 2a3fc76..9441b00 100644
--- a/web-admin-app/src/app/services/local-http-interceptor.service.ts
+++ b/web-admin-app/src/app/services/local-http-interceptor.service.ts
@@ -11,6 +11,7 @@ import { Observable, throwError } from 'rxjs'
import { catchError, filter, tap } from 'rxjs/operators'
import { ActivatedRoute, NavigationEnd, Router } from '@angular/router'
import { NzMessageService } from 'ng-zorro-antd/message'
+import { ApiService } from './api.service'
function uintToString(uintArray: Uint8Array) {
const encodedString = String.fromCharCode.apply(null, uintArray as any)
@@ -59,30 +60,11 @@ export function getErrorMessage(err: HttpErrorResponse & Record, de
export class LocalHttpInterceptorService implements HttpInterceptor {
constructor(
private msg: NzMessageService,
+ private api: ApiService,
private router: Router,
private route: ActivatedRoute,
) {}
- tokenName = 'AUTH_TOKEN'
-
- getAccess() {
- try {
- let persistData = localStorage.getItem(this.tokenName)
- if (persistData) {
- return JSON.parse(persistData)
- }
- } catch (error) {}
- return {}
- }
-
- setAccess(accessData: { access_token: string } & Record) {
- localStorage.setItem(this.tokenName, JSON.stringify(accessData))
- }
-
- removeAccess() {
- localStorage.removeItem(this.tokenName)
- }
-
intercept(req: HttpRequest, next: HttpHandler): Observable> {
let url = req.url
let baseHref = ''
@@ -92,21 +74,18 @@ export class LocalHttpInterceptorService implements HttpInterceptor {
if (baseHref.endsWith('/')) {
baseHref = baseHref.slice(0, baseHref.length - 1)
}
- if (['/api/auth/info'].includes(req.url)) {
- baseHref = '/authserver'
- }
+
url = baseHref + req.url
}
- const accessData = this.getAccess()
- let token = accessData?.access_token
- let refreshToken = accessData?.refresh_token
+ const accessData = this.api.authInfo
+ let token = accessData?.authorization
if (this.shouldRemoveAuthorizationToken(req.url)) {
token = ''
}
- const Authorization: Record = token ? { Authorization: `Bearer ${token}` } : {}
+ const Authorization: Record = token ? { Authorization: token } : {}
const newRequest = req.clone({
...req,
@@ -122,14 +101,6 @@ export class LocalHttpInterceptorService implements HttpInterceptor {
return next.handle(authReq).pipe(
tap((res) => {
if (res instanceof HttpResponse) {
- const access_token = res.headers.get('Rep-Access-Token')
- const refresh_token = res.headers.get('Rep-Refresh-Token')
- if (access_token) {
- this.setAccess({
- access_token,
- refresh_token,
- })
- }
if (res.body?.success === false && res.body.desc) {
throw new HttpErrorResponse({ error: res.body })
}
@@ -149,7 +120,7 @@ export class LocalHttpInterceptorService implements HttpInterceptor {
switch (res.status) {
case 401:
if (window.location.pathname !== '/login') {
- this.removeAccess()
+ this.api.removeAuthData()
this.msg.error('登录已失效')
setTimeout(() => {
window.location.href = '/login'
@@ -176,23 +147,6 @@ export class LocalHttpInterceptorService implements HttpInterceptor {
}
private shouldRemoveAuthorizationToken(url: string) {
- if (url.includes('/api/auth/info')) {
- return false
- }
-
- if (url.includes('/api/login')) {
- return true
- }
- if (url.includes('/api/auth/')) {
- return true
- }
- if (url.includes('/api/reset/')) {
- return true
- }
- if (url.includes('/api/refresh_token')) {
- return true
- }
-
return false
}
}
diff --git a/web-admin-app/src/app/components/app-page/app-page.component.html b/web-admin-app/src/app/shared/components/app-page/app-page.component.html
similarity index 100%
rename from web-admin-app/src/app/components/app-page/app-page.component.html
rename to web-admin-app/src/app/shared/components/app-page/app-page.component.html
diff --git a/web-admin-app/src/app/components/app-page/app-page.component.less b/web-admin-app/src/app/shared/components/app-page/app-page.component.less
similarity index 100%
rename from web-admin-app/src/app/components/app-page/app-page.component.less
rename to web-admin-app/src/app/shared/components/app-page/app-page.component.less
diff --git a/web-admin-app/src/app/components/app-page/app-page.component.ts b/web-admin-app/src/app/shared/components/app-page/app-page.component.ts
similarity index 97%
rename from web-admin-app/src/app/components/app-page/app-page.component.ts
rename to web-admin-app/src/app/shared/components/app-page/app-page.component.ts
index cfb0f41..73ea490 100644
--- a/web-admin-app/src/app/components/app-page/app-page.component.ts
+++ b/web-admin-app/src/app/shared/components/app-page/app-page.component.ts
@@ -6,8 +6,6 @@ import { Subscription, filter } from 'rxjs'
@Component({
selector: 'app-page',
- standalone: true,
- imports: [SharedModule],
templateUrl: './app-page.component.html',
styleUrl: './app-page.component.less',
})
diff --git a/web-admin-app/src/app/components/form-error-tips/form-error-tips.component.html b/web-admin-app/src/app/shared/components/form-error-tips/form-error-tips.component.html
similarity index 100%
rename from web-admin-app/src/app/components/form-error-tips/form-error-tips.component.html
rename to web-admin-app/src/app/shared/components/form-error-tips/form-error-tips.component.html
diff --git a/web-admin-app/src/app/shared/components/form-error-tips/form-error-tips.component.less b/web-admin-app/src/app/shared/components/form-error-tips/form-error-tips.component.less
new file mode 100644
index 0000000..e69de29
diff --git a/web-admin-app/src/app/components/form-error-tips/form-error-tips.component.ts b/web-admin-app/src/app/shared/components/form-error-tips/form-error-tips.component.ts
similarity index 100%
rename from web-admin-app/src/app/components/form-error-tips/form-error-tips.component.ts
rename to web-admin-app/src/app/shared/components/form-error-tips/form-error-tips.component.ts
diff --git a/web-admin-app/src/app/components/header/header.component.html b/web-admin-app/src/app/shared/components/header/header.component.html
similarity index 98%
rename from web-admin-app/src/app/components/header/header.component.html
rename to web-admin-app/src/app/shared/components/header/header.component.html
index 16a4e17..0195dff 100644
--- a/web-admin-app/src/app/components/header/header.component.html
+++ b/web-admin-app/src/app/shared/components/header/header.component.html
@@ -66,7 +66,7 @@
- {{ api.authInfo.name || 'admin' }}
+ {{ api.authInfo?.userName ?? '-' }}
diff --git a/web-admin-app/src/app/components/header/header.component.less b/web-admin-app/src/app/shared/components/header/header.component.less
similarity index 100%
rename from web-admin-app/src/app/components/header/header.component.less
rename to web-admin-app/src/app/shared/components/header/header.component.less
diff --git a/web-admin-app/src/app/components/header/header.component.ts b/web-admin-app/src/app/shared/components/header/header.component.ts
similarity index 82%
rename from web-admin-app/src/app/components/header/header.component.ts
rename to web-admin-app/src/app/shared/components/header/header.component.ts
index f49e969..00d9161 100644
--- a/web-admin-app/src/app/components/header/header.component.ts
+++ b/web-admin-app/src/app/shared/components/header/header.component.ts
@@ -1,5 +1,5 @@
+import { lastValueFrom } from 'rxjs'
import { Component, OnInit, inject } from '@angular/core'
-import { SharedModule } from '../../shared/shared.module'
import { ApiService, LocalHttpInterceptorService } from 'app/services'
import { Router } from '@angular/router'
import { NzMessageService } from 'ng-zorro-antd/message'
@@ -7,15 +7,12 @@ import { NzModalService } from 'ng-zorro-antd/modal'
import { PermissionService } from 'app/shared/permission/permission.service'
@Component({
- standalone: true,
selector: 'app-header',
templateUrl: './header.component.html',
styleUrls: ['./header.component.less'],
- imports: [SharedModule],
})
export class HeaderComponent implements OnInit {
constructor(
- private local: LocalHttpInterceptorService,
private router: Router,
private msg: NzMessageService,
private modal: NzModalService,
@@ -30,9 +27,10 @@ export class HeaderComponent implements OnInit {
this.modal.confirm({
nzTitle: '退出登录',
nzContent: '确认要退出当前账户吗?',
- nzOnOk: () => {
+ nzOnOk: async () => {
+ await lastValueFrom(this.api.logout())
this.permission.reset()
- this.local.removeAccess()
+ this.api.removeAuthData()
this.router.navigate(['/login'])
this.msg.success('退出成功')
},
diff --git a/web-admin-app/src/app/shared/components/index.ts b/web-admin-app/src/app/shared/components/index.ts
new file mode 100644
index 0000000..5abf137
--- /dev/null
+++ b/web-admin-app/src/app/shared/components/index.ts
@@ -0,0 +1,6 @@
+// export * from "./form-error-tips/form-error-tips.component";
+// export * from "./server-paginated-table";
+
+export * from './header/header.component'
+export * from './layout/layout.component'
+export * from './user-form/user-form.component'
diff --git a/web-admin-app/src/app/components/layout/layout.component.html b/web-admin-app/src/app/shared/components/layout/layout.component.html
similarity index 100%
rename from web-admin-app/src/app/components/layout/layout.component.html
rename to web-admin-app/src/app/shared/components/layout/layout.component.html
diff --git a/web-admin-app/src/app/shared/components/layout/layout.component.less b/web-admin-app/src/app/shared/components/layout/layout.component.less
new file mode 100644
index 0000000..ba84b94
--- /dev/null
+++ b/web-admin-app/src/app/shared/components/layout/layout.component.less
@@ -0,0 +1,15 @@
+:host {
+ display: block;
+ height: 100%;
+}
+
+// .app-width {
+// ::ng-deep {
+// router-outlet+* {
+// display: block;
+// width: 100%;
+// height: 100%;
+// overflow: hidden;
+// }
+// }
+// }
\ No newline at end of file
diff --git a/web-admin-app/src/app/shared/components/layout/layout.component.ts b/web-admin-app/src/app/shared/components/layout/layout.component.ts
new file mode 100644
index 0000000..54d675a
--- /dev/null
+++ b/web-admin-app/src/app/shared/components/layout/layout.component.ts
@@ -0,0 +1,8 @@
+import { Component } from '@angular/core'
+
+@Component({
+ selector: 'app-layout',
+ templateUrl: './layout.component.html',
+ styleUrls: ['./layout.component.less'],
+})
+export class LayoutComponent {}
diff --git a/web-admin-app/src/app/components/range-picker/range-picker.component.html b/web-admin-app/src/app/shared/components/range-picker/range-picker.component.html
similarity index 100%
rename from web-admin-app/src/app/components/range-picker/range-picker.component.html
rename to web-admin-app/src/app/shared/components/range-picker/range-picker.component.html
diff --git a/web-admin-app/src/app/shared/components/range-picker/range-picker.component.less b/web-admin-app/src/app/shared/components/range-picker/range-picker.component.less
new file mode 100644
index 0000000..e69de29
diff --git a/web-admin-app/src/app/components/range-picker/range-picker.component.ts b/web-admin-app/src/app/shared/components/range-picker/range-picker.component.ts
similarity index 100%
rename from web-admin-app/src/app/components/range-picker/range-picker.component.ts
rename to web-admin-app/src/app/shared/components/range-picker/range-picker.component.ts
diff --git a/web-admin-app/src/app/components/server-paginated-table/date-query/date-query.component.html b/web-admin-app/src/app/shared/components/server-paginated-table/date-query/date-query.component.html
similarity index 100%
rename from web-admin-app/src/app/components/server-paginated-table/date-query/date-query.component.html
rename to web-admin-app/src/app/shared/components/server-paginated-table/date-query/date-query.component.html
diff --git a/web-admin-app/src/app/components/server-paginated-table/date-query/date-query.component.less b/web-admin-app/src/app/shared/components/server-paginated-table/date-query/date-query.component.less
similarity index 100%
rename from web-admin-app/src/app/components/server-paginated-table/date-query/date-query.component.less
rename to web-admin-app/src/app/shared/components/server-paginated-table/date-query/date-query.component.less
diff --git a/web-admin-app/src/app/components/server-paginated-table/date-query/date-query.component.ts b/web-admin-app/src/app/shared/components/server-paginated-table/date-query/date-query.component.ts
similarity index 100%
rename from web-admin-app/src/app/components/server-paginated-table/date-query/date-query.component.ts
rename to web-admin-app/src/app/shared/components/server-paginated-table/date-query/date-query.component.ts
diff --git a/web-admin-app/src/app/components/server-paginated-table/index.ts b/web-admin-app/src/app/shared/components/server-paginated-table/index.ts
similarity index 100%
rename from web-admin-app/src/app/components/server-paginated-table/index.ts
rename to web-admin-app/src/app/shared/components/server-paginated-table/index.ts
diff --git a/web-admin-app/src/app/components/server-paginated-table/query-item/query-item.component.html b/web-admin-app/src/app/shared/components/server-paginated-table/query-item/query-item.component.html
similarity index 100%
rename from web-admin-app/src/app/components/server-paginated-table/query-item/query-item.component.html
rename to web-admin-app/src/app/shared/components/server-paginated-table/query-item/query-item.component.html
diff --git a/web-admin-app/src/app/components/server-paginated-table/query-item/query-item.component.less b/web-admin-app/src/app/shared/components/server-paginated-table/query-item/query-item.component.less
similarity index 53%
rename from web-admin-app/src/app/components/server-paginated-table/query-item/query-item.component.less
rename to web-admin-app/src/app/shared/components/server-paginated-table/query-item/query-item.component.less
index 0abe4ca..1241bfe 100644
--- a/web-admin-app/src/app/components/server-paginated-table/query-item/query-item.component.less
+++ b/web-admin-app/src/app/shared/components/server-paginated-table/query-item/query-item.component.less
@@ -1,7 +1,8 @@
.query-control {
::ng-deep {
input {
- width: 100px;
+ min-width: 100px;
+ width: 100%;
}
}
}
\ No newline at end of file
diff --git a/web-admin-app/src/app/components/server-paginated-table/query-item/query-item.component.ts b/web-admin-app/src/app/shared/components/server-paginated-table/query-item/query-item.component.ts
similarity index 100%
rename from web-admin-app/src/app/components/server-paginated-table/query-item/query-item.component.ts
rename to web-admin-app/src/app/shared/components/server-paginated-table/query-item/query-item.component.ts
diff --git a/web-admin-app/src/app/components/server-paginated-table/server-paginated-table.component.html b/web-admin-app/src/app/shared/components/server-paginated-table/server-paginated-table.component.html
similarity index 86%
rename from web-admin-app/src/app/components/server-paginated-table/server-paginated-table.component.html
rename to web-admin-app/src/app/shared/components/server-paginated-table/server-paginated-table.component.html
index cc81e0d..4191ba8 100644
--- a/web-admin-app/src/app/components/server-paginated-table/server-paginated-table.component.html
+++ b/web-admin-app/src/app/shared/components/server-paginated-table/server-paginated-table.component.html
@@ -44,10 +44,17 @@
+ @if (tableAction) {
+
+
+
+ }
+
{{ th.title }}
+ {{ th.title }} |
}
}
@if (options.operate.length > 0) {
- 操作 |
+ 操作 |
+ }
+ @if (options.columns.length > 3) {
+
+
+
+
+ |
}
-
-
-
-
- |
@@ -131,7 +140,7 @@
}
@if (options.operate.length > 0) {
-
+ |
@@ -154,7 +163,9 @@
|
}
- |
+ @if (options.columns.length > 3) {
+ |
+ }
}
diff --git a/web-admin-app/src/app/components/server-paginated-table/server-paginated-table.component.less b/web-admin-app/src/app/shared/components/server-paginated-table/server-paginated-table.component.less
similarity index 100%
rename from web-admin-app/src/app/components/server-paginated-table/server-paginated-table.component.less
rename to web-admin-app/src/app/shared/components/server-paginated-table/server-paginated-table.component.less
diff --git a/web-admin-app/src/app/components/server-paginated-table/server-paginated-table.component.ts b/web-admin-app/src/app/shared/components/server-paginated-table/server-paginated-table.component.ts
similarity index 98%
rename from web-admin-app/src/app/components/server-paginated-table/server-paginated-table.component.ts
rename to web-admin-app/src/app/shared/components/server-paginated-table/server-paginated-table.component.ts
index c750db5..d634843 100644
--- a/web-admin-app/src/app/components/server-paginated-table/server-paginated-table.component.ts
+++ b/web-admin-app/src/app/shared/components/server-paginated-table/server-paginated-table.component.ts
@@ -178,6 +178,10 @@ export class ServerPaginatedTableComponent implements OnInit, OnChanges {
* 不使用表格模式,自定义渲染
*/
@Input() renderItem?: TemplateRef<{}>
+ /**
+ * 不使用表格模式,自定义渲染
+ */
+ @Input() tableAction?: TemplateRef<{}>
@ContentChild(TableFormDirective, { static: true, read: TemplateRef })
formContentChild!: TemplateRef
diff --git a/web-admin-app/src/app/components/server-paginated-table/server-paginated-table.module.ts b/web-admin-app/src/app/shared/components/server-paginated-table/server-paginated-table.module.ts
similarity index 100%
rename from web-admin-app/src/app/components/server-paginated-table/server-paginated-table.module.ts
rename to web-admin-app/src/app/shared/components/server-paginated-table/server-paginated-table.module.ts
diff --git a/web-admin-app/src/app/components/server-paginated-table/server-paginated-table.service.ts b/web-admin-app/src/app/shared/components/server-paginated-table/server-paginated-table.service.ts
similarity index 100%
rename from web-admin-app/src/app/components/server-paginated-table/server-paginated-table.service.ts
rename to web-admin-app/src/app/shared/components/server-paginated-table/server-paginated-table.service.ts
diff --git a/web-admin-app/src/app/components/server-paginated-table/table-action.directive.ts b/web-admin-app/src/app/shared/components/server-paginated-table/table-action.directive.ts
similarity index 100%
rename from web-admin-app/src/app/components/server-paginated-table/table-action.directive.ts
rename to web-admin-app/src/app/shared/components/server-paginated-table/table-action.directive.ts
diff --git a/web-admin-app/src/app/components/server-paginated-table/table-form.directive.ts b/web-admin-app/src/app/shared/components/server-paginated-table/table-form.directive.ts
similarity index 100%
rename from web-admin-app/src/app/components/server-paginated-table/table-form.directive.ts
rename to web-admin-app/src/app/shared/components/server-paginated-table/table-form.directive.ts
diff --git a/web-admin-app/src/app/components/user-form/user-form.component.html b/web-admin-app/src/app/shared/components/user-form/user-form.component.html
similarity index 100%
rename from web-admin-app/src/app/components/user-form/user-form.component.html
rename to web-admin-app/src/app/shared/components/user-form/user-form.component.html
diff --git a/web-admin-app/src/app/shared/components/user-form/user-form.component.less b/web-admin-app/src/app/shared/components/user-form/user-form.component.less
new file mode 100644
index 0000000..e69de29
diff --git a/web-admin-app/src/app/components/user-form/user-form.component.ts b/web-admin-app/src/app/shared/components/user-form/user-form.component.ts
similarity index 96%
rename from web-admin-app/src/app/components/user-form/user-form.component.ts
rename to web-admin-app/src/app/shared/components/user-form/user-form.component.ts
index 7935c73..6edefec 100644
--- a/web-admin-app/src/app/components/user-form/user-form.component.ts
+++ b/web-admin-app/src/app/shared/components/user-form/user-form.component.ts
@@ -7,8 +7,7 @@ import { NZ_MODAL_DATA } from 'ng-zorro-antd/modal'
@Component({
selector: 'app-user-form',
- standalone: true,
- imports: [SharedModule],
+
templateUrl: './user-form.component.html',
styleUrl: './user-form.component.less',
})
diff --git a/web-admin-app/src/app/shared/shared.module.ts b/web-admin-app/src/app/shared/shared.module.ts
index 42a5596..42a97ba 100644
--- a/web-admin-app/src/app/shared/shared.module.ts
+++ b/web-admin-app/src/app/shared/shared.module.ts
@@ -3,15 +3,27 @@ import { CommonModule } from '@angular/common'
import { RouterOutlet, RouterModule } from '@angular/router'
import { EditorModule } from '@tinymce/tinymce-angular'
import { ngZorroModules } from './ng-zorro'
-import { ServerPaginatedTableModule } from '../components/server-paginated-table'
-import { FormErrorTipsComponent } from '../components/form-error-tips/form-error-tips.component'
+import { ServerPaginatedTableModule } from './components/server-paginated-table'
+import { FormErrorTipsComponent } from './components/form-error-tips/form-error-tips.component'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { PermissionModule } from './permission/permission.module'
-import { RangePickerComponent } from './../components/range-picker/range-picker.component'
+import { RangePickerComponent } from './components/range-picker/range-picker.component'
+import { AppPageComponent } from './components/app-page/app-page.component'
+import { LayoutComponent, HeaderComponent, UserFormComponent } from './components'
@NgModule({
- declarations: [],
- imports: [RouterOutlet, FormErrorTipsComponent, PermissionModule, RangePickerComponent],
+ declarations: [AppPageComponent, LayoutComponent, HeaderComponent, UserFormComponent],
+ imports: [
+ CommonModule,
+ FormsModule,
+ ReactiveFormsModule,
+ RouterOutlet,
+ RouterModule,
+ FormErrorTipsComponent,
+ PermissionModule,
+ RangePickerComponent,
+ ...ngZorroModules,
+ ],
exports: [
CommonModule,
RouterOutlet,
@@ -23,6 +35,10 @@ import { RangePickerComponent } from './../components/range-picker/range-picker.
PermissionModule,
RangePickerComponent,
EditorModule,
+ AppPageComponent,
+ UserFormComponent,
+ LayoutComponent,
+ HeaderComponent,
...ngZorroModules,
],
})
diff --git a/web-admin-app/src/app/types/http.ts b/web-admin-app/src/app/types/http.ts
index 5eaad5f..ca613d8 100644
--- a/web-admin-app/src/app/types/http.ts
+++ b/web-admin-app/src/app/types/http.ts
@@ -1,6 +1,6 @@
export type JwResponse = {
- data: T
+ // data: T
body: T
- msg: string
+ desc: string
code: number
}
diff --git a/web-admin-app/src/assets/images/jiluo_logo.png b/web-admin-app/src/assets/images/jiluo_logo.png
new file mode 100644
index 0000000..b635ac2
Binary files /dev/null and b/web-admin-app/src/assets/images/jiluo_logo.png differ
diff --git a/web-admin-app/src/assets/images/login-bg.jpg b/web-admin-app/src/assets/images/login-bg.jpg
index 848d29e..c7a618a 100644
Binary files a/web-admin-app/src/assets/images/login-bg.jpg and b/web-admin-app/src/assets/images/login-bg.jpg differ
diff --git a/web-admin-app/src/assets/images/logo.png b/web-admin-app/src/assets/images/logo.png
deleted file mode 100644
index c518c64..0000000
Binary files a/web-admin-app/src/assets/images/logo.png and /dev/null differ
diff --git a/web-admin-app/src/styles.less b/web-admin-app/src/styles.less
index b3230bc..630a37f 100644
--- a/web-admin-app/src/styles.less
+++ b/web-admin-app/src/styles.less
@@ -63,6 +63,19 @@ body {
background-color: rgba(0, 0, 0, .171)
}
+.upload-btn {
+ position: relative;
+
+ input {
+ display: block;
+ height: 100%;
+ position: absolute;
+ inset: 0;
+ opacity: 0;
+ font-size: 0;
+ cursor: pointer;
+ }
+}
ul,