-
-
@@ -65,26 +57,11 @@
var table = layui.table;
var admin = layui.admin;
var laytpl = layui.laytpl;
+ var query = top.restAjax.params(window.location.href);
+ var areaId = query.areaId;
+ var areaName = decodeURI(query.areaName);
var tableUrl = top.restAjax.path('api/community/listpagecommunity', []);
- function init(){
- initArea1Select();
- }
- init();
-
- // 初始化街镇
- function initArea1Select() {
- top.restAjax.get(top.restAjax.path('api/dict/listdict/9d179f05-3ea0-48f7-853c-d3b7124b791c', []), {}, null, function(code, data, args) {
- laytpl(document.getElementById('areaSelectTemplate').innerHTML).render(data, function(html) {
- document.getElementById('areaSelectTemplateBox').innerHTML = html;
- });
- form.render('select', 'areaSelectTemplateBox');
- initTable();
- }, function(code, data) {
- top.dialog.msg(data.msg);
- });
- }
-
form.on('select(areaChange)', function(data){
reloadTable(1);
});
@@ -96,11 +73,11 @@
id: 'dataTable',
url: tableUrl,
width: admin.screen() > 1 ? '100%' : '',
- height: $win.height() - 100,
+ height: $win.height() - 68,
limit: 20,
limits: [20, 40, 60, 80, 100, 200],
where : {
- areaId : $('#area').val()
+ areaId: areaId
},
toolbar: '#headerToolBar',
request: {
@@ -115,6 +92,15 @@
{field:'communitySummary', width:160, title: '说明', align:'center',},
{field:'communityOrder', width:160, title: '排序', align:'center',},
{field:'areaName', width:150, title: '地区名称', align:'center',},
+ {field:'jumpSystemUrl', width:200, title: '跳转地址', align:'center',
+ templet: function(row) {
+ var data = row.jumpSystemUrl;
+ if(data) {
+ return `
${data}`;
+ }
+ return '-';
+ }
+ },
]
],
page: true,
@@ -128,6 +114,7 @@
}
});
}
+ initTable();
// 重载表格
function reloadTable(currentPage) {
@@ -140,7 +127,6 @@
page: {
curr: currentPage
},
- height: $win.height() - 100,
});
}
@@ -157,12 +143,13 @@
if(layEvent === 'save') {
layer.open({
type: 2,
- title: '新增社区(村)',
+ title: `${areaName}:新增社区(村)`,
closeBtn: 1,
- area: ['40%', '50%'],
+ area: ['40%', '100%'],
+ offset: 'r',
shadeClose: false,
anim: 2,
- content: top.restAjax.path('route/community/save.html', []),
+ content: top.restAjax.path('route/community/save.html?areaId={areaId}&areaName={areaName}', [areaId, query.areaName]),
end: function() {
reloadTable();
}
@@ -175,9 +162,10 @@
} else {
layer.open({
type: 2,
- title: '编辑信息',
+ title: `${areaName}:编辑社区(村)`,
+ offset: 'r',
closeBtn: 1,
- area: ['40%', '50%'],
+ area: ['40%', '100%'],
shadeClose: false,
anim: 2,
content: top.restAjax.path('route/community/update.html?communityId={id}', [checkDatas[0].communityId]),
diff --git a/src/main/resources/static/route/community/save.html b/src/main/resources/static/route/community/save.html
index 6f26f15..36cb456 100755
--- a/src/main/resources/static/route/community/save.html
+++ b/src/main/resources/static/route/community/save.html
@@ -34,6 +34,12 @@