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
37b7875a
Commit
37b7875a
authored
Aug 22, 2020
by
李景熙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改分片显示使其只能被一个人选择
parent
06b8ce51
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
Relation.py
DAPlatform/dao/Relation.py
+9
-0
Slice.py
DAPlatform/dao/Slice.py
+1
-2
No files found.
DAPlatform/dao/Relation.py
View file @
37b7875a
...
...
@@ -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()
...
...
DAPlatform/dao/Slice.py
View file @
37b7875a
...
...
@@ -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
...
...
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