Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
jijin
/
dance-pc
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
852a632e
authored
2026-06-26 10:30:55 +0800
by
zhangmeng
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
赛事报名限制
1 parent
df7a4ef6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
3 deletions
src/viewsPc/match/chooseSportsman.vue
src/viewsPc/match/chooseSportsman.vue
View file @
852a632
...
...
@@ -383,7 +383,6 @@ function getMatch(id) {
noPhotoCanSign
.
value
=
res
.
data
.
noPhotoCanSign
coachOrLeaderFlag
.
value
=
res
.
data
.
coachOrLeaderFlag
extraform
.
value
=
JSON
.
parse
(
res
.
data
.
participantsInfo
)
console
.
log
(
11111
,
extraform
.
value
)
insuranceAgreement
.
value
=
res
.
data
.
insuranceAgreement
insuranceFlag
.
value
=
res
.
data
.
insuranceFlag
if
(
insuranceFlag
.
value
==
1
)
checked
.
value
=
'1'
...
...
@@ -762,6 +761,7 @@ function switchTabletype() {
let
hasPproperty
=
''
let
hasPlevel
=
''
let
hasMtype
=
''
let
hasAlmighty
=
{}
let
hasPpropertyLength
=
0
let
isDanNum
=
0
...
...
@@ -781,6 +781,7 @@ watch(projectIds, (newVal, oldVal) => {
if
(
newVal
.
length
>
0
)
{
hasPproperty
=
''
hasPlevel
=
''
hasMtype
=
''
hasAlmighty
=
{}
isDanNum
=
0
isShuangNum
=
0
...
...
@@ -789,6 +790,7 @@ watch(projectIds, (newVal, oldVal) => {
if
(
projectIds
.
value
.
indexOf
(
hh
.
id
)
>
-
1
&&
hh
.
pproperty
)
{
hasPproperty
=
hh
.
pproperty
hasPpropertyLength
=
hh
.
danceTypeDetailStr
.
split
(
','
).
length
hasMtype
=
hh
.
mtype
}
if
(
projectIds
.
value
.
indexOf
(
hh
.
id
)
>
-
1
&&
hh
.
plevel
)
{
hasPlevel
=
hh
.
plevel
...
...
@@ -810,11 +812,44 @@ watch(projectIds, (newVal, oldVal) => {
}
})
function
hasDanceCountConflict
(
pp
)
{
if
(
!
pp
.
pproperty
||
!
pp
.
danceTypeDetailStr
)
{
return
false
}
const
ppDanceCount
=
pp
.
danceTypeDetailStr
.
split
(
','
).
length
const
selectedProjects
=
projectList
.
value
.
filter
(
p
=>
projectIds
.
value
.
includes
(
p
.
id
)
&&
p
.
pproperty
)
return
selectedProjects
.
some
(
selected
=>
{
if
(
selected
.
pproperty
!==
pp
.
pproperty
)
{
return
false
}
// 名次赛与等级赛不互斥,仅同类型项目限制三支/四支舞兼报
if
(
selected
.
mtype
!==
pp
.
mtype
)
{
return
false
}
const
selectedDanceCount
=
selected
.
danceTypeDetailStr
.
split
(
','
).
length
return
(
ppDanceCount
>=
4
&&
selectedDanceCount
<
4
)
||
(
ppDanceCount
<
4
&&
selectedDanceCount
>=
4
)
})
}
function
hasPpropertyConflict
(
pp
)
{
if
(
!
pp
.
pproperty
)
{
return
false
}
const
selectedProjects
=
projectList
.
value
.
filter
(
p
=>
projectIds
.
value
.
includes
(
p
.
id
)
&&
p
.
pproperty
)
return
selectedProjects
.
some
(
selected
=>
{
// 名次赛与等级赛不互斥,ABC 属性仅在同一赛事类型内互斥
if
(
selected
.
mtype
!==
pp
.
mtype
)
{
return
false
}
return
selected
.
pproperty
!==
pp
.
pproperty
})
}
function
filterProjectList
(
currProject
)
{
for
(
const
pp
of
projectList
.
value
)
{
if
(
(
hasPproperty
&&
pp
.
pproperty
==
hasPproperty
)
&&
((
pp
.
danceTypeDetailStr
.
split
(
','
).
length
>=
4
&&
hasPpropertyLength
<
4
)
||
(
pp
.
danceTypeDetailStr
.
split
(
','
).
length
<
4
&&
hasPpropertyLength
>=
4
)
)
||
(
hasPproperty
&&
pp
.
pproperty
&&
pp
.
pproperty
!=
hasPproperty
)
||
hasDanceCountConflict
(
pp
)
||
hasPpropertyConflict
(
pp
)
||
(
hasPlevel
&&
pp
.
plevel
&&
pp
.
plevel
!=
hasPlevel
)
||
(
isDanNum
==
Number
(
singlePersonEntryLimit
.
value
)
&&
pp
.
singleFlag
==
'1'
&&
projectIds
.
value
.
indexOf
(
pp
.
id
)
==
-
1
)
||
(
isShuangNum
==
Number
(
doublePersonEntryLimit
.
value
)
&&
pp
.
doubleSingleProjectFlag
==
'1'
&&
projectIds
.
value
.
indexOf
(
pp
.
id
)
==
-
1
)
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment