Var prefix="/task_assign"
$(function () {
//var deptId=' ';
//getTreeData ();
Load ();
});
The function the load () {
$(' # exampleTable ')
BootstrapTable (
{
Method: 'get',//server data request way the get or post
Url: the prefix + "/list",//server data loading address
ShowRefresh: true,
//showToggle: true,
//showColumns: true,
IconSize: 'the outline,
The toolbar: '# exampleToolbar',
Striped: true,//set to true will be interlaced effect
DataType: "json",//the server returns the data type of the
Pagination: true,//set to true will display in the bottom of the page article
//queryParamsType: "limit",
////set to limit will be sent in accordance with RESTFull format parameter
SingleSelect: false,//set to true will ban the multiselect
//contentType: "application/x - WWW - form - urlencoded",
////sent to the server data encoding type
PageSize: 10,//if set the paging, article data for each page
PageNumber: 1,//if set up distribution, home page
//search: true,//display the search box
Whether showColumns: true,//display content drop-down box, select the columns to display)
SidePagination: "server", where//set the paging, optional value is "client" or "server"
QueryParams: function (params) {
Return {
//description: incoming background parameters including offset the starting index, limit step length, the sort sequence, order: desc or, as well as all the keys of the column of
Limit: params. Limit,
Offset: params. Offset,
RequireName: $(' # requireName). Val (),
RequireId: $(' # requireId). Val (),
FunctionName: $(' # functionName '). Val (),
FunctionModule: $(' # functionModule). Val (),
FunctionType: $(' # functionType). Val (),
AssignState: $(' # assignState). Val (),
SubmitState: '0',
RequirePrincipal: $(' # requirePrincipal). Val (),
TestPrincipal: $(' # testPrincipal). Val ()
};
},
////request data server, you can rewrite parameter ways to add some additional parameters, such as the parameters in the toolbar if
//queryParamsType='limit, return parameter must contain
//limit, offset, search, sort, the order, otherwise need to include:
//pageSize, pageNumber, searchText sortName,
//sortOrder.
//returns false will put a stop to request
The columns: [
{
The checkbox: true
},
{
Field: 'functionId',
Title: 'functional requirements ID'
},
{
Field: 'requireName',
Title: 'needs of the business name'
},
{
Field: 'functionName',
Title: 'functional requirements name'
},
{
Field: 'functionModule',
Title: 'functional modules'
},
{
Field: 'functionType',
Title: 'requirement type'
},
{
Field: 'requireStaffName',
Title: 'demand head'
},
{
Field: 'testStaffName',
Title: 'test head'
},
{
Field: 'submitState',
Title: 'confirmation',
Align: 'center',
The formatter: function (the value, the row, the index) {
If (value=https://bbs.csdn.net/topics/=='0') {
Return '& lt; Span & gt; Have been confirmed & lt;/span> ';
}
}
},
{
Field: 'assignState',
Title: 'distribution state,
Align: 'center',
The formatter: function (the value, the row, the index) {
If (value=https://bbs.csdn.net/topics/='0') {
Return '& lt; Span & gt; Allocated & lt;/span> ';
} else if (value='1' https://bbs.csdn.net/topics/={
Return '& lt; Span & gt; ';
}
}
},
{
Field: 'the explain,
Title: 'instructions'
},
{
Field: 'updateTime,
Title: 'updated'
},
});
}
The function reLoad () {
$(' # exampleTable). BootstrapTable (" refresh ");
}
I searched online for a long time, it can use resetSearch reset, but this should be a reset with the search box,,
Then I just think if my own definition of a button, and then click then reset all my query conditions, if you don't make such a function, every time I got to get back I checked the condition of point,,,
Such as this kind of situation, I have a point,,
We had for a long time, not too will, bosses, rely on you,,, thank you!!!