seimin 10 months ago
parent
commit
5feda7a9ec

+ 8 - 3
components/IncidentListFilter.vue

@@ -35,6 +35,8 @@
35
     </view>
35
     </view>
36
     <PyhRdtpicker
36
     <PyhRdtpicker
37
         :show="isShowDate"
37
         :show="isShowDate"
38
+        :start="start"
39
+        :end="end"
38
         @showchange="showDatechange"
40
         @showchange="showDatechange"
39
         :value="searchData.acceptDate"
41
         :value="searchData.acceptDate"
40
         @change="bindDateChange"
42
         @change="bindDateChange"
@@ -81,7 +83,7 @@
81
 <script setup>
83
 <script setup>
82
   import PyhRdtpicker from '@/components/PyhRdtpicker/PyhRdtpicker.vue';
84
   import PyhRdtpicker from '@/components/PyhRdtpicker/PyhRdtpicker.vue';
83
   import { defineEmits, ref, reactive, defineProps } from 'vue'
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
   import { onLoad } from '@dcloudio/uni-app'
87
   import { onLoad } from '@dcloudio/uni-app'
86
   import { useLoginUserStore } from '@/stores/loginUser'
88
   import { useLoginUserStore } from '@/stores/loginUser'
87
   import { api_area, api_incidentcategory } from "@/http/api.js"
89
   import { api_area, api_incidentcategory } from "@/http/api.js"
@@ -102,6 +104,9 @@
102
   // 登记时间
104
   // 登记时间
103
   const isShowDate = ref(false)
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
   const tabs = reactive([
110
   const tabs = reactive([
106
     // { name: '全部事件', value: 'all' },
111
     // { name: '全部事件', value: 'all' },
107
     { name: '待我处理', value: 'todoingAll' },
112
     { name: '待我处理', value: 'todoingAll' },
@@ -121,7 +126,7 @@
121
     selected: 'todoingAll',
126
     selected: 'todoingAll',
122
     area: {id: 0, area: '全部'},
127
     area: {id: 0, area: '全部'},
123
     category: {id: 0, category: '全部'},
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
     searchData.selected = 'todoingAll';
163
     searchData.selected = 'todoingAll';
159
     searchData.area = {id: 0, area: '全部'};
164
     searchData.area = {id: 0, area: '全部'};
160
     searchData.category = {id: 0, category: '全部'};
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
     console.log(searchData.acceptDate)
167
     console.log(searchData.acceptDate)
163
   }
168
   }
164
   
169
   

+ 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.4.163", //请求的目标域名
65
+                    "target" : "http://192.168.3.111", //请求的目标域名
66
                     "changeOrigin" : true, //是否跨域
66
                     "changeOrigin" : true, //是否跨域
67
                     "secure" : false
67
                     "secure" : false
68
                 }
68
                 }

+ 1 - 1
pages/buildIncident/buildIncident.vue

@@ -401,7 +401,7 @@
401
         incidentData,
401
         incidentData,
402
         incidentBuildStore.incidentBuild.data,
402
         incidentBuildStore.incidentBuild.data,
403
         {
403
         {
404
-          priority: incidentBuildStore.incidentBuild.data.category ? incidentBuildStore.incidentBuild.data.category.priority : undefined,
404
+          priority: incidentBuildStore.incidentBuild.data.category ? (incidentBuildStore.incidentBuild.data.category.priority ? incidentBuildStore.incidentBuild.data.category.priority.id : undefined) : undefined,
405
           description: incidentBuildStore.incidentBuild.data.category ? incidentBuildStore.incidentBuild.data.category.mutiCategory : undefined,
405
           description: incidentBuildStore.incidentBuild.data.category ? incidentBuildStore.incidentBuild.data.category.mutiCategory : undefined,
406
         },
406
         },
407
       );
407
       );

+ 2 - 2
pages/incidentList/incidentList.vue

@@ -66,7 +66,7 @@
66
 <script setup>
66
 <script setup>
67
   import IncidentListFilter from '@/components/IncidentListFilter.vue';
67
   import IncidentListFilter from '@/components/IncidentListFilter.vue';
68
   import IncidentAttachment from '@/components/IncidentAttachment.vue';
68
   import IncidentAttachment from '@/components/IncidentAttachment.vue';
69
-  import { startOfDay, endOfDay, format, startOfWeek, endOfWeek, add } from 'date-fns'
69
+  import { startOfDay, endOfDay, format, add } from 'date-fns'
70
   import { ref, reactive, computed } from 'vue'
70
   import { ref, reactive, computed } from 'vue'
71
   import { onLoad, onPullDownRefresh, onReachBottom, onTabItemTap } from '@dcloudio/uni-app'
71
   import { onLoad, onPullDownRefresh, onReachBottom, onTabItemTap } from '@dcloudio/uni-app'
72
   import { api_getDictionary, api_incident, api_incident_count, api_incidentTask } from "@/http/api.js"
72
   import { api_getDictionary, api_incident, api_incident_count, api_incidentTask } from "@/http/api.js"
@@ -131,7 +131,7 @@
131
       selected: 'todoingAll',
131
       selected: 'todoingAll',
132
       area: {id: 0, area: '全部'},
132
       area: {id: 0, area: '全部'},
133
       category: {id: 0, category: '全部'},
133
       category: {id: 0, category: '全部'},
134
-      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')],
134
+      acceptDate: [],
135
     },//筛选框数据
135
     },//筛选框数据
136
   })
136
   })
137
 
137