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
36fe9a3e
Commit
36fe9a3e
authored
Mar 24, 2026
by
刘斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 完善文旅片区自定义部门
parent
f2d8147e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
7 deletions
+19
-7
App.vue
src/App.vue
+19
-7
No files found.
src/App.vue
View file @
36fe9a3e
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<van-form
@
submit=
"onSubmit"
required=
"auto"
>
<van-form
@
submit=
"onSubmit"
required=
"auto"
>
<div
class=
"section-card"
>
<div
class=
"section-card"
>
<div
class=
"section-title"
>
基本信息
</div>
<div
class=
"section-title"
>
基本信息
</div>
<div
class=
"form-item"
>
<div
class=
"form-item"
v-if=
"!hasDid"
>
<div
class=
"item-label"
>
所属板块
<span
style=
"color: #ee0a24"
>
*
</span></div>
<div
class=
"item-label"
>
所属板块
<span
style=
"color: #ee0a24"
>
*
</span></div>
<van-field
<van-field
v-model=
"form.plate"
v-model=
"form.plate"
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
name=
"plateId"
name=
"plateId"
class=
"custom-field"
class=
"custom-field"
placeholder=
"请选择所属板块"
placeholder=
"请选择所属板块"
:rules=
"[
{ required:
true
, message: '请选择所属板块' }]"
:rules=
"[
{ required:
!hasDid
, message: '请选择所属板块' }]"
:border="false"
:border="false"
@click="showPlatePicker = true"
@click="showPlatePicker = true"
>
>
...
@@ -579,7 +579,7 @@
...
@@ -579,7 +579,7 @@
<!-- Row 2 -->
<!-- Row 2 -->
<div
class=
"form-item"
>
<div
class=
"form-item"
>
<div
class=
"item-label"
>
出生年月
</div>
<div
class=
"item-label"
>
出生年月
<span
style=
"color: #ee0a24"
>
*
</span>
</div>
<div
class=
"date-input-box"
@
click=
"onFamilyBirthClick(i)"
>
<div
class=
"date-input-box"
@
click=
"onFamilyBirthClick(i)"
>
<span>
{{ fm.birthDate || 'YYYY-MM-DD' }}
</span>
<span>
{{ fm.birthDate || 'YYYY-MM-DD' }}
</span>
<van-icon
name=
"calendar-o"
color=
"#969799"
/>
<van-icon
name=
"calendar-o"
color=
"#969799"
/>
...
@@ -588,7 +588,7 @@
...
@@ -588,7 +588,7 @@
<!-- Row 3 -->
<!-- Row 3 -->
<div
class=
"form-item"
>
<div
class=
"form-item"
>
<div
class=
"item-label"
>
工作单位及职务
</div>
<div
class=
"item-label"
>
工作单位及职务
<span
style=
"color: #ee0a24"
>
*
</span>
</div>
<div
class=
"custom-input"
>
<div
class=
"custom-input"
>
<input
v-model=
"fm.companyAndJob"
placeholder=
"单位与职务"
class=
"native-input"
/>
<input
v-model=
"fm.companyAndJob"
placeholder=
"单位与职务"
class=
"native-input"
/>
</div>
</div>
...
@@ -596,7 +596,7 @@
...
@@ -596,7 +596,7 @@
<!-- Row 4 -->
<!-- Row 4 -->
<div
class=
"form-item"
>
<div
class=
"form-item"
>
<div
class=
"item-label"
>
联系方式
</div>
<div
class=
"item-label"
>
联系方式
<span
style=
"color: #ee0a24"
>
*
</span>
</div>
<div
class=
"custom-input"
>
<div
class=
"custom-input"
>
<input
v-model=
"fm.contact"
type=
"tel"
placeholder=
"手机号"
class=
"native-input"
/>
<input
v-model=
"fm.contact"
type=
"tel"
placeholder=
"手机号"
class=
"native-input"
/>
</div>
</div>
...
@@ -902,6 +902,12 @@ if (_tid) {
...
@@ -902,6 +902,12 @@ if (_tid) {
form
.
tid
=
_tid
;
form
.
tid
=
_tid
;
}
}
const
_did
=
new
URL
(
window
.
location
.
href
).
searchParams
.
get
(
'did'
);
const
hasDid
=
ref
(
!!
_did
);
if
(
_did
)
{
form
.
plateId
=
Number
(
_did
);
}
const
politicalOptions
=
[
const
politicalOptions
=
[
{
value
:
'1'
,
text
:
'党员'
},
{
value
:
'1'
,
text
:
'党员'
},
{
value
:
'2'
,
text
:
'预备党员'
},
{
value
:
'2'
,
text
:
'预备党员'
},
...
@@ -1205,6 +1211,10 @@ function loadCache() {
...
@@ -1205,6 +1211,10 @@ function loadCache() {
if
(
cached
)
{
if
(
cached
)
{
const
data
=
JSON
.
parse
(
cached
);
const
data
=
JSON
.
parse
(
cached
);
Object
.
assign
(
form
,
data
);
Object
.
assign
(
form
,
data
);
if
(
_did
)
{
form
.
plateId
=
Number
(
_did
);
form
.
plate
=
''
;
}
if
(
_tid
)
{
if
(
_tid
)
{
form
.
tid
=
_tid
;
form
.
tid
=
_tid
;
}
}
...
@@ -1230,7 +1240,9 @@ const saveImmediately = () => {
...
@@ -1230,7 +1240,9 @@ const saveImmediately = () => {
};
};
onMounted
(()
=>
{
onMounted
(()
=>
{
if
(
!
hasDid
.
value
)
{
fetchPlateList
();
fetchPlateList
();
}
loadCache
();
loadCache
();
const
onVisibilityChange
=
()
=>
{
const
onVisibilityChange
=
()
=>
{
if
(
document
.
visibilityState
===
'hidden'
)
saveImmediately
();
if
(
document
.
visibilityState
===
'hidden'
)
saveImmediately
();
...
@@ -1293,7 +1305,7 @@ async function onSubmit() {
...
@@ -1293,7 +1305,7 @@ async function onSubmit() {
}
}
if
(
form
.
familyMembers
&&
form
.
familyMembers
.
length
>
0
)
{
if
(
form
.
familyMembers
&&
form
.
familyMembers
.
length
>
0
)
{
for
(
const
item
of
form
.
familyMembers
)
{
for
(
const
item
of
form
.
familyMembers
)
{
if
(
!
item
.
name
||
!
item
.
relation
)
{
if
(
!
item
.
name
||
!
item
.
relation
||
!
item
.
birthDate
||
!
item
.
companyAndJob
||
!
item
.
contact
)
{
showFailToast
(
'家庭成员信息不全!'
);
showFailToast
(
'家庭成员信息不全!'
);
submitting
.
value
=
false
;
submitting
.
value
=
false
;
return
;
return
;
...
...
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