-
+
{{'history-item_warmup' | localize("tempo riscaldo")}}
{{Math.floor(value.timeWarm / 60) | round(0)}}'{{value.timeWarm % 60 | round(0)}}''
@@ -22,7 +22,7 @@
-
\ No newline at end of file
+
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/dashboard/base-components/stats.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/dashboard/base-components/stats.ts
index 361dedd7..98352859 100644
--- a/Thermo.Active/wwwroot/src/app_modules_thermo/dashboard/base-components/stats.ts
+++ b/Thermo.Active/wwwroot/src/app_modules_thermo/dashboard/base-components/stats.ts
@@ -14,10 +14,12 @@ export default class stats extends Vue {
for (const i in this.value) {
r.push(this.value[i])
}
- return r;
+ return r.slice(Math.max(r.length - 20, 0));
}
+ @Prop()
+ maxNumDone: number;
get min() {
return Math.min(...this.Values);
@@ -28,7 +30,7 @@ export default class stats extends Vue {
}
get delta() {
- return this.max - this.min;
+ return Math.max(this.max - this.min, 1);
}
@Prop({ default: 400 })
@@ -43,7 +45,7 @@ export default class stats extends Vue {
"M", 0, (this.Values[0] - this.min) * this.height / this.delta,
"S"
]
- d.push(...this.Values.slice(1).map((v, idx) => `${idx * (this.width / this.Values.length)} ${this.height - (v - this.min) * this.height / this.delta}`))
+ d.push(...this.Values.map((v, idx) => `${idx * (this.width / 19)} ${this.height - (v - this.min) * this.height / this.delta}`))
d.push()
return d.join(" ");
}
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/dashboard/base-components/stats.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/dashboard/base-components/stats.vue
index 3cfb8386..fbc88a30 100644
--- a/Thermo.Active/wwwroot/src/app_modules_thermo/dashboard/base-components/stats.vue
+++ b/Thermo.Active/wwwroot/src/app_modules_thermo/dashboard/base-components/stats.vue
@@ -1,14 +1,67 @@
-
-
\ No newline at end of file
+
+
\ No newline at end of file
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/dashboard/dashboard.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/dashboard/dashboard.ts
index 9391e9de..ba2cece8 100644
--- a/Thermo.Active/wwwroot/src/app_modules_thermo/dashboard/dashboard.ts
+++ b/Thermo.Active/wwwroot/src/app_modules_thermo/dashboard/dashboard.ts
@@ -27,6 +27,8 @@ import { SoftKeysConfigurationModel } from '@/store/machineInfo.store';
})
export default class Dashboard extends Vue {
+ selectedChart: 'tempociclo' | 'pezziora' = "pezziora";
+
get panel() {
return (this.$store.state as AppModel).prod.panel;
}
@@ -35,14 +37,23 @@ export default class Dashboard extends Vue {
return (this.$store.state as AppModel).prod.prod;
}
+ get ScrapedItems() {
+ return this.items.filter(i => i.isScrap).map(i => i.numDone);
+ }
+
@Watch("lastItem", { deep: true })
async lastitemChanged(n: Prod.IProd, o) {
if (this.items.length && n.numDone - 1 != this.items[0].numDone) {
let result = await prodService.History(n.numDone - 1, 1);
- if (result && result.length)
- this.itemsMap.set(result.numDone, result);
+ if (result && result.length) {
+ for (const i of result) {
+ this.itemsMap.set(i.numDone, i);
+ }
+
+ this.items = Array.from(this.itemsMap.values()).sort((a, b) => b.numDone - a.numDone);
+
+ }
}
- this.items.splice(0, 0, ...await prodService.History(n.numDone - 1, 1));
// if (this.items.length == 0)
// this.items.splice(0, 0, ...await prodService.History(n.numDone));
@@ -95,7 +106,7 @@ export default class Dashboard extends Vue {
let min = Math.min(this.lastItem.numDone, ... this.items.map(i => i.numDone));
- let result = await prodService.History(min - 1)
+ let result = await prodService.History(min - 1, min - 1)
for (const i of result) {
this.itemsMap.set(i.numDone, i);
}
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/dashboard/dashboard.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/dashboard/dashboard.vue
index c52fa8da..d92ab221 100644
--- a/Thermo.Active/wwwroot/src/app_modules_thermo/dashboard/dashboard.vue
+++ b/Thermo.Active/wwwroot/src/app_modules_thermo/dashboard/dashboard.vue
@@ -126,7 +126,7 @@
-
+
{{'dashboard-remaining-time' | localize('tempo rimanente')}}
-
+
{{'dashboard-piece-hours' | localize('pezzi/ora')}}
{{panel.lastCadenza | round(1)}}
--
-
+
{{'dashboard-time-cycle' | localize('tempo/ciclo')}}
{{Math.floor(panel.lastTCiclo / 60) | round(0)}}'{{panel.lastTCiclo % 60 | round(0)}}''
--
-
+
+
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/programmazione-preriscaldo/components/programmazione-preriscaldo.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/programmazione-preriscaldo/components/programmazione-preriscaldo.ts
index f218c8fa..d5736dcb 100644
--- a/Thermo.Active/wwwroot/src/app_modules_thermo/programmazione-preriscaldo/components/programmazione-preriscaldo.ts
+++ b/Thermo.Active/wwwroot/src/app_modules_thermo/programmazione-preriscaldo/components/programmazione-preriscaldo.ts
@@ -21,81 +21,80 @@ export default class ProgrammazionePreriscaldo extends Vue {
availabledays = null;
meridian: string = "--";
- minutes= 0;
- hours= 0;
+ minutes = 0;
+ hours = 0;
currentLang = 'en';
configuration = null;
UIavailable = false;
- async mounted(){
+ async mounted() {
this.availabledays = moment.localeData('en').weekdays();
this.currentLang = this.currentAppLanguage;
await this.reloadData();
}
- async reloadData(){
+ async reloadData() {
let result = await awaiter(preheatingService.GetConfiguration());
this.configuration = result;
let time = this.configuration[0].time.split(":");
- if(time[0]< 12){
+ if (time[0] < 12) {
this.hours = time[0];
this.meridian = 'AM';
}
- else
- {
- this.hours = time[0]-12;
+ else {
+ this.hours = time[0] - 12;
this.meridian = 'PM';
}
- this.minutes = time[1];
+ this.minutes = time[1];
this.UIavailable = true;
}
- async conferma(){
+ async conferma() {
this.UIavailable = false;
await awaiter(preheatingService.UpdateConfiguration(this.configuration));
await this.reloadData();
}
-
- public get currentAppLanguage(){
+
+ public get currentAppLanguage() {
return (this.$store.state as AppModel).localization.currentLanguage;
}
- public selectedDay(name){
- if(!this.configuration)
+ public selectedDay(name) {
+ if (!this.configuration)
return false;
-
- let result = this.configuration.find(x => x.day === name);
- if(result)
+
+ let result = this.configuration.find(x => x.day === name);
+ if (result)
return result.enabled;
}
- public selectunselectDay(name){
- if(!this.configuration)
+ public selectunselectDay(name) {
+ if (!this.configuration)
return;
- let result = this.configuration.find(x => x.day === name);
- if(result)
+ let result = this.configuration.find(x => x.day === name);
+ if (result)
result.enabled = !result.enabled;
}
- @Watch('currentAppLanguage',{deep:true})
- public languageChanged(){
+ @Watch('currentAppLanguage', { deep: true })
+ public languageChanged() {
this.currentLang = this.currentAppLanguage;
}
- @Watch('meridian',{deep:true})
- @Watch('minutes',{deep:true})
- @Watch('hours',{deep:true})
- public timeChanged(){
- if(!this.configuration)
+ @Watch('meridian', { deep: true })
+ @Watch('minutes', { deep: true })
+ @Watch('hours', { deep: true })
+ public timeChanged() {
+ if (!this.configuration)
return;
let minutestoset = this.minutes;
let hourstoset = this.hours;
- if(this.meridian == 'PM')
- hourstoset = hourstoset+12;
- this.configuration.forEach(function(part, index, theArray) {
- theArray[index].time = ('0' + hourstoset).slice(-2) + ":" + ('0' + minutestoset).slice(-2) +":00";
+ if (this.meridian == 'PM')
+ hourstoset = hourstoset + 12;
+ this.configuration.forEach(function (part, index, theArray) {
+ theArray[index].time = ('0' + hourstoset).slice(-2) + ":" + ('0' + minutestoset).slice(-2) + ":00";
});
}
@@ -111,16 +110,16 @@ export default class ProgrammazionePreriscaldo extends Vue {
appModelActions.ShowPreDashboard(this.$store);
}
- enebleAll(){
- this.configuration.forEach(function(part, index, theArray) {
+ enebleAll() {
+ this.configuration.forEach(function (part, index, theArray) {
theArray[index].enabled = true;
});
}
- disableAll(){
- this.configuration.forEach(function(part, index, theArray) {
+ disableAll() {
+ this.configuration.forEach(function (part, index, theArray) {
theArray[index].enabled = false;
});
- }
+ }
isSelectedMinutes(index) {
return index == this.minutes;
}
@@ -135,8 +134,8 @@ export default class ProgrammazionePreriscaldo extends Vue {
this.hours = index;
}
- getSinlePositionAngle(numItems,index){
- if(numItems == 0)
+ getSinlePositionAngle(numItems, index) {
+ if (numItems == 0)
return 0;
return (360 / numItems) * index;
}
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/SVG_Components/stampoSVG.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/SVG_Components/stampoSVG.vue
index d888b91f..3dc6a552 100644
--- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/SVG_Components/stampoSVG.vue
+++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/SVG_Components/stampoSVG.vue
@@ -40,24 +40,24 @@
\ No newline at end of file
diff --git a/Thermo.Active/wwwroot/src/services/hub.ts b/Thermo.Active/wwwroot/src/services/hub.ts
index 602a5f3a..6e3a0b07 100644
--- a/Thermo.Active/wwwroot/src/services/hub.ts
+++ b/Thermo.Active/wwwroot/src/services/hub.ts
@@ -25,6 +25,7 @@ import { recipeActions } from "@/store/recipe.store";
import { prodActions } from "@/store/prod.store";
import { Model } from "vue-property-decorator";
import { prodService } from "./prodService";
+import { recipeService } from "./recipeService";
declare const PRODUCTION;
@@ -106,7 +107,7 @@ export class Hub {
// qui i NUOVI metodi NUOVI dal server (Recipe, gauges) da completare lato HUB
this._hub.client.recipeFullData = Hub.recipeFullData;
- this._hub.client.setpointHmiInvalid = Hub.setpointHmiInvalid;
+ this._hub.client.setpointHmiInvalid = Hub.setpointHmiInvalid;
this._hub.client.recipeOverData = Hub.recipeOverData;
this._hub.client.recipeChangedData = Hub.recipeChangedData;
this._hub.client.prodInfoData = Hub.prodData;
@@ -180,11 +181,13 @@ export class Hub {
recipeActions.setCurrent(store, data, true);
}
- public static setpointHmiInvalid(data) {
- console.log("setpointHmiInvalid");
+ public static async setpointHmiInvalid(data) {
+ if (data) {
+ await recipeService.GetCurrent();
+ // await recipeService.GetOverview();
+ }
}
-
public static recipeOverData(data) {
recipeActions.setOverview(store, data);
}
@@ -194,7 +197,6 @@ export class Hub {
}
public static prodData(data) {
- console.log('prodInfoData', data);
prodActions.setProd(store, data);
}
diff --git a/Thermo.Active/wwwroot/src/services/PreHeatingService.ts b/Thermo.Active/wwwroot/src/services/preheatingService.ts
similarity index 100%
rename from Thermo.Active/wwwroot/src/services/PreHeatingService.ts
rename to Thermo.Active/wwwroot/src/services/preheatingService.ts
diff --git a/Thermo.Active/wwwroot/src/services/prodService.ts b/Thermo.Active/wwwroot/src/services/prodService.ts
index 5fb6c316..1e4a43eb 100644
--- a/Thermo.Active/wwwroot/src/services/prodService.ts
+++ b/Thermo.Active/wwwroot/src/services/prodService.ts
@@ -24,7 +24,6 @@ export class ProdService extends baseRestService {
return result;
}
-
async Manual() {
await this.Put
((await this.BASE_URL()) + "mode/manual", null);
}
@@ -36,5 +35,9 @@ export class ProdService extends baseRestService {
async Start(qty: number, newWorkOrder: boolean, riscqty: number) {
await this.Put((await this.BASE_URL()) + `startFull?requestQty=${qty}&newWorkOrder=${newWorkOrder}&numCicliRisc=${riscqty}`, null);
}
+
+ async SetScrap(num: number, scrap: boolean = true) {
+ await this.Put((await this.BASE_URL()) + `setScrap?num=${num}&isScrap=${scrap}`, null);
+ }
}
export const prodService = new ProdService();
\ No newline at end of file