@nixweb/nixloc-ui 0.0.159 → 0.0.161
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 +1 -1
- package/src/component/forms/ImageUpload.vue +10 -8
- package/src/component/shared/DocumentEditor.vue +1 -1
- package/src/component/template/ViewTemplateDocumentView.vue +11 -16
- package/src/component/template/ViewTemplateImportFile.vue +1 -0
- package/src/component/template/ViewTemplateReportPreview.vue +5 -2
- package/src/store/modules/generic.js +1 -1
- package/src/component/forms/Tree.vue +0 -153
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<div class="div-preview">
|
|
16
16
|
<img
|
|
17
17
|
:class="classCss"
|
|
18
|
-
:style="'width:
|
|
18
|
+
:style="'width:' + width + 'px;height:' + height + 'px'"
|
|
19
19
|
:src="
|
|
20
20
|
'https://espaco.blob.core.windows.net/' +
|
|
21
21
|
container +
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
<div class="div-button">
|
|
30
30
|
<button class="button small primary" @click="show = !show">
|
|
31
31
|
<span v-if="!loadingAdd">
|
|
32
|
-
<span><i class="fas fa-camera"></i>
|
|
32
|
+
<span><i class="fas fa-camera"></i> {{ title }}</span>
|
|
33
33
|
</span>
|
|
34
34
|
</button>
|
|
35
35
|
</div>
|
|
@@ -61,11 +61,12 @@
|
|
|
61
61
|
@crop-success="cropSuccess"
|
|
62
62
|
langType="pt-br"
|
|
63
63
|
v-model="show"
|
|
64
|
-
:width="
|
|
65
|
-
:height="
|
|
64
|
+
:width="width"
|
|
65
|
+
:height="height"
|
|
66
66
|
:noCircle="true"
|
|
67
67
|
img-format="png"
|
|
68
|
-
|
|
68
|
+
>
|
|
69
|
+
</my-upload>
|
|
69
70
|
</div>
|
|
70
71
|
</template>
|
|
71
72
|
<script>
|
|
@@ -77,12 +78,13 @@ export default {
|
|
|
77
78
|
name: "ImageUpload",
|
|
78
79
|
components: {
|
|
79
80
|
"my-upload": myUpload,
|
|
80
|
-
VueCropper,
|
|
81
81
|
},
|
|
82
82
|
props: {
|
|
83
83
|
title: String,
|
|
84
84
|
container: String,
|
|
85
85
|
accepted: String,
|
|
86
|
+
width: Number,
|
|
87
|
+
height: Number,
|
|
86
88
|
classCss: String,
|
|
87
89
|
urlPost: String,
|
|
88
90
|
urlRemove: String,
|
|
@@ -102,7 +104,7 @@ export default {
|
|
|
102
104
|
computed: {
|
|
103
105
|
urlImage() {
|
|
104
106
|
if (this.value) return this.value;
|
|
105
|
-
return "noImage.
|
|
107
|
+
return "noImage.png";
|
|
106
108
|
},
|
|
107
109
|
},
|
|
108
110
|
methods: {
|
|
@@ -235,6 +237,6 @@ export default {
|
|
|
235
237
|
}
|
|
236
238
|
|
|
237
239
|
.div-button {
|
|
238
|
-
margin-left:
|
|
240
|
+
margin-left: 10px;
|
|
239
241
|
}
|
|
240
242
|
</style>
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
:clicked="saveDocument"
|
|
25
25
|
/>
|
|
26
26
|
</div>
|
|
27
|
-
<div class="side-by-side">
|
|
27
|
+
<div class="side-by-side" v-if="showByRule">
|
|
28
28
|
<Button
|
|
29
29
|
v-if="id"
|
|
30
30
|
_key="saveAs"
|
|
31
31
|
type="success"
|
|
32
|
-
title="
|
|
32
|
+
title="Clonar"
|
|
33
33
|
classIcon="fas fa-clone"
|
|
34
34
|
size="small"
|
|
35
35
|
:clicked="saveAs"
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
</div>
|
|
38
38
|
</b-col>
|
|
39
39
|
<b-col class="text-right" sm="6">
|
|
40
|
-
<div class="side-by-side" v-if="id">
|
|
40
|
+
<div class="side-by-side" v-if="id && showByRule">
|
|
41
41
|
<Button
|
|
42
42
|
key="showModalConfig"
|
|
43
43
|
type="info"
|
|
@@ -46,20 +46,18 @@
|
|
|
46
46
|
:clicked="showModalConfig"
|
|
47
47
|
/>
|
|
48
48
|
</div>
|
|
49
|
-
<div class="side-by-side">
|
|
49
|
+
<div class="side-by-side" v-if="showByRule">
|
|
50
50
|
<Button
|
|
51
51
|
key="showModalLegend"
|
|
52
|
-
title="Parâmetros"
|
|
53
52
|
type="info"
|
|
54
53
|
classIcon="fas fa-book-reader"
|
|
55
54
|
size="small"
|
|
56
55
|
:clicked="showModalLegend"
|
|
57
56
|
/>
|
|
58
57
|
</div>
|
|
59
|
-
<div class="side-by-side">
|
|
58
|
+
<div class="side-by-side" v-if="showByRule">
|
|
60
59
|
<Button
|
|
61
60
|
key="showModalCode"
|
|
62
|
-
title="Código"
|
|
63
61
|
type="info"
|
|
64
62
|
classIcon="far fa-code"
|
|
65
63
|
size="small"
|
|
@@ -185,19 +183,16 @@ export default {
|
|
|
185
183
|
setTimeout(function () {
|
|
186
184
|
self.showDocumentEditor = true;
|
|
187
185
|
}, 1500);
|
|
188
|
-
window.addEventListener("keydown", (e) => {
|
|
189
|
-
if (e.key == "Alt") {
|
|
190
|
-
if (this.modal.open) {
|
|
191
|
-
this.hideModal();
|
|
192
|
-
} else {
|
|
193
|
-
this.showModalLegend();
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
});
|
|
197
186
|
},
|
|
198
187
|
computed: {
|
|
188
|
+
...mapState("user", ["userLogged"]),
|
|
199
189
|
...mapState("generic", ["modal", "documentHtml"]),
|
|
200
190
|
...mapGetters("generic", ["showModal", "event", "documentPreview"]),
|
|
191
|
+
showByRule() {
|
|
192
|
+
if (this.userLogged.user == "UserTemp" || this.userLogged.companyId == 3)
|
|
193
|
+
return true;
|
|
194
|
+
return false;
|
|
195
|
+
},
|
|
201
196
|
},
|
|
202
197
|
methods: {
|
|
203
198
|
...mapMutations("generic", [
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<br />
|
|
12
12
|
<div
|
|
13
13
|
class="div-progress"
|
|
14
|
-
v-if="liveTotalRecords != baseParams.totalRecords"
|
|
14
|
+
v-if="liveTotalRecords != baseParams.totalRecords && isLoading"
|
|
15
15
|
>
|
|
16
16
|
<ProgressBar
|
|
17
17
|
:text="`Carregando ${liveTotalRecords} registro(s) de ${baseParams.totalRecords}`"
|
|
@@ -241,6 +241,7 @@ export default {
|
|
|
241
241
|
this.resetData();
|
|
242
242
|
|
|
243
243
|
this.getApiOdata(paramsQuery).then((response) => {
|
|
244
|
+
this.isLoading = true;
|
|
244
245
|
let totalRecords = response["@odata.count"];
|
|
245
246
|
if (totalRecords == 0) this.noDataReturned = true;
|
|
246
247
|
|
|
@@ -291,7 +292,7 @@ export default {
|
|
|
291
292
|
this.baseParams.currentPage++;
|
|
292
293
|
},
|
|
293
294
|
resetData() {
|
|
294
|
-
this.isLoading =
|
|
295
|
+
this.isLoading = false;
|
|
295
296
|
this.content.data = [];
|
|
296
297
|
this.content.totalPages = [];
|
|
297
298
|
this.baseParams.currentPage = 0;
|
|
@@ -370,6 +371,8 @@ export default {
|
|
|
370
371
|
handler(totalPages) {
|
|
371
372
|
this.btnSearchDisabled = false;
|
|
372
373
|
this.btnSaveDisabled = false;
|
|
374
|
+
this.showBodyReport = false;
|
|
375
|
+
this.resetData();
|
|
373
376
|
},
|
|
374
377
|
deep: true,
|
|
375
378
|
},
|
|
@@ -148,7 +148,7 @@ export default {
|
|
|
148
148
|
obj.vForSimple = "v-for='endereco in d.locacao.cliente.endereco'";
|
|
149
149
|
config.push(obj);
|
|
150
150
|
} else if (isAddressRent) {
|
|
151
|
-
obj.vForSimple = "v-for='endereco in d.
|
|
151
|
+
obj.vForSimple = "v-for='endereco in d.saidaRetorno'";
|
|
152
152
|
config.push(obj);
|
|
153
153
|
} else {
|
|
154
154
|
config.push(obj);
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<div class="div-btn">
|
|
4
|
-
<Button
|
|
5
|
-
_key="btnAddTree"
|
|
6
|
-
title="Categoria"
|
|
7
|
-
classIcon="fas fa-plus-circle"
|
|
8
|
-
type="primary"
|
|
9
|
-
size="small"
|
|
10
|
-
:clicked="addNode"
|
|
11
|
-
/>
|
|
12
|
-
</div>
|
|
13
|
-
<div v-show="!data.children">
|
|
14
|
-
<span>Nenhum registro encontrado!</span>
|
|
15
|
-
</div>
|
|
16
|
-
<vue-tree-list
|
|
17
|
-
@click="onClick"
|
|
18
|
-
@change-name="onChangeName"
|
|
19
|
-
@delete-node="onDel"
|
|
20
|
-
@add-node="onAddNode"
|
|
21
|
-
:model="data"
|
|
22
|
-
default-tree-node-name="Novo Centro de Custo"
|
|
23
|
-
default-leaf-node-name="Novo Plano de Conta"
|
|
24
|
-
v-bind:default-expanded="false"
|
|
25
|
-
>
|
|
26
|
-
<template v-slot:leafNameDisplay="slotProps">
|
|
27
|
-
<span>
|
|
28
|
-
{{ slotProps.model.name }}
|
|
29
|
-
</span>
|
|
30
|
-
</template>
|
|
31
|
-
<span class="icon" slot="addTreeNodeIcon">📂</span>
|
|
32
|
-
<span class="icon" slot="addLeafNodeIcon">
|
|
33
|
-
<i class="icon-tree icon-add fa-solid fa-circle-plus"></i>
|
|
34
|
-
</span>
|
|
35
|
-
<span class="icon" slot="editNodeIcon">
|
|
36
|
-
<i class="icon-tree icon-edit fa-solid fa-pen-to-square"></i>
|
|
37
|
-
</span>
|
|
38
|
-
<span class="icon" slot="delNodeIcon">
|
|
39
|
-
<i class="icon-tree icon-delete fa-solid fa-trash"></i>
|
|
40
|
-
</span>
|
|
41
|
-
<span class="icon" slot="leafNodeIcon">
|
|
42
|
-
<i class="icon-tree fa-solid fa-arrow-right"></i>
|
|
43
|
-
</span>
|
|
44
|
-
<span class="icon" slot="treeNodeIcon"> </span>
|
|
45
|
-
</vue-tree-list>
|
|
46
|
-
</div>
|
|
47
|
-
</template>
|
|
48
|
-
|
|
49
|
-
<script>
|
|
50
|
-
import { VueTreeList, Tree, TreeNode } from "vue-tree-list";
|
|
51
|
-
import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
|
|
52
|
-
|
|
53
|
-
import { mapMutations } from "vuex";
|
|
54
|
-
|
|
55
|
-
export default {
|
|
56
|
-
components: {
|
|
57
|
-
VueTreeList,
|
|
58
|
-
Button,
|
|
59
|
-
},
|
|
60
|
-
data() {
|
|
61
|
-
return {
|
|
62
|
-
newTree: {},
|
|
63
|
-
data: new Tree([]),
|
|
64
|
-
};
|
|
65
|
-
},
|
|
66
|
-
methods: {
|
|
67
|
-
...mapMutations("generic", ["removeLoading"]),
|
|
68
|
-
onDel(node) {
|
|
69
|
-
// console.log(node);
|
|
70
|
-
node.remove();
|
|
71
|
-
},
|
|
72
|
-
onChangeName(params) {
|
|
73
|
-
if (params.eventType == "blur") {
|
|
74
|
-
this.getNewTree();
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
onAddNode(params) {
|
|
78
|
-
// console.log(params);
|
|
79
|
-
},
|
|
80
|
-
onClick(params) {
|
|
81
|
-
// console.log(params);
|
|
82
|
-
},
|
|
83
|
-
addNode() {
|
|
84
|
-
var node = new TreeNode({
|
|
85
|
-
name: "Novo Centro de Custo",
|
|
86
|
-
dragDisabled: true,
|
|
87
|
-
addTreeNodeDisabled: true,
|
|
88
|
-
addLeafNodeDisabled: false,
|
|
89
|
-
editNodeDisabled: false,
|
|
90
|
-
delNodeDisabled: false,
|
|
91
|
-
});
|
|
92
|
-
if (!this.data.children) this.data.children = [];
|
|
93
|
-
this.data.addChildren(node);
|
|
94
|
-
this.removeLoading(["btnAddTree"]);
|
|
95
|
-
},
|
|
96
|
-
|
|
97
|
-
getNewTree() {
|
|
98
|
-
var vm = this;
|
|
99
|
-
function _dfs(oldNode) {
|
|
100
|
-
var newNode = {};
|
|
101
|
-
|
|
102
|
-
for (var k in oldNode) {
|
|
103
|
-
if (k !== "children" && k !== "parent") {
|
|
104
|
-
newNode[k] = oldNode[k];
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
if (oldNode.children && oldNode.children.length > 0) {
|
|
109
|
-
newNode.children = [];
|
|
110
|
-
for (var i = 0, len = oldNode.children.length; i < len; i++) {
|
|
111
|
-
newNode.children.push(_dfs(oldNode.children[i]));
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
if (newNode.isLeaf == false && newNode.id == 0) return newNode;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
vm.newTree = _dfs(vm.data);
|
|
118
|
-
},
|
|
119
|
-
},
|
|
120
|
-
};
|
|
121
|
-
</script>
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
<style scoped>
|
|
125
|
-
.div-btn {
|
|
126
|
-
color: gray;
|
|
127
|
-
font-size: 80%;
|
|
128
|
-
margin-bottom: 20px;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.icon-add {
|
|
132
|
-
color: #577696 !important;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
.icon-edit {
|
|
136
|
-
color: darkgray !important;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
.icon-delete {
|
|
140
|
-
color: red !important;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
.icon-tree {
|
|
144
|
-
font-size: 15px;
|
|
145
|
-
margin-right: 10px;
|
|
146
|
-
cursor: pointer;
|
|
147
|
-
color: #232324;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.vtl-input {
|
|
151
|
-
background-color: red !important;
|
|
152
|
-
}
|
|
153
|
-
</style>
|