|
|
|
@ -394,7 +394,7 @@ export default { |
|
|
|
|
}, |
|
|
|
|
// 编辑产品表名 |
|
|
|
|
editName(row){ |
|
|
|
|
this.curRow = JSON.parse(JSON.stringify(row)) |
|
|
|
|
this.curRow = JSON.parse(JSON.stringify(row)) // 深拷贝当前行数据 |
|
|
|
|
this.nameVisible = true |
|
|
|
|
}, |
|
|
|
|
// 保存产品表名 |
|
|
|
@ -410,7 +410,7 @@ export default { |
|
|
|
|
}, |
|
|
|
|
// 编辑产品表头 |
|
|
|
|
editHead(row){ |
|
|
|
|
this.curRow = JSON.parse(JSON.stringify(row)) |
|
|
|
|
this.curRow = JSON.parse(JSON.stringify(row)) // 深拷贝当前行数据 |
|
|
|
|
this.preview(row, 1) |
|
|
|
|
this.editIndex++ // 强刷新表 |
|
|
|
|
this.headVisible = true |
|
|
|
@ -477,16 +477,15 @@ export default { |
|
|
|
|
loadType(e){ |
|
|
|
|
clearTimeout(this.typeTimer) |
|
|
|
|
let typeTree = this.$refs.typeTreeWrap |
|
|
|
|
// 防抖 |
|
|
|
|
this.typeTimer = setTimeout(() => { |
|
|
|
|
this.typeTreeScrollTop = typeTree.scrollTop - this.typeTreeScrollTop |
|
|
|
|
// 如果已经滚动到底部,则加载下面的数据 |
|
|
|
|
if(this.typeTreeScrollTop > 0 && typeTree.clientHeight + typeTree.scrollTop == typeTree.scrollHeight){ |
|
|
|
|
if(this.typeTreeScrollTop > 0 && typeTree.scrollHeight - (typeTree.clientHeight + parseInt(typeTree.scrollTop)) < 10){ |
|
|
|
|
this.getMoreTable(this.importTypeList,this.curExpand) |
|
|
|
|
setTimeout(() => { |
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
Promise.all(this.tablePromises).then(_ => { |
|
|
|
|
this.renderChecked() |
|
|
|
|
}) |
|
|
|
|
},300) |
|
|
|
|
} |
|
|
|
|
},50) |
|
|
|
|
}, |
|
|
|
@ -569,8 +568,6 @@ export default { |
|
|
|
|
this.importTypeList = res |
|
|
|
|
this.importLoading.close() |
|
|
|
|
this.importVisible = true |
|
|
|
|
console.log('全部分类:', res) |
|
|
|
|
console.log('该分类下已选的表id:', this.defaultTypeChecked) |
|
|
|
|
}) |
|
|
|
|
}).catch(res => { |
|
|
|
|
this.importLoading.close() |
|
|
|
|