diff --git a/src/views/accountCenter/butie/butieRecordsTab/index.vue b/src/views/accountCenter/butie/butieRecordsTab/index.vue index 446a0974..1c5a9485 100644 --- a/src/views/accountCenter/butie/butieRecordsTab/index.vue +++ b/src/views/accountCenter/butie/butieRecordsTab/index.vue @@ -585,7 +585,9 @@ this.tableListData1.push(response.data.sumVO) } this.loading = false; - }); + }).catch(() => { + this.loading = false; + }); }, /** 撤销按钮操作 */ handleRepeal1(row) { @@ -640,6 +642,8 @@ this.tableListData2.push(response.data.sumVO) } this.loading = false; + }).catch(() => { + this.loading = false; }); }, @@ -660,6 +664,8 @@ this.tableListData3.push(response.data.sumVO) } this.loading = false; + }).catch(() => { + this.loading = false; }); }, @@ -680,7 +686,9 @@ this.tableListData4.push(response.data.totalLine) } this.loading = false; - }); + }).catch(() => { + this.loading = false; + }); }, /** 到账按钮操作 */ handleGran4(row) { diff --git a/src/views/accountCenter/butie/butieSummary/index.vue b/src/views/accountCenter/butie/butieSummary/index.vue index 7d379751..dbd32638 100644 --- a/src/views/accountCenter/butie/butieSummary/index.vue +++ b/src/views/accountCenter/butie/butieSummary/index.vue @@ -257,6 +257,8 @@ this.total = Number(response.data.pageVO.total); this.tableListData.push(response.data.sumVO) this.loading = false; + }).catch(() => { + this.loading = false; }); }else if(this.activeName=='psn'){ param.type=1 @@ -265,7 +267,9 @@ this.total = Number(response.data.pageVO.total); this.tableListData.push(response.data.sumVO) this.loading = false; - }); + }).catch(() => { + this.loading = false; + }); }else if(this.activeName=='organization'){ param.type=2 accountSubsidyCustPageApi(param).then(response => { @@ -273,6 +277,8 @@ this.total = Number(response.data.pageVO.total); this.tableListData.push(response.data.sumVO) this.loading = false; + }).catch(() => { + this.loading = false; }); } }, diff --git a/src/views/accountCenter/consume/consumeSummary/index.vue b/src/views/accountCenter/consume/consumeSummary/index.vue index 668a9bc6..a84f7dac 100644 --- a/src/views/accountCenter/consume/consumeSummary/index.vue +++ b/src/views/accountCenter/consume/consumeSummary/index.vue @@ -285,6 +285,8 @@ this.total = Number(response.resultPage.total); this.tableListData.push(response.totalLine) this.loading = false; + }).catch(() => { + this.loading = false; }); }else if(this.activeName=='psn'){ accountConsumePsnPageApi(param).then(response => { @@ -292,6 +294,8 @@ this.total = Number(response.resultPage.total); this.tableListData.push(response.totalLine) this.loading = false; + }).catch(() => { + this.loading = false; }); }else if(this.activeName=='organization'){ accountConsumeOrganizationPageApi(param).then(response => { @@ -299,8 +303,11 @@ this.total = Number(response.resultPage.total); this.tableListData.push(response.totalLine) this.loading = false; + }).catch(() => { + this.loading = false; }); } + }, //日期 formatDate(date) { diff --git a/src/views/accountCenter/consume/consumerWalletSummary/index.vue b/src/views/accountCenter/consume/consumerWalletSummary/index.vue index e50906a2..d85e5189 100644 --- a/src/views/accountCenter/consume/consumerWalletSummary/index.vue +++ b/src/views/accountCenter/consume/consumerWalletSummary/index.vue @@ -274,6 +274,8 @@ this.total = Number(response.resultPage.total); this.tableListData.push(response.totalLine) this.loading = false; + }).catch(() => { + this.loading = false; }); }else if(this.activeName=='psn'){ walletConsumePsnPageApi(param).then(response => { @@ -281,6 +283,8 @@ this.total = Number(response.resultPage.total); this.tableListData.push(response.totalLine) this.loading = false; + }).catch(() => { + this.loading = false; }); }else if(this.activeName=='organization'){ walletConsumeOrganizationPageApi(param).then(response => { @@ -288,6 +292,8 @@ this.total = Number(response.resultPage.total); this.tableListData.push(response.totalLine) this.loading = false; + }).catch(() => { + this.loading = false; }); } }, diff --git a/src/views/dish/material/index.vue b/src/views/dish/material/index.vue index 92f58518..3424d80e 100644 --- a/src/views/dish/material/index.vue +++ b/src/views/dish/material/index.vue @@ -41,7 +41,7 @@ @@ -482,6 +482,7 @@ export default { getTreeData() { systemMaterialTreeApi({categoryType:1}).then((response) => { this.treeOptions = response.data; + this.addLevel(this.treeOptions) console.log("this.treeOptions",this.treeOptions) this.queryParams.materialType=this.treeOptions[0].categoryType; if(this.treeOptions && this.treeOptions.length > 0){ @@ -491,6 +492,14 @@ export default { } }); }, + addLevel(nodes, level = 0) { + nodes.forEach(node => { + node.level = level; // 设置当前节点的层级 + if (node.children) { // 如果节点有子节点,递归处理子节点 + this.addLevel(node.children, level + 1); + } + }); + }, // 节点单击事件 - 左侧树 async handleNodeClick(data, node) { console.log(data) diff --git a/src/views/superstore/shopMaterial/index.vue b/src/views/superstore/shopMaterial/index.vue index 2d694659..30dcb9c5 100644 --- a/src/views/superstore/shopMaterial/index.vue +++ b/src/views/superstore/shopMaterial/index.vue @@ -41,7 +41,7 @@ @@ -461,7 +461,8 @@ export default { /** 查询新增页面-上级类型下拉树结构 */ getTreeData() { systemMaterialTreeApi({categoryType:2}).then((response) => { - this.treeOptions = response.data; + this.treeOptions = response.data; + this.addLevel(this.treeOptions) console.log("this.treeOptions",this.treeOptions) this.queryParams.materialType=this.treeOptions[0].categoryType; if(this.treeOptions && this.treeOptions.length > 0){ @@ -471,6 +472,14 @@ export default { } }); }, + addLevel(nodes, level = 0) { + nodes.forEach(node => { + node.level = level; // 设置当前节点的层级 + if (node.children) { // 如果节点有子节点,递归处理子节点 + this.addLevel(node.children, level + 1); + } + }); + }, // 节点单击事件 - 左侧树 async handleNodeClick(data, node) { console.log(data)