first commit

This commit is contained in:
2026-01-08 14:58:16 +08:00
commit 556e5d64aa
9575 changed files with 1621095 additions and 0 deletions
@@ -0,0 +1,65 @@
<template>
<div>
{{ formKey }}
<el-button type="primary" v-for="item in buttons" :key="item.name" @click="buttonClick(item)" size="small">
{{ item.name }}
</el-button>
</div>
</template>
<script>
module.exports = {
name: "index",
props: {
taskId: {
type: Number,
required: true
},
formKey: {
type: String,
required: true
}
},
data() {
return {
buttons: []
}
},
methods: {
getButtons() {
$.get("/platform/flow/common/loadSequenceFlows", { taskId: this.taskId }).then((res) => {
if (res.code === 0) {
this.buttons = res.data
}
})
},
buttonClick(item) {
this.$root.$refs[this.formKey].validate((valid) => {
if (valid) {
this.$confirm(`您确定要${item.name}吗,${item.name}后将流转到${item.toNode},是否继续?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "info"
})
.then(() => {
this.$emit("confirm", item.name)
})
.catch(() => {})
}
})
}
},
watch: {
taskId: {
handler: function (val) {
if (val) {
this.getButtons()
}
},
immediate: true
}
}
}
</script>
<style scoped></style>