Commit 84896f97 by zhangxw

常驻地样式修改

1 parent ce5eaf94
<template>
<div class="info-content">
<div class="searchControll" @click="showTimeDialog = true">
<!-- <div class="searchControll" @click="showTimeDialog = true">
<a class="icon icon-screen-btn"></a>
<span class="screen-text">筛选</span>
</div>
<popup
:show="showTimeDialog"
@btnCancel="showTimeDialog = false"
@btnSave="saveTime"
:position="'bottom'"
>
<div class="time-content">
</div> -->
<div class="tab">
<div class="tabbar">
<span
class="time_btn"
v-for="(item, index) in timeBtnList"
......@@ -20,9 +15,15 @@
>{{ index < 2 ? item : currentDateText }}</span
>
</div>
</div>
<popup
:show="showTimePicker"
@btnCancel="showTimePicker = false"
@btnSave="saveTime"
:position="'bottom'"
>
<van-datetime-picker
style="width: 100%"
v-if="showTimePicker"
:show-toolbar="false"
v-model="currentDate"
:max-date="maxDate"
......@@ -110,7 +111,6 @@ export default defineComponent({
const currentDateText = ref("自定义");
const timeBtnList = ["7天", "30天", "自定义"];
const seledtedItem = ref(0);
const showTimeDialog = ref(false);
const isShowAllList = ref(false);
const residentList = ref([]);
const listScroll = ref(0);
......@@ -176,14 +176,14 @@ export default defineComponent({
return val;
};
const saveTime = () => {
showTimeDialog.value = false;
showTimePicker.value = false;
if (seledtedItem.value === 2) {
currentDateText.value = moment(currentDate.value).format("YYYY-MM");
searchTime.value = [
moment(currentDate.value).format("YYYY-MM-DD HH:mm:ss"),
moment(currentDate.value)
.endOf("month")
.format("YYYY-MM-DD HH:mm:ss"),
moment(currentDate.value).format("YYYY-MM-DD HH:mm:ss"),
];
}
getData();
......@@ -209,6 +209,7 @@ export default defineComponent({
];
showTimePicker.value = false;
currentDateText.value = "自定义";
getData();
break;
case 1:
searchTime.value = [
......@@ -217,6 +218,7 @@ export default defineComponent({
];
currentDateText.value = "自定义";
showTimePicker.value = false;
getData();
break;
case 2:
showTimePicker.value = true;
......@@ -321,7 +323,6 @@ export default defineComponent({
residentList,
selectTime,
searchTime,
showTimeDialog,
timeBtnList,
changey,
listScroll,
......@@ -334,6 +335,37 @@ export default defineComponent({
</script>
<style lang="scss" scoped>
.info-content {
.map-box {
height: calc(100% - 44px) !important;
}
}
.tab {
height: 28px;
background: #fff;
padding: 8px 16px;
.tabbar {
background: #f5f6f7;
border-radius: 6px;
height: 28px;
display: flex;
justify-content: center;
align-items: center;
.time_btn {
height: 24px;
line-height: 24px;
color: #6c737a;
flex: 1;
margin: 0 1px;
text-align: center;
}
.time_btn.active {
background: #fff;
border-radius: 4px;
color: var(--base-color);
}
}
}
.searchControll {
position: fixed;
top: 70px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!