index.ejs 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <div class="panel-content">
  2. <div class="panel-title fluid">
  3. <div class="title-main d-flex">
  4. <div class="d-inline-block">
  5. <div class="btn-group group-tab">
  6. </div>
  7. </div>
  8. <div class="d-inline-block mr-2" id="show-level"></div>
  9. </div>
  10. </div>
  11. <div class="content-wrap">
  12. <div class="sjs-height-0" style="background-color: #fff">
  13. <div class="c-body">
  14. <% if (!projectList || projectList.length === 0) { %>
  15. <div class="jumbotron" id="no-project">
  16. <h3 class="display-6">还没有项目数据</h3>
  17. </div>
  18. <% } else { %>
  19. <table class="table table-bordered">
  20. <tr class="text-center">
  21. <th style="min-width: 200px" rowspan="2" class="align-middle">项目名称</th>
  22. <th width="10%" rowspan="2" class="align-middle">创建时间</th>
  23. <th colspan="3">支出合同</th>
  24. <th colspan="3">收入合同</th>
  25. <% if (ctx.session.sessionUser.is_admin) { %>
  26. <th width="10%" rowspan="2" class="align-middle">操作</th>
  27. <% } %>
  28. </tr>
  29. <tr class="text-center">
  30. <th width="6%">合同个数</th>
  31. <th width="10%">合同金额</th>
  32. <th width="15%">支出进度</th>
  33. <th width="6%">合同个数</th>
  34. <th width="10%">合同金额</th>
  35. <th width="15%">回款进度</th>
  36. </tr>
  37. <tbody id="projectList">
  38. </tbody>
  39. </table>
  40. <% } %>
  41. </div>
  42. </div>
  43. </div>
  44. </div>
  45. <script>
  46. const projectList = JSON.parse(unescape('<%- escape(JSON.stringify(projectList)) %>'));
  47. const category = JSON.parse(unescape('<%- escape(JSON.stringify(categoryData)) %>'));
  48. const is_admin = <%- ctx.session.sessionUser.is_admin %>;
  49. </script>