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

Commit 37b7875a by 李景熙

修改分片显示使其只能被一个人选择

parent 06b8ce51
......@@ -215,6 +215,15 @@ def get_relation_id(uid, did):
else:
return r.relation_id
# 用于前端显示分片是否可选择,当在relation中找到slice相关记录,即已有人选中,则返回False(不可选)
def find_slice(slice_id):
try:
Relation.get(Relation.slice_id == slice_id)
except:
return True
else:
return False
if __name__ == '__main__':
# Relation.drop_table()
......
......@@ -117,7 +117,6 @@ def find_slice_by_task(task_id):
index = 0
list = []
while index < len(find):
num = Relation.get_flag_count2(find[index].slice_id)
if find[index].type == '0':
t = "文本"
template = find[index].model_id
......@@ -133,7 +132,7 @@ def find_slice_by_task(task_id):
'fileNum': find[index].document_number,
'type': t,
'template': template,
'completedNum': num
'selectable': Relation.find_slice(find[index].slice_id)
}
)
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