Explorar el Código

fix(blockingData): 修复航站楼字段命名错误并调整默认日期范围

将航站楼相关字段从areaId/areaName统一改为terminalId/terminalName以保持一致性
修改默认日期范围从当月起始改为当年起始
huoyi hace 1 mes
padre
commit
043dbec7f4

+ 3 - 2
src/views/blockingData/blockingDataScreen/index.vue

@@ -214,7 +214,7 @@ function getBrigadeOptions() {
214 214
 }
215 215
 const setDefaultDateRange = () => {
216 216
   const now = new Date()
217
-  const startOfMonth = new Date(now.getFullYear(), now.getMonth(), 1)
217
+  const startOfYear = new Date(now.getFullYear(), 0, 1, 0, 0, 0)
218 218
   const endOfToday = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 23, 59, 59)
219 219
 
220 220
   // 格式化日期为 YYYY-MM-DD HH:mm:ss 格式
@@ -228,7 +228,7 @@ const setDefaultDateRange = () => {
228 228
     return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
229 229
   }
230 230
 
231
-  filterParams.dateRange = [formatDate(startOfMonth), formatDate(endOfToday)]
231
+  filterParams.dateRange = [formatDate(startOfYear), formatDate(endOfToday)]
232 232
 }
233 233
 
234 234
 // 处理筛选
@@ -301,6 +301,7 @@ onMounted(() => {
301 301
   align-items: center;
302 302
   gap: 20px;
303 303
   margin-bottom: 15px;
304
+  flex-wrap: wrap;
304 305
 
305 306
   &:last-child {
306 307
     margin-bottom: 0;

+ 7 - 7
src/views/blockingData/missedInspectionList/index.vue

@@ -112,8 +112,8 @@
112 112
             </el-form-item>
113 113
           </el-col>
114 114
           <el-col :span="12">
115
-            <el-form-item label="航站楼" prop="areaId">
116
-              <el-select v-model="form.areaId" placeholder="请选择航站楼" filterable style="width: 100%">
115
+            <el-form-item label="航站楼" prop="terminalId">
116
+              <el-select v-model="form.terminalId" placeholder="请选择航站楼" filterable style="width: 100%">
117 117
                 <el-option v-for="item in channelOptions" :key="item.id" :label="item.name" :value="item.id" />
118 118
               </el-select>
119 119
             </el-form-item>
@@ -395,7 +395,7 @@ const form = reactive({})
395 395
 // 表单校验
396 396
 const rules = {
397 397
   brigadeId: [{ required: true, message: '大队不能为空', trigger: 'change' }],
398
-  areaId: [{ required: true, message: '航站楼不能为空', trigger: 'change' }],
398
+  terminalId: [{ required: true, message: '航站楼不能为空', trigger: 'change' }],
399 399
   reviewedUserId: [{ required: true, message: '被回查人不能为空', trigger: 'change' }],
400 400
   reviewDate: [{ required: true, message: '回查日期不能为空', trigger: 'change' }],
401 401
   missCheckTime: [{ required: true, message: '漏检时间不能为空', trigger: 'change' }],
@@ -553,8 +553,8 @@ function reset() {
553 553
   Object.assign(form, {
554 554
     id: null,
555 555
     brigadeId: null,
556
-    areaId: null,
557
-    areaName: null,
556
+    terminalId: null,
557
+    terminalName: null,
558 558
     reviewedUserId: null,
559 559
     reviewDate: null,
560 560
     missCheckTime: null,
@@ -633,10 +633,10 @@ function submitForm() {
633 633
       }
634 634
 
635 635
       // 处理航站楼ID和名称映射
636
-      if (form.areaId) {
636
+      if (form.terminalId) {
637 637
        
638 638
         const area = channelOptions.value.find(item => item.id === form.areaId)
639
-        form.areaName = area ? area.name : null
639
+        form.terminalName = area ? area.name : null
640 640
       }
641 641
 
642 642
       // 处理被回查人ID和名称映射