diff --git a/Step/wwwroot/assets/styles/base/alarms.less b/Step/wwwroot/assets/styles/base/alarms.less index dbd08534..990e2cc9 100644 --- a/Step/wwwroot/assets/styles/base/alarms.less +++ b/Step/wwwroot/assets/styles/base/alarms.less @@ -537,7 +537,7 @@ display: flex; flex-flow: row; } - .attach{ + .attach, .note{ .accordion{ margin-top: 24px; .filename{ @@ -572,7 +572,7 @@ .filename.selected{ background-color: rgba(255, 255, 255, 0.8); } - .allattach{ + .allattach, .allnote{ display: flex; height: 64px; align-items: center; diff --git a/Step/wwwroot/assets/styles/base/layout.less b/Step/wwwroot/assets/styles/base/layout.less index 75d3741c..23d2b3f7 100644 --- a/Step/wwwroot/assets/styles/base/layout.less +++ b/Step/wwwroot/assets/styles/base/layout.less @@ -31,6 +31,7 @@ @import "create-queue.less"; @import "program-management.less"; @import "job-editor.less"; +@import "scada.less"; @background-color: rgb(216, 216, 216); @handle-width: 48px; diff --git a/Step/wwwroot/assets/styles/base/scada.less b/Step/wwwroot/assets/styles/base/scada.less new file mode 100644 index 00000000..c87b2090 --- /dev/null +++ b/Step/wwwroot/assets/styles/base/scada.less @@ -0,0 +1,17 @@ +// out: false, sourceMap: false, main: ../style.less +@import "colors.less"; + +.scada-container{ + height: 100%; + width: 100%; + display: flex; + justify-content: center; + padding-top: 104px; + .scada-box{ + width: 1808px; + height: 872px; + border-radius: 2px; + background-color: @color-background-white; + box-shadow: 0 3px 5px 0 @color-black-40; + } +} \ No newline at end of file diff --git a/Step/wwwroot/assets/styles/style.css b/Step/wwwroot/assets/styles/style.css index 85c24c95..34c1d587 100644 --- a/Step/wwwroot/assets/styles/style.css +++ b/Step/wwwroot/assets/styles/style.css @@ -3298,50 +3298,67 @@ footer .container button.big:before { display: flex; flex-flow: row; } -.alarm-history-container .alarm-history-body .alarm-history-body-right .box-right .box-right-action .attach .accordion { +.alarm-history-container .alarm-history-body .alarm-history-body-right .box-right .box-right-action .attach .accordion, +.alarm-history-container .alarm-history-body .alarm-history-body-right .box-right .box-right-action .note .accordion { margin-top: 24px; } -.alarm-history-container .alarm-history-body .alarm-history-body-right .box-right .box-right-action .attach .accordion .filename { +.alarm-history-container .alarm-history-body .alarm-history-body-right .box-right .box-right-action .attach .accordion .filename, +.alarm-history-container .alarm-history-body .alarm-history-body-right .box-right .box-right-action .note .accordion .filename { display: flex; height: 64px; align-items: center; cursor: pointer; } -.alarm-history-container .alarm-history-body .alarm-history-body-right .box-right .box-right-action .attach .accordion .filename i { +.alarm-history-container .alarm-history-body .alarm-history-body-right .box-right .box-right-action .attach .accordion .filename i, +.alarm-history-container .alarm-history-body .alarm-history-body-right .box-right .box-right-action .note .accordion .filename i { margin: 0 20px 0 20px; } -.alarm-history-container .alarm-history-body .alarm-history-body-right .box-right .box-right-action .attach .accordion .filename span { +.alarm-history-container .alarm-history-body .alarm-history-body-right .box-right .box-right-action .attach .accordion .filename span, +.alarm-history-container .alarm-history-body .alarm-history-body-right .box-right .box-right-action .note .accordion .filename span { width: 100%; font-size: 18px; line-height: 1; color: #4b4b4b; } -.alarm-history-container .alarm-history-body .alarm-history-body-right .box-right .box-right-action .attach .accordion .filename .right { +.alarm-history-container .alarm-history-body .alarm-history-body-right .box-right .box-right-action .attach .accordion .filename .right, +.alarm-history-container .alarm-history-body .alarm-history-body-right .box-right .box-right-action .note .accordion .filename .right { width: 100%; display: flex; justify-content: flex-end; } -.alarm-history-container .alarm-history-body .alarm-history-body-right .box-right .box-right-action .attach .accordion .filename .right button.btn-hidden { +.alarm-history-container .alarm-history-body .alarm-history-body-right .box-right .box-right-action .attach .accordion .filename .right button.btn-hidden, +.alarm-history-container .alarm-history-body .alarm-history-body-right .box-right .box-right-action .note .accordion .filename .right button.btn-hidden { visibility: hidden; } -.alarm-history-container .alarm-history-body .alarm-history-body-right .box-right .box-right-action .attach .accordion .filename .right button.btn-hidden i { +.alarm-history-container .alarm-history-body .alarm-history-body-right .box-right .box-right-action .attach .accordion .filename .right button.btn-hidden i, +.alarm-history-container .alarm-history-body .alarm-history-body-right .box-right .box-right-action .note .accordion .filename .right button.btn-hidden i { font-size: 26px; visibility: visible; margin: 0 12px; cursor: pointer; } -.alarm-history-container .alarm-history-body .alarm-history-body-right .box-right .box-right-action .attach .accordion .filename.selected { +.alarm-history-container .alarm-history-body .alarm-history-body-right .box-right .box-right-action .attach .accordion .filename.selected, +.alarm-history-container .alarm-history-body .alarm-history-body-right .box-right .box-right-action .note .accordion .filename.selected { background-color: rgba(255, 255, 255, 0.8); } -.alarm-history-container .alarm-history-body .alarm-history-body-right .box-right .box-right-action .attach .accordion .allattach { +.alarm-history-container .alarm-history-body .alarm-history-body-right .box-right .box-right-action .attach .accordion .allattach, +.alarm-history-container .alarm-history-body .alarm-history-body-right .box-right .box-right-action .note .accordion .allattach, +.alarm-history-container .alarm-history-body .alarm-history-body-right .box-right .box-right-action .attach .accordion .allnote, +.alarm-history-container .alarm-history-body .alarm-history-body-right .box-right .box-right-action .note .accordion .allnote { display: flex; height: 64px; align-items: center; } -.alarm-history-container .alarm-history-body .alarm-history-body-right .box-right .box-right-action .attach .accordion .allattach button.btn-hidden { +.alarm-history-container .alarm-history-body .alarm-history-body-right .box-right .box-right-action .attach .accordion .allattach button.btn-hidden, +.alarm-history-container .alarm-history-body .alarm-history-body-right .box-right .box-right-action .note .accordion .allattach button.btn-hidden, +.alarm-history-container .alarm-history-body .alarm-history-body-right .box-right .box-right-action .attach .accordion .allnote button.btn-hidden, +.alarm-history-container .alarm-history-body .alarm-history-body-right .box-right .box-right-action .note .accordion .allnote button.btn-hidden { visibility: hidden; } -.alarm-history-container .alarm-history-body .alarm-history-body-right .box-right .box-right-action .attach .accordion .allattach button.btn-hidden span { +.alarm-history-container .alarm-history-body .alarm-history-body-right .box-right .box-right-action .attach .accordion .allattach button.btn-hidden span, +.alarm-history-container .alarm-history-body .alarm-history-body-right .box-right .box-right-action .note .accordion .allattach button.btn-hidden span, +.alarm-history-container .alarm-history-body .alarm-history-body-right .box-right .box-right-action .attach .accordion .allnote button.btn-hidden span, +.alarm-history-container .alarm-history-body .alarm-history-body-right .box-right .box-right-action .note .accordion .allnote button.btn-hidden span { font-size: 18px; line-height: 1; visibility: visible; @@ -3349,10 +3366,12 @@ footer .container button.big:before { color: #4b4b4b; cursor: pointer; } -.alarm-history-container .alarm-history-body .alarm-history-body-right .box-right .box-right-action .attach .accordion header { +.alarm-history-container .alarm-history-body .alarm-history-body-right .box-right .box-right-action .attach .accordion header, +.alarm-history-container .alarm-history-body .alarm-history-body-right .box-right .box-right-action .note .accordion header { color: #002680; } -.alarm-history-container .alarm-history-body .alarm-history-body-right .box-right .box-right-action .attach .accordion header small { +.alarm-history-container .alarm-history-body .alarm-history-body-right .box-right .box-right-action .attach .accordion header small, +.alarm-history-container .alarm-history-body .alarm-history-body-right .box-right .box-right-action .note .accordion header small { border: 2px solid #002680; color: #002680; } @@ -12868,6 +12887,20 @@ footer .container button.big:before { width: 100%; justify-content: flex-end; } +.scada-container { + height: 100%; + width: 100%; + display: flex; + justify-content: center; + padding-top: 104px; +} +.scada-container .scada-box { + width: 1808px; + height: 872px; + border-radius: 2px; + background-color: #fff; + box-shadow: 0 3px 5px 0 rgba(0, 0, 0, 0.4); +} a, a:visited, a:hover, diff --git a/Step/wwwroot/src/app.modules.js b/Step/wwwroot/src/app.modules.js index b5531b06..ada14ecb 100644 --- a/Step/wwwroot/src/app.modules.js +++ b/Step/wwwroot/src/app.modules.js @@ -67,6 +67,9 @@ export const AlarmHistory = () => export const Production = () => import ("./components/production.vue"); +export const Scada = () => + import ("./components/scada.vue"); + export const CreateQueue = () => import ("./components/create-queue.vue"); diff --git a/Step/wwwroot/src/components/alarm-history.vue b/Step/wwwroot/src/components/alarm-history.vue index 2d24ac31..6b43d54b 100644 --- a/Step/wwwroot/src/components/alarm-history.vue +++ b/Step/wwwroot/src/components/alarm-history.vue @@ -138,6 +138,21 @@
+
+ + + + NomeFile.pdf +
+ + +
+
+
+ +
Aggiungi una nota
diff --git a/Step/wwwroot/src/components/scada.ts b/Step/wwwroot/src/components/scada.ts new file mode 100644 index 00000000..e69de29b diff --git a/Step/wwwroot/src/components/scada.vue b/Step/wwwroot/src/components/scada.vue new file mode 100644 index 00000000..bebbe26e --- /dev/null +++ b/Step/wwwroot/src/components/scada.vue @@ -0,0 +1,8 @@ + + \ No newline at end of file diff --git a/Step/wwwroot/src/components/tooling/tooling-equipment.ts b/Step/wwwroot/src/components/tooling/tooling-equipment.ts index 7af48188..a8c951dc 100644 --- a/Step/wwwroot/src/components/tooling/tooling-equipment.ts +++ b/Step/wwwroot/src/components/tooling/tooling-equipment.ts @@ -28,6 +28,10 @@ export default class toolingEquipment extends Vue { return (this.$store.state as AppModel).tooling.maxTools; } + public get maxOffsets(): number { + return (this.$store.state as AppModel).tooling.maxOffsets; + } + public get maxEdgesPerTools(): number { return (this.$store.state as AppModel).tooling.maxEdgesPerTools; } @@ -94,6 +98,12 @@ export default class toolingEquipment extends Vue { public disableList: any = false; public enableAddEquipment: any = false; public enableAddEdge: any = false; + public enableAddOffsetToTool: boolean = false; + public offsetId: Array = []; + public availablePos: Array = []; + + public offsetSelected: any = null; + public posSelected: any = null; public maxToolsSiemens(){ if (this.tools.length < this.maxTools) { @@ -209,6 +219,7 @@ export default class toolingEquipment extends Vue { this.copySelectedTool = Object.assign({}, item); this.enableParameters = true; this.enableEquipment = false; + this.enableAddOffsetToTool = false; this.selectedEquipment = null; this.enableModify = false; if(this.isSiemens){ @@ -281,9 +292,11 @@ export default class toolingEquipment extends Vue { } public selectTab(elem) { + debugger if (elem == 'Parameters') { this.enableParameters = true; this.enableEquipment = false; + this.enableAddOffsetToTool = false; this.selectedEquipment = null; this.enableModify = false; } @@ -291,6 +304,7 @@ export default class toolingEquipment extends Vue { this.fieldEdge(elem); this.selectedEquipment = elem; this.enableEquipment = true; + this.enableAddOffsetToTool = true; this.enableParameters = false; this.enableModify = true; } @@ -300,23 +314,33 @@ export default class toolingEquipment extends Vue { this.selectedEquipment = elem; this.enableEquipment = true; this.enableParameters = false; + this.enableAddOffsetToTool = false; this.enableModify = false; } else { this.selectedEquipment = null; this.enableParameters = true; this.enableEquipment = false; + this.enableAddOffsetToTool = false; this.enableModify = false; } } public selectTabNc(elem) { + debugger if (elem == 'Parameters') { this.enableParameters = true; this.enableEquipment = false; this.selectedEquipment = null; this.enableModify = false; } + else if(elem.id < 0){ + this.selectedEquipment = elem; + this.enableEquipment = false; + this.enableAddOffsetToTool = true; + this.enableParameters = false; + this.enableModify = true; + } else if (elem.id >= 0) { this.toolsConfiguration = (this.$store.state as AppModel).tooling.toolsConfiguration; this.edgeConfiguration = (this.$store.state as AppModel).tooling.edgesConfiguration; @@ -354,7 +378,36 @@ export default class toolingEquipment extends Vue { } } + this.enableAddOffsetToTool = false; + this.enableModify = false; + this.disableList = false; + this.$forceUpdate(); + + } + + public cancelNc = function () { + + // if (this.copySelectedTool) { + // this.selectedTool = this.copySelectedTool; + // toolingActions.updateTool(store, this.copySelectedTool); + // } + if (this.selectedTool.id == null || this.selectedTool.id == 0) { + this.selectedTool = null; + } + else { + + for (let l in this.selectedTool.offsetData) { + if (this.selectedTool.offsetData[l] && this.selectedTool.offsetData[l].id <= 0) { + this.selectedTool.offsetData.splice(l, 1); + this.selectedEquipment = null; + this.enableEquipment = false; + this.enableParameters = true; + } + } + } + + this.enableAddOffsetToTool = false; this.enableModify = false; this.disableList = false; @@ -385,10 +438,53 @@ export default class toolingEquipment extends Vue { } public addOffset(tool){ - ModalHelper.offsetAddModal.idTool = tool.id; - ModalHelper.offsetAddModal.offsetData = tool.offsetData; - ModalHelper.ShowModal(ModalAddOffsetTool); - this.selectedTool = null; + debugger + var num; + this.offsetId = []; + this.availablePos = []; + for(let k = 1; k <= this.maxOffsets; k++){ + this.offsetId.push(k); + } + for(const key in tool.offsetData){ + if(tool.offsetData[key] == null){ + num = parseInt(key) + 1; + this.availablePos.push(num); + } + } + // this.enableAddOffsetToTool = true; + // this.enableEquipment = false; + // this.enableParameters = false; + // this.enableModify = true; + var obj = {}; + obj["id"] = -1; + tool.offsetData.push(obj); + this.selectTabNc(obj); + // ModalHelper.offsetAddModal.idTool = tool.id; + // ModalHelper.offsetAddModal.offsetData = tool.offsetData; + // ModalHelper.ShowModal(ModalAddOffsetTool); + // this.selectedTool = null; + } + public addOffsetToTool(tool) { + debugger + let idOffset = this.offsetSelected; + let pos= this.posSelected; + awaiter(new ToolingService().AddOffsetToToolPosition(pos, tool.id,idOffset).then(response => { + this.selectedTool = response; + this.selectedTool.offsetData = [response.offset1, response.offset2, response.offset3]; + // for(let k in response.offsetData){ + // if(response.offsetData[k] && response.offsetData[k].id == idOffset){ + // this.selectTabNc(response.offsetData[k]); + // } + // } + for (let l in tool.offsetData) { + if (tool.offsetData[l] && tool.offsetData[l].id < 0) { + tool.offsetData.splice(l, 1); + } + } + this.disableList = false; + this.enableEquipment = false; + this.enableParameters = true; + })) } async save(item) { @@ -551,7 +647,12 @@ export default class toolingEquipment extends Vue { else{ var position = tool.offsetData.indexOf(model) + 1; awaiter(new ToolingService().DeleteOffsetFromTool(position, tool.id).then(response => { - this.selectedTool = null; + this.selectedTool = response; + this.selectedTool.offsetData = [response.offset1, response.offset2, response.offset3]; + this.selectedEquipment = null; + this.enableEquipment = false; + this.enableParameters = true; + this.enableModify = false; })); } }, null); diff --git a/Step/wwwroot/src/components/tooling/tooling-equipment.vue b/Step/wwwroot/src/components/tooling/tooling-equipment.vue index 18edabaa..15759c7b 100644 --- a/Step/wwwroot/src/components/tooling/tooling-equipment.vue +++ b/Step/wwwroot/src/components/tooling/tooling-equipment.vue @@ -52,7 +52,8 @@
@@ -137,7 +138,7 @@
-
+
{{'tooling_equipment_list_category_' + ce | localize(ce)}}
{{'tooling_equipment_button_add' | localize("Aggiungi")}} -->
+ +
+
{{'tooling_addoffset_label' | localize("Scegliere posizione e id dell'Offset da aggiungere")}}
+ +
+
+
+ + + + + + +
+ +
+ +
+ +
+