Skip to content

Commit 66f0370

Browse files
committed
R script new features
1 parent f34161c commit 66f0370

File tree

22 files changed

+1005
-16
lines changed

22 files changed

+1005
-16
lines changed

src/common/context.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ export const Context = {
66
DailyReport: 4,
77
TotalReport: 5,
88
Block: 6,
9-
BlockSuspended: 7
9+
BlockSuspended: 7,
10+
AddressLinkage: 8
1011
};

src/components/HeaderNav.vue

+4-4
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,18 @@
3838
shape="square"
3939
variant="outline"
4040
size="sm"
41-
color="success"
41+
color="primary"
4242
@click="Switch"
43-
>Toponimi</CButton
43+
>Indirizzi..</CButton
4444
>
4545
<CButton
4646
v-else
4747
shape="square"
4848
variant="outline"
4949
size="sm"
50-
color="primary"
50+
color="success"
5151
@click="Switch"
52-
>Indirizzi</CButton
52+
>Toponimi..</CButton
5353
>
5454
</div>
5555
<template v-if="isSupervisor">

src/components/SidebarToponimi.vue

+18
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,23 @@
108108
</a>
109109
</router-link>
110110
</li>
111+
<li class="c-sidebar-nav-item" v-if="isSupervisor">
112+
<router-link
113+
:to="{ name: 'ToponimoList', params: { state: 8 } }"
114+
class="c-sidebar-nav-link"
115+
:class="{ 'c-active c-active-primary': isAddressLinkage }"
116+
custom
117+
v-slot="{ href, navigate }"
118+
>
119+
<a :href="href" @click="navigate">
120+
<CIcon name="cilTerminal" class="c-sidebar-nav-icon" /> Linkage
121+
Probabilistico
122+
<!-- <span class="badge badge-warning"
123+
>{{ sospesi }} / {{ total }}</span
124+
> -->
125+
</a>
126+
</router-link>
127+
</li>
111128
<!-- <li class="c-sidebar-nav-title">Modifiche in blocco</li>
112129
<li class="c-sidebar-nav-item">
113130
<router-link
@@ -166,6 +183,7 @@ export default {
166183
isAddressToRevise: "isAddressToRevise",
167184
isAddressRevised: "isAddressRevised",
168185
isAddressSkip: "isAddressSkip",
186+
isAddressLinkage: "isAddressLinkage",
169187
isBlock: "isBlock",
170188
isBlockSuspended: "isBlockSuspended"
171189
}),

src/components/mixins/toponimo.mixin.js

+206
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,184 @@ export default {
8484
filter: false
8585
}
8686
],
87+
scriptFields: [
88+
{
89+
key: "idProcesso",
90+
label: "Id Processo",
91+
_style: "min-width:5%;",
92+
filter: false
93+
},
94+
{ key: "proCom", label: "Procom", filter: false },
95+
//{ key: "indirizzo", label: "Indirizzo", filter: false },
96+
{
97+
key: "comune",
98+
label: "Comune",
99+
_style: "width:5%;",
100+
filter: false
101+
},
102+
//{ key: "cdpsdr", label: "Cdpsdr", filter: false },
103+
{
104+
key: "localitax",
105+
label: "Localitax",
106+
_style: "min-width:20%;",
107+
filter: false
108+
},
109+
{
110+
key: "dugx",
111+
label: "Dugx",
112+
_style: "min-width:20%;",
113+
filter: false
114+
},
115+
{
116+
key: "dufx",
117+
label: "Dufx",
118+
_style: "width:4%;",
119+
filter: false
120+
},
121+
/* {
122+
key: "cdpstr",
123+
label: "Cdpstr",
124+
_style: "min-width:5%;",
125+
filter: false
126+
}, */
127+
{
128+
key: "localitay",
129+
label: "Localitay",
130+
_style: "width:5%",
131+
sorter: false,
132+
filter: false
133+
},
134+
{
135+
key: "dugy",
136+
label: "Dugy",
137+
_style: "min-width:5%;",
138+
filter: false
139+
},
140+
{
141+
key: "dufy",
142+
label: "Dufy",
143+
_style: "width:5%;",
144+
filter: false
145+
},
146+
{
147+
key: "dnc",
148+
label: "Dnc",
149+
_style: "width:5%",
150+
sorter: false,
151+
filter: false
152+
},
153+
{
154+
key: "dug",
155+
label: "Dug",
156+
_style: "width:4%;",
157+
filter: false
158+
},
159+
{
160+
key: "md",
161+
label: "Md",
162+
_style: "min-width:5%;",
163+
filter: false
164+
},
165+
{
166+
key: "w",
167+
label: "W",
168+
_style: "width:5%;",
169+
filter: false
170+
}
171+
/* {
172+
key: "vmax",
173+
label: "Vmax",
174+
_style: "width:5%",
175+
sorter: false,
176+
filter: false
177+
},
178+
{
179+
key: "falsipositivi",
180+
label: "Falsipositivi",
181+
_style: "min-width:5%;",
182+
filter: false
183+
},
184+
{
185+
key: "falsinegativi",
186+
label: "Falsinegativi",
187+
_style: "width:5%;",
188+
filter: false
189+
},
190+
{
191+
key: "denomProv",
192+
label: "DenomProv",
193+
_style: "width:5%",
194+
sorter: false,
195+
filter: false
196+
},
197+
{
198+
key: "codProv",
199+
label: "CodProv",
200+
_style: "width:5%;",
201+
filter: false
202+
},
203+
{
204+
key: "ordine",
205+
label: "Ordine",
206+
_style: "width:5%",
207+
sorter: false,
208+
filter: false
209+
} */
210+
],
211+
elencoScriptFields: [
212+
{
213+
key: "idProcesso",
214+
label: "Id Processo",
215+
_style: "min-width:5%;",
216+
filter: false
217+
},
218+
{
219+
key: "codiceArchivio",
220+
label: "Archivio",
221+
_style: "min-width:5%;",
222+
filter: false
223+
},
224+
//{ key: "indirizzo", label: "Indirizzo", filter: false },
225+
{
226+
key: "codiciProvincia",
227+
label: "Province",
228+
_style: "width:15%;",
229+
filter: false
230+
},
231+
//{ key: "cdpsdr", label: "Cdpsdr", filter: false },
232+
{
233+
key: "soglia",
234+
label: "Soglia",
235+
_style: "min-width:5%;",
236+
filter: false
237+
},
238+
{
239+
key: "dataInizio",
240+
label: "Inizio",
241+
_style: "min-width:5%;",
242+
filter: false
243+
},
244+
{
245+
key: "dataFine",
246+
label: "Termine",
247+
_style: "min-width:5%;",
248+
filter: false
249+
},
250+
{
251+
key: "stato",
252+
label: "Stato",
253+
_style: "width:5%",
254+
sorter: false,
255+
filter: false
256+
}
257+
/* {
258+
key: "esito",
259+
label: "Esito",
260+
_style: "width:5%",
261+
sorter: false,
262+
filter: false
263+
} */
264+
],
87265
blockFields: [
88266
{
89267
key: "selected",
@@ -220,6 +398,34 @@ export default {
220398
return "primary";
221399
}
222400
},
401+
getStatoColorScript(stato) {
402+
switch (stato) {
403+
case -1:
404+
return "warning";
405+
case 0:
406+
return "danger";
407+
case 1:
408+
return "success";
409+
default:
410+
return "primary";
411+
}
412+
},
413+
getStatoStringScript(stato, indice) {
414+
switch (stato) {
415+
case -1:
416+
return "Errore script";
417+
case 0:
418+
if (indice > 1) {
419+
return "Esecuzione abortita";
420+
}
421+
return "Esecuzione in corso..";
422+
423+
case 1:
424+
return "Completato";
425+
default:
426+
return "";
427+
}
428+
},
223429
getStatoString(stato, validazione) {
224430
switch (stato) {
225431
case 1:

src/coreui.js

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import {
2828
CTextarea,
2929
CButton,
3030
CAlert,
31+
CForm,
3132
CDataTable,
3233
CSwitch
3334
} from "@coreui/vue";
@@ -61,3 +62,4 @@ Vue.component("CButton", CButton);
6162
Vue.component("CAlert", CAlert);
6263
Vue.component("CDataTable", CDataTable);
6364
Vue.component("CSwitch", CSwitch);
65+
Vue.component("CForm", CForm);

src/http.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,12 @@ axiosRegedit.interceptors.response.use(
8787
} else {
8888
//Internal server error
8989
store.dispatch("error/serverError", error.response);
90-
router.push("/error");
90+
//router.push("/error");
91+
//outer.push("/catalogue/toponimo/view/8");
92+
var runningState = this.$store.getters["scriptRunning/isScriptRunning"]; //store.dispatch("scriptRunning/getScriptRunning");
93+
if (runningState == false) {
94+
router.push("/error");
95+
}
9196
}
9297
}
9398
return Promise.reject(error);

src/main.js

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import store from "@/store";
88
//Icons
99
import { iconsSet as icons } from "@/assets/icons/coreui.js";
1010
import "@/assets/icons/material";
11-
1211
//Vue global plugins
1312
import Vuelidate from "vuelidate";
1413
import vSelect from "vue-select";
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import { axiosRegedit } from "@/http";
2+
import AbstractService from "@/services/abstract.service";
3+
4+
class ElencoScriptService extends AbstractService {
5+
constructor(endpoint) {
6+
super(endpoint);
7+
}
8+
findElencoByUser() {
9+
{
10+
return axiosRegedit
11+
.get(this.endpoint + "/log-linkage-probabilistico")
12+
.then(res => {
13+
var data = res.data ? res.data : {};
14+
//console.log(data);
15+
return data;
16+
})
17+
.catch(err => {
18+
throw err;
19+
});
20+
}
21+
}
22+
}
23+
24+
export const elencoScriptService = new ElencoScriptService("/regedit");

src/services/index.js

+2
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@ export * from "./massive/massive.service";
1515
export * from "./massive/massiveTop.service";
1616
export * from "./massive/massiveTopVal.service";
1717
export * from "./exportCSV/exportCSV.service";
18+
export * from "./tabellaScript/tabellaScript.service";
19+
export * from "./elencoScript/elencoScript.service";

0 commit comments

Comments
 (0)