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
70785dc3
Commit
70785dc3
authored
Jul 23, 2025
by
daniel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(gunRule): 交互完善
parent
a712fa03
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
50 deletions
+57
-50
gunRule.jsp
src/main/webapp/WEB-INF/views/cmpt/gunRule.jsp
+57
-50
No files found.
src/main/webapp/WEB-INF/views/cmpt/gunRule.jsp
View file @
70785dc3
...
@@ -240,7 +240,7 @@
...
@@ -240,7 +240,7 @@
:
pagination
=
"false"
:
pagination
=
"false"
:
bordered
=
"true"
/>
:
bordered
=
"true"
/>
<
/n-card
>
<
/n-card
>
<
n
-
card
title
=
"选手列表
"
:
bordered
=
"false"
v
-
if
=
"activeMenu!=menuOptions[0].value"
>
<
n
-
card
:
title
=
"'选手列表('+ totalPlayer + ')'
"
:
bordered
=
"false"
v
-
if
=
"activeMenu!=menuOptions[0].value"
>
<
template
#
header
-
extra
>
<
template
#
header
-
extra
>
<
n
-
space
>
<
n
-
space
>
<
n
-
button
@
click
=
"downloadImportList"
>
<
n
-
button
@
click
=
"downloadImportList"
>
...
@@ -294,6 +294,7 @@
...
@@ -294,6 +294,7 @@
size
=
"small"
size
=
"small"
label
-
placement
=
"left"
label
-
placement
=
"left"
label
-
width
=
"auto"
label
-
width
=
"auto"
:
disabled
=
"loading"
>
>
<
n
-
form
-
item
label
=
"姓名"
path
=
"name"
>
<
n
-
form
-
item
label
=
"姓名"
path
=
"name"
>
<
n
-
input
v
-
model
:
value
=
"playerFormValue.name"
placeholder
=
"请输入姓名"
/>
<
n
-
input
v
-
model
:
value
=
"playerFormValue.name"
placeholder
=
"请输入姓名"
/>
...
@@ -313,14 +314,14 @@
...
@@ -313,14 +314,14 @@
<
n
-
radio
:
value
=
"1"
label
=
"女"
>
女
<
/n-radio
>
<
n
-
radio
:
value
=
"1"
label
=
"女"
>
女
<
/n-radio
>
<
/n-radio-group
>
<
/n-radio-group
>
<
/n-form-item
>
<
/n-form-item
>
<
n
-
form
-
item
label
=
"枪次"
>
<
n
-
select
:
options
=
"gunRuleValue.details.filter(v=>v.id).map(v=>({label:v.waveName,value:v.waveNumber}))"
v
-
model
:
value
=
"playerFormValue.waveNumber"
><
/n-select
>
<
/n-form-item
>
<
n
-
form
-
item
label
=
"组别"
path
=
"roadName"
>
<
n
-
form
-
item
label
=
"组别"
path
=
"roadName"
>
<
n
-
select
:
options
=
"gunRules.map(v=>({label:v.roadName,value:v.roadName}))"
v
-
model
:
value
=
"playerFormValue.roadName"
>
<
n
-
select
:
options
=
"gunRules.map(v=>({label:v.roadName,value:v.roadName}))"
v
-
model
:
value
=
"playerFormValue.roadName"
>
<
/n-select
>
<
/n-select
>
<
/n-form-item
>
<
/n-form-item
>
<
n
-
form
-
item
label
=
"枪次"
path
=
"waveNumber"
v
-
if
=
"gunRules.length"
>
<
n
-
select
:
options
=
"waveOptions"
v
-
model
:
value
=
"playerFormValue.waveNumber"
>
<
/n-select
>
<
/n-form-item
>
<
/n-form
>
<
/n-form
>
<
template
#
footer
>
<
template
#
footer
>
<
div
class
=
"flex gap-x-2 flex-row items-center"
>
<
div
class
=
"flex gap-x-2 flex-row items-center"
>
...
@@ -470,7 +471,7 @@
...
@@ -470,7 +471,7 @@
}
}
</script>
</script>
<script>
<script>
const
{
createApp
,
defineComponent
,
onBeforeUnmount
,
reactive
,
ref
,
onMounted
,
h
}
=
Vue
;
const
{
createApp
,
defineComponent
,
onBeforeUnmount
,
reactive
,
ref
,
onMounted
,
h
,
computed
}
=
Vue
;
const
{
useMessage
,
useNotification
,
dateZhCN
,
NButton
,
NTag
,
zhCN
,
NSpace
,
NImageGroup
,
NImage
,
NText
,
NInputNumber
,
NSelect
,
NInput
,
NDatePicker
}
=
naive
const
{
useMessage
,
useNotification
,
dateZhCN
,
NButton
,
NTag
,
zhCN
,
NSpace
,
NImageGroup
,
NImage
,
NText
,
NInputNumber
,
NSelect
,
NInput
,
NDatePicker
}
=
naive
const
uploadUrl
=
window
.
location
.
origin
+
'/api-common/v1/upload?folder=gk/gunApply'
+
'&cmptId='
+
getCId
()
const
uploadUrl
=
window
.
location
.
origin
+
'/api-common/v1/upload?folder=gk/gunApply'
+
'&cmptId='
+
getCId
()
const
downloadWeChatImgUrl
=
window
.
location
.
origin
+
'/api-common/v1/download-wechat-image'
const
downloadWeChatImgUrl
=
window
.
location
.
origin
+
'/api-common/v1/download-wechat-image'
...
@@ -541,10 +542,14 @@
...
@@ -541,10 +542,14 @@
required
:
true
,
required
:
true
,
message
:
'请输入姓名'
,
message
:
'请输入姓名'
,
},
},
// waveNumber: {
waveNumber
:
{
// required: true,
required
:
true
,
// message: '请输入枪次',
message
:
'请输入枪次'
,
// },
},
markNo
:
{
required
:
true
,
message
:
'请输入参赛号'
,
},
roadName
:
{
roadName
:
{
required
:
true
,
required
:
true
,
message
:
'请选择组别'
,
message
:
'请选择组别'
,
...
@@ -571,7 +576,6 @@
...
@@ -571,7 +576,6 @@
e
.
preventDefault
()
e
.
preventDefault
()
playerFormRef
.
value
?.
validate
(
async
(
errors
)
=>
{
playerFormRef
.
value
?.
validate
(
async
(
errors
)
=>
{
if
(
errors
)
return
message
.
error
(
'请检查表单是否填写完整'
)
if
(
errors
)
return
message
.
error
(
'请检查表单是否填写完整'
)
loading
.
value
=
true
loading
.
value
=
true
const
messageReactive
=
message
.
loading
(
'选手信息更新中'
,
{
const
messageReactive
=
message
.
loading
(
'选手信息更新中'
,
{
duration
:
0
duration
:
0
...
@@ -584,6 +588,7 @@
...
@@ -584,6 +588,7 @@
body
:
JSON
.
stringify
({
body
:
JSON
.
stringify
({
id
:
playerFormValue
.
value
.
id
,
id
:
playerFormValue
.
value
.
id
,
cmptId
:
playerFormValue
.
value
.
cmptId
,
cmptId
:
playerFormValue
.
value
.
cmptId
,
name
:
playerFormValue
.
value
.
name
,
identityNo
:
playerFormValue
.
value
.
identityNo
,
identityNo
:
playerFormValue
.
value
.
identityNo
,
markNo
:
playerFormValue
.
value
.
markNo
,
markNo
:
playerFormValue
.
value
.
markNo
,
waveNumber
:
playerFormValue
.
value
.
waveNumber
,
waveNumber
:
playerFormValue
.
value
.
waveNumber
,
...
@@ -596,10 +601,12 @@
...
@@ -596,10 +601,12 @@
loading
.
value
=
false
loading
.
value
=
false
messageReactive
.
destroy
()
messageReactive
.
destroy
()
if
(
err
)
{
if
(
err
)
{
message
.
error
(
err
.
message
)
message
.
error
(
data
.
message
)
return
return
}
}
getPlayers
()
if
(
data
.
code
!==
200
)
return
message
.
error
(
data
.
message
)
message
.
success
(
'操作成功'
)
getGunRules
()
// 保存
// 保存
onPlayerModalCancel
()
onPlayerModalCancel
()
})
})
...
@@ -609,6 +616,11 @@
...
@@ -609,6 +616,11 @@
/***---------------- 人员列表 start -----------------*/
/***---------------- 人员列表 start -----------------*/
const
keyword
=
ref
(
''
)
const
keyword
=
ref
(
''
)
const
fileList
=
ref
([])
const
fileList
=
ref
([])
// 枪次选项
const
waveOptions
=
computed
(()
=>
{
if
(
gunRules
.
value
.
length
===
0
)
return
[]
return
gunRules
.
value
.
find
(
v
=>
v
.
roadName
===
playerFormValue
.
value
.
roadName
)?.
details
.
filter
(
v
=>
v
.
id
).
map
(
v
=>
({
label
:
v
.
waveName
,
value
:
v
.
waveNumber
}))
??
[]
})
// 分页
// 分页
const
pagination
=
reactive
({
const
pagination
=
reactive
({
pageSize
:
20
,
pageSize
:
20
,
...
@@ -635,6 +647,7 @@
...
@@ -635,6 +647,7 @@
]
]
// 人员列表
// 人员列表
const
players
=
ref
([])
const
players
=
ref
([])
const
totalPlayer
=
ref
(
0
)
const
columns
=
[
const
columns
=
[
{
{
title
:
'姓名'
,
title
:
'姓名'
,
...
@@ -701,15 +714,12 @@
...
@@ -701,15 +714,12 @@
}).
then
(
res
=>
res
.
json
()))
}).
then
(
res
=>
res
.
json
()))
loading
.
value
=
false
loading
.
value
=
false
if
(
err
)
{
if
(
err
)
{
message
.
error
(
err
.
message
)
message
.
error
(
data
.
message
)
return
return
}
}
if
(
data
.
code
===
200
)
{
if
(
data
.
code
!==
200
)
return
message
.
error
(
data
.
message
)
message
.
success
(
'删除成功'
)
message
.
success
(
'删除成功'
)
getPlayers
()
getGunRules
()
}
else
{
message
.
error
(
data
.
msg
)
}
}
}
},
'删除'
),
},
'删除'
),
])
])
...
@@ -763,6 +773,7 @@
...
@@ -763,6 +773,7 @@
players
.
value
=
res
.
data
.
records
players
.
value
=
res
.
data
.
records
pagination
.
pageCount
=
res
.
data
.
pages
pagination
.
pageCount
=
res
.
data
.
pages
pagination
.
itemCount
=
res
.
data
.
total
pagination
.
itemCount
=
res
.
data
.
total
totalPlayer
.
value
=
res
.
data
.
total
}
else
{
}
else
{
message
.
error
(
res
.
msg
)
message
.
error
(
res
.
msg
)
}
}
...
@@ -823,12 +834,10 @@
...
@@ -823,12 +834,10 @@
message
.
error
(
err
.
message
)
message
.
error
(
err
.
message
)
return
return
}
}
if
(
data
.
code
===
200
)
{
if
(
data
.
code
!==
200
)
return
message
.
error
(
data
.
message
)
message
.
success
(
'随机分配成功'
)
message
.
success
(
'随机分配成功'
)
getPlayers
()
getPlayers
()
}
else
{
message
.
error
(
data
.
msg
)
}
}
}
// 初始化规则
// 初始化规则
const
initWaves
=
async
()
=>
{
const
initWaves
=
async
()
=>
{
...
@@ -851,12 +860,9 @@
...
@@ -851,12 +860,9 @@
message
.
error
(
err
.
message
)
message
.
error
(
err
.
message
)
return
return
}
}
if
(
data
.
code
===
200
)
{
if
(
data
.
code
!==
200
)
return
message
.
error
(
data
.
message
)
message
.
success
(
'初始化规则成功'
)
message
.
success
(
'初始化规则成功'
)
getGunRules
()
getGunRules
()
}
else
{
message
.
error
(
data
.
msg
)
}
}
}
// 导出名单
// 导出名单
const
exportEnroll
=
async
()
=>
{
const
exportEnroll
=
async
()
=>
{
...
@@ -928,16 +934,13 @@
...
@@ -928,16 +934,13 @@
if
(
err
)
{
if
(
err
)
{
message
.
error
(
err
.
message
)
message
.
error
(
err
.
message
)
}
}
if
(
res
.
code
===
200
)
{
if
(
res
.
code
!==
200
)
return
message
.
error
(
res
.
message
)
gunRules
.
value
=
res
.
data
gunRules
.
value
=
res
.
data
if
(
res
.
data
.
length
)
{
if
(
res
.
data
.
length
)
{
changeGunRule
(
ruleIndex
.
value
===
-
1
?
0
:
ruleIndex
.
value
)
changeGunRule
(
ruleIndex
.
value
===
-
1
?
0
:
ruleIndex
.
value
)
}
else
{
}
else
{
gunRuleValue
.
value
=
initialValue
gunRuleValue
.
value
=
initialValue
}
}
}
else
{
message
.
error
(
res
.
msg
)
}
}
}
...
@@ -977,12 +980,13 @@
...
@@ -977,12 +980,13 @@
}).
then
(
res
=>
res
.
json
()))
}).
then
(
res
=>
res
.
json
()))
loading
.
value
=
false
loading
.
value
=
false
messageReactive
.
destroy
()
messageReactive
.
destroy
()
if
(
data
.
code
===
200
)
{
if
(
err
)
{
message
.
error
(
err
.
message
)
return
}
if
(
data
.
code
!==
200
)
return
message
.
error
(
data
.
message
)
message
.
success
(
'操作成功'
)
message
.
success
(
'操作成功'
)
getGunRules
()
getGunRules
()
}
else
{
message
.
error
(
data
.
message
)
}
})
})
}
}
// 日期处理
// 日期处理
...
@@ -1011,12 +1015,13 @@
...
@@ -1011,12 +1015,13 @@
},
},
}).
then
(
res
=>
res
.
json
()))
}).
then
(
res
=>
res
.
json
()))
messageReactive
.
destroy
()
messageReactive
.
destroy
()
if
(
data
.
code
===
200
)
{
if
(
err
)
{
message
.
error
(
err
.
message
)
return
}
if
(
data
.
code
!==
200
)
return
message
.
error
(
data
.
message
)
message
.
success
(
'操作成功'
)
message
.
success
(
'操作成功'
)
getGunRules
()
getGunRules
()
}
else
{
message
.
error
(
data
.
message
)
}
loading
.
value
=
false
loading
.
value
=
false
}
}
...
@@ -1129,11 +1134,13 @@
...
@@ -1129,11 +1134,13 @@
playerRules
,
playerRules
,
onPlayerModalCancel
,
onPlayerModalCancel
,
onPlayerSubmit
,
onPlayerSubmit
,
waveOptions
,
// 人员列表
// 人员列表
keyword
,
keyword
,
pagination
,
pagination
,
columns
,
columns
,
players
,
players
,
totalPlayer
,
randomAssign
,
randomAssign
,
initWaves
,
initWaves
,
exportEnroll
,
exportEnroll
,
...
...
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