提交 f76d49d6 编写于 作者: doc_wei's avatar doc_wei

行政区划代码整改为低代码

上级 5fd3787e
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor();
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$,
form = layui.form;
var sysDictType = GetUrlParam("sysDictType");
sysDictDataUtil.showDictDataListByDictTypeCode(sysDictData[sysDictType]["key"], 'select', "dictDataId", '', form);
matchingLanguage();
form.render();
form.on('submit(formAddBean)', function (data) {
if (winui.verifyForm(data.elem)) {
var params = {
id: $("#dictDataId").val(),
name: $("#dictDataId").find("option:selected").text()
};
parent.turnData = params;
parent.refreshCode = '0';
parent.layer.close(index);
}
return false;
});
$("body").on("click", "#cancle", function() {
parent.layer.close(index);
});
});
\ No newline at end of file
layui.config({
base: basePath,
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'jquery', 'winui', 'textool', 'tableTreeDj'], function (exports) {
}).define(['window', 'jquery', 'winui', 'textool', 'tableTreeDj', 'form'], function (exports) {
winui.renderColor();
layui.use(['form'], function (form) {
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$,
textool = layui.textool,
tableTree = layui.tableTreeDj;
textool.init({eleId: 'remark', maxlength: 200});
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$,
textool = layui.textool,
tableTree = layui.tableTreeDj,
form = layui.form;
textool.init({eleId: 'remark', maxlength: 200});
var treeTableData = [];
skyeyeClassEnumUtil.showEnumDataListByClassName("teamObjectType", 'select', "objectType", '', form);
skyeyeClassEnumUtil.showEnumDataListByClassName("commonEnable", 'radio', "enabled", '', form);
skyeyeClassEnumUtil.showEnumDataListByClassName("teamObjectType", 'select', "objectType", '', form);
skyeyeClassEnumUtil.showEnumDataListByClassName("commonEnable", 'radio', "enabled", '', form);
loadTreeTable();
function loadTreeTable() {
tableTree.render({
id: 'messageTable',
elem: '#messageTable',
data: [{"id": "123qwe", "name": "阿萨斯多", "pId": "0", "lay_is_open": true},
{"id": "123qwe1", "name": "阿萨斯多qqq", "pId": "123qwe", "lay_is_open": true}],
cols: [[
{ field: 'name', title: '菜单名称', width: 120 },
{ field: 'menuNameEn', title: '英文名称', width: 150 },
{ field: 'orderNum', title: '排序', align: 'center', width: 80 },
{ field: 'desktopName', title: '所属桌面', width: 120 },
{ field: 'menuParentName', title: '父菜单', width: 100 },
{ field: 'menuUrl', title: '菜单链接', width: 160 }
]],
done: function(json) {
matchingLanguage();
}
}, {
keyId: 'id',
keyPid: 'pId',
title: 'name',
defaultShow: true,
});
}
loadTreeTable();
function loadTreeTable() {
tableTree.render({
id: 'messageTable',
elem: '#messageTable',
data: [{"id": "123qwe", "name": "阿萨斯多", "pId": "0", "lay_is_open": true},
{"id": "123qwe1", "name": "阿萨斯多qqq", "pId": "123qwe", "lay_is_open": true}],
cols: [[
{ field: 'name', title: '名称', width: 120 },
{ field: 'menuNameEn', title: '部门', width: 150 },
{ field: 'orderNum', title: '邮箱', width: 150 },
{ field: 'desktopName', title: '联系方式', width: 120 },
{ title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 150, toolbar: '#tableBar'}
]],
done: function(json) {
matchingLanguage();
}
}, {
keyId: 'id',
keyPid: 'pId',
title: 'name',
defaultShow: true,
});
tableTree.getTable().on('tool(messageTable)', function (obj) {
var data = obj.data;
var layEvent = obj.event;
if (layEvent === 'removeRole') { // 移除角色
$.each(treeTableData, function(index, item) {
if (item.id == data.id) {
treeTableData.splice(index, 1);
}
});
} else if (layEvent === 'addUser') { // 添加成员
systemCommonUtil.userReturnList = [];
systemCommonUtil.chooseOrNotMy = "1"; // 人员列表中是否包含自己--1.包含;其他参数不包含
systemCommonUtil.chooseOrNotEmail = "2"; // 人员列表中是否必须绑定邮箱--1.必须;其他参数没必要
systemCommonUtil.checkType = "1"; // 人员选择类型,1.多选;其他。单选
systemCommonUtil.openSysUserStaffChoosePage(function (userReturnList) {
console.log(userReturnList)
});
} else if (layEvent === 'removeUser') { // 移除成员
loadAuthList();
form.on('select(objectType)', function(data) {
loadAuthList();
}
});
}
loadAuthList();
form.on('select(objectType)', function(data) {
loadAuthList();
});
matchingLanguage();
form.render();
form.on('submit(formAddBean)', function (data) {
if (winui.verifyForm(data.elem)) {
var params = {
dictName: $("#dictName").val(),
dictCode: $("#dictCode").val(),
enabled: $("#enabled input:radio:checked").val(),
remark: $("#remark").val(),
};
AjaxPostUtil.request({url: reqBasePath + "writeDictTypeMation", params: params, type: 'json', method: "POST", callback: function (json) {
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
return false;
});
matchingLanguage();
form.render();
form.on('submit(formAddBean)', function (data) {
if (winui.verifyForm(data.elem)) {
var params = {
dictName: $("#dictName").val(),
dictCode: $("#dictCode").val(),
enabled: $("#enabled input:radio:checked").val(),
remark: $("#remark").val(),
};
AjaxPostUtil.request({url: reqBasePath + "writeDictTypeMation", params: params, type: 'json', method: "POST", callback: function (json) {
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
return false;
});
function loadAuthList() {
var objectType = $('#objectType').val();
teamObjectPermissionUtil.insertPageShow(objectType, 'authList', form);
}
$("body").on("click", "#addRole", function() {
_openNewWindows({
url: "../../tpl/sysDictData/sysDictDataSelectChoose.html?sysDictType=teamRole",
title: '选择角色',
pageId: "sysDictDataSelectChoose",
area: ['50vw', '50vh'],
callBack: function (refreshCode, turnData) {
var checkParams = getInPoingArr(treeTableData, "id", turnData.id);
if (checkParams == null) {
turnData["pId"] = '0';
turnData["lay_is_open"] = true;
treeTableData.push(turnData);
tableTree.reload("messageTable", {data: treeTableData});
} else {
winui.window.msg("角色重复", {icon: 2, time: 2000});
}
}});
});
function loadAuthList() {
var objectType = $('#objectType').val();
teamObjectPermissionUtil.insertPageShow(objectType, 'authList', form);
}
$("body").on("click", "#cancle", function() {
parent.layer.close(index);
});
$("body").on("click", "#cancle", function() {
parent.layer.close(index);
});
});
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div style="margin:0 auto;padding:20px;">
<form class="layui-form" action="" id="showForm" autocomplete="off">
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">数据<i class="red">*</i></label>
<div class="layui-input-block">
<select lay-filter="dictDataId" lay-search="" id="dictDataId" win-verify="required">
</select>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<div class="layui-input-block">
<button class="winui-btn" id="cancle"><language showName="com.skyeye.cancel"></language></button>
<button class="winui-btn" lay-submit lay-filter="formAddBean"><language showName="com.skyeye.save"></language></button>
</div>
</div>
</form>
</div>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/sysDictData/'}).use('sysDictDataSelectChoose');
</script>
</body>
</html>
\ No newline at end of file
......@@ -42,8 +42,16 @@
<span class="hr-title">成员信息</span><hr>
</div>
<div class="layui-form-item layui-col-xs12">
<div style="margin:auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
<label class="layui-form-label">成员信息:</label>
<div class="layui-input-block">
<div class="winui-toolbar">
<div class="winui-tool" style="text-align: left;">
<button id="addRole" class="winui-toolbtn" type="button"><i class="fa fa-plus" aria-hidden="true"></i>添加角色</button>
</div>
</div>
<div style="margin:auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
</div>
</div>
</div>
......@@ -62,6 +70,15 @@
</form>
</div>
<script type="text/html" id="tableBar">
{{# if(d.pId == '0'){ }}
<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="addUser">添加成员</a>
<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="removeRole">移除</a>
{{# } else { }}
<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="removeUser">移除</a>
{{# } }}
</script>
<script type="text/x-handlebars-template" id="authTableTemplate">
{{#json}}
<div class="layui-form-item layui-col-xs12">
......
......@@ -72,7 +72,7 @@ layui.config({
// 省级行政区划
function loadChildProvinceArea(){
AjaxPostUtil.request({url: reqBasePath + "commontarea001", params: {}, type: 'json', method: "POST", callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: 0}, type: 'json', method: "POST", callback: function (json) {
var str = '<dd class="layui-col-xs3"><select id="provinceId" win-verify="required" lay-filter="areaProvince" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
......@@ -85,7 +85,7 @@ layui.config({
// 市级行政区划
function loadChildCityArea(){
AjaxPostUtil.request({url: reqBasePath + "commontarea002", params: {rowId: $("#provinceId").val()}, type: 'json', method: "POST", callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: $("#provinceId").val()}, type: 'json', method: "POST", callback: function (json) {
var str = '<dd class="layui-col-xs3"><select id="cityId" win-verify="required" lay-filter="areaCity" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
......@@ -98,7 +98,7 @@ layui.config({
// 县级行政区划
function loadChildArea(){
AjaxPostUtil.request({url: reqBasePath + "commontarea003", params: {rowId: $("#cityId").val()}, type: 'json', method: "POST", callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: $("#cityId").val()}, type: 'json', method: "POST", callback: function (json) {
var str = '<dd class="layui-col-xs3"><select id="addressAreaId" win-verify="required" lay-filter="area" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
......@@ -111,7 +111,7 @@ layui.config({
// 镇级行政区划
function loadChildAreaTownShip(){
AjaxPostUtil.request({url: reqBasePath + "commontarea004", params: {rowId: $("#addressAreaId").val()}, type: 'json', method: "POST", callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: $("#addressAreaId").val()}, type: 'json', method: "POST", callback: function (json) {
var str = '<dd class="layui-col-xs3"><select id="townshipId" lay-filter="areaTownShip" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
......
......@@ -52,7 +52,7 @@ layui.config({
//初始化行政区划-省
function initArea(bean){
AjaxPostUtil.request({url: reqBasePath + "commontarea001", params: {}, type: 'json', method: "POST", callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: 0}, type: 'json', method: "POST", callback: function (json) {
var str = '<dd class="layui-col-xs3"><select id="provinceId" win-verify="required" lay-filter="areaProvince" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
......@@ -69,7 +69,7 @@ layui.config({
//初始化行政区划-市
function initAreaCity(bean){
AjaxPostUtil.request({url: reqBasePath + "commontarea002", params: {rowId: $("#provinceId").val()}, type: 'json', method: "POST", callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: $("#provinceId").val()}, type: 'json', method: "POST", callback: function (json) {
var str = '<dd class="layui-col-xs3"><select id="cityId" win-verify="required" lay-filter="areaCity" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
......@@ -86,7 +86,7 @@ layui.config({
//初始化行政区划-县
function initAreaChildArea(bean){
AjaxPostUtil.request({url: reqBasePath + "commontarea003", params: {rowId: $("#cityId").val()}, type: 'json', method: "POST", callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: $("#cityId").val()}, type: 'json', method: "POST", callback: function (json) {
var str = '<dd class="layui-col-xs3"><select id="addressAreaId" win-verify="required" lay-filter="area" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
......@@ -103,7 +103,7 @@ layui.config({
//初始化行政区划-镇
function initAreaTownShip(bean){
AjaxPostUtil.request({url: reqBasePath + "commontarea004", params: {rowId: $("#addressAreaId").val()}, type: 'json', method: "POST", callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: $("#addressAreaId").val()}, type: 'json', method: "POST", callback: function (json) {
var str = '<dd class="layui-col-xs3"><select id="townshipId" lay-filter="areaTownShip" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
......@@ -141,7 +141,7 @@ layui.config({
//市级行政区划
function loadChildCityArea(){
AjaxPostUtil.request({url: reqBasePath + "commontarea002", params: {rowId: $("#provinceId").val()}, type: 'json', method: "POST", callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: $("#provinceId").val()}, type: 'json', method: "POST", callback: function (json) {
var str = '<dd class="layui-col-xs3"><select id="cityId" win-verify="required" lay-filter="areaCity" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
......@@ -154,7 +154,7 @@ layui.config({
//县级行政区划
function loadChildArea(){
AjaxPostUtil.request({url: reqBasePath + "commontarea003", params: {rowId: $("#cityId").val()}, type: 'json', method: "POST", callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: $("#cityId").val()}, type: 'json', method: "POST", callback: function (json) {
var str = '<dd class="layui-col-xs3"><select id="addressAreaId" win-verify="required" lay-filter="area" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
......@@ -167,7 +167,7 @@ layui.config({
//镇级行政区划
function loadChildAreaTownShip(){
AjaxPostUtil.request({url: reqBasePath + "commontarea004", params: {rowId: $("#addressAreaId").val()}, type: 'json', method: "POST", callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: $("#addressAreaId").val()}, type: 'json', method: "POST", callback: function (json) {
var str = '<dd class="layui-col-xs3"><select id="townshipId" lay-filter="areaTownShip" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
......
......@@ -138,7 +138,7 @@ layui.config({
//省级行政区划
function loadChildProvinceArea(){
AjaxPostUtil.request({url: reqBasePath + "commontarea001", params: {}, type: 'json', callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: 0}, type: 'json', callback: function (json) {
var str = '<dd class="layui-col-xs3"><select id="provinceId" win-verify="required" lay-filter="areaProvince" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
......@@ -151,7 +151,7 @@ layui.config({
//市级行政区划
function loadChildCityArea(){
AjaxPostUtil.request({url: reqBasePath + "commontarea002", params: {rowId: $("#provinceId").val()}, type: 'json', callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: $("#provinceId").val()}, type: 'json', callback: function (json) {
var str = '<dd class="layui-col-xs3"><select id="cityId" lay-filter="areaCity" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
......@@ -164,7 +164,7 @@ layui.config({
//县级行政区划
function loadChildArea(){
AjaxPostUtil.request({url: reqBasePath + "commontarea003", params: {rowId: $("#cityId").val()}, type: 'json', callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: $("#cityId").val()}, type: 'json', callback: function (json) {
var str = '<dd class="layui-col-xs3"><select id="areaId" lay-filter="area" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
......@@ -177,7 +177,7 @@ layui.config({
//镇级行政区划
function loadChildAreaTownShip(){
AjaxPostUtil.request({url: reqBasePath + "commontarea004", params: {rowId: $("#areaId").val()}, type: 'json', callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: $("#areaId").val()}, type: 'json', callback: function (json) {
var str = '<dd class="layui-col-xs3"><select id="townshipId" lay-filter="areaTownShip" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
......
......@@ -166,7 +166,7 @@ layui.config({
//初始化行政区划-省
function initArea(bean){
AjaxPostUtil.request({url: reqBasePath + "commontarea001", params: {}, type: 'json', callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: 0}, type: 'json', callback: function (json) {
var str = '<dd class="layui-col-xs3"><select id="provinceId" win-verify="required" lay-filter="areaProvince" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
......@@ -183,7 +183,7 @@ layui.config({
//初始化行政区划-市
function initAreaCity(bean){
AjaxPostUtil.request({url: reqBasePath + "commontarea002", params: {rowId: $("#provinceId").val()}, type: 'json', callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: $("#provinceId").val()}, type: 'json', callback: function (json) {
var str = '<dd class="layui-col-xs3"><select id="cityId" lay-filter="areaCity" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
......@@ -200,7 +200,7 @@ layui.config({
//初始化行政区划-县
function initAreaChildArea(bean){
AjaxPostUtil.request({url: reqBasePath + "commontarea003", params: {rowId: $("#cityId").val()}, type: 'json', callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: $("#cityId").val()}, type: 'json', callback: function (json) {
var str = '<dd class="layui-col-xs3"><select id="areaId" lay-filter="area" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
......@@ -217,7 +217,7 @@ layui.config({
//初始化行政区划-镇
function initAreaTownShip(bean){
AjaxPostUtil.request({url: reqBasePath + "commontarea004", params: {rowId: $("#areaId").val()}, type: 'json', callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: $("#areaId").val()}, type: 'json', callback: function (json) {
var str = '<dd class="layui-col-xs3"><select id="townshipId" lay-filter="areaTownShip" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
......@@ -255,7 +255,7 @@ layui.config({
//省级行政区划
function loadChildProvinceArea(){
AjaxPostUtil.request({url: reqBasePath + "commontarea001", params: {}, type: 'json', callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: 0}, type: 'json', callback: function (json) {
var str = '<dd class="layui-col-xs3"><select id="provinceId" win-verify="required" lay-filter="areaProvince" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
......@@ -268,7 +268,7 @@ layui.config({
//市级行政区划
function loadChildCityArea(){
AjaxPostUtil.request({url: reqBasePath + "commontarea002", params: {rowId: $("#provinceId").val()}, type: 'json', callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: $("#provinceId").val()}, type: 'json', callback: function (json) {
var str = '<dd class="layui-col-xs3"><select id="cityId" lay-filter="areaCity" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
......@@ -281,7 +281,7 @@ layui.config({
//县级行政区划
function loadChildArea(){
AjaxPostUtil.request({url: reqBasePath + "commontarea003", params: {rowId: $("#cityId").val()}, type: 'json', callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: $("#cityId").val()}, type: 'json', callback: function (json) {
var str = '<dd class="layui-col-xs3"><select id="areaId" lay-filter="area" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
......@@ -294,7 +294,7 @@ layui.config({
//镇级行政区划
function loadChildAreaTownShip(){
AjaxPostUtil.request({url: reqBasePath + "commontarea004", params: {rowId: $("#areaId").val()}, type: 'json', callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: $("#areaId").val()}, type: 'json', callback: function (json) {
var str = '<dd class="layui-col-xs3"><select id="townshipId" lay-filter="areaTownShip" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
......
......@@ -161,7 +161,7 @@ layui.config({
//省级行政区划
function loadChildProvinceArea(){
AjaxPostUtil.request({url: reqBasePath + "commontarea001", params: {}, type: 'json', callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: 0}, type: 'json', callback: function (json) {
var str = '<dd class="layui-col-xs3"><select id="provinceId" win-verify="required" lay-filter="areaProvince" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
......@@ -174,7 +174,7 @@ layui.config({
//市级行政区划
function loadChildCityArea(){
AjaxPostUtil.request({url: reqBasePath + "commontarea002", params: {rowId: $("#provinceId").val()}, type: 'json', callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: $("#provinceId").val()}, type: 'json', callback: function (json) {
var str = '<dd class="layui-col-xs3"><select id="cityId" lay-filter="areaCity" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
......@@ -187,7 +187,7 @@ layui.config({
//县级行政区划
function loadChildArea(){
AjaxPostUtil.request({url: reqBasePath + "commontarea003", params: {rowId: $("#cityId").val()}, type: 'json', callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: $("#cityId").val()}, type: 'json', callback: function (json) {
var str = '<dd class="layui-col-xs3"><select id="areaId" lay-filter="area" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
......@@ -200,7 +200,7 @@ layui.config({
//镇级行政区划
function loadChildAreaTownShip(){
AjaxPostUtil.request({url: reqBasePath + "commontarea004", params: {rowId: $("#areaId").val()}, type: 'json', callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: $("#areaId").val()}, type: 'json', callback: function (json) {
var str = '<dd class="layui-col-xs3"><select id="townshipId" lay-filter="areaTownShip" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
......
......@@ -198,7 +198,7 @@ layui.config({
//初始化行政区划-省
function initArea(bean){
AjaxPostUtil.request({url: reqBasePath + "commontarea001", params: {}, type: 'json', callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: 0}, type: 'json', callback: function (json) {
var str = '<dd class="layui-col-xs3"><select id="provinceId" win-verify="required" lay-filter="areaProvince" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
......@@ -215,7 +215,7 @@ layui.config({
//初始化行政区划-市
function initAreaCity(bean){
AjaxPostUtil.request({url: reqBasePath + "commontarea002", params: {rowId: $("#provinceId").val()}, type: 'json', callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: $("#provinceId").val()}, type: 'json', callback: function (json) {
var str = '<dd class="layui-col-xs3"><select id="cityId" lay-filter="areaCity" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
......@@ -232,7 +232,7 @@ layui.config({
//初始化行政区划-县
function initAreaChildArea(bean){
AjaxPostUtil.request({url: reqBasePath + "commontarea003", params: {rowId: $("#cityId").val()}, type: 'json', callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: $("#cityId").val()}, type: 'json', callback: function (json) {
var str = '<dd class="layui-col-xs3"><select id="areaId" lay-filter="area" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
......@@ -249,7 +249,7 @@ layui.config({
//初始化行政区划-镇
function initAreaTownShip(bean){
AjaxPostUtil.request({url: reqBasePath + "commontarea004", params: {rowId: $("#areaId").val()}, type: 'json', callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: $("#areaId").val()}, type: 'json', callback: function (json) {
var str = '<dd class="layui-col-xs3"><select id="townshipId" lay-filter="areaTownShip" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
......@@ -265,7 +265,7 @@ layui.config({
//省级行政区划
function loadChildProvinceArea(){
AjaxPostUtil.request({url: reqBasePath + "commontarea001", params: {}, type: 'json', callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: 0}, type: 'json', callback: function (json) {
var str = '<dd class="layui-col-xs3"><select id="provinceId" win-verify="required" lay-filter="areaProvince" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
......@@ -278,7 +278,7 @@ layui.config({
//市级行政区划
function loadChildCityArea(){
AjaxPostUtil.request({url: reqBasePath + "commontarea002", params: {rowId: $("#provinceId").val()}, type: 'json', callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: $("#provinceId").val()}, type: 'json', callback: function (json) {
var str = '<dd class="layui-col-xs3"><select id="cityId" lay-filter="areaCity" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
......@@ -291,7 +291,7 @@ layui.config({
//县级行政区划
function loadChildArea(){
AjaxPostUtil.request({url: reqBasePath + "commontarea003", params: {rowId: $("#cityId").val()}, type: 'json', callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: $("#cityId").val()}, type: 'json', callback: function (json) {
var str = '<dd class="layui-col-xs3"><select id="areaId" lay-filter="area" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
......@@ -304,7 +304,7 @@ layui.config({
//镇级行政区划
function loadChildAreaTownShip(){
AjaxPostUtil.request({url: reqBasePath + "commontarea004", params: {rowId: $("#areaId").val()}, type: 'json', callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: $("#areaId").val()}, type: 'json', callback: function (json) {
var str = '<dd class="layui-col-xs3"><select id="townshipId" lay-filter="areaTownShip" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
......
......@@ -79,7 +79,7 @@ layui.config({
// 省级行政区划
function loadChildProvinceArea(){
AjaxPostUtil.request({url: reqBasePath + "commontarea001", params: {}, type: 'json', method: "POST", callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: 0}, type: 'json', method: "POST", callback: function (json) {
var str = '<dd class="layui-col-xs3"><select id="provinceId" win-verify="required" lay-filter="areaProvince" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
......@@ -92,7 +92,7 @@ layui.config({
// 市级行政区划
function loadChildCityArea(){
AjaxPostUtil.request({url: reqBasePath + "commontarea002", params: {rowId: $("#provinceId").val()}, type: 'json', method: "POST", callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: $("#provinceId").val()}, type: 'json', method: "POST", callback: function (json) {
var str = '<dd class="layui-col-xs3"><select id="cityId" lay-filter="areaCity" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
......@@ -105,7 +105,7 @@ layui.config({
// 县级行政区划
function loadChildArea(){
AjaxPostUtil.request({url: reqBasePath + "commontarea003", params: {rowId: $("#cityId").val()}, type: 'json', method: "POST", callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: $("#cityId").val()}, type: 'json', method: "POST", callback: function (json) {
var str = '<dd class="layui-col-xs3"><select id="addressAreaId" lay-filter="area" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
......@@ -118,7 +118,7 @@ layui.config({
// 镇级行政区划
function loadChildAreaTownShip(){
AjaxPostUtil.request({url: reqBasePath + "commontarea004", params: {rowId: $("#addressAreaId").val()}, type: 'json', method: "POST", callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: $("#addressAreaId").val()}, type: 'json', method: "POST", callback: function (json) {
var str = '<dd class="layui-col-xs3"><select id="townshipId" lay-filter="areaTownShip" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
......
......@@ -70,7 +70,7 @@ layui.config({
//初始化行政区划-省
function initArea(bean){
AjaxPostUtil.request({url: reqBasePath + "commontarea001", params: {}, type: 'json', method: "POST", callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: 0}, type: 'json', method: "POST", callback: function (json) {
var str = '<dd class="layui-col-xs3"><select id="provinceId" win-verify="required" lay-filter="areaProvince" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
......@@ -87,7 +87,7 @@ layui.config({
//初始化行政区划-市
function initAreaCity(bean){
AjaxPostUtil.request({url: reqBasePath + "commontarea002", params: {rowId: $("#provinceId").val()}, type: 'json', method: "POST", callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: $("#provinceId").val()}, type: 'json', method: "POST", callback: function (json) {
var str = '<dd class="layui-col-xs3"><select id="cityId" lay-filter="areaCity" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
......@@ -104,7 +104,7 @@ layui.config({
//初始化行政区划-县
function initAreaChildArea(bean){
AjaxPostUtil.request({url: reqBasePath + "commontarea003", params: {rowId: $("#cityId").val()}, type: 'json', method: "POST", callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: $("#cityId").val()}, type: 'json', method: "POST", callback: function (json) {
var str = '<dd class="layui-col-xs3"><select id="addressAreaId" lay-filter="area" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
......@@ -121,7 +121,7 @@ layui.config({
//初始化行政区划-镇
function initAreaTownShip(bean){
AjaxPostUtil.request({url: reqBasePath + "commontarea004", params: {rowId: $("#addressAreaId").val()}, type: 'json', method: "POST", callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: $("#addressAreaId").val()}, type: 'json', method: "POST", callback: function (json) {
var str = '<dd class="layui-col-xs3"><select id="townshipId" lay-filter="areaTownShip" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
......@@ -159,7 +159,7 @@ layui.config({
//市级行政区划
function loadChildCityArea(){
AjaxPostUtil.request({url: reqBasePath + "commontarea002", params: {rowId: $("#provinceId").val()}, type: 'json', method: "POST", callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: $("#provinceId").val()}, type: 'json', method: "POST", callback: function (json) {
var str = '<dd class="layui-col-xs3"><select id="cityId" lay-filter="areaCity" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
......@@ -172,7 +172,7 @@ layui.config({
//县级行政区划
function loadChildArea(){
AjaxPostUtil.request({url: reqBasePath + "commontarea003", params: {rowId: $("#cityId").val()}, type: 'json', method: "POST", callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: $("#cityId").val()}, type: 'json', method: "POST", callback: function (json) {
var str = '<dd class="layui-col-xs3"><select id="addressAreaId" lay-filter="area" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
......@@ -185,7 +185,7 @@ layui.config({
//镇级行政区划
function loadChildAreaTownShip(){
AjaxPostUtil.request({url: reqBasePath + "commontarea004", params: {rowId: $("#addressAreaId").val()}, type: 'json', method: "POST", callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: $("#addressAreaId").val()}, type: 'json', method: "POST", callback: function (json) {
var str = '<dd class="layui-col-xs3"><select id="townshipId" lay-filter="areaTownShip" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].name + '</option>';
......
......@@ -10,28 +10,22 @@ layui.config({
form = layui.form,
tableTree = layui.tableTreeDj;
form.render();
form.on('submit(formSearch)', function (data) {
if (winui.verifyForm(data.elem)) {
loadTable();
}
return false;
});
tableTree.render({
id: 'messageTable',
elem: '#messageTable',
method: 'post',
url: reqBasePath + 'systarea001',
where: {addressName: $("#addressName").val()},
where: getTableParams(),
cols: [[
{field:'name', width:300, title: '区域名称'},
{field:'id', width:100, title: 'id'},
{field:'pId', title: 'pId'},
{ field: 'name', width: 300, title: '区域名称' },
{ field: 'id', width: 100, title: 'id' },
{ field: 'pId', title: 'pId' },
]],
isPage:false,
done: function(json) {
matchingLanguage();
initTableSearchUtil.initAdvancedSearch($("#messageTable")[0], json.searchFilter, form, "请输入名称", function () {
tableTree.reload("messageTable", {page: {curr: 1}, where: getTableParams()});
});
}
}, {
keyId: 'id',
......@@ -39,13 +33,17 @@ layui.config({
title: 'name',
});
// 刷新数据
form.render();
$("body").on("click", "#reloadTable", function() {
loadTable();
loadTable();
});
function loadTable() {
tableTree.reload("messageTable", {where:{addressName: $("#addressName").val()}});
function loadTable() {
tableTree.reload("messageTable", {where: getTableParams()});
}
function getTableParams() {
return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageTable"));
}
exports('tarea', {});
......
......@@ -7,24 +7,9 @@
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div class="txtcenter" style="margin:0 auto;padding-top:10px;">
<form class="layui-form layui-form-pane" action="" autocomplete="off">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">地域</label>
<div class="layui-input-inline">
<input type="text" id="addressName" name="addressName" placeholder="请输入地域" class="layui-input" />
</div>
<button type="reset" class="layui-btn layui-btn-primary list-form-search"><language showName="com.skyeye.reset"></language></button>
<button class="layui-btn list-form-search" lay-submit lay-filter="formSearch"><language showName="com.skyeye.search2"></language></button>
</div>
</div>
</form>
</div>
<div class="winui-toolbar">
<div class="winui-tool">
<button id="reloadTable" class="winui-toolbtn"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button>
<button id="reloadTable" class="winui-toolbtn search-table-btn-right"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button>
</div>
</div>
......
......@@ -103,6 +103,8 @@ layui.each(customerJS, function(key, jsPath){
// 操作添加或者编辑时,判断表格是否需要刷新,为0则刷新,否则则不刷新
var refreshCode = "";
// 返回父页面的数据
var turnData = "";
/**
* 打开新的窗口
......@@ -152,6 +154,7 @@ function _openNewWindows(mation){
mation.skin = '';
}
refreshCode = "";
turnData = "";
var pageIndex = layer.open({
id: mation.pageId,
type: 2,
......@@ -168,7 +171,7 @@ function _openNewWindows(mation){
end: function() {
if(typeof(mation.callBack) == "function") {
if (refreshCode == '0') {
mation.callBack(refreshCode);
mation.callBack(refreshCode, turnData);
} else if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2, time: 2000});
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册