container">
© 2016 Gogs Версия: 0.9.13.0318 Страница: 9255ms Шаблон: 1ms
console-front - Gogs: Go Git Service

No Description

viewcount.js 24KB

    /** * Created by TT on 2017/9/22. */ ; spa_define(function () { return $.use(["spa", "code", "form", "util", "dict"], function (spa, code, form, util, dict) { return { main: function () { var root = spa.findInMain(".sys_article_viewcount"); var qf = form.build(root.find(".queryForm")); var cr = code.parseCode(root.find(".dt-tpl")); var queryBtn = root.find(".queryForm .opt-query"); var tableData = {data: []}, allData = [], $data = {tn: "article"}; var now = new Date(), nbt = new Date(); nbt.setDate(now.getDate() - 7); var et1 = now.format("yyyyMMdd"), bt1 = nbt.format("yyyyMMdd"); qf.val({bt: bt1, et: et1}); $data.bt = bt1; $data.et = et1; var caption = function (dicts, code) { var items = dict.get(dicts); var cp = dict.getCap(items, code.toString()); if (cp) { return cp; } else { return "不可翻译的"; } // return dict.get(dicts)[code].caption; }, showDay = function (day) { if (day) { return day.substring(0, 4) + "年" + day.substring(4, 6) + "月" + day.substring(6, 8) + "日"; } else return ""; }, loadContent = function () { root.find(".hand-id").each(function () { var $e = $(this); var articleId = $e.attr("articleId"); if (articleId) { util.get("../ajax/article/base", {id: articleId}, function (data) { if (data) { $e.parent().find(".articleTitle .name").text(data.articleTitle).attr('shareId',data.shareId).attr('createTime',data.createTime); $e.parent().find(".professorName .author").text(data.professorName || data.organizationName).attr('ownerId',data.ownerId).attr('articleType',data.articleType); $e.parent().find(".subject").text(data.subject); $e.parent().find(".colNum").text(caption("banner", data.colNum)); $e.parent().find(".publishTime").text(showDay(data.publishTime)); $e.parent().find(".sortNum").text(data.sortNum); $e.parent().find(".pageViews").text(data.pageViews); $e.parent().find(".articleAgree").text(data.articleAgree); } }, {}); // // $e.removeClass("hand-id"); } }); }, loadLw = function () { root.find(".hand-id").each(function () { var $e = $(this); var articleId = $e.attr("articleId"); if (articleId) { util.get("/ajax/content/lwCount", {articleId: articleId}, function (data) { $e.parent().find(".lw").text(data); }, {}); } }); }, loadCol=function () { root.find(".hand-id").each(function () { var $e = $(this); var articleId = $e.attr("articleId"); if (articleId) { util.get("/ajax/content/countProfessor", {id: articleId,type:3}, function (data) { $e.parent().find(".collection").text(data); }, {}); } }); }, load = function () { // console.log($data); $.ajax({ type: "GET", url: "http://www.ekexiu.com:8082/log/jsonp/qs", data: $data, dataType: "jsonp", success: function (data) { // console.log(data); allData = data.data || []; // allData = [{ // id: "8F08D2EB366140BC85A6A4CE344A15A4" // }, { // id: "8DE678A43FFB4097B3E0DFF9C48CC737" // }]; tableData.data = allData; cr.val(tableData.data); loadContent(); loadLw(); loadCol(); } }); }, query = function () { // if (qf.val().bt || qf.val().et) { $data.bt = qf.val().bt; $data.et = qf.val().et; // }else { // $data.bt = ""; // $data.et = ""; // } load(); }; queryBtn.on("click", query); load(); root.find(".dt-tpl").on("click", "th.opt-check>i.icon-st-check", function () { var $this = $(this); $this.toggleClass("checked"); if ($this.hasClass("checked")) { root.find(".dt-tpl td.opt-check>i.icon-st-check").addClass("checked"); } else { root.find(".dt-tpl td.opt-check>i.icon-st-check").removeClass("checked"); } }); root.find(".dt-tpl").on("click", "td.opt-check>i.icon-st-check", function () { var $this = $(this); $this.toggleClass("checked"); }); root.find(".opt-total").on("click", function () { spa.showModal("sys_article_total"); }); root.on("click",".icon-line-chart",function () { var $this = $(this); var articleId = $this.parent().attr("articleId"); spa.showModal("sys_article_count",{ id:articleId, hand:function () { pdg.reload(); } }) }); root.on("click",".articleTitle a.name",function () { var articleId = $(this).attr("articleId"); var time = $(this).attr("createTime").substring(0,8); var shareId = $(this).attr("shareId"); // window.open('http://www.ekexiu.com/articalShow.html?articleId=' + articleId); window.open('http://www.ekexiu.com/shtml/a/'+time+'/' + shareId+'.html'); }); root.on("click",".professorName a.author",function () { var ownerId = $(this).attr("ownerId"); var articleType = $(this).attr("articleType"); if(articleType == 1) { window.open('http://www.ekexiu.com/userInforShow.html?professorId='+ownerId); }else if(articleType == 2){ window.open('http://www.ekexiu.com/cmpInforShow.html?orgId='+ownerId); } }) var myChart = echarts.init(document.getElementById('total')); var dayList = function () { var dayList = []; var now = new Date(); var day1 = new Date(); day1.setMonth(now.getMonth() - 1); day1.setDate(1); var day2 = new Date(); day2.setDate(day2.getDate()); // var s1 = day1.format("yyyy-MM-dd"); // var s2 = day2.format("yyyy-MM-dd"); // console.log(s1, s2); var days = (day2 - day1) / (24 * 60 * 60 * 1000); dayList[0] = {time: day1.format("yyyy-MM-dd")}; for (var i = 1; i < days + 1; i++) { day1.setDate(day1.getDate() + 1); dayList[i] = {time: day1.format("yyyy-MM-dd")}; } return dayList; }; var loadChart = function () { $.ajax({ type: "GET", url: "/ajax/operation/statist/total", success: function (data) { allData = dayList(); allData.forEach(function (day) { var time = (JSON.stringify(day.time)).replace(/\-|^\"|\"$/g, ""); day.pc = 0; day.app = 0; day.h5 = 0; day.wx = 0; data.data.forEach(function (log) { if (time == log.day) { if (log.source == 1) { day.pc = log.pv; } if (log.source == 2) { day.app = log.pv; } if (log.source == 3) { day.h5 = log.pv; } if (log.source == 4) { day.wx = log.pv; } } day.num = day.pc + day.app + day.wx + day.h5; }) }); // var colors = ['#003366', "#660099", '#c23531', "#c23531"]; var option = { // color: colors, title: { text: '文章总浏览量', subtext: '分渠道' }, tooltip: { trigger: 'axis', // formatter:function (params) { // // return params[0].name + '<br/>' // // + params[3].seriesName + ' : ' + (params[2].value + params[1].value + params[0].value)+ '<br/>' // // + params[2].seriesName + ' : ' + params[2].value + '<br/>' // // + params[1].seriesName + ' : ' + params[1].value + '<br/>' // // + params[0].seriesName + ' : ' + params[0].value + '<br/>'; // console.log(params); // }, "axisPointer": { "type": "shadow", textStyle: { color: "#fff" } } }, legend: { // selectedMode:false, data: ['PC端', '移动端APP', '移动端H5','小程序','合计'] }, xAxis: { "type": "category", "axisLine": { lineStyle: { color: '#90979c' } }, "splitLine": { "show": false }, "axisTick": { "show": false }, "splitArea": { "show": false }, axisLabel: { showMinLabel:true, showMaxLabel:true }, "data": allData.map(function (item) { return item.time; }) }, yAxis: { "type": "value", "splitLine": { "show": false }, "axisLine": { lineStyle: { color: '#90979c' } }, "axisTick": { "show": false }, "axisLabel": { showMinLabel:true, showMaxLabel:true }, "splitArea": { "show": false } }, toolbox: { show: true, feature: { dataZoom: { yAxisIndex: 'none' }, dataView: {readOnly: false}, magicType: {type: ['line', 'bar']}, restore: {}, saveAsImage: {} } }, dataZoom: [{ startValue: allData[allData.length - 7].time }, { type: 'inside' }], visualMap: { top: 10, right: 10 }, series: [ { name: '移动端H5', type: 'bar', stack: '总量', "barMaxWidth": 35, "barGap": "10%", "itemStyle": { "normal": { "color": "#dd4444", "label": { "show": false, "textStyle": { "color": "#fff" }, "position": "insideTop", formatter: function(p) { return p.value > 0 ? (p.value) : ''; } } } }, data: allData.map(function (item) { return item.h5; }) }, { name: 'PC端', type: 'bar', stack: '总量', "barMaxWidth": 35, "barGap": "10%", "itemStyle": { "normal": { "color": "#80F1BE", "label": { "show": false, "textStyle": { "color": "#fff" }, "position": "insideTop", formatter: function(p) { return p.value > 0 ? (p.value) : ''; } } } }, data: allData.map(function (item) { return item.pc; }) }, { name: '移动端APP', type: 'bar', stack: '总量', "barMaxWidth": 35, "barGap": "10%", "itemStyle": { "normal": { "color": "#fec42c", "label": { "show": false, "textStyle": { "color": "#fff" }, "position": "insideTop", formatter: function(p) { return p.value > 0 ? (p.value) : ''; } } } }, data: allData.map(function (item) { return item.app; }) },{ name: '小程序', type: 'bar', stack: '总量', "barMaxWidth": 35, "barGap": "10%", "itemStyle": { "normal": { "color": "#660099", "label": { "show": false, "textStyle": { "color": "#fff" }, "position": "insideTop", formatter: function(p) { return p.value > 0 ? (p.value) : ''; } } } }, data: allData.map(function (item) { return item.wx; }) }, { name: '合计', type: 'line', stack: '总量', symbolSize:7, symbol:'circle', // areaStyle: {normal: {}}, // label: { // normal: { // show: true, // position: 'top', // formatter: function (params) { // for (var i = 0, l = option.xAxis.data.length; i < l; i++) { // if (option.xAxis.data[i] == params.name) { // // option.series[0].data[i]; // var num = option.series[0].data[i]+option.series[1].data[i]+option.series[2].data[i]; // return '合计:' + num; // } // } // } // // } // }, itemStyle:{ normal:{ color:"#dd4444", barBorderRadius:0, label:{ show:true, position:"top", formatter:function (params) { return params.val; } } } }, data: allData.map(function (item) { return item.num; }) } ] }; myChart.setOption(option); } }); }; loadChart(); }, mainDestory: function () { } }; }); });
portal-front - Gogs: Go Git Service

portal html css js resource

unPatentIssue.html 10KB

     <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>非专利成果发布-科袖网</title> <link rel="shortcut icon" type="image/x-icon" href="images/favicon.png" media="screen" /> <link href="css/bootstrap.min.css" rel="stylesheet"> <link type="text/css" href="css/common.css" rel="stylesheet"> <link type="text/css" href="css/genindex.css" rel="stylesheet"> <link rel="stylesheet" type="text/css" href="./css/webuploader/webuploader.css"> <script type="text/javascript" src="js/jquery-1.11.1.js"></script> </head> <body> <header id="header"> <script src="js/header.js"></script> </header> <div id="container"> <div class="containerCon"> <div class="contentCon clearfix conBlock"> <div class="leftconBox floatL"> <ul class="artAbout"> <li> <dl class="clearfix" id="fileList"> <dd class="uploadD" id="uploadDd"> <div class="uploadFile"> <div class="uploadblock"> <span class="" id="filePicker">上传图片</span> <!--未上传图片时--> <div class="upFront" id="uploader"> <p>非专利成果图片<em class="requiredcon">*</em></p> <p class="uploadtip">JPG/JPEG/PNG格式,<br />2M以内</p> <span class="upbtn" style="margin-top:8px">上传图片</span> </div> </div> </div> </dd> <dd></dd> <dd></dd> </dl> </li> <li> <div class="aboutTit">非专利成果名称<em class="requiredcon">*</em><span class="frmconmsg" id="resourceNamePrompt" style="display:none;">50字以内</span></div> <input type="text" class="frmtype frmcontype" id="resourceName" value="" placeholder="请输入非专利成果名称" maxlength="50" /> </li> <li class="form-item"> <div class="aboutTit">研究者<em class="requiredcon">*</em><span class="frmconmsg" id="keyPrompt"></span></div> <div class="col-w-12" style="position: relative;"> <input type="text" class="frmcontype oinput1" placeholder="搜索您想添加的人" data-pro="关键词不得超过10个字" data-num="10000" data-fontSizeN="15" id="KeyWord3" /> <button type="button" class="frmcontype btnModel frmaddG addButton">添加</button> <div class="form-drop keydrop1"> <ul> </ul> </div> </div> <div class="form-result keyResult" style="margin-top: -10px;"> <ul class="ulspace editUlist clearfix" id="keyWordlist2"> <!--<li>dd<div class="closeThis"></div></li>--> </ul> </div> </li> <li> <div class="aboutTit">所属机构<span class="frmconmsg" id="organization" style="display:none">50字以内</span></div> <input type="text" class="frmtype frmcontype" id="organizationName" value="" placeholder="请输入所属机构" /> <div class="form-drop keydrop displayNone" id="departmentList"> <ul class="clearfix"> <!--<li class="clearfix"> <img src="images/authsort2.png" alt="" class="floatL" style="width:50px;height:50px;"/> <p class="h2Font floatL">金属材料工程与腐蚀</p> </li>--> </ul> </div> </li> <li> <div class="aboutTit">所属部门<span class="frmconmsg" id="resourceNamePrompt" style="display:none;">50字以内</span></div> <input type="text" class="frmtype frmcontype" id="department" value="" placeholder="请输入所属部门" /> </li> <li class="form-item"> <div class="aboutTit">行业领域<span class="frmconmsg" id="keyPrompt"></span></div> <div class="col-w-12" style="position: relative;"> <input type="text" class="frmcontype oinput" placeholder="请填写成果相关的行业领域,如:制造业、互联网、新材料" data-pro="关键词不得超过10个字" data-num="20" data-fontSizeN="15" id="KeyWord" /> <button type="button" class="frmcontype btnModel frmaddG addButton">添加</button> <div class="form-drop keydrop"> <ul> </ul> </div> </div> <div class="form-result keyResult" style="margin-top: -10px;"> <ul class="ulspace editUlist clearfix" id="keyWordlist"> <!--<li>dd<div class="closeThis"></div></li>--> </ul> </div> </li> <li class="form-item"> <div class="aboutTit">应用领域<span class="frmconmsg" id="keyPrompt"></span></div> <div class="col-w-12" style="position: relative;"> <input type="text" class="frmcontype oinput" placeholder="请填写成果相关的应用领域,如:空气净化、致霾气体降解、污水处理、抗菌、自清洁" data-pro="关键词不得超过10个字" data-num="20" data-fontSizeN="15" id="KeyWord1" /> <button type="button" class="frmcontype btnModel frmaddG addButton">添加</button> <div class="form-drop keydrop"> <ul> </ul> </div> </div> <div class="form-result keyResult" style="margin-top: -10px;"> <ul class="ulspace editUlist clearfix" id="keyWordlist1"> <!--<li>dd<div class="closeThis"></div></li>--> </ul> </div> </li> <li> <div class="aboutTit">非专利成果简介<span class="frmconmsg" id="performance" style="display:none;">2000字以内</span></div> <div class="msgContbox"> <textarea class="msgCont" placeholder="请输入非专利成果简介" id="descp" maxlength="2000"></textarea> <span class="msgconNum"><em>0</em>/2000</span> </div> </li> <li> <div class="aboutTit">应用介绍<span class="frmconmsg" id="remark" style="display:none;">2000字以内</span></div> <div class="msgContbox"> <textarea class="msgCont" placeholder="请输入非专利成果的应用介绍" id="applyDescp" maxlength="2000"></textarea> <span class="msgconNum"><em>0</em>/2000</span> </div> </li> <li> <div class="aboutTit">技术优势<span class="frmconmsg" id="remark" style="display:none;">2000字以内</span></div> <div class="msgContbox"> <textarea class="msgCont" placeholder="请输入非专利成果的技术优势" id="advantage" maxlength="2000"></textarea> <span class="msgconNum"><em>0</em>/2000</span> </div> </li> <li> <div class="aboutTit">技术指标<span class="frmconmsg" id="remark" style="display:none;">2000字以内</span></div> <div class="msgContbox"> <textarea class="msgCont" placeholder="请输入非专利成果的技术指标" id="indicator" maxlength="2000"></textarea> <span class="msgconNum"><em>0</em>/2000</span> </div> </li> <li> <div class="aboutTit">产业化前景<span class="frmconmsg" id="remark" style="display:none;">2000字以内</span></div> <div class="msgContbox"> <textarea class="msgCont" placeholder="请输入非专利成果的产业化前景" id="prospect" maxlength="2000"></textarea> <span class="msgconNum"><em>0</em>/2000</span> </div> </li> <li> <div class="aboutTit">经济和社会效益<span class="frmconmsg" style="display:none;">2000字以内</span> </div> <div class="msgContbox"> <textarea class="msgCont" placeholder="请输入非专利成果的经济和社会效益" id="benefit" maxlength="2000"></textarea> <span class="msgconNum"><em>0</em>/2000</span> </div> </li> </ul> </div> <div class="rightconBox floatR"> <div class="conItem conItemFirst"> <ul class="operateBlock" id="operateBlocko"> <li class="goFabu"> <em class="operateicon icon-issue"></em> <p>发布</p> </li> <li class="articalPreview" id="oPreview"> <em class="operateicon icon-preview"></em> <p>预览</p> </li> <li id="oDraft"> <em class="operateicon icon-draft"></em> <p>存草稿</p> </li> <li class="disableLi" id="deleteResource"> <!--只要预览、存草稿、发布之后移除disableLi类--> <em class="operateicon icon-delete"></em> <p>删除</p> </li> </ul> </div> </div> </div> </div> <div class="footer_tools"> <a id="scrollUp" href="javascript:;" title="返回顶部"></a> </div> <footer> <script type="text/javascript" src="js/footer.js"></script> </footer> <script type="text/javascript" src="js/jquery.cookie.js"></script> <script type="text/javascript" src="js/jquery.similar.msgbox.js"></script> <script type="text/javascript" src="js/jquery.page.js"></script> <script type="text/javascript" src="js/ueditor/ueditor.config.js"></script> <script type="text/javascript" src="js/ueditor/ueditor.all.js"></script> <script type="text/javascript" src="./js/webuploader/webuploader.js"></script> <script type="text/javascript" src="js/public/baseUtil.js"></script> <script type="text/javascript" src="js/public/genCom.js"></script> <script type="text/javascript" src="js/unPatentIssue.js"></script> <script type="text/javascript"> //回到顶部 var $body = $(document.body);; var $bottomTools = $('.footer_tools'); $(window).scroll(function () { var scrollHeight = $(document).height(); var scrollTop = $(window).scrollTop(); var $footerHeight = $('footer').outerHeight(true); var $windowHeight = $(window).innerHeight(); scrollTop > 50 ? $("#scrollUp").fadeIn(200).css("display", "block") : $("#scrollUp").fadeOut(200); $bottomTools.css("bottom", scrollHeight - scrollTop - $footerHeight > $windowHeight ? 20 : $windowHeight + scrollTop + $footerHeight + 20 - scrollHeight); }); $('#scrollUp').click(function (e) { e.preventDefault(); $('html,body').animate({ scrollTop: 0 }); }); </script> </body> </html>