VideoDeviceIndex.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /**
  2. * fireDeviceIndex.js
  3. */
  4. var baseUrl;
  5. var theme;
  6. var return_login;
  7. var V_LOGINNAME='',V_PASSWORD='';
  8. var maxWidth=10000,maxHeight=10000;
  9. var company_code='';
  10. var body_resize = function(){
  11. maxHeight = document.documentElement.clientHeight;
  12. maxWidth = document.documentElement.clientWidth;
  13. Ext.getCmp('rtu_frame').setHeight(maxHeight);
  14. Ext.getCmp('rtu_frame').setWidth(maxWidth);
  15. }
  16. Ext.onReady(function(){
  17. baseUrl = document.getElementById('basePath').value;
  18. theme = document.getElementById('theme').value;
  19. $("#V_LOGINNAME").val(sessionStorage.getItem('V_LOGINNAME'));
  20. $("#V_PASSWORD").val(sessionStorage.getItem('V_PASSWORD'));
  21. V_LOGINNAME = $("#V_LOGINNAME").val();
  22. V_PASSWORD = $("#V_PASSWORD").val();
  23. company_code = $("#company_code").val();
  24. maxHeight = document.documentElement.clientHeight;
  25. maxWidth = document.documentElement.clientWidth;
  26. return_login = function(){
  27. window.parent.document.location=baseUrl;
  28. }
  29. Ext.create('Ext.tab.Panel',{
  30. id:'rtu_frame',
  31. width:maxWidth,
  32. height:maxHeight,
  33. renderTo:document.body,
  34. items:[
  35. {
  36. title:'离线情况',
  37. html:'<iframe id="subVideoDevice" name="subVideoDevice" src="subVideoDevice.jsp?theme='+theme+'&company_code='+company_code+'" style="width:100%;height:100%;" frameborder="0"></iframe>'
  38. }
  39. ]
  40. });
  41. $(window).resize(function(){
  42. body_resize();
  43. });
  44. body_resize();
  45. });