From 95b1b0f00f2c4dbbcf0f8666c10f334329fabdb5 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Wed, 8 Dec 2021 14:15:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=9E=B6=E6=9E=84=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/data/Framework.vue | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) 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 })