seimin 10 månader sedan
förälder
incheckning
ba7b3ce5c5
2 ändrade filer med 8 tillägg och 1 borttagningar
  1. 1 1
      manifest.json
  2. 7 0
      pages/incidentList/incidentList.vue

+ 1 - 1
manifest.json

@@ -62,7 +62,7 @@
62
         "devServer" : {
62
         "devServer" : {
63
             "proxy" : {
63
             "proxy" : {
64
                 "/service" : {
64
                 "/service" : {
65
-                    "target" : "http://192.168.3.111", //请求的目标域名
65
+                    "target" : "http://192.168.4.163", //请求的目标域名
66
                     "changeOrigin" : true, //是否跨域
66
                     "changeOrigin" : true, //是否跨域
67
                     "secure" : false
67
                     "secure" : false
68
                 }
68
                 }

+ 7 - 0
pages/incidentList/incidentList.vue

@@ -60,6 +60,7 @@
60
 <script setup>
60
 <script setup>
61
   import IncidentListFilter from '@/components/IncidentListFilter.vue';
61
   import IncidentListFilter from '@/components/IncidentListFilter.vue';
62
   import IncidentAttachment from '@/components/IncidentAttachment.vue';
62
   import IncidentAttachment from '@/components/IncidentAttachment.vue';
63
+  import { startOfDay, endOfDay, format, startOfWeek, endOfWeek, add } from 'date-fns'
63
   import { ref, reactive, computed } from 'vue'
64
   import { ref, reactive, computed } from 'vue'
64
   import { onLoad, onPullDownRefresh, onReachBottom, onTabItemTap } from '@dcloudio/uni-app'
65
   import { onLoad, onPullDownRefresh, onReachBottom, onTabItemTap } from '@dcloudio/uni-app'
65
   import { api_getDictionary, api_incident, api_incident_count, api_incidentTask } from "@/http/api.js"
66
   import { api_getDictionary, api_incident, api_incident_count, api_incidentTask } from "@/http/api.js"
@@ -119,6 +120,7 @@
119
       selected: 'todoingAll',
120
       selected: 'todoingAll',
120
       area: {id: 0, area: '全部'},
121
       area: {id: 0, area: '全部'},
121
       category: {id: 0, category: '全部'},
122
       category: {id: 0, category: '全部'},
123
+      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')],
122
     },//筛选框数据
124
     },//筛选框数据
123
   })
125
   })
124
 
126
 
@@ -280,6 +282,11 @@
280
     if(dataInfo.evtFilter && dataInfo.evtFilter.category && dataInfo.evtFilter.category.id){
282
     if(dataInfo.evtFilter && dataInfo.evtFilter.category && dataInfo.evtFilter.category.id){
281
       postData.incident.levelCategory = { id: dataInfo.evtFilter.category.id };
283
       postData.incident.levelCategory = { id: dataInfo.evtFilter.category.id };
282
     }
284
     }
285
+    
286
+    if(dataInfo.evtFilter && Array.isArray(dataInfo.evtFilter.acceptDate) && dataInfo.evtFilter.acceptDate.length){
287
+      postData.incident.acceptDate = format(startOfDay(new Date(dataInfo.evtFilter.acceptDate[0])), 'yyyy-MM-dd HH:mm:ss');
288
+      postData.incident.acceptDateEnd = format(endOfDay(dataInfo.evtFilter.acceptDate[1]), 'yyyy-MM-dd HH:mm:ss');
289
+    }
283
 
290
 
284
     if(dataInfo.evtFilter && dataInfo.evtFilter.area && dataInfo.evtFilter.area.id){
291
     if(dataInfo.evtFilter && dataInfo.evtFilter.area && dataInfo.evtFilter.area.id){
285
       postData.incident.area = dataInfo.evtFilter.area
292
       postData.incident.area = dataInfo.evtFilter.area