create-jnrs-vue 1.2.36 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bin/create.mjs +11 -3
- package/jnrs-vue/AGENTS.md +78 -0
- package/jnrs-vue/README.md +11 -13
- package/jnrs-vue/components.d.ts +5 -3
- package/jnrs-vue/package.json +11 -4
- package/jnrs-vue/public/system/menu.json +25 -35
- package/jnrs-vue/src/api/examples/portfolio-management/portfolio.ts +163 -0
- package/jnrs-vue/src/api/examples/portfolio-management/program.ts +149 -0
- package/jnrs-vue/src/api/examples/portfolio-management/project.ts +125 -0
- package/jnrs-vue/src/api/examples/program-management/index.ts +143 -0
- package/jnrs-vue/src/api/examples/program-management/sub-project.ts +125 -0
- package/jnrs-vue/src/api/{demos/project.ts → examples/project-management/index.ts} +48 -23
- package/jnrs-vue/src/api/{demos → examples/project-management}/manager.ts +1 -1
- package/jnrs-vue/src/api/request.ts +1 -1
- package/jnrs-vue/src/api/system/index.ts +2 -2
- package/jnrs-vue/src/assets/styles/root.scss +5 -0
- package/jnrs-vue/src/components/common/DictTag.vue +12 -6
- package/jnrs-vue/src/components/common/ImageView.vue +0 -1
- package/jnrs-vue/src/components/select/SelectManager.vue +1 -1
- package/jnrs-vue/src/composables/useDateRangeField.ts +10 -6
- package/jnrs-vue/src/layout/RouterTabs.vue +2 -2
- package/jnrs-vue/src/layout/TopHeader.vue +2 -2
- package/jnrs-vue/src/utils/field.ts +73 -0
- package/jnrs-vue/src/utils/file.ts +0 -36
- package/jnrs-vue/src/utils/index.ts +1 -0
- package/jnrs-vue/src/views/{demos → examples}/playground/RequestPage.vue +1 -1
- package/jnrs-vue/src/views/examples/portfolio-management/index.vue +65 -0
- package/jnrs-vue/src/views/examples/portfolio-management/portfolioTree/editDialog.vue +155 -0
- package/jnrs-vue/src/views/examples/portfolio-management/portfolioTree/index.vue +257 -0
- package/jnrs-vue/src/views/examples/portfolio-management/programList/editDialog.vue +167 -0
- package/jnrs-vue/src/views/examples/portfolio-management/programList/index.vue +225 -0
- package/jnrs-vue/src/views/examples/portfolio-management/projectList/editDialog.vue +177 -0
- package/jnrs-vue/src/views/examples/portfolio-management/projectList/index.vue +159 -0
- package/jnrs-vue/src/views/examples/program-management/index.vue +48 -0
- package/jnrs-vue/src/views/examples/program-management/mainPage/editDialog.vue +201 -0
- package/jnrs-vue/src/views/examples/program-management/mainPage/index.vue +218 -0
- package/jnrs-vue/src/views/examples/program-management/subPage/editDialog.vue +202 -0
- package/jnrs-vue/src/views/examples/program-management/subPage/index.vue +176 -0
- package/jnrs-vue/src/views/{demos/crud → examples/project-management}/EditDialog.vue +77 -37
- package/jnrs-vue/src/views/{demos/crud → examples/project-management}/index.vue +67 -38
- package/jnrs-vue/src/views/home/index.vue +8 -8
- package/jnrs-vue/src/views/login/index.vue +1 -1
- package/jnrs-vue/viteMockServe/fail.ts +2 -2
- package/jnrs-vue/viteMockServe/index.ts +254 -7
- package/jnrs-vue/viteMockServe/json/dictRes.json +11 -1
- package/jnrs-vue/viteMockServe/json/{loginRes_admin.json → loginResAdmin.json} +20 -0
- package/jnrs-vue/viteMockServe/json/programListRes.json +81 -0
- package/jnrs-vue/viteMockServe/json/projectListRes.json +34 -31
- package/jnrs-vue/viteMockServe/json/subProjectListRes.json +221 -0
- package/jnrs-vue/viteMockServe/success.ts +8 -8
- package/package.json +2 -2
- package/jnrs-vue/AGENTS/README_API.md +0 -95
- package/jnrs-vue/AGENTS/README_BASE.md +0 -11
- package/jnrs-vue/AGENTS/README_COMMON.md +0 -9
- package/jnrs-vue/AGENTS/README_CRUD.md +0 -90
- package/jnrs-vue/AGENTS/README_DEPENDENCIES.md +0 -11
- package/jnrs-vue/AGENTS/README_MENU.md +0 -593
- /package/jnrs-vue/src/views/{demos → examples}/playground/index.vue +0 -0
- /package/jnrs-vue/viteMockServe/json/{loginRes_user.json → loginResUser.json} +0 -0
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @File : portfolio-management/project.ts
|
|
3
|
+
* @Desc. : 项目模块接口文档(右侧表格,归属项目集)
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { IPagination, IPageTableData } from '@/types'
|
|
7
|
+
import { axiosRequest } from '../../request'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* 项目(归属项目集) - 详情
|
|
11
|
+
*/
|
|
12
|
+
export interface PortfolioProject {
|
|
13
|
+
id: string
|
|
14
|
+
/** 父项目集Id */
|
|
15
|
+
programId: string
|
|
16
|
+
/** 项目编码 */
|
|
17
|
+
code: number
|
|
18
|
+
/** 项目名称 */
|
|
19
|
+
name: string
|
|
20
|
+
/**
|
|
21
|
+
* 项目类型
|
|
22
|
+
* @dict projectType
|
|
23
|
+
* @enumValues [0, 1, 2]
|
|
24
|
+
*/
|
|
25
|
+
projectType: number
|
|
26
|
+
/** 项目经理Id */
|
|
27
|
+
managerId: number
|
|
28
|
+
/** 项目经理名称 */
|
|
29
|
+
managerName: string
|
|
30
|
+
/** 预算 */
|
|
31
|
+
budget: number
|
|
32
|
+
/** 进度 */
|
|
33
|
+
progress: number
|
|
34
|
+
/**
|
|
35
|
+
* 项目状态
|
|
36
|
+
* @dict projectStatus
|
|
37
|
+
*/
|
|
38
|
+
projectStatus: number
|
|
39
|
+
/** 计划开始时间 */
|
|
40
|
+
plannedStartDate: string
|
|
41
|
+
/** 计划完成时间 */
|
|
42
|
+
plannedFinishDate: string
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* 项目(归属项目集) - 新增
|
|
47
|
+
*/
|
|
48
|
+
export interface AddPortfolioProject {
|
|
49
|
+
programId?: string
|
|
50
|
+
code: number
|
|
51
|
+
name: string
|
|
52
|
+
projectType?: number
|
|
53
|
+
/**
|
|
54
|
+
* 项目经理
|
|
55
|
+
* @useSelectComponent SelectManager
|
|
56
|
+
*/
|
|
57
|
+
managerId?: Record<string, unknown> | number
|
|
58
|
+
budget: number
|
|
59
|
+
plannedStartDate: string
|
|
60
|
+
plannedFinishDate: string
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* 项目(归属项目集) - 修改
|
|
65
|
+
*/
|
|
66
|
+
export interface UpdatePortfolioProject extends AddPortfolioProject {
|
|
67
|
+
id: string
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* 项目(归属项目集) - 查询
|
|
72
|
+
*/
|
|
73
|
+
export interface PortfolioProjectQuery extends IPagination {
|
|
74
|
+
/**
|
|
75
|
+
* 父项目集Id
|
|
76
|
+
* @foreignKey programId
|
|
77
|
+
*/
|
|
78
|
+
programId?: string
|
|
79
|
+
name?: string
|
|
80
|
+
projectType?: number
|
|
81
|
+
projectStatus?: number
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* 项目(归属项目集) - 列表数据
|
|
86
|
+
*/
|
|
87
|
+
export const portfolioProjectTableApi = (params?: PortfolioProjectQuery): Promise<IPageTableData<PortfolioProject>> => {
|
|
88
|
+
return axiosRequest({
|
|
89
|
+
url: '/agentic/portfolio-project/list',
|
|
90
|
+
method: 'get',
|
|
91
|
+
params
|
|
92
|
+
})
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* 项目(归属项目集) - 新增
|
|
97
|
+
*/
|
|
98
|
+
export const addPortfolioProjectApi = (data: AddPortfolioProject) => {
|
|
99
|
+
return axiosRequest({
|
|
100
|
+
url: '/agentic/portfolio-project/save',
|
|
101
|
+
method: 'post',
|
|
102
|
+
data
|
|
103
|
+
})
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* 项目(归属项目集) - 修改
|
|
108
|
+
*/
|
|
109
|
+
export const editPortfolioProjectApi = (data: UpdatePortfolioProject) => {
|
|
110
|
+
return axiosRequest({
|
|
111
|
+
url: '/agentic/portfolio-project/save',
|
|
112
|
+
method: 'post',
|
|
113
|
+
data
|
|
114
|
+
})
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* 项目(归属项目集) - 删除
|
|
119
|
+
*/
|
|
120
|
+
export const deletePortfolioProjectApi = (id: string) => {
|
|
121
|
+
return axiosRequest({
|
|
122
|
+
url: `/agentic/portfolio-project/delete/${id}`,
|
|
123
|
+
method: 'delete'
|
|
124
|
+
})
|
|
125
|
+
}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @File : program-management/index.ts
|
|
3
|
+
* @Desc. : 项目集模块接口文档(主表)
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { IFullResponse } from '@jnrs/shared'
|
|
7
|
+
import type { IPagination, IPageTableData } from '@/types'
|
|
8
|
+
import { axiosRequest } from '../../request'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* 项目集 - 详情
|
|
12
|
+
*/
|
|
13
|
+
export interface Program {
|
|
14
|
+
id: string
|
|
15
|
+
/** 项目集编码 */
|
|
16
|
+
code: number
|
|
17
|
+
/** 项目集名称 */
|
|
18
|
+
name: string
|
|
19
|
+
/** 项目集描述 */
|
|
20
|
+
description: string
|
|
21
|
+
/** 项目经理Id */
|
|
22
|
+
managerId: number
|
|
23
|
+
/** 项目经理名称 */
|
|
24
|
+
managerName: string
|
|
25
|
+
/** 预算 */
|
|
26
|
+
budget: number
|
|
27
|
+
/** 开始日期 */
|
|
28
|
+
startDate: string
|
|
29
|
+
/** 结束日期 */
|
|
30
|
+
endDate: string
|
|
31
|
+
/**
|
|
32
|
+
* 项目集状态
|
|
33
|
+
* @dict programStatus
|
|
34
|
+
* @enumValues [0, 1, 2]
|
|
35
|
+
*/
|
|
36
|
+
status: number
|
|
37
|
+
/**
|
|
38
|
+
* 启用状态
|
|
39
|
+
* @independentModification programEnableApi
|
|
40
|
+
*/
|
|
41
|
+
enable: boolean
|
|
42
|
+
/** 子项目数量 */
|
|
43
|
+
projectCount: number
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* 项目集 - 新增
|
|
48
|
+
*/
|
|
49
|
+
export interface AddProgram {
|
|
50
|
+
code: number
|
|
51
|
+
name: string
|
|
52
|
+
description: string
|
|
53
|
+
/**
|
|
54
|
+
* 项目经理
|
|
55
|
+
* @useSelectComponent SelectManager
|
|
56
|
+
*/
|
|
57
|
+
managerId?: Record<string, unknown> | number
|
|
58
|
+
budget: number
|
|
59
|
+
startDate: string
|
|
60
|
+
endDate: string
|
|
61
|
+
status?: number
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* 项目集 - 修改
|
|
66
|
+
*/
|
|
67
|
+
export interface UpdateProgram extends AddProgram {
|
|
68
|
+
id: string
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* 项目集 - 启用/禁用
|
|
73
|
+
*/
|
|
74
|
+
export interface ProgramEnable {
|
|
75
|
+
id: string
|
|
76
|
+
enable: boolean
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* 项目集 - 查询
|
|
81
|
+
*/
|
|
82
|
+
export interface ProgramQuery extends IPagination {
|
|
83
|
+
code?: string
|
|
84
|
+
name?: string
|
|
85
|
+
managerId?: number
|
|
86
|
+
status?: number
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* 项目集 - 列表数据
|
|
91
|
+
*/
|
|
92
|
+
export const programTableApi = (params?: ProgramQuery): Promise<IPageTableData<Program>> => {
|
|
93
|
+
return axiosRequest({
|
|
94
|
+
url: '/agentic/program/list',
|
|
95
|
+
method: 'get',
|
|
96
|
+
params
|
|
97
|
+
})
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* 项目集 - 新增
|
|
102
|
+
*/
|
|
103
|
+
export const addProgramApi = (data: AddProgram) => {
|
|
104
|
+
return axiosRequest({
|
|
105
|
+
url: '/agentic/program/save',
|
|
106
|
+
method: 'post',
|
|
107
|
+
data
|
|
108
|
+
})
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* 项目集 - 修改
|
|
113
|
+
*/
|
|
114
|
+
export const editProgramApi = (data: UpdateProgram) => {
|
|
115
|
+
return axiosRequest({
|
|
116
|
+
url: '/agentic/program/save',
|
|
117
|
+
method: 'post',
|
|
118
|
+
data
|
|
119
|
+
})
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* 项目集 - 删除
|
|
124
|
+
*/
|
|
125
|
+
export const deleteProgramApi = (id: string): Promise<IFullResponse<unknown>> => {
|
|
126
|
+
return axiosRequest({
|
|
127
|
+
url: `/agentic/program/delete/${id}`,
|
|
128
|
+
method: 'delete',
|
|
129
|
+
returnFullResponse: true
|
|
130
|
+
})
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* 项目集 - 启用/禁用
|
|
135
|
+
*/
|
|
136
|
+
export const programEnableApi = (data: ProgramEnable) => {
|
|
137
|
+
return axiosRequest({
|
|
138
|
+
url: '/agentic/program/enable',
|
|
139
|
+
method: 'put',
|
|
140
|
+
data,
|
|
141
|
+
returnFullResponse: true
|
|
142
|
+
})
|
|
143
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @File : program-management/sub-project.ts
|
|
3
|
+
* @Desc. : 子项目模块接口文档(从表,归属项目集)
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { IPagination, IPageTableData } from '@/types'
|
|
7
|
+
import { axiosRequest } from '../../request'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* 子项目 - 详情
|
|
11
|
+
*/
|
|
12
|
+
export interface SubProject {
|
|
13
|
+
id: string
|
|
14
|
+
/** 父项目集Id */
|
|
15
|
+
programId: string
|
|
16
|
+
/** 子项目编码 */
|
|
17
|
+
code: number
|
|
18
|
+
/** 子项目名称 */
|
|
19
|
+
name: string
|
|
20
|
+
/**
|
|
21
|
+
* 项目类型
|
|
22
|
+
* @dict projectType
|
|
23
|
+
* @enumValues [0, 1, 2]
|
|
24
|
+
*/
|
|
25
|
+
projectType: number
|
|
26
|
+
/** 项目经理Id */
|
|
27
|
+
managerId: number
|
|
28
|
+
/** 项目经理名称 */
|
|
29
|
+
managerName: string
|
|
30
|
+
/** 预算 */
|
|
31
|
+
budget: number
|
|
32
|
+
/** 进度 */
|
|
33
|
+
progress: number
|
|
34
|
+
/**
|
|
35
|
+
* 项目状态
|
|
36
|
+
* @dict projectStatus
|
|
37
|
+
*/
|
|
38
|
+
projectStatus: number
|
|
39
|
+
/** 计划开始时间 */
|
|
40
|
+
plannedStartDate: string
|
|
41
|
+
/** 计划完成时间 */
|
|
42
|
+
plannedFinishDate: string
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* 子项目 - 新增
|
|
47
|
+
*/
|
|
48
|
+
export interface AddSubProject {
|
|
49
|
+
programId?: string
|
|
50
|
+
code: number
|
|
51
|
+
name: string
|
|
52
|
+
projectType?: number
|
|
53
|
+
/**
|
|
54
|
+
* 项目经理
|
|
55
|
+
* @useSelectComponent SelectManager
|
|
56
|
+
*/
|
|
57
|
+
managerId?: Record<string, unknown> | number
|
|
58
|
+
budget: number
|
|
59
|
+
plannedStartDate: string
|
|
60
|
+
plannedFinishDate: string
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* 子项目 - 修改
|
|
65
|
+
*/
|
|
66
|
+
export interface UpdateSubProject extends AddSubProject {
|
|
67
|
+
id: string
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* 子项目 - 查询
|
|
72
|
+
*/
|
|
73
|
+
export interface SubProjectQuery extends IPagination {
|
|
74
|
+
/**
|
|
75
|
+
* 父项目集Id
|
|
76
|
+
* @foreignKey programId
|
|
77
|
+
*/
|
|
78
|
+
programId?: string
|
|
79
|
+
name?: string
|
|
80
|
+
projectType?: number
|
|
81
|
+
projectStatus?: number
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* 子项目 - 列表数据
|
|
86
|
+
*/
|
|
87
|
+
export const subProjectTableApi = (params?: SubProjectQuery): Promise<IPageTableData<SubProject>> => {
|
|
88
|
+
return axiosRequest({
|
|
89
|
+
url: '/agentic/sub-project/list',
|
|
90
|
+
method: 'get',
|
|
91
|
+
params
|
|
92
|
+
})
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* 子项目 - 新增
|
|
97
|
+
*/
|
|
98
|
+
export const addSubProjectApi = (data: AddSubProject) => {
|
|
99
|
+
return axiosRequest({
|
|
100
|
+
url: '/agentic/sub-project/save',
|
|
101
|
+
method: 'post',
|
|
102
|
+
data
|
|
103
|
+
})
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* 子项目 - 修改
|
|
108
|
+
*/
|
|
109
|
+
export const editSubProjectApi = (data: UpdateSubProject) => {
|
|
110
|
+
return axiosRequest({
|
|
111
|
+
url: '/agentic/sub-project/save',
|
|
112
|
+
method: 'post',
|
|
113
|
+
data
|
|
114
|
+
})
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* 子项目 - 删除
|
|
119
|
+
*/
|
|
120
|
+
export const deleteSubProjectApi = (id: string) => {
|
|
121
|
+
return axiosRequest({
|
|
122
|
+
url: `/agentic/sub-project/delete/${id}`,
|
|
123
|
+
method: 'delete'
|
|
124
|
+
})
|
|
125
|
+
}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
import type { IFullResponse, IBlobItem } from '@jnrs/shared'
|
|
10
10
|
import type { IDocument, IAttachment, IPagination, IPageTableData } from '@/types'
|
|
11
|
-
import { axiosRequest } from '
|
|
11
|
+
import { axiosRequest } from '../../request'
|
|
12
12
|
import { objectToFormData } from '@/utils'
|
|
13
13
|
|
|
14
14
|
/**
|
|
@@ -20,22 +20,39 @@ export interface Project {
|
|
|
20
20
|
code: number
|
|
21
21
|
name: string
|
|
22
22
|
description: string
|
|
23
|
+
/**
|
|
24
|
+
* 项目状态
|
|
25
|
+
* @dict projectType
|
|
26
|
+
* @enumValues [0, 1, 2]
|
|
27
|
+
*/
|
|
23
28
|
projectType: number
|
|
24
29
|
managerId: number
|
|
25
30
|
managerName: string
|
|
31
|
+
pmoManagerId: number[]
|
|
32
|
+
pmoManagerName: string[]
|
|
26
33
|
budget: number
|
|
27
34
|
plannedStartDate: string
|
|
28
35
|
plannedFinishDate: string
|
|
29
36
|
milestoneFinishDate: string
|
|
30
|
-
progress:
|
|
31
|
-
|
|
37
|
+
progress: number
|
|
38
|
+
/**
|
|
39
|
+
* 项目状态
|
|
40
|
+
* @dict projectStatus
|
|
41
|
+
*/
|
|
42
|
+
projectStatus: number
|
|
43
|
+
/**
|
|
44
|
+
* 启用状态
|
|
45
|
+
* @independentModification projectEnableApi
|
|
46
|
+
*/
|
|
32
47
|
enable: boolean
|
|
33
48
|
/**
|
|
34
49
|
* 图片
|
|
50
|
+
* @fileField image
|
|
35
51
|
*/
|
|
36
52
|
imageDocument?: IDocument
|
|
37
53
|
/**
|
|
38
54
|
* 附件
|
|
55
|
+
* @fileField attachment
|
|
39
56
|
*/
|
|
40
57
|
attachmentDocument?: IDocument
|
|
41
58
|
}
|
|
@@ -55,9 +72,23 @@ export interface AddProject {
|
|
|
55
72
|
code: number
|
|
56
73
|
name: string
|
|
57
74
|
description: string
|
|
75
|
+
/**
|
|
76
|
+
* @dict projectType
|
|
77
|
+
* @enumValues [0, 1, 2]
|
|
78
|
+
*/
|
|
58
79
|
projectType?: number
|
|
80
|
+
/**
|
|
81
|
+
* 项目经理
|
|
82
|
+
* @useSelectComponent SelectManager
|
|
83
|
+
*/
|
|
59
84
|
managerId?: Record<string, unknown> | number
|
|
85
|
+
/**
|
|
86
|
+
* PMO经理
|
|
87
|
+
* @useSelectComponent SelectManager
|
|
88
|
+
*/
|
|
89
|
+
pmoManagerId?: Record<string, unknown>[] | number[]
|
|
60
90
|
budget: number
|
|
91
|
+
emergencyReserve: number
|
|
61
92
|
plannedDateRange?: string[]
|
|
62
93
|
plannedStartDate?: string
|
|
63
94
|
plannedFinishDate?: string
|
|
@@ -69,20 +100,8 @@ export interface AddProject {
|
|
|
69
100
|
/**
|
|
70
101
|
* 项目 - 修改
|
|
71
102
|
*/
|
|
72
|
-
export interface UpdateProject {
|
|
103
|
+
export interface UpdateProject extends AddProject {
|
|
73
104
|
id: string
|
|
74
|
-
code: number
|
|
75
|
-
name: string
|
|
76
|
-
description: string
|
|
77
|
-
projectType?: number
|
|
78
|
-
managerId?: Record<string, unknown> | number
|
|
79
|
-
budget: number
|
|
80
|
-
plannedDateRange?: string[]
|
|
81
|
-
plannedStartDate?: string
|
|
82
|
-
plannedFinishDate?: string
|
|
83
|
-
milestoneFinishDate?: string
|
|
84
|
-
newImageFiles: []
|
|
85
|
-
newAttachmentFile: []
|
|
86
105
|
}
|
|
87
106
|
|
|
88
107
|
/**
|
|
@@ -99,10 +118,13 @@ export interface ProjectEnable {
|
|
|
99
118
|
export interface ProjectQuery extends IPagination {
|
|
100
119
|
code?: string
|
|
101
120
|
projectType?: number
|
|
102
|
-
|
|
121
|
+
managerId?: number
|
|
122
|
+
pmoManagerId?: number[]
|
|
103
123
|
plannedStartDate?: string
|
|
104
124
|
startDate?: string
|
|
105
125
|
endDate?: string
|
|
126
|
+
startDateTime?: string
|
|
127
|
+
endDateTime?: string
|
|
106
128
|
}
|
|
107
129
|
|
|
108
130
|
/**
|
|
@@ -156,14 +178,15 @@ export const projectEnableApi = (data: ProjectEnable) => {
|
|
|
156
178
|
return axiosRequest({
|
|
157
179
|
url: '/agentic/project/enable',
|
|
158
180
|
method: 'put',
|
|
159
|
-
data
|
|
181
|
+
data,
|
|
182
|
+
returnFullResponse: true
|
|
160
183
|
})
|
|
161
184
|
}
|
|
162
185
|
|
|
163
186
|
/**
|
|
164
187
|
* 项目 - 列表数据
|
|
165
188
|
*/
|
|
166
|
-
export const
|
|
189
|
+
export const projectTableApi = (params?: ProjectQuery): Promise<IPageTableData<Project>> => {
|
|
167
190
|
return axiosRequest({
|
|
168
191
|
url: '/agentic/project/list',
|
|
169
192
|
method: 'get',
|
|
@@ -174,21 +197,23 @@ export const projectListApi = (params?: ProjectQuery): Promise<IPageTableData<Pr
|
|
|
174
197
|
/**
|
|
175
198
|
* 下载数据导入模板
|
|
176
199
|
*/
|
|
177
|
-
export const templateProjectApi = (): Promise<
|
|
200
|
+
export const templateProjectApi = (): Promise<IBlobItem> => {
|
|
178
201
|
return axiosRequest({
|
|
179
202
|
url: '/agentic/project/template',
|
|
180
|
-
method: 'post'
|
|
203
|
+
method: 'post',
|
|
204
|
+
responseType: 'blob'
|
|
181
205
|
})
|
|
182
206
|
}
|
|
183
207
|
|
|
184
208
|
/**
|
|
185
209
|
* 项目数据导入
|
|
186
210
|
*/
|
|
187
|
-
export const importProjectApi = (data: FormData) => {
|
|
211
|
+
export const importProjectApi = (data: FormData): Promise<IFullResponse<unknown>> => {
|
|
188
212
|
return axiosRequest({
|
|
189
213
|
url: '/agentic/project/import',
|
|
190
214
|
method: 'post',
|
|
191
|
-
data
|
|
215
|
+
data,
|
|
216
|
+
returnFullResponse: true
|
|
192
217
|
})
|
|
193
218
|
}
|
|
194
219
|
|
|
@@ -32,7 +32,7 @@ export const LoginApi = (data: LoginParams): Promise<LoginResult> => {
|
|
|
32
32
|
return axiosRequest({
|
|
33
33
|
url: '/auth/login',
|
|
34
34
|
method: 'post',
|
|
35
|
-
data
|
|
35
|
+
data,
|
|
36
36
|
noAuth: true
|
|
37
37
|
})
|
|
38
38
|
}
|
|
@@ -97,7 +97,7 @@ export const DictChangeApi = (data: IDictItem) => {
|
|
|
97
97
|
return axiosRequest({
|
|
98
98
|
url: '/dict-manager/detail',
|
|
99
99
|
method: 'post',
|
|
100
|
-
data
|
|
100
|
+
data: objectToFormData(data)
|
|
101
101
|
})
|
|
102
102
|
}
|
|
103
103
|
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
-->
|
|
8
8
|
|
|
9
9
|
<script setup lang="ts">
|
|
10
|
+
import { getGlobalCssVar } from '@jnrs/shared'
|
|
10
11
|
import { computed } from 'vue'
|
|
11
12
|
import { getDictLabel, getDictColor } from '@/utils'
|
|
12
13
|
|
|
@@ -30,7 +31,12 @@ export interface Props {
|
|
|
30
31
|
const { dictName = '', value = '', showColor = true, popover = '' } = defineProps<Props>()
|
|
31
32
|
|
|
32
33
|
const computedColor = computed(() => {
|
|
33
|
-
|
|
34
|
+
const c = getDictColor(dictName, value) || 'inherit'
|
|
35
|
+
const g = getGlobalCssVar('--jnrs-card-primary') || '#fff'
|
|
36
|
+
return {
|
|
37
|
+
backgroundColor: showColor ? `color-mix(in srgb, ${c} 20%, ${g})` : 'inherit',
|
|
38
|
+
color: showColor ? c : 'inherit'
|
|
39
|
+
}
|
|
34
40
|
})
|
|
35
41
|
</script>
|
|
36
42
|
|
|
@@ -41,13 +47,13 @@ const computedColor = computed(() => {
|
|
|
41
47
|
class="dictTag"
|
|
42
48
|
:class="{ dictTag_showColor: showColor }"
|
|
43
49
|
:style="{
|
|
44
|
-
backgroundColor: computedColor
|
|
50
|
+
backgroundColor: computedColor.backgroundColor
|
|
45
51
|
}"
|
|
46
52
|
>
|
|
47
53
|
<span
|
|
48
54
|
class="dictLabel"
|
|
49
55
|
:style="{
|
|
50
|
-
color: computedColor
|
|
56
|
+
color: computedColor.color
|
|
51
57
|
}"
|
|
52
58
|
>
|
|
53
59
|
{{ getDictLabel(dictName, value) }}
|
|
@@ -69,8 +75,8 @@ const computedColor = computed(() => {
|
|
|
69
75
|
|
|
70
76
|
.dictTag_showColor {
|
|
71
77
|
transform: scale(0.9);
|
|
72
|
-
.dictLabel {
|
|
73
|
-
|
|
74
|
-
}
|
|
78
|
+
// .dictLabel {
|
|
79
|
+
// filter: invert(0.5) brightness(0.5);
|
|
80
|
+
// }
|
|
75
81
|
}
|
|
76
82
|
</style>
|
|
@@ -70,7 +70,6 @@ const loadFilesRaw = async (keys: Props['loadKeys']) => {
|
|
|
70
70
|
try {
|
|
71
71
|
const blobItem = await fileDownloadApi(uniqueFileName)
|
|
72
72
|
const { url, revoke } = blobToUrl(blobItem.blob)
|
|
73
|
-
|
|
74
73
|
fileList.value = [{ src: url, fileName: blobItem.fileName || fileName || uniqueFileName || '' }]
|
|
75
74
|
revokeFns.value = [revoke]
|
|
76
75
|
posterUrl.value = url
|
|
@@ -6,21 +6,25 @@
|
|
|
6
6
|
* @Desc. : 日期范围字段处理
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { computed } from 'vue'
|
|
9
|
+
import { computed, type Ref } from 'vue'
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* 日期范围字段处理
|
|
13
|
-
* @param form
|
|
13
|
+
* @param form 表单对象的 Ref(注意:传入 ref 本身而非 .value,以便在 ref 重新赋值时自动同步)
|
|
14
14
|
* @param startKey 开始字段名
|
|
15
15
|
* @param endKey 结束字段名
|
|
16
16
|
* @returns 日期范围字段处理结果
|
|
17
17
|
*/
|
|
18
|
-
export function useDateRangeField(form: Record<string, unknown
|
|
18
|
+
export function useDateRangeField(form: Ref<Record<string, unknown>>, startKey: string, endKey: string) {
|
|
19
19
|
return computed({
|
|
20
|
-
get: () =>
|
|
20
|
+
get: () => {
|
|
21
|
+
const f = form.value
|
|
22
|
+
return f[startKey] && f[endKey] ? [f[startKey], f[endKey]] : null
|
|
23
|
+
},
|
|
21
24
|
set: (val) => {
|
|
22
|
-
|
|
23
|
-
|
|
25
|
+
const f = form.value
|
|
26
|
+
f[startKey] = val?.[0] ?? ''
|
|
27
|
+
f[endKey] = val?.[1] ?? ''
|
|
24
28
|
}
|
|
25
29
|
})
|
|
26
30
|
}
|