Просмотр исходного кода

Merge branch 'master' into resourceIssure

XMTT лет назад: 7
Родитель
Сommit
6a9eaa3f0d

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

19
    width: 4%;
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
    cursor:pointer;
23
    cursor:pointer;
24
}
24
}
25
25

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

20
        </div>
20
        </div>
21
        <div class="col-3"></div>
21
        <div class="col-3"></div>
22
    </div>
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
    <div class="container dt-tpl">
32
    <div class="container dt-tpl">
33
        <table class="table table-bordered">
33
        <table class="table table-bordered">
34
            <thead>
34
            <thead>
35
            <tr>
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
                <th class="number">#</th>
38
                <th class="number">#</th>
38
                <th>文章标题</th>
39
                <th>文章标题</th>
39
                <th>作者</th>
40
                <th>作者</th>
48
            </thead>
49
            </thead>
49
            <tbody>
50
            <tbody>
50
            <tr ch-dir="list">
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
                <td class="hand-id" articleId="{{id}}">{{-_index}}</td>
54
                <td class="hand-id" articleId="{{id}}">{{-_index}}</td>
53
                <td class="articleTitle">{{articleTitle}}</td>
55
                <td class="articleTitle">{{articleTitle}}</td>
54
                <td class="professorName">{{professorName}}</td>
56
                <td class="professorName">{{professorName}}</td>

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

107
                    var $this = $(this);
107
                    var $this = $(this);
108
                    $this.toggleClass("checked");
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
            mainDestory: function () {
138
            mainDestory: function () {
129
            }
139
            }

+ 13 - 3
js/model/sys/resresult/edit.js

36
                            }
36
                            }
37
                        }
37
                        }
38
                    },
38
                    },
39
                    orgName: {keyPressInterval: 1},
39
                    orgName: {
40
                        keyPressInterval: 1,
41
                        hide: function () {
42
                            this.shown = false;
43
                            this.ctn.removeClass("open");
44
                            this.lastQuerying = null;
45
                            this.lastQueryed = null;
46
                        }
47
                    },
40
                    newSubject: {
48
                    newSubject: {
41
                        keyPressInterval: 1,
49
                        keyPressInterval: 1,
42
                        hide: function () {
50
                        hide: function () {
88
                var saveBtn = root.find(".opt-save"),
96
                var saveBtn = root.find(".opt-save"),
89
                    headArea = root.find(".head-ctn"),
97
                    headArea = root.find(".head-ctn"),
90
                    save = function () {
98
                    save = function () {
91
                        // console.log(form.val().researcherList);
99
                        // console.log($(".org").find("input").val());
92
                        var pic = [];
100
                        var pic = [];
93
                        $('#fileList').find('img').each(function () {
101
                        $('#fileList').find('img').each(function () {
94
                            pic.push($(this).attr("name"));
102
                            pic.push($(this).attr("name"));
96
                        form.val({pic: oString(pic), researchers: form.val().researcherList});
104
                        form.val({pic: oString(pic), researchers: form.val().researcherList});
97
                        form.val({
105
                        form.val({
98
                            industry: oString(form.val().industryList),
106
                            industry: oString(form.val().industryList),
99
                            subject: oString(form.val().subjectList)
107
                            subject: oString(form.val().subjectList),
108
                            orgName: $(".org").find("input").val()
100
                        });
109
                        });
101
110
102
                        if (form.val().name == null) {
111
                        if (form.val().name == null) {
125
                    }
134
                    }
126
                });
135
                });
127
                form.val(data.data);
136
                form.val(data.data);
137
                $(".org").find("input").val(data.data.orgName);
128
                if (data.data.industry) {
138
                if (data.data.industry) {
129
                    form.val({industryList: split1(data.data.industry)});
139
                    form.val({industryList: split1(data.data.industry)});
130
                }
140
                }

+ 13 - 4
js/model/sys/resresult/new.js

36
                            }
36
                            }
37
                        }
37
                        }
38
                    },
38
                    },
39
                    orgName:{keyPressInterval:1},
40
                    newSubject:{
41
                        keyPressInterval:1,
39
                    orgName: {
40
                        keyPressInterval: 1,
41
                        hide: function () {
42
                            this.shown = false;
43
                            this.ctn.removeClass("open");
44
                            this.lastQuerying = null;
45
                            this.lastQueryed = null;
46
                        }
47
                    },
48
                    newSubject: {
49
                        keyPressInterval: 1,
42
                        hide: function () {
50
                        hide: function () {
43
                            this.shown = false;
51
                            this.shown = false;
44
                            this.ctn.removeClass("open");
52
                            this.ctn.removeClass("open");
95
                        form.val({pic: oString(pic), researchers: form.val().researcherList});
103
                        form.val({pic: oString(pic), researchers: form.val().researcherList});
96
                        form.val({
104
                        form.val({
97
                            industry: oString(form.val().industryList),
105
                            industry: oString(form.val().industryList),
98
                            subject: oString(form.val().subjectList)
106
                            subject: oString(form.val().subjectList),
107
                            orgName: $(".org").find("input").val()
99
                        });
108
                        });
100
109
101
                        if (form.val().name == null) {
110
                        if (form.val().name == null) {

+ 19 - 19
js/model/sys/usercount/index.js

20
                    return v;
20
                    return v;
21
                });
21
                });
22
22
23
                var query = function () {
24
                    if(allData != null) {
25
                        var td = tableData.data = [];
26
                        for(var i = allData.length-7; i < allData.length; ++i) {
27
                            var item = allData[i];
28
                            if(item) {
29
                                td.push(item);
30
                            }
31
                        }
32
                    } else {
33
                        tableData.data = allData;
34
                    }
35
                    cr.val(tableData.data);
36
                };
37
38
                /*
39
                用户流量统计表格 时间倒序
40
                 */
41
                // var query = function () {
23
                // var query = function () {
42
                //     if(allData != null) {
24
                //     if(allData != null) {
43
                //         var td = tableData.data = [];
25
                //         var td = tableData.data = [];
44
                //         for(var i = allData.length; i >= allData.length-7; --i) {
26
                //         for(var i = allData.length-7; i < allData.length; ++i) {
45
                //             var item = allData[i];
27
                //             var item = allData[i];
46
                //             if(item) {
28
                //             if(item) {
47
                //                 td.push(item);
29
                //                 td.push(item);
53
                //     cr.val(tableData.data);
35
                //     cr.val(tableData.data);
54
                // };
36
                // };
55
37
38
                /*
39
                用户流量统计表格 时间倒序
40
                 */
41
                var query = function () {
42
                    if(allData != null) {
43
                        var td = tableData.data = [];
44
                        for(var i = allData.length; i >= allData.length-7; --i) {
45
                            var item = allData[i];
46
                            if(item) {
47
                                td.push(item);
48
                            }
49
                        }
50
                    } else {
51
                        tableData.data = allData;
52
                    }
53
                    cr.val(tableData.data);
54
                };
55
56
                var load = function () {
56
                var load = function () {
57
                    util.get("../ajax/operation/statist/userCount", null, function (data) {
57
                    util.get("../ajax/operation/statist/userCount", null, function (data) {
58
                        allData = data || [];
58
                        allData = data || [];