Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
groupPurchase-miniapp
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
彭佳妮(贵阳日报)
groupPurchase-miniapp
Commits
379cb7d4
Commit
379cb7d4
authored
Aug 15, 2024
by
张娇(东信)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
筛选修改
parent
f1a30881
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
10 deletions
+21
-10
DepartureDate.vue
src/Components/assistingAgriculture/index/DepartureDate.vue
+6
-8
RuralTravel.vue
src/pages/assistingAgriculture/RuralTravel/RuralTravel.vue
+15
-2
No files found.
src/Components/assistingAgriculture/index/DepartureDate.vue
View file @
379cb7d4
...
...
@@ -11,7 +11,7 @@
{{
item
.
startDate
}}
</li>
<wd-calendar
use-default-slot
v-model=
"value"
@
confirm=
"handleConfirm"
>
<li
@
tap=
"selectItem(index, item)"
>
选择日期
</li>
<li>
选择日期
</li>
</wd-calendar>
</ul>
</view>
...
...
@@ -37,11 +37,14 @@ const props = defineProps({
},
});
const
reset
=
()
=>
{
selectedItem
.
value
=
null
;
};
defineExpose
({
reset
});
onMounted
(
async
()
=>
{
getStartDateList
();
});
const
selectItem
=
(
index
,
item
)
=>
{
console
.
log
(
item
,
323
);
const
datePart
=
timestampToDateBasic
(
value
.
value
);
if
(
index
===
selectedItem
.
value
)
{
selectedItem
.
value
=
null
;
...
...
@@ -59,8 +62,7 @@ const getStartDateList = () => {
};
function
handleConfirm
({
value
})
{
const
datePart
=
timestampToDateBasic
(
value
);
console
.
log
(
datePart
,
'datePart---111'
);
selectItem
(
undefined
,
undefined
);
emit
(
'dataParams'
,
null
,
datePart
);
}
function
timestampToDateBasic
(
timestamp
)
{
const
date
=
new
Date
(
timestamp
);
...
...
@@ -69,10 +71,6 @@ function timestampToDateBasic(timestamp) {
const
day
=
date
.
getDate
().
toString
().
padStart
(
2
,
'0'
);
return
`
${
year
}
/
${
month
}
/
${
day
}
`
;
}
const
reset
=
()
=>
{
selectedItem
.
value
=
null
;
};
defineExpose
({
reset
});
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
src/pages/assistingAgriculture/RuralTravel/RuralTravel.vue
View file @
379cb7d4
...
...
@@ -328,15 +328,28 @@ const sortParams = (sortMode) => {
getProd
();
};
// 出发日期
// const dataParams = (item, datePart) => {
// if (item !== undefined) {
// dateType.value = item.key;
// getProd();
// } else if (item === undefined) {
// dateType.value = 8;
// allocateDate.value = datePart;
// getProd();
// }
// };
const
dataParams
=
(
item
,
datePart
)
=>
{
if
(
item
!==
undefined
)
{
if
(
item
)
{
dateType
.
value
=
item
.
key
;
getProd
();
}
else
if
(
item
===
undefined
)
{
}
else
{
dateType
.
value
=
8
;
if
(
datePart
&&
datePart
!==
'NaN/NaN/NaN'
)
{
allocateDate
.
value
=
datePart
;
rotate2
.
value
=
false
;
getProd
();
}
}
};
// 景点
const
placeParams
=
(
item
)
=>
{
...
...
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