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

Commit c749a876 by 李景熙

修改图片分片说明无法显示的bug

parent 54dfa64c
...@@ -77,23 +77,26 @@ def delete_slice(id): ...@@ -77,23 +77,26 @@ def delete_slice(id):
# 查找某任务下的分片 # 查找某任务下的分片
def find_slice_by_task(task_id): def find_slice_by_task(task_id):
try: try:
find = Slice.select(Slice.slice_id, Slice.document_number, Slice.type, Slice.model_id).where( find = Slice.select(Slice.slice_id, Slice.document_number, Slice.type, Slice.model_id, Slice.illustration).where(
Slice.task_id == task_id) Slice.task_id == task_id)
index = 0 index = 0
list = [] list = []
while index < len(find): while index < len(find):
if find[index].type == '0': if find[index].type == '0':
t = "文本" t = "文本"
template = find[index].model_id
elif find[index].type == '1': elif find[index].type == '1':
t = "图片" t = "图片"
template = find[index].illustration
else: else:
t = "图层" t = "图层"
template = find[index].illustration
list.append( list.append(
{ {
'id': find[index].slice_id, 'id': find[index].slice_id,
'fileNum': find[index].document_number, 'fileNum': find[index].document_number,
'type': t, 'type': t,
'template': find[index].model_id 'template': template
} }
) )
index += 1 index += 1
......
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