shenqilong 8 месяцев назад
Родитель
Сommit
0cef4a755f

+ 12 - 7
src/business/platform/bpmn/form/action.js

@@ -294,13 +294,18 @@ export default {
                     showClose: false
                 }).then(() => {
                     // 后置事件
-                    this.afterScript(this.actionName, {
-                        data: response.data,
-                        variables: response.variables
-                    }, () => {
-                        // 回调上个页面
-                        // this.callbackPage()
-                    })
+                    if (response.state === 103) {
+                        loading.close()
+                        this.$message.error(response.message)
+                    } else {
+                        this.afterScript(this.actionName, {
+                            data: response.data,
+                            variables: response.variables
+                        }, () => {
+                            // 回调上个页面
+                            // this.callbackPage()
+                        })
+                    }
                 }).catch(() => { })
             }).catch(() => {
                 loading.close()

+ 17 - 12
src/views/platform/office/bpmInitiatedProcess/myDraft.vue

@@ -167,18 +167,23 @@ export default {
                     })
                     // 删除选中记录
                     removeDraft({ ids: idList.join(',') }).then(() => {
-                        ActionUtils.removeSuccessMessage()
-                        this.selection = []
-                        // 循环删除对应数据表数据
-                        defKeyArr.forEach(k => {
-                            const deleteParams = {
-                                tableName: `t_${codes[k]}`,
-                                paramWhere: { id_: delList[k].join(',') }
-                            }
-                            this.$common.request('delete', deleteParams, 'post', true)
-                        })
-                        this.$message.success('删除成功!')
-                        this.search()
+                        if (res.state === 103) {
+                            this.$message.warning(res.message)
+                        } else {
+                            ActionUtils.removeSuccessMessage()
+                            this.selection = []
+                            this.$refs.crud.clearSelection()
+                            // 循环删除对应数据表数据
+                            defKeyArr.forEach(k => {
+                                const deleteParams = {
+                                    tableName: `t_${codes[k]}`,
+                                    paramWhere: { id_: delList[k].join(',') }
+                                }
+                                this.$common.request('delete', deleteParams, 'post', true)
+                            })
+                            this.$message.success('删除成功!')
+                            this.search()
+                        }
                     })
                 }).catch(() => {
                     this.$message.error('获取数据表key值出错,请联系开发人员!')