|
|
@ -68,7 +68,7 @@ |
|
|
|
:options="categoryList" |
|
|
|
clearable |
|
|
|
:props="{ |
|
|
|
checkStrictly: true, |
|
|
|
checkStrictly: false, |
|
|
|
expandTrigger: 'hover', |
|
|
|
label:'categoryName', |
|
|
|
value:'id', |
|
|
@ -304,6 +304,7 @@ |
|
|
|
<script> |
|
|
|
import { getClassify } from '@/api/commodity' |
|
|
|
import { getGroups, getProducts, activitySave, checkPay } from '@/api/active' |
|
|
|
import { getBusinessId } from '@/utils/auth' |
|
|
|
|
|
|
|
export default { |
|
|
|
props: { |
|
|
@ -540,9 +541,21 @@ export default { |
|
|
|
}, |
|
|
|
// 初始化查询所有分类 |
|
|
|
async queryAllCategory() { |
|
|
|
const res = await getClassify() |
|
|
|
this.categoryList = res.data |
|
|
|
const res = await getClassify({}, {project : "" + getBusinessId()}) |
|
|
|
this.categoryList = this.filterList(res.data) |
|
|
|
}, |
|
|
|
|
|
|
|
filterList(data) { |
|
|
|
data.forEach(i => { |
|
|
|
if (i.childs.length) { |
|
|
|
this.filterList(i.childs) |
|
|
|
} else { |
|
|
|
i.childs = null |
|
|
|
} |
|
|
|
}) |
|
|
|
return data |
|
|
|
}, |
|
|
|
|
|
|
|
// 重置table和input内容 |
|
|
|
reset() { |
|
|
|
this.inputTableData = [] |
|
|
|