⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 left.jsp

📁 电信的网厅的整站代码
💻 JSP
📖 第 1 页 / 共 2 页
字号:
		            catch(ex){alert(ex.description);}
            	}
            }
        }
        
        function fn_ShowPanel(id) {
        	if ( self.parent == self ) return false;

            // 如果是IE,使用Popup的方式在窗口中显示出主菜单,否则报错或濅将代码插入到右帧中使用Div方式显示。
            // 注意:这种方式必须要能够自动隐藏。
            // 如果存在多个菜单项,则左边的小工具条不隐藏;否则自动隐藏。
            var pel = parent.document.all.tags("frameset");
            for ( i=0; i< pel.length; i++) {
                if ( pel(i).name == "center") {
                    pel(i).cols = "200,*";
                }
            }
            
            if ( menuTool.parentElement.childNodes.length == 1 ) {
	            menuTool.parentElement.style.display = "none";
	            menuPanel.parentElement.style.display="block";
	            menuList.style.display = "block";
	            menuList.parentElement.style.width = 200;

	            selectedMenuIndex(mainMenu,0);
            }
            else {
            	if ( id == null ) id = 'menuList';

	            menuTool.parentElement.style.display = "block";
	            menuPanel.parentElement.style.display ="block";
                
                menuTool.parentElement.style.width = 20;
            	menuList.parentElement.style.width = 178;
                
                // 修改所有菜单项的宽度。
                var menuItems = menuList.parentElement.childNodes;
                var toolItems = menuTool.parentElement.childNodes;

                for ( var i=0;i < menuItems.length;i++){
	            	if ( menuItems[i].id == id ) {
                        if ( menuItems[i].style.display == "block" ) return true;

	            		menuItems[i].style.display = "block";
	            		toolItems[i].style.backgroundColor = "#909090";
	            		
	            		// 显示相应的菜单项。
	            		var menuObj = mainMenu;
	            		if ( id != 'menuList' ) {
	            			menuObj = eval("self." + menuItems[i].menuId);
	            		}

						var selectItem = menuObj.selectedNode;

						if ( selectItem != null ) {
							if ( menuObj != mainMenu ) {
								var oSpan = selectItem.doc.children(0).rows(0).cells(2).children(0);
								oSpan.click();
							}
						}
						else {
							selectedMenuIndex(menuObj,0);
						}
	            	}
	            	else {
	            		menuItems[i].style.display = "none";
	            		toolItems[i].style.backgroundColor = "";
	            	}
	            }
            }
            
            return true;
        }
        
        function selectedMenuIndex(menuObj, index) {
        	var selectItem = menuObj.selectedNode;
            if ( selectItem == null && menuObj.menuNode != null && menuObj.menuNode.length > 0 ) {
            	var node = menuObj.menuNode[0];
            	node.selected();
            	menuObj.selectedNode = node;

				var oSpan = node.doc.children(0).rows(0).cells(2).children(0);
				oSpan.click();
            }
        }
        
        function fn_cityChange(that){
        	try {
        		var cityCode = null;
        		var cityName = null;
        		
        		// 取城市编号及名称。
        		if ( that.selectedIndex != -1 ) {
        			cityCode = that.options(that.selectedIndex).value;
        			cityName = that.options(that.selectedIndex).text;
        		}
        		else {
        			alert("城市为空。");
        		}
        		
	            // 重新加载菜单,如果该页面包含多个菜单项,则可以翚过idx加载指定顺序的菜单。
	            var xmlHttp = new XMLHttpClient("<%= request.getContextPath()%>/XmlHttpService");
	            xmlHttp.append("citycode",cityCode);
	            xmlHttp.append("cityname",cityName);
	            var str = xmlHttp.submitAsString("LoginService","setCurrentCity");

				var postElt = document.getElementById("postcode");

	            if ( str.substr(0,6) == new String("xml-->") ) {
	            	try {
						var xmlDoc = new ActiveXObject("Msxml.DOMDocument");
						xmlDoc.loadXML(str.substr(6));

						if (xmlDoc.parseError.errorCode != 0) {
							var myErr = xmlDoc.parseError;
							throw myErr;
						} else {
							while ( postElt.options.length > 0 ) {
								postElt.options.remove(0);
							}

							var root = xmlDoc.documentElement;
							var oList = root.selectNodes("//body");
							if ( oList.length != 1 ) throw "返回格式不正确。"
							
							var xmlStr = oList.item(i).text;
							xmlDoc.loadXML(xmlStr);
							
							oList = xmlDoc.documentElement.selectNodes("//ORGCITY");
							for ( var i=0; i<oList.length; i++ ) {
								var valueNode = oList.item(i).selectSingleNode("ORGANISEID");
								var textNode = oList.item(i).selectSingleNode("ORGANISENAME");
								
								if ( valueNode != null && textNode != null ) {
									var oOption = document.createElement("OPTION");
									oOption.text=textNode.text;
									oOption.value=valueNode.text;
									postElt.add(oOption);
								}
							}
						}

						// 关闭所有子菜单,重新加载主菜单。
			           	if ( menuTool.parentElement.childNodes.length > 1 ) {
			                var menuItems = menuList.parentElement.childNodes;
			                while ( menuItems.length > 1 ) {
			            		// 删除该菜单项。
			            		removeOtherMenu(menuItems[1].menuId);
				            }
			            }
			            
			            menuReload(0,1);
						showPostFullName();	
						if ( window.top.topLoadServiceCount != undefined ) {
							window.top.topLoadServiceCount();
						}	
					} catch(ex) {}
	            }
	            else {
	            	alert("设置失败。");
	            }
	        }
            catch(ex) {
            	return false;
            }
            
            return true;
        }
        
        function fn_postChange(that){
        	try {
        		var postid = null;
        		var postName = null
        		
        		// 取城市编号及名称。
        		if ( that.selectedIndex != -1 ) {
        			postid = that.options(that.selectedIndex).value;
        			postName = that.options(that.selectedIndex).text;
        		}
        		else {
        			alert("岗位为空。");
        		}
        		
	            // 重新加载菜单,如果该页面包含多个菜单项,则可以翚过idx加载指定顺序的菜单。
	            var xmlHttp = new XMLHttpClient("<%= request.getContextPath()%>/XmlHttpService");
	            xmlHttp.append("postid",postid);
	            var str = xmlHttp.submitAsString("LoginService","setCurrentPost");

	            if ( str == new String("str-->1") ) {
					// 关闭所有子菜单,重新加载主菜单。
		           	if ( menuTool.parentElement.childNodes.length > 1 ) {
		                var menuItems = menuList.parentElement.childNodes;
		                while ( menuItems.length > 1 ) {
		            		// 删除该菜单项。
		            		removeOtherMenu(menuItems[1].menuId);
			            }
		            }
		            
					showPostFullName();
		            menuReload(0,1);
					if ( window.top.topLoadServiceCount != undefined ) {
						window.top.topLoadServiceCount();
					}	
	            }
	            else {
	            	alert("设置失败。");
	            }
	        }
            catch(ex) {
            	return false;
            }
            
            return true;
        }
        
        function menuclick(opt, id, code, name, addparam) {
            if ( self.parent != self && opt != null && opt != "" ){
            	var sURL = ApplicationRootPath + opt;
            	if ( addparam ) {
            		sURL += "?pid=" + id;
            		sURL += "&code=" + code;
            	}
            	self.parent.main.location.replace(sURL);
            }
        }

		function showPostFullName() {
        	try {
	            // 重新加载菜单,如果该页面包含多个菜单项,则可以翚过idx加载指定顺序的菜单。
	            var xmlHttp = new XMLHttpClient("<%= request.getContextPath()%>/XmlHttpService");
	            var str = xmlHttp.submitAsString("LoginService","getPostFullName");

				var fullName = null;
	            if ( str == new String("str-->") ) {
					fullName = document.getElementById("postcode").options(that.selectedIndex).text
	            }
	            else {
	            	fullName = str.substr(6);
	            }

				self.parent.document.title = "网上客服管理系统--当前岗位:" + fullName;
	        }
            catch(ex) {
            	return false;
            }
            
            return true;
		}
		
		function refersh(){
			// 修改所有菜单项的宽度。
			var menuItems = menuList.parentElement.childNodes;

            for ( var i=0;i < menuItems.length;i++){
	          	if ( menuItems[i].style.display == "block" ) {
	          		if ( i==0 ) {
			            menuReload(0,1);
			        }
			        else {
			        	menuReload(i,-1);
			        }
			        
			        break;
	          	}
	        }
		}
		
		function go_home(){
			menuclick("/view/sysmgr/index.jsp");
			fn_ShowPanel();
		}
		
		function quit() {
			if (window.confirm("您确实要退出吗?"))
				menuclick("/view/login/logout.jsp");
		}
	-->
    </script>
	<script language="javascript" src="mainTool.js"></script>
</head>
<body style="margin: 0px; width: 100%; height: 100%;" onload="menuPanelInit();">
    <table border="0" cellpadding="0" cellspacing="0" class="menuBody">
        <tr>
            <td class="menuToolPanel" valign="top">
                <table id="menuTool" border="0" class="menuTool" cellpadding="0" cellspacing="0">
                    <tr class="menuLineBodyTR">
						<td valign="middle" align="center" onclick="fn_ShowPanel();" style="behavior:url(button.htc)" DefaultClass="btnDefault" OverClass="btnOver" DownClass="btnDown">主菜单</td>
                    </tr>
                </table>
            </td>
            <td valign="top">
                <table id="menuPanel" border="0" cellpadding="0" cellspacing="0" unselectable="on"
                    class="menuPanel">
                    <tr class="menuTitleTR">
                        <td align="center" width="90%">
                            <img src="images/pansol_logo.jpg" />欢迎您:<%= staffName%></td>
                        <td align="right" width="10%">
                            <table border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td valign="middle">
                                        <input type="image" src="images/snap.gif" style="cursor: hand" onclick="fn_snap();" /></td>
                                    <td style="width:4px">
                                    </td>
                                    <td valign="middle">
                                        <input type="image" src="images/exit.gif" style="cursor: hand" onclick="fn_exit();" /></td>
                                    <td style="width:4px">
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr class="menuLineBodyTR">
                        <td colspan="2" valign="middle">
                            当前地区:</td>
                    </tr>
                    <tr>
                    </tr>
                    <tr class="menuLineBodyTR">
                        <td colspan="2">
                            <select id="citycode" style="width: 100%;" onchange="fn_cityChange(this);"><%= citys.toString()%></select>
                        </td>
                    </tr>
                    <tr class="menuLineBodyTR">
                        <td colspan="2" valign="middle">
                            当前岗位:</td>
                    </tr>
                    <tr class="menuLineBodyTR">
                        <td colspan="2">
                            <select id="postcode" style="width: 100%;" onchange="fn_postChange(this);"><%= posts.toString()%></select>
                        </td>
                    </tr>
                    <tr class="menuLineBodyTR">
                    	<td colspan="2" align="right">
                  		<table cellspacing="0" cellpadding="0" border="0" width="90%">
                  			<tr>
                  				<td align="center" valign="middle" width="26px"><div style="behavior:url(button.htc)" 
										DefaultClass="menuLineBtn" 
										OverClass="btnOver" 
										DownClass="btnDown"
										style="width: 16px;"
										onclick="go_home();"><img src="images/home.gif" title="主页"/></div></td>
								<td align="center" valign="middle" width="26px"><div style="behavior:url(button.htc)" 
										DefaultClass="menuLineBtn" 
										OverClass="btnOver" 
										DownClass="btnDown"
										style="width: 16px;"
										onclick="refersh();"><img src="images/refresh.gif" title="刷新" /></div></td>
								<td valign="middle">&nbsp;</td>
								<td valign="middle" width="48px" nowrap>
									<div style="behavior:url(button.htc)" 
										DefaultClass="menuLineBtn" 
										OverClass="btnOver" 
										DownClass="btnDown"
										onclick="quit();"><img src="images/logoff.gif" border="0"/>退出</div></td>
                  			</tr>
                  		</table>
                    	</td>
                    </tr>
                </table>
                <div style="overflow: auto; width: 200px; height: 100%; border: inset 1px #DEDEDE">
                	<span id="menuList" class="menuList" ></span>
                </div>
            </td>
        </tr>
    </table>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -