From a2299a6d4a6f99e9c11132138f5d3e9ec68f03ea Mon Sep 17 00:00:00 2001 From: jiangping <jp@doumee.com> Date: 星期五, 06 六月 2025 19:19:34 +0800 Subject: [PATCH] 开发更新 --- admin/src/views/business/areas.vue | 19 ++++++++++++++----- 1 files changed, 14 insertions(+), 5 deletions(-) diff --git a/admin/src/views/business/areas.vue b/admin/src/views/business/areas.vue index 3d05d52..d308427 100644 --- a/admin/src/views/business/areas.vue +++ b/admin/src/views/business/areas.vue @@ -17,8 +17,11 @@ @selection-change="handleSelectionChange" > <el-table-column prop="name" label="鍦板尯鍚嶇О" min-width="100px"></el-table-column> + <el-table-column prop="code" label="琛屾斂鍖轰唬鐮�" align="center" min-width="140px"></el-table-column> <el-table-column prop="createDate" label="鍒涘缓鏃堕棿" align="center" min-width="140px"></el-table-column> +<!-- <el-table-column prop="sortnum" label="鎺掑簭鐮�" align="center" min-width="140px"></el-table-column> +--> <el-table-column v-if="containPermissions(['business:areas:update', 'business:areas:create', 'business:areas:delete'])" label="鎿嶄綔" @@ -80,13 +83,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 +104,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 +141,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