Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
杨建斌
/
page
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
1
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
4fce633c
authored
2018-03-23 00:04:09 +0800
by
yangjianbin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
init
1 parent
80d3ce1c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
85 additions
and
35 deletions
application/views/common/top.php
application/views/user/index.php
application/views/common/top.php
View file @
4fce633
<header
class=
"navbar-wrapper"
>
<div
class=
"navbar navbar-fixed-top"
>
<div
class=
"container-fluid cl"
>
<a
class=
"logo navbar-logo f-l mr-10 hidden-xs"
href=
"/"
>
xxx
管理平台
</a>
<div
class=
"container-fluid cl"
>
<a
class=
"logo navbar-logo f-l mr-10 hidden-xs"
href=
"/"
>
管理平台
</a>
<a
class=
"logo navbar-logo-m f-l mr-10 visible-xs"
href=
"/"
>
H-ui
</a>
<span
class=
"logo navbar-slogan f-l mr-10 hidden-xs"
></span>
<a
aria-hidden=
"false"
class=
"nav-toggle Hui-iconfont visible-xs"
href=
"javascript:;"
>

</a>
...
...
application/views/user/index.php
View file @
4fce633
...
...
@@ -15,46 +15,96 @@
</tr>
</thead>
<tbody
class=
"text-c"
>
<tr>
<td>
<span
class=
"dropDown dropDown_hover"
>
<button
class=
"btn radius size-M"
>
请选择
<i
class=
"Hui-iconfont"
>

</i></button>
<ul
class=
"dropDown-menu menu radius box-shadow"
>
<li><a
href=
"javascript:;"
onclick=
"creatIframe('
<?=
site_url
(
'/user/info'
)
?>
', '查看详细')"
>
查看详细
</a></li>
</ul>
</span>
</td>
<td>
1001
</td>
<td>
张三
</td>
<td>
333333333333333333
</td>
<td>
13333333333
</td>
<td>
2018-01-01 00:00:00
</td>
</tr>
<tr>
<td>
<span
class=
"dropDown dropDown_hover"
>
<button
class=
"btn radius size-M"
>
请选择
<i
class=
"Hui-iconfont"
>

</i></button>
<ul
class=
"dropDown-menu menu radius box-shadow"
>
<li><a
href=
"javascript:;"
onclick=
"creatIframe('
<?=
site_url
(
'/user/info'
)
?>
', '查看详细')"
>
查看详细
</a></li>
</ul>
</span>
</td>
<td>
1002
</td>
<td>
张三
</td>
<td>
333333333333333333
</td>
<td>
13333333333
</td>
<td>
2018-01-01 00:00:00
</td>
</tr>
</tbody>
</table>
</div>
</div>
<?php
$this
->
load
->
view
(
'common/footer'
);
?>
<script>
var
table
=
$
(
'#table'
).
dataTable
({
aaSorting
:
[[
1
,
"desc"
]]
});
var table = $('#table').dataTable({
aaSorting: [[1, "desc"]],
serverSide: true,
processing: true,
bSort: false,
searching: false,//是否显示搜索
iDisplayLength: 6,
bLengthChange: false,
ajax: {
url: apiBaseUrl + '/client/clients',
dataFilter: function (json) {
var ret = {}, json = jQuery.parseJSON(json);
ret.data = json.data || [];
var draw = getUrlParam('draw');
if(draw) {
ret.draw = draw;
}
ret.recordsTotal = 0;
ret.recordsFiltered = 0;
if (json.page) {
ret.recordsTotal = parseInt(json.page.totalNumber);
ret.recordsFiltered = parseInt(json.page.totalNumber);
}
return JSON.stringify(ret);
},
data: function (data) {
data.pageSize = data.length;
data.currentPage = parseFloat(data.start / data.length) + 1;
return data;
}
},
columns: [
{
data: "id", render: function (data, type, full) {
var url = "
<?=
site_url
(
'/user/info'
)
?>
";
return '<span class="
dropDown
dropDown_hover
">\
<button class="
btn
radius
size
-
M
">请选择 <i class="
Hui
-
iconfont
"></i></button>\
<ul class="
dropDown
-
menu
menu
radius
box
-
shadow
">\
<li><a href="
javascript
:;
" onclick="
creatIframe
(
\
''
+
url
+
'\', \'查看详细\')">查看详细</a></li>\
</ul></span>'
;
}
},
{
data
:
"id"
},
//客户编号
{
data
:
"userName"
},
//姓名
{
data
:
"idCard"
},
//身份证
{
data
:
"phoneNumber"
},
//手机号
{
data
:
"createTime"
}
//录入时间
]
});
$
.
fn
.
dataTableExt
.
afnFiltering
.
push
(
function
(
oSettings
,
aData
,
iDataIndex
)
{
var
min
=
document
.
getElementById
(
'min'
).
value
;
var
max
=
document
.
getElementById
(
'max'
).
value
;
var
iDateCol
=
12
;
var
dateMin
=
new
Date
(
aData
[
iDateCol
]);
var
dateMax
=
new
Date
(
aData
[
iDateCol
]);
if
(
min
===
''
&&
max
===
''
)
return
true
;
else
if
(
new
Date
(
min
).
getTime
()
<=
dateMin
.
getTime
()
&&
max
===
''
)
return
true
;
else
if
(
new
Date
(
min
).
getTime
()
<=
dateMin
.
getTime
()
&&
new
Date
(
max
).
getTime
()
>=
dateMax
.
getTime
())
return
true
;
return
false
;
}
);
$
(
'.table_search'
).
on
(
'change'
,
function
()
{
search
=
$
(
this
).
val
();
column
=
$
(
this
).
attr
(
'column'
);
$
(
'#table'
).
DataTable
().
column
(
column
).
search
(
search
).
draw
();
});
$
(
'#min, #max'
).
on
(
'keyup'
,
function
()
{
$
(
'#table'
).
DataTable
().
draw
();
});
function
resetHandler
()
{
$
(
'#table'
).
DataTable
().
columns
().
search
(
""
).
draw
();
}
</script>
</body>
<html>
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment