Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
web-project
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
紫光云
web-project
Commits
957c5344
Commit
957c5344
authored
Oct 30, 2024
by
ccc2wdd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
变更签证,统计页面有初始年份和季度
parent
68e4c565
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
79 additions
and
45 deletions
+79
-45
changeSignatureStatistic.vue
src/views/changeSignature/changeSignatureStatistic.vue
+79
-45
No files found.
src/views/changeSignature/changeSignatureStatistic.vue
View file @
957c5344
...
...
@@ -23,7 +23,10 @@
<
script
lang=
"ts"
setup
>
import
{
onMounted
,
ref
}
from
'vue'
;
import
{
Table
}
from
'ant-design-vue'
;
import
{
getStatisticListAll
,
exportChangeSignature
}
from
'@/api/changeSignatrue/changeSignatrue'
;
import
{
getStatisticListAll
,
exportChangeSignature
,
}
from
'@/api/changeSignatrue/changeSignatrue'
;
import
{
BasicForm
,
FormActionType
,
FormSchema
,
useForm
}
from
'@/components/Form'
;
import
StatisticWindow
from
'@/views/monthlyPlan/statisticWindow/statisticWindow.vue'
;
import
{
useModal
}
from
'@/components/Modal'
;
...
...
@@ -33,50 +36,9 @@
import
{
useUserStore
}
from
'@/store/modules/user'
;
import
moment
from
'moment'
;
const
seach
=
ref
([
{
field
:
'givenYear'
,
label
:
''
,
component
:
'DatePicker'
,
componentProps
:
{
placeholder
:
'年份'
,
picker
:
'year'
,
valueFormat
:
'YYYY'
,
format
:
'YYYY'
,
style
:
{
width
:
'100%'
,
},
},
colProps
:
{
span
:
4
},
},
{
field
:
'quarter'
,
label
:
''
,
component
:
'Select'
,
componentProps
:
{
placeholder
:
'季度'
,
options
:
[
{
label
:
'第一季度'
,
value
:
'第一季度'
,
},
{
label
:
'第二季度'
,
value
:
'第二季度'
,
},
{
label
:
'第三季度'
,
value
:
'第三季度'
,
},
{
label
:
'第四季度'
,
value
:
'第四季度'
,
},
],
},
colProps
:
{
span
:
4
},
},
]);
const
currentMonth
=
new
Date
().
getMonth
()
+
1
;
const
currentquarter
=
getQuarter
();
// 列表
const
dataSource
=
ref
([]);
// 表头
...
...
@@ -193,8 +155,69 @@
const
{
push
}
=
useRouter
();
const
deptId
=
ref
(
''
);
const
params
=
ref
({
givenYear
:
''
,
quarter
:
''
,
deptId
:
''
});
const
seach
=
ref
([
{
field
:
'givenYear'
,
label
:
''
,
component
:
'DatePicker'
,
componentProps
:
{
defaultValue
:
moment
().
format
(
'YYYY'
),
placeholder
:
'年份'
,
picker
:
'year'
,
valueFormat
:
'YYYY'
,
format
:
'YYYY'
,
style
:
{
width
:
'100%'
,
},
},
colProps
:
{
span
:
4
},
},
{
field
:
'quarter'
,
label
:
''
,
component
:
'Select'
,
componentProps
:
{
defaultValue
:
currentquarter
,
placeholder
:
'季度'
,
options
:
[
{
label
:
'第一季度'
,
value
:
'第一季度'
,
},
{
label
:
'第二季度'
,
value
:
'第二季度'
,
},
{
label
:
'第三季度'
,
value
:
'第三季度'
,
},
{
label
:
'第四季度'
,
value
:
'第四季度'
,
},
],
},
colProps
:
{
span
:
4
},
},
]);
onMounted
(
async
()
=>
{
deptId
.
value
=
useUserStore
().
userInfo
.
deptId
;
// 获取当前日期
const
now
=
new
Date
();
// 设置当前年份
params
.
value
.
givenYear
=
now
.
getFullYear
().
toString
();
// 计算当前季度
const
currentMonth
=
now
.
getMonth
()
+
1
;
// getMonth() 返回的月份是从 0 开始的
if
(
currentMonth
<=
3
)
{
params
.
value
.
quarter
=
'第一季度'
;
}
else
if
(
currentMonth
<=
6
)
{
params
.
value
.
quarter
=
'第二季度'
;
}
else
if
(
currentMonth
<=
9
)
{
params
.
value
.
quarter
=
'第三季度'
;
}
else
{
params
.
value
.
quarter
=
'第四季度'
;
}
getStatisticList
();
});
...
...
@@ -213,6 +236,17 @@
downloadByData
(
data
,
'变更签证管理统计报表'
+
'.xls'
);
}
const
loadingRef
=
ref
(
false
);
function
getQuarter
()
{
if
(
currentMonth
<=
3
)
{
return
'第一季度'
;
}
else
if
(
currentMonth
<=
6
)
{
return
'第二季度'
;
}
else
if
(
currentMonth
<=
9
)
{
return
'第三季度'
;
}
else
{
return
'第四季度'
;
}
}
function
handleSubmit
()
{
let
data
=
getFieldsValue
();
params
.
value
=
data
;
...
...
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