Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
杨炀
/
ztx_wx_gzt
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
a9508795
authored
2026-06-01 13:13:04 +0800
by
lttnew
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
级位申请优化
1 parent
f120f0ea
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
161 additions
and
99 deletions
config.js
level/addApply.vue
level/chooseStudent.vue
myCenter/chooseExaminer.vue
myCenter/examPointApply.vue
config.js
View file @
a950879
// dev
const
baseUrl_api
=
'http://192.168.1.222:8787'
//
const baseUrl_api = 'http://192.168.1.222:8787'
// const baseUrl_api = 'http://47.98.186.233:8787'
//
const baseUrl_api = 'https://tk001.wxjylt.com/stage-api/'
const
baseUrl_api
=
'https://tk001.wxjylt.com/stage-api/'
const
loginImage_api
=
'https://tk001.wxjylt.com/stage-api'
const
payUrl
=
'https://wxpay.cmbc.com.cn/mobilePlatform/appserver/lcbpPay.do'
...
...
level/addApply.vue
View file @
a950879
<
template
>
<view
class=
"add-apply-page"
>
<view
v-if=
"activeSelectKey"
class=
"level-dropdown-mask"
@
click=
"closeLevelDropdown"
></view>
<view
:class=
"
{ 'dropdown-open-page': activeSelectKey }" class="add-apply-page" @click="closeLevelDropdown">
<!-- 顶部步骤条 -->
<view
class=
"steps-bar"
>
<view
:class=
"
{ active: active >= 0, current: active == 0 }" class="step-item">
...
...
@@ -106,7 +105,7 @@
<view
v-for=
"(n,index) in infoList"
:key=
"n.id || n.perId || n.idcCode || index"
:class=
"
{ 'select-open':
activeSelectKey === getRowKey
(n, index) }"
:class=
"
{ 'select-open':
isRowDropdownOpen
(n, index) }"
class="student-card"
>
<!-- 左侧:头像+考生信息 -->
...
...
@@ -135,32 +134,57 @@
<view
class=
"level-item"
>
<text
class=
"level-label"
>
考试级别
</text>
<view
class=
"select-wrapper exam-level-select"
>
<view
class=
"exam-level-trigger"
@
click=
"toggleLevelDropdown(n, index)"
>
<view
:class=
"`level-trigger-$
{index}`"
class="exam-level-trigger"
@click.stop="toggleLevelDropdown(n, index)"
>
<text>
{{
getLevelText
(
n
.
levelNew
)
||
'请选择'
}}
</text>
<uni-icons
color=
"#999"
size=
"14"
type=
"top"
></uni-icons>
</view>
<view
v-if=
"activeSelectKey === getRowKey(n, index)"
class=
"level-dropdown-up"
<scroll-view
v-if=
"isLevelDropdownOpen(n, index)"
class=
"level-dropdown-local"
:scroll-y=
"true"
@
click
.
stop
>
<view
class=
"level-dropdown-inner"
>
<view
v-for=
"item in getLevelOptions(n)"
:key=
"item.value"
:class=
"
{ active: n.levelNew === item.value }"
class="level-dropdown-item"
@click.stop="chooseLevel(n, item)"
>
{{
item
.
text
}}
</view>
<view
v-for=
"item in getLevelOptions(n)"
:key=
"item.value"
:class=
"
{ active: n.levelNew === item.value }"
class="level-dropdown-item"
@click.stop="chooseLevel(n, item)"
>
{{
item
.
text
}}
</view>
</view>
</
scroll-
view>
</view>
</view>
<view
class=
"level-item"
>
<text
class=
"level-label"
>
是否通过
</text>
<view
class=
"select-wrapper"
>
<uni-data-select
v-model=
"n.isPass"
:clear=
"false"
:localdata=
"range"
/>
<view
class=
"select-wrapper pass-select"
>
<view
class=
"exam-level-trigger"
@
click
.
stop=
"togglePassDropdown(n, index)"
>
<text>
{{
getPassText
(
n
.
isPass
)
}}
</text>
<uni-icons
color=
"#999"
size=
"14"
type=
"top"
></uni-icons>
</view>
<view
v-if=
"isPassDropdownOpen(n, index)"
class=
"level-dropdown-local pass-dropdown-local"
@
click
.
stop
>
<view
v-for=
"item in range"
:key=
"item.value"
:class=
"
{ active: n.isPass === item.value }"
class="level-dropdown-item"
@click.stop="choosePass(n, item)"
>
{{
item
.
text
}}
</view>
</view>
</view>
</view>
</view>
...
...
@@ -192,7 +216,7 @@
</view>
<!-- 添加考生弹框 -->
<uni-popup
ref=
"addPopup"
type=
"center"
:mask-click=
"false"
style=
"z-index: 99999
"
>
<uni-popup
ref=
"addPopup"
class=
"add-student-popup"
type=
"center"
:mask-click=
"false"
style=
"z-index: 1001
"
>
<view
class=
"add-popup"
>
<view
class=
"popup-title"
>
添加考生
</view>
<view
class=
"popup-content"
>
...
...
@@ -225,7 +249,7 @@
</uni-popup>
<!-- 调动确认弹框 -->
<uni-popup
ref=
"transferPopup"
type=
"center"
:mask-click=
"false"
style=
"z-index: 999999
"
>
<uni-popup
ref=
"transferPopup"
class=
"add-student-popup"
type=
"center"
:mask-click=
"false"
style=
"z-index: 1001
"
>
<view
class=
"add-popup"
>
<view
class=
"popup-title"
>
系统提示
</view>
<view
class=
"popup-content"
>
...
...
@@ -380,6 +404,23 @@ function getRowKey(row, index = 0) {
return
String
(
row
.
id
||
row
.
perId
||
row
.
personId
||
row
.
idcCode
||
index
)
}
function
getDropdownKey
(
type
,
row
,
index
=
0
)
{
return
`
${
type
}
-
${
getRowKey
(
row
,
index
)}
`
}
function
isRowDropdownOpen
(
row
,
index
=
0
)
{
const
rowKey
=
getRowKey
(
row
,
index
)
return
activeSelectKey
.
value
===
`level-
${
rowKey
}
`
||
activeSelectKey
.
value
===
`pass-
${
rowKey
}
`
}
function
isLevelDropdownOpen
(
row
,
index
=
0
)
{
return
activeSelectKey
.
value
===
getDropdownKey
(
'level'
,
row
,
index
)
}
function
isPassDropdownOpen
(
row
,
index
=
0
)
{
return
activeSelectKey
.
value
===
getDropdownKey
(
'pass'
,
row
,
index
)
}
function
cloneLevelOptions
(
list
=
defaultLevelArr
)
{
return
list
.
map
(
item
=>
({
...
item
}))
}
...
...
@@ -422,6 +463,11 @@ function getLevelText(value) {
return
option
?.
text
||
`
${
szToHz
(
value
)}
级`
}
function
getPassText
(
value
)
{
const
option
=
_
.
find
(
range
.
value
,
item
=>
item
.
value
===
value
)
return
option
?.
text
||
'请选择'
}
function
setDefaultLevel
(
row
)
{
row
.
levelOld
=
row
.
levelOld
?
String
(
row
.
levelOld
)
:
''
row
.
levelNew
=
row
.
levelNew
?
String
(
row
.
levelNew
)
:
''
...
...
@@ -434,11 +480,9 @@ function setDefaultLevel(row) {
row
.
levelRecommend
=
'9'
}
// 原级别是一级时不能默认推荐,其他情况按推荐级别回填,保证二次添加后列表能显示考试级别。
if
(
row
.
levelOld
===
'1'
)
{
row
.
levelNew
=
''
}
else
if
(
!
row
.
levelNew
)
{
row
.
levelNew
=
row
.
levelRecommend
// 按推荐级别回填;原级别为一级时推荐级别也是一级,和 PC 默认展示保持一致。
if
(
!
row
.
levelNew
)
{
row
.
levelNew
=
row
.
levelOld
===
'1'
?
'1'
:
row
.
levelRecommend
}
if
(
!
row
.
isPass
)
{
...
...
@@ -626,12 +670,18 @@ function prev() {
function
goChooseStudent
()
{
uni
.
navigateTo
({
url
:
`/level/chooseStudent?examId=
${
form
.
value
.
examId
}
&memId=
${
memberInfo
.
memId
}
&examType=
${
form
.
value
.
type
}
`
url
:
`/level/chooseStudent?examId=
${
form
.
value
.
examId
}
&memId=
${
memberInfo
.
memId
}
&examType=
${
form
.
value
.
type
}
`
,
events
:
{
studentSelected
:
()
=>
{
getChosedStudentList
()
}
}
})
}
// 打开添加弹框
function
handleAdd
()
{
closeLevelDropdown
()
addForm
.
value
=
{
name
:
''
,
idcType
:
'0'
,
...
...
@@ -690,6 +740,7 @@ async function confirmAdd() {
await
handelAddPerson
()
}
else
{
// 人员不在本机构,显示自定义确认弹框(不关闭添加弹框,保留表单数据)
closeLevelDropdown
()
transferPopup
.
value
?.
open
()
}
}
catch
(
err
)
{
...
...
@@ -776,7 +827,7 @@ function szToHz(num) {
let
nowRow
function
toggleLevelDropdown
(
row
,
index
=
0
)
{
const
rowKey
=
get
RowKey
(
row
,
index
)
const
rowKey
=
get
DropdownKey
(
'level'
,
row
,
index
)
if
(
activeSelectKey
.
value
===
rowKey
)
{
closeLevelDropdown
()
return
...
...
@@ -784,37 +835,12 @@ function toggleLevelDropdown(row, index = 0) {
nowRow
=
row
activeSelectKey
.
value
=
rowKey
getLevelOptions
(
row
)
changeLevelfather
(
row
,
index
)
}
function
closeLevelDropdown
()
{
activeSelectKey
.
value
=
''
}
function
changeLevelfather
(
row
,
index
=
0
,
flag
=
0
)
{
nowRow
=
row
activeSelectKey
.
value
=
getRowKey
(
row
,
index
)
const
data
=
_
.
map
(
infoList
.
value
,
(
d
)
=>
{
return
{
id
:
d
.
id
,
levelNew
:
d
.
levelNew
,
// score: d.score,
isPass
:
d
.
isPass
}
})
api
.
editLevel
({
examId
:
form
.
value
.
examId
,
personInfo
:
JSON
.
stringify
(
data
),
transcript
:
form
.
value
.
transcript
,
// perId: row.perId,
status
:
flag
}).
then
(
res
=>
{
const
options
=
normalizeLevelOptions
(
res
.
data
)
row
.
levelOptions
=
options
levelArr
.
value
=
options
})
}
function
chooseLevel
(
row
,
item
)
{
if
(
!
row
)
return
const
oldLevel
=
row
.
levelNew
...
...
@@ -822,6 +848,21 @@ function chooseLevel(row, item) {
changeLevel
(
row
,
oldLevel
)
}
function
togglePassDropdown
(
row
,
index
=
0
)
{
const
rowKey
=
getDropdownKey
(
'pass'
,
row
,
index
)
if
(
activeSelectKey
.
value
===
rowKey
)
{
closeLevelDropdown
()
return
}
activeSelectKey
.
value
=
rowKey
}
function
choosePass
(
row
,
item
)
{
if
(
!
row
)
return
row
.
isPass
=
item
.
value
closeLevelDropdown
()
}
function
changeLevel
(
row
,
oldLevel
)
{
nowRow
=
row
||
nowRow
openConfirmModal
({
...
...
@@ -924,17 +965,36 @@ function handleDelete(row) {
.add-apply-page
{
min-height
:
100vh
;
background
:
#f5f5f5
;
padding-bottom
:
120
rpx
;
padding-bottom
:
calc
(
160
rpx
+
env
(
safe-area-inset-bottom
));
box-sizing
:
border-box
;
&.dropdown-open-page
{
padding-bottom
:
calc
(
520
rpx
+
env
(
safe-area-inset-bottom
));
}
}
.level-dropdown-mask
{
position
:
fixed
;
top
:
0
;
left
:
0
;
right
:
0
;
bottom
:
0
;
z-index
:
90
;
background
:
transparent
;
:deep
(
.add-student-popup
)
{
z-index
:
1001
!important
;
}
:deep
(
.add-student-popup
.uni-popup
)
{
z-index
:
1001
!important
;
}
.level-dropdown-item
{
height
:
72
rpx
;
line-height
:
72
rpx
;
padding
:
0
24
rpx
;
font-size
:
28
rpx
;
color
:
#333
;
text-align
:
left
;
box-sizing
:
border-box
;
&.active
{
color
:
#AD181F
;
font-weight
:
600
;
background
:
#FFF5F5
;
}
}
/* 顶部步骤条 */
...
...
@@ -1079,6 +1139,7 @@ function handleDelete(row) {
.stat-total
{
font-size
:
28
rpx
;
font-weight
:
600
;
width
:
120
rpx
;
color
:
#333
;
}
...
...
@@ -1250,12 +1311,13 @@ function handleDelete(row) {
.select-wrapper
{
width
:
160
rpx
;
position
:
relative
;
z-index
:
2
;
z-index
:
2
00
;
overflow
:
visible
;
}
.exam-level-select
{
z-index
:
130
;
.exam-level-select
,
.pass-select
{
z-index
:
200
;
.exam-level-trigger
{
display
:
flex
;
...
...
@@ -1271,43 +1333,23 @@ function handleDelete(row) {
color
:
#333
;
}
.level-dropdown-
up
{
.level-dropdown-
local
{
position
:
absolute
;
left
:
0
;
bottom
:
78
rpx
;
width
:
180
rpx
;
height
:
360
rpx
;
background
:
#fff
;
border-radius
:
12
rpx
;
box-shadow
:
0
8
rpx
28
rpx
rgba
(
0
,
0
,
0
,
0.14
);
z-index
:
180
;
padding
:
8
rpx
0
;
box-sizing
:
border-box
;
z-index
:
200
;
overflow
:
hidden
;
}
.
level-dropdown-inner
{
.
pass-dropdown-local
{
height
:
auto
;
}
.level-dropdown-item
{
height
:
68
rpx
;
line-height
:
68
rpx
;
padding
:
0
24
rpx
;
font-size
:
28
rpx
;
color
:
#333
;
text-align
:
left
;
&.active
{
color
:
#AD181F
;
font-weight
:
600
;
background
:
#FFF5F5
;
}
&
.disabled
{
color
:
#c8c9cc
;
background
:
#fafafa
;
}
}
}
}
}
...
...
@@ -1379,10 +1421,11 @@ function handleDelete(row) {
display
:
flex
;
justify-content
:
space-around
;
align-items
:
center
;
padding
:
20
rpx
0
;
padding-top
:
60
rpx
;
padding-bottom
:
calc
(
20
rpx
+
env
(
safe-area-inset-bottom
));
background
:
#fff
;
border-top
:
1
rpx
solid
#f0f0f0
;
z-index
:
98
;
z-index
:
999
;
.btn-red
{
background
:
linear-gradient
(
135deg
,
#AD181F
0%
,
#c42a2a
100%
);
...
...
level/chooseStudent.vue
View file @
a950879
...
...
@@ -124,7 +124,9 @@
memId
:
memId
,
examId
:
examId
,
examType
:
examType
,
name
:
searchName
.
value
name
:
searchName
.
value
,
pageNum
:
pageNum
.
value
,
pageSize
:
pageSize
}).
then
(
res
=>
{
const
rows
=
res
.
rows
||
[]
rows
.
forEach
(
item
=>
{
...
...
@@ -203,6 +205,7 @@
}).
then
(()
=>
{
uni
.
hideLoading
()
uni
.
showToast
({
title
:
'添加成功'
,
icon
:
'success'
})
emitStudentSelected
()
setTimeout
(()
=>
{
uni
.
navigateBack
()
},
1500
)
...
...
@@ -211,6 +214,13 @@
})
}
function
emitStudentSelected
()
{
const
pages
=
getCurrentPages
()
const
currentPage
=
pages
[
pages
.
length
-
1
]
const
eventChannel
=
currentPage
?.
getOpenerEventChannel
?.()
eventChannel
?.
emit
(
'studentSelected'
)
}
function
goBack
()
{
uni
.
navigateBack
()
}
...
...
myCenter/chooseExaminer.vue
View file @
a950879
...
...
@@ -26,7 +26,9 @@
<view
class=
"bottom-area"
>
<view
class=
"selected-tip"
v-if=
"selectedIds.length > 0"
>
已选择
{{
selectedIds
.
length
}}
位考官
</view>
<view>
<button
class=
"add-btn"
:disabled=
"selectedIds.length === 0"
@
click=
"handleAdd"
>
添加
</button></view>
<view
class=
"add-btn-wrap"
>
<button
class=
"add-btn"
:disabled=
"selectedIds.length === 0"
@
click=
"handleAdd"
>
添加
</button>
</view>
</view>
</view>
...
...
@@ -194,12 +196,17 @@ function handleAdd() {
border-top
:
1
rpx
solid
#eee
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
justify-content
:
flex-end
;
}
.selected-tip
{
font-size
:
26
rpx
;
color
:
#666
;
margin-right
:
auto
;
}
.add-btn-wrap
{
margin-left
:
auto
;
}
.add-btn
{
...
...
myCenter/examPointApply.vue
View file @
a950879
...
...
@@ -304,7 +304,9 @@ async function onModalConfirm() {
uni
.
showToast
({
title
:
err
.
data
?.
msg
||
'提交失败'
,
icon
:
'none'
})
}
}
else
if
(
modalAction
===
'submitSuccess'
)
{
uni
.
navigateBack
()
uni
.
redirectTo
({
url
:
'/myCenter/examPointApplyList'
})
}
// modalAction = ''
}
...
...
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