mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-11 03:46:44 +08:00
案例和课程edit treeList
This commit is contained in:
@@ -1013,10 +1013,12 @@ export default {
|
||||
async loadTypeData() {
|
||||
let $this = this;
|
||||
try {
|
||||
const { result, status } = await apiType.tree(1);
|
||||
if (status === 200) {
|
||||
const result= await apiType.treeList(1,28,1);
|
||||
const {data:{ records},code} = result
|
||||
|
||||
if (code === 200) {
|
||||
let tree = [];
|
||||
result.forEach((item, index) => {
|
||||
records.forEach((item, index) => {
|
||||
let newItem = {
|
||||
type: 11,
|
||||
id: item.id,
|
||||
@@ -1029,7 +1031,7 @@ export default {
|
||||
//增加死数据
|
||||
item.children.push({
|
||||
type: 12,
|
||||
id: item.id + index,
|
||||
id: item.id * (index + 200),
|
||||
name: '线上品牌系列课程',
|
||||
children: [],
|
||||
checked: false,
|
||||
@@ -1061,6 +1063,8 @@ export default {
|
||||
})
|
||||
}
|
||||
$this.oneList.push(newItem);
|
||||
console.log(newItem);
|
||||
|
||||
|
||||
});
|
||||
this.loadLocalFilters();
|
||||
|
||||
Reference in New Issue
Block a user