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
3c86a56a
Commit
3c86a56a
authored
Nov 26, 2025
by
daniel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(markNoSelect): 自助选号处理+预约发枪保留1位小数
parent
415faf80
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
120 additions
and
7 deletions
+120
-7
CommonController.java
...va/com/dlbridge/jadp/plugins/common/CommonController.java
+32
-0
gunRule.jsp
src/main/webapp/WEB-INF/views/cmpt/gunRule.jsp
+2
-1
markNoSelect.jsp
src/main/webapp/WEB-INF/views/cmpt/markNoSelect.jsp
+86
-6
No files found.
src/main/java/com/dlbridge/jadp/plugins/common/CommonController.java
View file @
3c86a56a
...
...
@@ -154,6 +154,38 @@ public class CommonController {
return
Result
.
fail
().
setMsg
(
"文件上传失败"
);
}
@PostMapping
(
"uploadSelectMarkNoBg"
)
@ApiOperation
(
value
=
"选号背景上传"
)
public
Result
<?>
uploadGunRuleBg
(
@RequestPart
@RequestParam
(
"file"
)
MultipartFile
file
,
@RequestParam
(
value
=
"gCmptId"
)
Integer
gCmptId
)
{
try
{
// 检查文件大小是否超过1MB
long
maxFileSize
=
5
*
1024
*
1024
;
// 1MB
if
(
file
.
getSize
()
>
maxFileSize
)
{
return
Result
.
fail
().
setMsg
(
"上传文件大小不能超过5MB"
);
}
String
originalFilename
=
file
.
getOriginalFilename
();
if
(
originalFilename
==
null
||
originalFilename
.
isEmpty
())
{
return
Result
.
fail
().
setMsg
(
"文件名不能为空"
);
}
assert
originalFilename
!=
null
;
// 检查文件名中是否包含点号
int
lastIndex
=
originalFilename
.
lastIndexOf
(
"."
);
if
(
lastIndex
==
-
1
)
{
// 如果没有后缀名,直接返回报错信息
return
Result
.
fail
().
setMsg
(
"上传的文件没有后缀名,请检查文件"
);
}
String
objectName
=
"micro/"
+
gCmptId
+
"_cmptId/mark_no_bg.png"
;
String
filePath
=
aliOssUtil
.
upload
(
file
.
getBytes
(),
objectName
);
log
.
info
(
"文件上传名: {} 保存的文件名:{}"
,
originalFilename
,
filePath
);
return
Result
.
success
().
setContent
(
filePath
);
}
catch
(
IOException
e
)
{
log
.
error
(
"文件上传失败:{}"
,
e
);
}
return
Result
.
fail
().
setMsg
(
"文件上传失败"
);
}
/**
* 检查文件的魔数是否与扩展名匹配
...
...
src/main/webapp/WEB-INF/views/cmpt/gunRule.jsp
View file @
3c86a56a
...
...
@@ -241,7 +241,8 @@
<
/n-form-item
>
<
n
-
form
-
item
label
=
"关门时间"
path
=
"cutOffTime"
>
<
n
-
input
-
number
:
min
=
"1"
:
max
=
"200"
v
-
model
:
value
=
"gunRuleValue.cutOffTime"
placeholder
=
"请输入关门时间"
>
:
precision
=
"1"
:
max
=
"500"
v
-
model
:
value
=
"gunRuleValue.cutOffTime"
placeholder
=
"请输入关门时间"
>
<
template
#
suffix
>
小时
<
/template
>
...
...
src/main/webapp/WEB-INF/views/cmpt/markNoSelect.jsp
View file @
3c86a56a
...
...
@@ -106,12 +106,12 @@
<!--
顶部的搜索框
-->
<
n
-
card
:
bordered
=
"false"
>
<
div
class
=
"w-full flex flex-row items-center gap-x-2"
>
<
div
style
=
"min-width: 2
0
0px"
>
<
div
style
=
"min-width: 2
5
0px"
>
<
n
-
tabs
type
=
"segment"
@
update
:
value
=
"updateTab"
:
value
=
"tabIndex"
animated
pane
-
style
=
"padding:0;"
>
<
n
-
tab
-
pane
v
-
for
=
"item in ListEnum.data"
:
name
=
"item.value"
:
tab
=
"item.name"
/>
<
/n-tabs
>
<
/div
>
<
div
style
=
"min-width: 300px"
>
<
div
style
=
"min-width: 300px"
v
-
if
=
"tabIndex != 3"
>
<
n
-
tabs
type
=
"segment"
@
update
:
value
=
"updateStatus"
:
value
=
"query.status"
animated
pane
-
style
=
"padding:0;"
>
<
n
-
tab
-
pane
v
-
for
=
"item in statusOptions"
...
...
@@ -119,11 +119,11 @@
:
tab
=
"item.name+'('+item.total+')'"
/>
<
/n-tabs
>
<
/div
>
<
div
class
=
"ml-auto"
>
<
div
class
=
"ml-auto"
v
-
if
=
"tabIndex != 3"
>
<
n
-
input
v
-
model
:
value
=
"keyword"
placeholder
=
"请输入关键字进行搜索"
:
clearable
=
"true"
@
change
=
"fetchData"
/>
<
/div
>
<
/div
>
<
div
class
=
"w-full flex flex-row items-center mt-3"
>
<
div
class
=
"w-full flex flex-row items-center mt-3"
v
-
if
=
"tabIndex != 3"
>
<
n
-
space
>
<
n
-
upload
:
max
=
"1"
...
...
@@ -153,9 +153,37 @@
<
/div
>
<
/n-card
>
<!--
搜索框
-->
<
n
-
data
-
table
:
columns
=
"isPlayerList?playersColumns:markNoColumns"
:
loading
=
"loading"
:
data
=
"list"
:
pagination
=
"pagination"
<
n
-
data
-
table
v
-
if
=
"tabIndex != 3"
:
columns
=
"isPlayerList?playersColumns:markNoColumns"
:
loading
=
"loading"
:
data
=
"list"
:
pagination
=
"pagination"
:
bordered
=
"false"
:
remote
=
"true"
/>
<
n
-
space
v
-
else
>
<!--
只允许上传
png
-->
<
n
-
card
>
<
div
class
=
"flex flex-col gap-y-3"
>
<
n
-
alert
title
=
"图片要求"
type
=
"warning"
>
建议上传
350
x350png
(
1
:
1
)
格式
2
MB
以内
<
/n-alert
>
<
n
-
upload
:
max
=
"1"
@
before
-
upload
=
"beforeUploadBg"
:
action
=
"uploadBgUrl"
@
finish
=
"onFileUploadBg"
v
-
model
:
file
-
list
=
"bgFileList"
accept
=
"image/png"
>
<
n
-
button
type
=
"primary"
block
>
上传自助选号背景
<
/n-button
>
<
/n-upload
>
<
/div>
<
/n-card>
<
n
-
card
title
=
"免责图片"
>
<
n
-
image
width
=
"300"
:
src
=
"bgImage"
/>
<
/n-card
>
<
/n-space
>
<
n
-
modal
v
-
model
:
show
=
"showModal"
preset
=
"dialog"
...
...
@@ -319,6 +347,7 @@
{
key
:
'PLAYERS'
,
name
:
'选手名单'
,
color
:
'warning'
,
value
:
1
},
// 增值
{
key
:
'MARK_NO'
,
name
:
'参赛号列表'
,
color
:
'success'
,
value
:
2
},
{
key
:
'SETTING'
,
name
:
'设置'
,
color
:
'success'
,
value
:
3
},
])
</script>
<script>
...
...
@@ -326,6 +355,7 @@
const
{
useMessage
,
useNotification
,
dateZhCN
,
NButton
,
NTag
,
zhCN
,
NSpace
,
NImageGroup
,
NImage
,
NText
}
=
naive
// 添加全局 loading 指令
const
uploadUrl
=
window
.
location
.
origin
+
'/api-common/v1/upload?folder='
+
'gk/invoice'
+
'&cmptId='
+
getCId
()
const
uploadBgUrl
=
window
.
location
.
origin
+
'/api-common/v1/uploadSelectMarkNoBg'
+
'?gCmptId='
+
getCId
()
const
BASE_ECC_URL
=
"https://ecc.geexek.com"
// 人员列表
const
PLAYERS_URL
=
BASE_ECC_URL
+
'/api-pick/v1/enroll-page'
...
...
@@ -478,7 +508,11 @@
// 状态tab
const
updateTab
=
(
value
)
=>
{
tabIndex
.
value
=
value
fetchData
()
if
(
value
!==
3
)
{
fetchData
()
}
else
{
checkCert
()
}
}
// 上传完成
const
uploadFinish
=
({
...
...
@@ -632,6 +666,45 @@
window
.
location
.
href
=
url
}
/***---------------- 自助选号相关 end -----------------*/
/***---------------- 自助选号背景 start -----------------*/
const
certExit
=
ref
(
false
)
const
bgFileList
=
ref
([])
// 证书地址
const
bgImage
=
"https://geexekimgoss-sxk.oss-cn-hangzhou.aliyuncs.com/micro/"
+
getCId
()
+
"_cmptId/mark_no_bg.png"
+
"?t="
+
new
Date
().
getTime
()
// 检查证书是否存在
const
checkCert
=
()
=>
{
// 判断图片是否存在
const
img
=
new
Image
()
img
.
src
=
bgImage
img
.
onload
=
function
()
{
certExit
.
value
=
true
}
img
.
onerror
=
function
()
{
certExit
.
value
=
false
}
}
const
onFileUploadBg
=
(
file
)
=>
{
bgFileList
.
value
=
[]
checkCert
()
// window.location.reload()
loading
.
value
=
false
}
// 文件上传前回调
const
beforeUploadBg
=
(
data
)
=>
{
// 限制类型
if
(
data
.
file
.
file
?.
type
!==
'image/png'
)
{
message
.
error
(
'只能上传png格式的图片文件,请重新上传'
)
return
false
}
// 限制大小为1M
if
(
data
.
file
.
file
.
size
>
2
*
1024
*
1024
)
{
message
.
error
(
'文件大小不能超过1M,请重新上传'
)
return
false
}
loading
.
value
=
true
return
true
}
/***---------------- 自助选号背景 end -----------------*/
onMounted
(()
=>
{
fetchData
()
})
...
...
@@ -665,6 +738,13 @@
onChange
,
PLAYER
,
MARK_NO
,
// 背景上传
uploadBgUrl
,
certExit
,
bgFileList
,
bgImage
,
onFileUploadBg
,
beforeUploadBg
}
...
...
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