Merge branch 'develop' of https://bitbucket.org/ncarminati/cms_thermo_active into feature/recipe

This commit is contained in:
Samuele Locatelli
2020-07-16 18:32:35 +02:00
7 changed files with 20 additions and 17 deletions
@@ -36,7 +36,8 @@ export default class Dashboard extends Vue {
@Watch("lastItem", { deep: true })
async lastitemChanged(n: Prod.IProd, o) {
this.items.splice(0, 0, ...await prodService.History(n.numDone - 1, 1));
if (this.items.length && n.numDone - 1 != this.items[0].numDone)
this.items.splice(0, 0, ...await prodService.History(n.numDone - 1, 1));
}
items: Prod.IProd[] = [];
@@ -145,10 +145,10 @@
<g v-if="value.showDelay">
<line x1="0" y1="0" y2="0" :x2="actualDelay * ganttOptions.secondSize" class="progress-line" />
<foreignObject
width="20"
width="30"
y="-5"
height="10"
:x="Math.max(actualDelay * ganttOptions.secondSize -20,0)"
:x="Math.max(actualDelay * ganttOptions.secondSize -30,0)"
>
<div class="progress-indicator">{{value.actualDelay | round(1)}}</div>
</foreignObject>
@@ -163,10 +163,10 @@
class="progress-line"
/>
<foreignObject
width="20"
width="30"
y="-5"
height="10"
:x="Math.max(actualDuration * ganttOptions.secondSize -20,0)"
:x="Math.max(actualDuration * ganttOptions.secondSize -30,0)"
>
<div class="progress-indicator">{{value.actualDuration | round(1)}}</div>
</foreignObject>
@@ -82,7 +82,7 @@ function blockEndPosition(block: server.Modblock, blocks: server.Modblock[], opt
function blockDuration(block: server.Modblock, options: IGanttOptions, includeDelay: boolean) {
let duration = 0;
if (block.showDelay)
duration += Math.max(block.estimatedDelay, includeDelay ? options.block_delay_minDuration : 0);
duration += Math.max(block.actualDelay, block.estimatedDelay, includeDelay ? options.block_delay_minDuration : 0);
// check della durata del blocco in base al tipo
var minduration = 0;
@@ -95,7 +95,7 @@ function blockDuration(block: server.Modblock, options: IGanttOptions, includeDe
case 5: minduration = options.block_body_Cooling_minDuration;
case 6: minduration = options.block_body_Extraction_minDuration;
}
duration += Math.max(minduration, block.estimatedDuration);
duration += Math.max(minduration, block.estimatedDuration, block.actualDuration);
if (block.idParam > 0 && includeDelay)
@@ -17,7 +17,7 @@
justify-content: center;
border-radius: 10px;
height: 10px;
width: 20px;
width: 30px;
font-size: 8px;
background-color: rgba(0, 0, 0, 0.5);
color: #fff;
@@ -19,7 +19,7 @@
justify-content: center;
border-radius: 10px;
height: 10px;
width: 20px;
width: 30px;
font-size: 8px;
background-color: rgba(0, 0, 0, .5);
color: #fff;
@@ -48,9 +48,9 @@
</g>
<gantt-header :padding-horizontal="padX " :zoom-factor="zoomFactor" />
<time-line
:padding-horizontal="padX "
:padding-horizontal="padX"
:zoom-factor="zoomFactor"
:speed="1.5"
:speed="1"
:x="ganttOptions.stepDuration * ganttOptions.secondSize - 15"
:position="(currentTime) * ganttOptions.secondSize"
:line-height="getRowHeight($refs.section1) + getRowHeight($refs.section2) +getRowHeight($refs.section2)+ ganttOptions.elementPadding*3"
@@ -1,11 +1,13 @@
<template>
<svg class="timeline">
<g
:transform="`translate(${(position * zoomFactor) + paddingHorizontal} 0)`"
:style="`transition: transform ${speed}s linear`"
>
<path class="arrow" d="M 0 0 L 30 0 L 15 24 Z" />
<line x1="15" y1="24" x2="15" :y2="lineHeight" />
<g :transform="`translate(${ paddingHorizontal} 0)`">
<g
:transform="`translate(${(position * zoomFactor)} 0)`"
:style="position>20?`transition: transform ${speed}s linear`:''"
>
<path class="arrow" d="M 0 0 L 30 0 L 15 24 Z" />
<line x1="15" y1="24" x2="15" :y2="lineHeight" />
</g>
</g>
</svg>
</template>