Browse Source

文章留言量修改,专利论文添加点赞量和留言量

XMTT 7 years ago
parent
commit
a2b192cca4

+ 2 - 2
html/model/sys/content/index.html

@ -83,8 +83,8 @@
83 83
                <td class="publish">{{publishTime-showDay}}</td>
84 84
                <td>{{sortNum}}</td>
85 85
                <td>{{pageViews}}</td>
86
                <td>{{articleAgree}}</td>
87
                <td class="hand-articleid" articleid="{{articleId}}"></td>
86
                <td class="hand-agreeid" agreeid="{{id}}">{{articleAgree}}</td>
87
                <td class="hand-objid" objid="{{articleId}}{{id}}"></td>
88 88
                <td class="hand-collectionid" collectionid="{{articleId}}{{resourceId}}{{id}}"></td>
89 89
            </tr>
90 90
            </tbody>

+ 5 - 1
html/model/sys/paper/index.html

@ -68,6 +68,8 @@
68 68
                <th>发布时间</th>
69 69
                <th class="number">权重</th>
70 70
                <th class="number">浏览量</th>
71
                <th class="number">点赞量</th>
72
                <th class="number">留言量</th>
71 73
                <th class="number">收藏量</th>
72 74
            </tr>
73 75
            </thead>
@ -81,12 +83,14 @@
81 83
                <td>{{createTime-showDay}}</td>
82 84
                <td>{{sortNum}}</td>
83 85
                <td>{{pageViews}}</td>
86
                <td class="hand-agreeid" agreeid="{{id}}"></td>
87
                <td class="hand-paperid" paperid="{{id}}"></td>
84 88
                <td class="hand-collectionid" collectionid="{{id}}"></td>
85 89
            </tr>
86 90
            </tbody>
87 91
            <tbody ch-dir="array.empty">
88 92
            <tr>
89
                <td class="empty-desc" colspan="9">表格暂无数据</td>
93
                <td class="empty-desc" colspan="10">表格暂无数据</td>
90 94
            </tr>
91 95
            </tbody>
92 96
        </table>

+ 5 - 1
html/model/sys/patent/index.html

@ -68,6 +68,8 @@
68 68
                <th>发布时间</th>
69 69
                <th class="number">权重</th>
70 70
                <th class="number">浏览量</th>
71
                <th class="number">点赞量</th>
72
                <th class="number">留言量</th>
71 73
                <th class="number">收藏量</th>
72 74
            </tr>
73 75
            </thead>
@ -81,12 +83,14 @@
81 83
                <td>{{createTime-showDay}}</td>
82 84
                <td>{{sortNum}}</td>
83 85
                <td>{{pageViews}}</td>
86
                <td class="hand-agreeid" agreeid="{{id}}"></td>
87
                <td class="hand-patentid" patentid="{{id}}"></td>
84 88
                <td class="hand-collectionid" collectionid="{{id}}"></td>
85 89
            </tr>
86 90
            </tbody>
87 91
            <tbody ch-dir="array.empty">
88 92
            <tr>
89
                <td class="empty-desc" colspan="9">表格暂无数据</td>
93
                <td class="empty-desc" colspan="11">表格暂无数据</td>
90 94
            </tr>
91 95
            </tbody>
92 96
        </table>

+ 36 - 6
js/model/sys/content/index.js

@ -18,14 +18,28 @@ spa_define(function () {
18 18
                pdg.code.listen($.dict.doTransfer);
19 19
                pdg.code.listen(function(){
20 20
                    var type = pdg.queryParam().contentType;
21
                    root.find(".hand-articleid").each(function() {
21
                    root.find(".hand-objid").each(function() {
22 22
                        var $e = $(this);
23
                        var articleid = $e.attr("articleid");
24
                        if (articleid) {
25
                            util.get("/ajax/content/lwCount", {articleId: articleid}, function (data) {
23
                        var objid = $e.attr("objid");
24
                        if (objid) {
25
                            if(type == 3) {
26
                                util.get("/ajax/content/lwCount", {articleId: objid}, function (data) {
26 27
                                    $e.text(data);
27
                            }, {});
28
                            $e.removeClass("hand-articleid");
28
                                }, {});
29
                                $e.removeClass("hand-objid");
30
                            }
31
                            if (type == 4 ) {
32
                                util.get("/ajax/content/lwCount/patent", {patentId: objid}, function (data) {
33
                                    $e.text(data);
34
                                }, {});
35
                                $e.removeClass("hand-objid");
36
                            }
37
                            if (type == 5 ) {
38
                                util.get("/ajax/content/lwCount/paper", {paperId: objid}, function (data) {
39
                                    $e.text(data);
40
                                }, {});
41
                                $e.removeClass("hand-objid");
42
                            }
29 43
                        }
30 44
                    });
31 45
                    root.find(".hand-collectionid").each(function() {
@ -36,6 +50,22 @@ spa_define(function () {
36 50
                        },{});
37 51
                        $e.removeClass("hand-collectionid");
38 52
                    });
53
                    root.find(".hand-agreeid").each(function() {
54
                        var $e = $(this);
55
                        var agreeid = $e.attr("agreeid");
56
                        if (type == 4) {
57
                            util.get("/ajax/patent/agreeCount",{id:agreeid},function(data){
58
                                $e.text(data);
59
                            },{});
60
                            $e.removeClass("hand-agreeid");
61
                        }
62
                        if (type == 5) {
63
                            util.get("/ajax/paper/agreeCount",{id:agreeid},function(data){
64
                                $e.text(data);
65
                            },{});
66
                            $e.removeClass("hand-agreeid");
67
                        }
68
                    });
39 69
                    if (type == 3 || type==2 ) {
40 70
                        $(".create").hide();
41 71
                    } else {

+ 18 - 0
js/model/sys/paper/index.js

@ -17,6 +17,16 @@ spa_define(function () {
17 17
                });
18 18
                pdg.code.listen($.dict.doTransfer);
19 19
                pdg.code.listen(function(){
20
                    root.find(".hand-paperid").each(function() {
21
                        var $e = $(this);
22
                        var paperid = $e.attr("paperid");
23
                        if (paperid) {
24
                            util.get("/ajax/content/lwCount/paper", {paperId: paperid}, function (data) {
25
                                $e.text(data);
26
                            }, {});
27
                            $e.removeClass("hand-paperid");
28
                        }
29
                    });
20 30
                    root.find(".hand-collectionid").each(function() {
21 31
                        var $e = $(this);
22 32
                        var collectionid = $e.attr("collectionid");
@ -25,6 +35,14 @@ spa_define(function () {
25 35
                        },{});
26 36
                        $e.removeClass("hand-collectionid");
27 37
                    });
38
                    root.find(".hand-agreeid").each(function() {
39
                        var $e = $(this);
40
                        var agreeid = $e.attr("agreeid");
41
                        util.get("/ajax/paper/agreeCount",{id:agreeid},function(data){
42
                            $e.text(data);
43
                        },{});
44
                        $e.removeClass("hand-agreeid");
45
                    });
28 46
                });
29 47
30 48
                root.find(".opt-query").on("click", function () {

+ 18 - 0
js/model/sys/patent/index.js

@ -17,6 +17,16 @@ spa_define(function () {
17 17
                });
18 18
                pdg.code.listen($.dict.doTransfer);
19 19
                pdg.code.listen(function(){
20
                    root.find(".hand-patentid").each(function() {
21
                        var $e = $(this);
22
                        var patentid = $e.attr("patentid");
23
                        if (patentid) {
24
                            util.get("/ajax/content/lwCount/patent", {patentId: patentid}, function (data) {
25
                                $e.text(data);
26
                            }, {});
27
                            $e.removeClass("hand-patentid");
28
                        }
29
                    });
20 30
                    root.find(".hand-collectionid").each(function() {
21 31
                        var $e = $(this);
22 32
                        var collectionid = $e.attr("collectionid");
@ -25,6 +35,14 @@ spa_define(function () {
25 35
                        },{});
26 36
                        $e.removeClass("hand-collectionid");
27 37
                    });
38
                    root.find(".hand-agreeid").each(function() {
39
                        var $e = $(this);
40
                        var agreeid = $e.attr("agreeid");
41
                        util.get("/ajax/patent/agreeCount",{id:agreeid},function(data){
42
                            $e.text(data);
43
                        },{});
44
                        $e.removeClass("hand-agreeid");
45
                    });
28 46
                });
29 47
30 48
                root.find(".opt-query").on("click", function () {