From a0a1c206612de9a3e9d64f3d45564c0ff03f93f6 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期四, 02 一月 2025 15:22:13 +0800
Subject: [PATCH] 环境
---
admin/src/views/business/areas.vue | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/admin/src/views/business/areas.vue b/admin/src/views/business/areas.vue
index 3d05d52..0908620 100644
--- a/admin/src/views/business/areas.vue
+++ b/admin/src/views/business/areas.vue
@@ -80,13 +80,17 @@
this.tableData.list = this.dataAddBool(data)
})
.catch(e => {
- this.$message.error(e)
+ console.log(e)
+ this.$tip.error('鎿嶄綔澶辫触')
})
.finally(() => {
this.isWorking.search = false
})
},
dataAddBool(array) {
+ if(array==null){
+ return []
+ }
array.forEach(item => {
item.hasChildren = item.type != 2
// item.childList = item.childList && this.dataAddBool(item.childList)
@@ -97,10 +101,11 @@
this.treeMaps.set(tree.id, { tree, treeNode, resolve })
listByParentId({ parentId: tree.id, type: tree.type + 1 })
.then(data => {
- resolve(this.dataAddBool(data||[]))
+ resolve(this.dataAddBool(data || []))
})
.catch(e => {
- this.$message.error(e)
+ console.log(e)
+ this.$tip.error('鎿嶄綔澶辫触')
})
.finally(() => {
this.isWorking.search = false
@@ -133,11 +138,12 @@
this.isWorking.delete = true
this.api.deleteById(row[this.configData['field.id']])
.then(() => {
- this.$message.success('鍒犻櫎鎴愬姛')
+ this.$tip.apiSuccess('鍒犻櫎鎴愬姛')
this.refreshLoadTree(row.parentId)
})
.catch(e => {
- this.$message.error(e)
+ console.log(e)
+ this.$tip.error('鎿嶄綔澶辫触')
})
.finally(() => {
this.isWorking.delete = false
--
Gitblit v1.9.3