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
c7f83cba
Commit
c7f83cba
authored
Jul 22, 2025
by
daniel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(gunRule): 发枪预约完善
parent
1ca11816
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
201 additions
and
122 deletions
+201
-122
gunRule.jsp
src/main/webapp/WEB-INF/views/cmpt/gunRule.jsp
+201
-122
No files found.
src/main/webapp/WEB-INF/views/cmpt/gunRule.jsp
View file @
c7f83cba
...
@@ -170,14 +170,17 @@
...
@@ -170,14 +170,17 @@
size
=
"small"
size
=
"small"
>
>
<
n
-
form
-
item
label
=
"组别名称"
path
=
"roadName"
>
<
n
-
form
-
item
label
=
"组别名称"
path
=
"roadName"
>
<
div
class
=
"flex flex-col w-full"
>
<
n
-
input
v
-
model
:
value
=
"gunRuleValue.roadName"
placeholder
=
"请输入组别名称"
/>
<
n
-
input
v
-
model
:
value
=
"gunRuleValue.roadName"
placeholder
=
"请输入组别名称"
/>
<
span
class
=
"text-red"
>
组别名仅支持数字和字母
<
/span
>
<
/div
>
<
/n-form-item
>
<
/n-form-item
>
<
n
-
form
-
item
label
=
"出发日期"
path
=
"startTime"
>
<
n
-
form
-
item
label
=
"出发日期"
path
=
"startTime"
>
<
n
-
date
-
picker
value
-
format
=
"yyyy-MM-dd
"
date
-
format
=
"yyyy-MM-dd"
:
value
=
"gunRuleValue.startTime"
type
=
"dat
e"
clearable
@
update
:
formatted
-
value
=
"updateFormattedValue"
/>
<
n
-
date
-
picker
value
-
format
=
"yyyy-MM-dd
HH:mm:ss"
date
-
format
=
"yyyy-MM-dd HH:mm:ss"
:
value
=
"gunRuleValue.startTime"
type
=
"datetim
e"
clearable
@
update
:
formatted
-
value
=
"updateFormattedValue"
/>
<
/n-form-item
>
<
/n-form-item
>
<
n
-
form
-
item
label
=
"关门时间"
path
=
"c
lose
Time"
>
<
n
-
form
-
item
label
=
"关门时间"
path
=
"c
utOff
Time"
>
<
n
-
input
-
number
:
min
=
"1"
<
n
-
input
-
number
:
min
=
"1"
:
max
=
"200"
v
-
model
:
value
=
"gunRuleValue.c
lose
Time"
placeholder
=
"请输入关门时间"
>
:
max
=
"200"
v
-
model
:
value
=
"gunRuleValue.c
utOff
Time"
placeholder
=
"请输入关门时间"
>
<
template
#
suffix
>
<
template
#
suffix
>
小时
小时
<
/template
>
<
/template
>
...
@@ -189,22 +192,29 @@
...
@@ -189,22 +192,29 @@
<
template
#
header
-
extra
>
<
template
#
header
-
extra
>
<
n
-
button
type
=
'primary'
:
loading
=
"loading"
@
click
=
"addWave"
>
新增
<
/n-button
>
<
n
-
button
type
=
'primary'
:
loading
=
"loading"
@
click
=
"addWave"
>
新增
<
/n-button
>
<
/template
>
<
/template
>
<
n
-
data
-
table
size
=
"small"
:
columns
=
"waveColumns"
:
loading
=
"loading"
:
data
=
"gunRuleValue.
wave
s"
:
pagination
=
"false"
<
n
-
data
-
table
size
=
"small"
:
columns
=
"waveColumns"
:
loading
=
"loading"
:
data
=
"gunRuleValue.
detail
s"
:
pagination
=
"false"
:
bordered
=
"false"
/>
:
bordered
=
"false"
/>
<
/n-card
>
<
/n-card
>
<
n
-
card
title
=
"人员列表"
:
bordered
=
"false"
v
-
if
=
"activeMenu!=menuOptions[0].value"
>
<
n
-
card
title
=
"人员列表"
:
bordered
=
"false"
v
-
if
=
"activeMenu!=menuOptions[0].value"
>
<
template
#
header
-
extra
>
<
template
#
header
-
extra
>
<
n
-
space
>
<
n
-
space
>
<
n
-
button
type
=
"error"
>
<
!--
<
n
-
button
type
=
"error"
>
清空名单
清空名单
<
/n-button> --
>
<
n
-
button
type
=
"primary"
@
click
=
"downloadImportList"
>
下载导入名单模板
<
/n-button
>
<
/n-button
>
<
n
-
button
type
=
"primary"
>
<
n
-
upload
导入名单
v
-
if
=
"gunRuleValue?.id"
<
/n-button
>
@
change
=
"onFileUpload"
v
-
model
:
file
-
list
=
"fileList"
>
<
n
-
button
>
上传文件
<
/n-button
>
<
/n-upload
>
<
/n-space
>
<
/n-space
>
<
/template
>
<
/template
>
<
n
-
data
-
table
:
columns
=
"columns"
:
loading
=
"loading"
:
data
=
"players"
:
pagination
=
"pagination"
<
n
-
data
-
table
:
columns
=
"columns"
:
loading
=
"loading"
:
data
=
"players"
:
pagination
=
"pagination"
:
bordered
=
"false"
@
update
:
page
=
"handlePageChange"
/>
:
bordered
=
"false"
@
update
:
page
=
"handlePageChange"
@
update
:
page
-
size
=
"onUpdatePageSize"
/>
<
/n-card
>
<
/n-card
>
<
div
class
=
"flex flex-row items-center gap-x-2 w-full"
v
-
if
=
"activeMenu==menuOptions[0].value"
>
<
div
class
=
"flex flex-row items-center gap-x-2 w-full"
v
-
if
=
"activeMenu==menuOptions[0].value"
>
<
div
class
=
"flex-1"
>
<
div
class
=
"flex-1"
>
...
@@ -397,14 +407,17 @@
...
@@ -397,14 +407,17 @@
<script>
<script>
const
{
createApp
,
defineComponent
,
onBeforeUnmount
,
reactive
,
ref
,
onMounted
,
h
}
=
Vue
;
const
{
createApp
,
defineComponent
,
onBeforeUnmount
,
reactive
,
ref
,
onMounted
,
h
}
=
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/
markNoRule
'
+
'&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'
// 添加全局 loading 指令
// 添加全局 loading 指令
const
ECC_BASE_URL
=
"https://ecc.geexek.com"
const
ECC_BASE_URL
=
"https://ecc.geexek.com"
const
SAVE_OR_UPDATE
=
ECC_BASE_URL
+
"/api-pick/v1/save-or-update"
const
SAVE_OR_UPDATE
=
ECC_BASE_URL
+
"/api-pick/v1/save-or-update-wave"
const
RULE_LIST
=
ECC_BASE_URL
+
"/api-pick/v1/rule-list?"
const
RULE_LIST
=
ECC_BASE_URL
+
"/api-pick/v1/wave-reserve-list?"
const
ENROLL_PAGE
=
ECC_BASE_URL
+
"/api-pick/v1/enroll-page?"
const
DELETE_RULE
=
ECC_BASE_URL
+
"/api-pick/v1/delete-rule?"
const
DELETE_RULE
=
ECC_BASE_URL
+
"/api-pick/v1/delete-rule?"
const
IMPORT_MARK_ENROLL
=
ECC_BASE_URL
+
"/api-pick/v1/import-mark-enroll"
// 下载导入名单
const
DOWNLOAD_IMPORT_LIST
=
"https://geexekimgoss-sxk.oss-cn-hangzhou.aliyuncs.com/gk/common/markNoSelect/%E9%80%89%E5%8F%B7%E5%90%8D%E5%8D%95%E8%A1%A8%E6%A8%A1%E7%89%88v1.xlsx"
// 发枪的map
// 发枪的map
const
NO_MAP
=
{
const
NO_MAP
=
{
...
@@ -477,8 +490,11 @@
...
@@ -477,8 +490,11 @@
/***---------------- 人员列表 start -----------------*/
/***---------------- 人员列表 start -----------------*/
const
keyword
=
ref
(
''
)
const
keyword
=
ref
(
''
)
const
fileList
=
ref
([])
// 分页
// 分页
const
pagination
=
ref
({
pageSize
:
20
,
page
:
1
})
const
pagination
=
ref
({
pageSize
:
10
,
page
:
1
,
itemCount
:
0
,
showQuickJumper
:
true
,
showSizePicker
:
true
,
pageSizes
:
[
10
,
50
,
200
,
500
],
})
// seg
// seg
const
menuOptions
=
[
const
menuOptions
=
[
{
name
:
'发枪规则'
,
value
:
'gunRule'
},
{
name
:
'发枪规则'
,
value
:
'gunRule'
},
...
@@ -486,54 +502,34 @@
...
@@ -486,54 +502,34 @@
]
]
// 人员列表
// 人员列表
const
players
=
ref
([
const
players
=
ref
([
{
name
:
'张三'
,
markNo
:
'13888888888'
,
gunNo
:
'第一枪'
,
roadName
:
'A组'
,
},
{
name
:
'李四'
,
markNo
:
'13999999999'
,
gunNo
:
'第二枪'
,
roadName
:
'B组'
,
},
{
name
:
'王五'
,
markNo
:
'14000000000'
,
gunNo
:
'第三枪'
,
roadName
:
'C组'
,
},
{
name
:
'赵六'
,
markNo
:
'14111111111'
,
gunNo
:
'第四枪'
,
roadName
:
'D组'
,
},
{
name
:
'周七'
,
markNo
:
'14222222222'
,
gunNo
:
'第五枪'
,
roadName
:
'E组'
,
},
])
])
const
columns
=
[
const
columns
=
[
{
{
title
:
'姓名'
,
title
:
'姓名'
,
key
:
'name'
,
key
:
'name'
,
},
},
{
title
:
'性别'
,
key
:
'genderName'
,
},
{
{
title
:
'参赛号'
,
title
:
'参赛号'
,
key
:
'markNo'
,
key
:
'markNo'
,
},
},
{
{
title
:
'枪次'
,
title
:
'枪次'
,
key
:
'
gunNo
'
,
key
:
'
waveName
'
,
},
},
{
{
title
:
'组别'
,
title
:
'组别'
,
key
:
'roadName'
,
key
:
'roadName'
,
},
},
{
title
:
'更新时间'
,
key
:
'updateTime'
,
align
:
'center'
,
},
{
{
title
:
'操作'
,
title
:
'操作'
,
key
:
'action'
,
key
:
'action'
,
...
@@ -565,20 +561,90 @@
...
@@ -565,20 +561,90 @@
// 分页切换
// 分页切换
const
handlePageChange
=
(
page
)
=>
{
const
handlePageChange
=
(
page
)
=>
{
pagination
.
value
.
page
=
page
pagination
.
value
.
page
=
page
get
FeedBack
s
()
get
Player
s
()
}
}
// 分页大小切换
const
onUpdatePageSize
=
(
pageSize
)
=>
{
pagination
.
value
.
pageSize
=
pageSize
getPlayers
()
}
// 获取分枪组别列表
const
getPlayers
=
async
()
=>
{
if
(
!
gunRuleValue
.
value
.
roadName
)
{
message
.
error
(
'请先选择分枪组别'
)
players
.
value
=
[]
return
}
const
params
=
{
cmptId
:
getCId
(),
roadName
:
gunRuleValue
.
value
.
roadName
,
current
:
pagination
.
value
.
page
,
size
:
pagination
.
value
.
pageSize
,
}
loading
.
value
=
true
;
// 发起请求
const
[
err
,
res
]
=
await
to
(
fetch
(
ENROLL_PAGE
,
{
method
:
"POST"
,
headers
:
{
'Content-Type'
:
'application/json'
},
body
:
JSON
.
stringify
(
params
)
}).
then
(
res
=>
res
.
json
()))
loading
.
value
=
false
if
(
err
)
{
message
.
error
(
err
.
message
)
}
if
(
res
.
code
===
200
)
{
players
.
value
=
res
.
data
.
records
pagination
.
value
.
itemCount
=
res
.
data
.
total
}
else
{
message
.
error
(
res
.
msg
)
}
}
// 文件上传
const
onFileUpload
=
async
(
e
)
=>
{
const
gtCmptId
=
getCId
()
const
formData
=
new
FormData
();
formData
.
append
(
'file'
,
e
.
file
.
file
);
formData
.
append
(
'cmptId'
,
gtCmptId
);
loading
.
value
=
true
const
messageReactive
=
message
.
loading
(
'文件导入中'
,
{
duration
:
0
})
// 通过fetch发起请求
const
[
err
,
data
]
=
await
to
(
fetch
(
IMPORT_MARK_ENROLL
,
{
method
:
"POST"
,
body
:
formData
}).
then
(
res
=>
res
.
json
()))
loading
.
value
=
false
messageReactive
.
destroy
()
if
(
data
.
code
===
200
)
{
message
.
success
(
'操作成功'
)
fileList
.
value
=
[]
getPlayers
()
}
else
{
message
.
error
(
data
.
message
)
}
}
// 下载导入名单
const
downloadImportList
=
()
=>
{
// 在新窗口打卡
window
.
open
(
DOWNLOAD_IMPORT_LIST
)
}
/***---------------- 人员列表 end -----------------*/
/***---------------- 人员列表 end -----------------*/
/***---------------- 发枪规则 start -----------------*/
/***---------------- 发枪规则 start -----------------*/
const
gunRuleRef
=
ref
(
null
)
const
gunRuleRef
=
ref
(
null
)
const
gunRules
=
ref
([])
const
gunRules
=
ref
([])
// 规则初始化
// 规则初始化
const
initialValue
=
{
const
initialValue
=
{
create
Time
:
undefined
,
// 组别开始时间
start
Time
:
undefined
,
// 组别开始时间
roadName
:
""
,
// 组别名
roadName
:
""
,
// 组别名
wave
s
:
[],
// 枪次
detail
s
:
[],
// 枪次
id
:
undefined
,
id
:
undefined
,
c
lose
Time
:
undefined
// 关门时间
c
utOff
Time
:
undefined
// 关门时间
}
}
// 选号规则
// 选号规则
const
gunRuleValue
=
ref
(
initialValue
)
const
gunRuleValue
=
ref
(
initialValue
)
...
@@ -595,12 +661,12 @@
...
@@ -595,12 +661,12 @@
},
},
startTime
:
{
startTime
:
{
required
:
true
,
required
:
true
,
message
:
'请
输入规则描述
'
,
message
:
'请
选择出发日期
'
,
trigger
:
'blur'
trigger
:
'blur'
},
},
c
lose
Time
:
{
c
utOff
Time
:
{
required
:
true
,
required
:
true
,
message
:
'请输入
选号长度
'
,
message
:
'请输入
关门时间
'
,
trigger
:
'blur'
,
trigger
:
'blur'
,
type
:
'number'
,
type
:
'number'
,
}
}
...
@@ -609,41 +675,48 @@
...
@@ -609,41 +675,48 @@
const
changeGunRule
=
(
index
)
=>
{
const
changeGunRule
=
(
index
)
=>
{
ruleIndex
.
value
=
index
ruleIndex
.
value
=
index
gunRuleValue
.
value
=
gunRules
.
value
[
index
]
gunRuleValue
.
value
=
gunRules
.
value
[
index
]
// todo 获取名单
getPlayers
()
}
}
// 获取分枪组别列表
// 获取分枪组别列表
const
getGunRules
=
async
()
=>
{
const
getGunRules
=
async
()
=>
{
const
params
=
{
const
params
=
{
cmptId
:
getCId
()
cmptId
:
getCId
()
}
}
//
loading.value = true;
loading
.
value
=
true
;
// // 发起请求
// 发起请求
// const [err, res] = await to(fetch(RULE_LIST + new URLSearchParams(params).toString(), {
const
[
err
,
res
]
=
await
to
(
fetch
(
RULE_LIST
+
new
URLSearchParams
(
params
).
toString
(),
{
// method: "GET",
method
:
"GET"
,
// headers: {
headers
:
{
// 'Content-Type': 'application/json'
'Content-Type'
:
'application/json'
// }
},
// }).then(res => res.json()))
}).
then
(
res
=>
res
.
json
()))
// loading.value = false
loading
.
value
=
false
// if (err) {
if
(
err
)
{
// message.error(err.message)
message
.
error
(
err
.
message
)
// }
}
// if (res.code === 200) {
if
(
res
.
code
===
200
)
{
// gunRules.value = res.data
gunRules
.
value
=
res
.
data
.
map
(
v
=>
({
// if (res.data.length) {
...
v
,
// changeGunRule(ruleIndex.value === -1 ? 0 : ruleIndex.value)
startTime
:
v
.
startTime
.
slice
(
0
,
-
2
),
// if (quillEditor.value && gunRuleValue.value.description) {
details
:
v
.
details
.
map
(
d
=>
({
// quillEditor.value.root.innerHTML = gunRuleValue.value.description;
...
d
,
// }
// 移除最后的两位 .0 我需要移除的是最后两位
// } else {
waveStart
:
d
.
waveStart
.
slice
(
0
,
-
2
),
// gunRuleValue.value = initialValue
waveEnd
:
d
.
waveStart
.
slice
(
0
,
-
2
),
// }
}))
// } else {
}))
// message.error(res.msg)
if
(
res
.
data
.
length
)
{
// }
changeGunRule
(
ruleIndex
.
value
===
-
1
?
0
:
ruleIndex
.
value
)
}
else
{
gunRuleValue
.
value
=
initialValue
}
}
else
{
message
.
error
(
res
.
msg
)
}
}
}
// 提交
// 提交
const
submit
=
(
e
)
=>
{
const
submit
=
(
e
)
=>
{
e
.
preventDefault
()
e
.
preventDefault
()
...
@@ -655,29 +728,29 @@
...
@@ -655,29 +728,29 @@
gtCmptId
:
getCId
(),
gtCmptId
:
getCId
(),
}
}
loading
.
value
=
true
loading
.
value
=
true
const
messageReactive
=
message
.
loading
(
gunRuleValue
.
value
.
id
?
'规则更新中...'
:
'规则添加中...'
,
{
duration
:
0
})
// 发起请求
// 发起请求
// const [err, data] = await to(fetch(SAVE_OR_UPDATE, {
const
[
err
,
data
]
=
await
to
(
fetch
(
SAVE_OR_UPDATE
,
{
// method: 'POST',
method
:
'POST'
,
// headers: {
headers
:
{
// 'Content-Type': 'application/json'
'Content-Type'
:
'application/json'
// },
},
// body: JSON.stringify(params)
body
:
JSON
.
stringify
(
params
)
// }).then(res => res.json()))
}).
then
(
res
=>
res
.
json
()))
gunRules
.
value
.
push
({
...
params
,
id
:
gunRules
.
value
.
length
+
1
})
loading
.
value
=
false
loading
.
value
=
false
messageReactive
.
destroy
()
messageReactive
.
destroy
()
if
(
data
.
code
===
200
)
{
message
.
success
(
'操作成功'
)
message
.
success
(
'操作成功'
)
// if (data.code === 200) {
getGunRules
()
// message.success('操作成功')
}
else
{
// getGunRules()
message
.
error
(
data
.
message
)
// } else {
}
// message.error(data.message)
// }
})
})
}
}
// 日期处理
// 日期处理
const
updateFormattedValue
=
(
val
)
=>
{
const
updateFormattedValue
=
(
val
)
=>
{
console
.
log
({
val
})
gunRuleValue
.
value
.
startTime
=
val
gunRuleValue
.
value
.
startTime
=
val
}
}
// 新增规则
// 新增规则
...
@@ -713,31 +786,31 @@
...
@@ -713,31 +786,31 @@
const
waveColumns
=
[
const
waveColumns
=
[
{
{
title
:
'枪次'
,
title
:
'枪次'
,
key
:
'
n
ame'
,
key
:
'
waveN
ame'
,
align
:
'center'
,
align
:
'center'
,
width
:
100
,
width
:
100
,
render
(
row
,
index
)
{
render
(
row
,
index
)
{
return
h
(
NInput
,
{
return
h
(
NInput
,
{
value
:
row
.
n
ame
,
value
:
row
.
waveN
ame
,
onUpdateValue
(
v
)
{
onUpdateValue
(
v
)
{
gunRuleValue
.
value
.
waves
[
index
].
n
ame
=
v
gunRuleValue
.
value
.
details
[
index
].
waveN
ame
=
v
}
}
})
})
}
}
},
},
{
{
title
:
'发枪时间'
,
title
:
'发枪时间'
,
key
:
'
startTime
'
,
key
:
'
waveStart
'
,
align
:
'center'
,
align
:
'center'
,
render
(
row
,
index
)
{
render
(
row
,
index
)
{
return
h
(
NDatePicker
,
{
return
h
(
NDatePicker
,
{
formattedValue
:
row
.
startTime
,
defaultValue
:
row
.
waveStart
,
valueFormat
:
"yyyy-MM-dd HH:mm:ss"
,
'value-format'
:
"yyyy-MM-dd HH:mm:ss"
,
dateFormat
:
"yyyy-MM-dd HH:mm:ss"
,
'date-format'
:
"yyyy-MM-dd HH:mm:ss"
,
type
:
"datetime"
,
type
:
"datetime"
,
clearable
:
true
,
clearable
:
true
,
updateFormatValue
(
_
,
formatValue
)
{
'on-update:formatted-value'
:
(
res
)
=>
{
gunRuleValue
.
value
.
waves
[
index
].
startTime
=
formatValue
gunRuleValue
.
value
.
details
[
index
].
waveStart
=
res
}
}
})
})
}
}
...
@@ -748,28 +821,28 @@
...
@@ -748,28 +821,28 @@
align
:
'center'
,
align
:
'center'
,
render
(
row
,
index
)
{
render
(
row
,
index
)
{
return
h
(
NDatePicker
,
{
return
h
(
NDatePicker
,
{
formattedValue
:
row
.
endTime
,
defaultValue
:
row
.
waveEnd
,
valueFormat
:
"yyyy-MM-dd HH:mm:ss"
,
'value-format'
:
"yyyy-MM-dd HH:mm:ss"
,
dateFormat
:
"yyyy-MM-dd HH:mm:ss"
,
'date-format'
:
"yyyy-MM-dd HH:mm:ss"
,
type
:
"datetime"
,
type
:
"datetime"
,
clearable
:
true
,
clearable
:
true
,
updateFormatValue
(
_
,
formatValue
)
{
'on-update:formatted-value'
:
(
res
)
=>
{
gunRuleValue
.
value
.
waves
[
index
].
endTime
=
formatValue
gunRuleValue
.
value
.
details
[
index
].
waveEnd
=
res
}
}
})
})
}
}
},
},
{
{
title
:
'人数'
,
title
:
'人数'
,
key
:
'
total
'
,
key
:
'
capacity
'
,
align
:
'center'
,
align
:
'center'
,
width
:
150
,
width
:
150
,
render
(
row
,
index
)
{
render
(
row
,
index
)
{
return
h
(
NInputNumber
,
{
return
h
(
NInputNumber
,
{
value
:
row
.
total
,
value
:
row
.
capacity
,
min
:
1
,
min
:
1
,
onUpdateValue
(
v
)
{
onUpdateValue
(
v
)
{
gunRuleValue
.
value
.
waves
[
index
].
total
=
v
gunRuleValue
.
value
.
details
[
index
].
capacity
=
v
}
}
})
})
}
}
...
@@ -784,7 +857,7 @@
...
@@ -784,7 +857,7 @@
type
:
'error'
,
type
:
'error'
,
size
:
'small'
,
size
:
'small'
,
onClick
:
()
=>
{
onClick
:
()
=>
{
gunRuleValue
.
value
.
wave
s
.
splice
(
index
,
1
)
gunRuleValue
.
value
.
detail
s
.
splice
(
index
,
1
)
}
}
},
'删除'
)
},
'删除'
)
}
}
...
@@ -793,20 +866,21 @@
...
@@ -793,20 +866,21 @@
// 新增枪次
// 新增枪次
const
addWave
=
()
=>
{
const
addWave
=
()
=>
{
let
index
=
gunRuleValue
.
value
.
wave
s
.
length
let
index
=
gunRuleValue
.
value
.
detail
s
.
length
gunRuleValue
.
value
.
wave
s
.
push
({
gunRuleValue
.
value
.
detail
s
.
push
({
id
:
undefined
,
id
:
undefined
,
name
:
NO_MAP
[
index
],
waveName
:
NO_MAP
[
index
],
startTime
:
undefined
,
waveNumber
:
index
+
1
,
endTime
:
undefined
,
waveStart
:
undefined
,
total
:
undefined
,
waveEnd
:
undefined
,
capacity
:
undefined
,
})
})
}
}
/***---------------- 枪次表 end-----------------*/
/***---------------- 枪次表 end-----------------*/
// 页面加载
// 页面加载
onMounted
(()
=>
{
onMounted
(()
=>
{
//
getGunRules()
getGunRules
()
})
})
return
{
return
{
...
@@ -823,6 +897,7 @@
...
@@ -823,6 +897,7 @@
handlePageChange
,
handlePageChange
,
columns
,
columns
,
players
,
players
,
onUpdatePageSize
,
// 枪次表相关
// 枪次表相关
waveColumns
,
waveColumns
,
addWave
,
addWave
,
...
@@ -843,6 +918,10 @@
...
@@ -843,6 +918,10 @@
menuOptions
,
menuOptions
,
activeMenu
,
activeMenu
,
updateMenu
,
updateMenu
,
uploadUrl
,
onFileUpload
,
downloadImportList
,
fileList
,
}
}
}
}
})
})
...
...
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