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
84822239
Commit
84822239
authored
3 years ago
by
wanli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(view/api.py):增加单文件解析
parent
253e2f1f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
16 deletions
+27
-16
backend/view/api.py
backend/view/api.py
+22
-14
frontend/src/views/system/evue.vue
frontend/src/views/system/evue.vue
+5
-2
No files found.
backend/view/api.py
View file @
84822239
...
...
@@ -171,29 +171,37 @@ def action_build():
for
f
in
request
.
files
.
getlist
(
'binfile'
):
target
=
target_path
.
joinpath
(
f
.
filename
)
if
target
.
suffix
!=
".evue"
:
if
target
.
suffix
not
in
[
".evue"
,
".js"
,
".css"
,
".hml"
,
".json"
]
:
continue
with
open
(
target
.
resolve
()
.
as_posix
(),
"wb+"
)
as
fd
:
fd
.
write
(
f
.
stream
.
read
())
content
=
vbuild
.
render
(
target
.
resolve
()
.
as_posix
())
if
content
:
files
=
[
(
target
.
parent
.
joinpath
(
"{}.hml"
.
format
(
Path
(
f
.
filename
)
.
stem
))
.
resolve
()
.
as_posix
(),
content
.
html
),
(
target
.
parent
.
joinpath
(
"{}.css"
.
format
(
Path
(
f
.
filename
)
.
stem
))
.
resolve
()
.
as_posix
(),
content
.
style
),
(
target
.
parent
.
joinpath
(
"{}.js"
.
format
(
Path
(
f
.
filename
)
.
stem
))
.
resolve
()
.
as_posix
(),
content
.
script
)
]
files
=
[]
if
target
.
suffix
==
".evue"
:
content
=
vbuild
.
render
(
target
.
resolve
()
.
as_posix
())
if
content
:
files
=
[
(
target
.
parent
.
joinpath
(
"{}.hml"
.
format
(
Path
(
f
.
filename
)
.
stem
))
.
resolve
()
.
as_posix
(),
content
.
html
),
(
target
.
parent
.
joinpath
(
"{}.css"
.
format
(
Path
(
f
.
filename
)
.
stem
))
.
resolve
()
.
as_posix
(),
content
.
style
),
(
target
.
parent
.
joinpath
(
"{}.js"
.
format
(
Path
(
f
.
filename
)
.
stem
))
.
resolve
()
.
as_posix
(),
content
.
script
)
]
else
:
files
=
[(
target
.
resolve
()
.
as_posix
(),
True
)]
for
item
in
files
:
file
,
text
=
item
if
not
text
:
continue
for
item
in
files
:
file
,
text
=
item
if
not
isinstance
(
text
,
bool
):
with
open
(
file
,
"w+"
)
as
fd
:
fd
.
write
(
text
)
result
=
subprocess
.
call
(
"./executable -c {file}"
.
format
(
file
=
file
),
shell
=
True
)
new_name
=
"{}.{}"
.
format
(
Path
(
file
)
.
name
,
"bc"
)
os
.
rename
(
os
.
sep
.
join
([
os
.
getcwd
(),
"executable.bc"
]),
os
.
sep
.
join
([
os
.
getcwd
(),
new_name
]))
dst_files
.
append
(
Path
(
os
.
getcwd
())
.
joinpath
(
new_name
))
result
=
subprocess
.
call
(
"./executable -c {file}"
.
format
(
file
=
file
),
shell
=
True
)
new_name
=
"{}.{}"
.
format
(
Path
(
file
)
.
name
,
"bc"
)
os
.
rename
(
os
.
sep
.
join
([
os
.
getcwd
(),
"executable.bc"
]),
os
.
sep
.
join
([
os
.
getcwd
(),
new_name
]))
dst_files
.
append
(
Path
(
os
.
getcwd
())
.
joinpath
(
new_name
))
for
file
in
dst_files
:
z
.
write
(
file
.
resolve
()
.
as_posix
(),
arcname
=
file
.
name
)
...
...
This diff is collapsed.
Click to expand it.
frontend/src/views/system/evue.vue
View file @
84822239
...
...
@@ -47,8 +47,11 @@ export default {
window
.
URL
.
revokeObjectURL
(
url
);
},
handleUploaded
(
response
)
{
console
.
log
(
response
);
this
.
downloadFile
(
response
)
if
(
response
.
code
===
200
)
{
this
.
downloadFile
(
response
)
}
else
{
this
.
$message
.
warning
(
response
.
message
)
}
},
downloadFile
(
result
)
{
const
a
=
document
.
createElement
(
"
a
"
);
...
...
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