1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
| layui.use('table', function(){
| var table = layui.table;
| var layer = layui.layer;
| //基站设备
| table.render({
| elem: '#anchor'
| ,url: '/hxzkuwb/findanchor'
| ,page: true //开启分页
| ,size:'sm'
| ,height:702
|
| ,toolbar:'#toolbarDemo' //开启工具栏,此处显示默认图标,可以自定义模板,详见文档
| ,cols: [[ //表头
| {type:'checkbox',sort: true,fixed: "left"}
| ,{field: 'id', title: 'ID', sort: true}
| ,{ field: 'anchormode', title: '状态'}
| ,{field: 'anchorid', title: '编号' ,sort: true}
| ,{field: 'anchorid', title: '用户名称'}
| ,{field: 'version', title: '版本', sort: true}
| ,{field: 'baoliu8', title: '电量',sort: true}
| ,{field: 'greatetime', title: '日期'}
| ,{toolbar: '#barDemotag',title: "操作"}
| ]]
| });
| table.on('tool(icon)', function(obj){
| var data = obj.data;
| console.log(data.id)
| })
| table.on('toolbar(icon)', function(obj) {
| console.log(obj)
| switch(obj.event) {
| case 'getadd' :
| $(".add").show();
| $(".heimu").show();
| break;
| case 'getUpdate':
| break;
| }
| })
|
|
|
| $("#baocun").click(function (){
| layer.msg('操作成功')
| setTimeout(function() {
| $(".add").hide();
| $(".heimu").hide();
| }, 500);
|
| })
| $("#quxiao").click(function (){
| layer.msg('操作成功')
| setTimeout(function() {
| $(".add").hide();
| $(".heimu").hide();
| }, 500);
| })
| });
|
|