Browse Source

功能优化

XMTT 7 years ago
parent
commit
9ed319156b

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

@ -19,6 +19,10 @@
19 19
    width: 4%;
20 20
}
21 21
22
.sys_article_index .table-opt .name {
23
    cursor:pointer;
24
}
25
22 26
.sys_article_sort, .sys_article_subject,.sys_article_colnum {
23 27
    width: 600px;
24 28
    height: 200px;
@ -74,8 +78,20 @@
74 78
    height: 900px;
75 79
}
76 80
77
.sys_article_relate .content {
81
.sys_article_relate .content, .sys_disbanner_insert .content {
78 82
    font-size: 21px;
79 83
    font-weight: bold;
80 84
    text-align: center;
85
}
86
87
.sys_disbanner_insert .pics {
88
    position: absolute;
89
    top: 140px;
90
    right: 110px;
91
}
92
93
.sys_disbanner_insert {
94
    width: 800px;
95
    height: 450px;
96
    padding: 0 20px 10px;
81 97
}

+ 4 - 0
css/model/sys/paper.css

@ -19,6 +19,10 @@
19 19
    width: 4%;
20 20
}
21 21
22
.sys_paper_index .table-opt .name {
23
    cursor: pointer;
24
}
25
22 26
.sys_paper_sort {
23 27
    width: 600px;
24 28
    height: 200px;

+ 4 - 0
css/model/sys/patent.css

@ -19,6 +19,10 @@
19 19
    width: 4%;
20 20
}
21 21
22
.sys_patent_index .table-opt .name {
23
    cursor: pointer;
24
}
25
22 26
.sys_patent_sort{
23 27
    width: 600px;
24 28
    height: 200px;

+ 4 - 0
css/model/sys/resourceinfo.css

@ -18,6 +18,10 @@
18 18
    width: 4%;
19 19
}
20 20
21
.sys_resourceinfo_index .table-opt .name {
22
    cursor: pointer;
23
}
24
21 25
.sys_resourceinfo_sort {
22 26
    width: 600px;
23 27
    height: 200px;

+ 4 - 1
html/model/sys/article/index.html

@ -66,6 +66,9 @@
66 66
            <div class="btn opt-count">
67 67
                流量统计
68 68
            </div>
69
            <div class="btn opt-banner">
70
                添加到栏目备选列表
71
            </div>
69 72
            <div class="btn opt-del">
70 73
                删除
71 74
            </div>
@ -93,7 +96,7 @@
93 96
            <tr ch-dir="list">
94 97
                <td class="opt-check" ><i class="icon icon-st-check" articleId="{{articleId}}"></i></td>
95 98
                <td>{{pi}}</td>
96
                <td>{{articleTitle}}</td>
99
                <td class="table-opt" articleId="{{articleId}}"><a class="name">{{articleTitle}}</a></td>
97 100
                <td>{{professorName}}{{organizationName}}</td>
98 101
                <td>{{subject}}</td>
99 102
                <td class="hand-dict" dict="banner" code="{{colNum}}"></td>

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

@ -80,7 +80,7 @@
80 80
            <tr ch-dir="list">
81 81
                <td class="opt-check" ><i class="icon icon-st-check" paperId="{{id}}"></i></td>
82 82
                <td>{{pi}}</td>
83
                <td>{{name}}</td>
83
                <td class="table-opt" paperId="{{id}}"><a class="name">{{name}}</a></td>
84 84
                <td>{{authors}}</td>
85 85
                <td>{{keywords}}</td>
86 86
                <td>{{createTime-showDay}}</td>

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

@ -80,7 +80,7 @@
80 80
            <tr ch-dir="list">
81 81
                <td class="opt-check" ><i class="icon icon-st-check" patentId="{{id}}"></i></td>
82 82
                <td>{{pi}}</td>
83
                <td>{{name}}</td>
83
                <td class="table-opt" patentId="{{id}}"><a class="name">{{name}}</a></td>
84 84
                <td>{{authors}}</td>
85 85
                <td>{{keywords}}</td>
86 86
                <td>{{createTime-showDay}}</td>

+ 1 - 1
html/model/sys/resourceinfo/index.html

@ -78,7 +78,7 @@
78 78
            <tr ch-dir="list">
79 79
                <td class="opt-check" ><i class="icon icon-st-check" resourceId="{{resourceId}}"></i></td>
80 80
                <td>{{pi}}</td>
81
                <td>{{resourceName}}</td>
81
                <td class="table-opt" resourceId="{{resourceId}}"><a class="name">{{resourceName}}</a></td>
82 82
                <td>{{professorName}}{{organizationName}}</td>
83 83
                <td>{{subject}}</td>
84 84
                <td>{{publishTime-showDay}}</td>

+ 45 - 0
js/model/sys/article/banner.js

@ -0,0 +1,45 @@
1
/**
2
 * Created by TT on 2017/10/16.
3
 */
4
;
5
spa_define(function () {
6
    return $.use(["spa", "util", "form"], function (spa, util, fb) {
7
        return {
8
            modal: function (data) {
9
                var root = spa.findInModal(".sys_disbanner_insert");
10
                $(".sys_disbanner_insert .opt-search").hide();
11
                $(".sys_disbanner_insert .trim").addClass("readOnly");
12
                var form = fb.build(root.find(".newForm"));
13
                root.find(".modal-ctrl .icon-times").on("click", function () {
14
                    spa.closeModal();
15
                });
16
                form.val({id:data.id});
17
18
                util.get("../ajax/article/id/" + data.id, null, function (article) {
19
                    if (article) {
20
                        form.val({title: article.articleTitle, banner: article.colNum});
21
                        var pics = root.find(".pics");
22
                        pics.append($("<img src='http://www.ekexiu.com/data/article/" + article.articleImg + "' width='210px' height='120px'/>"));
23
                        // pics.append($("<img src='../data/images/"+ article.articleImg +"' width='210px' height='120px'/>"));
24
                    } else {
25
                        util.alert("此文章不存在");
26
                    }
27
                });
28
29
                root.find(".opt-save").on("click", function () {
30
                    util.post("../ajax/disBanner", {
31
                        title: form.val().title,
32
                        descp: form.val().descp,
33
                        articleId: form.val().id,
34
                        banner:form.val().banner
35
                    }, function () {
36
                        spa.closeModal();
37
                        if (data.hand) {
38
                            data.hand();
39
                        }
40
                    }, {});
41
                });
42
            }
43
        }
44
    });
45
});

+ 21 - 0
js/model/sys/article/index.js

@ -35,6 +35,10 @@ spa_define(function () {
35 35
                        },{});
36 36
                        $e.removeClass("hand-collectionid");
37 37
                    });
38
                    root.find(".table-opt a.name").on("click",function () {
39
                        var articleId = $(this).parent().attr("articleId");
40
                        window.open('http://www.ekexiu.com/articalShow.html?articleId=' + articleId);
41
                    })
38 42
                });
39 43
40 44
                root.find(".opt-query").on("click", function () {
@ -209,6 +213,23 @@ spa_define(function () {
209 213
                        util.alert("请选择一篇文章");
210 214
                    }
211 215
                });
216
                root.find(".opt-banner").on("click",function () {
217
                    var $article = root.find("td.opt-check>i.checked");
218
                    if ($article.length) {
219
                        if ($article.length>1) {
220
                            util.alert("只能选择一篇文章");
221
                        }else {
222
                            spa.showModal("sys_article_banner", {
223
                                id: $article.attr("articleId"),
224
                                hand: function () {
225
                                    pdg.reload();
226
                                }
227
                            });
228
                        }
229
                    }else {
230
                        util.alert("请选择一篇文章");
231
                    }
232
                })
212 233
213 234
214 235
            }, mainDestory: function () {

+ 2 - 2
js/model/sys/article/viewcount.js

@ -76,14 +76,14 @@ spa_define(function () {
76 76
                        });
77 77
                    },
78 78
                    load = function () {
79
                        console.log($data);
79
                        // console.log($data);
80 80
                        $.ajax({
81 81
                            type: "GET",
82 82
                            url: "http://www.ekexiu.com:8082/log/jsonp/qs",
83 83
                            data: $data,
84 84
                            dataType: "jsonp",
85 85
                            success: function (data) {
86
                                console.log(data);
86
                                // console.log(data);
87 87
                                allData = data.data || [];
88 88
                                // allData = [{
89 89
                                //     id: "8F08D2EB366140BC85A6A4CE344A15A4"

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

@ -43,6 +43,10 @@ spa_define(function () {
43 43
                        },{});
44 44
                        $e.removeClass("hand-agreeid");
45 45
                    });
46
                    root.find(".table-opt a.name").on("click",function () {
47
                        var paperId = $(this).parent().attr("paperId");
48
                        window.open('http://www.ekexiu.com/paperShow.html?paperId=' + paperId);
49
                    })
46 50
                });
47 51
48 52
                root.find(".opt-query").on("click", function () {

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

@ -43,6 +43,10 @@ spa_define(function () {
43 43
                        },{});
44 44
                        $e.removeClass("hand-agreeid");
45 45
                    });
46
                    root.find(".table-opt a.name").on("click",function () {
47
                        var patentId = $(this).parent().attr("patentid");
48
                        window.open('http://www.ekexiu.com/patentShow.html?patentId=' + patentId);
49
                    })
46 50
                });
47 51
48 52
                root.find(".opt-query").on("click", function () {

+ 4 - 0
js/model/sys/resourceinfo/index.js

@ -25,6 +25,10 @@ spa_define(function () {
25 25
                        },{});
26 26
                        $e.removeClass("hand-collectionid");
27 27
                    });
28
                    root.find(".table-opt a.name").on("click",function () {
29
                        var resourceId = $(this).parent().attr("resourceId");
30
                        window.open('http://www.ekexiu.com/resourceShow.html?resourceId=' + resourceId);
31
                    })
28 32
                });
29 33
30 34
                root.find(".opt-query").on("click", function () {