XMTT 7 years ago
parent
commit
3b3adaacd5
3 changed files with 40 additions and 35 deletions
  1. 9 0
      css/model/sys/userinfo.css
  2. 4 2
      html/model/sys/userInfo/check.html
  3. 27 33
      js/model/sys/userInfo/check.js

+ 9 - 0
css/model/sys/userinfo.css

@ -16,6 +16,15 @@
16 16
    cursor:pointer;
17 17
}
18 18
19
.sys_userinfo_check .table-opt .icon {
20
    margin: 7px;
21
    font-size: 17px;
22
}
23
24
.sys_userinfo_check .table-opt{
25
    width: 50px;
26
}
27
19 28
.sys_userinfo_new,.sys_userinfo_edit{
20 29
    width: 500px;
21 30
    height: 250px;

+ 4 - 2
html/model/sys/userInfo/check.html

@ -59,7 +59,8 @@
59 59
        <table class="table table-bordered">
60 60
            <thead>
61 61
            <tr>
62
                <th class="opt-check"><i class="icon icon-st-check"></i></th>
62
                <!--<th class="opt-check"><i class="icon icon-st-check"></i></th>-->
63
                <th>操作</th>
63 64
                <th>序号</th>
64 65
                <th>用户名</th>
65 66
                <th>职称</th>
@ -76,7 +77,8 @@
76 77
            </thead>
77 78
            <tbody>
78 79
            <tr ch-dir="list">
79
                <td class="opt-check"><i class="icon icon-st-check" userId="{{id}}"></i></td>
80
                <!--<td class="opt-check"><i class="icon icon-st-check" userId="{{id}}"></i></td>-->
81
                <td class="table-opt" userId="{{id}}"><i class="icon icon-eye-open opt-examine"></i><i class="icon icon-check-board opt-review"></i></td>
80 82
                <td>{{-_index}}</td>
81 83
                <td>{{name}}</td>
82 84
                <td>{{title}}</td>

+ 27 - 33
js/model/sys/userInfo/check.js

@ -11,42 +11,36 @@ spa_define(function () {
11 11
                root.find(".opt-query").on("click", function () {
12 12
                    pdg.load();
13 13
                });
14
                root.find(".dt-tpl").on("click", "th.opt-check>i.icon-st-check", function () {
15
                    var $this = $(this);
16
                    $this.toggleClass("checked");
17
                    if ($this.hasClass("checked")) {
18
                        root.find(".dt-tpl td.opt-check>i.icon-st-check").addClass("checked");
19
                    } else {
20
                        root.find(".dt-tpl td.opt-check>i.icon-st-check").removeClass("checked");
21
                    }
22
                });
23
                root.find(".dt-tpl").on("click", "td.opt-check>i.icon-st-check", function () {
24
                    var $this = $(this);
25
                    $this.toggleClass("checked");
26
                });
14
                // root.find(".dt-tpl").on("click", "th.opt-check>i.icon-st-check", function () {
15
                //     var $this = $(this);
16
                //     $this.toggleClass("checked");
17
                //     if ($this.hasClass("checked")) {
18
                //         root.find(".dt-tpl td.opt-check>i.icon-st-check").addClass("checked");
19
                //     } else {
20
                //         root.find(".dt-tpl td.opt-check>i.icon-st-check").removeClass("checked");
21
                //     }
22
                // });
23
                // root.find(".dt-tpl").on("click", "td.opt-check>i.icon-st-check", function () {
24
                //     var $this = $(this);
25
                //     $this.toggleClass("checked");
26
                // });
27 27
                root.find(".opt-examine").on("click", function () {
28
                    var $org = root.find("td.opt-check>i.checked");
29
                    if ($org.length) {
30
                        if ($org.length > 1) {
31
                            util.alert("只能选择一个用户");
32
                        } else {
33
                            util.get("../ajax/userinfo/id/" + $org.attr("userId"), null, function (data) {
34
                                if (data) {
35
                                        spa.showModal("sys_userinfo_examine", {
36
                                            data: data, hand: function () {
37
                                                pdg.load()
38
                                            }
39
                                        })
40
                                } else {
41
                                    util.alert("用户不存在了", function () {
42
                                        pdg.load();
43
                                    });
28
                    // var $org = root.find("td.opt-check>i.checked");
29
                    var $this = $(this);
30
                    var $org = $this.parent().attr("userId");
31
                    util.get("../ajax/userinfo/id/" + $org, null, function (data) {
32
                        if (data) {
33
                            spa.showModal("sys_userinfo_examine", {
34
                                data: data, hand: function () {
35
                                    pdg.load()
44 36
                                }
45
                            }, {});
37
                            })
38
                        } else {
39
                            util.alert("用户不存在了", function () {
40
                                pdg.load();
41
                            });
46 42
                        }
47
                    } else {
48
                        util.alert("请选择一个用户");
49
                    }
43
                    }, {});
50 44
                });
51 45
                root.find(".opt-review").on("click", function () {
52 46
                    var $check = root.find("td.opt-check>i.checked");