From d088628a4b421e7e0a8363b8b75529d8b2ecfe89 Mon Sep 17 00:00:00 2001
From: lyh <liuyuanheng@xalxzn.com>
Date: 星期一, 24 二月 2025 10:07:14 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/views/flowable/components/ActApplyBtn.vue |   73 ++++++++++++++++++++++++++++++++++++
 1 files changed, 73 insertions(+), 0 deletions(-)

diff --git a/src/views/flowable/components/ActApplyBtn.vue b/src/views/flowable/components/ActApplyBtn.vue
new file mode 100644
index 0000000..7e5a39c
--- /dev/null
+++ b/src/views/flowable/components/ActApplyBtn.vue
@@ -0,0 +1,73 @@
+<style lang="less">
+</style>
+<template>
+  <span>
+      <a-button :loading="submitLoading" :type="btnType" @click="applySubmit()" >{{text}}</a-button>
+  </span>
+</template>
+
+<script>
+  import {definitionStartByDataId} from "@views/flowable/api/definition";
+
+export default {
+    name: 'ActApplyBtn',
+    components: {},
+    props: {
+        btnType: { type: String, default: 'link', required: false },
+        /**/
+        dataId: {
+            type: String,
+            default: '',
+            required: true
+        },
+        variables:{
+          type: Object,
+          default: {},
+        },
+        text: {
+            type: String,
+            default: '鎻愪氦鐢宠',
+            required: false
+        }
+
+    },
+    data() {
+        return {
+            modalVisible: false,
+            submitLoading: false,
+            form: {
+            },
+        };
+    },
+    created() {
+    },
+    watch: {
+    },
+    methods: {
+        applySubmit() {
+            if (this.dataId && this.dataId.length < 1) {
+                this.error = '蹇呴』浼犲叆鍙傛暟dataId';
+                this.$message.error(this.error);
+                return;
+            } else {
+                this.error = '';
+            }
+            this.submitLoading = true;
+            var params = Object.assign({
+                dataId: this.dataId
+            }, this.variables);
+          definitionStartByDataId(this.dataId, params)
+                .then(res => {
+                    if (res.success) {
+                        this.$message.success('鎿嶄綔鎴愬姛');
+                        this.$emit('success');
+                    } else {
+                        this.$message.error(res.message);
+                    }
+                })
+                .finally(() => (this.submitLoading = false));
+        }
+    }
+
+};
+</script>

--
Gitblit v1.9.3