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
3b01a086
Commit
3b01a086
authored
Mar 15, 2021
by
wanli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
ddda8b89
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
39 deletions
+20
-39
backend/controller/apps_manager.py
backend/controller/apps_manager.py
+1
-1
backend/controller/download_manager.py
backend/controller/download_manager.py
+1
-1
backend/schema/apps.py
backend/schema/apps.py
+2
-0
frontend/src/layout/TreeMenu.vue
frontend/src/layout/TreeMenu.vue
+1
-1
frontend/src/settings.js
frontend/src/settings.js
+2
-28
frontend/src/views/app-store/index.vue
frontend/src/views/app-store/index.vue
+13
-8
No files found.
backend/controller/apps_manager.py
View file @
3b01a086
...
...
@@ -94,7 +94,7 @@ class AppsManager(object):
temp
.
append
(
item
.
to_dict
(
only
=
[
"uuid"
,
"app_name"
]))
return
temp
,
len
(
temp
),
"get app {}."
.
format
(
"success"
if
temp
else
"fail"
)
result
=
Apps
.
select
()
.
where
(
**
temp
)
.
order_by
(
desc
(
Apps
.
create_a
t
))
.
page
(
data
.
get
(
"pagenum"
,
1
),
pagesize
=
data
.
get
(
"pagesize"
,
10
))
result
=
Apps
.
select
()
.
where
(
**
temp
)
.
order_by
(
desc
(
Apps
.
sor
t
))
.
page
(
data
.
get
(
"pagenum"
,
1
),
pagesize
=
data
.
get
(
"pagesize"
,
10
))
count
=
Apps
.
select
()
.
where
(
**
temp
)
.
count
()
if
result
and
len
(
result
):
...
...
backend/controller/download_manager.py
View file @
3b01a086
...
...
@@ -128,7 +128,7 @@ class DownloadManager(object):
temp
=
[]
# 读取当前系统所有应用及其资源文件
apps
=
Apps
.
select
()
.
where
(
is_delete
=
False
)
.
order_by
(
Apps
.
create_a
t
)
apps
=
Apps
.
select
()
.
where
(
is_delete
=
False
)
.
order_by
(
Apps
.
sor
t
)
result_json
=
[]
for
val
in
apps
:
tmp
=
val
.
to_dict
(
with_collections
=
True
,
related_objects
=
True
)
...
...
backend/schema/apps.py
View file @
3b01a086
...
...
@@ -10,6 +10,7 @@ class AddSchema(BaseSchema):
category
=
fields
.
String
(
required
=
False
)
app_desc
=
fields
.
String
(
required
=
False
)
app_files
=
fields
.
List
(
fields
.
Dict
,
required
=
False
)
sort
=
fields
.
Int
(
required
=
False
,
default
=
0
)
class
Meta
:
unknown
=
EXCLUDE
...
...
@@ -22,6 +23,7 @@ class UpdateSchema(BaseSchema):
category
=
fields
.
String
(
required
=
False
)
app_desc
=
fields
.
String
(
required
=
False
)
app_files
=
fields
.
List
(
fields
.
Dict
,
required
=
False
)
sort
=
fields
.
Int
(
required
=
False
)
class
Meta
:
unknown
=
EXCLUDE
...
...
frontend/src/layout/TreeMenu.vue
View file @
3b01a086
<
template
>
<li
role=
"menuitem"
:class=
"[data.children && data.children.length ? 'menu-submenu' : 'menu-item', `/$
{data.path}` == $route.path ? 'selected' : '', isCollapsed ? 'collapsed' : '']">
<li
v-if=
"!data.hidden"
role=
"menuitem"
:class=
"[data.children && data.children.length ? 'menu-submenu' : 'menu-item', `/$
{data.path}` == $route.path ? 'selected' : '', isCollapsed ? 'collapsed' : '']">
<template
v-if=
"data.children"
>
<div
:class=
"['menu-submenu-title', isCollapsed ? 'collapsed' : '']"
@
click=
"toggle"
>
<span>
...
...
frontend/src/settings.js
View file @
3b01a086
...
...
@@ -34,6 +34,7 @@ export default {
name
:
"
AppIndex
"
,
icon
:
"
gongzuotai
"
,
path
:
"
home
"
,
hidden
:
false
,
},
{
vue
:
"
app-store/build.vue
"
,
...
...
@@ -41,34 +42,7 @@ export default {
name
:
"
AppBuild
"
,
icon
:
"
gongzuotai
"
,
path
:
"
build
"
,
},
{
vue
:
"
app-store/download.vue
"
,
title
:
"
下载记录
"
,
name
:
"
AppDownload
"
,
icon
:
"
gongzuotai
"
,
path
:
"
download
"
,
},
{
vue
:
"
app-store/framework.vue
"
,
title
:
"
系统页面
"
,
name
:
"
Framework
"
,
icon
:
"
gongzuotai
"
,
path
:
"
framework
"
,
},
{
vue
:
"
profile/index.vue
"
,
title
:
"
个人中心
"
,
name
:
"
Profile
"
,
icon
:
"
shangcheng
"
,
path
:
"
profile
"
,
},
{
vue
:
"
system/users.vue
"
,
title
:
"
用户管理
"
,
name
:
"
UserIndex
"
,
icon
:
"
app
"
,
path
:
"
user
"
,
hidden
:
false
,
},
],
};
frontend/src/views/app-store/index.vue
View file @
3b01a086
...
...
@@ -2,7 +2,8 @@
<div
class=
"app-container"
>
<el-form
:inline=
"true"
ref=
"form"
:model=
"form"
size=
"mini"
>
<el-form-item><el-button
type=
"warning"
@
click=
"onAdd"
>
添加应用
</el-button></el-form-item>
<el-form-item><el-button
type=
"success"
@
click=
"onAddFramework"
>
添加系统页面
</el-button></el-form-item>
<!--
<el-form-item><el-button
type=
"success"
@
click=
"onAddFramework"
>
添加系统页面
</el-button></el-form-item>
-->
<!--
<el-form-item><el-button
type=
"success"
@
click=
"onAddFramework"
>
上传JSON配置文件
</el-button></el-form-item>
-->
</el-form>
<el-table
v-loading=
"isLoading"
...
...
@@ -97,6 +98,9 @@
</div>
<el-dialog
:title=
"dialogTitle"
:visible.sync=
"dialogVisible"
width=
"45%"
>
<el-form
:model=
"post"
status-icon
ref=
"post"
size=
"medium"
label-width=
"100px"
>
<el-form-item
label=
"应用排序"
prop=
"sort"
>
<el-input
type=
"number"
v-model.number=
"post.sort"
autocomplete=
"off"
></el-input>
</el-form-item>
<el-form-item
label=
"应用名称"
prop=
"app_name"
>
<el-input
type=
"text"
v-model=
"post.app_name"
autocomplete=
"off"
></el-input>
</el-form-item>
...
...
@@ -221,13 +225,14 @@ export default {
dialogTitle
:
""
,
dialogVisible
:
false
,
post
:
{
app_name
:
null
,
app_version
:
null
,
app_icon
:
null
,
app_url
:
null
,
category
:
null
,
app_desc
:
null
,
app_files
:
[],
sort
:
0
,
app_name
:
null
,
app_version
:
null
,
app_icon
:
null
,
app_url
:
null
,
category
:
null
,
app_desc
:
null
,
app_files
:
[],
},
};
},
...
...
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