/**
|
* 跨城站点管理管理初始化
|
*/
|
var TSiteLock = {
|
layerIndex: -1,
|
validateFields: {
|
}
|
};
|
|
/**
|
* 关闭此对话框
|
*/
|
TSiteLock.close = function() {
|
parent.layer.close(window.parent.TSite.layerIndex);
|
}
|
/**
|
* 添加
|
*/
|
TSiteLock.add = function(id) {
|
console.log("看看id");
|
console.log(id)
|
var startTime = $("#start-time").val().replace("T"," ");
|
var endTime = $("#end-time").val().replace("T"," ");
|
data1 = {
|
siteId:id,
|
startTime:startTime,
|
endTime:endTime
|
};
|
$.ajax({
|
url: Feng.ctxPath + "/tSite/addSiteLock",
|
type: "POST",
|
contentType: "application/json", // 设置请求头的 Content-Type
|
data: JSON.stringify(data1), // 将数据转换为 JSON 字符串
|
success: function(response) {
|
console.log("看看后端返回的id");
|
console.log(response.data);
|
var str = '<tr class="timeClass">' +
|
'<td><span>' + startTime +'</span></td>' +
|
'<td><span>' + endTime + '</span></td>' +
|
'<td><button '+'id = '+response.data+' + onclick="TSiteLock.delete(this)">删除</button></td></tr>';
|
$("#coun").append(str);
|
Feng.success("锁定成功!");
|
},
|
error: function(xhr, status, error) {
|
Feng.error("您的网络异常!");
|
}
|
});
|
}
|
/**
|
* 删除
|
*/
|
TSiteLock.delete = function(e) {
|
$(e).parent().parent().remove();
|
$.ajax({
|
url: Feng.ctxPath + "/tSite/deleteSiteLock/"+e.id,
|
type: "POST",
|
contentType: "application/json", // 设置请求头的 Content-Type
|
success: function(response) {
|
Feng.success("删除成功!");
|
TSite.search();
|
},
|
error: function(xhr, status, error) {
|
var errorMessage = xhr.responseText ? xhr.responseText : "删除失败!";
|
Feng.error("您的网络异常!");
|
}
|
});
|
}
|
|
|
function UploadFileFn(){
|
$('#upFile').click();
|
}
|
|
|
$(function () {
|
|
|
|
});
|