|
|
@@ -151,12 +151,19 @@
|
|
|
const page = unref(currentPage) || 1
|
|
|
const limit = unref(pageSize) || 10
|
|
|
const searchParamsValue = unref(searchParams)
|
|
|
+ console.log(searchParamsValue.cate_ids, 'cate_ids')
|
|
|
+ const search = {
|
|
|
+ ...searchParamsValue
|
|
|
+ }
|
|
|
+ if (Array.isArray(search.cate_ids) && search.cate_ids.length > 1) {
|
|
|
+ search.cate_ids = search.cate_ids[search.cate_ids.length - 1]
|
|
|
+ }
|
|
|
const {
|
|
|
data
|
|
|
} = await getProduct({
|
|
|
page,
|
|
|
limit,
|
|
|
- ...searchParamsValue
|
|
|
+ ...search
|
|
|
})
|
|
|
// 处理边界条件
|
|
|
if (data && data.list && data.count !== undefined) {
|
|
|
@@ -362,9 +369,8 @@
|
|
|
const nodes = res.data.map((item) => {
|
|
|
return {
|
|
|
value: item.id,
|
|
|
- label: item.rule_name
|
|
|
-,
|
|
|
- leaf:true
|
|
|
+ label: item.rule_name,
|
|
|
+ leaf: true
|
|
|
}
|
|
|
})
|
|
|
resolve(nodes)
|
|
|
@@ -381,7 +387,8 @@
|
|
|
store_id: '',
|
|
|
is_show: '1',
|
|
|
is_del: '0',
|
|
|
- is_verify: '1'
|
|
|
+ is_verify: '1',
|
|
|
+ rule_id: ''
|
|
|
})
|
|
|
const setSearchParams = (data: any) => {
|
|
|
searchParams.value = data
|