|
|
|
@ -279,7 +279,7 @@ export default { |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
async getTable(n,i){ |
|
|
|
|
let res = await this.$post(`${this.api.getIdQueryTable}?categoryId=${n.id}&showName=&pageNum=1&pageSize=10000&updateTime=`) |
|
|
|
|
let res = await this.$post(`${this.api.originalListById}?categoryId=${n.id}&showName=&pageNum=1&pageSize=10000`) |
|
|
|
|
res.list.map(n => { |
|
|
|
|
n.label = n.showName |
|
|
|
|
n.id = String(n.id) |
|
|
|
@ -292,8 +292,21 @@ export default { |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
batchImport(){ |
|
|
|
|
let list = JSON.parse(JSON.stringify(this.typeList)) |
|
|
|
|
list.map((n,i) => { |
|
|
|
|
this.$post(this.api.originalList).then(res => { |
|
|
|
|
res.map(n => { |
|
|
|
|
n.id = String(n.id) |
|
|
|
|
n.label = n.categoryName |
|
|
|
|
n.children.map(n => { |
|
|
|
|
n.id = String(n.id) |
|
|
|
|
n.label = n.categoryName |
|
|
|
|
n.children.map(n => { |
|
|
|
|
n.id = String(n.id) |
|
|
|
|
n.label = n.categoryName |
|
|
|
|
n.isThird = true |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
res.map((n,i) => { |
|
|
|
|
if(n.children.length){ |
|
|
|
|
n.children.map(n => { |
|
|
|
|
if(n.children.length){ |
|
|
|
@ -307,11 +320,11 @@ export default { |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
setTimeout(() => { |
|
|
|
|
this.importTypeList = list |
|
|
|
|
console.log(11,this.importTypeList) |
|
|
|
|
this.importTypeList = res |
|
|
|
|
this.getFields() |
|
|
|
|
},500) |
|
|
|
|
this.importVisible = true |
|
|
|
|
}).catch(res => {}) |
|
|
|
|
}, |
|
|
|
|
getFields(){ |
|
|
|
|
this.$get(`${this.api.previewData}?tableName=${this.tableName}&tableId=${this.curId}`).then(res => { |
|
|
|
|