Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
evm-store
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
wanli
evm-store
Commits
7b8ca0ac
Commit
7b8ca0ac
authored
3 years ago
by
wanli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(view/menu.py): 更新菜单模块view
parent
d28a9cda
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
180 additions
and
0 deletions
+180
-0
tools/build_out/views/__init__.py
tools/build_out/views/__init__.py
+1
-0
tools/build_out/views/menu.py
tools/build_out/views/menu.py
+179
-0
No files found.
tools/build_out/views/__init__.py
View file @
7b8ca0ac
...
...
@@ -65,6 +65,7 @@ api.add_resource(monitorImage.MonitorImageResourceList, '/monitorImage')
api
.
add_resource
(
monitorEvm
.
MonitorEvmResource
,
'/monitorEvm/<string:uuid>'
)
api
.
add_resource
(
monitorEvm
.
MonitorEvmResourceList
,
'/monitorEvm'
)
api
.
add_resource
(
menu
.
MenuList
,
'/menu'
)
api
.
add_resource
(
menu
.
Batch
,
'/menu/delete/batch'
)
api
.
add_resource
(
menu
.
Create
,
'/menu/create'
)
api
.
add_resource
(
menu
.
Treelist
,
'/menu/treeList'
)
...
...
This diff is collapsed.
Click to expand it.
tools/build_out/views/menu.py
View file @
7b8ca0ac
...
...
@@ -18,6 +18,185 @@ from application.signal_manager import signalManager
from
webcreator.log
import
logger
from
webcreator.response
import
ResponseCode
,
response_result
class
MenuList
(
Resource
):
def
__init__
(
self
):
pass
# 特殊参数,即不是从json获取参数的接口,可以将这个注释打开
self
.
parser
=
RequestParser
()
def
get
(
self
):
# 特殊参数,即不是从json获取参数的接口,可以将这个注释打开
# self.parser.add_argument("page", type=int, location="args", default=1)
# self.parser.add_argument("pageSize", type=int, location="args", default=15)
# args = self.parser.parse_args()
result
=
[
{
"id"
:
"1044886626813353984"
,
"parentId"
:
"0"
,
"name"
:
"dashboard"
,
"path"
:
"/dashboard"
,
"icon"
:
"dashboard"
,
"leaf"
:
False
,
"children"
:
[
{
"id"
:
"1044886629921333248"
,
"parentId"
:
"1044886626813353984"
,
"name"
:
"analysis"
,
"path"
:
"/dashboard/analysis"
,
"leaf"
:
True
,
"children"
:
[]
},
{
"id"
:
"1044886629921333248"
,
"parentId"
:
"1044886626813353984"
,
"name"
:
"workplace"
,
"path"
:
"/dashboard/workplace"
,
"leaf"
:
True
,
"children"
:
[]
}
]
},
{
"id"
:
"1044886626813353984"
,
"parentId"
:
"0"
,
"name"
:
"system"
,
"path"
:
"/system"
,
"icon"
:
"setting"
,
"leaf"
:
False
,
"children"
:
[
{
"id"
:
"1044886629921333248"
,
"parentId"
:
"1044886626813353984"
,
"name"
:
"setting"
,
"path"
:
"/system/setting"
,
"leaf"
:
False
,
"children"
:
[
{
"id"
:
"1044886630026190848"
,
"parentId"
:
"1044886629921333248"
,
"name"
:
"menu"
,
"path"
:
"/system/setting/menu"
,
"leaf"
:
True
,
"children"
:
[]
},
{
"id"
:
"1044886630122659840"
,
"parentId"
:
"1044886629921333248"
,
"name"
:
"module"
,
"path"
:
"/system/setting/module"
,
"leaf"
:
True
,
"children"
:
[]
},
{
"id"
:
"1044886630122659841"
,
"parentId"
:
"1044886629921333248"
,
"name"
:
"file-manager"
,
"path"
:
"/system/setting/file-manager"
,
"leaf"
:
True
,
"children"
:
[]
}
]
},
{
"id"
:
"1044886629921333248"
,
"parentId"
:
"1044886626813353984"
,
"name"
:
"role"
,
"path"
:
"/system/role"
,
"leaf"
:
True
},
{
"id"
:
"1044886629921333248"
,
"parentId"
:
"1044886626813353984"
,
"name"
:
"admin"
,
"path"
:
"/system/admin"
,
"leaf"
:
True
}
]
},
{
"id"
:
"1044886626813353984"
,
"icon"
:
"shop"
,
"parentId"
:
"0"
,
"name"
:
"application"
,
"path"
:
"/application"
,
"leaf"
:
False
,
"children"
:
[
{
"id"
:
"1044886629921333248"
,
"parentId"
:
"1044886626813353984"
,
"name"
:
"index"
,
"path"
:
"/application/index"
,
"leaf"
:
True
,
"children"
:
[]
},
{
"id"
:
"1044886629921333248"
,
"parentId"
:
"1044886626813353984"
,
"name"
:
"manager"
,
"path"
:
"/application/manager"
,
"leaf"
:
True
,
"children"
:
[]
}
]
},
{
"id"
:
"1044886626813353984"
,
"icon"
:
"usb"
,
"parentId"
:
"0"
,
"name"
:
"device"
,
"path"
:
"/device"
,
"leaf"
:
False
,
"children"
:
[
{
"id"
:
"1044886629921333248"
,
"parentId"
:
"1044886626813353984"
,
"name"
:
"index"
,
"path"
:
"/device/index"
,
"leaf"
:
True
,
"children"
:
[]
}
]
},
{
"id"
:
"1044886626813353984"
,
"icon"
:
"tool"
,
"parentId"
:
"0"
,
"name"
:
"tools"
,
"path"
:
"/tools"
,
"leaf"
:
False
,
"children"
:
[
{
"id"
:
"1044886629921333248"
,
"parentId"
:
"1044886626813353984"
,
"name"
:
"monitor"
,
"path"
:
"/tools/monitor"
,
"leaf"
:
True
,
"children"
:
[]
},
{
"id"
:
"1044886629921333248"
,
"parentId"
:
"1044886626813353984"
,
"name"
:
"index"
,
"path"
:
"/tools/index"
,
"leaf"
:
True
,
"children"
:
[]
}
]
}
]
return
response_result
(
ResponseCode
.
HTTP_SUCCESS
,
data
=
result
)
def
post
(
self
):
try
:
json_payload
=
request
.
json
logger
.
warn
(
json_payload
)
return
response_result
(
ResponseCode
.
HTTP_INVAILD_REQUEST
)
except
Exception
as
e
:
current_app
.
logger
.
error
(
e
)
return
response_result
(
ResponseCode
.
HTTP_SERVER_ERROR
)
class
Batch
(
Resource
):
def
__init__
(
self
):
self
.
parser
=
RequestParser
()
...
...
This diff is collapsed.
Click to expand it.
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