// 首页科技英语
function getLeftMenuListSteng(menuid, insertPanelID, deepLevel) {
// 首先验证其是否为空,然后验证其是否为数字
// deepLevel = 1;
if (!isInteger(menuid)) {
return;
}
if (!isInteger(deepLevel)) {
return;
}
var columnid = parseInt(GetQueryString("column"));
if (!isInteger(menuid))
return;
if (columnid != menuid)
menuid = columnid;
$.getJSON('handlers/cistcSteng.ashx', { 'menuid': menuid, 'leftmenu': 1, 'deepLevel': deepLevel }, function (pageData) {
var RMenus = pageData.menus;
var Uptd = document.getElementById("topMenu");
var LeftMenuSmall = document.getElementById("leftMenuSmall");
var LeftMenuMedium = document.getElementById("leftMenuMedium");
var innerHtml = "";
for (var i = 0; i < RMenus.length; i++) {
if (RMenus[i].ParentMenuId == 8) {
// 主栏目样式单
// 创建li及其样式
var li = document.createElement("li");
if (RMenus[i].MenuId == "" || RMenus[i].MenuId == menuid) {
li.setAttribute("class", "uk-open");
}
else {
li.setAttribute("class", "uk-active");
}
li.innerHTML = "" + RMenus[i].MenuName + "";
Uptd.appendChild(li);
// 左侧隐藏栏目样式单
if (LeftMenuSmall != null) {
var liLeft = document.createElement("li");
liLeft.setAttribute("id", "leftS" + RMenus[i].MenuId);
if (RMenus[i].MenuId == menuid)
liLeft.setAttribute("class", "uk-active");
liLeft.innerHTML = "" + RMenus[i].MenuName + "";
LeftMenuSmall.appendChild(liLeft);
}
}
else if (LeftMenuSmall != null && LeftMenuMedium != null) {
//左侧菜单子菜单
// 小屏幕左侧菜单
var liS = document.createElement("li");
// 中等以上屏幕左侧菜单
var liM = document.createElement("li");
liS.setAttribute("id", "leftS" + RMenus[i].MenuId);
liM.setAttribute("id", "leftM" + RMenus[i].MenuId);
if (RMenus[i].MenuTypeId == 5) {
// 信息类栏目
if (RMenus[i].ParentMenuId == '232') {
// 资料:大事记栏目
liS.setAttribute("onclick", "ShowInfoCenterList(205, '" + RMenus[i].MenuName + "')");
liM.setAttribute("onclick", "ShowInfoCenterList(205, '" + RMenus[i].MenuName + "')");
}
else if (RMenus[i].ParentMenuId == '234') {
// 资料:科技外交掠影栏目
liS.setAttribute("onclick", "ShowInfoList(220)");
liM.setAttribute("onclick", "ShowInfoList(220)");
}
else {
// 一般信息栏目
liS.setAttribute("onclick", "ShowInfoList2(" + RMenus[i].MenuId + ")");
liM.setAttribute("onclick", "ShowInfoList2(" + RMenus[i].MenuId + ")");
}
}
// else if (RMenus[i].MenuId == 737) {
// liS.setAttribute("onclick", "ShowPageInfoList(738,1)");
// liM.setAttribute("onclick", "ShowPageInfoList(738,1)");
// }
else if (RMenus[i].MenuTypeId == 29) {
// 项目类栏目
liS.setAttribute("onclick", "ShowProjectList(" + RMenus[i].MenuId + ")");
liM.setAttribute("onclick", "ShowProjectList(" + RMenus[i].MenuId + ")");
}
else if (RMenus[i].MenuTypeId == 41) {
// 项科技管理机构类栏目
liS.setAttribute("onclick", "ShowTecManageList(" + RMenus[i].MenuId + ")");
liM.setAttribute("onclick", "ShowTecManageList(" + RMenus[i].MenuId + ")");
}
else if (RMenus[i].MenuTypeId == 42) {
// 科研院所类栏目
liS.setAttribute("onclick", "ShowScientResearchList(" + RMenus[i].MenuId + ")");
liM.setAttribute("onclick", "ShowScientResearchList(" + RMenus[i].MenuId + ")");
}
else if (RMenus[i].MenuTypeId == 43) {
// 高等院校类栏目
liS.setAttribute("onclick", "ShowChinaCollegeList(" + RMenus[i].MenuId + ")");
liM.setAttribute("onclick", "ShowChinaCollegeList(" + RMenus[i].MenuId + ")");
}
else if (RMenus[i].MenuTypeId == 44) {
// 国家重点实验室类栏目
liS.setAttribute("onclick", "ShowKeyLabList(" + RMenus[i].MenuId + ")");
liM.setAttribute("onclick", "ShowKeyLabList(" + RMenus[i].MenuId + ")");
}
else if (RMenus[i].MenuTypeId == 45) {
// 常用科学数据库类栏目
liS.setAttribute("onclick", "ShowConceptList(" + RMenus[i].MenuId + ")");
liM.setAttribute("onclick", "ShowConceptList(" + RMenus[i].MenuId + ")");
}
else if (RMenus[i].MenuTypeId == 54) {
// 世界科技名人录类栏目
liS.setAttribute("onclick", "ShowFamousList(" + RMenus[i].MenuId + ")");
liM.setAttribute("onclick", "ShowFamousList(" + RMenus[i].MenuId + ")");
}
else if (RMenus[i].MenuId == 235) {
// 中国科技通讯类栏目
liS.setAttribute("onclick", "ShowMagazineList(" + RMenus[i].MenuId + ")");
liM.setAttribute("onclick", "ShowMagazineList(" + RMenus[i].MenuId + ")");
}
var space = "";
for (var j = 0; j < RMenus[i].MenuLevel; j++) {
space += " ";
}
// 外部链接直接跳转
if (RMenus[i].MenuUrl.indexOf("http://") >= 0) {
liS.innerHTML = "" + space + RMenus[i].MenuName + "";
liM.innerHTML = "" + space + RMenus[i].MenuName + "";
}
else {
liS.innerHTML = "" + RMenus[i].MenuName + "";
liM.innerHTML = "" + space + RMenus[i].MenuName + "";
}
var parentSli = document.getElementById("leftS" + RMenus[i].ParentMenuId); //第一个ul li
var parentMli = document.getElementById("leftM" + RMenus[i].ParentMenuId);
if (parentSli != null) {
// 找到父菜单
var ul = document.createElement("ul");
ul.setAttribute("class", "uk-nav-sub");
ul.appendChild(liS);
parentSli.setAttribute("class", "uk-parent")
// LeftMenuSmall.lastChild.appendChild(ul);
parentSli.appendChild(ul);
}
else {
// 未找到父菜单
// LeftMenuSmall.appendChild(liS);
}
if (parentMli != null) {
//alert(parentMli)第二个ul li
// 找到父菜单
var ul = document.createElement("ul");
ul.setAttribute("class", "uk-nav-sub");
ul.appendChild(liM);
// var leftMli = document.getElementById("leftM" + RMenus[i].ParentMenuId);
parentMli.setAttribute("class", "uk-parent");
// LeftMenuMedium.lastChild.appendChild(ul);
parentMli.appendChild(ul);
}
else {
// 未找到父菜单,且是网站二级栏目:一级栏目Level为0,二级栏目Level为1.
if (RMenus[i].MenuLevel < 2) {
LeftMenuMedium.appendChild(liM);
}
}
}
}
// Uptd.appendChild(li);
});
}
// 合作司领导相关链接
function getLeftMenuListLeader(menuid, insertPanelID, deepLevel) {
// 首先验证其是否为空,然后验证其是否为数字
// deepLevel = 1;
if (!isInteger(menuid)) {
return;
}
if (!isInteger(deepLevel)) {
return;
}
var columnid = parseInt(GetQueryString("column"));
if (!isInteger(menuid))
return;
if (columnid != menuid)
menuid = columnid;
$.getJSON('handlers/cistcSteng.ashx', { 'menuid': menuid, 'leftmenu': 1, 'deepLevel': deepLevel }, function (pageData) {
var RMenus = pageData.menus;
var Uptd = document.getElementById("topMenu");
var LeftMenuSmall = document.getElementById("leftMenuSmall");
var LeftMenuMedium = document.getElementById("leftMenuMedium");
var innerHtml = "";
for (var i = 0; i < RMenus.length; i++) {
if (RMenus[i].ParentMenuId == 8) {
// 主栏目样式单
// 创建li及其样式
var li = document.createElement("li");
if (RMenus[i].MenuId == "" || RMenus[i].MenuId == menuid) {
li.setAttribute("class", "uk-open");
}
else {
li.setAttribute("class", "uk-active");
}
li.innerHTML = "" + RMenus[i].MenuName + "";
Uptd.appendChild(li);
// 左侧隐藏栏目样式单
if (LeftMenuSmall != null) {
var liLeft = document.createElement("li");
liLeft.setAttribute("id", "leftS" + RMenus[i].MenuId);
if (RMenus[i].MenuId == menuid)
liLeft.setAttribute("class", "uk-active");
liLeft.innerHTML = "" + RMenus[i].MenuName + "";
LeftMenuSmall.appendChild(liLeft);
}
}
else if (LeftMenuSmall != null && LeftMenuMedium != null) {
//左侧菜单子菜单
// 小屏幕左侧菜单
var liS = document.createElement("li");
// 中等以上屏幕左侧菜单
var liM = document.createElement("li");
liS.setAttribute("id", "leftS" + RMenus[i].MenuId);
liM.setAttribute("id", "leftM" + RMenus[i].MenuId);
if (RMenus[i].MenuTypeId == 5) {
// 信息类栏目
if (RMenus[i].ParentMenuId == '232') {
// 资料:大事记栏目
liS.setAttribute("onclick", "ShowInfoCenterList(205, '" + RMenus[i].MenuName + "')");
liM.setAttribute("onclick", "ShowInfoCenterList(205, '" + RMenus[i].MenuName + "')");
}
else if (RMenus[i].ParentMenuId == '234') {
// 资料:科技外交掠影栏目
liS.setAttribute("onclick", "ShowInfoList(220)");
liM.setAttribute("onclick", "ShowInfoList(220)");
}
else {
// 一般信息栏目
liS.setAttribute("onclick", "ShowInfoList2(" + RMenus[i].MenuId + ")");
liM.setAttribute("onclick", "ShowInfoList2(" + RMenus[i].MenuId + ")");
}
}
else if (RMenus[i].MenuTypeId == 29) {
// 项目类栏目
liS.setAttribute("onclick", "ShowProjectList(" + RMenus[i].MenuId + ")");
liM.setAttribute("onclick", "ShowProjectList(" + RMenus[i].MenuId + ")");
}
else if (RMenus[i].MenuTypeId == 41) {
// 项科技管理机构类栏目
liS.setAttribute("onclick", "ShowTecManageList(" + RMenus[i].MenuId + ")");
liM.setAttribute("onclick", "ShowTecManageList(" + RMenus[i].MenuId + ")");
}
else if (RMenus[i].MenuTypeId == 42) {
// 科研院所类栏目
liS.setAttribute("onclick", "ShowScientResearchList(" + RMenus[i].MenuId + ")");
liM.setAttribute("onclick", "ShowScientResearchList(" + RMenus[i].MenuId + ")");
}
else if (RMenus[i].MenuTypeId == 43) {
// 高等院校类栏目
liS.setAttribute("onclick", "ShowChinaCollegeList(" + RMenus[i].MenuId + ")");
liM.setAttribute("onclick", "ShowChinaCollegeList(" + RMenus[i].MenuId + ")");
}
else if (RMenus[i].MenuTypeId == 44) {
// 国家重点实验室类栏目
liS.setAttribute("onclick", "ShowKeyLabList(" + RMenus[i].MenuId + ")");
liM.setAttribute("onclick", "ShowKeyLabList(" + RMenus[i].MenuId + ")");
}
else if (RMenus[i].MenuTypeId == 45) {
// 常用科学数据库类栏目
liS.setAttribute("onclick", "ShowConceptList(" + RMenus[i].MenuId + ")");
liM.setAttribute("onclick", "ShowConceptList(" + RMenus[i].MenuId + ")");
}
else if (RMenus[i].MenuTypeId == 54) {
// 世界科技名人录类栏目
liS.setAttribute("onclick", "ShowFamousList(" + RMenus[i].MenuId + ")");
liM.setAttribute("onclick", "ShowFamousList(" + RMenus[i].MenuId + ")");
}
else if (RMenus[i].MenuId == 235) {
// 中国科技通讯类栏目
liS.setAttribute("onclick", "ShowMagazineList(" + RMenus[i].MenuId + ")");
liM.setAttribute("onclick", "ShowMagazineList(" + RMenus[i].MenuId + ")");
}
var space = "";
for (var j = 0; j < RMenus[i].MenuLevel; j++) {
space += " ";
}
// 外部链接直接跳转
if (RMenus[i].MenuUrl.indexOf("http://") >= 0) {
liS.innerHTML = "" + space + RMenus[i].MenuName + "";
liM.innerHTML = "" + space + RMenus[i].MenuName + "";
}
else {
liS.innerHTML = "" + RMenus[i].MenuName + "";
liM.innerHTML = "" + space + RMenus[i].MenuName + "";
}
var parentSli = document.getElementById("leftS" + RMenus[i].ParentMenuId); //第一个ul li
var parentMli = document.getElementById("leftM" + RMenus[i].ParentMenuId);
if (parentSli != null) {
// 找到父菜单
var ul = document.createElement("ul");
ul.setAttribute("class", "uk-nav-sub");
ul.appendChild(liS);
parentSli.setAttribute("class", "uk-parent")
// LeftMenuSmall.lastChild.appendChild(ul);
parentSli.appendChild(ul);
}
else {
// 未找到父菜单
// LeftMenuSmall.appendChild(liS);
}
if (parentMli != null) {
//alert(parentMli)第二个ul li
// 找到父菜单
var ul = document.createElement("ul");
ul.setAttribute("class", "uk-nav-sub");
ul.appendChild(liM);
// var leftMli = document.getElementById("leftM" + RMenus[i].ParentMenuId);
parentMli.setAttribute("class", "uk-parent");
// LeftMenuMedium.lastChild.appendChild(ul);
parentMli.appendChild(ul);
}
else {
// 未找到父菜单,且是网站二级栏目:一级栏目Level为0,二级栏目Level为1.
if (RMenus[i].MenuLevel < 2) {
LeftMenuMedium.appendChild(liM);
}
}
}
}
// Uptd.appendChild(li);
});
}
// 合作网处室职能
function getDicMenuList(menuid, insertPanelID) {
// 首先验证其是否为空,然后验证其是否为数字
if (menuid == "" || !isInteger(menuid)) {
return;
}
$.getJSON('handlers/cistcDicMenuInfo.ashx', { 'menuid': menuid }, function (pageData) {
var RInfoList = pageData.CistcInfolist;
var RMenuList = pageData.CistcMenulist;
var Uptd = document.getElementById(insertPanelID);
if (Uptd == null)
return;
for (var i = 0; i < RMenuList.length; i++) {
// 创建div及其样式
var div = document.createElement("li");
div.setAttribute("class", "uk-width-large-1-2 uk-width-small-1-1 uk-panel");
var divMenu = document.createElement("div");
var ul = document.createElement("h3");
var p = document.createElement("p");
var hr = document.createElement("hr");
// 菜单赋值
divMenu.setAttribute("class", "uk-panel uk-panel-header uk-panel-hover");
// divMenu.innerHTML = "" + RMenuList[i].MenuName + "";
ul.setAttribute("class", "uk-panel-menu-title");
ul.innerHTML = "" + RMenuList[i].MenuName + "";
// 内容赋值
p.innerHTML = RInfoList[i].InfoContent;
// ul.innerHTML = RInfoList[i].InfoContent;
hr.setAttribute("class", "uk-article-divider");
divMenu.appendChild(ul);
divMenu.appendChild(p);
div.appendChild(divMenu);
// div.appendChild(hr);
Uptd.appendChild(div);
}
});
}
//合作司首页机构设置
function getDicOrg(menuid, insertPanelID) {
// 首先验证其是否为空,然后验证其是否为数字
if (menuid == "" || !isInteger(menuid)) {
return;
}
$.getJSON('handlers/cistcDicMenuInfo.ashx', { 'menuid': menuid }, function (pageData) {
var RInfoList = pageData.CistcInfolist;
var RMenuList = pageData.CistcMenulist;
var Uptd = document.getElementById(insertPanelID);
var imgdizhi;
if (Uptd == null)
return;
var divvvvv = document.createElement("div");
divvvvv.setAttribute("class", " uk-grid uk-container-center");
var divss = document.createElement("ul");
divss.setAttribute("class", "uk-container-center uk-width-medium-1-2");
divvvvv.appendChild(divss);
Uptd.appendChild(divvvvv);
//合作司
// var ula = document.createElement("ula");
var div1 = document.createElement("div");
div1.setAttribute("class", " uk-grid uk-container-center");
var divx = document.createElement("ul");
divx.setAttribute("class", "uk-container-center uk-width-medium-1-2");
var figure1 = document.createElement("figure");
figure1.setAttribute("class", "uk-overlay");
var img1 = document.createElement("img");
img1.setAttribute("src", "images/hezuosi.png");
figure1.appendChild(img1);
divx.appendChild(figure1);
div1.appendChild(divx);
//ula.appendChild(div1)
Uptd.appendChild(div1);
//综合计划处......
var div = document.createElement("div");
div.setAttribute("class", "uk-grid uk-container-center");
for (var i = 0; i < RMenuList.length; i++) {
if (i == 0) {
imgdizhi = "images/zongheyujihua.png";
}
if (i == 1) {
imgdizhi = "images/guojizuzhi.png";
}
if (i == 2) {
imgdizhi = "images/meida.png";
}
if (i == 3) {
imgdizhi = "images/yafei.png";
}
if (i == 4) {
imgdizhi = "images/ouzhou.png";
}
if (i == 5) {
imgdizhi = "images/zhengceyanjiu.png";
}
if (i == 6) {
imgdizhi = "images/ouya.png";
}
if (i == 1 || i == 3 || i == 5) {
var div6 = document.createElement("div");
// div4.setAttribute("class", " uk-width-medium-1-2 uk-container-center uk-width-small-1-1");
div6.setAttribute("class", "uk-width-medium-1-2 uk-width-small-1-1");
var div7 = document.createElement("div");
var figure = figure + i;
figure = document.createElement("figure");
figure.setAttribute("class", "uk-overlay");
var a = a + i;
// a = document.createElement("a");
p = document.createElement("p");
p.setAttribute("class", "uk-thumbnail");
//a.setAttribute("class", "uk-thumbnail");
// a.setAttribute("href", RMenuList[i].MenuUrl);
//a.setAttribute("href", "javascript:void(0)");
//a.setAttribute("target", "_blank");
var img = img + i;
img = document.createElement("img");
img.setAttribute("src", imgdizhi);
p.appendChild(img)
figure.appendChild(p);
div7.appendChild(figure);
//div.appendChild(ul);
div6.appendChild(div7);
div.appendChild(div6);
// var ulx = document.createElement("ul");
// div.appendChild(ulx);
//Uptd.appendChild(div4);
}
else {
var div6 = document.createElement("div");
// div4.setAttribute("class", " uk-width-medium-1-2 uk-container-center uk-width-small-1-1");
div6.setAttribute("class", "uk-width-medium-1-2 uk-width-small-1-1");
var div7 = document.createElement("div");
var figure = figure + i;
figure = document.createElement("figure");
figure.setAttribute("class", "uk-overlay");
var a = a + i;
// a = document.createElement("a");
p = document.createElement("p");
p.setAttribute("class", "uk-thumbnail");
// a.setAttribute("class", "uk-thumbnail");
// a.setAttribute("href", RMenuList[i].MenuUrl);
//a.setAttribute("href", "javascript:void(0)");
//a.setAttribute("target", "_blank");
var img = img + i;
img = document.createElement("img");
img.setAttribute("src", imgdizhi);
p.appendChild(img)
figure.appendChild(p);
div7.appendChild(figure);
//div.appendChild(ul);
div6.appendChild(div7);
div.appendChild(div6);
//Uptd.appendChild(div4);
}
}
Uptd.appendChild(div);
//港澳台
var divy = document.createElement("div");
divy.setAttribute("class", " uk-grid uk-container-center");
var divs = document.createElement("ul");
divs.setAttribute("class", "uk-container-center uk-width-medium-1-2");
var figurex = document.createElement("figure");
figurex.setAttribute("class", "uk-overlay");
var px = document.createElement("p");
px.setAttribute("class", "uk-thumbnail");
// var ax = document.createElement("a");
// ax.setAttribute("class", "uk-thumbnail");
// ax.setAttribute("href", "dic_frame.html?column=706");
// ax.setAttribute("target", "_blank");
var imgx = document.createElement("img");
imgx.setAttribute("src", "images/gangaotai.png");
px.appendChild(imgx);
figurex.appendChild(px);
divs.appendChild(figurex);
divy.appendChild(divs);
Uptd.appendChild(divy);
var divvvvv = document.createElement("div");
divvvvv.setAttribute("class", " uk-grid uk-container-center");
var divss = document.createElement("ul");
divss.setAttribute("class", "uk-container-center uk-width-medium-1-2");
divvvvv.appendChild(divss);
Uptd.appendChild(divvvvv);
});
}
//获取处室职能
function getDicAssemblyAct(menuid, insertPanelID) {
// 首先验证其是否为空,然后验证其是否为数字
// if (menuid == "" || !isInteger(menuid)) {
// return;
// }
$.getJSON('handlers/cistcDicASSemblyAct.ashx', { 'menuid': menuid }, function (pageData) {
var RInfoList = pageData.CistcInfolist;
var RMenuList = pageData.CistcMenulist;
var Uptd = document.getElementById(insertPanelID);
if (Uptd == null)
return;
for (var i = 0; i < RMenuList.length; i++) {
// 创建div及其样式
var div = document.createElement("div");
var divMenu = document.createElement("div");
var ul = document.createElement("ul");
var hr = document.createElement("hr");
// 菜单赋值
divMenu.setAttribute("class", "uk-panel uk-panel-title");
//divMenu.innerHTML = "" + RMenuList[i].MenuName + "";
divMenu.innerHTML = RMenuList[i].MenuName;
// 内容赋值
ul.setAttribute("class", "uk-panel");
ul.innerHTML = RInfoList[i].InfoContent;
hr.setAttribute("class", "uk-article-divider");
div.appendChild(divMenu);
div.appendChild(ul);
div.appendChild(hr);
Uptd.appendChild(div);
}
});
}
//信息栏目中获取信息及图片合作司领导
function getLeaderArray(columnid, state, classid, insertPanelID) {
// 首先验证其是否为空,然后验证其是否为数字
if (!isInteger(columnid)) {
return;
}
if (!isInteger(state)) {
return;
}
$.getJSON('handlers/CistcDicLeader.ashx', { 'columnid': columnid, 'state': state, 'classid': classid }, function (pageData) {
var RLeader = pageData.CistcLeaderList;
for (var i = 0; i < RLeader.length; i++) {
var Uptd = document.getElementById(insertPanelID + i);
if (Uptd != null) {
// 创建a及其样式
var a = document.createElement("a");
a.setAttribute("class", "uk-thumbnail");
a.setAttribute("href", RLeader[i].Url);
a.setAttribute("target", "_blank");
var img = document.createElement("img");
img.setAttribute("src", RLeader[i].Picture);
img.setAttribute("style", "max-height:110px; max-width:84px");
a.appendChild(img);
var div = document.createElement("div");
div.setAttribute("class", "uk-thumbnail-caption");
div.innerHTML = RLeader[i].Positionname + ":" + RLeader[i].Name;
a.appendChild(div);
Uptd.appendChild(a);
}
}
});
}
//合作司领导介绍
function getLeaderArrays(columnid, state, classid, insertPanelID) {
// 首先验证其是否为空,然后验证其是否为数字
if (!isInteger(columnid)) {
return;
}
if (!isInteger(state)) {
return;
}
$.getJSON('handlers/CistcDicLeader.ashx', { 'columnid': columnid, 'state': state, 'classid': classid }, function (pageData) {
var RLeaders = pageData.CistcLeaderList;
for (var i = 0; i < RLeaders.length; i++) {
var Uptd = document.getElementById(insertPanelID);
if (Uptd != null) {
// 创建a及其样式
var div = document.createElement("div");
div.setAttribute("class", "uk-grid uk-container-center data-uk-grid-margin uk-width-medium-1-5");
var a = document.createElement("a");
a.setAttribute("class", "uk-thumbnail");
a.setAttribute("href", RLeaders[i].Url);
a.setAttribute("target", "_blank");
var img = document.createElement("img");
img.setAttribute("src", RLeaders[i].Picture);
img.setAttribute("style", "max-height:110px; max-width:84px");
a.appendChild(img);
var div4 = document.createElement("div");
div4.setAttribute("class", "uk-thumbnail-caption");
div4.innerHTML = RLeaders[i].Positionname + ":" + RLeaders[i].Name;
a.appendChild(div4);
div.appendChild(a);
Uptd.appendChild(div);
}
}
});
}
//合作司副领导
function getLeaderArrays2(columnid, state, classid, insertPanelID) {
// 首先验证其是否为空,然后验证其是否为数字
if (!isInteger(columnid)) {
return;
}
if (!isInteger(state)) {
return;
}
$.getJSON('handlers/CistcDicLeader.ashx', { 'columnid': columnid, 'state': state, 'classid': classid }, function (pageData) {
var RLeaders = pageData.CistcLeaderList;
var div = document.createElement("div");
// div.setAttribute("class", "uk-grid uk-container-center data-uk-grid-margin");
div.setAttribute("class", "uk-grid uk-container-center");
for (var i = 0; i < RLeaders.length; i++) {
var Uptd = document.getElementById(insertPanelID);
if (Uptd != null) {
var diva = document.createElement("div");
diva.setAttribute("class", "uk-width-medium-1-3 uk-container-center");
//设置一行几个样式
var a = document.createElement("a");
a.setAttribute("class", "uk-thumbnail");
a.setAttribute("href", RLeaders[i].Url);
a.setAttribute("target", "_blank");
var img = document.createElement("img");
img.setAttribute("src", RLeaders[i].Picture);
img.setAttribute("style", "max-height:110px; max-width:84px");
a.appendChild(img);
var div4 = document.createElement("div");
div4.setAttribute("class", "uk-thumbnail-caption");
div4.innerHTML = RLeaders[i].Positionname + ":" + RLeaders[i].Name;
a.appendChild(div4);
diva.appendChild(a);
div.appendChild(diva);
Uptd.appendChild(div);
}
}
});
}
// 查看合作司相关部门信息
function getRelationDepartment(menuid, insertPanelID) {
// 首先验证其是否为空,然后验证其是否为数字
if (menuid == "" || !isInteger(menuid)) {
return;
}
$.getJSON('handlers/cistcDicRelationDepartment.ashx', { 'menuid': menuid }, function (pageData) {
var RMenus = pageData.menus;
var Uptd = document.getElementById(insertPanelID);
if (Uptd == null)
return;
// 构造信息列表
for (var i = 0; i < RMenus.length; i++) {
// 创建li及其样式
var li = document.createElement("li");
// li.setAttribute("class", "uk-active");
li.innerHTML = "" + RMenus[i].MenuName + "";
Uptd.appendChild(li);
}
});
}
//合作司机构设置
function getinstitution(menuid, insertPanelID) {
// 首先验证其是否为空,然后验证其是否为数字
if (menuid == "" || !isInteger(menuid)) {
return;
}
$.getJSON('handlers/cistcDicLeftMenuList.ashx', { 'menuid': menuid }, function (pageData) {
var RMenus = pageData.menus;
var Uptd = document.getElementById(insertPanelID);
if (Uptd == null)
return;
// 构造信息列表
for (var i = 0; i < RMenus.length; i++) {
var div1 = document.createElement("div");
div1.setAttribute("class", "uk-width-medium-2-4 uk-width-small-1-1 uk-container-center");
var ul = document.createElement("ul");
ul.setAttribute("class", "uk-width-medium-1-1 uk-width-small-1-1");
var figure = document.createElement("figure");
figure.setAttribute("class", "uk-overlay");
var img = document.createElement("img");
img.setAttribute("src", "images/jigoushezhi3.png");
figure.appendChild(img);
var figcaption = document.createElement("figcaption");
figcaption.setAttribute("class", "uk-overlay-panel uk-flex uk-flex-center uk-flex-middle uk-text-center uk-text-primary");
var div = document.createElement("div");
var p = document.createElement("p");
// p.innerHTML = "" + RMenus[i].MenuName + "";
p.innerHTML = RMenus[i].MenuName;
div.appendChild(p);
figcaption.appendChild(div);
figure.appendChild(figcaption);
ul.appendChild(figure);
div1.appendChild(ul);
Uptd.appendChild(div1);
}
});
}
//获取合作司负领导名字
function getLeaderNameArray(columnid, state, classid,id, insertPanelID) {
// 首先验证其是否为空,然后验证其是否为数字
if (!isInteger(columnid)) {
return;
}
if (!isInteger(state)) {
return;
}
var Uptd = document.getElementById(insertPanelID);
if (Uptd == null)
return;
$.getJSON('handlers/CistcDicLeaderNameArray.ashx', { 'columnid': columnid, 'state': state, 'classid': classid, 'id': id }, function (pageData) {
var RLeader = pageData.CistcLeaderList;
for (var i = 0; i < RLeader.length; i++) {
// 创建p及其样式
var li = document.createElement("li");
if (RLeader[i].Isnull == 1) {
li.setAttribute("class", "uk-active");
}
var href = document.createElement("a");
href.setAttribute("href", "#");
href.innerHTML = RLeader[i].Name;
var clickFun = "ShowLeader2(347," + RLeader[i].Id + ");";
href.setAttribute("onclick", clickFun);
li.appendChild(href);
Uptd.appendChild(li);
}
});
}
//dic_frame.html页面获取司长信息
function getLeaderArray1(columnid, state, classid, insertPanelID) {
// 首先验证其是否为空,然后验证其是否为数字
if (!isInteger(columnid)) {
return;
}
if (!isInteger(state)) {
return;
}
//领导名字
var LeaderName;
//领导是否有信息0;有1;没有
var isnull;
// //信息个数7条
// var messagecount = 0;
// var excount = 0;
$.getJSON('handlers/CistcDicLeader.ashx', { 'columnid': columnid, 'state': state, 'classid': classid }, function (pageData) {
var RLeader = pageData.CistcLeaderList;
var RLeaderInfo = pageData.CistcInfoList;
var Uptd = document.getElementById(insertPanelID);
for (var i = 0; i < RLeader.length; i++) {
if (Uptd != null) {
// 创建p及其样式
var li = document.createElement("h4");
li.setAttribute("class", "uk-active");
var clickFun = "" + RLeader[i].Name + "";
li.setAttribute("onclick", clickFun);
li.innerHTML = RLeader[i].Name;
Uptd.appendChild(li);
LeaderName = RLeader[i].Name;
isnull = RLeader[i].Isnull;
//标题
// var article = document.createElement("article");
// article.setAttribute("class", "uk-article");
// var h1 = document.createElement("p");
// h1.setAttribute("class", "uk-article-meta");
// h1.innerHTML = RLeader[i].Positionname + ":" + RLeader[i].Name;
// article.appendChild(h1);
// Uptd.appendChild(article);
//简介
var p = document.createElement("p");
p.setAttribute("class", "uk-clearfix");
p.innerHTML = RLeader[i].Notes;
//相片
var img = document.createElement("img");
img.setAttribute("class", "uk-align-medium-right");
img.setAttribute("style", "max-height:160px; max-width:120px")
img.setAttribute("src", RLeader[i].Picture);
var hr = document.createElement("hr");
hr.setAttribute("class", "uk-article-divider")
Uptd.appendChild(img);
Uptd.appendChild(p);
Uptd.appendChild(hr);
//合作司领导相关链接
var liInfo = document.createElement("h4");
liInfo.setAttribute("class", "uk-active");
liInfo.innerHTML = "" + RLeader[i].Positionname + "相关链接";
Uptd.appendChild(liInfo);
if (isnull == 0) {
if (i == 0) {
for (var j = 0; j < RLeaderInfo.length; j++) {
if (j == 7)
break;
var lis = document.createElement("li");
lis.innerHTML = "" + RLeaderInfo[j].InfoTitle + "";
Uptd.appendChild(lis);
}
var hrs = document.createElement("hr");
hrs.setAttribute("class", "uk-article-divider")
Uptd.appendChild(hrs);
}
if (i == 1) {
for (var j = 7; j < RLeaderInfo.length; j++) {
if (j == 14)
break;
var lis = document.createElement("li");
lis.innerHTML = "" + RLeaderInfo[j].InfoTitle + "";
Uptd.appendChild(lis);
}
var hrs = document.createElement("hr");
hrs.setAttribute("class", "uk-article-divider")
Uptd.appendChild(hrs);
}
if (i == 2) {
for (var j = 14; j < RLeaderInfo.length; j++) {
if (j == 21)
break;
var lis = document.createElement("li");
lis.innerHTML = "" + RLeaderInfo[j].InfoTitle + "";
Uptd.appendChild(lis);
}
var hrs = document.createElement("hr");
hrs.setAttribute("class", "uk-article-divider")
Uptd.appendChild(hrs);
}
}
if (isnull == 1) {
var hrs = document.createElement("hr");
hrs.setAttribute("class", "uk-article-divider")
Uptd.appendChild(hrs);
}
}
}
});
//return LeaderName;
}
//单独合作司领导信息
function getAloneLeader(columnid, state, classid,id, insertPanelID) {
// 首先验证其是否为空,然后验证其是否为数字
if (!isInteger(columnid)) {
return;
}
if (!isInteger(state)) {
return;
}
//领导名字
var LeaderName;
//领导是否有信息0;有1;没有
var isnull;
// //信息个数7条
// var messagecount = 0;
// var excount = 0;
$.getJSON('handlers/CistcDicAloneLeader.ashx', { 'columnid': columnid, 'state': state, 'classid': classid, 'id': id }, function (pageData) {
var RLeader = pageData.CistcLeaderList;
var RLeaderInfo = pageData.CistcInfoList;
var Uptd = document.getElementById(insertPanelID);
for (var i = 0; i < RLeader.length; i++) {
if (Uptd != null) {
// 创建p及其样式
var li = document.createElement("h4");
li.setAttribute("class", "uk-active");
var clickFun = "" + RLeader[i].Name + "";
li.setAttribute("onclick", clickFun);
li.innerHTML = RLeader[i].Name;
Uptd.appendChild(li);
LeaderName = RLeader[i].Name;
isnull = RLeader[i].Isnull;
//标题
// var article = document.createElement("article");
// article.setAttribute("class", "uk-article");
// var h1 = document.createElement("p");
// h1.setAttribute("class", "uk-article-meta");
// h1.innerHTML = RLeader[i].Positionname + ":" + RLeader[i].Name;
// article.appendChild(h1);
// Uptd.appendChild(article);
//简介
var p = document.createElement("p");
p.setAttribute("class", "uk-clearfix");
p.innerHTML = RLeader[i].Notes;
//相片
var img = document.createElement("img");
img.setAttribute("class", "uk-align-medium-right");
img.setAttribute("style", "max-height:160px; max-width:120px")
img.setAttribute("src", RLeader[i].Picture);
var hr = document.createElement("hr");
hr.setAttribute("class", "uk-article-divider")
Uptd.appendChild(img);
Uptd.appendChild(p);
Uptd.appendChild(hr);
//合作司领导相关链接
var liInfo = document.createElement("h4");
liInfo.setAttribute("class", "uk-active");
liInfo.innerHTML = "" + RLeader[i].Positionname + "相关链接";
Uptd.appendChild(liInfo);
for (var j = 0; j < RLeaderInfo.length; j++) {
if (j == 7)
break;
var lis = document.createElement("li");
lis.innerHTML = "" + RLeaderInfo[j].InfoTitle + "";
Uptd.appendChild(lis);
}
var hrs = document.createElement("hr");
hrs.setAttribute("class", "uk-article-divider")
Uptd.appendChild(hrs);
}
}
});
//return LeaderName;
}
// 获取指定栏目ID前N条信息列表
function getTopNInfoByMenuID(columnid, topN, insertPanelID, showDate) {
// 首先验证其是否为空,然后验证其是否为数字
if (!isInteger(columnid)) {
return;
}
if (!isInteger(topN)) {
return;
}
if (!isInteger(showDate)) {
return;
}
$.getJSON('handlers/cistcMenuInfoList.ashx', { 'columnid': columnid, 'topN': topN }, function (pageData) {
//alert(insertPanelID);
var RMenuInfoList = pageData.infolist;
var Uptd = document.getElementById(insertPanelID);
// 构造信息列表
for (var i = 0; i < RMenuInfoList.length; i++) {
// 创建li及其样式
var li = document.createElement("li");
// li.setAttribute("class", "uk-active");
if (showDate == "1")
li.innerHTML = "" + RMenuInfoList[i].InfoTitle + " (" + RMenuInfoList[i].InfoPublicDate + ")";
else
li.innerHTML = "" + RMenuInfoList[i].InfoTitle + "";
Uptd.appendChild(li);
}
});
}
//获取合作司第一个栏目第一条信息
function getTopNInfoIconByMenuID(columnid, topN, insertPanelID) {
// 首先验证其是否为空,然后验证其是否为数字
if (columnid == "" || !isInteger(columnid)) {
return;
}
if (topN == "" || !isInteger(topN)) {
return;
}
$.getJSON('handlers/cistcDicInfoList.ashx', { 'columnid': columnid, 'topN': topN }, function (pageData) {
var RMenuInfoList = pageData.infolist;
//var Content = document.getElementById(columnid + "content");
for (var i = 0; i < RMenuInfoList.length; i++) {
var Uptd = document.getElementById(insertPanelID);
if (Uptd != null) {
// 创建div及其样式
// 插入内容
var p = document.createElement("p");
p.setAttribute("class", "uk-text");
p.innerHTML = RMenuInfoList[i].InfoContent;
Uptd.appendChild(p);
}
}
});
}
//联系方法
function getTopNInfoIconByMenuID1(columnid, topN, insertPanelID) {
// 首先验证其是否为空,然后验证其是否为数字
if (columnid == "" || !isInteger(columnid)) {
return;
}
if (topN == "" || !isInteger(topN)) {
return;
}
$.getJSON('handlers/cistcDicInfoList.ashx', { 'columnid': columnid, 'topN': topN }, function (pageData) {
var RMenuInfoList = pageData.infolist;
//var Content = document.getElementById(columnid + "content");
for (var i = 0; i < RMenuInfoList.length; i++) {
var Uptd = document.getElementById(insertPanelID);
if (Uptd != null) {
// 创建div及其样式
var div = document.createElement("div");
div.setAttribute("class", "uk-width-medium-2-6 uk-container-center");
// 插入内容
var p = document.createElement("p");
p.setAttribute("class", "uk-text");
p.innerHTML = RMenuInfoList[i].InfoContent;
div.appendChild(p);
Uptd.appendChild(div);
}
}
});
}
//提取合作司下的栏目
function getTopMenuList4(menuid) {
// 首先验证其是否为空,然后验证其是否为数字
if (menuid == "") {
return;
}
$.getJSON('handlers/cistcMenu.ashx', { 'menuid': menuid }, function (pageData) {
var RMenus = pageData.menus;
var Uptd = document.getElementById("columnkeji");
for (var i = 0; i < RMenus.length; i++) {
// 创建li及其样式
var li = document.createElement("li");
// li.setAttribute("class", "uk-active");
li.innerHTML = "" + RMenus[i].MenuName + "";
Uptd.appendChild(li);
}
});
}
// 地方科技外事主管部门详细信息
// function getDicLocalInfoDetailByID(infoid, insertDetailID, insertTitleID, insertAddress, insertCode, insertSection, insertFax, insertWeb) {
function getDicLocalInfoDetailByID(infoid, insertDetailID, insertTitleID, column) {
// 首先验证其是否为空,然后验证其是否为数字
if (!isInteger(infoid)) {
return;
}
$.getJSON('handlers/cistcDicLocalInfo.ashx', { 'infoid': infoid, 'column': column }, function (pageData) {
//alert(insertDetailID);
var RInfoDetail = pageData.infolist;
var Title = document.getElementById(infoid + "Title");
var Uptd = document.getElementById(insertDetailID);
if (insertTitleID != "")
Title = document.getElementById(insertTitleID);
for (var i = 0; i < RInfoDetail.length; i++) {
if (i == 0) {
if (RInfoDetail[i].Districtname != null && Title != null) {
//
var p = document.createElement("p");
// p.setAttribute("class", "uk-text");
p.innerHTML = RInfoDetail[i].Districtname;
Title.appendChild(p);
}
}
var div = document.createElement("div");
div.setAttribute("class", "uk-width-medium-2-5 uk-container-center");
var ulv = document.createElement("ul");
// uls.setAttribute("class", "uk-text-center");
ulv.innerHTML = RInfoDetail[i].Localname;
div.appendChild(ulv);
var uls = document.createElement("ul");
// uls.setAttribute("class", "uk-text-center");
uls.innerHTML = "地 址:" + RInfoDetail[i].Localaddress;
div.appendChild(uls);
var ula = document.createElement("ul");
// ula.setAttribute("class", "uk-text-center");
ula.innerHTML = "邮 编:" + RInfoDetail[i].Localcode;
div.appendChild(ula);
var ulb = document.createElement("ul");
// ulb.setAttribute("class", "uk-text-center");
ulb.innerHTML = "长途区号:" + RInfoDetail[i].Localsection;
div.appendChild(ulb);
var ulc = document.createElement("ul");
// ulc.setAttribute("class", "uk-text-center");
ulc.innerHTML = "传 真:" + RInfoDetail[i].Localfax;
div.appendChild(ulc);
var uld = document.createElement("ul");
// uld.setAttribute("class", "uk-text-center");
uld.innerHTML = "网 址:" + "" + RInfoDetail[i].Localwebaddress + "";
div.appendChild(uld);
var hr = document.createElement("hr");
hr.setAttribute("class", "uk-article-divider")
// div.appendChild(hr);
Uptd.appendChild(div);
Uptd.appendChild(hr);
}
});
}
// 获取合作司领导相关链接
function getPageInfoListByLeaderInfo(columnid, insertPanelID, showDate, keyword, pagenum, pagesize) {
// 首先验证其是否为空,然后验证其是否为数字
if (columnid=="") {
return;
}
if (!isInteger(pagenum)) {
return;
}
if (!isInteger(pagesize)) {
return;
}
if (!isInteger(showDate)) {
return;
}
if (pagenum == "")
pagenum = GetQueryString("pagenum");
if (!isInteger(parseInt(pagenum))) {
return;
}
if (keyword == "")
keyword = GetQueryStringunescape("keyword");
$.getJSON('handlers/cistcDicLeaderInfoList.ashx', { 'columnid': columnid, 'isall': 1, 'keyword': keyword, 'pagenum': pagenum }, function (pageData) {
//alert(insertPanelID);
var RMenuInfoList = pageData.infolist;
var Uptd = document.getElementById(insertPanelID);
// 构造信息列表
for (var i = 0; i < RMenuInfoList.length; i++) {
// 创建li及其样式
var li = document.createElement("li");
if (showDate == "1")
li.innerHTML = "" + RMenuInfoList[i].InfoTitle + " (" + RMenuInfoList[i].InfoPublicDate + ")";
else
li.innerHTML = "" + RMenuInfoList[i].InfoTitle + "";
Uptd.appendChild(li);
}
// 处理翻页开始
var ul = document.createElement("ul");
ul.setAttribute("class", "uk-pagination uk-pagination-left");
var currentpage = parseInt(pageData.Pagenum);
var startpage = 1;
if (currentpage > 10) {
startpage = currentpage - 8;
var li = document.createElement("li");
li.setAttribute("class", "");
li.innerHTML = "" + 1 + "";
ul.appendChild(li)
var lieto = document.createElement("li");
lieto.innerHTML = "...";
ul.appendChild(lieto)
}
var endpage = parseInt(pageData.Maxpage);
if (currentpage < parseInt(pageData.Maxpage) - 8) {
endpage = currentpage + 6;
endpage = startpage > (startpage + 12) ? startpage : (startpage + 12);
endpage = endpage > parseInt(pageData.Maxpage) ? parseInt(pageData.Maxpage) : endpage;
}
for (var i = startpage; i <= endpage; i++) {
var li = document.createElement("li");
if (parseInt(pageData.Pagenum) == i) {
li.setAttribute("class", "uk-active");
li.innerHTML = "" + i + "";
}
else {
li.setAttribute("class", "");
li.innerHTML = "" + i + "";
}
ul.appendChild(li);
}
if (endpage < parseInt(pageData.Maxpage) - 1) {
var lieto = document.createElement("li");
lieto.innerHTML = "...";
ul.appendChild(lieto)
var li = document.createElement("li");
li.setAttribute("class", "");
li.innerHTML = "" + pageData.Maxpage + "";
ul.appendChild(li)
}
Uptd.appendChild(ul);
// 翻页处理完成
});
}
//合作司地方科技外事主管部门获取(直辖市自治区省)
function getAllDistrict(columnid,num, insertPanelID) {
// 首先验证其是否为空,然后验证其是否为数字
// if (menuid == "") {
// return;
// }
$.getJSON('handlers/cistcDistrictInfoList.ashx', { 'columnid': columnid, 'num': num }, function (pageData) {
//城市信息
var RInfoList = pageData.CistcInfolist;
//直辖市信息
var RMenuList = pageData.CistcMenulist;
var Uptd = document.getElementById(insertPanelID);
for (var i = 0; i < RMenuList.length; i++) {
// 创建li及其样式直辖市
var lis;
var li = document.createElement("li");
//赋值直辖市
li.innerHTML = RMenuList[i].MenuName;
//页面添加
Uptd.appendChild(li);
//创建空行
var uls = document.createElement("ul");
//添加空行
Uptd.appendChild(uls);
//创建城市
var ul = document.createElement("ul");
//设置一行几个样式
ul.setAttribute("class", "uk-grid uk-grid-width-1-6 data-uk-sortable")
for (var j = 0; j < RInfoList.length; j++) {
//直辖市类型id=城市类型id
if (RMenuList[i].MenuId.toString() == RInfoList[j].InfoMenu.toString()) {
lis = lis + j.toString();
lis = document.createElement("li");
//添加内容
lis.innerHTML = "" + RInfoList[j].InfoTitle + "";
ul.appendChild(lis);
}
}
//添加城市信息
Uptd.appendChild(ul);
//创建分割线
var hr = document.createElement("hr");
hr.setAttribute("class", "uk-article-divider");
//添加分割线
Uptd.appendChild(hr);
}
});
}
// 判断输入是否为正整数
function isInteger(obj) {
return Math.floor(obj) === obj
}
// 获取url中已经被转义成url编码的汉字字符串的参数值
function GetQueryStringunescape(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg);
if (r != null) return r[2]; return null;
}