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