CirculatedButton.vue
1.94 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
// 传阅
<template>
<div>
<allSimilarDialog
:title="'传阅'"
ref="allSimilarDialog"
:task-id="taskId"
:inst-id="instId"
:node-id="nodeId"
:notice-id="noticeId"
@onClickRight="onClickRight"
></allSimilarDialog>
</div>
</template>
<script>
import matterButton from '@/mixins/matterButton.js'
import { transToMore } from '@/api/process'
import allSimilarDialog from '@/views/matter/components/allSimilarDialog.vue'
export default {
name: 'CirculatedButton',
mixins: [matterButton],
components: { allSimilarDialog },
props: {
userSelectorIsSingle: {
type: Boolean,
default: false,
},
taskId: {
type: String,
default: '',
},
instId: {
type: String,
default: '',
},
nodeId: {
type: String,
default: '',
},
defId: {
type: String,
default: '',
},
noticeId: {
type: String,
default: '',
},
},
data() {
return {
showRejectMethod: false,
showOften: false,
}
},
methods: {
showDialog() {
this.$refs.allSimilarDialog.showDialog()
},
onClickRight(val, cb) {
const { userId, files, opinion } = val
const data = {
copyToType: '0',
messageType: 'inner',
files,
userId,
opinion,
taskId: this.taskId,
instanceId: this.instId,
selectNodeId: this.nodeId,
parentId: this.noticeId,
}
transToMore(data, (res) => {
if (res.state) {
this.$toast.success(res.message)
cb?.()
this.$emit('closePop')
this.$emit('submit-after')
} else {
this.$toast.fail(res.message)
}
})
},
},
}
</script>
<style lang="scss" scoped>
@import '@/styles/matterButton.scss';
</style>