|
|
@ -217,6 +217,7 @@ export default { |
|
|
|
this.getType() |
|
|
|
this.getType() |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
|
|
|
|
// 获取分类 |
|
|
|
getType(){ |
|
|
|
getType(){ |
|
|
|
this.$post(this.api.getTableByClassification).then(res => { |
|
|
|
this.$post(this.api.getTableByClassification).then(res => { |
|
|
|
// 递归赋值,同时添加层级标识 |
|
|
|
// 递归赋值,同时添加层级标识 |
|
|
@ -246,7 +247,7 @@ export default { |
|
|
|
this.$refs.type.setCurrentKey(this.categoryId) |
|
|
|
this.$refs.type.setCurrentKey(this.categoryId) |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
this.addEd = false |
|
|
|
this.addEd = false // 要重置为false |
|
|
|
this.getData() |
|
|
|
this.getData() |
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(res => {}) |
|
|
|
}, |
|
|
|
}, |
|
|
@ -292,6 +293,7 @@ export default { |
|
|
|
this.id = row.data.id |
|
|
|
this.id = row.data.id |
|
|
|
this.categoryName = row.data.categoryName |
|
|
|
this.categoryName = row.data.categoryName |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
// 删除分类 |
|
|
|
delType(row){ |
|
|
|
delType(row){ |
|
|
|
// 该分类下的数据表已存在于产品管理中,是否确认删除? |
|
|
|
// 该分类下的数据表已存在于产品管理中,是否确认删除? |
|
|
|
this.$confirm('确定要删除吗?', '提示', { |
|
|
|
this.$confirm('确定要删除吗?', '提示', { |
|
|
@ -304,6 +306,7 @@ export default { |
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(() => {}) |
|
|
|
}).catch(() => {}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
// 保存分类 |
|
|
|
confirmType(){ |
|
|
|
confirmType(){ |
|
|
|
if(this.submited) return false // 提交防抖标识 |
|
|
|
if(this.submited) return false // 提交防抖标识 |
|
|
|
this.submited = true |
|
|
|
this.submited = true |
|
|
@ -711,12 +714,7 @@ export default { |
|
|
|
}) |
|
|
|
}) |
|
|
|
} else { // 保存表 |
|
|
|
} else { // 保存表 |
|
|
|
this.$post(this.api.saveTable, tableIds).then(res => { |
|
|
|
this.$post(this.api.saveTable, tableIds).then(res => { |
|
|
|
this.$message.success('导入成功') |
|
|
|
this.saveSuccess() |
|
|
|
this.getData() |
|
|
|
|
|
|
|
this.importVisible = false |
|
|
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
|
|
|
this.submited = false |
|
|
|
|
|
|
|
},1000) |
|
|
|
|
|
|
|
}).catch(res => { |
|
|
|
}).catch(res => { |
|
|
|
this.submited = false |
|
|
|
this.submited = false |
|
|
|
}) |
|
|
|
}) |
|
|
|