@burh/nuxt-core 1.0.128 → 1.0.130
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/burh-ds/Curriculum/UserCurriculum/UserCvRightSide.vue +215 -215
- package/components/burh-ds/Groups/SimpleProductItem.vue +9 -3
- package/components/burh-ds/Questions/Question.vue +0 -1
- package/components/burh-ds/Questions/QuestionRadio.vue +29 -24
- package/components/burh-ds/Questions/QuestionRadioItem.vue +8 -5
- package/package.json +1 -1
|
@@ -1,215 +1,215 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="bg-white content-right tabs">
|
|
3
|
-
<el-tabs class="mt-3 ml-3 mr-3" v-model="activeName">
|
|
4
|
-
<el-tab-pane label="Histórico" class="history" name="history">
|
|
5
|
-
<p class="notes-title mb-0">Histórico com sua empresa</p>
|
|
6
|
-
<div class="line mb-3"></div>
|
|
7
|
-
|
|
8
|
-
<div
|
|
9
|
-
v-show="userData.user_applied_job.length > 0"
|
|
10
|
-
class="mt-3"
|
|
11
|
-
v-for="(applied, index) in userData.user_applied_job"
|
|
12
|
-
:key="index"
|
|
13
|
-
>
|
|
14
|
-
<p class="history-text mb-0">
|
|
15
|
-
Se candidatou na vaga {{ applied.job.title }}
|
|
16
|
-
</p>
|
|
17
|
-
<span>{{ applied.subscribe_at | convertDate }}</span>
|
|
18
|
-
</div>
|
|
19
|
-
<p
|
|
20
|
-
v-show="userData.user_applied_job.length === 0"
|
|
21
|
-
class="history-text"
|
|
22
|
-
>
|
|
23
|
-
Nenhuma vaga aplicada.
|
|
24
|
-
</p>
|
|
25
|
-
</el-tab-pane>
|
|
26
|
-
<el-tab-pane label="Anotações" name="notes" v-if="isNotesActived">
|
|
27
|
-
<p class="notes-title mb-0">Notas da equipe</p>
|
|
28
|
-
<div class="line mb-3"></div>
|
|
29
|
-
<div
|
|
30
|
-
v-show="notes.length > 0"
|
|
31
|
-
v-for="(note, index) in notes"
|
|
32
|
-
:key="index"
|
|
33
|
-
>
|
|
34
|
-
<div class="notes-baloon">
|
|
35
|
-
<div class="notes-text ml-3 pt-1">
|
|
36
|
-
<p class="mt-3">{{ note.text }}</p>
|
|
37
|
-
</div>
|
|
38
|
-
<div
|
|
39
|
-
class="d-flex justify-content-end align-items-center mr-3"
|
|
40
|
-
>
|
|
41
|
-
<p class="notes-date">
|
|
42
|
-
{{ note.created_at | convertDate }}
|
|
43
|
-
</p>
|
|
44
|
-
</div>
|
|
45
|
-
</div>
|
|
46
|
-
<div class="notes-owner d-flex mt-2">
|
|
47
|
-
<img
|
|
48
|
-
v-show="note.user.urlAvatar"
|
|
49
|
-
:src="note.user.urlAvatar"
|
|
50
|
-
:alt="note.user.name"
|
|
51
|
-
/>
|
|
52
|
-
<div
|
|
53
|
-
v-show="!note.user.urlAvatar"
|
|
54
|
-
class="notes-avatar"
|
|
55
|
-
></div>
|
|
56
|
-
<p class="ml-1">
|
|
57
|
-
{{ note.user.name }}
|
|
58
|
-
</p>
|
|
59
|
-
</div>
|
|
60
|
-
</div>
|
|
61
|
-
<div class="notes-text pt-1" v-show="notes.length === 0">
|
|
62
|
-
<p>Nenhuma nota criada.</p>
|
|
63
|
-
</div>
|
|
64
|
-
|
|
65
|
-
<input
|
|
66
|
-
class="notes-new pl-4 mt-3 mb-3 form-rounded"
|
|
67
|
-
type="text"
|
|
68
|
-
placeholder="Escrever anotação"
|
|
69
|
-
v-model="newNote"
|
|
70
|
-
@change="$emit('new-note', newNote, userData.id)"
|
|
71
|
-
v-on:change="cleatInput()"
|
|
72
|
-
/>
|
|
73
|
-
</el-tab-pane>
|
|
74
|
-
</el-tabs>
|
|
75
|
-
</div>
|
|
76
|
-
</template>
|
|
77
|
-
|
|
78
|
-
<script>
|
|
79
|
-
import { Tabs, TabPane } from 'element-ui';
|
|
80
|
-
|
|
81
|
-
export default {
|
|
82
|
-
name: 'user-cv-left-side',
|
|
83
|
-
filters: {
|
|
84
|
-
convertDate(data) {
|
|
85
|
-
let d = new Date(data);
|
|
86
|
-
let options = { hour: '2-digit', minute: '2-digit' };
|
|
87
|
-
return d.toLocaleDateString('pt-BR', options);
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
components: {
|
|
91
|
-
[Tabs.name]: Tabs,
|
|
92
|
-
[TabPane.name]: TabPane
|
|
93
|
-
},
|
|
94
|
-
props: {
|
|
95
|
-
userData: Object,
|
|
96
|
-
notes: Array,
|
|
97
|
-
activeName: String,
|
|
98
|
-
isNotesActived: {
|
|
99
|
-
type: Boolean,
|
|
100
|
-
default: true
|
|
101
|
-
}
|
|
102
|
-
},
|
|
103
|
-
methods: {
|
|
104
|
-
cleatInput() {
|
|
105
|
-
this.newNote = '';
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
data() {
|
|
109
|
-
return {
|
|
110
|
-
newNote: '',
|
|
111
|
-
active: this.activeName
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
|
-
};
|
|
115
|
-
</script>
|
|
116
|
-
|
|
117
|
-
<style lang="scss" scoped>
|
|
118
|
-
@import '@burh/nuxt-core/assets/sass/burh-ds/variables/_colors.scss';
|
|
119
|
-
|
|
120
|
-
.readmore {
|
|
121
|
-
overflow: hidden;
|
|
122
|
-
text-overflow: ellipsis;
|
|
123
|
-
display: -webkit-box;
|
|
124
|
-
-webkit-line-clamp: 3;
|
|
125
|
-
-webkit-box-orient: vertical;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.content-right {
|
|
129
|
-
width: 25%;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.notes-title {
|
|
133
|
-
font-size: 14px;
|
|
134
|
-
color: #1d364b;
|
|
135
|
-
font-weight: bold;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.notes-baloon {
|
|
139
|
-
width: 231px;
|
|
140
|
-
height: auto;
|
|
141
|
-
|
|
142
|
-
background: #eff5fd;
|
|
143
|
-
border-radius: 10px 10px 10px 0px;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.notes-text {
|
|
147
|
-
p {
|
|
148
|
-
font-size: 13px;
|
|
149
|
-
color: #62778c;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
.notes-date {
|
|
154
|
-
font-size: 11px;
|
|
155
|
-
text-align: right;
|
|
156
|
-
|
|
157
|
-
color: #8da2b5;
|
|
158
|
-
top: calc(50% - 17px / 2 - 444.5px);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
.notes-owner {
|
|
162
|
-
img {
|
|
163
|
-
width: 23px;
|
|
164
|
-
height: 23px;
|
|
165
|
-
border-radius: 50%;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
.notes-avatar {
|
|
169
|
-
width: 23px;
|
|
170
|
-
height: 23px;
|
|
171
|
-
border-radius: 50%;
|
|
172
|
-
background-color: #adb5bd;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
p {
|
|
176
|
-
font-size: 13px;
|
|
177
|
-
font-weight: 600;
|
|
178
|
-
text-transform: uppercase;
|
|
179
|
-
|
|
180
|
-
color: #62778c;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
.notes-new {
|
|
185
|
-
width: 231px;
|
|
186
|
-
height: 33px;
|
|
187
|
-
|
|
188
|
-
background: #f5f5f5;
|
|
189
|
-
border-radius: 16.5px;
|
|
190
|
-
border: none;
|
|
191
|
-
|
|
192
|
-
outline: 0;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
.line {
|
|
196
|
-
width: 221px;
|
|
197
|
-
height: 0px;
|
|
198
|
-
|
|
199
|
-
border: 1px solid #ececec;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
.history {
|
|
203
|
-
.history-text {
|
|
204
|
-
font-size: 13px;
|
|
205
|
-
color: #62778c;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
span {
|
|
209
|
-
font-size: 11px;
|
|
210
|
-
line-height: 16px;
|
|
211
|
-
|
|
212
|
-
color: #8da2b5;
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="bg-white content-right tabs">
|
|
3
|
+
<el-tabs class="mt-3 ml-3 mr-3" v-model="activeName">
|
|
4
|
+
<el-tab-pane label="Histórico" class="history" name="history">
|
|
5
|
+
<p class="notes-title mb-0">Histórico com sua empresa</p>
|
|
6
|
+
<div class="line mb-3"></div>
|
|
7
|
+
|
|
8
|
+
<div
|
|
9
|
+
v-show="userData.user_applied_job.length > 0"
|
|
10
|
+
class="mt-3"
|
|
11
|
+
v-for="(applied, index) in userData.user_applied_job"
|
|
12
|
+
:key="index"
|
|
13
|
+
>
|
|
14
|
+
<p class="history-text mb-0">
|
|
15
|
+
Se candidatou na vaga {{ applied.job.title }}
|
|
16
|
+
</p>
|
|
17
|
+
<span>{{ applied.subscribe_at | convertDate }}</span>
|
|
18
|
+
</div>
|
|
19
|
+
<p
|
|
20
|
+
v-show="userData.user_applied_job.length === 0"
|
|
21
|
+
class="history-text"
|
|
22
|
+
>
|
|
23
|
+
Nenhuma vaga aplicada.
|
|
24
|
+
</p>
|
|
25
|
+
</el-tab-pane>
|
|
26
|
+
<el-tab-pane label="Anotações" name="notes" v-if="isNotesActived">
|
|
27
|
+
<p class="notes-title mb-0">Notas da equipe</p>
|
|
28
|
+
<div class="line mb-3"></div>
|
|
29
|
+
<div
|
|
30
|
+
v-show="notes.length > 0"
|
|
31
|
+
v-for="(note, index) in notes"
|
|
32
|
+
:key="index"
|
|
33
|
+
>
|
|
34
|
+
<div class="notes-baloon">
|
|
35
|
+
<div class="notes-text ml-3 pt-1">
|
|
36
|
+
<p class="mt-3">{{ note.text }}</p>
|
|
37
|
+
</div>
|
|
38
|
+
<div
|
|
39
|
+
class="d-flex justify-content-end align-items-center mr-3"
|
|
40
|
+
>
|
|
41
|
+
<p class="notes-date">
|
|
42
|
+
{{ note.created_at | convertDate }}
|
|
43
|
+
</p>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
<div class="notes-owner d-flex mt-2">
|
|
47
|
+
<img
|
|
48
|
+
v-show="note.user.urlAvatar"
|
|
49
|
+
:src="note.user.urlAvatar"
|
|
50
|
+
:alt="note.user.name"
|
|
51
|
+
/>
|
|
52
|
+
<div
|
|
53
|
+
v-show="!note.user.urlAvatar"
|
|
54
|
+
class="notes-avatar"
|
|
55
|
+
></div>
|
|
56
|
+
<p class="ml-1">
|
|
57
|
+
{{ note.user.name }}
|
|
58
|
+
</p>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
<div class="notes-text pt-1" v-show="notes.length === 0">
|
|
62
|
+
<p>Nenhuma nota criada.</p>
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
<input
|
|
66
|
+
class="notes-new pl-4 mt-3 mb-3 form-rounded"
|
|
67
|
+
type="text"
|
|
68
|
+
placeholder="Escrever anotação"
|
|
69
|
+
v-model="newNote"
|
|
70
|
+
@change="$emit('new-note', newNote, userData.id)"
|
|
71
|
+
v-on:change="cleatInput()"
|
|
72
|
+
/>
|
|
73
|
+
</el-tab-pane>
|
|
74
|
+
</el-tabs>
|
|
75
|
+
</div>
|
|
76
|
+
</template>
|
|
77
|
+
|
|
78
|
+
<script>
|
|
79
|
+
import { Tabs, TabPane } from 'element-ui';
|
|
80
|
+
|
|
81
|
+
export default {
|
|
82
|
+
name: 'user-cv-left-side',
|
|
83
|
+
filters: {
|
|
84
|
+
convertDate(data) {
|
|
85
|
+
let d = new Date(data);
|
|
86
|
+
let options = { hour: '2-digit', minute: '2-digit' };
|
|
87
|
+
return d.toLocaleDateString('pt-BR', options);
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
components: {
|
|
91
|
+
[Tabs.name]: Tabs,
|
|
92
|
+
[TabPane.name]: TabPane
|
|
93
|
+
},
|
|
94
|
+
props: {
|
|
95
|
+
userData: Object,
|
|
96
|
+
notes: Array,
|
|
97
|
+
activeName: String,
|
|
98
|
+
isNotesActived: {
|
|
99
|
+
type: Boolean,
|
|
100
|
+
default: true
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
methods: {
|
|
104
|
+
cleatInput() {
|
|
105
|
+
this.newNote = '';
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
data() {
|
|
109
|
+
return {
|
|
110
|
+
newNote: '',
|
|
111
|
+
active: this.activeName
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
</script>
|
|
116
|
+
|
|
117
|
+
<style lang="scss" scoped>
|
|
118
|
+
@import '@burh/nuxt-core/assets/sass/burh-ds/variables/_colors.scss';
|
|
119
|
+
|
|
120
|
+
.readmore {
|
|
121
|
+
overflow: hidden;
|
|
122
|
+
text-overflow: ellipsis;
|
|
123
|
+
display: -webkit-box;
|
|
124
|
+
-webkit-line-clamp: 3;
|
|
125
|
+
-webkit-box-orient: vertical;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.content-right {
|
|
129
|
+
width: 25%;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.notes-title {
|
|
133
|
+
font-size: 14px;
|
|
134
|
+
color: #1d364b;
|
|
135
|
+
font-weight: bold;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.notes-baloon {
|
|
139
|
+
width: 231px;
|
|
140
|
+
height: auto;
|
|
141
|
+
|
|
142
|
+
background: #eff5fd;
|
|
143
|
+
border-radius: 10px 10px 10px 0px;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.notes-text {
|
|
147
|
+
p {
|
|
148
|
+
font-size: 13px;
|
|
149
|
+
color: #62778c;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.notes-date {
|
|
154
|
+
font-size: 11px;
|
|
155
|
+
text-align: right;
|
|
156
|
+
|
|
157
|
+
color: #8da2b5;
|
|
158
|
+
top: calc(50% - 17px / 2 - 444.5px);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.notes-owner {
|
|
162
|
+
img {
|
|
163
|
+
width: 23px;
|
|
164
|
+
height: 23px;
|
|
165
|
+
border-radius: 50%;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.notes-avatar {
|
|
169
|
+
width: 23px;
|
|
170
|
+
height: 23px;
|
|
171
|
+
border-radius: 50%;
|
|
172
|
+
background-color: #adb5bd;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
p {
|
|
176
|
+
font-size: 13px;
|
|
177
|
+
font-weight: 600;
|
|
178
|
+
text-transform: uppercase;
|
|
179
|
+
|
|
180
|
+
color: #62778c;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.notes-new {
|
|
185
|
+
width: 231px;
|
|
186
|
+
height: 33px;
|
|
187
|
+
|
|
188
|
+
background: #f5f5f5;
|
|
189
|
+
border-radius: 16.5px;
|
|
190
|
+
border: none;
|
|
191
|
+
|
|
192
|
+
outline: 0;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.line {
|
|
196
|
+
width: 221px;
|
|
197
|
+
height: 0px;
|
|
198
|
+
|
|
199
|
+
border: 1px solid #ececec;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.history {
|
|
203
|
+
.history-text {
|
|
204
|
+
font-size: 13px;
|
|
205
|
+
color: #62778c;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
span {
|
|
209
|
+
font-size: 11px;
|
|
210
|
+
line-height: 16px;
|
|
211
|
+
|
|
212
|
+
color: #8da2b5;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
</style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<default-link @click="callVideoTutorial" :link="to" class="product-item">
|
|
2
|
+
<default-link @click="callVideoTutorial($event)" :link="disabled ? '' : to" class="product-item" :disabled="disabled">
|
|
3
3
|
<div :class="'product-item--avatar bg-'+color">
|
|
4
4
|
<img :src="avatar" alt="">
|
|
5
5
|
</div>
|
|
@@ -60,10 +60,11 @@ export default {
|
|
|
60
60
|
type: String,
|
|
61
61
|
default: '/'
|
|
62
62
|
},
|
|
63
|
-
indexableName: String
|
|
63
|
+
indexableName: String,
|
|
64
|
+
disabled: Boolean
|
|
64
65
|
},
|
|
65
66
|
methods: {
|
|
66
|
-
callVideoTutorial() {
|
|
67
|
+
callVideoTutorial(e) {
|
|
67
68
|
if (this.indexableName == 'VIDEO_CHAMADA') {
|
|
68
69
|
this.$emit('callVideoTutorial');
|
|
69
70
|
}
|
|
@@ -74,6 +75,11 @@ export default {
|
|
|
74
75
|
|
|
75
76
|
<style lang="scss" scoped>
|
|
76
77
|
.product-item {
|
|
78
|
+
&[disabled] {
|
|
79
|
+
cursor: not-allowed;
|
|
80
|
+
pointer-events: all !important;
|
|
81
|
+
}
|
|
82
|
+
|
|
77
83
|
display: inline-block;
|
|
78
84
|
|
|
79
85
|
&--title {
|
|
@@ -2,19 +2,22 @@
|
|
|
2
2
|
<div class="">
|
|
3
3
|
<div v-for="(answer, index) in answers" :key="index">
|
|
4
4
|
<div class="d-flex w-100 align-items-start">
|
|
5
|
-
|
|
5
|
+
<el-radio-group v-model="selected">
|
|
6
6
|
<question-radio-item
|
|
7
7
|
:response="answer.name"
|
|
8
|
+
:index="index"
|
|
8
9
|
v-on:change-answer="setAnswers($event, answer)"
|
|
9
10
|
></question-radio-item>
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
</
|
|
11
|
+
</el-radio-group>
|
|
12
|
+
|
|
13
|
+
<el-tooltip class="item" effect="dark" content="Remover alternativa" placement="top">
|
|
14
|
+
<base-button size="sm" type="link" class="text-danger px-2 w-auto m-0 ml-2" @click="removeLastOption">
|
|
15
|
+
<font-awesome-icon icon="trash" />
|
|
16
|
+
</base-button>
|
|
17
|
+
</el-tooltip>
|
|
16
18
|
</div>
|
|
17
19
|
</div>
|
|
20
|
+
|
|
18
21
|
<ul class="list-inline">
|
|
19
22
|
<li class="list-inline-item">
|
|
20
23
|
<base-button size="xs" type="link" class="mr-0" @click="addOption">
|
|
@@ -43,8 +46,8 @@ export default {
|
|
|
43
46
|
},
|
|
44
47
|
props: {
|
|
45
48
|
data: {
|
|
46
|
-
|
|
47
|
-
|
|
49
|
+
type: Array,
|
|
50
|
+
default: () => [{}, {}]
|
|
48
51
|
},
|
|
49
52
|
},
|
|
50
53
|
data() {
|
|
@@ -61,42 +64,44 @@ export default {
|
|
|
61
64
|
removeLastOption() {
|
|
62
65
|
if(this.answers.length <= this.minRadios) {
|
|
63
66
|
return Swal.fire({
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
title: 'Erro',
|
|
68
|
+
text: 'Questões do tipo alternativa deverão conter no mínimo 2 respostas!',
|
|
69
|
+
type: 'warning',
|
|
70
|
+
buttonsStyling: false,
|
|
71
|
+
confirmButtonText: 'Entendido',
|
|
72
|
+
confirmButtonClass: 'btn btn-primary btn-fill',
|
|
70
73
|
})
|
|
71
|
-
}
|
|
74
|
+
}
|
|
75
|
+
|
|
72
76
|
this.answers.splice(this.answers.length - 1, 1);
|
|
77
|
+
|
|
78
|
+
this.emitRadioList();
|
|
73
79
|
},
|
|
74
|
-
setAnswers({
|
|
80
|
+
setAnswers({ index, value }, answer) {
|
|
75
81
|
answer.name = value;
|
|
76
|
-
answer.id = id;
|
|
77
82
|
|
|
78
|
-
if(this.selected == null && answer.correct != false) { // be carefully here, correct can be null
|
|
79
|
-
this.selected =
|
|
83
|
+
if (this.selected == null && answer.correct != false) { // be carefully here, correct can be null
|
|
84
|
+
this.selected = index
|
|
80
85
|
}
|
|
81
86
|
|
|
82
87
|
this.emitRadioList();
|
|
83
88
|
},
|
|
84
89
|
makeRadiolist() {
|
|
85
|
-
const listRadio = this.answers.map(radio => {
|
|
86
|
-
|
|
90
|
+
const listRadio = this.answers.map((radio, idx) => {
|
|
87
91
|
return {
|
|
88
92
|
id: radio.id,
|
|
89
93
|
name: radio.name,
|
|
90
|
-
correct:
|
|
94
|
+
correct: idx == this.selected ? true : false
|
|
91
95
|
}
|
|
92
96
|
})
|
|
97
|
+
|
|
93
98
|
return listRadio
|
|
94
99
|
},
|
|
95
100
|
emitRadioList() {
|
|
96
101
|
const payload = {
|
|
97
|
-
// response: this.selected,
|
|
98
102
|
multiples: this.makeRadiolist()
|
|
99
103
|
}
|
|
104
|
+
|
|
100
105
|
this.$emit('data-changed', payload)
|
|
101
106
|
},
|
|
102
107
|
},
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<validation-provider tag="div" class="" :vid="`radio-${
|
|
2
|
+
<validation-provider tag="div" class="" :vid="`radio-${index}`"
|
|
3
3
|
name="Resposta" rules="required" v-slot="{ errors }">
|
|
4
4
|
<el-radio
|
|
5
|
-
:label="
|
|
5
|
+
:label="index"
|
|
6
6
|
class="form-radio"
|
|
7
7
|
:class="{'form-radio--error': errors[0]}">
|
|
8
8
|
<base-input
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
v-model="value"
|
|
14
14
|
:error="errors[0]"
|
|
15
15
|
:valid="errors.length ? true : false"
|
|
16
|
-
v-on:input="$emit('change-answer', {
|
|
16
|
+
v-on:input="$emit('change-answer', { index, value })">
|
|
17
17
|
</base-input>
|
|
18
18
|
</el-radio>
|
|
19
19
|
</validation-provider>
|
|
@@ -28,17 +28,20 @@ export default {
|
|
|
28
28
|
[Radio.name]: Radio,
|
|
29
29
|
},
|
|
30
30
|
props: {
|
|
31
|
+
index: {
|
|
32
|
+
type: Number,
|
|
33
|
+
default: null
|
|
34
|
+
},
|
|
31
35
|
response: {
|
|
32
36
|
type: String,
|
|
33
37
|
default: ''
|
|
34
38
|
}
|
|
35
39
|
},
|
|
36
40
|
created() {
|
|
37
|
-
this.$emit('change-answer', {
|
|
41
|
+
this.$emit('change-answer', { index: this.index, value: this.value });
|
|
38
42
|
},
|
|
39
43
|
data() {
|
|
40
44
|
return {
|
|
41
|
-
id: this.$uuid.v4(),
|
|
42
45
|
value: this.response,
|
|
43
46
|
}
|
|
44
47
|
},
|