test.html 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524
  1. <!--
  2. * @Author: your name
  3. * @Date: 2021-09-28 15:46:22
  4. * @LastEditTime: 2021-09-28 15:46:22
  5. * @LastEditors: Please set LastEditors
  6. * @Description: In User Settings Edit
  7. * @FilePath: /MedicalWisdomCheckSys/src/test.html
  8. -->
  9. <html>
  10. <head>
  11. <title>&#38382;&#39064;&#27719;&#24635;</title>
  12. <meta http-equiv="X-UA-Compatible" content="chrome=1">
  13. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  14. <meta name="author" content="FineReport"/>
  15. <meta name="Copyright" content="FineReport"/>
  16. <meta name="description" content="FineReport--Web Reporting Tool"/>
  17. <meta name="keywords" content="FineReport,Web Reporting Tool"/>
  18. <link rel="stylesheet" type="text/css"
  19. href="http://112.124.59.133:8804/webroot/decision/view/form?op=emb&resource=finereport.css&cssVersion=1631787909766"/>
  20. <link rel="stylesheet" type="text/css"
  21. href="http://112.124.59.133:8804/webroot/decision/view/form?op=emb&resource=toolbar.css&cssVersion=1631787909766"/>
  22. <!--插件引入的css文件-->
  23. <script type="text/javascript">
  24. window.initialWindowWidth = 600;
  25. window.initialWindowHeight = 600;
  26. </script>
  27. <script type="text/javascript"
  28. src="http://112.124.59.133:8804/webroot/decision/view/form?op=emb&resource=finereport.js&inter=zh_CN&__v__=2021.01.25.11.03.31.957&jsVersion=1631787909766"></script>
  29. <script type="text/javascript"
  30. src="http://112.124.59.133:8804/webroot/decision/view/form?op=emb&resource=finereport.chart.js&jsVersion=1631787909766"></script>
  31. <script type="text/javascript"
  32. src="http://112.124.59.133:8804/webroot/decision/view/form?op=resource&resource=/com/fr/web/core/js/socket.io.js"></script>
  33. <!--插件引入的js文件-->
  34. <style type="text/css">
  35. body.dragging, body.dragging * {
  36. cursor: move !important;
  37. }
  38. .dragged {
  39. position: absolute;
  40. opacity: 1;
  41. z-index: 2000;
  42. }
  43. #paramsTemplatePane > div {
  44. display: inline;
  45. }
  46. </style>
  47. <script type="text/javascript">
  48. </script>
  49. <script type="text/javascript"
  50. src="http://112.124.59.133:8804/webroot/decision/view/form?op=resource&resource=/com/fr/plugin/cloud/front/dist/polyfill.min.js"></script>
  51. <script type="text/javascript"
  52. src="http://112.124.59.133:8804/webroot/decision/view/form?op=resource&resource=/com/fr/plugin/cloud/front/dist/fp.min.js"></script>
  53. <script type="text/javascript"
  54. src="http://112.124.59.133:8804/webroot/decision/view/form?op=resource&resource=/com/fr/plugin/cloud/front/fine.mark.init.js"></script>
  55. <script type="text/javascript">
  56. //ie下低版本时修改浏览器渲染模式
  57. if ($.browser.msie && $.browser.version <= 8.0) {
  58. $("meta[http-equiv='X-UA-Compatible']").attr("content", "IE=5, IE=EmulateIE7, chrome=1");
  59. }
  60. $(function () {
  61. var $body = $('body');
  62. $('<form class="form-submit"></form>').attr('name', '&#38382;&#39064;&#27719;&#24635;').appendTo($body);
  63. var items = [];
  64. var scrollHeight = 6;
  65. var expandHeight = 8;
  66. var contenConfig = {
  67. "type": "border",
  68. "widgetName": "FORM",
  69. "disabled": false,
  70. "invisible": false,
  71. "widgetUrl": "http://112.124.59.133:8804/webroot/decision/view/form?op=widget&widgetname=form&sessionID=e63cf0fa-bf6e-4923-bfd6-af680379b068",
  72. "useBookMark": false,
  73. "bookMarkName": "",
  74. "vgap": 0,
  75. "hgap": 0,
  76. "compInterval": 0,
  77. "scrollable": false,
  78. "items": [{
  79. "region": "center",
  80. "el": {
  81. "type": "horizontal",
  82. "disabled": false,
  83. "invisible": false,
  84. "widgetUrl": "http://112.124.59.133:8804/webroot/decision/view/form?op=widget&widgetname=null&sessionID=e63cf0fa-bf6e-4923-bfd6-af680379b068",
  85. "useBookMark": false,
  86. "bookMarkName": "",
  87. "vgap": 0,
  88. "hgap": 0,
  89. "compInterval": 0,
  90. "scrollable": false,
  91. "items": [],
  92. "showBookmarks": false,
  93. "alignment": "center",
  94. "displayposition": 0
  95. }
  96. }],
  97. "showBookmarks": false,
  98. "__FIT__": false,
  99. "__FITSTATE__": 0,
  100. "refresh": false
  101. };
  102. var paraConfig = {
  103. "type": "parameter",
  104. "widgetName": "PARA",
  105. "disabled": false,
  106. "invisible": false,
  107. "widgetUrl": "http://112.124.59.133:8804/webroot/decision/view/form?op=widget&widgetname=para&sessionID=e63cf0fa-bf6e-4923-bfd6-af680379b068",
  108. "useBookMark": false,
  109. "bookMarkName": "",
  110. "widgetBackground": "",
  111. "vgap": 0,
  112. "hgap": 0,
  113. "compInterval": 0,
  114. "scrollable": false,
  115. "items": [{
  116. "type": "datetime",
  117. "widgetName": "开始时间",
  118. "disabled": false,
  119. "invisible": false,
  120. "needSubmit": true,
  121. "value": {"date_milliseconds": 1630425600000},
  122. "widgetUrl": "http://112.124.59.133:8804/webroot/decision/view/form?op=widget&widgetname=开始时间&sessionID=e63cf0fa-bf6e-4923-bfd6-af680379b068",
  123. "labelName": "选择时间",
  124. "useBookMark": false,
  125. "bookMarkName": "dateEditor0",
  126. "fontSize": 12,
  127. "directEdit": true,
  128. "format": "yyyy-MM-dd",
  129. "x": 367,
  130. "y": 28,
  131. "width": 110,
  132. "height": 21
  133. }, {
  134. "type": "datetime",
  135. "widgetName": "结束时间",
  136. "disabled": false,
  137. "invisible": false,
  138. "needSubmit": true,
  139. "value": {"date_milliseconds": 1632931200000},
  140. "widgetUrl": "http://112.124.59.133:8804/webroot/decision/view/form?op=widget&widgetname=结束时间&sessionID=e63cf0fa-bf6e-4923-bfd6-af680379b068",
  141. "labelName": "情境名称",
  142. "useBookMark": false,
  143. "bookMarkName": "dateEditor1",
  144. "fontSize": 12,
  145. "directEdit": true,
  146. "format": "yyyy-MM-dd",
  147. "x": 494,
  148. "y": 28,
  149. "width": 110,
  150. "height": 21
  151. }, {
  152. "type": "formsubmit",
  153. "widgetName": "BUTTON0",
  154. "disabled": false,
  155. "invisible": false,
  156. "widgetUrl": "http://112.124.59.133:8804/webroot/decision/view/form?op=widget&widgetname=button0&sessionID=e63cf0fa-bf6e-4923-bfd6-af680379b068",
  157. "listeners": [{
  158. "eventName": "click", "once": false, "action": function (e) {
  159. var as = arguments;
  160. return FR.tc(function () {
  161. ;
  162. return eval("(function(){try{this.setEnable(false);\n}catch(ex){FR.Logger.error(ex);FR.Msg.toast(FR.i18nText('Custom')+'JS'+FR.i18nText('Error')+' : '+ex.message);}}).createDelegate(this, [], 0).apply(this, arguments)");
  163. }, this, as)
  164. }
  165. }, {
  166. "eventName": "click", "once": false, "action": function (e) {
  167. var as = arguments;
  168. return FR.tc(function () {
  169. ;
  170. return eval("(function(){try{if(this.options.form!=null&&$.isFunction(this.options.form.formSubmit)){this.options.form.QueryBtn=this;var self=this;this.options.form.formSubmit({url:\"/webroot/decision/view/form?op=fr_dialog&cmd=parameters_d&sessionID=e63cf0fa-bf6e-4923-bfd6-af680379b068\",asyn:true,callback:function(){_g().once(\"afterload\",function(){self.enable()});_g().loadContentPane()}})};\n}catch(ex){FR.Logger.error(ex);FR.Msg.toast(FR.i18nText('Custom')+'JS'+FR.i18nText('Error')+' : '+ex.message);}}).createDelegate(this, [], 0).apply(this, arguments)");
  171. }, this, as)
  172. }
  173. }],
  174. "useBookMark": false,
  175. "bookMarkName": "button0",
  176. "render": true,
  177. "text": "查询",
  178. "hotkeys": "enter",
  179. "isToggle": false,
  180. "key": "formsubmit",
  181. "x": 647,
  182. "y": 28,
  183. "width": 80,
  184. "height": 21
  185. }, {
  186. "type": "combo",
  187. "widgetName": "COMBOBOX0",
  188. "disabled": false,
  189. "invisible": false,
  190. "needSubmit": true,
  191. "value": "",
  192. "Databinding": {},
  193. "widgetUrl": "http://112.124.59.133:8804/webroot/decision/view/form?op=widget&widgetname=comboBox0&sessionID=e63cf0fa-bf6e-4923-bfd6-af680379b068",
  194. "labelName": "情境名称",
  195. "useBookMark": false,
  196. "bookMarkName": "comboBox0",
  197. "fontSize": 12,
  198. "directEdit": true,
  199. "norepeat": true,
  200. "searchTime": 200,
  201. "customData": true,
  202. "autoMode": true,
  203. "mode": "remote",
  204. "controlAttr": {"value": ""},
  205. "x": 124,
  206. "y": 28,
  207. "width": 108,
  208. "height": 21
  209. }, {
  210. "type": "label",
  211. "widgetName": "LABEL0",
  212. "disabled": false,
  213. "invisible": false,
  214. "needSubmit": true,
  215. "value": "情境名称",
  216. "widgetUrl": "http://112.124.59.133:8804/webroot/decision/view/form?op=widget&widgetname=label0&sessionID=e63cf0fa-bf6e-4923-bfd6-af680379b068",
  217. "useBookMark": false,
  218. "bookMarkName": "label0",
  219. "verticalcenter": true,
  220. "textalign": "center",
  221. "decoration": "none",
  222. "color": "rgb(0,0,0)",
  223. "textColor": "0.0,0.0,0.0,1.0,",
  224. "fontsize": 12,
  225. "fontfamily": "PingFang SC",
  226. "wrap": true,
  227. "autoline": true,
  228. "x": 32,
  229. "y": 28,
  230. "width": 80,
  231. "height": 21
  232. }, {
  233. "type": "label",
  234. "widgetName": "LABEL0_C",
  235. "disabled": false,
  236. "invisible": false,
  237. "needSubmit": true,
  238. "value": "选择时间",
  239. "widgetUrl": "http://112.124.59.133:8804/webroot/decision/view/form?op=widget&widgetname=label0_c&sessionID=e63cf0fa-bf6e-4923-bfd6-af680379b068",
  240. "useBookMark": false,
  241. "bookMarkName": "label0",
  242. "verticalcenter": true,
  243. "textalign": "center",
  244. "decoration": "none",
  245. "color": "rgb(0,0,0)",
  246. "textColor": "0.0,0.0,0.0,1.0,",
  247. "fontsize": 12,
  248. "fontfamily": "PingFang SC",
  249. "wrap": true,
  250. "autoline": true,
  251. "x": 274,
  252. "y": 28,
  253. "width": 80,
  254. "height": 21
  255. }],
  256. "showBookmarks": false,
  257. "itemsIndex": ["COMBOBOX0", "开始时间", "结束时间", "BUTTON0"],
  258. "stickyItemsIndex": [],
  259. "absoluteCompState": 0,
  260. "absoluteResolutionScaleW": 1.0,
  261. "absoluteResolutionScaleH": 1.0,
  262. "hasResize": false,
  263. "paraDisplay": true,
  264. "delayDisplayContent": true,
  265. "useParamsTemplate": true,
  266. "position": "left",
  267. "width": 960,
  268. "parambg": {},
  269. "height": 65
  270. };
  271. var contentContainer = $("<div class='content-container'>");
  272. var delayDisplay = paraConfig['delayDisplayContent'];
  273. contenConfig.renderEl = contentContainer;
  274. form = new FR.contentForm(contenConfig);
  275. FR.SessionMgr.register("e63cf0fa-bf6e-4923-bfd6-af680379b068", form);
  276. items.push({
  277. region: 'center',
  278. el: contentContainer
  279. });
  280. window.globalForm = form;
  281. var barHeight = paraConfig.width > document.body.offsetWidth ? scrollHeight : 0;
  282. FR.$defaultImport('/com/fr/web/core/js/paramtemplate.js', 'js');
  283. var paramstemplateHeight = 30;
  284. var north = {
  285. region: 'north',
  286. height: paramstemplateHeight,
  287. el: {
  288. type: 'border',
  289. widgetName: 'paramsTemplate',
  290. items: [
  291. {
  292. region: 'east',
  293. width: 138,
  294. el: {
  295. type: 'horizontal',
  296. alignment: 'right',
  297. items: [{
  298. el: {
  299. type: 'button',
  300. widgetName: 'saveBtn',
  301. text: FR.i18nText("Fine-Engine_Report_Designer_Save_As_Params_Template")
  302. }, width: 128
  303. }]
  304. }
  305. }, {
  306. region: 'center',
  307. el: {
  308. type: 'horizontal',
  309. widgetName: 'paramsTemplatePane',
  310. width: paraConfig.width - 120,
  311. minWidth: paraConfig.width - 120,
  312. alignment: 'left',
  313. items: []
  314. }
  315. }, {
  316. region: 'west',
  317. width: 30,
  318. el: {
  319. type: 'horizontal',
  320. alignment: 'left',
  321. items: [
  322. {
  323. el: {
  324. type: 'iconbutton',
  325. widgetName: 'newParamsBtn',
  326. width: 30,
  327. baseClass: 'fs-new-params-template-blue'
  328. },
  329. width: 30
  330. }
  331. ]
  332. }
  333. }
  334. ]
  335. }
  336. };
  337. var paramsTemplate = getParamsTemplate(form.sessionID);
  338. if (!paraConfig.useParamsTemplate || FR.isEmpty(paramsTemplate)) {
  339. paramstemplateHeight = 0;
  340. north = {};
  341. }
  342. if (!$.isEmptyObject(paraConfig)) {
  343. var paraContainer = $("<div class='para-container' style='overflow: auto;'>");
  344. var alignLayoutName = '__layout4align__';
  345. paraContainer.height(paraConfig.height + expandHeight + barHeight + paramstemplateHeight);
  346. var $expandEl = $("<div class='parameter-container-collapseimg-up' style='cursor: pointer'></div>");
  347. bindParaCollapse($expandEl);
  348. var $center = $('<div class="pmeter-container"></div>');
  349. var south = {
  350. region: 'south', height: expandHeight, el: {
  351. type: 'horizontal',
  352. items: [
  353. {el: $expandEl, width: 120}
  354. ]
  355. }
  356. };
  357. var center = {
  358. region: 'center',
  359. el: {
  360. type: 'horizontal',
  361. widgetName: alignLayoutName,
  362. alignment: paraConfig.position,
  363. items: [
  364. {el: $center, width: paraConfig.width}
  365. ]
  366. }
  367. };
  368. var itemlst = [north, south, center];
  369. var pCon = {
  370. renderEl: paraContainer,
  371. type: 'border',
  372. items: itemlst
  373. };
  374. //有个默认的背景
  375. var bg = FR.isEmptyObj(paraConfig.parambg) ? {background: '#f7f8fa'} : paraConfig.parambg;
  376. FR.setBackground(paraContainer, bg);
  377. paraConfig.renderEl = $center;
  378. window.globalForm.parameterEl = new FR.contentForm(paraConfig);
  379. items.push({
  380. region: 'north',
  381. el: pCon
  382. });
  383. }
  384. /**
  385. * 判断尺寸,在尺寸为0的情况下返回一个默认值
  386. * 在某些情况下,如平台快速点击多个报表时,无法获取到尺寸,
  387. * 提供一个默认值,
  388. *
  389. * @param length 默认尺寸
  390. * @param defaultValue 默认值
  391. * @returns {*}
  392. */
  393. function checkSizeOrDefault(length, defaultValue) {
  394. if (isNaN(defaultValue)) {
  395. return length;
  396. }
  397. return length === 0 ? defaultValue : length;
  398. }
  399. var width = checkSizeOrDefault(FR.windowWidth, window.location.href.getQuery("width"));
  400. var height = checkSizeOrDefault(FR.windowHeight, window.location.href.getQuery("height"));
  401. var borderLayout = new FR.BorderLayout({
  402. items: items,
  403. renderEl: $body,
  404. width: width,
  405. height: height
  406. });
  407. //给参数界面添加横向滚动条
  408. var showParamsTemplate = paraConfig.useParamsTemplate && paramsTemplate !== null;
  409. addScollBar(paraContainer, $center, paraConfig.height + (showParamsTemplate ? 30 : 0), scrollHeight);
  410. borderLayout.doLayout();
  411. $('[widgetname^=sortable]').removeAttr('style');
  412. initParameterTemplate(paraConfig, paraConfig.items, form.sessionID, borderLayout, paramsTemplate);
  413. $(window).resize(function () {
  414. borderLayout.element.bounds({
  415. 'width': FR.windowWidth,
  416. 'height': FR.windowHeight
  417. });
  418. if (!form.scaleProcess(borderLayout, width, height)) {
  419. addScollBar(paraContainer, $center, paraConfig.height + (showParamsTemplate ? 30 : 0), scrollHeight);
  420. borderLayout.doLayout();
  421. $('[widgetname^=sortable]').removeAttr('style');
  422. }
  423. width = FR.windowWidth;
  424. height = FR.windowHeight;
  425. });
  426. // 整个form都doLayout一下
  427. var browser = $.browser;
  428. //b:for chrome,find reason
  429. if (browser.safari && browser.webkit || browser.msie && browser.version < 7) {
  430. $(window).trigger("resize");
  431. $body.css('overflow', 'auto');
  432. }
  433. // FR.Layout 有this.element.css("overflow","hidden");
  434. //放大后再缩小, body和contentContainer大小一致, 却出现了滚动条, 很难看.
  435. contentContainer.css('overflow', 'auto');
  436. if (!delayDisplay) {
  437. form.parameterCommit();
  438. }
  439. function addScollBar(container, mover, top, height) {
  440. if (container) {
  441. container.hScrollPane({
  442. mover: mover, //指定container对象下的哪个元素需要滚动位置 | 必传项;
  443. showArrow: false, //指定是否显示左右箭头,默认不显示 | 可选项;
  444. top: top, //滚动条所在的top位置
  445. height: height,//滚动条的高度
  446. //moverW:function(){return $(".press").width();}(), //传入水平滚动对象的长度值,不传入的话默认直接获取mover的宽度值 | 可选项;
  447. //handleMinWidth:100,//指定handle的最小宽度,要固定handle的宽度请在css中设定handle的width属性(如 width:28px!important;),不传入则不设定最小宽度 | 可选项;
  448. //dragable:true, //指定是否要支持拖动效果,默认可以拖动 | 可选项;
  449. easing: false, //滚动是否需要滑动效果,默认有滑动效果 | 可选项;
  450. // handleCssAlter:"draghandlealter", //指定拖动鼠标时滚动条的样式,不传入该参数则没有变化效果 | 可选项;
  451. mousewheel: {bind: false, moveLength: 500} //mousewheel: bind->'true',绑定mousewheel事件; ->'false',不绑定mousewheel事件;moveLength是指定鼠标滚动一次移动的距离,默认值:{bind:true,moveLength:300} | 可选项;
  452. });
  453. }
  454. }
  455. function bindParaCollapse($element) {
  456. $element.click(function () {
  457. var resizeTime = new Date();
  458. var self = this;
  459. self.lastResizeTime = resizeTime;
  460. setTimeout(function () {
  461. if (resizeTime === self.lastResizeTime) {
  462. self.lastResizeTime = null; // REPORT-4620,这里使用delete在IE8以下会有bug
  463. paraContainer.animate({
  464. height: (self.hasCollapsed ? "+=" : "-=") + (paraConfig.height + barHeight + paramstemplateHeight)
  465. }, "fast", function () {
  466. var height = paraContainer.height();
  467. self.hasCollapsed = !self.hasCollapsed;
  468. $expandEl.switchClass('parameter-container-collapseimg-down', 'parameter-container-collapseimg-up');
  469. borderLayout.getWidgetByName(alignLayoutName).setVisible(!self.hasCollapsed);
  470. if (borderLayout.getWidgetByName('paramsTemplatePane') !== undefined) {
  471. borderLayout.getWidgetByName('paramsTemplatePane').setVisible(!self.hasCollapsed);
  472. borderLayout.getWidgetByName('saveBtn').setVisible(!self.hasCollapsed);
  473. borderLayout.getWidgetByName('newParamsBtn').setVisible(!self.hasCollapsed);
  474. }
  475. borderLayout.regionField.center.el = $('.content-container');
  476. borderLayout.setRegionWH('north', height);
  477. borderLayout.doLayout();
  478. form.fireEvent(FR.Events.PARACOLLAPSE);
  479. if (FR.Form.bindFitResize && FR.Browser.isIE8Before()) {
  480. form.loadContentPane(true);
  481. }
  482. $('[widgetname^=sortable]').removeAttr('style');
  483. });
  484. }
  485. }, 222);
  486. });
  487. }
  488. })
  489. </script>
  490. <script type="text/javascript">
  491. </script>
  492. </head>
  493. <body style="height:100%; width:100%; overflow:auto">
  494. </body>
  495. </html>