标签:region enter update datagrid arc params style png AC
js页面
$(function(){
1. $(‘#project_id‘).val(project_id); --》此行代码是前端传过来获取多个模块的相同id,必不可少
2. function searchData(buttonId,actionUrl){
var params = $$.serializeToJson(formSearchTemplate);
params[‘project_id‘] = $(‘#project_id‘).val(); --》此行代码是前端传过来的id,赋给A,必不可少
var json = { "search_condition" : JSON.stringify(params) };
if(isDatagridLoaded){
$(listTemplate).datagrid(‘load‘, json );
}else{
$(listTemplate).datagrid({
queryParams: json,
url : urlSearch
});
isDatagridLoaded = true;
}
};
3. body class="easyui-layout">
<input type="hidden" id="project_id" value=""/> ---->此行代码重中之重,必不可少,可作为一个大表到多个小模块之间的id取值的过渡代码,承上启下作用
<div data-options="region:‘center‘, split:false, border:false" style="padding: 0 2px;">
<div id="wcm_project_milepost_list_menu">
<div style="padding: 10px;">
<a id="button_add" onclick="addData()" class="easyui-linkbutton" style="width:90px;height:35px;background-color: rgb(53, 175, 124)" ><img src=‘../../../img/button/add.png‘ style="margin-left:-4px;"> <span style="margin-left:5px">新 建</a>
<a id="button_edit" onclick="updateData()" class="easyui-linkbutton" style="width:90px;height:35px;background-color: rgb(73, 144, 238)" ><img src=‘../../../img/button/edit.png‘ style="margin- left:-4px;margin-bottom: -1px;"><span style="margin-left:5px">修 改</a>
<a id="button_delete" onclick="deleteData()" class="easyui-linkbutton" style="width:90px;height:35px;background-color: rgb(234, 72, 72)" ><img src=‘../../../img/button/delete.png‘ style="margin- left:-4px;"><span style="margin-left:5px">删 除</a>
</div>
</div>
<div style="height:90%"><table id="wcm_project_milepost_list" fit="true"></table></div>
</div>
</body>
标签:region enter update datagrid arc params style png AC
原文地址:https://www.cnblogs.com/Darkqueen/p/8877958.html