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

📄 commonusermainwindow.js

📁 重点不是信息管理系统
💻 JS
字号:
function newMainWin() {
	var tbar = [{
		text : '已登记场所',
		handler :function(){
		 // Ext.Msg.alert("",1);
		  Ext.getCmp("resultPanel").getLayout().setActiveItem(0);
		  Ext.getCmp("searchPanel").getLayout().setActiveItem(0);
		},
		id:'locationReg',
		iconCls : 'locationReg'// 设置按钮图标,与common.css配合
	}, '-', {
		text : '未登记场所',
		iconCls : 'locationNoneReg',
		handler:function(){
		   Ext.getCmp("resultPanel").getLayout().setActiveItem(1);
		   Ext.getCmp("searchPanel").getLayout().setActiveItem(1);
		}
	}, '-', {
		text : '专职人员',
		handler : function(){
		   Ext.getCmp("resultPanel").getLayout().setActiveItem(2);
		   Ext.getCmp("searchPanel").getLayout().setActiveItem(2);
		},
		iconCls : 'professor'
	}, '-', {
		text : '兼职人员',
		handler :  function(){
		   Ext.getCmp("resultPanel").getLayout().setActiveItem(3);
		   Ext.getCmp("searchPanel").getLayout().setActiveItem(3);
		},
		iconCls : 'noneProfessor'
	}];

	var comUserMainWin = new Ext.Window({
		title : "武汉基督教信息系统",
		//renderTo:document.body,
		minWidth : 400,
		minHeight : 300,
		id : 'comUserMainWin',
		width : 400,
		height : 300,
		layout : 'border',
		autoScroll : true,
		maximizable : true,// 显示最大化按钮
		minimizable : true,
		constrain : true,
		header : true,
		tbar : tbar,
		items:[{
	      region:'west',
	      id:'west-panel',
	      title:'功能模块',
	      split:true,
	      width: 300,
	      //autoHeight:true,
	      minSize: 175,
	      maxSize: 400,
	      collapsible: true,
	      margins:'0 0 0 5',
	      layout:"accordion",
	      animate:true,
	      items:[new newSearchPanel()]
		},{
		  region:'center',
	      id:'center-panel',
	      title:'数据模块',
	      split:true,
	      width: 500,
	      minSize: 175,
	      maxSize: 400,
	      //collapsible: true,
	      margins:'0 0 0 5',
	      layout:"fit",
	      animate:true,
	      items:[new newResultPanel()]
		}]

	});
	comUserMainWin.show();
	comUserMainWin.maximize();
	Ext.Ajax.request({
	   url:"/servlet/getMaxId.do",
	   method:"POST",
	   params:{locationreg:"locationreg",
	           unlocationreg:"unlocationreg",
	           professor:"professor",
	           noneprofessor:"noneprofessor"
	   },
	    success: function(response,options){
	                 var responseArray=Ext.util.JSON.decode(response.responseText);
	                 if(responseArray.success==true){
	                    LoRgtableCount=responseArray.locationreg;//即是数据库的maxId,用来添加记录时自动添加id,而不重复
	                    unLoRgtableCount=responseArray.unlocationreg;
	                    professortableCount=responseArray.professor;
	                    noneProfessortableCount=responseArray.noneprofessor;
	                    
	                 }
	                 else Ext.Msg.alert("抱歉",responseArray.errors);
	               },
	    failure: function(response,options){
	              Ext.Msg.alert("",response.responseText);
	        }
	});
}


Ext.onReady(function() {
	new newMainWin();
	Ext.QuickTips.init();
});

⌨️ 快捷键说明

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