Former-commit-id: 5ead92707890d6c090b0eafd3f8362814ffcc9e1
TangShanKaiPing
wanggang 6 years ago
parent 710b6c0b6b
commit 5f44350bce

@ -35,6 +35,9 @@ namespace Application.Models
[Display(Name = "模板")]
public string Template { get; set; }
[Display(Name = "移动模板")]
public string MobileTemplate { get; set; }
[Display(Name = "序号")]
public int DisplayOrder { get; set; }

@ -3,6 +3,17 @@
ViewData["IsHomePage"] = true;
}
<div id="template">
<style>
h3 img {
height: 16px;
}
</style>
<style>
.box-tools img, .box-body img {
height: 32px;
cursor: pointer;
}
</style>
<div class="row">
<div class="col-md-12">
<div v-if="model" class="callout callout-success">
@ -32,7 +43,7 @@
<h3 class="box-title"><img src="/images/ptz.png" style="height:16px;margin-right:10px;" />云台操作</h3>
</div>
<div class="box-body" style="height:178px;">
<table class="ptz">
<table class="ptz" style="width:100%;">
<tr>
<td></td>
<td></td>

Binary file not shown.

@ -1 +1 @@
//复制移动端node.html的template节点内容到此作为修改的基础
<!--复制移动端node.html的template节点内容到此作为修改的基础-->

@ -57,11 +57,6 @@ function loadTemplate() {
axios.post(url, { crossDomain: true })
.then(function (response) {
var html = response.data;
$(html).each(function (i, n) {
if (n.tagName === 'STYLE') {
$('head').append(n);
}
});
$('#template').html(html);
init();
})
@ -220,29 +215,16 @@ function updateItem(list, item) {
$(document).on('change', '#camera', function (e) {
UpdateCamera()
});
$('body').on('mousedown touchstart', 'img.camera.ajax', function (e) {
$(document).on('mousedown touchstart', 'img.camera.ajax', function (e) {
var number = $('#camera').val();
if ($(this).hasClass('Zoomin')) {
ajax('/App/ExecApi', { connectionId: connectionId, number: number, method: '/Onvif/Zoomin' }, 'post');
} else if ($(this).hasClass('Zoomout')) {
ajax('/App/ExecApi', { connectionId: connectionId, number: number, method: '/Onvif/Zoomout' }, 'post');
} else if ($(this).hasClass('Left')) {
ajax('/App/ExecApi', { connectionId: connectionId, number: number, method: '/Onvif/Left' }, 'post');
} else if ($(this).hasClass('Right')) {
ajax('/App/ExecApi', { connectionId: connectionId, number: number, method: '/Onvif/Right' }, 'post');
} else if ($(this).hasClass('Up')) {
ajax('/App/ExecApi', { connectionId: connectionId, number: number, method: '/Onvif/Up' }, 'post');
} else if ($(this).hasClass('Down')) {
ajax('/App/ExecApi', { connectionId: connectionId, number: number, method: '/Onvif/Down' }, 'post');
} else if ($(this).hasClass('Stop')) {
ajax('/App/ExecApi', { connectionId: connectionId, number: number, method: '/Onvif/Stop' }, 'post');
}
var cmd = $(this).attr('data-cmd');
ajax('/App/ExecApi', { connectionId: connectionId, number: number, method: '/Onvif/'+cmd }, 'post');
return false;
});
$('body').on('mouseup touchend', 'img.ajax', function (e) {
console.log($(this).html());
if (!$(this).hasClass('Stop')) {
var number = $('#camera').val();
$(document).on('mouseup touchend', 'img.camera.ajax', function (e) {
var number = $('#camera').val();
var cmd = $(this).attr('data-cmd');
if (cmd!=='Stop') {
setTimeout(function () {
ajax('/App/ExecApi', { number: number, method: '/Onvif/Stop' }, 'post');
}, 500);
@ -287,6 +269,9 @@ function onMessage(method, json, from) {
}
/*vue*/
function init() {
$('#template style').each(function (i, n) {
$('head').append(n);
});
vm = new Vue({
el: '#app',
data() {

Binary file not shown.
Loading…
Cancel
Save