Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
dj-scrm-wx-work-attachment-report
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
4
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 3e1a9d8f
authored
Feb 25, 2022
by
王志慧
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
van-picker显示修改
1 parent
52cec0e5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
9 deletions
src/components/TimeSearch.vue
src/components/TimeSearch.vue
View file @
3e1a9d8
...
...
@@ -2,7 +2,9 @@
<div>
<div
class=
"top flex"
>
<div
class=
"report-name text-hide"
>
{{
userInfo
.
merchantName
||
'XXXX商户名称-10月小结'
}}
-
<span>
{{
text
}}
</span>
小结
{{
userInfo
.
merchantName
||
'XXXX商户名称-10月小结'
}}
-
<span>
{{
text
}}
</span>
小结
</div>
<template
v-if=
"outputData.reportTimeStart && reportType == 0"
>
<div
class=
"time small-text"
@
click=
"showDateSelect = true"
>
...
...
@@ -17,8 +19,8 @@
</div>
</
template
>
</div>
<van-popup
v-model=
"showDateSelect"
position=
"bottom"
>
<van-picker
show-toolbar
:title=
"reportType == 0 ? '选择日期' : '选择月份'"
:columns=
"dateColumns"
:default-index=
"d
ateColumns.length
"
@
confirm=
"confirmDate"
@
cancel=
"showDateSelect = false"
/>
<van-popup
v-model=
"showDateSelect"
v-if=
"showDateSelect"
position=
"bottom"
>
<van-picker
show-toolbar
:title=
"reportType == 0 ? '选择日期' : '选择月份'"
:columns=
"dateColumns"
:default-index=
"d
efaultIndex
"
@
confirm=
"confirmDate"
@
cancel=
"showDateSelect = false"
/>
</van-popup>
</div>
</template>
...
...
@@ -30,7 +32,8 @@ export default {
return
{
showDateSelect
:
false
,
dateColumns
:
[],
text
:
''
text
:
''
,
defaultIndex
:
0
}
},
computed
:
{
...
...
@@ -71,6 +74,7 @@ export default {
}
this
.
dateColumns
=
dateColumns
let
time
=
this
.
dateColumns
[
this
.
dateColumns
.
length
-
1
].
split
(
'~'
)
this
.
SET_START_TIME
({
reportTimeStart
:
time
[
0
],
...
...
@@ -85,11 +89,11 @@ export default {
this
.
SET_START_TIME
({
reportTimeStart
:
this
.
dateColumns
[
this
.
dateColumns
.
length
-
1
]
+
'-01'
})
}
this
.
initTextData
()
this
.
defaultIndex
=
this
.
dateColumns
.
length
//初始选中项的索引
this
.
initTextData
()
},
initTextData
()
{
initTextData
()
{
let
{
reportType
,
outputData
}
=
this
if
(
reportType
==
0
)
{
this
.
text
=
'周'
...
...
@@ -98,10 +102,9 @@ export default {
if
(
parseInt
(
time
[
1
])
>
9
)
{
this
.
text
=
time
[
1
]
+
'月'
}
else
{
this
.
text
=
time
[
1
]
&&
time
[
1
].
split
(
''
)[
1
]
+
'月'
this
.
text
=
time
[
1
]
&&
time
[
1
].
split
(
''
)[
1
]
+
'月'
}
}
},
confirmDate
(
e
)
{
let
{
...
...
@@ -158,6 +161,7 @@ export default {
}
})
}
this
.
defaultIndex
=
this
.
dateColumns
.
indexOf
(
e
)
this
.
initTextData
()
this
.
SET_TABTYPE_INDEX
({
index
:
0
})
this
.
showDateSelect
=
false
...
...
Write
Preview
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