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

Commit 9dbcbd83 by 李景熙

修改slice

parent 808ab293
......@@ -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, "。。。。。。")
......@@ -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__':
......
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