Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
T
text2video-frontend
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
周成波
text2video-frontend
Commits
02a07d47
Commit
02a07d47
authored
Sep 13, 2024
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug
parent
54b701ee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
calc_retire.vue
src/views/home/calc_retire.vue
+9
-2
No files found.
src/views/home/calc_retire.vue
View file @
02a07d47
...
@@ -14,7 +14,7 @@ const debug = ref(import.meta.env.MODE === 'production' ? false : true);
...
@@ -14,7 +14,7 @@ const debug = ref(import.meta.env.MODE === 'production' ? false : true);
const
loading
=
ref
(
false
);
const
loading
=
ref
(
false
);
const
form
=
reactive
({
const
form
=
reactive
({
task_id
:
""
,
task_id
:
""
,
birth
:
"19
82
-04"
,
birth
:
"19
93
-04"
,
sex_value
:
"男"
,
sex_value
:
"男"
,
sex_option
:
[
sex_option
:
[
{
{
...
@@ -43,6 +43,7 @@ onMounted(() => {
...
@@ -43,6 +43,7 @@ onMounted(() => {
});
});
const
calculateRetirement
=
(
birthStr
:
string
,
gender
:
string
)
=>
{
const
calculateRetirement
=
(
birthStr
:
string
,
gender
:
string
)
=>
{
console
.
log
(
birthStr
)
let
parts
=
birthStr
.
split
(
'-'
);
// 使用'-'作为分隔符来拆分字符串
let
parts
=
birthStr
.
split
(
'-'
);
// 使用'-'作为分隔符来拆分字符串
let
birthYear
=
parseInt
(
parts
[
0
],
10
);
// 年份
let
birthYear
=
parseInt
(
parts
[
0
],
10
);
// 年份
let
birthMonth
=
parseInt
(
parts
[
1
],
10
);
// 月份
let
birthMonth
=
parseInt
(
parts
[
1
],
10
);
// 月份
...
@@ -105,7 +106,13 @@ const calculateRetirement = (birthStr: string, gender: string) => {
...
@@ -105,7 +106,13 @@ const calculateRetirement = (birthStr: string, gender: string) => {
<el-form
:model=
"form"
label-width=
"114px"
v-loading=
"loading"
>
<el-form
:model=
"form"
label-width=
"114px"
v-loading=
"loading"
>
<!-- 输入出生年月 -->
<!-- 输入出生年月 -->
<el-form-item
label=
"出生年月"
>
<el-form-item
label=
"出生年月"
>
<el-date-picker
v-model=
"form.birth"
type=
"month"
placeholder=
"Pick a month"
/>
<el-date-picker
v-model=
"form.birth"
type=
"month"
placeholder=
"Pick a month"
format=
"YYYY-MM"
value-format=
"YYYY-MM"
/>
</el-form-item>
</el-form-item>
<!-- 性别 -->
<!-- 性别 -->
<el-form-item
label=
"性别"
>
<el-form-item
label=
"性别"
>
...
...
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