rejectDialog.vue
2.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
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
<!-- 驳回 -->
<template>
<baseDialog
:dialog-config="dialogConfig"
:is-show.sync="visible"
class="accountDailog"
@handleClick="confirm"
:btnLoding="btnLoding"
>
<div class="reject-dialog">
<glsx-combi-form
class="edit-form-container"
ref="formRef"
label-width="120px"
default-width="400px"
:form-ref="rejectRef"
:form-obj="infoForm"
:form-data="editFormData"
:form-rules="formRules"
></glsx-combi-form>
</div>
</baseDialog>
</template>
<script>
export default {
name: "RejectDialog",
data() {
return {
btnLoding: false,
infoForm: {
rejectReason: "",
rejectSuggestion: ""
},
dialogConfig: {
title: "驳回",
width: "560px"
},
rejectRef: "rejectRef",
formRules: {
rejectReason: [
{ required: true, message: "请输入驳回原因", trigger: "blur" }
],
rejectSuggestion: [
{ required: true, message: "请输入", trigger: "blur" }
]
},
editFormData: [
{
label: "驳回原因",
name: "rejectReason",
type: "input",
placeholder: "请输入驳回原因",
maxlength: 50
},
{
label: "驳回意见",
name: "rejectSuggestion",
type: "input",
placeholder: "请输入",
maxlength: 200,
inputType: "textarea",
showLimit: true,
rows: 4
}
],
baseData: {}
}
},
props: {
rejectVisible: {
type: Boolean,
default: false
},
paramsObj: {
type: Object,
default: {}
}
},
computed: {
visible: {
get() {
return this.rejectVisible
},
set(newVal) {
console.log(newVal, "999")
this.$emit("dialogClose", { flag: newVal, attrName: "rejectVisible" })
}
}
},
mounted() {
console.log("paramsObj", this.paramsObj)
},
methods: {
async confirm() {
const isValid = await this.$refs.formRef.$refs[this.rejectRef].validate()
console.log(isValid)
if (isValid) {
this.$emit("handleAddConfirm")
}
},
handleLoading() {
this.btnLoding = !this.btnLoding
},
handleClose() {
console.log("handleClose")
// this.visible = false
}
}
}
</script>
<style lang="scss" scoped>
::v-deep .el-dialog__header {
padding: 16px 20px !important;
color: #333333;
font-size: 20px;
font-weight: bold;
}
::v-deep .el-dialog__footer {
border-top: 1px solid #e5e5e5;
padding: 14px 20px !important;
}
::v-deep .el-dialog__body {
padding: 32px 20px !important;
}
.reject-dialog {
::v-deep .el-form-item--small.el-form-item {
margin: 0 0 20px !important;
}
::v-deep .el-textarea .el-input__count {
right: 16px;
bottom: 3px;
font-size: 12px;
color: #999999;
}
.tips {
color: #999999;
}
}
</style>