|
@@ -1,35 +1,28 @@
|
|
|
-// 详情弹框js start
|
|
|
-var pointId = '';
|
|
|
-var innerPage = 1;
|
|
|
-
|
|
|
-// 详情弹框
|
|
|
-$(document).on('click', 'a.view-detail', function() {
|
|
|
- let dataId = $(this).data('id'); // 单位ID
|
|
|
- pointId = dataId;
|
|
|
- queryPointDetailList = layer.open({
|
|
|
+// 新增弹框
|
|
|
+$(document).on('click', '.add', function() {
|
|
|
+ layerCreateIndex = layer.open({
|
|
|
type: 1,
|
|
|
title: false,
|
|
|
closeBtn: 0,
|
|
|
shadeClose: true,
|
|
|
skin: 'yourclass',
|
|
|
- area: [
|
|
|
- '700px', '500px'
|
|
|
- ],
|
|
|
- content: $(".queryPointDetailList"),
|
|
|
+ area: ['450px', '500px'],
|
|
|
+ content: $(".addDeviceTypeOut"),
|
|
|
success: function() {
|
|
|
- getPointDetailAjax({ "id": dataId })
|
|
|
- // 获取部门列表 ajax请求
|
|
|
$('.clsBtn,.cancel').click(function() {
|
|
|
- alert(1)
|
|
|
- innerPage = 1;
|
|
|
- layer.close(queryPointDetailList);
|
|
|
+ layer.close(layerCreateIndex);
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
|
|
|
+// 新增列表渲染
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
// 获取列表 ajax请求
|
|
|
-function getPointDetailAjax(queryParam = {}, innerPage = 1) {
|
|
|
+function getTeamInnerList(queryParam = {}, innerPage = 1) {
|
|
|
queryParam.page = innerPage;
|
|
|
queryParam.limit = 1; // 每页显示条数
|
|
|
queryParam.start = (queryParam.page - 1) * queryParam.limit;
|
|
@@ -85,29 +78,29 @@ function getPointDetailAjax(queryParam = {}, innerPage = 1) {
|
|
|
// 分页操作
|
|
|
$('#firstPageButton2').on('click', function() {
|
|
|
innerPage = 1;
|
|
|
- getPointDetailAjax(getSearchParamObj2(), 1);
|
|
|
+ getTeamInnerList(getSearchParamObj2(), 1);
|
|
|
});
|
|
|
|
|
|
$('#lastPageButton2').on('click', function() {
|
|
|
innerPage = totalPages;
|
|
|
- getPointDetailAjax(getSearchParamObj2(), innerPage);
|
|
|
+ getTeamInnerList(getSearchParamObj2(), innerPage);
|
|
|
});
|
|
|
|
|
|
$('#prevPageButton2').on('click', function() {
|
|
|
innerPage -= 1;
|
|
|
- getPointDetailAjax(getSearchParamObj2(), innerPage);
|
|
|
+ getTeamInnerList(getSearchParamObj2(), innerPage);
|
|
|
});
|
|
|
|
|
|
$('#nextPageButton2').on('click', function() {
|
|
|
innerPage += 1;
|
|
|
- getPointDetailAjax(getSearchParamObj2(), innerPage);
|
|
|
+ getTeamInnerList(getSearchParamObj2(), innerPage);
|
|
|
})
|
|
|
|
|
|
|
|
|
// 按钮搜索
|
|
|
$('#buttonSearch2').on('click', function() {
|
|
|
innerPage = 1;
|
|
|
- getPointDetailAjax(getSearchParamObj2());
|
|
|
+ getTeamInnerList(getSearchParamObj2());
|
|
|
})
|
|
|
|
|
|
// 拼接搜索条件
|
|
@@ -125,66 +118,66 @@ $('.pg-refresh2').click(resetForm);
|
|
|
function resetForm() {
|
|
|
innerPage = 1;
|
|
|
$("#weibao").val("0");
|
|
|
- getPointDetailAjax(getSearchParamObj2());
|
|
|
+ getTeamInnerList(getSearchParamObj2());
|
|
|
}
|
|
|
|
|
|
|
|
|
//点位详情弹框
|
|
|
-$(document).on('click', 'a.pointDetail', function() {
|
|
|
- let dwId = $(this).data('id');
|
|
|
- layerDepartmentIndex = layer.open({
|
|
|
- type: 1,
|
|
|
- title: false,
|
|
|
- closeBtn: 0,
|
|
|
- shadeClose: true,
|
|
|
- skin: 'yourclass',
|
|
|
- area: [
|
|
|
- '400px', '400px'
|
|
|
- ],
|
|
|
- content: $(".pointDetailOut"),
|
|
|
- success: function() {
|
|
|
- ajaxRequest(RECORD_POINT_DETAIL, "POST", { "id": dwId }, function(result) {
|
|
|
- console.log(result.RESULT[0])
|
|
|
- var data = result.RESULT[0];
|
|
|
- $('#pointDetailUrl').attr('src', data.picture_route);
|
|
|
- }, function(errorMsg) {
|
|
|
- alert("请求数据失败!");
|
|
|
- }, 3);
|
|
|
-
|
|
|
- $('.clsBtn2,.cancel2').click(function() {
|
|
|
- innerPage = 1;
|
|
|
- layer.close(layerDepartmentIndex);
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
-})
|
|
|
+// $(document).on('click', 'a.pointDetail', function() {
|
|
|
+// let dwId = $(this).data('id');
|
|
|
+// layerDepartmentIndex = layer.open({
|
|
|
+// type: 1,
|
|
|
+// title: false,
|
|
|
+// closeBtn: 0,
|
|
|
+// shadeClose: true,
|
|
|
+// skin: 'yourclass',
|
|
|
+// area: [
|
|
|
+// '400px', '400px'
|
|
|
+// ],
|
|
|
+// content: $(".pointDetailOut"),
|
|
|
+// success: function() {
|
|
|
+// ajaxRequest(RECORD_POINT_DETAIL, "POST", { "id": dwId }, function(result) {
|
|
|
+// console.log(result.RESULT[0])
|
|
|
+// var data = result.RESULT[0];
|
|
|
+// $('#pointDetailUrl').attr('src', data.picture_route);
|
|
|
+// }, function(errorMsg) {
|
|
|
+// alert("请求数据失败!");
|
|
|
+// }, 3);
|
|
|
+
|
|
|
+// $('.clsBtn2,.cancel2').click(function() {
|
|
|
+// innerPage = 1;
|
|
|
+// layer.close(layerDepartmentIndex);
|
|
|
+// })
|
|
|
+// }
|
|
|
+// })
|
|
|
+// })
|
|
|
|
|
|
//维保报告点击
|
|
|
-$(document).on('click', 'a.weibaoReport', function() {
|
|
|
- let jlId = $(this).data('id'); //单位ID
|
|
|
- layerReportIndex = layer.open({
|
|
|
- type: 1,
|
|
|
- title: false,
|
|
|
- closeBtn: 0,
|
|
|
- shadeClose: true,
|
|
|
- skin: 'yourclass',
|
|
|
- area: [
|
|
|
- '400px', '400px'
|
|
|
- ],
|
|
|
- content: $(".weibaoReportOut"),
|
|
|
- success: function() {
|
|
|
- ajaxRequest(RECORD_AND_POINT, "POST", { "jlid": jlId }, function(result) {
|
|
|
- console.log(result.RESULT[0])
|
|
|
- var data = result.RESULT[0];
|
|
|
- $('#weibaoReportUrl').attr('src', data.report_photos);
|
|
|
- }, function(errorMsg) {
|
|
|
- alert("请求数据失败!");
|
|
|
- }, 3);
|
|
|
-
|
|
|
- $('.clsBtn3,.cancel3').click(function() {
|
|
|
- innerPage = 1;
|
|
|
- layer.close(layerReportIndex);
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
-})
|
|
|
+// $(document).on('click', 'a.weibaoReport', function() {
|
|
|
+// let jlId = $(this).data('id'); //单位ID
|
|
|
+// layerReportIndex = layer.open({
|
|
|
+// type: 1,
|
|
|
+// title: false,
|
|
|
+// closeBtn: 0,
|
|
|
+// shadeClose: true,
|
|
|
+// skin: 'yourclass',
|
|
|
+// area: [
|
|
|
+// '400px', '400px'
|
|
|
+// ],
|
|
|
+// content: $(".weibaoReportOut"),
|
|
|
+// success: function() {
|
|
|
+// ajaxRequest(RECORD_AND_POINT, "POST", { "jlid": jlId }, function(result) {
|
|
|
+// console.log(result.RESULT[0])
|
|
|
+// var data = result.RESULT[0];
|
|
|
+// $('#weibaoReportUrl').attr('src', data.report_photos);
|
|
|
+// }, function(errorMsg) {
|
|
|
+// alert("请求数据失败!");
|
|
|
+// }, 3);
|
|
|
+
|
|
|
+// $('.clsBtn3,.cancel3').click(function() {
|
|
|
+// innerPage = 1;
|
|
|
+// layer.close(layerReportIndex);
|
|
|
+// })
|
|
|
+// }
|
|
|
+// })
|
|
|
+// })
|