excel.html 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <html xmlns:o="urn:schemas-microsoft-com:office:office"
  2. xmlns:x="urn:schemas-microsoft-com:office:excel"
  3. xmlns="http://www.w3.org/TR/REC-html40">
  4. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  5. <html>
  6. <head>
  7. <meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
  8. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  9. <title>数据导出</title>
  10. <link rel="stylesheet" type="text/css" href="../script/lib/layui/css/layui.css" />
  11. <script src="../script/lib/layui/layui.js"></script>
  12. </head>
  13. <body>
  14. <{loop($product):}>
  15. <fieldset class="layui-elem-field layui-field-title">
  16. <legend><{$v['name']}></legend>
  17. </fieldset>
  18. <table class="layui-table">
  19. <colgroup>
  20. <col width="150">
  21. <col width="200">
  22. <col>
  23. </colgroup>
  24. <thead>
  25. <tr>
  26. <{loop($v['question']):}>
  27. <th><{$v1['name']}></th>
  28. <{endloop}>
  29. </tr>
  30. </thead>
  31. <tbody>
  32. <{foreach($v['order'] as $ko => $vo):}>
  33. <tr height="80">
  34. <{loop($v['question']):}>
  35. <td>
  36. <{if(isset($vo['answer'][$v2['id']]) && $vo['answer'][$v2['id']]):}>
  37. <{if(isset($v2['content']) && $v2['content']):}>
  38. <{foreach(explode(',', $vo['answer'][$v2['id']]) as $ko1 => $vo1):}>
  39. <{if(isset($v2['content'][$vo1]['ctype'])):}>
  40. <{if($v2['content'][$vo1]['ctype'][0] == 2):}>
  41. <{$vo1}>
  42. <{else:}>
  43. <{if($v2['content'][$vo1]['pic']):}>
  44. <a class="dever-img" id="answer_<{$v1['id']}>_<{$v2['id']}>_<{$ko1}>"><img src="<{$v2['content'][$vo1]['pic']}>" layer-src="<{$v2['content'][$vo1]['pic']}>" height="80"/>&nbsp;&nbsp; </a>
  45. <{else:}>
  46. <{$v2['content'][$vo1]['title']}>
  47. <{endif;}>
  48. <{endif;}>
  49. <{endif;}>
  50. <{endforeach}>
  51. <{else:}>
  52. <{if(strstr($vo['answer'][$v2['id']], 'http')):}>
  53. <a class="dever-img" id="answer_<{$v1['id']}>_<{$v2['id']}>"><img src="<{$vo['answer'][$v2['id']]}>" layer-src="<{$vo['answer'][$v2['id']]}>" height="80"/></a>
  54. <{else:}>
  55. <{$vo['answer'][$v2['id']]}>
  56. <{endif;}>
  57. <{endif;}>
  58. <{endif;}>
  59. </td>
  60. <{endloop}>
  61. </tr>
  62. <{endforeach}>
  63. </tbody>
  64. </table>
  65. <{endloop}>
  66. <script>
  67. layui.use(['element', 'layer', 'jquery'], function(){
  68. var element = layui.element;
  69. var layer = layui.layer;
  70. var $ = layui.jquery;
  71. layer.ready(function() {
  72. $(".dever-img").each(function()
  73. {
  74. layer.photos({
  75. photos: '#' + $(this).attr('id')
  76. });
  77. });
  78. });
  79. });
  80. </script>
  81. </body>
  82. </html>