0d8d1405a24bc636256cbf6be2511910.php 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. <?php if (!defined('THINK_PATH')) exit(); /*a:4:{s:90:"D:\phpstudy_pro\WWW\minongyun\public/../application/admin\view\formula\examine_status.html";i:1709714141;s:72:"D:\phpstudy_pro\WWW\minongyun\application\admin\view\layout\default.html";i:1709714141;s:69:"D:\phpstudy_pro\WWW\minongyun\application\admin\view\common\meta.html";i:1709714141;s:71:"D:\phpstudy_pro\WWW\minongyun\application\admin\view\common\script.html";i:1711415624;}*/ ?>
  2. <!DOCTYPE html>
  3. <html>
  4. <head>
  5. <meta charset="utf-8">
  6. <title><?php echo (isset($title) && ($title !== '')?$title:''); ?></title>
  7. <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
  8. <meta name="renderer" content="webkit">
  9. <meta name="referrer" content="never">
  10. <meta name="robots" content="noindex, nofollow">
  11. <link rel="shortcut icon" href="/assets/img/favicon.ico" />
  12. <!-- Loading Bootstrap -->
  13. <link href="/assets/css/backend<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.css?v=<?php echo \think\Config::get('site.version'); ?>" rel="stylesheet">
  14. <?php if(\think\Config::get('fastadmin.adminskin')): ?>
  15. <link href="/assets/css/skins/<?php echo \think\Config::get('fastadmin.adminskin'); ?>.css?v=<?php echo \think\Config::get('site.version'); ?>" rel="stylesheet">
  16. <?php endif; ?>
  17. <!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
  18. <!--[if lt IE 9]>
  19. <script src="/assets/js/html5shiv.js"></script>
  20. <script src="/assets/js/respond.min.js"></script>
  21. <![endif]-->
  22. <script type="text/javascript">
  23. var require = {
  24. config: <?php echo json_encode($config); ?>
  25. };
  26. </script>
  27. </head>
  28. <body class="inside-header inside-aside <?php echo defined('IS_DIALOG') && IS_DIALOG ? 'is-dialog' : ''; ?>">
  29. <div id="main" role="main">
  30. <div class="tab-content tab-addtabs">
  31. <div id="content">
  32. <div class="row">
  33. <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
  34. <section class="content-header hide">
  35. <h1>
  36. <?php echo __('Dashboard'); ?>
  37. <small><?php echo __('Control panel'); ?></small>
  38. </h1>
  39. </section>
  40. <?php if(!IS_DIALOG && !\think\Config::get('fastadmin.multiplenav') && \think\Config::get('fastadmin.breadcrumb')): ?>
  41. <!-- RIBBON -->
  42. <div id="ribbon">
  43. <ol class="breadcrumb pull-left">
  44. <?php if($auth->check('dashboard')): ?>
  45. <li><a href="dashboard" class="addtabsit"><i class="fa fa-dashboard"></i> <?php echo __('Dashboard'); ?></a></li>
  46. <?php endif; ?>
  47. </ol>
  48. <ol class="breadcrumb pull-right">
  49. <?php foreach($breadcrumb as $vo): ?>
  50. <li><a href="javascript:;" data-url="<?php echo $vo['url']; ?>"><?php echo $vo['title']; ?></a></li>
  51. <?php endforeach; ?>
  52. </ol>
  53. </div>
  54. <!-- END RIBBON -->
  55. <?php endif; ?>
  56. <div class="content">
  57. <div class="panel panel-default panel-intro">
  58. <div class="panel-heading">
  59. <?php echo build_heading(null,FALSE); ?>
  60. <ul class="nav nav-tabs" data-field="status">
  61. <li class="<?php echo \think\Request::instance()->get('status') === null ? 'active' : ''; ?>"><a href="#t-all" data-value="" data-toggle="tab"><?php echo __('All'); ?></a></li>
  62. </ul>
  63. </div>
  64. <div class="panel-body">
  65. <div id="myTabContent" class="tab-content">
  66. <div class="tab-pane fade active in" id="one">
  67. <div class="widget-body no-padding">
  68. <table id="table" class="table table-striped table-bordered table-hover table-nowrap" width="100%">
  69. <thead>
  70. <tr>
  71. <th style="text-align: center" class="col-sm-2" >ID</th>
  72. <th style="text-align: center" class="col-sm-2" >配方名称</th>
  73. <th style="text-align: center" class="col-sm-2" >版本号</th>
  74. <th style="text-align: center" class="col-sm-2" >审核时间</th>
  75. <th style="text-align: center" class="col-sm-2" >操作</th>
  76. </tr>
  77. </thead>
  78. <tbody class="xs">
  79. <?php if(is_array($formula) || $formula instanceof \think\Collection || $formula instanceof \think\Paginator): $i = 0; $__LIST__ = $formula;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?>
  80. <tr class="tr" style="text-align: center;height: 50px;">
  81. <td><?php echo $v['id']; ?></td>
  82. <td><?php echo $v['name']; ?></td>
  83. <td><?php echo $v['version']; ?></td>
  84. <td><?php echo $v['update']; ?></td>
  85. <td>
  86. <button type="button" class="btn btn-cha">
  87. <a href="<?php echo url('Formula/examine_list'); ?>?id=<?php echo $v['id']; ?>" style="text-decoration: none;color: black">查看</a>
  88. </button>
  89. </td>
  90. </tr>
  91. <?php endforeach; endif; else: echo "" ;endif; ?>
  92. </tbody>
  93. </table>
  94. <div style="text-align: center">
  95. <?php echo $page; ?>
  96. </div>
  97. </div>
  98. </div>
  99. </div>
  100. </div>
  101. </div>
  102. <script type='text/javascript' src='/assets/js/jquery2.1.1.min.js'></script>
  103. <script type="text/javascript" src="/assets/js/jquery.qrcode.min.js"></script>
  104. <script type="text/javascript" src="/assets/js/jQuery.print.js"></script>
  105. <script>
  106. </script>
  107. </div>
  108. </div>
  109. </div>
  110. </div>
  111. </div>
  112. </div>
  113. <script src="/assets/js/require<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.js" data-main="/assets/js/require-backend<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.js?v=<?php echo htmlentities($site['version']); ?>"></script>
  114. <input type="hidden" value="<?php echo \think\Session::get('admin.username'); ?>" name="" id="username">
  115. <input type="hidden" value="<?php echo \think\Session::get('admin.company'); ?>" name="" id="company">
  116. <script>
  117. function watermark(element, config) {
  118. // 获取元素的坐标
  119. function getOffset(el) {
  120. if (el.offsetParent) {
  121. return {
  122. x: el.offsetLeft + getOffset(el.offsetParent).x,
  123. y: el.offsetTop + getOffset(el.offsetParent).y,
  124. };
  125. }
  126. return {
  127. x: el.offsetLeft,
  128. y: el.offsetTop,
  129. };
  130. }
  131. if (!element) return;
  132. // 默认配置
  133. const _config = {
  134. text1: '张三', //文本1
  135. text2: '13868686868', // 文本2
  136. start_x: 0, // x轴起始位置
  137. start_y: 0, // y轴起始位置
  138. space_x: 100, // x轴间距
  139. space_y: 50, // y轴间距
  140. width: 210, // 宽度
  141. height: 80, // 长度
  142. fontSize: 14, // 字体
  143. color: '#aaa', // 字色
  144. alpha: 0.4, // 透明度
  145. rotate: 15, // 倾斜度
  146. };
  147. // 替换默认配置
  148. if (arguments.length === 2 && typeof arguments[1] === "object") {
  149. const src = arguments[1] || {};
  150. for (let key in src) {
  151. if (src[key] && _config[key] && src[key] === _config[key]) {
  152. continue;
  153. } else if (src[key]) {
  154. _config[key] = src[key];
  155. }
  156. }
  157. }
  158. // 节点的总宽度
  159. const total_width = element.scrollWidth;
  160. // 节点的总高度
  161. const total_height = element.scrollHeight;
  162. // 创建文本碎片,用于包含所有的插入节点
  163. const mark = document.createDocumentFragment();
  164. // 水印节点的起始坐标
  165. const position = getOffset(element);
  166. let x = position.x + _config.start_x, y = position.y + _config.start_y;
  167. // 先循环y轴插入水印
  168. do {
  169. // 再循环x轴插入水印
  170. do {
  171. // 创建单个水印节点
  172. const item = document.createElement('div');
  173. item.className = 'watermark-item';
  174. // 设置节点的样式
  175. item.style.position = "absolute";
  176. item.style.zIndex = 99999;
  177. item.style.left = `${x}px`;
  178. item.style.top = `${y}px`;
  179. item.style.width = `${_config.width}px`;
  180. item.style.height = `${_config.height}px`;
  181. item.style.fontSize = `${_config.fontSize}px`;
  182. item.style.color = _config.color;
  183. item.style.textAlign = 'center';
  184. item.style.opacity = _config.alpha;
  185. item.style.filter = `alpha(opacity=${_config.alpha * 100})`;
  186. // item.style.filter = `opacity(${_config.alpha * 100}%)`;
  187. item.style.webkitTransform = `rotate(-${_config.rotate}deg)`;
  188. item.style.MozTransform = `rotate(-${_config.rotate}deg)`;
  189. item.style.msTransform = `rotate(-${_config.rotate}deg)`;
  190. item.style.OTransform = `rotate(-${_config.rotate}deg)`;
  191. item.style.transform = `rotate(-${_config.rotate}deg)`;
  192. item.style.pointerEvents = 'none'; //让水印不遮挡页面的点击事件
  193. // 创建text1水印节点
  194. const text1 = document.createElement('div');
  195. text1.appendChild(document.createTextNode(_config.text1));
  196. item.append(text1);
  197. // 创建text2水印节点
  198. const text2 = document.createElement('div');
  199. text2.appendChild(document.createTextNode(_config.text2));
  200. item.append(text2);
  201. // 添加水印节点到文本碎片
  202. mark.append(item);
  203. // x坐标递增
  204. x = x + _config.width + _config.space_x;
  205. // 超出文本右侧坐标停止插入
  206. } while (total_width + position.x > x + _config.width);
  207. // 重置x初始坐标
  208. x = position.x + _config.start_x;
  209. // y坐标递增
  210. y = y + _config.height + _config.space_y;
  211. // 超出文本底部坐标停止插入
  212. } while (total_height + position.y > y + _config.height);
  213. // 插入文档碎片
  214. element.append(mark);
  215. }
  216. var username = document.getElementById('username');
  217. var company = document.getElementById('company');
  218. //找到存放水印的盒子
  219. const element = document.getElementsByTagName('body')[0];
  220. watermark(element,{text1:username.value,text2:company.value});
  221. </script>
  222. </body>
  223. </html>