@nixweb/nixloc-ui 0.0.159 → 0.0.160
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 +0 -9
- package/src/component/template/ViewTemplateImportFile.vue +1 -0
- 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>
|
|
@@ -185,15 +185,6 @@ export default {
|
|
|
185
185
|
setTimeout(function () {
|
|
186
186
|
self.showDocumentEditor = true;
|
|
187
187
|
}, 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
188
|
},
|
|
198
189
|
computed: {
|
|
199
190
|
...mapState("generic", ["modal", "documentHtml"]),
|
|
@@ -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>
|