| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635 | 
							- /**
 
-  * inspectors.js 
 
-  * 巡检人管理界面
 
-  * emial: yaoqiang@chinausky.com
 
-  * create: 2018-12-08
 
-  */
 
- Ext.Loader.setConfig({
 
-     enabled: true
 
- });
 
- Ext.Loader.setPath('Ext.ux', '../../res/extjs/examples/ux');
 
- Ext.require([
 
-     'Ext.grid.*',
 
-     'Ext.data.*',
 
-     'Ext.ux.RowExpander',
 
-     'Ext.selection.CheckboxModel'
 
- ]);
 
- var company_code;
 
- var myStore=null;
 
- var myStore1=null;
 
- var myStore2=null;
 
- var V_LOGINNAME='',V_PASSWORD='';
 
- var menuidx = '';
 
- var mouseon;
 
- var mouseoff;
 
- var mouseon1;
 
- var mouseoff1;
 
- var menu_click;
 
- var panel1;
 
- var panel2;
 
- var changeon1;
 
- var sm = Ext.create('Ext.selection.CheckboxModel');
 
- var addsm = Ext.create('Ext.selection.CheckboxModel',{
 
- 	handleMouseDown : Ext.emptyFn,  
 
-     singleSelect : false 
 
- });
 
- var sm1 = Ext.create('Ext.selection.CheckboxModel',{
 
- 	injectCheckbox:1,//checkbox位于哪一列,默认值为0
 
- 	mode:'single',//multi,simple,single;默认为多选multi
 
- //	checkOnly:true,//如果值为true,则只用点击checkbox列才能选中此条记录
 
- 	allowDeselect:true,//如果值true,并且mode值为单选(single)时,可以通过点击checkbox取消对其的选择
 
- 	enableKeyNav:false,
 
- 	listeners: {
 
- 	 deselect: function(model,record,index) {//取消选中时产生的事件
 
- 	 }
 
- 	}
 
- });
 
- Ext.define('MaintenancePerson',{
 
- 	extend: 'Ext.data.Model',
 
- 	fields: [
 
- 		{name:'id',  type:'string'},
 
- 		{name:'name',  type:'string'},
 
- 		{name:'phone',  type:'string'},
 
- 		{name:'zn_name',  type:'string'},
 
- 		{name:'xh',  type:'int'},
 
- 	]
 
- });
 
- Ext.define('MaintenancePerson1',{
 
- 	extend: 'Ext.data.Model',
 
- 	fields: [
 
- 		{name:'rid',  type:'int'},
 
- 		{name:'xh',  type:'int'},
 
- 		{name:'name',  type:'string'},
 
- 		{name:'tdid',  type:'string'},
 
- 		{name:'pd',  type:'int'},
 
- //		{name:'zrr',  type:'string'},
 
- 	]
 
- });
 
- Ext.define('MaintenancePerson2',{
 
- 	extend: 'Ext.data.Model',
 
- 	fields: [
 
- 		{name:'id',  type:'string'},
 
- 		{name:'xh',  type:'int'},
 
- 		{name:'team_name',  type:'string'},
 
- 		{name:'person_liable_id',  type:'string'},
 
- 		
 
- 	]
 
- });
 
- function exportbtn_click(){
 
- 	baseUrl = document.getElementById('basePath').value;
 
- 	V_LOGINNAME = $("#V_LOGINNAME").val();
 
- 	V_PASSWORD = $("#V_PASSWORD").val();
 
- 	name = document.getElementById('name').value;
 
- 	zn = document.getElementById('zn').value;
 
- 	
 
- //	zn_name = document.getElementById('zn_name').value;
 
- 	var fields = '';
 
- 	var array = ['id','xh','name','phone','zn_name'];
 
- 	var excelname = ['ID','序号','姓名','手机号','职务'];
 
- 	for(var i=0;i<5;i++){
 
- 		if(i>0)
 
- 			fields += ',';
 
- 	    fields += '{id:"'+array[i]+'",title:"'+excelname[i]+'",shown:"'+true+'"}';
 
- 	}
 
- 			var query = new Object();
 
- 			// query.V_LOGINNAME = V_LOGINNAME;
 
- 			// query.V_PASSWORD = V_PASSWORD;
 
- 			query.name = name;
 
- 			query.zn = zn;
 
- 			query.EXPORT_FILE = '维保人列表';
 
- 			query.fields = '['+fields+']';
 
- 			$.ajax({
 
- 		        type:'POST',
 
- 		        url: baseUrl+"iot/excel/view/XjInspectorsExcel",
 
- 		        data: {
 
- 		        	queryJson : Ext.JSON.encode(query)
 
- 		    	 },
 
- 		    	 success: function(result){
 
- 		    		
 
- 			            var json = eval('(' + result + ')');
 
- 			            if(json.action=='dormExport'){
 
- 			                ConfirmStore = json.RESULT;
 
- 			               
 
- 			                var elemIF = document.createElement("iframe");
 
- 							elemIF.src = baseUrl+json.filename;
 
- 							elemIF.style.display = "none"; 
 
- 							document.body.appendChild(elemIF);
 
- 			            }
 
- 			    
 
- 			        }
 
- 		    });
 
- 			
 
- }
 
- var body_resize = function(){
 
- 	maxHeight =  document.documentElement.clientHeight;
 
- 	maxHeight-=34;
 
- 	maxWidth = document.documentElement.clientWidth;
 
- 	Ext.getCmp('InspectorsPiebar').setHeight(maxHeight);
 
- 	Ext.getCmp('InspectorsPiebar').setWidth(maxWidth);
 
- }
 
- var body_resize1 = function(){
 
- 	maxHeight =  document.documentElement.clientHeight;
 
- 	maxHeight-=34;
 
- 	maxWidth = document.documentElement.clientWidth;
 
- 	Ext.getCmp('InspectorsPiebar2').setHeight(maxHeight);
 
- 	Ext.getCmp('InspectorsPiebar2').setWidth(maxWidth);
 
- }
 
- Ext.onReady(function(){  
 
- 	var baseUrl = document.getElementById('basePath').value;
 
- 	var theme = document.getElementById('theme').value;
 
- 	var chkIcon = '<img src="'+baseUrl+'res/img/common/check.gif"/>'
 
- 	var unchkIcon = '<img src="'+baseUrl+'res/img/common/uncheck.gif"/>'
 
- 	$("#V_LOGINNAME").val(sessionStorage.getItem('V_LOGINNAME'));
 
- 	$("#V_PASSWORD").val(sessionStorage.getItem('V_PASSWORD'));
 
- 	V_LOGINNAME = $("#V_LOGINNAME").val();
 
-     V_PASSWORD = $("#V_PASSWORD").val();
 
- 	var countPerPage = 15;
 
- 	var maxHeight = 10000;
 
- 	
 
- 	var chkBoolean = function(flag) {
 
- 		if(flag)
 
- 			return chkIcon;
 
- 		return unchkIcon;
 
- 	}
 
- 	
 
- 	var queryJson = new Object();
 
- 	queryJson.V_LOGINNAME = V_LOGINNAME;
 
- 	// queryJson.V_PASSWORD =  V_PASSWORD;
 
- //	queryJson.COMMSTATUS = 'NO';
 
- 	if((company_code!=null)&&(company_code!='null')&&(company_code.length>0))
 
- 		queryJson.company_code = company_code;
 
- 	
 
- 	var clear_append_form1 = function (){
 
- 		Ext.getCmp('fa_Inspectors_team_name').setValue("");
 
- 		Ext.getCmp('fa_Inspectors_person_liable_id').setValue("");
 
- 		Ext.getCmp('InspectorsListPageToolbar2').moveFirst();
 
- 	}
 
- 	
 
- 	myStore = Ext.create('Ext.data.Store', {
 
- 	    model: 'MaintenancePerson',
 
- 	    pageSize: countPerPage, 
 
- 	    proxy: {
 
- 	        type: 'ajax',
 
- 	        actionMethods: {
 
-                 create : 'POST',
 
-                 read   : 'POST', // by default GET
 
-                 update : 'POST',
 
-                 destroy: 'POST'
 
- 	        },
 
- 	        url: baseUrl+'iot/inspectorsx/getList',
 
- 	        reader: {
 
- 	            type: 'json',
 
- 	            root: 'RESULT',
 
- 	            totalProperty: 'totalCount'
 
- 	        },
 
- 	        extraParams:{
 
- 	        	queryJson:Ext.JSON.encode(queryJson)
 
- 	        }
 
- 	    },
 
- 	    remoteSort: true
 
- 	});
 
- 	
 
- 	myStore2 = Ext.create('Ext.data.Store', {
 
- 	    model: 'MaintenancePerson2',
 
- 	    pageSize: countPerPage, 
 
- 	    proxy: {
 
- 	        type: 'ajax',
 
- 	        actionMethods: {
 
-                 create : 'POST',
 
-                 read   : 'POST', // by default GET
 
-                 update : 'POST',
 
-                 destroy: 'POST'
 
- 	        },
 
- 	        url: baseUrl+'iot/planteam/getList1',
 
- 	        reader: {
 
- 	            type: 'json',
 
- 	            root: 'RESULT',
 
- 	            totalProperty: 'totalCount'
 
- 	        },
 
- 	        extraParams:{
 
- 	        	queryJson:Ext.JSON.encode(queryJson)
 
- 	        }
 
- 	    },
 
- 	    remoteSort: true
 
- 	});
 
- 	
 
- 	var mystore2_fun = function(id){
 
- 		  if(id== 0){
 
- 		   myStore2.on('load',function(myStore2, record){
 
- 		    for (var i = 0; i < record.length; i++) { 
 
- 		     var records = record[i]; 
 
- 		     if (records.get('xh') == 1) {
 
- 		      Ext.getCmp('InspectorsListPanel2').getSelectionModel().select(records, true);
 
- 		     }
 
- 		    };
 
- 		      });
 
- 		  }else{
 
- 		   myStore2.reload();
 
- 		   myStore2.on('load',function(myStore2, record){
 
- 		    for (var i = 0; i < record.length; i++) { 
 
- 		     var records = record[i]; 
 
- 		     if (records.get('id') == id) {
 
- 		      Ext.getCmp('InspectorsListPanel2').getSelectionModel().select(records, true);
 
- 		     }
 
- 		    };
 
- 		      });
 
- 		  }
 
- 		 }
 
- 	
 
- 	myStore1 = Ext.create('Ext.data.Store', {
 
- 	    model: 'MaintenancePerson1',
 
- 	    pageSize: countPerPage, 
 
- 	    proxy: {
 
- 	        type: 'ajax',
 
- 	        actionMethods: {
 
-                 create : 'POST',
 
-                 read   : 'POST', // by default GET
 
-                 update : 'POST',
 
-                 destroy: 'POST'
 
- 	        },
 
- 	        url: baseUrl+'iot/inspectorsx/getTeamMembersListxj',
 
- 	        reader: {
 
- 	            type: 'json',
 
- 	            root: 'RESULT',
 
- 	            totalProperty: 'totalCount'
 
- 	        },
 
- 	        extraParams:{
 
- 	        	queryJson:Ext.JSON.encode(queryJson)
 
- 	        }
 
- 	    },
 
- 	    remoteSort: true
 
- 	});
 
- 	
 
- 	myStore1.on('load',function(myStore1, record){
 
- 		for (var i = 0; i < record.length; i++) { 
 
- 		    var records = record[i]; 
 
- 		    if (records.get('pd') == 1) {
 
- 		     Ext.getCmp('InspectorsListPanel3').getSelectionModel().select(records, true);
 
- 		     }
 
- 		   };
 
- 	});
 
- 	
 
- 	
 
- 	Ext.define('getJobDutiesStore1',{
 
- 		extend:'Ext.data.Model',
 
- 		fields: [
 
- 			{name:'name',  type:'string'},
 
- 			{name:'rid',type:'int'}
 
- 		]
 
- 	});
 
- 	var getJobDutiesStore1 = Ext.create('Ext.data.Store',{
 
- 		model: 'getJobDutiesStore1',
 
- 	    proxy: {
 
- 	        type: 'ajax',
 
- 	        actionMethods: {
 
-                 create : 'POST',
 
-                 read   : 'POST', // by default GET
 
-                 update : 'POST',
 
-                 destroy: 'POST'
 
- 	        },
 
- 	        url: baseUrl+'iot/inspectorsx/getTeamMembersList1xj',
 
- 	        reader: {
 
- 	            type: 'json',
 
- 	            root: 'RESULT',
 
- 	            totalProperty: 'totalCount'
 
- 	        },
 
- 	        extraParams:{
 
- 	        	queryJson:Ext.JSON.encode(queryJson)
 
- 	        }
 
- 	    }
 
- 	});
 
- 	
 
- 	var AppendForm = Ext.create('Ext.form.Panel', {
 
- 		id: 'InspectorsAppendForm',
 
- 		labelWidth: 55,
 
- 		url: baseUrl+'iot/inspectorsx/append',
 
- 		defaultType: 'textfield',
 
- 		bodyPadding: 15,
 
- 		items: [{
 
- 			fieldLabel:'人员姓名',
 
- 			id: 'fa_Inspectors_name',
 
- 			name:'name',
 
- 			maxLength:20,
 
- 			maxLengthText:'长度不得超出{0}',
 
- 			anchor:'75%'
 
- 		},{
 
- 			fieldLabel:'电话号码',
 
- 			id: 'fa_Inspectors_phone',
 
- 			name: 'phone',
 
- 			maxLength: 250,
 
- 			maxLengthText:'长度不得超出{0}',
 
- 			anchor:'75%'
 
- 		},{
 
- 		   xtype: 'checkboxgroup',
 
-            fieldLabel: '人员职能',
 
-            id:"fa_Inspectors_inspectiontime",
 
-            columns: 3,
 
-            items: [
 
-               {boxLabel: '维保', name: 'maintenance',inputValue:"1"},
 
-               {boxLabel: '巡检', name: 'inspection',inputValue:"2"},
 
-               {boxLabel: '报修', name: 'event_processing',inputValue:"4"}
 
-             
 
-        ]},{
 
-     	   id:'fa_Inspectors_queryJson',
 
-     	   name:'queryJson',
 
-     	   hidden:true
 
-        }],
 
-        buttons: [{
 
-         text: '提交',
 
-         iconCls:'ok_btn',
 
-         handler: function() {
 
-         	var form = this.up('form').getForm();
 
-         	if (form.isValid()) {
 
-         		var InspectiontimeValue = Ext.getCmp('fa_Inspectors_inspectiontime').getChecked();
 
-         		var Inspectiontime=0;
 
-         		Ext.Array.each(InspectiontimeValue, function(item){
 
-         			Inspectiontime +=parseInt(item.inputValue);
 
-           });
 
-         		var query = new Object();
 
-         		// query.V_LOGINNAME = V_LOGINNAME;
 
-         		query.zn=Inspectiontime;
 
-         		query.name = Ext.getCmp('fa_Inspectors_name').getValue();
 
-         		query.phone = Ext.getCmp('fa_Inspectors_phone').getValue();
 
-           var jsonstr = Ext.JSON.encode(query);
 
-           Ext.getCmp('fa_Inspectors_queryJson').setValue(jsonstr);
 
-              form.submit({
 
-               method:'post',
 
-                  success: function(form, action) {
 
-                     Ext.Msg.alert('操作成功', '已保存', function(btn,txt){
 
-                      Ext.getCmp('InspectorsAppendForm').getForm().reset();
 
-                  	 Ext.getCmp('InspectorsListPageToolbar').moveFirst();
 
-                     });
 
-                  },
 
-                  failure: function(form, action) {
 
-                     Ext.Msg.alert('操作失败', action.Msg , function(btn,txt){
 
-               
 
-                     });
 
-                  }
 
-              });
 
-          }
 
-      }
 
-  },{
 
-   text: '关闭',
 
-   iconCls: 'cancel_btn',
 
-   handler: function() {
 
-    this.up('window').hide();
 
-   }
 
-  }]
 
- });
 
- 	
 
- 	var appendwin = function(){
 
- 		Ext.create('Ext.window.Window', {
 
- 		    title: '新增',
 
- 		    height: 350,
 
- 		    width: 400,
 
- 		    modal: true,
 
- 		    layout: 'fit',
 
- 		    items:  AppendForm,
 
- 		    closeAction: 'hide'
 
- 		}).show();
 
- 	}
 
- 	
 
- 	
 
- 	var AppendForm1 = Ext.create('Ext.form.Panel', {
 
- 		id: 'InspectorsAppendForm1',
 
- 		labelWidth: 55,
 
- 		url: baseUrl+'iot/planteam/append1',
 
- 		defaultType: 'textfield',
 
- 		bodyPadding: 15,
 
- 		items: [{
 
- 			fieldLabel:'班组名称',
 
- 			id: 'fa_Inspectors_team_name',
 
- 			name:'team_name',
 
- 			maxLength:20,
 
- 			maxLengthText:'长度不得超出{0}',
 
- 			anchor:'75%'
 
- 		},{
 
- 			fieldLabel:'负责人',
 
- 			id: 'fa_Inspectors_person_liable_id',
 
- 			name:'person_liable_id',
 
- 			xtype:'combo',
 
- 			store:getJobDutiesStore1,
 
- 			displayField : 'name',  
 
- 	        valueField : 'rid',
 
- 	        editable : false,
 
- 			anchor:'75%'
 
- 		},{
 
- 			id:'fa_Inspectors_queryJson1',
 
- 			name:'queryJson',
 
- 			hidden:true
 
- 		}],
 
- 		buttons: [{
 
- 	        text: '提交',
 
- 	        iconCls:'ok_btn',
 
- 		    handler: function() {
 
- 		        var form = this.up('form').getForm();
 
- 		        if (form.isValid()) {
 
- 		        	var query = new Object();
 
- 		        	// query.V_LOGINNAME = $("#V_LOGINNAME").val();
 
- 		        	query.team_name = Ext.getCmp('fa_Inspectors_team_name').getValue();
 
- 		        	query.person_liable_id = Ext.getCmp('fa_Inspectors_person_liable_id').getValue();
 
- 		        	var jsonstr = Ext.JSON.encode(query);
 
- 		        	Ext.getCmp('fa_Inspectors_queryJson1').setValue(jsonstr);
 
- 		            form.submit({
 
- 		            	method:'post',
 
- 		                success: function(form, action) {
 
- 		                   Ext.Msg.alert('操作成功', '已保存', function(btn,txt){
 
- 		                	   clear_append_form1();
 
- 		                   });
 
- 		                },
 
- 		                failure: function(form, action) {
 
- 		                   Ext.Msg.alert('操作失败', action.Msg , function(btn,txt){
 
- 		                	   clear_append_form1();
 
- 		                   });
 
- 		                }
 
- 		            });
 
- 		        }
 
- 		    }
 
- 		},{
 
- 			text: '关闭',
 
- 			iconCls: 'cancel_btn',
 
- 			handler: function() {
 
- 				this.up('window').hide();
 
- 			}
 
- 		}]
 
- 	});
 
- 	
 
- 	var appendwin1 = function(){
 
- 		Ext.create('Ext.window.Window', {
 
- 		    title: '新增',
 
- 		    height: 350,
 
- 		    width: 400,
 
- 		    modal: true,
 
- 		    layout: 'fit',
 
- 		    items:  AppendForm1,
 
- 		    closeAction: 'hide'
 
- 		}).show();
 
- 	}
 
- 	
 
- 	var clear_modify_form = function (){
 
- 		Ext.getCmp('fm_inspectors_id').setValue("");
 
- 		Ext.getCmp('fm_inspectors_queryJson').setValue("");
 
- 		Ext.getCmp('fm_inspectors_name').setValue("");
 
- 		Ext.getCmp('fm_inspectors_phone').setValue("");
 
- 		Ext.getCmp('fm_inspectors_inspectiontime').setValue(false);
 
- 		Ext.getCmp('InspectorsListPanel').getStore().reload();
 
- 	}
 
- 	
 
- 	
 
- 	
 
- 	var ModifyForm = Ext.create('Ext.form.Panel', {
 
- 		id: 'InspectorsEditForm',
 
- 		labelWidth: 55,
 
- 		url: baseUrl+'iot/inspectorsx/update',
 
- 		defaultType: 'textfield',
 
- 		bodyPadding: 15,
 
- 		items: [{
 
- 				fieldLabel:'人员姓名',
 
- 				id: 'fm_inspectors_name',
 
- 				name:'name',
 
- 				maxLength:20,
 
- 				maxLengthText:'长度不得超出{0}',
 
- 				anchor:'75%'
 
- 			},{
 
- 				fieldLabel:'电话号码',
 
- 				id: 'fm_inspectors_phone',
 
- 				name: 'phone',
 
- 				maxLength: 250,
 
- 				maxLengthText:'长度不得超出{0}',
 
- 				anchor:'75%'
 
- 			},{
 
- 			    xtype: 'checkboxgroup',
 
- 			    fieldLabel: '人员职能',
 
- 			    id:"fm_inspectors_inspectiontime",
 
- 			    columns: 3,
 
- 			    items: [
 
- 			            {boxLabel: '维保', name: 'maintenance',inputValue:"1",id:'inspectors_maintenance'},
 
- 			            {boxLabel: '巡检', name: 'inspection',inputValue:"2",id:'inspectors_inspection'},
 
- 			            {boxLabel: '报修', name: 'event_processing',inputValue:"4",id:'inspectors_event_processing'}
 
- 			              
 
- 			]},{
 
- 			   id: 'fm_inspectors_id',
 
- 			   name:'id',
 
- 			   hidden:true
 
- 			},{
 
- 			   id:'fm_inspectors_queryJson',
 
- 			   name:'queryJson',
 
- 			   hidden:true
 
- 			  }],
 
- 			  buttons: [{
 
- 			         text: '修改',
 
- 			         iconCls:'ok_btn',
 
- 			      handler: function() {
 
- 			       var form = this.up('form').getForm();
 
- 			          if (form.isValid()) {
 
- 			           var InspectiontimeValue = Ext.getCmp('fm_inspectors_inspectiontime').getChecked();
 
- 			           var Inspectiontime=0;
 
- 			           Ext.Array.each(InspectiontimeValue, function(item){
 
- 			            Inspectiontime +=parseInt(item.inputValue);
 
- 			           });
 
- 			           var query = new Object();
 
- 			           query.zn=Inspectiontime;
 
- 			           query.id = Ext.getCmp('fm_inspectors_id').getValue();
 
- 			           query.name = Ext.getCmp('fm_inspectors_name').getValue();
 
- 			           query.phone = Ext.getCmp('fm_inspectors_phone').getValue();
 
- 			           var jsonstr = Ext.JSON.encode(query);
 
- 			           Ext.getCmp('fm_inspectors_queryJson').setValue(jsonstr);
 
- 		            form.submit({
 
- 		            	method:'post',
 
- 		                success: function(form, action) {
 
- 		                   Ext.Msg.alert('操作成功', '已修改', function(btn,txt){
 
- 		                	   clear_modify_form();
 
- 		                   });
 
- 		                },
 
- 		                failure: function(form, action) {
 
- 		                   Ext.Msg.alert('操作失败', action.Msg , function(btn,txt){
 
- 		                	   clear_modify_form();
 
- 		                   });
 
- 		                }
 
- 		            });
 
- 		            this.up('window').hide();
 
- 		        }
 
- 		    }
 
- 		},{
 
- 			text: '关闭',
 
- 			iconCls: 'cancel_btn',
 
- 			handler: function() {
 
- 				this.up('window').hide();
 
- 				clear_modify_form();
 
- 			}
 
- 		}]
 
- 	});
 
- 	
 
- 	var modifywin = function(){
 
- 		Ext.create('Ext.window.Window', {
 
- 		    title: '修改',
 
- 		    height: 350,
 
- 		    width: 400,
 
- 		    modal: true,
 
- 		    layout: 'fit',
 
- 		    items:  ModifyForm,
 
- 		    closeAction: 'hide'
 
- 		}).show();
 
- 	}
 
- 		
 
- 	var chk_sm = function() {
 
- 		  if(sm.getCount()==1){
 
- 		   modifywin();
 
- 		   var selected = sm.getSelection();
 
- 		   var fm_inspectiontime = selected[0].raw.zn
 
- 		   if(fm_inspectiontime=='1'){
 
- 		    var domainArr = ['1'];
 
- 		   }else if(fm_inspectiontime=='2'){
 
- 		    var domainArr = ['2'];
 
- 		   }else if(fm_inspectiontime=='3'){
 
- 		    var domainArr = ['1','2'];
 
- 		   }else if(fm_inspectiontime=='4'){
 
- 		    var domainArr = ['4'];
 
- 		   }else if(fm_inspectiontime=='5'){
 
- 		    var domainArr = ['1','4'];
 
- 		   }else if(fm_inspectiontime=='6'){
 
- 		    var domainArr = ['2','4'];
 
- 		   }else if(fm_inspectiontime=='7'){
 
- 		    var domainArr = ['1','2','4'];
 
- 		   }
 
- 		   for(var i = 0 ;i < domainArr.length;i++) {
 
- 		    switch(domainArr[i]) {
 
- 		    case "1":
 
- 		     Ext.getCmp('inspectors_maintenance').setValue(true);
 
- 		     break; 
 
- 		       case "2":
 
- 		        Ext.getCmp('inspectors_inspection').setValue(true);
 
- 		        break; 
 
- 		       case "4":
 
- 		        Ext.getCmp('inspectors_event_processing').setValue(true);
 
- 		        break; 
 
- 		    }
 
- 		    }
 
- 		   Ext.getCmp('fm_inspectors_id').setValue(selected[0].raw.id);
 
- 		   Ext.getCmp('fm_inspectors_name').setValue(selected[0].raw.name);
 
- 		   Ext.getCmp('fm_inspectors_phone').setValue(selected[0].raw.phone);
 
- 		  }else{
 
- 		   Ext.Msg.alert('请先选择','请先选择一条记录,再点击修改');
 
- 		  }
 
- 		 }
 
- 	
 
- 	var del_sm = function() {
 
- 		if(sm.getCount()==1){
 
- 			var selected = sm.getSelection( );
 
- 			var query = new Object();
 
- 			var list = new Array();
 
- 			var o = new Object();
 
- 			o.id = selected[0].raw.id;
 
- 			list.push(o);
 
- 			query.ID_LIST = list;
 
- 			var jsonstr= Ext.JSON.encode(query);
 
- 			Ext.MessageBox.confirm('删除人员信息','是否删除'+selected[0].raw.name+' 维保人员?',function(btn){
 
- 				if(btn=='yes'){
 
- 					
 
- 					$.ajax({
 
- 			             type:'POST',
 
- 			             url: baseUrl+"iot/inspectorsx/del",
 
- 			             data: {
 
- 			              queryJson : jsonstr
 
- 			            
 
- 			           },
 
- 			           success: function(result){
 
- 			             
 
- 			             var json = eval('(' + result + ')');
 
- 			                 if(json.action=='deleteInspectors'){
 
- 			         
 
- 			                  if(json.success==true){
 
- 			                       Ext.Msg.alert('操作成功', json.MSG , function(btn,txt){
 
- 			                	      Ext.getCmp('InspectorsListPanel').getStore().reload();
 
- 			                       }); 
 
- 			                	 }else{
 
- 			                		 Ext.Msg.alert('操作失败', json.MSG , function(btn,txt){
 
- 				                	      Ext.getCmp('InspectorsListPanel').getStore().reload();
 
- 				                      }); 
 
- 			                	 }
 
- 			                 }
 
- 			             
 
- 			            }
 
- 			     });
 
- 				
 
- 				}
 
- 			},this);
 
- 		}else{
 
- 			if(sm.getCount()>1){
 
- 				var query = new Object();
 
- 				var list = new Array();
 
- 				for(var i=0;i<sm.getCount();i++){
 
- 					var selected = sm.getSelection( );
 
- 					var o = new Object();
 
- 					o.id = selected[i].raw.id;
 
- 					list.push(o);
 
- 				}
 
- 				query.ID_LIST = list;
 
- 				
 
- 				var jsonstr= Ext.JSON.encode(query);
 
- 				Ext.MessageBox.confirm('删除人员信息','是否删除选中的'+sm.getCount()+' 个维保人员?',function(btn){
 
- 					if(btn=='yes'){
 
- 						
 
- 						$.ajax({
 
- 				             type:'POST',
 
- 				             url: baseUrl+"iot/inspectorsx/del",
 
- 				             data: {
 
- 				              queryJson : jsonstr
 
- 				            
 
- 				           },
 
- 				           success: function(result){
 
- 				             
 
- 				             var json = eval('(' + result + ')');
 
- 				                 if(json.action=='deleteInspectors'){
 
- 				                	 if(json.success==true){
 
- 					                       Ext.Msg.alert('操作成功', json.MSG , function(btn,txt){
 
- 					                	      Ext.getCmp('InspectorsListPanel').getStore().reload();
 
- 					                       }); 
 
- 					                	 }else{
 
- 					                		 Ext.Msg.alert('操作失败', json.MSG , function(btn,txt){
 
- 						                	      Ext.getCmp('InspectorsListPanel').getStore().reload();
 
- 						                      }); 
 
- 					                	 } 
 
- 				                 }
 
- 				             
 
- 				            }
 
- 				     });
 
- 					
 
- 					}
 
- 				},this);
 
- 			}else{
 
- 			Ext.Msg.alert('请先选择','至少选择一条记录,再点击删除');
 
- 		}
 
- 		}
 
- 	}
 
- 	
 
- 	var del_sm1 = function() {
 
- 		if(sm1.getCount()==1){
 
- 			var selected = sm1.getSelection( );
 
- 			var query = new Object();
 
- 			var list = new Array();
 
- 			var o = new Object();
 
- 			o.id = selected[0].raw.id;
 
- 			list.push(o);
 
- 			query.ID_LIST = list;
 
- 			var jsonstr= Ext.JSON.encode(query);
 
- 			Ext.MessageBox.confirm('删除班组','是否删除'+selected[0].raw.name+' 班组?',function(btn){
 
- 				if(btn=='yes'){
 
- 					
 
- 				 $.ajax({
 
- 			             type:'POST',
 
- 			             url: baseUrl+"iot/planteam/del",
 
- 			             data: {
 
- 			              queryJson : jsonstr
 
- 			            
 
- 			           },
 
- 			           success: function(result){
 
- 			             
 
- 			             var json = eval('(' + result + ')');
 
- 			                 if(json.action=='deletePlanTeam'){
 
- 			                
 
- 			                  if(json.success==true){
 
- 			                       Ext.Msg.alert('操作成功', json.MSG , function(btn,txt){
 
- 			                	      Ext.getCmp('InspectorsListPanel2').getStore().reload();
 
- 			                       }); 
 
- 			                	 }else{
 
- 			                		 Ext.Msg.alert('操作失败', json.MSG , function(btn,txt){
 
- 				                	      Ext.getCmp('InspectorsListPanel2').getStore().reload();
 
- 				                      }); 
 
- 			                	 }
 
- 			                 }
 
- 			             
 
- 			            }
 
- 			     });
 
- 				
 
- 				}
 
- 			},this);
 
- 		}else{
 
- 			if(sm1.getCount()>1){
 
- 				var query = new Object();
 
- 				var list = new Array();
 
- 				for(var i=0;i<sm.getCount();i++){
 
- 					var selected = sm1.getSelection( );
 
- 					var o = new Object();
 
- 					o.id = selected[i].raw.id;
 
- 					list.push(o);
 
- 				}
 
- 				query.ID_LIST = list;
 
- 				
 
- 				var jsonstr= Ext.JSON.encode(query);
 
- 				Ext.MessageBox.confirm('删除班组','是否删除选中的'+sm1.getCount()+' 个班组?',function(btn){
 
- 					if(btn=='yes'){
 
- 						
 
- 						$.ajax({
 
- 				             type:'POST',
 
- 				             url: baseUrl+"iot/planteam/del",
 
- 				             data: {
 
- 				              queryJson : jsonstr
 
- 				            
 
- 				           },
 
- 				           success: function(result){
 
- 				             
 
- 				             var json = eval('(' + result + ')');
 
- 				                 if(json.action=='deletePlanTeam'){
 
- 				                	 if(json.success==true){
 
- 					                       Ext.Msg.alert('操作成功', json.MSG , function(btn,txt){
 
- 					                	      Ext.getCmp('InspectorsListPanel2').getStore().reload();
 
- 					                       }); 
 
- 					                	 }else{
 
- 					                		 Ext.Msg.alert('操作失败', json.MSG , function(btn,txt){
 
- 						                	      Ext.getCmp('InspectorsListPanel2').getStore().reload();
 
- 						                      }); 
 
- 					                	 }
 
- 				                 }
 
- 				             
 
- 				            }
 
- 				     });
 
- 					
 
- 					}
 
- 				},this);
 
- 			}else{
 
- 			Ext.Msg.alert('请先选择','至少选择一条记录,再点击删除');
 
- 		}
 
- 		}
 
- 	}
 
- 	
 
- 	var show_page = function(){
 
- 		var arr = 0;
 
- 		var r = document.getElementsByName("zhineng");
 
- 		if(r.length>1){
 
- 		  for(var i = 0; i < r.length; i++) {
 
- 			  if(r[i].checked) {
 
- 				  arr+=parseInt(r[i].value);
 
- 			  }
 
- 		  }
 
- 		}else if(r.length==1){
 
- 			arr = parseInt(r[0].value);
 
- 		}else{
 
- 			arr = 0;
 
- 		}
 
- 		var maintenancePerson_title3_input = document.getElementById('inspectors_title3_input1').value;
 
- 		var query = new Object();
 
- 		if(arr > 0){
 
- 			query.zn = arr;
 
- 			$("#zn").val(arr);
 
- 		}
 
- 		if(maintenancePerson_title3_input.length>0){
 
- 		query.name = maintenancePerson_title3_input;
 
- 		$("#name").val(maintenancePerson_title3_input);
 
- 		}
 
- 		// query.V_LOGINNAME = V_LOGINNAME;
 
- 		// query.V_PASSWORD =  V_PASSWORD;
 
- 		var jsonstr = Ext.JSON.encode(query);
 
-     	myStore.getProxy().extraParams = {
 
-     		queryJson : jsonstr
 
-     	};
 
-     	Ext.getCmp('InspectorsListPageToolbar').moveFirst();
 
- 	}
 
- 	
 
- 	var show_page1 = function(){
 
- 		var maintenancePerson_title21_input = document.getElementById('maintenancePerson_title21_input').value;
 
- 		var maintenancePerson_title31_input = document.getElementById('maintenancePerson_title31_input1').value;
 
- 		var query = new Object();
 
- 		if(maintenancePerson_title21_input.length>0){
 
- 		  query.spot_name = maintenancePerson_title21_input;
 
- 		}
 
- 		if(maintenancePerson_title31_input.length>0){
 
- 		query.name = maintenancePerson_title31_input;
 
- 		}
 
- 		// query.V_LOGINNAME = V_LOGINNAME;
 
- 		// query.V_PASSWORD =  V_PASSWORD;
 
- 		var jsonstr = Ext.JSON.encode(query);
 
-     	myStore.getProxy().extraParams = {
 
-     		queryJson : jsonstr
 
-     	};
 
-     	Ext.getCmp('InspectorsListPageToolbar2').moveFirst();
 
- 	}
 
- 	
 
- 	var reset1 = function(){
 
- 		var zn = document.getElementsByName("zhineng");
 
-         for (var i = 0; i < zn.length; i++) {
 
-       	  zn[i].checked = false;
 
-         }
 
- 		document.getElementById('inspectors_title3_input1').value = '';
 
- 		$("#zn").val('');
 
- 		$("#name").val('');
 
- 		show_page();
 
- 	}
 
- 	
 
- 	var reset11 = function(){
 
- 		document.getElementById('maintenancePerson_title21_input').value = '';
 
- 		document.getElementById('maintenancePerson_title31_input1').value = '';
 
- 	}
 
- 	
 
- 	mouseon = function(obj){
 
- 		var id = obj.id;
 
- 		$("#"+id).removeClass(id);
 
- 		$("#"+id).addClass(id+'_on');
 
- 	}
 
- 	
 
- 	mouseon1 = function(obj){
 
- 		var id = obj.id;
 
- 		$("#"+id).removeClass(id);
 
- 		$("#"+id).addClass(id+'_on');
 
- 	}
 
- 	
 
- 	 mouseoff = function(obj){
 
- 		var mid = "inspectors_";
 
- 		for(var i=1;i<7;i++){
 
- 			var id = "inspectors_title"+i+"_div";
 
- 			$("#"+id).removeClass(id+'_on');
 
- 			$("#"+id).addClass(id);
 
- 		}
 
- 		if(menuidx=='m1'){
 
- 			mid += 'title1_div';
 
- 		$("#"+mid).removeClass(mid);
 
- 		$("#"+mid).addClass(mid+'_on');
 
- 		}
 
- 		else if(menuidx=='m2'){
 
- 			mid += 'title2_div';
 
- 		$("#"+mid).removeClass(mid);
 
- 		$("#"+mid).addClass(mid+'_on');
 
- 		}
 
- 		else if(menuidx=='m3'){
 
- 			mid += 'title3_div';
 
- 		$("#"+mid).removeClass(mid);
 
- 		$("#"+mid).addClass(mid+'_on');
 
- 		}
 
- 		else if(menuidx=='m4'){
 
- 			mid += 'title4_div';
 
- 		$("#"+mid).removeClass(mid);
 
- 		$("#"+mid).addClass(mid+'_on');
 
- 		}
 
- 		else if(menuidx=='m5'){
 
- 			mid += 'title5_div';
 
- 		$("#"+mid).removeClass(mid);
 
- 		$("#"+mid).addClass(mid+'_on');
 
- 		}
 
- 		else if(menuidx=='m6'){
 
- 			mid += 'title6_div';
 
- 		$("#"+mid).removeClass(mid);
 
- 		$("#"+mid).addClass(mid+'_on');
 
- 		}
 
- 	}
 
- 	
 
- 	 mouseoff1 = function(obj){
 
- 		   var mid = "inspectors_";
 
- 		   for(var i=1;i<5;i++){
 
- 		    var id = "inspectors_title"+i+"1_div";
 
- 		    $("#"+id).removeClass(id+'_on');
 
- 		    $("#"+id).addClass(id);
 
- 		   }
 
- 		      if(menuidx=='m11'){
 
- 		    mid += 'title11_div';
 
- 		   $("#"+mid).removeClass(mid);
 
- 		   $("#"+mid).addClass(mid+'_on');
 
- 		   }
 
- 		   else if(menuidx=='m21'){
 
- 		    mid += 'title21_div';
 
- 		   $("#"+mid).removeClass(mid);
 
- 		   $("#"+mid).addClass(mid+'_on');
 
- 		   }
 
- 		   else if(menuidx=='m31'){
 
- 		    mid += 'title31_div';
 
- 		   $("#"+mid).removeClass(mid);
 
- 		   $("#"+mid).addClass(mid+'_on');
 
- 		   }
 
- 		   else if(menuidx=='m41'){
 
- 		    mid += 'title41_div';
 
- 		   $("#"+mid).removeClass(mid);
 
- 		   $("#"+mid).addClass(mid+'_on');
 
- 		   }
 
- 		  }
 
- 	 
 
- 	 menu_click = function(obj){
 
- 		  var id = obj.id;
 
- 		  if(id=='inspectors_title1_div'){
 
- 		   menuidx = 'm1';
 
- 		   show_page();
 
- 		  }
 
- 		  else if(id=='inspectors_title2_div'){
 
- 		   menuidx = 'm2';
 
- 		   reset1();
 
- 		  }
 
- 		  else if(id=='inspectors_title3_div'){
 
- 		   menuidx = 'm3';
 
- 		   exportbtn_click();
 
- 		  }
 
- 		  else if(id=='inspectors_title4_div'){
 
- 		   menuidx = 'm4';
 
- 		   del_sm();
 
- 		  }
 
- 		  else if(id=='inspectors_title5_div'){
 
- 		   menuidx = 'm5';
 
- 		   appendwin();
 
- 		  }
 
- 		  else if(id=='inspectors_title6_div'){
 
- 		   menuidx = 'm6';
 
- 		   chk_sm();
 
- 		  }
 
- 		  else if(id=='inspectors_title11_div'){
 
- 		   menuidx = 'm11';
 
- 		   del_sm1();
 
- 		  }
 
- 		  else if(id=='inspectors_title21_div'){
 
- 		   menuidx = 'm21';
 
- 		   appendwin1();
 
- 		  }
 
- 		  else if(id=='inspectors_title31_div'){
 
- 		   menuidx = 'm31';
 
- 		   Preservation_panel3();
 
- 		  }
 
- 		  else if(id=='inspectors_title41_div'){
 
- 		   menuidx = 'm41';
 
- 		   cancel_panel3();
 
- 		  }
 
- 		 }
 
- 	
 
- 	var Preservation_panel3 = function(){
 
- 		var team_name = document.getElementById('inspectors_title211_input').value;
 
- 		var person_liable_id = document.getElementById('inspectors_title111_input').value;
 
- 		var selected = sm1.getSelection( );
 
- 		
 
- 		var selected1 = addsm.getSelection( );
 
- 		var tid=selected1[0].raw.tdid;
 
- 		for(var i=0;i<addsm.getCount();i++){
 
-             if(i==0)
 
-             	people_id_list = selected1[i].raw.rid;
 
- 			else
 
- 				people_id_list += ","+selected1[i].raw.rid;
 
-            }
 
- 		
 
- 		var query = new Object();
 
- 		query.team_name=team_name;
 
- 		query.person_liable_id =person_liable_id ;
 
- 		query.tid = tid ;
 
- 		query.people_id_list = people_id_list ;
 
- 		
 
- 		$.ajax({
 
- 	         type:'POST',
 
- 	         url: baseUrl+"iot/planteam/update",
 
- 	         data: {
 
- 	          queryJson : Ext.JSON.encode(query)
 
- 	       },
 
- 	         success: function(result){
 
- 	        	 Ext.Msg.alert('操作成功', '已修改', function(btn,txt){
 
- 	        		  mystore2_fun(tid);
 
- //					  cancel_panel3();
 
-                  });
 
- 	         },
 
- 	         failure : function() {
 
- 				  Ext.Msg.alert('操作失败', function(btn,txt){
 
- 					  cancel_panel3();
 
-                  });
 
- 			  }
 
- 	     });
 
-     	
 
- 	}
 
- 	
 
- 	var cancel_panel3 = function() {
 
- 		  var selected = sm1.getSelection( );
 
- 		  var stor1_id=selected[0].raw.id;
 
- 		  var label1 = selected[0].raw.team_name;
 
- 		  var label2 = selected[0].raw.person_liable_id;
 
- 		  var query = new Object(); 
 
- 		    query.id = stor1_id;
 
- 		    
 
- 		    // query.V_LOGINNAME = V_LOGINNAME;
 
- 		    // query.V_PASSWORD =  V_PASSWORD;
 
- 		    var jsonstr = Ext.JSON.encode(query);
 
- 		       myStore1.getProxy().extraParams = {
 
- 		        queryJson : jsonstr
 
- 		       };
 
- 		       Ext.getCmp('InspectorsListPageToolbar3').moveFirst();
 
- 		       document.getElementById('inspectors_title211_input').value = label1;
 
- 		     document.getElementById('inspectors_title111_input').value = label2;
 
- 		 }
 
- 	
 
- 	var childPanel1 = function() {
 
- 		  var maintenancePersonHtml = document.getElementById('InspectorsHtml');
 
- 		  var childPanel1_title = document.createElement('div');
 
- 		  childPanel1_title.setAttribute('class','maintenanceperson_title2_div');
 
- 		  childPanel1_title.innerHTML='职能';
 
- 		  maintenancePersonHtml.appendChild(childPanel1_title);
 
- 		  var childPanel1_input1 = document.createElement('input');
 
- 		   childPanel1_input1.setAttribute('class','input4_class');
 
- //		   childPanel1_input1.setAttribute('id','maintenancePerson_title3_input1');
 
- 		   childPanel1_input1.setAttribute('type','checkbox');
 
- 		   childPanel1_input1.setAttribute('name','zhineng');
 
- 		   childPanel1_input1.setAttribute('value','1');
 
- 		   maintenancePersonHtml.appendChild(childPanel1_input1);
 
- 		  var childPanel1_div = document.createElement('div');
 
- 		   childPanel1_div.setAttribute('class','childPanel1_div');
 
- 		   childPanel1_div.innerHTML='维保';
 
- 		   maintenancePersonHtml.appendChild(childPanel1_div);
 
- 		  var childPanel1_input2 = document.createElement('input');
 
- 		   childPanel1_input2.setAttribute('class','input2_class');
 
- //		   childPanel1_input1.setAttribute('id','maintenancePerson_title3_input1');
 
- 		   childPanel1_input2.setAttribute('type','checkbox');
 
- 		   childPanel1_input2.setAttribute('name','zhineng');
 
- 		   childPanel1_input2.setAttribute('value','2');
 
- 		   maintenancePersonHtml.appendChild(childPanel1_input2);
 
- 		  var childPanel1_div1 = document.createElement('div');
 
- 		   childPanel1_div1.setAttribute('class','childPanel1_div1');
 
- 		   childPanel1_div1.innerHTML='巡检';
 
- 		   maintenancePersonHtml.appendChild(childPanel1_div1);
 
- 		  var childPanel1_input3 = document.createElement('input');
 
- 		   childPanel1_input3.setAttribute('class','input3_class');
 
- //		   childPanel1_input1.setAttribute('id','maintenancePerson_title3_input1');
 
- 		   childPanel1_input3.setAttribute('type','checkbox');
 
- 		   childPanel1_input3.setAttribute('name','zhineng');
 
- 		   childPanel1_input3.setAttribute('value','4');
 
- 		   maintenancePersonHtml.appendChild(childPanel1_input3);
 
- 		  var childPanel1_div2 = document.createElement('div');
 
- 		   childPanel1_div2.setAttribute('class','childPanel1_div2');
 
- 		   childPanel1_div2.innerHTML='报修';
 
- 		   maintenancePersonHtml.appendChild(childPanel1_div2);
 
- 		   var childPanel1_title1 = document.createElement('div');
 
- 		   childPanel1_title1.setAttribute('class','title3_div');
 
- 		   childPanel1_title1.innerHTML='姓名';
 
- 		   maintenancePersonHtml.appendChild(childPanel1_title1);
 
- 		   var childPanel1_input = document.createElement('input');
 
- 		   childPanel1_input.setAttribute('class','input1_class');
 
- 		   childPanel1_input.setAttribute('id','inspectors_title3_input1');
 
- 		   childPanel1_input.setAttribute('type','text');
 
- 		   childPanel1_input.setAttribute('value','');
 
- 		   maintenancePersonHtml.appendChild(childPanel1_input);
 
- 		   var childPanel1_title2 = document.createElement('div');
 
- 		   childPanel1_title2.setAttribute('class','inspectors_title1_div');
 
- 		   childPanel1_title2.setAttribute('id','inspectors_title1_div');
 
- 		   childPanel1_title2.setAttribute('onmouseover',"mouseon(this)");
 
- 		   childPanel1_title2.setAttribute('onmouseout',"mouseoff(this)");
 
- 		   childPanel1_title2.setAttribute('onclick',"menu_click(this)");
 
- 		   maintenancePersonHtml.appendChild(childPanel1_title2);
 
- 		   var childPanel1_title3 = document.createElement('div');
 
- 		   childPanel1_title3.setAttribute('class','inspectors_title2_div');
 
- 		   childPanel1_title3.setAttribute('id','inspectors_title2_div');
 
- 		   childPanel1_title3.setAttribute('onmouseover',"mouseon(this)");
 
- 		   childPanel1_title3.setAttribute('onmouseout',"mouseoff(this)");
 
- 		   childPanel1_title3.setAttribute('onclick',"menu_click(this)");
 
- 		   maintenancePersonHtml.appendChild(childPanel1_title3);
 
- 		   var childPanel1_title4 = document.createElement('div');
 
- 		   childPanel1_title4.setAttribute('class','inspectors_title3_div');
 
- 		   childPanel1_title4.setAttribute('id','inspectors_title3_div');
 
- 		   childPanel1_title4.setAttribute('onmouseover',"mouseon(this)");
 
- 		   childPanel1_title4.setAttribute('onmouseout',"mouseoff(this)");
 
- 		   childPanel1_title4.setAttribute('onclick',"menu_click(this)");
 
- 		   maintenancePersonHtml.appendChild(childPanel1_title4);
 
- 		   var childPanel1_title5 = document.createElement('div');
 
- 		   childPanel1_title5.setAttribute('class','inspectors_title4_div');
 
- 		   childPanel1_title5.setAttribute('id','inspectors_title4_div');
 
- 		   childPanel1_title5.setAttribute('onmouseover',"mouseon(this)");
 
- 		   childPanel1_title5.setAttribute('onmouseout',"mouseoff(this)");
 
- 		   childPanel1_title5.setAttribute('onclick',"menu_click(this)");
 
- 		   maintenancePersonHtml.appendChild(childPanel1_title5);
 
- 		   var childPanel1_title6 = document.createElement('div');
 
- 		   childPanel1_title6.setAttribute('class','inspectors_title5_div');
 
- 		   childPanel1_title6.setAttribute('id','inspectors_title5_div');
 
- 		   childPanel1_title6.setAttribute('onmouseover',"mouseon(this)");
 
- 		   childPanel1_title6.setAttribute('onmouseout',"mouseoff(this)");
 
- 		   childPanel1_title6.setAttribute('onclick',"menu_click(this)");
 
- 		   maintenancePersonHtml.appendChild(childPanel1_title6);
 
- 		   var childPanel1_title7 = document.createElement('div');
 
- 		   childPanel1_title7.setAttribute('class','inspectors_title6_div');
 
- 		   childPanel1_title7.setAttribute('id','inspectors_title6_div');
 
- 		   childPanel1_title7.setAttribute('onmouseover',"mouseon(this)");
 
- 		   childPanel1_title7.setAttribute('onmouseout',"mouseoff(this)");
 
- 		   childPanel1_title7.setAttribute('onclick',"menu_click(this)");
 
- 		   maintenancePersonHtml.appendChild(childPanel1_title7);
 
- 		 }
 
- 	
 
- 	changeon1 = function(obj){
 
- 	      var selected = sm1.getSelection();
 
- 	      var id = selected[0].raw.id
 
- 	   var xid = obj.value;
 
- 	   var query = new Object();
 
- 	  if(xid.length>0){
 
- 	    query.xid = xid;
 
- 	  }
 
- 	  query.id = id;
 
- 	  // query.V_LOGINNAME = V_LOGINNAME;
 
- 	  // query.V_PASSWORD =  V_PASSWORD;
 
- 	  var jsonstr = Ext.JSON.encode(query);
 
- 	     myStore1.getProxy().extraParams = {
 
- 	      queryJson : jsonstr
 
- 	     };
 
- 	     Ext.getCmp('InspectorsListPageToolbar3').moveFirst();
 
- 	 }
 
- 	
 
- //		var childPanel2 = function() {
 
- //				var maintenancePersonHtml2 = document.getElementById('InspectorsHtml2');
 
- //				var divhiddle = document.createElement('div');
 
- //			    divhiddle.id='div26_id_inspectorsPanel3';
 
- //			    divhiddle.setAttribute('class','SpringHandleHtml3DivHiddle');
 
- //			    maintenancePersonHtml2.appendChild(divhiddle);
 
- //				var childPanel2_title = document.createElement('div');
 
- //				childPanel2_title.setAttribute('class','maintenancePerson_title211_div');
 
- //				childPanel2_title.innerHTML='班组名称';
 
- //				maintenancePersonHtml2.appendChild(childPanel2_title);
 
- //		 		var childPanel2_input = document.createElement('input');
 
- //		 		childPanel2_input.setAttribute('class','maintenancePerson_input211_class');
 
- //		 		childPanel2_input.setAttribute('id','inspectors_title211_input');
 
- //		 		childPanel2_input.setAttribute('type','text');
 
- //		 		childPanel2_input.setAttribute('value','');
 
- //		 		maintenancePersonHtml2.appendChild(childPanel2_input);
 
- //		 		var childPanel2_title1 = document.createElement('div');
 
- //		 		childPanel2_title1.setAttribute('class','maintenancePerson_title111_div');
 
- //		 		childPanel2_title1.innerHTML='负责人';
 
- //				maintenancePersonHtml2.appendChild(childPanel2_title1);
 
- //				var select = document.createElement('select');
 
- //				   select.setAttribute('class','maintenancePerson_input111_class');
 
- //				   select.setAttribute('onchange',"changeon1(this)");
 
- //				   select.setAttribute('id','inspectors_title111_input');
 
- //				   maintenancePersonHtml2.appendChild(select);
 
- //				   for(var i=0;i<ConfirmStore.length;i++){
 
- //				    var option3 = document.createElement('option');
 
- //				    option3.innerHTML=ConfirmStore[i].name;
 
- //				    option3.setAttribute('value',ConfirmStore[i].rid);
 
- //				    select.appendChild(option3); 
 
- //				   }
 
- //		 		var childPanel2_title2 = document.createElement('div');
 
- //		 		childPanel2_title2.setAttribute('class','inspectors_title11_div');
 
- //		 		childPanel2_title2.setAttribute('id','inspectors_title11_div');
 
- //		 		childPanel2_title2.setAttribute('onmouseover',"mouseon1(this)");
 
- //		 		childPanel2_title2.setAttribute('onmouseout',"mouseoff1(this)");
 
- //		 		childPanel2_title2.setAttribute('onclick',"menu_click(this)");
 
- //		 		maintenancePersonHtml2.appendChild(childPanel2_title2);
 
- //		 		var childPanel2_title3 = document.createElement('div');
 
- //		 		childPanel2_title3.setAttribute('class','inspectors_title21_div');
 
- //		 		childPanel2_title3.setAttribute('id','inspectors_title21_div');
 
- //		 		childPanel2_title3.setAttribute('onmouseover',"mouseon1(this)");
 
- //		 		childPanel2_title3.setAttribute('onmouseout',"mouseoff1(this)");
 
- //		 		childPanel2_title3.setAttribute('onclick',"menu_click(this)");
 
- //		 		maintenancePersonHtml2.appendChild(childPanel2_title3);
 
- //		    }
 
- 	
 
- 	var childPanel2 = function() {
 
- 		var maintenancePersonHtml2 = document.getElementById('InspectorsHtml2');
 
- 		var divhiddle = document.createElement('div');
 
- 	    divhiddle.id='div26_id_inspectorsPanel3';
 
- 	    divhiddle.setAttribute('class','SpringHandleHtml3DivHiddle');
 
- 	    maintenancePersonHtml2.appendChild(divhiddle);
 
- 	    var title = document.createElement('div');
 
- 		   title.setAttribute('class','MaintenancePersonTitle123');
 
- 		   title.innerHTML='班组列表';
 
- 		   maintenancePersonHtml2.appendChild(title);			
 
-  		var childPanel2_title2 = document.createElement('div');
 
-  		childPanel2_title2.setAttribute('class','inspectors_title11_div');
 
-  		childPanel2_title2.setAttribute('id','inspectors_title11_div');
 
-  		childPanel2_title2.setAttribute('onmouseover',"mouseon1(this)");
 
-  		childPanel2_title2.setAttribute('onmouseout',"mouseoff1(this)");
 
-  		childPanel2_title2.setAttribute('onclick',"menu_click(this)");
 
-  		maintenancePersonHtml2.appendChild(childPanel2_title2);
 
-  		var childPanel2_title3 = document.createElement('div');
 
-  		childPanel2_title3.setAttribute('class','inspectors_title21_div');
 
-  		childPanel2_title3.setAttribute('id','inspectors_title21_div');
 
-  		childPanel2_title3.setAttribute('onmouseover',"mouseon1(this)");
 
-  		childPanel2_title3.setAttribute('onmouseout',"mouseoff1(this)");
 
-  		childPanel2_title3.setAttribute('onclick',"menu_click(this)");
 
-  		maintenancePersonHtml2.appendChild(childPanel2_title3);
 
-     }
 
- 	
 
- 	var childPanel3 = function(){
 
- 		var maintenancePersonHtml3 = document.getElementById('InspectorsHtml3');
 
- 		var divhiddle = document.createElement('div');
 
- 	    divhiddle.id='div26_id_inspectorsHtml3Panel3';
 
- 	    divhiddle.setAttribute('class','SpringHandleHtml3DivHiddle');
 
- 	    maintenancePersonHtml3.appendChild(divhiddle);
 
- 	    var title1 = document.createElement('div');
 
- 		   title1.setAttribute('class','MaintenancePersonTitle123');
 
- 		   title1.innerHTML='班组详情';
 
- 		   maintenancePersonHtml3.appendChild(title1);
 
- 		var childPanel2_title = document.createElement('div');
 
- 		childPanel2_title.setAttribute('class','maintenancePerson_title211_div');
 
- 		childPanel2_title.innerHTML='班组名称';
 
- 		maintenancePersonHtml3.appendChild(childPanel2_title);
 
- 			var childPanel2_input = document.createElement('input');
 
- 			childPanel2_input.setAttribute('class','maintenancePerson_input211_class');
 
- 			childPanel2_input.setAttribute('id','inspectors_title211_input');
 
- 			childPanel2_input.setAttribute('type','text');
 
- 			childPanel2_input.setAttribute('value','');
 
- 			maintenancePersonHtml3.appendChild(childPanel2_input);
 
- 			var childPanel2_title1 = document.createElement('div');
 
- 			childPanel2_title1.setAttribute('class','maintenancePerson_title111_div');
 
- 			childPanel2_title1.innerHTML='负责人';
 
- 			maintenancePersonHtml3.appendChild(childPanel2_title1);
 
- 		var select = document.createElement('select');
 
- 		   select.setAttribute('class','maintenancePerson_input111_class');
 
- 		   select.setAttribute('onchange',"changeon1(this)");
 
- 		   select.setAttribute('id','inspectors_title111_input');
 
- 		   maintenancePersonHtml3.appendChild(select);
 
- 		   for(var i=0;i<ConfirmStore.length;i++){
 
- 		    var option3 = document.createElement('option');
 
- 		    option3.innerHTML=ConfirmStore[i].name;
 
- 		    option3.setAttribute('value',ConfirmStore[i].rid);
 
- 		    select.appendChild(option3); 
 
- 		   }
 
- 	   var childPanel2_title2 = document.createElement('div');
 
- 			childPanel2_title2.setAttribute('class','inspectors_title31_div');
 
- 			childPanel2_title2.setAttribute('id','inspectors_title31_div');
 
- 			childPanel2_title2.setAttribute('onmouseover',"mouseon1(this)");
 
- 			childPanel2_title2.setAttribute('onmouseout',"mouseoff1(this)");
 
- 			childPanel2_title2.setAttribute('onclick',"menu_click(this)");
 
- 			maintenancePersonHtml3.appendChild(childPanel2_title2);
 
- 		   var childPanel2_title3 = document.createElement('div');
 
- 			childPanel2_title3.setAttribute('class','inspectors_title41_div');
 
- 			childPanel2_title3.setAttribute('id','inspectors_title41_div');
 
- 			childPanel2_title3.setAttribute('onmouseover',"mouseon1(this)");
 
- 			childPanel2_title3.setAttribute('onmouseout',"mouseoff1(this)");
 
- 			childPanel2_title3.setAttribute('onclick',"menu_click(this)");
 
- 			maintenancePersonHtml3.appendChild(childPanel2_title3);
 
- 	}
 
- 	
 
- 	
 
- 	var childPanel3_fun =function(){
 
- 		  var query = new Object();
 
- 		  query.V_LOGINNAME = $("#V_LOGINNAME").val();
 
- 		  $.ajax({
 
- 		         type:'POST',
 
- 		         url: baseUrl+"iot/inspectorsx/getTeamMembersList1xj",
 
- 		         data: {
 
- 		          queryJson : Ext.JSON.encode(query)
 
- 		       },
 
- 		         success: function(result){
 
- 		             var json = eval('(' + result + ')');
 
- 		             if(json.action=='getTeamMembersList1xj'){
 
- 		                 ConfirmStore = json.RESULT;
 
- 		                 childPanel3();
 
- 		             }
 
- 		         } 
 
- 		     });
 
- 		 }
 
- 	
 
- 	var childPanel6 = Ext.create('Ext.Panel', {
 
- 		  height:maxHeight,
 
- 		  width:'20%',
 
- 		        html: '<div></div>'
 
- 	});
 
- //		var childPanel2_fun =function(){
 
- //			  var query = new Object();
 
- //			  query.V_LOGINNAME = $("#V_LOGINNAME").val();
 
- //			  $.ajax({
 
- //			         type:'POST',
 
- //			         url: baseUrl+"iot/inspectorsx/getTeamMembersList1xj",
 
- //			         data: {
 
- //			          queryJson : Ext.JSON.encode(query)
 
- //			       },
 
- //			         success: function(result){
 
- //			             var json = eval('(' + result + ')');
 
- //			             if(json.action=='getTeamMembersList1xj'){
 
- //			                 ConfirmStore = json.RESULT;
 
- //			                 childPanel2();
 
- //			             }
 
- //			         } 
 
- //			     });
 
- //			 }
 
- 	
 
- //		var childPanel3 = Ext.create('Ext.Panel', {
 
- //			  height:40,
 
- //			  width:'100%',
 
- //			        html: '<div id="inspectors_title31_div" class="inspectors_title31_div" onmouseover="mouseon1(this);" onmouseout="mouseoff1(this);" onclick="menu_click(this);"></div><div id="inspectors_title41_div" class="inspectors_title41_div" onmouseover="mouseon1(this);" onmouseout="mouseoff1(this);" onclick="menu_click(this);"></div>'
 
- //			    });
 
- 	
 
- 	var MaintenancePersonPanel = Ext.create('Ext.grid.Panel', {
 
- 		header :{
 
- 			height:0,
 
- 			border:'0px solid #000000'
 
- 		},
 
- 	    id: 'InspectorsListPanel',
 
- 	    store: myStore,
 
- 	    selModel: sm,
 
- 	    columns: [
 
- 	    	 { header: 'ID',  dataIndex: 'id',hidden:true, menuDisabled:true },
 
- 	    	 { header: '职能ID',  dataIndex: 'zn',hidden:true, menuDisabled:true },
 
- 	    	 { header: '序号',  dataIndex: 'xh', width:39, menuDisabled:true },
 
- 		     { header: '姓名', dataIndex: 'name', width:466,align:'center', menuDisabled:true },
 
- 		     { header: '手机号', dataIndex: 'phone', width:466,align:'center', menuDisabled:true },
 
- 		     { header: '职务', dataIndex: 'zn_name', width:466,align:'center', menuDisabled:true },
 
- 		     
 
- 	    ],
 
- 	    columnLines: true,
 
- 	    height: maxHeight,
 
- 	    width: '100%',
 
- 	    bbar: new Ext.PagingToolbar({  
 
-             store: myStore,  
 
-             id:'InspectorsListPageToolbar',
 
-             displayInfo: true,  
 
-             pageSize: countPerPage,  
 
-             prependButtons: true,  
 
-             displayMsg : '显示第 {0}条到 {1}条记录,总共 {2}条',     
 
-             emptyMsg : "没有记录",  
 
-             firstText: '第一页',
 
-             prevText: '前一页',
 
-             nextText: '后一页',
 
-             lastText: '最后一页',
 
-             refreshText: '刷新',
 
-         }),
 
-         frame: true,  
 
-         border:false,  
 
-         iconCls: 'icon-grid'
 
- 	});
 
- 	var MaintenancePersonPanel2 = Ext.create('Ext.grid.Panel', {
 
- 		header :{
 
- 			height:0,
 
- 			border:'0px solid #000000'
 
- 		},
 
- 		bodyStyle:'background:#121E34;',
 
- 	    id: 'InspectorsListPanel2',
 
- 	    store: myStore2,
 
- 	    region:'center',
 
- 	    selModel: sm1,
 
- 	    columns: [
 
- 	    	 { header: 'ID',  dataIndex: 'id',hidden:true, menuDisabled:true },
 
- 	    	 { header: '责任人ID',  dataIndex: 'person_liable_id',hidden:true, menuDisabled:true },
 
- 	    	 { header: '序号',  dataIndex: 'xh', width:35, menuDisabled:true },
 
- 		     { header: '班组名称', dataIndex: 'team_name', width:340,align:'center', menuDisabled:true },    
 
- 	    ],
 
- 	    columnLines: true,
 
- 	    height: maxHeight,
 
- 	    width: '30%',
 
- 	    listeners: {
 
- 	        select: function(dataview,record,index) {//record被选中时产生的事件
 
- 	         var label = record.get('team_name');
 
- 	         var label1 = record.get('id');
 
- 	         var label2 = record.get('person_liable_id');
 
- 	         var query = new Object();
 
- 	         if(label1.length>0){
 
- 	           query.id = label1;
 
- 	         }
 
- 	         // query.V_LOGINNAME = V_LOGINNAME;
 
- 	         // query.V_PASSWORD =  V_PASSWORD;
 
- 	         var jsonstr = Ext.JSON.encode(query);
 
- 	            myStore1.getProxy().extraParams = {
 
- 	             queryJson : jsonstr
 
- 	            };
 
- 	            Ext.getCmp('InspectorsListPageToolbar3').moveFirst();
 
- 	            document.getElementById('inspectors_title211_input').value = label;
 
- 	            document.getElementById('inspectors_title111_input').value = label2;
 
- //	         Ext.MessageBox.alert("标题触发了"+label);
 
- 	        }
 
- //	              itemdblclick: function () {
 
- //	               Ext.MessageBox.alert("标题离开了");
 
- //	              }
 
- 	          },
 
- 	    bbar: new Ext.PagingToolbar({  
 
-             store: myStore2,  
 
-             id:'InspectorsListPageToolbar2',
 
- //            displayInfo: true,  
 
- //            pageSize: countPerPage,  
 
- //            prependButtons: true,  
 
- //            displayMsg : '显示第 {0}条到 {1}条记录,总共 {2}条',     
 
- //            emptyMsg : "没有记录",  
 
- //            firstText: '第一页',
 
- //            prevText: '前一页',
 
- //            nextText: '后一页',
 
- //            lastText: '最后一页',
 
- //            refreshText: '刷新',
 
-         }),
 
- //        frame: true,  
 
-         border:false,  
 
-         iconCls: 'icon-grid'
 
- 	});
 
- 	var MaintenancePersonPanel3 = 
 
- 		Ext.create('Ext.grid.Panel', {
 
- 		header :{
 
- 			height:0,
 
- 			border:'0px solid #000000'
 
- 		},
 
- 	    id: 'InspectorsListPanel3',
 
- 	    store: myStore1,
 
- 	    region:'center',
 
- 	    selModel: addsm,
 
- 	    columns: [
 
- 	    	 { header: 'ID',  dataIndex: 'rid',hidden:true, menuDisabled:true },
 
- 	    	 { header: '责任人ID', dataIndex: 'person_liable_id',hidden:true, menuDisabled:true},
 
- 	    	 { header: '班组ID', dataIndex: 'tdid',hidden:true, menuDisabled:true},
 
- 	    	 { header: '默认值', dataIndex: 'pd',hidden:true, menuDisabled:true},
 
- 	    	 { header: '序号',  dataIndex: 'xh', width:35, menuDisabled:true },
 
- 		     { header: '组员', dataIndex: 'name', width:633,align:'center', menuDisabled:true },
 
- //		     { header: '', dataIndex: 'zrr', width:267,align:'center', menuDisabled:true },
 
- 		     
 
- 	    ],
 
- 	    columnLines: true,
 
- 	    height: maxHeight,
 
- 	    width: '50%',
 
- 	    listeners:{
 
- 	    	
 
- 	         viewready:function(){
 
- 	         var hd_checker = this.getEl().select('div.x-grid3-hd-checker');
 
- //	         if (hd_checker.hasClass('x-grid3-hd-checker')) {   
 
- //	                hd_checker.removeClass('x-grid3-hd-checker'); // 去掉全选框 
 
- //	            } 
 
- 	        }
 
- 	    },
 
- 	    bbar: new Ext.PagingToolbar({  
 
-             store: myStore1,  
 
-             id:'InspectorsListPageToolbar3',
 
-             displayInfo: true,  
 
-             pageSize: countPerPage,  
 
-             prependButtons: true,  
 
-             displayMsg : '显示第 {0}条到 {1}条记录,总共 {2}条',     
 
-             emptyMsg : "没有记录",  
 
-             firstText: '第一页',
 
-             prevText: '前一页',
 
-             nextText: '后一页',
 
-             lastText: '最后一页',
 
-             refreshText: '刷新',
 
-         }),
 
-         border:false,
 
-         iconCls: 'icon-grid'
 
- 	});
 
- 	var piebar = Ext.create('Ext.panel.Panel',{
 
- 		id:'InspectorsHtml',
 
- 		width:'100%',
 
- 		height:188,
 
- 		region:'north',
 
- 		layout:'form',
 
- 		defaults:{  
 
-             border:false
 
-         }
 
- //        items: [childPanel1]
 
- 	});
 
- 	var piebar2 = Ext.create('Ext.panel.Panel',{
 
- 		id:'InspectorsHtml2',
 
- 		width:'30%',
 
- 		height:140,
 
- 		bodyStyle:'background:#121E34;',
 
- 		region:'north',
 
- 		layout:'form',
 
- 		defaults:{  
 
-             border:false
 
-         }
 
- //        items: [childPanel2]
 
- 	});
 
- 	var piebar3 = Ext.create('Ext.panel.Panel',{
 
- 		id:'InspectorsHtml3',
 
- 		width:'50%',
 
- 		height:140,
 
- 		region:'north',
 
- 		layout:'form',
 
- 		defaults:{  
 
-             border:false
 
-         },
 
- //        items: [childPanel3]
 
- 	});
 
- 	panel1 = Ext.create('Ext.panel.Panel',{
 
- 		width:'100%',
 
- 		id: 'InspectorsPiebar',
 
- 		layout:'border',
 
- 		items:[
 
- 			piebar,MaintenancePersonPanel
 
- 		],
 
- 	    
 
-     });
 
- 	
 
- 	var piebar4 = Ext.create('Ext.panel.Panel',{
 
- 		id:'InspectorsHtml4',
 
- 		width:'30%',
 
- 		region:'west',
 
- 		layout:'border',
 
- 		bodyStyle:'background:#121E34;border-radius:20px;padding:10px;',
 
- 		padding:10,
 
- 		items:[
 
- 			piebar2,MaintenancePersonPanel2
 
- 		]
 
- 	});
 
- 	
 
- 	var piebar5 = Ext.create('Ext.panel.Panel',{
 
- 		id:'InspectorsHtml5',
 
- 		width:'50%',
 
- 		region:'center',
 
- 		layout:'border',
 
- 		bodyStyle:'padding:10px;',
 
- 		padding:10,
 
- 		items:[
 
- 			piebar3,MaintenancePersonPanel3
 
- 		]
 
- 	});
 
- 	
 
- 	var piebar6 = Ext.create('Ext.panel.Panel',{
 
- 		id:'InspectorsHtml6',
 
- 		width:'20%',
 
- 		region:'east',
 
- 		layout:'form',
 
- 		defaults:{  
 
-             border:false
 
-         },
 
-         items: [childPanel6]
 
- 	});
 
- 	
 
- 	panel2 = Ext.create('Ext.panel.Panel',{
 
- 			width:'100%',
 
- 			id: 'InspectorsPiebar2',
 
- 			layout:'border',
 
- 			items:[
 
- 				piebar4,piebar5,piebar6
 
- 			],
 
- 		    
 
- 	});
 
- 	
 
- //	panel2 = Ext.create('Ext.panel.Panel',{
 
- //			width:'100%',
 
- //			id: 'InspectorsPiebar2',
 
- //			layout:'border',
 
- //			items:[
 
- //				piebar2,MaintenancePersonPanel2,MaintenancePersonPanel3,piebar3
 
- //			],
 
- //		    
 
- //	});
 
- 	
 
- 	Ext.create('Ext.tab.Panel', {
 
- 	     width: '100%',
 
- 	     id: 'InspectorsTab',
 
- 	     activeTab: 0,
 
- 	     items: [
 
- 	         {
 
- 	          itemId:'person',
 
- 	             title: '人员列表',
 
- 	             items : [panel1]
 
- 	         },
 
- 	         {
 
- 	          itemId:'team',
 
- 	             title: '班组详情',
 
- 	             items : [panel2]
 
- 	         }
 
- 	     ],
 
- 	     listeners:{
 
- 	            'tabchange':function (t, n) {
 
- 	             var item = n.itemId;
 
- 	             if(item=='team'){
 
- 	             if(document.getElementById('div26_id_inspectorsPanel3')==undefined)
 
- 	              childPanel2();
 
- 	             if(document.getElementById('div26_id_inspectorsHtml3Panel3')==undefined)
 
- 			      childPanel3_fun();
 
- 	              myStore2.reload();
 
- 	             }
 
- 	            }
 
- 	        },
 
- 	     renderTo : Ext.getBody()
 
- 	     
 
- 	 });
 
- 	myStore.reload();
 
- 	mystore2_fun(0);
 
- 	childPanel1();
 
- 	$(window).resize(function(){
 
-     	body_resize();
 
-     	body_resize1();
 
-     });
 
- 	body_resize1();	
 
- 	body_resize();
 
- });
 
 
  |