球机操作控制上、下、左上、左下、右上、右下接口联调

merge-requests/1/head
张鑫 5 years ago
parent 5c91e4b548
commit 0bf45ec440

@ -37,7 +37,7 @@ export default {
}
};
</script>
<script type="text/javascript" src="./utils/jsmpeg.min.js"></script>
<!--<script type="text/javascript" src="./utils/jsmpeg.min.js"></script>-->
<style lang="scss">
@import "style/common/reset.css";
@import "style/common/layout";

@ -81,6 +81,11 @@ const routes = [{
}
]
},
{
path: '/login',
name: 'login',
component: () => import('../views/login.vue')
},
{
path: '/guide',
name: 'guide',

@ -20,20 +20,9 @@
/>
</a-form-item>
<a-form-item label="球机IP" :label-col="formItemVerticalLayout.labelCol">
<a-select
v-decorator="[
'ip',
{ rules: [{ required: true, message: '请选择球机IP!' }] },
]"
placeholder="选择球机IP"
>
<a-select-option value="192.168.11.6">
192.168.11.6
</a-select-option>
<a-select-option value="192.168.16.4">
192.168.16.4
</a-select-option>
</a-select>
<a-input
v-decorator="['ip', { rules: [{ required: true, message: '请输入球机ip!' }] }]"
/>
</a-form-item>
<a-form-item label="rtsp流地址" :label-col="formItemVerticalLayout.labelCol">
<a-input

File diff suppressed because one or more lines are too long

@ -35,18 +35,18 @@
</div>
<div class="direction-list">
<div class="direction-item">
<img src="@/assets/left-top-icon.png" alt="">
<img src="@/assets/top-icon.png" alt="">
<img src="@/assets/right-top-icon.png" alt="">
<img src="@/assets/left-top-icon.png" alt="" @mousedown="leftUpStart" @mouseup="leftUpStop">
<img src="@/assets/top-icon.png" alt="" @mousedown="upStart" @mouseup="upStop">
<img src="@/assets/right-top-icon.png" alt="" @mousedown="rightUpStart" @mouseup="rightUpStop">
</div>
<div class="direction-item">
<img src="@/assets/left-icon.png" alt="" @mousedown="leftStart" @mouseup="leftStop">
<img src="@/assets/right-icon.png" alt="" @mousedown="rightStart" @mouseup="rightStop">
</div>
<div class="direction-item">
<img src="@/assets/left-bottom-icon.png" alt="">
<img src="@/assets/bottom-icon.png" alt="">
<img src="@/assets/right-bottom-icon.png" alt="">
<img src="@/assets/left-bottom-icon.png" alt="" @mousedown="leftDownStart" @mouseup="leftDownStop">
<img src="@/assets/bottom-icon.png" alt="" @mousedown="downStart" @mouseup="downStop">
<img src="@/assets/right-bottom-icon.png" alt="" @mousedown="rightDownStart" @mouseup="rightDownStop">
</div>
</div>
</div>
@ -119,6 +119,66 @@ export default {
console.log('mounted执行了')
},
methods: {
leftUpStart(){
console.log('左上鼠标按下')
this.$axios.post('/camera/control/leftUp/'+this.id, {
data: {}
}).then(res => {
}).catch(err => {
})
},
leftUpStop(){
console.log('左上鼠标抬起')
this.$axios.post('/camera/control/leftUp/stop/'+this.id, {
data: {}
}).then(res => {
}).catch(err => {
})
},
upStart(){
console.log('上鼠标按下')
this.$axios.post('/camera/control/up/'+this.id, {
data: {}
}).then(res => {
}).catch(err => {
})
},
upStop(){
console.log('上鼠标抬起')
this.$axios.post('/camera/control/up/stop/'+this.id, {
data: {}
}).then(res => {
}).catch(err => {
})
},
rightUpStart(){
console.log('右上鼠标按下')
this.$axios.post('/camera/control/rightUp/'+this.id, {
data: {}
}).then(res => {
}).catch(err => {
})
},
rightUpStop(){
console.log('右上鼠标抬起')
this.$axios.post('/camera/control/rightUp/stop/'+this.id, {
data: {}
}).then(res => {
}).catch(err => {
})
},
leftStart(){
// console.log(this.id)
console.log('左转鼠标按下')
@ -151,7 +211,7 @@ export default {
})
},
rightStop(){
console.log('转鼠标抬起')
console.log('转鼠标抬起')
this.$axios.post('/camera/control/right/stop/'+this.id, {
data: {}
}).then(res => {
@ -160,6 +220,66 @@ export default {
})
},
leftDownStart(){
console.log('左下鼠标按下')
this.$axios.post('/camera/control/leftDown/'+this.id, {
data: {}
}).then(res => {
}).catch(err => {
})
},
leftDownStop(){
console.log('左下鼠标抬起')
this.$axios.post('/camera/control/leftDown/stop/'+this.id, {
data: {}
}).then(res => {
}).catch(err => {
})
},
downStart(){
console.log('下鼠标按下')
this.$axios.post('/camera/control/down/'+this.id, {
data: {}
}).then(res => {
}).catch(err => {
})
},
downStop(){
console.log('下鼠标抬起')
this.$axios.post('/camera/control/down/stop/'+this.id, {
data: {}
}).then(res => {
}).catch(err => {
})
},
rightDownStart(){
console.log('右下鼠标按下')
this.$axios.post('/camera/control/rightDown/'+this.id, {
data: {}
}).then(res => {
}).catch(err => {
})
},
rightDownStop(){
console.log('右下鼠标抬起')
this.$axios.post('/camera/control/rightDown/stop/'+this.id, {
data: {}
}).then(res => {
}).catch(err => {
})
},
handleCancel() {
console.log('Clicked cancel button');
console.log(this.title);

Loading…
Cancel
Save