Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
H
hr-mobile-view
Project
Project
Details
Activity
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
anjia-hr
hr-mobile-view
Commits
f2d8147e
Commit
f2d8147e
authored
Mar 18, 2026
by
刘斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 增加板块选项,方便各板块自己处理
parent
6ee070be
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
1 deletion
+57
-1
App.vue
src/App.vue
+57
-1
No files found.
src/App.vue
View file @
f2d8147e
...
...
@@ -3,6 +3,24 @@
<van-form
@
submit=
"onSubmit"
required=
"auto"
>
<div
class=
"section-card"
>
<div
class=
"section-title"
>
基本信息
</div>
<div
class=
"form-item"
>
<div
class=
"item-label"
>
所属板块
<span
style=
"color: #ee0a24"
>
*
</span></div>
<van-field
v-model=
"form.plate"
readonly
clickable
name=
"plateId"
class=
"custom-field"
placeholder=
"请选择所属板块"
:rules=
"[
{ required: true, message: '请选择所属板块' }]"
:border="false"
@click="showPlatePicker = true"
>
<template
#
right-icon
>
<van-icon
name=
"arrow-down"
color=
"#969799"
size=
"12"
/>
</
template
>
</van-field>
</div>
<div
class=
"form-row-2col"
>
<div
class=
"form-col"
>
...
...
@@ -609,7 +627,11 @@
<van-button
round
block
type=
"primary"
:loading=
"submitting"
native-type=
"submit"
>
提交
</van-button>
</div>
</van-form>
<van-popup
v-model:show=
"showPlatePicker"
position=
"bottom"
>
<van-picker
:columns=
"plateOptions"
@
confirm=
"onPlateConfirm"
@
cancel=
"showPlatePicker = false"
/>
</van-popup>
<van-popup
v-model:show=
"showPoliticalPicker"
position=
"bottom"
>
<van-picker
:columns=
"politicalOptions"
@
confirm=
"onPoliticalConfirm"
@
cancel=
"showPoliticalPicker = false"
/>
...
...
@@ -728,6 +750,8 @@ interface ResumeItemModel {
}
const
form
=
reactive
({
plateId
:
0
,
plate
:
''
,
name
:
''
,
phoneNumber
:
''
,
gender
:
'0'
,
...
...
@@ -804,6 +828,9 @@ const idRules = [
const
ageRules
=
[{
pattern
:
/^
\d{1,3}
$/
,
message
:
'年龄格式错误'
}];
const
showPlatePicker
=
ref
(
false
);
const
plateOptions
=
ref
<
{
text
:
string
;
value
:
number
}[]
>
([]);
// 性别与婚姻状况改为单选,不再使用选择器弹窗
const
showPoliticalPicker
=
ref
(
false
);
const
showBirthPicker
=
ref
(
false
);
...
...
@@ -918,6 +945,30 @@ void [ageRules, politicalOptions, relationOptions, birthValues];
// 性别与婚姻状况改为单选,不再需要确认回调
async
function
fetchPlateList
()
{
try
{
const
{
data
:
responseData
}
=
await
axios
.
get
(
'/api/employee/sysDept/queryPlateList'
);
if
(
responseData
.
success
&&
Array
.
isArray
(
responseData
.
data
))
{
plateOptions
.
value
=
responseData
.
data
.
map
((
item
:
{
id
:
number
;
name
:
string
})
=>
({
text
:
item
.
name
,
value
:
item
.
id
,
}));
}
}
catch
(
error
)
{
console
.
error
(
'Failed to fetch plate list'
,
error
);
showFailToast
(
'获取板块列表失败'
);
}
}
function
onPlateConfirm
(
payload
:
{
selectedOptions
:
{
text
:
string
;
value
:
number
}[];
})
{
const
opt
=
payload
.
selectedOptions
[
0
];
form
.
plateId
=
opt
.
value
;
form
.
plate
=
opt
.
text
;
showPlatePicker
.
value
=
false
;
}
function
onPoliticalConfirm
(
payload
:
{
selectedOptions
:
{
text
:
string
;
value
:
string
}[];
})
{
...
...
@@ -1084,6 +1135,8 @@ function saveCache() {
?
form
.
photoList
.
map
((
x
:
any
)
=>
({
url
:
x
?.
url
,
name
:
x
?.
name
}))
:
[];
const
data
=
{
plateId
:
form
.
plateId
,
plate
:
form
.
plate
,
name
:
form
.
name
,
phoneNumber
:
form
.
phoneNumber
,
gender
:
form
.
gender
,
...
...
@@ -1177,6 +1230,7 @@ const saveImmediately = () => {
};
onMounted
(()
=>
{
fetchPlateList
();
loadCache
();
const
onVisibilityChange
=
()
=>
{
if
(
document
.
visibilityState
===
'hidden'
)
saveImmediately
();
...
...
@@ -1247,6 +1301,8 @@ async function onSubmit() {
}
}
const
payload
=
{
plateId
:
form
.
plateId
,
plate
:
form
.
plate
,
name
:
form
.
name
,
phoneNumber
:
form
.
phoneNumber
,
gender
:
form
.
gender
,
...
...
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