明树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
84b48c72
Commit
84b48c72
authored
Jan 12, 2026
by
zfp1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
bd026acc
Pipeline
#105991
passed with stage
in 3 seconds
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
24 deletions
+25
-24
.gitignore
.gitignore
+2
-1
resourceController.js
controller/resourceController.js
+2
-2
resourcesInfo.js
db/model/jt/resourcesInfo.js
+21
-21
No files found.
.gitignore
View file @
84b48c72
...
...
@@ -7,3 +7,4 @@ test.js
public/avatar
config/local.json
.gitlab-ci.yml
/jb
\ No newline at end of file
controller/resourceController.js
View file @
84b48c72
...
...
@@ -290,8 +290,8 @@ async function listResourceAll(req, res, next) {
// console.log(element.resourcesInfos, "==")
if
(
element
.
type
==
2
)
{
element
.
resourcesInfos
=
utils
.
buildTree2
(
element
.
resourcesInfos
,
{
keyName
:
"
code
"
,
parentKeyName
:
'parent
Code
'
,
keyName
:
"
key
"
,
parentKeyName
:
'parent
Key
'
,
});
}
obj
[
element
.
key
]
=
_
.
orderBy
(
element
.
resourcesInfos
||
[],
'order'
,
'asc'
);
...
...
db/model/jt/resourcesInfo.js
View file @
84b48c72
...
...
@@ -9,14 +9,14 @@ const ResourcesInfo = sequelize.define('ResourcesInfo', {
primaryKey
:
true
,
autoIncrement
:
true
},
code
:
{
type
:
DataTypes
.
STRING
,
comment
:
"资源库字段key"
},
parentCode
:
{
type
:
DataTypes
.
STRING
,
comment
:
"资源库key"
},
//
code: {
//
type: DataTypes.STRING,
//
comment: "资源库字段key"
//
},
//
parentCode: {
//
type: DataTypes.STRING,
//
comment: "资源库key"
//
},
key
:
{
type
:
DataTypes
.
STRING
,
comment
:
"资源库字段key"
...
...
@@ -29,24 +29,24 @@ const ResourcesInfo = sequelize.define('ResourcesInfo', {
type
:
DataTypes
.
STRING
,
comment
:
"资源库字段value"
},
parentId
:
{
type
:
DataTypes
.
INTEGER
,
comment
:
"父级ID"
},
parentIds
:
{
type
:
DataTypes
.
STRING
(
500
),
},
//
parentId: {
//
type: DataTypes.INTEGER,
//
comment: "父级ID"
//
},
//
parentIds: {
//
type: DataTypes.STRING(500),
//
},
order
:
{
type
:
DataTypes
.
INTEGER
,
comment
:
"排序字段"
,
defaultValue
:
0
},
dictId
:
{
type
:
DataTypes
.
STRING
,
},
fid
:
{
type
:
DataTypes
.
STRING
,
},
//
dictId: {
//
type: DataTypes.STRING,
//
},
//
fid: {
//
type: DataTypes.STRING,
//
},
resourceId
:
{
type
:
DataTypes
.
INTEGER
,
comment
:
"所属资源库ID"
,
...
...
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