diff --git a/Step/wwwroot/assets/styles/base/card.less b/Step/wwwroot/assets/styles/base/card.less index 04d7101b..f33a06fd 100644 --- a/Step/wwwroot/assets/styles/base/card.less +++ b/Step/wwwroot/assets/styles/base/card.less @@ -1360,3 +1360,27 @@ } } } + +.objects-job{ + width: 456px; + height: 72px; + border-radius: 2px; + background-color: @color-background-white; + box-shadow: 0 1px 2px 0 @color-black-40; + display: flex; + flex-flow: row; + align-items: center; + .objects-job-image{ + margin-left: 8px; + } + .objects-job-title{ + margin-left: 24px; + font-size: 18px; + font-weight: 600; + line-height: 1.11; + color: @color-greyish-brown; + } +} +.min{ + height: 40px; +} \ No newline at end of file diff --git a/Step/wwwroot/assets/styles/base/job-editor.less b/Step/wwwroot/assets/styles/base/job-editor.less new file mode 100644 index 00000000..4979c09b --- /dev/null +++ b/Step/wwwroot/assets/styles/base/job-editor.less @@ -0,0 +1,110 @@ +// out: false, sourceMap: false, main: ../style.less +@import "colors.less"; + +.job-editor-container{ + height: 100%; + width: 100%; + display: flex; + justify-content: center; + padding-top: 104px; + .job-editor-box{ + width: 1808px; + height: 872px; + border-radius: 2px; + background-color: @color-background-white; + box-shadow: 0 1px 2px 0 @color-black-40; + .job-editor-header{ + width: 100%; + height: 79px; + display: flex; + flex-flow: row; + align-items: center; + border-bottom: solid 2px @color-whitethree; + .title{ + width: 145px; + justify-content: flex-start; + margin-left: 23px; + font-size: 20px; + color: @color-darkish-blue; + label{ + width: 145px; + height: 24px; + } + } + .search-job{ + display: flex; + flex-flow: row; + margin-left: 24px; + input{ + width: 288px; + height: 48px; + border-radius: 2px; + } + } + .group-button{ + display: flex; + flex-flow: row; + width: 100%; + justify-content: flex-end; + } + } + .job-editor-body{ + width: 100%; + height: 711px; + display: flex; + flex-flow: row; + align-items: center; + .job-editor-column-left{ + width: 488px; + height: 711px; + display: flex; + flex-flow: column; + justify-content: flex-start; + .column-left-title{ + display: flex; + justify-content: center; + width: 100%; + margin-top: 24px; + margin-bottom: 23px; + span{ + width: 456px; + font-size: 18px; + line-height: 1.11; + color: @color-greyish-brown; + } + } + .column-left-objects-big, .column-left-objects-small{ + display: flex; + justify-content: center; + width: 100%; + margin: 8px 0; + } + } + .job-editor-body-box{ + width: 1320px; + height: 711px; + display: flex; + justify-content: flex-end; + background-color: @color-whitethree; + } + } + .job-editor-footer{ + display: flex; + flex-flow: row; + align-items: center; + width: 100%; + height: 78px; + border-top: solid 2px @color-whitethree; + .button-left{ + display: flex; + width: 100%; + justify-content: flex-start; + } + .button-right{ + display: flex; + width: 100%; + justify-content: flex-end; + } + } + } +} \ No newline at end of file diff --git a/Step/wwwroot/assets/styles/base/layout.less b/Step/wwwroot/assets/styles/base/layout.less index c9a08a2e..1645096b 100644 --- a/Step/wwwroot/assets/styles/base/layout.less +++ b/Step/wwwroot/assets/styles/base/layout.less @@ -30,6 +30,7 @@ @import "production.less"; @import "create-queue.less"; @import "program-management.less"; +@import "job-editor.less"; @background-color: rgb(216, 216, 216); @handle-width: 48px; diff --git a/Step/wwwroot/assets/styles/base/modals.less b/Step/wwwroot/assets/styles/base/modals.less index ed91e8a4..a0aa3faa 100644 --- a/Step/wwwroot/assets/styles/base/modals.less +++ b/Step/wwwroot/assets/styles/base/modals.less @@ -1383,6 +1383,35 @@ display: flex; flex-flow: column; justify-content: flex-start; + .box-image{ + display: flex; + justify-content: center; + height: 415px; + width: 752px; + } + .box-text{ + height: 104px; + width: 834px; + display: flex; + flex-flow: column; + margin: 0 auto; + .title{ + display: flex; + font-size: 18px; + line-height: 1; + color: @color-darkish-blue; + } + .text{ + display: flex; + margin-left: 14px; + width: 820px; + height: 72px; + font-size: 18px; + line-height: 1; + margin-top: 14px; + color: @color-greyish-brown; + } + } .box-tag-tool { height: 100%; width: 100%; @@ -1408,6 +1437,80 @@ width: 96px; } } + .box-tag-times{ + width: 100%; + height: 100%; + display: flex; + flex-flow: column; + align-items: center; + .row-time{ + width: 100%; + display: flex; + justify-content: space-around; + align-items: center; + flex-flow: row; + font-size: 18px; + font-weight: 600; + line-height: 1.11; + color: @color-greyish-brown; + margin-top: 39px; + .box-time-to-use{ + display: flex; + float: left; + flex-flow: column; + label{ + margin-bottom: 36px; + } + } + .box-time-average-time{ + display: flex; + float: right; + flex-flow: column; + label{ + margin-bottom: 36px; + } + } + } + .box-history-time{ + .box-history-time-title{ + width: 100%; + display: flex; + justify-content: center; + margin-top: 64px; + } + table{ + width: 720px; + height: 240px; + border-radius: 2px; + border: solid 1px @color-label-grey; + table-layout: fixed; + tr{ + width: 100%; + display: table; + } + thead tr{ + height: 48px; + } + tbody{ + display: block; + width: 720px; + height: 192px; + tr{ + height: 64px; + width: 100%; + td{ + text-align: center; + div{ + margin: 0 auto; + } + } + } + } + tr:nth-child(even) {background: #dddddd} + tr:nth-child(odd) {background: #FFF} + } + } + } } } .modal-edit-job-footer { diff --git a/Step/wwwroot/assets/styles/style.css b/Step/wwwroot/assets/styles/style.css index d4f8fb57..8ccfcc7a 100644 --- a/Step/wwwroot/assets/styles/style.css +++ b/Step/wwwroot/assets/styles/style.css @@ -1309,6 +1309,35 @@ flex-flow: column; justify-content: flex-start; } +.modal.modal-edit-job .modal-edit-job-body .modal-edit-job-box .box-image { + display: flex; + justify-content: center; + height: 415px; + width: 752px; +} +.modal.modal-edit-job .modal-edit-job-body .modal-edit-job-box .box-text { + height: 104px; + width: 834px; + display: flex; + flex-flow: column; + margin: 0 auto; +} +.modal.modal-edit-job .modal-edit-job-body .modal-edit-job-box .box-text .title { + display: flex; + font-size: 18px; + line-height: 1; + color: #002680; +} +.modal.modal-edit-job .modal-edit-job-body .modal-edit-job-box .box-text .text { + display: flex; + margin-left: 14px; + width: 820px; + height: 72px; + font-size: 18px; + line-height: 1; + margin-top: 14px; + color: #4b4b4b; +} .modal.modal-edit-job .modal-edit-job-body .modal-edit-job-box .box-tag-tool { height: 100%; width: 100%; @@ -1334,6 +1363,82 @@ .modal.modal-edit-job .modal-edit-job-body .modal-edit-job-box .box-tag-params .input-box .control input { width: 96px; } +.modal.modal-edit-job .modal-edit-job-body .modal-edit-job-box .box-tag-times { + width: 100%; + height: 100%; + display: flex; + flex-flow: column; + align-items: center; +} +.modal.modal-edit-job .modal-edit-job-body .modal-edit-job-box .box-tag-times .row-time { + width: 100%; + display: flex; + justify-content: space-around; + align-items: center; + flex-flow: row; + font-size: 18px; + font-weight: 600; + line-height: 1.11; + color: #4b4b4b; + margin-top: 39px; +} +.modal.modal-edit-job .modal-edit-job-body .modal-edit-job-box .box-tag-times .row-time .box-time-to-use { + display: flex; + float: left; + flex-flow: column; +} +.modal.modal-edit-job .modal-edit-job-body .modal-edit-job-box .box-tag-times .row-time .box-time-to-use label { + margin-bottom: 36px; +} +.modal.modal-edit-job .modal-edit-job-body .modal-edit-job-box .box-tag-times .row-time .box-time-average-time { + display: flex; + float: right; + flex-flow: column; +} +.modal.modal-edit-job .modal-edit-job-body .modal-edit-job-box .box-tag-times .row-time .box-time-average-time label { + margin-bottom: 36px; +} +.modal.modal-edit-job .modal-edit-job-body .modal-edit-job-box .box-tag-times .box-history-time .box-history-time-title { + width: 100%; + display: flex; + justify-content: center; + margin-top: 64px; +} +.modal.modal-edit-job .modal-edit-job-body .modal-edit-job-box .box-tag-times .box-history-time table { + width: 720px; + height: 240px; + border-radius: 2px; + border: solid 1px #979797; + table-layout: fixed; +} +.modal.modal-edit-job .modal-edit-job-body .modal-edit-job-box .box-tag-times .box-history-time table tr { + width: 100%; + display: table; +} +.modal.modal-edit-job .modal-edit-job-body .modal-edit-job-box .box-tag-times .box-history-time table thead tr { + height: 48px; +} +.modal.modal-edit-job .modal-edit-job-body .modal-edit-job-box .box-tag-times .box-history-time table tbody { + display: block; + width: 720px; + height: 192px; +} +.modal.modal-edit-job .modal-edit-job-body .modal-edit-job-box .box-tag-times .box-history-time table tbody tr { + height: 64px; + width: 100%; +} +.modal.modal-edit-job .modal-edit-job-body .modal-edit-job-box .box-tag-times .box-history-time table tbody tr td { + text-align: center; +} +.modal.modal-edit-job .modal-edit-job-body .modal-edit-job-box .box-tag-times .box-history-time table tbody tr td div { + margin: 0 auto; +} +.modal.modal-edit-job .modal-edit-job-body .modal-edit-job-box .box-tag-times .box-history-time table tr:nth-child(even) { + background: #dddddd; +} +.modal.modal-edit-job .modal-edit-job-body .modal-edit-job-box .box-tag-times .box-history-time table tr:nth-child(odd) { + background: #FFF; +} .modal.modal-edit-job .modal-edit-job-footer { height: 78px; border-top: solid 2px #979797; @@ -5457,6 +5562,29 @@ footer .container button.big:before { .selected-path-drive.dark * { color: #fff !important; } +.objects-job { + width: 456px; + height: 72px; + border-radius: 2px; + background-color: #fff; + box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.4); + display: flex; + flex-flow: row; + align-items: center; +} +.objects-job .objects-job-image { + margin-left: 8px; +} +.objects-job .objects-job-title { + margin-left: 24px; + font-size: 18px; + font-weight: 600; + line-height: 1.11; + color: #4b4b4b; +} +.min { + height: 40px; +} @keyframes selectedanimation { 0% { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.4); @@ -11526,6 +11654,114 @@ footer .container button.big:before { align-items: center; justify-content: center; } +.job-editor-container { + height: 100%; + width: 100%; + display: flex; + justify-content: center; + padding-top: 104px; +} +.job-editor-container .job-editor-box { + width: 1808px; + height: 872px; + border-radius: 2px; + background-color: #fff; + box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.4); +} +.job-editor-container .job-editor-box .job-editor-header { + width: 100%; + height: 79px; + display: flex; + flex-flow: row; + align-items: center; + border-bottom: solid 2px #e7e7e7; +} +.job-editor-container .job-editor-box .job-editor-header .title { + width: 145px; + justify-content: flex-start; + margin-left: 23px; + font-size: 20px; + color: #002680; +} +.job-editor-container .job-editor-box .job-editor-header .title label { + width: 145px; + height: 24px; +} +.job-editor-container .job-editor-box .job-editor-header .search-job { + display: flex; + flex-flow: row; + margin-left: 24px; +} +.job-editor-container .job-editor-box .job-editor-header .search-job input { + width: 288px; + height: 48px; + border-radius: 2px; +} +.job-editor-container .job-editor-box .job-editor-header .group-button { + display: flex; + flex-flow: row; + width: 100%; + justify-content: flex-end; +} +.job-editor-container .job-editor-box .job-editor-body { + width: 100%; + height: 711px; + display: flex; + flex-flow: row; + align-items: center; +} +.job-editor-container .job-editor-box .job-editor-body .job-editor-column-left { + width: 488px; + height: 711px; + display: flex; + flex-flow: column; + justify-content: flex-start; +} +.job-editor-container .job-editor-box .job-editor-body .job-editor-column-left .column-left-title { + display: flex; + justify-content: center; + width: 100%; + margin-top: 24px; + margin-bottom: 23px; +} +.job-editor-container .job-editor-box .job-editor-body .job-editor-column-left .column-left-title span { + width: 456px; + font-size: 18px; + line-height: 1.11; + color: #4b4b4b; +} +.job-editor-container .job-editor-box .job-editor-body .job-editor-column-left .column-left-objects-big, +.job-editor-container .job-editor-box .job-editor-body .job-editor-column-left .column-left-objects-small { + display: flex; + justify-content: center; + width: 100%; + margin: 8px 0; +} +.job-editor-container .job-editor-box .job-editor-body .job-editor-body-box { + width: 1320px; + height: 711px; + display: flex; + justify-content: flex-end; + background-color: #e7e7e7; +} +.job-editor-container .job-editor-box .job-editor-footer { + display: flex; + flex-flow: row; + align-items: center; + width: 100%; + height: 78px; + border-top: solid 2px #e7e7e7; +} +.job-editor-container .job-editor-box .job-editor-footer .button-left { + display: flex; + width: 100%; + justify-content: flex-start; +} +.job-editor-container .job-editor-box .job-editor-footer .button-right { + display: flex; + width: 100%; + justify-content: flex-end; +} a, a:visited, a:hover, diff --git a/Step/wwwroot/src/app.modules.js b/Step/wwwroot/src/app.modules.js index ffdd8d62..ec1fb606 100644 --- a/Step/wwwroot/src/app.modules.js +++ b/Step/wwwroot/src/app.modules.js @@ -97,6 +97,12 @@ export const DepotActionUnloading = () => export const DepotActionGeneric = () => import ("./components/tooling/depot-action-generic.vue"); +export const JobEditor = () => + import ("./components/job-editor.vue"); + +export const ObjectsJob = () => + import ("./modules/base-components/cards/objects-job.vue"); + // export const Utilities = () => // import ("./components/utilities.vue"); @@ -153,4 +159,4 @@ export const TestEmpty = () => import ("./components/test-empty.vue"); export const TestHeader = () => import ("./components/test-status.vue"); -import ("./components/test-status.vue"); +import ("./components/test-status.vue"); \ No newline at end of file diff --git a/Step/wwwroot/src/app.routes.js b/Step/wwwroot/src/app.routes.js index 4fe12e0f..6db04469 100644 --- a/Step/wwwroot/src/app.routes.js +++ b/Step/wwwroot/src/app.routes.js @@ -44,7 +44,9 @@ import { ModalLoadProgram, ProgramManagement, ModalJobAddParameter, - ModalEditJob + ModalEditJob, + JobEditor, + ObjectsJob } from "./app.modules"; export let routes = [ @@ -90,6 +92,10 @@ export let routes = [ { path: "/depot-action-unloading", component: DepotActionUnloading, meta: { title: "Step - Depot-Action-Unloading", area: "depot-action-unloading" } }, { path: "/depot-action-generic", component: DepotActionGeneric, meta: { title: "Step - Depot-Action-Generic", area: "depot-action-generic" } }, + { path: "/job-editor", component: JobEditor, meta: { title: "Job-Editor", area: "job-editor" } }, + + { path: "/objects-job", component: ObjectsJob, meta: { title: "Objects Job", area: "objects-jobs" } }, + { path: "/program-management", component: ProgramManagement, meta: { title: "Step - Program-Management", area: "program-management" } }, { path: "/maintenance-progress", component: MaintenanceProgress, meta: { title: "Step - Maintenance-Progress", area: "maintenance-progress" } }, diff --git a/Step/wwwroot/src/components/job-editor.ts b/Step/wwwroot/src/components/job-editor.ts new file mode 100644 index 00000000..caaa7732 --- /dev/null +++ b/Step/wwwroot/src/components/job-editor.ts @@ -0,0 +1,7 @@ +import Vue from "vue"; +import Component from "vue-class-component"; +import {objectsJob} from "src/modules/base-components/cards"; +declare let $: any; +@Component({ components: { objectsJob } }) +export default class JobEditor extends Vue { +} \ No newline at end of file diff --git a/Step/wwwroot/src/components/job-editor.vue b/Step/wwwroot/src/components/job-editor.vue new file mode 100644 index 00000000..ca175d67 --- /dev/null +++ b/Step/wwwroot/src/components/job-editor.vue @@ -0,0 +1,49 @@ + + \ No newline at end of file diff --git a/Step/wwwroot/src/components/tooling/tooling-depot.ts b/Step/wwwroot/src/components/tooling/tooling-depot.ts index 9a041b6d..a71f6284 100644 --- a/Step/wwwroot/src/components/tooling/tooling-depot.ts +++ b/Step/wwwroot/src/components/tooling/tooling-depot.ts @@ -95,6 +95,8 @@ export default class depot extends Vue { public draggingTool: any = null; public draggingPosition: number = null; + public typeNc: string = "Osai"; + @Watch("searchText") public applyFilter(n) { this.currentFilter = n.toLowerCase(); @@ -139,13 +141,25 @@ export default class depot extends Vue { async loadData() { - return Promise.all([ - new DepotService().GetMagazine(this.$route.params.id), - new DepotService().GetToolAvailable(), - new ToolingService().GetMagazinePositionDepot(this.$route.params.id), - new ToolingService().GetTools(), - new ToolingService().GetShanks() - ]); + if(this.typeNc == "Demo"){ + return Promise.all([ + new DepotService().GetMagazine(this.$route.params.id), + new DepotService().GetToolAvailable(), + new ToolingService().GetMagazinePositionDepot(this.$route.params.id), + new ToolingService().GetTools(), + new ToolingService().GetShanks() + ]); + } + else{ + return Promise.all([ + new DepotService().GetNcMagazine(this.$route.params.id), + new DepotService().GetNcShankAvailable(), + new ToolingService().GetNcMagazinePositionDepot(this.$route.params.id), + new ToolingService().GetNcTools(), + new ToolingService().GetNcShanks() + ]); + } + } updated() { @@ -234,11 +248,20 @@ export default class depot extends Vue { this.depotId = id; this.$router.push({ name: 'tooling-depot', params: { id: id } }); - awaiter (Promise.all([ + if(this.typeNc == "Demo"){ + awaiter (Promise.all([ new DepotService().GetMagazine(id), new ToolingService().GetMagazinePositionDepot(id), new ToolingService().GetTools() ])); + } + else{ + awaiter (Promise.all([ + new DepotService().GetNcMagazine(id), + new ToolingService().GetNcMagazinePositionDepot(id), + new ToolingService().GetNcTools() + ])); + } // this.magazines; } @@ -283,17 +306,34 @@ export default class depot extends Vue { this.draggingIn = false; this.draggingTool = null; var toolToAdd = event.payload; - new DepotService().AddToolToDepot(this.depotId, position, { toolId: toolToAdd.id }).then(response => { + if(this.typeNc == "Demo"){ + new DepotService().AddToolToDepot(this.depotId, position, { toolId: toolToAdd.id }).then(response => { + + }); + } + else{ + new DepotService().AddToolToDepotNc(this.depotId, position, { toolId: toolToAdd.id }).then(response => { + + }); + } - }); } } public removeToolsToDepot(position, toolToAdd) { - if (this.editable) - new DepotService().RemoveToolToDepot(this.depotId, position).then(response => { + if (this.editable){ + if(this.typeNc == "Demo"){ + new DepotService().RemoveToolToDepot(this.depotId, position).then(response => { + + }); + } + else{ + new DepotService().RemoveToolToDepotNc(this.depotId, position).then(response => { + + }); + } + } - }); } public goToPosition(index) { diff --git a/Step/wwwroot/src/components/tooling/tooling-equipment.ts b/Step/wwwroot/src/components/tooling/tooling-equipment.ts index c52aedc8..6becaf80 100644 --- a/Step/wwwroot/src/components/tooling/tooling-equipment.ts +++ b/Step/wwwroot/src/components/tooling/tooling-equipment.ts @@ -32,30 +32,32 @@ export default class toolingEquipment extends Vue { public searchText: string = ""; public currentFilter: string = ""; + public typeNc: string = "Osai"; + @Watch("searchText") public applyFilter(n) { this.currentFilter = n.toLowerCase(); // this.currentFilter = this.searchText.toLowerCase(); } - @Watch("magazineStatusModel") - public modalBlockMagazine(){ - if(this.magazineStatusModel.action == 0){ - ModalHelper.HideModal("modal2"); - } - else if(this.magazineStatusModel.action == 1){ - ModalHelper.ShowModal(DepotActionLoading, "modal2"); - } - else if(this.magazineStatusModel.action == 2){ - ModalHelper.ShowModal(DepotActionUnloading, "modal2"); - } - else if(this.magazineStatusModel.action == 4){ - ModalHelper.ShowModal(DepotActionTransfer, "modal2"); - } - else if(this.magazineStatusModel.action == 5){ - ModalHelper.ShowModal(DepotActionGeneric, "modal2"); - } - } + // @Watch("magazineStatusModel") + // public modalBlockMagazine(){ + // if(this.magazineStatusModel.action == 0){ + // ModalHelper.HideModal("modal2"); + // } + // else if(this.magazineStatusModel.action == 1){ + // ModalHelper.ShowModal(DepotActionLoading, "modal2"); + // } + // else if(this.magazineStatusModel.action == 2){ + // ModalHelper.ShowModal(DepotActionUnloading, "modal2"); + // } + // else if(this.magazineStatusModel.action == 4){ + // ModalHelper.ShowModal(DepotActionTransfer, "modal2"); + // } + // else if(this.magazineStatusModel.action == 5){ + // ModalHelper.ShowModal(DepotActionGeneric, "modal2"); + // } + // } public toolsConfiguration: server.ToolsConfiguration[] = null; @@ -92,10 +94,20 @@ export default class toolingEquipment extends Vue { async mounted() { - awaiter (Promise.all([ - new ToolingService().GetTools(), - new ToolingService().GetToolsConfiguration() - ])); + if(this.typeNc == "Demo"){ + awaiter (Promise.all([ + new ToolingService().GetTools(), + new ToolingService().GetToolsConfiguration() + ])); + } + else{ + awaiter (Promise.all([ + new ToolingService().GetNcTools(), + new ToolingService().GetToolsConfiguration() + ])); + } + + this.toolsConfiguration = (this.$store.state as AppModel).tooling.toolsConfiguration; this.edgeConfiguration = (this.$store.state as AppModel).tooling.edgesConfiguration; @@ -113,7 +125,7 @@ export default class toolingEquipment extends Vue { this.$nextTick(() => this.scrollList(this.tools.indexOf(tool))); } } - this.modalBlockMagazine(); + // this.modalBlockMagazine(); } public scrollList(top){ @@ -295,24 +307,48 @@ export default class toolingEquipment extends Vue { } async save(item) { - await awaiter(new ToolingService().SetSiemensTool(item).then(response => { - this.selectedTool = response; - let htmlelement = this.$refs.toolList as any; - htmlelement.scrollTop = htmlelement.scrollHeight; + if(this.typeNc == "Demo"){ + await awaiter(new ToolingService().SetSiemensTool(item).then(response => { + this.selectedTool = response; + let htmlelement = this.$refs.toolList as any; + htmlelement.scrollTop = htmlelement.scrollHeight; + + this.toolsConfiguration = (this.$store.state as AppModel).tooling.toolsConfiguration; + this.edgeConfiguration = (this.$store.state as AppModel).tooling.edgesConfiguration; + this.disableList = false; + })); + } + else{ + await awaiter(new ToolingService().SetNcTool(item).then(response => { + this.selectedTool = response; + let htmlelement = this.$refs.toolList as any; + htmlelement.scrollTop = htmlelement.scrollHeight; + + this.toolsConfiguration = (this.$store.state as AppModel).tooling.toolsConfiguration; + this.edgeConfiguration = (this.$store.state as AppModel).tooling.edgesConfiguration; + this.disableList = false; + })); + } - this.toolsConfiguration = (this.$store.state as AppModel).tooling.toolsConfiguration; - this.edgeConfiguration = (this.$store.state as AppModel).tooling.edgesConfiguration; - this.disableList = false; - })); } async modifyTool(model) { - await awaiter(new ToolingService().UpdateSiemensTool(model).then(response => { - this.toolsConfiguration = (this.$store.state as AppModel).tooling.toolsConfiguration; - this.edgeConfiguration = (this.$store.state as AppModel).tooling.edgesConfiguration; - this.disableList = false; - this.enableModify = false; - })); + if(this.typeNc == "Demo"){ + await awaiter(new ToolingService().UpdateSiemensTool(model).then(response => { + this.toolsConfiguration = (this.$store.state as AppModel).tooling.toolsConfiguration; + this.edgeConfiguration = (this.$store.state as AppModel).tooling.edgesConfiguration; + this.disableList = false; + this.enableModify = false; + })); + } + else{ + await awaiter(new ToolingService().UpdateNcTool(model).then(response => { + this.toolsConfiguration = (this.$store.state as AppModel).tooling.toolsConfiguration; + this.edgeConfiguration = (this.$store.state as AppModel).tooling.edgesConfiguration; + this.disableList = false; + this.enableModify = false; + })); + } } async saveEdge(tool, model) { @@ -372,9 +408,16 @@ export default class toolingEquipment extends Vue { ModalHelper.AskConfirm(this.$options.filters.localize("modal_confirm_delete", "Richiesta di conferma"), this.$options.filters.localize("modal_confirm_delete_tool", "Confermi la cancellazione del tool?"), () => { - awaiter(new ToolingService().DeleteTool(model).then(response => { - this.selectedTool = null; - })); + if(this.typeNc == "Demo"){ + awaiter(new ToolingService().DeleteTool(model).then(response => { + this.selectedTool = null; + })); + } + else{ + awaiter(new ToolingService().DeleteNcTool(model).then(response => { + this.selectedTool = null; + })); + } }, null); } diff --git a/Step/wwwroot/src/components/tooling/tooling-families.ts b/Step/wwwroot/src/components/tooling/tooling-families.ts index cd5bccdb..f48d282d 100644 --- a/Step/wwwroot/src/components/tooling/tooling-families.ts +++ b/Step/wwwroot/src/components/tooling/tooling-families.ts @@ -24,29 +24,31 @@ export default class toolingFamilies extends Vue { public searchText: string = ""; public currentFilter : string = ""; + public typeNc: string = "Osai"; + @Watch("searchText") public applyFilter(n) { this.currentFilter = n.toLowerCase(); } - @Watch("magazineStatusModel") - public modalBlockMagazine(){ - if(this.magazineStatusModel.action == 0){ - ModalHelper.HideModal("modal2"); - } - else if(this.magazineStatusModel.action == 1){ - ModalHelper.ShowModal(DepotActionLoading, "modal2"); - } - else if(this.magazineStatusModel.action == 2){ - ModalHelper.ShowModal(DepotActionUnloading, "modal2"); - } - else if(this.magazineStatusModel.action == 4){ - ModalHelper.ShowModal(DepotActionTransfer, "modal2"); - } - else if(this.magazineStatusModel.action == 5){ - ModalHelper.ShowModal(DepotActionGeneric, "modal2"); - } - } + // @Watch("magazineStatusModel") + // public modalBlockMagazine(){ + // if(this.magazineStatusModel.action == 0){ + // ModalHelper.HideModal("modal2"); + // } + // else if(this.magazineStatusModel.action == 1){ + // ModalHelper.ShowModal(DepotActionLoading, "modal2"); + // } + // else if(this.magazineStatusModel.action == 2){ + // ModalHelper.ShowModal(DepotActionUnloading, "modal2"); + // } + // else if(this.magazineStatusModel.action == 4){ + // ModalHelper.ShowModal(DepotActionTransfer, "modal2"); + // } + // else if(this.magazineStatusModel.action == 5){ + // ModalHelper.ShowModal(DepotActionGeneric, "modal2"); + // } + // } public get categories(): string[] { let cat: Set = new Set(); @@ -66,10 +68,18 @@ export default class toolingFamilies extends Vue { async mounted() { - awaiter (Promise.all([ - new ToolingService().GetFamilies(), - new ToolingService().GetToolsConfiguration() - ])); + if(this.typeNc == "Demo"){ + awaiter (Promise.all([ + new ToolingService().GetFamilies(), + new ToolingService().GetToolsConfiguration() + ])); + } + else{ + awaiter (Promise.all([ + new ToolingService().GetNcFamilies(), + new ToolingService().GetToolsConfiguration() + ])); + } this.familyConfiguration = (this.$store.state as AppModel).tooling.familyConfiguration; @@ -77,7 +87,7 @@ export default class toolingFamilies extends Vue { this.scrollTop -= (delta * 40); e.preventDefault(); }); - this.modalBlockMagazine(); + // this.modalBlockMagazine(); } updated() { $('.tab-box-scroll').mousewheel(function (e, delta) { @@ -143,22 +153,42 @@ export default class toolingFamilies extends Vue { async save(item) { - awaiter (new ToolingService().SetFamily(item).then(response => { - this.selectedTool = response; - let htmlelement = this.$refs.familyList as any; - htmlelement.scrollTop = htmlelement.scrollHeight; - - this.familyConfiguration = (this.$store.state as AppModel).tooling.familyConfiguration; - this.disableList = false; - })); + if(this.typeNc == "Demo"){ + awaiter (new ToolingService().SetFamily(item).then(response => { + this.selectedTool = response; + let htmlelement = this.$refs.familyList as any; + htmlelement.scrollTop = htmlelement.scrollHeight; + + this.familyConfiguration = (this.$store.state as AppModel).tooling.familyConfiguration; + this.disableList = false; + })); + } + else{ + awaiter (new ToolingService().SetNcFamily(item).then(response => { + this.selectedTool = response; + let htmlelement = this.$refs.familyList as any; + htmlelement.scrollTop = htmlelement.scrollHeight; + + this.familyConfiguration = (this.$store.state as AppModel).tooling.familyConfiguration; + this.disableList = false; + })); + } } async modifyFamily(model) { - awaiter (new ToolingService().UpdateFamily(model).then(response => { - this.familyConfiguration = (this.$store.state as AppModel).tooling.familyConfiguration; - this.disableList = false; - })); + if(this.typeNc == "Demo"){ + awaiter (new ToolingService().UpdateFamily(model).then(response => { + this.familyConfiguration = (this.$store.state as AppModel).tooling.familyConfiguration; + this.disableList = false; + })); + } + else{ + awaiter (new ToolingService().UpdateNcFamily(model).then(response => { + this.familyConfiguration = (this.$store.state as AppModel).tooling.familyConfiguration; + this.disableList = false; + })); + } } @@ -173,8 +203,16 @@ export default class toolingFamilies extends Vue { } async deleteFamily(model) { - awaiter (new ToolingService().DeleteFamily(model).then(response => { - this.selectedTool = null; - })); + if(this.typeNc == "Demo"){ + awaiter (new ToolingService().DeleteFamily(model).then(response => { + this.selectedTool = null; + })); + } + else{ + awaiter (new ToolingService().DeleteNcFamily(model).then(response => { + this.selectedTool = null; + })); + } + } } diff --git a/Step/wwwroot/src/components/tooling/tooling-magpos.ts b/Step/wwwroot/src/components/tooling/tooling-magpos.ts index 445bb668..eee30206 100644 --- a/Step/wwwroot/src/components/tooling/tooling-magpos.ts +++ b/Step/wwwroot/src/components/tooling/tooling-magpos.ts @@ -28,38 +28,48 @@ export default class toolingMagPos extends Vue { this.currentFilter = n.toLowerCase(); } - @Watch("magazineStatusModel") - public modalBlockMagazine(){ - if(this.magazineStatusModel.action == 0){ - ModalHelper.HideModal("modal2"); - } - else if(this.magazineStatusModel.action == 1){ - ModalHelper.ShowModal(DepotActionLoading, "modal2"); - } - else if(this.magazineStatusModel.action == 2){ - ModalHelper.ShowModal(DepotActionUnloading, "modal2"); - } - else if(this.magazineStatusModel.action == 4){ - ModalHelper.ShowModal(DepotActionTransfer, "modal2"); - } - else if(this.magazineStatusModel.action == 5){ - ModalHelper.ShowModal(DepotActionGeneric, "modal2"); - } - } + // @Watch("magazineStatusModel") + // public modalBlockMagazine(){ + // if(this.magazineStatusModel.action == 0){ + // ModalHelper.HideModal("modal2"); + // } + // else if(this.magazineStatusModel.action == 1){ + // ModalHelper.ShowModal(DepotActionLoading, "modal2"); + // } + // else if(this.magazineStatusModel.action == 2){ + // ModalHelper.ShowModal(DepotActionUnloading, "modal2"); + // } + // else if(this.magazineStatusModel.action == 4){ + // ModalHelper.ShowModal(DepotActionTransfer, "modal2"); + // } + // else if(this.magazineStatusModel.action == 5){ + // ModalHelper.ShowModal(DepotActionGeneric, "modal2"); + // } + // } public selectedTool: any = null; public enableModify: any = false; public disableList: any = false; + public typeNc: string = "Osai"; + mounted() { - - awaiter (Promise.all([ - new ToolingService().GetMagazinesPositions(), - new ToolingService().GetToolsConfiguration() - ])); + if(this.typeNc == "Demo"){ + awaiter (Promise.all([ + new ToolingService().GetMagazinesPositions(), + new ToolingService().GetToolsConfiguration() + ])); + } + else{ + awaiter (Promise.all([ + new ToolingService().GetNcMagazinesPositions(), + new ToolingService().GetToolsConfiguration() + ])); + } + this.magposConfiguration = (this.$store.state as AppModel).tooling.magazinePosConfiguration; - this.modalBlockMagazine(); + // this.modalBlockMagazine(); } public selectTool(item){ @@ -79,11 +89,19 @@ export default class toolingMagPos extends Vue { this.enableModify = false; } async modifyMagPos(model) { - - awaiter(new ToolingService().UpdateMagPos(model).then(response => { - this.magposConfiguration = (this.$store.state as AppModel).tooling.magazinePosConfiguration; - this.disableList = false; - this.enableModify = false; - })); + if(this.typeNc == "Demo"){ + awaiter(new ToolingService().UpdateMagPos(model).then(response => { + this.magposConfiguration = (this.$store.state as AppModel).tooling.magazinePosConfiguration; + this.disableList = false; + this.enableModify = false; + })); + } + else{ + awaiter(new ToolingService().UpdateNcMagPos(model).then(response => { + this.magposConfiguration = (this.$store.state as AppModel).tooling.magazinePosConfiguration; + this.disableList = false; + this.enableModify = false; + })); + } } } diff --git a/Step/wwwroot/src/components/tooling/tooling-shanks.ts b/Step/wwwroot/src/components/tooling/tooling-shanks.ts index 56cc54eb..fb0445a0 100644 --- a/Step/wwwroot/src/components/tooling/tooling-shanks.ts +++ b/Step/wwwroot/src/components/tooling/tooling-shanks.ts @@ -35,30 +35,31 @@ export default class toolingShanks extends Vue { public searchText: string = ""; public currentFilter: string = ""; + public typeNc: string = "Osai"; @Watch("searchText") public applyFilter(n) { this.currentFilter = n.toLowerCase(); } - @Watch("magazineStatusModel") - public modalBlockMagazine(){ - if(this.magazineStatusModel.action == 0){ - ModalHelper.HideModal("modal2"); - } - else if(this.magazineStatusModel.action == 1){ - ModalHelper.ShowModal(DepotActionLoading, "modal2"); - } - else if(this.magazineStatusModel.action == 2){ - ModalHelper.ShowModal(DepotActionUnloading, "modal2"); - } - else if(this.magazineStatusModel.action == 4){ - ModalHelper.ShowModal(DepotActionTransfer, "modal2"); - } - else if(this.magazineStatusModel.action == 5){ - ModalHelper.ShowModal(DepotActionGeneric, "modal2"); - } - } + // @Watch("magazineStatusModel") + // public modalBlockMagazine(){ + // if(this.magazineStatusModel.action == 0){ + // ModalHelper.HideModal("modal2"); + // } + // else if(this.magazineStatusModel.action == 1){ + // ModalHelper.ShowModal(DepotActionLoading, "modal2"); + // } + // else if(this.magazineStatusModel.action == 2){ + // ModalHelper.ShowModal(DepotActionUnloading, "modal2"); + // } + // else if(this.magazineStatusModel.action == 4){ + // ModalHelper.ShowModal(DepotActionTransfer, "modal2"); + // } + // else if(this.magazineStatusModel.action == 5){ + // ModalHelper.ShowModal(DepotActionGeneric, "modal2"); + // } + // } public get availableTools(): server.Tools[] { return (this.$store.state as AppModel).depot.availableTool; } @@ -88,11 +89,18 @@ export default class toolingShanks extends Vue { public enableAddChildsTools: any = false; async mounted() { - - awaiter (Promise.all([ - new ToolingService().GetShanks(), - new ToolingService().GetToolsConfiguration() - ])); + if(this.typeNc == "Demo"){ + awaiter (Promise.all([ + new ToolingService().GetShanks(), + new ToolingService().GetToolsConfiguration() + ])); + } + else{ + awaiter (Promise.all([ + new ToolingService().GetNcShanks(), + new ToolingService().GetToolsConfiguration() + ])); + } this.shankConfiguration = (this.$store.state as AppModel).tooling.shankConfiguration; this.childToolsShank = (this.$store.state as AppModel).tooling.childToolsShank; @@ -109,7 +117,7 @@ export default class toolingShanks extends Vue { this.scrollTop -= (delta * 40); e.preventDefault(); }); - this.modalBlockMagazine(); + // this.modalBlockMagazine(); } async updated() { @@ -283,38 +291,75 @@ export default class toolingShanks extends Vue { } async save(item) { - awaiter(new ToolingService().SetShank(item).then(response => { - this.selectedTool = response; - let htmlelement = this.$refs.shankList as any; - htmlelement.scrollTop = htmlelement.scrollHeight; + if(this.typeNc == "Demo"){ + awaiter(new ToolingService().SetShank(item).then(response => { + this.selectedTool = response; + let htmlelement = this.$refs.shankList as any; + htmlelement.scrollTop = htmlelement.scrollHeight; + + this.shankConfiguration = (this.$store.state as AppModel).tooling.shankConfiguration; + this.disableList = false; + })); + } + else{ + awaiter(new ToolingService().SetNcShank(item).then(response => { + this.selectedTool = response; + let htmlelement = this.$refs.shankList as any; + htmlelement.scrollTop = htmlelement.scrollHeight; + + this.shankConfiguration = (this.$store.state as AppModel).tooling.shankConfiguration; + this.disableList = false; + })); + } - this.shankConfiguration = (this.$store.state as AppModel).tooling.shankConfiguration; - this.disableList = false; - })); } async modifyShank(model) { + if(this.typeNc == "Demo"){ + awaiter(new ToolingService().UpdateShank(model).then(response => { + this.shankConfiguration = (this.$store.state as AppModel).tooling.shankConfiguration; + this.disableList = false; + this.enableModify = false; + })); + } + else{ + awaiter(new ToolingService().UpdateNcShank(model).then(response => { + this.shankConfiguration = (this.$store.state as AppModel).tooling.shankConfiguration; + this.disableList = false; + this.enableModify = false; + })); + } - awaiter(new ToolingService().UpdateShank(model).then(response => { - this.shankConfiguration = (this.$store.state as AppModel).tooling.shankConfiguration; - this.disableList = false; - this.enableModify = false; - })); } public addToolsToShank(shank) { let model = this.toolSelected; model.multitoolId = this.posSelected; - awaiter(new ToolingService().addToolToShank(shank, model).then(response => { - this.selectTab(response); - for (let l in this.selectedTool.childsTools) { - if (this.selectedTool.childsTools[l].id <= 0) { - this.selectedTool.childsTools.splice(l, 1); + if(this.typeNc == "Demo"){ + awaiter(new ToolingService().addToolToShank(shank, model).then(response => { + this.selectTab(response); + for (let l in this.selectedTool.childsTools) { + if (this.selectedTool.childsTools[l].id <= 0) { + this.selectedTool.childsTools.splice(l, 1); + } } - } - this.disableList = false; - this.checkChildsToolsenabled(); - })) + this.disableList = false; + this.checkChildsToolsenabled(); + })) + } + else{ + awaiter(new ToolingService().addToolToShankNc(shank, model).then(response => { + this.selectTab(response); + for (let l in this.selectedTool.childsTools) { + if (this.selectedTool.childsTools[l].id <= 0) { + this.selectedTool.childsTools.splice(l, 1); + } + } + this.disableList = false; + this.checkChildsToolsenabled(); + })) + } + // new ToolingService().SetEdgeData(tool,model).then(response => { // this.toolsConfiguration = (this.$store.state as AppModel).tooling.toolsConfiguration; // this.edgeConfiguration = (this.$store.state as AppModel).tooling.edgesConfiguration; @@ -327,15 +372,28 @@ export default class toolingShanks extends Vue { this.$options.filters.localize("modal_confirm_delete_tool_inshank", "Confermi la rimozione del tool dal codolo?"), () => { let model = this.selectedEquipment; - awaiter(new ToolingService().removeToolToShank(shank, model).then(response => { - this.disableList = false; - this.enableParameters = true; - this.enableModify = false; - this.enableEquipment = false; - this.selectedEquipment = null; - this.checkChildsToolsenabled(); - - })) + if(this.typeNc == "Demo"){ + awaiter(new ToolingService().removeToolToShank(shank, model).then(response => { + this.disableList = false; + this.enableParameters = true; + this.enableModify = false; + this.enableEquipment = false; + this.selectedEquipment = null; + this.checkChildsToolsenabled(); + + })) + } + else{ + awaiter(new ToolingService().removeToolToShankNc(shank, model).then(response => { + this.disableList = false; + this.enableParameters = true; + this.enableModify = false; + this.enableEquipment = false; + this.selectedEquipment = null; + this.checkChildsToolsenabled(); + + })) + } }, null); // new ToolingService().SetEdgeData(tool,model).then(response => { // this.toolsConfiguration = (this.$store.state as AppModel).tooling.toolsConfiguration; @@ -349,13 +407,24 @@ export default class toolingShanks extends Vue { ModalHelper.AskConfirm(this.$options.filters.localize("modal_confirm_delete", "Richiesta di conferma"), this.$options.filters.localize("modal_confirm_delete_shank", "Confermi la cancellazione del codolo?"), () => { - awaiter(new ToolingService().DeleteShank(model).then(response => { - this.selectedEquipment = null; - this.enableEquipment = false; - this.enableParameters = true; - this.enableModify = false; - this.disableList = false; - })); + if(this.typeNc == "Demo"){ + awaiter(new ToolingService().DeleteShank(model).then(response => { + this.selectedEquipment = null; + this.enableEquipment = false; + this.enableParameters = true; + this.enableModify = false; + this.disableList = false; + })); + } + else{ + awaiter(new ToolingService().DeleteNcShank(model).then(response => { + this.selectedEquipment = null; + this.enableEquipment = false; + this.enableParameters = true; + this.enableModify = false; + this.disableList = false; + })); + } }, null); } } diff --git a/Step/wwwroot/src/components/tooling/tooling.ts b/Step/wwwroot/src/components/tooling/tooling.ts index e97fcef2..9721c3e4 100644 --- a/Step/wwwroot/src/components/tooling/tooling.ts +++ b/Step/wwwroot/src/components/tooling/tooling.ts @@ -30,28 +30,28 @@ export default class Tooling extends Vue { // return (this.$store.state as AppModel).tooling.magazines; // } - @Watch("magazineStatusModel") - public modalBlockMagazine() { - if (this.magazineStatusModel.action == 0) { - ModalHelper.HideModal("modal2"); - } - else if (this.magazineStatusModel.action == 1) { - ModalHelper.ShowModal(DepotActionLoading, "modal2"); - } - else if (this.magazineStatusModel.action == 2) { - ModalHelper.ShowModal(DepotActionUnloading, "modal2"); - } - else if (this.magazineStatusModel.action == 4) { - ModalHelper.ShowModal(DepotActionTransfer, "modal2"); - } - else if (this.magazineStatusModel.action == 5) { - ModalHelper.ShowModal(DepotActionGeneric, "modal2"); - } - } + // @Watch("magazineStatusModel") + // public modalBlockMagazine() { + // if (this.magazineStatusModel.action == 0) { + // ModalHelper.HideModal("modal2"); + // } + // else if (this.magazineStatusModel.action == 1) { + // ModalHelper.ShowModal(DepotActionLoading, "modal2"); + // } + // else if (this.magazineStatusModel.action == 2) { + // ModalHelper.ShowModal(DepotActionUnloading, "modal2"); + // } + // else if (this.magazineStatusModel.action == 4) { + // ModalHelper.ShowModal(DepotActionTransfer, "modal2"); + // } + // else if (this.magazineStatusModel.action == 5) { + // ModalHelper.ShowModal(DepotActionGeneric, "modal2"); + // } + // } async mounted() { // await new ToolingService().GetToolsConfiguration(); - this.modalBlockMagazine(); + // this.modalBlockMagazine(); } diff --git a/Step/wwwroot/src/modules/base-components/cards/index.js b/Step/wwwroot/src/modules/base-components/cards/index.js index 03e28f0b..84c587ef 100644 --- a/Step/wwwroot/src/modules/base-components/cards/index.js +++ b/Step/wwwroot/src/modules/base-components/cards/index.js @@ -6,5 +6,6 @@ import inputBox from "./input-box.vue"; import cardAssistedTooling from "./card-assisted-tooling.vue"; import cardToolDepot from "./card-tool-depot.vue"; import maintenanceCard from "./maintenance-card.vue"; +import objectsJob from "./objects-job.vue" -export { cardUtilities, tool, detailCard, equipment, inputBox, cardAssistedTooling, cardToolDepot, maintenanceCard }; \ No newline at end of file +export { cardUtilities, tool, detailCard, equipment, inputBox, cardAssistedTooling, cardToolDepot, maintenanceCard, objectsJob }; \ No newline at end of file diff --git a/Step/wwwroot/src/modules/base-components/cards/objects-job.vue b/Step/wwwroot/src/modules/base-components/cards/objects-job.vue new file mode 100644 index 00000000..ffbda7c0 --- /dev/null +++ b/Step/wwwroot/src/modules/base-components/cards/objects-job.vue @@ -0,0 +1,25 @@ + + diff --git a/Step/wwwroot/src/modules/base-components/modal-edit-job.vue b/Step/wwwroot/src/modules/base-components/modal-edit-job.vue index ccf64b47..1080dfa6 100644 --- a/Step/wwwroot/src/modules/base-components/modal-edit-job.vue +++ b/Step/wwwroot/src/modules/base-components/modal-edit-job.vue @@ -19,7 +19,19 @@