新增提交静默更新表格方法
parent
650f89ac13
commit
553358aa12
|
@ -0,0 +1,14 @@
|
||||||
|
@echo off
|
||||||
|
echo.
|
||||||
|
echo [信息] 清理生成路径。
|
||||||
|
echo.
|
||||||
|
pause
|
||||||
|
echo.
|
||||||
|
|
||||||
|
cd %~dp0
|
||||||
|
cd..
|
||||||
|
|
||||||
|
call mvn clean
|
||||||
|
|
||||||
|
cd bin
|
||||||
|
pause
|
|
@ -6,6 +6,7 @@ pause
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
cd %~dp0
|
cd %~dp0
|
||||||
|
cd..
|
||||||
|
|
||||||
call mvn clean package -Dmaven.test.skip=true
|
call mvn clean package -Dmaven.test.skip=true
|
||||||
|
|
|
@ -99,7 +99,6 @@
|
||||||
// 刷新表格
|
// 刷新表格
|
||||||
refresh: function() {
|
refresh: function() {
|
||||||
$("#bootstrap-table").bootstrapTable('refresh', {
|
$("#bootstrap-table").bootstrapTable('refresh', {
|
||||||
url: $.table._option.url,
|
|
||||||
silent: true
|
silent: true
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -135,7 +134,7 @@
|
||||||
$.table._option = options;
|
$.table._option = options;
|
||||||
_striped = $.common.isEmpty(options.striped) ? false : options.striped;
|
_striped = $.common.isEmpty(options.striped) ? false : options.striped;
|
||||||
_expandColumn = $.common.isEmpty(options.expandColumn) ? '1' : options.expandColumn;
|
_expandColumn = $.common.isEmpty(options.expandColumn) ? '1' : options.expandColumn;
|
||||||
var treeTable = $('#bootstrap-table').bootstrapTreeTable({
|
var treeTable = $('#bootstrap-tree-table').bootstrapTreeTable({
|
||||||
code: options.code, // 用于设置父子关系
|
code: options.code, // 用于设置父子关系
|
||||||
parentCode: options.parentCode, // 用于设置父子关系
|
parentCode: options.parentCode, // 用于设置父子关系
|
||||||
type: 'get', // 请求方式(*)
|
type: 'get', // 请求方式(*)
|
||||||
|
@ -528,7 +527,7 @@
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
data: data,
|
data: data,
|
||||||
success: function(result) {
|
success: function(result) {
|
||||||
$.operate.saveSuccess(result);
|
$.operate.successCallback(result);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
$.ajax(config)
|
$.ajax(config)
|
||||||
|
@ -543,7 +542,7 @@
|
||||||
}
|
}
|
||||||
$.modal.closeLoading();
|
$.modal.closeLoading();
|
||||||
},
|
},
|
||||||
// 保存结果提示msg
|
// 成功结果提示msg(父窗体全局更新)
|
||||||
saveSuccess: function (result) {
|
saveSuccess: function (result) {
|
||||||
if (result.code == web_status.SUCCESS) {
|
if (result.code == web_status.SUCCESS) {
|
||||||
$.modal.msgReload("保存成功,正在刷新数据请稍后……", modal_status.SUCCESS);
|
$.modal.msgReload("保存成功,正在刷新数据请稍后……", modal_status.SUCCESS);
|
||||||
|
@ -551,6 +550,25 @@
|
||||||
$.modal.alertError(result.msg);
|
$.modal.alertError(result.msg);
|
||||||
}
|
}
|
||||||
$.modal.closeLoading();
|
$.modal.closeLoading();
|
||||||
|
},
|
||||||
|
// 成功回调执行事件(父窗体静默更新)
|
||||||
|
successCallback: function(result) {
|
||||||
|
if (result.code == web_status.SUCCESS) {
|
||||||
|
if (window.parent.$("#bootstrap-table").length > 0) {
|
||||||
|
$.modal.close();
|
||||||
|
window.parent.$.modal.msgSuccess(result.msg);
|
||||||
|
window.parent.$.table.refresh();
|
||||||
|
} else if (window.parent.$("#bootstrap-tree-table").length > 0) {
|
||||||
|
$.modal.close();
|
||||||
|
window.parent.$.modal.msgSuccess(result.msg);
|
||||||
|
window.parent.$.treeTable.refresh();
|
||||||
|
} else {
|
||||||
|
$.modal.msgReload("保存成功,正在刷新数据请稍后……", modal_status.SUCCESS);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$.modal.alertError(result.msg);
|
||||||
|
}
|
||||||
|
$.modal.closeLoading();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 校验封装处理
|
// 校验封装处理
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-12 select-table table-striped">
|
<div class="col-sm-12 select-table table-striped">
|
||||||
<table id="bootstrap-table" data-mobile-responsive="true"></table>
|
<table id="bootstrap-tree-table" data-mobile-responsive="true"></table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-12 select-table table-striped">
|
<div class="col-sm-12 select-table table-striped">
|
||||||
<table id="bootstrap-table" data-mobile-responsive="true"></table>
|
<table id="bootstrap-tree-table" data-mobile-responsive="true"></table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -143,7 +143,7 @@
|
||||||
$.modal.alertError("系统错误");
|
$.modal.alertError("系统错误");
|
||||||
},
|
},
|
||||||
success : function(data) {
|
success : function(data) {
|
||||||
$.operate.saveSuccess(data);
|
$.operate.successCallback(data);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -146,7 +146,7 @@
|
||||||
$.modal.alertError("系统错误");
|
$.modal.alertError("系统错误");
|
||||||
},
|
},
|
||||||
success : function(data) {
|
success : function(data) {
|
||||||
$.operate.saveSuccess(data);
|
$.operate.successCallback(data);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,7 +80,7 @@
|
||||||
$.modal.alertError("系统错误");
|
$.modal.alertError("系统错误");
|
||||||
},
|
},
|
||||||
success : function(data) {
|
success : function(data) {
|
||||||
$.operate.saveSuccess(data);
|
$.operate.successCallback(data);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -203,7 +203,7 @@
|
||||||
$.modal.alertError("系统错误");
|
$.modal.alertError("系统错误");
|
||||||
},
|
},
|
||||||
success : function(data) {
|
success : function(data) {
|
||||||
$.operate.saveSuccess(data);
|
$.operate.successCallback(data);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -177,7 +177,7 @@
|
||||||
$.modal.alertError("系统错误");
|
$.modal.alertError("系统错误");
|
||||||
},
|
},
|
||||||
success : function(data) {
|
success : function(data) {
|
||||||
$.operate.saveSuccess(data);
|
$.operate.successCallback(data);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue