明树Git Lab
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
J
jt_backend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zengfanpei
jt_backend
Commits
803b3e13
Commit
803b3e13
authored
Dec 03, 2025
by
zfp1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
b5cf3a4e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
projectController.js
controller/projectController.js
+1
-1
projectModule.js
module/projectModule.js
+3
-3
No files found.
controller/projectController.js
View file @
803b3e13
...
@@ -8,7 +8,7 @@ const projectModule = require('../module/projectModule');
...
@@ -8,7 +8,7 @@ const projectModule = require('../module/projectModule');
async
function
getProjectFields
(
req
,
res
,
next
)
{
async
function
getProjectFields
(
req
,
res
,
next
)
{
try
{
try
{
let
rawAttributes
=
DB
.
Project
.
rawAttributes
;
let
rawAttributes
=
_
.
cloneDeep
(
DB
.
Project
.
rawAttributes
)
;
let
obj
=
{
let
obj
=
{
xmjbxx
:
'项目基本信息'
,
xmjbxx
:
'项目基本信息'
,
// jcpfxx: '决策及批复信息',
// jcpfxx: '决策及批复信息',
...
...
module/projectModule.js
View file @
803b3e13
...
@@ -20,13 +20,13 @@ async function handleProjectData(ret, queryAttrs) {
...
@@ -20,13 +20,13 @@ async function handleProjectData(ret, queryAttrs) {
for
(
let
index
=
0
;
index
<
queryAttrs
.
length
;
index
++
)
{
for
(
let
index
=
0
;
index
<
queryAttrs
.
length
;
index
++
)
{
const
element
=
queryAttrs
[
index
];
const
element
=
queryAttrs
[
index
];
if
(
rawAttributes
[
element
])
{
if
(
rawAttributes
[
element
])
{
queryRawAtr
.
push
(
rawAttributes
[
element
]);
queryRawAtr
.
push
(
rawAttributes
[
element
]);
//查询得所有字段
if
([
'danxuan'
].
includes
(
element
.
zjType
))
{
if
([
'danxuan'
].
includes
(
rawAttributes
[
element
]
&&
rawAttributes
[
element
].
zjType
))
{
//其中需要处理的资源库字段,单选、
resourceKeys
.
push
(
element
);
resourceKeys
.
push
(
element
);
}
}
}
}
}
}
console
.
log
(
queryRawAtr
);
console
.
log
(
resourceKeys
);
let
groupAttr
=
_
.
groupBy
(
queryRawAtr
,
'zjType'
);
let
groupAttr
=
_
.
groupBy
(
queryRawAtr
,
'zjType'
);
return
groupAttr
;
return
groupAttr
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment