@nixweb/nixloc-ui 0.0.240 → 0.0.242
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/package.json
CHANGED
|
@@ -48,14 +48,15 @@ export default {
|
|
|
48
48
|
color: black !important;
|
|
49
49
|
border-color: #e9e9e9 !important;
|
|
50
50
|
outline: none !important;
|
|
51
|
+
border-radius: 20px !important;
|
|
52
|
+
margin-left: 10px !important;
|
|
51
53
|
}
|
|
52
54
|
|
|
53
55
|
.selected {
|
|
54
|
-
background-color:
|
|
56
|
+
background-color: transparent !important;
|
|
55
57
|
}
|
|
56
58
|
|
|
57
59
|
.badge-button {
|
|
58
|
-
width: 20px;
|
|
59
60
|
height: 20px;
|
|
60
61
|
background-color: darkblue;
|
|
61
62
|
border-radius: 20px;
|
|
@@ -568,7 +568,7 @@ export default {
|
|
|
568
568
|
})
|
|
569
569
|
.then((response) => {
|
|
570
570
|
|
|
571
|
-
let blob = new Blob([response.data], { type:
|
|
571
|
+
let blob = new Blob([response.data], { type: `application/${params.obj.fileType}` });
|
|
572
572
|
let url = window.URL.createObjectURL(blob);
|
|
573
573
|
|
|
574
574
|
let downloadLink = document.createElement("a");
|
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<div v-if="multiSelected">
|
|
4
|
-
<div class="side-by-side icon-filter" @click="show = true">
|
|
5
|
-
<i class="fa-solid fa-circle-plus "></i>
|
|
6
|
-
<span class="title-users" v-if="currentValueFilter.length == 0"> Todos usuários</span>
|
|
7
|
-
</div>
|
|
8
|
-
|
|
9
|
-
<div class="side-by-side" v-for="user in currentValueFilter">
|
|
10
|
-
<img class="img-current" :src="baseUrl + user.photo" alt="">
|
|
11
|
-
<div class="side-by-side icon-close" @click="remove(user)">
|
|
12
|
-
<i class="fa-solid fa-do-not-enter"></i>
|
|
13
|
-
</div>
|
|
14
|
-
</div>
|
|
15
|
-
</div>
|
|
16
|
-
<div v-else class="div-current" @click="show = true">
|
|
17
|
-
<img class="img-current" :src="baseUrl + currentValue.photo" alt="">
|
|
18
|
-
</div>
|
|
19
|
-
<div v-if="show" class="main-select" @mouseleave="show = false">
|
|
20
|
-
<div v-for="item in data">
|
|
21
|
-
<div class="div-frame" @click="select(item)">
|
|
22
|
-
<b-row>
|
|
23
|
-
<b-col sm="3">
|
|
24
|
-
<img class="img-card" :src="baseUrl + item.photo" alt="">
|
|
25
|
-
</b-col>
|
|
26
|
-
<b-col sm="9">
|
|
27
|
-
<div class="title-name">{{ item.name }}</div>
|
|
28
|
-
</b-col>
|
|
29
|
-
</b-row>
|
|
30
|
-
</div>
|
|
31
|
-
</div>
|
|
32
|
-
</div>
|
|
33
|
-
</div>
|
|
34
|
-
</template>
|
|
35
|
-
<script>
|
|
36
|
-
|
|
37
|
-
import { mapActions } from "vuex";
|
|
38
|
-
|
|
39
|
-
export default {
|
|
40
|
-
name: "Select",
|
|
41
|
-
props: ["genericId", "responsibleUser", "multiSelected", "title", "urlGet", "urlUpdate", "value"],
|
|
42
|
-
data() {
|
|
43
|
-
return {
|
|
44
|
-
baseUrl: "https://espaco.blob.core.windows.net/nixloc-photo-user/",
|
|
45
|
-
currentValue: {},
|
|
46
|
-
currentValueFilter: [],
|
|
47
|
-
data: [],
|
|
48
|
-
show: false,
|
|
49
|
-
baseParams: {
|
|
50
|
-
search: "",
|
|
51
|
-
currentPage: 1,
|
|
52
|
-
totalPerPage: 20,
|
|
53
|
-
},
|
|
54
|
-
};
|
|
55
|
-
},
|
|
56
|
-
mounted() {
|
|
57
|
-
this.getAll();
|
|
58
|
-
},
|
|
59
|
-
methods: {
|
|
60
|
-
...mapActions("generic", ["getApi", "putApi"]),
|
|
61
|
-
getAll() {
|
|
62
|
-
let obj = { ...this.baseParams };
|
|
63
|
-
let params = { url: this.urlGet, obj: obj };
|
|
64
|
-
this.loading = true;
|
|
65
|
-
this.getApi(params).then((response) => {
|
|
66
|
-
this.data = response.content.data;
|
|
67
|
-
});
|
|
68
|
-
},
|
|
69
|
-
updateResponsibleUser() {
|
|
70
|
-
let params = {
|
|
71
|
-
url: this.urlUpdate,
|
|
72
|
-
obj: { id: this.genericId, userId: this.currentValue.id },
|
|
73
|
-
notNotifyToast: true
|
|
74
|
-
};
|
|
75
|
-
this.putApi(params).then((response) => { });
|
|
76
|
-
},
|
|
77
|
-
select(item) {
|
|
78
|
-
if (!this.multiSelected) {
|
|
79
|
-
this.currentValue = item;
|
|
80
|
-
} else {
|
|
81
|
-
const exists = this.currentValueFilter.some(x => x.id === item.id);
|
|
82
|
-
if (!exists)
|
|
83
|
-
this.currentValueFilter.push(item);
|
|
84
|
-
this.$emit("input", this.currentValueFilter);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
if (this.genericId) {
|
|
88
|
-
this.updateResponsibleUser();
|
|
89
|
-
this.$emit("input", this.currentValue);
|
|
90
|
-
}
|
|
91
|
-
this.show = false;
|
|
92
|
-
},
|
|
93
|
-
remove(item) {
|
|
94
|
-
this.currentValueFilter = this.currentValueFilter.filter(x => x.id !== item.id);
|
|
95
|
-
this.$emit("input", this.currentValueFilter);
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
watch: {
|
|
99
|
-
responsibleUser: {
|
|
100
|
-
handler(responsibleUser) {
|
|
101
|
-
this.currentValue = responsibleUser;
|
|
102
|
-
},
|
|
103
|
-
deep: true,
|
|
104
|
-
},
|
|
105
|
-
}
|
|
106
|
-
};
|
|
107
|
-
</script>
|
|
108
|
-
|
|
109
|
-
<style scoped>
|
|
110
|
-
.main-select {
|
|
111
|
-
position: fixed;
|
|
112
|
-
margin-left: 20px;
|
|
113
|
-
min-width: 250px;
|
|
114
|
-
background-color: white !important;
|
|
115
|
-
padding: 15px;
|
|
116
|
-
border: 1px solid #E8EAED;
|
|
117
|
-
border-radius: 10px;
|
|
118
|
-
cursor: pointer;
|
|
119
|
-
z-index: 1000 !important;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.div-frame:hover {
|
|
123
|
-
background-color: #F8F9FA !important;
|
|
124
|
-
border-radius: 10px;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.div-current {
|
|
128
|
-
cursor: pointer;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.title-name {
|
|
132
|
-
margin-top: 13px;
|
|
133
|
-
font-size: 13px;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
.title-users {
|
|
137
|
-
font-size: 14px;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
.img-card {
|
|
141
|
-
width: 35px;
|
|
142
|
-
height: 35px;
|
|
143
|
-
margin: 5px;
|
|
144
|
-
border-radius: 50px;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.img-current {
|
|
148
|
-
width: 30px;
|
|
149
|
-
height: 30px;
|
|
150
|
-
border-radius: 50px;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
.icon-filter {
|
|
154
|
-
font-size: 15px;
|
|
155
|
-
cursor: pointer;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
.icon-close {
|
|
159
|
-
color: red;
|
|
160
|
-
font-size: 13px;
|
|
161
|
-
cursor: pointer;
|
|
162
|
-
}
|
|
163
|
-
</style>
|
|
164
|
-
|