index.html 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. <!DOCTYPE HTML>
  2. <html xmlns:th="http://www.thymeleaf.org"
  3. xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
  4. layout:decorate="~{admin/common/common}">
  5. <head>
  6. <title>项目申报</title>
  7. <style>
  8. .dateform {
  9. float: left;
  10. width: 120px;
  11. }
  12. .datelabel {
  13. float: left;
  14. width: 120px;
  15. }
  16. </style>
  17. </head>
  18. <body layout:fragment="content">
  19. <nav class="breadcrumb" th:action="@{/projectDeclaration/index}" th:method="post">
  20. <i class="Hui-iconfont">&#xe67f;</i>
  21. 首页
  22. <span th:unless="${is_label}" class="c-gray en">&gt; 项目申报</span>
  23. <span th:unless="${is_label}" class="c-gray en">&gt; 列表</span>
  24. <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px"
  25. href="javascript:location.replace(location.href);" title="刷新">
  26. <i class="Hui-iconfont">&#xe68f;</i>
  27. </a>
  28. </nav>
  29. <form id="myForm" th:action="@{/projectDeclaration/index}" th:method="post">
  30. <div class="page-container">
  31. <div class="text-c">
  32. <div class="row clearfix">
  33. <div>
  34. <label class="datelabel">项目名称:</label>
  35. <input style="width:200px;" type="text" class="input-text dateform" placeholder="请输入项目名称查询"
  36. id="projectName"
  37. name="projectName" th:value="${projectName}"/>
  38. </div>
  39. <div>
  40. <label class="datelabel">申报开始日期:</label>
  41. <input type="text" class="input-text dateform" id="startTime1" name="startTime1"
  42. th:value="${startTime1}"/>
  43. <span style="float: left;">-</span>
  44. <input type="text" class="input-text dateform" th:id="startTime2" th:name="startTime2"
  45. th:value="${startTime2}"/>
  46. </div>
  47. <div>
  48. <label class="datelabel">申报截止日期:</label>
  49. <input type="text" class="input-text dateform" th:id="endTime1" th:name="endTime1"
  50. th:value="${endTime1}"/>
  51. <span style="float: left;">-</span>
  52. <input type="text" class="input-text dateform" th:id="endTime2" th:name="endTime2"
  53. th:value="${endTime2}"/>
  54. </div>
  55. <div class="col-xs-1 col-sm-1">
  56. <input type="button" value="搜索" class="btn btn-primary" onclick="$('#myForm').submit();">
  57. </div>
  58. </div>
  59. </div>
  60. <div class="cl pd-5 bg-1 bk-gray mt-20">
  61. <span class="l">
  62. <a th:onclick="'javascript:add1(\'新增\',\'/projectDeclaration/add\',\'1000\',\'500\');'"
  63. class="btn btn-primary radius"><i class="Hui-iconfont">&#xe600;</i> 新增</a>
  64. <!--<a th:onclick="'javascript:statistics(\'项目统计\',\'/projectDeclaration/statistics\',\'1000\',\'500\');'"
  65. class="btn btn-info radius"> 项目统计</a>-->
  66. </span>
  67. <span class="r">共有数据:<strong th:text="${pageInfo.total}" id="total">54</strong> 条</span>
  68. </div>
  69. <!-- 表格 -->
  70. <table id="index" class="table table-border table-bordered table-bg table-hover"
  71. style="table-layout: fixed;width:100%;">
  72. <thead>
  73. <tr class="text-c">
  74. <!--<th style="width:0px;"></th>-->
  75. <th style="width:150px;">项目名称</th>
  76. <th style="width:150px;">申报开始日期</th>
  77. <th style="width:150px;">申报截止日期</th>
  78. <th style="width:150px;">状态</th>
  79. <th style="width:150px;">操作</th>
  80. </tr>
  81. </thead>
  82. <tbody>
  83. <tr class="text-c" th:each="model,iterStat:${pageInfo.list}" th:object="${model}">
  84. <td th:text="*{project_name}" class="text-overflow" th:title="*{project_name}"></td>
  85. <td th:text="*{apply_startdate}"></td>
  86. <td th:text="*{apply_enddate}"></td>
  87. <td th:text="*{status_name}"></td>
  88. <td class="td-manage">
  89. <a title="详情" href="javascript:;" class="ml-5" style="text-decoration:none"
  90. th:onclick="'javascript:projectDetail(\'详情\',\'/projectDeclaration/detail/'+*{id}+'\');'">详情</a>
  91. <!--<a th:if="*{status == '0'}" title="编辑" href="javascript:;" class="ml-5" style="text-decoration:none"
  92. th:onclick="'javascript:editProject(\'编辑\',\'/projectDeclaration/edit/'+*{id}+'\');'">编辑</a>-->
  93. <a title="编辑" href="javascript:;" class="ml-5" style="text-decoration:none"
  94. th:onclick="'javascript:editProject(\'编辑\',\'/projectDeclaration/edit/'+*{id}+'\');'">编辑</a>
  95. <!-- <a title="推送" href="javascript:;" class="ml-5" style="text-decoration:none"
  96. th:onclick="'javascript:pushProject(\''+*{id}+'\');'">推送</a> -->
  97. <!--<a title="推送" href="javascript:;" class="ml-5" style="text-decoration:none"
  98. th:onclick="'javascript:notify_addPush(\'项目申报推送\',\'/projectDeclaration/directPush/'+*{id}+'\',\'800\',\'500\');'">推送</a>-->
  99. <!--<a th:if="*{status != '0'}" title="阅读情况" href="javascript:;" class="ml-5"
  100. style="text-decoration:none"
  101. th:onclick="'javascript:notify_detailInfo(\'阅读情况\',\'/projectDeclaration/notifyDetail/'+*{id}+'\',\'800\',\'500\');'">阅读情况</a>-->
  102. <!--<a th:if="*{status == '0'}" title="删除" href="javascript:;" class="ml-5" style="text-decoration:none"
  103. th:onclick="'javascript:deleteProject(\''+*{id}+'\');'">删除</a>-->
  104. <a title="删除" href="javascript:;" class="ml-5" style="text-decoration:none"
  105. th:onclick="'javascript:deleteProject(\''+*{id}+'\');'">删除</a>
  106. </td>
  107. </tr>
  108. </tbody>
  109. </table>
  110. <div th:replace="admin/common/page :: page"></div>
  111. </div>
  112. </form>
  113. <script type="text/javascript" th:src="@{/js/common/page.js}"></script>
  114. <script th:inline="javascript">
  115. laydate.render({
  116. elem: '#startTime1', //指定元素
  117. /*min: 0,
  118. format: 'yyyy-MM-dd HH:mm',
  119. type: 'datetime'*/
  120. });
  121. laydate.render({
  122. elem: '#startTime2', //指定元素
  123. /*min: 0,
  124. format: 'yyyy-MM-dd HH:mm',
  125. type: 'datetime'*/
  126. });
  127. laydate.render({
  128. elem: '#endTime1', //指定元素
  129. /*min: 0,
  130. format: 'yyyy-MM-dd HH:mm',
  131. type: 'datetime'*/
  132. });
  133. laydate.render({
  134. elem: '#endTime2', //指定元素
  135. /*min: 0,
  136. format: 'yyyy-MM-dd HH:mm',
  137. type: 'datetime'*/
  138. });
  139. //添加
  140. function add1(title, url, w, h) {
  141. var index = layer_show(title, pagePath + url, w, h);
  142. layer.full(index);
  143. }
  144. /*详情*/
  145. function projectDetail(title, url, w, h) {
  146. var index = layer_show(title, pagePath + url, w, h);
  147. layer.full(index);
  148. }
  149. /*编辑*/
  150. function editProject(title, url, w, h) {
  151. var index = layer_show(title, pagePath + url, w, h);
  152. layer.full(index);
  153. }
  154. /*删除*/
  155. function deleteProject(id) {
  156. layer.confirm('确认要删除吗?', function (index) {
  157. $.ajax({
  158. type: "GET",
  159. dataType: "json",
  160. url: pagePath + "/projectDeclaration/delete/" + id,
  161. success: function (result) {
  162. if (result.success) {
  163. smileMessage(result.message)
  164. setTime();
  165. } else {
  166. errorMessage(result.message);
  167. }
  168. },
  169. error: function () {
  170. errorMessage('系统错误!');
  171. }
  172. });
  173. });
  174. }
  175. /*推送*/
  176. function pushProject(id) {
  177. layer.confirm('确认要推送吗?', function (index) {
  178. $.ajax({
  179. type: "GET",
  180. dataType: "json",
  181. url: pagePath + "/projectDeclaration/push/" + id,
  182. success: function (result) {
  183. if (result.success) {
  184. smileMessage(result.message)
  185. setTime();
  186. } else {
  187. errorMessage(result.message);
  188. }
  189. },
  190. error: function () {
  191. errorMessage('系统错误!');
  192. }
  193. });
  194. });
  195. }
  196. /*项目统计*/
  197. function statistics(title, url, w, h) {
  198. var index = layer_show(title, pagePath + url, w, h);
  199. layer.full(index);
  200. }
  201. /* 阅读情况 */
  202. function notify_detailInfo(title, url, w, h) {
  203. layer_show(title, pagePath + url, w, h);
  204. }
  205. /*
  206. 参数解释:
  207. title 标题
  208. url 请求的url
  209. id 需要操作的数据id
  210. w 弹出层宽度(缺省调默认值)
  211. h 弹出层高度(缺省调默认值)
  212. */
  213. /*管理员-*/
  214. function notify_addPush(title, url, w, h) {
  215. layer_show(title, pagePath + url, w, h);
  216. }
  217. </script>
  218. </body>
  219. </html>