|
@@ -35,6 +35,8 @@
|
35
|
35
|
</view>
|
36
|
36
|
<PyhRdtpicker
|
37
|
37
|
:show="isShowDate"
|
|
38
|
+ :start="start"
|
|
39
|
+ :end="end"
|
38
|
40
|
@showchange="showDatechange"
|
39
|
41
|
:value="searchData.acceptDate"
|
40
|
42
|
@change="bindDateChange"
|
|
@@ -81,7 +83,7 @@
|
81
|
83
|
<script setup>
|
82
|
84
|
import PyhRdtpicker from '@/components/PyhRdtpicker/PyhRdtpicker.vue';
|
83
|
85
|
import { defineEmits, ref, reactive, defineProps } from 'vue'
|
84
|
|
- import { startOfDay, endOfDay, format, startOfWeek, endOfWeek, add } from 'date-fns'
|
|
86
|
+ import { startOfYear, endOfYear, format, add } from 'date-fns'
|
85
|
87
|
import { onLoad } from '@dcloudio/uni-app'
|
86
|
88
|
import { useLoginUserStore } from '@/stores/loginUser'
|
87
|
89
|
import { api_area, api_incidentcategory } from "@/http/api.js"
|
|
@@ -102,6 +104,9 @@
|
102
|
104
|
// 登记时间
|
103
|
105
|
const isShowDate = ref(false)
|
104
|
106
|
|
|
107
|
+ const start = ref(format(startOfYear(add(new Date(), { years: -5})), 'yyyy-MM-dd'));
|
|
108
|
+ const end = ref(format(endOfYear(add(new Date(), { years: 0})), 'yyyy-MM-dd'));
|
|
109
|
+
|
105
|
110
|
const tabs = reactive([
|
106
|
111
|
// { name: '全部事件', value: 'all' },
|
107
|
112
|
{ name: '待我处理', value: 'todoingAll' },
|
|
@@ -121,7 +126,7 @@
|
121
|
126
|
selected: 'todoingAll',
|
122
|
127
|
area: {id: 0, area: '全部'},
|
123
|
128
|
category: {id: 0, category: '全部'},
|
124
|
|
- acceptDate: [format(startOfWeek(add(new Date(), { weeks: -1}), { weekStartsOn: 1 }), 'yyyy-MM-dd'), format(endOfWeek(add(new Date(), { weeks: -1}), { weekStartsOn: 1 }), 'yyyy-MM-dd')],
|
|
129
|
+ acceptDate: [],
|
125
|
130
|
})
|
126
|
131
|
|
127
|
132
|
// 显示登记时间
|
|
@@ -158,7 +163,7 @@
|
158
|
163
|
searchData.selected = 'todoingAll';
|
159
|
164
|
searchData.area = {id: 0, area: '全部'};
|
160
|
165
|
searchData.category = {id: 0, category: '全部'};
|
161
|
|
- searchData.acceptDate = [format(startOfWeek(add(new Date(), { weeks: -1}), { weekStartsOn: 1 }), 'yyyy-MM-dd'), format(endOfWeek(add(new Date(), { weeks: -1}), { weekStartsOn: 1 }), 'yyyy-MM-dd')];
|
|
166
|
+ searchData.acceptDate = [];
|
162
|
167
|
console.log(searchData.acceptDate)
|
163
|
168
|
}
|
164
|
169
|
|