diff --git a/Step/wwwroot/assets/styles/base/plc-softkeys.less b/Step/wwwroot/assets/styles/base/plc-softkeys.less index d0b19245..e40e720e 100644 --- a/Step/wwwroot/assets/styles/base/plc-softkeys.less +++ b/Step/wwwroot/assets/styles/base/plc-softkeys.less @@ -23,6 +23,7 @@ left: 0; right: 0; bottom: 0; + z-index:1; background-color: rgba(255, 255, 255, 0.2); } &>div.waiting::after { @@ -139,6 +140,16 @@ height: 42px; } } + + &.opened{ + border: 2px solid #4b4b4b; + position: absolute; + z-index: 4; + .detail section { + height: 42px; + } + } + position: relative; width: 184px; height: 70px; diff --git a/Step/wwwroot/assets/styles/style.css b/Step/wwwroot/assets/styles/style.css index e5a8c585..158ab949 100644 --- a/Step/wwwroot/assets/styles/style.css +++ b/Step/wwwroot/assets/styles/style.css @@ -1496,6 +1496,7 @@ footer .container button.big:before { left: 0; right: 0; bottom: 0; + z-index: 1; background-color: rgba(255, 255, 255, 0.2); } #plc-softkeys-container > div.waiting::after { @@ -1613,6 +1614,14 @@ footer .container button.big:before { .soft-key.selected .detail section { height: 42px; } +.soft-key.opened { + border: 2px solid #4b4b4b; + position: absolute; + z-index: 4; +} +.soft-key.opened .detail section { + height: 42px; +} .soft-key .menu-container { width: 360px; top: 80px; diff --git a/Step/wwwroot/src/modules/plc-softkeys.ts b/Step/wwwroot/src/modules/plc-softkeys.ts index 9b947b9e..28dbdcc8 100644 --- a/Step/wwwroot/src/modules/plc-softkeys.ts +++ b/Step/wwwroot/src/modules/plc-softkeys.ts @@ -12,21 +12,25 @@ export default class softKeys extends Vue { public selectedSection: number = 1; public selectedMenuItem: number = 0; + public selectedSoftKey: any = null; public waitingForStart: boolean = false; public disabled: boolean = false; + public selectedPositionTop: string = "0"; + public selectedPositionLeft: string = "0"; + public selectSection(value: number) { this.selectedSection = value; } - public getSoftKeyStatus(id: number) : boolean{ + public getSoftKeyStatus(id: number): boolean { var sk = this.$store.getters.getSoftKeyStatus(id); if (sk) return sk.Value; return false; } - public getSoftKeyActive(id: number) : boolean{ + public getSoftKeyActive(id: number): boolean { var sk = this.$store.getters.getSoftKeyStatus(id); if (sk) return sk.Active; @@ -41,11 +45,20 @@ export default class softKeys extends Vue { return (this.$store.state as AppModel).machineInfo.softKeys[value]; } - public toggleMenu(value: number) { - if (this.selectedMenuItem == value) + public toggleMenu(value: any) { + if (this.selectedMenuItem == value.id) { this.selectedMenuItem = null; - else - this.selectedMenuItem = value; + this.selectedSoftKey = null; + } + else { + this.selectedMenuItem = value.id; + this.selectedSoftKey = value; + } + } + + public setSoftKeyPosition(sk: any) { + this.selectedPositionLeft = sk.offsetLeft + "px"; + this.selectedPositionTop = (sk.offsetTop + 104) + "px"; } public softKeyChanged(id: number) { diff --git a/Step/wwwroot/src/modules/plc-softkeys.vue b/Step/wwwroot/src/modules/plc-softkeys.vue index f08ccd5c..55c34b75 100644 --- a/Step/wwwroot/src/modules/plc-softkeys.vue +++ b/Step/wwwroot/src/modules/plc-softkeys.vue @@ -12,21 +12,30 @@
{{'maint_' + selectedSection | localize('maint_' + selectedSection) }}
-
- - - -
+ + +
+
diff --git a/Step/wwwroot/src/modules/under-the-hood/soft-key1.vue b/Step/wwwroot/src/modules/under-the-hood/soft-key1.vue index 75fc97f1..51f2a531 100644 --- a/Step/wwwroot/src/modules/under-the-hood/soft-key1.vue +++ b/Step/wwwroot/src/modules/under-the-hood/soft-key1.vue @@ -1,5 +1,5 @@