XMTT 7 年 前
コミット
2f58911ee8
共有3 個のファイルを変更した39 個の追加27 個の削除を含む
  1. 1 1
      css/model/sys/article.css
  2. 12 10
      html/model/sys/article/viewcount.html
  3. 26 16
      js/model/sys/article/viewcount.js

+ 1 - 1
css/model/sys/article.css

@ -19,7 +19,7 @@
19 19
    width: 4%;
20 20
}
21 21
22
.sys_article_index .table-opt .name {
22
.sys_article_index .table-opt .name,.sys_article_viewcount .table-opt .icon-line-chart{
23 23
    cursor:pointer;
24 24
}
25 25

+ 12 - 10
html/model/sys/article/viewcount.html

@ -20,20 +20,21 @@
20 20
        </div>
21 21
        <div class="col-3"></div>
22 22
    </div>
23
    <div class="row"></div>
24
    <div class="container tpl-btns">
25
        <div class="row">
26
            <div class="btn opt-count">
27
                统计图表
28
            </div>
29
        </div>
30
    </div>
23
    <!--<div class="row"></div>-->
24
    <!--<div class="container tpl-btns">-->
25
        <!--<div class="row">-->
26
            <!--<div class="btn opt-count">-->
27
                <!--统计图表-->
28
            <!--</div>-->
29
        <!--</div>-->
30
    <!--</div>-->
31 31
32 32
    <div class="container dt-tpl">
33 33
        <table class="table table-bordered">
34 34
            <thead>
35 35
            <tr>
36
                <th class="opt-check" ><i class="icon icon-st-check"></i> </th>
36
                <!--<th class="opt-check" ><i class="icon icon-st-check"></i> </th>-->
37
                <th class="number">图表</th>
37 38
                <th class="number">#</th>
38 39
                <th>文章标题</th>
39 40
                <th>作者</th>
@ -48,7 +49,8 @@
48 49
            </thead>
49 50
            <tbody>
50 51
            <tr ch-dir="list">
51
                <td class="opt-check" ><i class="icon icon-st-check" articleId="{{id}}"></i></td>
52
                <!--<td class="opt-check" ><i class="icon icon-st-check" articleId="{{id}}"></i></td>-->
53
                <td class="table-opt" articleId="{{id}}"><i class="icon icon-line-chart"></i></td>
52 54
                <td class="hand-id" articleId="{{id}}">{{-_index}}</td>
53 55
                <td class="articleTitle">{{articleTitle}}</td>
54 56
                <td class="professorName">{{professorName}}</td>

+ 26 - 16
js/model/sys/article/viewcount.js

@ -107,23 +107,33 @@ spa_define(function () {
107 107
                    var $this = $(this);
108 108
                    $this.toggleClass("checked");
109 109
                });
110
                root.find(".opt-count").on("click", function () {
111
                    var $article = root.find("td.opt-check>i.checked");
112
                    if ($article.length) {
113
                        if ($article.length>1) {
114
                            util.alert("只能选择一篇文章");
115
                        }else {
116
                            spa.showModal("sys_article_count", {
117
                                id: $article.attr("articleId"),
118
                                hand: function () {
119
                                    pdg.reload();
120
                                }
121
                            });
110
                // root.find(".opt-count").on("click", function () {
111
                //     var $article = root.find("td.opt-check>i.checked");
112
                //     if ($article.length) {
113
                //         if ($article.length>1) {
114
                //             util.alert("只能选择一篇文章");
115
                //         }else {
116
                //             spa.showModal("sys_article_count", {
117
                //                 id: $article.attr("articleId"),
118
                //                 hand: function () {
119
                //                     pdg.reload();
120
                //                 }
121
                //             });
122
                //         }
123
                //     }else {
124
                //         util.alert("请选择一篇文章");
125
                //     }
126
                // });
127
                root.on("click",".icon-line-chart",function () {
128
                    var $this = $(this);
129
                    var articleId = $this.parent().attr("articleId");
130
                    spa.showModal("sys_article_count",{
131
                        id:articleId,
132
                        hand:function () {
133
                            pdg.reload();
122 134
                        }
123
                    }else {
124
                        util.alert("请选择一篇文章");
125
                    }
126
                });
135
                    })
136
                })
127 137
            },
128 138
            mainDestory: function () {
129 139
            }