index.vue
1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<template>
<el-dialog
v-dialogDrag
:close-on-click-modal="false"
title="选择审批人"
:visible.sync="visible"
width="500px"
@close="visible = false"
:modal-append-to-body="false"
>
<div class="spr">
<el-radio
v-model="spr"
:label="item.activityInstance"
v-for="item in sprList"
:key="item.activityInstance"
border
>{{ item.name }}</el-radio
>
</div>
<div class="dialog-footer">
<el-button type="primary" @click="confirm">确 定</el-button>
<el-button @click="visible = false">取 消</el-button>
</div>
</el-dialog>
</template>
<script>
import { pretransitProcess, transitProcess } from "@api/user";
export default {
name: "",
components: {},
props: {
visible: {
type: Boolean,
default: function() {
return false;
},
},
workitemInstanceId: {
type: String,
default: "",
},
},
data() {
return {
spr: "",
sprList: [],
};
},
created() {},
mounted() {},
methods: {
confirm() {
let params = {
executeActors: this.sprList.filter(i => i.activityInstance == this.spr),
message: "",
params: {},
targetNodes: [],
workitemInstanceId:this.$route.query.workitemInstanceId
};
transitProcess(params).then((res) => {
this.$message.success("提交成功!")
});
},
getSpr() {
let params = {
params: {},
workitemInstanceId: this.$route.query.workitemInstanceId,
};
pretransitProcess(params).then((res) => {
this.sprList = res[0].masterActors;
this.spr = res[0].masterActors[0].activityInstance;
});
},
},
computed: {},
watch: {
visible: {
handler(val) {
if (val) {
this.getSpr();
}
},
immediate: true,
},
},
};
</script>
<style scoped lang="less">
.spr {
margin: 20px 0;
}
.dialog-footer {
text-align: center;
}
</style>