文档服务地址:http://47.92.0.57:3000/ 周报索引地址:http://47.92.0.57:3000/s/NruNXRYmV

Commit 812263b0 by convivae

新增保存图层后更改标注关系状态

parent b4fbb34a
......@@ -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)
......
......@@ -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": [
......
......@@ -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():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment