优化
This commit is contained in:
		| @@ -10,7 +10,7 @@ | ||||
|           <img slot="prefix" src="https://cdn.cunwuyun.cn/slw2.0/images/fp.png"> | ||||
|           <el-option v-for="(op,i) in splitOps" :key="i" v-bind="op"/> | ||||
|         </el-select> | ||||
|         <div class="headerBar-item" @click="isShowBar = !isShowBar" :class="[isShowBar ? '' : 'cancel-xt']"> | ||||
|         <div class="headerBar-item" v-if="monitors.length > 1" @click="isShowBar = !isShowBar" :class="[isShowBar ? '' : 'cancel-xt']"> | ||||
|           <img src="https://cdn.cunwuyun.cn/slw2.0/images/xt.png"> | ||||
|           <span>{{ isShowBar ? '视频协同' : '取消协同' }}</span> | ||||
|         </div> | ||||
| @@ -38,6 +38,7 @@ | ||||
|         :ids="ids" | ||||
|         :instance="instance" | ||||
|         @replay="onReplay" | ||||
|         :isLoading.sync="isLoading" | ||||
|         @backLiveing="playbackUrls = []" | ||||
|         @checkChange="onCheckChange" | ||||
|         v-if="!isShowBar && monitors.length" | ||||
| @@ -223,7 +224,6 @@ | ||||
|         let show = data.deviceStatus == 1 ? 'show' : '' | ||||
|         const ids = this.ids.split(',') | ||||
|         const index = ids.indexOf(data.id) + 1 | ||||
|         console.log(index, ids, data.id) | ||||
|         if (node.isLeaf) { | ||||
|           return ( | ||||
|               <div class="flexRow"> | ||||
|   | ||||
| @@ -355,7 +355,7 @@ | ||||
|       z-index: 1; | ||||
|       width: 100%; | ||||
|       transition: all ease-in-out 0.5s; | ||||
|       // transform: translateY(100%); | ||||
|       transform: translateY(100%); | ||||
|     } | ||||
|  | ||||
|     &:hover { | ||||
|   | ||||
| @@ -54,7 +54,7 @@ | ||||
|     </div> | ||||
|     <div class="playback"> | ||||
|       <div class="synergr-more" @click="isShowTimeline = !isShowTimeline" :class="[isShowTimeline ? 'active' : '']"> | ||||
|         <img title="展开" src="https://cdn.cunwuyun.cn/slw2.0/images/arrow.png" /> | ||||
|         <img :title="isShowTimeline ? '收起' : '展开'" src="https://cdn.cunwuyun.cn/slw2.0/images/arrow.png" /> | ||||
|       </div> | ||||
|       <div class="playback-list" v-if="isShowTimeline"> | ||||
|         <el-checkbox-group v-model="checked" @change="onCheckChange"> | ||||
| @@ -90,7 +90,7 @@ | ||||
|   import PlaybackTime from './PlaybackTime' | ||||
|  | ||||
|   export default { | ||||
|     props: ['ids', 'instance'], | ||||
|     props: ['ids', 'instance', 'isLoading'], | ||||
|  | ||||
|     name: 'Synergy', | ||||
|  | ||||
| @@ -111,7 +111,7 @@ | ||||
|           date: '' | ||||
|         }, | ||||
|         times: [], | ||||
|         isShowTimeline: false, | ||||
|         isShowTimeline: true, | ||||
|         checkList: [], | ||||
|         isInit: false, | ||||
|         left: 0, | ||||
| @@ -318,7 +318,7 @@ | ||||
|       }, | ||||
|  | ||||
|       getSlwPlaybackTime () { | ||||
|         this.isLoading = true | ||||
|         this.$emit('update:isLoading', true) | ||||
|         this.instance.post(`/app/appzyvideoequipment/getSlwPlaybackTime`, null, { | ||||
|           params: { | ||||
|             ids: this.ids, | ||||
| @@ -346,10 +346,10 @@ | ||||
|               }) | ||||
|             } | ||||
|  | ||||
|             this.isLoading = false | ||||
|             this.$emit('update:isLoading', false) | ||||
|           } | ||||
|         }).catch(() => { | ||||
|           this.isLoading = false | ||||
|           this.$emit('update:isLoading', false) | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|   | ||||
| @@ -80,7 +80,7 @@ | ||||
|           this.isHide = false | ||||
|  | ||||
|           if (!this.isChoose) return | ||||
|           this.x = e.clientX - canvasInfo.left - 4 | ||||
|           this.x = e.clientX - canvasInfo.left | ||||
|           this.ratioW = this.x / this.canvasWidth | ||||
|         } else { | ||||
|           this.isHide = true | ||||
| @@ -91,10 +91,11 @@ | ||||
|         const canvasInfo = document.querySelector(`#${this.id}`).getBoundingClientRect() | ||||
|  | ||||
|         if (e.clientY - canvasInfo.top < 29) { | ||||
|           this.x = e.clientX - canvasInfo.left - 4 | ||||
|           this.x = e.clientX - canvasInfo.left | ||||
|           clearInterval(this.timer) | ||||
|           this.timer = null | ||||
|           const time = this.secTotime((24 * 60 * 60) / this.canvasWidth * this.x) | ||||
|  | ||||
|           this.$emit('replay', time) | ||||
|         } | ||||
|       }, | ||||
| @@ -185,11 +186,12 @@ | ||||
|  | ||||
|       drawLine(ctx, options) { | ||||
|         const { beginX, beginY, endX, endY, lineColor, lineWidth } = options | ||||
|         ctx.beginPath() | ||||
|         ctx.lineWidth = lineWidth | ||||
|         ctx.strokeStyle = lineColor | ||||
|         ctx.beginPath() | ||||
|         ctx.moveTo(beginX, beginY) | ||||
|         ctx.lineTo(endX, endY) | ||||
|         ctx.strokeStyle = lineColor | ||||
|         ctx.closePath() | ||||
|         ctx.stroke() | ||||
|       }, | ||||
|  | ||||
| @@ -240,6 +242,10 @@ | ||||
|             } | ||||
|           } | ||||
|         } | ||||
|  | ||||
|         if (!this.times.length) { | ||||
|         ctx.stroke() | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| @@ -259,6 +265,7 @@ | ||||
|       user-select: none; | ||||
|       cursor: e-resize; | ||||
|       -webkit-user-drag: none; | ||||
|       // transform: translateX(-50%); | ||||
|     } | ||||
|  | ||||
|     .time-scale { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user