Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
DA-Platform
Overview
Overview
Details
Activity
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
文档服务地址:
http://47.92.0.57:3000/
周报索引地址:
http://47.92.0.57:3000/s/NruNXRYmV
Open sidebar
Berlin
DA-Platform
Commits
9dbcbd83
Commit
9dbcbd83
authored
Jun 07, 2020
by
李景熙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改slice
parent
808ab293
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
0 deletions
+24
-0
Slice.py
DAPlatform/Dao/Slice.py
+22
-0
app.py
DAPlatform/app.py
+2
-0
No files found.
DAPlatform/Dao/Slice.py
View file @
9dbcbd83
...
...
@@ -82,6 +82,28 @@ def delete_slice(id):
return
Result
(
1
,
"delete success"
,
{})
# 查找某任务下的分片
def
find_slice_by_task
(
task_id
):
try
:
find
=
Slice
.
select
(
Slice
.
slice_id
,
Slice
.
document_number
,
Slice
.
type
,
Slice
.
model_id
)
.
where
(
Slice
.
task_id
==
task_id
)
index
=
0
list
=
[]
while
index
<
len
(
find
):
list
.
append
(
{
'id'
:
find
[
index
]
.
slice_id
,
'fileNum'
:
find
[
index
]
.
document_number
,
'type'
:
find
[
index
]
.
type
,
'template'
:
find
[
index
]
.
model_id
}
)
index
+=
1
except
:
return
Result
(
0
,
"find failed"
,
{})
else
:
return
Result
(
1
,
"find success"
,
list
)
if
__name__
==
'__main__'
:
create_pic_slice
(
6
,
"标注坐标(30,100)"
)
create_layer_slice
(
7
,
"。。。。。。"
)
DAPlatform/app.py
View file @
9dbcbd83
...
...
@@ -5,6 +5,7 @@ from flask_cors import CORS
# from views.textAnnotation import textAnnotation
from
views.user
import
user
from
views.task
import
task
from
views.slice
import
slice
app
=
Flask
(
__name__
)
CORS
(
app
)
...
...
@@ -12,6 +13,7 @@ CORS(app)
# app.register_blueprint(uploadDownload)
app
.
register_blueprint
(
user
)
app
.
register_blueprint
(
task
)
app
.
register_blueprint
(
slice
)
if
__name__
==
'__main__'
:
...
...
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