Metadata
Title
活动日历-清华大学图书馆
Category
general
UUID
6201c6a9822c43a08332de7c2fa62498
Source URL
https://lib.tsinghua.edu.cn/hdrl.htm
Parent URL
https://lib.tsinghua.edu.cn/index.htm
Crawl Time
2026-03-10T04:10:39+00:00
Rendered Raw Markdown

活动日历-清华大学图书馆

Source: https://lib.tsinghua.edu.cn/hdrl.htm Parent: https://lib.tsinghua.edu.cn/index.htm

var map = {}; //存储date-json:index对应关系 var tb = ["一","二","三","四","五","六","七","八","九","十","十一","十二", "十三","十四","十五","十六","十七","十八","十九","二十","二十一", "二十二","二十三","二十四","二十五","二十六","二十七","二十八","二十九","三十","三十一"]; var json = []; //请求的数据。 function getJson1031122(year,month){ var time=year+"-"+month; var url="/system/resource/news/calendar/newsservices.jsp"; //文章数据请求地址 $.ajax({ url : url, type: "post", data:{"date":time,"owner":'1724308018',"contentid":'1035862',"is_future":'true'}, dataType : "json", contentType : "application/x-www-form-urlencoded; charset=UTF-8", async : false, success : function(data) { json = data; calUtil.init(json[0]); }, error: function(XMLHttpRequest, textStatus, errorThrown) { //alert(textStatus); }, complete: function(XMLHttpRequest, textStatus) { this; // 调用本次AJAX请求时传递的options参数 } }); } //更新通知信息 function fillNotice1031122(i,item){ var url=item.url; //文章内容页地址。 var title=item.title; //文章标题 var summary=item.summary; //文章摘要 var hddd=item.hddd; //文章活动地点 var hdrq=item.hdrq; //文章活动时间 var wbdate=item.wbdate; //文章活动时间 var lll=wbdate.split('-'); //文章活动时间拆分 var YY=wbdate.split(' '); //文章活动时间拆分 var dd=YY[0].split('-'); //文章活动时间 var mm=YY[0].substr(8,2); var titlelen=200; var summarylen=20; if(title.length>=parseInt(titlelen)) { title=title.substr(0,titlelen)+"..."; } if(summary.length>=parseInt(summarylen)) { summary=summary.substr(0,summarylen)+"..."; } $(".dqsj-title a.dqsj-link").eq(i).text(title); $(".dqsj-title a.dqsj-link").eq(i).attr("href",url); $(".dqsj-summary").eq(i).text(summary); $(".daaa").eq(i).text(hdrq); $(".rl-address").eq(i).text(hddd); $(".rl-year").eq(i).text(lll[0]); var nyr=dd[1]+'/'+mm+''; $(".fl-date").eq(i).html(nyr); } //更新通知信息 function updateNotice1031122(date){ var htmls = ""; var news_num=100-1; //显示num篇文章 var num = 0; $(".rl-box").html(""); $.each(json[0], function(index,item){ if (item.date == date){ var url=item.url; //文章内容页地址。 var title=item.title; //文章标题 var summary=item.summary; //文章摘要 var hddd=item.hddd; //文章活动地点 var hdrq=item.hdrq; //文章活动时间 var wbdate=item.wbdate; //文章活动时间 var lll=wbdate.split('-'); //文章活动时间拆分 var YY=wbdate.split(' '); //文章活动时间拆分 var dd=YY[0].split('-'); //文章活动时间 var mm=YY[0].substr(8,2); var titlelen=200; var summarylen=20; if(title.length>=parseInt(titlelen)) { title=title.substr(0,titlelen)+"..."; } if(summary.length>=parseInt(summarylen)) { summary=summary.substr(0,summarylen)+"..."; } htmls+="

"; htmls+="
"+dd[1]+'/'+mm+''; htmls+="
"; htmls+="
"+lll[0]; htmls+="
"; } }) /// console.log(htmls); $(".rl-box").html(htmls); } //显示更多文章 function newsmore1031122(num,time) { $(".dqsj-more").eq(num).show(); var urlMore="&calendarselecteddate="+time; //每天文章数量超过num篇,查看更多链接地址 $(".dqsj-more").attr("href",urlMore); } function updateCalName1031122(date){ var calendarName=calUtil.showYear+"-"+calUtil.showMonth+"-"+date; $(".calendar_month_span").html(calendarName); }

var calUtil = { //当前日历显示的年份 showYear:2018, //当前日历显示的月份 showMonth:4, //当前日历显示的天数 showDate:19, curYear:2018, curMonth:4, curDate:19, eventName:"load", curTab:0, //初始化日历 init:function(signList){ calUtil.setMonthAndDay(); calUtil.draw(signList); calUtil.bindEnvent(); } , draw:function(signList){ //绑定日历 var str = calUtil.drawCal(calUtil.showYear,calUtil.showMonth,signList); $("#calendar").html(str); //绑定日历表头 if (calUtil.isCurrent()){ updateCalName1031122(parseInt(calUtil.curDate)); }else{ $(".calendar_month_span").html(calUtil.showYear+"-"+calUtil.showMonth+"-"+calUtil.curDate); $("#yuefen").attr("value",calUtil.showMonth); } }, //绑定事件 bindEnvent:function(){ //绑定上个月事件 $(".calendar_month_prev").click(function(){ //ajax获取日历json数据 calUtil.eventName="prev"; calUtil.init(json[calUtil.curTab]); calUtil.eventName="current"; map=[]; var time=calUtil.showYear+"-"+calUtil.showMonth+"-"+calUtil.showDate; getJson1031122(calUtil.showYear,calUtil.showMonth); }); //绑定下个月事件 $(".calendar_month_next").click(function(){ //ajax获取日历json数据 calUtil.eventName="next"; calUtil.init(json[calUtil.curTab]); calUtil.eventName="current"; map=[]; var time=calUtil.showYear+"-"+calUtil.showMonth+"-"+calUtil.showDate; getJson1031122(calUtil.showYear,calUtil.showMonth); }); //日期点击事件 $("#calendar tbody td").click(function(){ //ajax获取日历json数据 var date = $(this).text(); var time=calUtil.showYear+"-"+calUtil.showMonth+"-"+date; if (date!=""){ //$(".calendar_cur_date").text(tb[calUtil.showMonth-1] + "月" + tb[date-1] + ((tb[date-1].length)>1?"":"日")); } //更新日历表头 updateCalName1031122(parseInt(date)); //更新活动通知 if ($(this).hasClass("on")){ updateNotice1031122(date); document.getElementById("kzyc1").style.display="block"; document.getElementById("kzyc2").style.display="none"; $('td').removeAttr('id'); $(this).attr("id","id1"); $(".fl-box-left").show(); } else { $(".dqsj").hide(); $(".fl-box-left").hide(); } }); }, //获取当前选择的年月 setMonthAndDay:function(){ switch(calUtil.eventName) { case "load": var current = new Date(); calUtil.curYear=calUtil.showYear=current.getFullYear(); calUtil.curMonth=calUtil.showMonth=current.getMonth() + 1; calUtil.curDate=calUtil.showDate=current.getDate(); break; case "prev": var nowMonth=calUtil.showMonth; calUtil.showMonth=parseInt(nowMonth)-1; if(calUtil.showMonth==0) { calUtil.showMonth=12; calUtil.showYear-=1; } break; case "next": var nowMonth=calUtil.showMonth; calUtil.showMonth=parseInt(nowMonth)+1; if(calUtil.showMonth==13) { calUtil.showMonth=1; calUtil.showYear+=1; } break; case "current": break; } }, getDaysInmonth : function(iMonth, iYear){ var dPrevDate = new Date(iYear, iMonth, 0); return dPrevDate.getDate(); }, bulidCal : function(iYear, iMonth) { var aMonth = new Array(); aMonth[0] = new Array(7); aMonth[1] = new Array(7); aMonth[2] = new Array(7); aMonth[3] = new Array(7); aMonth[4] = new Array(7); aMonth[5] = new Array(7); aMonth[6] = new Array(7); var dCalDate = new Date(iYear, iMonth - 1, 1); var iDayOfFirst = dCalDate.getDay(); if(iDayOfFirst==0)iDayOfFirst=7; var iDaysInMonth = calUtil.getDaysInmonth(iMonth, iYear); var iVarDate = 1; var d, w; aMonth[0][0] = "一"; aMonth[0][1] = "二"; aMonth[0][2] = "三"; aMonth[0][3] = "四"; aMonth[0][4] = "五"; aMonth[0][5] = "六"; aMonth[0][6] = "日"; for (d = iDayOfFirst-1; d < 7; d++) { aMonth[1][d] = iVarDate; iVarDate++; } for (w = 2; w < 7; w++) { for (d = 0; d < 7; d++) { if (iVarDate <= iDaysInMonth) { aMonth[w][d] = iVarDate; iVarDate++; } } } return aMonth; }, ifHasSigned : function(signList,day){ var signed = false; $.each(signList,function(index,item){ if(item.date == day) { signed = true; if(map[day]==undefined){ map[day]=index; }else{//多个活动则在json中添加more字段 if(signList[map[day]].more==undefined){ signList[map[day]].more=[index]; }else { signList[map[day]].more.push(index); } } } }); return signed ; }, isCurrent :function(){ return (calUtil.curYear==calUtil.showYear && calUtil.curMonth==calUtil.showMonth); }, drawCal : function(iYear, iMonth ,signList) { var myMonth = calUtil.bulidCal(iYear, iMonth); var htmls = new Array(); htmls.push("

"); htmls.push("
"); htmls.push("
"); htmls.push("
"); htmls.push("
"); htmls.push("
"); htmls.push("
"); htmls.push("
"); htmls.push("
"); htmls.push(""); htmls.push(""); htmls.push(""); htmls.push(""); htmls.push(""); htmls.push(""); htmls.push(""); htmls.push(""); htmls.push(""); htmls.push(""); var d, w; for (w = 1; w < 7; w++) { htmls.push(""); for (d = 0; d < 7; d++) { var ifHasSigned = calUtil.ifHasSigned(signList,myMonth[w][d]); if(ifHasSigned){ htmls.push(""); } else if(myMonth[w][d]==calUtil.curDate){ htmls.push(""); var str=tb[calUtil.showMonth-1] + "月" + tb[calUtil.showDate-1] + ((tb[calUtil.showDate-1].length)>1?"":"日"); htmls[2]="
"+str+"
" } else { if (!isNaN(myMonth[w][d])) { htmls.push(""); } else{ htmls.push(""); } } } htmls.push(""); } htmls.push("
" + myMonth[0][0] + "" + myMonth[0][1] + "" + myMonth[0][2] + "" + myMonth[0][3] + "" + myMonth[0][4] + "" + myMonth[0][5] + "" + myMonth[0][6] + "
" + (!isNaN(myMonth[w][d]) ? myMonth[w][d] : " ") + "" + (!isNaN(myMonth[w][d]) ? myMonth[w][d] : " ") + "" + myMonth[w][d] + "
"); htmls.push("
"); htmls.push("
"); return htmls.join(''); } }; //默认初始化 calUtil.init([{"date":""}]); function getdata1031122(){ //使用服务器期时间戳,校正本地日历时间 var url="/system/resource/news/calendar/newsservices.jsp?date=2018-04"; $.get(url,function(data,state,xhr){ var datestr=xhr.getResponseHeader("Date"); var date=new Date(datestr); if(datestr!=null && date!=undefined){ calUtil.curYear=calUtil.showYear=date.getFullYear(); calUtil.curMonth=calUtil.showMonth=date.getMonth() + 1; calUtil.curDate=calUtil.showDate=date.getDate(); } getJson1031122(calUtil.showYear,calUtil.showMonth); },"json") } $(function (){ getdata1031122(); var time=calUtil.showYear+"-"+calUtil.showMonth+"-"+calUtil.showDate; })

2026

2025

2025

2025

2025

2025

2025

2025

2025

首页上页12345...55下页尾页 第/55页 跳转

_showDynClickBatch(['dynclicks_u11_7894','dynclicks_u11_7848','dynclicks_u11_7810','dynclicks_u11_7831','dynclicks_u11_7809','dynclicks_u11_7808','dynclicks_u11_7807','dynclicks_u11_7806','dynclicks_u11_7817','dynclicks_u11_7805'],[7894,7848,7810,7831,7809,7808,7807,7806,7817,7805],"wbnews", 1724308018)

中国 北京 海淀区 清华大学图书馆 100084 电话:62782137 传真:62781758

联系我们

CALIS CADAL CASHL NSTL BALIS 国内外图书馆 外国教材中心 北京图研会

图书馆微信公众号

版权所有:清华大学图书馆 版权声明

.robot{display:none;}

服务时间:

周一至周日 8:00-22:00 - 请发送邮件至

ref-desk@tsinghua.edu.cn

答案通过E-mail发送给您 - 当面咨询 \ 服务时间:周一至周日 8:00-22:00

服务地点:北馆一层总服务台

联系电话:010-62788937 - 联络您的学科馆员,为您提供针对学科的深度咨询服务 - 清华图书馆

var znwdHtml = null; function frameLoad(){ //console.log(window.frames['myframe'].document.getElementById("vsb_content").innerHTML) znwdHtml=window.frames['myframe'].document.getElementById("vsb_content").innerHTML; } function post(url,data,callback,isForm){ $.ajax({ url: url, type:'post', headers:{ 'Authorization':gettoken(10), 'owner':'1724308018' }, contentType: isForm ? 'application/json':'application/x-www-form-urlencoded; charset=UTF-8' , data: isForm ? JSON.stringify(data) : data , success: function (res) { if (res.code == '0000' && res.data) { callback(res); } } }); } function send (_this){ var message = $(_this).find("h4").text(); vm1.question = message; vm1.send(); } function getQuestionList(type){ post("/openlab_component/expand/robot/api/getQueListByType",{type:type},function(res){ var data = res.data; $.each(data,function(index,item){ var dom = '

  • ' + '' + '' + (index+1) + '' + '

    ' + item.Question + '

    ' + '
  • '; $("#fixlist").append(dom); }) }); } //问题展开二级 function bindTree(){ $('.fix-problem li h3').click(function(event) { $(this).parents('li').toggleClass('ok').siblings('li').removeClass('ok'); if($(this).parents('li').hasClass('ok')){ $(this).siblings('dl').stop().slideDown(); $(this).parents('li').siblings('li').find('dl').stop().slideUp(); }else{ $(this).siblings('dl').stop().slideUp(); } if ($(this).parents('li').find("dl").length == 0) { $("#fixlist").html(""); //$('.fix-con').addClass('open1'); $(".fix-problem").animate({right:"-10px"}) var type = $(this).parents('li').attr("data-id"); $(this).parents('li').addClass("on"); $(this).parents('li').siblings().removeClass("on"); getQuestionList(type); } }); $('.fix-problem dd a').click(function(event) { $(this).parents('dl').find('dd').removeClass('on'); $(this).parents('dd').addClass('on'); $("#fixlist").html(""); //$('.fix-con').addClass('open1'); $(".fix-problem").animate({right:"-10px"}) //请求问题 var type = $(this).attr("data-id"); getQuestionList(type); }); } function bindZan(){ $('.fd-win .btn-ping .yes').click(function(event) { $(this).parents('.fd-win .btn-ping').hide(); $(this).parents('.item-l').find('.txt-ping-yes').show(); //请求 var aId = $(this).parent().attr("data-aid"); var cluid = $(this).parent().attr("data-cid"); post("/openlab_component/expand/robot/api/answerYes",{clientId: localStorage.getItem('clientId'), aId: aId, cluid: cluid}, function(res){ }); }); $('.fd-win .btn-ping .no').click(function(event) { $(this).parents('.fd-win .btn-ping').hide(); $(this).parents('.item-l').find('.txt-ping-no').show(); //请求 var aId = $(this).parent().attr("data-aid"); var cluid = $(this).parent().attr("data-cid"); post("/openlab_component/expand/robot/api/answerNo",{clientId: localStorage.getItem('clientId'), aId: aId, cluid: cluid}, function(res){ }); }); } var vm1 = new Vue({ el: '#main1012307', data: { cId : localStorage.getItem('clientId'), hotList: [], question: "", isRenGong:false, num:1, }, mounted: function() { var that = this this.init() setTimeout(function () { that.getHot() setTimeout(function () { that.getQuestionType() }, 1000) }, 1000) }, methods:{ init:function(){ console.log(1111) if(this.cId) { }else{ post("/openlab_component/expand/robot/api/initVisitor",{},function(res){ cId = res.data; window.localStorage.setItem('clientId', cId); }); } // var hello = '
    ' + '

    ' + "您好,我是智能客服机器人,我可以回答您相关的业务问题,有什么问题就问我吧! 很高兴为您服务!" + '

    ' + '
    '; $("#win").append(hello); }, getHot:function(){ var _this = this; post("/openlab_component/expand/robot/api/getHotQuestion",{},function(res){ _this.hotList = res.data; }); }, getQuestionType:function(){ var _this = this; var subTypes = []; post("/openlab_component/expand/robot/api/getQuestionType",{},function(res){ var typelist = res.data; $.each(typelist,function(index,item){ var type = '
  • ' + '

    ' + item.Name + '

    ' '
  • ' if (item.ParentId == 0) { $("#list").append(type); }else{ var sub = {}; sub.content = '
    ' + '
    ' + item.Name + '
    ' + '
    ' sub.pid = item.ParentId; subTypes.push(sub); } }) $.each(subTypes,function(index,item){ $("#list [data-id='"+ item.pid +"']").append(item.content); $("#list [data-id='"+ item.pid +"']").find("h3").attr("style",""); }) bindTree(); }); }, send:function(fid){ var message = this.question; if (message) { post("/openlab_component/expand/robot/api/textChat",{clientId: this.cId ,question: message,fid: typeof fid === 'string'?fid:null},function(res){ var text = res.data.robotReply[0].text; var guide = res.data.robotReply[0].guide; var richText = res.data.robotReply[0].richText; var reply = ""; var comment = ""; var cstyle = ""; var cid = res.data.robotReply[0].cluid; if (cid) { comment = '
    ' + '' + '' + '
    ' + '
    谢谢您的支持哦~会更努力哒!
    ' + '
    抱歉没能帮到您,希望下次能帮您排忧!
    ' cstyle = "display:block"; } if (text) { if(res.data.robotReply[0].answerType===-2 && znwdHtml && znwdHtml.length){ reply = '
    ' + '

    ' + znwdHtml + '

    ' + '
    ' + comment + '
    '; }else{ reply = '
    ' + '

    ' + text.content + '

    ' + '
    ' + comment + '
    '; } }else if (guide) { if (guide.content){ reply = '
    ' + '

    ' + guide.content + '

    ' + '
    ' + comment + '
    '; }else if (guide.list) { var guideList = ""; $.each(guide.list,function(index,item){ guideList += "

    " + item.seq + item.question + "

    "; }) reply = '

    ' + '

    ' + guide.beforeWord + '

    ' + guideList + '

    ' + guide.afterWord + '

    ' + '
    ' + comment + '
    '; } }else if (richText) { reply = '
    ' + '

    ' + richText.original + '

    ' //description + '
    ' + comment + '
    '; }else { reply = '
    ' + '

    [消息]

    ' + '
    '; } $("#win").append(reply); if (res.data.robotReply[0].cluid) {bindZan();} $("#win").scrollTop(10000); }); var html = '
    ' + '

    ' + message + '

    ' + '
    ' $("#win").append(html); this.question = ""; } }, sendA :function(question){ this.question = question; this.send(); }, rengongClick:function (){ if(this.num==1){ document.getElementById('rengong').innerHTML='' } this.num=2 this.isRenGong=true $('.fd-win').addClass('rengong') $('.rengong-new span').removeClass('activeBar') $('.znwd-new span').removeClass('activeBar') $('.rengong-new span').addClass('activeBar') }, zhinengClick:function(){ this.isRenGong=false $('.fd-win').removeClass('rengong') $('.znwd-new span').removeClass('activeBar') $('.rengong-new span').removeClass('activeBar') $('.znwd-new span').addClass('activeBar') } }//methods }) $(document).ready(function() { //咨询 $('.link2').click(function() { if ( $(window).width() < 700) { // window.location.href = "https://znkf.vsbclub.com/robot/h5chat.html?sysNum=16100186094532511&receiveId=2177&sourceId=2443"; window.location.href = "https://wpa1.qq.com/eQSH9aPO?_type=wpa&qidian=tru"; }else{ $('.fix-bg,.fix-nv').fadeIn(); $(".fix-con").show(); $(".fix-con").addClass("animated bounceInRight") $("body").addClass('hidden') } }); // 弹出全部问题 $('.js-pro').click(function(event) { //$('.fix-con').addClass('open'); $(".fix-wrap").show(); $(".fix-problem").animate({right:"-370px"},200); }); //关闭问题界面 $('.fix-problem .tit .btn').click(function(event) { //$('.fix-con').removeClass('open'); //$('.fix-con').removeClass('open1'); $(".fix-problem").animate({right:"-580px"}); setTimeout(function(){ $(".fix-wrap").hide(); },500) }); // 关闭咨询台 $('.fix-bg').click(function(event) { $('.fix-con').removeClass('open').fadeOut();; $('.fix-con').removeClass('open1'); $(".fix-nv").hide(); $(".fix-con").removeClass("animated bounceInRight") $(this).fadeOut(); //$("body").css("overflow","visible"); $("body").removeClass('hidden') }); $('#win').on('click','.wflink',function(e){ e.preventDefault() vm1.question = $(this).text(); vm1.send($(this).prop('rel')) }) $('#win').on('click','.welcomeWords',function(e){ e.preventDefault() vm1.question = $(this).text(); vm1.send() }) }); $('#win').on('click','#znwz1234',function(){ //console.log(123); vm1.rengongClick() })