videoFile.html 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. <!DOCTYPE html PUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title></title>
  6. <!--引用jquery-->
  7. <script type="text/javascript" src="/js/service.js"></script>
  8. <script type="text/javascript" src="/js/session.js"></script>
  9. <script type="text/javascript" src="/js/getService.js"></script>
  10. <script type="text/javascript" src="/js/service/method-get-service.js"></script>
  11. <script type="text/javascript" src="/lib/jquery-3.4.1.js"></script>
  12. <script type="text/javascript" src="/lib/jquery-3.4.1.min.js"></script>
  13. <script type="text/javascript" src="/lib/layer.js"></script>
  14. <script type="text/javascript">
  15. var srcwidth = 900; //整个面板的宽
  16. var currRow = 0; //当前操作的行
  17. var HtmlUtil = {
  18. /*1.用浏览器内部转换器实现html转码*/
  19. htmlEncode:function (html){
  20. //1.首先动态创建一个容器标签元素,如DIV
  21. var temp = document.createElement ("div");
  22. //2.然后将要转换的字符串设置为这个元素的innerText(ie支持)或者textContent(火狐,google支持)
  23. (temp.textContent != undefined ) ? (temp.textContent = html) : (temp.innerText = html);
  24. //3.最后返回这个元素的innerHTML,即得到经过HTML编码转换的字符串了
  25. var output = temp.innerHTML;
  26. temp = null;
  27. return output;
  28. },
  29. /*2.用浏览器内部转换器实现html解码*/
  30. htmlDecode:function (text){
  31. //1.首先动态创建一个容器标签元素,如DIV
  32. var temp = document.createElement("div");
  33. //2.然后将要转换的字符串设置为这个元素的innerHTML(ie,火狐,google都支持)
  34. temp.innerHTML = text;
  35. //3.最后返回这个元素的innerText(ie支持)或者textContent(火狐,google支持),即得到经过HTML解码的字符串了。
  36. var output = temp.innerText || temp.textContent;
  37. temp = null;
  38. return output;
  39. }
  40. };
  41. $(function () {
  42. // $("#showAll").hide();
  43. const hm = getService.methodGet("/fbsViewAll/fbsViewAll/list");
  44. if(hm == null){
  45. $("#showAll").hide();
  46. }else{
  47. var decodeHtml = HtmlUtil.htmlDecode(hm.allFile);
  48. decodeHtml = decodeURIComponent(decodeURI(decodeHtml));
  49. $("#showAll").html(decodeHtml);
  50. }
  51. $('#ggkb').bind("click",function(){
  52. // console.log(htmlencode(hm.allFile));
  53. // var txt;
  54. // if (confirm("确定要保存此页面吗?")) {
  55. // txt = "您按了确定";
  56. // } else {
  57. // txt = "您按了取消";
  58. // }
  59. });
  60. srcwidth = $(window).width();
  61. const nameAll = document.getElementsByName('testFileName');
  62. //绑定需要拖拽改变大小的元素对象 每行的第一列 暂时支持一行两列
  63. // $.each(nameAll, function (i, n) {
  64. // bindResize(n);
  65. // })
  66. // bindResize(nameAll[0]);
  67. // bindResize(document.getElementById('p10'));
  68. // bindResize(document.getElementById('p20'));
  69. });
  70. function bindResize(el) {
  71. var els = el.style,
  72. x = y = 0;
  73. $(el).mousedown(function (e) {
  74. currRow = el.id;
  75. x = e.clientX - el.offsetWidth,
  76. y = e.clientY - el.offsetHeight;
  77. el.setCapture ? (
  78. el.setCapture(),
  79. el.onmousemove = function (ev) {
  80. mouseMove(ev || event);
  81. },
  82. el.onmouseup = mouseUp
  83. ) : (
  84. $(document).bind("mousemove", mouseMove).bind("mouseup", mouseUp)
  85. );
  86. e.preventDefault();
  87. });
  88. //移动事件
  89. function mouseMove(e) {
  90. els.width = e.clientX - x + 'px',
  91. els.height = e.clientY - y + 'px';
  92. var cx = currRow.substr(1, 1); //当前行
  93. var cy = currRow.substr(2, 1); //当前列
  94. var docCur = $("#p" + cx + cy); //current row colum
  95. docCur.css({ "width": ((parseInt(docCur.css("width").replace("px", ""))) > srcwidth ? srcwidth : (parseInt(docCur.css("width")))) });
  96. var docCurCopy = docCur;
  97. var cya = parseInt(cy) + 1; //当前列+1
  98. var docNCol = $("#p" + cx + cya); //next colum
  99. if (docNCol != null) {
  100. docNCol.css({ "left": (parseInt(docCur.css("left").replace("px", ""))) + (parseInt(docCur.css("width").replace("px", ""))) });
  101. docNCol.css({ "width": (srcwidth - (parseInt(docCur.css("width").replace("px", "")))) });
  102. docNCol.css({ "top": (docCur.css("top")) });
  103. docNCol.css({ "height": docCur.css("height") });
  104. }
  105. for (var i = 1; i < 4; i++) {
  106. var cxa = parseInt(cx) + i; //当前行+1
  107. var docNRow = $("#p" + cxa + cy); //next row
  108. if (docNRow != null) {
  109. docNRow.css({ "left": (parseInt(docCurCopy.css("left").replace("px", ""))) });
  110. docNRow.css({ "top": (parseInt(docCurCopy.css("top").replace("px", ""))) + (parseInt(docCurCopy.css("height").replace("px", ""))) });
  111. var docNCol = $("#p" + cxa + 1); //next colum
  112. if (docNCol != null) {
  113. docNCol.css({ "left": (parseInt(docNRow.css("left").replace("px", ""))) + (parseInt(docNRow.css("width").replace("px", ""))) });
  114. docNCol.css({ "width": (srcwidth - (parseInt(docNRow.css("width").replace("px", "")))) });
  115. docNCol.css({ "top": (docNRow.css("top")) });
  116. docNCol.css({ "height": docNRow.css("height") });
  117. }
  118. }
  119. docCurCopy = docNRow;
  120. }
  121. $("#megshow").html("#p" + els.width + els.height);
  122. }
  123. //停止事件
  124. function mouseUp() {
  125. el.releaseCapture ? (
  126. el.releaseCapture(),
  127. el.onmousemove = el.onmouseup = null
  128. ) : (
  129. $(document).unbind("mousemove", mouseMove).unbind("mouseup", mouseUp)
  130. );
  131. }
  132. }
  133. </script>
  134. <style type="text/css">
  135. #p00 { top: 100px; left: 200px; background: #f1f1f1; margin-bottom: 10px;;float:left;
  136. text-align: center; line-height: 100px; border: 1px solid #CCC; cursor: se-resize; }
  137. #p10 { top: 400px; left: 100px; background: #f1f1f1; margin-bottom: 10px;float:left;
  138. text-align: center; line-height: 100px; border: 1px solid #CCC; cursor: se-resize; }
  139. #p20 { top: 400px; left: 100px; background: #f1f1f1; margin-bottom: 10px;float: left;;
  140. text-align: center; line-height: 100px; border: 1px solid #CCC; cursor: se-resize; }
  141. </style>
  142. </head>
  143. <body>
  144. <div id="showAll" style="height: 100%;width: 100%;">
  145. </div>
  146. <script src="/lib/echarts/echarts.min.js"></script>
  147. <script src="/lib/echarts/theme/macarons.js"></script>
  148. <script src="/lib/vue.min.js"></script>
  149. <script src="/js/service/produce-task.js"></script>
  150. <link href="/lib/bootstrap/bootstrap.min.css" rel="stylesheet" />
  151. <link href="/css/dashboard.css" rel="stylesheet" />
  152. <script type="text/javascript">
  153. </script>
  154. </body>
  155. </html>