|
@@ -142,12 +142,20 @@ function handleReportPublishCancle(item){
|
|
|
// 日期筛选
|
|
|
const calendarMinDate=new Date(2010,0,1)
|
|
|
const showCalendar=ref(false)
|
|
|
+const calendarIns=ref(null)
|
|
|
function handleCalendarChange(e){
|
|
|
listState.StartDate=moment(e[0]).format('YYYY-MM-DD')
|
|
|
listState.EndDate=moment(e[1]).format('YYYY-MM-DD')
|
|
|
refreshList()
|
|
|
showCalendar.value=false
|
|
|
}
|
|
|
+function handleResetCalendar(){
|
|
|
+ listState.StartDate=''
|
|
|
+ listState.EndDate=''
|
|
|
+ calendarIns.value.reset()
|
|
|
+ refreshList()
|
|
|
+ showCalendar.value=false
|
|
|
+}
|
|
|
|
|
|
// 分类筛选
|
|
|
function handleConfirmClassify({firstClassify,secondClassify}){
|
|
@@ -232,6 +240,13 @@ const reportStatusOpt=[
|
|
|
value:1
|
|
|
}
|
|
|
]
|
|
|
+function handleSelectReportStatus(item){
|
|
|
+ if(listState.MsgIsSend==item.value){
|
|
|
+ listState.MsgIsSend=''
|
|
|
+ }else{
|
|
|
+ listState.MsgIsSend=item.value
|
|
|
+ }
|
|
|
+}
|
|
|
function handleSelectFrequency(item){
|
|
|
if(listState.Frequency==item.value){
|
|
|
listState.Frequency=''
|
|
@@ -326,7 +341,7 @@ async function goSearch(){
|
|
|
:class="['status-item',listState.MsgIsSend===item.value?'active':'']"
|
|
|
v-for="item in reportStatusOpt"
|
|
|
:key="item.value"
|
|
|
- @click="listState.MsgIsSend=item.value"
|
|
|
+ @click="handleSelectReportStatus(item)"
|
|
|
>{{item.label}}</li>
|
|
|
</ul>
|
|
|
|
|
@@ -415,13 +430,21 @@ async function goSearch(){
|
|
|
round
|
|
|
>
|
|
|
<van-calendar
|
|
|
+ ref="calendarIns"
|
|
|
:poppable="false"
|
|
|
type="range"
|
|
|
allow-same-day
|
|
|
:min-date="calendarMinDate"
|
|
|
@confirm="handleCalendarChange"
|
|
|
:style="{ height: '500px' }"
|
|
|
- />
|
|
|
+ >
|
|
|
+ <template #title>
|
|
|
+ <div style="position: relative;">
|
|
|
+ <span style="color:#666;position: absolute;left:16px" @click="handleResetCalendar">重置</span>
|
|
|
+ <span>日期选择</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </van-calendar>
|
|
|
</van-popup>
|
|
|
|
|
|
</template>
|