3cef1817ef0d2819b2f9634707e9cf44.php 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  1. <?php if (!defined('THINK_PATH')) exit(); /*a:4:{s:81:"D:\phpstudy_pro\WWW\minongyun\public/../application/admin\view\formula\index.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:1709714141;}*/ ?>
  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. <!--<?php if(is_array($statusList) || $statusList instanceof \think\Collection || $statusList instanceof \think\Paginator): if( count($statusList)==0 ) : echo "" ;else: foreach($statusList as $key=>$vo): ?>-->
  63. <!--<li class="<?php echo \think\Request::instance()->get('status') === (string)$key ? 'active' : ''; ?>"><a href="#t-<?php echo $key; ?>" data-value="<?php echo $key; ?>" data-toggle="tab"><?php echo $vo; ?></a></li>-->
  64. <!--<?php endforeach; endif; else: echo "" ;endif; ?>-->
  65. </ul>
  66. </div>
  67. <div class="panel-body">
  68. <div id="myTabContent" class="tab-content">
  69. <div class="tab-pane fade active in" id="one">
  70. <div class="widget-body no-padding">
  71. <div id="toolbar" class="toolbar">
  72. <a href="javascript:;" class="btn btn-primary btn-refresh" title="<?php echo __('Refresh'); ?>" ><i class="fa fa-refresh"></i> </a>
  73. <a href="javascript:;" class="btn btn-success btn-add <?php echo $auth->check('formula/add')?'':'hide'; ?>" title="<?php echo __('Add'); ?>" data-area=["100%","100%"]><i class="fa fa-plus"></i> <?php echo __('Add'); ?></a>
  74. <a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled <?php echo $auth->check('formula/edit')?'':'hide'; ?>" title="<?php echo __('Edit'); ?>" data-area=["100%","100%"] ><i class="fa fa-pencil"></i> <?php echo __('Edit'); ?></a>
  75. <a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled <?php echo $auth->check('formula/del')?'':'hide'; ?>" title="<?php echo __('Delete'); ?>" ><i class="fa fa-trash"></i> <?php echo __('Delete'); ?></a>
  76. <!--<div class="dropdown btn-group <?php echo $auth->check('formula/multi')?'':'hide'; ?>">-->
  77. <!--<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> <?php echo __('More'); ?></a>-->
  78. <!--<ul class="dropdown-menu text-left" role="menu">-->
  79. <!--<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> <?php echo __('Set to normal'); ?></a></li>-->
  80. <!--<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> <?php echo __('Set to hidden'); ?></a></li>-->
  81. <!--</ul>-->
  82. <!--</div>-->
  83. </div>
  84. <table id="table" class="table table-striped table-bordered table-hover table-nowrap"
  85. data-operate-edit="<?php echo $auth->check('formula/edit'); ?>"
  86. data-operate-del="<?php echo $auth->check('formula/del'); ?>"
  87. width="100%">
  88. </table>
  89. </div>
  90. </div>
  91. </div>
  92. </div>
  93. </div>
  94. <script id="customformtpl" type="text/html">
  95. <!--form表单必须添加form-commsearch这个类-->
  96. <form action="" class="form-commonsearch">
  97. <div style="border-radius:2px;margin-bottom:10px;background:#f5f5f5;padding:15px 20px;">
  98. <div class="row">
  99. <div class="form-group col-xs-12 col-sm-6 col-md-4 col-lg-3">
  100. <label class="control-label ">配方名称</label>
  101. <div>
  102. <input class="form-control" id="name" name="name" type="text" value="" placeholder="配方名称">
  103. </div>
  104. <input class="operate" type="hidden" data-name="name" name="name-operate" value="LIKE"/>
  105. </div>
  106. <div class="col-xs-12 col-sm-6 col-md-3">
  107. <div class="form-group">
  108. <label class="control-label">审核状态</label>
  109. <div class="row">
  110. <div class="col-xs-8">
  111. <select class="admin form-control" name="examine_status">
  112. <option value="">选择</option>
  113. <option value="1">审核中</option>
  114. <option value="2">审核通过</option>
  115. <option value="3">审核驳回</option>
  116. </select>
  117. </div>
  118. </div>
  119. <input class="operate" type="hidden" data-name="examine_status" value="="/>
  120. </div>
  121. </div>
  122. <div class="col-xs-12 col-sm-6 col-md-3">
  123. <div class="form-group">
  124. <label class="control-label">原材料</label>
  125. <div>
  126. <input class="form-control" type="text" name="material" placeholder="原材料" value=""/>
  127. </div>
  128. <input class="operate" type="hidden" data-name="material" value="LIKE"/>
  129. </div>
  130. </div>
  131. <div class="col-xs-12 col-sm-6 col-md-3">
  132. <div class="form-group">
  133. <label class="control-label"></label>
  134. <div class="row">
  135. <button class="btn btn-success" type="submit">提交</button>
  136. <button type="reset" class="btn btn-default">重置</button>
  137. </div>
  138. </div>
  139. </div>
  140. </div>
  141. </div>
  142. </form>
  143. </script>
  144. </div>
  145. </div>
  146. </div>
  147. </div>
  148. </div>
  149. </div>
  150. <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>
  151. <input type="hidden" value="<?php echo \think\Session::get('admin.username'); ?>" name="" id="username">
  152. <input type="hidden" value="<?php echo \think\Session::get('admin.company'); ?>" name="" id="company">
  153. <script>
  154. function watermark(element, config) {
  155. // 获取元素的坐标
  156. function getOffset(el) {
  157. if (el.offsetParent) {
  158. return {
  159. x: el.offsetLeft + getOffset(el.offsetParent).x,
  160. y: el.offsetTop + getOffset(el.offsetParent).y,
  161. };
  162. }
  163. return {
  164. x: el.offsetLeft,
  165. y: el.offsetTop,
  166. };
  167. }
  168. if (!element) return;
  169. // 默认配置
  170. const _config = {
  171. text1: '张三', //文本1
  172. text2: '13868686868', // 文本2
  173. start_x: 0, // x轴起始位置
  174. start_y: 0, // y轴起始位置
  175. space_x: 100, // x轴间距
  176. space_y: 50, // y轴间距
  177. width: 210, // 宽度
  178. height: 80, // 长度
  179. fontSize: 14, // 字体
  180. color: '#aaa', // 字色
  181. alpha: 0.4, // 透明度
  182. rotate: 15, // 倾斜度
  183. };
  184. // 替换默认配置
  185. if (arguments.length === 2 && typeof arguments[1] === "object") {
  186. const src = arguments[1] || {};
  187. for (let key in src) {
  188. if (src[key] && _config[key] && src[key] === _config[key]) {
  189. continue;
  190. } else if (src[key]) {
  191. _config[key] = src[key];
  192. }
  193. }
  194. }
  195. // 节点的总宽度
  196. const total_width = element.scrollWidth;
  197. // 节点的总高度
  198. const total_height = element.scrollHeight;
  199. // 创建文本碎片,用于包含所有的插入节点
  200. const mark = document.createDocumentFragment();
  201. // 水印节点的起始坐标
  202. const position = getOffset(element);
  203. let x = position.x + _config.start_x, y = position.y + _config.start_y;
  204. // 先循环y轴插入水印
  205. do {
  206. // 再循环x轴插入水印
  207. do {
  208. // 创建单个水印节点
  209. const item = document.createElement('div');
  210. item.className = 'watermark-item';
  211. // 设置节点的样式
  212. item.style.position = "absolute";
  213. item.style.zIndex = 99999;
  214. item.style.left = `${x}px`;
  215. item.style.top = `${y}px`;
  216. item.style.width = `${_config.width}px`;
  217. item.style.height = `${_config.height}px`;
  218. item.style.fontSize = `${_config.fontSize}px`;
  219. item.style.color = _config.color;
  220. item.style.textAlign = 'center';
  221. item.style.opacity = _config.alpha;
  222. item.style.filter = `alpha(opacity=${_config.alpha * 100})`;
  223. // item.style.filter = `opacity(${_config.alpha * 100}%)`;
  224. item.style.webkitTransform = `rotate(-${_config.rotate}deg)`;
  225. item.style.MozTransform = `rotate(-${_config.rotate}deg)`;
  226. item.style.msTransform = `rotate(-${_config.rotate}deg)`;
  227. item.style.OTransform = `rotate(-${_config.rotate}deg)`;
  228. item.style.transform = `rotate(-${_config.rotate}deg)`;
  229. item.style.pointerEvents = 'none'; //让水印不遮挡页面的点击事件
  230. // 创建text1水印节点
  231. const text1 = document.createElement('div');
  232. text1.appendChild(document.createTextNode(_config.text1));
  233. item.append(text1);
  234. // 创建text2水印节点
  235. const text2 = document.createElement('div');
  236. text2.appendChild(document.createTextNode(_config.text2));
  237. item.append(text2);
  238. // 添加水印节点到文本碎片
  239. mark.append(item);
  240. // x坐标递增
  241. x = x + _config.width + _config.space_x;
  242. // 超出文本右侧坐标停止插入
  243. } while (total_width + position.x > x + _config.width);
  244. // 重置x初始坐标
  245. x = position.x + _config.start_x;
  246. // y坐标递增
  247. y = y + _config.height + _config.space_y;
  248. // 超出文本底部坐标停止插入
  249. } while (total_height + position.y > y + _config.height);
  250. // 插入文档碎片
  251. element.append(mark);
  252. }
  253. var username = document.getElementById('username');
  254. var company = document.getElementById('company');
  255. //找到存放水印的盒子
  256. const element = document.getElementsByTagName('body')[0];
  257. watermark(element,{text1:username.value,text2:company.value});
  258. </script>
  259. </body>
  260. </html>