|
|
@@ -1,30 +1,5 @@
|
|
|
<template>
|
|
|
<div class="timeControlBox">
|
|
|
- <el-slider
|
|
|
- style="width: 96%"
|
|
|
- v-model="sTimeRange"
|
|
|
- :min="0"
|
|
|
- :max="sliderMax"
|
|
|
- size="small"
|
|
|
- placement="bottom"
|
|
|
- range
|
|
|
- :marks="marks"
|
|
|
- :format-tooltip="sliderFormatTooltip"
|
|
|
- :disabled="isPlay"
|
|
|
- @input="sliderChange"
|
|
|
- />
|
|
|
- <el-progress
|
|
|
- class="timeControlProgress"
|
|
|
- :style="`left:${progressLeft}%; width:${progressWidth}%`"
|
|
|
- :text-inside="true"
|
|
|
- striped
|
|
|
- striped-flow
|
|
|
- indeterminate
|
|
|
- :duration="80"
|
|
|
- :stroke-width="6"
|
|
|
- :percentage="percentage"
|
|
|
- :format="progressFormat"
|
|
|
- />
|
|
|
<el-button
|
|
|
class="playBtn"
|
|
|
:icon="isPlay ? VideoPause : VideoPlay"
|
|
|
@@ -32,6 +7,34 @@
|
|
|
circle
|
|
|
@click="playProgress"
|
|
|
/>
|
|
|
+ <div style="width: 96%; position: relative">
|
|
|
+ <el-slider
|
|
|
+ style="width: 98%; margin-left: 2%"
|
|
|
+ v-model="sTimeRange"
|
|
|
+ :min="0"
|
|
|
+ :max="sliderMax"
|
|
|
+ size="small"
|
|
|
+ placement="bottom"
|
|
|
+ range
|
|
|
+ :marks="marks"
|
|
|
+ :format-tooltip="sliderFormatTooltip"
|
|
|
+ :disabled="isPlay"
|
|
|
+ @input="sliderChange"
|
|
|
+ />
|
|
|
+ <!-- :style="`left:${progressLeft}%; width:${progressWidth}`" -->
|
|
|
+ <el-progress
|
|
|
+ class="timeControlProgress"
|
|
|
+ :style="`left:calc(2% + ${progressLeft}%); width:calc(${progressWidth}% - 2%)`"
|
|
|
+ :text-inside="true"
|
|
|
+ striped
|
|
|
+ striped-flow
|
|
|
+ indeterminate
|
|
|
+ :duration="80"
|
|
|
+ :stroke-width="6"
|
|
|
+ :percentage="percentage"
|
|
|
+ :format="progressFormat"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -72,7 +75,7 @@ export default {
|
|
|
sTimeRange: [0, 0],
|
|
|
sliderMax: 0,
|
|
|
progressLeft: 0,
|
|
|
- progressWidth: 96,
|
|
|
+ progressWidth: 100,
|
|
|
percentage: 0,
|
|
|
marks: {},
|
|
|
cloudJson: [],
|
|
|
@@ -134,7 +137,7 @@ export default {
|
|
|
this.sTimeRange = [0, this.sliderMax];
|
|
|
let marks = {};
|
|
|
this.cloudJson.forEach((ele, index) => {
|
|
|
- if (index % 2 === 0) {
|
|
|
+ if (index % parseInt(this.cloudJson.length / 10) === 0) {
|
|
|
marks[index] = ele.date.split(" ")[1];
|
|
|
}
|
|
|
});
|
|
|
@@ -190,10 +193,10 @@ export default {
|
|
|
|
|
|
sliderChange(value) {
|
|
|
this.progressLeft = parseFloat(
|
|
|
- (value[0] / (this.cloudJson.length - 1)) * 96
|
|
|
+ (value[0] / (this.cloudJson.length - 1)) * 100
|
|
|
);
|
|
|
this.progressWidth =
|
|
|
- (value[1] / (this.cloudJson.length - 1)) * 96 - this.progressLeft;
|
|
|
+ (value[1] / (this.cloudJson.length - 1)) * 100 - this.progressLeft;
|
|
|
this.setpLeft = 0;
|
|
|
this.resetData();
|
|
|
},
|
|
|
@@ -292,7 +295,8 @@ export default {
|
|
|
this.percentage = p >= 100 ? 100 : p;
|
|
|
this.switchMapLayer();
|
|
|
},
|
|
|
- this.controlMode === "wind" ? 20000 : 2000
|
|
|
+ // this.controlMode === "wind" ? 20000 : 2000
|
|
|
+ 500
|
|
|
);
|
|
|
} else {
|
|
|
clearInterval(this.progressTimmer);
|
|
|
@@ -504,20 +508,25 @@ export default {
|
|
|
.timeControlBox {
|
|
|
position: relative;
|
|
|
width: 100%;
|
|
|
+ display: flex;
|
|
|
+ justify-content: flex-start;
|
|
|
+ align-items: center;
|
|
|
+ flex-wrap: nowrap;
|
|
|
|
|
|
.timeControlProgress {
|
|
|
position: absolute;
|
|
|
top: 9px;
|
|
|
user-select: none;
|
|
|
pointer-events: none;
|
|
|
+
|
|
|
+ .el-progress-bar__inner {
|
|
|
+ background: #00e5ff;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.playBtn {
|
|
|
- position: absolute;
|
|
|
- right: 0;
|
|
|
- top: 0;
|
|
|
- width: 32px;
|
|
|
- height: 32px;
|
|
|
+ width: 20px;
|
|
|
+ height: 20px;
|
|
|
background: rgba(0, 0, 0, 0, 0.5);
|
|
|
border: 0;
|
|
|
}
|
|
|
@@ -554,11 +563,20 @@ export default {
|
|
|
|
|
|
.playBtn {
|
|
|
.el-icon {
|
|
|
- font-size: 42px;
|
|
|
+ font-size: 24px;
|
|
|
svg {
|
|
|
color: #fff;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ .timeControlProgress {
|
|
|
+ .el-progress-bar__inner {
|
|
|
+ background-color: #00e5ff;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .el-slider__button {
|
|
|
+ border-color: rgba(22, 162, 201, 0.8);
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|