|
@@ -25,6 +25,10 @@
|
|
|
:key="sec.key"
|
|
:key="sec.key"
|
|
|
:style="`width:${sec.width}%;background-color:${sec.color}`"
|
|
:style="`width:${sec.width}%;background-color:${sec.color}`"
|
|
|
></div>
|
|
></div>
|
|
|
|
|
+ <div class="bar1" v-for="np in planVideo.filter(p=>p.noPlan===true)"
|
|
|
|
|
+ :key="np.key"
|
|
|
|
|
+ :style="`width:${np.width}%;background-color:${np.color};left:${np.left}%;position:${'absolute'};`"
|
|
|
|
|
+ ></div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
@@ -79,7 +83,7 @@ export default {
|
|
|
this.minute_per_ruler =
|
|
this.minute_per_ruler =
|
|
|
(this.end_timestamp - this.start_timestamp) / (60 * 1000);
|
|
(this.end_timestamp - this.start_timestamp) / (60 * 1000);
|
|
|
let prevEnd = this.start_timestamp;
|
|
let prevEnd = this.start_timestamp;
|
|
|
-
|
|
|
|
|
|
|
+ let totalPercent=0;
|
|
|
for (tc of this.timeCell) {
|
|
for (tc of this.timeCell) {
|
|
|
let beginstamp = new Date(tc.beginTime).getTime();
|
|
let beginstamp = new Date(tc.beginTime).getTime();
|
|
|
|
|
|
|
@@ -89,10 +93,13 @@ export default {
|
|
|
this.planVideo.push({
|
|
this.planVideo.push({
|
|
|
key: prevEnd,
|
|
key: prevEnd,
|
|
|
width: percent * 100,
|
|
width: percent * 100,
|
|
|
- color: "transparent",
|
|
|
|
|
|
|
+ color: "#eaeaea",
|
|
|
|
|
+ noPlan:true,
|
|
|
|
|
+ left: totalPercent*100
|
|
|
});
|
|
});
|
|
|
|
|
+ totalPercent+=percent;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
let endStamp = new Date(tc.endTime).getTime();
|
|
let endStamp = new Date(tc.endTime).getTime();
|
|
|
let percent =
|
|
let percent =
|
|
|
(endStamp - beginstamp) / 60 / 1000 / this.minute_per_ruler;
|
|
(endStamp - beginstamp) / 60 / 1000 / this.minute_per_ruler;
|
|
@@ -101,7 +108,7 @@ export default {
|
|
|
width: percent * 100,
|
|
width: percent * 100,
|
|
|
color: "rgb(0, 178, 255)",
|
|
color: "rgb(0, 178, 255)",
|
|
|
});
|
|
});
|
|
|
-
|
|
|
|
|
|
|
+ totalPercent+=percent;
|
|
|
prevEnd = endStamp;
|
|
prevEnd = endStamp;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -579,7 +586,7 @@ export default {
|
|
|
.bar-container1 {
|
|
.bar-container1 {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
height: 20px;
|
|
height: 20px;
|
|
|
- background-color: #eaeaea;
|
|
|
|
|
|
|
+ background-color: #aaa;
|
|
|
position: relative;
|
|
position: relative;
|
|
|
top: 20px;
|
|
top: 20px;
|
|
|
display: flex;
|
|
display: flex;
|