diff --git a/Thermo.Active.Config/Config/Recipes/template.json b/Thermo.Active.Config/Config/Recipes/template.json new file mode 100644 index 00000000..cb38ff29 --- /dev/null +++ b/Thermo.Active.Config/Config/Recipes/template.json @@ -0,0 +1,1190 @@ +{ + "RecipeName": "template.json", + "RecipeParameters": { + "general_sizes_mould_dim_x": 400.0, + "general_sizes_mould_dim_y": 150.0, + "general_sizes_mould_max_height": 0.0, + "general_sizes_mould_min_height": 0.0, + "general_sizes_mould_base_height": 0.0, + "general_sizes_sheet_material": 0.0, + "general_sizes_sheet_dim_x": 0.0, + "general_sizes_sheet_dim_y": 0.0, + "general_sizes_sheet_thickness": 3.0, + "general_sizes_plate_type": 0.0, + "general_sizes_plate_dim_x": 1000.0, + "general_sizes_plate_dim_y": 900.0, + "general_sizes_frame_traverses": 0.0, + "general_sizes_frame_dim_x": 1100.0, + "general_sizes_frame_dim_y": 600.0, + "general_sizes_upperplate_max_height": 0.0, + "general_area_working_dxsx": 0.0, + "positions_mould_lower_position": 150.0, + "positions_mould_lower_speed": 350.0, + "positions_mould_intermediate_position": 800.0, + "positions_mould_upper_position": 850.0, + "positions_mould_upper_speed": 350.0, + "positions_mould_upperdeceleration_position": 820.0, + "positions_mould_upperdeceleration_speed": 150.0, + "positions_mould_lowerdeceleration_position": 830.0, + "positions_mould_lowerdeceleration_speed": 150.0, + "positions_frame_lower_position": 40.0, + "positions_frame_lower_speed": 500.0, + "positions_frame_upper_position": 980.0, + "positions_frame_upper_speed": 450.0, + "positions_frame_intermediate_position": 700.0, + "positions_frame_intermediate_speed": 400.0, + "positions_frame_unload_position": 650.0, + "positions_upperplate_lower_position": 245.0, + "positions_upperplate_lower_speed": 150.0, + "positions_upperplate_upper_position": 1150.0, + "positions_upperplate_upper_speed": 350.0, + "positions_upperplate_upperdeceleration_position": 270.0, + "positions_upperplate_upperdeceleration_speed": 150.0, + "positions_upperplate_lowerdeceleration_position": 250.0, + "positions_upperplate_lowerdeceleration_speed": 50.0, + "cycle_forming_type": 0.0, + "cycle_forming_pause_cycle": 0.0, + "cycle_forming_cooling_enabled": 0.0, + "cycle_forming_blowingbox_enabled": 0.0, + "cycle_acrylicframe_enabled": 0.0, + "cycle_acrylicframe_time": 4000.0, + "cycle_upperoverheating_enabled": 0.0, + "cycle_upperoverheating_time": 15000.0, + "cycle_crystallisation_type": 0.0, + "cycle_crystallisation_time": 0.0, + "cycle_loader_enable": 0.0, + "cycle_loader_lifter_lowerposition_delay": 0.0, + "cycle_loader_lifter_upperposition_delay": 0.0, + "cycle_loader_split_sheet_time": 0.0, + "cycle_loader_ejector_position": 400.0, + "cycle_loader_pallet_height": 110.0, + "cycle_loader_center_x": 0.0, + "cycle_loader_center_y": 1.0, + "cycle_loader_checktichness_enabled": 0.0, + "cycle_loader_suckers_vacuum": 1.0, + "cycle_loader_ionizer_enabled": 1.0, + "cycle_loader_manualunloading_enabled": 0.0, + "heats_lowerheaters_max_time": 20000.0, + "heats_lowerheaters_movement_enabled": 1.0, + "heats_lowerheaters_enabled": 1.0, + "heats_lowerheaters_oscillation": 0.0, + "heats_upperheaters_max_time": 20000.0, + "heats_upperheaters_movement_enabled": 1.0, + "heats_upperheaters_enabled": 1.0, + "heats_upperheaters_oscillation": 0.0, + "heats_decomsustain_type": 1.0, + "heats_decomsustain_decompression_flow": 50.0, + "heats_decomsustain_min_blowing_time": 300.0, + "heats_decomsustain_sustain_delay": 1000.0, + "heats_decomsustain_decompression_delay": 1000.0, + "heats_decomsustain_decompression_duration": 1000.0, + "heats_decomsustain_smoke_function_enabled": 0.0, + "pyrometer_pyrometer_enabled": 1.0, + "pyrometer_pyrometer_setpoint": 250.0, + "pyrometer_pyrometer_delay": 10000.0, + "pyrometer_upperthermoregulator_start_adjustment": 100.0, + "pyrometer_upperthermoregulator_end_adjustment": 200.0, + "pyrometer_upperthermoregulator_min_percentage": 70.0, + "pyrometer_upperthermoregulator_max_percentage": 100.0, + "pyrometer_upperthermoregulator_sleep_enabled": 1.0, + "pyrometer_upperthermoregulator_sleep_percentage": 25.0, + "pyrometer_lowerthermoregulator_start_adjustment": 100.0, + "pyrometer_lowerthermoregulator_end_adjustment": 200.0, + "pyrometer_lowerthermoregulator_min_percentage": 70.0, + "pyrometer_lowerthermoregulator_max_percentage": 100.0, + "pyrometer_lowerthermoregulator_sleep_enabled": 1.0, + "pyrometer_lowerthermoregulator_sleep_percentage": 25.0, + "pyrometer_upperthermoregulator_sleep_temperature": 0.0, + "pyrometer_upperthermoregulator_working_temperature": 0.0, + "pyrometer_lowerthermoregulator_sleep_temperature": 0.0, + "pyrometer_lowerthermoregulator_working_temperature": 0.0, + "drawing_type": 4.0, + "drawing_height": 100.0, + "drawing_delay": 2000.0, + "drawing_1_chart_setpointx": 6000.0, + "drawing_1_chart_setpointy": 100.0, + "drawing_photocell": 1.0, + "drawing_mantaining_flow": 20.0, + "drawing_manual": 50.0, + "drawing_mould_up_delay": 3000.0, + "upperplate_cycle_type": 1.0, + "upperplate_cycle_delay": 0.0, + "upperplate_cycle_time": 3000.0, + "upperplate_air_enable": 0.0, + "upperplate_air_delay": 0.0, + "upperplate_air_max_time": 0.0, + "upperplate_air_1_chart_setpointx": 0.0, + "upperplate_air_1_chart_setpointy": 0.0, + "upperplate_air_2_chart_setpointx": 0.0, + "upperplate_air_2_chart_setpointy": 0.0, + "upperplate_air_3_chart_setpointx": 0.0, + "upperplate_air_3_chart_setpointy": 0.0, + "upperplate_air_manual": 0.0, + "upperplate_vacuum_enable": 0.0, + "upperplate_vacuum_delay": 0.0, + "upperplate_vacuum_max_time": 0.0, + "upperplate_vacuum_1_chart_setpointx": 0.0, + "upperplate_vacuum_1_chart_setpointy": 0.0, + "upperplate_vacuum_2_chart_setpointx": 0.0, + "upperplate_vacuum_2_chart_setpointy": 0.0, + "upperplate_vacuum_3_chart_setpointx": 0.0, + "upperplate_vacuum_3_chart_setpointy": 0.0, + "upperplate_vacuum_manual": 0.0, + "upperplate_extraction_enable": 0.0, + "upperplate_extraction_delay": 0.0, + "upperplate_extraction_1_chart_setpointx": 0.0, + "upperplate_extraction_1_chart_setpointy": 0.0, + "upperplate_extraction_manual": 0.0, + "cooling_blowing_type": 4.0, + "cooling_blowing_delay": 5000.0, + "cooling_blowing_time": 10000.0, + "cooling_pyrometer_enabled": 0.0, + "cooling_pyrometer_setpoint": 50.0, + "cooling_pyrometer_delay": 8000.0, + "cooling_nebulizer_type": 1.0, + "cooling_nebulizer_delay": 2000.0, + "cooling_nebulizer_time": 2000.0, + "cooling_telescopic_enable": 0.0, + "cooling_telescopic_position": 0.0, + "cooling_telescopic_swing_enable": 0.0, + "cooling_telescopic_swing_stroke": 0.0, + "cooling_shutter_1_opening_perc": 0.0, + "cooling_shutter_2_opening_perc": 0.0, + "cooling_shutter_3_opening_perc": 0.0, + "cooling_shutter_4_opening_perc": 0.0, + "cooling_shutter_5_opening_perc": 0.0, + "cooling_shutter_6_opening_perc": 0.0, + "cooling_shutter_7_opening_perc": 0.0, + "cooling_shutter_8_opening_perc": 0.0, + "cooling_shutter_9_opening_perc": 0.0, + "cooling_shutter_10_opening_perc": 0.0, + "cooling_shutter_11_opening_perc": 0.0, + "cooling_shutter_12_opening_perc": 0.0, + "cooling_shutter_13_opening_perc": 0.0, + "cooling_shutter_14_opening_perc": 0.0, + "cooling_shutter_15_opening_perc": 0.0, + "cooling_shutter_16_opening_perc": 0.0, + "vacuum_main_start": 0.0, + "vacuum_main_delay": 1000.0, + "vacuum_main_max_time": 30000.0, + "vacuum_main_1_chart_setpointx": 2000.0, + "vacuum_main_1_chart_setpointy": 30.0, + "vacuum_main_2_chart_setpointx": 3000.0, + "vacuum_main_2_chart_setpointy": 60.0, + "vacuum_main_3_chart_setpointx": 15000.0, + "vacuum_main_3_chart_setpointy": 90.0, + "vacuum_main_manual": 40.0, + "vacuum_direct_enabled": 1.0, + "vacuum_direct_delay": 2000.0, + "vacuum_direct_time": 3000.0, + "vacuum_aux_enabled": 0.0, + "vacuum_aux_delay": 0.0, + "vacuum_aux_max_time": 0.0, + "vacuum_aux_1_chart_setpointx": 0.0, + "vacuum_aux_1_chart_setpointy": 0.0, + "vacuum_aux_2_chart_setpointx": 0.0, + "vacuum_aux_2_chart_setpointy": 0.0, + "vacuum_aux_3_chart_setpointx": 0.0, + "vacuum_aux_3_chart_setpointy": 0.0, + "vacuum_aux_manual": 0.0, + "vacuum_pre_enabled": 0.0, + "vacuum_pre_delay": 0.0, + "vacuum_pre_max_time": 0.0, + "vacuum_pre_1_chart_setpointx": 0.0, + "vacuum_pre_1_chart_setpointy": 0.0, + "vacuum_pre_2_chart_setpointx": 0.0, + "vacuum_pre_2_chart_setpointy": 0.0, + "vacuum_pre_3_chart_setpointx": 0.0, + "vacuum_pre_3_chart_setpointy": 0.0, + "extraction_main_type": 2.0, + "extraction_main_mould_dw_delay": 3000.0, + "extraction_main_delay": 2000.0, + "extraction_main_1_chart_setpointx": 3000.0, + "extraction_main_1_chart_setpointy": 85.0, + "extraction_main_manual": 60.0, + "extraction_aux_enabled": 0.0, + "extraction_aux_delay": 0.0, + "extraction_aux_1_chart_setpointx": 0.0, + "extraction_aux_1_chart_setpointy": 0.0, + "extraction_aux_manual": 0.0, + "options_undercutmould_1_mode": 0.0, + "options_undercutmould_1_position": 500.0, + "options_undercutmould_1_delay_acti": 0.0, + "options_undercutmould_1_delay_dis": 0.0, + "options_undercutmould_2_mode": 0.0, + "options_undercutmould_2_position": 500.0, + "options_undercutmould_2_delay_acti": 1000.0, + "options_undercutmould_2_delay_dis": 1000.0, + "options_undercutmould_3_mode": 0.0, + "options_undercutmould_3_position": 0.0, + "options_undercutmould_3_delay_acti": 0.0, + "options_undercutmould_3_delay_dis": 0.0, + "options_undercutmould_4_mode": 0.0, + "options_undercutmould_4_position": 0.0, + "options_undercutmould_4_delay_acti": 0.0, + "options_undercutmould_4_delay_dis": 0.0, + "options_undercutmould_5_mode": 0.0, + "options_undercutmould_5_position": 0.0, + "options_undercutmould_5_delay_acti": 0.0, + "options_undercutmould_5_delay_dis": 0.0, + "options_undercutmould_6_mode": 0.0, + "options_undercutmould_6_position": 0.0, + "options_undercutmould_6_delay_acti": 0.0, + "options_undercutmould_6_delay_dis": 0.0, + "options_undercutmould_7_mode": 0.0, + "options_undercutmould_7_position": 0.0, + "options_undercutmould_7_delay_acti": 0.0, + "options_undercutmould_7_delay_dis": 0.0, + "options_undercutmould_8_mode": 0.0, + "options_undercutmould_8_position": 0.0, + "options_undercutmould_8_delay_acti": 0.0, + "options_undercutmould_8_delay_dis": 0.0, + "options_undercutmould_9_mode": 0.0, + "options_undercutmould_9_position": 0.0, + "options_undercutmould_9_delay_acti": 0.0, + "options_undercutmould_9_delay_dis": 0.0, + "options_undercutmould_10_mode": 0.0, + "options_undercutmould_10_position": 0.0, + "options_undercutmould_10_delay_acti": 0.0, + "options_undercutmould_10_delay_dis": 0.0, + "options_undercutupperplate_1_mode": 0.0, + "options_undercutupperplate_1_position": 600.0, + "options_undercutupperplate_1_delay_acti": 0.0, + "options_undercutupperplate_1_delay_dis": 0.0, + "options_undercutupperplate_2_mode": 0.0, + "options_undercutupperplate_2_position": 600.0, + "options_undercutupperplate_2_delay_acti": 1000.0, + "options_undercutupperplate_2_delay_dis": 1000.0, + "options_undercutupperplate_3_mode": 0.0, + "options_undercutupperplate_3_position": 0.0, + "options_undercutupperplate_3_delay_acti": 0.0, + "options_undercutupperplate_3_delay_dis": 0.0, + "options_undercutupperplate_4_mode": 0.0, + "options_undercutupperplate_4_position": 0.0, + "options_undercutupperplate_4_delay_acti": 0.0, + "options_undercutupperplate_4_delay_dis": 0.0, + "options_undercutupperplate_5_mode": 0.0, + "options_undercutupperplate_5_position": 0.0, + "options_undercutupperplate_5_delay_acti": 0.0, + "options_undercutupperplate_5_delay_dis": 0.0, + "options_undercutupperplate_6_mode": 0.0, + "options_undercutupperplate_6_position": 0.0, + "options_undercutupperplate_6_delay_acti": 0.0, + "options_undercutupperplate_6_delay_dis": 0.0, + "options_undercutupperplate_7_mode": 0.0, + "options_undercutupperplate_7_position": 0.0, + "options_undercutupperplate_7_delay_acti": 0.0, + "options_undercutupperplate_7_delay_dis": 0.0, + "options_undercutupperplate_8_mode": 0.0, + "options_undercutupperplate_8_position": 0.0, + "options_undercutupperplate_8_delay_acti": 0.0, + "options_undercutupperplate_8_delay_dis": 0.0, + "options_undercutupperplate_9_mode": 0.0, + "options_undercutupperplate_9_position": 0.0, + "options_undercutupperplate_9_delay_acti": 0.0, + "options_undercutupperplate_9_delay_dis": 0.0, + "options_undercutupperplate_10_mode": 0.0, + "options_undercutupperplate_10_position": 0.0, + "options_undercutupperplate_10_delay_acti": 0.0, + "options_undercutupperplate_10_delay_dis": 0.0, + "options_thermoregulator_1_enabled": 1.0, + "options_thermoregulator_1_setpoint": 55.0, + "options_thermoregulator_2_enabled": 1.0, + "options_thermoregulator_2_setpoint": 60.0, + "options_thermoregulator_3_enabled": 1.0, + "options_thermoregulator_3_setpoint": 65.0, + "options_thermoregulator_4_enabled": 0.0, + "options_thermoregulator_4_setpoint": 0.0, + "options_thermoregulator_5_enabled": 0.0, + "options_thermoregulator_5_setpoint": 0.0, + "options_thermoregulator_6_enabled": 0.0, + "options_thermoregulator_6_setpoint": 0.0, + "options_thermoregulator_7_enabled": 0.0, + "options_thermoregulator_7_setpoint": 0.0, + "options_thermoregulator_8_enabled": 0.0, + "options_thermoregulator_8_setpoint": 0.0, + "options_thermoregulator_9_enabled": 0.0, + "options_thermoregulator_9_setpoint": 0.0, + "options_thermoregulator_10_enabled": 0.0, + "options_thermoregulator_10_setpoint": 0.0 + }, + "ChannelSetpoints": { + "7": 7, + "44": 44, + "81": 84, + "118": 51, + "155": 52, + "192": 53, + "229": 54, + "266": 50, + "303": 50, + "340": 50, + "377": 50, + "414": 50, + "1": 1, + "8": 8, + "45": 45, + "82": 82, + "119": 50, + "156": 50, + "193": 50, + "230": 50, + "267": 50, + "304": 50, + "341": 50, + "378": 50, + "415": 50, + "9": 9, + "46": 46, + "83": 83, + "120": 50, + "157": 50, + "194": 50, + "231": 50, + "268": 50, + "305": 50, + "342": 50, + "379": 50, + "416": 50, + "10": 10, + "47": 47, + "84": 84, + "121": 50, + "158": 50, + "195": 50, + "232": 50, + "269": 50, + "306": 50, + "343": 50, + "380": 50, + "11": 11, + "48": 48, + "85": 85, + "122": 50, + "159": 50, + "196": 50, + "233": 50, + "270": 50, + "307": 50, + "344": 50, + "381": 50, + "417": 50, + "12": 12, + "49": 49, + "86": 86, + "123": 50, + "160": 50, + "197": 50, + "234": 50, + "271": 50, + "308": 50, + "345": 50, + "382": 50, + "13": 13, + "50": 50, + "87": 87, + "124": 50, + "161": 50, + "198": 50, + "235": 50, + "272": 50, + "309": 50, + "346": 50, + "383": 50, + "418": 50, + "2": 2, + "14": 14, + "51": 51, + "88": 88, + "125": 50, + "162": 50, + "199": 50, + "236": 50, + "273": 50, + "310": 50, + "347": 50, + "384": 50, + "419": 50, + "15": 15, + "52": 52, + "89": 89, + "126": 50, + "163": 50, + "200": 50, + "237": 50, + "274": 50, + "311": 50, + "348": 50, + "385": 50, + "420": 50, + "16": 16, + "53": 53, + "90": 90, + "127": 50, + "164": 50, + "201": 50, + "238": 50, + "275": 50, + "312": 50, + "349": 50, + "386": 50, + "17": 17, + "54": 54, + "91": 91, + "128": 50, + "165": 50, + "202": 50, + "239": 50, + "276": 50, + "313": 50, + "350": 50, + "387": 50, + "421": 50, + "18": 18, + "55": 58, + "92": 92, + "129": 50, + "166": 50, + "203": 50, + "240": 50, + "277": 50, + "314": 50, + "351": 50, + "388": 50, + "19": 19, + "56": 56, + "93": 93, + "130": 50, + "167": 50, + "204": 50, + "241": 50, + "278": 50, + "315": 50, + "352": 50, + "389": 50, + "422": 50, + "3": 3, + "20": 20, + "57": 57, + "94": 94, + "131": 50, + "168": 50, + "205": 50, + "242": 50, + "279": 50, + "316": 50, + "353": 50, + "390": 50, + "423": 50, + "21": 21, + "58": 58, + "95": 95, + "132": 50, + "169": 50, + "206": 50, + "243": 50, + "280": 50, + "317": 50, + "354": 50, + "391": 50, + "424": 50, + "22": 22, + "59": 59, + "96": 96, + "133": 50, + "170": 50, + "207": 50, + "244": 50, + "281": 50, + "318": 50, + "355": 50, + "392": 50, + "23": 23, + "60": 60, + "97": 97, + "134": 50, + "171": 50, + "208": 50, + "245": 50, + "282": 50, + "319": 50, + "356": 50, + "393": 50, + "425": 50, + "24": 24, + "61": 61, + "98": 98, + "135": 50, + "172": 50, + "209": 50, + "246": 50, + "283": 50, + "320": 50, + "357": 50, + "394": 50, + "25": 25, + "62": 62, + "99": 99, + "136": 50, + "173": 50, + "210": 50, + "247": 50, + "284": 50, + "321": 50, + "358": 50, + "395": 50, + "426": 50, + "4": 4, + "26": 26, + "63": 63, + "100": 50, + "137": 50, + "174": 50, + "211": 50, + "248": 50, + "285": 50, + "322": 50, + "359": 50, + "396": 50, + "427": 50, + "27": 27, + "64": 64, + "101": 50, + "138": 50, + "175": 50, + "212": 50, + "249": 50, + "286": 50, + "323": 50, + "360": 50, + "397": 50, + "428": 50, + "28": 28, + "65": 65, + "102": 50, + "139": 50, + "176": 50, + "213": 50, + "250": 50, + "287": 50, + "324": 50, + "361": 50, + "398": 50, + "29": 29, + "66": 66, + "103": 50, + "140": 50, + "177": 50, + "214": 50, + "251": 50, + "288": 50, + "325": 50, + "362": 50, + "399": 50, + "429": 50, + "30": 30, + "67": 67, + "104": 50, + "141": 50, + "178": 50, + "215": 50, + "252": 50, + "289": 50, + "326": 50, + "363": 50, + "400": 50, + "31": 31, + "68": 68, + "105": 50, + "142": 50, + "179": 50, + "216": 50, + "253": 50, + "290": 50, + "327": 50, + "364": 50, + "401": 50, + "430": 50, + "5": 5, + "32": 32, + "69": 69, + "106": 50, + "143": 50, + "180": 50, + "217": 50, + "254": 50, + "291": 50, + "328": 50, + "365": 50, + "402": 50, + "431": 50, + "33": 33, + "70": 70, + "107": 50, + "144": 50, + "181": 50, + "218": 50, + "255": 50, + "292": 50, + "329": 50, + "366": 50, + "403": 50, + "432": 50, + "34": 34, + "71": 71, + "108": 50, + "145": 50, + "182": 50, + "219": 50, + "256": 50, + "293": 50, + "330": 50, + "367": 50, + "404": 50, + "35": 35, + "72": 72, + "109": 50, + "146": 50, + "183": 50, + "220": 50, + "257": 50, + "294": 50, + "331": 50, + "368": 50, + "405": 50, + "433": 50, + "36": 36, + "73": 73, + "110": 50, + "147": 50, + "184": 50, + "221": 50, + "258": 50, + "295": 50, + "332": 50, + "369": 50, + "406": 50, + "37": 37, + "74": 74, + "111": 50, + "148": 50, + "185": 50, + "222": 50, + "259": 50, + "296": 50, + "333": 50, + "370": 50, + "407": 50, + "434": 50, + "6": 6, + "38": 38, + "75": 75, + "112": 50, + "149": 50, + "186": 50, + "223": 50, + "260": 50, + "297": 50, + "334": 50, + "371": 50, + "408": 50, + "435": 50, + "39": 39, + "76": 76, + "113": 50, + "150": 50, + "187": 50, + "224": 50, + "261": 50, + "298": 50, + "335": 50, + "372": 50, + "409": 50, + "436": 50, + "40": 40, + "77": 77, + "114": 50, + "151": 50, + "188": 50, + "225": 50, + "262": 50, + "299": 50, + "336": 50, + "373": 50, + "410": 50, + "41": 41, + "78": 78, + "115": 50, + "152": 50, + "189": 50, + "226": 50, + "263": 50, + "300": 50, + "337": 50, + "374": 50, + "411": 50, + "437": 50, + "42": 42, + "79": 79, + "116": 50, + "153": 50, + "190": 50, + "227": 50, + "264": 50, + "301": 50, + "338": 50, + "375": 50, + "412": 50, + "43": 43, + "80": 80, + "117": 50, + "154": 50, + "191": 50, + "228": 50, + "265": 50, + "302": 50, + "339": 50, + "376": 50, + "413": 50, + "438": 50, + "513": 50, + "520": 50, + "557": 50, + "594": 50, + "631": 50, + "668": 50, + "705": 50, + "742": 50, + "779": 50, + "816": 50, + "853": 50, + "890": 50, + "927": 50, + "521": 50, + "558": 50, + "595": 50, + "632": 50, + "669": 50, + "706": 50, + "743": 50, + "780": 50, + "817": 50, + "854": 50, + "891": 50, + "928": 50, + "522": 50, + "559": 50, + "596": 50, + "633": 50, + "670": 50, + "707": 50, + "744": 50, + "781": 50, + "818": 50, + "855": 50, + "892": 50, + "523": 50, + "560": 50, + "597": 50, + "634": 50, + "671": 50, + "708": 50, + "745": 50, + "782": 50, + "819": 50, + "856": 50, + "893": 50, + "929": 50, + "524": 50, + "561": 50, + "598": 50, + "635": 50, + "672": 50, + "709": 50, + "746": 50, + "783": 50, + "820": 50, + "857": 50, + "894": 50, + "525": 50, + "562": 50, + "599": 50, + "636": 50, + "673": 50, + "710": 50, + "747": 50, + "784": 50, + "821": 50, + "858": 50, + "895": 50, + "930": 50, + "514": 50, + "526": 50, + "563": 50, + "600": 50, + "637": 50, + "674": 50, + "711": 50, + "748": 50, + "785": 50, + "822": 50, + "859": 50, + "896": 50, + "931": 50, + "527": 50, + "564": 50, + "601": 50, + "638": 50, + "675": 50, + "712": 50, + "749": 50, + "786": 50, + "823": 50, + "860": 50, + "897": 50, + "932": 50, + "528": 50, + "565": 50, + "602": 50, + "639": 50, + "676": 50, + "713": 50, + "750": 50, + "787": 50, + "824": 50, + "861": 50, + "898": 50, + "529": 50, + "566": 50, + "603": 50, + "640": 50, + "677": 50, + "714": 50, + "751": 50, + "788": 50, + "825": 50, + "862": 50, + "899": 50, + "933": 50, + "530": 50, + "567": 50, + "604": 50, + "641": 50, + "678": 50, + "715": 50, + "752": 50, + "789": 50, + "826": 50, + "863": 50, + "900": 50, + "531": 50, + "568": 50, + "605": 50, + "642": 50, + "679": 50, + "716": 50, + "753": 50, + "790": 50, + "827": 50, + "864": 50, + "901": 50, + "934": 50, + "515": 50, + "532": 50, + "569": 50, + "606": 50, + "643": 50, + "680": 50, + "717": 50, + "754": 50, + "791": 50, + "828": 50, + "865": 50, + "902": 50, + "935": 50, + "533": 50, + "570": 50, + "607": 50, + "644": 50, + "681": 50, + "718": 50, + "755": 50, + "792": 50, + "829": 50, + "866": 50, + "903": 50, + "936": 50, + "534": 50, + "571": 50, + "608": 50, + "645": 50, + "682": 50, + "719": 50, + "756": 50, + "793": 50, + "830": 50, + "867": 50, + "904": 50, + "535": 50, + "572": 50, + "609": 50, + "646": 50, + "683": 50, + "720": 50, + "757": 50, + "794": 50, + "831": 50, + "868": 50, + "905": 50, + "937": 50, + "536": 50, + "573": 50, + "610": 50, + "647": 50, + "684": 50, + "721": 50, + "758": 50, + "795": 50, + "832": 50, + "869": 50, + "906": 50, + "537": 50, + "574": 50, + "611": 50, + "648": 50, + "685": 50, + "722": 50, + "759": 50, + "796": 50, + "833": 50, + "870": 50, + "907": 50, + "938": 50, + "516": 50, + "538": 50, + "575": 50, + "612": 50, + "649": 50, + "686": 50, + "723": 50, + "760": 50, + "797": 50, + "834": 50, + "871": 50, + "908": 50, + "939": 50, + "539": 50, + "576": 50, + "613": 50, + "650": 50, + "687": 50, + "724": 50, + "761": 50, + "798": 50, + "835": 50, + "872": 50, + "909": 50, + "940": 50, + "517": 50, + "540": 50, + "577": 50, + "614": 50, + "651": 50, + "688": 50, + "725": 50, + "762": 50, + "799": 50, + "836": 50, + "873": 50, + "910": 50, + "941": 50, + "541": 50, + "578": 50, + "615": 50, + "652": 50, + "689": 50, + "726": 50, + "763": 50, + "800": 50, + "837": 50, + "874": 50, + "911": 50, + "942": 50, + "542": 50, + "579": 50, + "616": 50, + "653": 50, + "690": 50, + "727": 50, + "764": 50, + "801": 50, + "838": 50, + "875": 50, + "912": 50, + "543": 50, + "580": 50, + "617": 50, + "654": 50, + "691": 50, + "728": 50, + "765": 50, + "802": 50, + "839": 50, + "876": 50, + "913": 50, + "943": 50, + "544": 50, + "581": 50, + "618": 50, + "655": 50, + "692": 50, + "729": 50, + "766": 50, + "803": 50, + "840": 50, + "877": 50, + "914": 50, + "545": 50, + "582": 50, + "619": 50, + "656": 50, + "693": 50, + "730": 50, + "767": 50, + "804": 50, + "841": 50, + "878": 50, + "915": 50, + "944": 50, + "518": 50, + "546": 50, + "583": 50, + "620": 50, + "657": 50, + "694": 50, + "731": 50, + "768": 50, + "805": 50, + "842": 50, + "879": 50, + "916": 50, + "945": 50, + "547": 50, + "584": 50, + "621": 50, + "658": 50, + "695": 50, + "732": 50, + "769": 50, + "806": 50, + "843": 50, + "880": 50, + "917": 50, + "946": 50, + "548": 50, + "585": 50, + "622": 50, + "659": 50, + "696": 50, + "733": 50, + "770": 50, + "807": 50, + "844": 50, + "881": 50, + "918": 50, + "549": 50, + "586": 50, + "623": 50, + "660": 50, + "697": 50, + "734": 50, + "771": 50, + "808": 50, + "845": 50, + "882": 50, + "919": 50, + "947": 50, + "550": 50, + "587": 50, + "624": 50, + "661": 50, + "698": 50, + "735": 50, + "772": 50, + "809": 50, + "846": 50, + "883": 50, + "920": 50, + "551": 50, + "588": 50, + "625": 50, + "662": 50, + "699": 50, + "736": 50, + "773": 50, + "810": 50, + "847": 50, + "884": 50, + "921": 50, + "948": 50, + "519": 50, + "552": 50, + "589": 50, + "626": 50, + "663": 50, + "700": 50, + "737": 50, + "774": 50, + "811": 50, + "848": 50, + "885": 50, + "922": 50, + "949": 50, + "553": 50, + "590": 50, + "627": 50, + "664": 50, + "701": 50, + "738": 50, + "775": 50, + "812": 50, + "849": 50, + "886": 50, + "923": 50, + "950": 50, + "554": 50, + "591": 50, + "628": 50, + "665": 50, + "702": 50, + "739": 50, + "776": 50, + "813": 50, + "850": 50, + "887": 50, + "924": 50, + "555": 50, + "592": 50, + "629": 50, + "666": 50, + "703": 50, + "740": 50, + "777": 50, + "814": 50, + "851": 50, + "888": 50, + "925": 50, + "951": 50, + "556": 50, + "593": 50, + "630": 50, + "667": 50, + "704": 50, + "741": 50, + "778": 50, + "815": 50, + "852": 50, + "889": 50, + "926": 80 + } +} \ No newline at end of file diff --git a/Thermo.Active.Config/Config/moduleBlockConfig.xml b/Thermo.Active.Config/Config/moduleBlockConfig.xml new file mode 100644 index 00000000..ef3095f8 --- /dev/null +++ b/Thermo.Active.Config/Config/moduleBlockConfig.xml @@ -0,0 +1,185 @@ + + + + 1 + + DiscesaCZ ENG + DiscesaCZ ITA + + MOVEMENT +
HEATING
+ -1 + false + false + 1 +
+ + 2 + + MembDiscesaZ ENG + MembDiscesaZ ITA + + MOVEMENT +
HEATING
+ -1 + false + false + 1 +
+ + 3 + + MembZ ENG + MembZ ITA + + MOVEMENT +
HEATING
+ -1 + false + false + 1 +
+ + 4 + + Mod_MembSalitaZ ENG + Mod_MembSalitaZ ITA + + MOVEMENT +
HEATING
+ -1 + false + false + 1 +
+ + 6 + + Mod_RiscaldoInf ENG + Mod_RiscaldoInf ITA + + HEATING +
HEATING
+ -1 + false + false + 1 +
+ + 7 + + Mod_RiscaldoSup ENG + Mod_RiscaldoSup ITA + + HEATING +
HEATING
+ 0 + false + false + 2 +
+ + 8 + + Mod_PirometroRisc ENG + Mod_PirometroRisc ITA + + HEATING +
HEATING
+ 80 + true + true + 3 +
+ + 13 + + Mod_Imbutitura ENG + Mod_Imbutitura ITA + + DRAWING +
FORMING
+ 99 + true + true + 2 +
+ + 16 + + Mod_Raffreddamento ENG + Mod_Raffreddamento ITA + + COOLING +
FORMING
+ -1 + true + false + 2 +
+ + 17 + + Mod_PirometroRaffr ENG + Mod_PirometroRaffr ITA + + COOLING +
FORMING
+ 139 + true + true + 3 +
+ + 19 + + Mod_Vuoto ENG + Mod_Vuoto ITA + + VACUUM +
FORMING
+ -1 + true + false + 4 +
+ + 21 + + Mod_VuotoDiretto ENG + Mod_VuotoDiretto ITA + + VACUUM +
FORMING
+ -1 + true + false + 5 +
+ + 36 + + Mod_EstrazioneZ ENG + Mod_EstrazioneZ ITA + + EXTRACTION +
EXTRACTION
+ -1 + true + false + 2 +
+ + 42 + + Mod_SalitaCZ ENG + Mod_SalitaCZ ITA + + MOVEMENT +
EXTRACTION
+ -1 + false + false + 1 +
+
\ No newline at end of file diff --git a/Thermo.Active.Config/Config/moduleBlockConfigValidator.xsd b/Thermo.Active.Config/Config/moduleBlockConfigValidator.xsd new file mode 100644 index 00000000..220ba2fb --- /dev/null +++ b/Thermo.Active.Config/Config/moduleBlockConfigValidator.xsd @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Thermo.Active.Config/Config/risk2007.xml b/Thermo.Active.Config/Config/risk2007.xml new file mode 100644 index 00000000..61a34c58 --- /dev/null +++ b/Thermo.Active.Config/Config/risk2007.xml @@ -0,0 +1,981 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + \ No newline at end of file diff --git a/Thermo.Active.Config/Config/risk2007Validator.xsd b/Thermo.Active.Config/Config/risk2007Validator.xsd new file mode 100644 index 00000000..415a9194 --- /dev/null +++ b/Thermo.Active.Config/Config/risk2007Validator.xsd @@ -0,0 +1,304 @@ + + + + + + + Id tipo resistenza. Corrisponde al'id riferimento + + + + + Numero riga di appartenenza + + + + + Id della termocoppia installata. 0 = no termocoppia, altrimenti 1... + + + + + Id della termocoppia di riferimento + + + + + Id del gruppo di appartenenza + + + + + Numero del canale assoluto + + + + + TRUE = duty cycle nuovo, altrimenti FALSE + + + + + Spazio da aggiungere prima della resistenza [pix] + + + + + Spazio da aggiungere dopo la resistenza [pix] + + + + + Sfasamento per pilotaggio a impulsi: +possibilità di far lavorare alcuni canali sfasati rispetto agli altri, in modo da avere un assorbimento istantaneo il più basso possibile. +Default=FALSE + + + + + + Ritardo per la partenza del soft-start ad impulsi per ogni singolo canale senza che questo abbia necessariamente finito la rampa +Default=0 + + + + + + + + + + + + + + + + + + Id tipo resistenza + + + + Corrente riferimento specifico per il tipo resistenza + + + + + Potenza nominale della resistenza espressa in Watt + + + + + Marca e modello resistenza + + + + + 1=250mm 2=125mm + + + + + Soglia bassa sotto cui considerare l'assorbimento un allarme + + + + + Usata in collaudo. Esprime la semiampiezza dell'intorno di corrente di lettura entro cui l'assorbimento è considerato coretto + + + + + Usata in lavoro. Esprime il numero di letture non buone oltre cui considerare allarme + + + + + Impostazioni softstart. +Bit0-4: definiscono la velocità del softstart. Il valore indica il numero di ripetizioni del singolo step della rampa. Più il valore è piccolo maggiore sarà la velocità del softstart. [default 3]. +Bit5: se = 0 il softstart lavora con tabella fissa (solo 50hZ), se = 1 il softstart lavora con i valori WaveMax e IntervalWidth, anche con frequenze diverse da 50hZ. + + + + + Numero di letture dell'allarme oltre cui considerare vero l'allarme + + + + + Limite di percentuale per soft start +Default=100 +Esempio: se pct target = 50% e SoftLim=35%, viene effettuato il soft start fino al 35% poi si salta alla pct target di 50% + + + + + + + Percentuale minima per duty a impulsi +Default=0 +Esempio: se PctMin=40% per pct target da 0-39% viene usato il pilataggio a parzializzazione di fase (alogeno) da 40% a 100% viene usato il pilotaggio a impulsi (quarzo) + + + + + + + + Record di configurazione correnti per tipo resistenza + + + + Boh!!! + + + + + Sensibilità [W] + + + + + Sensibilità [W] + + + + + Sensibilità [W] + + + + + Sensibilità [W] + + + + + Sensibilità [W] + + + + + Sensibilità [W] + + + + + Sensibilità [W] + + + + + Sensibilità [W] + + + + + + Configurazione sistema di riscaldo NEW_Risk2007 + + + + + + + + + + 0 = riscaldo superiore, 1 = riscaldo inferiore, 2 = preriscaldo sup., 3 = preriscaldo inf. + + + + + Fattore di scala per disegnare il riscaldo [TwinPix] + + + + + Fattore di proporzione fra larghezza e altezza [larghezza/altezza] + + + + + Offset di compensazione lettura termocoppia + + + + + Interasse fra le righe di resistenza [mm] + + + + + + + + + + + + + + + + + + + + + + + + Indirizzo di memorizzazione termocoppie lato CPU: 4D5=R8TC8IO, D5=NEW_RISK2007 + + + + + Velocità di trasmissione [baud] (9600,19200) + + + + + Porta seriale per comunicazione con CPU riscaldo + + + + + Fattore di moltiplicazione della lettura della termocoppia: 0.5=R8TC8IO, 0.6=NEW_RISK2007 + + + + + TRUE = utilizzo la parametrizzazione per il softStart, FALSE = utilizzo il softstart cablato nel firmware delle res8CH + + + + + Numero di semionde massime in un secondo (50hZ = 120, 60hZ = 140) + + + + + Durata in tempo di 1/100 di semionda [microsec] (50hZ = 95, 60hZ = 82) + + + + + Durata timeout per spegnimento riscaldo in caso di mancanza di comunicazione con la CPU. Trascorso il timout serve rimandare un comando di ON alla CPU per la riaccensione del riscaldo. Indicando 0 la CPU ignora lo spegnimento automatico su assenza di comunicazione. [sec] + + + + + Durata in tempo di 1/100 di semionda [microsec] per lampade al quarzo + + + + + Frequenza di invio dei frame di regolazione dalla cpu per lampade al quarzo + + + + + diff --git a/Thermo.Active.Config/LiveData.cs b/Thermo.Active.Config/LiveData.cs new file mode 100644 index 00000000..e129a251 --- /dev/null +++ b/Thermo.Active.Config/LiveData.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Thermo.Active.Config +{ + /// + /// Live data for Thermo Active + /// + public class LiveData + { + /// + /// Current loaded recipe + /// + public string RecipeName = "current.json"; + /// + /// Dictionary of all parameters and values + /// + public Dictionary RecipeParameters; + /// + /// Dictionary of all channels and relative setpoints + /// + public Dictionary ChannelSetpoints; + + } +} diff --git a/Thermo.Active.Config/Recipes/.placeholder.txt b/Thermo.Active.Config/Recipes/.placeholder.txt new file mode 100644 index 00000000..5f282702 --- /dev/null +++ b/Thermo.Active.Config/Recipes/.placeholder.txt @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Thermo.Active.Config/ServerConfig.cs b/Thermo.Active.Config/ServerConfig.cs index 361d1889..732926fd 100644 --- a/Thermo.Active.Config/ServerConfig.cs +++ b/Thermo.Active.Config/ServerConfig.cs @@ -32,7 +32,8 @@ namespace Thermo.Active.Config public static List NcSoftKeysConfig; public static List InitialAlarmsConfig; public static List HeadsConfig; - public static List RecipeConfig; + + public static CmsConnectConfigModel CmsConnectConfig; public static AreasConfigModel ProductionConfig; @@ -52,5 +53,16 @@ namespace Thermo.Active.Config public static List MacrosConfig; public static string CMSMainProgramContent; + + + // Thermo + public static List RecipeConfig; + public static List ModBlockConfig; + public static List RiskResistConfig; + public static List RiskChannelConfig; + public static List RiskBoardConfig; + + public static LiveData RecipeLiveData; } + } \ No newline at end of file diff --git a/Thermo.Active.Config/ServerConfigController.cs b/Thermo.Active.Config/ServerConfigController.cs index 68df96f3..f3172c2b 100644 --- a/Thermo.Active.Config/ServerConfigController.cs +++ b/Thermo.Active.Config/ServerConfigController.cs @@ -13,14 +13,15 @@ using System.Xml.Linq; using System.Xml.Schema; using System.Xml.Serialization; using static Thermo.Active.Config.ServerConfig; -using static Thermo.Active.Model.Constants; +using static Thermo.Active.Model.Constants; using static Thermo.Active.Utils.SupportFunctions; +using Newtonsoft.Json; namespace Thermo.Active.Config { public static class ServerConfigController { - private static string actualFileName; + private static string actualFileName; public static void ReadStartupConfig() { @@ -34,15 +35,17 @@ namespace Thermo.Active.Config ReadAlarmsConfig(); ReadHeadsConfig(); ReadRecipeConfig(); + ReadModBlockConfig(); + ReadRiskConfig(); // ReadCMSConnectConfig(); ReadMacros(); ReadScadaFile(); - //ReadMainProgram(); + ReadLiveData(); } catch (XmlException ex) { ExceptionManager.ManageError(ERROR_LEVEL.FATAL, - "Error while reading file: " + ex.SourceUri + + "Error while reading file: " + ex.SourceUri + "\n Error: " + ex.Message, true ); @@ -51,7 +54,7 @@ namespace Thermo.Active.Config { var message = ex.Message; if (ex.InnerException != null) - message += "\n"+ex.InnerException.Message; + message += "\n" + ex.InnerException.Message; ExceptionManager.ManageError(ERROR_LEVEL.FATAL, message, true); } } @@ -60,7 +63,7 @@ namespace Thermo.Active.Config { // Create new instance XmlSchemaSet readerSettings = new XmlSchemaSet(); - + // Add Schema from Assembly Assembly myAssembly = Assembly.GetExecutingAssembly(); using (Stream schemaStream = myAssembly.GetManifestResourceStream(configSchemaFilePath)) @@ -70,11 +73,11 @@ namespace Thermo.Active.Config readerSettings.Add(null, schemaReader); } } - + actualFileName = configFilePath; // Open file reader - XDocument xmlConfigFile = XDocument.Load((!isFullPath ? BASE_PATH + "\\": "") + configFilePath); + XDocument xmlConfigFile = XDocument.Load((!isFullPath ? BASE_PATH + "\\" : "") + configFilePath); // Validate file xmlConfigFile.Validate(readerSettings, ValidationHandler); @@ -130,13 +133,13 @@ namespace Thermo.Active.Config break; case AREAS.SCADA_KEY: - SetAreaValue(ref ScadaConfig, element); + SetAreaValue(ref ScadaConfig, element); break; case AREAS.JOBEDITOR_KEY: SetAreaValue(ref JobEditorConfig, element); break; - + case AREAS.USERS_KEY: SetAreaValue(ref UsersConfig, element); break; @@ -158,20 +161,20 @@ namespace Thermo.Active.Config private static void ValidationHandler(object sender, ValidationEventArgs e) { if (e.Severity == XmlSeverityType.Warning) - { + { ExceptionManager.ManageError(ERROR_LEVEL.WARNING, e.Message, true); - } + } else if (e.Severity == XmlSeverityType.Error) - { + { ExceptionManager.ManageError(ERROR_LEVEL.FATAL, // "Error while reading file: " + e.Exception.SourceUri + "Error while reading XML file \"" + actualFileName + "\" \n\n" + e.Message, true ); - } + } } - public static bool CheckAreaStatus(string areaName) + public static bool CheckAreaStatus(string areaName) { // Get Area status ( enabled field) by name switch (areaName) { @@ -206,7 +209,7 @@ namespace Thermo.Active.Config } private static void ReadScadaFile() - { + { DirectoryInfo d = new DirectoryInfo(SCADA_DIRECTORY); FileInfo[] files = d.GetFiles("*.xml"); @@ -218,7 +221,7 @@ namespace Thermo.Active.Config StreamReader sr = new StreamReader(SCADA_DIRECTORY + file.Name); XmlSerializer xmlSerializer = new XmlSerializer(typeof(ScadaSchemaModel)); - ScadaSchemaModel schema = xmlSerializer.Deserialize(sr) as ScadaSchemaModel; + ScadaSchemaModel schema = xmlSerializer.Deserialize(sr) as ScadaSchemaModel; // Setup incremental ids @@ -231,7 +234,8 @@ namespace Thermo.Active.Config { Id = i++, Buttons = x.Buttons.Select(y => { y.Id = i++; return y; }).ToArray(), - Images = x.Images.Select(y => { + Images = x.Images.Select(y => + { y.Id = i++; y.Name = GetImageBase64String(SCADA_DIRECTORY + name, y.Name); return y; @@ -277,7 +281,7 @@ namespace Thermo.Active.Config InstallationDate = x.Element("installationDate").Value, MgiOption = Convert.ToBoolean(x.Element("mgiOption").Value), SiemensKeyboardOption = Convert.ToBoolean(x.Element("siemensKeyboardOption").Value), - MachineNumberHasLetters = Convert.ToBoolean(x.Element("machineNumberHasLetters").Value) + MachineNumberHasLetters = Convert.ToBoolean(x.Element("machineNumberHasLetters").Value) }).FirstOrDefault(); // Read Prod Software Config with LINQ @@ -286,9 +290,9 @@ namespace Thermo.Active.Config .Descendants(PROD_SFT_CONFIG_KEY) .Select(x => new SoftwareProdConfigModel() { - Enabled = Convert.ToBoolean(x.Element("enabled").Value), + Enabled = Convert.ToBoolean(x.Element("enabled").Value), Path = x.Element("path").Value - }).FirstOrDefault(); + }).FirstOrDefault(); // Read server config with LINQ and save into static config ServerStartupConfig = xmlConfigFile @@ -302,7 +306,7 @@ namespace Thermo.Active.Config EnableDirectoryBrowsing = Convert.ToBoolean(x.Element("enableDirectoryBrowsing").Value), DatabaseAddress = x.Element("databaseAddress").Value, AutoOpenCmsClient = Convert.ToBoolean(x.Element("autoOpenCmsClient").Value), - TextEditorPath = x.Element("textEditorPath").Value, + TextEditorPath = x.Element("textEditorPath").Value, MTCFolderPath = x.Element("MTCFolderPath").Value, MTCApplicationName = x.Element("MTCApplicationName").Value, MaxAlarmsRows = Convert.ToInt32(x.Element("maxAlarmsRows").Value), @@ -345,7 +349,7 @@ namespace Thermo.Active.Config XDocument xmlConfigFile = GetXmlHandlerWithValidator(MAINTENANCES_CONFIG_SCHEMA_PATH, MAINTENANCES_CONFIG_PATH); ReadAssistanceConfig(); - + MaintenancesConfig = xmlConfigFile .Descendants("maintenances") .Elements("maintenance") @@ -374,11 +378,11 @@ namespace Thermo.Active.Config XDocument xmlConfigFile = GetXmlHandlerWithValidator(MAINTENANCES_CONFIG_SCHEMA_PATH, MAINTENANCES_CONFIG_PATH); ReadAssistanceConfigFromXml( xmlConfigFile.Root.Descendants("cmsContacts").FirstOrDefault(), - out CmsContactConfig, - out CmsAuxContact1, + out CmsContactConfig, + out CmsAuxContact1, out CmsAuxContact2 ); - + xmlConfigFile = GetXmlHandlerWithValidator(MAINTENANCES_CONFIG_SCHEMA_PATH, MAINTENANCES_CONFIG_PATH); ReadAssistanceConfigFromXml( xmlConfigFile.Root.Descendants("scmContacts").FirstOrDefault(), @@ -545,7 +549,7 @@ namespace Thermo.Active.Config { AlarmId = Convert.ToInt32(x.Element("alarmId").Value), PlcId = Convert.ToInt32(x.Element("plcId").Value), - RestoreIsActive = Convert.ToBoolean(x.Element("restoreIsActive").Value) + RestoreIsActive = Convert.ToBoolean(x.Element("restoreIsActive").Value) }) .ToList(); } @@ -572,19 +576,21 @@ namespace Thermo.Active.Config }) .ToList(); } - + /// + /// Recipe Config setup from file + /// private static void ReadRecipeConfig() { XDocument xmlConfigFile = GetXmlHandlerWithValidator(RECIPE_CONFIG_SCHEMA_PATH, RECIPE_CONFIG_PATH); - // Read head config from XML file + // Read Recipe config from XML file RecipeConfig = xmlConfigFile .Root .Elements() .Select(x => new RecipeConfigModel() { Id = Convert.ToInt16(x.Element("id").Value), - Category = GetTActCategory(x.Element("category").Value), + Category = GetTActParamType(x.Element("category").Value), SubCategory_1 = x.Element("subCategory_1").Value, SubCategory_2 = x.Element("subCategory_2").Value, Name = x.Element("name").Value, @@ -593,6 +599,178 @@ namespace Thermo.Active.Config }) .ToList(); } + /// + /// Module config setup from file + /// + private static void ReadModBlockConfig() + { + XDocument xmlConfigFile = GetXmlHandlerWithValidator(MODBLOCK_CONFIG_SCHEMA_PATH, MODBLOCK_CONFIG_PATH); + + // Read head config from XML file + ModBlockConfig = xmlConfigFile + .Root + .Elements() + .Select(x => new ModBlockConfigModel() + { + Id = Convert.ToInt16(x.Element("id").Value), + LocalizedLabels = x.Element("localizedLabels").Elements().ToDictionary( + y => y.Attribute("langKey").Value, y => y.Value + ), + Type = GetTActMB_Type(x.Element("type").Value), + Section = GetTActMB_Section(x.Element("section").Value), + IdParam = Convert.ToInt16(x.Element("idParam").Value), + ShowDelay = Convert.ToBoolean(x.Element("showDelay").Value), + Priority = Convert.ToInt16(x.Element("priority").Value) + }) + .ToList(); + } + /// + /// Warmers config setup from file + /// + private static void ReadRiskConfig() + { + XDocument xmlConfigFile = GetXmlHandlerWithValidator(RISK_CONFIG_SCHEMA_PATH, RISK_CONFIG_PATH); + + int i = 0; + + List Riflettori = new List(); + List Resistenze = new List(); + List Riferimenti = new List(); + + // carico gli oggetti "nativi" + Riferimenti = xmlConfigFile + .Root + .Elements("riferimenti") + .Select(x => new RiskRiferimenti() + { + Id = Convert.ToInt16(x.Value), + Dimensione = Convert.ToInt16(x.Attribute("dimensione").Value), + Potenza = Convert.ToInt16(x.Attribute("potenza").Value), + Modello = x.Attribute("modello").Value + }) + .ToList(); + + + Riflettori = xmlConfigFile + .Root + .Elements("riflettore") + .Select(x => new RiskRiflettore() + { + Tipo = Convert.ToInt16(x.Attribute("tipo").Value), + Resistenze = x.Elements("resistenza") + .Select(y => new RiskResistenza() + { + Canale = Convert.ToInt16(y.Attribute("canale").Value), + Riga = Convert.ToInt16(y.Attribute("riga").Value), + Tipo = Convert.ToInt16(y.Attribute("tipo").Value) + } + ) + .ToList() + }) + .ToList(); + + // conversione da modelli RISK a modello Thermo... + int numCol = -1; + int ResistId = 0; + int oldRow = 0; + int currIdBoard = 0; + RiskBoardConfig = new List(); + RiskResistConfig = new List(); + RiskChannelConfig = new List(); + + // inizializzo le 64 schede a 0 canali... + for (int idxBoard = 0; idxBoard < 64; idxBoard++) + { + RiskBoardConfig.Add(new RiskBoardModel() + { + IdBoard = idxBoard, + NumChannels = 0 + }); + } + + // ciclo x calcolare i canali + foreach (var riflettore in Riflettori) + { + // ciclo sulle resistenze + foreach (var resistenza in riflettore.Resistenze) + { + // cerco la scheda dato il canale... 16 ch x ogni scheda + currIdBoard = (resistenza.Canale - 1) / 16; + // cerco se ho già la scheda + var boardFound = RiskBoardConfig.Find(item => item.IdBoard == currIdBoard); + if (boardFound == null) + { + RiskBoardConfig.Add(new RiskBoardModel() + { + IdBoard = currIdBoard, + NumChannels = 1 + }); + } + else + { + boardFound.NumChannels += 1; + } + + + // cerco se ho già il canale + var chanFound = RiskChannelConfig.Find(item => item.IdChannel == resistenza.Canale); + if (chanFound == null) + { + // cerco il TIPO... + var riferimento = Riferimenti.Find(x => x.Id == resistenza.Tipo); + if (riferimento != null) + { + RiskChannelConfig.Add(new RiskChannelModel() + { + IdChannel = resistenza.Canale, + IdReflector = riflettore.Tipo, + SetpointRecipe = 0, + SetpointThermo = 0, + MaxPower = riferimento.Potenza, + NumResist = 1, + CalcIchMin=riferimento.Modello.Contains("Quarzo") + }); + } + else + { + chanFound.NumResist += 1; + } + } + + } + + } + + // ciclo sui riflettori x recuperare le resistenze... + foreach (var riflettore in Riflettori) + { + // ciclo sulle resistente + foreach (var resistenza in riflettore.Resistenze) + { + if (oldRow != resistenza.Riga) + { + numCol = 0; + oldRow = resistenza.Riga; + } + else + { + numCol++; + } + + // cerco il TIPO... + var riferimento = Riferimenti.Find(x => x.Id == resistenza.Tipo); + + RiskResistConfig.Add(new RiskResistModel() + { + Id = ResistId++, + Row = resistenza.Riga, + Column = numCol, + IdChannel = resistenza.Canale, + Dimension = riferimento.Dimensione + }); ; + } + } + } private static void ReadCMSConnectConfig() { @@ -624,14 +802,14 @@ namespace Thermo.Active.Config Token = x.Element("token").Value }) .FirstOrDefault(); - + if (DecodeCMSConnectGatewayLogin(tempGatewayConfigModel.Token, out _tempUSR, out _tempPSW)) { tempGatewayConfigModel.Username = _tempUSR; tempGatewayConfigModel.Password = _tempPSW; } else - throw new Exception("Error while reading \""+ CMS_CONNECT_CONFIG_PATH + "\": Gateway Token not valid"); + throw new Exception("Error while reading \"" + CMS_CONNECT_CONFIG_PATH + "\": Gateway Token not valid"); CmsConnectConfig.Gateway = tempGatewayConfigModel; } @@ -648,15 +826,187 @@ namespace Thermo.Active.Config .Select(x => x.Value) .ToList(); } + /// + /// Try to load live data from json persistence file + /// + public static bool ReadLiveData() + { + bool answ = false; + if (File.Exists(LIVE_RECIPE_PATH)) + { + // load all text data + var rawData = File.ReadAllText(LIVE_RECIPE_PATH); + try + { + // deserialize to object + RecipeLiveData = JsonConvert.DeserializeObject(rawData); + } + catch + { } + answ = true; + } + else + { + // reload from template... + var rawData = File.ReadAllText(RECIPE_TEMPLATE_PATH); + try + { + // deserialize to object + RecipeLiveData = JsonConvert.DeserializeObject(rawData); + } + catch + { } + answ = true; + } + // rendo se fatto + return answ; + } + /// + /// Try to load selected recipe to live data (memory and json persistence file) + /// + public static bool LoadRecipe(string filePath) + { + bool answ = false; + // check file extension + string fileName = Path.GetFileName(filePath); + if (!fileName.EndsWith(".json")) + { + fileName += ".json"; + filePath += ".json"; + } + // check filePath... + if (!filePath.Contains(RECIPE_DIRECTORY) && filePath != RECIPE_TEMPLATE_PATH) + { + // aggiungo base path! + filePath = RECIPE_DIRECTORY + filePath; + } + if (File.Exists(filePath)) + { + answ = true; + + // load all text data + var rawData = File.ReadAllText(filePath); + try + { + // deserialize to object + RecipeLiveData = JsonConvert.DeserializeObject(rawData); + } + catch + { } + // update current live data! + SaveRecipeCurrent(); + } + // rendo se fatto + return answ; + } + /// + /// Try to load template recipe + /// + public static bool LoadTemplate() + { + bool answ = false; + // check filePath... + if (File.Exists(RECIPE_TEMPLATE_PATH)) + { + answ = true; + + // load all text data + var rawData = File.ReadAllText(RECIPE_TEMPLATE_PATH); + try + { + // deserialize to object + RecipeLiveData = JsonConvert.DeserializeObject(rawData); + // update NAME + RecipeLiveData.RecipeName = $"{DateTime.Now:yyyyMMss_HHmmss}.json"; + } + catch + { } + // update current live data! + SaveRecipeCurrent(); + } + // rendo se fatto + return answ; + } + /// + /// Try to write live data to json persistence file + /// + public static bool SaveRecipeCurrent() + { + bool answ = false; + try + { + answ = true; + // serialize + string rawData = JsonConvert.SerializeObject(RecipeLiveData); + // save live! + var dir = Path.GetDirectoryName(LIVE_RECIPE_PATH); + if (!Directory.Exists(dir)) + { + Directory.CreateDirectory(dir); + } + File.WriteAllText(LIVE_RECIPE_PATH, rawData); + } + catch + { } + // rendo se fatto + return answ; + } + /// + /// Try to save live recipe as NEW template + /// + public static bool SaveRecipeTemplate() + { + + RecipeLiveData.RecipeName = "template.json"; + return SaveRecipe(RECIPE_TEMPLATE_PATH); + } + /// + /// Try to save live recipe to selected filePath + /// + public static bool SaveRecipe(string filePath) + { + bool answ = false; + try + { + answ = true; + string fileName = Path.GetFileName(filePath); + if (!fileName.EndsWith(".json")) + { + fileName += ".json"; + filePath += ".json"; + } + // fix name! + RecipeLiveData.RecipeName = fileName; + // serialize + string rawData = JsonConvert.SerializeObject(RecipeLiveData); + // save live! + File.WriteAllText(LIVE_RECIPE_PATH, rawData); + // check filePath... + if (!filePath.Contains(RECIPE_DIRECTORY) && filePath != RECIPE_TEMPLATE_PATH) + { + // aggiungo base path! + filePath = RECIPE_DIRECTORY + filePath; + } + // save! + File.WriteAllText(filePath, rawData); + } + catch + { } + // rendo se fatto + return answ; + } + +#if false public static void ReadMainProgram() { if (File.Exists(MAIN_PROGRAM_CONFIG_PATH)) { CMSMainProgramContent = File.ReadAllText(MAIN_PROGRAM_CONFIG_PATH); } - } + } +#endif public static string CalculateHash(string filename) { diff --git a/Thermo.Active.Config/Thermo.Active.Config.csproj b/Thermo.Active.Config/Thermo.Active.Config.csproj index e171df4b..bfee6bae 100644 --- a/Thermo.Active.Config/Thermo.Active.Config.csproj +++ b/Thermo.Active.Config/Thermo.Active.Config.csproj @@ -32,6 +32,9 @@ 4 + + ..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll + @@ -52,9 +55,13 @@ Designer PreserveNewest + + + Always + Always @@ -69,9 +76,15 @@ Always + + PreserveNewest + PreserveNewest + + PreserveNewest + PreserveNewest Designer @@ -159,5 +172,22 @@ Designer + + + Designer + + + + + Designer + + + + + + Always + + + \ No newline at end of file diff --git a/Thermo.Active.Config/packages.config b/Thermo.Active.Config/packages.config new file mode 100644 index 00000000..7c080311 --- /dev/null +++ b/Thermo.Active.Config/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Thermo.Active.Core/ThreadsFunctions.cs b/Thermo.Active.Core/ThreadsFunctions.cs index 1329d902..2731f119 100644 --- a/Thermo.Active.Core/ThreadsFunctions.cs +++ b/Thermo.Active.Core/ThreadsFunctions.cs @@ -26,7 +26,7 @@ using Thermo.Active.Model.DTOModels.Recipe; public static class ThreadsFunctions { - public static int recipeRtCounter = 5; + public static int recipeRtCounter = 0; public static bool reconnectionIsRunning = false; private static ConcurrentDictionary Timers = new ConcurrentDictionary(); @@ -692,7 +692,91 @@ public static class ThreadsFunctions catch (ThreadAbortException) { ncAdapter.Dispose(); - } + } + } + public static void ReadProdInfoData() + { + NcAdapter ncAdapter = new NcAdapter(); + Stopwatch sw = new Stopwatch(); + + try + { + // Try connection + CmsError libraryError = ncAdapter.Connect(); + if (libraryError.errorCode != 0) + ManageLibraryError(libraryError); + + while (true) + { + sw.Restart(); + + // Check if client is connected + if (ncAdapter.numericalControl.NC_IsConnected()) + { + // Get new data from PLC + libraryError = ncAdapter.ReadProdInfoData(out ThermoModels.ProdInfoModel prodInfoData); + if (libraryError.IsError()) + ManageLibraryError(libraryError); + + MessageServices.Current.Publish(SEND_THERMO_PROD_INFO_DATA, null, prodInfoData); + } + else + RestoreConnection(); + + sw.Stop(); + + //Update thread timer + UpdateStat(MethodBase.GetCurrentMethod().Name, sw.ElapsedMilliseconds); + // Wait + Thread.Sleep(CalcSleepTime(500, (int)sw.ElapsedMilliseconds)); + } + } + catch (ThreadAbortException) + { + ncAdapter.Dispose(); + } + } + public static void ReadProdCycleData() + { + NcAdapter ncAdapter = new NcAdapter(); + Stopwatch sw = new Stopwatch(); + + try + { + // Try connection + CmsError libraryError = ncAdapter.Connect(); + if (libraryError.errorCode != 0) + ManageLibraryError(libraryError); + + while (true) + { + sw.Restart(); + + // Check if client is connected + if (ncAdapter.numericalControl.NC_IsConnected()) + { + // Get new data from PLC + libraryError = ncAdapter.ReadProdCycleData(out ThermoModels.ProdCycleModel prodCycleData); + if (libraryError.IsError()) + ManageLibraryError(libraryError); + + MessageServices.Current.Publish(SEND_THERMO_PROD_CYCLE_DATA, null, prodCycleData); + } + else + RestoreConnection(); + + sw.Stop(); + + //Update thread timer + UpdateStat(MethodBase.GetCurrentMethod().Name, sw.ElapsedMilliseconds); + // Wait + Thread.Sleep(CalcSleepTime(500, (int)sw.ElapsedMilliseconds)); + } + } + catch (ThreadAbortException) + { + ncAdapter.Dispose(); + } } public static void ReadRecipeData() { @@ -721,7 +805,7 @@ public static class ThreadsFunctions if (ncAdapter.numericalControl.NC_IsConnected()) { // Get new data from PLC - libraryError = ncAdapter.ReadRecipeData(onlyRt, out Dictionary currRecipe); + libraryError = ncAdapter.ReadRecipeData(onlyRt, false, out Dictionary currRecipe); if (libraryError.IsError()) ManageLibraryError(libraryError); diff --git a/Thermo.Active.Core/ThreadsHandler.cs b/Thermo.Active.Core/ThreadsHandler.cs index ff2a4420..5b7b22b3 100644 --- a/Thermo.Active.Core/ThreadsHandler.cs +++ b/Thermo.Active.Core/ThreadsHandler.cs @@ -14,19 +14,21 @@ namespace Thermo.Active.Core ThreadsFunctions.ReadAlarms, ThreadsFunctions.ReadPowerOnData, ThreadsFunctions.StatThread, - ThreadsFunctions.ReadProcessesPPStatus, + //ThreadsFunctions.ReadProcessesPPStatus, ThreadsFunctions.ReadEnabledFunctionality, ThreadsFunctions.ReadExpiredMaintenances, - ThreadsFunctions.ReadAxesPositionsData, + //ThreadsFunctions.ReadAxesPositionsData, ThreadsFunctions.ReadUserSoftKeysData, //ThreadsFunctions.ReadHeadsData, - ThreadsFunctions.ReadAxesNamesData, + //ThreadsFunctions.ReadAxesNamesData, //ThreadsFunctions.ReadActiveProgramData, //ThreadsFunctions.ReadPartProgramQueueData, ThreadsFunctions.ReadScadaData, ThreadsFunctions.ReadM154Data, // levare? // ThreadsFunctions.ReadNcSoftKeysData, ThreadsFunctions.ReadGaugeData, + ThreadsFunctions.ReadProdInfoData, + ThreadsFunctions.ReadProdCycleData, ThreadsFunctions.ReadRecipeData, ThreadsFunctions.ReadWarmersData, ThreadsFunctions.ReadModulesData diff --git a/Thermo.Active.Model/ConfigModels/ModBlockConfigModel.cs b/Thermo.Active.Model/ConfigModels/ModBlockConfigModel.cs new file mode 100644 index 00000000..52738f36 --- /dev/null +++ b/Thermo.Active.Model/ConfigModels/ModBlockConfigModel.cs @@ -0,0 +1,16 @@ +using System.Collections.Generic; +using static Thermo.Active.Model.Constants; + +namespace Thermo.Active.Model.ConfigModels +{ + public class ModBlockConfigModel + { + public int Id; + public Dictionary LocalizedLabels { get; set; } + public TACT_MBLOCK_TYPE Type { get; set; } + public TACT_MBLOCK_SECTION Section { get; set; } + public int IdParam{ get; set; } + public bool ShowDelay { get; set; } + public int Priority { get; set; } + } +} diff --git a/Thermo.Active.Model/ConfigModels/RiskConfigModel.cs b/Thermo.Active.Model/ConfigModels/RiskConfigModel.cs new file mode 100644 index 00000000..c08c65f0 --- /dev/null +++ b/Thermo.Active.Model/ConfigModels/RiskConfigModel.cs @@ -0,0 +1,47 @@ +using System.Collections.Generic; +using static Thermo.Active.Model.Constants; + +namespace Thermo.Active.Model.ConfigModels +{ + public class RiskRiflettore + { + public int Tipo; + public List Resistenze; + } + public class RiskResistenza + { + public int Tipo; + public int Riga; + public int Canale; + } + public class RiskRiferimenti + { + public int Id; + public int Potenza; + public int Dimensione; + public string Modello; + } + public class RiskResistModel + { + public int Id; + public int IdChannel; + public int Column; + public int Row; + public int Dimension; + } + public class RiskChannelModel + { + public int IdChannel; + public int IdReflector; + public int SetpointRecipe; + public int SetpointThermo; + public int MaxPower; + public int NumResist; + public bool CalcIchMin; + } + public class RiskBoardModel + { + public int IdBoard; + public int NumChannels; + } +} diff --git a/Thermo.Active.Model/Constants.cs b/Thermo.Active.Model/Constants.cs index b3e58e33..a9e7be3f 100644 --- a/Thermo.Active.Model/Constants.cs +++ b/Thermo.Active.Model/Constants.cs @@ -90,6 +90,25 @@ namespace Thermo.Active.Model Options } + public enum TACT_MBLOCK_TYPE + { + ND = 0, + HEATING, + DRAWING, + MOVEMENT, + VACUUM, + COOLING, + EXTRACTION + } + + public enum TACT_MBLOCK_SECTION + { + ND = 0, + HEATING, + FORMING, + EXTRACTION + } + public enum MAINTENANCE_UNIT_OF_MEASURE { mm = 0, @@ -191,6 +210,9 @@ namespace Thermo.Active.Model public static string WEBSITE_DIRECTORY = BASE_PATH + "\\view"; #endif public const string CONFIG_DIRECTORY = "Config\\"; + public const string RECIPE_DIRECTORY = "Recipes\\"; + public const string RECIPE_TEMPLATE_PATH = CONFIG_DIRECTORY + RECIPE_DIRECTORY + "template.json"; + public const string LIVE_RECIPE_PATH = TEMP_FOLDER + RECIPE_DIRECTORY + "current.json"; public const string RESOURCE_DIRECTORY = @"Thermo.Active.Config.Config."; public const string SERVER_CONFIG_SCHEMA_PATH = RESOURCE_DIRECTORY + @"serverConfigValidator.xsd"; public const string SERVER_CONFIG_PATH = CONFIG_DIRECTORY + "serverConfig.xml"; @@ -216,6 +238,12 @@ namespace Thermo.Active.Model public const string RECIPE_CONFIG_SCHEMA_PATH = RESOURCE_DIRECTORY + "recipeConfigValidator.xsd"; public const string RECIPE_CONFIG_PATH = CONFIG_DIRECTORY + "recipeConfig.xml"; + public const string MODBLOCK_CONFIG_SCHEMA_PATH = RESOURCE_DIRECTORY + "moduleBlockConfigValidator.xsd"; + public const string MODBLOCK_CONFIG_PATH = CONFIG_DIRECTORY + "moduleBlockConfig.xml"; + + public const string RISK_CONFIG_SCHEMA_PATH = RESOURCE_DIRECTORY + "risk2007Validator.xsd"; + public const string RISK_CONFIG_PATH = CONFIG_DIRECTORY + "risk2007.xml"; + public const string NC_SOFTKEYS_CONFIG_SCHEMA_PATH = RESOURCE_DIRECTORY + "ncSoftKeyConfigValidator.xsd"; public const string NC_SOFTKEYS_CONFIG_PATH = CONFIG_DIRECTORY + "ncSoftKeyConfig.xml"; @@ -227,6 +255,7 @@ namespace Thermo.Active.Model public const string MAIN_PROGRAM_CONFIG_PATH = CONFIG_DIRECTORY + "customMainProgram.txt"; + public static string LANGUAGE_PACK_DIRECTORY = BASE_PATH + "\\languages\\"; public static string LANGUAGE_SCHEMA_PATH = BASE_PATH + "\\LanguageValidator.xsd"; @@ -270,6 +299,8 @@ namespace Thermo.Active.Model public const string SEND_THERMO_MODULE_DATA = "SEND_THERMO_MODULE_DATA"; public const string SEND_THERMO_WARMERS_DATA = "SEND_THERMO_WARMERS_DATA"; public const string SEND_THERMO_GAUGE_DATA = "SEND_THERMO_GAUGE_DATA"; + public const string SEND_THERMO_PROD_INFO_DATA = "SEND_THERMO_PROD_INFO_DATA"; + public const string SEND_THERMO_PROD_CYCLE_DATA = "SEND_THERMO_PROD_CYCLE_DATA"; public const string BROADCAST_DATA = "BROADCAST_DATA"; diff --git a/Thermo.Active.Model/DTOModels/Recipe/DTOModule.cs b/Thermo.Active.Model/DTOModels/Recipe/DTOModule.cs new file mode 100644 index 00000000..26831f6f --- /dev/null +++ b/Thermo.Active.Model/DTOModels/Recipe/DTOModule.cs @@ -0,0 +1,71 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Thermo.Active.Model.DTOModels.Recipe +{ + public class DTOModule + { + public int Id { get; set; } = 0; + public int ActualDuration { get; set; } = 0; + public int ActualDelay { get; set; } = 0; + public int EstimDuration { get; set; } = 0; + public int EstimDelay { get; set; } = 0; + public List PrevModId { get; set; } = new List(); + public RBStatus Status { get; set; } + + public override bool Equals(object obj) + { + if (!(obj is DTOModule item)) + return false; + + if (Id!= item.Id) + return false; + if (ActualDuration != item.ActualDuration) + return false; + if (ActualDelay != item.ActualDelay) + return false; + if (PrevModId != item.PrevModId) + return false; + if (EstimDelay != item.EstimDelay) + return false; + if (!Status.Equals(item.Status)) + return false; + + return true; + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + } + + public struct RBStatus + { + public bool Visible { get; set; } + public bool Executing { get; set; } + public bool HasError { get; set; } + public override bool Equals(object obj) + { + if (!(obj is RBStatus item)) + return false; + + if (Visible != item.Visible) + return false; + if (Executing != item.Executing) + return false; + if (HasError != item.HasError) + return false; + + return true; + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + } +} diff --git a/Thermo.Active.Model/DTOModels/Recipe/DTOModuleConfigModel.cs b/Thermo.Active.Model/DTOModels/Recipe/DTOModuleConfigModel.cs new file mode 100644 index 00000000..93d3c905 --- /dev/null +++ b/Thermo.Active.Model/DTOModels/Recipe/DTOModuleConfigModel.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Thermo.Active.Model.DTOModels.Recipe +{ + public class DTOModuleConfigModel + { + public int Id; + public string Label; + public BlockType Type; + public BlockSection Section; + public int IdMainParam = -1; // -1 = non visibile + public bool DelayVisible; + public int VisualPriority; + } + + public enum BlockType + { + HEATING, + DRAWING, + MOVEMENT, + VACUUM, + COOLING, + EXTRACTION + } + public enum BlockSection + { + HEATING, + FORMING, + EXTRACTION + } +} diff --git a/Thermo.Active.Model/DTOModels/Recipe/DTOModulesBlock.cs b/Thermo.Active.Model/DTOModels/Recipe/DTOModulesBlock.cs new file mode 100644 index 00000000..33aca349 --- /dev/null +++ b/Thermo.Active.Model/DTOModels/Recipe/DTOModulesBlock.cs @@ -0,0 +1,97 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Thermo.Active.Model.DTOModels.Recipe +{ + public class DTOModulesBlock + { + public int Id { get; set; } = 0; + public double SetpointHMI { get; set; } = 0; + public double SetpointPLC { get; set; } = 0; + //public RPRange Range { get; set; } + //public RPStatus Status { get; set; } + public string UnitMeasure { get; set; } + public double ValueAct { get; set; } + + public override bool Equals(object obj) + { + if (!(obj is DTOModulesBlock item)) + return false; + + if (Id!= item.Id) + return false; + if (SetpointHMI != item.SetpointHMI) + return false; + if (SetpointPLC != item.SetpointPLC) + return false; + //if (!Range.Equals(item.Range)) + // return false; + //if (!Status.Equals(item.Status)) + // return false; + if (UnitMeasure != item.UnitMeasure) + return false; + if (ValueAct != item.ValueAct) + return false; + + return true; + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + } + +#if false + public struct RPRange + { + public double Min { get; set; } + public double Max { get; set; } + public override bool Equals(object obj) + { + if (!(obj is RPRange item)) + return false; + + if (Min != item.Min) + return false; + if (Max != item.Max) + return false; + + return true; + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + } + public struct RPStatus + { + public bool Visible { get; set; } + public bool Enabled { get; set; } + public bool HasError { get; set; } + public override bool Equals(object obj) + { + if (!(obj is RPStatus item)) + return false; + + if (Visible != item.Visible) + return false; + if (Enabled != item.Enabled) + return false; + if (HasError != item.HasError) + return false; + + return true; + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + } +#endif +} diff --git a/Thermo.Active.Model/DTOModels/Recipe/DTORecipeParam.cs b/Thermo.Active.Model/DTOModels/Recipe/DTORecipeParam.cs index c308032d..4eb44d9a 100644 --- a/Thermo.Active.Model/DTOModels/Recipe/DTORecipeParam.cs +++ b/Thermo.Active.Model/DTOModels/Recipe/DTORecipeParam.cs @@ -9,6 +9,8 @@ namespace Thermo.Active.Model.DTOModels.Recipe public class DTORecipeParam { public int Id { get; set; } = 0; + public double SetpointHMI { get; set; } = 0; + public double SetpointPLC { get; set; } = 0; public RPRange Range { get; set; } public RPStatus Status { get; set; } public string UnitMeasure { get; set; } @@ -21,6 +23,10 @@ namespace Thermo.Active.Model.DTOModels.Recipe if (Id!= item.Id) return false; + if (SetpointHMI != item.SetpointHMI) + return false; + if (SetpointPLC != item.SetpointPLC) + return false; if (!Range.Equals(item.Range)) return false; if (!Status.Equals(item.Status)) diff --git a/Thermo.Active.Model/DTOModels/Recipe/DTOWarmers.cs b/Thermo.Active.Model/DTOModels/Recipe/DTOWarmers.cs new file mode 100644 index 00000000..3207553f --- /dev/null +++ b/Thermo.Active.Model/DTOModels/Recipe/DTOWarmers.cs @@ -0,0 +1,55 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Thermo.Active.Model.DTOModels.Recipe +{ + public class DTOWarmers + { + public int IdChannel { get; set; } = 0; + public int IdReflector { get; set; } = 0; + public int SetpointHMI { get; set; } = 0; + public int SetpointTermocam { get; set; } = 0; + public int SetpointPLC { get; set; } = 0; + public int ChannelStatus { get; set; } = 0; + public double ActualCurrent { get; set; } = 0; + public int ActualPerc { get; set; } = 0; + public int MaxPower { get; set; } = 0; + + + public override bool Equals(object obj) + { + if (!(obj is DTOWarmers item)) + return false; + + if (IdChannel != item.IdChannel) + return false; + if (IdReflector != item.IdReflector) + return false; + if (SetpointHMI != item.SetpointHMI) + return false; + if (SetpointTermocam != item.SetpointTermocam) + return false; + if (SetpointPLC != item.SetpointPLC) + return false; + if (ChannelStatus != item.ChannelStatus) + return false; + if (ActualCurrent != item.ActualCurrent) + return false; + if (ActualPerc != item.ActualPerc) + return false; + if (MaxPower != item.MaxPower) + return false; + + return true; + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + } + +} diff --git a/Thermo.Active.Model/DTOModels/Recipe/RecipeParam.cs b/Thermo.Active.Model/DTOModels/Recipe/RecipeParam.cs deleted file mode 100644 index 0be98501..00000000 --- a/Thermo.Active.Model/DTOModels/Recipe/RecipeParam.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Thermo.Active.Model.DTOModels.Recipe -{ - /// - /// Struttura parametri "lenti" (lettura NON frequente) - /// - public class RecipeParam - { - public int Id { get; set; } - public double SetpointHMI { get; set; } - public double SetpointPLC { get; set; } - public double ValueMax { get; set; } - public double ValueMin { get; set; } - public string UnitMeasure { get; set; } - } -} diff --git a/Thermo.Active.Model/DTOModels/Recipe/RecipeParamRT.cs b/Thermo.Active.Model/DTOModels/Recipe/RecipeParamRT.cs deleted file mode 100644 index 97628808..00000000 --- a/Thermo.Active.Model/DTOModels/Recipe/RecipeParamRT.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Thermo.Active.Model.DTOModels.Recipe -{ - /// - /// Struttura parametri "veloci" (RT=RealTime, lettura frequente) - /// - public class RecipeParamRT - { - public short Id { get; set; } - public short StatusBit { get; set; } - public double ValueAct { get; set; } - } - - [Flags] - public enum StatusVal - { - None = 0x0, - Visible = 0x1, - Enabled = 0x2, - HasError = 0x4 - } -} diff --git a/Thermo.Active.Model/Thermo.Active.Model.csproj b/Thermo.Active.Model/Thermo.Active.Model.csproj index b4394495..20404e3f 100644 --- a/Thermo.Active.Model/Thermo.Active.Model.csproj +++ b/Thermo.Active.Model/Thermo.Active.Model.csproj @@ -63,6 +63,8 @@ + + @@ -102,6 +104,10 @@ + + + + @@ -114,8 +120,6 @@ - - diff --git a/Thermo.Active.NC/NcAdapter.cs b/Thermo.Active.NC/NcAdapter.cs index 3558caf1..529de3b2 100644 --- a/Thermo.Active.NC/NcAdapter.cs +++ b/Thermo.Active.NC/NcAdapter.cs @@ -28,11 +28,6 @@ namespace Thermo.Active.NC { public class NcAdapter : IDisposable { - /// - /// check e usare dati simulati/reali (in fase implementazione) - /// - public bool simData = true; - public NcThermo numericalControl; public NcAdapter() => @@ -906,6 +901,7 @@ namespace Thermo.Active.NC return cmsError; } +#if false // !!!FARE!!! è copia delle heads public CmsError GetRecipeData(out List heads) { @@ -978,6 +974,7 @@ namespace Thermo.Active.NC return cmsError; } +#endif public CmsError GetM155Data(out List data) { data = new List(); @@ -1068,7 +1065,28 @@ namespace Thermo.Active.NC return cmsError; } - public CmsError ReadRecipeData(bool refreshOnlyRT, out Dictionary currentRecipe) + public CmsError ReadProdInfoData(out ThermoModels.ProdInfoModel prodInfoData) + { + prodInfoData = new ThermoModels.ProdInfoModel(); + CmsError cmsError = numericalControl.PLC_RProdInfo(ref prodInfoData); + + return cmsError; + } + public CmsError ReadProdCycleData(out ThermoModels.ProdCycleModel prodCycleData) + { + prodCycleData = new ThermoModels.ProdCycleModel(); + CmsError cmsError = numericalControl.PLC_RProdCycle(ref prodCycleData); + + return cmsError; + } + /// + /// Vero metodo lettura ricetta da 2 aree memoria PLC + /// + /// Indica se aggiornare SOLO i dati RT + /// Indica se usare ultimi dati letti dal PLC senza effettiva lettura (via cache) + /// + /// + public CmsError ReadRecipeData(bool refreshOnlyRT, bool useLastRead, out Dictionary currentRecipe) { // init obj currentRecipe = new Dictionary(); @@ -1077,10 +1095,20 @@ namespace Thermo.Active.NC // solo x S7... if (NcConfig.NcVendor == NC_VENDOR.S7NET) { - Dictionary currPlcRecipe = new Dictionary(); - CmsError cmsError = numericalControl.PLC_RRecipeParamList(refreshOnlyRT, ref currPlcRecipe); + Dictionary currPlcRecipe = new Dictionary(); + CmsError cmsError = NO_ERROR; + if (useLastRead) + { + cmsError = numericalControl.PLC_RRecipeParamList(false, ref currPlcRecipe); + } + else + { + cmsError = numericalControl.PLC_RRecipeParamList(refreshOnlyRT, ref currPlcRecipe); + } + if (cmsError.IsError()) return cmsError; + DTORecipeParam currParam = new DTORecipeParam(); // leggo l'intero array delle DB... QUI FAKE sulle DB configurate... List recipeConfig = RecipeConfig.Select(x => new DTORecipeConfigModel() @@ -1100,11 +1128,11 @@ namespace Thermo.Active.NC if (currPlcRecipe.ContainsKey(item.Id)) { // recupero da mem PLC - var paramPLC = currPlcRecipe[item.Id]; + ThermoModels.RecipeParam paramPLC = currPlcRecipe[item.Id]; currRange = new RPRange() { Min = paramPLC.ValMin, - Max = paramPLC.ValMax, + Max = paramPLC.ValMax }; currStatus = new RPStatus() { @@ -1115,10 +1143,36 @@ namespace Thermo.Active.NC // calcolo intero oggetto currParam = new DTORecipeParam() { + Id = item.Id, Range = currRange, Status = currStatus, UnitMeasure = "", - ValueAct = paramPLC.ValueAct + ValueAct = paramPLC.ValueAct, + SetpointHMI = paramPLC.SetpointHMI, + SetpointPLC = paramPLC.SetpointPLC + }; + } + else + { + currRange = new RPRange() + { + Min = 0, + Max = 999999 + }; + currStatus = new RPStatus() + { + Visible = false, + Enabled = false, + HasError = false + }; + // calcolo intero oggetto + currParam = new DTORecipeParam() + { + Id = item.Id, + Range = currRange, + Status = currStatus, + UnitMeasure = "", + ValueAct = 0 }; } currentRecipe.Add(item.Label, currParam); @@ -1131,6 +1185,217 @@ namespace Thermo.Active.NC return NO_ERROR; } + /// + /// Recipe Parameters write to PLC (only SetpointHMI) + /// + /// + /// + public CmsError WriteRecipeParametersToPLC(Dictionary updtRecipe) + { + // solo x S7... + if (NcConfig.NcVendor == NC_VENDOR.S7NET) + { + // ciclo x ogni valore della ricetta aggiornata ricevuto + ThermoModels.RecipeParam currParam; + foreach (var item in updtRecipe) + { + // salvo SOLO il setpoint HMI... + currParam = new ThermoModels.RecipeParam() + { + Id = (short)item.Value.Id, + SetpointHMI = item.Value.SetpointHMI + }; + // scrivo! + CmsError cmsError = numericalControl.PLC_WRecipeParam(currParam); + if (cmsError.IsError()) + return cmsError; + } + + } + else + { + return FUNCTION_NOT_ALLOWED_ERROR; + } + + return NO_ERROR; + } + /// + /// Comando conferma dati ricetta + /// + /// true: HMI --> PLC, false: PLC --> HMI + /// + public CmsError ConfirmRecipeData(bool confirmUpdate) + { + // solo x S7... + if (NcConfig.NcVendor == NC_VENDOR.S7NET) + { + // call NC for update + CmsError cmsError = numericalControl.PLC_WRecipeEdit(confirmUpdate); + if (cmsError.IsError()) + return cmsError; + } + else + { + return FUNCTION_NOT_ALLOWED_ERROR; + } + + return NO_ERROR; + } + /// + /// Vero metodo lettura Warmers data da memoria PLC + /// + /// + /// + public CmsError ReadWarmersData(out Dictionary currentWarmers) + { + // init obj + currentWarmers = new Dictionary(); + // solo x S7... + if (NcConfig.NcVendor == NC_VENDOR.S7NET) + { + CmsError cmsError = NO_ERROR; + + // leggo stato ricetta da PLC + Dictionary currPlcWarmers = new Dictionary(); + cmsError = numericalControl.PLC_RWarmerChannelList(ref currPlcWarmers); + + if (cmsError.IsError()) + return cmsError; + + // compongo con il resto delle info da config... do x scontato di avere TUTIT i 1024 channels + List warmersConfig = RiskChannelConfig.Select(x => new DTOWarmers() + { + IdChannel = x.IdChannel, + IdReflector = x.IdReflector, + SetpointHMI = x.SetpointRecipe, + SetpointTermocam = 0, // FIXME TODO x.SetpointTer, + SetpointPLC = currPlcWarmers[x.IdChannel].SetpointPLC, + ChannelStatus = currPlcWarmers[x.IdChannel].ChStatus, + ActualCurrent = currPlcWarmers[x.IdChannel].CurrAct, + ActualPerc = currPlcWarmers[x.IdChannel].PercAct, + MaxPower = x.MaxPower + }).ToList(); + } + else + { + currentWarmers = new Dictionary(); + } + + return NO_ERROR; + } + /// + /// Write warmers configuration Parameters to PLC + /// + /// + /// + public CmsError WriteRecipeWarmersConf(Dictionary updtRecipe) + { + // solo x S7... + if (NcConfig.NcVendor == NC_VENDOR.S7NET) + { + // FIXME TODO WRITE CH LOAD DATA +#if false + // ciclo x ogni valore della ricetta aggiornata ricevuto + ThermoModels.RecipeParam currParam; + foreach (var item in updtRecipe) + { + // salvo SOLO il setpoint HMI... + currParam = new ThermoModels.RecipeParam() + { + Id = (short)item.Value.Id, + SetpointHMI = item.Value.SetpointHMI + }; + // scrivo! + CmsError cmsError = numericalControl.PLC_WRecipeParam(currParam); + if (cmsError.IsError()) + return cmsError; + } +#endif + + } + else + { + return FUNCTION_NOT_ALLOWED_ERROR; + } + + return NO_ERROR; + } + /// + /// Write warmers Setpoint to PLC + /// + /// + /// + public CmsError WriteRecipeWarmersLoad(Dictionary updtLoad) + { + // solo x S7... + if (NcConfig.NcVendor == NC_VENDOR.S7NET) + { + // FIXME TODO WRITE CH LOAD DATA +#if false + // ciclo x ogni valore della ricetta aggiornata ricevuto + ThermoModels.RecipeParam currParam; + foreach (var item in updtRecipe) + { + // salvo SOLO il setpoint HMI... + currParam = new ThermoModels.RecipeParam() + { + Id = (short)item.Value.Id, + SetpointHMI = item.Value.SetpointHMI + }; + // scrivo! + CmsError cmsError = numericalControl.PLC_WRecipeParam(currParam); + if (cmsError.IsError()) + return cmsError; + } +#endif + + } + else + { + return FUNCTION_NOT_ALLOWED_ERROR; + } + + return NO_ERROR; + } + /// + /// Write warmers Setpoint to PLC + /// + /// + /// + public CmsError WriteRecipeWarmersThermo(Dictionary updtLoad) + { + // solo x S7... + if (NcConfig.NcVendor == NC_VENDOR.S7NET) + { + // FIXME TODO WRITE CH LOAD DATA +#if false + // ciclo x ogni valore della ricetta aggiornata ricevuto + ThermoModels.RecipeParam currParam; + foreach (var item in updtRecipe) + { + // salvo SOLO il setpoint HMI... + currParam = new ThermoModels.RecipeParam() + { + Id = (short)item.Value.Id, + SetpointHMI = item.Value.SetpointHMI + }; + // scrivo! + CmsError cmsError = numericalControl.PLC_WRecipeParam(currParam); + if (cmsError.IsError()) + return cmsError; + } +#endif + } + else + { + return FUNCTION_NOT_ALLOWED_ERROR; + } + + return NO_ERROR; + } + + + public CmsError ReadNcScada(ScadaSchemaModel scadaSchema, out DTOScadaModel scadaValue) { @@ -1492,65 +1757,27 @@ namespace Thermo.Active.NC currRecipe = new Dictionary(); DTORecipeParam currParam = new DTORecipeParam(); - RPRange currRange = new RPRange(); - RPStatus currStatus = new RPStatus(); - if (simData) - { - // leggo l'intero array delle DB... QUI FAKE sulle DB configurate... - List recipeConfig = RecipeConfig.Select(x => new DTORecipeConfigModel() - { - Id = x.Id, - Category = x.Category.ToString(), - SubCategory_1 = x.SubCategory_1, - SubCategory_2 = x.SubCategory_2, - Name = x.Name, - Description = x.Description, - Format = x.Format, - Label = $"{x.Category}_{x.SubCategory_1}_{x.SubCategory_2}_{x.Name}".Replace("__", "_").Replace("__", "_").ToLower() - }).ToList(); - - int minVal, maxVal, actVal; - Random rnd = new Random(); - foreach (var item in recipeConfig) - { - // randomizzo valori... - minVal = rnd.Next(0, 10); - maxVal = rnd.Next(100, 200); - actVal = rnd.Next(minVal - 5, maxVal + 5); - currRange = new RPRange() - { - Min = minVal, - Max = maxVal, - }; - currStatus = new RPStatus() - { - Visible = true, - Enabled = true, - HasError = (actVal < minVal || actVal > maxVal) - }; - currParam = new DTORecipeParam() - { - Range = currRange, - Status = currStatus, - UnitMeasure = "", - ValueAct = actVal - }; - currRecipe.Add(item.Label, currParam); - } - } - else - { - // gestione errore - cmsError = ReadRecipeData(false, out currRecipe); - if (cmsError.IsError()) - return cmsError; - } + // gestione errore + cmsError = ReadRecipeData(false, true, out currRecipe); + if (cmsError.IsError()) + return cmsError; // restituisco cod errore se trovato return cmsError; } + /// + /// Scrive tutti i parametri della ricetta indicati + /// + /// Oggetto parametri da aggiornare (from HMI) + /// + public CmsError WriteRecipeParams(Dictionary updtRecipe) + { + CmsError cmsError = WriteRecipeParametersToPLC(updtRecipe); + + return cmsError; + } /// /// Legge tutti i parametri della ricetta e calcolo la overview dei vari steps @@ -1562,15 +1789,11 @@ namespace Thermo.Active.NC CmsError cmsError = NO_ERROR; currOverview = new Dictionary(); - // !!!FARE davvero!!! -#if false - // gestione errore - cmsError = ReadScadaData(schema, out currParam); + // leggo la ricetta! + var currRecipe = new Dictionary(); + cmsError = ReadFullRecipe(out currRecipe); if (cmsError.IsError()) - return cmsError; -#endif - - // calcolo! + return cmsError; // leggo l'intero array delle DB... QUI FAKE sulle DB configurate... List recipeConfig = RecipeConfig.Select(x => new DTORecipeConfigModel() @@ -1586,40 +1809,238 @@ namespace Thermo.Active.NC }).ToList(); RecipeCatStatus currStatus = RecipeCatStatus.Unchanged; - int countCat = 0; + + // percorro conf ricetta... foreach (var item in recipeConfig) { - // ogni 20 incremento... - if (countCat < 20) + currStatus = RecipeCatStatus.Unchanged; + // cerco SE ci sia già uno status... + if (currOverview.ContainsKey(item.Category)) { - currStatus = RecipeCatStatus.Unchanged; + currStatus = currOverview[item.Category]; } - else if (countCat < 40) + + // se lo stato è errore --> esco... + if (currStatus == RecipeCatStatus.HasError) { - currStatus = RecipeCatStatus.ChangedOk; + continue; } + // altrimenti controllo else { - currStatus = RecipeCatStatus.HasError; + // se in errore --> registro... + if (currRecipe[item.Label].Status.HasError) + { + currStatus = RecipeCatStatus.HasError; + } + // FARE verificare il significato di questo changed (se è da file o da HMI/PLC) + else if (currRecipe[item.Label].SetpointHMI != currRecipe[item.Label].SetpointPLC) + { + currStatus = RecipeCatStatus.ChangedOk; + } + else + { + currStatus = RecipeCatStatus.Unchanged; + } } - // se non c'è aggiungo + + // ora verifico overview finale: se non c'è aggiungo if (!currOverview.ContainsKey(item.Category)) { currOverview.Add(item.Category, currStatus); - countCat = 0; } else { // se il valore è maggiore --> aggiorno currOverview[item.Category] = (int)currStatus > (int)currOverview[item.Category] ? currStatus : currOverview[item.Category]; } - countCat++; } // restituisco cod errore se trovato return cmsError; } + /// + /// Legge tutti i parametri della ricetta + /// + /// Oggetto elenco modules block + /// + public CmsError ReadModulesBlock(out Dictionary currModules) + { + CmsError cmsError = NO_ERROR; + currModules = new Dictionary(); + + // FIXME TODO +#if false + DTORecipeParam currParam = new DTORecipeParam(); + RPRange currRange = new RPRange(); + RPStatus currStatus = new RPStatus(); + + // gestione errore + cmsError = ReadRecipeData(false, true, out currModules); + if (cmsError.IsError()) + return cmsError; +#endif + + // restituisco cod errore se trovato + return cmsError; + } + + /// + /// GEt all warmers data by channel + /// + /// List of <= 1024 warmers channels + /// + public CmsError ReadWarmers(out Dictionary currWarmers) + { + CmsError cmsError = NO_ERROR; + currWarmers = new Dictionary(); + DTOWarmers currVal = new DTOWarmers(); + + // read and return warmers data + if (NcConfig.NcVendor == NC_VENDOR.S7NET) + { + Dictionary currPlcWarmChan = new Dictionary(); + cmsError = numericalControl.PLC_RWarmerChannelList(ref currPlcWarmChan); + + foreach (var item in RiskChannelConfig) + { + try + { + ThermoModels.WarmerChannel currWarm = currPlcWarmChan[item.IdChannel]; + currVal = new DTOWarmers() + { + IdChannel = item.IdChannel, + IdReflector = item.IdReflector, + SetpointHMI = currWarm.SetpointHMI, + SetpointTermocam = currWarm.SetpointThermoCam, + SetpointPLC = currWarm.SetpointPLC, + ChannelStatus = currWarm.ChStatus, + ActualCurrent = currWarm.CurrAct, + ActualPerc = currWarm.PercAct, + MaxPower = item.MaxPower + }; + currWarmers.Add(item.IdChannel, currVal); + } + catch + { } + } + } + + // gestione errore + if (cmsError.IsError()) + return cmsError; + + // restituisco cod errore se trovato + return cmsError; + } + + /// + /// Returns resistances configuration + /// + /// List of configured resistances + /// + public CmsError GetWarmersResistances(out Dictionary currWarmersResistances) + { + CmsError cmsError = NO_ERROR; + currWarmersResistances = new Dictionary(); + + // read and return config + if (NcConfig.NcVendor == NC_VENDOR.S7NET) + { + foreach (var item in RiskResistConfig) + { + currWarmersResistances.Add(item.Id, item); + } + } + + // restituisco cod errore se trovato + return cmsError; + } + + /// + /// Write all warmers load for recipe + /// + /// Oggetto parametri da aggiornare (from HMI) + /// + public CmsError WriteRecipeWarmChSetpHMI(Dictionary updtSetpHmi) + { + CmsError cmsError = numericalControl.PLC_WWarmerChSetpHmi(updtSetpHmi); + + return cmsError; + } + /// + /// Write all warmers termocam data for recipe + /// + /// Oggetto parametri da aggiornare (from HMI) + /// + public CmsError WriteRecipeWarmChSetpTermoCam(Dictionary updtSetpTCam) + { + CmsError cmsError = numericalControl.PLC_WWarmerChSetpTCam(updtSetpTCam); + + return cmsError; + } + /// + /// Write all warmers CONFIG data + /// + /// Oggetto parametri da aggiornare (from HMI) + /// + public CmsError WriteRecipeWarmConfig() + { + Dictionary newData = new Dictionary(); + CmsError cmsError = NO_ERROR; + + // scrivo l'abilitazione dei canali... + foreach (var item in RiskBoardConfig) + { + newData.Add(item.IdBoard, item.NumChannels > 0 ? 1 : 0); + } + cmsError = numericalControl.PLC_WWarmerConfBoardEnabl(newData); + if (cmsError.IsError()) + return cmsError; + + // processo riflettori... + newData = new Dictionary(); + foreach (var item in RiskChannelConfig) + { + newData.Add(item.IdChannel, item.IdReflector); + } + cmsError = numericalControl.PLC_WWarmerConfRefl(newData); + if (cmsError.IsError()) + return cmsError; + + // recupero parametro VUMin... + ushort VUMin = 1; + cmsError = numericalControl.PLC_RWarmerConfVUMin(ref VUMin); + if (cmsError.IsError()) + return cmsError; + // check div0! + if (VUMin == 0) + { + VUMin = 1; + } + + // processo corrente minima! + var newFloatTData = new Dictionary(); + double minICh = 0; + int calcPower = 0; + foreach (var item in RiskChannelConfig) + { + minICh = 0; + if (item.CalcIchMin) + { + calcPower = (item.NumResist - 1) + item.MaxPower + item.MaxPower / 2; + minICh = (double)calcPower / VUMin; + } + newFloatTData.Add(item.IdChannel, minICh); + } + cmsError = numericalControl.PLC_WWarmerConfMinCurr(newFloatTData); + if (cmsError.IsError()) + return cmsError; + + + return cmsError; + } #endregion Read Data diff --git a/Thermo.Active.NC/NcFileAdapter.cs b/Thermo.Active.NC/NcFileAdapter.cs index 34ea08f7..83366ebf 100644 --- a/Thermo.Active.NC/NcFileAdapter.cs +++ b/Thermo.Active.NC/NcFileAdapter.cs @@ -19,6 +19,61 @@ namespace Thermo.Active.NC { public class NcFileAdapter : NcAdapter { + /// + /// Read file from local devices ad give back string content + /// + /// + /// + /// + public CmsError ReadFileContent(string path, out string fileContent) + { + // init + fileContent = ""; + if (!string.IsNullOrEmpty(path)) + { + // check existing + if (File.Exists(path)) + { + // read all lines as string + fileContent = File.ReadAllText(path); + } + else + { + return FILE_NOT_FOUND_ERROR; + } + } + else + { + return FILE_NOT_FOUND_ERROR; + } + + return NO_ERROR; + } + /// + /// Save string content to file + /// + /// + /// + /// + public CmsError WriteFileContent(string path, string fileContent) + { + if (!string.IsNullOrEmpty(path)) + { + if (!string.IsNullOrEmpty(fileContent)) + { + File.WriteAllText(path, fileContent); + } + } + else + { + return FILE_NOT_FOUND_ERROR; + } + + return NO_ERROR; + } + + + public CmsError GetFileList(string path, out List fileList) { fileList = new List(); @@ -41,8 +96,8 @@ namespace Thermo.Active.NC if (cmsError.IsError()) return cmsError; - string [] names = fileInfo.Name.Split('/'); - if(names.Length > 0) + string[] names = fileInfo.Name.Split('/'); + if (names.Length > 0) { string name = names.Last(); if (!String.IsNullOrWhiteSpace(name)) diff --git a/Thermo.Active.Utils/supportFunctions.cs b/Thermo.Active.Utils/supportFunctions.cs index 269cd3f8..b41ac62a 100644 --- a/Thermo.Active.Utils/supportFunctions.cs +++ b/Thermo.Active.Utils/supportFunctions.cs @@ -39,13 +39,47 @@ namespace Thermo.Active.Utils default: return HEAD_TYPE.WJ; } } - - public static TACT_PARAM_TYPE GetTActCategory(string strCategory) + /// + /// Conversion string --> TACT_PARAM_TYPE + /// + /// + /// + public static TACT_PARAM_TYPE GetTActParamType(string strValue) { TACT_PARAM_TYPE answ = TACT_PARAM_TYPE.ND; try { - answ = (TACT_PARAM_TYPE)Enum.Parse(typeof(TACT_PARAM_TYPE), strCategory); + answ = (TACT_PARAM_TYPE)Enum.Parse(typeof(TACT_PARAM_TYPE), strValue); + } + catch { } + return answ; + } + /// + /// Conversion string --> TACT_MBLOCK_TYPE + /// + /// + /// + public static TACT_MBLOCK_TYPE GetTActMB_Type(string strValue) + { + TACT_MBLOCK_TYPE answ = TACT_MBLOCK_TYPE.ND; + try + { + answ = (TACT_MBLOCK_TYPE)Enum.Parse(typeof(TACT_MBLOCK_TYPE), strValue); + } + catch { } + return answ; + } + /// + /// Conversion string --> TACT_MBLOCK_SECTION + /// + /// + /// + public static TACT_MBLOCK_SECTION GetTActMB_Section(string strValue) + { + TACT_MBLOCK_SECTION answ = TACT_MBLOCK_SECTION.ND; + try + { + answ = (TACT_MBLOCK_SECTION)Enum.Parse(typeof(TACT_MBLOCK_SECTION), strValue); } catch { } return answ; diff --git a/Thermo.Active/App_Start/SwaggerConfig.cs b/Thermo.Active/App_Start/SwaggerConfig.cs index 190235dc..1a178d30 100644 --- a/Thermo.Active/App_Start/SwaggerConfig.cs +++ b/Thermo.Active/App_Start/SwaggerConfig.cs @@ -33,7 +33,7 @@ namespace Thermo.Active // hold additional metadata for an API. Version and title are required but you can also provide // additional fields by chaining methods off SingleApiVersion. // - c.SingleApiVersion("v1", "Step"); + c.SingleApiVersion("v1", "ThermoActive"); // If you want the output Swagger docs to be indented properly, enable the "PrettyPrint" option. // diff --git a/Thermo.Active/Controllers/WebApi/ModulesController.cs b/Thermo.Active/Controllers/WebApi/ModulesController.cs new file mode 100644 index 00000000..035927cc --- /dev/null +++ b/Thermo.Active/Controllers/WebApi/ModulesController.cs @@ -0,0 +1,41 @@ +using CMS_CORE_Library.Models; +using Thermo.Active.Model.DTOModels; +using Thermo.Active.NC; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Threading.Tasks; +using System.Web.Http; +using static CMS_CORE_Library.Models.DataStructures; +using static Thermo.Active.Config.ServerConfig; +using static Thermo.Active.Model.Constants; +using Thermo.Active.Model.DTOModels.Recipe; + +namespace Thermo.Active.Controllers.WebApi +{ + [RoutePrefix("api/ModBlock")] + public class ModulesController : ApiController + { + [Route("current"), HttpGet] + public IHttpActionResult GetCurrentModules() + { + using (NcAdapter ncAdapter = new NcAdapter()) + { + // Try connection + CmsError libraryError = ncAdapter.Connect(); + if (libraryError.errorCode != 0) + return NotFound(); + + CmsError cmsError = ncAdapter.ReadModulesBlock(out Dictionary currModules); + if (cmsError.IsError()) + return BadRequest(cmsError.localizationKey); + + return Ok(currModules); + } + } + + } +} \ No newline at end of file diff --git a/Thermo.Active/Controllers/WebApi/RecipeController.cs b/Thermo.Active/Controllers/WebApi/RecipeController.cs index 4bf64e2a..bed83865 100644 --- a/Thermo.Active/Controllers/WebApi/RecipeController.cs +++ b/Thermo.Active/Controllers/WebApi/RecipeController.cs @@ -13,6 +13,7 @@ using static CMS_CORE_Library.Models.DataStructures; using static Thermo.Active.Config.ServerConfig; using static Thermo.Active.Model.Constants; using Thermo.Active.Model.DTOModels.Recipe; +using Thermo.Active.Config; namespace Thermo.Active.Controllers.WebApi { @@ -24,8 +25,11 @@ namespace Thermo.Active.Controllers.WebApi { using (NcAdapter ncAdapter = new NcAdapter()) { - // serve?!?!? - //ncAdapter.Connect(); + // Try connection + CmsError libraryError = ncAdapter.Connect(); + if (libraryError.errorCode != 0) + return NotFound(); + CmsError cmsError = ncAdapter.GetRecipeOverview(out Dictionary currOverview); if (cmsError.IsError()) return BadRequest(cmsError.localizationKey); @@ -38,14 +42,369 @@ namespace Thermo.Active.Controllers.WebApi { using (NcAdapter ncAdapter = new NcAdapter()) { - // serve?!?!? - //ncAdapter.Connect(); - CmsError cmsError = ncAdapter.ReadFullRecipe(out Dictionary currentRecipe); + // Try connection + CmsError libraryError = ncAdapter.Connect(); + if (libraryError.errorCode != 0) + return NotFound(); + + CmsError cmsError = ncAdapter.ReadFullRecipe(out Dictionary currRecipe); if (cmsError.IsError()) return BadRequest(cmsError.localizationKey); - return Ok(currentRecipe); + return Ok(currRecipe); } } + + [Route("update"), HttpPut] + public IHttpActionResult WriteParameters(Dictionary parametersList) + { + if (parametersList != null) + { + using (NcAdapter ncAdapter = new NcAdapter()) + { + // Try connection + CmsError libraryError = ncAdapter.Connect(); + if (libraryError.errorCode != 0) + return NotFound(); + + // read recipe! + CmsError cmsError = ncAdapter.ReadFullRecipe(out Dictionary prevRecipe); + if (cmsError.IsError()) + return BadRequest(cmsError.localizationKey); + + Dictionary updtRecipe = new Dictionary(); + + foreach (var item in parametersList) + { + if (prevRecipe.ContainsKey(item.Key)) + { + // aggiorno il valore HMI nel parametro + var currParam = prevRecipe[item.Key]; + currParam.SetpointHMI = item.Value; + // salvo (1 parametro, potrei fare N...) + updtRecipe.Add(item.Key, currParam); + } + else + { + return NotFound(); + } + } + + // scrivo sul PLC + ncAdapter.WriteRecipeParams(updtRecipe); + + // ritorno solo fatto! + return Ok(); + } + } + else + { + return NotFound(); + } + } + + /// + /// Confirm recipe modification (parameters: HMI --> PLC) + /// + /// + [Route("confirm"), HttpPut] + public IHttpActionResult ConfirmEdit() + { + using (NcAdapter ncAdapter = new NcAdapter()) + { + // Try connection + CmsError libraryError = ncAdapter.Connect(); + if (libraryError.errorCode != 0) + return NotFound(); + + // scrivo sul PLC il comando conferma! + CmsError cmsError = ncAdapter.ConfirmRecipeData(true); + if (cmsError.IsError()) + return BadRequest(cmsError.localizationKey); + + // recupero i dati LIVE dei parametri HMI della ricetta... + cmsError = ncAdapter.ReadFullRecipe(out Dictionary currRecipe); + if (cmsError.IsError()) + return BadRequest(cmsError.localizationKey); + + // rileggo la ricetta + var currParams = new Dictionary(); + foreach (var item in currRecipe) + { + currParams.Add(item.Key, item.Value.SetpointHMI); + } + + saveCurrentRecipeParams(currParams); + + // ritorno solo fatto! + return Ok(); + } + } + + /// + /// Cancel recipe modification (parameters: PLC --> HMI) + /// + /// + [Route("cancel"), HttpPut] + public IHttpActionResult CancelEdit() + { + using (NcAdapter ncAdapter = new NcAdapter()) + { + // Try connection + CmsError libraryError = ncAdapter.Connect(); + if (libraryError.errorCode != 0) + return NotFound(); + + // scrivo sul PLC il comando annula! + CmsError cmsError = ncAdapter.ConfirmRecipeData(false); + if (cmsError.IsError()) + return BadRequest(cmsError.localizationKey); + + // recupero i dati LIVE dei parametri HMI della ricetta... + cmsError = ncAdapter.ReadFullRecipe(out Dictionary currRecipe); + if (cmsError.IsError()) + return BadRequest(cmsError.localizationKey); + + var currParams = new Dictionary(); + foreach (var item in currRecipe) + { + currParams.Add(item.Key, item.Value.SetpointPLC); + } + + // ora salvo ANCHE i dati live... + saveCurrentRecipeParams(currParams); + + // ritorno solo fatto! + return Ok(); + } + } + + /// + /// load recipe from file and send to PLC + /// + /// + [Route("load"), HttpPut] + public IHttpActionResult Load(string newName) + { + using (NcFileAdapter ncAdapter = new NcFileAdapter()) + { + // Try connection + CmsError libraryError = ncAdapter.Connect(); + if (libraryError.errorCode != 0) + return NotFound(); + + // chiamo metodo di lettura... + //CmsError cmsError = ServerConfigController.LoadRecipe(newName); + bool fatto = ServerConfigController.LoadRecipe(newName); + if (!fatto) + return NotFound(); + + + CmsError cmsError = writeCurrentRecipeToPlc(); + if (cmsError.IsError()) + return BadRequest(cmsError.localizationKey); + + // ritorno solo fatto! + return Ok(); + } + } + + /// + /// Load tempalte recipe from file and save as new current... + /// + /// + [Route("new"), HttpPut] + public IHttpActionResult NewRecipe() + { + using (NcFileAdapter ncAdapter = new NcFileAdapter()) + { + // chiamo metodo di lettura... + bool fatto = ServerConfigController.LoadTemplate(); + + if (!fatto) + return NotFound(); + + CmsError cmsError = writeCurrentRecipeToPlc(); + if (cmsError.IsError()) + return BadRequest(cmsError.localizationKey); + + } + // ritorno solo fatto! + return Ok(); + } + + /// + /// Save current recipe from PLC to default + /// + /// + [Route("save"), HttpPut] + public IHttpActionResult Save() + { + using (NcFileAdapter ncAdapter = new NcFileAdapter()) + { + + // recupero i dati LIVE dei parametri HMI della ricetta... + CmsError cmsError = ncAdapter.ReadFullRecipe(out Dictionary currRecipe); + if (cmsError.IsError()) + return BadRequest(cmsError.localizationKey); + + var currParams = new Dictionary(); + foreach (var item in currRecipe) + { + currParams.Add(item.Key, item.Value.SetpointPLC); + } + + // ora salvo ANCHE i dati live... + saveCurrentRecipeParams(currParams); + + // ritorno solo fatto! + return Ok(); + } + } + /// + /// Save current recipe from PLC with new name + /// + /// + [Route("saveAs"), HttpPut] + public IHttpActionResult SaveAs(string newName) + { + using (NcFileAdapter ncAdapter = new NcFileAdapter()) + { + // recupero i dati LIVE dei parametri HMI della ricetta... + CmsError cmsError = ncAdapter.ReadFullRecipe(out Dictionary currRecipe); + if (cmsError.IsError()) + return BadRequest(cmsError.localizationKey); + + var currParams = new Dictionary(); + foreach (var item in currRecipe) + { + currParams.Add(item.Key, item.Value.SetpointPLC); + } + + // ora salvo ANCHE i dati live... + RecipeLiveData.RecipeParameters = currParams; + // e salvo su disco + ServerConfigController.SaveRecipe(newName); + + // ritorno solo fatto! + return Ok(); + } + } + /// + /// Save current recipe from PLC to Template + /// + /// + [Route("saveTemplate"), HttpPut] + public IHttpActionResult SaveTemplate() + { + using (NcFileAdapter ncAdapter = new NcFileAdapter()) + { + // recupero i dati LIVE dei parametri HMI della ricetta... + CmsError cmsError = ncAdapter.ReadFullRecipe(out Dictionary currRecipe); + if (cmsError.IsError()) + return BadRequest(cmsError.localizationKey); + + + // recupero i dati LIVE dei carichi load dei cahnnels di riscaldo... + cmsError = ncAdapter.ReadWarmers(out Dictionary currWarmers); + if (cmsError.IsError()) + return BadRequest(cmsError.localizationKey); + + // uso i valopri HMI... + var currParams = new Dictionary(); + foreach (var item in currRecipe) + { + currParams.Add(item.Key, item.Value.SetpointHMI); + } + + // ora salvo nei dati live... + RecipeLiveData.RecipeParameters = currParams; + + // carico i dati dei riscaldi... + var currChSet = new Dictionary(); + foreach (var item in currWarmers) + { + currChSet.Add(item.Key, item.Value.SetpointHMI); + } + RecipeLiveData.ChannelSetpoints = currChSet; + + + // e salvo su disco + ServerConfigController.SaveRecipeTemplate(); + + // ritorno solo fatto! + return Ok(); + } + } + + + /// + /// Do actual recipe parameters FileSave + /// + /// + private static void saveCurrentRecipeParams(Dictionary currParams) + { + // ora salvo ANCHE i dati live... + RecipeLiveData.RecipeParameters = currParams; + // e salvo su disco + ServerConfigController.SaveRecipeCurrent(); + } + + protected static CmsError writeCurrentRecipeToPlc() + { + CmsError checkError = NO_ERROR; + + using (NcAdapter ncAdapter = new NcAdapter()) + { + // Try connection + CmsError libraryError = ncAdapter.Connect(); + if (libraryError.errorCode != 0) + return libraryError; + + + // copy data to PLC + checkError = ncAdapter.ReadFullRecipe(out Dictionary prevRecipe); + if (checkError.IsError()) + return checkError; + + // save parameters to PLC!!! + Dictionary updtRecipe = new Dictionary(); + foreach (var item in RecipeLiveData.RecipeParameters) + { + if (prevRecipe.ContainsKey(item.Key)) + { + // aggiorno il valore HMI nel parametro + var currParam = prevRecipe[item.Key]; + currParam.SetpointHMI = item.Value; + // salvo (1 parametro, potrei fare N...) + updtRecipe.Add(item.Key, currParam); + } + else + { + return NOT_FOUND_ERROR; + } + } + + // write to PLC + checkError = ncAdapter.WriteRecipeParams(updtRecipe); + + + // process ch load setup... + Dictionary newRisk = new Dictionary(); + foreach (var item in RecipeLiveData.ChannelSetpoints) + { + newRisk.Add(item.Key, item.Value); + } + + // write to PLC + checkError = ncAdapter.WriteRecipeWarmChSetpHMI(newRisk); + + // enable recipe! scrivo sul PLC il comando conferma! + CmsError cmsError = ncAdapter.ConfirmRecipeData(true); + if (cmsError.IsError()) + return checkError; + } + return checkError; + } } } \ No newline at end of file diff --git a/Thermo.Active/Controllers/WebApi/WarmersController.cs b/Thermo.Active/Controllers/WebApi/WarmersController.cs new file mode 100644 index 00000000..4e989bfc --- /dev/null +++ b/Thermo.Active/Controllers/WebApi/WarmersController.cs @@ -0,0 +1,195 @@ +using CMS_CORE_Library.Models; +using Thermo.Active.Model.DTOModels; +using Thermo.Active.NC; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Threading.Tasks; +using System.Web.Http; +using static CMS_CORE_Library.Models.DataStructures; +using static Thermo.Active.Config.ServerConfig; +using static Thermo.Active.Model.Constants; +using Thermo.Active.Model.DTOModels.Recipe; +using Thermo.Active.Config; + +namespace Thermo.Active.Controllers.WebApi +{ + [RoutePrefix("api/warmers")] + public class WarmersController : ApiController + { + [Route("channels"), HttpGet] + public IHttpActionResult GetCurrentWarmersChannels() + { + using (NcAdapter ncAdapter = new NcAdapter()) + { + // Try connection + CmsError libraryError = ncAdapter.Connect(); + if (libraryError.errorCode != 0) + return NotFound(); + + CmsError cmsError = ncAdapter.ReadWarmers(out Dictionary currWarmers); + if (cmsError.IsError()) + return BadRequest(cmsError.localizationKey); + + return Ok(currWarmers); + } + } + [Route("resistances"), HttpGet] + public IHttpActionResult GetCurrentWarmersResistances() + { + using (NcAdapter ncAdapter = new NcAdapter()) + { + // Try connection + CmsError libraryError = ncAdapter.Connect(); + if (libraryError.errorCode != 0) + return NotFound(); + + CmsError cmsError = ncAdapter.GetWarmersResistances(out Dictionary currWarmers); + if (cmsError.IsError()) + return BadRequest(cmsError.localizationKey); + + return Ok(currWarmers); + } + } + + + [Route("update"), HttpPut] + public IHttpActionResult WriteSetpoints(Dictionary channelsLoad) + { + // scrive su CHp da ricetta oppure da override x parametri utente... + if (channelsLoad != null) + { + + using (NcAdapter ncAdapter = new NcAdapter()) + { + // Try connection + CmsError libraryError = ncAdapter.Connect(); + if (libraryError.errorCode != 0) + return NotFound(); + + // scrivo sul PLC + ncAdapter.WriteRecipeWarmChSetpHMI(channelsLoad); + + // ritorno solo fatto! + return Ok(); + } + } + else + { + return NotFound(); + } + } + + /// + /// Confirm recipe modification (parameters: HMI --> PLC) + /// + /// + [Route("confirm"), HttpPut] + public IHttpActionResult ConfirmEdit() + { + using (NcAdapter ncAdapter = new NcAdapter()) + { + // Try connection + CmsError libraryError = ncAdapter.Connect(); + if (libraryError.errorCode != 0) + return NotFound(); + + // scrivo sul PLC il comando conferma! + CmsError cmsError = ncAdapter.ConfirmRecipeData(true); + if (cmsError.IsError()) + return BadRequest(cmsError.localizationKey); + + // recupero i dati LIVE dei parametri HMI dei riscaldi... + cmsError = ncAdapter.ReadWarmers(out Dictionary currWarmers); + if (cmsError.IsError()) + return BadRequest(cmsError.localizationKey); + + // rileggo la ricetta + var currParams = new Dictionary(); + foreach (var item in currWarmers) + { + currParams.Add(item.Key, item.Value.SetpointHMI); + } + + saveCurrentRecipeWarmers(currParams); + + // ritorno solo fatto! + return Ok(); + } + } + + /// + /// Cancel recipe modification (parameters: PLC --> HMI) + /// + /// + [Route("cancel"), HttpPut] + public IHttpActionResult CancelEdit() + { + using (NcAdapter ncAdapter = new NcAdapter()) + { + // Try connection + CmsError libraryError = ncAdapter.Connect(); + if (libraryError.errorCode != 0) + return NotFound(); + + // scrivo sul PLC il comando annula! + CmsError cmsError = ncAdapter.ConfirmRecipeData(false); + if (cmsError.IsError()) + return BadRequest(cmsError.localizationKey); + + // recupero i dati LIVE dei parametri HMI dei riscaldi... + cmsError = ncAdapter.ReadWarmers(out Dictionary currWarmers); + if (cmsError.IsError()) + return BadRequest(cmsError.localizationKey); + + // rileggo la ricetta + var currParams = new Dictionary(); + foreach (var item in currWarmers) + { + currParams.Add(item.Key, item.Value.SetpointHMI); + } + + saveCurrentRecipeWarmers(currParams); + + // ritorno solo fatto! + return Ok(); + } + } + + [Route("setConfig"), HttpPut] + public IHttpActionResult SetConfig() + { + // scrive configurazioni RISK + + using (NcAdapter ncAdapter = new NcAdapter()) + { + // Try connection + CmsError libraryError = ncAdapter.Connect(); + if (libraryError.errorCode != 0) + return NotFound(); + + // scrivo sul PLC + ncAdapter.WriteRecipeWarmConfig(); + + // ritorno solo fatto! + return Ok(); + } + } + + + /// + /// Do actual recipe warmers setpoints FileSave + /// + /// + private static void saveCurrentRecipeWarmers(Dictionary chSetpoints) + { + // ora salvo ANCHE i dati live... + RecipeLiveData.ChannelSetpoints = chSetpoints; + // e salvo su disco + ServerConfigController.SaveRecipeCurrent(); + } + } +} \ No newline at end of file diff --git a/Thermo.Active/Listeners/ListenersHandler.cs b/Thermo.Active/Listeners/ListenersHandler.cs index 1571ea8b..5acea833 100644 --- a/Thermo.Active/Listeners/ListenersHandler.cs +++ b/Thermo.Active/Listeners/ListenersHandler.cs @@ -113,7 +113,14 @@ namespace Thermo.Active.Listeners { SignalRListener.SendThermoGaugeData(a); })); - + infos.Add(MessageServices.Current.Subscribe(SEND_THERMO_PROD_INFO_DATA, (a, b) => + { + SignalRListener.SendThermoProdInfoData(a); + })); + infos.Add(MessageServices.Current.Subscribe(SEND_THERMO_PROD_CYCLE_DATA, (a, b) => + { + SignalRListener.SendThermoProdCycleData(a); + })); // Broadcast infos.Add(MessageServices.Current.Subscribe(BROADCAST_DATA, (a, b) => diff --git a/Thermo.Active/Listeners/SignalR/SignalRListener.cs b/Thermo.Active/Listeners/SignalR/SignalRListener.cs index 7da335f9..5d0a8a4e 100644 --- a/Thermo.Active/Listeners/SignalR/SignalRListener.cs +++ b/Thermo.Active/Listeners/SignalR/SignalRListener.cs @@ -359,6 +359,30 @@ namespace Thermo.Active.Listeners.SignalR context.Clients.Group("ncData").gaugeData(currGauge); } } + public static void SendThermoProdInfoData(object prodInfoData) + { + ProdInfoModel currProdInfo = prodInfoData as ProdInfoModel; + + if (!LastProdInfoData.Equals(currProdInfo)) + { + LastProdInfoData = currProdInfo; + + var context = GlobalHost.ConnectionManager.GetHubContext(); + context.Clients.Group("ncData").prodInfoData(currProdInfo); + } + } + public static void SendThermoProdCycleData(object prodCycleData) + { + ProdCycleModel currProdCycle = prodCycleData as ProdCycleModel; + + if (!LastProdCycleData.Equals(currProdCycle)) + { + LastProdCycleData = currProdCycle; + + var context = GlobalHost.ConnectionManager.GetHubContext(); + context.Clients.Group("ncData").prodCycleData(currProdCycle); + } + } public static void SetGatewayRebootStatus(object status) { @@ -433,6 +457,10 @@ namespace Thermo.Active.Listeners.SignalR group.recipeWarmersData(LastWarmersData); // THERMO Gauges group.gaugeData(LastGaugeData); + // THERMO prod info data + group.prodInfoData(LastProdInfoData); + // THERMO prod cycle data + group.prodCycleData(LastProdCycleData); Debug.WriteLine(string.Format("{0} {1} Broadcast..completed", DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss"), DateTime.Now.Millisecond)); Monitor.Exit(_broadcastlock); diff --git a/Thermo.Active/Listeners/SignalRStaticObjects.cs b/Thermo.Active/Listeners/SignalRStaticObjects.cs index 4f98fc8d..060d9bf3 100644 --- a/Thermo.Active/Listeners/SignalRStaticObjects.cs +++ b/Thermo.Active/Listeners/SignalRStaticObjects.cs @@ -33,6 +33,10 @@ namespace Thermo.Active.Listeners public static List LastModulesData = new List(); public static List LastWarmersData = new List(); public static ThermoModels.GaugeModel LastGaugeData = new ThermoModels.GaugeModel(); + public static ThermoModels.ProdCycleModel LastProdCycleData = new ThermoModels.ProdCycleModel(); + public static ThermoModels.ProdInfoModel LastProdInfoData = new ThermoModels.ProdInfoModel(); + + public static bool LastIsNcConnected = false; diff --git a/Thermo.Active/Properties/AssemblyInfo.cs b/Thermo.Active/Properties/AssemblyInfo.cs index 61cf208b..9425cccd 100644 --- a/Thermo.Active/Properties/AssemblyInfo.cs +++ b/Thermo.Active/Properties/AssemblyInfo.cs @@ -31,4 +31,4 @@ using System.Runtime.InteropServices; // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("0.3.2")] +[assembly: AssemblyVersion("0.6.2")] diff --git a/Thermo.Active/Thermo.Active.csproj b/Thermo.Active/Thermo.Active.csproj index 3677d1d4..f6b40ad4 100644 --- a/Thermo.Active/Thermo.Active.csproj +++ b/Thermo.Active/Thermo.Active.csproj @@ -222,6 +222,8 @@ + + diff --git a/Thermo.Active/wwwroot/assets/styles/base/arretramento-riscaldi.less b/Thermo.Active/wwwroot/assets/styles/base/arretramento-riscaldi.less deleted file mode 100644 index a26dfa1a..00000000 --- a/Thermo.Active/wwwroot/assets/styles/base/arretramento-riscaldi.less +++ /dev/null @@ -1,10 +0,0 @@ -// out: false, sourceMap: false, main: ../style.less -@import "grid-system.less"; -@import "colors.less"; -@import "fonts.less"; - - -.modal.estrazione-info { - width: 560px; - height: 411px; -} \ No newline at end of file diff --git a/Thermo.Active/wwwroot/assets/styles/base/buttons.less b/Thermo.Active/wwwroot/assets/styles/base/buttons.less index f88799b5..9882916f 100644 --- a/Thermo.Active/wwwroot/assets/styles/base/buttons.less +++ b/Thermo.Active/wwwroot/assets/styles/base/buttons.less @@ -8,495 +8,502 @@ @button-machine-color-to : #404040; button:focus { - outline: none; + outline: none; } button { - cursor: pointer; - -webkit-tap-highlight-color: transparent; + cursor: pointer; + -webkit-tap-highlight-color: transparent; } button[disabled] { - cursor: not-allowed !important; + cursor: not-allowed !important; - * { - cursor: not-allowed !important; - } + * { + cursor: not-allowed !important; + } } button.btn[disabled] { - border-radius: 2px; - border-radius: 2px; - background-color: #dddddd; - background-image: none; - box-shadow: none; - color: @color-warm-grey; + border-radius: 2px; + border-radius: 2px; + background-color: #dddddd; + background-image: none; + box-shadow: none; + color: @color-warm-grey; - &:hover { - box-shadow: none !important; - } + &:hover { + box-shadow: none !important; + } } .btn-demo { - color: #fff; - font-size: 22px; - font-weight: bold; + color: #fff; + font-size: 22px; + font-weight: bold; } .button.btn { - max-height: 48px; - display: inline-flex; - padding: 12px 20px !important; - min-height: 48px; + max-height: 48px; + display: inline-flex; + padding: 12px 20px !important; + min-height: 48px; } button.btn, .button.btn { - height: @button-height; - box-sizing: border-box; - border-radius: 2px; - margin: 0 8px; - text-align: center; - font-size: 18px; - font-weight: bold; - box-shadow: @button-shadow; - padding: 0 20px; - border: none; - background-image: linear-gradient(to bottom, @color-white2, @color-silver); - color: @color-darkish-blue; + height: @button-height; + box-sizing: border-box; + border-radius: 2px; + margin: 0 8px; + text-align: center; + font-size: 18px; + font-weight: bold; + box-shadow: @button-shadow; + padding: 0 20px; + border: none; + background-image: linear-gradient(to bottom, @color-white2, @color-silver); + color: @color-darkish-blue; - // display: inline-block; - // align-items: flex-start; - &:active:not([disabled]) { - background-image: linear-gradient(to bottom, @color-silver, @color-white2); - border: none !important; - box-shadow: inset @button-shadow !important; - } + // display: inline-block; + // align-items: flex-start; + &:active:not([disabled]) { + background-image: linear-gradient(to bottom, @color-silver, @color-white2); + border: none !important; + box-shadow: inset @button-shadow !important; + } - &:hover { - box-shadow: inset 0px 0px 0px 2px #8eb5e2; - } + &:hover { + box-shadow: inset 0px 0px 0px 2px #8eb5e2; + } - &.dark-blue { - background-color: @color-blue; - color: white; - } - - &.btn-danger { - color: @color-scarlet; - } - - &.dark-blue:active { - background-color: @color-darkish-blue-two !important; - } - - &.pressed { - background-image: linear-gradient(to bottom, @color-silver, @color-white2); - border: none !important; - box-shadow: inset @button-shadow !important; - } - -} - -button.btn.btn-success { - background-image: linear-gradient(to bottom, @button-success-color-from, @button-success-color-to); + &.dark-blue { + background-color: @color-blue; color: white; - border: #001e48 1px solid; + } - &:active { - background-image: linear-gradient(to bottom, @button-success-color-to, @button-success-color-from) !important; - box-shadow: inset @button-shadow; - border: #001e48 1px solid !important; - color: #8eb5e2 - } -} + &.btn-danger { + color: @color-scarlet; + } -button.btn.btn-success[disabled] { - border-radius: 2px; - border-radius: 2px; - box-shadow: none; - color: @color-warm-grey; - border: none; + &.dark-blue:active { + background-color: @color-darkish-blue-two !important; + } - &:hover { - box-shadow: none !important; - background-image: linear-gradient(to bottom, @button-success-color-from, @button-success-color-to) !important; - } -} + &.pressed { + background-image: linear-gradient(to bottom, @color-silver, @color-white2); + border: none !important; + box-shadow: inset @button-shadow !important; + } -button.under { - width: 208px; - height: 45px; - object-fit: contain; - border-radius: 100px; - background-image: linear-gradient(to bottom, @button-machine-color-from, @button-machine-color-to); - box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.4); - border: none; - display: flex; - justify-content: center; - align-items: center; - cursor: pointer; - - img { - max-width: 178px; - max-height: 45px; - } - - &.pressed:active, - &:active { - background-image: none; - background-color: @button-machine-color-to; - } - - &.pressed { - background-image: linear-gradient(to bottom, @button-machine-color-to, @button-machine-color-from); - box-shadow: inset 0 1px 2px 0 rgba(0, 0, 0, 0.4); - } } button.square { - // width: @button-height; - // height: @button-height; - border-radius: 2px !important; // background-color: #4b4b4b; + height: @button-height; + width: @button-height; + padding: 0; + margin: 0; +} - &:hover { - background-color: @button-success-color-to; - } +button.btn.btn-success { + background-image: linear-gradient(to bottom, @button-success-color-from, @button-success-color-to); + color: white; + border: #001e48 1px solid; + + &:active { + background-image: linear-gradient(to bottom, @button-success-color-to, @button-success-color-from) !important; + box-shadow: inset @button-shadow; + border: #001e48 1px solid !important; + color: #8eb5e2 + } +} + +button.btn.btn-success[disabled] { + border-radius: 2px; + border-radius: 2px; + box-shadow: none; + color: @color-warm-grey; + border: none; + + &:hover { + box-shadow: none !important; + background-image: linear-gradient(to bottom, @button-success-color-from, @button-success-color-to) !important; + } +} + +button.under { + width: 208px; + height: 45px; + object-fit: contain; + border-radius: 100px; + background-image: linear-gradient(to bottom, @button-machine-color-from, @button-machine-color-to); + box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.4); + border: none; + display: flex; + justify-content: center; + align-items: center; + cursor: pointer; + + img { + max-width: 178px; + max-height: 45px; + } + + &.pressed:active, + &:active { + background-image: none; + background-color: @button-machine-color-to; + } + + &.pressed { + background-image: linear-gradient(to bottom, @button-machine-color-to, @button-machine-color-from); + box-shadow: inset 0 1px 2px 0 rgba(0, 0, 0, 0.4); + } +} + +button.square { + // width: @button-height; + // height: @button-height; + border-radius: 2px !important; // background-color: #4b4b4b; + + &:hover { + background-color: @button-success-color-to; + } } .btn-spacer { - margin: 0 8px; - padding: 0 4px; - display: flex; + margin: 0 8px; + padding: 0 4px; + display: flex; - &.collapsed { - margin: 0; - padding: 0; - } + &.collapsed { + margin: 0; + padding: 0; + } } button.modal-close { - width: 28px; - height: 28px; - padding: none; - border-radius: 50%; - border: none; - background-color: #002680; - color: #fff; + width: 28px; + height: 28px; + padding: none; + border-radius: 50%; + border: none; + background-color: #002680; + color: #fff; - i { - font-size: 18px; - } + i { + font-size: 18px; + } } .btn-group { - margin: 0 8px; - padding: 0; - display: flex; + margin: 0 8px; + padding: 0; + display: flex; - button { - border-radius: 0 !important; - margin-left: 0 !important; - margin-right: 0 !important; + button { + border-radius: 0 !important; + margin-left: 0 !important; + margin-right: 0 !important; - &:first-child { - border-top-left-radius: 2px !important; - border-bottom-left-radius: 2px !important; - } - - &:last-child { - border-top-right-radius: 2px !important; - border-bottom-right-radius: 2px !important; - } + &:first-child { + border-top-left-radius: 2px !important; + border-bottom-left-radius: 2px !important; } + + &:last-child { + border-top-right-radius: 2px !important; + border-bottom-right-radius: 2px !important; + } + } } button.soft { - width: 96px; - height: 48px; - margin: 4px; - background-image: linear-gradient(to bottom, #f1f1f1, @color-silver); - box-sizing: border-box; - border: none; - box-shadow: 0px 0px 3px 0px rgba(0, 0, 0, 0.5); - color: @color-darkish-blue; - font-size: 14px; - border-radius: 2px; + width: 96px; + height: 48px; + margin: 4px; + background-image: linear-gradient(to bottom, #f1f1f1, @color-silver); + box-sizing: border-box; + border: none; + box-shadow: 0px 0px 3px 0px rgba(0, 0, 0, 0.5); + color: @color-darkish-blue; + font-size: 14px; + border-radius: 2px; - &.icon { - display: flex; - padding: 1px 12px; - align-items: center; - text-align: left; - } + &.icon { + display: flex; + padding: 1px 12px; + align-items: center; + text-align: left; + } - &.axes { - width: 54px; - font-size: 1.8em; - display: block; - font-weight: 600; - padding: 0px; - text-align: center; - } + &.axes { + width: 54px; + font-size: 1.8em; + display: block; + font-weight: 600; + padding: 0px; + text-align: center; + } + + img { + image-rendering: -webkit-optimize-contrast; + display: inline; + vertical-align: bottom; + margin-right: 6px; + } + + &.active { + background-image: linear-gradient(to bottom, @color-cerulean, @color-clear-blue) !important; + color: white !important; + box-shadow: inset 0px 0px 3px 0px rgba(0, 0, 0, 0.5); img { - width: 18px; - image-rendering: -webkit-optimize-contrast; - display: inline; - vertical-align: bottom; - margin-right: 6px; + filter: grayscale(100%) invert(100) saturate(200); } + } - &.active { - background-image: linear-gradient(to bottom, @color-cerulean, @color-clear-blue) !important; - color: white !important; - box-shadow: inset 0px 0px 3px 0px rgba(0, 0, 0, 0.5); + &:active { + background-image: linear-gradient(to bottom, @color-silver, #f1f1f1); + box-shadow: inset 0px 0px 3px 0px rgba(0, 0, 0, 0.5); + } - img { - filter: grayscale(100%) invert(100) saturate(200); - } + &.spaced { + margin: 4px 8px; + } + + &[disabled]:not(.readonly) { + background-color: #dddddd !important; + // background-image: none !important; + box-shadow: none !important; + color: @color-warm-grey; + + img { + filter: grayscale(100%) invert(44%); } + } - &:active { - background-image: linear-gradient(to bottom, @color-silver, #f1f1f1); - box-shadow: inset 0px 0px 3px 0px rgba(0, 0, 0, 0.5); - } + &.square { + width: 60px; + } - &.spaced { - margin: 4px 8px; - } + &.incremental { + padding: 0px 2px; + margin-right: 0px; + margin-left: 0px; + } - &[disabled]:not(.readonly) { - background-color: #dddddd !important; - // background-image: none !important; - box-shadow: none !important; - color: @color-warm-grey; + &.firstIncr { + margin-left: 4px; + border-radius: 2px 0px 0px 2px !important + } - img { - filter: grayscale(100%) invert(44%); - } - } + &.middleIncr { + border-radius: 0px !important + } - &.square { - width: 60px; - } + &.lastIncr { + border-radius: 0px 2px 2px 0px !important + } - &.incremental { - padding: 0px 2px; - margin-right: 0px; - margin-left: 0px; - } + i.fa { + font-size: 24px; + } - &.firstIncr { - margin-left: 4px; - border-radius: 2px 0px 0px 2px !important - } + &.readonly { + background: transparent; + box-shadow: none; + border: 3px solid #4e585e; + color: #ddd; + cursor: default; + } - &.middleIncr { - border-radius: 0px !important - } - - &.lastIncr { - border-radius: 0px 2px 2px 0px !important - } - - i.fa { - font-size: 24px; - } - - &.readonly { - background: transparent; - box-shadow: none; - border: 3px solid #4e585e; - color: #ddd; - cursor: default; - } - - &.inverter { - background: transparent; - box-shadow: none; - border: 3px solid #657178; - color: white - } + &.inverter { + background: transparent; + box-shadow: none; + border: 3px solid #657178; + color: white + } } .togglebutton { - vertical-align: middle; - -webkit-tap-highlight-color: transparent; + vertical-align: middle; + -webkit-tap-highlight-color: transparent; } .togglebutton, .togglebutton label, .togglebutton input, .togglebutton .toggle { - user-select: none; + user-select: none; } .togglebutton label { - cursor: pointer; - color: rgba(0, 0, 0, 0.26); + cursor: pointer; + color: rgba(0, 0, 0, 0.26); } .form-group.is-focused .togglebutton label { - color: rgba(0, 0, 0, 0.26); + color: rgba(0, 0, 0, 0.26); } .form-group.is-focused .togglebutton label:hover, .form-group.is-focused .togglebutton label:focus { - color: rgba(0, 0, 0, .54); + color: rgba(0, 0, 0, .54); } fieldset[disabled] .form-group.is-focused .togglebutton label { - color: rgba(0, 0, 0, 0.26); + color: rgba(0, 0, 0, 0.26); } .togglebutton label input[type=checkbox] { - opacity: 0; - width: 0; - height: 0; + opacity: 0; + width: 0; + height: 0; + display: none; } .togglebutton label .toggle { - text-align: left; - margin-left: 5px; + text-align: left; + margin-left: 5px; } .togglebutton label .toggle, .togglebutton label input[type=checkbox][disabled]+.toggle { - content: ""; - display: inline-block; - width: 70px; - height: 24px; - background-color: #ddd; - border-radius: 15px; - margin-right: 15px; - transition: background 0.3s ease; - vertical-align: middle; - position: relative; - box-shadow: inset 0 1px 2px 0 rgba(0, 0, 0, 0.5); - line-height: 24px; - text-align: center; - color: #979797; - font-size: 10px; - text-transform: uppercase; + content: ""; + display: inline-block; + width: 70px; + height: 24px; + background-color: #ddd; + border-radius: 15px; + margin-right: 15px; + transition: background 0.3s ease; + vertical-align: middle; + position: relative; + box-shadow: inset 0 1px 2px 0 rgba(0, 0, 0, 0.5); + line-height: 24px; + text-align: center; + color: #979797; + font-size: 10px; + text-transform: uppercase; } .togglebutton label .toggle:after { - content: ""; - display: inline-block; - width: 20px; - height: 20px; - background-image: linear-gradient(to bottom, #1756ad, #002680); - border-radius: 20px; - position: relative; - box-shadow: 0 1px 1px 0px rgba(0, 0, 0, 0.4); - left: 1px; - top: 2px; - position: absolute; - border: none; - transition: left 0.3s ease, background 0.3s ease, box-shadow 0.1s ease; + content: ""; + display: inline-block; + width: 20px; + height: 20px; + background-image: linear-gradient(to bottom, #1756ad, #002680); + border-radius: 20px; + position: relative; + box-shadow: 0 1px 1px 0px rgba(0, 0, 0, 0.4); + left: 1px; + top: 2px; + position: absolute; + border: none; + transition: left 0.3s ease, background 0.3s ease, box-shadow 0.1s ease; } .togglebutton label input[type=checkbox][disabled]+.toggle:after, .togglebutton label input[type=checkbox][disabled]:checked+.toggle:after { - background-color: #BDBDBD; + background-color: #BDBDBD; } .togglebutton label input[type=checkbox]+.toggle:active:after, .togglebutton label input[type=checkbox][disabled]+.toggle:active:after { - box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.6), 0 0 0 20px rgba(0, 0, 0, 0.2); + box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.6), 0 0 0 20px rgba(0, 0, 0, 0.2); } .togglebutton label input[type=checkbox]:checked+.toggle:after { - left: 48px; + left: 48px; } .togglebutton label input[type=checkbox]:checked+.toggle { - content: ""; - background-image: linear-gradient(to bottom, #3fa4ff, #1791ff); - color: #fff; + content: ""; + background-image: linear-gradient(to bottom, #3fa4ff, #1791ff); + color: #fff; } .togglebutton.big { - span.toggle { - height: 40px; - width: 112px; - border-radius: 20px; - font-size: 17px; - line-height: 40px; - font-weight: bold; + span.toggle { + height: 40px; + width: 112px; + border-radius: 20px; + font-size: 17px; + line-height: 40px; + font-weight: bold; - &:after { - width: 36px; - height: 36px; - } + &:after { + width: 36px; + height: 36px; } + } - input[type=checkbox]:checked+.toggle:after { - left: 74px; - } + input[type=checkbox]:checked+.toggle:after { + left: 74px; + } } .custom-checkbox { - width: 22px; - height: 22px; - display: flex; - // margin-left: 16px; - align-items: center; - position: relative; + width: 22px; + height: 22px; + display: flex; + // margin-left: 16px; + align-items: center; + position: relative; } .custom-checkbox label { - cursor: pointer; - position: absolute; - width: 22px; - height: 22px; - top: 0; - left: 0; - background-color: @color-white2; - box-shadow: inset 0 1px 3px @color-black-50; - border-radius: 2px; + cursor: pointer; + position: absolute; + width: 22px; + height: 22px; + top: 0; + left: 0; + background-color: @color-white2; + box-shadow: inset 0 1px 3px @color-black-50; + border-radius: 2px; } .custom-checkbox label:after { - opacity: 0; - content: ''; - position: absolute; - width: 16px; - height: 9px; - background: transparent; - top: 3px; - left: 2px; - border: 5px solid #1791ff; - border-top: none; - border-right: none; - transform: rotate(-48deg); + opacity: 0; + content: ''; + position: absolute; + width: 16px; + height: 9px; + background: transparent; + top: 3px; + left: 2px; + border: 5px solid #1791ff; + border-top: none; + border-right: none; + transform: rotate(-48deg); } .custom-checkbox input[type=checkbox]:checked+label { - cursor: pointer; - position: absolute; - width: 22px; - height: 22px; - top: 0; - left: 0; - background-color: @color-white2; - border: solid 1px @color-clear-blue; - border-radius: 2px; + cursor: pointer; + position: absolute; + width: 22px; + height: 22px; + top: 0; + left: 0; + background-color: @color-white2; + border: solid 1px @color-clear-blue; + border-radius: 2px; } .custom-checkbox input[type=checkbox]:checked+label:after { - opacity: 1; + opacity: 1; } .custom-checkbox-label { - display: flex; - margin-left: 8px; - font-size: 18px; - line-height: 1.11; - color: @color-greyish-brown; + display: flex; + margin-left: 8px; + font-size: 18px; + line-height: 1.11; + color: @color-greyish-brown; } // .togglebutton label input[type=checkbox]:checked+.toggle:after { diff --git a/Thermo.Active/wwwroot/assets/styles/base/ciclo.less b/Thermo.Active/wwwroot/assets/styles/base/ciclo.less deleted file mode 100644 index 483ca89a..00000000 --- a/Thermo.Active/wwwroot/assets/styles/base/ciclo.less +++ /dev/null @@ -1,51 +0,0 @@ -// out: false, sourceMap: false, main: ../style.less -@import "grid-system.less"; -@import "colors.less"; -@import "fonts.less"; - - -.modal.ciclo-info { - - section { - - .specific { - padding: 0 10px; - - .caricatore-buttons { - - button { - margin-right: 15px; - margin-left: 5px; - width: 48px; - height: 48px; - object-fit: contain; - border-radius: 2px; - box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.5); - border: none; - background-image: linear-gradient(to bottom, #f1f1f1 0%, #bbbcbc 98%); - - &:last-of-type { - border: solid 1px #001e48; - background-image: linear-gradient(to bottom, #1756ad, #002680); - } - - } - - } - - - } - - .box { - margin-bottom: 10px; - width: 500px; - - .body { - padding: 5px 10px; - } - - } - - } - -} \ No newline at end of file diff --git a/Thermo.Active/wwwroot/assets/styles/base/controstamposetup.less b/Thermo.Active/wwwroot/assets/styles/base/controstamposetup.less deleted file mode 100644 index 7a85575b..00000000 --- a/Thermo.Active/wwwroot/assets/styles/base/controstamposetup.less +++ /dev/null @@ -1,40 +0,0 @@ -// out: false, sourceMap: false, main: ../style.less -@import "grid-system.less"; -@import "colors.less"; -@import "fonts.less"; - - -.modal.controstamposetup-info { - - section { - - .controstampo-cycle { - margin-left: 37%; - } - - .specific { - padding-left: 5px; - - .box { - margin-bottom: 5px; - background-color: #e5f3ff; - - &:first-of-type { - background-color: white; - } - - &:last-of-type { - background-color: #b3dbff; - } - - } - - .input-area { - width: 480px; - } - - } - - } - -} \ No newline at end of file diff --git a/Thermo.Active/wwwroot/assets/styles/base/estrazione.less b/Thermo.Active/wwwroot/assets/styles/base/estrazione.less deleted file mode 100644 index 98184230..00000000 --- a/Thermo.Active/wwwroot/assets/styles/base/estrazione.less +++ /dev/null @@ -1,27 +0,0 @@ -// out: false, sourceMap: false, main: ../style.less -@import "grid-system.less"; -@import "colors.less"; -@import "fonts.less"; - -.modal.estrazione-info { - - section.body { - - section { - - .specific { - justify-content: flex-end; - padding-left: 10px; - - .box { - margin: 0; - background-color: #e5f3ff; - } - - } - - } - - } - -} \ No newline at end of file diff --git a/Thermo.Active/wwwroot/assets/styles/base/formato.less b/Thermo.Active/wwwroot/assets/styles/base/formato.less deleted file mode 100644 index 00dc6852..00000000 --- a/Thermo.Active/wwwroot/assets/styles/base/formato.less +++ /dev/null @@ -1,59 +0,0 @@ -// out: false, sourceMap: false, main: ../style.less -@import "grid-system.less"; -@import "colors.less"; -@import "fonts.less"; - -.modal.formato-info { - - section { - .tast { - margin-left: -300px; - } - } - - - .radio-buttons { - display: flex; - justify-content: flex-start; - align-items: center; - - input { - - width: 24px; - height: 24px; - object-fit: contain; - border-radius: 12px; - background-color: #f1f1f1; - - } - - label { - - font-size: 18px; - font-weight: normal; - font-stretch: normal; - font-style: normal; - line-height: 1.11; - letter-spacing: normal; - text-align: right; - color: #4b4b4b; - - &:first-of-type { - font-size: 24px; - font-weight: 500; - font-stretch: normal; - font-style: normal; - line-height: normal; - letter-spacing: normal; - text-align: center; - color: @color-darkish-blue; - padding-right: 200px; - padding-left: 20px; - } - - } - - } - - -} \ No newline at end of file diff --git a/Thermo.Active/wwwroot/assets/styles/base/grid-system.less b/Thermo.Active/wwwroot/assets/styles/base/grid-system.less index 434632f2..1e2807f8 100644 --- a/Thermo.Active/wwwroot/assets/styles/base/grid-system.less +++ b/Thermo.Active/wwwroot/assets/styles/base/grid-system.less @@ -1,37 +1,54 @@ // out: false, sourceMap: false, main: ../style.less @row: row; @col: col; + .@{row} { - display: flex; - width: 100%; - flex-direction: row; + display: flex; + width: 100%; + flex-direction: row; } .@{col} { - display: flex; - flex-direction: column; + display: flex; + flex-direction: column; } .relative { - position: relative; + position: relative; } .absolute { - position: absolute; + position: absolute; + + &.bottom { + bottom: 1rem; + } + + &.left { + left: 1rem; + } + + &.right { + right: 1rem; + } + + &.top { + top: 1rem; + } } .full-height { - height: 100%; + height: 100%; } .full-width { - width: 100%; + width: 100%; } .pull-right { - float: right; + float: right; } .pull-left { - float: left; -} + float: left; +} \ No newline at end of file diff --git a/Thermo.Active/wwwroot/assets/styles/base/input.less b/Thermo.Active/wwwroot/assets/styles/base/input.less index e6c23959..ee3b215b 100644 --- a/Thermo.Active/wwwroot/assets/styles/base/input.less +++ b/Thermo.Active/wwwroot/assets/styles/base/input.less @@ -2,7 +2,7 @@ @import "colors.less"; @import "fonts.less"; @font-family: 'Work Sans', - sans-serif; + sans-serif; @font-size: 18px; @font-size-small: 14px; @input-height: 48px; @@ -10,97 +10,266 @@ .form-group { + display: block; + margin-bottom: 33px; + + label { display: block; - margin-bottom: 33px; + color: @color-label-grey; + font-size: @font-size; + line-height: 1; + font-family: @font-family; + text-align: left; + margin-bottom: 13px; + } - label { - display: block; - color: @color-label-grey; - font-size: @font-size; - line-height: 1; - font-family: @font-family; - text-align: left; - margin-bottom: 13px; - } + input, + select { + display: block; + border-radius: 2px; + border: solid 1px #dfdfdf; + height: @input-height; + line-height: 1.1; + font-family: @font-family; + color: @color-input-light; + font-size: @font-size; + background-color: @color-input-background; + margin: 0 0px; + padding-right: 0; + padding-left: 20px; + width: calc(~'100% - 20px'); + } - input, - select { - display: block; - border-radius: 2px; - border: solid 1px #dfdfdf; - height: @input-height; - line-height: 1.1; - font-family: @font-family; - color: @color-input-light; - font-size: @font-size; - background-color: @color-input-background; - margin: 0 0px; - padding-right: 0; - padding-left: 20px; - width: calc(~'100% - 20px'); - } + textarea { + box-sizing: border-box; + resize: none; + display: block; + border-radius: 2px; + border: solid 1px #dfdfdf; + height: 120px; + font-family: @font-family; + color: @color-input-light; + font-size: 16px; + background-color: @color-input-background; + margin: 0 0px; + padding-right: 0; + width: 100%; + padding: 10px 5px; + } - textarea { - box-sizing: border-box; - resize: none; - display: block; - border-radius: 2px; - border: solid 1px #dfdfdf; - height: 120px; - font-family: @font-family; - color: @color-input-light; - font-size: 16px; - background-color: @color-input-background; - margin: 0 0px; - padding-right: 0; - width: 100%; - padding: 10px 5px; - } + select { + padding: 0; + width: 100%; + } - select { - padding: 0; - width: 100%; - } + input.invalid:not([readonly]), + input[aria-invalid="true"]:not([readonly]) { + box-shadow: inset 0px 0px 0px 1px @color-scarlet !important; + } - input.invalid:not([readonly]), - input[aria-invalid="true"]:not([readonly]) { - box-shadow: inset 0px 0px 0px 1px @color-scarlet !important; - } - - small.error { - text-align: left; - display: block; - color: @color-scarlet; - font-size: @font-size-small; - font-family: @font-family; - line-height: 1; - padding-left: 16px; - margin: 2px 0; - } + small.error { + text-align: left; + display: block; + color: @color-scarlet; + font-size: @font-size-small; + font-family: @font-family; + line-height: 1; + padding-left: 16px; + margin: 2px 0; + } } .text-center { - text-align: center; + text-align: center; } .block { - display: block; + display: block; } .block-center { - margin: auto !important; + margin: auto !important; } input.invalid:not([readonly]), input[aria-invalid="true"]:not([readonly]) { - box-shadow: inset 0px 0px 0px 1px @color-scarlet !important; + box-shadow: inset 0px 0px 0px 1px @color-scarlet !important; } input:focus { - outline: 5px #1791ff auto; + outline: 5px #1791ff auto; } select:focus { - outline: 5px #1791ff auto; + outline: 5px #1791ff auto; +} + + +.radio-buttons { + display: flex; + justify-content: flex-start; + align-items: center; + + input { + + width: 24px; + height: 24px; + object-fit: contain; + border-radius: 12px; + background-color: #f1f1f1; + margin: 0 5px; + } + + label { + + font-size: 18px; + + line-height: 1.11; + color: #4b4b4b; + + &:first-of-type { + font-size: 24px; + font-weight: 500; + color: @color-darkish-blue; + flex: 1; + } + + } + +} + + +.input-area { + width: 100%; + display: flex; + flex-flow: row; + align-items: center; + justify-content: space-between; + + &.grid { + display: grid; + grid-template-rows: 1fr; + grid-template-columns: repeat(2, auto); + grid-column-gap: 1rem; + + >button { + margin: 0; + } + + &.grid-4 { + grid-template-columns: repeat(4, auto); + } + + &.grid-5 { + grid-template-columns: repeat(5, auto); + } + + &.grid-6 { + grid-template-columns: repeat(6, auto); + } + + &.grid-7 { + grid-template-columns: repeat(7, auto); + } + + &.grid-8 { + grid-template-columns: repeat(8, auto); + } + + &.grid-9 { + grid-template-columns: repeat(9, auto); + } + + &.grid-10 { + grid-template-columns: repeat(10, auto); + } + } + + &.left { + justify-content: flex-start; + width: auto; + justify-self: left; + } + + span.toggle { + margin-right: 0 !important; + } + + &.col { + flex-flow: column; + align-items: flex-start; + height: auto; + } + + h3 { + color: #002680; + margin: 18px 0; + } + + .buttons { + width: 100%; + display: flex; + flex-flow: row; + margin-bottom: 18px; + + &:last-child { + margin-bottom: 0; + } + } + + label { + color: #002680; + font-size: 24px; + font-weight: 500; + flex: 1; + } + + .numeric { + font-size: 18px; + font-weight: 500; + color: #6d6d6d; + + width: 100px; + height: 48px; + border-radius: 2px; + box-shadow: inset 0 1px 3px 0 rgba(0, 0, 0, 0.5); + border: none; + + display: flex; + flex-flow: row nowrap; + padding: 0 4px; + align-items: center; + justify-content: stretch; + + input { + border: none; + font-size: 16px; + text-align: right; + height: 100%; + width: 100%; + outline: none !important; + background-color: transparent; + + &[type=number]::-webkit-inner-spin-button, + &[type=number]::-webkit-outer-spin-button { + -webkit-appearance: none; + margin: 0; + } + } + + span { + padding: 0 3px; + font-size: 14px; + } + } + + select { + min-width: 150px; + height: 48px; + background-color: #fff; + padding: 0 20px; + font-size: 1rem; + + } } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/assets/styles/base/layout.less b/Thermo.Active/wwwroot/assets/styles/base/layout.less index fdd22a9b..907e8bad 100644 --- a/Thermo.Active/wwwroot/assets/styles/base/layout.less +++ b/Thermo.Active/wwwroot/assets/styles/base/layout.less @@ -4,28 +4,18 @@ @import "modals.less"; @import "graph-dashboard.less"; @import "dashboard.less"; -@import "pirometro.less"; @import "riscaldi.less"; -@import "formato.less"; @import "slider.less"; @import "tastierino.less"; @import "preriscaldo-dashboard.less"; @import "circlegantt.less"; @import "paddle.less"; -@import "arretramento-riscaldi.less"; @import "arch-interface.less"; @import "avvio-prod.less"; -@import "ciclo.less"; -@import "raffreddamento.less"; @import "processo.less"; @import "progrprerisc.less"; -@import "controstamposetup.less"; -@import "quote-velocita.less"; @import "opzioni.less"; @import "imbutitura.less"; -@import "estrazione.less"; -@import "scheda.less"; -@import "vuoto.less"; @import "popups.less"; @import "grid-system.less"; @import "input.less"; @@ -275,4 +265,20 @@ body { .smooth-dnd-no-user-select * { cursor: move !important; +} + +.mb-10 { + margin-bottom: 10px; +} + +.mt-10 { + margin-top: 10px; +} + +.mr-10 { + margin-right: 10px; +} + +.ml-10 { + margin-left: 10px; } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/assets/styles/base/pirometro.less b/Thermo.Active/wwwroot/assets/styles/base/pirometro.less deleted file mode 100644 index 20f21701..00000000 --- a/Thermo.Active/wwwroot/assets/styles/base/pirometro.less +++ /dev/null @@ -1,39 +0,0 @@ -// out: false, sourceMap: false, main: ../style.less -@import "grid-system.less"; -@import "colors.less"; -@import "fonts.less"; -@import "setup.less"; - -.modal.pirometro-info { - section { - - &.termo { - .tast { - margin-left: 400px; - } - } - - .specific { - width: 470px; - } - - .termospecific { - - - - button { - margin-left: 5px; - width: 48px; - height: 48px; - object-fit: contain; - border-radius: 2px; - box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.5); - border: solid 1px #001e48; - background-image: linear-gradient(to bottom, #1756ad, #002680); - } - - } - - } - -} \ No newline at end of file diff --git a/Thermo.Active/wwwroot/assets/styles/base/quote-velocita.less b/Thermo.Active/wwwroot/assets/styles/base/quote-velocita.less deleted file mode 100644 index 413dbe12..00000000 --- a/Thermo.Active/wwwroot/assets/styles/base/quote-velocita.less +++ /dev/null @@ -1,42 +0,0 @@ -// out: false, sourceMap: false, main: ../style.less -@import "grid-system.less"; -@import "colors.less"; -@import "fonts.less"; - - -.modal.quote-velocita-info { - section { - - &.cornice { - .tast { - margin-left: 125px; - } - } - - aside { - .box { - .body { - padding: 4.5px; - - .input-area { - margin: 5px auto; - } - } - } - } - - .specific { - button { - position: absolute; - width: 48px; - height: 48px; - border-radius: 2px; - box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.5); - border: solid 1px #001e48; - background-image: linear-gradient(to bottom, #1756ad, @color-darkish-blue); - bottom: 1rem; - left: 1rem; - } - } - } -} \ No newline at end of file diff --git a/Thermo.Active/wwwroot/assets/styles/base/raffreddamento.less b/Thermo.Active/wwwroot/assets/styles/base/raffreddamento.less deleted file mode 100644 index 03e6b888..00000000 --- a/Thermo.Active/wwwroot/assets/styles/base/raffreddamento.less +++ /dev/null @@ -1,20 +0,0 @@ -// out: false, sourceMap: false, main: ../style.less -@import "grid-system.less"; -@import "colors.less"; -@import "fonts.less"; - - -.modal.raffreddamento-info { - width: 626px; - height: 569px; - - section { - - .specific { - margin-left: 50px; - width: 480px; - } - - } - -} \ No newline at end of file diff --git a/Thermo.Active/wwwroot/assets/styles/base/riscaldi.less b/Thermo.Active/wwwroot/assets/styles/base/riscaldi.less index 06b1ec58..30e583cd 100644 --- a/Thermo.Active/wwwroot/assets/styles/base/riscaldi.less +++ b/Thermo.Active/wwwroot/assets/styles/base/riscaldi.less @@ -4,65 +4,33 @@ @import "fonts.less"; -.modal.riscaldi-info { - section.body { +.warmers { + position: relative; - section { - justify-content: center; - - .sost-dec { - width: 471px; - } - - } - } - - .specific { + svg { width: 100%; - margin-top: 10px; - margin-bottom: 10px; + height: 100%; - &:last-of-type { - margin: unset; - - div { - display: flex; - justify-content: flex-end; - - div { - display: flex; - flex-direction: column; - - button { - width: 48px; - height: 48px; - - } - } - } + rect { + fill: none; + stroke: 1px solid blue; } - select { - width: 110px; - height: 48px; - } + .resistance { + width: calc(100% - 4px); + height: calc(100% - 4px); + background-color: #f40000; + margin: 2px; + border-radius: 4px; - .btn { - margin-top: 10px; - width: 201px; + display: flex; + align-items: center; + justify-content: center; + font-size: 32px; + font-weight: bold; + color: #fff; } - - button { - height: 48px; - } - - label { - margin-bottom: 10px; - color: #002680; - font-size: 24px; - font-weight: 500; - } - } + } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/assets/styles/base/scheda.less b/Thermo.Active/wwwroot/assets/styles/base/scheda.less deleted file mode 100644 index 01ff405c..00000000 --- a/Thermo.Active/wwwroot/assets/styles/base/scheda.less +++ /dev/null @@ -1,19 +0,0 @@ -// out: false, sourceMap: false, main: ../style.less -@import "grid-system.less"; -@import "colors.less"; -@import "fonts.less"; - -.scheda{ - - .body{ - padding: 0px; - - .input-area{ - width: 480px; - margin: 4px; - margin-bottom: 0px; - } - - } - -} \ No newline at end of file diff --git a/Thermo.Active/wwwroot/assets/styles/base/setup.less b/Thermo.Active/wwwroot/assets/styles/base/setup.less index f1324be8..73bdf005 100644 --- a/Thermo.Active/wwwroot/assets/styles/base/setup.less +++ b/Thermo.Active/wwwroot/assets/styles/base/setup.less @@ -4,7 +4,7 @@ @import "fonts.less"; .setup { - padding-top: 50px; + padding-top: 25px; display: flex; justify-content: flex-start; align-items: center; @@ -23,7 +23,7 @@ .modal { width: 1820px; - height: 949px; + height: 980px; section.body { height: calc(~'100% - 66px'); @@ -63,13 +63,17 @@ } - .specific { + article { display: flex; flex-direction: column; width: 100%; - align-items: center; + // align-items: center; position: relative; + &.shrink { + flex-shrink: 2; + } + .slides { width: 100%; height: 160px; @@ -100,6 +104,42 @@ width: 100%; flex: 1; + .borded_label { + min-width: 100px; + height: 60px; + border-radius: 40px; + border: solid 4px #9b9b9b; + display: flex; + flex-direction: column; + justify-content: center; + padding: 0 1rem; + position: absolute; + background-color: white; + + div { + display: grid; + grid-template-columns: auto 1f auto; + + img { + grid-column: 1; + width: unset; + height: unset; + } + + span { + grid-column: 2; + text-align: right; + } + + small { + text-align: center; + grid-column: 3; + } + + } + + } + img { width: 100%; } @@ -129,6 +169,13 @@ } } + + .divider { + width: 100%; + height: 20px; + } + + .modal-footer-navigator { position: absolute; bottom: 0; @@ -344,12 +391,34 @@ } +article { + .box .body { + border-width: 4px; + } +} + .box { - margin-bottom: 30px; + margin-bottom: 20px; box-sizing: border-box; clear: both; + &.transparent { + .body { + border: none; + + } + } + + &.center { + margin-left: auto; + margin-right: auto; + } + + &.box-500 { + width: 500px; + } + .header { display: flex; align-items: center; @@ -363,11 +432,13 @@ } .body { - padding: 20px; - display: flex; + padding: 1rem; + display: grid; + grid-row-gap: 1rem; flex-flow: column; justify-items: center; padding-bottom: 10px; + padding-top: 5px; border: 2px solid #979797; } @@ -401,94 +472,6 @@ -.input-area { - margin: 10px auto; - display: flex; - flex-flow: row; - align-items: center; - justify-content: space-between; - width: 100%; - height: 48px; - - &.col { - flex-flow: column; - align-items: flex-start; - height: auto; - } - - h3 { - font-weight: normal; - color: #002680; - margin: 18px 0; - } - - .buttons { - width: 100%; - display: flex; - flex-flow: row; - margin-bottom: 18px; - - &:last-child { - margin-bottom: 0; - } - } - - label { - color: #002680; - font-size: 24px; - font-weight: 500; - flex: 1; - } - - .numeric { - font-size: 18px; - font-weight: 500; - color: #6d6d6d; - - width: 100px; - height: 48px; - border-radius: 2px; - box-shadow: inset 0 1px 3px 0 rgba(0, 0, 0, 0.5); - border: none; - - display: flex; - flex-flow: row nowrap; - padding: 4px; - align-items: center; - justify-content: stretch; - - input { - border: none; - font-size: 16px; - text-align: right; - height: 100%; - width: 100%; - outline: none !important; - background-color: transparent; - - &[type=number]::-webkit-inner-spin-button, - &[type=number]::-webkit-outer-spin-button { - -webkit-appearance: none; - margin: 0; - } - } - - span { - padding: 0 3px; - font-size: 14px; - } - } - - select { - min-width: 150px; - height: 48px; - background-color: #fff; - padding: 0 20px; - font-size: 1rem; - - } -} - .setup-play { cursor: pointer; diff --git a/Thermo.Active/wwwroot/assets/styles/base/slider.less b/Thermo.Active/wwwroot/assets/styles/base/slider.less index 885d7373..74358b71 100644 --- a/Thermo.Active/wwwroot/assets/styles/base/slider.less +++ b/Thermo.Active/wwwroot/assets/styles/base/slider.less @@ -4,13 +4,16 @@ @import "fonts.less"; .slider { - display: flex; + display: grid; + grid-template-columns: 48px 1fr 48px; + grid-column-gap: 1rem; + width: 100%; flex-flow: row wrap; justify-content: space-between; align-items: center; + .control { - margin: 0 10px; position: relative; flex: 1; @@ -101,6 +104,5 @@ border: none; box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.5); background-image: linear-gradient(to bottom, #fff 0%, #bbbcbc 98%); - margin: 16px; } } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/assets/styles/base/tastierino.less b/Thermo.Active/wwwroot/assets/styles/base/tastierino.less index 236b2d09..a1e04688 100644 --- a/Thermo.Active/wwwroot/assets/styles/base/tastierino.less +++ b/Thermo.Active/wwwroot/assets/styles/base/tastierino.less @@ -9,6 +9,11 @@ background-color: @color-silver; display: flex; justify-content: center; + position: fixed; + top: 0; + left: 0; + z-index: 9000; + box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.5); .mask { display: grid; @@ -20,17 +25,15 @@ button { border: none; background-image: linear-gradient(to bottom, #f1f1f1 0%, #bbbcbc 98%); - box-shadow: 2px 10px 15px 0 rgba(0, 0, 0, 0.5); + box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.5); color: @color-darkish-blue; font-size: 20px; + border-radius: 2px; } .zero { grid-column: 1/span 2; grid-row: 4/5; - border: none; - background-image: linear-gradient(to bottom, #f1f1f1 0%, #bbbcbc 98%); - box-shadow: 2px 10px 15px 0 rgba(0, 0, 0, 0.5); } .submit { @@ -38,17 +41,15 @@ grid-column-end: 5; grid-row-start: 3; grid-row-end: 5; - border: none; - background-size: 52px; + background-size: 54px; + background-position-x: -1px; background-image: url(/assets/icons/png/submit.png); - box-shadow: 2px 10px 15px 0 rgba(0, 0, 0, 0.5); - } .bCanc { grid-column: 4/5; grid-row: 2/3; - background-size: 52px; + background-size: 54px; background-image: url(/assets/icons/png/canc.png); } @@ -107,7 +108,5 @@ grid-column: 4/5; grid-row: 1/2; } - } - } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/assets/styles/base/vuoto.less b/Thermo.Active/wwwroot/assets/styles/base/vuoto.less deleted file mode 100644 index 4ba23907..00000000 --- a/Thermo.Active/wwwroot/assets/styles/base/vuoto.less +++ /dev/null @@ -1,36 +0,0 @@ - // out: false, sourceMap: false, main: ../style.less - @import "grid-system.less"; - @import "colors.less"; - @import "fonts.less"; - - - .modal.vuoto-info { - - section { - - .specific { - padding-left: 5px; - - .box { - margin-bottom: 5px; - background-color: #e5f3ff; - - &:first-of-type { - background-color: white; - } - - &:last-of-type { - background-color: #b3dbff; - } - - } - - .input-area { - width: 480px; - } - - } - - } - - } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/assets/styles/style.css b/Thermo.Active/wwwroot/assets/styles/style.css index 8287ac5d..85fd6a27 100644 --- a/Thermo.Active/wwwroot/assets/styles/style.css +++ b/Thermo.Active/wwwroot/assets/styles/style.css @@ -2,7 +2,7 @@ @import url(../../libs/glyphicons/styles/glyphicons.css); @import "iziToast.min.css"; .setup { - padding-top: 50px; + padding-top: 25px; display: flex; justify-content: flex-start; align-items: center; @@ -20,7 +20,7 @@ } .setup .modal { width: 1820px; - height: 949px; + height: 980px; } .setup .modal section.body { height: calc(100% - 66px); @@ -55,31 +55,33 @@ height: 2px; margin-left: 0px; } -.setup .modal section.body section .specific { +.setup .modal section.body section article { display: flex; flex-direction: column; width: 100%; - align-items: center; position: relative; } -.setup .modal section.body section .specific .slides { +.setup .modal section.body section article.shrink { + flex-shrink: 2; +} +.setup .modal section.body section article .slides { width: 100%; height: 160px; display: flex; justify-content: space-evenly; align-items: center; } -.setup .modal section.body section .specific .slides img { +.setup .modal section.body section article .slides img { flex-shrink: 0; width: 215px; height: 140px; border: 1px solid #bbbcbc; cursor: pointer; } -.setup .modal section.body section .specific .slides .imgborder { +.setup .modal section.body section article .slides .imgborder { border: 1px solid #002680; } -.setup .modal section.body section .specific .svg-area { +.setup .modal section.body section article .svg-area { display: flex; justify-content: center; position: relative; @@ -87,7 +89,36 @@ width: 100%; flex: 1; } -.setup .modal section.body section .specific .svg-area img { +.setup .modal section.body section article .svg-area .borded_label { + min-width: 100px; + height: 60px; + border-radius: 40px; + border: solid 4px #9b9b9b; + display: flex; + flex-direction: column; + justify-content: center; + padding: 0 1rem; + position: absolute; + background-color: white; +} +.setup .modal section.body section article .svg-area .borded_label div { + display: grid; + grid-template-columns: auto 1f auto; +} +.setup .modal section.body section article .svg-area .borded_label div img { + grid-column: 1; + width: unset; + height: unset; +} +.setup .modal section.body section article .svg-area .borded_label div span { + grid-column: 2; + text-align: right; +} +.setup .modal section.body section article .svg-area .borded_label div small { + text-align: center; + grid-column: 3; +} +.setup .modal section.body section article .svg-area img { width: 100%; } .setup .modal section.body footer { @@ -108,6 +139,10 @@ justify-content: space-between; align-items: stretch; } +.setup .divider { + width: 100%; + height: 20px; +} .setup .modal-footer-navigator { position: absolute; bottom: 0; @@ -279,11 +314,24 @@ bottom: 0; transform: skewX(-20deg); } +article .box .body { + border-width: 4px; +} .box { - margin-bottom: 30px; + margin-bottom: 20px; box-sizing: border-box; clear: both; } +.box.transparent .body { + border: none; +} +.box.center { + margin-left: auto; + margin-right: auto; +} +.box.box-500 { + width: 500px; +} .box .header { display: flex; align-items: center; @@ -296,11 +344,13 @@ background-color: #979797; } .box .body { - padding: 20px; - display: flex; + padding: 1rem; + display: grid; + grid-row-gap: 1rem; flex-flow: column; justify-items: center; padding-bottom: 10px; + padding-top: 5px; border: 2px solid #979797; } .box .submit { @@ -324,80 +374,6 @@ text-align: center; color: #002680; } -.input-area { - margin: 10px auto; - display: flex; - flex-flow: row; - align-items: center; - justify-content: space-between; - width: 100%; - height: 48px; -} -.input-area.col { - flex-flow: column; - align-items: flex-start; - height: auto; -} -.input-area h3 { - font-weight: normal; - color: #002680; - margin: 18px 0; -} -.input-area .buttons { - width: 100%; - display: flex; - flex-flow: row; - margin-bottom: 18px; -} -.input-area .buttons:last-child { - margin-bottom: 0; -} -.input-area label { - color: #002680; - font-size: 24px; - font-weight: 500; - flex: 1; -} -.input-area .numeric { - font-size: 18px; - font-weight: 500; - color: #6d6d6d; - width: 100px; - height: 48px; - border-radius: 2px; - box-shadow: inset 0 1px 3px 0 rgba(0, 0, 0, 0.5); - border: none; - display: flex; - flex-flow: row nowrap; - padding: 4px; - align-items: center; - justify-content: stretch; -} -.input-area .numeric input { - border: none; - font-size: 16px; - text-align: right; - height: 100%; - width: 100%; - outline: none !important; - background-color: transparent; -} -.input-area .numeric input[type=number]::-webkit-inner-spin-button, -.input-area .numeric input[type=number]::-webkit-outer-spin-button { - -webkit-appearance: none; - margin: 0; -} -.input-area .numeric span { - padding: 0 3px; - font-size: 14px; -} -.input-area select { - min-width: 150px; - height: 48px; - background-color: #fff; - padding: 0 20px; - font-size: 1rem; -} .setup-play { cursor: pointer; margin: auto; @@ -4584,110 +4560,40 @@ height: 1px; background-color: #676767; } -.modal.pirometro-info section.termo .tast { - margin-left: 400px; +.warmers { + position: relative; } -.modal.pirometro-info section .specific { - width: 470px; -} -.modal.pirometro-info section .termospecific button { - margin-left: 5px; - width: 48px; - height: 48px; - object-fit: contain; - border-radius: 2px; - box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.5); - border: solid 1px #001e48; - background-image: linear-gradient(to bottom, #1756ad, #002680); -} -.modal.riscaldi-info section.body section { - justify-content: center; -} -.modal.riscaldi-info section.body section .sost-dec { - width: 471px; -} -.modal.riscaldi-info .specific { +.warmers svg { width: 100%; - margin-top: 10px; - margin-bottom: 10px; + height: 100%; } -.modal.riscaldi-info .specific:last-of-type { - margin: unset; +.warmers svg rect { + fill: none; + stroke: 1px solid blue; } -.modal.riscaldi-info .specific:last-of-type div { +.warmers svg .resistance { + width: calc(100% - 4px); + height: calc(100% - 4px); + background-color: #f40000; + margin: 2px; + border-radius: 4px; display: flex; - justify-content: flex-end; -} -.modal.riscaldi-info .specific:last-of-type div div { - display: flex; - flex-direction: column; -} -.modal.riscaldi-info .specific:last-of-type div div button { - width: 48px; - height: 48px; -} -.modal.riscaldi-info .specific select { - width: 110px; - height: 48px; -} -.modal.riscaldi-info .specific .btn { - margin-top: 10px; - width: 201px; -} -.modal.riscaldi-info .specific button { - height: 48px; -} -.modal.riscaldi-info .specific label { - margin-bottom: 10px; - color: #002680; - font-size: 24px; - font-weight: 500; -} -.modal.formato-info section .tast { - margin-left: -300px; -} -.modal.formato-info .radio-buttons { - display: flex; - justify-content: flex-start; align-items: center; -} -.modal.formato-info .radio-buttons input { - width: 24px; - height: 24px; - object-fit: contain; - border-radius: 12px; - background-color: #f1f1f1; -} -.modal.formato-info .radio-buttons label { - font-size: 18px; - font-weight: normal; - font-stretch: normal; - font-style: normal; - line-height: 1.11; - letter-spacing: normal; - text-align: right; - color: #4b4b4b; -} -.modal.formato-info .radio-buttons label:first-of-type { - font-size: 24px; - font-weight: 500; - font-stretch: normal; - font-style: normal; - line-height: normal; - letter-spacing: normal; - text-align: center; - color: #002680; - padding-right: 200px; - padding-left: 20px; + justify-content: center; + font-size: 32px; + font-weight: bold; + color: #fff; } .slider { - display: flex; + display: grid; + grid-template-columns: 48px 1fr 48px; + grid-column-gap: 1rem; + width: 100%; flex-flow: row wrap; justify-content: space-between; align-items: center; } .slider .control { - margin: 0 10px; position: relative; flex: 1; } @@ -4765,7 +4671,6 @@ border: none; box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.5); background-image: linear-gradient(to bottom, #fff 0%, #bbbcbc 98%); - margin: 16px; } .keyboard { height: 262px; @@ -4773,6 +4678,11 @@ background-color: #bbbcbc; display: flex; justify-content: center; + position: fixed; + top: 0; + left: 0; + z-index: 9000; + box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.5); } .keyboard .mask { display: grid; @@ -4784,31 +4694,28 @@ .keyboard .mask button { border: none; background-image: linear-gradient(to bottom, #f1f1f1 0%, #bbbcbc 98%); - box-shadow: 2px 10px 15px 0 rgba(0, 0, 0, 0.5); + box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.5); color: #002680; font-size: 20px; + border-radius: 2px; } .keyboard .mask .zero { grid-column: 1 / span 2; grid-row: 0.8; - border: none; - background-image: linear-gradient(to bottom, #f1f1f1 0%, #bbbcbc 98%); - box-shadow: 2px 10px 15px 0 rgba(0, 0, 0, 0.5); } .keyboard .mask .submit { grid-column-start: 4; grid-column-end: 5; grid-row-start: 3; grid-row-end: 5; - border: none; - background-size: 52px; + background-size: 54px; + background-position-x: -1px; background-image: url(/assets/icons/png/submit.png); - box-shadow: 2px 10px 15px 0 rgba(0, 0, 0, 0.5); } .keyboard .mask .bCanc { grid-column: 0.8; grid-row: 0.66666667; - background-size: 52px; + background-size: 54px; background-image: url(/assets/icons/png/canc.png); } .keyboard .mask .b1 { @@ -5175,10 +5082,6 @@ body { width: 100%; align-self: center; } -.modal.estrazione-info { - width: 560px; - height: 411px; -} .arch { display: flex; justify-content: flex-end; @@ -5248,39 +5151,6 @@ body { .modal.avvio-produzione-info section.body section .specific .tast { margin-left: 25%; } -.modal.ciclo-info section .specific { - padding: 0 10px; -} -.modal.ciclo-info section .specific .caricatore-buttons button { - margin-right: 15px; - margin-left: 5px; - width: 48px; - height: 48px; - object-fit: contain; - border-radius: 2px; - box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.5); - border: none; - background-image: linear-gradient(to bottom, #f1f1f1 0%, #bbbcbc 98%); -} -.modal.ciclo-info section .specific .caricatore-buttons button:last-of-type { - border: solid 1px #001e48; - background-image: linear-gradient(to bottom, #1756ad, #002680); -} -.modal.ciclo-info section .box { - margin-bottom: 10px; - width: 500px; -} -.modal.ciclo-info section .box .body { - padding: 5px 10px; -} -.modal.raffreddamento-info { - width: 626px; - height: 569px; -} -.modal.raffreddamento-info section .specific { - margin-left: 50px; - width: 480px; -} .modal.processo-info header { font-size: 22px; color: #4b4b4b; @@ -5527,45 +5397,6 @@ body { letter-spacing: normal; color: #002680; } -.modal.controstamposetup-info section .controstampo-cycle { - margin-left: 37%; -} -.modal.controstamposetup-info section .specific { - padding-left: 5px; -} -.modal.controstamposetup-info section .specific .box { - margin-bottom: 5px; - background-color: #e5f3ff; -} -.modal.controstamposetup-info section .specific .box:first-of-type { - background-color: white; -} -.modal.controstamposetup-info section .specific .box:last-of-type { - background-color: #b3dbff; -} -.modal.controstamposetup-info section .specific .input-area { - width: 480px; -} -.modal.quote-velocita-info section.cornice .tast { - margin-left: 125px; -} -.modal.quote-velocita-info section aside .box .body { - padding: 4.5px; -} -.modal.quote-velocita-info section aside .box .body .input-area { - margin: 5px auto; -} -.modal.quote-velocita-info section .specific button { - position: absolute; - width: 48px; - height: 48px; - border-radius: 2px; - box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.5); - border: solid 1px #001e48; - background-image: linear-gradient(to bottom, #1756ad, #002680); - bottom: 1rem; - left: 1rem; -} .modal.opzioni-info hr { width: 2px; height: 830px; @@ -5630,38 +5461,6 @@ body { margin-bottom: 5px; background-color: #e5f3ff; } -.modal.estrazione-info section.body section .specific { - justify-content: flex-end; - padding-left: 10px; -} -.modal.estrazione-info section.body section .specific .box { - margin: 0; - background-color: #e5f3ff; -} -.scheda .body { - padding: 0px; -} -.scheda .body .input-area { - width: 480px; - margin: 4px; - margin-bottom: 0px; -} -.modal.vuoto-info section .specific { - padding-left: 5px; -} -.modal.vuoto-info section .specific .box { - margin-bottom: 5px; - background-color: #e5f3ff; -} -.modal.vuoto-info section .specific .box:first-of-type { - background-color: white; -} -.modal.vuoto-info section .specific .box:last-of-type { - background-color: #b3dbff; -} -.modal.vuoto-info section .specific .input-area { - width: 480px; -} .popup { width: 288px; height: 218px; @@ -5741,6 +5540,18 @@ body { .absolute { position: absolute; } +.absolute.bottom { + bottom: 1rem; +} +.absolute.left { + left: 1rem; +} +.absolute.right { + right: 1rem; +} +.absolute.top { + top: 1rem; +} .full-height { height: 100%; } @@ -5835,6 +5646,139 @@ input:focus { select:focus { outline: 5px #1791ff auto; } +.radio-buttons { + display: flex; + justify-content: flex-start; + align-items: center; +} +.radio-buttons input { + width: 24px; + height: 24px; + object-fit: contain; + border-radius: 12px; + background-color: #f1f1f1; + margin: 0 5px; +} +.radio-buttons label { + font-size: 18px; + line-height: 1.11; + color: #4b4b4b; +} +.radio-buttons label:first-of-type { + font-size: 24px; + font-weight: 500; + color: #002680; + flex: 1; +} +.input-area { + width: 100%; + display: flex; + flex-flow: row; + align-items: center; + justify-content: space-between; +} +.input-area.grid { + display: grid; + grid-template-rows: 1fr; + grid-template-columns: repeat(2, auto); + grid-column-gap: 1rem; +} +.input-area.grid > button { + margin: 0; +} +.input-area.grid.grid-4 { + grid-template-columns: repeat(4, auto); +} +.input-area.grid.grid-5 { + grid-template-columns: repeat(5, auto); +} +.input-area.grid.grid-6 { + grid-template-columns: repeat(6, auto); +} +.input-area.grid.grid-7 { + grid-template-columns: repeat(7, auto); +} +.input-area.grid.grid-8 { + grid-template-columns: repeat(8, auto); +} +.input-area.grid.grid-9 { + grid-template-columns: repeat(9, auto); +} +.input-area.grid.grid-10 { + grid-template-columns: repeat(10, auto); +} +.input-area.left { + justify-content: flex-start; + width: auto; + justify-self: left; +} +.input-area span.toggle { + margin-right: 0 !important; +} +.input-area.col { + flex-flow: column; + align-items: flex-start; + height: auto; +} +.input-area h3 { + color: #002680; + margin: 18px 0; +} +.input-area .buttons { + width: 100%; + display: flex; + flex-flow: row; + margin-bottom: 18px; +} +.input-area .buttons:last-child { + margin-bottom: 0; +} +.input-area label { + color: #002680; + font-size: 24px; + font-weight: 500; + flex: 1; +} +.input-area .numeric { + font-size: 18px; + font-weight: 500; + color: #6d6d6d; + width: 100px; + height: 48px; + border-radius: 2px; + box-shadow: inset 0 1px 3px 0 rgba(0, 0, 0, 0.5); + border: none; + display: flex; + flex-flow: row nowrap; + padding: 0 4px; + align-items: center; + justify-content: stretch; +} +.input-area .numeric input { + border: none; + font-size: 16px; + text-align: right; + height: 100%; + width: 100%; + outline: none !important; + background-color: transparent; +} +.input-area .numeric input[type=number]::-webkit-inner-spin-button, +.input-area .numeric input[type=number]::-webkit-outer-spin-button { + -webkit-appearance: none; + margin: 0; +} +.input-area .numeric span { + padding: 0 3px; + font-size: 14px; +} +.input-area select { + min-width: 150px; + height: 48px; + background-color: #fff; + padding: 0 20px; + font-size: 1rem; +} button:focus { outline: none; } @@ -5913,6 +5857,12 @@ button.btn.pressed, border: none !important; box-shadow: inset 0 1px 2px 0 rgba(0, 0, 0, 0.4) !important; } +button.square { + height: 48px; + width: 48px; + padding: 0; + margin: 0; +} button.btn.btn-success { background-image: linear-gradient(to bottom, #1756ad, #002680); color: white; @@ -6032,7 +5982,6 @@ button.soft.axes { text-align: center; } button.soft img { - width: 18px; image-rendering: -webkit-optimize-contrast; display: inline; vertical-align: bottom; @@ -6123,6 +6072,7 @@ fieldset[disabled] .form-group.is-focused .togglebutton label { opacity: 0; width: 0; height: 0; + display: none; } .togglebutton label .toggle { text-align: left; @@ -24009,6 +23959,18 @@ body { .smooth-dnd-no-user-select * { cursor: move !important; } +.mb-10 { + margin-bottom: 10px; +} +.mt-10 { + margin-top: 10px; +} +.mr-10 { + margin-right: 10px; +} +.ml-10 { + margin-left: 10px; +} body { font-family: 'Work Sans', sans-serif; } diff --git a/Thermo.Active/wwwroot/assets/svg/disegno-caricatore.svg b/Thermo.Active/wwwroot/assets/svg/disegno-caricatore.svg index c458487e..3eda23e0 100644 --- a/Thermo.Active/wwwroot/assets/svg/disegno-caricatore.svg +++ b/Thermo.Active/wwwroot/assets/svg/disegno-caricatore.svg @@ -9,9 +9,9 @@ xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="1186" + width="1292" height="707" - viewBox="0 0 1186 707" + viewBox="0 0 1292 707" version="1.1" id="svg8" inkscape:version="0.92.4 (5da689c313, 2019-01-14)" @@ -25,9 +25,9 @@ borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="0.26" - inkscape:cx="1903.0535" - inkscape:cy="1303.7306" + inkscape:zoom="2.08" + inkscape:cx="844.36256" + inkscape:cy="95.563833" inkscape:document-units="mm" inkscape:current-layer="layer1" showgrid="false" @@ -281,13 +281,15 @@ cy="-304.69699" /> A2 + id="tspan1144" + x="140.59659" + y="-269.10074">A2 A3 + id="tspan1146" + x="207.31517" + y="-269.10071">A3 A4 + id="tspan1148" + x="274.03372" + y="-269.10071">A4 A5 + id="tspan1150" + x="340.75235" + y="-269.10068">A5 A6 + id="tspan1152" + x="407.47095" + y="-269.10068">A6 A7 + id="tspan1154" + x="474.18954" + y="-269.10071">A7 A8 + id="tspan1156" + x="540.9082" + y="-269.10071">A8 A9 + id="tspan1158" + x="607.62683" + y="-269.10071">A9 A15 + id="tspan1338" + x="1003.379" + y="-269.10071">A15 A16 + id="tspan1340" + x="1070.0977" + y="-269.10068">A16 A17 + id="tspan1342" + x="1136.8162" + y="-269.10065">A17 D17 + + 610 mm + + 610 mm + + 1360 mm + + <= 1030 mm diff --git a/Thermo.Active/wwwroot/assets/svg/disegno-controstampo-quote-velocita.svg b/Thermo.Active/wwwroot/assets/svg/disegno-controstampo-quote-velocita.svg index 8f177d91..ddeecf94 100644 --- a/Thermo.Active/wwwroot/assets/svg/disegno-controstampo-quote-velocita.svg +++ b/Thermo.Active/wwwroot/assets/svg/disegno-controstampo-quote-velocita.svg @@ -25,9 +25,9 @@ borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="0.125" - inkscape:cx="1119.1458" - inkscape:cy="2036.4307" + inkscape:zoom="0.5" + inkscape:cx="-79.558604" + inkscape:cy="84.479602" inkscape:document-units="mm" inkscape:current-layer="layer1" showgrid="false" @@ -44,7 +44,7 @@ image/svg+xml - + @@ -236,5 +236,39 @@ inkscape:transform-center-x="0.0055839671" inkscape:transform-center-y="3.1811632" transform="matrix(0.94139126,0.3373166,0.3373166,-0.94139126,390.09685,-690.78395)" /> + + 1410 mm + + 0 mm diff --git a/Thermo.Active/wwwroot/assets/svg/disegno-quote-velocita-stampo.svg b/Thermo.Active/wwwroot/assets/svg/disegno-quote-velocita-stampo.svg index 5db56b68..ecbdbc03 100644 --- a/Thermo.Active/wwwroot/assets/svg/disegno-quote-velocita-stampo.svg +++ b/Thermo.Active/wwwroot/assets/svg/disegno-quote-velocita-stampo.svg @@ -7,7 +7,7 @@ xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - inkscape:version="1.0beta2 (2b71d25, 2019-12-03)" + inkscape:version="0.92.4 (5da689c313, 2019-01-14)" sodipodi:docname="disegno-quote-velocita-stampo.svg" id="svg8" version="1.1" @@ -18,15 +18,15 @@ inkscape:object-nodes="false" inkscape:current-layer="layer1" inkscape:window-maximized="1" - inkscape:window-y="23" - inkscape:window-x="1280" - inkscape:cy="394.22754" - inkscape:cx="520.21224" - inkscape:zoom="1.4623514" + inkscape:window-y="-9" + inkscape:window-x="-9" + inkscape:cy="161.66741" + inkscape:cx="130.79682" + inkscape:zoom="8.2723087" showgrid="false" id="namedview907" - inkscape:window-height="1311" - inkscape:window-width="2560" + inkscape:window-height="1001" + inkscape:window-width="1920" inkscape:pageshadow="2" inkscape:pageopacity="0" guidetolerance="10" @@ -325,8 +325,9 @@ style="fill:#979797;fill-opacity:1;stroke:#979797;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + d="M 138.7719,177.76207 Z" + style="fill:none;stroke:#000000;stroke-width:0.26458299px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + inkscape:connector-curvature="0" /> + + 1059 mm + + 0 mm diff --git a/Thermo.Active/wwwroot/assets/svg/disegno-quote-velocita.svg b/Thermo.Active/wwwroot/assets/svg/disegno-quote-velocita.svg index 1e809d8b..b10bc5e6 100644 --- a/Thermo.Active/wwwroot/assets/svg/disegno-quote-velocita.svg +++ b/Thermo.Active/wwwroot/assets/svg/disegno-quote-velocita.svg @@ -25,9 +25,9 @@ borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="0.5325" - inkscape:cx="-212.68016" - inkscape:cy="598.57363" + inkscape:zoom="2.13" + inkscape:cx="472.77738" + inkscape:cy="49.172206" inkscape:document-units="mm" inkscape:current-layer="layer1" showgrid="false" @@ -45,7 +45,7 @@ image/svg+xml - + @@ -244,5 +244,40 @@ inkscape:transform-center-y="-0.48678734" transform="matrix(0.92838376,0,0,-1.0738472,15.707629,417.51225)" inkscape:transform-center-x="-2.0583999e-06" /> + + 810 mm + + 0 mm diff --git a/Thermo.Active/wwwroot/package-lock.json b/Thermo.Active/wwwroot/package-lock.json index 7555c3aa..056109f7 100644 --- a/Thermo.Active/wwwroot/package-lock.json +++ b/Thermo.Active/wwwroot/package-lock.json @@ -1427,6 +1427,12 @@ "@types/node": "*" } }, + "@types/json-schema": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.5.tgz", + "integrity": "sha512-7+2BITlgjgDhH0vvwZU/HZJVyk+2XUlvxXe8dFMedNX/aMkaOq++rMAFXc0tM7ij15QaWlbdQASBR9dihi+bDQ==", + "dev": true + }, "@types/minimatch": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", @@ -15740,6 +15746,85 @@ "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=", "dev": true }, + "style-loader": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-1.2.1.tgz", + "integrity": "sha512-ByHSTQvHLkWE9Ir5+lGbVOXhxX10fbprhLvdg96wedFZb4NDekDPxVKv5Fwmio+QcMlkkNfuK+5W1peQ5CUhZg==", + "dev": true, + "requires": { + "loader-utils": "^2.0.0", + "schema-utils": "^2.6.6" + }, + "dependencies": { + "ajv": { + "version": "6.12.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.2.tgz", + "integrity": "sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ajv-keywords": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.4.1.tgz", + "integrity": "sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ==", + "dev": true + }, + "emojis-list": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", + "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", + "dev": true + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "json5": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz", + "integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "loader-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", + "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + }, + "schema-utils": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.0.tgz", + "integrity": "sha512-0ilKFI6QQF5nxDZLFn2dMjvc4hjg/Wkg7rHd3jK6/A4a1Hl9VFdQWvgB1UMGoU94pad1P/8N7fMcEnLnSiju8A==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.4", + "ajv": "^6.12.2", + "ajv-keywords": "^3.4.1" + } + } + } + }, "stylehacks": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-4.0.3.tgz", @@ -15821,6 +15906,11 @@ "resolved": "https://registry.npmjs.org/svg-gauge/-/svg-gauge-1.0.6.tgz", "integrity": "sha512-gRkznVhtS18eOM/GMPDXAvrLZOpqzNVDg4bFAPAEjiDKd1tZHFIe8Bwt3G6TFg/H+pFboetPPI+zoV+bOL26QQ==" }, + "svg-pan-zoom": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/svg-pan-zoom/-/svg-pan-zoom-3.6.1.tgz", + "integrity": "sha512-JaKkGHHfGvRrcMPdJWkssLBeWqM+Isg/a09H7kgNNajT1cX5AztDTNs+C8UzpCxjCTRrG34WbquwaovZbmSk9g==" + }, "svg-tags": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/svg-tags/-/svg-tags-1.0.0.tgz", diff --git a/Thermo.Active/wwwroot/package.json b/Thermo.Active/wwwroot/package.json index 6f6f2fd3..3b2a6a73 100644 --- a/Thermo.Active/wwwroot/package.json +++ b/Thermo.Active/wwwroot/package.json @@ -1,73 +1,74 @@ { - "name": "step", - "version": "1.0.0", - "description": "step", - "author": "Paolo Possanzini ", - "private": true, - "scripts": { - "build": "webpack", - "buildprod": "webpack --progress --config webpack.config.js --env production", - "dev": "webpack --watch", - "serve": "webpack-dev-server --inline --progress --config webpack.config.js" - }, - "dependencies": { - "axios": "0.19.2", - "brace": "0.11.1", - "chart.js": "^2.9.3", - "core-js": "^3.4.4", - "izitoast": "1.2.0", - "moment": "2.24.0", - "qrcode": "^1.4.4", - "raphael": "^2.3.0", - "sprintf-js": "1.1.2", - "svg-gauge": "^1.0.6", - "v-tooltip": "^2.0.3", - "vee-validate": "2.1.1", - "vue": "^2.6.11", - "vue-chartjs": "^3.5.0", - "vue-class-component": "7.2.3", - "vue-drag-drop": "1.1.4", - "vue-property-decorator": "8.4.0", - "vue-router": "^3.1.6", - "vue-smooth-dnd": "0.8.1", - "vue2-ace-editor": "0.0.15", - "vue2-datepicker": "3.4.1", - "vuex": "3.1.3", - "svg-gauge": "1.0.6" - }, - "devDependencies": { - "@babel/plugin-proposal-export-default-from": "7.8.3", - "@types/es6-promise": "3.3.0", - "@vue/cli-plugin-babel": "^4.1.0", - "@vue/cli-plugin-eslint": "^4.1.0", - "@vue/cli-plugin-router": "^4.1.0", - "@vue/cli-plugin-typescript": "^4.1.0", - "@vue/cli-plugin-vuex": "^4.1.0", - "@vue/cli-service": "^4.2.3", - "autoprefixer": "^7.1.2", - "babel-loader": "8.0.6", - "chalk": "^2.0.1", - "copy-webpack-plugin": "^4.0.1", - "css-loader": "^0.28.0", - "eventsource-polyfill": "^0.9.6", - "file-loader": "^1.1.4", - "terser-webpack-plugin": "1.3.0", - "ts-loader": "6.2.1", - "typescript": "3.8.3", - "url-loader": "^3.0.0", - "vue-loader": "^15.9.0", - "vue-template-compiler": "^2.6.11", - "webpack": "^4.42.0", - "webpack-cli": "3.2.3", - "webpack-dev-server": "3.2.1" - }, - "engines": { - "node": ">= 4.0.0", - "npm": ">= 3.0.0" - }, - "browserslist": [ - "> 1%", - "last 2 versions", - "not ie <= 8" - ] + "name": "step", + "version": "1.0.0", + "description": "step", + "author": "Paolo Possanzini ", + "private": true, + "scripts": { + "build": "webpack", + "buildprod": "webpack --progress --config webpack.config.js --env production", + "dev": "webpack --watch", + "serve": "webpack-dev-server --inline --progress --config webpack.config.js" + }, + "dependencies": { + "axios": "0.19.2", + "brace": "0.11.1", + "chart.js": "^2.9.3", + "core-js": "^3.4.4", + "izitoast": "1.2.0", + "moment": "2.24.0", + "qrcode": "^1.4.4", + "raphael": "^2.3.0", + "sprintf-js": "1.1.2", + "svg-gauge": "^1.0.6", + "v-tooltip": "^2.0.3", + "vee-validate": "2.1.1", + "vue": "^2.6.11", + "vue-chartjs": "^3.5.0", + "vue-class-component": "7.2.3", + "vue-drag-drop": "1.1.4", + "vue-property-decorator": "8.4.0", + "vue-router": "^3.1.6", + "vue-smooth-dnd": "0.8.1", + "vue2-ace-editor": "0.0.15", + "vue2-datepicker": "3.4.1", + "vuex": "3.1.3", + "svg-pan-zoom": "3.6.1" + }, + "devDependencies": { + "@babel/plugin-proposal-export-default-from": "7.8.3", + "@types/es6-promise": "3.3.0", + "@vue/cli-plugin-babel": "^4.1.0", + "@vue/cli-plugin-eslint": "^4.1.0", + "@vue/cli-plugin-router": "^4.1.0", + "@vue/cli-plugin-typescript": "^4.1.0", + "@vue/cli-plugin-vuex": "^4.1.0", + "@vue/cli-service": "^4.2.3", + "autoprefixer": "^7.1.2", + "babel-loader": "8.0.6", + "chalk": "^2.0.1", + "copy-webpack-plugin": "^4.0.1", + "css-loader": "^0.28.0", + "style-loader": "1.2.1", + "eventsource-polyfill": "^0.9.6", + "file-loader": "^1.1.4", + "terser-webpack-plugin": "1.3.0", + "ts-loader": "6.2.1", + "typescript": "3.8.3", + "url-loader": "^3.0.0", + "vue-loader": "^15.9.0", + "vue-template-compiler": "^2.6.11", + "webpack": "^4.42.0", + "webpack-cli": "3.2.3", + "webpack-dev-server": "3.2.1" + }, + "engines": { + "node": ">= 4.0.0", + "npm": ">= 3.0.0" + }, + "browserslist": [ + "> 1%", + "last 2 versions", + "not ie <= 8" + ] } diff --git a/Thermo.Active/wwwroot/src/@types/recipe-current.d.ts b/Thermo.Active/wwwroot/src/@types/recipe-current.d.ts index 8f1ab5ec..9fe02824 100644 --- a/Thermo.Active/wwwroot/src/@types/recipe-current.d.ts +++ b/Thermo.Active/wwwroot/src/@types/recipe-current.d.ts @@ -1,338 +1,331 @@ declare module Recipe { - interface IRange{ - min:number, - max:number + interface IRange { + min: number, + max: number } - interface IStatus{ - visible:boolean, - enabled:boolean, - hasError:boolean + interface IStatus { + visible: boolean, + enabled: boolean, + hasError: boolean } - interface IValue{ - range:IRange, - status:IStatus, - unitMeasure:string, - valueAct:number + interface IValue { + range: IRange, + status: IStatus, + unitMeasure: string, + valueAct: number } - - interface IRecipe{ - general_sizes_mould_dim_x?:IValue, - general_sizes_mould_dim_y?:IValue, - general_sizes_mould_max_height?:IValue, - general_sizes_mould_min_height?:IValue, - general_sizes_mould_base_height?:IValue, - general_sizes_sheet_material?:IValue, - general_sizes_sheet_dim_x?:IValue, - general_sizes_sheet_dim_y?:IValue, - general_sizes_sheet_thickness?:IValue, - general_sizes_plate_type?:IValue, - general_sizes_plate_dim_x?:IValue, - general_sizes_plate_dim_y?:IValue, - general_sizes_frame_traverses?:IValue, - general_sizes_frame_dim_x?:IValue, - general_sizes_frame_dim_y?:IValue, - general_sizes_upperplate_max_height?:IValue, - general_area_working_dxsx?:IValue, - positions_mould_lower_position?:IValue, - positions_mould_lower_speed?:IValue, - positions_mould_intermediate_position?:IValue, - positions_mould_upper_position?:IValue, - positions_mould_upper_speed?:IValue, - positions_mould_upperdeceleration_position?:IValue, - positions_mould_upperdeceleration_speed?:IValue, - positions_mould_lowerdeceleration_speed?:IValue, - positions_mould_lowerdeceleration_position?:IValue, - positions_frame_lower_position?:IValue, - positions_frame_lower_speed?:IValue, - positions_frame_upper_speed?:IValue, - positions_frame_upper_position?:IValue, - positions_frame_intermediate_position?:IValue, - positions_frame_intermediate_speed?:IValue, - positions_frame_unload_position?:IValue, - positions_upperplate_lower_position?:IValue, - positions_upperplate_lower_speed?:IValue, - positions_upperplate_upper_position?:IValue, - positions_upperplate_upper_speed?:IValue, - positions_upperplate_upperdeceleration_position?:IValue, - positions_upperplate_upperdeceleration_speed?:IValue, - positions_upperplate_lowerdeceleration_position?:IValue, - positions_upperplate_lowerdeceleration_speed?:IValue, - cycle_forming_type?:IValue, - cycle_forming_pause_cycle?:IValue, - cycle_forming_cooling_enabled?:IValue, - cycle_forming_blowingbox_enabled?:IValue, - cycle_acrylicframe_enabled?:IValue, - cycle_acrylicframe_time?:IValue, - cycle_upperoverheating_enabled?:IValue, - cycle_upperoverheating_time?:IValue, - cycle_crystallisation_type?:IValue, - cycle_crystallisation_enabled?:IValue, - cycle_crystallisation_time?:IValue, - cycle_loader_enable?:IValue, - cycle_loader_lifter_lowerposition_delay?:IValue, - cycle_loader_lifter_upperposition_delay?:IValue, - cycle_loader_split_sheet_time?:IValue, - cycle_loader_ejector_position?:IValue, - cycle_loader_pallet_height?:IValue - cycle_loader_center_x?:IValue, - cycle_loader_center_y?:IValue, - cycle_loader_checktichness_enabled?:IValue, - cycle_loader_suckers_vacuum?:IValue, - cycle_loader_ionizer_enabled?:IValue, - cycle_loader_manualunloading_enabled?:IValue, - heats_lowerheaters_max_time?:IValue, - heats_lowerheaters_movement_enabled?:IValue, - heats_lowerheaters_enabled?:IValue, - heats_lowerheaters_oscillation?:IValue, - heats_upperheaters_max_time?:IValue, - heats_upperheaters_movement_enabled?:IValue, - heats_upperheaters_enabled?:IValue, - heats_upperheaters_oscillation?:IValue, - heats_decomsustain_type?:IValue, - heats_decomsustain_decompression_flow?:IValue, - heats_decomsustain_min_blowing_time?:IValue, - heats_decomsustain_sustain_delay?:IValue, - heats_decomsustain_decompression_delay?:IValue, - heats_decomsustain_decompression_duration?:IValue, - heats_decomsustain_smoke_function_enabled?:IValue, - pyrometer_pyrometer_enabled?:IValue, - pyrometer_pyrometer_setpoint?:IValue, - pyrometer_pyrometer_delay?:IValue, - pyrometer_upperthermoregulator_start_adjustment?:IValue, - pyrometer_upperthermoregulator_end_adjustment?:IValue, - pyrometer_upperthermoregulator_min_percentage?:IValue, - pyrometer_upperthermoregulator_max_percentage?:IValue, - pyrometer_upperthermoregulator_sleep_enabled?:IValue, - pyrometer_upperthermoregulator_sleep_percentage?:IValue, - pyrometer_lowerthermoregulator_start_adjustment?:IValue, - pyrometer_lowerthermoregulator_end_adjustment?:IValue, - pyrometer_lowerthermoregulator_min_percentage?:IValue, - pyrometer_lowerthermoregulator_max_percentage?:IValue, - pyrometer_lowerthermoregulator_sleep_enabled?:IValue, - pyrometer_lowerthermoregulator_sleep_percentage?:IValue, - pyrometer_upperthermoregulator_sleep_temperature?:IValue, - pyrometer_upperthermoregulator_working_temperature?:IValue, - pyrometer_lowerthermoregulator_sleep_temperature?:IValue, - pyrometer_lowerthermoregulator_working_temperature?:IValue, - drawing_type?:IValue, - drawing_height?:IValue, - drawing_delay?:IValue, - drawing_1_chart_setpointx?:IValue, - drawing_1_chart_setpointy?:IValue, - drawing_photocell?:IValue, - drawing_mantaining_flow?:IValue, - drawing_manual?:IValue, - drawing_mould_up_delay?:IValue, - upperplate_cycle_type?:IValue, - upperplate_cycle_delay?:IValue, - upperplate_cycle_time?:IValue, - upperplate_air_enable?:IValue, - upperplate_air_delay?:IValue, - upperplate_air_max_time?:IValue, - upperplate_air_1_chart_setpointx?:IValue, - upperplate_air_1_chart_setpointy?:IValue, - upperplate_air_2_chart_setpointx?:IValue, - upperplate_air_2_chart_setpointy?:IValue, - upperplate_air_3_chart_setpointx?:IValue, - upperplate_air_3_chart_setpointy?:IValue, - upperplate_air_manual?:IValue, - upperplate_vacuum_enable?:IValue, - upperplate_vacuum_delay?:IValue, - upperplate_vacuum_max_time?:IValue, - upperplate_vacuum_1_chart_setpointx?:IValue, - upperplate_vacuum_1_chart_setpointy?:IValue, - upperplate_vacuum_2_chart_setpointx?:IValue, - upperplate_vacuum_2_chart_setpointy?:IValue, - upperplate_vacuum_3_chart_setpointx?:IValue, - upperplate_vacuum_3_chart_setpointy?:IValue, - upperplate_vacuum_manual?:IValue, - upperplate_extraction_enable?:IValue, - upperplate_extraction_delay?:IValue, - upperplate_extraction_1_chart_setpointx?:IValue, - upperplate_extraction_1_chart_setpointy?:IValue, - upperplate_extraction_manual?:IValue, - cooling_blowing_type?:IValue, - cooling_blowing_delay?:IValue, - cooling_blowing_time?:IValue, - cooling_pyrometer_enabled?:IValue, - cooling_pyrometer_setpoint?:IValue, - cooling_pyrometer_delay?:IValue, - cooling_nebulizer_type?:IValue, - cooling_nebulizer_delay?:IValue, - cooling_nebulizer_time?:IValue, - cooling_telescopic_enable?:IValue, - cooling_telescopic_position?:IValue, - cooling_telescopic_swing_enable?:IValue, - cooling_telescopic_swing_stroke?:IValue, - cooling_shutter_1_opening_perc?:IValue, - cooling_shutter_2_opening_perc?:IValue, - cooling_shutter_3_opening_perc?:IValue, - cooling_shutter_4_opening_perc?:IValue, - cooling_shutter_5_opening_perc?:IValue, - cooling_shutter_6_opening_perc?:IValue, - cooling_shutter_7_opening_perc?:IValue, - cooling_shutter_8_opening_perc?:IValue, - cooling_shutter_9_opening_perc?:IValue, - cooling_shutter_10_opening_perc?:IValue, - cooling_shutter_11_opening_perc?:IValue, - cooling_shutter_12_opening_perc?:IValue, - cooling_shutter_13_opening_perc?:IValue, - cooling_shutter_14_opening_perc?:IValue, - cooling_shutter_15_opening_perc?:IValue, - cooling_shutter_16_opening_perc?:IValue, - - vacuum_main_start?:IValue, - vacuum_main_delay?:IValue, - vacuum_main_max_time?:IValue, - vacuum_main_1_chart_setpointx?:IValue, - vacuum_main_1_chart_setpointy?:IValue, - vacuum_main_2_chart_setpointx?:IValue, - vacuum_main_2_chart_setpointy?:IValue, - vacuum_main_3_chart_setpointx?:IValue, - vacuum_main_3_chart_setpointy?:IValue, - vacuum_main_manual?:IValue, - vacuum_direct_enabled?:IValue, - vacuum_direct_delay?:IValue, - vacuum_direct_time?:IValue, - vacuum_aux_enabled?:IValue, - vacuum_aux_delay?:IValue, - vacuum_aux_max_time?:IValue, - vacuum_aux_1_chart_setpointx?:IValue, - vacuum_aux_1_chart_setpointy?:IValue, - vacuum_aux_2_chart_setpointx?:IValue, - vacuum_aux_2_chart_setpointy?:IValue, - vacuum_aux_3_chart_setpointx?:IValue, - vacuum_aux_3_chart_setpointy?:IValue, - vacuum_aux_manual?:IValue, - vacuum_pre_enabled?:IValue, - vacuum_pre_delay?:IValue, - vacuum_pre_max_time?:IValue, - vacuum_pre_1_chart_setpointx?:IValue, - vacuum_pre_1_chart_setpointy?:IValue, - vacuum_pre_2_chart_setpointx?:IValue, - vacuum_pre_2_chart_setpointy?:IValue, - vacuum_pre_3_chart_setpointx?:IValue, - vacuum_pre_3_chart_setpointy?:IValue, - - - extraction_main_type?:IValue, - extraction_main_mould_dw_delay?:IValue, - extraction_main_delay?:IValue, - extraction_main_1_chart_setpointx?:IValue, - extraction_main_1_chart_setpointy?:IValue, - extraction_main_manual?:IValue, - extraction_aux_enabled?:IValue, - extraction_aux_delay?:IValue, - extraction_aux_1_chart_setpointx?:IValue, - extraction_aux_1_chart_setpointy?:IValue, - extraction_aux_manual?:IValue, - - options_undercutmould_1_mode?:IValue, - options_undercutmould_1_position?:IValue, - options_undercutmould_1_delay_acti?:IValue, - options_undercutmould_1_delay_dis?:IValue, - options_undercutmould_2_mode?:IValue, - options_undercutmould_2_position?:IValue, - options_undercutmould_2_delay_acti?:IValue, - options_undercutmould_2_delay_dis?:IValue, - options_undercutmould_3_mode?:IValue, - options_undercutmould_3_position?:IValue, - options_undercutmould_3_delay_acti?:IValue, - options_undercutmould_3_delay_dis?:IValue, - options_undercutmould_4_mode?:IValue, - options_undercutmould_4_position?:IValue, - options_undercutmould_4_delay_acti?:IValue, - options_undercutmould_4_delay_dis?:IValue, - options_undercutmould_5_mode?:IValue, - options_undercutmould_5_position?:IValue, - options_undercutmould_5_delay_acti?:IValue, - options_undercutmould_5_delay_dis?:IValue, - options_undercutmould_6_mode?:IValue, - options_undercutmould_6_position?:IValue, - options_undercutmould_6_delay_acti?:IValue, - options_undercutmould_6_delay_dis?:IValue, - options_undercutmould_7_mode?:IValue, - options_undercutmould_7_position?:IValue, - options_undercutmould_7_delay_acti?:IValue, - options_undercutmould_7_delay_dis?:IValue, - options_undercutmould_8_mode?:IValue, - options_undercutmould_8_position?:IValue, - options_undercutmould_8_delay_acti?:IValue, - options_undercutmould_8_delay_dis?:IValue, - options_undercutmould_9_mode?:IValue, - options_undercutmould_9_position?:IValue, - options_undercutmould_9_delay_acti?:IValue, - options_undercutmould_9_delay_dis?:IValue, - options_undercutmould_10_mode?:IValue, - options_undercutmould_10_position?:IValue, - options_undercutmould_10_delay_acti?:IValue, - options_undercutmould_10_delay_dis?:IValue, - - options_undercutupperplate_1_mode?:IValue, - options_undercutupperplate_1_position?:IValue, - options_undercutupperplate_1_delay_acti?:IValue, - options_undercutupperplate_1_delay_dis?:IValue, - options_undercutupperplate_2_mode?:IValue, - options_undercutupperplate_2_position?:IValue, - options_undercutupperplate_2_delay_acti?:IValue, - options_undercutupperplate_2_delay_dis?:IValue, - options_undercutupperplate_3_mode?:IValue, - options_undercutupperplate_3_position?:IValue, - options_undercutupperplate_3_delay_acti?:IValue, - options_undercutupperplate_3_delay_dis?:IValue, - options_undercutupperplate_4_mode?:IValue, - options_undercutupperplate_4_position?:IValue, - options_undercutupperplate_4_delay_acti?:IValue, - options_undercutupperplate_4_delay_dis?:IValue, - options_undercutupperplate_5_mode?:IValue, - options_undercutupperplate_5_position?:IValue, - options_undercutupperplate_5_delay_acti?:IValue, - options_undercutupperplate_5_delay_dis?:IValue, - options_undercutupperplate_6_mode?:IValue, - options_undercutupperplate_6_position?:IValue, - options_undercutupperplate_6_delay_acti?:IValue, - options_undercutupperplate_6_delay_dis?:IValue, - options_undercutupperplate_7_mode?:IValue, - options_undercutupperplate_7_position?:IValue, - options_undercutupperplate_7_delay_acti?:IValue, - options_undercutupperplate_7_delay_dis?:IValue, - options_undercutupperplate_8_mode?:IValue, - options_undercutupperplate_8_position?:IValue, - options_undercutupperplate_8_delay_acti?:IValue, - options_undercutupperplate_8_delay_dis?:IValue, - options_undercutupperplate_9_mode?:IValue, - options_undercutupperplate_9_position?:IValue, - options_undercutupperplate_9_delay_acti?:IValue, - options_undercutupperplate_9_delay_dis?:IValue, - options_undercutupperplate_10_mode?:IValue, - options_undercutupperplate_10_position?:IValue, - options_undercutupperplate_10_delay_acti?:IValue, - options_undercutupperplate_10_delay_dis?:IValue, - - options_thermoregulator_1_enabled?:IValue, - options_thermoregulator_1_setpoint?:IValue, - options_thermoregulator_2_enabled?:IValue, - options_thermoregulator_2_setpoint?:IValue, - options_thermoregulator_3_enabled?:IValue, - options_thermoregulator_3_setpoint?:IValue, - options_thermoregulator_4_enabled?:IValue, - options_thermoregulator_4_setpoint?:IValue, - options_thermoregulator_5_enabled?:IValue, - options_thermoregulator_5_setpoint?:IValue, - options_thermoregulator_6_enabled?:IValue, - options_thermoregulator_6_setpoint?:IValue, - options_thermoregulator_7_enabled?:IValue, - options_thermoregulator_7_setpoint?:IValue, - options_thermoregulator_8_enabled?:IValue, - options_thermoregulator_8_setpoint?:IValue, - options_thermoregulator_9_enabled?:IValue, - options_thermoregulator_9_setpoint?:IValue, - options_thermoregulator_10_enabled?:IValue, - options_thermoregulator_10_setpoint?:IValue, + interface IRecipe { + general_sizes_mould_dim_x?: IValue, + general_sizes_mould_dim_y?: IValue, + general_sizes_mould_max_height?: IValue, + general_sizes_mould_min_height?: IValue, + general_sizes_mould_base_height?: IValue, + general_sizes_sheet_material?: IValue, + general_sizes_sheet_dim_x?: IValue, + general_sizes_sheet_dim_y?: IValue, + general_sizes_sheet_thickness?: IValue, + general_sizes_plate_type?: IValue, + general_sizes_plate_dim_x?: IValue, + general_sizes_plate_dim_y?: IValue, + general_sizes_frame_traverses?: IValue, + general_sizes_frame_dim_x?: IValue, + general_sizes_frame_dim_y?: IValue, + general_sizes_upperplate_max_height?: IValue, + general_area_working_dxsx?: IValue, + positions_mould_lower_position?: IValue, + positions_mould_lower_speed?: IValue, + positions_mould_intermediate_position?: IValue, + positions_mould_upper_position?: IValue, + positions_mould_upper_speed?: IValue, + positions_mould_upperdeceleration_position?: IValue, + positions_mould_upperdeceleration_speed?: IValue, + positions_mould_lowerdeceleration_speed?: IValue, + positions_mould_lowerdeceleration_position?: IValue, + positions_frame_lower_position?: IValue, + positions_frame_lower_speed?: IValue, + positions_frame_upper_speed?: IValue, + positions_frame_upper_position?: IValue, + positions_frame_intermediate_position?: IValue, + positions_frame_intermediate_speed?: IValue, + positions_frame_unload_position?: IValue, + positions_upperplate_lower_position?: IValue, + positions_upperplate_lower_speed?: IValue, + positions_upperplate_upper_position?: IValue, + positions_upperplate_upper_speed?: IValue, + positions_upperplate_upperdeceleration_position?: IValue, + positions_upperplate_upperdeceleration_speed?: IValue, + positions_upperplate_lowerdeceleration_position?: IValue, + positions_upperplate_lowerdeceleration_speed?: IValue, + cycle_forming_type?: IValue, + cycle_forming_pause_cycle?: IValue, + cycle_forming_cooling_enabled?: IValue, + cycle_forming_blowingbox_enabled?: IValue, + cycle_acrylicframe_enabled?: IValue, + cycle_acrylicframe_time?: IValue, + cycle_upperoverheating_enabled?: IValue, + cycle_upperoverheating_time?: IValue, + cycle_crystallisation_type?: IValue, + cycle_crystallisation_enabled?: IValue, + cycle_crystallisation_time?: IValue, + cycle_loader_enable?: IValue, + cycle_loader_lifter_lowerposition_delay?: IValue, + cycle_loader_lifter_upperposition_delay?: IValue, + cycle_loader_split_sheet_time?: IValue, + cycle_loader_ejector_position?: IValue, + cycle_loader_pallet_height?: IValue + cycle_loader_center_x?: IValue, + cycle_loader_center_y?: IValue, + cycle_loader_checktichness_enabled?: IValue, + cycle_loader_suckers_vacuum?: IValue, + cycle_loader_ionizer_enabled?: IValue, + cycle_loader_manualunloading_enabled?: IValue, + heats_lowerheaters_max_time?: IValue, + heats_lowerheaters_movement_enabled?: IValue, + heats_lowerheaters_enabled?: IValue, + heats_lowerheaters_oscillation?: IValue, + heats_upperheaters_max_time?: IValue, + heats_upperheaters_movement_enabled?: IValue, + heats_upperheaters_enabled?: IValue, + heats_upperheaters_oscillation?: IValue, + heats_decomsustain_type?: IValue, + heats_decomsustain_decompression_flow?: IValue, + heats_decomsustain_min_blowing_time?: IValue, + heats_decomsustain_sustain_delay?: IValue, + heats_decomsustain_decompression_delay?: IValue, + heats_decomsustain_decompression_duration?: IValue, + heats_decomsustain_smoke_function_enabled?: IValue, + pyrometer_pyrometer_enabled?: IValue, + pyrometer_pyrometer_setpoint?: IValue, + pyrometer_pyrometer_delay?: IValue, + pyrometer_upperthermoregulator_start_adjustment?: IValue, + pyrometer_upperthermoregulator_end_adjustment?: IValue, + pyrometer_upperthermoregulator_min_percentage?: IValue, + pyrometer_upperthermoregulator_max_percentage?: IValue, + pyrometer_upperthermoregulator_sleep_enabled?: IValue, + pyrometer_upperthermoregulator_sleep_percentage?: IValue, + pyrometer_lowerthermoregulator_start_adjustment?: IValue, + pyrometer_lowerthermoregulator_end_adjustment?: IValue, + pyrometer_lowerthermoregulator_min_percentage?: IValue, + pyrometer_lowerthermoregulator_max_percentage?: IValue, + pyrometer_lowerthermoregulator_sleep_enabled?: IValue, + pyrometer_lowerthermoregulator_sleep_percentage?: IValue, + pyrometer_upperthermoregulator_sleep_temperature?: IValue, + pyrometer_upperthermoregulator_working_temperature?: IValue, + pyrometer_lowerthermoregulator_sleep_temperature?: IValue, + pyrometer_lowerthermoregulator_working_temperature?: IValue, + drawing_type?: IValue, + drawing_height?: IValue, + drawing_delay?: IValue, + drawing_1_chart_setpointx?: IValue, + drawing_1_chart_setpointy?: IValue, + drawing_photocell?: IValue, + drawing_mantaining_flow?: IValue, + drawing_manual?: IValue, + drawing_mould_up_delay?: IValue, + upperplate_cycle_type?: IValue, + upperplate_cycle_delay?: IValue, + upperplate_cycle_time?: IValue, + upperplate_air_enable?: IValue, + upperplate_air_delay?: IValue, + upperplate_air_max_time?: IValue, + upperplate_air_1_chart_setpointx?: IValue, + upperplate_air_1_chart_setpointy?: IValue, + upperplate_air_2_chart_setpointx?: IValue, + upperplate_air_2_chart_setpointy?: IValue, + upperplate_air_3_chart_setpointx?: IValue, + upperplate_air_3_chart_setpointy?: IValue, + upperplate_air_manual?: IValue, + upperplate_vacuum_enable?: IValue, + upperplate_vacuum_delay?: IValue, + upperplate_vacuum_max_time?: IValue, + upperplate_vacuum_1_chart_setpointx?: IValue, + upperplate_vacuum_1_chart_setpointy?: IValue, + upperplate_vacuum_2_chart_setpointx?: IValue, + upperplate_vacuum_2_chart_setpointy?: IValue, + upperplate_vacuum_3_chart_setpointx?: IValue, + upperplate_vacuum_3_chart_setpointy?: IValue, + upperplate_vacuum_manual?: IValue, + upperplate_extraction_enable?: IValue, + upperplate_extraction_delay?: IValue, + upperplate_extraction_1_chart_setpointx?: IValue, + upperplate_extraction_1_chart_setpointy?: IValue, + upperplate_extraction_manual?: IValue, + cooling_blowing_type?: IValue, + cooling_blowing_delay?: IValue, + cooling_blowing_time?: IValue, + cooling_pyrometer_enabled?: IValue, + cooling_pyrometer_setpoint?: IValue, + cooling_pyrometer_delay?: IValue, + cooling_nebulizer_type?: IValue, + cooling_nebulizer_delay?: IValue, + cooling_nebulizer_time?: IValue, + cooling_telescopic_enable?: IValue, + cooling_telescopic_position?: IValue, + cooling_telescopic_swing_enable?: IValue, + cooling_telescopic_swing_stroke?: IValue, + cooling_shutter_1_opening_perc?: IValue, + cooling_shutter_2_opening_perc?: IValue, + cooling_shutter_3_opening_perc?: IValue, + cooling_shutter_4_opening_perc?: IValue, + cooling_shutter_5_opening_perc?: IValue, + cooling_shutter_6_opening_perc?: IValue, + cooling_shutter_7_opening_perc?: IValue, + cooling_shutter_8_opening_perc?: IValue, + cooling_shutter_9_opening_perc?: IValue, + cooling_shutter_10_opening_perc?: IValue, + cooling_shutter_11_opening_perc?: IValue, + cooling_shutter_12_opening_perc?: IValue, + cooling_shutter_13_opening_perc?: IValue, + cooling_shutter_14_opening_perc?: IValue, + cooling_shutter_15_opening_perc?: IValue, + cooling_shutter_16_opening_perc?: IValue, + vacuum_main_start?: IValue, + vacuum_main_delay?: IValue, + vacuum_main_max_time?: IValue, + vacuum_main_1_chart_setpointx?: IValue, + vacuum_main_1_chart_setpointy?: IValue, + vacuum_main_2_chart_setpointx?: IValue, + vacuum_main_2_chart_setpointy?: IValue, + vacuum_main_3_chart_setpointx?: IValue, + vacuum_main_3_chart_setpointy?: IValue, + vacuum_main_manual?: IValue, + vacuum_direct_enabled?: IValue, + vacuum_direct_delay?: IValue, + vacuum_direct_time?: IValue, + vacuum_aux_enabled?: IValue, + vacuum_aux_delay?: IValue, + vacuum_aux_max_time?: IValue, + vacuum_aux_1_chart_setpointx?: IValue, + vacuum_aux_1_chart_setpointy?: IValue, + vacuum_aux_2_chart_setpointx?: IValue, + vacuum_aux_2_chart_setpointy?: IValue, + vacuum_aux_3_chart_setpointx?: IValue, + vacuum_aux_3_chart_setpointy?: IValue, + vacuum_aux_manual?: IValue, + vacuum_pre_enabled?: IValue, + vacuum_pre_delay?: IValue, + vacuum_pre_max_time?: IValue, + vacuum_pre_1_chart_setpointx?: IValue, + vacuum_pre_1_chart_setpointy?: IValue, + vacuum_pre_2_chart_setpointx?: IValue, + vacuum_pre_2_chart_setpointy?: IValue, + vacuum_pre_3_chart_setpointx?: IValue, + vacuum_pre_3_chart_setpointy?: IValue, + extraction_main_type?: IValue, + extraction_main_mould_dw_delay?: IValue, + extraction_main_delay?: IValue, + extraction_main_1_chart_setpointx?: IValue, + extraction_main_1_chart_setpointy?: IValue, + extraction_main_manual?: IValue, + extraction_aux_enabled?: IValue, + extraction_aux_delay?: IValue, + extraction_aux_1_chart_setpointx?: IValue, + extraction_aux_1_chart_setpointy?: IValue, + extraction_aux_manual?: IValue, + options_undercutmould_1_mode?: IValue, + options_undercutmould_1_position?: IValue, + options_undercutmould_1_delay_acti?: IValue, + options_undercutmould_1_delay_dis?: IValue, + options_undercutmould_2_mode?: IValue, + options_undercutmould_2_position?: IValue, + options_undercutmould_2_delay_acti?: IValue, + options_undercutmould_2_delay_dis?: IValue, + options_undercutmould_3_mode?: IValue, + options_undercutmould_3_position?: IValue, + options_undercutmould_3_delay_acti?: IValue, + options_undercutmould_3_delay_dis?: IValue, + options_undercutmould_4_mode?: IValue, + options_undercutmould_4_position?: IValue, + options_undercutmould_4_delay_acti?: IValue, + options_undercutmould_4_delay_dis?: IValue, + options_undercutmould_5_mode?: IValue, + options_undercutmould_5_position?: IValue, + options_undercutmould_5_delay_acti?: IValue, + options_undercutmould_5_delay_dis?: IValue, + options_undercutmould_6_mode?: IValue, + options_undercutmould_6_position?: IValue, + options_undercutmould_6_delay_acti?: IValue, + options_undercutmould_6_delay_dis?: IValue, + options_undercutmould_7_mode?: IValue, + options_undercutmould_7_position?: IValue, + options_undercutmould_7_delay_acti?: IValue, + options_undercutmould_7_delay_dis?: IValue, + options_undercutmould_8_mode?: IValue, + options_undercutmould_8_position?: IValue, + options_undercutmould_8_delay_acti?: IValue, + options_undercutmould_8_delay_dis?: IValue, + options_undercutmould_9_mode?: IValue, + options_undercutmould_9_position?: IValue, + options_undercutmould_9_delay_acti?: IValue, + options_undercutmould_9_delay_dis?: IValue, + options_undercutmould_10_mode?: IValue, + options_undercutmould_10_position?: IValue, + options_undercutmould_10_delay_acti?: IValue, + options_undercutmould_10_delay_dis?: IValue, + options_undercutupperplate_1_mode?: IValue, + options_undercutupperplate_1_position?: IValue, + options_undercutupperplate_1_delay_acti?: IValue, + options_undercutupperplate_1_delay_dis?: IValue, + options_undercutupperplate_2_mode?: IValue, + options_undercutupperplate_2_position?: IValue, + options_undercutupperplate_2_delay_acti?: IValue, + options_undercutupperplate_2_delay_dis?: IValue, + options_undercutupperplate_3_mode?: IValue, + options_undercutupperplate_3_position?: IValue, + options_undercutupperplate_3_delay_acti?: IValue, + options_undercutupperplate_3_delay_dis?: IValue, + options_undercutupperplate_4_mode?: IValue, + options_undercutupperplate_4_position?: IValue, + options_undercutupperplate_4_delay_acti?: IValue, + options_undercutupperplate_4_delay_dis?: IValue, + options_undercutupperplate_5_mode?: IValue, + options_undercutupperplate_5_position?: IValue, + options_undercutupperplate_5_delay_acti?: IValue, + options_undercutupperplate_5_delay_dis?: IValue, + options_undercutupperplate_6_mode?: IValue, + options_undercutupperplate_6_position?: IValue, + options_undercutupperplate_6_delay_acti?: IValue, + options_undercutupperplate_6_delay_dis?: IValue, + options_undercutupperplate_7_mode?: IValue, + options_undercutupperplate_7_position?: IValue, + options_undercutupperplate_7_delay_acti?: IValue, + options_undercutupperplate_7_delay_dis?: IValue, + options_undercutupperplate_8_mode?: IValue, + options_undercutupperplate_8_position?: IValue, + options_undercutupperplate_8_delay_acti?: IValue, + options_undercutupperplate_8_delay_dis?: IValue, + options_undercutupperplate_9_mode?: IValue, + options_undercutupperplate_9_position?: IValue, + options_undercutupperplate_9_delay_acti?: IValue, + options_undercutupperplate_9_delay_dis?: IValue, + options_undercutupperplate_10_mode?: IValue, + options_undercutupperplate_10_position?: IValue, + options_undercutupperplate_10_delay_acti?: IValue, + options_undercutupperplate_10_delay_dis?: IValue, + options_thermoregulator_1_enabled?: IValue, + options_thermoregulator_1_setpoint?: IValue, + options_thermoregulator_2_enabled?: IValue, + options_thermoregulator_2_setpoint?: IValue, + options_thermoregulator_3_enabled?: IValue, + options_thermoregulator_3_setpoint?: IValue, + options_thermoregulator_4_enabled?: IValue, + options_thermoregulator_4_setpoint?: IValue, + options_thermoregulator_5_enabled?: IValue, + options_thermoregulator_5_setpoint?: IValue, + options_thermoregulator_6_enabled?: IValue, + options_thermoregulator_6_setpoint?: IValue, + options_thermoregulator_7_enabled?: IValue, + options_thermoregulator_7_setpoint?: IValue, + options_thermoregulator_8_enabled?: IValue, + options_thermoregulator_8_setpoint?: IValue, + options_thermoregulator_9_enabled?: IValue, + options_thermoregulator_9_setpoint?: IValue, + options_thermoregulator_10_enabled?: IValue, + options_thermoregulator_10_setpoint?: IValue, } } diff --git a/Thermo.Active/wwwroot/src/@types/warmers-channel.d.ts b/Thermo.Active/wwwroot/src/@types/warmers-channel.d.ts new file mode 100644 index 00000000..2317ced0 --- /dev/null +++ b/Thermo.Active/wwwroot/src/@types/warmers-channel.d.ts @@ -0,0 +1,16 @@ +declare module Warmers { + + interface IChannel { + idChannel: number, + idReflector: number, + setpointRecipe: number, + setpointTermocam: number, + setpointPLC: number, + setpointHMI: number, + channelStatus: number, + actualCurrent: number, + actualPerc: number, + maxPower: number + } + +} \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/@types/warmers-resistance.d.ts b/Thermo.Active/wwwroot/src/@types/warmers-resistance.d.ts new file mode 100644 index 00000000..92fd5656 --- /dev/null +++ b/Thermo.Active/wwwroot/src/@types/warmers-resistance.d.ts @@ -0,0 +1,13 @@ +declare module Warmers { + + interface IResistance { + id: number, + idChannel: number, + column: number, + row: number, + dimension: number + } + + + +} \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/App.ts b/Thermo.Active/wwwroot/src/App.ts index e965ca61..b64beb5e 100644 --- a/Thermo.Active/wwwroot/src/App.ts +++ b/Thermo.Active/wwwroot/src/App.ts @@ -12,7 +12,6 @@ import { store, appModelActions, machineStatusActions } from "@/store"; import { underTheHood } from "@/app_modules/under-the-hood"; import SwitchButton from "@/app_modules_thermo/components/paddle/switch-button.vue"; import Sidebar from "@/app_modules_thermo/components/paddle/sidebar.vue"; -import ToggleButton from "@/components/toggleButton.vue"; import Dashboard from "@/app_modules_thermo/dashboard/dashboard.vue"; import PreDashboard from "@/app_modules_thermo/preriscaldo-dashboard/preriscaldo-dashboard.vue"; @@ -38,7 +37,7 @@ declare var cmsClient; switchButton: SwitchButton, sidebar: Sidebar, dashboard: Dashboard, - predashboard:PreDashboard, + predashboard: PreDashboard, alarmList, underTheHood, } @@ -46,13 +45,13 @@ declare var cmsClient; export default class app extends Vue { $route: any; - $router:any; + $router: any; state = this.$store.state; applyBlur = false; showHeaderOnBlur = false; - applyBlurNc= false; + applyBlurNc = false; applyBlurInternal = false; showHMIinProduction = false; showPRODinProduction = false; @@ -163,11 +162,11 @@ export default class app extends Vue { return this.$store.state.isMainViewLiftedUp; } - get statusDashboard(){ + get statusDashboard() { return this.$store.state.isShowDashboard; } - get statusPreDashboard(){ + get statusPreDashboard() { return this.$store.state.isShowPreDashboard; } @@ -195,11 +194,11 @@ export default class app extends Vue { 700 ); if (this.showPRODinProduction && this.$route.path.includes("production")) - messageService.publishToChannel( - "PROD-production-show", - 700 - ); - + messageService.publishToChannel( + "PROD-production-show", + 700 + ); + } } @@ -247,7 +246,7 @@ export default class app extends Vue { messageService.publishToChannel(name); } - toogleDashboard(){ + toogleDashboard() { this.showDashboard = true; } diff --git a/Thermo.Active/wwwroot/src/App.vue b/Thermo.Active/wwwroot/src/App.vue index 80244b8d..b351df02 100644 --- a/Thermo.Active/wwwroot/src/App.vue +++ b/Thermo.Active/wwwroot/src/App.vue @@ -1,42 +1,67 @@ diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/components/KeyboardHelper.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/components/KeyboardHelper.ts new file mode 100644 index 00000000..07dfb50a --- /dev/null +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/components/KeyboardHelper.ts @@ -0,0 +1,25 @@ +export class KeyboardHelper { + + static currentKeyboard: any = null; + static setCurrentKeyboard(element) { + KeyboardHelper.currentKeyboard = element; + } + + static showKeyboard(x, y, value: Recipe.IValue) { + + if (KeyboardHelper.currentKeyboard) { + KeyboardHelper.currentKeyboard.resetTo(value); + KeyboardHelper.currentKeyboard.positionX = x; + debugger + KeyboardHelper.currentKeyboard.positionY = y; + KeyboardHelper.currentKeyboard.visible = true; + } + } + + static hideKeyboard() { + if (KeyboardHelper.currentKeyboard) { + KeyboardHelper.currentKeyboard.visible = false; + KeyboardHelper.currentKeyboard.resetTo(null); + } + } +} \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/components/index.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/components/index.ts index f2385f8f..6e9dffd6 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/components/index.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/components/index.ts @@ -1,9 +1,10 @@ import numeric from "./numeric.vue"; -import keyboard from "./tastierino.vue"; import slider from "./slider.vue"; +import Vue from "vue"; +import keyboard from "./keyboard.vue"; export default { numeric, - keyboard, - slider + slider, + keyboard } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/components/keyboard.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/components/keyboard.ts new file mode 100644 index 00000000..8f375810 --- /dev/null +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/components/keyboard.ts @@ -0,0 +1,63 @@ +import Vue from 'vue'; +import { Prop } from 'vue-property-decorator'; +import Component from 'vue-class-component'; +import { KeyboardHelper } from './KeyboardHelper'; + +@Component({}) +export default class Keyboard extends Vue { + + positionX: number = 0; + positionY: number = 0; + + visible: boolean = false; + + actualValue: Recipe.IValue; + + point: string; + + @Prop() + value: string; + + del() { + this.actualValue.valueAct = 0; + } + + canc() { + let temp = String(this.actualValue.valueAct); + this.actualValue.valueAct = Number(temp.slice(0, -1)) + } + + add(num: string) { + if (this.point) { + this.point += num; + this.actualValue.valueAct = Number(this.point) + } else { + let temp = String(this.actualValue.valueAct); + temp += num; + this.actualValue.valueAct = Number(temp) + } + } + + addpoint() { + if (!this.point) { + this.point = String(this.actualValue.valueAct); + this.point += "."; + } + } + + resetTo(value) { + this.actualValue = null; + this.point = null; + + this.actualValue = value; + } + + hide() { + KeyboardHelper.hideKeyboard(); + } + + mounted() { + KeyboardHelper.setCurrentKeyboard(this); + } +} + diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/components/tastierino.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/components/keyboard.vue similarity index 85% rename from Thermo.Active/wwwroot/src/app_modules_thermo/components/tastierino.vue rename to Thermo.Active/wwwroot/src/app_modules_thermo/components/keyboard.vue index b7813184..c0f23a0b 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/components/tastierino.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/components/keyboard.vue @@ -1,5 +1,5 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/components/numeric.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/components/numeric.ts index 523fcd3a..71198c9a 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/components/numeric.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/components/numeric.ts @@ -1,6 +1,7 @@ import Vue from "vue"; import Component from "vue-class-component"; import { Prop } from "vue-property-decorator"; +import { KeyboardHelper } from "./KeyboardHelper"; @Component({}) export default class Numeric extends Vue { @@ -20,4 +21,29 @@ export default class Numeric extends Vue { @Prop() unitOfMeasure: string; + @Prop({ default: 'right' }) + keyboardPosition: string; + + onFocus() { + let rect = this.$el.getBoundingClientRect(); + + const keyboardsize = 262; + let x = rect.x + rect.width / 2 - keyboardsize / 2; + let y = rect.y + rect.height / 2 - keyboardsize / 2; + + + switch (this.keyboardPosition) { + case "top": y = y - rect.height - keyboardsize / 2; break; + case "bottom": y = y + rect.height + keyboardsize / 2; break; + case "left": x = x - rect.width - keyboardsize / 2; break; + case "right": x = x + rect.width + keyboardsize / 2; break; + } + + KeyboardHelper.showKeyboard(x, y, this.value); + } + + onBlur() { + // KeyboardHelper.hideKeyboard(); + } + } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/components/numeric.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/components/numeric.vue index 66d09cfa..4ded4fce 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/components/numeric.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/components/numeric.vue @@ -1,6 +1,6 @@ diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/sidebar.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/sidebar.ts index 6c776934..26203a53 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/sidebar.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/sidebar.ts @@ -1,19 +1,18 @@ import Vue from "vue"; import Component from "vue-class-component"; -import {paddleActions} from '@/store/paddle.store'; -import ToggleButton from "@/components/toggleButton.vue"; +import { paddleActions } from '@/store/paddle.store'; -@Component({name: 'sidebar',components: { toggleButton:ToggleButton } }) -export default class Sidebar extends Vue{ +@Component({ name: 'sidebar' }) +export default class Sidebar extends Vue { - azione1:boolean=false; - azione2:boolean=false; + azione1: boolean = false; + azione2: boolean = false; - isPanelOpen(){ - return this.$store.state.paddle.isNavOpen; - } + isPanelOpen() { + return this.$store.state.paddle.isNavOpen; + } - closeSidebarPanel() { - paddleActions.Toggle(this.$store); - } + closeSidebarPanel() { + paddleActions.Toggle(this.$store); + } } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/components/scheda.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/components/scheda.ts index 482f3352..4eb274f3 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/components/scheda.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/components/scheda.ts @@ -11,5 +11,4 @@ export default class Scheda extends Vue{ @Prop({}) durata:Recipe.IValue; - } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/components/scheda.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/components/scheda.vue index 7c6e02ae..134edef9 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/components/scheda.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/components/scheda.vue @@ -3,14 +3,14 @@
- +
- +
- - + +
- +
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/components/slider.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/components/slider.ts index b8c60332..a2bcdbd0 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/components/slider.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/components/slider.ts @@ -5,17 +5,10 @@ import { Prop } from 'vue-property-decorator'; @Component({ name: "slider" }) export default class Slider extends Vue { - @Prop({ default: "" }) - unitOfMeasure: string; @Prop() - value: number; + value: Recipe.IValue; - @Prop() - min: number; - - @Prop() - max: number; @Prop({ default: 9 }) lines: number; @@ -23,52 +16,41 @@ export default class Slider extends Vue { @Prop({ default: 1 }) decimal: number; - get minLabel() { - return `${this.min} ${this.unitOfMeasure}`; - } - - get averageLabel() { - return `${(this.max - this.min) / 2} ${this.unitOfMeasure}`; - } - - get maxLabel() { - return `${this.max} ${this.unitOfMeasure}`; - } get actualvalue() { - return this.value; + return this.value.valueAct; } set actualvalue(v: number) { - this.$emit('input', v); + this.value.valueAct = v; } get step() { - var s = ((this.max - this.min) / (this.lines + 1)); + var s = ((this.value.range.max - this.value.range.min) / (this.lines + 1)); var m = Math.pow(10, this.decimal); return Math.round(s * m) / m }; increment() { - var v = this.value; - if (v < this.max) { + var v = this.value.valueAct; + if (v < this.value.range.max) { v -= (-this.step); } - if (v > this.max) { - v = this.max; + if (v > this.value.range.max) { + v = this.value.range.max; } - this.$emit('input', v); + this.actualvalue = v; }; decrement() { - var v = this.value; - if (v > this.min) { + var v = this.value.valueAct; + if (v > this.value.range.min) { v -= this.step; } - if (v < this.min) { - v = this.min; + if (v < this.value.range.min) { + v = this.value.range.min; } - this.$emit('input', v); + this.actualvalue = v; }; diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/components/slider.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/components/slider.vue index 8f487e51..48eae723 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/components/slider.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/components/slider.vue @@ -4,14 +4,19 @@
- +
- {{minLabel}} - {{averageLabel}} - {{maxLabel}} + {{`${this.value.range.min} ${this.value.unitMeasure}`}} + {{`${(this.value.range.max - this.value.range.min) / 2} ${this.value.unitMeasure}`}} + {{`${this.value.range.max} ${this.value.unitMeasure}`}}
- + 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 c1aed2e7..e776b49e 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 @@ -24,7 +24,7 @@ >

-
+
-
-
-
- - + +
+
+
+
+ + +
+ +
- -
+
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/controstampo_setup/components/base-components/ciclo-controstampo.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/controstampo_setup/components/base-components/ciclo-controstampo.ts index add306a5..9290a066 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/controstampo_setup/components/base-components/ciclo-controstampo.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/controstampo_setup/components/base-components/ciclo-controstampo.ts @@ -1,21 +1,17 @@ import Vue from 'vue'; import Component from 'vue-class-component'; -import {Prop} from 'vue-property-decorator'; +import { Prop } from 'vue-property-decorator'; import Slider from "@/app_modules_thermo/components/slider.vue"; -import ToggleButton from "@/components/toggleButton.vue"; @Component({ - name:"ciclocontrostampo", - components: { - slider:Slider, - ToggleButton + name: "ciclocontrostampo", + components: { + slider: Slider } }) export default class CicloControstampo extends Vue { @Prop() - recipe:Recipe.IRecipe; - - abilit:boolean=false; + recipe: Recipe.IRecipe; } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/controstampo_setup/components/base-components/ciclo-controstampo.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/controstampo_setup/components/base-components/ciclo-controstampo.vue index 06711819..5a6d993d 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/controstampo_setup/components/base-components/ciclo-controstampo.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/controstampo_setup/components/base-components/ciclo-controstampo.vue @@ -1,38 +1,26 @@ diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/controstampo_setup/components/base-components/estrazione-controstampo.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/controstampo_setup/components/base-components/estrazione-controstampo.ts new file mode 100644 index 00000000..99cfaaa4 --- /dev/null +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/controstampo_setup/components/base-components/estrazione-controstampo.ts @@ -0,0 +1,13 @@ +import Vue from 'vue'; +import Component from 'vue-class-component'; +import { Prop } from 'vue-property-decorator'; +import Slider from "@/app_modules_thermo/components/slider.vue"; +import Scheda from "@/app_modules_thermo/components/scheda.vue"; + +@Component({ name: "estrazionecontrostampo", components: { scheda: Scheda, slider: Slider } }) +export default class EstrazioneControstampo extends Vue { + + @Prop() + recipe: Recipe.IRecipe; + +} \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/controstampo_setup/components/base-components/estrazione-controstampo.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/controstampo_setup/components/base-components/estrazione-controstampo.vue new file mode 100644 index 00000000..cceab82c --- /dev/null +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/controstampo_setup/components/base-components/estrazione-controstampo.vue @@ -0,0 +1,35 @@ + + + \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/controstampo_setup/components/base-components/vuoto-controstampo.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/controstampo_setup/components/base-components/vuoto-controstampo.ts new file mode 100644 index 00000000..a79b96f1 --- /dev/null +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/controstampo_setup/components/base-components/vuoto-controstampo.ts @@ -0,0 +1,13 @@ +import Vue from 'vue'; +import Component from 'vue-class-component'; +import { Prop } from 'vue-property-decorator'; +import Slider from "@/app_modules_thermo/components/slider.vue"; +import Scheda from "@/app_modules_thermo/components/scheda.vue"; + +@Component({ name: "vuotocontrostampo", components: { scheda: Scheda, slider: Slider } }) +export default class VuotoControstampo extends Vue { + + @Prop() + recipe: Recipe.IRecipe; + +} \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/controstampo_setup/components/base-components/vuoto-controstampo.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/controstampo_setup/components/base-components/vuoto-controstampo.vue new file mode 100644 index 00000000..eef51a2b --- /dev/null +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/controstampo_setup/components/base-components/vuoto-controstampo.vue @@ -0,0 +1,56 @@ + + + \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/controstampo_setup/components/show-controstampo-info.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/controstampo_setup/components/show-controstampo-info.ts index 023d96f7..368eb5c7 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/controstampo_setup/components/show-controstampo-info.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/controstampo_setup/components/show-controstampo-info.ts @@ -6,11 +6,13 @@ import { Modal, ModalHelper } from "@/components/modals"; import StepFooter from "@/app_modules_thermo/setup/components/step-footer.vue"; import CicloControstampo from "./base-components/ciclo-controstampo.vue"; import AriaControstampo from "./base-components/aria-controstampo.vue"; +import VuotoControstampo from "./base-components/vuoto-controstampo.vue"; +import EstrazioneControstampo from "./base-components/estrazione-controstampo.vue"; import { recipeActions } from "@/store/recipe.store"; import { store } from "@/store"; import { Deferred } from '@/services'; -@Component({ components: { modal: Modal, stepfooter: StepFooter, ciclocontrostampo: CicloControstampo, ariacontrostampo: AriaControstampo } }) +@Component({ components: { modal: Modal, stepfooter: StepFooter, ciclocontrostampo: CicloControstampo, ariacontrostampo: AriaControstampo, vuotocontrostampo: VuotoControstampo, estrazionecontrostampo: EstrazioneControstampo } }) export default class ShowControstampoInfo extends Vue { recipe: Recipe.IRecipe = this.$store.getters.getCurrent(); @@ -19,17 +21,23 @@ export default class ShowControstampoInfo extends Vue { @Prop() deferred: Deferred; - annulla(name: string) { + annulla() { ModalHelper.HideModal(); this.deferred.resolve(-1); }; - conferma(name: string) { + conferma() { recipeActions.setCurrent(store, this.recipe); ModalHelper.HideModal(); this.deferred.resolve(1); }; + goTo(step) { + recipeActions.setCurrent(store, this.recipe); + ModalHelper.HideModal(); + this.deferred.resolve(step); + } + async beforeMount() { // this.contactInfo = await awaiter(new machineService().getContactConfiguration()); messageService.subscribeToChannel("esc_pressed", args => { diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/controstampo_setup/components/show-controstampo-info.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/controstampo_setup/components/show-controstampo-info.vue index 1de1ceed..8c013a88 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/controstampo_setup/components/show-controstampo-info.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/controstampo_setup/components/show-controstampo-info.vue @@ -14,12 +14,14 @@ + +
- + diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/estrazione/components/base-components/estrazione-principale.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/estrazione/components/base-components/estrazione-principale.vue index 1dc72aec..c201652e 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/estrazione/components/base-components/estrazione-principale.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/estrazione/components/base-components/estrazione-principale.vue @@ -1,33 +1,39 @@ diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/estrazione/components/base-components/estrazione-secondaria.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/estrazione/components/base-components/estrazione-secondaria.ts new file mode 100644 index 00000000..c80a589b --- /dev/null +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/estrazione/components/base-components/estrazione-secondaria.ts @@ -0,0 +1,18 @@ +import Vue from 'vue'; +import Component from 'vue-class-component'; +import {Prop} from 'vue-property-decorator'; +import Scheda from "@/app_modules_thermo/components/scheda.vue"; +import Slider from "@/app_modules_thermo/components/slider.vue" + +@Component({name:"estrsecondaria", +components:{ +scheda:Scheda, +slider:Slider +}}) + +export default class EstrazioneSecondaria extends Vue{ + + @Prop() + recipe:Recipe.IRecipe; + +} \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/estrazione/components/base-components/estrazione-secondaria.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/estrazione/components/base-components/estrazione-secondaria.vue new file mode 100644 index 00000000..36a6915c --- /dev/null +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/estrazione/components/base-components/estrazione-secondaria.vue @@ -0,0 +1,35 @@ + + + \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/estrazione/components/show-estrazione-info.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/estrazione/components/show-estrazione-info.ts index 73de9f51..741b6879 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/estrazione/components/show-estrazione-info.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/estrazione/components/show-estrazione-info.ts @@ -5,6 +5,7 @@ import { Factory, messageService, awaiter } from "@/_base"; import { Modal, ModalHelper } from "@/components/modals"; import StepFooter from "@/app_modules_thermo/setup/components/step-footer.vue"; import EstrazionePrincipale from "./base-components/estrazione-principale.vue"; +import EstrazioneSecondaria from "./base-components/estrazione-secondaria.vue"; import { recipeActions } from "@/store/recipe.store"; import { store } from "@/store"; import { Deferred } from '@/services'; @@ -13,7 +14,8 @@ import { Deferred } from '@/services'; { modal: Modal, stepfooter: StepFooter, - estrprincipale: EstrazionePrincipale + estrprincipale: EstrazionePrincipale, + estrsecondaria: EstrazioneSecondaria } }) export default class ShowEstrazioneInfo extends Vue { @@ -35,6 +37,12 @@ export default class ShowEstrazioneInfo extends Vue { this.deferred.resolve(1); }; + goTo(step) { + recipeActions.setCurrent(store, this.recipe); + ModalHelper.HideModal(); + this.deferred.resolve(step); + } + async beforeMount() { // this.contactInfo = await awaiter(new machineService().getContactConfiguration()); messageService.subscribeToChannel("esc_pressed", args => { diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/estrazione/components/show-estrazione-info.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/estrazione/components/show-estrazione-info.vue index 864ca21a..b058c242 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/estrazione/components/show-estrazione-info.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/estrazione/components/show-estrazione-info.vue @@ -17,12 +17,13 @@ +
- + diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/SVG_Components/controstampoSVG.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/SVG_Components/controstampoSVG.vue index 1a90a364..36868f28 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/SVG_Components/controstampoSVG.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/SVG_Components/controstampoSVG.vue @@ -1,7 +1,19 @@ - + \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/SVG_Components/corniceSVG.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/SVG_Components/corniceSVG.vue index 8e1dd014..1e4ce3cf 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/SVG_Components/corniceSVG.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/SVG_Components/corniceSVG.vue @@ -1,7 +1,30 @@ - + \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/SVG_Components/lastraSVG.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/SVG_Components/lastraSVG.vue index 2e72ae92..5b9af153 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/SVG_Components/lastraSVG.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/SVG_Components/lastraSVG.vue @@ -1,7 +1,41 @@ - + \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/SVG_Components/piastraSVG.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/SVG_Components/piastraSVG.vue index be3f6fa1..51b04e45 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/SVG_Components/piastraSVG.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/SVG_Components/piastraSVG.vue @@ -1,7 +1,30 @@ - + \ No newline at end of file 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 b850b601..d6654fe0 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 @@ -1,7 +1,63 @@ - + \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/controstampo.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/controstampo.ts index 97f0433c..93276a2a 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/controstampo.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/controstampo.ts @@ -3,11 +3,9 @@ import Component from "vue-class-component"; import { Prop } from 'vue-property-decorator'; import Slider from "@/app_modules_thermo/components/slider.vue" -@Component({name:"controstampo", components:{slider:Slider}}) +@Component({ name: "controstampo", components: { slider: Slider } }) export default class Controstampo extends Vue { - @Prop({}) - alt:Recipe.IValue; - - + @Prop() + recipe: Recipe.IRecipe; } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/controstampo.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/controstampo.vue index 6e609061..e3bcc095 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/controstampo.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/controstampo.vue @@ -1,21 +1,17 @@ + \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/cornice.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/cornice.ts index f71d6b3a..fcdaef29 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/cornice.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/cornice.ts @@ -3,17 +3,14 @@ import Component from "vue-class-component"; import { Prop } from 'vue-property-decorator'; import Slider from "@/app_modules_thermo/components/slider.vue" -@Component({name:"cornice", components:{slider:Slider}}) +@Component({ name: "cornice", components: { slider: Slider } }) export default class Cornice extends Vue { - @Prop({}) - x:Recipe.IValue; - @Prop({}) - y:Recipe.IValue; - @Prop({default:false}) - notsel:boolean; - + @Prop() + recipe: Recipe.IRecipe; + + } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/cornice.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/cornice.vue index 9353aa37..81b9a905 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/cornice.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/cornice.vue @@ -5,34 +5,24 @@
- - +

- - + +
- +
- - + +
- +
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/lastra.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/lastra.ts index b038d57a..1205c86f 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/lastra.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/lastra.ts @@ -6,10 +6,7 @@ import Slider from "@/app_modules_thermo/components/slider.vue" @Component({ name: "lastra" }) export default class Lastra extends Vue { - @Prop({}) - x: Recipe.IValue; - @Prop({}) - y: Recipe.IValue; - @Prop({}) - spes: Recipe.IValue; + + @Prop() + recipe: Recipe.IRecipe; } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/lastra.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/lastra.vue index c5220565..9bae46fe 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/lastra.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/lastra.vue @@ -1,48 +1,31 @@ diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/piastra_riduzione.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/piastra_riduzione.ts index cdcc994f..f8eb1bf5 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/piastra_riduzione.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/piastra_riduzione.ts @@ -3,16 +3,8 @@ import Component from "vue-class-component"; import { Prop } from 'vue-property-decorator'; import Slider from "@/app_modules_thermo/components/slider.vue" -@Component({name:"piastra", components:{slider:Slider}}) +@Component({ name: "piastra", components: { slider: Slider } }) export default class Piastra extends Vue { - - @Prop({}) - x:Recipe.IValue; - @Prop({}) - y:Recipe.IValue; - @Prop({default:true}) - notsel:boolean; - - - + @Prop() + recipe: Recipe.IRecipe; } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/piastra_riduzione.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/piastra_riduzione.vue index b8ae1772..91cfaed2 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/piastra_riduzione.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/piastra_riduzione.vue @@ -1,39 +1,29 @@ diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/show-formato-info.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/show-formato-info.ts index 4f79891e..bcb5eecb 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/show-formato-info.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/show-formato-info.ts @@ -18,6 +18,7 @@ import StepFooter from "@/app_modules_thermo/setup/components/step-footer.vue"; import { recipeActions } from "@/store/recipe.store"; import { store } from "@/store"; import { Deferred } from "@/services"; +import { recipeService } from "@/services/recipeService"; @Component({ components: { @@ -53,16 +54,34 @@ export default class ShowFormatoInfo extends Vue { this.deferred.resolve(-1); }; - conferma() { + async conferma() { recipeActions.setCurrent(store, this.recipe); - - - - + await recipeService.Update( + { + general_sizes_mould_dim_x: this.recipe.general_sizes_mould_dim_x, + general_sizes_mould_dim_y: this.recipe.general_sizes_mould_dim_y, + general_sizes_mould_base_height: this.recipe.general_sizes_mould_base_height, + general_sizes_sheet_dim_x: this.recipe.general_sizes_sheet_dim_x, + general_sizes_sheet_dim_y: this.recipe.general_sizes_sheet_dim_y, + general_sizes_sheet_thickness: this.recipe.general_sizes_sheet_thickness, + general_sizes_plate_dim_x: this.recipe.general_sizes_plate_dim_x, + general_sizes_plate_dim_y: this.recipe.general_sizes_plate_dim_y, + general_sizes_frame_dim_x: this.recipe.general_sizes_frame_dim_x, + general_sizes_frame_dim_y: this.recipe.general_sizes_frame_dim_y, + general_sizes_upperplate_max_height: this.recipe.general_sizes_upperplate_max_height, + } + ); + await recipeService.Confirm(); ModalHelper.HideModal(); this.deferred.resolve(1); }; + goTo(step) { + recipeActions.setCurrent(store, this.recipe); + ModalHelper.HideModal(); + this.deferred.resolve(step); + } + async beforeMount() { // this.contactInfo = await awaiter(new machineService().getContactConfiguration()); messageService.subscribeToChannel("esc_pressed", args => { diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/show-formato-info.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/show-formato-info.vue index ccae9ac6..ddf2d220 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/show-formato-info.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/show-formato-info.vue @@ -8,58 +8,26 @@
-
+
- - - - - + + + + +
-
+
- + diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/stampo.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/stampo.ts index d49d2915..3c64282f 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/stampo.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/stampo.ts @@ -7,14 +7,6 @@ import Slider from "@/app_modules_thermo/components/slider.vue" export default class Stampo extends Vue { @Prop() - x: Recipe.IValue; - @Prop() - y: Recipe.IValue; - @Prop() - alt: number; - @Prop() - altB: Recipe.IValue; - @Prop() - stamponeg: number; + recipe: Recipe.IRecipe; } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/stampo.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/stampo.vue index 827e1677..3752e9c3 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/stampo.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/stampo.vue @@ -1,34 +1,37 @@ diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/imbutitura/show-imbutitura-info.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/imbutitura/show-imbutitura-info.ts index c00cce64..e1945126 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/imbutitura/show-imbutitura-info.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/imbutitura/show-imbutitura-info.ts @@ -36,6 +36,12 @@ export default class ShowImbutituraInfo extends Vue { this.deferred.resolve(1); }; + goTo(step) { + recipeActions.setCurrent(store, this.recipe); + ModalHelper.HideModal(); + this.deferred.resolve(step); + } + async beforeMount() { // this.contactInfo = await awaiter(new machineService().getContactConfiguration()); messageService.subscribeToChannel("esc_pressed", args => { diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/imbutitura/show-imbutitura-info.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/imbutitura/show-imbutitura-info.vue index a0668568..136e8d96 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/imbutitura/show-imbutitura-info.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/imbutitura/show-imbutitura-info.vue @@ -8,63 +8,54 @@

-
- -
+
+ +
- + diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/opzioni/components/base-components/inputSottosquadra.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/opzioni/components/base-components/inputSottosquadra.ts index df07e7af..7a2253c2 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/opzioni/components/base-components/inputSottosquadra.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/opzioni/components/base-components/inputSottosquadra.ts @@ -6,16 +6,14 @@ import Slider from "@/app_modules_thermo/components/slider.vue"; @Component({name:"input-sottosquadra", components:{slider:Slider}}) export default class inputSottosquadra extends Vue{ - + + @Prop() + modalita:Recipe.IValue; @Prop() quota:Recipe.IValue; @Prop() ritardoAtt:Recipe.IValue; @Prop() ritardoDisatt:Recipe.IValue; - - @Prop({default:""}) - unitMeasure:string; - } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/opzioni/components/base-components/inputSottosquadra.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/opzioni/components/base-components/inputSottosquadra.vue index b39715dc..e36acd3a 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/opzioni/components/base-components/inputSottosquadra.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/opzioni/components/base-components/inputSottosquadra.vue @@ -1,42 +1,27 @@ \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/opzioni/components/sottosquadra-stampo.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/opzioni/components/sottosquadra-stampo.vue index 231ba3e8..e97e0fb1 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/opzioni/components/sottosquadra-stampo.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/opzioni/components/sottosquadra-stampo.vue @@ -5,52 +5,102 @@ + + + + +
@@ -58,44 +108,94 @@
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/opzioni/components/termoregolatori.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/opzioni/components/termoregolatori.vue index 21a0691a..461ede7ee 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/opzioni/components/termoregolatori.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/opzioni/components/termoregolatori.vue @@ -1,152 +1,163 @@ \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/opzioni/show-opzioni-info.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/opzioni/show-opzioni-info.ts index f1ef11cf..6b991942 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/opzioni/show-opzioni-info.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/opzioni/show-opzioni-info.ts @@ -4,6 +4,7 @@ import { Factory, messageService, awaiter } from "@/_base"; import Component from "vue-class-component"; import StepFooter from "@/app_modules_thermo/setup/components/step-footer.vue"; import SottosquadraStampo from "./components/sottosquadra-stampo.vue"; +import SottosquadraControstampo from "./components/sottosquadra-controstampo.vue"; import Termoregolatori from "./components/termoregolatori.vue"; import { recipeActions } from "@/store/recipe.store"; import { store } from "@/store"; @@ -14,6 +15,7 @@ import { Deferred } from "@/services"; components: { modal: Modal, sottosquadrastampo: SottosquadraStampo, + sottosquadracontrostampo: SottosquadraControstampo, termoregolatori: Termoregolatori, stepfooter: StepFooter } @@ -37,6 +39,12 @@ export default class ShowOpzioniInfo extends Vue { this.deferred.resolve(1); }; + goTo(step) { + recipeActions.setCurrent(store, this.recipe); + ModalHelper.HideModal(); + this.deferred.resolve(step); + } + async beforeMount() { // this.contactInfo = await awaiter(new machineService().getContactConfiguration()); messageService.subscribeToChannel("esc_pressed", args => { diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/opzioni/show-opzioni-info.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/opzioni/show-opzioni-info.vue index 18c8656f..e64c63bd 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/opzioni/show-opzioni-info.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/opzioni/show-opzioni-info.vue @@ -16,6 +16,7 @@ >Sottosquadra controstampo
+ @@ -24,7 +25,7 @@ - + diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/base-components/SVG_Components/SVG-termo-inferiore.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/base-components/SVG_Components/SVG-termo-inferiore.ts new file mode 100644 index 00000000..4669b266 --- /dev/null +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/base-components/SVG_Components/SVG-termo-inferiore.ts @@ -0,0 +1,11 @@ +import Vue from 'vue'; +import Component from 'vue-class-component'; +import { Prop } from 'vue-property-decorator'; + +@Component({ name: 'svgtermoinferiore' }) +export default class SVGTermoregolazioneInferiore extends Vue { + + @Prop() + recipe: Recipe.IRecipe; + +} \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/base-components/SVG_Components/SVG-termo-inferiore.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/base-components/SVG_Components/SVG-termo-inferiore.vue new file mode 100644 index 00000000..4e2a02fe --- /dev/null +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/base-components/SVG_Components/SVG-termo-inferiore.vue @@ -0,0 +1,60 @@ + + + \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/base-components/SVG_Components/SVG-termo-superiore.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/base-components/SVG_Components/SVG-termo-superiore.ts index b6c3eba0..a3b49447 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/base-components/SVG_Components/SVG-termo-superiore.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/base-components/SVG_Components/SVG-termo-superiore.ts @@ -5,16 +5,7 @@ import { Prop } from 'vue-property-decorator'; @Component({ name: 'svgtermosuperiore' }) export default class SVGTermoregolazioneSuperiore extends Vue { - - @Prop({}) - max: Recipe.IValue; - @Prop({}) - min: Recipe.IValue; - @Prop({}) - inizio: Recipe.IValue; - @Prop({}) - fine: Recipe.IValue; - @Prop({}) - perc_riposo: Recipe.IValue; + @Prop() + recipe: Recipe.IRecipe; } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/base-components/SVG_Components/SVG-termo-superiore.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/base-components/SVG_Components/SVG-termo-superiore.vue index cac76a88..729f6cff 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/base-components/SVG_Components/SVG-termo-superiore.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/base-components/SVG_Components/SVG-termo-superiore.vue @@ -1,7 +1,60 @@ - + \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/base-components/pirometro.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/base-components/pirometro.ts index d23ca79a..7c5d895d 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/base-components/pirometro.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/base-components/pirometro.ts @@ -1,14 +1,12 @@ import Vue from 'vue'; import Component from 'vue-class-component'; -import {Prop} from 'vue-property-decorator'; +import { Prop } from 'vue-property-decorator'; import Slider from "@/app_modules_thermo/components/slider.vue"; -import ToggleButton from "@/components/toggleButton.vue"; -// import Recipe from "@/@types/recipe-current"; -@Component({name:"pirometro", components: { slider:Slider, ToggleButton}}) -export default class Pirometro extends Vue{ - - @Prop() - recipe:Recipe.IRecipe; +@Component({ name: "pirometro", components: { slider: Slider } }) +export default class Pirometro extends Vue { + + @Prop() + recipe: Recipe.IRecipe; } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/base-components/pirometro.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/base-components/pirometro.vue index 20e70618..47bb01b1 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/base-components/pirometro.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/base-components/pirometro.vue @@ -1,34 +1,28 @@ diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/base-components/termo-inferiore.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/base-components/termo-inferiore.ts new file mode 100644 index 00000000..11166e99 --- /dev/null +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/base-components/termo-inferiore.ts @@ -0,0 +1,17 @@ +import Vue from 'vue'; +import Component from 'vue-class-component'; +import { Prop } from 'vue-property-decorator'; +import Slider from "@/app_modules_thermo/components/slider.vue"; +import SVGTermoregolazioneInferiore from './SVG_Components/SVG-termo-inferiore.vue'; + +@Component({ + name: 'termoinferiore', + components: { + slider: Slider, + svgtermoinferiore: SVGTermoregolazioneInferiore, + } +}) +export default class TermoregolazioneInferiore extends Vue { + @Prop() + recipe: Recipe.IRecipe; +} \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/base-components/termo-inferiore.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/base-components/termo-inferiore.vue new file mode 100644 index 00000000..b2bb08df --- /dev/null +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/base-components/termo-inferiore.vue @@ -0,0 +1,64 @@ + + + \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/base-components/termo-superiore.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/base-components/termo-superiore.ts index d92bdebd..45d63165 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/base-components/termo-superiore.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/base-components/termo-superiore.ts @@ -2,24 +2,16 @@ import Vue from 'vue'; import Component from 'vue-class-component'; import { Prop } from 'vue-property-decorator'; import Slider from "@/app_modules_thermo/components/slider.vue"; -import ToggleButton from "@/components/toggleButton.vue"; import SVGTermoregolazioneSuperiore from './SVG_Components/SVG-termo-superiore.vue'; -import Tastierino from "@/app_modules_thermo/components/tastierino.vue"; @Component({ name: 'termosuperiore', components: { slider: Slider, - ToggleButton, svgtermosuperiore: SVGTermoregolazioneSuperiore, } }) export default class TermoregolazioneSuperiore extends Vue { - - @Prop() recipe: Recipe.IRecipe; - - - } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/base-components/termo-superiore.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/base-components/termo-superiore.vue index ad572013..41ec5030 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/base-components/termo-superiore.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/base-components/termo-superiore.vue @@ -1,90 +1,63 @@ diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/show-pirometro-info.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/show-pirometro-info.ts index 792a8da9..cdb87e46 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/show-pirometro-info.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/show-pirometro-info.ts @@ -5,12 +5,13 @@ import Component from "vue-class-component"; import { Prop } from 'vue-property-decorator'; import Pirometro from "./base-components/pirometro.vue"; import TermoregolazioneSuperiore from "./base-components/termo-superiore.vue"; +import TermoregolazioneInferiore from "./base-components/termo-inferiore.vue"; import StepFooter from "@/app_modules_thermo/setup/components/step-footer.vue"; import { recipeActions } from "@/store/recipe.store"; import { store } from "@/store"; import { Deferred } from "@/services"; -@Component({ components: { modal: Modal, pirometro: Pirometro, stepfooter: StepFooter, termosuperiore: TermoregolazioneSuperiore } }) +@Component({ components: { modal: Modal, pirometro: Pirometro, stepfooter: StepFooter, termosuperiore: TermoregolazioneSuperiore, termoinferiore: TermoregolazioneInferiore } }) export default class ShowPirometroInfo extends Vue { recipe: Recipe.IRecipe = this.$store.getters.getCurrent(); @@ -30,6 +31,12 @@ export default class ShowPirometroInfo extends Vue { this.deferred.resolve(1); }; + goTo(step) { + recipeActions.setCurrent(store, this.recipe); + ModalHelper.HideModal(); + this.deferred.resolve(step); + } + async beforeMount() { // this.contactInfo = await awaiter(new machineService().getContactConfiguration()); messageService.subscribeToChannel("esc_pressed", args => { diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/show-pirometro-info.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/show-pirometro-info.vue index 4c4f40f4..652baf22 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/show-pirometro-info.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/show-pirometro-info.vue @@ -19,12 +19,13 @@ +
- + diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/quote-velocita.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/quote-velocita.ts index 6df39382..c7a88272 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/quote-velocita.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/quote-velocita.ts @@ -6,13 +6,7 @@ import { Prop } from 'vue-property-decorator'; export default class QuoteVelocita extends Vue { - @Prop({}) - corsa: Recipe.IValue; - @Prop({}) - vel_salita: Recipe.IValue; - @Prop({}) - vel_salita_lenta: number; - @Prop({}) - rall_salita: number; + @Prop() + recipe: Recipe.IRecipe; } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/quote-velocita.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/quote-velocita.vue index d860b3a3..80cf1f12 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/quote-velocita.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/quote-velocita.vue @@ -1,7 +1,99 @@ - + \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/stampo.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/stampo.ts index 69414fde..81ad7b7c 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/stampo.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/stampo.ts @@ -5,15 +5,7 @@ import { Prop } from 'vue-property-decorator'; @Component({}) export default class QuoteVelocita extends Vue { - - - @Prop({}) - corsa: Recipe.IValue; - @Prop({}) - vel_salita: Recipe.IValue; - @Prop({}) - vel_salita_lenta: Recipe.IValue; - @Prop({}) - rall_salita: Recipe.IValue; + @Prop() + recipe: Recipe.IRecipe; } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/stampo.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/stampo.vue index 649b6a29..76ca238d 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/stampo.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/stampo.vue @@ -1,7 +1,128 @@ +
+ +
+
+ + 00 + mm +
+
+
+
+ + 00 + mm +
+
+
+
+ + 00 + mm +
+
+
+
+ + 00 + mm +
+
+
+
+ + 00 + mm +
+
+
+
+ + 00 + mm +
+
+ + 00 + mm +
+
+
+
+ + 00 + mm +
+
+ + 00 + mm +
+
+
+
+ + 00 + mm +
+
+ + 00 + mm +
+
+
+
+ + 00 + mm +
+
+ + 00 + mm +
+
+
+ + \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/svgcontrostampo.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/svgcontrostampo.ts index 62dfff11..14ed376f 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/svgcontrostampo.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/svgcontrostampo.ts @@ -5,15 +5,7 @@ import { Prop } from 'vue-property-decorator'; @Component({}) export default class Controstamposvg extends Vue { - - - @Prop({}) - corsa: Recipe.IValue; - @Prop({}) - vel_discesa: Recipe.IValue; - @Prop({}) - vel_discesa_lenta: number; - @Prop({}) - rall_discesa: number; + @Prop() + recipe: Recipe.IRecipe; } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/svgcontrostampo.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/svgcontrostampo.vue index 075d09fb..1b93133c 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/svgcontrostampo.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/svgcontrostampo.vue @@ -1,7 +1,83 @@ e - + \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/controstampo.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/controstampo.ts index 0072d813..cf558dc8 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/controstampo.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/controstampo.ts @@ -15,23 +15,6 @@ import Tastierino from "@/app_modules_thermo/components/tastierino.vue"; }) export default class Controstampo extends Vue { - - @Prop() recipe: Recipe.IRecipe; - - @Prop({}) - ritardo: number; - - mockR: number = this.ritardo; - - @Prop({}) - rallentamento_discesa: number; - - mockRD: number = this.rallentamento_discesa; - - @Prop({}) - velocità_discesa_lenta: number; - - mockVDL: number = this.velocità_discesa_lenta; } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/controstampo.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/controstampo.vue index 36cd6057..64f64378 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/controstampo.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/controstampo.vue @@ -3,70 +3,68 @@
-
- - -
+ diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/discesa-cornice.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/discesa-cornice.ts index 71f9a761..42b4db9a 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/discesa-cornice.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/discesa-cornice.ts @@ -12,15 +12,4 @@ export default class DiscesaCornice extends Vue { @Prop() recipe: Recipe.IRecipe; - @Prop({}) - ritardo: number; - @Prop({}) - ralSalita: number; - @Prop({}) - velSalitaLenta: number; - - mock_ritardo: number = this.ritardo; - mock_ral_salita: number = this.ralSalita; - mock_vel_salita_lenta: number = this.velSalitaLenta; - } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/discesa-cornice.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/discesa-cornice.vue index 5558bb20..c4c6965c 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/discesa-cornice.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/discesa-cornice.vue @@ -3,70 +3,66 @@
-
- - -
+ diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/salita-stampo.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/salita-stampo.ts index 4ee37fe0..9b708084 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/salita-stampo.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/salita-stampo.ts @@ -8,8 +8,6 @@ import Tastierino from "@/app_modules_thermo/components/tastierino.vue"; @Component({ name: "salita-stampo", components: { stampoSVG: StampoSVG } }) export default class DiscesaCornice extends Vue { - @Prop({}) - ritardo: number; @Prop() recipe: Recipe.IRecipe; diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/salita-stampo.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/salita-stampo.vue index 03013480..2e87adbc 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/salita-stampo.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/salita-stampo.vue @@ -3,84 +3,73 @@
-
- - -
+ diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/show-quote-velocita-info.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/show-quote-velocita-info.ts index 1af1a07f..23dd9099 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/show-quote-velocita-info.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/show-quote-velocita-info.ts @@ -23,7 +23,7 @@ import { Deferred } from "@/services"; export default class ShowQuoteVelocitaInfo extends Vue { recipe: Recipe.IRecipe = this.$store.getters.getCurrent(); - show: string = "QC"; + show: string = "QS"; @Prop() deferred: Deferred; @@ -39,6 +39,12 @@ export default class ShowQuoteVelocitaInfo extends Vue { this.deferred.resolve(1); }; + goTo(step) { + recipeActions.setCurrent(store, this.recipe); + ModalHelper.HideModal(); + this.deferred.resolve(step); + } + async beforeMount() { // this.contactInfo = await awaiter(new machineService().getContactConfiguration()); messageService.subscribeToChannel("esc_pressed", args => { diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/show-quote-velocita-info.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/show-quote-velocita-info.vue index 646b4839..6251d923 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/show-quote-velocita-info.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/show-quote-velocita-info.vue @@ -19,7 +19,7 @@ - + diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/base-components/nebulizzatori.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/base-components/nebulizzatori.ts new file mode 100644 index 00000000..9118d4cc --- /dev/null +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/base-components/nebulizzatori.ts @@ -0,0 +1,16 @@ +import Vue from 'vue'; +import Component from 'vue-class-component'; +import {Prop} from 'vue-property-decorator'; +import Slider from "@/app_modules_thermo/components/slider.vue"; + +@Component({name:"nebulizzatori", +components: { + slider:Slider +} +}) +export default class Nebulizzatori extends Vue{ + + @Prop() + recipe:Recipe.IRecipe; + +} \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/base-components/nebulizzatori.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/base-components/nebulizzatori.vue new file mode 100644 index 00000000..d04b60de --- /dev/null +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/base-components/nebulizzatori.vue @@ -0,0 +1,27 @@ + + + \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/base-components/otturatori.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/base-components/otturatori.ts new file mode 100644 index 00000000..935bc297 --- /dev/null +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/base-components/otturatori.ts @@ -0,0 +1,16 @@ +import Vue from 'vue'; +import Component from 'vue-class-component'; +import {Prop} from 'vue-property-decorator'; +import Slider from "@/app_modules_thermo/components/slider.vue"; + +@Component({name:"otturatori", +components: { + slider:Slider +} +}) +export default class Otturatori extends Vue{ + + @Prop() + recipe:Recipe.IRecipe; + +} \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/base-components/otturatori.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/base-components/otturatori.vue new file mode 100644 index 00000000..c8dfdd68 --- /dev/null +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/base-components/otturatori.vue @@ -0,0 +1,92 @@ + + + \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/base-components/pirometro.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/base-components/pirometro.ts new file mode 100644 index 00000000..5980a793 --- /dev/null +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/base-components/pirometro.ts @@ -0,0 +1,17 @@ +import Vue from 'vue'; +import Component from 'vue-class-component'; +import { Prop } from 'vue-property-decorator'; +import Slider from "@/app_modules_thermo/components/slider.vue"; + +@Component({ + name: "pirometro", + components: { + slider: Slider + } +}) +export default class Pirometro extends Vue { + + @Prop() + recipe: Recipe.IRecipe; + +} \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/base-components/pirometro.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/base-components/pirometro.vue new file mode 100644 index 00000000..7e23c5a3 --- /dev/null +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/base-components/pirometro.vue @@ -0,0 +1,27 @@ + + + \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/base-components/telescopi.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/base-components/telescopi.ts new file mode 100644 index 00000000..8a9c17bc --- /dev/null +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/base-components/telescopi.ts @@ -0,0 +1,17 @@ +import Vue from 'vue'; +import Component from 'vue-class-component'; +import { Prop } from 'vue-property-decorator'; +import Slider from "@/app_modules_thermo/components/slider.vue"; + +@Component({ + name: "telescopi", + components: { + slider: Slider + } +}) +export default class Telescopi extends Vue { + + @Prop() + recipe: Recipe.IRecipe; + +} \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/base-components/telescopi.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/base-components/telescopi.vue new file mode 100644 index 00000000..95cca0e8 --- /dev/null +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/base-components/telescopi.vue @@ -0,0 +1,30 @@ + + + \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/base-components/ventilatori.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/base-components/ventilatori.vue index 6dfa77f4..4edc478d 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/base-components/ventilatori.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/base-components/ventilatori.vue @@ -1,34 +1,26 @@ diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/show-raffreddamento-info.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/show-raffreddamento-info.ts index 2529c43f..137c0041 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/show-raffreddamento-info.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/show-raffreddamento-info.ts @@ -5,6 +5,10 @@ import StepFooter from "@/app_modules_thermo/setup/components/step-footer.vue"; import { Modal, ModalHelper } from "@/components/modals"; import { Factory, messageService, awaiter } from "@/_base"; import Ventilatori from "./base-components/ventilatori.vue"; +import Pirometro from "./base-components/pirometro.vue"; +import Nebulizzatori from "./base-components/nebulizzatori.vue"; +import Telescopi from "./base-components/telescopi.vue"; +import Otturatori from "./base-components/otturatori.vue"; import { recipeActions } from "@/store/recipe.store"; import { store } from "@/store"; import { Deferred } from '@/services'; @@ -13,6 +17,10 @@ import { Deferred } from '@/services'; components: { modal: Modal, ventilatori: Ventilatori, + pirometro: Pirometro, + nebulizzatori: Nebulizzatori, + telescopi: Telescopi, + otturatori: Otturatori, stepfooter: StepFooter } }) @@ -35,6 +43,12 @@ export default class Raffreddamento extends Vue { this.deferred.resolve(1); }; + goTo(step) { + recipeActions.setCurrent(store, this.recipe); + ModalHelper.HideModal(); + this.deferred.resolve(step); + } + async beforeMount() { // this.contactInfo = await awaiter(new machineService().getContactConfiguration()); messageService.subscribeToChannel("esc_pressed", args => { diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/show-raffreddamento-info.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/show-raffreddamento-info.vue index 9fc2fa07..bf6c0084 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/show-raffreddamento-info.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/show-raffreddamento-info.vue @@ -5,6 +5,8 @@ + +
+ + + +
- + diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/resistance.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/resistance.ts new file mode 100644 index 00000000..c66190b5 --- /dev/null +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/resistance.ts @@ -0,0 +1,46 @@ +import Component from "vue-class-component"; +import Vue from "vue"; +import { Prop } from "vue-property-decorator"; +import Warmers from "./warmers"; + +@Component({}) +export default class Resistance extends Vue { + + @Prop() + res: Warmers.IResistance; + + @Prop() + channel: Warmers.IChannel; + + @Prop({ default: false }) + selected: boolean; + + @Prop({ default: function () { return [253, 216, 53] } }) + colorFrom: number[]; + + @Prop({ default: function () { return [244, 0, 0] } }) + colorTo: number[]; + + @Prop({ default: function () { return [253, 216, 53] } }) + selectedColorFrom: number[]; + + @Prop({ default: function () { return [244, 0, 0] } }) + selectedColorTo: number[]; + + get currentStandardColor() { + return [this.colorFrom[0] - (this.colorFrom[0] - this.colorTo[0]) * this.channel.setpointHMI / 100, + this.colorFrom[1] - (this.colorFrom[1] - this.colorTo[1]) * this.channel.setpointHMI / 100, + this.colorFrom[2] - (this.colorFrom[2] - this.colorTo[2]) * this.channel.setpointHMI / 100]; + } + + get currentColor() { + if (this.selected) return this.currentSelectedColor; + return this.currentStandardColor; + } + + get currentSelectedColor() { + return [this.colorFrom[0] - (this.colorFrom[0] - this.colorTo[0]) * this.channel.setpointHMI / 100, + this.colorFrom[1] - (this.colorFrom[1] - this.colorTo[1]) * this.channel.setpointHMI / 100, + this.colorFrom[2] - (this.colorFrom[2] - this.colorTo[2]) * this.channel.setpointHMI / 100]; + } +} \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/resistance.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/resistance.vue new file mode 100644 index 00000000..c3e39fef --- /dev/null +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/resistance.vue @@ -0,0 +1,4 @@ + + \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/riscaldi-inferiori.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/riscaldi-inferiori.ts new file mode 100644 index 00000000..0c65d26f --- /dev/null +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/riscaldi-inferiori.ts @@ -0,0 +1,23 @@ +import Vue from 'vue'; +import Component from 'vue-class-component'; +import { Prop } from 'vue-property-decorator'; +import warmers from "./warmers.vue"; + +@Component({ + name: "riscaldiinf", components: { + warmers + } +}) +export default class RiscaldiInferiori extends Vue { + + @Prop() + recipe: Recipe.IRecipe; + + zoomIn() { + + } + + zoomOut() { + + } +} \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/riscaldi-inferiori.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/riscaldi-inferiori.vue new file mode 100644 index 00000000..1cc1cfd5 --- /dev/null +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/riscaldi-inferiori.vue @@ -0,0 +1,90 @@ + + + + \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/riscaldi-superiori.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/riscaldi-superiori.ts index 5aa7ad32..51db7f62 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/riscaldi-superiori.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/riscaldi-superiori.ts @@ -1,22 +1,24 @@ import Vue from 'vue'; import Component from 'vue-class-component'; import { Prop } from 'vue-property-decorator'; -import Slider from "@/app_modules_thermo/components/slider.vue" -import toggleButton from "@/components/toggleButton.vue"; +import warmers from "./warmers.vue"; @Component({ name: "riscaldisup", components: { - slider: Slider, toggleButton + + warmers } }) export default class RiscaldiSuperiori extends Vue { - @Prop({}) - setpoint:number; - - mock_setpoint:number=this.setpoint; - @Prop() - recipe:Recipe.IRecipe; + recipe: Recipe.IRecipe; + zoomIn() { + (this.$refs.warmers as any).zoomIn(); + } + + zoomOut() { + (this.$refs.warmers as any).zoomOut(); + } } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/riscaldi-superiori.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/riscaldi-superiori.vue index 38f61409..61fe6069 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/riscaldi-superiori.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/riscaldi-superiori.vue @@ -1,88 +1,89 @@ + \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/sostentamento-decompressione.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/sostentamento-decompressione.ts index ca81dcb8..21ca67e2 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/sostentamento-decompressione.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/sostentamento-decompressione.ts @@ -2,12 +2,11 @@ import Vue from 'vue'; import Component from 'vue-class-component'; import { Prop } from 'vue-property-decorator'; import Slider from "@/app_modules_thermo/components/slider.vue" -import toggleButton from "@/components/toggleButton.vue"; -@Component({ name: "sostdecomp", components: { slider: Slider, toggleButton } }) +@Component({ name: "sostdecomp", components: { slider: Slider } }) export default class SostDecomp extends Vue { - @Prop() - recipe:Recipe.IRecipe; + @Prop() + recipe: Recipe.IRecipe; } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/sostentamento-decompressione.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/sostentamento-decompressione.vue index 7f82e544..b69a7a00 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/sostentamento-decompressione.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/sostentamento-decompressione.vue @@ -1,41 +1,44 @@ diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/warmers.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/warmers.ts new file mode 100644 index 00000000..d0745add --- /dev/null +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/warmers.ts @@ -0,0 +1,81 @@ +import Component from "vue-class-component"; +import Vue from "vue"; +import { store } from "@/store"; +import { warmersService } from "@/services/warmersService"; +import { Prop, Watch } from "vue-property-decorator"; +import resistance from "./resistance.vue"; +import svgPanZoom from "svg-pan-zoom"; + +@Component({ + components: { + resistance + } +}) +export default class Warmers extends Vue { + + width = 180; + height = 48; + + @Prop({ default: 0 }) + idReflector: number; + + selectedChannels: number[] = [] + + get channels() { + return store.state.warmers.channels.filter(i => i.idReflector == this.idReflector); + } + + get resistances() { + let cc = this.channels.map(i => i.idChannel); + return store.state.warmers.resistances.filter(r => cc.findIndex(i => i == r.idChannel) >= 0); + } + + get rows() { + let result = this.resistances.reduce((p, c) => { + p.add(c.row); + return p; + }, new Set()); + return Array.from(result.values()); + } + + getChannel(id: number) { + return this.channels.find(i => i.idChannel == id); + } + + // Ottengo le resistenze per ogni riga + resistancesPerRow(row: number) { + return this.resistances.filter(i => i.row == row); + } + + // Calcolo la posizione di ogni resitenza in base alla dimensione delle resistenze precedenti. + resistanceXPosition(row, col) { + let cells = this.resistancesPerRow(row).filter(i => i.column < col); + let result = cells.reduce((p, c) => p + c.dimension, 0); + return result; + } + + + zoomController: any = null; + + zoomIn() { + this.zoomController?.zoomIn(); + } + + zoomOut() { + this.zoomController?.zoomOut(); + } + + mounted() { + let $this = this; + setTimeout(() => { + $this.zoomController = svgPanZoom('#warmer', { + zoomEnabled: true, + controlIconsEnabled: false, + fit: true, + center: true, + }); + }, 500) + + } + +} diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/warmers.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/warmers.vue new file mode 100644 index 00000000..3700788c --- /dev/null +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/warmers.vue @@ -0,0 +1,18 @@ + + \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/show-riscaldi-info.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/show-riscaldi-info.ts index fb276190..5d0ff435 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/show-riscaldi-info.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/show-riscaldi-info.ts @@ -5,12 +5,13 @@ import Component from "vue-class-component"; import { Prop } from 'vue-property-decorator'; import StepFooter from "@/app_modules_thermo/setup/components/step-footer.vue"; import RiscaldiSup from "./base-components/riscaldi-superiori.vue"; +import RiscaldiInf from "./base-components/riscaldi-inferiori.vue"; import SostDecomp from "./base-components/sostentamento-decompressione.vue"; import { recipeActions } from "@/store/recipe.store"; import { store } from "@/store"; import { Deferred } from "@/services"; -@Component({ components: { modal: Modal, stepfooter: StepFooter, riscaldisup: RiscaldiSup, sostdecomp: SostDecomp } }) +@Component({ components: { modal: Modal, stepfooter: StepFooter, riscaldiinf: RiscaldiInf,riscaldisup: RiscaldiSup, sostdecomp: SostDecomp } }) export default class ShowRiscaldamentoSuperioreInfo extends Vue { recipe: Recipe.IRecipe = this.$store.getters.getCurrent(); @@ -30,6 +31,12 @@ export default class ShowRiscaldamentoSuperioreInfo extends Vue { this.deferred.resolve(1); }; + goTo(step) { + recipeActions.setCurrent(store, this.recipe); + ModalHelper.HideModal(); + this.deferred.resolve(step); + } + async beforeMount() { // this.contactInfo = await awaiter(new machineService().getContactConfiguration()); messageService.subscribeToChannel("esc_pressed", args => { diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/show-riscaldi-info.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/show-riscaldi-info.vue index 58cfcc84..11b3c8f6 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/show-riscaldi-info.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/show-riscaldi-info.vue @@ -11,13 +11,13 @@ @click="show = 'activeSD'" >Sostentamento/Decompressione -
+
@@ -25,7 +25,7 @@
- + diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/prevuoto.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/prevuoto.ts new file mode 100644 index 00000000..9a4b6641 --- /dev/null +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/prevuoto.ts @@ -0,0 +1,13 @@ +import Vue from 'vue'; +import Component from 'vue-class-component'; +import { Prop } from 'vue-property-decorator'; +import Slider from "@/app_modules_thermo/components/slider.vue"; +import Scheda from "@/app_modules_thermo/components/scheda.vue"; + +@Component({ name: 'prevuoto', components: { slider: Slider } }) +export default class Prevuoto extends Vue { + + @Prop() + recipe: Recipe.IRecipe; + +} \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/prevuoto.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/prevuoto.vue new file mode 100644 index 00000000..051e8690 --- /dev/null +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/prevuoto.vue @@ -0,0 +1,54 @@ + + + \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/vuoto-ausiliario.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/vuoto-ausiliario.ts new file mode 100644 index 00000000..f43f143a --- /dev/null +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/vuoto-ausiliario.ts @@ -0,0 +1,13 @@ +import Vue from 'vue'; +import Component from 'vue-class-component'; +import { Prop } from 'vue-property-decorator'; +import Slider from "@/app_modules_thermo/components/slider.vue"; +import Scheda from "@/app_modules_thermo/components/scheda.vue"; + +@Component({ name: 'vuotoausiliario', components: { slider: Slider, scheda: Scheda } }) +export default class VuotoAusiliario extends Vue { + + @Prop() + recipe: Recipe.IRecipe; + +} \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/vuoto-ausiliario.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/vuoto-ausiliario.vue new file mode 100644 index 00000000..7dbd32eb --- /dev/null +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/vuoto-ausiliario.vue @@ -0,0 +1,62 @@ + + + \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/vuoto-diretto.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/vuoto-diretto.ts new file mode 100644 index 00000000..7b71b555 --- /dev/null +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/vuoto-diretto.ts @@ -0,0 +1,16 @@ +import Vue from 'vue'; +import Component from 'vue-class-component'; +import {Prop} from 'vue-property-decorator'; +import Slider from "@/app_modules_thermo/components/slider.vue"; + +@Component({name:"vuotodiretto", +components: { + slider:Slider +} +}) +export default class VuotoDiretto extends Vue{ + + @Prop() + recipe:Recipe.IRecipe; + +} \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/vuoto-diretto.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/vuoto-diretto.vue new file mode 100644 index 00000000..584d4657 --- /dev/null +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/vuoto-diretto.vue @@ -0,0 +1,27 @@ + + + \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/vuoto-principale.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/vuoto-principale.ts index 01e0de33..9bd28bb1 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/vuoto-principale.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/vuoto-principale.ts @@ -1,8 +1,8 @@ import Vue from 'vue'; import Component from 'vue-class-component'; import {Prop} from 'vue-property-decorator'; -import Slider from "@/app_modules_thermo/components/slider.vue" -import Scheda from "@/app_modules_thermo/components/scheda.vue" +import Slider from "@/app_modules_thermo/components/slider.vue"; +import Scheda from "@/app_modules_thermo/components/scheda.vue"; @Component({name:'vuotoprincipale', components: { slider:Slider, scheda:Scheda}}) export default class VuotoPrincipale extends Vue{ diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/vuoto-principale.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/vuoto-principale.vue index bf29c4db..9f5fabfa 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/vuoto-principale.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/vuoto-principale.vue @@ -1,67 +1,61 @@ diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/show-vuoto-info.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/show-vuoto-info.ts index 359b6529..9f803cbf 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/show-vuoto-info.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/show-vuoto-info.ts @@ -5,11 +5,22 @@ import Component from "vue-class-component"; import { Prop } from 'vue-property-decorator'; import StepFooter from "@/app_modules_thermo/setup/components/step-footer.vue"; import VuotoPrincipale from "./base-components/vuoto-principale.vue"; +import VuotoDiretto from "./base-components/vuoto-diretto.vue"; +import VuotoAusiliario from "./base-components/vuoto-ausiliario.vue"; +import Prevuoto from "./base-components/prevuoto.vue"; import { recipeActions } from "@/store/recipe.store"; import { store } from "@/store"; import { Deferred } from "@/services"; -@Component({ components: { modal: Modal, vuotoprincipale: VuotoPrincipale, stepfooter: StepFooter } }) +@Component({ components: + { + modal: Modal, + vuotoprincipale: VuotoPrincipale, + vuotodiretto: VuotoDiretto, + vuotoausiliario: VuotoAusiliario, + prevuoto: Prevuoto, + stepfooter: StepFooter + } }) export default class ShowVuotoInfo extends Vue { recipe: Recipe.IRecipe = this.$store.getters.getCurrent(); @@ -29,6 +40,12 @@ export default class ShowVuotoInfo extends Vue { this.deferred.resolve(1); }; + goTo(step) { + recipeActions.setCurrent(store, this.recipe); + ModalHelper.HideModal(); + this.deferred.resolve(step); + } + async beforeMount() { // this.contactInfo = await awaiter(new machineService().getContactConfiguration()); messageService.subscribeToChannel("esc_pressed", args => { diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/show-vuoto-info.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/show-vuoto-info.vue index 959bc7fe..17a3597d 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/show-vuoto-info.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/show-vuoto-info.vue @@ -13,12 +13,15 @@ + + +
- + diff --git a/Thermo.Active/wwwroot/src/main.ts b/Thermo.Active/wwwroot/src/main.ts index ad0c21e1..5b46c839 100644 --- a/Thermo.Active/wwwroot/src/main.ts +++ b/Thermo.Active/wwwroot/src/main.ts @@ -25,9 +25,10 @@ import "./_base/gestures"; import "./app.business-logic"; import "./app.modules"; import { messageService } from "src/_base"; -import { recipeService } from "@/services/recipeService"; -recipeService.GetCurrent(); -recipeService.GetOverview(); + +import { warmersService } from "./services/warmersService"; +warmersService.GetChannels(); +warmersService.GetResistances(); // import VueDragDrop from 'vue-drag-drop'; // Vue.use(VueDragDrop); @@ -119,6 +120,9 @@ for (let name in components) { Vue.component(name, components[name]); } +import toggleButton from "@/components/toggleButton.vue"; +Vue.component('toggleButton', toggleButton); + // polyfills !! if (!(String.prototype as any).format) { (String.prototype as any).format = function () { diff --git a/Thermo.Active/wwwroot/src/services/hub.ts b/Thermo.Active/wwwroot/src/services/hub.ts index b79a87a1..f2c1b692 100644 --- a/Thermo.Active/wwwroot/src/services/hub.ts +++ b/Thermo.Active/wwwroot/src/services/hub.ts @@ -22,6 +22,7 @@ import { scadaService } from "./scadaService"; import { loginService } from "./loginService"; import { ToolingService } from "./toolingService"; import { CONFIGURATION } from "@/config"; +import { recipeActions } from "@/store/recipe.store"; declare let $: any; @@ -96,13 +97,12 @@ export class Hub { this._hub.client.partProgramQueue = Hub.partProgramQueue; - // this._hub.client.scadaData = Hub.scadaDataChanged; this._hub.client.cmsConnectGatewayRebbot = Hub.cmsConnectGatewayRebbot; // qui i NUOVI metodi NUOVI dal server (Recipe, gauges) da completare lato HUB - // this._hub.client.recipeFullData = Hub.recipeFullData; - // this._hub.client.recipeOverData = Hub.recipeOverData; + this._hub.client.recipeFullData = Hub.recipeFullData; + this._hub.client.recipeOverData = Hub.recipeOverData; // this._hub.client.modulesData = Hub.modulesData; // this._hub.client.warmersData = Hub.warmersData; this._hub.client.gaugeData = Hub.gaugeData; @@ -147,6 +147,14 @@ export class Hub { } + public static recipeFullData(data) { + recipeActions.setCurrent(store, data); + } + + public static recipeOverData(data) { + recipeActions.setOverview(store, data); + } + public updateAuthToken() { // Set or update authorization token let authData = JSON.parse(window.localStorage.getItem("authorizationData") || window.sessionStorage.getItem("authorizationData")) as AuthToken; diff --git a/Thermo.Active/wwwroot/src/services/recipeService.ts b/Thermo.Active/wwwroot/src/services/recipeService.ts index 3291fe29..7431d02b 100644 --- a/Thermo.Active/wwwroot/src/services/recipeService.ts +++ b/Thermo.Active/wwwroot/src/services/recipeService.ts @@ -1,23 +1,43 @@ import { baseRestService } from "../_base/baseRestService"; -import {CONFIGURATION} from "@/config"; +import { CONFIGURATION } from "@/config"; import { recipeActions } from "@/store/recipe.store"; import { store } from "@/store"; export class RecipeService extends baseRestService { - BASE_URL = async () => (await CONFIGURATION).api.apiServerUrl + "/api/recipe/"; + BASE_URL = async () => (await CONFIGURATION).api.apiServerUrl + "/api/recipe/"; - async GetCurrent(){ - let result = await this.Get((await this.BASE_URL()) + "current"); - recipeActions.setCurrent(store, result); - return result; + async GetCurrent() { + let result = await this.Get((await this.BASE_URL()) + "current"); + recipeActions.setCurrent(store, result); + return result; + } + + async GetOverview() { + let result = await this.Get((await this.BASE_URL()) + "overview"); + recipeActions.setOverview(store, result); + return result; + } + + async Update(model: { [id: string]: Recipe.IValue }) { + + let payload = {} + + for (const key in model) { + if (model.hasOwnProperty(key)) { + payload[key] = model[key].valueAct; + } } - async GetOverview(){ - let result = await this.Get((await this.BASE_URL()) + "overview"); - recipeActions.setOverview(store, result); - return result; - } + let result = await this.Put((await this.BASE_URL()) + "update", payload, true); + // recipeActions.Update(store, result); + return result; + } + + async Confirm() { + let result = await this.Put((await this.BASE_URL()) + "confirm", true); + return result; + } } export const recipeService = new RecipeService(); diff --git a/Thermo.Active/wwwroot/src/services/warmersService.ts b/Thermo.Active/wwwroot/src/services/warmersService.ts new file mode 100644 index 00000000..24a8007b --- /dev/null +++ b/Thermo.Active/wwwroot/src/services/warmersService.ts @@ -0,0 +1,44 @@ +import { baseRestService } from "../_base/baseRestService"; +import { CONFIGURATION } from "@/config"; +import { warmersActions } from "@/store/warmers.store"; +import { store } from "@/store"; +import Warmers from "@/app_modules_thermo/setup/riscaldi/components/base-components/warmers"; + +export class WarmersService extends baseRestService { + + BASE_URL = async () => (await CONFIGURATION).api.apiServerUrl + "api/warmers/"; + + async GetChannels() { + let result = await this.Get((await this.BASE_URL()) + "channels"); + warmersActions.setChannels(store, result as { [id: number]: Warmers.IChannel }); + return result; + } + + async GetResistances() { + let result = await this.Get((await this.BASE_URL()) + "resistances"); + warmersActions.setResistances(store, result as { [id: number]: Warmers.IResistance }); + return result; + } + + async Update(model: any) { + let result = await this.Put((await this.BASE_URL()) + "update", model, true); + return result; + } + + async Confirm() { + let result = await this.Put((await this.BASE_URL()) + "confirm", true); + return result; + } + + async Cancel() { + let result = await this.Put((await this.BASE_URL()) + "cancel", true); + return result; + } + + async SetConfig() { + let result = await this.Put((await this.BASE_URL()) + "setConfig", true); + return result; + } + +} +export const warmersService = new WarmersService(); \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/store/app.store.ts b/Thermo.Active/wwwroot/src/store/app.store.ts index 911d66ea..4fb325a8 100644 --- a/Thermo.Active/wwwroot/src/store/app.store.ts +++ b/Thermo.Active/wwwroot/src/store/app.store.ts @@ -15,9 +15,10 @@ import { LocalizationService, localizationService } from "@/services/localizatio import { ProductionStoreModel, productionStore } from "./production.store"; import { jobEditorStore } from "./jobEditor.store"; import { scadaStore, ScadaModel } from "./scada"; -import { reportStore, ReportStoreModel} from "./report.store"; -import { recipeStore, RecipeStoreModel} from "./recipe.store"; -import { usersStore,UsersStoreModel } from "./users.store"; +import { reportStore, ReportStoreModel } from "./report.store"; +import { recipeStore, RecipeStoreModel } from "./recipe.store"; +import { usersStore, UsersStoreModel } from "./users.store"; +import { warmersStore, WarmersStoreModel } from "./warmers.store"; Vue.use(Vuex); @@ -44,7 +45,7 @@ export interface AppModel { report: ReportStoreModel; recipe: RecipeStoreModel; users: UsersStoreModel; - + warmers: WarmersStoreModel; } // Mutations Name @@ -92,7 +93,8 @@ const _store = { scada: scadaStore, report: reportStore, recipe: recipeStore, - users: usersStore + users: usersStore, + warmers: warmersStore, }, mutations: { @@ -114,7 +116,7 @@ const _store = { state.isShowDashboard = !state.isShowDashboard; }, setShowPreDashboard(state) { - + state.isShowPreDashboard = !state.isShowPreDashboard; } }, @@ -136,11 +138,11 @@ const _store = { FavSoftkeyStop(context) { context.commit("favSoftkey", false); }, - ShowDashboard(context){ + ShowDashboard(context) { context.commit("setShowDashboard"); }, - ShowPreDashboard(context){ - + ShowPreDashboard(context) { + context.commit("setShowPreDashboard"); }, SetCurrentUser(context, userinfo) { diff --git a/Thermo.Active/wwwroot/src/store/index.ts b/Thermo.Active/wwwroot/src/store/index.ts index 6860fe59..ae0074e5 100644 --- a/Thermo.Active/wwwroot/src/store/index.ts +++ b/Thermo.Active/wwwroot/src/store/index.ts @@ -6,28 +6,30 @@ import { AlarmsModel, alarmsModelActions, alarmsStore, AlarmModel } from "./alar import { processModelActions, processStore, RunningProcessModel } from "./runningProcess.store"; import { LocalizationModel, languageModel, localizationModelActions } from "./localization.store"; import { jobEditorStoreActions } from "./jobEditor.store"; -import { UsersStoreModel,UsersActions } from "./users.store"; +import { UsersStoreModel, UsersActions } from "./users.store"; +import { WarmersStoreModel, warmersActions } from "./warmers.store"; export { - store, - AppModel, - appModelActions, - machineInfoActions, - MachineInfoModel, - machineStatusActions, - paddleActions, - PaddleModel, - MachineStatusModel, - AlarmsModel, - alarmsModelActions, - processModelActions, - RunningProcessModel, - LocalizationModel, - languageModel, - localizationModelActions, - AlarmModel, - buttonStatus, - jobEditorStoreActions, - UsersActions, - UsersStoreModel + store, + AppModel, + appModelActions, + machineInfoActions, + MachineInfoModel, + machineStatusActions, + paddleActions, + PaddleModel, + MachineStatusModel, + AlarmsModel, + alarmsModelActions, + processModelActions, + RunningProcessModel, + LocalizationModel, + languageModel, + localizationModelActions, + AlarmModel, + buttonStatus, + jobEditorStoreActions, + UsersActions, + UsersStoreModel, + WarmersStoreModel, warmersActions } diff --git a/Thermo.Active/wwwroot/src/store/warmers.store.ts b/Thermo.Active/wwwroot/src/store/warmers.store.ts new file mode 100644 index 00000000..f464ec52 --- /dev/null +++ b/Thermo.Active/wwwroot/src/store/warmers.store.ts @@ -0,0 +1,62 @@ +export interface WarmersStoreModel { + channels: Warmers.IChannel[]; + resistances: Warmers.IResistance[]; +} + + +export interface WarmersActions { + setChannels(context, model: { [id: number]: Warmers.IChannel }); + setResistances(context, model: { [id: number]: Warmers.IResistance }); +} + +export interface WarmersGetters { + getChannels: () => Warmers.IChannel[]; + getResistances: () => Warmers.IResistance[]; +} + +export const warmersStore = { + + state: { + channels: [], + resistances: [], + } as WarmersStoreModel, + + getters: { + getChannels: (state) => (): Warmers.IChannel[] => (state as WarmersStoreModel).channels, + getResistances: (state) => (): Warmers.IResistance[] => (state as WarmersStoreModel).resistances, + }, + + mutations: { + + SetChannels(state, model: { [id: number]: Warmers.IChannel }) { + for (const key in model) { + if (model.hasOwnProperty(key)) { + const element = model[key]; + state.channels.push(element); + } + } + }, + + SetResistances(state, model: { [id: number]: Warmers.IResistance }) { + for (const key in model) { + if (model.hasOwnProperty(key)) { + const element = model[key]; + state.resistances.push(element); + } + } + }, + + }, + actions: { + setChannels(context, model: { [id: number]: Warmers.IChannel }) { + context.commit("SetChannels", model); + }, + setResistances(context, model: { [id: number]: Warmers.IResistance }) { + context.commit("SetResistances", model); + }, + + } as WarmersActions + +} + +export const warmersActions = warmersStore.actions as WarmersActions; \ No newline at end of file diff --git a/Thermo.Active/wwwroot/webpack.config.js b/Thermo.Active/wwwroot/webpack.config.js index f2c99b9b..bde3fe95 100644 --- a/Thermo.Active/wwwroot/webpack.config.js +++ b/Thermo.Active/wwwroot/webpack.config.js @@ -97,7 +97,11 @@ module.exports = { name: "[name].[ext]" } } - } + }, + { + test: /\.css$/i, + use: ['style-loader', 'css-loader'], + }, ] },