2
13693261870
2022-09-16 653761a31dfeb50dd3d007e892d69c90bf0cdafc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
//打开查看资源信息窗口
function OpenZiYuan(id) {
    var url = "/res/ZiYuan/ZiYuanBaseInfo?resourceid=" + id;
    //winPro.openFullwin(url, "查看资源", "yes");
    window.open(url);
    $.ajax({
        url: '/res/resActionRecord/registerActionRecord',
        type:'post',
        data: {'resourceid': id, 'actiontype': '浏览'}
    });
}
//打开编辑资源信息窗口
function ZiYuanEdit(id) {
    var url = "/res/ResManage/ResRegister/ResEdit?resMainInfoId=" + id;
    // winPro.openFullwin(url, "编辑资源", "yes");
    openFullWindow(url, "编辑资源");
    $.ajax({
        url: '/res/resActionRecord/registerActionRecord',
        type:'post',
        data: {'resourceid': id, 'actiontype': '编辑'}
    });
}
 
 
//转码,主要用于列表的title属性
function htmlEncodeByRegExp(str){
    var s = "";
    if(str == null || str.length == 0) return "";
    // s = str.replace(/&/g,"&");
    s = str.replace(/</g,"&lt;");
    s = s.replace(/>/g,"&gt;");
    s = s.replace(/ /g,"&nbsp;");
    s = s.replace(/\'/g,"&#39;");
    s = s.replace(/\"/g,"&quot;");
    return s;
}
 
//判断发布时间选择框,后一个时间是否小于前一个时间
function checkDate() {
    var pubdateBegin = $("#pubdateBegin").val();
    var pubdatefinish = $("#pubdatefinish").val();
    if(pubdateBegin != "" && pubdatefinish != ""){
        var pubdatestart = new Date(pubdateBegin.replace(/-/g,"/"));
        var pubdateend = new Date(pubdatefinish.replace(/-/g,"/"));
        if(pubdatestart > pubdateend){
            alert("结束时间不能小于开始时间!");
            return false;
        }
        else {
            return true;
        }
    }
    else {
        return true;
    }
}
 
//判断申请时间选择框,后一个时间是否小于前一个时间
function checkDate2() {
    var pubdateBegin = $("#appdateBeg").val();
    var pubdatefinish = $("#appdateEnd").val();
    if(pubdateBegin != "" && pubdatefinish != ""){
        var pubdatestart = new Date(pubdateBegin.replace(/-/g,"/"));
        var pubdateend = new Date(pubdatefinish.replace(/-/g,"/"));
        if(pubdatestart > pubdateend){
            alert("结束时间不能小于开始时间!");
            return false;
        }
        else {
            return true;
        }
    }
    else {
        return true;
    }
}