allSimilarDialog.vue
3.52 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
//
<template>
<div>
<van-popup
v-model="show"
round
safe-area-inset-bottom
position="bottom"
duration="0"
v-if="show"
style="max-height: 80%"
>
<van-nav-bar
:title="title"
left-text="取消"
right-text="确定"
@click-left="show = false"
@click-right="onClickRight"
class="popup_header_fixed"
/>
<van-form ref="formVan" v-form class="popup_header_margin">
<van-field
:label="title + '人员'"
name="users"
required
input-align="right"
:rules="[
{
required: form.users ? false : true,
message: `请选择${title}人员`,
trigger: 'onChange',
},
]"
class="contentButton"
>
<template #input>
<ht-user-selector-input
v-model="form.users"
:single="userSelectorIsSingle"
quick-search-props="fullname,account"
:append-to-body="true"
:config="{ id: 'form.userId' }"
></ht-user-selector-input>
</template>
</van-field>
<van-field
v-model="form.opinion"
name="opinion"
rows="5"
autosize
type="textarea"
maxlength="100"
placeholder="请输入审批意见"
show-word-limit
/>
</van-form>
<van-divider style="margin: 0.22667rem 0 0" />
<bottOrder @selectOften="selectOften" @fileList="fileList"></bottOrder>
</van-popup>
</div>
</template>
<script>
import matterButton from '@/mixins/matterButton.js'
import bottOrder from './bottOrder.vue'
export default {
name: 'allSimilarDialog',
mixins: [matterButton],
components: { bottOrder },
props: {
title: {
type: String,
default: '',
},
userSelectorIsSingle: {
type: Boolean,
default: false,
},
taskId: {
type: String,
default: '',
},
instId: {
type: String,
default: '',
},
nodeId: {
type: String,
default: '',
},
noticeId: {
type: String,
default: '',
},
},
watch: {
'form.users': {
handler(val) {},
},
},
data() {
return {
showRejectMethod: false,
showOften: false,
form: {
people: '',
opinion: '',
users: '',
userId: '',
files: '',
},
}
},
methods: {
showDialog() {
this.show = true
this.form = {
people: '',
opinion: '',
users: '',
userId: '',
files: '',
}
},
onClickRight() {
this.$refs.formVan
.validate()
.then(() => {
this.$emit('onClickRight', this.form, () => {
this.show = false
})
})
.catch((e) => {})
},
fileList(val) {
this.form.files = JSON.stringify(val)
},
selectOften(val) {
this.form.opinion = `${this.form.opinion ? this.form.opinion : ''}${
val.name
}`
},
},
}
</script>
<style lang="scss" scoped>
@import '@/styles/matterButton.scss';
::v-deep {
.van-popup {
display: flex;
flex-direction: column;
justify-content: space-between;
}
.van-field__label {
display: flex;
align-items: center;
}
}
</style>