@nixweb/nixloc-ui 1.19.0 → 1.20.0
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/ButtonFilter.vue +104 -104
- package/src/component/forms/ButtonGroup.vue +66 -66
- package/src/component/forms/ButtonGroupInline.vue +210 -210
- package/src/component/forms/ButtonSub.vue +97 -97
- package/src/component/forms/ButtonToggle.vue +76 -76
- package/src/component/forms/DateYearMonth.vue +192 -192
- package/src/component/forms/ImageUpload.vue +214 -214
- package/src/component/forms/IncrementDecrement.vue +151 -151
- package/src/component/forms/InputAddressGoogle.vue +171 -171
- package/src/component/forms/InputCallToAction.vue +135 -135
- package/src/component/forms/InputDecimalDiscount.vue +146 -146
- package/src/component/forms/InputTag.vue +124 -124
- package/src/component/forms/InputTextEdit.vue +69 -69
- package/src/component/forms/InputWhatsApp.vue +47 -47
- package/src/component/forms/SideBar.vue +99 -99
- package/src/component/forms/Toggle.vue +72 -72
- package/src/component/layout/Account.vue +131 -131
- package/src/component/layout/AnimatedPhrase.vue +68 -68
- package/src/component/layout/BarFloating.vue +67 -67
- package/src/component/layout/BottomActionsBar.vue +205 -205
- package/src/component/layout/ColorPicker.vue +175 -175
- package/src/component/layout/Gantt.vue +128 -128
- package/src/component/layout/HideShow.vue +61 -61
- package/src/component/layout/IconMolded.vue +58 -58
- package/src/component/layout/IconPicker.vue +161 -161
- package/src/component/layout/NewAccount.vue +136 -136
- package/src/component/layout/NewHeader.vue +59 -59
- package/src/component/layout/NewIconMolded.vue +70 -70
- package/src/component/layout/NewMenu.vue +472 -472
- package/src/component/layout/Tab.vue +259 -259
- package/src/component/layout/Tag.vue +97 -97
- package/src/component/layout/Tooltip.vue +155 -155
- package/src/component/layout/Zoom.vue +111 -111
- package/src/component/rental/DisplayCalculatePeriod.vue +48 -48
- package/src/component/rental/DisplayPeriodRent.vue +55 -55
- package/src/component/rental/DisplayTotalization.vue +86 -86
- package/src/component/report/Fields.vue +108 -108
- package/src/component/report/Report.vue +377 -377
- package/src/component/report/ReportTable.vue +111 -111
- package/src/component/report/Totalization.vue +33 -33
- package/src/component/shared/CodeEditor.vue +128 -128
- package/src/component/shared/Confirmation.vue +74 -74
- package/src/component/shared/DocumentEditor.vue +99 -99
- package/src/component/shared/DocumentPreview.vue +105 -105
- package/src/component/shared/DocumentPublic.vue +33 -33
- package/src/component/shared/ExportExcel.vue +56 -56
- package/src/component/shared/FullCalendar.vue +175 -175
- package/src/component/shared/HeaderReport.vue +47 -47
- package/src/component/shared/ListNotifications.vue +70 -70
- package/src/component/shared/Loading.vue +1 -4
- package/src/component/shared/LoadingCard.vue +64 -64
- package/src/component/shared/ParameterLegend.vue +169 -169
- package/src/component/shared/Report.vue +250 -250
- package/src/component/shared/SaveCancel.vue +99 -117
- package/src/component/shared/SelectOption.vue +162 -162
- package/src/component/shared/TableDraggable.vue +117 -117
- package/src/component/shared/TableImport.vue +93 -93
- package/src/component/shared/TableItem.vue +228 -228
- package/src/component/shared/TableTotalPerPage.vue +114 -114
- package/src/component/shared/TableTotalRecords.vue +44 -44
- package/src/component/shared/TimeLine.vue +41 -41
- package/src/component/shared/Timer.vue +77 -77
- package/src/component/shared/ToggleTheme.vue +127 -127
- package/src/component/shared/TotalizationReport.vue +86 -86
- package/src/component/shared/actions/ActionButtons.vue +53 -53
- package/src/component/shared/actions/ActionErrorContent.vue +103 -103
- package/src/component/shared/actions/ActionFooter.vue +93 -99
- package/src/component/shared/actions/ActionHeader.vue +110 -110
- package/src/component/shared/actions/ActionItemList.vue +143 -143
- package/src/component/shared/actions/ActionsOptions.vue +209 -209
- package/src/component/shared/actions/ActionsSelected.vue +262 -262
- package/src/component/shared/automation/ActivitiesList.vue +43 -43
- package/src/component/shared/automation/AddRule.vue +60 -60
- package/src/component/shared/automation/AutomationBuilder.vue +26 -26
- package/src/component/shared/automation/DynamicComponentList.vue +85 -85
- package/src/component/shared/automation/SelectRule.vue +97 -97
- package/src/component/shared/automation/components/BillingByRent.vue +97 -97
- package/src/component/shared/automation/components/SendEmail.vue +93 -93
- package/src/component/shared/file-manager/FileManager.vue +390 -390
- package/src/component/shared/filter-builder/FilterBuilder.vue +220 -220
- package/src/component/shared/filter-builder/FilterQuery.vue +95 -95
- package/src/component/shared/query-builder/ConvertToOdata.js +86 -86
- package/src/component/shared/query-builder/DynamicComponent.vue +161 -161
- package/src/component/shared/query-builder/Fields.vue +93 -93
- package/src/component/shared/query-builder/Rules.vue +68 -68
- package/src/component/shared/query-builder/SelectRule.vue +97 -97
- package/src/component/shared/query-builder/Tags.vue +59 -59
- package/src/component/signature/Payment.vue +160 -160
- package/src/component/signature/Warning.vue +75 -75
- package/src/component/template/ReportCreateUpdate.vue +110 -110
- package/src/component/template/ViewTemplateDocumentView.vue +213 -213
- package/src/component/template/ViewTemplateImportFile.vue +347 -347
- package/src/component/template/ViewTemplateReportList.vue +240 -240
- package/src/component/template/ViewTemplateReportPreview.vue +521 -521
- package/src/component/template/ViewTemplateSelectOption.vue +46 -46
- package/src/component/template/model/Report.js +5 -5
- package/src/component/training/Course.vue +343 -343
- package/src/component/training/CourseView.vue +198 -198
- package/src/component/value-objects/Address.js +10 -10
- package/src/component/value-objects/Address.vue +173 -173
- package/src/component/value-objects/Contact.js +6 -6
- package/src/component/value-objects/Contact.vue +106 -106
- package/src/component/value-objects/Person.js +10 -10
- package/src/component/value-objects/Person.vue +130 -130
- package/src/store/modules/automation.js +30 -30
- package/src/store/modules/generic.js +15 -1
- package/src/store/modules/report.js +277 -277
- package/src/store/modules/user.js +69 -69
- package/src/store/modules/util.js +25 -25
|
@@ -1,110 +1,110 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<b-row>
|
|
4
|
-
<b-col sm="12">
|
|
5
|
-
<InputText title="Nome" field="name" :formName="formName" :required="true" :maxLength="40" v-model="report.name"
|
|
6
|
-
:markFormDirty="false" />
|
|
7
|
-
</b-col>
|
|
8
|
-
</b-row>
|
|
9
|
-
<b-row>
|
|
10
|
-
<b-col sm="12">
|
|
11
|
-
<div class="text-right">
|
|
12
|
-
<Button _key="btnSaveReport" type="success" title="Salvar" :disabled="!isFormValid(formName)"
|
|
13
|
-
classIcon="fas fa-save" size="medium" :clicked="saveReport" />
|
|
14
|
-
</div>
|
|
15
|
-
</b-col>
|
|
16
|
-
</b-row>
|
|
17
|
-
</div>
|
|
18
|
-
</template>
|
|
19
|
-
|
|
20
|
-
<script>
|
|
21
|
-
import InputText from "@nixweb/nixloc-ui/src/component/forms/InputText";
|
|
22
|
-
import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
|
|
23
|
-
|
|
24
|
-
import Report from "@nixweb/nixloc-ui/src/component/template/model/Report.js";
|
|
25
|
-
|
|
26
|
-
import { mapGetters, mapState, mapActions, mapMutations } from "vuex";
|
|
27
|
-
|
|
28
|
-
export default {
|
|
29
|
-
name: "ReportCreateUpdate",
|
|
30
|
-
components: { Button, InputText },
|
|
31
|
-
props: {
|
|
32
|
-
module: String,
|
|
33
|
-
},
|
|
34
|
-
data() {
|
|
35
|
-
return {
|
|
36
|
-
formName: "reportCreateUpdate",
|
|
37
|
-
report: new Report(),
|
|
38
|
-
urlCreate: "/api/v1/shared/report/create",
|
|
39
|
-
urlUpdate: "/api/v1/shared/report/update",
|
|
40
|
-
};
|
|
41
|
-
},
|
|
42
|
-
computed: {
|
|
43
|
-
...mapGetters("validation", ["isFormValid"]),
|
|
44
|
-
...mapGetters("generic", ["event"]),
|
|
45
|
-
...mapState("report", ["selectedFields", "selectedRules"]),
|
|
46
|
-
},
|
|
47
|
-
methods: {
|
|
48
|
-
...mapActions("generic", ["postApi", "putApi"]),
|
|
49
|
-
...mapMutations("generic", ["removeLoading", "addEvent", "hideModal"]),
|
|
50
|
-
...mapMutations("validation", ["resetValidation"]),
|
|
51
|
-
saveReport() {
|
|
52
|
-
var custom = this.report.id ? "" : "Custom";
|
|
53
|
-
const query = {
|
|
54
|
-
routeName: `${this.$route.name}${custom}`,
|
|
55
|
-
selectedFields: {
|
|
56
|
-
orderBy: this.selectedFields.orderBy,
|
|
57
|
-
selected: this.selectedFields.selected,
|
|
58
|
-
sort: this.selectedFields.sort,
|
|
59
|
-
},
|
|
60
|
-
selectedRules: this.selectedRules,
|
|
61
|
-
};
|
|
62
|
-
let obj = {
|
|
63
|
-
id: this.report.id,
|
|
64
|
-
name: this.report.name,
|
|
65
|
-
module: this.module,
|
|
66
|
-
query: JSON.stringify(query),
|
|
67
|
-
};
|
|
68
|
-
if (this.report.id) {
|
|
69
|
-
let params = { url: this.urlUpdate, obj: obj };
|
|
70
|
-
this.putApi(params).then((response) => {
|
|
71
|
-
if (response.success) {
|
|
72
|
-
this.sendEvent();
|
|
73
|
-
this.hideModal();
|
|
74
|
-
}
|
|
75
|
-
this.removeLoading(["btnSaveReport"]);
|
|
76
|
-
});
|
|
77
|
-
} else {
|
|
78
|
-
let params = { url: this.urlCreate, obj: obj };
|
|
79
|
-
this.postApi(params).then((response) => {
|
|
80
|
-
if (response.success) {
|
|
81
|
-
const query = JSON.parse(response.content.query);
|
|
82
|
-
this.$router.replace({
|
|
83
|
-
name: query.routeName,
|
|
84
|
-
params: { id: response.content.id, name: response.content.name },
|
|
85
|
-
});
|
|
86
|
-
this.sendEvent();
|
|
87
|
-
this.hideModal();
|
|
88
|
-
}
|
|
89
|
-
this.removeLoading(["btnSaveReport"]);
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
},
|
|
93
|
-
sendEvent() {
|
|
94
|
-
this.addEvent({ name: "savedReport" });
|
|
95
|
-
},
|
|
96
|
-
},
|
|
97
|
-
watch: {
|
|
98
|
-
event: {
|
|
99
|
-
handler(event) {
|
|
100
|
-
if (event.name == "saveReport") {
|
|
101
|
-
this.report.id = this.$route.params.id;
|
|
102
|
-
if (this.report.id) this.report.name = this.$route.params.name;
|
|
103
|
-
this.saveReport();
|
|
104
|
-
}
|
|
105
|
-
},
|
|
106
|
-
deep: true,
|
|
107
|
-
},
|
|
108
|
-
},
|
|
109
|
-
};
|
|
110
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<b-row>
|
|
4
|
+
<b-col sm="12">
|
|
5
|
+
<InputText title="Nome" field="name" :formName="formName" :required="true" :maxLength="40" v-model="report.name"
|
|
6
|
+
:markFormDirty="false" />
|
|
7
|
+
</b-col>
|
|
8
|
+
</b-row>
|
|
9
|
+
<b-row>
|
|
10
|
+
<b-col sm="12">
|
|
11
|
+
<div class="text-right">
|
|
12
|
+
<Button _key="btnSaveReport" type="success" title="Salvar" :disabled="!isFormValid(formName)"
|
|
13
|
+
classIcon="fas fa-save" size="medium" :clicked="saveReport" />
|
|
14
|
+
</div>
|
|
15
|
+
</b-col>
|
|
16
|
+
</b-row>
|
|
17
|
+
</div>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script>
|
|
21
|
+
import InputText from "@nixweb/nixloc-ui/src/component/forms/InputText";
|
|
22
|
+
import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
|
|
23
|
+
|
|
24
|
+
import Report from "@nixweb/nixloc-ui/src/component/template/model/Report.js";
|
|
25
|
+
|
|
26
|
+
import { mapGetters, mapState, mapActions, mapMutations } from "vuex";
|
|
27
|
+
|
|
28
|
+
export default {
|
|
29
|
+
name: "ReportCreateUpdate",
|
|
30
|
+
components: { Button, InputText },
|
|
31
|
+
props: {
|
|
32
|
+
module: String,
|
|
33
|
+
},
|
|
34
|
+
data() {
|
|
35
|
+
return {
|
|
36
|
+
formName: "reportCreateUpdate",
|
|
37
|
+
report: new Report(),
|
|
38
|
+
urlCreate: "/api/v1/shared/report/create",
|
|
39
|
+
urlUpdate: "/api/v1/shared/report/update",
|
|
40
|
+
};
|
|
41
|
+
},
|
|
42
|
+
computed: {
|
|
43
|
+
...mapGetters("validation", ["isFormValid"]),
|
|
44
|
+
...mapGetters("generic", ["event"]),
|
|
45
|
+
...mapState("report", ["selectedFields", "selectedRules"]),
|
|
46
|
+
},
|
|
47
|
+
methods: {
|
|
48
|
+
...mapActions("generic", ["postApi", "putApi"]),
|
|
49
|
+
...mapMutations("generic", ["removeLoading", "addEvent", "hideModal"]),
|
|
50
|
+
...mapMutations("validation", ["resetValidation"]),
|
|
51
|
+
saveReport() {
|
|
52
|
+
var custom = this.report.id ? "" : "Custom";
|
|
53
|
+
const query = {
|
|
54
|
+
routeName: `${this.$route.name}${custom}`,
|
|
55
|
+
selectedFields: {
|
|
56
|
+
orderBy: this.selectedFields.orderBy,
|
|
57
|
+
selected: this.selectedFields.selected,
|
|
58
|
+
sort: this.selectedFields.sort,
|
|
59
|
+
},
|
|
60
|
+
selectedRules: this.selectedRules,
|
|
61
|
+
};
|
|
62
|
+
let obj = {
|
|
63
|
+
id: this.report.id,
|
|
64
|
+
name: this.report.name,
|
|
65
|
+
module: this.module,
|
|
66
|
+
query: JSON.stringify(query),
|
|
67
|
+
};
|
|
68
|
+
if (this.report.id) {
|
|
69
|
+
let params = { url: this.urlUpdate, obj: obj };
|
|
70
|
+
this.putApi(params).then((response) => {
|
|
71
|
+
if (response.success) {
|
|
72
|
+
this.sendEvent();
|
|
73
|
+
this.hideModal();
|
|
74
|
+
}
|
|
75
|
+
this.removeLoading(["btnSaveReport"]);
|
|
76
|
+
});
|
|
77
|
+
} else {
|
|
78
|
+
let params = { url: this.urlCreate, obj: obj };
|
|
79
|
+
this.postApi(params).then((response) => {
|
|
80
|
+
if (response.success) {
|
|
81
|
+
const query = JSON.parse(response.content.query);
|
|
82
|
+
this.$router.replace({
|
|
83
|
+
name: query.routeName,
|
|
84
|
+
params: { id: response.content.id, name: response.content.name },
|
|
85
|
+
});
|
|
86
|
+
this.sendEvent();
|
|
87
|
+
this.hideModal();
|
|
88
|
+
}
|
|
89
|
+
this.removeLoading(["btnSaveReport"]);
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
sendEvent() {
|
|
94
|
+
this.addEvent({ name: "savedReport" });
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
watch: {
|
|
98
|
+
event: {
|
|
99
|
+
handler(event) {
|
|
100
|
+
if (event.name == "saveReport") {
|
|
101
|
+
this.report.id = this.$route.params.id;
|
|
102
|
+
if (this.report.id) this.report.name = this.$route.params.name;
|
|
103
|
+
this.saveReport();
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
deep: true,
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
};
|
|
110
|
+
</script>
|
|
@@ -1,213 +1,213 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<Panel :module="panel.module" :title="panel.title" :showFilter="panel.showFilter" :showSearch="panel.showSearch"
|
|
4
|
-
:showButtons="panel.showButtons">
|
|
5
|
-
<div slot="content-main">
|
|
6
|
-
<div>
|
|
7
|
-
<div class="div-top">
|
|
8
|
-
<Molded>
|
|
9
|
-
<b-row>
|
|
10
|
-
<b-col sm="6">
|
|
11
|
-
<div class="side-by-side">
|
|
12
|
-
<Button _key="saveDocument" type="success" title="Salvar" classIcon="fas fa-save"
|
|
13
|
-
:disabled="isDisabled" size="small" :clicked="saveDocument" />
|
|
14
|
-
</div>
|
|
15
|
-
<div class="side-by-side" v-if="showByRule">
|
|
16
|
-
<Button v-if="id" _key="saveAs" type="success" title="Clonar" classIcon="fas fa-clone" size="small"
|
|
17
|
-
:clicked="saveAs" />
|
|
18
|
-
</div>
|
|
19
|
-
</b-col>
|
|
20
|
-
<b-col class="text-right" sm="6">
|
|
21
|
-
<div class="side-by-side" v-if="id && showByRule">
|
|
22
|
-
<Button key="showModalConfig" type="info" classIcon="fa-solid fa-gear" size="small"
|
|
23
|
-
:clicked="showModalConfig" />
|
|
24
|
-
</div>
|
|
25
|
-
<div class="side-by-side" v-if="showByRule">
|
|
26
|
-
<Button key="showModalLegend" type="info" classIcon="fas fa-book-reader" size="small"
|
|
27
|
-
:clicked="showModalLegend" />
|
|
28
|
-
</div>
|
|
29
|
-
<div class="side-by-side" v-if="showByRule">
|
|
30
|
-
<Button key="showModalCode" type="info" classIcon="far fa-code" size="small"
|
|
31
|
-
:clicked="showModalCode" />
|
|
32
|
-
</div>
|
|
33
|
-
<div class="side-by-side">
|
|
34
|
-
<Button key="showModalPreview" type="info" title="Visualizar" classIcon="far fa-eye" size="small"
|
|
35
|
-
:clicked="showModalPreview" />
|
|
36
|
-
</div>
|
|
37
|
-
</b-col>
|
|
38
|
-
</b-row>
|
|
39
|
-
</Molded>
|
|
40
|
-
</div>
|
|
41
|
-
<Modal title="Salvar" :width="800" v-show="showModal('saveDocument')">
|
|
42
|
-
<slot></slot>
|
|
43
|
-
</Modal>
|
|
44
|
-
<Modal title="Parâmetros" :width="1100" v-show="showModal('legenda')">
|
|
45
|
-
<ParameterLegend v-show="modal.open" :legend="parameterLegend" :module="module" />
|
|
46
|
-
</Modal>
|
|
47
|
-
<Modal title="Editor de Código" :width="900" v-if="showModal('code')">
|
|
48
|
-
<CodeEditor v-if="modal.open" />
|
|
49
|
-
</Modal>
|
|
50
|
-
<Modal title="Visualizar" :width="1200" v-if="showModal('preview')">
|
|
51
|
-
<div v-if="modal.open">
|
|
52
|
-
<b-row>
|
|
53
|
-
<b-col class="text-center">
|
|
54
|
-
<Button v-if="false" v-print="'#printMe'" key="print" type="edit" title="Imprimir"
|
|
55
|
-
classIcon="fas fa-print" size="small" :clicked="print" />
|
|
56
|
-
</b-col>
|
|
57
|
-
</b-row>
|
|
58
|
-
<br />
|
|
59
|
-
<ScrollBar :minHeight="500" :maxHeight="500">
|
|
60
|
-
<div>
|
|
61
|
-
<div class="a4">
|
|
62
|
-
<div id="printMe">
|
|
63
|
-
<div :style="styleCss">
|
|
64
|
-
<DocumentPreview :template="documentPreview('dev')" :d="parameterExemple" />
|
|
65
|
-
</div>
|
|
66
|
-
</div>
|
|
67
|
-
</div>
|
|
68
|
-
</div>
|
|
69
|
-
</ScrollBar>
|
|
70
|
-
</div>
|
|
71
|
-
</Modal>
|
|
72
|
-
<div class="div-editor">
|
|
73
|
-
<Loading type="line" v-if="!showDocumentEditor" />
|
|
74
|
-
<DocumentEditor v-if="showDocumentEditor" />
|
|
75
|
-
</div>
|
|
76
|
-
</div>
|
|
77
|
-
</div>
|
|
78
|
-
</Panel>
|
|
79
|
-
</div>
|
|
80
|
-
</template>
|
|
81
|
-
|
|
82
|
-
<script>
|
|
83
|
-
import Panel from "@nixweb/nixloc-ui/src/component/layout/Panel";
|
|
84
|
-
import DocumentEditor from "@nixweb/nixloc-ui/src/component/shared/DocumentEditor.vue";
|
|
85
|
-
import DocumentPreview from "@nixweb/nixloc-ui/src/component/shared/DocumentPreview.vue";
|
|
86
|
-
import CodeEditor from "@nixweb/nixloc-ui/src/component/shared/CodeEditor.vue";
|
|
87
|
-
import ParameterLegend from "@nixweb/nixloc-ui/src/component/shared/ParameterLegend.vue";
|
|
88
|
-
import Molded from "@nixweb/nixloc-ui/src/component/layout/Molded";
|
|
89
|
-
import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
|
|
90
|
-
import Modal from "@nixweb/nixloc-ui/src/component/forms/Modal";
|
|
91
|
-
import ScrollBar from "@nixweb/nixloc-ui/src/component/layout/ScrollBar.vue";
|
|
92
|
-
import Loading from "@nixweb/nixloc-ui/src/component/shared/Loading.vue";
|
|
93
|
-
|
|
94
|
-
import print from "vue-print-nb";
|
|
95
|
-
|
|
96
|
-
import { mapState, mapGetters, mapMutations } from "vuex";
|
|
97
|
-
|
|
98
|
-
export default {
|
|
99
|
-
name: "ViewTemplateDocumentView",
|
|
100
|
-
directives: {
|
|
101
|
-
print,
|
|
102
|
-
},
|
|
103
|
-
components: {
|
|
104
|
-
Panel,
|
|
105
|
-
DocumentEditor,
|
|
106
|
-
DocumentPreview,
|
|
107
|
-
CodeEditor,
|
|
108
|
-
ParameterLegend,
|
|
109
|
-
Molded,
|
|
110
|
-
Loading,
|
|
111
|
-
Button,
|
|
112
|
-
Modal,
|
|
113
|
-
ScrollBar,
|
|
114
|
-
},
|
|
115
|
-
props: {
|
|
116
|
-
panel: Object,
|
|
117
|
-
parameterExemple: Object,
|
|
118
|
-
parameterLegend: Array,
|
|
119
|
-
styleCss: String,
|
|
120
|
-
module: String,
|
|
121
|
-
},
|
|
122
|
-
data() {
|
|
123
|
-
return {
|
|
124
|
-
id: this.$route.params.id,
|
|
125
|
-
isDisabled: true,
|
|
126
|
-
showDocumentEditor: false,
|
|
127
|
-
};
|
|
128
|
-
},
|
|
129
|
-
created() {
|
|
130
|
-
let self = this;
|
|
131
|
-
setTimeout(function () {
|
|
132
|
-
self.showDocumentEditor = true;
|
|
133
|
-
}, 1500);
|
|
134
|
-
},
|
|
135
|
-
computed: {
|
|
136
|
-
...mapState("user", ["userLogged"]),
|
|
137
|
-
...mapState("generic", ["modal", "documentHtml"]),
|
|
138
|
-
...mapGetters("generic", ["showModal", "event", "documentPreview"]),
|
|
139
|
-
showByRule() {
|
|
140
|
-
if (this.userLogged.user.userName == "UserTemp" || this.userLogged.companyId == 3)
|
|
141
|
-
return true;
|
|
142
|
-
return false;
|
|
143
|
-
},
|
|
144
|
-
},
|
|
145
|
-
methods: {
|
|
146
|
-
...mapMutations("generic", [
|
|
147
|
-
"openModal",
|
|
148
|
-
"hideModal",
|
|
149
|
-
"removeLoading",
|
|
150
|
-
"addEvent",
|
|
151
|
-
]),
|
|
152
|
-
saveDocument() {
|
|
153
|
-
if (this.id) {
|
|
154
|
-
this.addEvent({ name: "saveDocument" });
|
|
155
|
-
} else {
|
|
156
|
-
this.openModal("saveDocument");
|
|
157
|
-
this.removeLoading(["saveDocument"]);
|
|
158
|
-
}
|
|
159
|
-
},
|
|
160
|
-
saveAs() {
|
|
161
|
-
this.addEvent({ name: "saveAs" });
|
|
162
|
-
},
|
|
163
|
-
showModalConfig() {
|
|
164
|
-
this.openModal("saveDocument");
|
|
165
|
-
this.removeLoading(["showModalConfig"]);
|
|
166
|
-
},
|
|
167
|
-
showModalLegend() {
|
|
168
|
-
this.openModal("legenda");
|
|
169
|
-
this.removeLoading(["showModalLegend"]);
|
|
170
|
-
},
|
|
171
|
-
showModalCode() {
|
|
172
|
-
this.openModal("code");
|
|
173
|
-
this.removeLoading(["showModalCode"]);
|
|
174
|
-
},
|
|
175
|
-
showModalPreview() {
|
|
176
|
-
this.openModal("preview");
|
|
177
|
-
this.removeLoading(["showModalPreview"]);
|
|
178
|
-
},
|
|
179
|
-
print() {
|
|
180
|
-
this.removeLoading(["print"]);
|
|
181
|
-
},
|
|
182
|
-
},
|
|
183
|
-
watch: {
|
|
184
|
-
event: {
|
|
185
|
-
handler(event) {
|
|
186
|
-
if (event.name == "documentEditorModified") this.isDisabled = true;
|
|
187
|
-
if (event.name == "documentEditorChanged") this.isDisabled = false;
|
|
188
|
-
},
|
|
189
|
-
deep: true,
|
|
190
|
-
},
|
|
191
|
-
},
|
|
192
|
-
};
|
|
193
|
-
</script>
|
|
194
|
-
<style scoped>
|
|
195
|
-
.div-top {
|
|
196
|
-
margin-top: 30px;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
.div-editor {
|
|
200
|
-
margin-top: 25px;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
.a4 {
|
|
204
|
-
max-width: 1140px;
|
|
205
|
-
min-height: 21cm;
|
|
206
|
-
padding: 20px;
|
|
207
|
-
border: 1px hsl(0, 0%, 82.7%) solid;
|
|
208
|
-
border-radius: var(--ck-border-radius);
|
|
209
|
-
background: white;
|
|
210
|
-
box-shadow: 0 0 5px hsl(0deg 0% 0% / 10%);
|
|
211
|
-
margin: 0 auto;
|
|
212
|
-
}
|
|
213
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<Panel :module="panel.module" :title="panel.title" :showFilter="panel.showFilter" :showSearch="panel.showSearch"
|
|
4
|
+
:showButtons="panel.showButtons">
|
|
5
|
+
<div slot="content-main">
|
|
6
|
+
<div>
|
|
7
|
+
<div class="div-top">
|
|
8
|
+
<Molded>
|
|
9
|
+
<b-row>
|
|
10
|
+
<b-col sm="6">
|
|
11
|
+
<div class="side-by-side">
|
|
12
|
+
<Button _key="saveDocument" type="success" title="Salvar" classIcon="fas fa-save"
|
|
13
|
+
:disabled="isDisabled" size="small" :clicked="saveDocument" />
|
|
14
|
+
</div>
|
|
15
|
+
<div class="side-by-side" v-if="showByRule">
|
|
16
|
+
<Button v-if="id" _key="saveAs" type="success" title="Clonar" classIcon="fas fa-clone" size="small"
|
|
17
|
+
:clicked="saveAs" />
|
|
18
|
+
</div>
|
|
19
|
+
</b-col>
|
|
20
|
+
<b-col class="text-right" sm="6">
|
|
21
|
+
<div class="side-by-side" v-if="id && showByRule">
|
|
22
|
+
<Button key="showModalConfig" type="info" classIcon="fa-solid fa-gear" size="small"
|
|
23
|
+
:clicked="showModalConfig" />
|
|
24
|
+
</div>
|
|
25
|
+
<div class="side-by-side" v-if="showByRule">
|
|
26
|
+
<Button key="showModalLegend" type="info" classIcon="fas fa-book-reader" size="small"
|
|
27
|
+
:clicked="showModalLegend" />
|
|
28
|
+
</div>
|
|
29
|
+
<div class="side-by-side" v-if="showByRule">
|
|
30
|
+
<Button key="showModalCode" type="info" classIcon="far fa-code" size="small"
|
|
31
|
+
:clicked="showModalCode" />
|
|
32
|
+
</div>
|
|
33
|
+
<div class="side-by-side">
|
|
34
|
+
<Button key="showModalPreview" type="info" title="Visualizar" classIcon="far fa-eye" size="small"
|
|
35
|
+
:clicked="showModalPreview" />
|
|
36
|
+
</div>
|
|
37
|
+
</b-col>
|
|
38
|
+
</b-row>
|
|
39
|
+
</Molded>
|
|
40
|
+
</div>
|
|
41
|
+
<Modal title="Salvar" :width="800" v-show="showModal('saveDocument')">
|
|
42
|
+
<slot></slot>
|
|
43
|
+
</Modal>
|
|
44
|
+
<Modal title="Parâmetros" :width="1100" v-show="showModal('legenda')">
|
|
45
|
+
<ParameterLegend v-show="modal.open" :legend="parameterLegend" :module="module" />
|
|
46
|
+
</Modal>
|
|
47
|
+
<Modal title="Editor de Código" :width="900" v-if="showModal('code')">
|
|
48
|
+
<CodeEditor v-if="modal.open" />
|
|
49
|
+
</Modal>
|
|
50
|
+
<Modal title="Visualizar" :width="1200" v-if="showModal('preview')">
|
|
51
|
+
<div v-if="modal.open">
|
|
52
|
+
<b-row>
|
|
53
|
+
<b-col class="text-center">
|
|
54
|
+
<Button v-if="false" v-print="'#printMe'" key="print" type="edit" title="Imprimir"
|
|
55
|
+
classIcon="fas fa-print" size="small" :clicked="print" />
|
|
56
|
+
</b-col>
|
|
57
|
+
</b-row>
|
|
58
|
+
<br />
|
|
59
|
+
<ScrollBar :minHeight="500" :maxHeight="500">
|
|
60
|
+
<div>
|
|
61
|
+
<div class="a4">
|
|
62
|
+
<div id="printMe">
|
|
63
|
+
<div :style="styleCss">
|
|
64
|
+
<DocumentPreview :template="documentPreview('dev')" :d="parameterExemple" />
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
</ScrollBar>
|
|
70
|
+
</div>
|
|
71
|
+
</Modal>
|
|
72
|
+
<div class="div-editor">
|
|
73
|
+
<Loading type="line" v-if="!showDocumentEditor" />
|
|
74
|
+
<DocumentEditor v-if="showDocumentEditor" />
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
</Panel>
|
|
79
|
+
</div>
|
|
80
|
+
</template>
|
|
81
|
+
|
|
82
|
+
<script>
|
|
83
|
+
import Panel from "@nixweb/nixloc-ui/src/component/layout/Panel";
|
|
84
|
+
import DocumentEditor from "@nixweb/nixloc-ui/src/component/shared/DocumentEditor.vue";
|
|
85
|
+
import DocumentPreview from "@nixweb/nixloc-ui/src/component/shared/DocumentPreview.vue";
|
|
86
|
+
import CodeEditor from "@nixweb/nixloc-ui/src/component/shared/CodeEditor.vue";
|
|
87
|
+
import ParameterLegend from "@nixweb/nixloc-ui/src/component/shared/ParameterLegend.vue";
|
|
88
|
+
import Molded from "@nixweb/nixloc-ui/src/component/layout/Molded";
|
|
89
|
+
import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
|
|
90
|
+
import Modal from "@nixweb/nixloc-ui/src/component/forms/Modal";
|
|
91
|
+
import ScrollBar from "@nixweb/nixloc-ui/src/component/layout/ScrollBar.vue";
|
|
92
|
+
import Loading from "@nixweb/nixloc-ui/src/component/shared/Loading.vue";
|
|
93
|
+
|
|
94
|
+
import print from "vue-print-nb";
|
|
95
|
+
|
|
96
|
+
import { mapState, mapGetters, mapMutations } from "vuex";
|
|
97
|
+
|
|
98
|
+
export default {
|
|
99
|
+
name: "ViewTemplateDocumentView",
|
|
100
|
+
directives: {
|
|
101
|
+
print,
|
|
102
|
+
},
|
|
103
|
+
components: {
|
|
104
|
+
Panel,
|
|
105
|
+
DocumentEditor,
|
|
106
|
+
DocumentPreview,
|
|
107
|
+
CodeEditor,
|
|
108
|
+
ParameterLegend,
|
|
109
|
+
Molded,
|
|
110
|
+
Loading,
|
|
111
|
+
Button,
|
|
112
|
+
Modal,
|
|
113
|
+
ScrollBar,
|
|
114
|
+
},
|
|
115
|
+
props: {
|
|
116
|
+
panel: Object,
|
|
117
|
+
parameterExemple: Object,
|
|
118
|
+
parameterLegend: Array,
|
|
119
|
+
styleCss: String,
|
|
120
|
+
module: String,
|
|
121
|
+
},
|
|
122
|
+
data() {
|
|
123
|
+
return {
|
|
124
|
+
id: this.$route.params.id,
|
|
125
|
+
isDisabled: true,
|
|
126
|
+
showDocumentEditor: false,
|
|
127
|
+
};
|
|
128
|
+
},
|
|
129
|
+
created() {
|
|
130
|
+
let self = this;
|
|
131
|
+
setTimeout(function () {
|
|
132
|
+
self.showDocumentEditor = true;
|
|
133
|
+
}, 1500);
|
|
134
|
+
},
|
|
135
|
+
computed: {
|
|
136
|
+
...mapState("user", ["userLogged"]),
|
|
137
|
+
...mapState("generic", ["modal", "documentHtml"]),
|
|
138
|
+
...mapGetters("generic", ["showModal", "event", "documentPreview"]),
|
|
139
|
+
showByRule() {
|
|
140
|
+
if (this.userLogged.user.userName == "UserTemp" || this.userLogged.companyId == 3)
|
|
141
|
+
return true;
|
|
142
|
+
return false;
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
methods: {
|
|
146
|
+
...mapMutations("generic", [
|
|
147
|
+
"openModal",
|
|
148
|
+
"hideModal",
|
|
149
|
+
"removeLoading",
|
|
150
|
+
"addEvent",
|
|
151
|
+
]),
|
|
152
|
+
saveDocument() {
|
|
153
|
+
if (this.id) {
|
|
154
|
+
this.addEvent({ name: "saveDocument" });
|
|
155
|
+
} else {
|
|
156
|
+
this.openModal("saveDocument");
|
|
157
|
+
this.removeLoading(["saveDocument"]);
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
saveAs() {
|
|
161
|
+
this.addEvent({ name: "saveAs" });
|
|
162
|
+
},
|
|
163
|
+
showModalConfig() {
|
|
164
|
+
this.openModal("saveDocument");
|
|
165
|
+
this.removeLoading(["showModalConfig"]);
|
|
166
|
+
},
|
|
167
|
+
showModalLegend() {
|
|
168
|
+
this.openModal("legenda");
|
|
169
|
+
this.removeLoading(["showModalLegend"]);
|
|
170
|
+
},
|
|
171
|
+
showModalCode() {
|
|
172
|
+
this.openModal("code");
|
|
173
|
+
this.removeLoading(["showModalCode"]);
|
|
174
|
+
},
|
|
175
|
+
showModalPreview() {
|
|
176
|
+
this.openModal("preview");
|
|
177
|
+
this.removeLoading(["showModalPreview"]);
|
|
178
|
+
},
|
|
179
|
+
print() {
|
|
180
|
+
this.removeLoading(["print"]);
|
|
181
|
+
},
|
|
182
|
+
},
|
|
183
|
+
watch: {
|
|
184
|
+
event: {
|
|
185
|
+
handler(event) {
|
|
186
|
+
if (event.name == "documentEditorModified") this.isDisabled = true;
|
|
187
|
+
if (event.name == "documentEditorChanged") this.isDisabled = false;
|
|
188
|
+
},
|
|
189
|
+
deep: true,
|
|
190
|
+
},
|
|
191
|
+
},
|
|
192
|
+
};
|
|
193
|
+
</script>
|
|
194
|
+
<style scoped>
|
|
195
|
+
.div-top {
|
|
196
|
+
margin-top: 30px;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.div-editor {
|
|
200
|
+
margin-top: 25px;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.a4 {
|
|
204
|
+
max-width: 1140px;
|
|
205
|
+
min-height: 21cm;
|
|
206
|
+
padding: 20px;
|
|
207
|
+
border: 1px hsl(0, 0%, 82.7%) solid;
|
|
208
|
+
border-radius: var(--ck-border-radius);
|
|
209
|
+
background: white;
|
|
210
|
+
box-shadow: 0 0 5px hsl(0deg 0% 0% / 10%);
|
|
211
|
+
margin: 0 auto;
|
|
212
|
+
}
|
|
213
|
+
</style>
|