diff --git a/src/main/resources/templates/populationinfo/list-bigdata.html b/src/main/resources/templates/populationinfo/list-bigdata.html index 7c3f36a..5b915a8 100644 --- a/src/main/resources/templates/populationinfo/list-bigdata.html +++ b/src/main/resources/templates/populationinfo/list-bigdata.html @@ -82,13 +82,16 @@ // 初始化证件类型下拉选择 function initIdcardTypeSelect() { - top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/76c5044f-805a-4313-b1e8-79e966b97c0d', []), {}, null, function(code, data, args) { - laytpl(document.getElementById('idcardTypeSelectTemplate').innerHTML).render(data, function(html) { - document.getElementById('idcardTypeSelectTemplateBox').innerHTML = html; - }); - form.render('select', 'idcardTypeSelectTemplateBox'); - }, function(code, data) { - top.dialog.msg(data.msg); + $.ajax({ + url: 'api/datadictionary/listdictionarybyparentid/76c5044f-805a-4313-b1e8-79e966b97c0d', + type: 'get', + dataType: 'json', + success: function (data) { + laytpl(document.getElementById('idcardTypeSelectTemplate').innerHTML).render(data, function(html) { + document.getElementById('idcardTypeSelectTemplateBox').innerHTML = html; + }); + form.render('select', 'idcardTypeSelectTemplateBox'); + } }); } initIdcardTypeSelect(); @@ -98,9 +101,10 @@ table.render({ elem: '#dataTable', id: 'dataTable', - url: top.restAjax.path(tableUrl, []), + url: tableUrl, width: admin.screen() > 1 ? '100%' : '', height: $win.height() - 90, + defaultToolbar: [], limit: 20, limits: [20, 40, 60, 80, 100, 200], toolbar: '#headerToolBar', @@ -187,11 +191,6 @@ } return rowData; } - }, - {field: 'creator', width:120, title: '认领记录', align:'center', fixed: 'right', - templet: function(row) { - return ''; - } } ] ], @@ -209,7 +208,7 @@ // 重载表格 function reloadTable(currentPage) { table.reload('dataTable', { - url: top.restAjax.path(tableUrl, []), + url: tableUrl, where: { name: $('#name').val(), idcardType: $('#idcardType').val(), @@ -222,49 +221,6 @@ }); } - // 表格行中按钮事件 - table.on('tool(dataTable)', function(obj) { - var layEvent = obj.event; - var data = obj.data; - if(layEvent === 'bindEvent') { - top.layer.open({ - type: 2, - title: data.name + "[" + data.idcard + "](近50条)", - closeBtn: 1, - offset:"r", - area: ['500px', '100%'], - shadeClose: true, - anim: 2, - content: top.restAjax.path('route/populationinfo/log?populationInfoId={populationInfoId}', [data.populationInfoId]), - end: function() { - reloadTable(); - } - }); - } - }); - - // 删除 - function removeData(ids) { - top.dialog.msg(top.dataMessage.delete, { - time: 0, - btn: [top.dataMessage.button.yes, top.dataMessage.button.no], - shade: 0.3, - yes: function (index) { - top.dialog.close(index); - var layIndex; - top.restAjax.delete(top.restAjax.path('api/populationinfo/remove/{ids}', [ids]), {}, null, function (code, data) { - top.dialog.msg(top.dataMessage.deleteSuccess, {time: 1000}); - reloadTable(); - }, function (code, data) { - top.dialog.msg(data.msg); - }, function () { - layIndex = top.dialog.msg(top.dataMessage.deleting, {icon: 16, time: 0, shade: 0.3}); - }, function () { - top.dialog.close(layIndex); - }); - } - }); - } initTable(); // 事件 - 页面变化 $win.on('resize', function() { @@ -282,188 +238,20 @@ var layEvent = obj.event; var checkStatus = table.checkStatus('dataTable'); var checkDatas = checkStatus.data; - if(layEvent === 'saveEvent') { - layer.open({ - type: 2, - title: false, - closeBtn: 0, - area: ['100%', '100%'], - shadeClose: true, - anim: 2, - content: top.restAjax.path('route/populationinfo/save', []), - end: function() { - reloadTable(); - } - }); - } else if(layEvent === 'updateEvent') { + if(layEvent === 'updateEvent') { if(checkDatas.length === 0) { - top.dialog.msg(top.dataMessage.table.selectEdit); + top.layer.msg("至少选择一个人员"); } else if(checkDatas.length > 1) { - top.dialog.msg(top.dataMessage.table.selectOneEdit); + top.layer.msg("只能选择一个人员"); } else { - top.dialog.open({ - url: top.restAjax.path('pages/housepopulation/index.html#/population-info?populationInfoId={populationInfoId}', [checkDatas[0].populationInfoId]), + top.layer.open({ + type: 2, title: '个人信息卡片', - width: '80%', - height: '80%', - onClose: function() { - } - }); - } - } else if(layEvent === 'removeEvent') { - if(checkDatas.length === 0) { - top.dialog.msg(top.dataMessage.table.selectDelete); - } else { - var ids = ''; - for(var i = 0, item; item = checkDatas[i++];) { - if(i > 1) { - ids += '_'; - } - ids += item['populationInfoId']; - } - removeData(ids); - } - }else if(layEvent === 'excelEvent') { - top.layer.open({ - type: 2, - title: false, - closeBtn: 1, - area: ['70%', '90%'], - shadeClose: true, - anim: 2, - content: top.restAjax.path('route/populationinfo/importexcel', []), - end: function() { - reloadTable(); - } - }); - } else if(layEvent === 'correctEvent') { - if(checkDatas.length === 0) { - top.dialog.msg(top.dataMessage.table.selectEdit); - } else if(checkDatas.length > 1) { - top.dialog.msg(top.dataMessage.table.selectOneEdit); - } else { - top.layer.open({ - type: 2, - title: "社区矫正人员", closeBtn: 1, - area: ['95%', '95%'], - shadeClose: true, + area: ['80%', '80%'], + shadeClose: false, anim: 2, - content: top.restAjax.path('route/correct/list?populationInfoId={populationInfoId}', [checkDatas[0].populationInfoId]), - end: function() { - reloadTable(); - } - }); - } - } else if(layEvent === 'releaseEvent') { - if(checkDatas.length === 0) { - top.dialog.msg(top.dataMessage.table.selectEdit); - } else if(checkDatas.length > 1) { - top.dialog.msg(top.dataMessage.table.selectOneEdit); - } else { - top.layer.open({ - type: 2, - title: "刑满释放人员", - closeBtn: 1, - area: ['95%', '95%'], - shadeClose: true, - anim: 2, - content: top.restAjax.path('route/release/list?populationInfoId={populationInfoId}', [checkDatas[0].populationInfoId]), - end: function() { - reloadTable(); - } - }); - } - } else if(layEvent === 'disputeEvent') { - if(checkDatas.length === 0) { - top.dialog.msg(top.dataMessage.table.selectEdit); - } else if(checkDatas.length > 1) { - top.dialog.msg(top.dataMessage.table.selectOneEdit); - } else { - top.layer.open({ - type: 2, - title: "矛盾纠纷", - closeBtn: 1, - area: ['95%', '95%'], - shadeClose: true, - anim: 2, - content: top.restAjax.path('route/dispute/list?populationInfoId={populationInfoId}', [checkDatas[0].populationInfoId]), - end: function() { - reloadTable(); - } - }); - } - } else if(layEvent === 'securityEvent') { - if(checkDatas.length === 0) { - top.dialog.msg(top.dataMessage.table.selectEdit); - } else if(checkDatas.length > 1) { - top.dialog.msg(top.dataMessage.table.selectOneEdit); - } else { - top.layer.open({ - type: 2, - title: "社会治安", - closeBtn: 1, - area: ['95%', '95%'], - shadeClose: true, - anim: 2, - content: top.restAjax.path('route/security/list?populationInfoId={populationInfoId}', [checkDatas[0].populationInfoId]), - end: function() { - reloadTable(); - } - }); - } - } else if(layEvent === 'drugEvent') { - if(checkDatas.length === 0) { - top.dialog.msg(top.dataMessage.table.selectEdit); - } else if(checkDatas.length > 1) { - top.dialog.msg(top.dataMessage.table.selectOneEdit); - } else { - top.layer.open({ - type: 2, - title: "吸毒人员", - closeBtn: 1, - area: ['95%', '95%'], - shadeClose: true, - anim: 2, - content: top.restAjax.path('route/drug/list?populationInfoId={populationInfoId}', [checkDatas[0].populationInfoId]), - end: function() { - reloadTable(); - } - }); - } - } else if(layEvent === 'cultEvent') { - if(checkDatas.length === 0) { - top.dialog.msg(top.dataMessage.table.selectEdit); - } else if(checkDatas.length > 1) { - top.dialog.msg(top.dataMessage.table.selectOneEdit); - } else { - top.layer.open({ - type: 2, - title: "涉邪人员", - closeBtn: 1, - area: ['95%', '95%'], - shadeClose: true, - anim: 2, - content: top.restAjax.path('route/cult/list?populationInfoId={populationInfoId}', [checkDatas[0].populationInfoId]), - end: function() { - reloadTable(); - } - }); - } - } else if(layEvent === 'petitionEvent') { - if(checkDatas.length === 0) { - top.dialog.msg(top.dataMessage.table.selectEdit); - } else if(checkDatas.length > 1) { - top.dialog.msg(top.dataMessage.table.selectOneEdit); - } else { - top.layer.open({ - type: 2, - title: "重点上访户", - closeBtn: 1, - area: ['95%', '95%'], - shadeClose: true, - anim: 2, - content: top.restAjax.path('route/petition/list?populationInfoId={populationInfoId}', [checkDatas[0].populationInfoId]), + content: 'pages/housepopulation/index.html#/population-info?populationInfoId=' + checkDatas[0].populationInfoId, end: function() { reloadTable(); } diff --git a/src/main/resources/templates/populationinfo/list.html b/src/main/resources/templates/populationinfo/list.html index b9d7a57..7d307eb 100644 --- a/src/main/resources/templates/populationinfo/list.html +++ b/src/main/resources/templates/populationinfo/list.html @@ -79,9 +79,9 @@ - - - + @@ -524,18 +524,20 @@ } }); } - // top.layer.open({ - // type: 2, - // title: "调试", - // closeBtn: 1, - // area: ['95%', '95%'], - // shadeClose: true, - // anim: 2, - // content: top.restAjax.path('route/populationinfo-data/jiedao?name=万水泉镇', []), - // end: function() { - // reloadTable(); - // } - // }); + }else if(layEvent === 'tiaoshiEvent') { + + top.layer.open({ + type: 2, + title: "调试", + closeBtn: 1, + area: ['95%', '95%'], + shadeClose: true, + anim: 2, + content: top.restAjax.path('route/populationinfo-data/organization?organization=党员', []), + end: function() { + reloadTable(); + } + }); } }); });