Commit 07b5fc75b458b2111c8df8740e41662c6c1d2cdd
1 parent
8d8122f7
pref:优化设备列表产品筛选传数组 地理位置产品筛选传数组 产品跳转筛选传数组
Showing
1 changed file
with
11 additions
and
2 deletions
@@ -234,10 +234,14 @@ | @@ -234,10 +234,14 @@ | ||
234 | columns, | 234 | columns, |
235 | beforeFetch: (params) => { | 235 | beforeFetch: (params) => { |
236 | const { deviceProfileId } = params; | 236 | const { deviceProfileId } = params; |
237 | + console.log(deviceProfileId); | ||
237 | const obj = { | 238 | const obj = { |
238 | ...params, | 239 | ...params, |
239 | ...{ | 240 | ...{ |
240 | - deviceProfileIds: deviceProfileId === undefined ? null : [deviceProfileId], | 241 | + deviceProfileIds: |
242 | + deviceProfileId === undefined || deviceProfileId === null || deviceProfileId == '' | ||
243 | + ? null | ||
244 | + : [deviceProfileId], | ||
241 | }, | 245 | }, |
242 | }; | 246 | }; |
243 | delete obj.deviceProfileId; | 247 | delete obj.deviceProfileId; |
@@ -293,7 +297,12 @@ | @@ -293,7 +297,12 @@ | ||
293 | const { items, total } = await devicePage({ | 297 | const { items, total } = await devicePage({ |
294 | page: 1, | 298 | page: 1, |
295 | pageSize: count.value === 0 ? 10 : count.value, | 299 | pageSize: count.value === 0 ? 10 : count.value, |
296 | - deviceProfileIds: [deviceProfileId.value], | 300 | + deviceProfileIds: |
301 | + deviceProfileId.value === undefined || | ||
302 | + deviceProfileId.value === null || | ||
303 | + deviceProfileId.value == '' | ||
304 | + ? null | ||
305 | + : [deviceProfileId.value], | ||
297 | }); | 306 | }); |
298 | setPagination({ total }); | 307 | setPagination({ total }); |
299 | nextTick(() => { | 308 | nextTick(() => { |