diff --git a/Thermo.Active/wwwroot/assets/styles/base/setup.less b/Thermo.Active/wwwroot/assets/styles/base/setup.less index 0871bd43..73a1a4d1 100644 --- a/Thermo.Active/wwwroot/assets/styles/base/setup.less +++ b/Thermo.Active/wwwroot/assets/styles/base/setup.less @@ -426,6 +426,10 @@ &.fa-check-circle.undone-step { color: #1791ff; } + &.edit{ + left: 80px; + color: #1791ff; + } } span, @@ -534,6 +538,10 @@ &.fa-check-circle.undone-step { color: #1791ff; } + &.edit{ + left: 133px; + color: #1791ff; + } } position: relative; diff --git a/Thermo.Active/wwwroot/assets/styles/style.css b/Thermo.Active/wwwroot/assets/styles/style.css index 3ca1c81e..4d397b8d 100644 --- a/Thermo.Active/wwwroot/assets/styles/style.css +++ b/Thermo.Active/wwwroot/assets/styles/style.css @@ -382,6 +382,10 @@ .setup .modal-footer-navigator .setup-button i.fa-check-circle.undone-step { color: #1791ff; } +.setup .modal-footer-navigator .setup-button i.edit { + left: 80px; + color: #1791ff; +} .setup .modal-footer-navigator .setup-button span, .setup .modal-footer-navigator .setup-button label { grid-row-start: 1; @@ -473,6 +477,10 @@ .setup-button i.fa-check-circle.undone-step { color: #1791ff; } +.setup-button i.edit { + left: 133px; + color: #1791ff; +} .setup-button .background-top, .setup-button .background-bottom { position: absolute; diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/ciclo/components/show-ciclo-info.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/ciclo/components/show-ciclo-info.ts index b1245d0d..30e3af73 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/ciclo/components/show-ciclo-info.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/ciclo/components/show-ciclo-info.ts @@ -97,6 +97,19 @@ export default class ShowCicloInfo extends Vue { } + @Watch('payload', { deep: true }) + async payloadChanged(n, o) { + for (var key in n) { + if (Object.prototype.hasOwnProperty.call(n, key)) { + if(n[key].setpointHMI != n[key].setpointPLC){ + messageService.publishToChannel("changed-recipe",2,true); + return; + } + } + } + messageService.publishToChannel("changed-recipe",2,false); + }; + @Watch('recipe', { deep: true }) async recipeChanged(n, o) { this.debouncedRecipeSave() diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/components/setup.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/components/setup.ts index 280b2928..0f039449 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/components/setup.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/components/setup.ts @@ -17,6 +17,7 @@ import ShowImbutituraInfo from "@/app_modules_thermo/setup/imbutitura/show-imbut import ShowOpzioniInfo from "@/app_modules_thermo/setup/opzioni/show-opzioni-info.vue"; // import AvvioProduzione from "@/app_modules_thermo/setup/avvio-produzione/avvio-produzione.vue"; import { store } from '@/store'; +import { RecipeGetters } from '@/store/recipe.store'; @Component({ @@ -27,6 +28,7 @@ import { store } from '@/store'; }) export default class Setup extends Vue { + hasChangedRecipe: Array = [false,false,false,false,false,false,false,false,false,false,false]; async showModalAtStep(step: number) { try { @@ -41,6 +43,12 @@ export default class Setup extends Vue { return store.state.recipe.overview; } + getIntChanges(val) { + + console.log("arrivato",(this.$store.getters as RecipeGetters).getIntStates(val)); + return (this.$store.getters as RecipeGetters).getIntStates(val); + } + showModalStep(step: number): Promise { switch (step) { case 0: return ModalHelper.ShowModalAsync(ShowFormatoInfo, null); @@ -60,8 +68,15 @@ export default class Setup extends Vue { return null; } + + setRecipeChanged(args){ + this.hasChangedRecipe[args[0]] = args[1]; + this.$forceUpdate(); + } + mounted() { messageService.subscribeToChannel('show-setup-modal', (m) => this.showModalAtStep(m)); + messageService.subscribeToChannel("changed-recipe", (args) => this.setRecipeChanged(args)); } diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/components/setup.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/components/setup.vue index 89c79fe0..c3844a4c 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/components/setup.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/components/setup.vue @@ -7,6 +7,7 @@ :phase="1" :title="'lbl_recipe_overview_general' | localize('Formato')" :status="overview.general" + :haschanges="getIntChanges(0)" >