4683f29be1a96c34d3dc6efab314050ba74b9894.svn-base 897 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. function getTableParamName(obj){
  2. var arr = [];
  3. var columnObj = obj[0]['columns'];
  4. for(var i=0;i<columnObj.length;i++){
  5. var disObj = columnObj[i];
  6. if(disObj["name"]&&!disObj["hide"]){
  7. arr.push(disObj["name"]);
  8. }
  9. }
  10. return arr;
  11. }
  12. function getTableParam(obj){
  13. var arr = [];
  14. for(var i=0;i<obj.length;i++){
  15. if(obj[i]["columns"]){
  16. var columnObj = obj[i]["columns"];
  17. for(var j=0;j<columnObj.length;j++){
  18. var disObj = columnObj[j];
  19. if(disObj["columns"]){
  20. var disObj1 = disObj["columns"];
  21. for(var k=0;k<disObj1.length;k++){
  22. if(disObj1[k]["name"]&&!disObj1[k]["hide"]){
  23. arr.push(disObj1[k]["name"]);
  24. }
  25. }
  26. }
  27. }
  28. }
  29. }
  30. return arr;
  31. }
  32. function checkNew(arr,obj){
  33. for(var i=0;i<arr.length;i++){
  34. if(obj[arr[i]]){
  35. return true;
  36. }
  37. }
  38. return false;
  39. }