Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gk
Project
Project
Details
Activity
Releases
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
Open sidebar
micro_app
gk
Commits
076f5041
Commit
076f5041
authored
Jul 24, 2025
by
daniel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(gunRule): 新增组别统计数优化
parent
33d20340
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
22 deletions
+37
-22
gunRule.jsp
src/main/webapp/WEB-INF/views/cmpt/gunRule.jsp
+37
-22
No files found.
src/main/webapp/WEB-INF/views/cmpt/gunRule.jsp
View file @
076f5041
...
@@ -140,15 +140,9 @@
...
@@ -140,15 +140,9 @@
<
/n-button
>
<
/n-button
>
<
/div
>
<
/div
>
<
div
v
-
for
=
"(item,index) in gunRules"
:
key
=
"item.value"
class
=
"flex rounded-sm cursor-pointer flex-row items-center gap-x-1"
>
<
div
v
-
for
=
"(item,index) in gunRules"
:
key
=
"item.value"
class
=
"flex rounded-sm cursor-pointer flex-row items-center gap-x-1"
>
<!--
<
span
class
=
"py-1 px-4 rounded-sm line-clamp-1 animate-fade-in"
:
class
=
"[ruleIndex===index?'bg-primary text-white':'']"
class
=
"flex-1"
@
click
=
"changeGunRule(index)"
>
{{
item
.
roadName
}}
<
/span> --
>
<
n
-
tag
class
=
"flex-1"
round
:
bordered
=
"false"
@
click
=
"changeGunRule(index)"
:
type
=
"ruleIndex===index?'success':''"
>
<
n
-
tag
class
=
"flex-1"
round
:
bordered
=
"false"
@
click
=
"changeGunRule(index)"
:
type
=
"ruleIndex===index?'success':''"
>
{{
item
.
roadName
}}
{{
item
.
roadName
}}
<
/n-tag
>
<
/n-tag
>
<
n
-
tag
type
=
"success"
size
=
"small"
round
>
{{
item
.
totalApply
}}
/{{item.totalPlayer}
}
<
/n-tag
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
class
=
"flex-1 flex flex-col gap-y-3"
>
<
div
class
=
"flex-1 flex flex-col gap-y-3"
>
...
@@ -181,10 +175,29 @@
...
@@ -181,10 +175,29 @@
<
/n-button
>
<
/n-button
>
<
/div
>
<
/div
>
<
/n-card
>
<
/n-card
>
<
n
-
card
v
-
if
=
"gunRules.length>0"
:
bordered
=
"false"
>
<
n
-
descriptions
:
column
=
"gunRules.length+1"
label
-
align
=
"center"
content
-
class
=
"text-center"
label
-
placement
=
"top"
title
=
"预约统计(预约/总)"
>
<
n
-
descriptions
-
item
v
-
for
=
"item in gunRules"
:
key
=
"item.id"
:
label
=
"item.roadName"
>
<
div
class
=
"flex mx-auto flex-row items-center w-full justify-center font-bold"
>
<
n
-
gradient
-
text
:
size
=
"24"
type
=
"success"
>
<
n
-
number
-
animation
:
active
=
"true"
:
from
=
"0"
:
to
=
"item?.totalApply??0"
/>
<
/n-gradient-text
>
<
span
class
=
"text-xl mx-1"
>
/</
span
>
<
n
-
gradient
-
text
:
size
=
"24"
type
=
"warning"
>
<
n
-
number
-
animation
:
active
=
"true"
ref
=
"numberAnimationInstRef"
:
from
=
"0"
:
to
=
"item.totalPlayer"
/>
<
/n-gradient-text
>
<
/div
>
<
/n-descriptions-item
>
<
/n-descriptions
>
<
/n-card
>
<
n
-
card
v
-
if
=
"gunRuleValue.details.length>0"
:
bordered
=
"false"
>
<
n
-
card
v
-
if
=
"gunRuleValue.details.length>0"
:
bordered
=
"false"
>
<
n
-
descriptions
:
column
=
"gunRuleValue.details.length"
label
-
align
=
"center"
<
n
-
descriptions
:
column
=
"gunRuleValue.details.length"
label
-
align
=
"center"
content
-
class
=
"text-center"
label
-
placement
=
"top"
title
=
"预约统计(预约/总)"
>
content
-
class
=
"text-center"
label
-
placement
=
"top"
title
=
"
分枪
预约统计(预约/总)"
>
<
n
-
descriptions
-
item
v
-
for
=
"item in gunRuleValue.details"
:
key
=
"item.value"
:
label
=
"item.waveName"
>
<
n
-
descriptions
-
item
v
-
for
=
"item in gunRuleValue.details"
:
key
=
"item.value"
:
label
=
"item.waveName"
>
<
div
class
=
"flex mx-auto flex-row items-center w-full justify-center font-bold"
>
<
div
class
=
"flex mx-auto flex-row items-center w-full justify-center font-bold"
>
<
n
-
gradient
-
text
:
size
=
"24"
type
=
"success"
>
<
n
-
gradient
-
text
:
size
=
"24"
type
=
"success"
>
...
@@ -958,25 +971,27 @@
...
@@ -958,25 +971,27 @@
if
(
res
.
code
!==
200
)
return
message
.
error
(
res
.
message
)
if
(
res
.
code
!==
200
)
return
message
.
error
(
res
.
message
)
// 获取所有分组的名单总数
// 获取所有分组的名单总数
const
totalApplies
=
res
.
data
.
map
(
v
=>
v
.
details
.
reduce
((
detailPre
,
detailCur
)
=>
detailPre
+
detailCur
.
totalReservations
??
0
,
0
))
const
totalApplies
=
res
.
data
.
map
(
v
=>
v
.
details
.
reduce
((
detailPre
,
detailCur
)
=>
detailPre
+
detailCur
.
totalReservations
??
0
,
0
))
const
playerParams
=
{
cmptId
:
getCId
(),
roadName
:
gunRuleValue
.
value
.
roadName
,
current
:
pagination
.
page
,
size
:
pagination
.
pageSize
,
}
// 获取所有分组的名单总数
// 获取所有分组的名单总数
const
request
=
res
.
data
.
map
(
v
=>
fetch
(
ENROLL_PAGE
,
{
const
request
=
res
.
data
.
map
(
v
=>
{
method
:
"POST"
,
const
playerParams
=
{
headers
:
{
cmptId
:
getCId
(),
'Content-Type'
:
'application/json'
roadName
:
v
.
roadName
,
},
current
:
1
,
body
:
JSON
.
stringify
(
params
)
size
:
1
,
}).
then
(
res
=>
res
.
json
()))
}
return
fetch
(
ENROLL_PAGE
,
{
method
:
"POST"
,
headers
:
{
'Content-Type'
:
'application/json'
},
body
:
JSON
.
stringify
(
playerParams
)
}).
then
(
res
=>
res
.
json
())
})
let
allPlayersTotals
=
[]
let
allPlayersTotals
=
[]
await
Promise
.
all
(
request
).
then
(
list
=>
{
await
Promise
.
all
(
request
).
then
(
list
=>
{
allPlayersTotals
=
list
.
map
(
v
=>
v
.
data
.
total
)
allPlayersTotals
=
list
.
map
(
v
=>
v
.
data
.
total
)
})
})
console
.
log
({
allPlayersTotals
,
totalApplies
})
// 统计数据组装
// 统计数据组装
gunRules
.
value
=
res
.
data
.
map
((
v
,
index
)
=>
({
gunRules
.
value
=
res
.
data
.
map
((
v
,
index
)
=>
({
...
v
,
...
v
,
...
...
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