@burh/nuxt-core 1.0.92 → 1.0.93
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<card class="card-app card-app--training" :class="icon ? 'card--icon' : '' " @click.native="$emit('course-click')">
|
|
3
|
-
<base-dropdown class="top-right custom" v-if="showMenu">
|
|
3
|
+
<base-dropdown @click.native.stop class="top-right custom" v-if="showMenu">
|
|
4
4
|
<i slot="title-container"
|
|
5
5
|
class="fa fa-ellipsis-h custom"
|
|
6
6
|
aria-hidden="true"
|
|
@@ -1,119 +1,135 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<modal :show.sync="showModal"
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
modalContentClasses="container-fluid" headerClasses="row px-4" bodyClasses="row px-4 pt-3"
|
|
4
|
+
v-on:close="closeModal()">
|
|
5
5
|
<template slot="header">
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
<h5 class="pl-3 modal-title">Acesso</h5>
|
|
7
|
+
</template>
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
:placeholder="''"
|
|
21
|
-
>
|
|
22
|
-
<el-option
|
|
23
|
-
v-for="role in roles"
|
|
24
|
-
:key="role.id"
|
|
25
|
-
:label="role.name"
|
|
26
|
-
:value="role.id"
|
|
27
|
-
>
|
|
28
|
-
</el-option>
|
|
29
|
-
</el-select>
|
|
30
|
-
</div>
|
|
9
|
+
<div class="col-12 d-flex">
|
|
10
|
+
<div
|
|
11
|
+
id="role"
|
|
12
|
+
tag="div"
|
|
13
|
+
class="d-flex flex-column mb-3"
|
|
14
|
+
name="role"
|
|
15
|
+
>
|
|
16
|
+
<label for="email" class="form-control-label">Email</label>
|
|
17
|
+
<el-input disabled v-model="email"></el-input>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
31
20
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
21
|
+
<div class="col-12 d-flex">
|
|
22
|
+
<div
|
|
23
|
+
id="role"
|
|
24
|
+
tag="div"
|
|
25
|
+
class="d-flex flex-column mb-3"
|
|
26
|
+
name="role"
|
|
27
|
+
>
|
|
39
28
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
29
|
+
<label for="role" class="form-control-label">Cargos</label>
|
|
30
|
+
<el-select
|
|
31
|
+
class="select-danger"
|
|
32
|
+
v-model="firstFieldValue"
|
|
33
|
+
:placeholder="''"
|
|
34
|
+
>
|
|
35
|
+
<el-option
|
|
36
|
+
v-for="role in roles"
|
|
37
|
+
:key="role.id"
|
|
38
|
+
:label="role.name"
|
|
39
|
+
:value="role.id"
|
|
40
|
+
>
|
|
41
|
+
</el-option>
|
|
42
|
+
</el-select>
|
|
43
|
+
</div>
|
|
54
44
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
45
|
+
<el-tooltip class="item" placement="top" :content="'Editar Cargo'">
|
|
46
|
+
<base-button size="md" type="link" class="text-primary h-25 my-auto px-2 w-auto"
|
|
47
|
+
@click="$emit('first-icon-click', { firstFieldText: firstFieldValue })">
|
|
48
|
+
<font-awesome-icon :icon="['fas', 'save']" class="mr-2" />
|
|
49
|
+
</base-button>
|
|
50
|
+
</el-tooltip>
|
|
51
|
+
</div>
|
|
52
|
+
|
|
53
|
+
<label for="trainings" class="col-12 form-control-label">Acesso aos Treinamentos</label>
|
|
54
|
+
<el-select v-model="newSelecteds"
|
|
55
|
+
id="trainings"
|
|
56
|
+
class="d-block col-12"
|
|
57
|
+
multiple
|
|
58
|
+
filterable
|
|
59
|
+
placeholder="Selecionar">
|
|
60
|
+
<el-option
|
|
61
|
+
v-for="item in itemsToSelect"
|
|
62
|
+
:key="`course-to-select-${item.id}`"
|
|
63
|
+
:value="item.id"
|
|
64
|
+
:label="item.name">
|
|
65
|
+
</el-option>
|
|
66
|
+
</el-select>
|
|
67
|
+
|
|
68
|
+
<div class="col-12">
|
|
69
|
+
<a @click.prevent="$emit('first-element-click')" class="btn btn-link text-danger cursor-pointer pl-0">Remover Aluno</a>
|
|
70
|
+
</div>
|
|
58
71
|
|
|
59
72
|
</modal>
|
|
60
73
|
</template>
|
|
61
74
|
<script>
|
|
62
|
-
import
|
|
63
|
-
import { Select, Option } from 'element-ui'
|
|
75
|
+
import { Select, Option } from 'element-ui';
|
|
64
76
|
export default {
|
|
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
|
-
|
|
77
|
+
components: {
|
|
78
|
+
[Select.name]: Select,
|
|
79
|
+
[Option.name]: Option
|
|
80
|
+
},
|
|
81
|
+
data() {
|
|
82
|
+
return {
|
|
83
|
+
firstFieldValue: this.propFirstFieldValue,
|
|
84
|
+
newSelecteds: [],
|
|
85
|
+
showModal: this.openModal,
|
|
86
|
+
};
|
|
87
|
+
},
|
|
88
|
+
props: {
|
|
89
|
+
propFirstFieldValue: {
|
|
90
|
+
type: String,
|
|
91
|
+
default: ''
|
|
92
|
+
},
|
|
93
|
+
email: {
|
|
94
|
+
type: String,
|
|
95
|
+
default: ''
|
|
96
|
+
},
|
|
97
|
+
roles: null,
|
|
98
|
+
openModal: false,
|
|
99
|
+
selecteds: {
|
|
100
|
+
type: Array,
|
|
101
|
+
default: () => []
|
|
102
|
+
},
|
|
103
|
+
itemsToSelect: {
|
|
104
|
+
type: Array,
|
|
105
|
+
default: () => []
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
methods:{
|
|
109
|
+
closeModal(){
|
|
110
|
+
this.$emit('close-modal');
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
watch: {
|
|
114
|
+
selecteds(newValue) {
|
|
115
|
+
this.newSelecteds = newValue;
|
|
116
|
+
},
|
|
117
|
+
newSelecteds(newValue) {
|
|
118
|
+
if (this.selecteds != newValue) {
|
|
119
|
+
this.$emit('change-selecteds', {
|
|
120
|
+
oldSelecteds: this.selecteds,
|
|
121
|
+
newSelecteds: newValue,
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
openModal(value) {
|
|
126
|
+
this.showModal = value;
|
|
127
|
+
},
|
|
128
|
+
propFirstFieldValue(value) {
|
|
129
|
+
this.firstFieldValue = value;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
};
|
|
117
133
|
</script>
|
|
118
134
|
<style lang="scss">
|
|
119
135
|
</style>
|
|
@@ -1,162 +1,162 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
2
|
+
<div class="card position-relative">
|
|
3
|
+
<div class="row px-4 justify-content-start">
|
|
4
|
+
<div class="col-12 col-md-8">
|
|
5
|
+
<label class="form-control-label d-block pt-1">
|
|
6
|
+
{{ `Pergunta #${position + 1}` }}
|
|
7
|
+
</label>
|
|
8
|
+
<html-editor
|
|
9
|
+
placeholder="Escreva uma pergunta"
|
|
10
|
+
:value="question.question"
|
|
11
|
+
v-on:input="setQuestion('question', $event)"
|
|
12
|
+
/>
|
|
13
|
+
</div>
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
15
|
+
<div class="col-12 col-md-4 mb-4 mb-md-0">
|
|
16
|
+
<label class="form-control-label d-block pt-1">
|
|
17
|
+
Tipo
|
|
18
|
+
</label>
|
|
19
|
+
<el-select
|
|
20
|
+
class="select-danger w-100"
|
|
21
|
+
placeholder="Escolha o tipo da pergunta"
|
|
22
|
+
v-on:change="emitQuestion"
|
|
23
|
+
v-model="question.question_type"
|
|
24
|
+
>
|
|
25
|
+
<el-option
|
|
26
|
+
v-for="option in listComponentes"
|
|
27
|
+
class="select-danger"
|
|
28
|
+
:value="option.value"
|
|
29
|
+
:label="option.label"
|
|
30
|
+
:key="option.label"
|
|
31
|
+
>
|
|
32
|
+
</el-option>
|
|
33
|
+
</el-select>
|
|
34
|
+
</div>
|
|
35
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
|
-
|
|
36
|
+
<div class="col-12 col-md-8 form-group">
|
|
37
|
+
<paragraph
|
|
38
|
+
v-if="question.question_type == 'paragraph'"
|
|
39
|
+
:data="question.max_char ? question.max_char : undefined"
|
|
40
|
+
v-on:data-changed="mergeDataQuestion"
|
|
41
|
+
/>
|
|
42
|
+
<question-radio
|
|
43
|
+
v-if="question.question_type == 'multiple'"
|
|
44
|
+
:data="question.multiples"
|
|
45
|
+
v-on:data-changed="mergeDataQuestion"
|
|
46
|
+
/>
|
|
47
|
+
<question-attach
|
|
48
|
+
v-if="question.question_type == 'annex'"
|
|
49
|
+
:data="question"
|
|
50
|
+
v-on:data-changed="mergeDataQuestion"
|
|
51
|
+
/>
|
|
52
|
+
</div>
|
|
53
|
+
<div class="col-12 text-right pb-2">
|
|
54
|
+
<ul class="question-icons list-inline">
|
|
55
|
+
<li
|
|
56
|
+
v-for="(icon, index) in icons"
|
|
57
|
+
:key="`question-icon-${position}-${index}`"
|
|
58
|
+
@click="$emit(icon.event)"
|
|
59
|
+
:class="`list-inline-item text-${icon.type}`"
|
|
60
|
+
>
|
|
61
|
+
<el-tooltip
|
|
62
|
+
class="item"
|
|
63
|
+
effect="dark"
|
|
64
|
+
:content="icon.alt"
|
|
65
|
+
placement="top"
|
|
66
|
+
>
|
|
67
|
+
<font-awesome-icon
|
|
68
|
+
:icon="icon.icon"
|
|
69
|
+
:class="`icon-${icon.type}`"
|
|
70
|
+
:title="icon.alt"
|
|
71
|
+
/>
|
|
72
|
+
</el-tooltip>
|
|
73
|
+
</li>
|
|
74
|
+
</ul>
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
78
|
</template>
|
|
79
79
|
|
|
80
80
|
<script>
|
|
81
|
-
import { Select, Option } from
|
|
82
|
-
import QuestionText from
|
|
83
|
-
import QuestionRadio from
|
|
84
|
-
import QuestionAttach from
|
|
85
|
-
import HtmlEditor from
|
|
81
|
+
import { Select, Option } from 'element-ui';
|
|
82
|
+
import QuestionText from '@burh/nuxt-core/components/burh-ds/Questions/QuestionText.vue';
|
|
83
|
+
import QuestionRadio from '@burh/nuxt-core/components/burh-ds/Questions/QuestionRadio.vue';
|
|
84
|
+
import QuestionAttach from '@burh/nuxt-core/components/burh-ds/Questions/QuestionAttach.vue';
|
|
85
|
+
import HtmlEditor from '@burh/nuxt-core/components/burh-ds/Inputs/HtmlEditor.vue';
|
|
86
86
|
|
|
87
87
|
export default {
|
|
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
|
-
|
|
88
|
+
components: {
|
|
89
|
+
[Select.name]: Select,
|
|
90
|
+
[Option.name]: Option,
|
|
91
|
+
Paragraph: QuestionText,
|
|
92
|
+
QuestionRadio,
|
|
93
|
+
QuestionAttach,
|
|
94
|
+
HtmlEditor
|
|
95
|
+
},
|
|
96
|
+
props: {
|
|
97
|
+
step: {
|
|
98
|
+
type: Number,
|
|
99
|
+
default: 0
|
|
100
|
+
},
|
|
101
|
+
position: {
|
|
102
|
+
type: Number,
|
|
103
|
+
default: 0
|
|
104
|
+
},
|
|
105
|
+
data: null,
|
|
106
|
+
icons: {
|
|
107
|
+
type: Array,
|
|
108
|
+
default: () => [
|
|
109
|
+
{
|
|
110
|
+
event: 'first-icon-click',
|
|
111
|
+
icon: ['far', 'copy'],
|
|
112
|
+
alt: 'Clonar questão',
|
|
113
|
+
type: 'primary'
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
event: 'second-icon-click',
|
|
117
|
+
icon: ['fas', 'trash-alt'],
|
|
118
|
+
alt: 'Remover questão',
|
|
119
|
+
type: 'danger'
|
|
120
|
+
}
|
|
121
|
+
]
|
|
122
|
+
},
|
|
123
|
+
listComponentes: {
|
|
124
|
+
type: Array,
|
|
125
|
+
default: () => [
|
|
126
|
+
{ value: 'paragraph', label: 'Paragrafo' },
|
|
127
|
+
{ value: 'multiple', label: 'Alternativa' },
|
|
128
|
+
{ value: 'annex', label: 'Anexo' }
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
data() {
|
|
133
|
+
return {
|
|
134
|
+
console: console,
|
|
135
|
+
question: this.data
|
|
136
|
+
};
|
|
137
|
+
},
|
|
138
|
+
watch: {
|
|
139
|
+
data(newValue) {
|
|
140
|
+
this.question = newValue;
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
methods: {
|
|
144
|
+
emitQuestion() {
|
|
145
|
+
this.$emit('change-question', this.question);
|
|
146
|
+
},
|
|
147
|
+
setQuestion(type, data) {
|
|
148
|
+
this.question[type] = data;
|
|
149
|
+
this.emitQuestion();
|
|
150
|
+
console.log(this.question);
|
|
151
|
+
},
|
|
152
|
+
mergeDataQuestion(data) {
|
|
153
|
+
this.question = { ...this.question, ...data };
|
|
154
|
+
this.emitQuestion();
|
|
155
|
+
},
|
|
156
|
+
isChangeTypeQuestion(value) {
|
|
157
|
+
return this.listComponentes.includes(value);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
160
|
};
|
|
161
161
|
</script>
|
|
162
162
|
|