(JS)仅作个人记录,愿意看的就看吧!

function CE_CompanyObjSub(cmpId,allData,allDataEdit,tableType)
{
 this.tableType = tableType;
 this.cmpId = cmpId;
 this.allData = allData;
 this.allDataEdit = allDataEdit;

 this.cmpTabId = null;
 this.cmpTableId = null;
 this.funcTableId = null;

 this.currData = new Array();
 this.OUTLOOK = new Array();
 this.selectedArray = new Array();
 this.criterionArray = new Array();
  
 this.parseAllData = ComParserAllDataSub;
 this.sepArray = ComSepArraySub;
 this.initComTable = ComInitComTableSub;

 this.checkAllChild = ComCheckAllChildSub;
 this.checkParent = ComCheckParentSub;
 this.addselectedFC = ComAddselectedFCSub;

 this.generateXML = ComgenerateXMLSub;
 this.parserArray = ComparserArraySub;

 this.editFunc = ComEditFunc;
}


function InitAllSub(cmpId,allData,allDataEdit,tableType)
{
 if(allData == null || allData.length == 0)
 {
  _alertMsg += "This is no fap!";
  return;
 }
 var obj = new CE_CompanyObjSub(cmpId,allData,allDataEdit,tableType);
 cmSubArray.push(obj);
 obj.parseAllData();
 obj.sepArray();
 obj.initComTable();
 
 if(allDataEdit == null || allDataEdit.length == 0)
  return;
  
 obj.editFunc();
}

function ComParserAllDataSub()
{
 this.currData = this.allData; 
}

function ComSepArraySub()
{
      var strCon=20;
   TransStatus="Ready";
      WorkWindow=top.work;
      CommonData=top.commondata;
      WorkWindowSet=top.bottomwork;
      moduseq=-1;
      grpseq=-1;
      funcseq=-1;
      modulen=0;
      grplen=0;
        
       for(i=0;i<this.currData.length;i++)
          {
    varmoduId = this.currData[i][0];
    varmodu = this.currData[i][1];
    varfuncId = this.currData[i][2];
    varfunc = this.currData[i][3];
    if(bar)
     varfuncDesc = this.currData[i][4];
   
   
       modulen=this.OUTLOOK.length;
          for(m=0;m<modulen;m++)
       {
        if(this.OUTLOOK[m][0]==varmoduId + ":" + varmodu)
        {
                       moduseq=m;
                      grplen=this.OUTLOOK[m].length;
                      for(n=1;n<grplen;n++)
                         {
                             if(this.OUTLOOK[m][n][0]==varfuncId + ":" + varfunc + ":" + varfuncDesc)
                             {
                                grpseq=n;
                                break;
                             }
                         }
         }
       }
    if(moduseq==-1)
    {
          this.OUTLOOK[modulen]=new Array();
          this.OUTLOOK[modulen][0]=varmoduId + ":" + varmodu;
          this.OUTLOOK[modulen][1]=new Array();
          this.OUTLOOK[modulen][1][0]=varfuncId + ":" + varfunc + ":" + varfuncDesc;
          moduseq=modulen;
          grpseq=1;
     }
     else
     {
         if(grpseq==-1)
         {
            grpseq=this.OUTLOOK[moduseq].length;
            this.OUTLOOK[moduseq][grpseq]=new Array();
            this.OUTLOOK[moduseq][grpseq][0]=varfuncId + ":" + varfunc + ":" + varfuncDesc;
            }
     }
    moduseq=-1;
    grpseq=-1;
   }
  
}

你可能感兴趣的:((JS)仅作个人记录,愿意看的就看吧!)