Commit 568141b2bce6c790ec14c2f4605716e6842d9eb8
1 parent
05960d35
增加云台控制的速度控制
Showing
2 changed files
with
19 additions
and
5 deletions
src/main/resources/application.yml
web_src/src/components/gb28181/devicePlayer.vue
| ... | ... | @@ -64,9 +64,13 @@ |
| 64 | 64 | <div class="control-round"> |
| 65 | 65 | <div class="control-round-inner"><i class="fa fa-pause-circle"></i></div> |
| 66 | 66 | </div> |
| 67 | - <div style="position: absolute; left: 7.25rem; top: 1.25rem" @mousedown="ptzCamera(0, 0, 1)" @mouseup="ptzCamera(0, 0, 0)"><i class="el-icon-zoom-in" style="font-size: 1.875rem;"></i></div> | |
| 68 | - <div style="position: absolute; left: 7.25rem; top: 3.25rem; font-size: 1.875rem;" @mousedown="ptzCamera(0, 0, 2)" @mouseup="ptzCamera(0, 0, 0)"><i class="el-icon-zoom-out"></i></div> | |
| 67 | + <div style="position: absolute; left: 7.25rem; top: 1.25rem" @mousedown="ptzCamera(0, 0, 1)" @mouseup="ptzCamera(0, 0, 0)"><i class="el-icon-zoom-in control-zoom-btn" style="font-size: 1.875rem;"></i></div> | |
| 68 | + <div style="position: absolute; left: 7.25rem; top: 3.25rem; font-size: 1.875rem;" @mousedown="ptzCamera(0, 0, 2)" @mouseup="ptzCamera(0, 0, 0)"><i class="el-icon-zoom-out control-zoom-btn"></i></div> | |
| 69 | + <div class="contro-speed" style="position: absolute; left: 4px; top: 7rem; width: 9rem;"> | |
| 70 | + <el-slider v-model="controSpeed"></el-slider> | |
| 71 | + </div> | |
| 69 | 72 | </div> |
| 73 | + | |
| 70 | 74 | <div class="control-panel"> |
| 71 | 75 | <el-button-group> |
| 72 | 76 | <el-tag style="position :absolute; left: 0rem; top: 0rem; width: 5rem; text-align: center" size="medium" type="info">预置位编号</el-tag> |
| ... | ... | @@ -167,6 +171,7 @@ export default { |
| 167 | 171 | loadingRecords: false, |
| 168 | 172 | recordsLoading: false, |
| 169 | 173 | isLoging: false, |
| 174 | + controSpeed: 30, | |
| 170 | 175 | timeVal: 0, |
| 171 | 176 | timeMin: 0, |
| 172 | 177 | timeMax: 1440, |
| ... | ... | @@ -399,7 +404,7 @@ export default { |
| 399 | 404 | method: 'post', |
| 400 | 405 | // url: '/api/ptz/' + this.deviceId + '/' + this.channelId + '?leftRight=' + leftRight + '&upDown=' + upDown + |
| 401 | 406 | // '&inOut=' + zoom + '&moveSpeed=50&zoomSpeed=50' |
| 402 | - url: '/api/ptz/' + this.deviceId + '/' + this.channelId + '?cmdCode=' + (zoom * 16 + upDown * 4 + leftRight) + '&horizonSpeed=30&verticalSpeed=30&zoomSpeed=' + (2 * 16) | |
| 407 | + url: '/api/ptz/' + this.deviceId + '/' + this.channelId + '?cmdCode=' + (zoom * 16 + upDown * 4 + leftRight) + '&horizonSpeed=' + this.controSpeed + '&verticalSpeed=' + this.controSpeed + '&zoomSpeed=' + this.controSpeed | |
| 403 | 408 | }).then(function (res) {}); |
| 404 | 409 | }, |
| 405 | 410 | //////////////////////播放器事件处理////////////////////////// |
| ... | ... | @@ -490,7 +495,7 @@ export default { |
| 490 | 495 | max-width: 6.25rem; |
| 491 | 496 | max-height: 6.25rem; |
| 492 | 497 | border-radius: 100%; |
| 493 | - margin-top: 2.5rem; | |
| 498 | + margin-top: 1.5rem; | |
| 494 | 499 | margin-left: 0.5rem; |
| 495 | 500 | float: left; |
| 496 | 501 | } |
| ... | ... | @@ -514,6 +519,9 @@ export default { |
| 514 | 519 | box-sizing: border-box; |
| 515 | 520 | transition: all 0.3s linear; |
| 516 | 521 | } |
| 522 | +.control-btn:hover { | |
| 523 | + cursor:pointer | |
| 524 | +} | |
| 517 | 525 | |
| 518 | 526 | .control-btn i { |
| 519 | 527 | font-size: 20px; |
| ... | ... | @@ -522,6 +530,12 @@ export default { |
| 522 | 530 | justify-content: center; |
| 523 | 531 | align-items: center; |
| 524 | 532 | } |
| 533 | +.control-btn i:hover { | |
| 534 | + cursor:pointer | |
| 535 | +} | |
| 536 | +.control-zoom-btn:hover { | |
| 537 | + cursor:pointer | |
| 538 | +} | |
| 525 | 539 | |
| 526 | 540 | .control-round { |
| 527 | 541 | position: absolute; | ... | ... |