ソースを参照

Merge branch 'blockingData' into dev

huoyi 1 ヶ月 前
コミット
0dea1ee751
共有2 個のファイルを変更した13 個の追加12 個の削除を含む
  1. 4 3
      src/views/blockingData/blockingDataScreen/index.vue
  2. 9 9
      src/views/blockingData/missedInspectionList/index.vue

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

@@ -37,7 +37,7 @@
37 37
         <div class="filter-item">
38 38
           <span class="filter-label">漏检物品:</span>
39 39
           <el-tree-select v-model="filterParams.missCheckItem" :data="missedItemOptions"
40
-            :props="{ value: 'id', label: 'name', children: 'children', disabled: data => data.children && data.children.length > 0 }"
40
+            :props="{ value: 'name', label: 'name', children: 'children', disabled: data => data.children && data.children.length > 0 }"
41 41
             value-key="id" placeholder="请选择漏检物品" check-strictly style="width: 200px" clearable @change="missCheckItemChange"/>
42 42
         </div>
43 43
 
@@ -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;

+ 9 - 9
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) {
637
-       
638
-        const area = channelOptions.value.find(item => item.id === form.areaId)
639
-        form.areaName = area ? area.name : null
636
+      if (form.terminalId) {
637
+      
638
+        const area = channelOptions.value.find(item => item.id === form.terminalId)
639
+        form.terminalName = area ? area.name : null
640 640
       }
641 641
 
642 642
       // 处理被回查人ID和名称映射