Use the tree institutions sector organizations
Keyword Description: . 1 .orgcode: Organization encoding 2 .parent_code: encoding a parent organization code
3.CFW.dialog.dclose (): Close the window frame js method
4.onclick: onclick event
Organization tree scenarios:
1. The administrative area of the tree display, such as China -----> provinces, municipalities and autonomous regions (Beijing, Tianjin, Hebei, Henan .........) -----> Area ( including Beijing Dongcheng, Xicheng district ........) -----> streets
2. Display tree sectors, such as the emergency management system (or local government) ------> City -----> Department ------> lower sector
Additions and deletions to change search tree organization:
Main business: recursively traverse demonstrate all agencies and child nodes of the tree,
(1) adding mechanism: Click the nodes of the tree selection mechanism ------> Click the Add button agency ----> new institution (institutional code of the parent class parent_code get the new institutions is clicked agency encoding means orgcode node)
(2) Edit institutions: improper editing means you can change the name of the selected organizations and institutions can also change the owning node, and when your group parent_code changing mechanism will change the refresh tree tree
Personnel information services:
Selection mechanism tree on the left node, right side to show a list of personnel information according to nodes on the left side orgcode
Add and save onclick = "saveInfo ( 'yes')"
保存 onclick="saveInfo('no',AddDialog')"
Cancel: onclick = "CFW.dialog.dclose ( 'AddDialog')" is to close the pop-up port
function SaveInfo (isAdd, DialogID) { jQuery.ajax ({ // path URL: global.webapp + "! / WOR / checkUrnam saveIfo.do" , // transmission mode post code type: "post" , // table data format is JSON dataType: "JSON" , data: { // already stated the data format, data format that will use the uname: document.getElementById ( "name" ) .Value }, // if asynchronous the async: to true , // after the successful operation of the data returned is locally changed dynamic pages success: function(data){ var jsonObj=jQuery.parseJSON(data); if(jsonObj.success == true){ CFW.dialog.msgDialog("保存成功",function(){ if(isAdd=="yes"){ document.getElementById("name").value="";
document.getElementById("email").value="";
document.getElementById("fax").value="";
document.getElementById("tel").value="";
document.getElementById("homeTel").value=""; document.getElementById("remak").value=""; refreshOrgTree(); }else{ CFW.dialog.dclose(dialogId); backOrgPeopelList(); } }) } } });// refresh means tree }
function refreshOrgTree(){
CFW.tree.divtree.refreshOrgTree("orgtree");
}
//刷新信息列表
function backOrgPeopelList(){
CFW.list.refreshList("personSearch");
}