Przeglądaj źródła

fix(blockingDataScreen): 修复漏检物品选择清空时未重置参数的问题

添加漏检物品选择器的清空事件处理,当清空选择时重置相关参数。同时移除已注释的查询和重置按钮代码。
huoyi 1 miesiąc temu
rodzic
commit
d975c6ba32
1 zmienionych plików z 17 dodań i 3 usunięć
  1. 17 3
      src/views/blockingData/blockingDataScreen/index.vue

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

@@ -38,7 +38,7 @@
38 38
           <span class="filter-label">漏检物品:</span>
39 39
           <el-tree-select v-model="filterParams.missCheckItem" :data="missedItemOptions"
40 40
             :props="{ value: 'id', label: 'name', children: 'children', disabled: data => data.children && data.children.length > 0 }"
41
-            value-key="id" placeholder="请选择漏检物品" check-strictly style="width: 200px" />
41
+            value-key="id" placeholder="请选择漏检物品" check-strictly style="width: 200px" clearable @change="missCheckItemChange"/>
42 42
         </div>
43 43
 
44 44
         <div class="filter-item">
@@ -47,10 +47,10 @@
47 47
             <el-option v-for="item in brigadeOptions" :key="item.value" :label="item.label" :value="item.value" />
48 48
           </el-select>
49 49
         </div>
50
-        <div class="filter-actions">
50
+        <!-- <div class="filter-actions">
51 51
           <el-button type="primary" @click="handleFilter">查询</el-button>
52 52
           <el-button @click="resetFilter">重置</el-button>
53
-        </div>
53
+        </div> -->
54 54
       </div>
55 55
 
56 56
 
@@ -131,9 +131,23 @@ function getMissedItemOptions() {
131 131
   })
132 132
 }
133 133
 const terminalChange = (value) => {
134
+  if(!value){
135
+    filterParams.terminal = ''
136
+    filterParams.terminalId = ''
137
+    return;
138
+  }
139
+
134 140
   filterParams.terminal = terminalOptions.value.find(item => item.value === value).label
135 141
 }
136 142
 
143
+const missCheckItemChange = (value) => { 
144
+  if(!value){
145
+    filterParams.missCheckItem = ''
146
+    return;
147
+
148
+  }
149
+}
150
+
137 151
 // 树形数据处理函数
138 152
 function handleTree(data, id, parentId) {
139 153
   const result = []