From c9fd1b032c9388b44bbb7dca0d48345f162fc4c2 Mon Sep 17 00:00:00 2001 From: caill <815519168@qq.com> Date: Tue, 18 Mar 2025 17:26:36 +0800 Subject: [PATCH] catch --- base-vue/src/views/modules/car/car.vue | 2 +- base-vue/src/views/modules/client/client.vue | 2 +- .../src/views/modules/contract/contract.vue | 2 +- .../src/views/modules/deploy/flwdeploy.vue | 2 +- .../views/modules/deploy/flwdeployprodef.vue | 2 +- .../src/views/modules/flow/flwdemodel.vue | 4 +- .../instance/flwmycompleteinstance.vue | 88 +++++++-------- .../views/modules/instance/flwmyinstance.vue | 104 ++++++++---------- .../modules/instance/flwtodoinstance.vue | 70 ++++++------ .../src/views/modules/material/material.vue | 2 +- base-vue/src/views/modules/sys/notice.vue | 2 +- .../src/views/modules/tickets/tickets.vue | 2 +- 12 files changed, 129 insertions(+), 153 deletions(-) diff --git a/base-vue/src/views/modules/car/car.vue b/base-vue/src/views/modules/car/car.vue index 5466086..ed94da4 100644 --- a/base-vue/src/views/modules/car/car.vue +++ b/base-vue/src/views/modules/car/car.vue @@ -196,7 +196,7 @@ this.$message.error(data.msg) } }) - }) + }).catch(() => {}) } } } diff --git a/base-vue/src/views/modules/client/client.vue b/base-vue/src/views/modules/client/client.vue index 8592c28..b56c022 100644 --- a/base-vue/src/views/modules/client/client.vue +++ b/base-vue/src/views/modules/client/client.vue @@ -189,7 +189,7 @@ this.$message.error(data.msg) } }) - }) + }).catch(() => {}) } } } diff --git a/base-vue/src/views/modules/contract/contract.vue b/base-vue/src/views/modules/contract/contract.vue index 9b8a7bc..b7399db 100644 --- a/base-vue/src/views/modules/contract/contract.vue +++ b/base-vue/src/views/modules/contract/contract.vue @@ -216,7 +216,7 @@ this.$message.error(data.msg) } }) - }) + }).catch(() => {}) }, // 生成模板 addTempHandle (id) { diff --git a/base-vue/src/views/modules/deploy/flwdeploy.vue b/base-vue/src/views/modules/deploy/flwdeploy.vue index e70ef0b..60df1a5 100644 --- a/base-vue/src/views/modules/deploy/flwdeploy.vue +++ b/base-vue/src/views/modules/deploy/flwdeploy.vue @@ -154,7 +154,7 @@ this.$message.error(data.msg) } }) - }) + }).catch(() => {}) } } } diff --git a/base-vue/src/views/modules/deploy/flwdeployprodef.vue b/base-vue/src/views/modules/deploy/flwdeployprodef.vue index 6766843..a70cbe8 100644 --- a/base-vue/src/views/modules/deploy/flwdeployprodef.vue +++ b/base-vue/src/views/modules/deploy/flwdeployprodef.vue @@ -320,7 +320,7 @@ this.$message.error(data.msg) } }) - }) + }).catch(() => {}) } } } diff --git a/base-vue/src/views/modules/flow/flwdemodel.vue b/base-vue/src/views/modules/flow/flwdemodel.vue index 8cd49c9..5fd3630 100644 --- a/base-vue/src/views/modules/flow/flwdemodel.vue +++ b/base-vue/src/views/modules/flow/flwdemodel.vue @@ -193,7 +193,7 @@ }) } }) - }) + }).catch(() => {}) }, // 删除 deleteHandle (id) { @@ -223,7 +223,7 @@ this.$message.error(data.msg) } }) - }) + }).catch(() => {}) } } } diff --git a/base-vue/src/views/modules/instance/flwmycompleteinstance.vue b/base-vue/src/views/modules/instance/flwmycompleteinstance.vue index 3d6b02d..c0861e3 100644 --- a/base-vue/src/views/modules/instance/flwmycompleteinstance.vue +++ b/base-vue/src/views/modules/instance/flwmycompleteinstance.vue @@ -167,36 +167,39 @@ } this.dataListLoading = false }) - },approveHandle(id){ + }, + approveHandle(id){ this.id = id - this.dialogVisible = true - },showFlowHandle(procInsId){ + this.dialogVisible = true + }, + showFlowHandle(procInsId){ this.procInsId = procInsId // 通过流程实例id查询对应的流转记录 this.$http({ - url: this.$http.adornUrl(`/flw/instance/getCompleteHiTaskInstance/${this.procInsId}`), - method: 'get', - params: this.$http.adornParams() - }).then(({data}) => { - if (data && data.code === 0) { - this.dialogActiveVisible = true - this.hiTasks = data.data - } - }) - },submitFlowComplete(){ + url: this.$http.adornUrl(`/flw/instance/getCompleteHiTaskInstance/${this.procInsId}`), + method: 'get', + params: this.$http.adornParams() + }).then(({data}) => { + if (data && data.code === 0) { + this.dialogActiveVisible = true + this.hiTasks = data.data + } + }) + }, + submitFlowComplete(){ // 做审批通过的操作 this.$http({ - url: this.$http.adornUrl(`/flw/instance/completeFlow/${this.id}`), - method: 'get', - params: this.$http.adornParams() - }).then(({data}) => { - if (data && data.code === 0) { - this.dialogVisible = false - this.getDataList(); - } - }) - },claimHandle(id){ - + url: this.$http.adornUrl(`/flw/instance/completeFlow/${this.id}`), + method: 'get', + params: this.$http.adornParams() + }).then(({data}) => { + if (data && data.code === 0) { + this.dialogVisible = false + this.getDataList(); + } + }) + }, + claimHandle(id){ this.$confirm('确定要拾取当前的任务吗?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', @@ -211,35 +214,24 @@ this.getDataList(); } }) - }).catch(() => { - this.$message({ - type: 'info', - message: '已取消删除' - }); - }); - - - },unclaimHandle(id){ + }).catch(() => {}) + }, + unclaimHandle(id){ this.$confirm('确定要归还当前的任务吗?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => { this.$http({ - url: this.$http.adornUrl(`/flw/instance/unclaimTask/${id}`), - method: 'get', - params: this.$http.adornParams() - }).then(({data}) => { - if (data && data.code === 0) { - this.getDataList(); - } - }) - }).catch(() => { - this.$message({ - type: 'info', - message: '已取消删除' - }); - }); + url: this.$http.adornUrl(`/flw/instance/unclaimTask/${id}`), + method: 'get', + params: this.$http.adornParams() + }).then(({data}) => { + if (data && data.code === 0) { + this.getDataList(); + } + }) + }).catch(() => {}) }, // 每页数 sizeChangeHandle (val) { @@ -284,7 +276,7 @@ this.$message.error(data.msg) } }) - }) + }).catch(() => {}) } } } diff --git a/base-vue/src/views/modules/instance/flwmyinstance.vue b/base-vue/src/views/modules/instance/flwmyinstance.vue index 81d18d4..b3d1fbd 100644 --- a/base-vue/src/views/modules/instance/flwmyinstance.vue +++ b/base-vue/src/views/modules/instance/flwmyinstance.vue @@ -161,79 +161,71 @@ } this.dataListLoading = false }) - },approveHandle(id){ + }, + approveHandle(id){ this.id = id - this.dialogVisible = true - },showFlowHandle(procInsId){ + this.dialogVisible = true + }, + showFlowHandle(procInsId){ this.procInsId = procInsId // 通过流程实例id查询对应的流转记录 this.$http({ - url: this.$http.adornUrl(`/flw/instance/getHiTaskInstance/${this.procInsId}`), - method: 'get', - params: this.$http.adornParams() - }).then(({data}) => { - if (data && data.code === 0) { - this.dialogActiveVisible = true - this.hiTasks = data.data - } - }) - },submitFlowComplete(){ + url: this.$http.adornUrl(`/flw/instance/getHiTaskInstance/${this.procInsId}`), + method: 'get', + params: this.$http.adornParams() + }).then(({data}) => { + if (data && data.code === 0) { + this.dialogActiveVisible = true + this.hiTasks = data.data + } + }) + }, + submitFlowComplete(){ // 做审批通过的操作 this.$http({ - url: this.$http.adornUrl(`/flw/instance/completeFlow/${this.id}`), - method: 'get', - params: this.$http.adornParams() - }).then(({data}) => { - if (data && data.code === 0) { - this.dialogVisible = false - this.getDataList(); - } - }) - },claimHandle(id){ - + url: this.$http.adornUrl(`/flw/instance/completeFlow/${this.id}`), + method: 'get', + params: this.$http.adornParams() + }).then(({data}) => { + if (data && data.code === 0) { + this.dialogVisible = false + this.getDataList(); + } + }) + }, + claimHandle(id){ this.$confirm('确定要拾取当前的任务吗?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => { this.$http({ - url: this.$http.adornUrl(`/flw/instance/claimTask/${id}`), - method: 'get', - params: this.$http.adornParams() - }).then(({data}) => { - if (data && data.code === 0) { - this.getDataList(); - } - }) - }).catch(() => { - this.$message({ - type: 'info', - message: '已取消删除' - }); - }); - - - },unclaimHandle(id){ + url: this.$http.adornUrl(`/flw/instance/claimTask/${id}`), + method: 'get', + params: this.$http.adornParams() + }).then(({data}) => { + if (data && data.code === 0) { + this.getDataList(); + } + }) + }).catch(() => {}) + }, + unclaimHandle(id){ this.$confirm('确定要归还当前的任务吗?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => { this.$http({ - url: this.$http.adornUrl(`/flw/instance/unclaimTask/${id}`), - method: 'get', - params: this.$http.adornParams() - }).then(({data}) => { - if (data && data.code === 0) { - this.getDataList(); - } - }) - }).catch(() => { - this.$message({ - type: 'info', - message: '已取消删除' - }); - }); + url: this.$http.adornUrl(`/flw/instance/unclaimTask/${id}`), + method: 'get', + params: this.$http.adornParams() + }).then(({data}) => { + if (data && data.code === 0) { + this.getDataList(); + } + }) + }).catch(() => {}) }, // 每页数 sizeChangeHandle (val) { @@ -278,7 +270,7 @@ this.$message.error(data.msg) } }) - }) + }).catch(() => {}) } } } diff --git a/base-vue/src/views/modules/instance/flwtodoinstance.vue b/base-vue/src/views/modules/instance/flwtodoinstance.vue index 659b53b..0d7c876 100644 --- a/base-vue/src/views/modules/instance/flwtodoinstance.vue +++ b/base-vue/src/views/modules/instance/flwtodoinstance.vue @@ -171,26 +171,29 @@ } this.dataListLoading = false }) - },approveHandle(id){ + }, + approveHandle(id){ this.id = id - this.dialogVisible = true - },showFlowHandle(procInsId){ + this.dialogVisible = true + }, + showFlowHandle(procInsId){ this.procInsId = procInsId this.dialogActiveVisible = true - },submitFlowComplete(){ + }, + submitFlowComplete(){ // 做审批通过的操作 this.$http({ - url: this.$http.adornUrl(`/flw/instance/completeFlow/${this.id}`), - method: 'get', - params: this.$http.adornParams() - }).then(({data}) => { - if (data && data.code === 0) { - this.dialogVisible = false - this.getDataList(); - } - }) - },claimHandle(id){ - + url: this.$http.adornUrl(`/flw/instance/completeFlow/${this.id}`), + method: 'get', + params: this.$http.adornParams() + }).then(({data}) => { + if (data && data.code === 0) { + this.dialogVisible = false + this.getDataList(); + } + }) + }, + claimHandle(id){ this.$confirm('确定要拾取当前的任务吗?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', @@ -205,35 +208,24 @@ this.getDataList(); } }) - }).catch(() => { - this.$message({ - type: 'info', - message: '已取消删除' - }); - }); - - - },unclaimHandle(id){ + }).catch(() => {}) + }, + unclaimHandle(id){ this.$confirm('确定要归还当前的任务吗?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => { this.$http({ - url: this.$http.adornUrl(`/flw/instance/unclaimTask/${id}`), - method: 'get', - params: this.$http.adornParams() - }).then(({data}) => { - if (data && data.code === 0) { - this.getDataList(); - } - }) - }).catch(() => { - this.$message({ - type: 'info', - message: '已取消删除' - }); - }); + url: this.$http.adornUrl(`/flw/instance/unclaimTask/${id}`), + method: 'get', + params: this.$http.adornParams() + }).then(({data}) => { + if (data && data.code === 0) { + this.getDataList(); + } + }) + }).catch(() => {}) }, // 每页数 sizeChangeHandle (val) { @@ -278,7 +270,7 @@ this.$message.error(data.msg) } }) - }) + }).catch(() => {}) } } } diff --git a/base-vue/src/views/modules/material/material.vue b/base-vue/src/views/modules/material/material.vue index d224932..c12fe1e 100644 --- a/base-vue/src/views/modules/material/material.vue +++ b/base-vue/src/views/modules/material/material.vue @@ -190,7 +190,7 @@ this.$message.error(data.msg) } }) - }) + }).catch(() => {}) } } } diff --git a/base-vue/src/views/modules/sys/notice.vue b/base-vue/src/views/modules/sys/notice.vue index 1118c02..292e36c 100644 --- a/base-vue/src/views/modules/sys/notice.vue +++ b/base-vue/src/views/modules/sys/notice.vue @@ -179,7 +179,7 @@ this.$message.error(data.msg) } }) - }) + }).catch(() => {}) } } } diff --git a/base-vue/src/views/modules/tickets/tickets.vue b/base-vue/src/views/modules/tickets/tickets.vue index 3859bea..8966114 100644 --- a/base-vue/src/views/modules/tickets/tickets.vue +++ b/base-vue/src/views/modules/tickets/tickets.vue @@ -239,7 +239,7 @@ this.$message.error(data.msg) } }) - }) + }).catch(() => {}) } } }