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
812263b0
Commit
812263b0
authored
Jul 22, 2020
by
convivae
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增保存图层后更改标注关系状态
parent
b4fbb34a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
0 deletions
+31
-0
Image.py
DAPlatform/dao/Image.py
+7
-0
imageAnnotation.py
DAPlatform/views/imageAnnotation.py
+18
-0
uploadDownload.py
DAPlatform/views/uploadDownload.py
+6
-0
No files found.
DAPlatform/dao/Image.py
View file @
812263b0
...
...
@@ -160,6 +160,13 @@ def create_layers(layer_list):
return
res
# 根据 relationId 删除图层
def
delete_layer
(
relation_id
):
obj
=
Layer
.
objects
(
relationId
=
relation_id
)
if
obj
:
obj
.
delete
()
# 地标实体
class
LandmarkEntity
(
db
.
EmbeddedDocument
):
landmarkId
=
db
.
IntField
(
required
=
True
)
...
...
DAPlatform/views/imageAnnotation.py
View file @
812263b0
...
...
@@ -70,8 +70,26 @@ def save_layer():
'message'
:
ret
.
message
,
'data'
:
ret
.
data
}
if
ret
.
code
!=
0
:
rid
=
layer_info
[
'relationId'
]
if
not
Relation
.
set_result_pic
(
rid
):
res
[
'code'
]
=
0
res
[
'message'
]
=
'保存失败,更改标注关系状态失败,不存在此标注任务'
Image
.
delete_layer
(
rid
)
return
json
.
dumps
(
res
,
ensure_ascii
=
False
)
import
views.uploadDownload
as
upd
@image.route
(
"/image/exportImage/<relationId>"
,
methods
=
[
'GET'
])
def
export_image
(
relationId
):
img
=
Image
.
objects
(
relationId
=
relationId
)
image_url
=
img
[
'imageUrl'
]
.
split
(
'/'
)[
-
1
]
upd
.
download
(
''
)
return
False
# 保存图片标注结果的测试数据
# {
# "imageList": [
...
...
DAPlatform/views/uploadDownload.py
View file @
812263b0
...
...
@@ -126,6 +126,12 @@ def get_image_file(imageName):
return
jsonify
({
"code"
:
0
,
"errmsg"
:
repr
(
e
)})
# 根据图片名称返回图片文件
# def export_image(imageName):
# image = Image.objects(relationId__in=relation_list)
# return False
# documentId获取文本内容
@uploadDownload.route
(
'/getFileContent'
,
methods
=
[
'POST'
])
def
getFileContent
():
...
...
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